| POST | /WorkflowStep/update |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowStep:
id: int = 0
# @References(typeof(Document))
workflow_id: int = 0
step_order: Optional[int] = None
# @Required()
# @StringLength(255)
step_name: Optional[str] = None
# @Required()
is_required: bool = False
sla_legal_value: Optional[int] = None
sla_legal_is_by_day: Optional[bool] = None
sla_internal_value: Optional[int] = None
sla_internal_is_by_day: Optional[bool] = None
require_attachment: bool = False
# @Required()
description: Optional[str] = None
created_by: int = 0
# @Ignore()
department_ids: Optional[List[int]] = None
# @Ignore()
step_basis_document_ids: Optional[List[int]] = None
# @Ignore()
step_attached_ids: Optional[List[int]] = None
# @Ignore()
main_assignee_ids: Optional[List[int]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WorkflowStepResponse(IResponseRequest):
code: int = 0
message: Optional[str] = None
inserted_id: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BasicUploadedFile:
file_name: Optional[str] = None
filekey: Optional[str] = None
file_url: Optional[str] = None
checksum: Optional[str] = None
e_tag: Optional[str] = None
file_size: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UploadedFiles(BasicUploadedFile):
id: Optional[int] = None
uploaded_file: Optional[str] = None
sub_document_id: Optional[int] = None
step_id: Optional[int] = None
code: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CreateWorkflowStepRequest(WorkflowStep):
step_attach_files: Optional[List[UploadedFiles]] = None
Python CreateWorkflowStepRequest 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 /WorkflowStep/update HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsv
Content-Type: text/jsv
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/jsv
Content-Length: length
{
code: 0,
message: String,
insertedId: 0
}