contracts

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ChannelEmail Channel = "email"
	ChannelSMS   Channel = "sms"

	PriorityHigh Priority = "high"
	PriorityLow  Priority = "low"

	TemplateModeResolve  TemplateMode = "resolve"
	TemplateModeOverride TemplateMode = "override"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel string

type NotificationMessage

type NotificationMessage struct {
	MessageID      string                 `json:"message_id"`
	IdempotencyKey string                 `json:"idempotency_key"`
	Priority       Priority               `json:"priority"`
	Channel        Channel                `json:"channel"`
	Purpose        string                 `json:"purpose"`
	ProviderHint   string                 `json:"provider_hint,omitempty"`
	Recipient      Recipient              `json:"recipient"`
	Scope          Scope                  `json:"scope"`
	Template       TemplateReference      `json:"template"`
	Variables      map[string]string      `json:"variables"`
	Metadata       map[string]interface{} `json:"metadata,omitempty"`
	SourceService  string                 `json:"source_service,omitempty"`
}

func (*NotificationMessage) Validate

func (m *NotificationMessage) Validate() error

type Priority

type Priority string

type Recipient

type Recipient struct {
	Email     string `json:"email,omitempty"`
	PhoneE164 string `json:"phone_e164,omitempty"`
}

type Scope

type Scope struct {
	AppScope     string `json:"app_scope,omitempty"`
	ClientID     string `json:"client_id,omitempty"`
	RestaurantID string `json:"restaurant_id,omitempty"`
	LocationID   string `json:"location_id,omitempty"`
	Locale       string `json:"locale,omitempty"`
}

type TemplateMode

type TemplateMode string

type TemplateReference

type TemplateReference struct {
	Mode             TemplateMode `json:"mode"`
	Channel          string       `json:"channel,omitempty"`
	Purpose          string       `json:"purpose,omitempty"`
	SubjectTemplate  string       `json:"subject_template,omitempty"`
	TextTemplate     string       `json:"text_template,omitempty"`
	HTMLTemplate     string       `json:"html_template,omitempty"`
	FromAddress      string       `json:"from_address,omitempty"`
	ReplyToAddresses []string     `json:"reply_to_addresses,omitempty"`
	SenderName       string       `json:"sender_name,omitempty"`
}

Jump to

Keyboard shortcuts

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