@useparagon/connect 3.1.0-experimental-25327.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.
@@ -203,7 +203,16 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
203
203
  }): Promise<IntegrationInstallEvent | undefined>;
204
204
  _oauthErrorCallback(errorMessage: string | object, event?: MessageEvent): Promise<void>;
205
205
  customDropdownOptionsLoaders: Record<string, (cursor?: string | undefined, search?: string | undefined) => LoadCustomDropdownOptionsResult>;
206
+ customDropdownOptionResolvers: Record<string, (value: string | number) => Promise<CustomDropdownField | null>>;
206
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>;
207
216
  setDataSources(config: SetDataSourcesConfig): void;
208
217
  private processDropdownSources;
209
218
  private processMapObjectFieldSources;
@@ -423,6 +432,16 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {
423
432
  nestedData: DynamicDefaultInput[];
424
433
  nextPageCursor: string | null;
425
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>;
426
445
  getDataSourceOptions(integrationName: string, action: string): Promise<import("./types").DataSource | undefined>;
427
446
  getSourcesForInput(integrationName: string, input: SerializedConnectInput): InputSources | null;
428
447
  /**