types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CampaignSendMode = camSendMode{}

Functions

func CampaignSentAtFormat

func CampaignSentAtFormat(d time.Time) string

Types

type AbortCampaignRequest

type AbortCampaignRequest = campaignId

type ActivateTriggeredCampaignRequest

type ActivateTriggeredCampaignRequest = campaignId

type BulkEventsResponse

type BulkEventsResponse struct {
	SuccessCount         int64              `json:"successCount"`
	FailCount            int64              `json:"failCount"`
	DisallowedEventNames []string           `json:"disallowedEventNames"`
	FilteredOutFields    []string           `json:"filteredOutFields"`
	CreatedFields        []string           `json:"createdFields"`
	FailedUpdates        FailedEventUpdates `json:"failedUpdates"`
}

type BulkUpdateRequest

type BulkUpdateRequest struct {
	Users           []BulkUpdateUser `json:"users"`
	CreateNewFields *bool            `json:"createNewFields,omitempty"`
}

type BulkUpdateResponse

type BulkUpdateResponse struct {
	SuccessCount      int64         `json:"successCount"`
	FailCount         int64         `json:"failCount"`
	FailedUpdates     FailedUpdates `json:"failedUpdates"`
	FilteredOutFields []string      `json:"filteredOutFields"`
	CreatedFields     []string      `json:"createdFields"`
}

type BulkUpdateUser

type BulkUpdateUser struct {
	Email              string                 `json:"email,omitempty"`
	UserId             string                 `json:"userId,omitempty"`
	DataFields         map[string]interface{} `json:"dataFields,omitempty"`
	PreferUserId       bool                   `json:"preferUserId"`
	MergeNestedObjects *bool                  `json:"mergeNestedObjects,omitempty"`
}

type BulkUserUpdateSubscriptionsRequest

type BulkUserUpdateSubscriptionsRequest struct {
	UpdateSubscriptionsRequests []UserUpdateSubscriptionsRequest `json:"updateSubscriptionsRequests"`
}

type BulkUserUpdateSubscriptionsResponse

type BulkUserUpdateSubscriptionsResponse struct {
	SuccessCount        int64    `json:"successCount"`
	FailCount           int64    `json:"failCount"`
	InvalidEmails       []string `json:"invalidEmails"`
	InvalidUserIds      []string `json:"invalidUserIds"`
	ValidEmailFailures  []string `json:"validEmailFailures"`
	ValidUserIdFailures []string `json:"validUserIdFailures"`
}

type Campaign

type Campaign struct {
	Id                  int64    `json:"id"`
	CreatedAt           int64    `json:"createdAt"`
	UpdatedAt           int64    `json:"updatedAt"`
	StartAt             int64    `json:"startAt,omitempty"`
	EndedAt             int64    `json:"endedAt,omitempty"`
	Name                string   `json:"name"`
	TemplateId          int64    `json:"templateId,omitempty"`
	MessageMedium       string   `json:"messageMedium"`
	CreatedByUserId     string   `json:"createdByUserId"`
	UpdatedByUserId     string   `json:"updatedByUserId,omitempty"`
	CampaignState       string   `json:"campaignState"`
	ListIds             []int64  `json:"listIds,omitempty"`
	SuppressionListIds  []int64  `json:"suppressionListIds,omitempty"`
	SendSize            int64    `json:"sendSize,omitempty"`
	RecurringCampaignId int64    `json:"recurringCampaignId,omitempty"`
	WorkflowId          int64    `json:"workflowId,omitempty"`
	Labels              []string `json:"labels,omitempty"`
	Type                string   `json:"type"`
}

type CampaignsResponse

type CampaignsResponse struct {
	Campaigns []Campaign `json:"campaigns"`
}

type CancelCampaignRequest

type CancelCampaignRequest = campaignId

type CatalogFieldMapping

type CatalogFieldMapping struct {
	DefinedMappings map[string]interface{} `json:"definedMappings"`
	UndefinedFields []string               `json:"undefinedFields"`
}

type Catalogs

type Catalogs struct {
	CatalogNames       []string `json:"catalogNames"`
	TotalCatalogsCount int      `json:"totalCatalogsCount"`
	PreviousPageUrl    string   `json:"previousPageUrl,omitempty"`
	NextPageUrl        string   `json:"nextPageUrl,omitempty"`
}

type Channel

type Channel struct {
	Id            int64  `json:"id"`
	Name          string `json:"name"`
	ChannelType   string `json:"channelType"`
	MessageMedium string `json:"messageMedium"`
}

type ChannelsResponse

type ChannelsResponse struct {
	Channels []Channel `json:"channels"`
}

type CreateCampaignRequest

type CreateCampaignRequest struct {
	Name               string         `json:"name"`
	ListIds            []int64        `json:"listIds"`
	TemplateId         int64          `json:"templateId"`
	SuppressionListIds []int64        `json:"suppressionListIds"`
	SendAt             string         `json:"sendAt"`
	SendMode           string         `json:"sendMode"`
	StartTimeZone      string         `json:"startTimeZone"`
	DefaultTimeZone    string         `json:"defaultTimeZone"`
	DataFields         map[string]any `json:"dataFields"`
}

