Documentation ¶
Index ¶
- Constants
- func MustParseURL(rawURL string) *url.URL
- type APIClient
- type Base64Payload
- type BlueprintByTemplateIdResponse
- type BlueprintGroupByCategoryResponse
- type BlueprintService
- type BroadcastEventToAll
- type BulkTriggerEvent
- type BulkTriggerOptions
- type CTA
- type ChangesApplyResponse
- type ChangesBulkApplyPayload
- type ChangesCountResponse
- type ChangesGetQuery
- type ChangesGetResponse
- type ChangesGetResponseData
- type ChangesService
- func (c *ChangesService) ApplyBulkChanges(ctx context.Context, payload ChangesBulkApplyPayload) (ChangesApplyResponse, error)
- func (c *ChangesService) ApplyChange(ctx context.Context, changeId string) (ChangesApplyResponse, error)
- func (c *ChangesService) GetChanges(ctx context.Context, q ChangesGetQuery) (ChangesGetResponse, error)
- func (c *ChangesService) GetChangesCount(ctx context.Context) (ChangesCountResponse, error)
- type Channel
- type ChannelType
- type CheckTopicSubscriberResponse
- type Config
- type CreateIntegrationRequest
- type CreateLayoutRequest
- type CreateLayoutResponse
- type CreateTopicRequest
- type Credentials
- type Data
- type EventRequest
- type EventResponse
- type EventService
- func (e *EventService) BroadcastToAll(ctx context.Context, data BroadcastEventToAll) (EventResponse, error)
- func (e *EventService) CancelTrigger(ctx context.Context, transactionId string) (bool, error)
- func (e *EventService) Trigger(ctx context.Context, eventId string, data ITriggerPayloadOptions) (EventResponse, error)
- func (e *EventService) TriggerBulk(ctx context.Context, data []BulkTriggerOptions) ([]EventResponse, error)
- type ExecutionsQueryParams
- type ExecutionsService
- type FeedsService
- type GeneralError
- type GetIntegrationsResponse
- type GetTopicResponse
- type IAttachmentOptions
- type IEvent
- type IInboundParser
- type IIntegration
- type ISubscribers
- type ITopic
- type ITriggerPayload
- type ITriggerPayloadOptions
- type InboundParserResponse
- type InboundParserService
- type Integration
- type IntegrationChannelLimitResponse
- type IntegrationCredentials
- type IntegrationResponse
- type IntegrationService
- func (i IntegrationService) Create(ctx context.Context, request CreateIntegrationRequest) (*IntegrationResponse, error)
- func (i IntegrationService) Delete(ctx context.Context, integrationId string) (*IntegrationResponse, error)
- func (i IntegrationService) GetActive(ctx context.Context) (*GetIntegrationsResponse, error)
- func (i IntegrationService) GetAll(ctx context.Context) (*GetIntegrationsResponse, error)
- func (i IntegrationService) GetChannelLimit(ctx context.Context, channelType string) (*IntegrationChannelLimitResponse, error)
- func (i IntegrationService) GetWebhookSupportStatus(ctx context.Context, providerId string) (bool, error)
- func (i IntegrationService) SetIntegrationAsPrimary(ctx context.Context, integrationId string) (*SetIntegrationAsPrimaryResponse, error)
- func (i IntegrationService) Update(ctx context.Context, integrationId string, request UpdateIntegrationRequest) (*IntegrationResponse, error)
- type JsonResponse
- type LayoutRequestOptions
- type LayoutResponse
- type LayoutService
- func (l *LayoutService) Create(ctx context.Context, request CreateLayoutRequest) (*CreateLayoutResponse, error)
- func (l *LayoutService) Delete(ctx context.Context, key string) error
- func (l *LayoutService) Get(ctx context.Context, key string) (*LayoutResponse, error)
- func (l *LayoutService) List(ctx context.Context, options *LayoutRequestOptions) (*LayoutsResponse, error)
- func (l *LayoutService) SetDefault(ctx context.Context, key string) error
- func (l *LayoutService) Update(ctx context.Context, key string, request CreateLayoutRequest) (*LayoutResponse, error)
- type LayoutsResponse
- type ListTopicsOptions
- type ListTopicsResponse
- type MessagesQueryParams
- type MessagesService
- type MxRecordConfiguredStatus
- type NotificationFeedData
- type Preference
- type ProviderIdType
- type QueryBuilder
- type QueryParam
- type RenameTopicRequest
- type Response
- type RetryConfigType
- type SetIntegrationAsPrimaryResponse
- type SubscriberBulkCreateResponse
- type SubscriberBulkPayload
- type SubscriberCredentialPayload
- type SubscriberMarkMessageSeenOptions
- type SubscriberNotificationFeedOptions
- type SubscriberNotificationFeedResponse
- type SubscriberPayload
- type SubscriberPreferencesResponse
- type SubscriberResponse
- type SubscriberService
- func (s *SubscriberService) BulkCreate(ctx context.Context, subscribers SubscriberBulkPayload) (SubscriberBulkCreateResponse, error)
- func (s *SubscriberService) Delete(ctx context.Context, subscriberID string) (SubscriberResponse, error)
- func (s *SubscriberService) Get(ctx context.Context, subscriberID string) (SubscriberResponse, error)
- func (s *SubscriberService) GetNotificationFeed(ctx context.Context, subscriberID string, ...) (*SubscriberNotificationFeedResponse, error)
- func (s *SubscriberService) GetPreferences(ctx context.Context, subscriberID string) (*SubscriberPreferencesResponse, error)
- func (s *SubscriberService) GetUnseenCount(ctx context.Context, subscriberID string, opts *SubscriberUnseenCountOptions) (*SubscriberUnseenCountResponse, error)
- func (s *SubscriberService) Identify(ctx context.Context, subscriberID string, data interface{}) (SubscriberResponse, error)
- func (s *SubscriberService) MarkMessageSeen(ctx context.Context, subscriberID string, ...) (*SubscriberNotificationFeedResponse, error)
- func (s *SubscriberService) Update(ctx context.Context, subscriberID string, data interface{}) (SubscriberResponse, error)
- func (s *SubscriberService) UpdateCredentials(ctx context.Context, subscriberID string, data SubscriberCredentialPayload) (SubscriberResponse, error)
- func (s *SubscriberService) UpdatePreferences(ctx context.Context, subscriberID string, templateId string, ...) (*SubscriberPreferencesResponse, error)
- type SubscriberUnseenCountOptions
- type SubscriberUnseenCountResponse
- type SubscribersTopicRequest
- type Template
- type TenantService
- func (e *TenantService) CreateTenant(ctx context.Context, name string, identifier string) (JsonResponse, error)
- func (e *TenantService) DeleteTenant(ctx context.Context, identifier string) (JsonResponse, error)
- func (e *TenantService) GetTenant(ctx context.Context, identifier string) (JsonResponse, error)
- func (e *TenantService) GetTenants(ctx context.Context, page string, limit string) (JsonResponse, error)
- func (e *TenantService) UpdateTenant(ctx context.Context, identifier string, ...) (JsonResponse, error)
- type TopicService
- func (t *TopicService) AddSubscribers(ctx context.Context, key string, subscribers []string) error
- func (t *TopicService) CheckTopicSubscriber(ctx context.Context, key string, externalsubscriber string) (*CheckTopicSubscriberResponse, error)
- func (t *TopicService) Create(ctx context.Context, key string, name string) error
- func (t *TopicService) Delete(ctx context.Context, key string) error
- func (t *TopicService) Get(ctx context.Context, key string) (*GetTopicResponse, error)
- func (t *TopicService) List(ctx context.Context, options *ListTopicsOptions) (*ListTopicsResponse, error)
- func (t *TopicService) RemoveSubscribers(ctx context.Context, key string, subscribers []string) error
- func (t *TopicService) Rename(ctx context.Context, key string, name string) (*GetTopicResponse, error)
- type TriggerRecipientsType
- type TriggerRecipientsTypeArray
- type TriggerRecipientsTypeSingle
- type TriggerTopicRecipientsTypeSingle
- type UpdateIntegrationRequest
- type UpdateSubscriberPreferencesChannel
- type UpdateSubscriberPreferencesOptions
- type UpdateTenantRequest
Constants ¶
View Source
const ( HTTPStatusOk = 200 HTTPStatusCreated = 201 HTTPStatusNoChange = 204 HTTPRedirectOk = 300 )
View Source
const ( TeleflowURL = "https://api.teleflow.khulnasoft.com" TeleflowVersion = "v1" )
View Source
const Version = "v1"
Variables ¶
This section is empty.
Functions ¶
func MustParseURL ¶
Types ¶
type APIClient ¶
type APIClient struct { // Api Service BlueprintApi *BlueprintService ChangesApi *ChangesService SubscriberApi *SubscriberService EventApi *EventService ExecutionsApi *ExecutionsService MessagesApi *MessagesService FeedsApi *FeedsService TopicsApi *TopicService IntegrationsApi *IntegrationService InboundParserApi *InboundParserService LayoutApi *LayoutService TenantApi *TenantService // contains filtered or unexported fields }
func NewAPIClient ¶
type Base64Payload ¶
type Base64Payload struct {
Payload string `queryKey:"payload"`
}
type BlueprintByTemplateIdResponse ¶
type BlueprintByTemplateIdResponse struct { Id string `json:"_id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Active bool `json:"active,omitempty"` Draft bool `json:"draft,omitempty"` PreferenceSettings interface{} `json:"preferenceSettings,omitempty"` Critical bool `json:"critical,omitempty"` Tags []string `json:"tags,omitempty"` Steps []interface{} `json:"steps,omitempty"` OrganizationID string `json:"_organizationId,omitempty"` CreatorID string `json:"_creatorId,omitempty"` EnvironmentID string `json:"_environmentId,omitempty"` Triggers []interface{} `json:"triggers,omitempty"` NotificationGroupID string `json:"_notificationGroupId,omitempty"` ParentId string `json:"_parentId,omitempty"` Deleted bool `json:"deleted,omitempty"` DeletedAt string `json:"deletedAt,omitempty"` DeletedBy string `json:"deletedBy,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` NotificationGroup interface{} `json:"notificationGroup,omitempty"` IsBlueprint bool `json:"isBlueprint,omitempty"` BlueprintID string `json:"blueprintId,omitempty"` }
type BlueprintGroupByCategoryResponse ¶
type BlueprintGroupByCategoryResponse struct { General []interface{} `json:"general,omitempty"` Popular interface{} `json:"popular,omitempty"` }
type BlueprintService ¶
type BlueprintService service
func (*BlueprintService) GetByTemplateID ¶
func (b *BlueprintService) GetByTemplateID(ctx context.Context, templateID string) (BlueprintByTemplateIdResponse, error)
func (*BlueprintService) GetGroupByCategory ¶
func (b *BlueprintService) GetGroupByCategory(ctx context.Context) (BlueprintGroupByCategoryResponse, error)
type BroadcastEventToAll ¶
type BroadcastEventToAll struct { Name interface{} `json:"name,omitempty"` Payload interface{} `json:"payload,omitempty"` Overrides interface{} `json:"overrides,omitempty"` TransactionId string `json:"transactionId,omitempty"` Actor interface{} `json:"actor,omitempty"` }
type BulkTriggerEvent ¶
type BulkTriggerEvent struct {
Events []BulkTriggerOptions `json:"events"`
}
type BulkTriggerOptions ¶
type BulkTriggerOptions struct { Name interface{} `json:"name,omitempty"` To interface{} `json:"to,omitempty"` Payload interface{} `json:"payload,omitempty"` Overrides interface{} `json:"overrides,omitempty"` TransactionId string `json:"transactionId,omitempty"` Actor interface{} `json:"actor,omitempty"` }
type CTA ¶
type CTA struct { Type string `json:"type"` Action struct { Status string `json:"status"` Buttons []struct { Type string `json:"type"` Content string `json:"content"` ResultContent string `json:"resultContent"` } `json:"buttons"` Result struct { Payload map[string]interface{} `json:"payload"` Type string `json:"type"` } `json:"result"` } }
type ChangesApplyResponse ¶
type ChangesApplyResponse struct {
Data []ChangesGetResponseData `json:"data,omitempty"`
}
type ChangesBulkApplyPayload ¶
type ChangesBulkApplyPayload struct {
ChangeIds []string `json:"changeIds"`
}
type ChangesCountResponse ¶
type ChangesCountResponse struct {
Data int `json:"data"`
}
type ChangesGetQuery ¶
type ChangesGetQuery struct { Page int `json:"page,omitempty"` Limit int `json:"limit,omitempty"` Promoted string `json:"promoted,omitempty"` }
func (*ChangesGetQuery) BuildQuery ¶
func (c *ChangesGetQuery) BuildQuery() string
type ChangesGetResponse ¶
type ChangesGetResponse struct { TotalCount int `json:"totalCount,omitempty"` Data []ChangesGetResponseData `json:"data"` PageSize int `json:"pageSize,omitempty"` Page int `json:"page,omitempty"` }
type ChangesGetResponseData ¶
type ChangesGetResponseData struct { Id string `json:"_id,omitempty"` CreatorId string `json:"_creatorId,omitempty"` EnvironmentId string `json:"_environmentId,omitempty"` OrganizationId string `json:"_organizationId,omitempty"` EntityId string `json:"_entityId,omitempty"` Enabled bool `json:"enabled,omitempty"` Type string `json:"type,omitempty"` Change interface{} `json:"change,omitempty"` CreatedAt string `json:"createdAt,omitempty"` ParentId string `json:"_parentId,omitempty"` }
type ChangesService ¶
type ChangesService service
func (*ChangesService) ApplyBulkChanges ¶
func (c *ChangesService) ApplyBulkChanges(ctx context.Context, payload ChangesBulkApplyPayload) (ChangesApplyResponse, error)
func (*ChangesService) ApplyChange ¶
func (c *ChangesService) ApplyChange(ctx context.Context, changeId string) (ChangesApplyResponse, error)
func (*ChangesService) GetChanges ¶
func (c *ChangesService) GetChanges(ctx context.Context, q ChangesGetQuery) (ChangesGetResponse, error)
func (*ChangesService) GetChangesCount ¶
func (c *ChangesService) GetChangesCount(ctx context.Context) (ChangesCountResponse, error)
type ChannelType ¶
type ChannelType string
const ( EMAIL ChannelType = "EMAIL" SMS ChannelType = "SMS" DIRECT ChannelType = "DIRECT" )
type Config ¶
type Config struct { BackendURL *url.URL HttpClient *http.Client RetryConfig *RetryConfigType }
type CreateIntegrationRequest ¶
type CreateIntegrationRequest struct { ProviderID string `json:"providerId"` Channel ChannelType `json:"channel"` Credentials IntegrationCredentials `json:"credentials,omitempty"` Active bool `json:"active"` Check bool `json:"check"` }
type CreateLayoutRequest ¶
type CreateLayoutResponse ¶
type CreateLayoutResponse struct { Data struct { Id string `json:"_id"` } `json:"data"` }
type CreateTopicRequest ¶
type Credentials ¶
type EventRequest ¶
type EventResponse ¶
type EventResponse struct {
JsonResponse
}
type EventService ¶
type EventService service
func (*EventService) BroadcastToAll ¶
func (e *EventService) BroadcastToAll(ctx context.Context, data BroadcastEventToAll) (EventResponse, error)
func (*EventService) CancelTrigger ¶
func (*EventService) Trigger ¶
func (e *EventService) Trigger(ctx context.Context, eventId string, data ITriggerPayloadOptions) (EventResponse, error)
func (*EventService) TriggerBulk ¶
func (e *EventService) TriggerBulk(ctx context.Context, data []BulkTriggerOptions) ([]EventResponse, error)
type ExecutionsQueryParams ¶
func (ExecutionsQueryParams) BuildQuery ¶
func (q ExecutionsQueryParams) BuildQuery() string
type ExecutionsService ¶
type ExecutionsService service
func (*ExecutionsService) GetExecutions ¶
func (e *ExecutionsService) GetExecutions(ctx context.Context, q QueryBuilder) (JsonResponse, error)
type FeedsService ¶
type FeedsService service
func (*FeedsService) CreateFeed ¶
func (e *FeedsService) CreateFeed(ctx context.Context, name string) (JsonResponse, error)
func (*FeedsService) DeleteFeed ¶
func (e *FeedsService) DeleteFeed(ctx context.Context, feedId string) (JsonResponse, error)
func (*FeedsService) GetFeeds ¶
func (e *FeedsService) GetFeeds(ctx context.Context) (JsonResponse, error)
type GeneralError ¶
type GeneralError error
type GetIntegrationsResponse ¶
type GetIntegrationsResponse struct {
Data []Integration `json:"data"`
}
type GetTopicResponse ¶
type IAttachmentOptions ¶
type IAttachmentOptions struct { Mime string `json:"mime,omitempty"` File io.Reader `json:"file,omitempty"` Name string `json:"name,omitempty"` Channels []ChannelType `json:"channels,omitempty"` }
type IEvent ¶
type IEvent interface { Trigger(ctx context.Context, eventId string, data ITriggerPayloadOptions) (EventResponse, error) TriggerBulk(ctx context.Context, data []BulkTriggerOptions) ([]EventResponse, error) BroadcastToAll(ctx context.Context, data BroadcastEventToAll) (EventResponse, error) CancelTrigger(ctx context.Context, transactionId string) (bool, error) }
type IInboundParser ¶
type IIntegration ¶
type IIntegration interface { Create(ctx context.Context, request CreateIntegrationRequest) (*IntegrationResponse, error) GetAll(ctx context.Context) (*GetIntegrationsResponse, error) GetActive(ctx context.Context) (*GetIntegrationsResponse, error) GetWebhookSupportStatus(ctx context.Context, providerId string) (bool, error) Update(ctx context.Context, integrationId string, request UpdateIntegrationRequest) (*IntegrationResponse, error) Delete(ctx context.Context, integrationId string) (*IntegrationResponse, error) SetIntegrationAsPrimary(ctx context.Context, integrationId string) (*SetIntegrationAsPrimaryResponse, error) GetChannelLimit(ctx context.Context, channelType string) (*IntegrationChannelLimitResponse, error) }
type ISubscribers ¶
type ISubscribers interface { Identify(ctx context.Context, subscriberID string, data interface{}) (SubscriberResponse, error) BulkCreate(ctx context.Context, subscribers SubscriberBulkPayload) (SubscriberBulkCreateResponse, error) Get(ctx context.Context, subscriberID string) (SubscriberResponse, error) Update(ctx context.Context, subscriberID string, data interface{}) (SubscriberResponse, error) UpdateCredentials(ctx context.Context, subscriberID string, payload SubscriberCredentialPayload) (SubscriberResponse, error) Delete(ctx context.Context, subscriberID string) (SubscriberResponse, error) GetNotificationFeed(ctx context.Context, subscriberID string, opts *SubscriberNotificationFeedOptions) (*SubscriberNotificationFeedResponse, error) GetUnseenCount(ctx context.Context, subscriberID string, opts *SubscriberUnseenCountOptions) (*SubscriberUnseenCountResponse, error) MarkMessageSeen(ctx context.Context, subscriberID string, opts SubscriberMarkMessageSeenOptions) (*SubscriberNotificationFeedResponse, error) GetPreferences(ctx context.Context, subscriberID string) (*SubscriberPreferencesResponse, error) UpdatePreferences(ctx context.Context, subscriberID string, templateId string, opts *UpdateSubscriberPreferencesOptions) (*SubscriberPreferencesResponse, error) }
type ITopic ¶
type ITopic interface { Create(ctx context.Context, key string, name string) error List(ctx context.Context, options *ListTopicsOptions) (*ListTopicsResponse, error) CheckTopicSubscriber(ctx context.Context, key string, externalsubscriber string) (*CheckTopicSubscriberResponse, error) AddSubscribers(ctx context.Context, key string, subscribers []string) error RemoveSubscribers(ctx context.Context, key string, subscribers []string) error Get(ctx context.Context, key string) (*GetTopicResponse, error) Rename(ctx context.Context, key string, name string) (*GetTopicResponse, error) Delete(ctx context.Context, key string) error }
type ITriggerPayload ¶
type ITriggerPayload interface { string | []string | bool | int64 | IAttachmentOptions | []IAttachmentOptions }
type ITriggerPayloadOptions ¶
type ITriggerPayloadOptions struct { To interface{} `json:"to,omitempty"` Payload interface{} `json:"payload,omitempty"` Overrides interface{} `json:"overrides,omitempty"` TransactionId string `json:"transactionId,omitempty"` Actor interface{} `json:"actor,omitempty"` }
type InboundParserResponse ¶
type InboundParserResponse struct {
Data MxRecordConfiguredStatus `json:"data"`
}
type InboundParserService ¶
type InboundParserService service
func (InboundParserService) Get ¶
func (i InboundParserService) Get(ctx context.Context) (*InboundParserResponse, error)
type Integration ¶
type Integration struct { Id string `json:"_id"` EnvironmentID string `json:"_environmentId"` OrganizationID string `json:"_organizationId"` ProviderID string `json:"providerId"` Channel ChannelType `json:"channel"` Credentials IntegrationCredentials `json:"credentials"` Active bool `json:"active"` Deleted bool `json:"deleted"` UpdatedAt string `json:"updatedAt"` DeletedAt string `json:"deletedAt"` DeletedBy string `json:"deletedBy"` }
type IntegrationCredentials ¶
type IntegrationCredentials struct { ApiKey string `json:"apiKey,omitempty"` User string `json:"user,omitempty"` SecretKey string `json:"secretKey,omitempty"` Domain string `json:"domain,omitempty"` Password string `json:"password,omitempty"` Host string `json:"host,omitempty"` Port string `json:"port,omitempty"` Secure bool `json:"secure,omitempty"` Region string `json:"region,omitempty"` AccountSID string `json:"accountSid,omitempty"` MessageProfileID string `json:"messageProfileId,omitempty"` Token string `json:"token,omitempty"` From string `json:"from,omitempty"` SenderName string `json:"senderName,omitempty"` ProjectName string `json:"projectName,omitempty"` ApplicationID string `json:"applicationId,omitempty"` ClientID string `json:"clientId,omitempty"` RequireTls bool `json:"requireTls,omitempty"` IgnoreTls bool `json:"ignoreTls,omitempty"` TlsOptions map[string]interface{} `json:"tlsOptions,omitempty"` }
type IntegrationResponse ¶
type IntegrationResponse struct {
Data Integration `json:"data"`
}
type IntegrationService ¶
type IntegrationService service
func (IntegrationService) Create ¶
func (i IntegrationService) Create(ctx context.Context, request CreateIntegrationRequest) (*IntegrationResponse, error)
func (IntegrationService) Delete ¶
func (i IntegrationService) Delete(ctx context.Context, integrationId string) (*IntegrationResponse, error)
func (IntegrationService) GetActive ¶
func (i IntegrationService) GetActive(ctx context.Context) (*GetIntegrationsResponse, error)
func (IntegrationService) GetAll ¶
func (i IntegrationService) GetAll(ctx context.Context) (*GetIntegrationsResponse, error)
func (IntegrationService) GetChannelLimit ¶
func (i IntegrationService) GetChannelLimit(ctx context.Context, channelType string) (*IntegrationChannelLimitResponse, error)
func (IntegrationService) GetWebhookSupportStatus ¶
func (IntegrationService) SetIntegrationAsPrimary ¶
func (i IntegrationService) SetIntegrationAsPrimary(ctx context.Context, integrationId string) (*SetIntegrationAsPrimaryResponse, error)
func (IntegrationService) Update ¶
func (i IntegrationService) Update(ctx context.Context, integrationId string, request UpdateIntegrationRequest) (*IntegrationResponse, error)
type JsonResponse ¶
type JsonResponse struct {
Data interface{} `json:"data"`
}
type LayoutRequestOptions ¶
type LayoutResponse ¶
type LayoutResponse struct { Id string `json:"_id"` OrganizationId string `json:"_organizationId"` EnvironmentId string `json:"_environmentId"` CreatorId string `json:"_creatorId"` Name string `json:"name"` Identifier string `json:"identifier"` Description string `json:"description"` Channel string `json:"channel"` Content string `json:"content"` ContentType string `json:"contentType"` Variables []interface{} `json:"variables"` IsDefault bool `json:"isDefault"` IsDeleted bool `json:"isDeleted"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` ParentId string `json:"_parentId"` }
type LayoutService ¶
type LayoutService service
func (*LayoutService) Create ¶
func (l *LayoutService) Create(ctx context.Context, request CreateLayoutRequest) (*CreateLayoutResponse, error)
func (*LayoutService) Delete ¶
func (l *LayoutService) Delete(ctx context.Context, key string) error
func (*LayoutService) Get ¶
func (l *LayoutService) Get(ctx context.Context, key string) (*LayoutResponse, error)
func (*LayoutService) List ¶
func (l *LayoutService) List(ctx context.Context, options *LayoutRequestOptions) (*LayoutsResponse, error)
func (*LayoutService) SetDefault ¶
func (l *LayoutService) SetDefault(ctx context.Context, key string) error
func (*LayoutService) Update ¶
func (l *LayoutService) Update(ctx context.Context, key string, request CreateLayoutRequest) (*LayoutResponse, error)
type LayoutsResponse ¶
type LayoutsResponse struct { TotalCount int `json:"totalCount"` Data []LayoutResponse `json:"data"` PageSize int `json:"pageSize"` Page int `json:"page"` }
type ListTopicsOptions ¶
type ListTopicsResponse ¶
type ListTopicsResponse struct { Page int `json:"name"` PageSize int `json:"pageSize"` TotalCount int `json:"totalCount"` Data []GetTopicResponse `json:"data"` }
type MessagesQueryParams ¶
type MessagesQueryParams struct { Channel string SubscriberId string TransactionId []string Page int Limit int }
func (MessagesQueryParams) BuildQuery ¶
func (q MessagesQueryParams) BuildQuery() string
type MessagesService ¶
type MessagesService service
func (*MessagesService) DeleteMessage ¶
func (e *MessagesService) DeleteMessage(ctx context.Context, messageId string) (JsonResponse, error)
func (*MessagesService) GetMessages ¶
func (e *MessagesService) GetMessages(ctx context.Context, q QueryBuilder) (JsonResponse, error)
type MxRecordConfiguredStatus ¶
type MxRecordConfiguredStatus struct {
MxRecordConfigured bool `json:"mxRecordConfigured"`
}
type NotificationFeedData ¶
type NotificationFeedData struct { CTA CTA `json:"cta"` Channel string `json:"channel"` Content string `json:"content"` CreatedAt time.Time `json:"createdAt"` Deleted bool `json:"deleted"` DeviceTokens []string `json:"deviceTokens"` DirectWebhookURL string `json:"directWebhookUrl"` EnvironmentID string `json:"_environmentId"` ErrorID string `json:"errorId"` ErrorText string `json:"errorText"` FeedID string `json:"_feedId"` ID string `json:"_id"` JobID string `json:"_jobId"` LastReadDate time.Time `json:"lastReadDate"` LastSeenDate time.Time `json:"lastSeenDate"` MessageTemplate string `json:"_messageTemplateId"` NotificationID string `json:"_notificationId"` OrganizationID string `json:"_organizationId"` Payload struct { UpdateMessage string `json:"updateMessage"` } `json:"payload"` ProviderID string `json:"providerId"` Read bool `json:"read"` ResponseID string `json:"id"` Seen bool `json:"seen"` Status string `json:"status"` Subscriber struct { ID string `json:"_id"` SubscriberID string `json:"subscriberId"` } `json:"subscriber"` SubscriberID string `json:"_subscriberId"` TemplateID string `json:"_templateId"` TemplateIdentifier string `json:"templateIdentifier"` TransactionID string `json:"transactionId"` UpdatedAt time.Time `json:"updatedAt"` }
type Preference ¶
type ProviderIdType ¶
type ProviderIdType string
type QueryBuilder ¶
type QueryBuilder interface {
BuildQuery() string
}
QueryBuilder gives us an interface to pass as arg to our API methods. See messages.go for an example of implementing this interface
type QueryParam ¶
func GenerateQueryParamsFromStruct ¶
func GenerateQueryParamsFromStruct[T interface{}](queryParamsStruct T) ([]QueryParam, error)
type RenameTopicRequest ¶
type RenameTopicRequest struct {
Name string `json:"name"`
}
type RetryConfigType ¶
type SetIntegrationAsPrimaryResponse ¶
type SetIntegrationAsPrimaryResponse struct { Data struct { ID string `json:"_id"` EnvironmentID string `json:"_environmentId"` OrganizationID string `json:"_organizationId"` Name string `json:"name"` Identifier string `json:"identifier"` ProviderID string `json:"providerId"` Channel string `json:"channel"` Credentials IntegrationCredentials `json:"credentials"` Active bool `json:"active"` Deleted bool `json:"deleted"` DeletedAt string `json:"deletedAt"` DeletedBy string `json:"deletedBy"` Primary bool `json:"primary"` } `json:"data"` }
type SubscriberBulkPayload ¶
type SubscriberBulkPayload struct {
Subscribers []SubscriberPayload `json:"subscribers"`
}
type SubscriberCredentialPayload ¶
type SubscriberCredentialPayload struct { Credentials Credentials `json:"credentials"` IntegrationIdentifier string `json:"integrationIdentifier,omitempty"` ProviderId ProviderIdType `json:"providerId"` }
type SubscriberNotificationFeedResponse ¶
type SubscriberNotificationFeedResponse struct { TotalCount int `json:"totalCount"` Data []NotificationFeedData `json:"data"` PageSize int `json:"pageSize"` Page int `json:"page"` }
type SubscriberPayload ¶
type SubscriberPayload struct { FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` Avatar string `json:"avatar,omitempty"` Locale string `json:"locale,omitempty"` Data map[string]interface{} `json:"data,omitempty"` SubscriberId string `json:"subscriberId"` }
type SubscriberPreferencesResponse ¶
type SubscriberPreferencesResponse struct { Data []struct { Template Template `json:"template"` Preference Preference `json:"preference"` } `json:"data"` }
type SubscriberResponse ¶
type SubscriberResponse struct {
JsonResponse
}
type SubscriberService ¶
type SubscriberService service
func (*SubscriberService) BulkCreate ¶
func (s *SubscriberService) BulkCreate(ctx context.Context, subscribers SubscriberBulkPayload) (SubscriberBulkCreateResponse, error)
func (*SubscriberService) Delete ¶
func (s *SubscriberService) Delete(ctx context.Context, subscriberID string) (SubscriberResponse, error)
func (*SubscriberService) Get ¶
func (s *SubscriberService) Get(ctx context.Context, subscriberID string) (SubscriberResponse, error)
func (*SubscriberService) GetNotificationFeed ¶
func (s *SubscriberService) GetNotificationFeed(ctx context.Context, subscriberID string, opts *SubscriberNotificationFeedOptions) (*SubscriberNotificationFeedResponse, error)
func (*SubscriberService) GetPreferences ¶
func (s *SubscriberService) GetPreferences(ctx context.Context, subscriberID string) (*SubscriberPreferencesResponse, error)
func (*SubscriberService) GetUnseenCount ¶
func (s *SubscriberService) GetUnseenCount(ctx context.Context, subscriberID string, opts *SubscriberUnseenCountOptions) (*SubscriberUnseenCountResponse, error)
func (*SubscriberService) Identify ¶
func (s *SubscriberService) Identify(ctx context.Context, subscriberID string, data interface{}) (SubscriberResponse, error)
func (*SubscriberService) MarkMessageSeen ¶
func (s *SubscriberService) MarkMessageSeen(ctx context.Context, subscriberID string, opts SubscriberMarkMessageSeenOptions) (*SubscriberNotificationFeedResponse, error)
func (*SubscriberService) Update ¶
func (s *SubscriberService) Update(ctx context.Context, subscriberID string, data interface{}) (SubscriberResponse, error)
func (*SubscriberService) UpdateCredentials ¶
func (s *SubscriberService) UpdateCredentials(ctx context.Context, subscriberID string, data SubscriberCredentialPayload) (SubscriberResponse, error)
func (*SubscriberService) UpdatePreferences ¶
func (s *SubscriberService) UpdatePreferences(ctx context.Context, subscriberID string, templateId string, opts *UpdateSubscriberPreferencesOptions) (*SubscriberPreferencesResponse, error)
type SubscriberUnseenCountOptions ¶
type SubscriberUnseenCountOptions struct {
Seen *bool `json:"seen"`
}
type SubscriberUnseenCountResponse ¶
type SubscriberUnseenCountResponse struct { Data struct { Count int `json:"count"` } `json:"data"` }
type SubscribersTopicRequest ¶
type SubscribersTopicRequest struct {
Subscribers []string `json:"subscribers"`
}
type TenantService ¶
type TenantService service
func (*TenantService) CreateTenant ¶
func (e *TenantService) CreateTenant(ctx context.Context, name string, identifier string) (JsonResponse, error)
func (*TenantService) DeleteTenant ¶
func (e *TenantService) DeleteTenant(ctx context.Context, identifier string) (JsonResponse, error)
func (*TenantService) GetTenant ¶
func (e *TenantService) GetTenant(ctx context.Context, identifier string) (JsonResponse, error)
func (*TenantService) GetTenants ¶
func (e *TenantService) GetTenants(ctx context.Context, page string, limit string) (JsonResponse, error)
func (*TenantService) UpdateTenant ¶
func (e *TenantService) UpdateTenant(ctx context.Context, identifier string, updateTenantObject *UpdateTenantRequest) (JsonResponse, error)
type TopicService ¶
type TopicService service
func (*TopicService) AddSubscribers ¶
func (*TopicService) CheckTopicSubscriber ¶
func (t *TopicService) CheckTopicSubscriber(ctx context.Context, key string, externalsubscriber string) (*CheckTopicSubscriberResponse, error)
func (*TopicService) Get ¶
func (t *TopicService) Get(ctx context.Context, key string) (*GetTopicResponse, error)
func (*TopicService) List ¶
func (t *TopicService) List(ctx context.Context, options *ListTopicsOptions) (*ListTopicsResponse, error)
func (*TopicService) RemoveSubscribers ¶
func (*TopicService) Rename ¶
func (t *TopicService) Rename(ctx context.Context, key string, name string) (*GetTopicResponse, error)
type TriggerRecipientsType ¶
type TriggerRecipientsType interface { TriggerRecipientsTypeSingle | TriggerRecipientsTypeArray | TriggerTopicRecipientsTypeSingle | []TriggerTopicRecipientsTypeSingle }
type TriggerRecipientsTypeArray ¶
type TriggerRecipientsTypeArray interface { []string | []SubscriberPayload }
type TriggerRecipientsTypeSingle ¶
type TriggerRecipientsTypeSingle interface { string | SubscriberPayload }
type UpdateIntegrationRequest ¶
type UpdateIntegrationRequest struct { Credentials IntegrationCredentials `json:"credentials"` Active bool `json:"active"` Check bool `json:"check"` }
type UpdateSubscriberPreferencesChannel ¶
type UpdateSubscriberPreferencesChannel struct { Type ChannelType `json:"type"` Enabled bool `json:"enabled"` }
type UpdateSubscriberPreferencesOptions ¶
type UpdateSubscriberPreferencesOptions struct { Channel []UpdateSubscriberPreferencesChannel `json:"channel,omitempty"` Enabled bool `json:"enabled,omitempty"` }
type UpdateTenantRequest ¶
Click to show internal directories.
Click to hide internal directories.