Evo Voice

<back to all web services

NewFlowMessage

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

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Value() = 
        member val BoolValue:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val StringValue:String = null with get,set
        member val NumberValue:Nullable<Double> = new Nullable<Double>() with get,set
        member val ListValue:ResizeArray<Struct> = new ResizeArray<Struct>() with get,set
        member val StructValue:Struct = null with get,set

    [<AllowNullLiteral>]
    type Struct() = 
        inherit Dictionary<String, Value>()

    [<AllowNullLiteral>]
    type NewFlowMessage() = 
        ///<summary>
        ///The ID of the endpoint that received the message
        ///</summary>
        [<ApiMember(Description="The ID of the endpoint that received the message")>]
        member val EndpointId:String = null with get,set

        ///<summary>
        ///The session values
        ///</summary>
        [<ApiMember(Description="The session values")>]
        member val SessionParameters:Struct = null with get,set

        ///<summary>
        ///The from address
        ///</summary>
        [<ApiMember(Description="The from address")>]
        member val FromAddress:String = null with get,set

        ///<summary>
        ///The to address
        ///</summary>
        [<ApiMember(Description="The to address")>]
        member val ToAddress:String = null with get,set

        ///<summary>
        ///The identity of the sender
        ///</summary>
        [<ApiMember(Description="The identity of the sender")>]
        member val Identity:String = null with get,set

        ///<summary>
        ///The display name of the sender (will default to identity if not specified
        ///</summary>
        [<ApiMember(Description="The display name of the sender (will default to identity if not specified")>]
        member val DisplayName:String = null with get,set

        ///<summary>
        ///The URL to call when replies need to be sent back
        ///</summary>
        [<ApiMember(Description="The URL to call when replies need to be sent back")>]
        member val MessageUrl:String = null with get,set

    [<AllowNullLiteral>]
    type IVirtualDirectory = 
        interface end

    [<AllowNullLiteral>]
    type IVirtualPathProvider = 
        abstract RootDirectory:IVirtualDirectory with get,set
        abstract VirtualPathSeparator:String with get,set
        abstract RealPathSeparator:String with get,set

    [<AllowNullLiteral>]
    type IVirtualFile = 
        abstract VirtualPathProvider:IVirtualPathProvider with get,set
        abstract Extension:String with get,set
        abstract Length:Int64 with get,set

    [<Flags>]
    type CacheControl =
        | None = 0
        | Public = 1
        | Private = 2
        | MustRevalidate = 4
        | NoCache = 8
        | NoStore = 16
        | NoTransform = 32
        | ProxyRevalidate = 64

    [<AllowNullLiteral>]
    type IContentTypeWriter = 
        interface end

    [<AllowNullLiteral>]
    type IResponse = 
        abstract OriginalResponse:Object with get,set
        abstract Request:IRequest with get,set
        abstract StatusCode:Int32 with get,set
        abstract StatusDescription:String with get,set
        abstract ContentType:String with get,set
        abstract OutputStream:Stream with get,set
        abstract Dto:Object with get,set
        abstract UseBufferedStream:Boolean with get,set
        abstract IsClosed:Boolean with get,set
        abstract KeepAlive:Boolean with get,set
        abstract HasStarted:Boolean with get,set
        abstract Items:Dictionary<String, Object> with get,set

    [<Flags>]
    type 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

    [<AllowNullLiteral>]
    type IRequestPreferences = 
        abstract AcceptsBrotli:Boolean with get,set
        abstract AcceptsDeflate:Boolean with get,set
        abstract AcceptsGzip:Boolean with get,set

    [<AllowNullLiteral>]
    type IRequest = 
        abstract OriginalRequest:Object with get,set
        abstract Response:IResponse with get,set
        abstract OperationName:String with get,set
        abstract Verb:String with get,set
        abstract RequestAttributes:RequestAttributes with get,set
        abstract RequestPreferences:IRequestPreferences with get,set
        abstract Dto:Object with get,set
        abstract ContentType:String with get,set
        abstract IsLocal:Boolean with get,set
        abstract UserAgent:String with get,set
        abstract Cookies:IDictionary<String, Cookie> with get,set
        abstract ResponseContentType:String with get,set
        abstract HasExplicitResponseContentType:Boolean with get,set
        abstract Items:Dictionary<String, Object> with get,set
        abstract Headers:NameValueCollection with get,set
        abstract QueryString:NameValueCollection with get,set
        abstract FormData:NameValueCollection with get,set
        abstract UseBufferedStream:Boolean with get,set
        abstract RawUrl:String with get,set
        abstract AbsoluteUri:String with get,set
        abstract UserHostAddress:String with get,set
        abstract RemoteIp:String with get,set
        abstract Authorization:String with get,set
        abstract IsSecureConnection:Boolean with get,set
        abstract AcceptTypes:String[] with get,set
        abstract PathInfo:String with get,set
        abstract OriginalPathInfo:String with get,set
        abstract InputStream:Stream with get,set
        abstract ContentLength:Int64 with get,set
        abstract Files:IHttpFile[] with get,set
        abstract UrlReferrer:Uri with get,set

    [<AllowNullLiteral>]
    type HttpResult() = 
        member val ResponseText:String = null with get,set
        member val ResponseStream:Stream = null with get,set
        member val FileInfo:FileInfo = null with get,set
        member val VirtualFile:IVirtualFile = null with get,set
        member val ContentType:String = null with get,set
        member val Headers:Dictionary<String, String> = new Dictionary<String, String>() with get,set
        member val Cookies:ResizeArray<Cookie> = new ResizeArray<Cookie>() with get,set
        member val ETag:String = null with get,set
        member val Age:Nullable<TimeSpan> = new Nullable<TimeSpan>() with get,set
        member val MaxAge:Nullable<TimeSpan> = new Nullable<TimeSpan>() with get,set
        member val Expires:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val LastModified:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val CacheControl:CacheControl = new CacheControl() with get,set
        member val ResultScope:Func<IDisposable> = null with get,set
        member val AllowsPartialResponse:Boolean = new Boolean() with get,set
        member val Options:IDictionary<String, String> = null with get,set
        member val Status:Int32 = new Int32() with get,set
        member val StatusCode:HttpStatusCode = new HttpStatusCode() with get,set
        member val StatusDescription:String = null with get,set
        member val Response:Object = null with get,set
        member val ResponseFilter:IContentTypeWriter = null with get,set
        member val RequestContext:IRequest = null with get,set
        member val View:String = null with get,set
        member val Template:String = null with get,set
        member val PaddingLength:Int32 = new Int32() with get,set
        member val IsPartialRequest:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type IHttpFile = 
        abstract Name:String with get,set
        abstract FileName:String with get,set
        abstract ContentLength:Int64 with get,set
        abstract ContentType:String with get,set
        abstract InputStream:Stream with get,set

F# NewFlowMessage DTOs

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

HTTP + CSV

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/csv
Content-Type: text/csv
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/csv
Content-Length: length

{}