type CreateCampaignResponse

type CreateCampaignResponse = campaignId

type Event

type Event struct {
	EventName      string                 `json:"eventName"`
	Email          string                 `json:"email"`
	CreatedAt      string                 `json:"createdAt"`
	EventUpdatedAt string                 `json:"eventUpdatedAt"`
	ItblInternal   map[string]interface{} `json:"itblInternal"`
	EventType      string                 `json:"eventType"`
	DataFields     map[string]interface{} `json:"dataFields"`
}

type EventTrackBulkRequest

type EventTrackBulkRequest struct {
	Events []EventTrackRequest `json:"events"`
}

type EventTrackRequest

type EventTrackRequest struct {
	Email           string                 `json:"email,omitempty"`
	UserId          string                 `json:"userId,omitempty"`
	EventName       string                 `json:"eventName"`
	Id              string                 `json:"id,omitempty"`
	CreatedAt       int64                  `json:"createdAt"`
	DataFields      map[string]interface{} `json:"dataFields"`
	CampaignId      int64                  `json:"campaignId,omitempty"`
	TemplateId      int64                  `json:"templateId,omitempty"`
	CreateNewFields *bool                  `json:"createNewFields,omitempty"`
}

type EventsResponse

type EventsResponse struct {
	Events []Event `json:"events"`
}

type FailedEventUpdates

type FailedEventUpdates struct {
	InvalidEmails    []string `json:"invalidEmails"`
	InvalidUserIds   []string `json:"invalidUserIds"`
	NotFoundEmails   []string `json:"notFoundEmails"`
	NotFoundUserIds  []string `json:"notFoundUserIds"`
	ForgottenEmails  []string `json:"forgottenEmails"`
	ForgottenUserIds []string `json:"forgottenUserIds"`
}

type FailedUpdates

type FailedUpdates struct {
	ConflictEmails     []string `json:"conflictEmails"`
	ConflictUserIds    []string `json:"conflictUserIds"`
	ForgottenEmails    []string `json:"forgottenEmails"`
	ForgottenUserIds   []string `json:"forgottenUserIds"`
	InvalidDataEmails  []string `json:"invalidDataEmails"`
	InvalidDataUserIds []string `json:"invalidDataUserIds"`
	InvalidEmails      []string `json:"invalidEmails"`
	InvalidUserIds     []string `json:"invalidUserIds"`
	NotFoundEmails     []string `json:"notFoundEmails"`
	NotFoundUserIds    []string `json:"notFoundUserIds"`
}

type FrequencyCap

type FrequencyCap struct {
	Days     int `json:"days"`
	Messages int `json:"messages"`
}

type GdprRequest

type GdprRequest struct {
	Email  string `json:"email,omitempty"`
	UserId string `json:"userId,omitempty"`
}

type List

type List struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	CreatedAt   int64  `json:"createdAt"`
	ListType    string `json:"listType"`
}

type ListCreateRequest

type ListCreateRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type ListCreateResponse

type ListCreateResponse struct {
	ListId int64 `json:"listId"`
}

type ListSubscribeRequest

type ListSubscribeRequest struct {
	ListId      int64            `json:"listId"`
	Subscribers []ListSubscriber `json:"subscribers"`
	// Whether to skip operation when the request includes a userId or email
	// that doesn't yet exist in the Iterable project.
	// When true, Iterable ignores requests with unknown userIds and email addresses.
	// When false, Iterable creates new users.
	// Only respected in API calls for userID-based and hybrid projects.
	// Defaults to false.
	UpdateExistingUsersOnly bool `json:"updateExistingUsersOnly,omitempty"`
}

type ListSubscribeResponse

type ListSubscribeResponse struct {
	SuccessCount      int64         `json:"successCount"`
	FailCount         int64         `json:"failCount"`
	FailedUpdates     FailedUpdates `json:"failedUpdates"`
	FilteredOutFields []string      `json:"filteredOutFields"`
	CreatedFields     []string      `json:"createdFields"`
}

type ListSubscriber

type ListSubscriber struct {
	Email              string                 `json:"email,omitempty"`
	DataFields         map[string]interface{} `json:"dataFields,omitempty"`
	UserId             string                 `json:"userId,omitempty"`
	PreferUserId       bool                   `json:"preferUserId"`
	MergeNestedObjects bool                   `json:"mergeNestedObjects,omitempty"`
}

type ListUnSubscribeRequest

type ListUnSubscribeRequest struct {
	ListId             int64              `json:"listId"`
	Subscribers        []ListUnSubscriber `json:"subscribers"`
	CampaignId         int64              `json:"campaignId"`
	ChannelUnsubscribe bool               `json:"channelUnsubscribe"`
}

