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: Optional[int] = None
register_automatically: Optional[bool] = None
register_in_background: Optional[bool] = None
thumbnail_url: Optional[str] = None
prog_code: Optional[str] = None
version_control_type: Optional[int] = None
wo_place_logo: Optional[int] = None
wo_printer_bins: Optional[str] = None
select_all_files: Optional[bool] = None
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 RegistrationProfileFieldStateBase:
document_field_i_d: Optional[str] = None
required: Optional[bool] = None
visible: Optional[bool] = None
readonly: Optional[bool] = 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: Optional[int] = None
has_dependable_fields: Optional[bool] = None
entity_name: Optional[str] = None
state: Optional[RegistrationProfileFieldStateBase] = None
@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: Optional[int] = None
column_index: Optional[int] = None
fields: Optional[List[RegistrationprofileField]] = None
label_layout_type: Optional[int] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationprofileStep:
id: Optional[str] = None
name: Optional[str] = None
order: Optional[int] = None
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: Optional[bool] = None
@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: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetRegistrationProfileDetailsFromEmailDraft:
pid_tag: Optional[str] = None
is_office365_context: Optional[bool] = None
Python GetRegistrationProfileDetailsFromEmailDraft 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/GetRegistrationProfileDetailsFromEmailDraft HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
PidTag: String,
IsOffice365Context: 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 } ] } ], 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 }