@frontapp/ui-bridge
Advanced tools
Comparing version 2.0.0-beta2 to 2.0.0-beta3
@@ -11,2 +11,12 @@ # Front UI Bridge | ||
## 2.0.0-beta3 | ||
### Added | ||
- `removeLink` method for a context type. | ||
- `authentication` property to the context data model. It represents the authentication of the current teammate with the application. | ||
- `authenticate` method to trigger the authentication flow configured for the application. | ||
- `deauthenticate` method to clear the authentication credentials saved in Front's server. | ||
- `relayHttp` method to relay an HTTP request using the teammate's authentication. | ||
## 2.0.0-beta2 | ||
@@ -13,0 +23,0 @@ |
@@ -7,3 +7,3 @@ import { ApplicationCancelToken } from './asyncTypesV2'; | ||
import { HttpRequest, HttpResponse } from './httpTypesV2'; | ||
import { ApplicationDraftId, ApplicationInboxId, ApplicationTagId, ApplicationTeammateId } from './idTypesV2'; | ||
import { ApplicationDraftId, ApplicationInboxId, ApplicationTagId, ApplicationTeammateId, ApplicationTopicId } from './idTypesV2'; | ||
import { ApplicationInboxList } from './inboxTypesV2'; | ||
@@ -13,2 +13,3 @@ import { ApplicationLink } from './linkTypesV2'; | ||
import { ApplicationPaginationToken } from './paginationTypesV2'; | ||
import { HttpRelayRequest } from './relayTypesV2'; | ||
import { ApplicationTagList } from './tagTypesV2'; | ||
@@ -18,2 +19,5 @@ import { ApplicationTeammate, ApplicationTeammateList } from './teammateTypesV2'; | ||
import { Widget, WidgetTemplate } from './widgetTypesV2'; | ||
export declare enum ApplicationAuthenticationStatusesEnum { | ||
AUTHORIZED = "authorized" | ||
} | ||
export interface ApplicationContextBase { | ||
@@ -32,2 +36,6 @@ /** Unique ID for this context. */ | ||
preferences: object; | ||
/** Current teammate's authentication. */ | ||
authentication: { | ||
status?: ApplicationAuthenticationStatusesEnum; | ||
}; | ||
/** Current teammate. */ | ||
@@ -56,2 +64,17 @@ teammate: ApplicationTeammate; | ||
/** | ||
* Relay an HTTP request. | ||
* @param request Definition of the HTTP request to run. | ||
* @param cancelToken Cancel the HTTP request. | ||
* @returns HTTP response. | ||
*/ | ||
relayHttp(request: HttpRelayRequest, cancelToken?: ApplicationCancelToken): Promise<HttpResponse>; | ||
/** | ||
* Start the authentication flow according to the configured security scheme. | ||
*/ | ||
authenticate(cancelToken?: ApplicationCancelToken): Promise<void>; | ||
/** | ||
* Delete the credentials stored for the current teammate. | ||
*/ | ||
deauthenticate(cancelToken?: ApplicationCancelToken): Promise<void>; | ||
/** | ||
* Open a browser window. | ||
@@ -170,2 +193,8 @@ * @param url URL to navigate to. | ||
untag(tagIds: ReadonlyArray<ApplicationTagId>, cancelToken?: ApplicationCancelToken): Promise<void>; | ||
/** | ||
* Remove the specified link from the conversation. | ||
* @param linkId Link ID to remove. | ||
* @param cancelToken Cancel the request. | ||
*/ | ||
removeLink(linkId: ApplicationTopicId, cancelToken?: ApplicationCancelToken): Promise<void>; | ||
} | ||
@@ -172,0 +201,0 @@ export interface SingleConversationContext extends ExistingConversationBaseContext { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ApplicationAuthenticationStatusesEnum = void 0; | ||
var entryPointTypesV2_1 = require("./entryPointTypesV2"); | ||
var ApplicationAuthenticationStatusesEnum; | ||
(function (ApplicationAuthenticationStatusesEnum) { | ||
ApplicationAuthenticationStatusesEnum["AUTHORIZED"] = "authorized"; | ||
})(ApplicationAuthenticationStatusesEnum = exports.ApplicationAuthenticationStatusesEnum || (exports.ApplicationAuthenticationStatusesEnum = {})); |
@@ -19,4 +19,6 @@ export declare enum HttpVerbsEnum { | ||
status: number; | ||
/** Headers of the response */ | ||
headers: Record<string, string | undefined>; | ||
/** Body of the response. */ | ||
body: unknown; | ||
} |
{ | ||
"name": "@frontapp/ui-bridge", | ||
"version": "2.0.0-beta2", | ||
"version": "2.0.0-beta3", | ||
"description": "Helpers and TypeScript definitions for the Front SDK bridge", | ||
@@ -19,2 +19,4 @@ "author": { | ||
"clean": "rm -rf ./dist", | ||
"deploy:dry-run": "npm publish --access public --dry-run", | ||
"deploy": "npm publish --access public", | ||
"prepare": "npm run clean && npm run build" | ||
@@ -29,2 +31,2 @@ }, | ||
} | ||
} | ||
} |
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
43297
45
926