| POST | /document-permission/assign |
|---|
import 'package:servicestack/servicestack.dart';
class DocumentPemissionResponse implements IConvertible
{
int? code;
String? message;
DocumentPemissionResponse({this.code,this.message});
DocumentPemissionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message
};
getTypeName() => "DocumentPemissionResponse";
TypeContext? context = _ctx;
}
class AssignDocumentPermissionsRequest implements IPost, IConvertible
{
int? documentId;
List<int>? accountIds;
String? reason;
DateTime? dateExpired;
bool? canRead;
bool? canWrite;
bool? canComment;
bool? canGrantRead;
int? teamId;
AssignDocumentPermissionsRequest({this.documentId,this.accountIds,this.reason,this.dateExpired,this.canRead,this.canWrite,this.canComment,this.canGrantRead,this.teamId});
AssignDocumentPermissionsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
documentId = json['documentId'];
accountIds = JsonConverters.fromJson(json['accountIds'],'List<int>',context!);
reason = json['reason'];
dateExpired = JsonConverters.fromJson(json['dateExpired'],'DateTime',context!);
canRead = json['canRead'];
canWrite = json['canWrite'];
canComment = json['canComment'];
canGrantRead = json['canGrantRead'];
teamId = json['teamId'];
return this;
}
Map<String, dynamic> toJson() => {
'documentId': documentId,
'accountIds': JsonConverters.toJson(accountIds,'List<int>',context!),
'reason': reason,
'dateExpired': JsonConverters.toJson(dateExpired,'DateTime',context!),
'canRead': canRead,
'canWrite': canWrite,
'canComment': canComment,
'canGrantRead': canGrantRead,
'teamId': teamId
};
getTypeName() => "AssignDocumentPermissionsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'DocumentPemissionResponse': TypeInfo(TypeOf.Class, create:() => DocumentPemissionResponse()),
'AssignDocumentPermissionsRequest': TypeInfo(TypeOf.Class, create:() => AssignDocumentPermissionsRequest()),
});
Dart AssignDocumentPermissionsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /document-permission/assign HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"documentId":0,"accountIds":[0],"reason":"String","dateExpired":"0001-01-01T00:00:00.0000000+07:06","canRead":false,"canWrite":false,"canComment":false,"canGrantRead":false,"teamId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"code":0,"message":"String"}