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 Registrationprofile:
id: Optional[str] = None
name: Optional[str] = None
hint: Optional[str] = None
order: int = 0
register_automatically: bool = False
register_in_background: bool = False
thumbnail_url: Optional[str] = None
prog_code: Optional[str] = None
version_control_type: int = 0
wo_place_logo: int = 0
wo_printer_bins: Optional[str] = None
select_all_files: bool = False
class RegistrationprofileStepLayout(str, Enum):
ONE_COLUMN_12 = 'OneColumn_12'
TWO_COLUMN_6_6 = 'TwoColumn_6_6'
TWO_COLUMN_7_5 = 'TwoColumn_7_5'
THREE_COLUMN_4_4_4 = 'ThreeColumn_4_4_4'
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FieldState:
required: bool = False
visible: bool = False
readonly: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationProfileFieldStateBase(FieldState):
document_field_i_d: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationprofileField:
id: Optional[str] = None
document_field_i_d: Optional[str] = None
label: Optional[str] = None
user_control_type: Optional[str] = None
user_control_properties: Optional[List[SerializableKeyValuePair[str, Object]]] = None
hint: Optional[str] = None
order: int = 0
has_dependable_fields: bool = False
entity_name: Optional[str] = None
state: Optional[RegistrationProfileFieldStateBase] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationprofileGroupState:
collapsed: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationprofileGroup:
id: Optional[str] = None
name: Optional[str] = None
label: Optional[str] = None
order: int = 0
column_index: int = 0
fields: Optional[List[RegistrationprofileField]] = None
label_layout_type: int = 0
state: Optional[RegistrationprofileGroupState] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationprofileStep:
id: Optional[str] = None
name: Optional[str] = None
order: int = 0
layout: Optional[RegistrationprofileStepLayout] = None
groups: Optional[List[RegistrationprofileGroup]] = None
class MessageType(IntEnum):
INFORMATION = 1
WARNING = 2
ERROR = 3
SUCCESS = 4
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class InformationMessageBase(IInformationMessage):
type: Optional[MessageType] = None
summary: Optional[str] = None
full_message: Optional[str] = None
field_name: Optional[str] = None
keep_open: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationprofileDetails(Registrationprofile):
steps: Optional[List[RegistrationprofileStep]] = None
messages: Optional[List[InformationMessageBase]] = None
read_only: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetRegistrationProfileDetailsFromEmailDraft:
pid_tag: Optional[str] = None
is_office365_context: bool = False
Python GetRegistrationProfileDetailsFromEmailDraft 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 /jsonl/reply/GetRegistrationProfileDetailsFromEmailDraft HTTP/1.1
Host: doapigw.baasbv.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"PidTag":"String","IsOffice365Context":false}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Steps":[{"ID":"00000000-0000-0000-0000-000000000000","Name":"String","Order":0,"Layout":"OneColumn_12","Groups":[{"ID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Order":0,"ColumnIndex":0,"Fields":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentFieldID":"00000000-0000-0000-0000-000000000000","Label":"String","UserControlType":"String","UserControlProperties":[{}],"Hint":"String","Order":0,"HasDependableFields":false,"EntityName":"String","State":{"DocumentFieldID":"00000000-0000-0000-0000-000000000000","Required":false,"Visible":false,"Readonly":false}}],"LabelLayoutType":0,"State":{"Collapsed":false}}]}],"Messages":[{}],"ReadOnly":false,"ID":"00000000-0000-0000-0000-000000000000","Name":"String","Hint":"String","Order":0,"RegisterAutomatically":false,"RegisterInBackground":false,"ThumbnailUrl":"String","ProgCode":"String","VersionControlType":0,"WOPlaceLogo":0,"WOPrinterBins":"String","SelectAllFiles":false}