courier

package module
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfiguration

type APIConfiguration struct {
	AuthToken  string
	BaseURL    string
	SDKVersion string
}

APIConfiguration represents the core data needed to communicate with the Courier API

func (*APIConfiguration) ExecuteRequest

func (api *APIConfiguration) ExecuteRequest(req *http.Request) ([]byte, error)

ExecuteRequest issues an HTTP request and sets headers expected by the Courier API

func (*APIConfiguration) SendRequestWithBytes

func (api *APIConfiguration) SendRequestWithBytes(ctx context.Context, method string, relativePath string, body []byte) ([]byte, error)

SendRequestWithBytes wraps SendRequestWithReader

func (*APIConfiguration) SendRequestWithJSON

func (api *APIConfiguration) SendRequestWithJSON(ctx context.Context, method string, relativePath string, body interface{}, response interface{}) error

SendRequestWithJSON wraps HTTPSendBytes

func (*APIConfiguration) SendRequestWithMaps

func (api *APIConfiguration) SendRequestWithMaps(ctx context.Context, method string, relativePath string, body map[string]interface{}) (map[string]json.RawMessage, error)

SendRequestWithMaps wraps HTTPSendBytes

func (*APIConfiguration) SendRequestWithReader

func (api *APIConfiguration) SendRequestWithReader(ctx context.Context, method string, relativePath string, body io.Reader) ([]byte, error)

SendRequestWithReader wraps HTTPRequest

type Audience added in v2.7.0

type Audience struct {
	Description string      `json:"description,omitempty"`
	Filter      interface{} `json:"filter"`
	Name        string      `json:"name,omitempty"`
}

type AudienceMember added in v2.7.0

type AudienceMember struct {
	AudienceId      string `json:"audience_id"`
	AddedAt         string `json:"added_at"`
	AudienceVersion int    `json:"audience_version"`
	MemberId        string `json:"member_id"`
	Reason          string `json:"reason"`
}

type AudienceResponse added in v2.7.0

type AudienceResponse struct {
	Audience AudienceResponseBody `json:"audience"`
}

type AudienceResponseBody added in v2.7.0

type AudienceResponseBody struct {
	Id          string      `json:"id"`
	Description string      `json:"description"`
	CreatedAt   string      `json:"created_at"`
	Filter      interface{} `json:"filter"`
	Name        string      `json:"name"`
	UpdatedAt   string      `json:"updated_at"`
}

type AuditEvent added in v2.7.0

type AuditEvent struct {
	AuditEventId string `json:"auditEventId"`
	Source       string `json:"source"`
	Timestamp    string `json:"timestamp"`
	Type         string `json:"type"`
	Actor        *AuditEventActor
	Target       *AuditEventTarget
}

AuditEvent is the type for audit event entity

type AuditEventActor added in v2.7.0

type AuditEventActor struct {
	Email string `json:"email"`
	Id    string `json:"id"`
}

AuditEventActor is the type for audit event actor entity

type AuditEventTarget added in v2.7.0

type AuditEventTarget struct {
	Email string `json:"email"`
	Id    string `json:"id"`
}

AuditEventTarget is the type for audit event target entity

type Automation added in v2.1.0

type Automation struct {
	CancelationToken string           `json:"cancelation_token,omitempty"`
	Steps            []AutomationStep `json:"steps"`
}

type AutomationInvokeBody added in v2.1.0

type AutomationInvokeBody struct {
	Automation Automation  `json:"automation"`
	Brand      string      `json:"brand,omitempty"`
	Data       interface{} `json:"data,omitempty"`
	Profile    interface{} `json:"profile,omitempty"`
	Recipient  string      `json:"recipient,omitempty"`
	Template   string      `json:"template,omitempty"`
}

type AutomationStep added in v2.1.0

type AutomationStep struct {
	Action           string      `json:"action"`
	Brand            string      `json:"brand,omitempty"`
	CancelationToken string      `json:"cancelation_token,omitempty"`
	Data             interface{} `json:"data,omitempty"`
	Duration         string      `json:"duration,omitempty"`
	If               string      `json:"if,omitempty"`
	List             string      `json:"list,omitempty"`
	Override         interface{} `json:"override,omitempty"`
	Profile          interface{} `json:"profile,omitempty"`
	Recipient        string      `json:"recipient,omitempty"`
	Ref              string      `json:"ref,omitempty"`
	Template         string      `json:"template,omitempty"`
	Until            string      `json:"until,omitempty"`
}

