shared

package
v4.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment added in v4.8.0

type Alignment string
const (
	AlignmentCenter Alignment = "center"
	AlignmentLeft   Alignment = "left"
	AlignmentRight  Alignment = "right"
	AlignmentFull   Alignment = "full"
)

type AudienceFilterConfig added in v4.4.3

type AudienceFilterConfig struct {
	// Array of filter rules (single conditions or nested groups)
	Filters []FilterConfig `json:"filters" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Filters     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Filter configuration for audience membership containing an array of filter rules

func (AudienceFilterConfig) RawJSON added in v4.4.3

func (r AudienceFilterConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (AudienceFilterConfig) ToParam added in v4.4.3

ToParam converts this AudienceFilterConfig to a AudienceFilterConfigParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AudienceFilterConfigParam.Overrides()

func (*AudienceFilterConfig) UnmarshalJSON added in v4.4.3

func (r *AudienceFilterConfig) UnmarshalJSON(data []byte) error

type AudienceFilterConfigParam added in v4.4.3

type AudienceFilterConfigParam struct {
	// Array of filter rules (single conditions or nested groups)
	Filters []FilterConfigParam `json:"filters,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Filter configuration for audience membership containing an array of filter rules

The property Filters is required.

func (AudienceFilterConfigParam) MarshalJSON added in v4.4.3

func (r AudienceFilterConfigParam) MarshalJSON() (data []byte, err error)

func (*AudienceFilterConfigParam) UnmarshalJSON added in v4.4.3

func (r *AudienceFilterConfigParam) UnmarshalJSON(data []byte) error

type AudienceFilterOperator added in v4.4.0

type AudienceFilterOperator string

Send to users only if they are member of the account

const (
	AudienceFilterOperatorMemberOf AudienceFilterOperator = "MEMBER_OF"
)

type AudienceFilterParam added in v4.4.0

type AudienceFilterParam struct {
	// Send to users only if they are member of the account
	//
	// Any of "MEMBER_OF".
	Operator AudienceFilterOperator `json:"operator,omitzero" api:"required"`
	// Any of "account_id".
	Path  AudienceFilterPath `json:"path,omitzero" api:"required"`
	Value string             `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The properties Operator, Path, Value are required.

func (AudienceFilterParam) MarshalJSON added in v4.4.0

func (r AudienceFilterParam) MarshalJSON() (data []byte, err error)

func (*AudienceFilterParam) UnmarshalJSON added in v4.4.0

func (r *AudienceFilterParam) UnmarshalJSON(data []byte) error

type AudienceFilterPath added in v4.4.0

type AudienceFilterPath string
const (
	AudienceFilterPathAccountID AudienceFilterPath = "account_id"
)

type AudienceRecipientParam added in v4.4.0

type AudienceRecipientParam struct {
	// A unique identifier associated with an Audience. A message will be sent to each
	// user in the audience.
	AudienceID string                `json:"audience_id" api:"required"`
	Data       map[string]any        `json:"data,omitzero"`
	Filters    []AudienceFilterParam `json:"filters,omitzero"`
	// contains filtered or unexported fields
}

Send to all users in an audience

The property AudienceID is required.

func (AudienceRecipientParam) MarshalJSON added in v4.4.0

func (r AudienceRecipientParam) MarshalJSON() (data []byte, err error)

func (*AudienceRecipientParam) UnmarshalJSON added in v4.4.0

func (r *AudienceRecipientParam) UnmarshalJSON(data []byte) error

type Channel added in v4.8.0

type Channel struct {
	// Brand id used for rendering.
	BrandID string `json:"brand_id" api:"nullable"`
	// JS conditional with access to data/profile.
	If       string          `json:"if" api:"nullable"`
	Metadata ChannelMetadata `json:"metadata" api:"nullable"`
	// Channel specific overrides.
	Override map[string]any `json:"override" api:"nullable"`
	// Providers enabled for this channel.
	Providers []string `json:"providers" api:"nullable"`
	// Defaults to `single`.
	//
	// Any of "all", "single".
	RoutingMethod ChannelRoutingMethod `json:"routing_method" api:"nullable"`
	Timeouts      Timeouts             `json:"timeouts" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BrandID       respjson.Field
		If            respjson.Field
		Metadata      respjson.Field
		Override      respjson.Field
		Providers     respjson.Field
		RoutingMethod respjson.Field
		Timeouts      respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Channel) RawJSON added in v4.8.0

func (r Channel) RawJSON() string

Returns the unmodified JSON received from the API

func (Channel) ToParam added in v4.8.0

func (r Channel) ToParam() ChannelParam

ToParam converts this Channel to a ChannelParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ChannelParam.Overrides()

func (*Channel) UnmarshalJSON added in v4.8.0

func (r *Channel) UnmarshalJSON(data []byte) error

type ChannelClassification

type ChannelClassification string
const (
	ChannelClassificationDirectMessage ChannelClassification = "direct_message"
	ChannelClassificationEmail         ChannelClassification = "email"
	ChannelClassificationPush          ChannelClassification = "push"
	ChannelClassificationSMS           ChannelClassification = "sms"
	ChannelClassificationWebhook       ChannelClassification = "webhook"
	ChannelClassificationInbox         ChannelClassification = "inbox"
)

type ChannelMetadata added in v4.8.0

type ChannelMetadata struct {
	Utm Utm `json:"utm" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Utm         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChannelMetadata) RawJSON added in v4.8.0

func (r ChannelMetadata) RawJSON() string

Returns the unmodified JSON received from the API

func (ChannelMetadata) ToParam added in v4.8.0

ToParam converts this ChannelMetadata to a ChannelMetadataParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ChannelMetadataParam.Overrides()

func (*ChannelMetadata) UnmarshalJSON added in v4.8.0

func (r *ChannelMetadata) UnmarshalJSON(data []byte) error

type ChannelMetadataParam added in v4.8.0

type ChannelMetadataParam struct {
	Utm UtmParam `json:"utm,omitzero"`
	// contains filtered or unexported fields
}

func (ChannelMetadataParam) MarshalJSON added in v4.8.0

func (r ChannelMetadataParam) MarshalJSON() (data []byte, err error)

func (*ChannelMetadataParam) UnmarshalJSON added in v4.8.0

func (r *ChannelMetadataParam) UnmarshalJSON(data []byte) error

type ChannelParam added in v4.8.0

type ChannelParam struct {
	// Brand id used for rendering.
	BrandID param.Opt[string] `json:"brand_id,omitzero"`
	// JS conditional with access to data/profile.
	If param.Opt[string] `json:"if,omitzero"`
	// Channel specific overrides.
	Override map[string]any `json:"override,omitzero"`
	// Providers enabled for this channel.
	Providers []string `json:"providers,omitzero"`
	// Defaults to `single`.
	//
	// Any of "all", "single".
	RoutingMethod ChannelRoutingMethod `json:"routing_method,omitzero"`
	Metadata      ChannelMetadataParam `json:"metadata,omitzero"`
	Timeouts      TimeoutsParam        `json:"timeouts,omitzero"`
	// contains filtered or unexported fields
}

func (ChannelParam) MarshalJSON added in v4.8.0

func (r ChannelParam) MarshalJSON() (data []byte, err error)

func (*ChannelParam) UnmarshalJSON added in v4.8.0

func (r *ChannelParam) UnmarshalJSON(data []byte) error

type ChannelPreference

type ChannelPreference struct {
	// Any of "direct_message", "email", "push", "sms", "webhook", "inbox".
	Channel ChannelClassification `json:"channel" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Channel     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChannelPreference) RawJSON

func (r ChannelPreference) RawJSON() string

Returns the unmodified JSON received from the API

func (ChannelPreference) ToParam

ToParam converts this ChannelPreference to a ChannelPreferenceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ChannelPreferenceParam.Overrides()

func (*ChannelPreference) UnmarshalJSON

func (r *ChannelPreference) UnmarshalJSON(data []byte) error

type ChannelPreferenceParam

type ChannelPreferenceParam struct {
	// Any of "direct_message", "email", "push", "sms", "webhook", "inbox".
	Channel ChannelClassification `json:"channel,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The property Channel is required.

func (ChannelPreferenceParam) MarshalJSON

func (r ChannelPreferenceParam) MarshalJSON() (data []byte, err error)

func (*ChannelPreferenceParam) UnmarshalJSON

func (r *ChannelPreferenceParam) UnmarshalJSON(data []byte) error

type ChannelRoutingMethod added in v4.8.0

type ChannelRoutingMethod string

Defaults to `single`.

const (
	ChannelRoutingMethodAll    ChannelRoutingMethod = "all"
	ChannelRoutingMethodSingle ChannelRoutingMethod = "single"
)

type ElementalActionNodeWithType

type ElementalActionNodeWithType struct {
	// Any of "action".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalActionNodeWithType) RawJSON

func (r ElementalActionNodeWithType) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalActionNodeWithType) ToParam

ToParam converts this ElementalActionNodeWithType to a ElementalActionNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalActionNodeWithTypeParam.Overrides()

func (*ElementalActionNodeWithType) UnmarshalJSON

func (r *ElementalActionNodeWithType) UnmarshalJSON(data []byte) error

type ElementalActionNodeWithTypeParam

type ElementalActionNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalActionNodeWithTypeParam) MarshalJSON

func (r ElementalActionNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalBaseNode

type ElementalBaseNode struct {
	Channels []string `json:"channels" api:"nullable"`
	If       string   `json:"if" api:"nullable"`
	Loop     string   `json:"loop" api:"nullable"`
	Ref      string   `json:"ref" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Channels    respjson.Field
		If          respjson.Field
		Loop        respjson.Field
		Ref         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ElementalBaseNode) RawJSON

func (r ElementalBaseNode) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalBaseNode) ToParam

