settings

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package settings provides services for Intercom workspace configuration.

Includes BrandsService for brand management, IPAllowlistService for IP access control, ChannelEventsService for custom channel events, JobsService for background job tracking, and NotesService for contact notes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNoteGetResult

func ParseNoteGetResult(r *api.Result) (*api.Note, error)

ParseNoteGetResult decodes a Result into a Note.

Types

type Attribute

type Attribute struct {
	ID    string `json:"id"`
	Value string `json:"value"`
}

Attribute represents an attribute collected in a custom channel event.

type AttributeEvent

type AttributeEvent struct {
	BaseEvent
	Attribute Attribute `json:"attribute"`
}

AttributeEvent represents an attribute collected event.

type BaseEvent

type BaseEvent struct {
	EventID                string  `json:"event_id"`
	ExternalConversationID string  `json:"external_conversation_id"`
	Contact                Contact `json:"contact"`
}

BaseEvent represents the base fields for a custom channel event.

type Brand

type Brand struct {
	Type                     string `json:"type"`
	ID                       string `json:"id"`
	Name                     string `json:"name,omitempty"`
	IsDefault                bool   `json:"is_default,omitempty"`
	CreatedAt                int64  `json:"created_at,omitempty"`
	UpdatedAt                int64  `json:"updated_at,omitempty"`
	HelpCenterID             string `json:"help_center_id,omitempty"`
	DefaultAddressSettingsID string `json:"default_address_settings_id,omitempty"`
}

Brand represents an Intercom brand.

func ParseGetResult

func ParseGetResult(r *api.Result) (*Brand, error)

ParseGetResult decodes a Result into a Brand.

type BrandList

type BrandList struct {
	Type string  `json:"type"`
	Data []Brand `json:"data"`
}

BrandList represents the response from the list brands endpoint.

func ParseListResult

func ParseListResult(r *api.Result) (*BrandList, error)

ParseListResult decodes a Result into a BrandList.

type BrandsService

type BrandsService struct {
	// contains filtered or unexported fields
}

BrandsService handles communication with the brand related methods of the Intercom API.

func NewBrandsService

func NewBrandsService(c api.Caller) *BrandsService

NewBrandsService creates a new BrandsService.

func (*BrandsService) GetRaw

func (s *BrandsService) GetRaw(ctx context.Context, id string) (*api.Result, error)

GetRaw retrieves a brand by ID with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/brands/retrievebrand

func (*BrandsService) ListRaw

func (s *BrandsService) ListRaw(ctx context.Context) (*api.Result, error)

ListRaw returns all brands with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/brands/listbrands

type ChannelEventsService

type ChannelEventsService struct {
	// contains filtered or unexported fields
}

ChannelEventsService handles communication with the custom channel event related methods of the Intercom API.

func NewChannelEventsService

func NewChannelEventsService(c api.Caller) *ChannelEventsService

NewChannelEventsService creates a new ChannelEventsService.

func (*ChannelEventsService) NotifyAttributeCollected

func (s *ChannelEventsService) NotifyAttributeCollected(ctx context.Context, event *AttributeEvent) (*NotificationResponse, error)

NotifyAttributeCollected notifies Intercom of an attribute collected on a custom channel.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifyattributecollected

func (*ChannelEventsService) NotifyAttributeCollectedRaw

func (s *ChannelEventsService) NotifyAttributeCollectedRaw(ctx context.Context, event *AttributeEvent) (*api.Result, error)

NotifyAttributeCollectedRaw notifies Intercom of an attribute collected on a custom channel with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifyattributecollected

func (*ChannelEventsService) NotifyNewConversation

func (s *ChannelEventsService) NotifyNewConversation(ctx context.Context, event *BaseEvent) (*NotificationResponse, error)

NotifyNewConversation notifies Intercom of a new conversation on a custom channel.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifynewconversation

func (*ChannelEventsService) NotifyNewConversationRaw

func (s *ChannelEventsService) NotifyNewConversationRaw(ctx context.Context, event *BaseEvent) (*api.Result, error)

NotifyNewConversationRaw notifies Intercom of a new conversation on a custom channel with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifynewconversation

func (*ChannelEventsService) NotifyNewMessage

func (s *ChannelEventsService) NotifyNewMessage(ctx context.Context, event *MessageEvent) (*NotificationResponse, error)

NotifyNewMessage notifies Intercom of a new message on a custom channel.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifynewmessage

func (*ChannelEventsService) NotifyNewMessageRaw

func (s *ChannelEventsService) NotifyNewMessageRaw(ctx context.Context, event *MessageEvent) (*api.Result, error)

NotifyNewMessageRaw notifies Intercom of a new message on a custom channel with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifynewmessage

func (*ChannelEventsService) NotifyQuickReply

func (s *ChannelEventsService) NotifyQuickReply(ctx context.Context, event *QuickReplyEvent) (*NotificationResponse, error)

NotifyQuickReply notifies Intercom of a quick reply selection on a custom channel.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifyquickreplyselected

func (*ChannelEventsService) NotifyQuickReplyRaw

func (s *ChannelEventsService) NotifyQuickReplyRaw(ctx context.Context, event *QuickReplyEvent) (*api.Result, error)

NotifyQuickReplyRaw notifies Intercom of a quick reply selection on a custom channel with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/custom-channel-events/notifyquickreplyselected

type Contact