type AutomationTemplateInvokeBody added in v2.1.0

type AutomationTemplateInvokeBody struct {
	Brand     string      `json:"brand,omitempty"`
	Data      interface{} `json:"data,omitempty"`
	Profile   interface{} `json:"profile,omitempty"`
	Recipient string      `json:"recipient,omitempty"`
	Template  string      `json:"template,omitempty"`
}

type BrandColors added in v2.2.0

type BrandColors struct {
	Primary   string `json:"primary,omitempty"`
	Secondary string `json:"secondary,omitempty"`
	Tertiary  string `json:"tertiary,omitempty"`
}

type BrandEmail added in v2.2.0

type BrandEmail struct {
	Header interface{} `json:"header,omitempty"`
	Footer interface{} `json:"footer,omitempty"`
}

type BrandResponse added in v2.2.0

type BrandResponse struct {
	ID        string
	Name      string
	Created   int64
	Published int64
	Updated   int64
	Settings  BrandSettings
	Snippets  BrandSnippets
	Version   string
}

type BrandSettings added in v2.2.0

type BrandSettings struct {
	Colors BrandColors `json:"colors,omitempty"`
	Email  BrandEmail  `json:"email,omitempty"`
}

type BrandSnippetItem added in v2.2.0

type BrandSnippetItem struct {
	Format string `json:"format,omitempty"`
	Name   string `json:"name,omitempty"`
	Value  string `json:"value,omitempty"`
}

type BrandSnippets added in v2.2.0

type BrandSnippets struct {
	Items []*BrandSnippetItem `json:"items,omitempty"`
}

type BrandsResponse added in v2.2.0

type BrandsResponse struct {
	Paging  *PagingResponse
	Results []*BrandResponse
}

type Client

type Client struct {
	API *APIConfiguration
}

Client lets you communicate with the Courier API

func CreateClient

func CreateClient(authToken string, baseURL *string) *Client

CreateClient creates a new client for communicating with the Courier API

func (*Client) CancelMessage added in v2.12.0

func (c *Client) CancelMessage(ctx context.Context, messageID string) (*MessageResponse, error)

CancelMessage calls the /messages/:id/cancel endpoint of the Courier API

func (*Client) CancelNotificationSubmission added in v2.4.0

func (c *Client) CancelNotificationSubmission(ctx context.Context, notificationID string, submissionID string) error

CancelNotificationSubmission calls the DELETE /notifications/{notification_id}/{submission_id}/checks endpoint of the Courier API

func (*Client) CreateJob added in v2.4.0

func (c *Client) CreateJob(ctx context.Context, body interface{}) (string, error)

CreateJob calls the POST /bulk endpoint of the Courier API

func (*Client) DeleteAudience added in v2.7.0

func (c *Client) DeleteAudience(ctx context.Context, audienceId string) error

func (*Client) DeleteBrand added in v2.2.0

func (c *Client) DeleteBrand(ctx context.Context, brandID string) error

DeleteBrand calls the DELETE /brands/{brand_id} endpoint of the Courier API

func (*Client) DeleteList added in v2.2.0

func (c *Client) DeleteList(ctx context.Context, listID string) error

DeleteList calls the DELETE /lists/{list_id} endpoint of the Courier API

func (*Client) DeleteTenant added in v2.12.0

func (c *Client) DeleteTenant(ctx context.Context, tenantId string) error

DeleteAccount calls the DELETE /accounts/:account_id endpoint of the Courier API

func (*Client) GetAudience added in v2.7.0

func (c *Client) GetAudience(ctx context.Context, audienceId string) (*AudienceResponseBody, error)

func (*Client) GetAudienceMembers added in v2.7.0

func (c *Client) GetAudienceMembers(ctx context.Context, audienceId string, cursor string) (*GetAudienceMembersResponse, error)

func (*Client) GetAudiences added in v2.7.0

func (c *Client) GetAudiences(ctx context.Context, cursor string) (*GetAudiencesResponse, error)

func (*Client) GetAuditEvent added in v2.7.0

func (c *Client) GetAuditEvent(ctx context.Context, auditEventID string) (*AuditEvent, error)

GetAuditEvent calls the GET /audit-events/:auditEventId endpoint of the Courier API

func (*Client) GetBrand added in v2.2.0

func (c *Client) GetBrand(ctx context.Context, brandID string) (*BrandResponse, error)

GetBrand calls the GET /brands/{brand_id} endpoint of the Courier API

