Evo Voice

<back to all web services

NewFlowMessage

The following routes are available for this service:
All Verbs/flows/message


export class NodeParameterMap
{
    [key:string] : NodeParameter;

    public constructor(init?: Partial<NodeParameterMap>) { (Object as any).assign(this, init); }
}


export class Value
{
    public boolValue?: boolean;
    public stringValue?: string;
    public numberValue?: number;
    public listValue?: Struct[];
    public structValue?: Struct;

    public constructor(init?: Partial<Value>) { (Object as any).assign(this, init); }
}

export class Struct
{

    public constructor(init?: Partial<Struct>) { (Object as any).assign(this, init); }
}

export class NewFlowMessage
{
    /**
    * The ID of the endpoint that received the message
    */
    // @ApiMember(Description="The ID of the endpoint that received the message")
    public endpointId?: string;

    /**
    * The session values
    */
    // @ApiMember(Description="The session values")
    public sessionParameters?: Struct;

    /**
    * The from address
    */
    // @ApiMember(Description="The from address")
    public fromAddress?: string;

    /**
    * The to address
    */
    // @ApiMember(Description="The to address")
    public toAddress?: string;

    /**
    * The identity of the sender
    */
    // @ApiMember(Description="The identity of the sender")
    public identity?: string;

    /**
    * The display name of the sender (will default to identity if not specified
    */
    // @ApiMember(Description="The display name of the sender (will default to identity if not specified")
    public displayName?: string;

    /**
    * The URL to call when replies need to be sent back
    */
    // @ApiMember(Description="The URL to call when replies need to be sent back")
    public messageUrl?: string;

    public constructor(init?: Partial<NewFlowMessage>) { (Object as any).assign(this, init); }
}

export interface IVirtualDirectory
{
}

export interface IVirtualPathProvider
{
    rootDirectory?: IVirtualDirectory;
    virtualPathSeparator?: string;
    realPathSeparator?: string;
}

export interface IVirtualFile
{
    virtualPathProvider?: IVirtualPathProvider;
    extension?: string;
    length?: number;
}

// @Flags()
export enum CacheControl
{
    None = 0,
    Public = 1,
    Private = 2,
    MustRevalidate = 4,
    NoCache = 8,
    NoStore = 16,
    NoTransform = 32,
    ProxyRevalidate = 64,
}

export interface IContentTypeWriter
{
}

export interface IResponse
{
    originalResponse?: Object;
    request?: IRequest;
    statusCode?: number;
    statusDescription?: string;
    contentType?: string;
    outputStream?: string;
    dto?: Object;
    useBufferedStream?: boolean;
    isClosed?: boolean;
    keepAlive?: boolean;
    hasStarted?: boolean;
    items?: { [index: string]: Object; };
}

// @Flags()
export enum RequestAttributes
{
    None = 0,
    Localhost = 1,
    LocalSubnet = 2,
    External = 4,
    Secure = 8,
    InSecure = 16,
    AnySecurityMode = 24,
    HttpHead = 32,
    HttpGet = 64,
    HttpPost = 128,
    HttpPut = 256,
    HttpDelete = 512,
    HttpPatch = 1024,
    HttpOptions = 2048,
    HttpOther = 4096,
    AnyHttpMethod = 8160,
    OneWay = 8192,
    Reply = 16384,
    AnyCallStyle = 24576,
    Soap11 = 32768,
    Soap12 = 65536,
    Xml = 131072,
    Json = 262144,
    Jsv = 524288,
    ProtoBuf = 1048576,
    Csv = 2097152,
    Html = 4194304,
    Wire = 8388608,
    MsgPack = 16777216,
    FormatOther = 33554432,
    AnyFormat = 67076096,
    Http = 67108864,
    MessageQueue = 134217728,
    Tcp = 268435456,
    Grpc = 536870912,
    EndpointOther = 1073741824,
    AnyEndpoint = 2080374784,
    InProcess = -2147483648,
    InternalNetworkAccess = -2147483645,
    AnyNetworkAccessType = -2147483641,
    Any = -1,
}

export interface IRequestPreferences
{
    acceptsBrotli?: boolean;
    acceptsDeflate?: boolean;
    acceptsGzip?: boolean;
}

export interface IRequest
{
    originalRequest?: Object;
    response?: IResponse;
    operationName?: string;
    verb?: string;
    requestAttributes?: RequestAttributes;
    requestPreferences?: IRequestPreferences;
    dto?: Object;
    contentType?: string;
    isLocal?: boolean;
    userAgent?: string;
    cookies?: { [index: string]: Cookie; };
    responseContentType?: string;
    hasExplicitResponseContentType?: boolean;
    items?: { [index: string]: Object; };
    headers?: NameValueCollection;
    queryString?: NameValueCollection;
    formData?: NameValueCollection;
    useBufferedStream?: boolean;
    rawUrl?: string;
    absoluteUri?: string;
    userHostAddress?: string;
    remoteIp?: string;
    authorization?: string;
    isSecureConnection?: boolean;
    acceptTypes?: string[];
    pathInfo?: string;
    originalPathInfo?: string;
    inputStream?: string;
    contentLength?: number;
    files?: IHttpFile[];
    urlReferrer?: string;
}

export class HttpResult
{
    public responseText?: string;
    public responseStream?: string;
    public fileInfo?: FileInfo;
    public virtualFile?: IVirtualFile;
    public contentType?: string;
    public headers?: { [index: string]: string; };
    public cookies?: Cookie[];
    public eTag?: string;
    public age?: string;
    public maxAge?: string;
    public expires?: string;
    public lastModified?: string;
    public cacheControl?: CacheControl;
    public resultScope?: Func<IDisposable>;
    public allowsPartialResponse?: boolean;
    public options?: { [index: string]: string; };
    public status?: number;
    public statusCode?: HttpStatusCode;
    public statusDescription?: string;
    public response?: Object;
    public responseFilter?: IContentTypeWriter;
    public requestContext?: IRequest;
    public view?: string;
    public template?: string;
    public paddingLength?: number;
    public isPartialRequest?: boolean;

    public constructor(init?: Partial<HttpResult>) { (Object as any).assign(this, init); }
}

export interface IHttpFile
{
    name?: string;
    fileName?: string;
    contentLength?: number;
    contentType?: string;
    inputStream?: string;
}

TypeScript NewFlowMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /flows/message HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	endpointId: String,
	sessionParameters: 
	{
		String: 
		{
			boolValue: False,
			stringValue: String,
			numberValue: 0,
			listValue: 
			[
				{
					String: 
					{
						boolValue: False,
						stringValue: String,
						numberValue: 0,
						listValue: 
						[
							{
								String: 
								{
									boolValue: False,
									stringValue: String,
									numberValue: 0,
									listValue: 
									[
										null
									]
								}
							}
						],
						structValue: 
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									null
								]
							}
						}
					}
				}
			],
			structValue: 
			{
				String: 
				{
					boolValue: False,
					stringValue: String,
					numberValue: 0,
					listValue: 
					[
						{
							String: 
							{
								boolValue: False,
								stringValue: String,
								numberValue: 0,
								listValue: 
								[
									null
								]
							}
						}
					],
					structValue: 
					{
						String: 
						{
							boolValue: False,
							stringValue: String,
							numberValue: 0,
							listValue: 
							[
								null
							]
						}
					}
				}
			}
		}
	},
	fromAddress: String,
	toAddress: String,
	identity: String,
	displayName: String,
	messageUrl: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}