openapi

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 6 Imported by: 1

README

Go API client for openapi

This is the public Twilio REST API.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/twilio-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.27.1
  • Package version: 1.0.0
  • Build package: com.twilio.oai.TwilioGoGenerator For more information, please visit https://support.twilio.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://flex-api.twilio.com

Class Method HTTP request Description
ChannelsApi CreateChannel Post /v1/Channels
ChannelsApi DeleteChannel Delete /v1/Channels/{Sid}
ChannelsApi FetchChannel Get /v1/Channels/{Sid}
ChannelsApi ListChannel Get /v1/Channels
ConfigurationApi FetchConfiguration Get /v1/Configuration
FlexFlowsApi CreateFlexFlow Post /v1/FlexFlows
FlexFlowsApi DeleteFlexFlow Delete /v1/FlexFlows/{Sid}
FlexFlowsApi FetchFlexFlow Get /v1/FlexFlows/{Sid}
FlexFlowsApi ListFlexFlow Get /v1/FlexFlows
FlexFlowsApi UpdateFlexFlow Post /v1/FlexFlows/{Sid}
WebChannelsApi CreateWebChannel Post /v1/WebChannels
WebChannelsApi DeleteWebChannel Delete /v1/WebChannels/{Sid}
WebChannelsApi FetchWebChannel Get /v1/WebChannels/{Sid}
WebChannelsApi ListWebChannel Get /v1/WebChannels
WebChannelsApi UpdateWebChannel Post /v1/WebChannels/{Sid}

Documentation For Models

Documentation For Authorization

accountSid_authToken

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiService added in v0.11.0

type ApiService struct {
	// contains filtered or unexported fields
}

func NewApiService added in v0.11.0

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService

func NewApiServiceWithClient added in v0.11.0

func NewApiServiceWithClient(client twilio.BaseClient) *ApiService

func (*ApiService) CreateChannel added in v0.11.0

func (c *ApiService) CreateChannel(params *CreateChannelParams) (*FlexV1Channel, error)

func (*ApiService) CreateFlexFlow added in v0.11.0

func (c *ApiService) CreateFlexFlow(params *CreateFlexFlowParams) (*FlexV1FlexFlow, error)

func (*ApiService) CreateWebChannel added in v0.11.0

func (c *ApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV1WebChannel, error)

func (*ApiService) DeleteChannel added in v0.11.0

func (c *ApiService) DeleteChannel(Sid string) error

func (*ApiService) DeleteFlexFlow added in v0.11.0

func (c *ApiService) DeleteFlexFlow(Sid string) error

func (*ApiService) DeleteWebChannel added in v0.11.0

func (c *ApiService) DeleteWebChannel(Sid string) error

func (*ApiService) FetchChannel added in v0.11.0

func (c *ApiService) FetchChannel(Sid string) (*FlexV1Channel, error)

func (*ApiService) FetchConfiguration added in v0.11.0

func (c *ApiService) FetchConfiguration(params *FetchConfigurationParams) (*FlexV1Configuration, error)

func (*ApiService) FetchFlexFlow added in v0.11.0

func (c *ApiService) FetchFlexFlow(Sid string) (*FlexV1FlexFlow, error)

func (*ApiService) FetchWebChannel added in v0.11.0

func (c *ApiService) FetchWebChannel(Sid string) (*FlexV1WebChannel, error)

func (*ApiService) ListChannel added in v0.11.0

func (c *ApiService) ListChannel(params *ListChannelParams) ([]FlexV1Channel, error)

Lists Channel records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListFlexFlow added in v0.11.0

func (c *ApiService) ListFlexFlow(params *ListFlexFlowParams) ([]FlexV1FlexFlow, error)

Lists FlexFlow records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) ListWebChannel added in v0.11.0

func (c *ApiService) ListWebChannel(params *ListWebChannelParams) ([]FlexV1WebChannel, error)

Lists WebChannel records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.

func (*ApiService) PageChannel added in v0.13.0

func (c *ApiService) PageChannel(params *ListChannelParams, pageToken, pageNumber string) (*ListChannelResponse, error)

Retrieve a single page of Channel records from the API. Request is executed immediately.

func (*ApiService) PageFlexFlow added in v0.13.0

func (c *ApiService) PageFlexFlow(params *ListFlexFlowParams, pageToken, pageNumber string) (*ListFlexFlowResponse, error)

