api

package
v0.0.0-...-07f9466 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.

Index

Constants

View Source
const (
	HttpScopes = "http.Scopes"
)

Variables

This section is empty.

Functions

func NewGetConversationByIdRequest

func NewGetConversationByIdRequest(server string, conversationId string) (*http.Request, error)

NewGetConversationByIdRequest generates requests for GetConversationById

func NewListConversationMessagesRequest

func NewListConversationMessagesRequest(server string, conversationId string, params *ListConversationMessagesParams) (*http.Request, error)

NewListConversationMessagesRequest generates requests for ListConversationMessages

func NewListInboxesRequest

func NewListInboxesRequest(server string) (*http.Request, error)

NewListInboxesRequest generates requests for ListInboxes

func NewListTeammateInboxesRequest

func NewListTeammateInboxesRequest(server string, teammateId string) (*http.Request, error)

NewListTeammateInboxesRequest generates requests for ListTeammateInboxes

func NewSearchConversationsRequest

func NewSearchConversationsRequest(server string, query string, params *SearchConversationsParams) (*http.Request, error)

NewSearchConversationsRequest generates requests for SearchConversations

Types

type Attachment

type Attachment struct {
	// ContentType Content type of the attached file in [MIME format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types). Note that some attachments types may not be supported.
	ContentType string `json:"content_type"`

	// Filename Name of the attached file
	Filename string `json:"filename"`

	// Id The unique identifier of the attachment.
	Id string `json:"id"`

	// Metadata Attachment metadata
	Metadata struct {
		// Cid Unique identifier used to link an attachment to where it is used in the message body
		Cid *string `json:"cid,omitempty"`

		// IsInline Whether or not the attachment is part of the message body
		IsInline *bool `json:"is_inline,omitempty"`
	} `json:"metadata"`

	// Size Size (in byte) of the attached file
	Size int `json:"size"`

	// Url URL to download the attached file
	Url string `json:"url"`
}

Attachment defines model for Attachment.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetConversationById

