| POST | /workflow-step/{StepId}/redo-request |
|---|
import 'package:servicestack/servicestack.dart';
class WorkflowRedoRequestDetail implements IConvertible
{
int? id;
int? documentId;
int? stepId;
String? stepName;
int? requestedBy;
String? requestedByName;
int? approverId;
String? approverName;
int? status;
String? reason;
String? comment;
DateTime? createdAt;
DateTime? actionAt;
WorkflowRedoRequestDetail({this.id,this.documentId,this.stepId,this.stepName,this.requestedBy,this.requestedByName,this.approverId,this.approverName,this.status,this.reason,this.comment,this.createdAt,this.actionAt});
WorkflowRedoRequestDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
documentId = json['documentId'];
stepId = json['stepId'];
stepName = json['stepName'];
requestedBy = json['requestedBy'];
requestedByName = json['requestedByName'];
approverId = json['approverId'];
approverName = json['approverName'];
status = json['status'];
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,
'documentId': documentId,
'stepId': stepId,
'stepName': stepName,
'requestedBy': requestedBy,
'requestedByName': requestedByName,
'approverId': approverId,
'approverName': approverName,
'status': status,
'reason': reason,
'comment': comment,
'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
'actionAt': JsonConverters.toJson(actionAt,'DateTime',context!)
};
getTypeName() => "WorkflowRedoRequestDetail";
TypeContext? context = _ctx;
}
class WorkflowRedoRequestResponse implements IConvertible
{
int? code;
String? message;
bool? requiresApproval;
WorkflowRedoRequestDetail? request;
WorkflowRedoRequestResponse({this.code,this.message,this.requiresApproval,this.request});
WorkflowRedoRequestResponse.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'],'WorkflowRedoRequestDetail',context!);
return this;
}
Map<String, dynamic> toJson() => {
'code': code,
'message': message,
'requiresApproval': requiresApproval,
'request': JsonConverters.toJson(request,'WorkflowRedoRequestDetail',context!)
};
getTypeName() => "WorkflowRedoRequestResponse";
TypeContext? context = _ctx;
}
class SubmitWorkflowRedoRequest implements IConvertible
{
int? stepId;
String? reason;
SubmitWorkflowRedoRequest({this.stepId,this.reason});
SubmitWorkflowRedoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
stepId = json['stepId'];
reason = json['reason'];
return this;
}
Map<String, dynamic> toJson() => {
'stepId': stepId,
'reason': reason
};
getTypeName() => "SubmitWorkflowRedoRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
'WorkflowRedoRequestDetail': TypeInfo(TypeOf.Class, create:() => WorkflowRedoRequestDetail()),
'WorkflowRedoRequestResponse': TypeInfo(TypeOf.Class, create:() => WorkflowRedoRequestResponse()),
'SubmitWorkflowRedoRequest': TypeInfo(TypeOf.Class, create:() => SubmitWorkflowRedoRequest()),
});
Dart SubmitWorkflowRedoRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /workflow-step/{StepId}/redo-request HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
stepId: 0,
reason: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
code: 0,
message: String,
requiresApproval: False,
request:
{
id: 0,
documentId: 0,
stepId: 0,
stepName: String,
requestedBy: 0,
requestedByName: String,
approverId: 0,
approverName: String,
status: 0,
reason: String,
comment: String,
actionAt: "0001-01-01T00:00:00.0000000+07:06"
}
}