Retrieve a single page of FlexFlow records from the API. Request is executed immediately.

func (*ApiService) PageWebChannel added in v0.13.0

func (c *ApiService) PageWebChannel(params *ListWebChannelParams, pageToken, pageNumber string) (*ListWebChannelResponse, error)

Retrieve a single page of WebChannel records from the API. Request is executed immediately.

func (*ApiService) StreamChannel added in v0.13.0

func (c *ApiService) StreamChannel(params *ListChannelParams) (chan FlexV1Channel, error)

Streams Channel records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamFlexFlow added in v0.13.0

func (c *ApiService) StreamFlexFlow(params *ListFlexFlowParams) (chan FlexV1FlexFlow, error)

Streams FlexFlow records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) StreamWebChannel added in v0.13.0

func (c *ApiService) StreamWebChannel(params *ListWebChannelParams) (chan FlexV1WebChannel, error)

Streams WebChannel records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.

func (*ApiService) UpdateFlexFlow added in v0.11.0

func (c *ApiService) UpdateFlexFlow(Sid string, params *UpdateFlexFlowParams) (*FlexV1FlexFlow, error)

func (*ApiService) UpdateWebChannel added in v0.11.0

func (c *ApiService) UpdateWebChannel(Sid string, params *UpdateWebChannelParams) (*FlexV1WebChannel, error)

type CreateChannelParams

type CreateChannelParams struct {
	// The chat channel's friendly name.
	ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"`
	// The chat channel's unique name.
	ChatUniqueName *string `json:"ChatUniqueName,omitempty"`
	// The chat participant's friendly name.
	ChatUserFriendlyName *string `json:"ChatUserFriendlyName,omitempty"`
	// The SID of the Flex Flow.
	FlexFlowSid *string `json:"FlexFlowSid,omitempty"`
	// The `identity` value that uniquely identifies the new resource's chat User.
	Identity *string `json:"Identity,omitempty"`
	// Whether to create the channel as long-lived.
	LongLived *bool `json:"LongLived,omitempty"`
	// The pre-engagement data.
	PreEngagementData *string `json:"PreEngagementData,omitempty"`
	// The Target Contact Identity, for example the phone number of an SMS.
	Target *string `json:"Target,omitempty"`
	// The Task attributes to be added for the TaskRouter Task.
	TaskAttributes *string `json:"TaskAttributes,omitempty"`
	// The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
	TaskSid *string `json:"TaskSid,omitempty"`
}

Optional parameters for the method 'CreateChannel'

func (*CreateChannelParams) SetChatFriendlyName

func (params *CreateChannelParams) SetChatFriendlyName(ChatFriendlyName string) *CreateChannelParams

func (*CreateChannelParams) SetChatUniqueName

func (params *CreateChannelParams) SetChatUniqueName(ChatUniqueName string) *CreateChannelParams

func (*CreateChannelParams) SetChatUserFriendlyName

func (params *CreateChannelParams) SetChatUserFriendlyName(ChatUserFriendlyName string) *CreateChannelParams

func (*CreateChannelParams) SetFlexFlowSid

func (params *CreateChannelParams) SetFlexFlowSid(FlexFlowSid string) *CreateChannelParams

func (*CreateChannelParams) SetIdentity

func (params *CreateChannelParams) SetIdentity(Identity string) *CreateChannelParams

func (*CreateChannelParams) SetLongLived

func (params *CreateChannelParams) SetLongLived(LongLived bool) *CreateChannelParams

func (*CreateChannelParams) SetPreEngagementData

func (params *CreateChannelParams) SetPreEngagementData(PreEngagementData string) *CreateChannelParams

func (*CreateChannelParams) SetTarget

func (params *CreateChannelParams) SetTarget(Target string) *CreateChannelParams

func (*CreateChannelParams) SetTaskAttributes

func (params *CreateChannelParams) SetTaskAttributes(TaskAttributes string) *CreateChannelParams

func (*CreateChannelParams) SetTaskSid

func (params *CreateChannelParams) SetTaskSid(TaskSid string) *CreateChannelParams

type CreateFlexFlowParams

