@integry/sdk 4.9.23 → 4.9.25

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/README.md CHANGED
@@ -46,3 +46,12 @@ activity fields for `type`, `activity_type`, `endpoint_id`, and `session_id`. Fo
46
46
  }
47
47
  }
48
48
  ```
49
+
50
+ ## Headless function-to-tool conversion
51
+
52
+ Use `getFunctionTools` when you already have function details (for example from `getFunctionDetails`) and only want a tool payload without rendering UI.
53
+
54
+ ```ts
55
+ const tool = sdk.getFunctionTools(functionDetails);
56
+ ```
57
+
@@ -318,9 +318,33 @@ type RenderFlowStepOptions = {
318
318
  enableExpandedTextarea?: boolean;
319
319
  requireAuthentication?: boolean;
320
320
  };
321
+ type FunctionTool = {
322
+ json_schema: {
323
+ type: "function";
324
+ function: any;
325
+ };
326
+ meta: {
327
+ id?: number | string;
328
+ version?: string | null;
329
+ connected_account_id: string | number | null;
330
+ form_page_machine_name: string | null;
331
+ name?: string;
332
+ title?: string;
333
+ app_name?: string;
334
+ app_icon_url?: string;
335
+ ai_assisted_fields: string[];
336
+ type?: string;
337
+ activity_type?: string;
338
+ endpoint_id?: number | string;
339
+ session_id?: string;
340
+ };
341
+ default_arguments: Record<string, any>;
342
+ parameters_visible_to_user: Record<string, any>;
343
+ };
321
344
  type RenderFunctionFormOptions = {
322
345
  containerId: string;
323
346
  functionName: string | null;
347
+ version?: string | null;
324
348
  activity_id?: number | string | null;
325
349
  /**
326
350
  * When true, the saved json_schema.meta mirrors the activity details meta shape.
@@ -338,6 +362,7 @@ type RenderFunctionFormOptions = {
338
362
  enableExpandedTextarea?: boolean;
339
363
  variables?: Record<string, any>;
340
364
  queryParams?: Record<string, any>;
365
+ hideOptionalFields?: boolean;
341
366
  };
342
367
  type RenderMappingMenuOptions = {
343
368
  containerId: string;
@@ -380,7 +405,7 @@ type RenderAppAuthrozationsOptions = {
380
405
  showAppIcon?: boolean;
381
406
  allowWorkspaceConnectedAccounts?: boolean;
382
407
  authName?: string;
383
- bot_icon_url?: string;
408
+ botIconUrl?: string;
384
409
  enableAutoRefresh?: boolean;
385
410
  };
386
411
  type TemplateType = Template;
@@ -923,6 +948,7 @@ declare class IntegryJS {
923
948
  }) => void;
924
949
  renderFunctionForm: (options?: RenderFunctionFormOptions) => void;
925
950
  renderFunctionField: (containerId: string, functionFieldProps: FunctionFieldType) => void;
951
+ getFunctionTools: (functionStructure: any) => FunctionTool;
926
952
  renderAppAuthorizations: (options?: RenderAppAuthrozationsOptions) => Promise<void>;
927
953
  renderFlowStep: (options?: RenderFlowStepOptions) => void;
928
954
  renderMappingMenu: (options?: RenderMappingMenuOptions) => void;