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 ¶
- func ParseNoteGetResult(r *api.Result) (*api.Note, error)
- type Attribute
- type AttributeEvent
- type BaseEvent
- type Brand
- type BrandList
- type BrandsService
- func (s *BrandsService) Get(ctx context.Context, id string) (*Brand, error)
- func (s *BrandsService) GetRaw(ctx context.Context, id string) (*api.Result, error)
- func (s *BrandsService) List(ctx context.Context) (*BrandList, error)
- func (s *BrandsService) ListRaw(ctx context.Context) (*api.Result, error)
- type ChannelEventsService
- func (s *ChannelEventsService) NotifyAttributeCollected(ctx context.Context, event *AttributeEvent) (*NotificationResponse, error)
- func (s *ChannelEventsService) NotifyAttributeCollectedRaw(ctx context.Context, event *AttributeEvent) (*api.Result, error)
- func (s *ChannelEventsService) NotifyNewConversation(ctx context.Context, event *BaseEvent) (*NotificationResponse, error)
- func (s *ChannelEventsService) NotifyNewConversationRaw(ctx context.Context, event *BaseEvent) (*api.Result, error)
- func (s *ChannelEventsService) NotifyNewMessage(ctx context.Context, event *MessageEvent) (*NotificationResponse, error)
- func (s *ChannelEventsService) NotifyNewMessageRaw(ctx context.Context, event *MessageEvent) (*api.Result, error)
- func (s *ChannelEventsService) NotifyQuickReply(ctx context.Context, event *QuickReplyEvent) (*NotificationResponse, error)
- func (s *ChannelEventsService) NotifyQuickReplyRaw(ctx context.Context, event *QuickReplyEvent) (*api.Result, error)
- type Contact
- type IPAllowlistService
- func (s *IPAllowlistService) Get(ctx context.Context) (*IPAllowlistSettings, error)
- func (s *IPAllowlistService) GetRaw(ctx context.Context) (*api.Result, error)
- func (s *IPAllowlistService) Update(ctx context.Context, body *UpdateIPAllowlistRequest) (*IPAllowlistSettings, error)
- func (s *IPAllowlistService) UpdateRaw(ctx context.Context, body *UpdateIPAllowlistRequest) (*api.Result, error)
- type IPAllowlistSettings
- type Job
- type JobsService
- type MessageEvent
- type NotesService
- type NotificationResponse
- func ParseNotifyAttributeCollectedResult(r *api.Result) (*NotificationResponse, error)
- func ParseNotifyNewConversationResult(r *api.Result) (*NotificationResponse, error)
- func ParseNotifyNewMessageResult(r *api.Result) (*NotificationResponse, error)
- func ParseNotifyQuickReplyResult(r *api.Result) (*NotificationResponse, error)
- type QuickReplyEvent
- type UpdateIPAllowlistRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttributeEvent ¶
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.
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) Get ¶
Get retrieves a brand by ID.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/brands/retrievebrand
func (*BrandsService) GetRaw ¶
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) List ¶
func (s *BrandsService) List(ctx context.Context) (*BrandList, error)
List returns all brands.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/brands/listbrands
func (*BrandsService) ListRaw ¶
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.
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.
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.
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.
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.
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.
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.
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.
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 ¶
func (s *IPAllowlistService) Get(ctx context.Context) (*IPAllowlistSettings, error)
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 ¶
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) Update ¶
func (s *IPAllowlistService) Update(ctx context.Context, body *UpdateIPAllowlistRequest) (*IPAllowlistSettings, error)
Update updates the IP allowlist settings.
func (*IPAllowlistService) UpdateRaw ¶
func (s *IPAllowlistService) UpdateRaw(ctx context.Context, body *UpdateIPAllowlistRequest) (*api.Result, error)
UpdateRaw updates the IP allowlist settings with the full HTTP result.
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.
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 ¶
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 ¶
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 ¶
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) Get ¶
Get retrieves a note by ID.
See: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/notes/retrievenote
func (*NotesService) GetRaw ¶
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 ¶
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.