tvpl.api

<back to all web services

CreateWorkflowStepRequest

Requires Authentication
The following routes are available for this service:
POST/WorkflowStep/update
import 'package:servicestack/servicestack.dart';

class WorkflowStep implements IConvertible
{
    int? id;
    // @References(typeof(Document))
    int? workflowId;

    int? stepOrder;
    // @required()
    // @StringLength(255)
    String? stepName;

    // @required()
    bool? isRequired;

    int? slaLegalValue;
    bool? slaLegalIsByDay;
    int? slaInternalValue;
    bool? slaInternalIsByDay;
    bool? requireAttachment;
    // @required()
    String? description;

    int? createdBy;
    // @ignore()
    List<int>? departmentIds;

    // @ignore()
    List<int>? stepBasisDocumentIds;

    // @ignore()
    List<int>? stepAttachedIds;

    // @ignore()
    List<int>? mainAssigneeIds;

    WorkflowStep({this.id,this.workflowId,this.stepOrder,this.stepName,this.isRequired,this.slaLegalValue,this.slaLegalIsByDay,this.slaInternalValue,this.slaInternalIsByDay,this.requireAttachment,this.description,this.createdBy,this.departmentIds,this.stepBasisDocumentIds,this.stepAttachedIds,this.mainAssigneeIds});
    WorkflowStep.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        workflowId = json['workflowId'];
        stepOrder = json['stepOrder'];
        stepName = json['stepName'];
        isRequired = json['isRequired'];
        slaLegalValue = json['slaLegalValue'];
        slaLegalIsByDay = json['slaLegalIsByDay'];
        slaInternalValue = json['slaInternalValue'];
        slaInternalIsByDay = json['slaInternalIsByDay'];
        requireAttachment = json['requireAttachment'];
        description = json['description'];
        createdBy = json['createdBy'];
        departmentIds = JsonConverters.fromJson(json['departmentIds'],'List<int>',context!);
        stepBasisDocumentIds = JsonConverters.fromJson(json['stepBasisDocumentIds'],'List<int>',context!);
        stepAttachedIds = JsonConverters.fromJson(json['stepAttachedIds'],'List<int>',context!);
        mainAssigneeIds = JsonConverters.fromJson(json['mainAssigneeIds'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'workflowId': workflowId,
        'stepOrder': stepOrder,
        'stepName': stepName,
        'isRequired': isRequired,
        'slaLegalValue': slaLegalValue,
        'slaLegalIsByDay': slaLegalIsByDay,
        'slaInternalValue': slaInternalValue,
        'slaInternalIsByDay': slaInternalIsByDay,
        'requireAttachment': requireAttachment,
        'description': description,
        'createdBy': createdBy,
        'departmentIds': JsonConverters.toJson(departmentIds,'List<int>',context!),
        'stepBasisDocumentIds': JsonConverters.toJson(stepBasisDocumentIds,'List<int>',context!),
        'stepAttachedIds': JsonConverters.toJson(stepAttachedIds,'List<int>',context!),
        'mainAssigneeIds': JsonConverters.toJson(mainAssigneeIds,'List<int>',context!)
    };

    getTypeName() => "WorkflowStep";
    TypeContext? context = _ctx;
}

class WorkflowStepResponse implements IResponseRequest, IConvertible
{
    int? code;
    String? message;
    int? insertedId;

    WorkflowStepResponse({this.code,this.message,this.insertedId});
    WorkflowStepResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        message = json['message'];
        insertedId = json['insertedId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message,
        'insertedId': insertedId
    };

    getTypeName() => "WorkflowStepResponse";
    TypeContext? context = _ctx;
}

class BasicUploadedFile implements IConvertible
{
    String? fileName;
    String? filekey;
    String? fileUrl;
    String? checksum;
    String? eTag;
    int? fileSize;

    BasicUploadedFile({this.fileName,this.filekey,this.fileUrl,this.checksum,this.eTag,this.fileSize});
    BasicUploadedFile.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        fileName = json['fileName'];
        filekey = json['filekey'];
        fileUrl = json['fileUrl'];
        checksum = json['checksum'];
        eTag = json['eTag'];
        fileSize = json['fileSize'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'fileName': fileName,
        'filekey': filekey,
        'fileUrl': fileUrl,
        'checksum': checksum,
        'eTag': eTag,
        'fileSize': fileSize
    };

    getTypeName() => "BasicUploadedFile";
    TypeContext? context = _ctx;
}

class UploadedFiles extends BasicUploadedFile implements IConvertible
{
    int? id;
    String? uploadedFile;
    int? subDocumentId;
    int? stepId;
    int? code;

    UploadedFiles({this.id,this.uploadedFile,this.subDocumentId,this.stepId,this.code});
    UploadedFiles.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        id = json['id'];
        uploadedFile = json['uploadedFile'];
        subDocumentId = json['subDocumentId'];
        stepId = json['stepId'];
        code = json['code'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'id': id,
        'uploadedFile': uploadedFile,
        'subDocumentId': subDocumentId,
        'stepId': stepId,
        'code': code
    });

    getTypeName() => "UploadedFiles";
    TypeContext? context = _ctx;
}

class CreateWorkflowStepRequest extends WorkflowStep implements IConvertible
{
    List<UploadedFiles>? stepAttachFiles;

    CreateWorkflowStepRequest({this.stepAttachFiles});
    CreateWorkflowStepRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        stepAttachFiles = JsonConverters.fromJson(json['stepAttachFiles'],'List<UploadedFiles>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'stepAttachFiles': JsonConverters.toJson(stepAttachFiles,'List<UploadedFiles>',context!)
    });

    getTypeName() => "CreateWorkflowStepRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'WorkflowStep': TypeInfo(TypeOf.Class, create:() => WorkflowStep()),
    'WorkflowStepResponse': TypeInfo(TypeOf.Class, create:() => WorkflowStepResponse()),
    'BasicUploadedFile': TypeInfo(TypeOf.Class, create:() => BasicUploadedFile()),
    'UploadedFiles': TypeInfo(TypeOf.Class, create:() => UploadedFiles()),
    'CreateWorkflowStepRequest': TypeInfo(TypeOf.Class, create:() => CreateWorkflowStepRequest()),
    'List<UploadedFiles>': TypeInfo(TypeOf.Class, create:() => <UploadedFiles>[]),
});

Dart CreateWorkflowStepRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /WorkflowStep/update HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"stepAttachFiles":[{"id":0,"uploadedFile":"String","subDocumentId":0,"stepId":0,"code":0,"fileName":"String","filekey":"String","fileUrl":"String","checksum":"String","eTag":"String","fileSize":0}],"id":0,"workflowId":0,"stepOrder":0,"stepName":"String","isRequired":false,"slaLegalValue":0,"slaLegalIsByDay":false,"slaInternalValue":0,"slaInternalIsByDay":false,"requireAttachment":false,"description":"String","createdBy":0,"departmentIds":[0],"stepBasisDocumentIds":[0],"stepAttachedIds":[0],"mainAssigneeIds":[0]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"code":0,"message":"String","insertedId":0}