@frontapp/ui-bridge
Advanced tools
Comparing version
@@ -14,1 +14,8 @@ import { ApplicationAttachmentId } from './idTypesV2'; | ||
} | ||
export interface ApplicationDraftAttachment extends Omit<ApplicationAttachment, 'id'> { | ||
/** | ||
* Unique ID of the attachment. | ||
* This may be undefined if the draft has not been saved yet. | ||
*/ | ||
id: ApplicationAttachmentId | undefined; | ||
} |
import { ApplicationChannelId } from './idTypesV2'; | ||
import { ApplicationInbox } from './inboxTypesV2'; | ||
import { ApplicationPaginatedResults } from './paginationTypesV2'; | ||
export type ApplicationChannelType = 'custom' | 'dialpad' | 'dialpad_sms' | 'email' | 'facebook' | 'frontForm' | 'frontChat' | 'portal' | 'googlePlay' | 'intercom' | 'smooch' | 'talkdesk' | 'truly' | 'twilio' | 'twitter' | 'twitterDm' | 'whatsapp'; | ||
export type ApplicationChannelType = 'custom' | 'aircall' | 'aircall_sms' | 'dialpad' | 'dialpad_sms' | 'email' | 'facebook' | 'frontForm' | 'frontChat' | 'portal' | 'googlePlay' | 'intercom' | 'smooch' | 'talkdesk' | 'truly' | 'twilio' | 'twitter' | 'twitterDm' | 'whatsapp'; | ||
export interface ApplicationChannel { | ||
@@ -6,0 +6,0 @@ /** Unique ID of the Channel. */ |
@@ -17,2 +17,3 @@ import { ApplicationCancelToken } from './asyncTypesV2'; | ||
import { ApplicationTeammate, ApplicationTeammateList } from './teammateTypesV2'; | ||
import { ApplicationTicketStatusList } from './ticketStatusesTypesV2'; | ||
import { ApplicationTopic } from './topicTypesV2'; | ||
@@ -132,2 +133,9 @@ import { Widget, WidgetTemplate } from './widgetTypesV2'; | ||
/** | ||
* List the ticket statuses accessible by the current teammate. | ||
* @param paginationToken Token of the requested page. If omitted, will return the first page of results. | ||
* @param cancelToken Cancel the request. | ||
* @returns List of ticket statuses. | ||
*/ | ||
listTicketStatuses(paginationToken?: ApplicationPaginationToken, cancelToken?: ApplicationCancelToken): Promise<ApplicationTicketStatusList>; | ||
/** | ||
* Create a draft. | ||
@@ -134,0 +142,0 @@ * @param template Properties of the draft to create |
@@ -0,1 +1,2 @@ | ||
import { ApplicationCustomAttribute } from './contactTypesV2'; | ||
import { ApplicationConversationId, ApplicationDraftId } from './idTypesV2'; | ||
@@ -10,2 +11,3 @@ import { ApplicationInbox } from './inboxTypesV2'; | ||
export type ApplicationConversationStatus = 'open' | 'archived' | 'trashed' | 'spam'; | ||
export type ApplicationConversationStatusCategory = 'open' | 'waiting' | 'resolved'; | ||
export interface ApplicationConversation { | ||
@@ -34,4 +36,12 @@ /** Unique ID of the conversation. */ | ||
links: ReadonlyArray<ApplicationLink>; | ||
/** Links attached to the conversation. */ | ||
/** The time when conversation was closed. */ | ||
closedAt: number | undefined; | ||
/** Unique ID of the conversation status category, only present if ticketing is enabled */ | ||
statusId: string | undefined; | ||
/** Status category of the conversation */ | ||
statusCategory: ApplicationConversationStatusCategory | undefined; | ||
/** List of ticket ids associated with the conversation */ | ||
ticketIds: ReadonlyArray<string>; | ||
/** Custom field attributes associated with the conversation */ | ||
customFieldAttributes: ReadonlyArray<ApplicationCustomAttribute>; | ||
} | ||
@@ -38,0 +48,0 @@ export interface ApplicationSingleConversation extends ApplicationConversation { |
@@ -1,2 +0,2 @@ | ||
import { ApplicationAttachment } from './attachmentTypesV2'; | ||
import { ApplicationDraftAttachment } from './attachmentTypesV2'; | ||
import { ApplicationChannel } from './channelTypesV2'; | ||
@@ -27,3 +27,3 @@ import { ApplicationChannelId, ApplicationDraftId, ApplicationMessageId } from './idTypesV2'; | ||
content: ApplicationDraftContent & { | ||
attachments: ReadonlyArray<ApplicationAttachment>; | ||
attachments: ReadonlyArray<ApplicationDraftAttachment>; | ||
}; | ||
@@ -30,0 +30,0 @@ /** Whether the draft is editable */ |
@@ -50,2 +50,5 @@ import { Branded } from 'io-ts'; | ||
} | ||
interface ApplicationTicketStatusIdBrand { | ||
readonly publicIdTicketStatusTag: unique symbol; | ||
} | ||
interface ApplicationTeamIdBrand { | ||
@@ -63,3 +66,3 @@ readonly publicIdTeam: unique symbol; | ||
} | ||
export type ApplicationResourceIdBrand = ApplicationActivityIdBrand & ApplicationAttachmentIdBrand & ApplicationCalendarEventIdBrand & ApplicationCalendarEventVersionIdBrand & ApplicationCannedAnswerIdBrand & ApplicationCardIdBrand & ApplicationCardGroupIdBrand & ApplicationChannelIdBrand & ApplicationCircleIdBrand & ApplicationCommentIdBrand & ApplicationConversationIdBrand & ApplicationCustomFieldIdBrand & ApplicationDraftIdBrand & ApplicationInboxIdBrand & ApplicationMessageIdBrand & ApplicationRuleIdBrand & ApplicationTagIdBrand & ApplicationTeamIdBrand & ApplicationTeammateIdBrand & ApplicationTopicIdBrand; | ||
export type ApplicationResourceIdBrand = ApplicationActivityIdBrand & ApplicationAttachmentIdBrand & ApplicationCalendarEventIdBrand & ApplicationCalendarEventVersionIdBrand & ApplicationCannedAnswerIdBrand & ApplicationCardIdBrand & ApplicationCardGroupIdBrand & ApplicationChannelIdBrand & ApplicationCircleIdBrand & ApplicationCommentIdBrand & ApplicationConversationIdBrand & ApplicationCustomFieldIdBrand & ApplicationDraftIdBrand & ApplicationInboxIdBrand & ApplicationMessageIdBrand & ApplicationRuleIdBrand & ApplicationTagIdBrand & ApplicationTicketStatusIdBrand & ApplicationTeamIdBrand & ApplicationTeammateIdBrand & ApplicationTopicIdBrand; | ||
export type ApplicationAttachmentId = Branded<string, ApplicationAttachmentIdBrand>; | ||
@@ -77,2 +80,3 @@ export type ApplicationCannedAnswerId = Branded<string, ApplicationCannedAnswerIdBrand>; | ||
export type ApplicationTagId = Branded<string, ApplicationTagIdBrand>; | ||
export type ApplicationTicketStatusId = Branded<string, ApplicationTicketStatusIdBrand>; | ||
export type ApplicationTeamId = Branded<string, ApplicationTeamIdBrand>; | ||
@@ -79,0 +83,0 @@ export type ApplicationTeammateId = Branded<string, ApplicationTeammateIdBrand>; |
{ | ||
"name": "@frontapp/ui-bridge", | ||
"version": "2.0.0-beta16", | ||
"version": "2.0.0-beta17", | ||
"description": "Helpers and TypeScript definitions for the Front SDK bridge", | ||
@@ -5,0 +5,0 @@ "author": { |
57684
4.59%50
4.17%1276
3.99%