@integry/sdk 4.8.76 → 4.8.77

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.
@@ -11,6 +11,18 @@ declare enum RenderModes {
11
11
  MODAL = "MODAL",
12
12
  INLINE = "INLINE"
13
13
  }
14
+ type CustomFunctionSelection = {
15
+ id: number | string;
16
+ isActivity?: boolean;
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ preloadedValue?: any;
19
+ };
20
+ type CustomFunctionSelectionHandler = {
21
+ (id: number | string,
22
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
+ preloadedValue?: any, selectActivity?: boolean): void | Promise<void>;
24
+ (selection: CustomFunctionSelection): void | Promise<void>;
25
+ };
14
26
  type IntegrySDKEventPayloads = {
15
27
  ready: {
16
28
  isReady: boolean;
@@ -55,7 +67,13 @@ type IntegrySDKEventPayloads = {
55
67
  callbackUrlArray: {
56
68
  templateStepId: number;
57
69
  activityId: number;
58
- callbackUrl: string | null;
70
+ callbackUrl: string
71
+ /**
72
+ * Integry JS SDK
73
+ */
74
+ | /**
75
+ * Integry JS SDK
76
+ */ null;
59
77
  }[];
60
78
  authorizations: {
61
79
  authorizationId: number;
@@ -275,7 +293,12 @@ type RenderFlowStepOptions = {
275
293
  containerId: string;
276
294
  }) => void;
277
295
  functionsListContainerId?: string;
278
- onCustomFunctionSelect?: (handler: (functionId: number | string) => void | Promise<void>) => void;
296
+ /**
297
+ * Pass a handler to receive selections from custom function/activity pickers.
298
+ * Clients can call the handler with `(id, preloadedValue?, true)` for activities,
299
+ * or with `{ id, isActivity: true, preloadedValue }`.
300
+ */
301
+ onCustomFunctionSelect?: (handler: CustomFunctionSelectionHandler) => void;
279
302
  enableExpandedTextarea?: boolean;
280
303
  requireAuthentication?: boolean;
281
304
  };
@@ -689,7 +712,11 @@ interface FunctionFieldType {
689
712
  containerId: string;
690
713
  }) => void;
691
714
  functionsListContainerId?: string;
692
- onCustomFunctionSelect?: (handler: (functionId: number | string) => void | Promise<void>) => void;
715
+ /**
716
+ * Provide a handler that can receive function or activity selections.
717
+ * Call it as `(id, preloadedValue?, true)` or `{ id, isActivity: true, preloadedValue }`.
718
+ */
719
+ onCustomFunctionSelect?: (handler: CustomFunctionSelectionHandler) => void;
693
720
  }
694
721
  /**
695
722
  *