| POST | /workflow-delete-request/{Id}/cancel |
|---|
import 'package:servicestack/servicestack.dart';
enum WorkflowDeleteRequestStatus
{
Pending,
Approved,
Rejected,
Cancelled,
}
class WorkflowDeleteRequestDetail implements IConvertible
{
int? id;
int? workflowId;
int? requestedBy;
String? requestedByName;
int? approverId;
String? approverName;
WorkflowDeleteRequestStatus? status;
String? reason;
String? comment;
DateTime? createdAt;
DateTime? actionAt;
WorkflowDeleteRequestDetail({this.id,this.workflowId,this.requestedBy,this.requestedByName,this.approverId,this.approverName,this.status,this.reason,this.comment,this.createdAt,this.actionAt});
WorkflowDeleteRequestDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
workflowId = json['workflowId'];
requestedBy = json['requestedBy'];
requestedByName = json['requestedByName'];
approverId = json['approverId'];
approverName = json['approverName'];
status = JsonConverters.fromJson(json['status'],'WorkflowDeleteRequestStatus',context!);
reason = json['reason'];
comment = json['comment'];
createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
actionAt = JsonConverters.fromJson(json['actionAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'workflowId': workflowId,
'requestedBy': requestedBy,
'requestedByName': requestedByName,
'approverId': approverId,
'approverName': approverName,
'status': JsonConverters.toJson(status,'WorkflowDeleteRequestStatus',context!),
'reason': reason,
'comment': comment,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'actionAt': JsonConverters.toJson(actionAt,'DateTime',context!)
};
getTypeName() => "WorkflowDeleteRequestDetail";
TypeContext? context = _ctx;
}
class WorkflowDeleteRequestResponse implements IConvertible
{
int? code;
String? message;
bool? requiresApproval;
WorkflowDeleteRequestDetail? request;
WorkflowDeleteRequestResponse({this.code,this.message,this.requiresApproval,this.request});
WorkflowDeleteRequestResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
code = json['code'];
message = json['message'];
requiresApproval = json['requiresApproval'];
request = JsonConverters.fromJson(json['request'],'WorkflowDeleteRequestDetail',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'requiresApproval': requiresApproval,
'request': JsonConverters.toJson(request,'WorkflowDeleteRequestDetail',context!)
};
getTypeName() => "WorkflowDeleteRequestResponse";
TypeContext? context = _ctx;
}
class CancelWorkflowDeleteRequest implements IConvertible
{
int? id;
CancelWorkflowDeleteRequest({this.id});
CancelWorkflowDeleteRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id
};
getTypeName() => "CancelWorkflowDeleteRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'qlcn_api.vsmlab.vn', types: <String, TypeInfo> {
'WorkflowDeleteRequestStatus': TypeInfo(TypeOf.Enum, enumValues:WorkflowDeleteRequestStatus.values),
'WorkflowDeleteRequestDetail': TypeInfo(TypeOf.Class, create:() => WorkflowDeleteRequestDetail()),
'WorkflowDeleteRequestResponse': TypeInfo(TypeOf.Class, create:() => WorkflowDeleteRequestResponse()),
'CancelWorkflowDeleteRequest': TypeInfo(TypeOf.Class, create:() => CancelWorkflowDeleteRequest()),
});
Dart CancelWorkflowDeleteRequest 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 /workflow-delete-request/{Id}/cancel HTTP/1.1
Host: qlcn-api.vsmlab.vn
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"code":0,"message":"String","requiresApproval":false,"request":{"id":0,"workflowId":0,"requestedBy":0,"requestedByName":"String","approverId":0,"approverName":"String","status":"Pending","reason":"String","comment":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","actionAt":"0001-01-01T00:00:00.0000000+07:06"}}