type Contact struct {
	Type       string `json:"type"`
	ExternalID string `json:"external_id"`
	Name       string `json:"name,omitempty"`
	Email      string `json:"email,omitempty"`
}

Contact represents a contact in a custom channel event.

type IPAllowlistService

type IPAllowlistService struct {
	// contains filtered or unexported fields
}

IPAllowlistService handles communication with the IP allowlist related methods of the Intercom API.

func NewIPAllowlistService

func NewIPAllowlistService(c api.Caller) *IPAllowlistService

NewIPAllowlistService creates a new IPAllowlistService.

func (*IPAllowlistService) Get

Get retrieves the current IP allowlist settings.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/ip-allowlist/getipallowlist

func (*IPAllowlistService) GetRaw

func (s *IPAllowlistService) GetRaw(ctx context.Context) (*api.Result, error)

GetRaw retrieves the current IP allowlist settings with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/ip-allowlist/getipallowlist

func (*IPAllowlistService) UpdateRaw

UpdateRaw updates the IP allowlist settings with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/ip-allowlist/updateipallowlist

type IPAllowlistSettings

type IPAllowlistSettings struct {
	Type        string   `json:"type"`
	Enabled     bool     `json:"enabled"`
	IPAllowlist []string `json:"ip_allowlist"`
}

IPAllowlistSettings represents the Intercom IP allowlist configuration.

func ParseIPAllowlistGetResult

func ParseIPAllowlistGetResult(r *api.Result) (*IPAllowlistSettings, error)

ParseIPAllowlistGetResult decodes a Result into IPAllowlistSettings.

func ParseIPAllowlistUpdateResult

func ParseIPAllowlistUpdateResult(r *api.Result) (*IPAllowlistSettings, error)

ParseIPAllowlistUpdateResult decodes a Result into IPAllowlistSettings.

type Job

type Job struct {
	Type         string `json:"type"`
	ID           string `json:"id"`
	URL          string `json:"url,omitempty"`
	Status       string `json:"status,omitempty"`
	ResourceType string `json:"resource_type,omitempty"`
	ResourceID   string `json:"resource_id,omitempty"`
	ResourceURL  string `json:"resource_url,omitempty"`
}

Job represents an Intercom async job status.

func ParseJobGetStatusResult

func ParseJobGetStatusResult(r *api.Result) (*Job, error)

ParseJobGetStatusResult decodes a Result into a Job.

type JobsService

type JobsService struct {
	// contains filtered or unexported fields
}

JobsService handles communication with the job status related methods of the Intercom API.

func NewJobsService

func NewJobsService(c api.Caller) *JobsService

NewJobsService creates a new JobsService.

func (*JobsService) GetStatus

func (s *JobsService) GetStatus(ctx context.Context, jobID string) (*Job, error)

GetStatus retrieves the status of a job by ID.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/jobs/jobsstatus

func (*JobsService) GetStatusRaw

func (s *JobsService) GetStatusRaw(ctx context.Context, jobID string) (*api.Result, error)

GetStatusRaw retrieves the status of a job by ID with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/jobs/jobsstatus

type MessageEvent

type MessageEvent struct {
	BaseEvent
	Body string `json:"body"`
}

MessageEvent represents a new message event.

type NotesService

type NotesService struct {
	// contains filtered or unexported fields
}

NotesService handles communication with the note related methods of the Intercom API.

func NewNotesService

func NewNotesService(c api.Caller) *NotesService

NewNotesService creates a new NotesService.

func (*NotesService) GetRaw

func (s *NotesService) GetRaw(ctx context.Context, id string) (*api.Result, error)

GetRaw retrieves a note by ID with the full HTTP result.

See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/notes/retrievenote

type NotificationResponse

type NotificationResponse struct {
	ExternalConversationID string `json:"external_conversation_id"`
	ConversationID         string `json:"conversation_id"`
	ExternalContactID      string `json:"external_contact_id"`
	ContactID              string `json:"contact_id"`
}

NotificationResponse represents the response from a custom channel notification.

func ParseNotifyAttributeCollectedResult

func ParseNotifyAttributeCollectedResult(r *api.Result) (*NotificationResponse, error)

ParseNotifyAttributeCollectedResult decodes a Result into a NotificationResponse.

func ParseNotifyNewConversationResult

func ParseNotifyNewConversationResult(r *api.Result) (*NotificationResponse, error)

ParseNotifyNewConversationResult decodes a Result into a NotificationResponse.

func ParseNotifyNewMessageResult

func ParseNotifyNewMessageResult(r *api.Result) (*NotificationResponse, error)

ParseNotifyNewMessageResult decodes a Result into a NotificationResponse.

func ParseNotifyQuickReplyResult

func ParseNotifyQuickReplyResult(r *api.Result) (*NotificationResponse, error)

ParseNotifyQuickReplyResult decodes a Result into a NotificationResponse.

type QuickReplyEvent

type QuickReplyEvent struct {
	BaseEvent
	QuickReplyOptionID string `json:"quick_reply_option_id"`
}

QuickReplyEvent represents a quick reply selected event.

type UpdateIPAllowlistRequest

type UpdateIPAllowlistRequest struct {
	Type        string   `json:"type,omitempty"`
	Enabled     bool     `json:"enabled"`
	IPAllowlist []string `json:"ip_allowlist"`
}

UpdateIPAllowlistRequest represents a request to update the IP allowlist.

Jump to

Keyboard shortcuts

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