type ListUnSubscribeResponse

type ListUnSubscribeResponse struct {
	SuccessCount      int64         `json:"successCount"`
	FailCount         int64         `json:"failCount"`
	FailedUpdates     FailedUpdates `json:"failedUpdates"`
	FilteredOutFields []string      `json:"filteredOutFields"`
	CreatedFields     []string      `json:"createdFields"`
}

type ListUnSubscriber

type ListUnSubscriber struct {
	Email  string `json:"email,omitempty"`
	UserId string `json:"userId,omitempty"`
}

type ListsResponse

type ListsResponse struct {
	Lists []List `json:"lists"`
}

type MessageType

type MessageType struct {
	Id                 int          `json:"id"`
	CreatedAt          int          `json:"createdAt"`
	Name               string       `json:"name"`
	ChannelId          int          `json:"channelId"`
	SubscriptionPolicy string       `json:"subscriptionPolicy"`
	RateLimitPerMinute int          `json:"rateLimitPerMinute"`
	FrequencyCap       FrequencyCap `json:"frequencyCap"`
}

type MessageTypeResponse

type MessageTypeResponse struct {
	MessageTypes []MessageType `json:"messageTypes"`
}

type PostResponse

type PostResponse struct {
	Message string                 `json:"msg"`
	Code    string                 `json:"code"`
	Params  map[string]interface{} `json:"params"`
}

type TriggerCampaignRequest

type TriggerCampaignRequest struct {
	AllowRepeatMarketingSends *bool          `json:"allowRepeatMarketingSends,omitempty"`
	CampaignId                int64          `json:"campaignId"`
	DataFields                map[string]any `json:"dataFields,omitempty"`
	ListIds                   []int64        `json:"listIds,omitempty"`
	SuppressionListIds        []int64        `json:"suppressionListIds,omitempty"`
}

type User

type User struct {
	Email      string                 `json:"email"`
	UserId     string                 `json:"userId"`
	DataFields map[string]interface{} `json:"dataFields"`
}

type UserFieldsResponse

type UserFieldsResponse struct {
	Fields map[string]string `json:"fields"`
}

type UserForgottenEmailsResponse

type UserForgottenEmailsResponse struct {
	HashedEmails []string `json:"hashedEmails"`
}

type UserRequest

type UserRequest struct {
	Email      string                 `json:"email,omitempty"`
	UserId     string                 `json:"userId"`
	DataFields map[string]interface{} `json:"dataFields,omitempty"`

	// Whether a new user should be created if the request includes
	// a userId that doesn't yet exist in the Iterable project.
	// Only respected in API calls for email-based projects.
	// Defaults to false.
	PreferUserId bool `json:"preferUserId"`

	// Merge top-level objects instead of overwriting them.
	// For example, if a user profile has data {"mySettings":{"mobile":true}}
	// and the request has data {"mySettings":{"email":true}},
	// merging results in {"mySettings":{"mobile":true,"email":true}}.
	// Defaults to false.
	MergeNestedObjects *bool `json:"mergeNestedObjects,omitempty"`

	// Whether new fields should be ingested and added to the schema.
	// Defaults to project's setting to allow or drop unrecognized fields.
	CreateNewFields *bool `json:"createNewFields,omitempty"`
}

type UserResponse

type UserResponse struct {
	User User `json:"user"`
}

type UserSentMessage

type UserSentMessage struct {
	MessageId  string `json:"messageId"`
	CampaignId int64  `json:"campaignId"`
	TemplateId int64  `json:"templateId"`
	CreatedAt  string `json:"createdAt"`
}

type UserSentMessagesRequest

type UserSentMessagesRequest struct {
	Email                string
	UserId               string
	Limit                int
	CampaignIds          []int64
	StartDate            string
	EndDate              string
	ExcludeBlastCampaign bool
	MessageMedium        string
}

type UserSentMessagesResponse

type UserSentMessagesResponse struct {
	Messages []UserSentMessage `json:"messages"`
}

type UserUpdateEmailRequest

type UserUpdateEmailRequest struct {
	Email    string `json:"currentEmail"`
	UserId   string `json:"currentUserId"`
	NewEmail string `json:"newEmail"`
}

type UserUpdateSubscriptionsRequest

type UserUpdateSubscriptionsRequest struct {
	Email                      string  `json:"email,omitempty"`
	UserId                     string  `json:"userId,omitempty"`
	EmailListIds               []int64 `json:"emailListIds,omitempty"`
	UnsubscribedChannelIds     []int64 `json:"unsubscribedChannelIds,omitempty"`
	UnsubscribedMessageTypeIds []int64 `json:"unsubscribedMessageTypeIds,omitempty"`
	SubscribedMessageTypeIds   []int64 `json:"subscribedMessageTypeIds,omitempty"`
	CampaignId                 int64   `json:"campaignId,omitempty"`
	TemplateId                 int64   `json:"templateId,omitempty"`
}

Jump to

Keyboard shortcuts

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