Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frontapp/ui-bridge

Package Overview
Dependencies
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontapp/ui-bridge - npm Package Compare versions

Comparing version 2.0.0-beta10 to 2.0.0-beta11

8

dist/bridgeTypesV2.d.ts
import { Observable } from 'rxjs';
import { ContextOf } from './internal/contextTypesV2';
import { EntryPointTemplate } from './internal/entryPointTypesV2';
export declare type ContextFunctionCall = (contextId: string, callId: string, name: string, args: ReadonlyArray<unknown>) => Observable<unknown>;
export declare type ContextFunctionCancel = (callId: string) => void;
export type ContextFunctionCall = (contextId: string, callId: string, name: string, args: ReadonlyArray<unknown>) => Observable<unknown>;
export type ContextFunctionCancel = (callId: string) => void;
/**

@@ -11,4 +11,4 @@ * Create a new Entry Point for the current application.

*/
export declare type EntryPointCreator = <TTemplate extends EntryPointTemplate>(template: TTemplate) => Observable<ContextOf<TTemplate['type']>>;
export declare type Initializer = (createEntryPoint: EntryPointCreator) => void;
export type EntryPointCreator = <TTemplate extends EntryPointTemplate>(template: TTemplate) => Observable<ContextOf<TTemplate['type']>>;
export type Initializer = (createEntryPoint: EntryPointCreator) => void;
export interface View {

@@ -15,0 +15,0 @@ widgetId: string;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -9,3 +9,3 @@ import { ApplicationError } from './errorTypesV2';

}
export declare type ApplicationCanceller = (message?: string) => void;
export type ApplicationCanceller = (message?: string) => void;
export interface ApplicationCancelTokenSource {

@@ -12,0 +12,0 @@ cancel: ApplicationCanceller;

import { ApplicationChannelId } from './idTypesV2';
import { ApplicationInbox } from './inboxTypesV2';
import { ApplicationPaginatedResults } from './paginationTypesV2';
export declare type ApplicationChannelType = 'custom' | 'email' | 'facebook' | 'frontForm' | 'frontChat' | 'googlePlay' | 'intercom' | 'smooch' | 'talkdesk' | 'truly' | 'twilio' | 'twitter' | 'twitterDm' | 'whatsapp';
export type ApplicationChannelType = 'custom' | 'email' | 'facebook' | 'frontForm' | 'frontChat' | 'googlePlay' | 'intercom' | 'smooch' | 'talkdesk' | 'truly' | 'twilio' | 'twitter' | 'twitterDm' | 'whatsapp';
export interface ApplicationChannel {

@@ -17,2 +17,2 @@ /** Unique ID of the Channel. */

}
export declare type ApplicationChannelList = ApplicationPaginatedResults<ApplicationChannel>;
export type ApplicationChannelList = ApplicationPaginatedResults<ApplicationChannel>;

@@ -23,2 +23,2 @@ import { ApplicationAttachment } from './attachmentTypesV2';

}
export declare type ApplicationCommentList = ApplicationPaginatedResults<ApplicationComment>;
export type ApplicationCommentList = ApplicationPaginatedResults<ApplicationComment>;

@@ -16,3 +16,3 @@ import { ApplicationContactGroupId, ApplicationContactId, ApplicationCustomFieldId, ApplicationInboxId, ApplicationTeammateId } from './idTypesV2';

}
export declare type ApplicationContactHandleType = 'email' | 'phone' | 'twitter' | 'custom' | 'facebook' | 'intercom' | 'smooch' | 'frontChat' | 'whatsapp' | 'googlePlay';
export type ApplicationContactHandleType = 'email' | 'phone' | 'twitter' | 'custom' | 'facebook' | 'intercom' | 'smooch' | 'frontChat' | 'whatsapp' | 'googlePlay';
interface ApplicationContactHandle {

@@ -40,3 +40,3 @@ /** Type of the handle. */

}
export declare type ApplicationCustomAttribute = ApplicationCustomAttributeBase<'string'> | ApplicationCustomAttributeBase<'enum'> | ApplicationCustomAttributeBase<'datetime'> | ApplicationCustomAttributeBase<'boolean'> | ApplicationCustomAttributeBase<'number'> | ApplicationCustomAttributeBase<'teammateId'> | ApplicationCustomAttributeBase<'inboxId'> | ApplicationCustomAttributeBase<'unknown'>;
export type ApplicationCustomAttribute = ApplicationCustomAttributeBase<'string'> | ApplicationCustomAttributeBase<'enum'> | ApplicationCustomAttributeBase<'datetime'> | ApplicationCustomAttributeBase<'boolean'> | ApplicationCustomAttributeBase<'number'> | ApplicationCustomAttributeBase<'teammateId'> | ApplicationCustomAttributeBase<'inboxId'> | ApplicationCustomAttributeBase<'unknown'>;
export {};

