""" Options: Date: 2025-05-04 22:21:20 Version: 8.71 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://team.evovoice.io #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: SendMessage.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ 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 class MessageDirections(str, Enum): INCOMING = 'Incoming' OUTGOING = 'Outgoing' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class MessageInfo: id: Optional[str] = None account_id: Optional[str] = None customer_id: Optional[str] = None endpoint_id: Optional[str] = None endpoint_display_name: Optional[str] = None date: Optional[str] = None direction: Optional[MessageDirections] = None other_address: Optional[str] = None sender: Optional[str] = None text: Optional[str] = None is_unread: bool = False # @Route("/sessions/{sessionId}/messages", "POST") # @Route("/messages") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SendMessage(IReturn[MessageInfo]): # @ApiMember(Description="The ID of the session you want to post a message to. Specify either this or EndpointId+ToAddress") session_id: Optional[str] = None """ The ID of the session you want to post a message to. Specify either this or EndpointId+ToAddress """ # @ApiMember(Description="The ID of the endpoint you want to post a message to. Typically the ID of a phone number endpoint. Not used if SessionId is specified") endpoint_id: Optional[str] = None """ The ID of the endpoint you want to post a message to. Typically the ID of a phone number endpoint. Not used if SessionId is specified """ # @ApiMember(Description="The address of the party you want to send a message to, e.g. +15556667777. Not used if SessionId is specified") to_address: Optional[str] = None """ The address of the party you want to send a message to, e.g. +15556667777. Not used if SessionId is specified """ # @ApiMember(Description="The body of the message") body: Optional[str] = None """ The body of the message """