@useparagon/connect 2.2.8-experimental.3 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/ConnectSDK.d.ts +18 -2
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/entities/connectCredential.interface.d.ts +7 -0
- package/dist/src/index.js +1 -1
- package/dist/src/types/connect.d.ts +12 -1
- package/dist/src/types/sdk.d.ts +23 -3
- package/dist/src/utils/generic.d.ts +6 -0
- package/package.json +1 -1
|
@@ -14,7 +14,9 @@ export interface SDKConnectCredentialConfig {
|
|
|
14
14
|
workflowSettings?: IntegrationWorkflowStateMap;
|
|
15
15
|
configMeta?: ConnectCredentialConfigMeta;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* The `externalId` of the active credential **config** (i.e. `IConnectCredentialConfig.externalId`).
|
|
18
|
+
* This is a config-level identifier set via `createConfiguration({ externalId })` and is unrelated
|
|
19
|
+
* to the credential-level `externalId` set at install time via `InstallOptions.externalId`.
|
|
18
20
|
*/
|
|
19
21
|
externalId?: string;
|
|
20
22
|
/**
|
|
@@ -337,4 +339,13 @@ export type StartOptions = {
|
|
|
337
339
|
allowMultipleCredentials?: boolean;
|
|
338
340
|
overrideRedirectUrl?: string;
|
|
339
341
|
selectedCredentialId?: string;
|
|
342
|
+
/**
|
|
343
|
+
* A customer-supplied external identifier to associate with the credential being installed.
|
|
344
|
+
* Distinct from the config-level `externalId` in `createConfiguration({ externalId })`.
|
|
345
|
+
* Forwarded to the backend in `installOptions` and stored on the resulting credential.
|
|
346
|
+
*
|
|
347
|
+
* Cannot be combined with `selectedCredentialId` — `externalId` labels a new credential;
|
|
348
|
+
* `selectedCredentialId` targets an existing credential for re-authentication.
|
|
349
|
+
*/
|
|
350
|
+
externalId?: string;
|
|
340
351
|
};
|
package/dist/src/types/sdk.d.ts
CHANGED
|
@@ -107,6 +107,12 @@ export type DynamicFieldMappingConfig = {
|
|
|
107
107
|
};
|
|
108
108
|
export interface IConnectSDK {
|
|
109
109
|
authenticate(projectId: string, token: string, options?: AuthenticateOptions): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Displays the Paragon Connect modal for the given integration.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} action - The integration type to connect (e.g. `"gmail"`).
|
|
114
|
+
* @param {ConnectParams} options - Optional connect configuration (extends `InstallOptions`).
|
|
115
|
+
*/
|
|
110
116
|
connect(action: string, options: ConnectParams): void;
|
|
111
117
|
getVersion(): string;
|
|
112
118
|
getUser(): ConnectUser;
|
|
@@ -134,9 +140,13 @@ export interface IConnectSDK {
|
|
|
134
140
|
*/
|
|
135
141
|
_loadCustomDropdownOptions(key: string, cursor?: string | undefined, search?: string | undefined): LoadCustomDropdownOptionsResult;
|
|
136
142
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
143
|
+
* Installs an integration without the need to click on enable button from portal.
|
|
144
|
+
*
|
|
145
|
+
* @param {string} name - The integration type to install (e.g. `"gmail"`).
|
|
146
|
+
* @param {InstallIntegrationOptions} options - Optional install configuration.
|
|
147
|
+
* @param {boolean} options.showPortalAfterInstall - If `true`, shows the portal with configuration
|
|
148
|
+
* view after installation completes.
|
|
149
|
+
* @returns {Promise<void | IntegrationInstallEvent>}
|
|
140
150
|
*/
|
|
141
151
|
installIntegration(name: string, options?: InstallIntegrationOptions): Promise<void | IntegrationInstallEvent>;
|
|
142
152
|
/**
|
|
@@ -304,6 +314,16 @@ export type InstallOptions = {
|
|
|
304
314
|
* used to override redirect url passed in getAuthUrl instead of our passport url
|
|
305
315
|
*/
|
|
306
316
|
overrideRedirectUrl?: string;
|
|
317
|
+
/**
|
|
318
|
+
* A customer-supplied external identifier to associate with the credential being installed.
|
|
319
|
+
* Distinct from the config-level `externalId` in `createConfiguration({ externalId })`.
|
|
320
|
+
* Forwarded to the backend in `installOptions` and stored on the resulting credential,
|
|
321
|
+
* accessible via `paragon.getUser().integrations[x].allCredentials[i].externalId`.
|
|
322
|
+
*
|
|
323
|
+
* Cannot be combined with `selectedCredentialId` — `externalId` labels a new credential;
|
|
324
|
+
* `selectedCredentialId` targets an existing credential for re-authentication.
|
|
325
|
+
*/
|
|
326
|
+
externalId?: string;
|
|
307
327
|
};
|
|
308
328
|
export type CredentialConfigOptions = {
|
|
309
329
|
selectedCredentialId?: string;
|
|
@@ -28,6 +28,12 @@ export declare function generateMatrix<T extends Record<string, any>>(input: {
|
|
|
28
28
|
[k in keyof T]: T[k][];
|
|
29
29
|
}, limit?: number): T[];
|
|
30
30
|
export declare function sleep(milliseconds: number): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Normalizes a plain object for comparison by sorting keys (key-order independent).
|
|
33
|
+
* Only handles objects; does not accept or recurse into arrays.
|
|
34
|
+
*/
|
|
35
|
+
export declare function normalizeForMetaCompare(value: Record<string, unknown>): Record<string, unknown>;
|
|
36
|
+
export declare function areObjectsEqual(a: Record<string, unknown>, b: Record<string, unknown>): boolean;
|
|
31
37
|
export declare const uuidPattern: RegExp;
|
|
32
38
|
export declare function isUUID(value: string | unknown): boolean;
|
|
33
39
|
/**
|