@@ -144,10 +144,2 @@ import { ApplicationCancelToken } from './asyncTypesV2';

updateDraft(draftId: ApplicationDraftId, update: ApplicationDraftUpdate, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Fetch the current path the user is in within the app.
* If the user is composing a new message in a popped out composer,
* noConversationPopoverContext,
* we will return a constant string of 'composing-new'.
* @param cancelToken Cancel the request.
*/
fetchPath(cancelToken?: ApplicationCancelToken): Promise<string>;
}

@@ -211,2 +203,7 @@ export interface NoConversationContext extends ApplicationContextBase {

removeLink(linkId: ApplicationTopicId, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Fetch the current path the user is in within the app.
* @param cancelToken Cancel the request.
*/
fetchPath(cancelToken?: ApplicationCancelToken): Promise<string>;
}

@@ -255,2 +252,6 @@ export interface SingleConversationContext extends ExistingConversationBaseContext {

}
/**
* @deprecated
* This context has been deprecated and been replaced by the MessageComposerContext.
*/
export interface NoConversationPopoverContext extends ApplicationContextBase, Pick<SingleConversationContext, 'fetchDraft'> {

@@ -265,2 +266,6 @@ type: 'noConversationPopover';

}
/**
* @deprecated
* This context has been deprecated and been replaced by the MessageComposerContext.
*/
export interface SingleConversationPopoverContext extends Omit<SingleConversationContext, 'type'> {

@@ -279,9 +284,97 @@ type: 'singleConversationPopover';

}
export declare type ExistingConversationContext = SingleConversationContext | MultiConversationsContext;
export declare type ConversationContext = NoConversationContext | NoConversationPopoverContext | SingleConversationContext | SingleConversationPopoverContext | MultiConversationsContext;
export type ExistingConversationContext = SingleConversationContext | MultiConversationsContext;
export type ConversationContext = NoConversationContext | NoConversationPopoverContext | SingleConversationContext | SingleConversationPopoverContext | MultiConversationsContext;
export interface MessageContext extends ApplicationContextBase {
type: 'message';
messageId: string;
/**
* Fetch the current path the user is in within the app.
* @param cancelToken Cancel the request.
*/
fetchPath(cancelToken?: ApplicationCancelToken): Promise<string>;
}
export declare type ApplicationContext = ConversationContext | MessageContext;
export interface MessageComposerContext extends ApplicationContextBase {
type: 'messageComposer';
draft: ApplicationDraft;
/** The conversation will not exist for an unsaved (empty) draft. */
conversation: ApplicationSingleConversation | undefined;
/**
* Add a link to the conversation if it exists.
* @param externalUrl URL of the topic.
* @param name Human readable name.
* @param cancelToken Cancel the creation of the link.
* @returns The added link.
*/
addLink(externalUrl: string, name: string | undefined, cancelToken?: ApplicationCancelToken): Promise<ApplicationLink>;
/**
* Assign or unassign the conversation if it exists.
* @param teammateId ID of the teammate to assign the conversations to. If null, the conversations will be unassigned.
* @param cancelToken Cancel the request.
*/
assign(teammateId: ApplicationTeammateId | null, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Move the conversation if it exists to an inbox.
* @param inboxId ID of the inbox.
* @param cancelToken Cancel the request.
*/
move(inboxId: ApplicationInboxId, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Set the status of the conversation if it exists.
* @param status Conversation status to apply.
* @param cancelToken Cancel the request.
*/
setStatus(status: ApplicationConversationStatus, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Add the specified tags to the conversation if it exists.
* @param tagIds Tag IDs to add.
* @param cancelToken Cancel the request.
*/
tag(tagIds: ReadonlyArray<ApplicationTagId>, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Remove the specified tags from the conversation if it exists.
* @param tagIds Tag IDs to remove.
* @param cancelToken Cancel the request.
*/
untag(tagIds: ReadonlyArray<ApplicationTagId>, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* Remove the specified link from the conversation if it exists.
* @param linkId Link ID to remove.
* @param cancelToken Cancel the request.
*/
removeLink(linkId: ApplicationTopicId, cancelToken?: ApplicationCancelToken): Promise<void>;
/**
* List the messages in the conversation if it exists.
* @param paginationToken Token of the requested page. If omitted, will return the first page of results.
* @param cancelToken Cancel the request.
* @returns List of messages.
*/
listMessages(paginationToken?: ApplicationPaginationToken, cancelToken?: ApplicationCancelToken): Promise<ApplicationMessageList>;
/**
* List the comments in the conversation if it exists.
* @param paginationToken Token of the requested page. If omitted, will return the first page of results.
* @param cancelToken Cancel the request.
* @returns List of comments.
*/
listComments(paginationToken?: ApplicationPaginationToken, cancelToken?: ApplicationCancelToken): Promise<ApplicationCommentList>;
/**
* List the recipients in the order in which the recipients are sent if the conversation exists.
* @param paginationToken Token of the requested page. If omitted, will return the first page of results.
* @param cancelToken Cancel the request.
* @returns List of recipients.
*/
listRecipients(paginationToken?: ApplicationPaginationToken, cancelToken?: ApplicationCancelToken): Promise<ApplicationRecipientList>;
/**
* Download the specified attachment that is attached to the draft.
* @param messageOrCommentId Message or comment id for the attachment.
* @param attachmentId Attachment id to be fetched.
* @param cancelToken Cancel the request.
* @returns File holding the data of the attachment
*/
downloadComposerAttachment(attachmentId: ApplicationAttachmentId, cancelToken?: ApplicationCancelToken): Promise<File | undefined>;
/**
* Close the message composer plugin.
*/
close(cancelToken?: ApplicationCancelToken): Promise<void>;
}
export type ApplicationContext = ConversationContext | MessageContext | MessageComposerContext;
interface ContextMap {

@@ -291,4 +384,5 @@ [EntryPointTypesEnum.CONVERSATION_LINK_DROPDOWN]: ExistingConversationContext;

[EntryPointTypesEnum.SIDE_PANEL]: ConversationContext;
[EntryPointTypesEnum.COMPOSER_TOOLBAR]: MessageComposerContext;
}
export declare type ContextOf<T extends keyof ContextMap> = ContextMap[T];
export type ContextOf<T extends keyof ContextMap> = ContextMap[T];
export {};

@@ -8,4 +8,4 @@ import { ApplicationConversationId, ApplicationDraftId } from './idTypesV2';

import { ApplicationTopic } from './topicTypesV2';
export declare type ApplicationConversationType = 'email' | 'whatsapp' | 'frontChat' | 'internal' | 'phoneCall' | 'tweet' | 'twitterDm' | 'sms' | 'googlePlay' | 'intercom' | 'smooch' | 'facebook' | 'custom';
export declare type ApplicationConversationStatus = 'open' | 'archived' | 'trashed' | 'spam';
export type ApplicationConversationType = 'email' | 'whatsapp' | 'frontChat' | 'internal' | 'phoneCall' | 'tweet' | 'twitterDm' | 'sms' | 'googlePlay' | 'intercom' | 'smooch' | 'facebook' | 'custom';
export type ApplicationConversationStatus = 'open' | 'archived' | 'trashed' | 'spam';
export interface ApplicationConversation {

@@ -12,0 +12,0 @@ /** Unique ID of the conversation. */

@@ -0,5 +1,6 @@

import { ApplicationAttachment } from './attachmentTypesV2';
import { ApplicationChannel } from './channelTypesV2';
import { ApplicationChannelId, ApplicationDraftId, ApplicationMessageId } from './idTypesV2';
import { ApplicationRecipient } from './recipientTypesV2';
export declare type ApplicationDraftReplyType = 'forward' | 'reply' | 'replyAll';
export type ApplicationDraftReplyType = 'forward' | 'reply' | 'replyAll';
export interface ApplicationDraftContent {

@@ -25,3 +26,7 @@ /** Content of the message. */

/** Content properties of the draft. */
content: ApplicationDraftContent;
content: ApplicationDraftContent & {
attachments: ReadonlyArray<ApplicationAttachment>;
};
/** Whether the draft is editable */
isEditable: boolean;
}

@@ -28,0 +33,0 @@ interface ApplicationDraftTemplateBase {

export declare enum EntryPointTypesEnum {
CONVERSATION_LINK_DROPDOWN = "CONVERSATION_LINK_DROPDOWN",
MESSAGE_MORE_DROPDOWN = "MESSAGE_MORE_DROPDOWN",
SIDE_PANEL = "SIDE_PANEL"
SIDE_PANEL = "SIDE_PANEL",
COMPOSER_TOOLBAR = "COMPOSER_TOOLBAR"
}

@@ -6,0 +7,0 @@ export interface EntryPointTemplate {

@@ -12,2 +12,3 @@ "use strict";

EntryPointTypesEnum["SIDE_PANEL"] = "SIDE_PANEL";
EntryPointTypesEnum["COMPOSER_TOOLBAR"] = "COMPOSER_TOOLBAR";
})(EntryPointTypesEnum = exports.EntryPointTypesEnum || (exports.EntryPointTypesEnum = {}));

@@ -14,2 +14,5 @@ import { Branded } from 'io-ts';

}
interface ApplicationCannedAnswerIdBrand {
readonly publicIdCannedAnswer: unique symbol;
}
interface ApplicationCardIdBrand {

@@ -60,17 +63,20 @@ readonly publicIdCard: unique symbol;

}
export declare type ApplicationResourceIdBrand = ApplicationActivityIdBrand & ApplicationAttachmentIdBrand & ApplicationCalendarEventIdBrand & ApplicationCalendarEventVersionIdBrand & ApplicationCardIdBrand & ApplicationCardGroupIdBrand & ApplicationChannelIdBrand & ApplicationCircleIdBrand & ApplicationCommentIdBrand & ApplicationConversationIdBrand & ApplicationCustomFieldIdBrand & ApplicationDraftIdBrand & ApplicationInboxIdBrand & ApplicationMessageIdBrand & ApplicationRuleIdBrand & ApplicationTagIdBrand & ApplicationTeamIdBrand & ApplicationTeammateIdBrand & ApplicationTopicIdBrand;
export declare type ApplicationAttachmentId = Branded<string, ApplicationAttachmentIdBrand>;
export declare type ApplicationChannelId = Branded<string, ApplicationChannelIdBrand>;
export declare type ApplicationContactId = Branded<string, ApplicationCardIdBrand>;
export declare type ApplicationContactGroupId = Branded<string, ApplicationCardGroupIdBrand>;
export declare type ApplicationCommentId = Branded<string, ApplicationCommentIdBrand>;
export declare type ApplicationConversationId = Branded<string, ApplicationConversationIdBrand>;
export declare type ApplicationCustomFieldId = Branded<string, ApplicationCustomFieldIdBrand>;
export declare type ApplicationDraftId = Branded<string, ApplicationDraftIdBrand>;
export declare type ApplicationInboxId = Branded<string, ApplicationInboxIdBrand>;
export declare type ApplicationMessageId = Branded<string, ApplicationMessageIdBrand>;
export declare type ApplicationTagId = Branded<string, ApplicationTagIdBrand>;
export declare type ApplicationTeamId = Branded<string, ApplicationTeamIdBrand>;
export declare type ApplicationTeammateId = Branded<string, ApplicationTeammateIdBrand>;
export declare type ApplicationTopicId = Branded<string, ApplicationTopicIdBrand>;
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 ApplicationAttachmentId = Branded<string, ApplicationAttachmentIdBrand>;
export type ApplicationCannedAnswerId = Branded<string, ApplicationCannedAnswerIdBrand>;
export type ApplicationChannelId = Branded<string, ApplicationChannelIdBrand>;
export type ApplicationContactId = Branded<string, ApplicationCardIdBrand>;
export type ApplicationContactGroupId = Branded<string, ApplicationCardGroupIdBrand>;
export type ApplicationCommentId = Branded<string, ApplicationCommentIdBrand>;
export type ApplicationConversationId = Branded<string, ApplicationConversationIdBrand>;
export type ApplicationCustomFieldId = Branded<string, ApplicationCustomFieldIdBrand>;
export type ApplicationDraftId = Branded<string, ApplicationDraftIdBrand>;
export type ApplicationInboxId = Branded<string, ApplicationInboxIdBrand>;
export type ApplicationMessageId = Branded<string, ApplicationMessageIdBrand>;
export type ApplicationTagId = Branded<string, ApplicationTagIdBrand>;
export type ApplicationTeamId = Branded<string, ApplicationTeamIdBrand>;
export type ApplicationTeammateId = Branded<string, ApplicationTeammateIdBrand>;
export type ApplicationTopicId = Branded<string, ApplicationTopicIdBrand>;
export declare const applicationCompanyId = "company";
export type ApplicationCompanyId = typeof applicationCompanyId;
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.applicationCompanyId = void 0;
exports.applicationCompanyId = 'company';

@@ -11,2 +11,2 @@ import { ApplicationInboxId, ApplicationTeamId, ApplicationTeammateId } from './idTypesV2';

}
export declare type ApplicationInboxList = ApplicationPaginatedResults<ApplicationInbox>;
export type ApplicationInboxList = ApplicationPaginatedResults<ApplicationInbox>;

@@ -5,3 +5,3 @@ import { ApplicationAttachment } from './attachmentTypesV2';

import { ApplicationRecipient } from './recipientTypesV2';
export declare type ApplicationMessageStatus = 'inbound' | 'outbound';
export type ApplicationMessageStatus = 'inbound' | 'outbound';
export interface ApplicationMessage extends ApplicationMessageRecipients {

@@ -39,2 +39,2 @@ /** Unique ID of the message. */

}
export declare type ApplicationMessageList = ApplicationPaginatedResults<ApplicationMessage>;
export type ApplicationMessageList = ApplicationPaginatedResults<ApplicationMessage>;

@@ -5,3 +5,3 @@ import { Branded } from 'io-ts';

}
export declare type ApplicationPaginationToken = Branded<string, ApplicationPaginationTokenBrand>;
export type ApplicationPaginationToken = Branded<string, ApplicationPaginationTokenBrand>;
export interface ApplicationPaginatedResults<T> {

@@ -8,0 +8,0 @@ /** List of results. */

@@ -13,2 +13,2 @@ import { ApplicationContact } from './contactTypesV2';

}
export declare type ApplicationRecipientList = ApplicationPaginatedResults<ApplicationRecipient>;
export type ApplicationRecipientList = ApplicationPaginatedResults<ApplicationRecipient>;

@@ -1,2 +0,2 @@

import { ApplicationTagId, ApplicationTeamId, ApplicationTeammateId } from './idTypesV2';
import { ApplicationCompanyId, ApplicationTagId, ApplicationTeamId, ApplicationTeammateId } from './idTypesV2';
import { ApplicationPaginatedResults } from './paginationTypesV2';

@@ -7,3 +7,3 @@ export interface ApplicationTag {

/** ID of the team or teammate the tag belongs to. */
ownerId: ApplicationTeamId | ApplicationTeammateId;
ownerId: ApplicationTeamId | ApplicationTeammateId | ApplicationCompanyId;
/** Name of the tag. */

@@ -14,2 +14,2 @@ name: string;

}
export declare type ApplicationTagList = ApplicationPaginatedResults<ApplicationTag>;
export type ApplicationTagList = ApplicationPaginatedResults<ApplicationTag>;

@@ -13,2 +13,2 @@ import { ApplicationTeammateId } from './idTypesV2';

}
export declare type ApplicationTeammateList = ApplicationPaginatedResults<ApplicationTeammate>;
export type ApplicationTeammateList = ApplicationPaginatedResults<ApplicationTeammate>;
{
"name": "@frontapp/ui-bridge",
"version": "2.0.0-beta10",
"version": "2.0.0-beta11",
"description": "Helpers and TypeScript definitions for the Front SDK bridge",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc