@frontapp/ui-bridge
Advanced tools
Comparing version 2.0.0-beta6 to 2.0.0-beta7
@@ -35,4 +35,5 @@ "use strict"; | ||
var cancel = function (message) { | ||
if (!resolve) | ||
if (!resolve) { | ||
throw new Error('Promise initialization failed'); | ||
} | ||
wasResolveCalled = true; | ||
@@ -42,14 +43,15 @@ resolve({ message: message || 'The process was cancelled.' }); | ||
var throwIfRequested = function () { | ||
if (wasResolveCalled) | ||
if (wasResolveCalled) { | ||
throw new ApplicationCancelError(); | ||
} | ||
}; | ||
var token = { | ||
promise: promise, | ||
throwIfRequested: throwIfRequested | ||
throwIfRequested: throwIfRequested, | ||
}; | ||
return { | ||
cancel: cancel, | ||
token: token | ||
token: token, | ||
}; | ||
} | ||
exports.buildApplicationCancelTokenSource = buildApplicationCancelTokenSource; |
@@ -8,3 +8,3 @@ import { ApplicationCancelToken } from './asyncTypesV2'; | ||
import { HttpRequest, HttpResponse } from './httpTypesV2'; | ||
import { ApplicationAttachmentId, ApplicationCommentId, ApplicationDraftId, ApplicationInboxId, ApplicationMessageId, ApplicationTagId, ApplicationTeammateId, ApplicationTopicId } from './idTypesV2'; | ||
import { ApplicationAttachmentId, ApplicationCommentId, ApplicationConversationId, ApplicationDraftId, ApplicationInboxId, ApplicationMessageId, ApplicationTagId, ApplicationTeammateId, ApplicationTopicId } from './idTypesV2'; | ||
import { ApplicationInboxList } from './inboxTypesV2'; | ||
@@ -92,2 +92,8 @@ import { ApplicationLink } from './linkTypesV2'; | ||
/** | ||
* Open a conversation in a popup. | ||
* @param conversationId Conversation to open. | ||
* @param cancelToken Cancel the request. | ||
*/ | ||
openConversationInPopup(conversationId: ApplicationConversationId, cancelToken?: ApplicationCancelToken): Promise<void>; | ||
/** | ||
* Perform a search in Front for the current teammate. | ||
@@ -94,0 +100,0 @@ * @param query Search query. |
@@ -56,3 +56,6 @@ import { Branded } from 'io-ts'; | ||
} | ||
export declare type ApplicationResourceIdBrand = ApplicationActivityIdBrand & ApplicationAttachmentIdBrand & ApplicationCalendarEventIdBrand & ApplicationCalendarEventVersionIdBrand & ApplicationCardIdBrand & ApplicationCardGroupIdBrand & ApplicationChannelIdBrand & ApplicationCommentIdBrand & ApplicationConversationIdBrand & ApplicationCustomFieldIdBrand & ApplicationDraftIdBrand & ApplicationInboxIdBrand & ApplicationMessageIdBrand & ApplicationRuleIdBrand & ApplicationTagIdBrand & ApplicationTeamIdBrand & ApplicationTeammateIdBrand & ApplicationTopicIdBrand; | ||
interface ApplicationCircleIdBrand { | ||
readonly publicIdCircle: 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>; | ||
@@ -59,0 +62,0 @@ export declare type ApplicationChannelId = Branded<string, ApplicationChannelIdBrand>; |
{ | ||
"name": "@frontapp/ui-bridge", | ||
"version": "2.0.0-beta6", | ||
"version": "2.0.0-beta7", | ||
"description": "Helpers and TypeScript definitions for the Front SDK bridge", | ||
@@ -30,2 +30,2 @@ "author": { | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45538
1004