ToParam converts this ElementalBaseNode to a ElementalBaseNodeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalBaseNodeParam.Overrides()

func (*ElementalBaseNode) UnmarshalJSON

func (r *ElementalBaseNode) UnmarshalJSON(data []byte) error

type ElementalBaseNodeParam

type ElementalBaseNodeParam struct {
	If       param.Opt[string] `json:"if,omitzero"`
	Loop     param.Opt[string] `json:"loop,omitzero"`
	Ref      param.Opt[string] `json:"ref,omitzero"`
	Channels []string          `json:"channels,omitzero"`
	// contains filtered or unexported fields
}

func (ElementalBaseNodeParam) MarshalJSON

func (r ElementalBaseNodeParam) MarshalJSON() (data []byte, err error)

func (*ElementalBaseNodeParam) UnmarshalJSON

func (r *ElementalBaseNodeParam) UnmarshalJSON(data []byte) error

type ElementalChannelNode

type ElementalChannelNode struct {
	// The channel the contents of this element should be applied to. Can be `email`,
	// `push`, `direct_message`, `sms` or a provider such as slack
	Channel string `json:"channel"`
	// Raw data to apply to the channel. If `elements` has not been specified, `raw` is
	// required.
	Raw map[string]any `json:"raw" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Channel     respjson.Field
		Raw         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a `channel` property. Which allows you to selectively display an individual element on a per channel basis. See the [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.

func (ElementalChannelNode) RawJSON

func (r ElementalChannelNode) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalChannelNode) ToParam

ToParam converts this ElementalChannelNode to a ElementalChannelNodeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalChannelNodeParam.Overrides()

func (*ElementalChannelNode) UnmarshalJSON

func (r *ElementalChannelNode) UnmarshalJSON(data []byte) error

type ElementalChannelNodeParam

type ElementalChannelNodeParam struct {
	// The channel the contents of this element should be applied to. Can be `email`,
	// `push`, `direct_message`, `sms` or a provider such as slack
	Channel param.Opt[string] `json:"channel,omitzero"`
	// Raw data to apply to the channel. If `elements` has not been specified, `raw` is
	// required.
	Raw map[string]any `json:"raw,omitzero"`
	ElementalBaseNodeParam
}

The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a `channel` property. Which allows you to selectively display an individual element on a per channel basis. See the [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.

func (ElementalChannelNodeParam) MarshalJSON

func (r ElementalChannelNodeParam) MarshalJSON() (data []byte, err error)

type ElementalChannelNodeWithType

type ElementalChannelNodeWithType struct {
	// Any of "channel".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalChannelNode
}

The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a `channel` property. Which allows you to selectively display an individual element on a per channel basis. See the [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.

func (ElementalChannelNodeWithType) RawJSON

Returns the unmodified JSON received from the API

func (ElementalChannelNodeWithType) ToParam

ToParam converts this ElementalChannelNodeWithType to a ElementalChannelNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalChannelNodeWithTypeParam.Overrides()

func (*ElementalChannelNodeWithType) UnmarshalJSON

func (r *ElementalChannelNodeWithType) UnmarshalJSON(data []byte) error

type ElementalChannelNodeWithTypeParam

type ElementalChannelNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalChannelNodeParam
}

The channel element allows a notification to be customized based on which channel it is sent through. For example, you may want to display a detailed message when the notification is sent through email, and a more concise message in a push notification. Channel elements are only valid as top-level elements; you cannot nest channel elements. If there is a channel element specified at the top-level of the document, all sibling elements must be channel elements. Note: As an alternative, most elements support a `channel` property. Which allows you to selectively display an individual element on a per channel basis. See the [control flow docs](https://www.courier.com/docs/platform/content/elemental/control-flow/) for more details.

func (ElementalChannelNodeWithTypeParam) MarshalJSON

func (r ElementalChannelNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalContent

type ElementalContent struct {
	Elements []ElementalNodeUnion `json:"elements" api:"required"`
	// For example, "2022-01-01"
	Version string `json:"version" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Elements    respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ElementalContent) RawJSON

func (r ElementalContent) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalContent) ToParam

ToParam converts this ElementalContent to a ElementalContentParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalContentParam.Overrides()

func (*ElementalContent) UnmarshalJSON

func (r *ElementalContent) UnmarshalJSON(data []byte) error

type ElementalContentParam

type ElementalContentParam struct {
	Elements []ElementalNodeUnionParam `json:"elements,omitzero" api:"required"`
	// For example, "2022-01-01"
	Version string `json:"version" api:"required"`
	// contains filtered or unexported fields
}

The properties Elements, Version are required.

func (ElementalContentParam) MarshalJSON

func (r ElementalContentParam) MarshalJSON() (data []byte, err error)

func (*ElementalContentParam) UnmarshalJSON

func (r *ElementalContentParam) UnmarshalJSON(data []byte) error

type ElementalContentSugar