func (c *Client) GetConversationById(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListConversationMessages

func (c *Client) ListConversationMessages(ctx context.Context, conversationId string, params *ListConversationMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInboxes

func (c *Client) ListInboxes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListTeammateInboxes

func (c *Client) ListTeammateInboxes(ctx context.Context, teammateId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SearchConversations

func (c *Client) SearchConversations(ctx context.Context, query string, params *SearchConversationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// SearchConversations request
	SearchConversations(ctx context.Context, query string, params *SearchConversationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetConversationById request
	GetConversationById(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListConversationMessages request
	ListConversationMessages(ctx context.Context, conversationId string, params *ListConversationMessagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInboxes request
	ListInboxes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListTeammateInboxes request
	ListTeammateInboxes(ctx context.Context, teammateId string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetConversationByIdWithResponse

func (c *ClientWithResponses) GetConversationByIdWithResponse(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*GetConversationByIdResponse, error)

GetConversationByIdWithResponse request returning *GetConversationByIdResponse

func (*ClientWithResponses) ListConversationMessagesWithResponse

func (c *ClientWithResponses) ListConversationMessagesWithResponse(ctx context.Context, conversationId string, params *ListConversationMessagesParams, reqEditors ...RequestEditorFn) (*ListConversationMessagesResponse, error)

ListConversationMessagesWithResponse request returning *ListConversationMessagesResponse

func (*ClientWithResponses) ListInboxesWithResponse

func (c *ClientWithResponses) ListInboxesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListInboxesResponse, error)

ListInboxesWithResponse request returning *ListInboxesResponse

func (*ClientWithResponses) ListTeammateInboxesWithResponse

func (c *ClientWithResponses) ListTeammateInboxesWithResponse(ctx context.Context, teammateId string, reqEditors ...RequestEditorFn) (*ListTeammateInboxesResponse, error)

ListTeammateInboxesWithResponse request returning *ListTeammateInboxesResponse

func (*ClientWithResponses) SearchConversationsWithResponse

func (c *ClientWithResponses) SearchConversationsWithResponse(ctx context.Context, query string, params *SearchConversationsParams, reqEditors ...RequestEditorFn) (*SearchConversationsResponse, error)

SearchConversationsWithResponse request returning *SearchConversationsResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// SearchConversationsWithResponse request
	SearchConversationsWithResponse(ctx context.Context, query string, params *SearchConversationsParams, reqEditors ...RequestEditorFn) (*SearchConversationsResponse, error)

	// GetConversationByIdWithResponse request
	GetConversationByIdWithResponse(ctx context.Context, conversationId string, reqEditors ...RequestEditorFn) (*GetConversationByIdResponse, error)

	// ListConversationMessagesWithResponse request
	ListConversationMessagesWithResponse(ctx context.Context, conversationId string, params *ListConversationMessagesParams, reqEditors ...RequestEditorFn) (*ListConversationMessagesResponse, error)

	// ListInboxesWithResponse request
	ListInboxesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListInboxesResponse, error)

	// ListTeammateInboxesWithResponse request
	ListTeammateInboxesWithResponse(ctx context.Context, teammateId string, reqEditors ...RequestEditorFn) (*ListTeammateInboxesResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Conversation

type Conversation = ConversationResponse

Conversation defines model for conversation.

type ConversationResponse

type ConversationResponse struct {
	UnderscoreLinks struct {
		Related *struct {
			// Comments Link to conversation comments
			Comments *string `json:"comments,omitempty"`

			// Events Link to conversation events
			Events *string `json:"events,omitempty"`

			// Followers Link to conversation followers
			Followers *string `json:"followers,omitempty"`

			// Inboxes Link to conversation inboxes
			Inboxes *string `json:"inboxes,omitempty"`

			// LastMessage Link to last message of the conversation
			LastMessage *string `json:"last_message,omitempty"`

			// Messages Link to conversation messages
			Messages *string `json:"messages,omitempty"`
		} `json:"related,omitempty"`

		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links"`

	// Assignee A teammate is a user in Front.
	Assignee TeammateResponse `json:"assignee"`

	// CreatedAt Timestamp at which the conversation was created.
	CreatedAt *float32 `json:"created_at,omitempty"`

	// CustomFields An object whose key is the `name` property defined for the custom field in the Front UI. The value of the key must use the same `type` specified for the custom field, as described in https://dev.frontapp.com/reference/custom-fields
	CustomFields CustomFieldParameter `json:"custom_fields"`

	// Id Unique identifier of the conversation
	Id string `json:"id"`

	// IsPrivate Whether or not the conversation is private
	IsPrivate bool `json:"is_private"`

	// Links List of the links for this conversation
	Links []LinkResponse `json:"links"`

	// Metadata Optional metadata about the conversation
	Metadata struct {
		// ExternalConversationIds List of external_ids for partner channel associated with the conversation. Only present for partner channel token authenticated requests.
		ExternalConversationIds *[]string `json:"external_conversation_ids,omitempty"`
	} `json:"metadata"`
	Recipient RecipientResponse `json:"recipient"`

	// ScheduledReminders List of scheduled (non-expired and non-canceled) reminders for this conversation
	ScheduledReminders []Reminder `json:"scheduled_reminders"`

	// Status Status of the conversation
	Status ConversationResponseStatus `json:"status"`

	// StatusCategory Status category of the conversation
	StatusCategory *ConversationResponseStatusCategory `json:"status_category,omitempty"`

	// StatusId Unique identifier of the conversation status category, only present if ticketing is enabled
	StatusId *string `json:"status_id,omitempty"`

	// Subject Subject of the message for email message
	Subject string `json:"subject"`

	// Tags List of the tags for this conversation
	Tags []TagResponse `json:"tags"`

	// TicketIds List of ticket ids associated with the conversation
	TicketIds []string `json:"ticket_ids"`

	// UpdatedAt Timestamp at which the conversation was last updated.
	UpdatedAt *float32 `json:"updated_at,omitempty"`

	// WaitingSince Timestamp of the oldest unreplied message.
	WaitingSince *float32 `json:"waiting_since,omitempty"`
}

ConversationResponse defines model for ConversationResponse.

type ConversationResponseStatus

type ConversationResponseStatus string

ConversationResponseStatus Status of the conversation

const (
	Archived   ConversationResponseStatus = "archived"
	Assigned   ConversationResponseStatus = "assigned"
	Deleted    ConversationResponseStatus = "deleted"
	Unassigned ConversationResponseStatus = "unassigned"
)

Defines values for ConversationResponseStatus.

func (ConversationResponseStatus) Valid

func (e ConversationResponseStatus) Valid() bool

Valid indicates whether the value is a known member of the ConversationResponseStatus enum.

type ConversationResponseStatusCategory

type ConversationResponseStatusCategory string

ConversationResponseStatusCategory Status category of the conversation

const (
	Open     ConversationResponseStatusCategory = "open"
	Resolved ConversationResponseStatusCategory = "resolved"
	Waiting  ConversationResponseStatusCategory = "waiting"
)

Defines values for ConversationResponseStatusCategory.

func (ConversationResponseStatusCategory) Valid

Valid indicates whether the value is a known member of the ConversationResponseStatusCategory enum.

type CustomFieldParameter

type CustomFieldParameter = map[string]interface{}

CustomFieldParameter An object whose key is the `name` property defined for the custom field in the Front UI. The value of the key must use the same `type` specified for the custom field, as described in https://dev.frontapp.com/reference/custom-fields

type GetConversationByIdResponse

type GetConversationByIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Conversation
}

func ParseGetConversationByIdResponse

func ParseGetConversationByIdResponse(rsp *http.Response) (*GetConversationByIdResponse, error)

ParseGetConversationByIdResponse parses an HTTP response from a GetConversationByIdWithResponse call

func (GetConversationByIdResponse) Status

Status returns HTTPResponse.Status

func (GetConversationByIdResponse) StatusCode

func (r GetConversationByIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InboxResponse

type InboxResponse struct {
	UnderscoreLinks *struct {
		Related *struct {
			// Channels Link to inbox channels
			Channels *string `json:"channels,omitempty"`

			// Conversations Link to inbox conversations
			Conversations *string `json:"conversations,omitempty"`

			// Owner Link to inbox owner
			Owner *string `json:"owner,omitempty"`

			// Teammates Link to inbox teammates
			Teammates *string `json:"teammates,omitempty"`
		} `json:"related,omitempty"`

		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links,omitempty"`

	// CustomFields An object whose key is the `name` property defined for the custom field in the Front UI. The value of the key must use the same `type` specified for the custom field, as described in https://dev.frontapp.com/reference/custom-fields
	CustomFields *CustomFieldParameter `json:"custom_fields,omitempty"`

	// Id Unique identifier for the inbox
	Id *string `json:"id,omitempty"`

	// IsPrivate Whether or not the inbox is individual
	IsPrivate *bool `json:"is_private,omitempty"`

	// IsPublic Whether or not the inbox is available to all members of a team by default
	IsPublic *bool `json:"is_public,omitempty"`

	// Name Name of the inbox
	Name *string `json:"name,omitempty"`
}

InboxResponse defines model for InboxResponse.

type Limit

type Limit = int

Limit defines model for limit.

type LinkResponse

type LinkResponse struct {
	UnderscoreLinks struct {
		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links"`

	// CustomFields An object whose key is the `name` property defined for the custom field in the Front UI. The value of the key must use the same `type` specified for the custom field, as described in https://dev.frontapp.com/reference/custom-fields
	CustomFields CustomFieldParameter `json:"custom_fields"`

	// ExternalUrl Underlying identifying external URL of the link
	ExternalUrl string `json:"external_url"`

	// Id Unique identifier of the link
	Id string `json:"id"`

	// Name Display name of the link
	Name string `json:"name"`

	// Type Type of the link. Typically associated with the underlying link provider (if known)
	Type string `json:"type"`
}

LinkResponse A link used to connect a Front conversation to an external resource.

type ListConversationMessagesParams

type ListConversationMessagesParams struct {
	// Limit Max number of results per [page](https://dev.frontapp.com/docs/pagination)
	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`

	// PageToken Token to use to request the [next page](https://dev.frontapp.com/docs/pagination)
	PageToken *PageToken `form:"page_token,omitempty" json:"page_token,omitempty"`

	// SortBy Field used to sort the messages. Only supports `created_at`.
	SortBy *SortByConversationMessages `form:"sort_by,omitempty" json:"sort_by,omitempty"`

	// SortOrder Order by which results should be sorted
	SortOrder *ListConversationMessagesParamsSortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"`
}

ListConversationMessagesParams defines parameters for ListConversationMessages.

type ListConversationMessagesParamsSortOrder

type ListConversationMessagesParamsSortOrder string

ListConversationMessagesParamsSortOrder defines parameters for ListConversationMessages.

const (
	ListConversationMessagesParamsSortOrderAsc  ListConversationMessagesParamsSortOrder = "asc"
	ListConversationMessagesParamsSortOrderDesc ListConversationMessagesParamsSortOrder = "desc"
)

Defines values for ListConversationMessagesParamsSortOrder.

func (ListConversationMessagesParamsSortOrder) Valid

Valid indicates whether the value is a known member of the ListConversationMessagesParamsSortOrder enum.

type ListConversationMessagesResponse

type ListConversationMessagesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListOfMessages
}

func ParseListConversationMessagesResponse

func ParseListConversationMessagesResponse(rsp *http.Response) (*ListConversationMessagesResponse, error)

ParseListConversationMessagesResponse parses an HTTP response from a ListConversationMessagesWithResponse call

func (ListConversationMessagesResponse) Status

Status returns HTTPResponse.Status

func (ListConversationMessagesResponse) StatusCode

func (r ListConversationMessagesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInboxesResponse

type ListInboxesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListOfInboxes
}

func ParseListInboxesResponse

func ParseListInboxesResponse(rsp *http.Response) (*ListInboxesResponse, error)

ParseListInboxesResponse parses an HTTP response from a ListInboxesWithResponse call

func (ListInboxesResponse) Status

func (r ListInboxesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInboxesResponse) StatusCode

func (r ListInboxesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListOfConversationSearchResults

type ListOfConversationSearchResults struct {
	UnderscoreLinks *struct {
		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links,omitempty"`
	UnderscorePagination *struct {
		// Next Link to next [page of results](https://dev.frontapp.com/docs/pagination)
		Next *string `json:"next,omitempty"`
	} `json:"_pagination,omitempty"`
	UnderscoreResults *[]ConversationResponse `json:"_results,omitempty"`

	// UnderscoreTotal Total number of matching conversations
	UnderscoreTotal *int `json:"_total,omitempty"`
}

ListOfConversationSearchResults defines model for listOfConversationSearchResults.

type ListOfInboxes

type ListOfInboxes struct {
	UnderscoreLinks *struct {
		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links,omitempty"`
	UnderscoreResults *[]InboxResponse `json:"_results,omitempty"`
}

ListOfInboxes defines model for listOfInboxes.

type ListOfMessages

type ListOfMessages struct {
	UnderscoreLinks *struct {
		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links,omitempty"`
	UnderscorePagination *struct {
		// Next Link to next [page of results](https://dev.frontapp.com/docs/pagination)
		Next *string `json:"next,omitempty"`
	} `json:"_pagination,omitempty"`
	UnderscoreResults *[]MessageResponse `json:"_results,omitempty"`
}

ListOfMessages defines model for listOfMessages.

type ListTeammateInboxesResponse

type ListTeammateInboxesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListOfInboxes
}

func ParseListTeammateInboxesResponse

func ParseListTeammateInboxesResponse(rsp *http.Response) (*ListTeammateInboxesResponse, error)

ParseListTeammateInboxesResponse parses an HTTP response from a ListTeammateInboxesWithResponse call

func (ListTeammateInboxesResponse) Status

Status returns HTTPResponse.Status

func (ListTeammateInboxesResponse) StatusCode

func (r ListTeammateInboxesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type MessageResponse

type MessageResponse struct {
	UnderscoreLinks *struct {
		Related *struct {
			// Conversation Link to message conversation
			Conversation *string `json:"conversation,omitempty"`

			// MessageRepliedTo Link to message this message replied to
			MessageRepliedTo *string `json:"message_replied_to,omitempty"`

			// MessageSeen Link to message seen information
			MessageSeen *string `json:"message_seen,omitempty"`
		} `json:"related,omitempty"`

		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links,omitempty"`

	// Attachments List of files attached to the message
	Attachments *[]Attachment `json:"attachments,omitempty"`

	// Author A teammate is a user in Front.
	Author *TeammateResponse `json:"author,omitempty"`

	// Blurb Preview of the message body
	Blurb *string `json:"blurb,omitempty"`

	// Body Body of the message
	Body *string `json:"body,omitempty"`

	// CreatedAt The timestamp when the message was sent or received
	CreatedAt *float32 `json:"created_at,omitempty"`

	// DraftMode If the message is a draft, describes the draft mode. Can be 'private' (draft is visible to the author only) or 'shared' (draft is visible to all teammates with access to the conversation).
	DraftMode *MessageResponseDraftMode `json:"draft_mode,omitempty"`

	// ErrorType Type of the error when the draft failed to be sent
	ErrorType *string `json:"error_type,omitempty"`

	// Id Unique identifier of the message
	Id *string `json:"id,omitempty"`

	// IsInbound Whether or not the message has been received or sent
	IsInbound *bool `json:"is_inbound,omitempty"`

	// MessageUid Secondary unique identifier of a message. Generated by Front on message creation. Learn more at about the [message UID](https://dev.frontapp.com/reference/messages#creating-a-new-message).
	MessageUid *string `json:"message_uid,omitempty"`

	// Metadata Optional metadata about the message
	Metadata *struct {
		// ChatVisitorUrl For `front_chat` messages only. Source URL from the chat widget when sending a message.
		ChatVisitorUrl *string `json:"chat_visitor_url,omitempty"`

		// Duration For `truly-call` messages only. Length of the call in seconds.
		Duration *int `json:"duration,omitempty"`

		// ExternalId For `tweet` or 'custom' (partner channel token authenticated) messages only. Unique message identifier in the underlying provider (Twitter or Partner). For custom messages, only present for partner channel token authenticated requests.
		ExternalId *string `json:"external_id,omitempty"`

		// HaveBeenAnswered For `truly-call` messages only. Whether or not the call have been answered.
		HaveBeenAnswered *bool `json:"have_been_answered,omitempty"`

		// HaveBeenFavorited For `tweet` messages only. Whether or not the tweet have been favorited.
		HaveBeenFavorited *bool `json:"have_been_favorited,omitempty"`

		// HaveBeenRetweeted For `tweet` messages only. Whether or not the tweet have been retweeted.
		HaveBeenRetweeted *bool `json:"have_been_retweeted,omitempty"`

		// Headers For `custom` messages only. Custom object holding internal information.
		Headers *map[string]interface{} `json:"headers,omitempty"`

		// IntercomUrl For `intercom` messages only. URL of the Intercom conversation the message is coming from.
		IntercomUrl *string `json:"intercom_url,omitempty"`

		// IsRetweet For `tweet` messages only. Whether or not the tweet is a retweet.
		IsRetweet *bool `json:"is_retweet,omitempty"`

		// ThreadRef For `custom` messages only. Custom reference which is used to thread messages.
		ThreadRef *string `json:"thread_ref,omitempty"`

		// TwitterUrl For `tweet` messages only. URL of the tweet.
		TwitterUrl *string `json:"twitter_url,omitempty"`
	} `json:"metadata,omitempty"`
	Recipients *[]RecipientResponse `json:"recipients,omitempty"`
	Signature  *SignatureResponse   `json:"signature,omitempty"`

	// Subject Subject of the message
	Subject *string `json:"subject,omitempty"`

	// Text Text version of the body for email messages
	Text *string `json:"text,omitempty"`

	// Type Type of the message
	Type *MessageResponseType `json:"type,omitempty"`

	// Version The current version of the message in Front
	Version *string `json:"version,omitempty"`
}

MessageResponse defines model for MessageResponse.

type MessageResponseDraftMode

type MessageResponseDraftMode string

MessageResponseDraftMode If the message is a draft, describes the draft mode. Can be 'private' (draft is visible to the author only) or 'shared' (draft is visible to all teammates with access to the conversation).

const (
	Private MessageResponseDraftMode = "private"
	Shared  MessageResponseDraftMode = "shared"
)

Defines values for MessageResponseDraftMode.

func (MessageResponseDraftMode) Valid

func (e MessageResponseDraftMode) Valid() bool

Valid indicates whether the value is a known member of the MessageResponseDraftMode enum.

type MessageResponseType

type MessageResponseType string

MessageResponseType Type of the message

const (
	Call       MessageResponseType = "call"
	Custom     MessageResponseType = "custom"
	Email      MessageResponseType = "email"
	Facebook   MessageResponseType = "facebook"
	FrontChat  MessageResponseType = "front_chat"
	Googleplay MessageResponseType = "googleplay"
	Intercom   MessageResponseType = "intercom"
	Internal   MessageResponseType = "internal"
	PhoneCall  MessageResponseType = "phone-call"
	Sms        MessageResponseType = "sms"
	Tweet      MessageResponseType = "tweet"
	TweetDm    MessageResponseType = "tweet_dm"
	Whatsapp   MessageResponseType = "whatsapp"
	YaloWha    MessageResponseType = "yalo_wha"
)

Defines values for MessageResponseType.

func (MessageResponseType) Valid

func (e MessageResponseType) Valid() bool

Valid indicates whether the value is a known member of the MessageResponseType enum.

type PageToken

type PageToken = string

PageToken defines model for pageToken.

type RecipientResponse

type RecipientResponse struct {
	UnderscoreLinks struct {
		Related *struct {
			// Contact Link to recipient contact
			Contact *string `json:"contact,omitempty"`
		} `json:"related,omitempty"`
	} `json:"_links"`

	// Handle Handle of the contact. Can be any string used to uniquely identify the contact
	Handle string `json:"handle"`

	// Name Name of the recipient.
	Name *string `json:"name"`

	// Role Role of the recipient
	Role RecipientResponseRole `json:"role"`
}

RecipientResponse defines model for RecipientResponse.

type RecipientResponseRole

type RecipientResponseRole string

RecipientResponseRole Role of the recipient

const (
	Bcc     RecipientResponseRole = "bcc"
	Cc      RecipientResponseRole = "cc"
	From    RecipientResponseRole = "from"
	ReplyTo RecipientResponseRole = "reply-to"
	To      RecipientResponseRole = "to"
)

Defines values for RecipientResponseRole.

func (RecipientResponseRole) Valid

func (e RecipientResponseRole) Valid() bool

Valid indicates whether the value is a known member of the RecipientResponseRole enum.

type Reminder

type Reminder struct {
	UnderscoreLinks struct {
		Related *struct {
			// Owner Link to conversation owner
			Owner *string `json:"owner,omitempty"`
		} `json:"related,omitempty"`
	} `json:"_links"`

	// CreatedAt Timestamp at which the conversation reminder has been created
	CreatedAt *float32 `json:"created_at,omitempty"`

	// ScheduledAt Timestamp that the conversation reminder has been scheduled for
	ScheduledAt *float32 `json:"scheduled_at,omitempty"`

	// UpdatedAt Timestamp at which the conversation reminder has been updated
	UpdatedAt *float32 `json:"updated_at,omitempty"`
}

Reminder defines model for Reminder.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SearchConversationsParams

type SearchConversationsParams struct {
	// Limit Max number of results per [page](https://dev.frontapp.com/docs/pagination)
	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`

	// PageToken Token to use to request the [next page](https://dev.frontapp.com/docs/pagination)
	PageToken *PageToken `form:"page_token,omitempty" json:"page_token,omitempty"`
}

SearchConversationsParams defines parameters for SearchConversations.

type SearchConversationsResponse

type SearchConversationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListOfConversationSearchResults
}

func ParseSearchConversationsResponse

func ParseSearchConversationsResponse(rsp *http.Response) (*SearchConversationsResponse, error)

ParseSearchConversationsResponse parses an HTTP response from a SearchConversationsWithResponse call

func (SearchConversationsResponse) Status

Status returns HTTPResponse.Status

func (SearchConversationsResponse) StatusCode

func (r SearchConversationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SignatureResponse

type SignatureResponse struct {
	UnderscoreLinks struct {
		Related *struct {
			// Owner Link to signature's owner (either a team or teammate)
			Owner *string `json:"owner,omitempty"`
		} `json:"related,omitempty"`

		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links"`

	// Body Body of the signature
	Body       string    `json:"body"`
	ChannelIds *[]string `json:"channel_ids"`

	// Id Unique identifier of the signature
	Id string `json:"id"`

	// IsDefault Whether the signature is the default signature for the team or teammate.
	IsDefault bool `json:"is_default"`

	// IsPrivate Whether the signature is private to the teammate.
	IsPrivate bool `json:"is_private"`

	// IsVisibleForAllTeammateChannels Whether or not the signature is available in teammate channels.
	IsVisibleForAllTeammateChannels bool `json:"is_visible_for_all_teammate_channels"`

	// Name Name of the signature
	Name *string `json:"name"`

	// SenderInfo Sender info of the signature
	SenderInfo *string `json:"sender_info"`
}

SignatureResponse defines model for SignatureResponse.

type SortByConversationMessages

type SortByConversationMessages = string

SortByConversationMessages defines model for sortByConversationMessages.

type SortOrder

type SortOrder string

SortOrder defines model for sortOrder.

const (
	SortOrderAsc  SortOrder = "asc"
	SortOrderDesc SortOrder = "desc"
)

Defines values for SortOrder.

func (SortOrder) Valid

func (e SortOrder) Valid() bool

Valid indicates whether the value is a known member of the SortOrder enum.

type TagResponse

type TagResponse struct {
	UnderscoreLinks struct {
		Related *struct {
			// Children Link to tag children
			Children *string `json:"children,omitempty"`

			// Conversations Link to tag conversations
			Conversations *string `json:"conversations,omitempty"`

			// Owner Link to tag owner
			Owner *string `json:"owner,omitempty"`

			// ParentTag Link to parent tag
			ParentTag *string `json:"parent_tag,omitempty"`
		} `json:"related,omitempty"`

		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links"`

	// CreatedAt Timestamp of tag create creation
	CreatedAt *float32 `json:"created_at,omitempty"`

	// Description Description of the tag
	Description *string `json:"description"`

	// Highlight Highlight color or emoji of the tag. Null if the tag does not have a highlight.
	Highlight *string `json:"highlight"`

	// Id Unique identifier of the tag
	Id string `json:"id"`

	// IsPrivate Whether or not the tag is individual
	IsPrivate bool `json:"is_private"`

	// IsVisibleInConversationLists Whether the tag is visible in conversation lists.
	IsVisibleInConversationLists bool `json:"is_visible_in_conversation_lists"`

	// Name Name of the tag
	Name string `json:"name"`

	// UpdatedAt Timestamp of the last tag update
	UpdatedAt *float32 `json:"updated_at,omitempty"`
}

TagResponse A tag is a label that can be used to classify conversations.

type TeammateResponse

type TeammateResponse struct {
	UnderscoreLinks struct {
		Related *struct {
			// BotSource Link to the source resource of the bot (e.g. rule)
			BotSource *string `json:"botSource,omitempty"`

			// Conversations Link to teammate's conversations
			Conversations *string `json:"conversations,omitempty"`

			// Inboxes Link to teammate's inboxes
			Inboxes *string `json:"inboxes,omitempty"`
		} `json:"related,omitempty"`

		// Self Link to resource
		Self *string `json:"self,omitempty"`
	} `json:"_links"`

	// CustomFields An object whose key is the `name` property defined for the custom field in the Front UI. The value of the key must use the same `type` specified for the custom field, as described in https://dev.frontapp.com/reference/custom-fields
	CustomFields CustomFieldParameter `json:"custom_fields"`

	// Email Email address of the teammate
	Email string `json:"email"`

	// FirstName First name of the teammate
	FirstName string `json:"first_name"`

	// Id Unique identifier of the teammate
	Id string `json:"id"`

	// IsAdmin Whether or not the teammate is an admin in your company
	IsAdmin bool `json:"is_admin"`

	// IsAvailable Whether or not the teammate is available
	IsAvailable bool `json:"is_available"`

	// IsBlocked Whether or not the teammate account has been blocked
	IsBlocked bool `json:"is_blocked"`

	// LastName Last name of the teammate
	LastName string `json:"last_name"`

	// Type Type of the teammate, normal teammates are denoted as "user", while visitors are denoted as "visitor".
	// Bot users are denoted by their parent resource type.
	// The following bot types are available:
	//   * rule: acting on behalf of a Rule, author of comments and drafts
	//   * macro: acting on behalf of a Macro, author of comments and drafts
	//   * API: acting on behalf of OAuth clients
	//   * integration: acting on behalf of an Integration
	//   * CSAT: used for authoring CSAT response comments
	Type TeammateResponseType `json:"type"`

	// Username Username of the teammate (used for "@" mentions)
	Username string `json:"username"`
}

TeammateResponse A teammate is a user in Front.

type TeammateResponseType

type TeammateResponseType string

TeammateResponseType Type of the teammate, normal teammates are denoted as "user", while visitors are denoted as "visitor". Bot users are denoted by their parent resource type. The following bot types are available:

  • rule: acting on behalf of a Rule, author of comments and drafts
  • macro: acting on behalf of a Macro, author of comments and drafts
  • API: acting on behalf of OAuth clients
  • integration: acting on behalf of an Integration
  • CSAT: used for authoring CSAT response comments
const (
	API         TeammateResponseType = "API"
	CSAT        TeammateResponseType = "CSAT"
	Integration TeammateResponseType = "integration"
	Macro       TeammateResponseType = "macro"
	Rule        TeammateResponseType = "rule"
	User        TeammateResponseType = "user"
	Visitor     TeammateResponseType = "visitor"
)

Defines values for TeammateResponseType.

func (TeammateResponseType) Valid

func (e TeammateResponseType) Valid() bool

Valid indicates whether the value is a known member of the TeammateResponseType enum.

Jump to

Keyboard shortcuts

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