@useparagon/connect 3.1.0-experimental-25416.1 → 4.0.0-experimental.1
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 +21 -0
- package/dist/src/ConnectSDK.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/types/connect.d.ts +11 -0
- package/dist/src/types/sdk.d.ts +16 -0
- package/package.json +1 -1
package/dist/src/ConnectSDK.d.ts
CHANGED
|
@@ -176,6 +176,8 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
176
176
|
* see PARA-1505
|
|
177
177
|
*/
|
|
178
178
|
private getAccountName;
|
|
179
|
+
private getAccountTypeLabel;
|
|
180
|
+
private hasAccountType;
|
|
179
181
|
private validateAccountType;
|
|
180
182
|
/**
|
|
181
183
|
* Set dynamic field mapping loaders for the given action
|
|
@@ -201,7 +203,16 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
201
203
|
}): Promise<IntegrationInstallEvent | undefined>;
|
|
202
204
|
_oauthErrorCallback(errorMessage: string | object, event?: MessageEvent): Promise<void>;
|
|
203
205
|
customDropdownOptionsLoaders: Record<string, (cursor?: string | undefined, search?: string | undefined) => LoadCustomDropdownOptionsResult>;
|
|
206
|
+
customDropdownOptionResolvers: Record<string, (value: string | number) => Promise<CustomDropdownField | null>>;
|
|
204
207
|
_loadCustomDropdownOptions(key: string, cursor?: string | undefined, search?: string | undefined): LoadCustomDropdownOptionsResult;
|
|
208
|
+
/**
|
|
209
|
+
* resolve a stored custom dropdown value to its option for label display;
|
|
210
|
+
* falls back to a value-as-search lookup when no resolver is registered
|
|
211
|
+
* @param key dropdown key
|
|
212
|
+
* @param value stored value to resolve
|
|
213
|
+
* @returns the matching option, or null when it cannot be resolved
|
|
214
|
+
*/
|
|
215
|
+
_resolveCustomDropdownOption(key: string, value: string | number): Promise<CustomDropdownField | null>;
|
|
205
216
|
setDataSources(config: SetDataSourcesConfig): void;
|
|
206
217
|
private processDropdownSources;
|
|
207
218
|
private processMapObjectFieldSources;
|
|
@@ -421,6 +432,16 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
|
|
|
421
432
|
nestedData: DynamicDefaultInput[];
|
|
422
433
|
nextPageCursor: string | null;
|
|
423
434
|
}>;
|
|
435
|
+
/**
|
|
436
|
+
* Resolve a stored custom dropdown value to its option for label display.
|
|
437
|
+
* Uses the `resolveOption` registered via `setDataSources`, falling back
|
|
438
|
+
* to a value-as-search lookup through `loadOptions` when no resolver is registered.
|
|
439
|
+
*/
|
|
440
|
+
resolveFieldOption({ integration, action, value, }: {
|
|
441
|
+
integration: string;
|
|
442
|
+
action: string;
|
|
443
|
+
value: string | number;
|
|
444
|
+
}): Promise<CustomDropdownField | null>;
|
|
424
445
|
getDataSourceOptions(integrationName: string, action: string): Promise<import("./types").DataSource | undefined>;
|
|
425
446
|
getSourcesForInput(integrationName: string, input: SerializedConnectInput): InputSources | null;
|
|
426
447
|
/**
|