@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.
@@ -14,7 +14,9 @@ export interface SDKConnectCredentialConfig {
14
14
  workflowSettings?: IntegrationWorkflowStateMap;
15
15
  configMeta?: ConnectCredentialConfigMeta;
16
16
  /**
17
- * this refer `externalId` of credential config containing shared/workflow settings
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
  };
@@ -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
- * installs an integration without the need to click on enable button from portal
138
- * Install Options:
139
- * `{showPortalAfterInstall: boolean}` decides wether to show portal with configuration view after the installation is completed
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useparagon/connect",
3
- "version": "2.2.8-experimental.3",
3
+ "version": "2.2.8",
4
4
  "description": "Embed integrations into your app with the Paragon SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",