@useparagon/connect 2.5.1 → 2.6.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.
@@ -201,7 +201,16 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
201
201
  }): Promise<IntegrationInstallEvent | undefined>;
202
202
  _oauthErrorCallback(errorMessage: string | object, event?: MessageEvent): Promise<void>;
203
203
  customDropdownOptionsLoaders: Record<string, (cursor?: string | undefined, search?: string | undefined) => LoadCustomDropdownOptionsResult>;
204
+ customDropdownOptionResolvers: Record<string, (value: string | number) => Promise<CustomDropdownField | null>>;
204
205
  _loadCustomDropdownOptions(key: string, cursor?: string | undefined, search?: string | undefined): LoadCustomDropdownOptionsResult;
206
+ /**
207
+ * resolve a stored custom dropdown value to its option for label display;
208
+ * falls back to a value-as-search lookup when no resolver is registered
209
+ * @param key dropdown key
210
+ * @param value stored value to resolve
211
+ * @returns the matching option, or null when it cannot be resolved
212
+ */
213
+ _resolveCustomDropdownOption(key: string, value: string | number): Promise<CustomDropdownField | null>;
205
214
  setDataSources(config: SetDataSourcesConfig): void;
206
215
  private processDropdownSources;
207
216
  private processMapObjectFieldSources;
@@ -421,6 +430,16 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
421
430
  nestedData: DynamicDefaultInput[];
422
431
  nextPageCursor: string | null;
423
432
  }>;
433
+ /**
434
+ * Resolve a stored custom dropdown value to its option for label display.
435
+ * Uses the `resolveOption` registered via `setDataSources`, falling back
436
+ * to a value-as-search lookup through `loadOptions` when no resolver is registered.
437
+ */
438
+ resolveFieldOption({ integration, action, value, }: {
439
+ integration: string;
440
+ action: string;
441
+ value: string | number;
442
+ }): Promise<CustomDropdownField | null>;
424
443
  getDataSourceOptions(integrationName: string, action: string): Promise<import("./types").DataSource | undefined>;
425
444
  getSourcesForInput(integrationName: string, input: SerializedConnectInput): InputSources | null;
426
445
  /**