func (*Client) GetBrands added in v2.2.0

func (c *Client) GetBrands(ctx context.Context, cursor string) (*BrandsResponse, error)

GetBrands calls the GET /brands endpoint of the Courier API

func (*Client) GetJob added in v2.4.0

func (c *Client) GetJob(ctx context.Context, jobID string) (*GetBulkJobResponse, error)

GetJob calls the GET /bulk/:jobId endpoint of the Courier API

func (*Client) GetJobUsers added in v2.4.0

func (c *Client) GetJobUsers(ctx context.Context, jobID string, cursor string) (*GetBulkJobUsersResponse, error)

GetJobUsers calls the GET /bulk/:jobId/users endpoint of the Courier API

func (*Client) GetList added in v2.2.0

func (c *Client) GetList(ctx context.Context, listID string) (*ListResponse, error)

GetList calls the GET /lists/{list_id} endpoint of the Courier API

func (*Client) GetListSubscriptions added in v2.2.0

func (c *Client) GetListSubscriptions(ctx context.Context, listID string, cursor string) (*ListSubscriptionsResponse, error)

GetListSubscriptions calls the GET /lists/{list_id}/subscriptions endpoint of the Courier API

func (*Client) GetLists added in v2.2.0

func (c *Client) GetLists(ctx context.Context, cursor string, pattern string) (*ListsResponse, error)

GetLists calls the GET /lists endpoint of the Courier API

func (*Client) GetMessage

func (c *Client) GetMessage(ctx context.Context, messageID string) (*MessageResponse, error)

GetMessage calls the /messages/:id endpoint of the Courier API

func (*Client) GetNotificationContent added in v2.4.0

func (c *Client) GetNotificationContent(ctx context.Context, notificationID string) (*NotificationContentResponse, error)

GetNotificationContent calls the GET /notifications/{notification_id}/content endpoint of the Courier API

func (*Client) GetNotificationDraftContent added in v2.4.0

func (c *Client) GetNotificationDraftContent(ctx context.Context, notificationID string) (*NotificationContentResponse, error)

GetNotificationDraftContent calls the GET /notifications/{notification_id}/draft/content endpoint of the Courier API

func (*Client) GetNotificationSubmissionChecks added in v2.4.0

func (c *Client) GetNotificationSubmissionChecks(ctx context.Context, notificationID string, submissionID string) (*NotificationSubmissionChecksResponse, error)

GetNotificationSubmissionChecks calls the GET /notifications/{notification_id}/{submission_id}/checks endpoint of the Courier API

func (*Client) GetNotifications added in v2.4.0

func (c *Client) GetNotifications(ctx context.Context, cursor string) (*NotificationsResponse, error)

GetNotifications calls the GET /notifications endpoint of the Courier API

func (*Client) GetProfile

func (c *Client) GetProfile(ctx context.Context, id string) (map[string]json.RawMessage, error)

GetProfile calls the GET /profiles/:id endpoint of the Courier API

func (*Client) GetTenant added in v2.12.0

func (c *Client) GetTenant(ctx context.Context, tenantId string) (*Tenant, error)

GetTenant calls the GET /tenants/:tenantId endpoint of the Courier API

func (*Client) GetTenants added in v2.12.0

func (c *Client) GetTenants(ctx context.Context, limit string, cursor string) (*ListTenantsResponse, error)

GetAccounts calls the GET /tenants endpoint of the Courier API

func (*Client) IngestJob added in v2.4.0

func (c *Client) IngestJob(ctx context.Context, jobID string, body interface{}) (*IngestBulkJobResponse, error)

IngestJob calls the POST /bulk/:jobId endpoint of the Courier API

func (*Client) InvokeAutomation added in v2.1.0

func (c *Client) InvokeAutomation(ctx context.Context, body interface{}) (string, error)

Calls the POST /automations/invoke endpoint of the Courier API

func (*Client) InvokeAutomationTemplate added in v2.1.0

func (c *Client) InvokeAutomationTemplate(ctx context.Context, templateId string, body interface{}) (string, error)

Calls the POST /automations/:templateId/invoke endpoint of the Courier API

func (*Client) ListAuditEvents added in v2.7.0

func (c *Client) ListAuditEvents(ctx context.Context, cursor string) (*ListAuditEventsResponse, error)

ListAuditEvents calls the GET /audit-events endpoint of the Courier API

func (*Client) ListSubscribe added in v2.2.0

func (c *Client) ListSubscribe(ctx context.Context, listID string, recipientID string, body interface{}) error