type ElementalContentSugar struct {
	// The text content displayed in the notification.
	Body string `json:"body" api:"required"`
	// Title/subject displayed by supported channels.
	Title string `json:"title" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Body        respjson.Field
		Title       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.

func (ElementalContentSugar) RawJSON

func (r ElementalContentSugar) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalContentSugar) ToParam

ToParam converts this ElementalContentSugar to a ElementalContentSugarParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalContentSugarParam.Overrides()

func (*ElementalContentSugar) UnmarshalJSON

func (r *ElementalContentSugar) UnmarshalJSON(data []byte) error

type ElementalContentSugarParam

type ElementalContentSugarParam struct {
	// The text content displayed in the notification.
	Body string `json:"body" api:"required"`
	// Title/subject displayed by supported channels.
	Title string `json:"title" api:"required"`
	// contains filtered or unexported fields
}

Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.

The properties Body, Title are required.

func (ElementalContentSugarParam) MarshalJSON

func (r ElementalContentSugarParam) MarshalJSON() (data []byte, err error)

func (*ElementalContentSugarParam) UnmarshalJSON

func (r *ElementalContentSugarParam) UnmarshalJSON(data []byte) error

type ElementalDividerNodeWithType

type ElementalDividerNodeWithType struct {
	// Any of "divider".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalDividerNodeWithType) RawJSON

Returns the unmodified JSON received from the API

func (ElementalDividerNodeWithType) ToParam

ToParam converts this ElementalDividerNodeWithType to a ElementalDividerNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalDividerNodeWithTypeParam.Overrides()

func (*ElementalDividerNodeWithType) UnmarshalJSON

func (r *ElementalDividerNodeWithType) UnmarshalJSON(data []byte) error

type ElementalDividerNodeWithTypeParam

type ElementalDividerNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalDividerNodeWithTypeParam) MarshalJSON

func (r ElementalDividerNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalHTMLNodeWithType added in v4.8.0

type ElementalHTMLNodeWithType struct {
	// Any of "html".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalHTMLNodeWithType) RawJSON added in v4.8.0

func (r ElementalHTMLNodeWithType) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalHTMLNodeWithType) ToParam added in v4.8.0

ToParam converts this ElementalHTMLNodeWithType to a ElementalHTMLNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalHTMLNodeWithTypeParam.Overrides()

func (*ElementalHTMLNodeWithType) UnmarshalJSON added in v4.8.0

func (r *ElementalHTMLNodeWithType) UnmarshalJSON(data []byte) error

type ElementalHTMLNodeWithTypeParam added in v4.8.0

type ElementalHTMLNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalHTMLNodeWithTypeParam) MarshalJSON added in v4.8.0

func (r ElementalHTMLNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalImageNodeWithType

type ElementalImageNodeWithType struct {
	// Any of "image".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalImageNodeWithType) RawJSON

func (r ElementalImageNodeWithType) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalImageNodeWithType) ToParam

ToParam converts this ElementalImageNodeWithType to a ElementalImageNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalImageNodeWithTypeParam.Overrides()

func (*ElementalImageNodeWithType) UnmarshalJSON

func (r *ElementalImageNodeWithType) UnmarshalJSON(data []byte) error

type ElementalImageNodeWithTypeParam

type ElementalImageNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalImageNodeWithTypeParam) MarshalJSON

func (r ElementalImageNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalMetaNodeWithType

type ElementalMetaNodeWithType struct {
	// Any of "meta".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalMetaNodeWithType) RawJSON

func (r ElementalMetaNodeWithType) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalMetaNodeWithType) ToParam

ToParam converts this ElementalMetaNodeWithType to a ElementalMetaNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalMetaNodeWithTypeParam.Overrides()

func (*ElementalMetaNodeWithType) UnmarshalJSON

func (r *ElementalMetaNodeWithType) UnmarshalJSON(data []byte) error

type ElementalMetaNodeWithTypeParam

type ElementalMetaNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalMetaNodeWithTypeParam) MarshalJSON

func (r ElementalMetaNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalNodeUnion

type ElementalNodeUnion struct {
	// This field is from variant [ElementalTextNodeWithType],
	// [ElementalMetaNodeWithType], [ElementalChannelNodeWithType],
	// [ElementalImageNodeWithType], [ElementalActionNodeWithType],
	// [ElementalDividerNodeWithType], [ElementalQuoteNodeWithType],
	// [ElementalHTMLNodeWithType].
	Channels []string `json:"channels"`
	// This field is from variant [ElementalTextNodeWithType],
	// [ElementalMetaNodeWithType], [ElementalChannelNodeWithType],
	// [ElementalImageNodeWithType], [ElementalActionNodeWithType],
	// [ElementalDividerNodeWithType], [ElementalQuoteNodeWithType],
	// [ElementalHTMLNodeWithType].
	If string `json:"if"`
	// This field is from variant [ElementalTextNodeWithType],
	// [ElementalMetaNodeWithType], [ElementalChannelNodeWithType],
	// [ElementalImageNodeWithType], [ElementalActionNodeWithType],
	// [ElementalDividerNodeWithType], [ElementalQuoteNodeWithType],
	// [ElementalHTMLNodeWithType].
	Loop string `json:"loop"`
	// This field is from variant [ElementalTextNodeWithType],
	// [ElementalMetaNodeWithType], [ElementalChannelNodeWithType],
	// [ElementalImageNodeWithType], [ElementalActionNodeWithType],
	// [ElementalDividerNodeWithType], [ElementalQuoteNodeWithType],
	// [ElementalHTMLNodeWithType].
	Ref  string `json:"ref"`
	Type string `json:"type"`
	// This field is from variant [ElementalChannelNodeWithType].
	Channel string `json:"channel"`
	// This field is from variant [ElementalChannelNodeWithType].
	Raw  map[string]any `json:"raw"`
	JSON struct {
		Channels respjson.Field
		If       respjson.Field
		Loop     respjson.Field
		Ref      respjson.Field
		Type     respjson.Field
		Channel  respjson.Field
		Raw      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ElementalNodeUnion contains all possible properties and values from ElementalTextNodeWithType, ElementalMetaNodeWithType, ElementalChannelNodeWithType, ElementalImageNodeWithType, ElementalActionNodeWithType, ElementalDividerNodeWithType, ElementalQuoteNodeWithType, ElementalHTMLNodeWithType.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ElementalNodeUnion) AsElementalActionNodeWithType

func (u ElementalNodeUnion) AsElementalActionNodeWithType() (v ElementalActionNodeWithType)

func (ElementalNodeUnion) AsElementalChannelNodeWithType

func (u ElementalNodeUnion) AsElementalChannelNodeWithType() (v ElementalChannelNodeWithType)

func (ElementalNodeUnion) AsElementalDividerNodeWithType

func (u ElementalNodeUnion) AsElementalDividerNodeWithType() (v ElementalDividerNodeWithType)

func (ElementalNodeUnion) AsElementalHTMLNodeWithType added in v4.8.0

func (u ElementalNodeUnion) AsElementalHTMLNodeWithType() (v ElementalHTMLNodeWithType)

func (ElementalNodeUnion) AsElementalImageNodeWithType

func (u ElementalNodeUnion) AsElementalImageNodeWithType() (v ElementalImageNodeWithType)

func (ElementalNodeUnion) AsElementalMetaNodeWithType

func (u ElementalNodeUnion) AsElementalMetaNodeWithType() (v ElementalMetaNodeWithType)

func (ElementalNodeUnion) AsElementalQuoteNodeWithType

func (u ElementalNodeUnion) AsElementalQuoteNodeWithType() (v ElementalQuoteNodeWithType)

func (ElementalNodeUnion) AsElementalTextNodeWithType

func (u ElementalNodeUnion) AsElementalTextNodeWithType() (v ElementalTextNodeWithType)

func (ElementalNodeUnion) RawJSON

func (u ElementalNodeUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalNodeUnion) ToParam

ToParam converts this ElementalNodeUnion to a ElementalNodeUnionParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalNodeUnionParam.Overrides()

func (*ElementalNodeUnion) UnmarshalJSON

func (r *ElementalNodeUnion) UnmarshalJSON(data []byte) error

type ElementalNodeUnionParam

type ElementalNodeUnionParam struct {
	OfElementalTextNodeWithType    *ElementalTextNodeWithTypeParam    `json:",omitzero,inline"`
	OfElementalMetaNodeWithType    *ElementalMetaNodeWithTypeParam    `json:",omitzero,inline"`
	OfElementalChannelNodeWithType *ElementalChannelNodeWithTypeParam `json:",omitzero,inline"`
	OfElementalImageNodeWithType   *ElementalImageNodeWithTypeParam   `json:",omitzero,inline"`
	OfElementalActionNodeWithType  *ElementalActionNodeWithTypeParam  `json:",omitzero,inline"`
	OfElementalDividerNodeWithType *ElementalDividerNodeWithTypeParam `json:",omitzero,inline"`
	OfElementalQuoteNodeWithType   *ElementalQuoteNodeWithTypeParam   `json:",omitzero,inline"`
	OfElementalHTMLNodeWithType    *ElementalHTMLNodeWithTypeParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (ElementalNodeUnionParam) GetChannel

func (u ElementalNodeUnionParam) GetChannel() *string

Returns a pointer to the underlying variant's property, if present.

func (ElementalNodeUnionParam) GetChannels

func (u ElementalNodeUnionParam) GetChannels() []string

Returns a pointer to the underlying variant's Channels property, if present.

func (ElementalNodeUnionParam) GetIf

func (u ElementalNodeUnionParam) GetIf() *string

Returns a pointer to the underlying variant's property, if present.

func (ElementalNodeUnionParam) GetLoop

func (u ElementalNodeUnionParam) GetLoop() *string

Returns a pointer to the underlying variant's property, if present.

func (ElementalNodeUnionParam) GetRaw

func (u ElementalNodeUnionParam) GetRaw() map[string]any

Returns a pointer to the underlying variant's property, if present.

func (ElementalNodeUnionParam) GetRef

func (u ElementalNodeUnionParam) GetRef() *string

Returns a pointer to the underlying variant's property, if present.

func (ElementalNodeUnionParam) GetType

func (u ElementalNodeUnionParam) GetType() *string

Returns a pointer to the underlying variant's property, if present.

func (ElementalNodeUnionParam) MarshalJSON

func (u ElementalNodeUnionParam) MarshalJSON() ([]byte, error)

func (*ElementalNodeUnionParam) UnmarshalJSON

func (u *ElementalNodeUnionParam) UnmarshalJSON(data []byte) error

type ElementalQuoteNodeWithType

type ElementalQuoteNodeWithType struct {
	// Any of "quote".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalQuoteNodeWithType) RawJSON

func (r ElementalQuoteNodeWithType) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalQuoteNodeWithType) ToParam

ToParam converts this ElementalQuoteNodeWithType to a ElementalQuoteNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalQuoteNodeWithTypeParam.Overrides()

func (*ElementalQuoteNodeWithType) UnmarshalJSON

func (r *ElementalQuoteNodeWithType) UnmarshalJSON(data []byte) error

type ElementalQuoteNodeWithTypeParam

type ElementalQuoteNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalQuoteNodeWithTypeParam) MarshalJSON

func (r ElementalQuoteNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type ElementalTextNodeWithType

type ElementalTextNodeWithType struct {
	// Any of "text".
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	ElementalBaseNode
}

func (ElementalTextNodeWithType) RawJSON

func (r ElementalTextNodeWithType) RawJSON() string

Returns the unmodified JSON received from the API

func (ElementalTextNodeWithType) ToParam

ToParam converts this ElementalTextNodeWithType to a ElementalTextNodeWithTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ElementalTextNodeWithTypeParam.Overrides()

func (*ElementalTextNodeWithType) UnmarshalJSON

func (r *ElementalTextNodeWithType) UnmarshalJSON(data []byte) error

type ElementalTextNodeWithTypeParam

type ElementalTextNodeWithTypeParam struct {
	Type string `json:"type,omitzero"`
	ElementalBaseNodeParam
}

func (ElementalTextNodeWithTypeParam) MarshalJSON

func (r ElementalTextNodeWithTypeParam) MarshalJSON() (data []byte, err error)

type FilterConfig added in v4.4.3

type FilterConfig struct {
	// The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE,
	// NEQ, EXISTS, INCLUDES, STARTS_WITH, ENDS_WITH, IS_BEFORE, IS_AFTER, OMIT) for
	// single conditions, or logical operators (AND, OR) for nested filter groups.
	Operator string `json:"operator" api:"required"`
	// Nested filter rules to combine with AND/OR. Required for nested filter groups,
	// not used for single filter conditions.
	Filters []FilterConfig `json:"filters"`
	// The attribute path from the user profile to filter on. Required for single
	// filter conditions, not used for nested filter groups.
	Path string `json:"path"`
	// The value to compare against. Required for single filter conditions, not used
	// for nested filter groups.
	Value string `json:"value"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Operator    respjson.Field
		Filters     respjson.Field
		Path        respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A filter rule that can be either a single condition (with path/value) or a nested group (with filters array). Use comparison operators (EQ, GT, etc.) for single conditions, and logical operators (AND, OR) for nested groups.

func (FilterConfig) RawJSON added in v4.4.3

func (r FilterConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (FilterConfig) ToParam added in v4.4.3

func (r FilterConfig) ToParam() FilterConfigParam

ToParam converts this FilterConfig to a FilterConfigParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with FilterConfigParam.Overrides()

func (*FilterConfig) UnmarshalJSON added in v4.4.3

func (r *FilterConfig) UnmarshalJSON(data []byte) error

type FilterConfigParam added in v4.4.3

type FilterConfigParam struct {
	// The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE,
	// NEQ, EXISTS, INCLUDES, STARTS_WITH, ENDS_WITH, IS_BEFORE, IS_AFTER, OMIT) for
	// single conditions, or logical operators (AND, OR) for nested filter groups.
	Operator string `json:"operator" api:"required"`
	// The attribute path from the user profile to filter on. Required for single
	// filter conditions, not used for nested filter groups.
	Path param.Opt[string] `json:"path,omitzero"`
	// The value to compare against. Required for single filter conditions, not used
	// for nested filter groups.
	Value param.Opt[string] `json:"value,omitzero"`
	// Nested filter rules to combine with AND/OR. Required for nested filter groups,
	// not used for single filter conditions.
	Filters []FilterConfigParam `json:"filters,omitzero"`
	// contains filtered or unexported fields
}

A filter rule that can be either a single condition (with path/value) or a nested group (with filters array). Use comparison operators (EQ, GT, etc.) for single conditions, and logical operators (AND, OR) for nested groups.

The property Operator is required.

func (FilterConfigParam) MarshalJSON added in v4.4.3

func (r FilterConfigParam) MarshalJSON() (data []byte, err error)

func (*FilterConfigParam) UnmarshalJSON added in v4.4.3

func (r *FilterConfigParam) UnmarshalJSON(data []byte) error

type ListFilterOperator added in v4.4.0

type ListFilterOperator string

Send to users only if they are member of the account

const (
	ListFilterOperatorMemberOf ListFilterOperator = "MEMBER_OF"
)

type ListFilterParam added in v4.4.0

type ListFilterParam struct {
	// Send to users only if they are member of the account
	//
	// Any of "MEMBER_OF".
	Operator ListFilterOperator `json:"operator,omitzero" api:"required"`
	// Any of "account_id".
	Path  ListFilterPath `json:"path,omitzero" api:"required"`
	Value string         `json:"value" api:"required"`
	// contains filtered or unexported fields
}

The properties Operator, Path, Value are required.

func (ListFilterParam) MarshalJSON added in v4.4.0

func (r ListFilterParam) MarshalJSON() (data []byte, err error)

func (*ListFilterParam) UnmarshalJSON added in v4.4.0

func (r *ListFilterParam) UnmarshalJSON(data []byte) error

type ListFilterPath added in v4.4.0

type ListFilterPath string
const (
	ListFilterPathAccountID ListFilterPath = "account_id"
)

type ListPatternRecipientParam added in v4.4.0

type ListPatternRecipientParam struct {
	ListPattern param.Opt[string] `json:"list_pattern,omitzero"`
	Data        map[string]any    `json:"data,omitzero"`
	// contains filtered or unexported fields
}

Send to users in lists matching a pattern

func (ListPatternRecipientParam) MarshalJSON added in v4.4.0

func (r ListPatternRecipientParam) MarshalJSON() (data []byte, err error)

func (*ListPatternRecipientParam) UnmarshalJSON added in v4.4.0

func (r *ListPatternRecipientParam) UnmarshalJSON(data []byte) error

type ListRecipientParam added in v4.4.0

type ListRecipientParam struct {
	ListID  param.Opt[string] `json:"list_id,omitzero"`
	Data    map[string]any    `json:"data,omitzero"`
	Filters []ListFilterParam `json:"filters,omitzero"`
	// contains filtered or unexported fields
}

Send to all users in a specific list

func (ListRecipientParam) MarshalJSON added in v4.4.0

func (r ListRecipientParam) MarshalJSON() (data []byte, err error)

func (*ListRecipientParam) UnmarshalJSON added in v4.4.0

func (r *ListRecipientParam) UnmarshalJSON(data []byte) error

type MessageChannels added in v4.8.0

type MessageChannels map[string]Channel

type MessageChannelsParam added in v4.8.0

type MessageChannelsParam map[string]ChannelParam

type MessageContext

type MessageContext struct {
	// Tenant id used to load brand/default preferences/context.
	TenantID string `json:"tenant_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		TenantID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MessageContext) RawJSON

func (r MessageContext) RawJSON() string

Returns the unmodified JSON received from the API

func (MessageContext) ToParam

func (r MessageContext) ToParam() MessageContextParam

ToParam converts this MessageContext to a MessageContextParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MessageContextParam.Overrides()

func (*MessageContext) UnmarshalJSON

func (r *MessageContext) UnmarshalJSON(data []byte) error

type MessageContextParam

type MessageContextParam struct {
	// Tenant id used to load brand/default preferences/context.
	TenantID param.Opt[string] `json:"tenant_id,omitzero"`
	// contains filtered or unexported fields
}

func (MessageContextParam) MarshalJSON

func (r MessageContextParam) MarshalJSON() (data []byte, err error)

func (*MessageContextParam) UnmarshalJSON

func (r *MessageContextParam) UnmarshalJSON(data []byte) error

type MessageProviders added in v4.8.0

type MessageProviders map[string]MessageProvidersType

type MessageProvidersParam added in v4.8.0

type MessageProvidersParam map[string]MessageProvidersTypeParam

type MessageProvidersType added in v4.8.0

type MessageProvidersType struct {
	// JS conditional with access to data/profile.
	If       string   `json:"if" api:"nullable"`
	Metadata Metadata `json:"metadata" api:"nullable"`
	// Provider-specific overrides.
	Override map[string]any `json:"override" api:"nullable"`
	Timeouts int64          `json:"timeouts" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		If          respjson.Field
		Metadata    respjson.Field
		Override    respjson.Field
		Timeouts    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MessageProvidersType) RawJSON added in v4.8.0

func (r MessageProvidersType) RawJSON() string

Returns the unmodified JSON received from the API

func (MessageProvidersType) ToParam added in v4.8.0

ToParam converts this MessageProvidersType to a MessageProvidersTypeParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MessageProvidersTypeParam.Overrides()

func (*MessageProvidersType) UnmarshalJSON added in v4.8.0

func (r *MessageProvidersType) UnmarshalJSON(data []byte) error

type MessageProvidersTypeParam added in v4.8.0

type MessageProvidersTypeParam struct {
	// JS conditional with access to data/profile.
	If       param.Opt[string] `json:"if,omitzero"`
	Timeouts param.Opt[int64]  `json:"timeouts,omitzero"`
	// Provider-specific overrides.
	Override map[string]any `json:"override,omitzero"`
	Metadata MetadataParam  `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (MessageProvidersTypeParam) MarshalJSON added in v4.8.0

func (r MessageProvidersTypeParam) MarshalJSON() (data []byte, err error)

func (*MessageProvidersTypeParam) UnmarshalJSON added in v4.8.0

func (r *MessageProvidersTypeParam) UnmarshalJSON(data []byte) error

type MessageRouting

type MessageRouting struct {
	Channels []MessageRoutingChannelUnion `json:"channels" api:"required"`
	// Any of "all", "single".
	Method MessageRoutingMethod `json:"method" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Channels    respjson.Field
		Method      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MessageRouting) RawJSON

func (r MessageRouting) RawJSON() string

Returns the unmodified JSON received from the API

func (MessageRouting) ToParam

func (r MessageRouting) ToParam() MessageRoutingParam

ToParam converts this MessageRouting to a MessageRoutingParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MessageRoutingParam.Overrides()

func (*MessageRouting) UnmarshalJSON

func (r *MessageRouting) UnmarshalJSON(data []byte) error

type MessageRoutingChannelUnion

type MessageRoutingChannelUnion struct {
	// This field will be present if the value is a [string] instead of an object.
	OfString string `json:",inline"`
	// This field is from variant [MessageRouting].
	Channels []MessageRoutingChannelUnion `json:"channels"`
	// This field is from variant [MessageRouting].
	Method MessageRoutingMethod `json:"method"`
	JSON   struct {
		OfString respjson.Field
		Channels respjson.Field
		Method   respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MessageRoutingChannelUnion contains all possible properties and values from [string], MessageRouting.

Use the methods beginning with 'As' to cast the union to one of its variants.

If the underlying value is not a json object, one of the following properties will be valid: OfString]

func (MessageRoutingChannelUnion) AsMessageRouting

func (u MessageRoutingChannelUnion) AsMessageRouting() (v MessageRouting)

func (MessageRoutingChannelUnion) AsString

func (u MessageRoutingChannelUnion) AsString() (v string)

func (MessageRoutingChannelUnion) RawJSON

func (u MessageRoutingChannelUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (MessageRoutingChannelUnion) ToParam

ToParam converts this MessageRoutingChannelUnion to a MessageRoutingChannelUnionParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MessageRoutingChannelUnionParam.Overrides()

func (*MessageRoutingChannelUnion) UnmarshalJSON

func (r *MessageRoutingChannelUnion) UnmarshalJSON(data []byte) error

type MessageRoutingChannelUnionParam

type MessageRoutingChannelUnionParam struct {
	OfString         param.Opt[string]    `json:",omitzero,inline"`
	OfMessageRouting *MessageRoutingParam `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (MessageRoutingChannelUnionParam) MarshalJSON

func (u MessageRoutingChannelUnionParam) MarshalJSON() ([]byte, error)

func (*MessageRoutingChannelUnionParam) UnmarshalJSON

func (u *MessageRoutingChannelUnionParam) UnmarshalJSON(data []byte) error

type MessageRoutingMethod

type MessageRoutingMethod string
const (
	MessageRoutingMethodAll    MessageRoutingMethod = "all"
	MessageRoutingMethodSingle MessageRoutingMethod = "single"
)

type MessageRoutingParam

type MessageRoutingParam struct {
	Channels []MessageRoutingChannelUnionParam `json:"channels,omitzero" api:"required"`
	// Any of "all", "single".
	Method MessageRoutingMethod `json:"method,omitzero" api:"required"`
	// contains filtered or unexported fields
}

The properties Channels, Method are required.

func (MessageRoutingParam) MarshalJSON

func (r MessageRoutingParam) MarshalJSON() (data []byte, err error)

func (*MessageRoutingParam) UnmarshalJSON

func (r *MessageRoutingParam) UnmarshalJSON(data []byte) error

type Metadata added in v4.8.0

type Metadata struct {
	Utm Utm `json:"utm" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Utm         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Metadata) RawJSON added in v4.8.0

func (r Metadata) RawJSON() string

Returns the unmodified JSON received from the API

func (Metadata) ToParam added in v4.8.0

func (r Metadata) ToParam() MetadataParam

ToParam converts this Metadata to a MetadataParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with MetadataParam.Overrides()

func (*Metadata) UnmarshalJSON added in v4.8.0

func (r *Metadata) UnmarshalJSON(data []byte) error

type MetadataParam added in v4.8.0

type MetadataParam struct {
	Utm UtmParam `json:"utm,omitzero"`
	// contains filtered or unexported fields
}

func (MetadataParam) MarshalJSON added in v4.8.0

func (r MetadataParam) MarshalJSON() (data []byte, err error)

func (*MetadataParam) UnmarshalJSON added in v4.8.0

func (r *MetadataParam) UnmarshalJSON(data []byte) error

type MsTeamsRecipientParam added in v4.4.0

type MsTeamsRecipientParam struct {
	MsTeams MsTeamsUnionParam `json:"ms_teams,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Send via Microsoft Teams

The property MsTeams is required.

func (MsTeamsRecipientParam) MarshalJSON added in v4.4.0

func (r MsTeamsRecipientParam) MarshalJSON() (data []byte, err error)

func (*MsTeamsRecipientParam) UnmarshalJSON added in v4.4.0

func (r *MsTeamsRecipientParam) UnmarshalJSON(data []byte) error

type MsTeamsUnionParam added in v4.4.0

type MsTeamsUnionParam struct {
	OfSendToMsTeamsUserID         *SendToMsTeamsUserIDParam         `json:",omitzero,inline"`
	OfSendToMsTeamsEmail          *SendToMsTeamsEmailParam          `json:",omitzero,inline"`
	OfSendToMsTeamsChannelID      *SendToMsTeamsChannelIDParam      `json:",omitzero,inline"`
	OfSendToMsTeamsConversationID *SendToMsTeamsConversationIDParam `json:",omitzero,inline"`
	OfSendToMsTeamsChannelName    *SendToMsTeamsChannelNameParam    `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func MsTeamsParamOfSendToMsTeamsChannelID added in v4.4.0

func MsTeamsParamOfSendToMsTeamsChannelID(channelID string, serviceURL string, tenantID string) MsTeamsUnionParam

func MsTeamsParamOfSendToMsTeamsConversationID added in v4.4.0

func MsTeamsParamOfSendToMsTeamsConversationID(conversationID string, serviceURL string, tenantID string) MsTeamsUnionParam

func MsTeamsParamOfSendToMsTeamsEmail added in v4.4.0

func MsTeamsParamOfSendToMsTeamsEmail(email string, serviceURL string, tenantID string) MsTeamsUnionParam

func MsTeamsParamOfSendToMsTeamsUserID added in v4.4.0

func MsTeamsParamOfSendToMsTeamsUserID(serviceURL string, tenantID string, userID string) MsTeamsUnionParam

func (MsTeamsUnionParam) GetChannelID added in v4.4.0

func (u MsTeamsUnionParam) GetChannelID() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetChannelName added in v4.4.0

func (u MsTeamsUnionParam) GetChannelName() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetConversationID added in v4.4.0

func (u MsTeamsUnionParam) GetConversationID() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetEmail added in v4.4.0

func (u MsTeamsUnionParam) GetEmail() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetServiceURL added in v4.4.0

func (u MsTeamsUnionParam) GetServiceURL() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetTeamID added in v4.4.0

func (u MsTeamsUnionParam) GetTeamID() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetTenantID added in v4.4.0

func (u MsTeamsUnionParam) GetTenantID() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) GetUserID added in v4.4.0

func (u MsTeamsUnionParam) GetUserID() *string

Returns a pointer to the underlying variant's property, if present.

func (MsTeamsUnionParam) MarshalJSON added in v4.4.0

func (u MsTeamsUnionParam) MarshalJSON() ([]byte, error)

func (*MsTeamsUnionParam) UnmarshalJSON added in v4.4.0

func (u *MsTeamsUnionParam) UnmarshalJSON(data []byte) error

type NotificationPreferenceDetails

type NotificationPreferenceDetails struct {
	// Any of "OPTED_IN", "OPTED_OUT", "REQUIRED".
	Status             PreferenceStatus    `json:"status" api:"required"`
	ChannelPreferences []ChannelPreference `json:"channel_preferences" api:"nullable"`
	Rules              []Rule              `json:"rules" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Status             respjson.Field
		ChannelPreferences respjson.Field
		Rules              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NotificationPreferenceDetails) RawJSON

Returns the unmodified JSON received from the API

func (NotificationPreferenceDetails) ToParam

ToParam converts this NotificationPreferenceDetails to a NotificationPreferenceDetailsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with NotificationPreferenceDetailsParam.Overrides()

func (*NotificationPreferenceDetails) UnmarshalJSON

func (r *NotificationPreferenceDetails) UnmarshalJSON(data []byte) error

type NotificationPreferenceDetailsParam

type NotificationPreferenceDetailsParam struct {
	// Any of "OPTED_IN", "OPTED_OUT", "REQUIRED".
	Status             PreferenceStatus         `json:"status,omitzero" api:"required"`
	ChannelPreferences []ChannelPreferenceParam `json:"channel_preferences,omitzero"`
	Rules              []RuleParam              `json:"rules,omitzero"`
	// contains filtered or unexported fields
}

The property Status is required.

func (NotificationPreferenceDetailsParam) MarshalJSON

func (r NotificationPreferenceDetailsParam) MarshalJSON() (data []byte, err error)

func (*NotificationPreferenceDetailsParam) UnmarshalJSON

func (r *NotificationPreferenceDetailsParam) UnmarshalJSON(data []byte) error

type PagerdutyParam added in v4.4.0

type PagerdutyParam struct {
	EventAction param.Opt[string] `json:"event_action,omitzero"`
	RoutingKey  param.Opt[string] `json:"routing_key,omitzero"`
	Severity    param.Opt[string] `json:"severity,omitzero"`
	Source      param.Opt[string] `json:"source,omitzero"`
	// contains filtered or unexported fields
}

func (PagerdutyParam) MarshalJSON added in v4.4.0

func (r PagerdutyParam) MarshalJSON() (data []byte, err error)

func (*PagerdutyParam) UnmarshalJSON added in v4.4.0

func (r *PagerdutyParam) UnmarshalJSON(data []byte) error

type PagerdutyRecipientParam added in v4.4.0

type PagerdutyRecipientParam struct {
	Pagerduty PagerdutyParam `json:"pagerduty,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Send via PagerDuty

The property Pagerduty is required.

func (PagerdutyRecipientParam) MarshalJSON added in v4.4.0

func (r PagerdutyRecipientParam) MarshalJSON() (data []byte, err error)

func (*PagerdutyRecipientParam) UnmarshalJSON added in v4.4.0

func (r *PagerdutyRecipientParam) UnmarshalJSON(data []byte) error

type Paging

type Paging struct {
	More   bool   `json:"more" api:"required"`
	Cursor string `json:"cursor" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		More        respjson.Field
		Cursor      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Paging) RawJSON

func (r Paging) RawJSON() string

Returns the unmodified JSON received from the API

func (*Paging) UnmarshalJSON

func (r *Paging) UnmarshalJSON(data []byte) error

type Preference

type Preference struct {
	// Any of "OPTED_IN", "OPTED_OUT", "REQUIRED".
	Status             PreferenceStatus    `json:"status" api:"required"`
	ChannelPreferences []ChannelPreference `json:"channel_preferences" api:"nullable"`
	Rules              []Rule              `json:"rules" api:"nullable"`
	// Any of "subscription", "list", "recipient".
	Source PreferenceSource `json:"source" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Status             respjson.Field
		ChannelPreferences respjson.Field
		Rules              respjson.Field
		Source             respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Preference) RawJSON

func (r Preference) RawJSON() string

Returns the unmodified JSON received from the API

func (Preference) ToParam

func (r Preference) ToParam() PreferenceParam

ToParam converts this Preference to a PreferenceParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with PreferenceParam.Overrides()

func (*Preference) UnmarshalJSON

func (r *Preference) UnmarshalJSON(data []byte) error

type PreferenceParam

type PreferenceParam struct {
	// Any of "OPTED_IN", "OPTED_OUT", "REQUIRED".
	Status             PreferenceStatus         `json:"status,omitzero" api:"required"`
	ChannelPreferences []ChannelPreferenceParam `json:"channel_preferences,omitzero"`
	Rules              []RuleParam              `json:"rules,omitzero"`
	// Any of "subscription", "list", "recipient".
	Source PreferenceSource `json:"source,omitzero"`
	// contains filtered or unexported fields
}

The property Status is required.

func (PreferenceParam) MarshalJSON

func (r PreferenceParam) MarshalJSON() (data []byte, err error)

func (*PreferenceParam) UnmarshalJSON

func (r *PreferenceParam) UnmarshalJSON(data []byte) error

type PreferenceSource

type PreferenceSource string
const (
	PreferenceSourceSubscription PreferenceSource = "subscription"
	PreferenceSourceList         PreferenceSource = "list"
	PreferenceSourceRecipient    PreferenceSource = "recipient"
)

type PreferenceStatus

type PreferenceStatus string
const (
	PreferenceStatusOptedIn  PreferenceStatus = "OPTED_IN"
	PreferenceStatusOptedOut PreferenceStatus = "OPTED_OUT"
	PreferenceStatusRequired PreferenceStatus = "REQUIRED"
)

type RecipientPreferences

type RecipientPreferences struct {
	Categories    map[string]NotificationPreferenceDetails `json:"categories" api:"nullable"`
	Notifications map[string]NotificationPreferenceDetails `json:"notifications" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Categories    respjson.Field
		Notifications respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RecipientPreferences) RawJSON

func (r RecipientPreferences) RawJSON() string

Returns the unmodified JSON received from the API

func (RecipientPreferences) ToParam

ToParam converts this RecipientPreferences to a RecipientPreferencesParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with RecipientPreferencesParam.Overrides()

func (*RecipientPreferences) UnmarshalJSON

func (r *RecipientPreferences) UnmarshalJSON(data []byte) error

type RecipientPreferencesParam

type RecipientPreferencesParam struct {
	Categories    map[string]NotificationPreferenceDetailsParam `json:"categories,omitzero"`
	Notifications map[string]NotificationPreferenceDetailsParam `json:"notifications,omitzero"`
	// contains filtered or unexported fields
}

func (RecipientPreferencesParam) MarshalJSON

func (r RecipientPreferencesParam) MarshalJSON() (data []byte, err error)

func (*RecipientPreferencesParam) UnmarshalJSON

func (r *RecipientPreferencesParam) UnmarshalJSON(data []byte) error

type Rule

type Rule struct {
	Until string `json:"until" api:"required"`
	Start string `json:"start" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Until       respjson.Field
		Start       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Rule) RawJSON

func (r Rule) RawJSON() string

Returns the unmodified JSON received from the API

func (Rule) ToParam

func (r Rule) ToParam() RuleParam

ToParam converts this Rule to a RuleParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with RuleParam.Overrides()

func (*Rule) UnmarshalJSON

func (r *Rule) UnmarshalJSON(data []byte) error

type RuleParam

type RuleParam struct {
	Until string            `json:"until" api:"required"`
	Start param.Opt[string] `json:"start,omitzero"`
	// contains filtered or unexported fields
}

The property Until is required.

func (RuleParam) MarshalJSON

func (r RuleParam) MarshalJSON() (data []byte, err error)

func (*RuleParam) UnmarshalJSON

func (r *RuleParam) UnmarshalJSON(data []byte) error

type SendToMsTeamsChannelIDParam added in v4.4.0

type SendToMsTeamsChannelIDParam struct {
	ChannelID  string `json:"channel_id" api:"required"`
	ServiceURL string `json:"service_url" api:"required"`
	TenantID   string `json:"tenant_id" api:"required"`
	// contains filtered or unexported fields
}

The properties ChannelID, ServiceURL, TenantID are required.

func (SendToMsTeamsChannelIDParam) MarshalJSON added in v4.4.0

func (r SendToMsTeamsChannelIDParam) MarshalJSON() (data []byte, err error)

func (*SendToMsTeamsChannelIDParam) UnmarshalJSON added in v4.4.0

func (r *SendToMsTeamsChannelIDParam) UnmarshalJSON(data []byte) error

type SendToMsTeamsChannelNameParam added in v4.4.0

type SendToMsTeamsChannelNameParam struct {
	ChannelName string `json:"channel_name" api:"required"`
	ServiceURL  string `json:"service_url" api:"required"`
	TeamID      string `json:"team_id" api:"required"`
	TenantID    string `json:"tenant_id" api:"required"`
	// contains filtered or unexported fields
}

The properties ChannelName, ServiceURL, TeamID, TenantID are required.

func (SendToMsTeamsChannelNameParam) MarshalJSON added in v4.4.0

func (r SendToMsTeamsChannelNameParam) MarshalJSON() (data []byte, err error)

func (*SendToMsTeamsChannelNameParam) UnmarshalJSON added in v4.4.0

func (r *SendToMsTeamsChannelNameParam) UnmarshalJSON(data []byte) error

type SendToMsTeamsConversationIDParam added in v4.4.0

type SendToMsTeamsConversationIDParam struct {
	ConversationID string `json:"conversation_id" api:"required"`
	ServiceURL     string `json:"service_url" api:"required"`
	TenantID       string `json:"tenant_id" api:"required"`
	// contains filtered or unexported fields
}

The properties ConversationID, ServiceURL, TenantID are required.

func (SendToMsTeamsConversationIDParam) MarshalJSON added in v4.4.0

func (r SendToMsTeamsConversationIDParam) MarshalJSON() (data []byte, err error)

func (*SendToMsTeamsConversationIDParam) UnmarshalJSON added in v4.4.0

func (r *SendToMsTeamsConversationIDParam) UnmarshalJSON(data []byte) error

type SendToMsTeamsEmailParam added in v4.4.0

type SendToMsTeamsEmailParam struct {
	Email      string `json:"email" api:"required"`
	ServiceURL string `json:"service_url" api:"required"`
	TenantID   string `json:"tenant_id" api:"required"`
	// contains filtered or unexported fields
}

The properties Email, ServiceURL, TenantID are required.

func (SendToMsTeamsEmailParam) MarshalJSON added in v4.4.0

func (r SendToMsTeamsEmailParam) MarshalJSON() (data []byte, err error)

func (*SendToMsTeamsEmailParam) UnmarshalJSON added in v4.4.0

func (r *SendToMsTeamsEmailParam) UnmarshalJSON(data []byte) error

type SendToMsTeamsUserIDParam added in v4.4.0

type SendToMsTeamsUserIDParam struct {
	ServiceURL string `json:"service_url" api:"required"`
	TenantID   string `json:"tenant_id" api:"required"`
	UserID     string `json:"user_id" api:"required"`
	// contains filtered or unexported fields
}

The properties ServiceURL, TenantID, UserID are required.

func (SendToMsTeamsUserIDParam) MarshalJSON added in v4.4.0

func (r SendToMsTeamsUserIDParam) MarshalJSON() (data []byte, err error)

func (*SendToMsTeamsUserIDParam) UnmarshalJSON added in v4.4.0

func (r *SendToMsTeamsUserIDParam) UnmarshalJSON(data []byte) error

type SendToSlackChannelParam added in v4.4.0

type SendToSlackChannelParam struct {
	AccessToken string `json:"access_token" api:"required"`
	Channel     string `json:"channel" api:"required"`
	// contains filtered or unexported fields
}

The properties AccessToken, Channel are required.

func (SendToSlackChannelParam) MarshalJSON added in v4.4.0

func (r SendToSlackChannelParam) MarshalJSON() (data []byte, err error)

func (*SendToSlackChannelParam) UnmarshalJSON added in v4.4.0

func (r *SendToSlackChannelParam) UnmarshalJSON(data []byte) error

type SendToSlackEmailParam added in v4.4.0

type SendToSlackEmailParam struct {
	AccessToken string `json:"access_token" api:"required"`
	Email       string `json:"email" api:"required"`
	// contains filtered or unexported fields
}

The properties AccessToken, Email are required.

func (SendToSlackEmailParam) MarshalJSON added in v4.4.0

func (r SendToSlackEmailParam) MarshalJSON() (data []byte, err error)

func (*SendToSlackEmailParam) UnmarshalJSON added in v4.4.0

func (r *SendToSlackEmailParam) UnmarshalJSON(data []byte) error

type SendToSlackUserIDParam added in v4.4.0

type SendToSlackUserIDParam struct {
	AccessToken string `json:"access_token" api:"required"`
	UserID      string `json:"user_id" api:"required"`
	// contains filtered or unexported fields
}

The properties AccessToken, UserID are required.

func (SendToSlackUserIDParam) MarshalJSON added in v4.4.0

func (r SendToSlackUserIDParam) MarshalJSON() (data []byte, err error)

func (*SendToSlackUserIDParam) UnmarshalJSON added in v4.4.0

func (r *SendToSlackUserIDParam) UnmarshalJSON(data []byte) error

type SlackRecipientParam added in v4.4.0

type SlackRecipientParam struct {
	Slack SlackUnionParam `json:"slack,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Send via Slack (channel, email, or user_id)

The property Slack is required.

func (SlackRecipientParam) MarshalJSON added in v4.4.0

func (r SlackRecipientParam) MarshalJSON() (data []byte, err error)

func (*SlackRecipientParam) UnmarshalJSON added in v4.4.0

func (r *SlackRecipientParam) UnmarshalJSON(data []byte) error

type SlackUnionParam added in v4.4.0

type SlackUnionParam struct {
	OfSendToSlackChannel *SendToSlackChannelParam `json:",omitzero,inline"`
	OfSendToSlackEmail   *SendToSlackEmailParam   `json:",omitzero,inline"`
	OfSendToSlackUserID  *SendToSlackUserIDParam  `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func SlackParamOfSendToSlackChannel added in v4.4.0

func SlackParamOfSendToSlackChannel(accessToken string, channel string) SlackUnionParam

func SlackParamOfSendToSlackEmail added in v4.4.0

func SlackParamOfSendToSlackEmail(accessToken string, email string) SlackUnionParam

func SlackParamOfSendToSlackUserID added in v4.4.0

func SlackParamOfSendToSlackUserID(accessToken string, userID string) SlackUnionParam

func (SlackUnionParam) GetAccessToken added in v4.4.0

func (u SlackUnionParam) GetAccessToken() *string

Returns a pointer to the underlying variant's property, if present.

func (SlackUnionParam) GetChannel added in v4.4.0

func (u SlackUnionParam) GetChannel() *string

Returns a pointer to the underlying variant's property, if present.

func (SlackUnionParam) GetEmail added in v4.4.0

func (u SlackUnionParam) GetEmail() *string

Returns a pointer to the underlying variant's property, if present.

func (SlackUnionParam) GetUserID added in v4.4.0

func (u SlackUnionParam) GetUserID() *string

Returns a pointer to the underlying variant's property, if present.

func (SlackUnionParam) MarshalJSON added in v4.4.0

func (u SlackUnionParam) MarshalJSON() ([]byte, error)

func (*SlackUnionParam) UnmarshalJSON added in v4.4.0

func (u *SlackUnionParam) UnmarshalJSON(data []byte) error

type TextStyle added in v4.8.0

type TextStyle string
const (
	TextStyleText    TextStyle = "text"
	TextStyleH1      TextStyle = "h1"
	TextStyleH2      TextStyle = "h2"
	TextStyleSubtext TextStyle = "subtext"
)

type Timeouts added in v4.8.0

type Timeouts struct {
	Channel  int64 `json:"channel" api:"nullable"`
	Provider int64 `json:"provider" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Channel     respjson.Field
		Provider    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Timeouts) RawJSON added in v4.8.0

func (r Timeouts) RawJSON() string

Returns the unmodified JSON received from the API

func (Timeouts) ToParam added in v4.8.0

func (r Timeouts) ToParam() TimeoutsParam

ToParam converts this Timeouts to a TimeoutsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with TimeoutsParam.Overrides()

func (*Timeouts) UnmarshalJSON added in v4.8.0

func (r *Timeouts) UnmarshalJSON(data []byte) error

type TimeoutsParam added in v4.8.0

type TimeoutsParam struct {
	Channel  param.Opt[int64] `json:"channel,omitzero"`
	Provider param.Opt[int64] `json:"provider,omitzero"`
	// contains filtered or unexported fields
}

func (TimeoutsParam) MarshalJSON added in v4.8.0

func (r TimeoutsParam) MarshalJSON() (data []byte, err error)

func (*TimeoutsParam) UnmarshalJSON added in v4.8.0

func (r *TimeoutsParam) UnmarshalJSON(data []byte) error

type UserRecipient

type UserRecipient struct {
	// Deprecated - Use `tenant_id` instead.
	AccountID string `json:"account_id" api:"nullable"`
	// Context such as tenant_id to send the notification with.
	Context MessageContext `json:"context" api:"nullable"`
	Data    map[string]any `json:"data" api:"nullable"`
	// The user's email address.
	Email string `json:"email" api:"nullable"`
	// The id of the list to send the message to.
	ListID string `json:"list_id" api:"nullable"`
	// The user's preferred ISO 639-1 language code.
	Locale string `json:"locale" api:"nullable"`
	// The user's phone number.
	PhoneNumber string                   `json:"phone_number" api:"nullable"`
	Preferences UserRecipientPreferences `json:"preferences" api:"nullable"`
	// The id of the tenant the user is associated with.
	TenantID string `json:"tenant_id" api:"nullable"`
	// The user's unique identifier. Typically, this will match the user id of a user
	// in your system.
	UserID string `json:"user_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AccountID   respjson.Field
		Context     respjson.Field
		Data        respjson.Field
		Email       respjson.Field
		ListID      respjson.Field
		Locale      respjson.Field
		PhoneNumber respjson.Field
		Preferences respjson.Field
		TenantID    respjson.Field
		UserID      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserRecipient) RawJSON

func (r UserRecipient) RawJSON() string

Returns the unmodified JSON received from the API

func (UserRecipient) ToParam

func (r UserRecipient) ToParam() UserRecipientParam

ToParam converts this UserRecipient to a UserRecipientParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UserRecipientParam.Overrides()

func (*UserRecipient) UnmarshalJSON

func (r *UserRecipient) UnmarshalJSON(data []byte) error

type UserRecipientParam

type UserRecipientParam struct {
	// Deprecated - Use `tenant_id` instead.
	AccountID param.Opt[string] `json:"account_id,omitzero"`
	// The user's email address.
	Email param.Opt[string] `json:"email,omitzero"`
	// The id of the list to send the message to.
	ListID param.Opt[string] `json:"list_id,omitzero"`
	// The user's preferred ISO 639-1 language code.
	Locale param.Opt[string] `json:"locale,omitzero"`
	// The user's phone number.
	PhoneNumber param.Opt[string] `json:"phone_number,omitzero"`
	// The id of the tenant the user is associated with.
	TenantID param.Opt[string] `json:"tenant_id,omitzero"`
	// The user's unique identifier. Typically, this will match the user id of a user
	// in your system.
	UserID      param.Opt[string]             `json:"user_id,omitzero"`
	Data        map[string]any                `json:"data,omitzero"`
	Preferences UserRecipientPreferencesParam `json:"preferences,omitzero"`
	// Context such as tenant_id to send the notification with.
	Context MessageContextParam `json:"context,omitzero"`
	// contains filtered or unexported fields
}

func (UserRecipientParam) MarshalJSON

func (r UserRecipientParam) MarshalJSON() (data []byte, err error)

func (*UserRecipientParam) UnmarshalJSON

func (r *UserRecipientParam) UnmarshalJSON(data []byte) error

type UserRecipientPreferences

type UserRecipientPreferences struct {
	Notifications map[string]Preference `json:"notifications" api:"required"`
	Categories    map[string]Preference `json:"categories" api:"nullable"`
	TemplateID    string                `json:"templateId" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Notifications respjson.Field
		Categories    respjson.Field
		TemplateID    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserRecipientPreferences) RawJSON

func (r UserRecipientPreferences) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserRecipientPreferences) UnmarshalJSON

func (r *UserRecipientPreferences) UnmarshalJSON(data []byte) error

type UserRecipientPreferencesParam

type UserRecipientPreferencesParam struct {
	Notifications map[string]PreferenceParam `json:"notifications,omitzero" api:"required"`
	TemplateID    param.Opt[string]          `json:"templateId,omitzero"`
	Categories    map[string]PreferenceParam `json:"categories,omitzero"`
	// contains filtered or unexported fields
}

The property Notifications is required.

func (UserRecipientPreferencesParam) MarshalJSON

func (r UserRecipientPreferencesParam) MarshalJSON() (data []byte, err error)

func (*UserRecipientPreferencesParam) UnmarshalJSON

func (r *UserRecipientPreferencesParam) UnmarshalJSON(data []byte) error

type Utm added in v4.8.0

type Utm struct {
	Campaign string `json:"campaign" api:"nullable"`
	Content  string `json:"content" api:"nullable"`
	Medium   string `json:"medium" api:"nullable"`
	Source   string `json:"source" api:"nullable"`
	Term     string `json:"term" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Campaign    respjson.Field
		Content     respjson.Field
		Medium      respjson.Field
		Source      respjson.Field
		Term        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Utm) RawJSON added in v4.8.0

func (r Utm) RawJSON() string

Returns the unmodified JSON received from the API

func (Utm) ToParam added in v4.8.0

func (r Utm) ToParam() UtmParam

ToParam converts this Utm to a UtmParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with UtmParam.Overrides()

func (*Utm) UnmarshalJSON added in v4.8.0

func (r *Utm) UnmarshalJSON(data []byte) error

type UtmParam

type UtmParam struct {
	Campaign param.Opt[string] `json:"campaign,omitzero"`
	Content  param.Opt[string] `json:"content,omitzero"`
	Medium   param.Opt[string] `json:"medium,omitzero"`
	Source   param.Opt[string] `json:"source,omitzero"`
	Term     param.Opt[string] `json:"term,omitzero"`
	// contains filtered or unexported fields
}

func (UtmParam) MarshalJSON

func (r UtmParam) MarshalJSON() (data []byte, err error)

func (*UtmParam) UnmarshalJSON

func (r *UtmParam) UnmarshalJSON(data []byte) error

type WebhookAuthMode added in v4.4.0

type WebhookAuthMode string
const (
	WebhookAuthModeNone   WebhookAuthMode = "none"
	WebhookAuthModeBasic  WebhookAuthMode = "basic"
	WebhookAuthModeBearer WebhookAuthMode = "bearer"
)

type WebhookAuthenticationParam added in v4.4.0

type WebhookAuthenticationParam struct {
	// The authentication mode to use. Defaults to 'none' if not specified.
	//
	// Any of "none", "basic", "bearer".
	Mode WebhookAuthMode `json:"mode,omitzero" api:"required"`
	// Token for bearer authentication.
	Token param.Opt[string] `json:"token,omitzero"`
	// Password for basic authentication.
	Password param.Opt[string] `json:"password,omitzero"`
	// Username for basic authentication.
	Username param.Opt[string] `json:"username,omitzero"`
	// contains filtered or unexported fields
}

The property Mode is required.

func (WebhookAuthenticationParam) MarshalJSON added in v4.4.0

func (r WebhookAuthenticationParam) MarshalJSON() (data []byte, err error)

func (*WebhookAuthenticationParam) UnmarshalJSON added in v4.4.0

func (r *WebhookAuthenticationParam) UnmarshalJSON(data []byte) error

type WebhookMethod added in v4.4.0

type WebhookMethod string
const (
	WebhookMethodPost WebhookMethod = "POST"
	WebhookMethodPut  WebhookMethod = "PUT"
)

type WebhookProfileParam added in v4.4.0

type WebhookProfileParam struct {
	// The URL to send the webhook request to.
	URL string `json:"url" api:"required"`
	// Custom headers to include in the webhook request.
	Headers map[string]string `json:"headers,omitzero"`
	// Authentication configuration for the webhook request.
	Authentication WebhookAuthenticationParam `json:"authentication,omitzero"`
	// The HTTP method to use for the webhook request. Defaults to POST if not
	// specified.
	//
	// Any of "POST", "PUT".
	Method WebhookMethod `json:"method,omitzero"`
	// Specifies what profile information is included in the request payload. Defaults
	// to 'limited' if not specified.
	//
	// Any of "limited", "expanded".
	Profile WebhookProfileType `json:"profile,omitzero"`
	// contains filtered or unexported fields
}

The property URL is required.

func (WebhookProfileParam) MarshalJSON added in v4.4.0

func (r WebhookProfileParam) MarshalJSON() (data []byte, err error)

func (*WebhookProfileParam) UnmarshalJSON added in v4.4.0

func (r *WebhookProfileParam) UnmarshalJSON(data []byte) error

type WebhookProfileType added in v4.4.0

type WebhookProfileType string
const (
	WebhookProfileTypeLimited  WebhookProfileType = "limited"
	WebhookProfileTypeExpanded WebhookProfileType = "expanded"
)

type WebhookRecipientParam added in v4.4.0

type WebhookRecipientParam struct {
	Webhook WebhookProfileParam `json:"webhook,omitzero" api:"required"`
	// contains filtered or unexported fields
}

Send via webhook

The property Webhook is required.

func (WebhookRecipientParam) MarshalJSON added in v4.4.0

func (r WebhookRecipientParam) MarshalJSON() (data []byte, err error)

func (*WebhookRecipientParam) UnmarshalJSON added in v4.4.0

func (r *WebhookRecipientParam) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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