@integry/sdk 4.8.75 → 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.
@@ -10,6 +10,18 @@ declare enum RenderModes {
10
10
  MODAL = "MODAL",
11
11
  INLINE = "INLINE"
12
12
  }
13
+ type CustomFunctionSelection = {
14
+ id: number | string;
15
+ isActivity?: boolean;
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ preloadedValue?: any;
18
+ };
19
+ type CustomFunctionSelectionHandler = {
20
+ (id: number | string,
21
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
+ preloadedValue?: any, selectActivity?: boolean): void | Promise<void>;
23
+ (selection: CustomFunctionSelection): void | Promise<void>;
24
+ };
13
25
  type IntegrySDKEventPayloads = {
14
26
  ready: {
15
27
  isReady: boolean;
@@ -274,13 +286,20 @@ type RenderFlowStepOptions = {
274
286
  containerId: string;
275
287
  }) => void;
276
288
  functionsListContainerId?: string;
277
- onCustomFunctionSelect?: (handler: (functionId: number | string) => void | Promise<void>) => void;
289
+ /**
290
+ * Pass a handler to receive selections from custom function/activity pickers.
291
+ * Clients can call the handler with `(id, preloadedValue?, true)` for activities,
292
+ * or with `{ id, isActivity: true, preloadedValue }`.
293
+ */
294
+ onCustomFunctionSelect?: (handler: CustomFunctionSelectionHandler) => void;
278
295
  enableExpandedTextarea?: boolean;
279
296
  requireAuthentication?: boolean;
280
297
  };
281
298
  type RenderFunctionFormOptions = {
282
299
  containerId: string;
283
- functionName: string;
300
+ functionName: string | null;
301
+ activity_id?: number | string | null;
302
+ is_activity?: boolean;
284
303
  onChange?: (val: any) => void;
285
304
  value?: any;
286
305
  tagsTree?: any;
@@ -686,7 +705,11 @@ interface FunctionFieldType {
686
705
  containerId: string;
687
706
  }) => void;
688
707
  functionsListContainerId?: string;
689
- onCustomFunctionSelect?: (handler: (functionId: number | string) => void | Promise<void>) => void;
708
+ /**
709
+ * Provide a handler that can receive function or activity selections.
710
+ * Call it as `(id, preloadedValue?, true)` or `{ id, isActivity: true, preloadedValue }`.
711
+ */
712
+ onCustomFunctionSelect?: (handler: CustomFunctionSelectionHandler) => void;
690
713
  }
691
714
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
692
715
  type EventSet = Record<string, (...args: any[]) => void>;