ListSubscribe calls the PUT /lists/{list_id}/subscriptions/{recipient_id} endpoint of the Courier API

func (*Client) ListUnsubscribe added in v2.2.0

func (c *Client) ListUnsubscribe(ctx context.Context, listID string, recipientID string) error

ListUnsubscribe calls the PUT /lists/{list_id}/subscriptions/{recipient_id} endpoint of the Courier API

func (*Client) MergeProfileBytes

func (c *Client) MergeProfileBytes(ctx context.Context, id string, profile []byte) error

MergeProfileBytes calls the POST /profiles/:id endpoint of the Courier API

func (*Client) PostBrand added in v2.2.0

func (c *Client) PostBrand(ctx context.Context, body PostBrandBody) (*BrandResponse, error)

PostBrand calls the POST /brands endpoint of the Courier API

func (*Client) PostListSubscriptions added in v2.2.0

func (c *Client) PostListSubscriptions(ctx context.Context, listID string, body interface{}) error

PostListSubscriptions calls the POST /lists/{list_id}/subscriptions endpoint of the Courier API

func (*Client) PostNotificationDraftVariations added in v2.4.0

func (c *Client) PostNotificationDraftVariations(ctx context.Context, notificationID string, body interface{}) error

PostNotificationDraftVariations calls the POST /notifications/{notification_id}/draft/variations endpoint of the Courier API

func (*Client) PostNotificationVariations added in v2.4.0

func (c *Client) PostNotificationVariations(ctx context.Context, notificationID string, body interface{}) error

PostNotificationVariations calls the POST /notifications/{notification_id}/variations endpoint of the Courier API

func (*Client) PutAudience added in v2.7.0

func (c *Client) PutAudience(ctx context.Context, audienceId string, audience Audience) (*AudienceResponse, error)

func (*Client) PutBrand added in v2.2.0

func (c *Client) PutBrand(ctx context.Context, brandID string, body PutBrandBody) (*BrandResponse, error)

PutBrand calls the PUT /brands/{brand_id} endpoint of the Courier API

func (*Client) PutList added in v2.2.0

func (c *Client) PutList(ctx context.Context, listID string, body interface{}) error

PutList calls the PUT /lists/{list_id} endpoint of the Courier API

func (*Client) PutListSubscriptions added in v2.2.0

func (c *Client) PutListSubscriptions(ctx context.Context, listID string, body interface{}) error

PutListSubscriptions calls the PUT /lists/{list_id}/subscriptions endpoint of the Courier API

func (*Client) PutNotificationSubmissionChecks added in v2.4.0

func (c *Client) PutNotificationSubmissionChecks(ctx context.Context, notificationID string, submissionID string, body interface{}) error

PutNotificationSubmissionChecks calls the PUT /notifications/{notification_id}/{submission_id}/checks endpoint of the Courier API

func (*Client) PutTenant added in v2.12.0

func (c *Client) PutTenant(ctx context.Context, tenantId string, body interface{}) (*Tenant, error)

Calls the PUT /tenants/:tenantId endpoint of the Courier API

func (*Client) RestoreList added in v2.2.0

func (c *Client) RestoreList(ctx context.Context, listID string) error

RestoreList calls the PUT /lists/{list_id}/restore endpoint of the Courier API

func (*Client) RunJob added in v2.4.0

func (c *Client) RunJob(ctx context.Context, jobID string) error

RunJob calls the POST /bulk/:jobId/run endpoint of the Courier API

func (*Client) Send

func (c *Client) Send(ctx context.Context, eventID, recipientID string, body interface{}) (string, error)

Send calls the /send endpoint of the Courier API (passing a struct)

func (*Client) SendMap

func (c *Client) SendMap(ctx context.Context, eventID, recipientID string, body map[string]interface{}) (string, error)

SendMap calls the /send endpoint of the Courier API (passing maps)

func (*Client) SendMessage added in v2.5.0

func (c *Client) SendMessage(ctx context.Context, body SendMessageRequestBody) (string, error)

SendMessage calls the enhanced /send endpoint of the Courier API with a message struct

func (*Client) SendMessageMap added in v2.5.0

func (c *Client) SendMessageMap(ctx context.Context, body map[string]interface{}) (string, error)

SendMessageMap calls the enhanced /send endpoint of the Courier API with maps

func (*Client) SendMessageWithOptions added in v2.7.0

func (c *Client) SendMessageWithOptions(ctx context.Context, body map[string]interface{}, method string, opts ...Option) (string, error)

