Evo Voice

<back to all web services

NewFlowMessage

The following routes are available for this service:
All Verbs/flows/message
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.Flows;
using Voice.Api.Flows.Data;
using ServiceStack.IO;
using ServiceStack.Web;

namespace ServiceStack
{
    [Flags]
    public enum CacheControl
    {
        None = 0,
        Public = 1,
        Private = 2,
        MustRevalidate = 4,
        NoCache = 8,
        NoStore = 16,
        NoTransform = 32,
        ProxyRevalidate = 64,
    }

    public partial class HttpResult
    {
        public HttpResult()
        {
            Headers = new Dictionary<string, string>{};
            Cookies = new List<Cookie>{};
        }

        public virtual string ResponseText { get; set; }
        public virtual Stream ResponseStream { get; set; }
        public virtual FileInfo FileInfo { get; set; }
        public virtual IVirtualFile VirtualFile { get; set; }
        public virtual string ContentType { get; set; }
        public virtual Dictionary<string, string> Headers { get; set; }
        public virtual List<Cookie> Cookies { get; set; }
        public virtual string ETag { get; set; }
        public virtual TimeSpan? Age { get; set; }
        public virtual TimeSpan? MaxAge { get; set; }
        public virtual DateTime? Expires { get; set; }
        public virtual DateTime? LastModified { get; set; }
        public virtual CacheControl CacheControl { get; set; }
        public virtual Func<IDisposable> ResultScope { get; set; }
        public virtual bool AllowsPartialResponse { get; set; }
        public virtual IDictionary<string, string> Options { get; set; }
        public virtual int Status { get; set; }
        public virtual HttpStatusCode StatusCode { get; set; }
        public virtual string StatusDescription { get; set; }
        public virtual Object Response { get; set; }
        public virtual IContentTypeWriter ResponseFilter { get; set; }
        public virtual IRequest RequestContext { get; set; }
        public virtual string View { get; set; }
        public virtual string Template { get; set; }
        public virtual int PaddingLength { get; set; }
        public virtual bool IsPartialRequest { get; set; }
    }

    [Flags]
    public 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,
    }

}

namespace ServiceStack.IO
{
    public partial interface IVirtualDirectory
    {
    }

    public partial interface IVirtualFile
    {
        IVirtualPathProvider VirtualPathProvider { get; set; }
        string Extension { get; set; }
        long Length { get; set; }
    }

    public partial interface IVirtualPathProvider
    {
        IVirtualDirectory RootDirectory { get; set; }
        string VirtualPathSeparator { get; set; }
        string RealPathSeparator { get; set; }
    }

}

namespace ServiceStack.Web
{
    public partial interface IContentTypeWriter
    {
    }

    public partial interface IHttpFile
    {
        string Name { get; set; }
        string FileName { get; set; }
        long ContentLength { get; set; }
        string ContentType { get; set; }
        Stream InputStream { get; set; }
    }

    public partial interface IRequest
    {
        Object OriginalRequest { get; set; }
        IResponse Response { get; set; }
        string OperationName { get; set; }
        string Verb { get; set; }
        RequestAttributes RequestAttributes { get; set; }
        IRequestPreferences RequestPreferences { get; set; }
        Object Dto { get; set; }
        string ContentType { get; set; }
        bool IsLocal { get; set; }
        string UserAgent { get; set; }
        IDictionary<string, Cookie> Cookies { get; set; }
        string ResponseContentType { get; set; }
        bool HasExplicitResponseContentType { get; set; }
        Dictionary<string, Object> Items { get; set; }
        NameValueCollection Headers { get; set; }
        NameValueCollection QueryString { get; set; }
        NameValueCollection FormData { get; set; }
        bool UseBufferedStream { get; set; }
        string RawUrl { get; set; }
        string AbsoluteUri { get; set; }
        string UserHostAddress { get; set; }
        string RemoteIp { get; set; }
        string Authorization { get; set; }
        bool IsSecureConnection { get; set; }
        string[] AcceptTypes { get; set; }
        string PathInfo { get; set; }
        string OriginalPathInfo { get; set; }
        Stream InputStream { get; set; }
        long ContentLength { get; set; }
        IHttpFile[] Files { get; set; }
        Uri UrlReferrer { get; set; }
    }

    public partial interface IRequestPreferences
    {
        bool AcceptsBrotli { get; set; }
        bool AcceptsDeflate { get; set; }
        bool AcceptsGzip { get; set; }
    }

    public partial interface IResponse
    {
        Object OriginalResponse { get; set; }
        IRequest Request { get; set; }
        int StatusCode { get; set; }
        string StatusDescription { get; set; }
        string ContentType { get; set; }
        Stream OutputStream { get; set; }
        Object Dto { get; set; }
        bool UseBufferedStream { get; set; }
        bool IsClosed { get; set; }
        bool KeepAlive { get; set; }
        bool HasStarted { get; set; }
        Dictionary<string, Object> Items { get; set; }
    }

}

namespace Voice.Api.Flows
{
    public partial class NewFlowMessage
    {
        ///<summary>
        ///The ID of the endpoint that received the message
        ///</summary>
        [ApiMember(Description="The ID of the endpoint that received the message")]
        public virtual string EndpointId { get; set; }

        ///<summary>
        ///The session values
        ///</summary>
        [ApiMember(Description="The session values")]
        public virtual Struct SessionParameters { get; set; }

        ///<summary>
        ///The from address
        ///</summary>
        [ApiMember(Description="The from address")]
        public virtual string FromAddress { get; set; }

        ///<summary>
        ///The to address
        ///</summary>
        [ApiMember(Description="The to address")]
        public virtual string ToAddress { get; set; }

        ///<summary>
        ///The identity of the sender
        ///</summary>
        [ApiMember(Description="The identity of the sender")]
        public virtual string Identity { 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")]
        public virtual string DisplayName { 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")]
        public virtual string MessageUrl { get; set; }
    }

}

namespace Voice.Api.Flows.Data
{
    public partial class Struct
        : Dictionary<string, Value>
    {
    }

    public partial class Value
    {
        public Value()
        {
            ListValue = new List<Struct>{};
        }

        public virtual bool? BoolValue { get; set; }
        public virtual string StringValue { get; set; }
        public virtual double? NumberValue { get; set; }
        public virtual List<Struct> ListValue { get; set; }
        public virtual Struct StructValue { get; set; }
    }

}

C# 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

{}