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 Outlook365Properties:
pid_tag: Optional[str] = None
item_id: Optional[str] = None
ews_url: Optional[str] = None
token: Optional[str] = None
@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 CorporateIdentityMail:
document_id: Optional[str] = None
email_html: Optional[str] = None
is_registered: Optional[bool] = None
document_nr: Optional[str] = None
values: Optional[List[RegistrationProfileFieldStateBase]] = None
registration_profile_i_d: Optional[str] = None
register_automatically: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RegistrationValue:
key: Optional[str] = None
value: Optional[str] = None
shadow_value: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Transition:
id: Optional[str] = None
reason: Optional[str] = None
delay_date: Optional[datetime.datetime] = None
delay_reason: Optional[str] = None
user_i_ds: Optional[List[int]] = None
group_i_ds: Optional[List[int]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Process:
id: Optional[int] = None
title: Optional[str] = None
description: Optional[str] = None
note: Optional[str] = None
coordinator: Optional[str] = None
urgent: Optional[bool] = None
transitions: Optional[List[Transition]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CreateDraftCorporateIdentityMail(Outlook365Properties):
registration_profile_i_d: Optional[str] = None
values: Optional[List[RegistrationValue]] = None
processes: Optional[List[Process]] = None
document_upload_id: Optional[str] = None
message_queue_id: Optional[str] = None
reply_email_html: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateDraftCorporateIdentityMail(CreateDraftCorporateIdentityMail):
email_html: Optional[str] = None
Python UpdateDraftCorporateIdentityMail DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /json/reply/UpdateDraftCorporateIdentityMail HTTP/1.1
Host: digiofficeapigateway.deltares.nl
Accept: application/json
Content-Type: application/json
Content-Length: length
{"EmailHtml":"String","RegistrationProfileID":"00000000-0000-0000-0000-000000000000","Values":[{"Key":"00000000-0000-0000-0000-000000000000","Value":"String","ShadowValue":"String"}],"Processes":[{"ID":0,"Title":"String","Description":"String","Note":"String","Coordinator":"String","Urgent":false,"Transitions":[{"ID":"00000000-0000-0000-0000-000000000000","Reason":"String","DelayDate":"0001-01-01T00:00:00.0000000","DelayReason":"String","UserIDs":[0],"GroupIDs":[0]}]}],"DocumentUploadId":"String","MessageQueueId":"String","ReplyEmailHtml":"String","PidTag":"String","ItemId":"String","EwsUrl":"String","Token":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"DocumentId":"00000000-0000-0000-0000-000000000000","EmailHtml":"String","IsRegistered":false,"DocumentNr":"String","Values":[{"DocumentFieldID":"00000000-0000-0000-0000-000000000000","Required":false,"Visible":false,"Readonly":false}],"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","RegisterAutomatically":false}