func (*Client) UpdateProfileBytes

func (c *Client) UpdateProfileBytes(ctx context.Context, id string, profile []byte) error

UpdateProfileBytes calls the PUT /profiles/:id endpoint of the Courier API

type CreateJobBody added in v2.4.0

type CreateJobBody struct {
	Message interface{} `json:"message"`
}

CreateJobBody can be used as request body to POST /bulk

type GetAudienceMembersResponse added in v2.7.0

type GetAudienceMembersResponse struct {
	Items  []*AudienceMember `json:"items"`
	Paging *PagingResponse   `json:"paging"`
}

type GetAudiencesResponse added in v2.7.0

type GetAudiencesResponse struct {
	Items  []*AudienceResponseBody `json:"items"`
	Paging *PagingResponse
}

type GetBulkJobResponse added in v2.4.0

type GetBulkJobResponse struct {
	Job interface{} `json:"job"`
}

GetBulkJobResponse is type for the GET /bulk/:jobId response

type GetBulkJobUsersResponse added in v2.4.0

type GetBulkJobUsersResponse struct {
	Items  []interface{} `json:"items"`
	Paging *PagingResponse
}

GetBulkJobUsersResponse is type for the GET /bulk/:jobId/users response

type HTTPError

type HTTPError struct {
	StatusCode   int
	ErrorMessage *string
}

HTTPError is a customer error returned when the API doesn't respond with a 2XX

func (*HTTPError) Error

func (err *HTTPError) Error() string

type IngestBulkJobResponse added in v2.4.0

type IngestBulkJobResponse struct {
	Errors []interface{} `json:"errors"`
	Total  int           `json:"total"`
}

IngestBulkJobResponse can be used to deserialize POST /bulk/:jobId response

type IngestJobBody added in v2.4.0

type IngestJobBody struct {
	Users []interface{} `json:"users"`
}

IngestJobBody can be used as request body to POST /bulk/:jobId

type Job added in v2.4.0

type Job struct {
	Definition interface{} `json:"definition"`
	Enqueued   int         `json:"enqueued"`
	Failures   int         `json:"failures"`
	Received   int         `json:"received"`
	Status     string      `json:"status"`
}

Job can be used to cast GET /bulk/jobId response to

type ListAuditEventsResponse added in v2.7.0

type ListAuditEventsResponse struct {
	Results []AuditEvent `json:"results"`
	Paging  *PagingResponse
}

ListAuditEventsResponse is type for the GET /audit-events response

type ListRecipient added in v2.2.0

type ListRecipient struct {
	RecipientID string      `json:"recipientId,omitempty"`
	Preferences interface{} `json:"preferences,omitempty"`
}

type ListResponse added in v2.2.0

type ListResponse struct {
	ID      string
	Name    string
	Created string
	Updated string
}

type ListSubscriptionBody added in v2.2.0

type ListSubscriptionBody struct {
	Recipients []ListRecipient `json:"recipients"`
}

type ListSubscriptionItem added in v2.2.0

type ListSubscriptionItem struct {
	RecipientID string
	Created     string
	Preferences interface{}
}

type ListSubscriptionRecipientBody added in v2.2.0

type ListSubscriptionRecipientBody struct {
	Preferences interface{} `json:"preferences,omitempty"`
}

type ListSubscriptionsResponse added in v2.2.0

type ListSubscriptionsResponse struct {
	Paging *PagingResponse
	Items  []*ListSubscriptionItem
}

type ListTenantsResponse added in v2.12.0

type ListTenantsResponse struct {
	Items   []Tenant `json:"items"`
	HasMore bool     `json:"has_more"`
	Url     string   `json:"url"`
	NextUrl string   `json:"next_url,omitempty"`
}

ListTenantsResponse is type for the GET /tenants response

type ListsResponse added in v2.2.0

type ListsResponse struct {
	Paging *PagingResponse
	Items  []*ListResponse
}

type MessageResponse

type MessageResponse struct {
	ID            string
	Event         string
	Notification  string
	Status        string
	Error         string
	Reason        string
	Recipient     string
	JobId         string
	ListId        string
	ListMessageId string
	RunId         string
	Enqueued      int64
	Delivered     int64
	Sent          int64
	Clicked       int64
	Opened        int64
	CanceledAt    int64
	Providers     []*ProvidersResponse
}

