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 GetRegistrationprofileDetailsWithDocument:
id: Optional[str] = None
document_id: Optional[str] = None
is_office365_context: bool = False
is_opened_from_non_d_m_s_location: Optional[bool] = None
Python GetRegistrationprofileDetailsWithDocument 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 /jsv/reply/GetRegistrationprofileDetailsWithDocument HTTP/1.1
Host: doapigw.baasbv.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ID: 00000000-0000-0000-0000-000000000000,
DocumentId: 00000000-0000-0000-0000-000000000000,
IsOffice365Context: False,
IsOpenedFromNonDMSLocation: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Steps:
[
{
Name: String,
Order: 0,
Layout: OneColumn_12,
Groups:
[
{
Name: String,
Label: String,
Order: 0,
ColumnIndex: 0,
Fields:
[
{
Label: String,
UserControlType: String,
UserControlProperties:
[
{
}
],
Hint: String,
Order: 0,
HasDependableFields: False,
EntityName: String,
State:
{
Required: False,
Visible: False,
Readonly: False
}
}
],
LabelLayoutType: 0,
State:
{
Collapsed: False
}
}
]
}
],
Messages:
[
{
}
],
ReadOnly: False,
Name: String,
Hint: String,
Order: 0,
RegisterAutomatically: False,
RegisterInBackground: False,
ThumbnailUrl: String,
ProgCode: String,
VersionControlType: 0,
WOPlaceLogo: 0,
WOPrinterBins: String,
SelectAllFiles: False
}