type CreateFlexFlowParams struct {
	// The channel type. One of `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. By default, Studio’s Send to Flex widget passes it on to the Task attributes for Tasks created based on this Flex Flow. The Task attributes will be used by the Flex UI to render the respective Task as appropriate (applying channel-specific design and length limits). If `channelType` is `facebook`, `whatsapp` or `line`, the Send to Flex widget should set the Task Channel to Programmable Chat.
	ChannelType *string `json:"ChannelType,omitempty"`
	// The SID of the chat service.
	ChatServiceSid *string `json:"ChatServiceSid,omitempty"`
	// The channel contact's Identity.
	ContactIdentity *string `json:"ContactIdentity,omitempty"`
	// Whether the new Flex Flow is enabled.
	Enabled *bool `json:"Enabled,omitempty"`
	// A descriptive string that you create to describe the Flex Flow resource.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
	IntegrationChannel *string `json:"Integration.Channel,omitempty"`
	// In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
	IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"`
	// The SID of the Studio Flow. Required when `integrationType` is `studio`.
	IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"`
	// The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
	IntegrationPriority *int `json:"Integration.Priority,omitempty"`
	// The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
	IntegrationRetryCount *int `json:"Integration.RetryCount,omitempty"`
	// The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
	IntegrationTimeout *int `json:"Integration.Timeout,omitempty"`
	// The URL of the external webhook. Required when `integrationType` is `external`.
	IntegrationUrl *string `json:"Integration.Url,omitempty"`
	// The Workflow SID for a new Task. Required when `integrationType` is `task`.
	IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"`
	// The Workspace SID for a new Task. Required when `integrationType` is `task`.
	IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"`
	// The software that will handle inbound messages. [Integration Type](https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types) can be: `studio`, `external`, or `task`.
	IntegrationType *string `json:"IntegrationType,omitempty"`
	// When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
	JanitorEnabled *bool `json:"JanitorEnabled,omitempty"`
	// When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
	LongLived *bool `json:"LongLived,omitempty"`
}

Optional parameters for the method 'CreateFlexFlow'

func (*CreateFlexFlowParams) SetChannelType