MessageResponse represents the return of the /messages/* endpoints on the Courier API

type NestedFilter added in v2.7.0

type NestedFilter struct {
	Operator string         `json:"operator"`
	Rules    []SingleFilter `json:"rules"`
}

type NotificationContentResponse added in v2.4.0

type NotificationContentResponse struct {
	Blocks   []interface{} `json:"blocks"`
	Channels []interface{} `json:"channels,omitempty"`
	Checksum string        `json:"checksum"`
}

type NotificationResponse added in v2.4.0

type NotificationResponse struct {
	ID    string
	Title string
}

type NotificationSubmissionChecksRequest added in v2.4.0

type NotificationSubmissionChecksRequest struct {
	Checks []SubmissionCheck `json:"checks"`
}

type NotificationSubmissionChecksResponse added in v2.4.0

type NotificationSubmissionChecksResponse struct {
	Checks []*SubmissionCheck
}

type NotificationVariationsRequestBody added in v2.4.0

type NotificationVariationsRequestBody struct {
	Blocks   []interface{} `json:"blocks,omitempty"`
	Channels []interface{} `json:"channels,omitempty"`
}

type NotificationsResponse added in v2.4.0

type NotificationsResponse struct {
	Paging  *PagingResponse
	Results []*NotificationResponse
}

type Option added in v2.7.0

type Option interface {
	// contains filtered or unexported methods
}

func WithIdempotencyKey added in v2.7.0

func WithIdempotencyKey(value string) Option

func WithIdempotencyKeyExpiration added in v2.7.0

func WithIdempotencyKeyExpiration(expiration time.Time) Option

type PagingResponse added in v2.2.0

type PagingResponse struct {
	Cursor *string
	More   bool
}

type PostBrandBody added in v2.2.0

type PostBrandBody struct {
	ID       string        `json:"id,omitempty"`
	Name     string        `json:"name"`
	Settings BrandSettings `json:"settings"`
	Snippets BrandSnippets `json:"snippets,omitempty"`
}

type ProvidersChannelResponse

type ProvidersChannelResponse struct {
	Key      string
	Name     string
	Template string
}

ProvidersChannelResponse represents the channel section of the ProvidersResponse

type ProvidersResponse

type ProvidersResponse struct {
	Channel          *ProvidersChannelResponse
	Error            string
	Status           string
	Delivered        int64
	Sent             int64
	Clicked          int64
	Provider         string
	ProviderResponse interface{}
	Reference        interface{}
}

ProvidersResponse represents the providers section of the MessageResponse

type PutBrandBody added in v2.2.0

type PutBrandBody struct {
	Name     string        `json:"name"`
	Settings BrandSettings `json:"settings"`
	Snippets BrandSnippets `json:"snippets,omitempty"`
}

type PutListBody added in v2.2.0

type PutListBody struct {
	Name        string      `json:"name"`
	Preferences interface{} `json:"preferences,omitempty"`
}

type SendBody

type SendBody struct {
	Profile  interface{} `json:"profile"`
	Data     interface{} `json:"data"`
	Override interface{} `json:"override,omitempty"`
	Brand    string      `json:"brand,omitempty"`
}

SendBody is the JSON body expected by Courier's /send endpoint

type SendMessageRequestBody added in v2.5.0

type SendMessageRequestBody struct {
	Message interface{} `json:"message"`
}

SendMessageRequestBody is the JSON body expected by Courier's /send endpoint that accepts a message object

type SingleFilter added in v2.7.0

type SingleFilter struct {
	Operator string `json:"operator"`
	Path     string `json:"path"`
	Value    string `json:"value"`
}

type SubmissionCheck added in v2.4.0

type SubmissionCheck struct {
	ID      string `json:"id"`
	Status  string `json:"status"`
	Type    string `json:"type"`
	Updated int    `json:"updated,omitempty"`
}

type Tenant added in v2.12.0

type Tenant struct {
	Id                 string      `json:"id"`
	Name               string      `json:"name"`
	ParentTenantId     string      `json:"parent_tenant_id,omitempty"`
	DefaultPreferences interface{} `json:"default_preferences,omitempty"`
	Properties         interface{} `json:"properties,omitempty"`
	UserProfile        interface{} `json:"user_profile,omitempty"`
	BrandId            string      `json:"brand_id,omitempty"`
}

Account is the type for account entity

type WebhookResponse added in v2.8.0

type WebhookResponse struct {
	Data MessageResponse `json:"data"`
	Type string          `json:"type"`
}

WebhookResponse represents the payload provided by an outbound webhook

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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