@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.
@@ -75,6 +75,18 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
75
75
  * @param validateIsEnabled boolean
76
76
  */
77
77
  validateAction(action: string): void;
78
+ /**
79
+ * Validates that the provided `externalId` and `selectedCredentialId` install options are
80
+ * mutually exclusive, and that the `externalId` is not already in use for the given integration.
81
+ *
82
+ * `selectedCredentialId` accepts either a Paragon credential UUID, a plain `externalId` string,
83
+ * or an `ext:<value>` prefixed string — all resolve to a credential by its customer-supplied `externalId`.
84
+ * The `ext:` prefix is optional and only required when the externalId value itself looks like a UUID.
85
+ *
86
+ * Throws a descriptive error in either case so the developer gets actionable feedback before
87
+ * the OAuth popup opens.
88
+ */
89
+ private validateExternalIdOptions;
78
90
  /**
79
91
  * checks if the integration is installed.
80
92
  * Assumes that the user is authenticated
@@ -251,8 +263,12 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
251
263
  private getIntegrationForWorkflow;
252
264
  private updateLocalState;
253
265
  /**
254
- * gets the user data from api `/sdk/me`
255
- * userMeta header is passed to support user metadata upsert based on authentication options
266
+ * Sends user metadata to the API via PATCH /sdk/me (request body supports non-ASCII).
267
+ */
268
+ private patchUserMetadata;
269
+ /**
270
+ * Gets the user data from api `/sdk/me`.
271
+ * User metadata is set via PATCH after this succeeds when provided in authenticate (see updateLocalState).
256
272
  */
257
273
  private fetchUserData;
258
274
  /**