func (params *CreateFlexFlowParams) SetChannelType(ChannelType string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetChatServiceSid

func (params *CreateFlexFlowParams) SetChatServiceSid(ChatServiceSid string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetContactIdentity

func (params *CreateFlexFlowParams) SetContactIdentity(ContactIdentity string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetEnabled

func (params *CreateFlexFlowParams) SetEnabled(Enabled bool) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetFriendlyName

func (params *CreateFlexFlowParams) SetFriendlyName(FriendlyName string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationChannel

func (params *CreateFlexFlowParams) SetIntegrationChannel(IntegrationChannel string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationCreationOnMessage

func (params *CreateFlexFlowParams) SetIntegrationCreationOnMessage(IntegrationCreationOnMessage bool) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationFlowSid

func (params *CreateFlexFlowParams) SetIntegrationFlowSid(IntegrationFlowSid string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationPriority

func (params *CreateFlexFlowParams) SetIntegrationPriority(IntegrationPriority int) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationRetryCount

func (params *CreateFlexFlowParams) SetIntegrationRetryCount(IntegrationRetryCount int) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationTimeout

func (params *CreateFlexFlowParams) SetIntegrationTimeout(IntegrationTimeout int) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationType

func (params *CreateFlexFlowParams) SetIntegrationType(IntegrationType string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationUrl

func (params *CreateFlexFlowParams) SetIntegrationUrl(IntegrationUrl string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationWorkflowSid

func (params *CreateFlexFlowParams) SetIntegrationWorkflowSid(IntegrationWorkflowSid string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetIntegrationWorkspaceSid

func (params *CreateFlexFlowParams) SetIntegrationWorkspaceSid(IntegrationWorkspaceSid string) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetJanitorEnabled

func (params *CreateFlexFlowParams) SetJanitorEnabled(JanitorEnabled bool) *CreateFlexFlowParams

func (*CreateFlexFlowParams) SetLongLived

func (params *CreateFlexFlowParams) SetLongLived(LongLived bool) *CreateFlexFlowParams

type CreateWebChannelParams

type CreateWebChannelParams struct {
	// The chat channel's friendly name.
	ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"`
	// The chat channel's unique name.
	ChatUniqueName *string `json:"ChatUniqueName,omitempty"`
	// The chat participant's friendly name.
	CustomerFriendlyName *string `json:"CustomerFriendlyName,omitempty"`
	// The SID of the Flex Flow.
	FlexFlowSid *string `json:"FlexFlowSid,omitempty"`
	// The chat identity.
	Identity *string `json:"Identity,omitempty"`
	// The pre-engagement data.
	PreEngagementData *string `json:"PreEngagementData,omitempty"`
}

Optional parameters for the method 'CreateWebChannel'

func (*CreateWebChannelParams) SetChatFriendlyName

func (params *CreateWebChannelParams) SetChatFriendlyName(ChatFriendlyName string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetChatUniqueName

func (params *CreateWebChannelParams) SetChatUniqueName(ChatUniqueName string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetCustomerFriendlyName

func (params *CreateWebChannelParams) SetCustomerFriendlyName(CustomerFriendlyName string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetFlexFlowSid

func (params *CreateWebChannelParams) SetFlexFlowSid(FlexFlowSid string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetIdentity

func (params *CreateWebChannelParams) SetIdentity(Identity string) *CreateWebChannelParams

func (*CreateWebChannelParams) SetPreEngagementData

func (params *CreateWebChannelParams) SetPreEngagementData(PreEngagementData string) *CreateWebChannelParams

type FetchConfigurationParams

type FetchConfigurationParams struct {
	// The Pinned UI version of the Configuration resource to fetch.
	UiVersion *string `json:"UiVersion,omitempty"`
}

Optional parameters for the method 'FetchConfiguration'

func (*FetchConfigurationParams) SetUiVersion

func (params *FetchConfigurationParams) SetUiVersion(UiVersion string) *FetchConfigurationParams

type FlexV1Channel

type FlexV1Channel struct {
	// The SID of the Account that created the resource and owns this Workflow
	AccountSid *string `json:"account_sid,omitempty"`
	// The ISO 8601 date and time in GMT when the Flex chat channel was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the Flex chat channel was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The SID of the Flex Flow
	FlexFlowSid *string `json:"flex_flow_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The SID of the TaskRouter Task
	TaskSid *string `json:"task_sid,omitempty"`
	// The absolute URL of the Flex chat channel resource
	Url *string `json:"url,omitempty"`
	// The SID of the chat user
	UserSid *string `json:"user_sid,omitempty"`
}

FlexV1Channel struct for FlexV1Channel

type FlexV1Configuration

type FlexV1Configuration struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// An object that contains application-specific data
	Attributes *map[string]interface{} `json:"attributes,omitempty"`
	// Whether call recording is enabled
	CallRecordingEnabled *bool `json:"call_recording_enabled,omitempty"`
	// The call recording webhook URL
	CallRecordingWebhookUrl *string `json:"call_recording_webhook_url,omitempty"`
	// The SID of the chat service this user belongs to
	ChatServiceInstanceSid *string `json:"chat_service_instance_sid,omitempty"`
	// An object that contains the CRM attributes
	CrmAttributes *map[string]interface{} `json:"crm_attributes,omitempty"`
	// The CRM Callback URL
	CrmCallbackUrl *string `json:"crm_callback_url,omitempty"`
	// Whether CRM is present for Flex
	CrmEnabled *bool `json:"crm_enabled,omitempty"`
	// The CRM Fallback URL
	CrmFallbackUrl *string `json:"crm_fallback_url,omitempty"`
	// The CRM Type
	CrmType *string `json:"crm_type,omitempty"`
	// The ISO 8601 date and time in GMT when the Configuration resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the Configuration resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// Setting to enable Flex UI redirection
	FlexInsightsDrilldown *bool `json:"flex_insights_drilldown,omitempty"`
	// Object that controls workspace reporting
	FlexInsightsHr *map[string]interface{} `json:"flex_insights_hr,omitempty"`
	// The SID of the Flex service instance
	FlexServiceInstanceSid *string `json:"flex_service_instance_sid,omitempty"`
	// URL to redirect to in case drilldown is enabled.
	FlexUrl *string `json:"flex_url,omitempty"`
	// A list of objects that contain the configurations for the Integrations supported in this configuration
	Integrations *[]map[string]interface{} `json:"integrations,omitempty"`
	// Configurable parameters for Markdown
	Markdown *map[string]interface{} `json:"markdown,omitempty"`
	// The SID of the Messaging service instance
	MessagingServiceInstanceSid *string `json:"messaging_service_instance_sid,omitempty"`
	// Configurable parameters for Notifications
	Notifications *map[string]interface{} `json:"notifications,omitempty"`
	// The list of outbound call flows
	OutboundCallFlows *map[string]interface{} `json:"outbound_call_flows,omitempty"`
	// The plugin service attributes
	PluginServiceAttributes *map[string]interface{} `json:"plugin_service_attributes,omitempty"`
	// Whether the plugin service enabled
	PluginServiceEnabled *bool `json:"plugin_service_enabled,omitempty"`
	// The list of public attributes
	PublicAttributes *map[string]interface{} `json:"public_attributes,omitempty"`
	// Configurable parameters for Queues Statistics
	QueueStatsConfiguration *map[string]interface{} `json:"queue_stats_configuration,omitempty"`
	// The URL where the Flex instance is hosted
	RuntimeDomain *string `json:"runtime_domain,omitempty"`
	// The list of serverless service SIDs
	ServerlessServiceSids *[]string `json:"serverless_service_sids,omitempty"`
	// The Flex Service version
	ServiceVersion *string `json:"service_version,omitempty"`
	// The status of the Flex onboarding
	Status *string `json:"status,omitempty"`
	// The TaskRouter SID of the offline activity
	TaskrouterOfflineActivitySid *string `json:"taskrouter_offline_activity_sid,omitempty"`
	// The Skill description for TaskRouter workers
	TaskrouterSkills *[]map[string]interface{} `json:"taskrouter_skills,omitempty"`
	// The SID of the TaskRouter Target TaskQueue
	TaskrouterTargetTaskqueueSid *string `json:"taskrouter_target_taskqueue_sid,omitempty"`
	// The SID of the TaskRouter target Workflow
	TaskrouterTargetWorkflowSid *string `json:"taskrouter_target_workflow_sid,omitempty"`
	// The list of TaskRouter TaskQueues
	TaskrouterTaskqueues *[]map[string]interface{} `json:"taskrouter_taskqueues,omitempty"`
	// The TaskRouter Worker attributes
	TaskrouterWorkerAttributes *map[string]interface{} `json:"taskrouter_worker_attributes,omitempty"`
	// The TaskRouter default channel capacities and availability for workers
	TaskrouterWorkerChannels *map[string]interface{} `json:"taskrouter_worker_channels,omitempty"`
	// The SID of the TaskRouter Workspace
	TaskrouterWorkspaceSid *string `json:"taskrouter_workspace_sid,omitempty"`
	// The object that describes Flex UI characteristics and settings
	UiAttributes *map[string]interface{} `json:"ui_attributes,omitempty"`
	// The object that defines the NPM packages and versions to be used in Hosted Flex
	UiDependencies *map[string]interface{} `json:"ui_dependencies,omitempty"`
	// The primary language of the Flex UI
	UiLanguage *string `json:"ui_language,omitempty"`
	// The Pinned UI version
	UiVersion *string `json:"ui_version,omitempty"`
	// The absolute URL of the Configuration resource
	Url *string `json:"url,omitempty"`
}

FlexV1Configuration struct for FlexV1Configuration

type FlexV1FlexFlow

type FlexV1FlexFlow struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The channel type
	ChannelType *string `json:"channel_type,omitempty"`
	// The SID of the chat service
	ChatServiceSid *string `json:"chat_service_sid,omitempty"`
	// The channel contact's Identity
	ContactIdentity *string `json:"contact_identity,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// Whether the Flex Flow is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// An object that contains specific parameters for the integration
	Integration *map[string]interface{} `json:"integration,omitempty"`
	// The software that will handle inbound messages.
	IntegrationType *string `json:"integration_type,omitempty"`
	// Remove active Proxy sessions if the corresponding Task is deleted.
	JanitorEnabled *bool `json:"janitor_enabled,omitempty"`
	// Re-use this chat channel for future interactions with a contact
	LongLived *bool `json:"long_lived,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the Flex Flow resource
	Url *string `json:"url,omitempty"`
}

FlexV1FlexFlow struct for FlexV1FlexFlow

type FlexV1WebChannel

type FlexV1WebChannel struct {
	// The SID of the Account that created the resource and owns this Workflow
	AccountSid *string `json:"account_sid,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The SID of the Flex Flow
	FlexFlowSid *string `json:"flex_flow_sid,omitempty"`
	// The unique string that identifies the WebChannel resource
	Sid *string `json:"sid,omitempty"`
	// The absolute URL of the WebChannel resource
	Url *string `json:"url,omitempty"`
}

FlexV1WebChannel struct for FlexV1WebChannel

type ListChannelParams

type ListChannelParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListChannel'

func (*ListChannelParams) SetLimit added in v0.13.0

func (params *ListChannelParams) SetLimit(Limit int) *ListChannelParams

func (*ListChannelParams) SetPageSize

func (params *ListChannelParams) SetPageSize(PageSize int) *ListChannelParams

type ListChannelResponse

type ListChannelResponse struct {
	FlexChatChannels []FlexV1Channel         `json:"flex_chat_channels,omitempty"`
	Meta             ListChannelResponseMeta `json:"meta,omitempty"`
}

ListChannelResponse struct for ListChannelResponse

type ListChannelResponseMeta

type ListChannelResponseMeta struct {
	FirstPageUrl    string `json:"first_page_url,omitempty"`
	Key             string `json:"key,omitempty"`
	NextPageUrl     string `json:"next_page_url,omitempty"`
	Page            int    `json:"page,omitempty"`
	PageSize        int    `json:"page_size,omitempty"`
	PreviousPageUrl string `json:"previous_page_url,omitempty"`
	Url             string `json:"url,omitempty"`
}

ListChannelResponseMeta struct for ListChannelResponseMeta

type ListFlexFlowParams

type ListFlexFlowParams struct {
	// The `friendly_name` of the Flex Flow resources to read.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListFlexFlow'

func (*ListFlexFlowParams) SetFriendlyName

func (params *ListFlexFlowParams) SetFriendlyName(FriendlyName string) *ListFlexFlowParams

func (*ListFlexFlowParams) SetLimit added in v0.13.0

func (params *ListFlexFlowParams) SetLimit(Limit int) *ListFlexFlowParams

func (*ListFlexFlowParams) SetPageSize

func (params *ListFlexFlowParams) SetPageSize(PageSize int) *ListFlexFlowParams

type ListFlexFlowResponse

type ListFlexFlowResponse struct {
	FlexFlows []FlexV1FlexFlow        `json:"flex_flows,omitempty"`
	Meta      ListChannelResponseMeta `json:"meta,omitempty"`
}

ListFlexFlowResponse struct for ListFlexFlowResponse

type ListWebChannelParams

type ListWebChannelParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int `json:"PageSize,omitempty"`
	// Max number of records to return.
	Limit *int `json:"limit,omitempty"`
}

Optional parameters for the method 'ListWebChannel'

func (*ListWebChannelParams) SetLimit added in v0.13.0

func (params *ListWebChannelParams) SetLimit(Limit int) *ListWebChannelParams

func (*ListWebChannelParams) SetPageSize

func (params *ListWebChannelParams) SetPageSize(PageSize int) *ListWebChannelParams

type ListWebChannelResponse

type ListWebChannelResponse struct {
	FlexChatChannels []FlexV1WebChannel      `json:"flex_chat_channels,omitempty"`
	Meta             ListChannelResponseMeta `json:"meta,omitempty"`
}

ListWebChannelResponse struct for ListWebChannelResponse

type UpdateFlexFlowParams

type UpdateFlexFlowParams struct {
	// The channel type. One of `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`. By default, Studio’s Send to Flex widget passes it on to the Task attributes for Tasks created based on this Flex Flow. The Task attributes will be used by the Flex UI to render the respective Task as appropriate (applying channel-specific design and length limits). If `channelType` is `facebook`, `whatsapp` or `line`, the Send to Flex widget should set the Task Channel to Programmable Chat.
	ChannelType *string `json:"ChannelType,omitempty"`
	// The SID of the chat service.
	ChatServiceSid *string `json:"ChatServiceSid,omitempty"`
	// The channel contact's Identity.
	ContactIdentity *string `json:"ContactIdentity,omitempty"`
	// Whether the new Flex Flow is enabled.
	Enabled *bool `json:"Enabled,omitempty"`
	// A descriptive string that you create to describe the Flex Flow resource.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
	IntegrationChannel *string `json:"Integration.Channel,omitempty"`
	// In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
	IntegrationCreationOnMessage *bool `json:"Integration.CreationOnMessage,omitempty"`
	// The SID of the Studio Flow. Required when `integrationType` is `studio`.
	IntegrationFlowSid *string `json:"Integration.FlowSid,omitempty"`
	// The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
	IntegrationPriority *int `json:"Integration.Priority,omitempty"`
	// The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
	IntegrationRetryCount *int `json:"Integration.RetryCount,omitempty"`
	// The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
	IntegrationTimeout *int `json:"Integration.Timeout,omitempty"`
	// The URL of the external webhook. Required when `integrationType` is `external`.
	IntegrationUrl *string `json:"Integration.Url,omitempty"`
	// The Workflow SID for a new Task. Required when `integrationType` is `task`.
	IntegrationWorkflowSid *string `json:"Integration.WorkflowSid,omitempty"`
	// The Workspace SID for a new Task. Required when `integrationType` is `task`.
	IntegrationWorkspaceSid *string `json:"Integration.WorkspaceSid,omitempty"`
	// The software that will handle inbound messages. [Integration Type](https://www.twilio.com/docs/flex/developer/messaging/manage-flows#integration-types) can be: `studio`, `external`, or `task`.
	IntegrationType *string `json:"IntegrationType,omitempty"`
	// When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
	JanitorEnabled *bool `json:"JanitorEnabled,omitempty"`
	// When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
	LongLived *bool `json:"LongLived,omitempty"`
}

Optional parameters for the method 'UpdateFlexFlow'

func (*UpdateFlexFlowParams) SetChannelType

func (params *UpdateFlexFlowParams) SetChannelType(ChannelType string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetChatServiceSid

func (params *UpdateFlexFlowParams) SetChatServiceSid(ChatServiceSid string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetContactIdentity

func (params *UpdateFlexFlowParams) SetContactIdentity(ContactIdentity string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetEnabled

func (params *UpdateFlexFlowParams) SetEnabled(Enabled bool) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetFriendlyName

func (params *UpdateFlexFlowParams) SetFriendlyName(FriendlyName string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationChannel

func (params *UpdateFlexFlowParams) SetIntegrationChannel(IntegrationChannel string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationCreationOnMessage

func (params *UpdateFlexFlowParams) SetIntegrationCreationOnMessage(IntegrationCreationOnMessage bool) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationFlowSid

func (params *UpdateFlexFlowParams) SetIntegrationFlowSid(IntegrationFlowSid string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationPriority

func (params *UpdateFlexFlowParams) SetIntegrationPriority(IntegrationPriority int) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationRetryCount

func (params *UpdateFlexFlowParams) SetIntegrationRetryCount(IntegrationRetryCount int) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationTimeout

func (params *UpdateFlexFlowParams) SetIntegrationTimeout(IntegrationTimeout int) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationType

func (params *UpdateFlexFlowParams) SetIntegrationType(IntegrationType string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationUrl

func (params *UpdateFlexFlowParams) SetIntegrationUrl(IntegrationUrl string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationWorkflowSid

func (params *UpdateFlexFlowParams) SetIntegrationWorkflowSid(IntegrationWorkflowSid string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetIntegrationWorkspaceSid

func (params *UpdateFlexFlowParams) SetIntegrationWorkspaceSid(IntegrationWorkspaceSid string) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetJanitorEnabled

func (params *UpdateFlexFlowParams) SetJanitorEnabled(JanitorEnabled bool) *UpdateFlexFlowParams

func (*UpdateFlexFlowParams) SetLongLived

func (params *UpdateFlexFlowParams) SetLongLived(LongLived bool) *UpdateFlexFlowParams

type UpdateWebChannelParams

type UpdateWebChannelParams struct {
	// The chat status. Can only be `inactive`.
	ChatStatus *string `json:"ChatStatus,omitempty"`
	// The post-engagement data.
	PostEngagementData *string `json:"PostEngagementData,omitempty"`
}

Optional parameters for the method 'UpdateWebChannel'

func (*UpdateWebChannelParams) SetChatStatus

func (params *UpdateWebChannelParams) SetChatStatus(ChatStatus string) *UpdateWebChannelParams

func (*UpdateWebChannelParams) SetPostEngagementData

func (params *UpdateWebChannelParams) SetPostEngagementData(PostEngagementData string) *UpdateWebChannelParams

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL