@zapier/zapier-sdk 0.12.0 → 0.13.0

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +336 -128
  3. package/dist/api/schemas.d.ts +10 -865
  4. package/dist/api/schemas.d.ts.map +1 -1
  5. package/dist/api/schemas.js +0 -6
  6. package/dist/index.cjs +108 -58
  7. package/dist/index.d.mts +88 -434
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.mjs +108 -58
  11. package/dist/plugins/apps/index.d.ts +2 -2
  12. package/dist/plugins/apps/index.d.ts.map +1 -1
  13. package/dist/plugins/apps/index.js +21 -0
  14. package/dist/plugins/apps/schemas.d.ts +51 -0
  15. package/dist/plugins/apps/schemas.d.ts.map +1 -0
  16. package/dist/plugins/apps/schemas.js +13 -0
  17. package/dist/plugins/findFirstAuthentication/schemas.js +1 -1
  18. package/dist/plugins/findUniqueAuthentication/schemas.js +1 -1
  19. package/dist/plugins/getApp/schemas.js +1 -1
  20. package/dist/plugins/getAuthentication/index.test.js +1 -1
  21. package/dist/plugins/listActions/index.d.ts +1 -0
  22. package/dist/plugins/listActions/index.d.ts.map +1 -1
  23. package/dist/plugins/listActions/schemas.d.ts +3 -0
  24. package/dist/plugins/listActions/schemas.d.ts.map +1 -1
  25. package/dist/plugins/listActions/schemas.js +2 -1
  26. package/dist/plugins/listApps/index.d.ts +1 -0
  27. package/dist/plugins/listApps/index.d.ts.map +1 -1
  28. package/dist/plugins/listApps/schemas.d.ts +3 -0
  29. package/dist/plugins/listApps/schemas.d.ts.map +1 -1
  30. package/dist/plugins/listApps/schemas.js +1 -0
  31. package/dist/plugins/listAuthentications/index.d.ts +1 -0
  32. package/dist/plugins/listAuthentications/index.d.ts.map +1 -1
  33. package/dist/plugins/listAuthentications/schemas.d.ts +3 -0
  34. package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -1
  35. package/dist/plugins/listAuthentications/schemas.js +2 -1
  36. package/dist/plugins/listInputFieldChoices/index.d.ts +1 -0
  37. package/dist/plugins/listInputFieldChoices/index.d.ts.map +1 -1
  38. package/dist/plugins/listInputFieldChoices/schemas.d.ts +3 -0
  39. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +1 -1
  40. package/dist/plugins/listInputFieldChoices/schemas.js +1 -0
  41. package/dist/plugins/listInputFields/index.d.ts +1 -0
  42. package/dist/plugins/listInputFields/index.d.ts.map +1 -1
  43. package/dist/plugins/listInputFields/schemas.d.ts +3 -0
  44. package/dist/plugins/listInputFields/schemas.d.ts.map +1 -1
  45. package/dist/plugins/listInputFields/schemas.js +1 -0
  46. package/dist/plugins/registry/index.d.ts.map +1 -1
  47. package/dist/plugins/registry/index.js +12 -1
  48. package/dist/plugins/runAction/index.d.ts +1 -0
  49. package/dist/plugins/runAction/index.d.ts.map +1 -1
  50. package/dist/plugins/runAction/schemas.d.ts +3 -0
  51. package/dist/plugins/runAction/schemas.d.ts.map +1 -1
  52. package/dist/plugins/runAction/schemas.js +1 -0
  53. package/dist/schemas/Action.d.ts +4 -206
  54. package/dist/schemas/Action.d.ts.map +1 -1
  55. package/dist/schemas/Action.js +3 -2
  56. package/dist/schemas/App.d.ts.map +1 -1
  57. package/dist/schemas/App.js +1 -0
  58. package/dist/schemas/Auth.d.ts +10 -10
  59. package/dist/schemas/Auth.js +1 -1
  60. package/dist/types/properties.d.ts.map +1 -1
  61. package/dist/types/properties.js +4 -1
  62. package/dist/types/sdk.d.ts +1 -1
  63. package/dist/types/sdk.d.ts.map +1 -1
  64. package/dist/utils/domain-utils.d.ts +2 -2
  65. package/dist/utils/domain-utils.d.ts.map +1 -1
  66. package/dist/utils/domain-utils.js +19 -8
  67. package/dist/utils/schema-utils.d.ts +1 -0
  68. package/dist/utils/schema-utils.d.ts.map +1 -1
  69. package/package.json +1 -1
  70. package/src/api/schemas.ts +0 -6
  71. package/src/index.ts +1 -0
  72. package/src/plugins/apps/index.ts +28 -7
  73. package/src/plugins/apps/{types.ts → schemas.ts} +27 -9
  74. package/src/plugins/findFirstAuthentication/schemas.ts +1 -1
  75. package/src/plugins/findUniqueAuthentication/schemas.ts +1 -1
  76. package/src/plugins/getApp/schemas.ts +1 -1
  77. package/src/plugins/getAuthentication/index.test.ts +1 -1
  78. package/src/plugins/listActions/index.ts +1 -0
  79. package/src/plugins/listActions/schemas.ts +2 -1
  80. package/src/plugins/listApps/index.ts +4 -1
  81. package/src/plugins/listApps/schemas.ts +1 -0
  82. package/src/plugins/listAuthentications/index.ts +1 -0
  83. package/src/plugins/listAuthentications/schemas.ts +2 -1
  84. package/src/plugins/listInputFieldChoices/index.ts +1 -0
  85. package/src/plugins/listInputFieldChoices/schemas.ts +1 -0
  86. package/src/plugins/listInputFields/index.ts +1 -0
  87. package/src/plugins/listInputFields/schemas.ts +1 -0
  88. package/src/plugins/registry/index.ts +12 -1
  89. package/src/plugins/runAction/index.ts +4 -1
  90. package/src/plugins/runAction/schemas.ts +1 -0
  91. package/src/schemas/Action.ts +3 -2
  92. package/src/schemas/App.ts +1 -0
  93. package/src/schemas/Auth.ts +1 -1
  94. package/src/types/properties.ts +4 -1
  95. package/src/types/sdk.ts +1 -1
  96. package/src/utils/domain-utils.ts +22 -9
  97. package/src/utils/schema-utils.ts +1 -0
  98. package/tsconfig.tsbuildinfo +1 -1
  99. package/dist/plugins/apps/types.d.ts +0 -30
  100. package/dist/plugins/apps/types.d.ts.map +0 -1
  101. package/dist/plugins/apps/types.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/api/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;EAGzC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAsCnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC"}
@@ -76,16 +76,10 @@ export const ActionSchema = z.object({
76
76
  ]),
77
77
  key: z.string(),
78
78
  name: z.string(),
79
- noun: z.string().optional(),
80
79
  description: z.string(),
81
- description_html: z.string().optional(),
82
80
  is_important: z.boolean().optional(),
83
81
  is_hidden: z.boolean().optional(),
84
- needs: z.array(NeedSchema).optional(),
85
- meta: z.string().optional(),
86
82
  selected_api: z.string().optional(),
87
- links: ActionLinksSchema.optional(),
88
- permissions: ActionPermissionsSchema.optional(),
89
83
  });
90
84
  export const ChoiceSchema = z.object({
91
85
  value: z.union([z.string(), z.number()]),
package/dist/index.cjs CHANGED
@@ -37,7 +37,7 @@ var MAX_PAGE_LIMIT = 1e4;
37
37
 
38
38
  // src/types/properties.ts
39
39
  var AppKeyPropertySchema = withPositional(
40
- zod.z.string().min(1).describe("App key (e.g., 'SlackCLIAPI')")
40
+ zod.z.string().min(1).describe("App key (e.g., 'SlackCLIAPI' or slug like 'github')")
41
41
  );
42
42
  var ActionTypePropertySchema = zod.z.enum([
43
43
  "read",
@@ -192,6 +192,40 @@ HTTP Status: ${error.statusCode}`;
192
192
  }
193
193
  return message;
194
194
  }
195
+ var ActionExecutionInputSchema = zod.z.object({
196
+ inputs: zod.z.record(zod.z.unknown()).optional(),
197
+ authenticationId: zod.z.number().optional()
198
+ }).describe(
199
+ "Execute an action with the given inputs for the bound app, as an alternative to runAction"
200
+ );
201
+ var AppFactoryInputSchema = zod.z.object({
202
+ authenticationId: zod.z.number()
203
+ }).describe("Bind an authentication ID to an app");
204
+ function getStringProperty(obj, key) {
205
+ if (typeof obj === "object" && obj !== null && key in obj) {
206
+ const value = obj[key];
207
+ return typeof value === "string" ? value : void 0;
208
+ }
209
+ return void 0;
210
+ }
211
+ function formatActionResult(item) {
212
+ const obj = typeof item === "object" && item !== null ? item : {};
213
+ const title = getStringProperty(obj, "title") || getStringProperty(obj, "name") || getStringProperty(obj, "label") || getStringProperty(obj, "subject") || "Action Result";
214
+ return {
215
+ title,
216
+ id: getStringProperty(obj, "id"),
217
+ key: getStringProperty(obj, "key"),
218
+ description: getStringProperty(obj, "description"),
219
+ data: item,
220
+ // Let formatJsonOutput handle the JSON rendering
221
+ details: []
222
+ // Not used when data is provided
223
+ };
224
+ }
225
+ var ActionResultItemSchema = withFormatter(
226
+ zod.z.unknown().describe("Action execution result"),
227
+ { format: formatActionResult }
228
+ );
195
229
 
196
230
  // src/plugins/apps/index.ts
197
231
  function createActionFunction(appKey, actionType, actionKey, options, pinnedAuthId) {
@@ -295,7 +329,26 @@ function createAppsProxy(options) {
295
329
  }
296
330
  var appsPlugin = ({ sdk }) => {
297
331
  return {
298
- apps: createAppsProxy({ sdk })
332
+ apps: createAppsProxy({ sdk }),
333
+ context: {
334
+ meta: {
335
+ "apps.{appKey}": {
336
+ categories: ["app"],
337
+ packages: ["sdk"],
338
+ type: "function",
339
+ inputSchema: AppFactoryInputSchema,
340
+ returnType: "AppProxy"
341
+ },
342
+ "apps.{appKey}.{actionType}.{actionKey}": {
343
+ categories: ["app"],
344
+ packages: ["sdk"],
345
+ type: "list",
346
+ inputSchema: ActionExecutionInputSchema,
347
+ itemType: "ActionResult",
348
+ outputSchema: ActionResultItemSchema
349
+ }
350
+ }
351
+ }
299
352
  };
300
353
  };
301
354
  var FetchUrlSchema = zod.z.union([zod.z.string(), zod.z.instanceof(URL)]).describe("The URL to fetch");
@@ -641,7 +694,8 @@ var ListAppsSchema = zod.z.object({
641
694
  ),
642
695
  search: zod.z.string().optional().describe("Search for apps by name"),
643
696
  pageSize: zod.z.number().min(1).optional().describe("Number of apps per page"),
644
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages")
697
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
698
+ cursor: zod.z.string().optional().describe("Cursor to start from")
645
699
  }).describe("List all available apps with optional filtering");
646
700
  var NeedChoicesSchema = zod.z.object({
647
701
  key: zod.z.string().optional(),
@@ -690,10 +744,10 @@ var NeedSchema = zod.z.object({
690
744
  ]).optional(),
691
745
  list: zod.z.boolean().optional()
692
746
  });
693
- var ActionLinksSchema = zod.z.object({
747
+ zod.z.object({
694
748
  action_url: zod.z.string().optional()
695
749
  });
696
- var ActionPermissionsSchema = zod.z.object({
750
+ zod.z.object({
697
751
  can_use: zod.z.boolean().optional()
698
752
  });
699
753
  var ActionSchema = zod.z.object({
@@ -710,16 +764,10 @@ var ActionSchema = zod.z.object({
710
764
  ]),
711
765
  key: zod.z.string(),
712
766
  name: zod.z.string(),
713
- noun: zod.z.string().optional(),
714
767
  description: zod.z.string(),
715
- description_html: zod.z.string().optional(),
716
768
  is_important: zod.z.boolean().optional(),
717
769
  is_hidden: zod.z.boolean().optional(),
718
- needs: zod.z.array(NeedSchema).optional(),
719
- meta: zod.z.string().optional(),
720
- selected_api: zod.z.string().optional(),
721
- links: ActionLinksSchema.optional(),
722
- permissions: ActionPermissionsSchema.optional()
770
+ selected_api: zod.z.string().optional()
723
771
  });
724
772
  var ChoiceSchema = zod.z.object({
725
773
  value: zod.z.union([zod.z.string(), zod.z.number()]),
@@ -1049,6 +1097,7 @@ var AppItemSchema = withFormatter(
1049
1097
  return {
1050
1098
  title: item.title,
1051
1099
  key: item.key,
1100
+ keys: [item.slug, item.key].filter(Boolean),
1052
1101
  description: item.description,
1053
1102
  details: []
1054
1103
  };
@@ -1083,7 +1132,7 @@ function normalizeImplementationMetaToAppItem(implementationMeta) {
1083
1132
  }
1084
1133
  function normalizeAuthenticationItem(auth, options = {}) {
1085
1134
  let appKey = options.app_key;
1086
- let version = options.version;
1135
+ let appVersion = options.app_version;
1087
1136
  if (auth.selected_api) {
1088
1137
  const [extractedAppKey, extractedVersion] = splitVersionedKey(
1089
1138
  auth.selected_api
@@ -1091,8 +1140,8 @@ function normalizeAuthenticationItem(auth, options = {}) {
1091
1140
  if (!appKey) {
1092
1141
  appKey = extractedAppKey;
1093
1142
  }
1094
- if (!version) {
1095
- version = extractedVersion;
1143
+ if (!appVersion) {
1144
+ appVersion = extractedVersion;
1096
1145
  }
1097
1146
  }
1098
1147
  const {
@@ -1113,17 +1162,25 @@ function normalizeAuthenticationItem(auth, options = {}) {
1113
1162
  // Map marked_stale_at to expired_at
1114
1163
  app_key: appKey,
1115
1164
  // App key from implementations endpoint or parsed from selected_api
1116
- version,
1165
+ app_version: appVersion,
1117
1166
  // Version from selected_api or provided
1118
1167
  user_id: userId
1119
1168
  // Map customuser_id to user_id
1120
1169
  };
1121
1170
  }
1122
1171
  function normalizeActionItem(action) {
1123
- const { name, type, selected_api: appKey, ...restOfAction } = action;
1172
+ const { name, type, selected_api: selectedApi } = action;
1173
+ const [appKey, appVersion] = selectedApi ? splitVersionedKey(selectedApi) : ["", void 0];
1124
1174
  return {
1125
- ...restOfAction,
1126
- app_key: appKey || "",
1175
+ // Only include the fields we want - explicitly list them
1176
+ id: action.id,
1177
+ key: action.key,
1178
+ description: action.description,
1179
+ is_important: action.is_important,
1180
+ is_hidden: action.is_hidden,
1181
+ // Transformed fields
1182
+ app_key: appKey,
1183
+ app_version: appVersion,
1127
1184
  action_type: type,
1128
1185
  title: name,
1129
1186
  // Map name to title
@@ -1263,18 +1320,21 @@ var listAppsPlugin = ({ context }) => {
1263
1320
  };
1264
1321
  var ListActionsSchema = zod.z.object({
1265
1322
  appKey: AppKeyPropertySchema.describe(
1266
- "App key of actions to list (e.g., 'SlackCLIAPI')"
1323
+ "App key of actions to list (e.g., 'SlackCLIAPI' or slug like 'github')"
1267
1324
  ),
1268
1325
  actionType: ActionTypePropertySchema.optional().describe(
1269
1326
  "Filter actions by type"
1270
1327
  ),
1271
1328
  pageSize: zod.z.number().min(1).optional().describe("Number of actions per page"),
1272
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages")
1329
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
1330
+ cursor: zod.z.string().optional().describe("Cursor to start from")
1273
1331
  }).describe("List all actions for a specific app");
1274
1332
  var ActionItemSchema = withFormatter(
1275
- ActionSchema.omit({ type: true, name: true }).extend({
1333
+ ActionSchema.omit({ type: true, name: true, selected_api: true }).extend({
1276
1334
  app_key: zod.z.string(),
1277
- // Mapped from selected_api
1335
+ // App key without version (extracted from selected_api)
1336
+ app_version: zod.z.string().optional(),
1337
+ // Version extracted from selected_api
1278
1338
  action_type: ActionSchema.shape.type,
1279
1339
  // Mapped from original 'type' field
1280
1340
  title: zod.z.string(),
@@ -1586,7 +1646,8 @@ var ListInputFieldsSchema = zod.z.object({
1586
1646
  "Current input values that may affect available fields"
1587
1647
  ),
1588
1648
  pageSize: zod.z.number().min(1).optional().describe("Number of input fields per page"),
1589
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages")
1649
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
1650
+ cursor: zod.z.string().optional().describe("Cursor to start from")
1590
1651
  }).describe("Get the input fields required for a specific action");
1591
1652
  var BaseFieldItemSchema = zod.z.object({
1592
1653
  type: zod.z.string(),
@@ -1873,7 +1934,7 @@ var listInputFieldsPlugin = ({ context }) => {
1873
1934
  };
1874
1935
  var ListAuthenticationsSchema = zod.z.object({
1875
1936
  appKey: AppKeyPropertySchema.optional().describe(
1876
- "App key of authentications to list (e.g., 'SlackCLIAPI')"
1937
+ "App key of authentications to list (e.g., 'SlackCLIAPI' or slug like 'github')"
1877
1938
  ),
1878
1939
  authenticationIds: zod.z.array(zod.z.string()).optional().describe("List of authentication IDs to filter by"),
1879
1940
  search: zod.z.string().optional().describe("Search term to filter authentications by title"),
@@ -1883,7 +1944,8 @@ var ListAuthenticationsSchema = zod.z.object({
1883
1944
  "Filter by owner, 'me' for your own authentications or a specific user ID"
1884
1945
  ),
1885
1946
  pageSize: zod.z.number().min(1).optional().describe("Number of authentications per page"),
1886
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages")
1947
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
1948
+ cursor: zod.z.string().optional().describe("Cursor to start from")
1887
1949
  }).describe("List available authentications with optional filtering");
1888
1950
  var AuthenticationItemSchema = withFormatter(
1889
1951
  AuthenticationSchema.omit({ selected_api: true, customuser_id: true }).extend(
@@ -1896,7 +1958,7 @@ var AuthenticationItemSchema = withFormatter(
1896
1958
  // Mapped from marked_stale_at
1897
1959
  app_key: zod.z.string().optional(),
1898
1960
  // App key from implementations endpoint
1899
- version: zod.z.string().optional(),
1961
+ app_version: zod.z.string().optional(),
1900
1962
  // Version extracted from implementation_id
1901
1963
  user_id: zod.z.number().optional()
1902
1964
  }
@@ -2017,7 +2079,7 @@ var listAuthenticationsPlugin = ({ context }) => {
2017
2079
  };
2018
2080
  var GetAppSchema = zod.z.object({
2019
2081
  appKey: AppKeyPropertySchema.describe(
2020
- "App key of app to fetch (e.g., 'SlackCLIAPI')"
2082
+ "App key of app to fetch (e.g., 'SlackCLIAPI' or slug like 'github')"
2021
2083
  )
2022
2084
  }).describe("Get detailed information about a specific app");
2023
2085
 
@@ -2156,7 +2218,7 @@ var getAuthenticationPlugin = ({ context }) => {
2156
2218
  };
2157
2219
  var FindFirstAuthenticationSchema = zod.z.object({
2158
2220
  appKey: AppKeyPropertySchema.optional().describe(
2159
- "App key of authentication to find (e.g., 'SlackCLIAPI')"
2221
+ "App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github')"
2160
2222
  ),
2161
2223
  search: zod.z.string().optional().describe("Search term to filter authentications by title"),
2162
2224
  title: zod.z.string().optional().describe("Filter authentications by exact title match"),
@@ -2201,7 +2263,7 @@ var findFirstAuthenticationPlugin = ({ sdk }) => {
2201
2263
  };
2202
2264
  var FindUniqueAuthenticationSchema = zod.z.object({
2203
2265
  appKey: AppKeyPropertySchema.optional().describe(
2204
- "App key of authentication to find (e.g., 'SlackCLIAPI')"
2266
+ "App key of authentication to find (e.g., 'SlackCLIAPI' or slug like 'github')"
2205
2267
  ),
2206
2268
  search: zod.z.string().optional().describe("Search term to filter authentications by title"),
2207
2269
  title: zod.z.string().optional().describe("Filter authentications by exact title match"),
@@ -2259,33 +2321,9 @@ var RunActionSchema = zod.z.object({
2259
2321
  "Input parameters for the action"
2260
2322
  ),
2261
2323
  pageSize: zod.z.number().min(1).optional().describe("Number of results per page"),
2262
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages")
2324
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
2325
+ cursor: zod.z.string().optional().describe("Cursor to start from")
2263
2326
  }).describe("Execute an action with the given inputs");
2264
- function getStringProperty(obj, key) {
2265
- if (typeof obj === "object" && obj !== null && key in obj) {
2266
- const value = obj[key];
2267
- return typeof value === "string" ? value : void 0;
2268
- }
2269
- return void 0;
2270
- }
2271
- function formatActionResult(item) {
2272
- const obj = typeof item === "object" && item !== null ? item : {};
2273
- const title = getStringProperty(obj, "title") || getStringProperty(obj, "name") || getStringProperty(obj, "label") || getStringProperty(obj, "subject") || "Action Result";
2274
- return {
2275
- title,
2276
- id: getStringProperty(obj, "id"),
2277
- key: getStringProperty(obj, "key"),
2278
- description: getStringProperty(obj, "description"),
2279
- data: item,
2280
- // Let formatJsonOutput handle the JSON rendering
2281
- details: []
2282
- // Not used when data is provided
2283
- };
2284
- }
2285
- var ActionResultItemSchema = withFormatter(
2286
- zod.z.unknown().describe("Action execution result"),
2287
- { format: formatActionResult }
2288
- );
2289
2327
 
2290
2328
  // src/plugins/runAction/index.ts
2291
2329
  async function executeAction(actionOptions) {
@@ -3517,7 +3555,18 @@ var registryPlugin = ({ sdk, context }) => {
3517
3555
  title: "Other"
3518
3556
  }
3519
3557
  };
3520
- const functions = metaKeys.filter((key) => typeof sdk[key] === "function").map((key) => {
3558
+ const functions = metaKeys.filter((key) => {
3559
+ const property = sdk[key];
3560
+ if (typeof property === "function") {
3561
+ return true;
3562
+ }
3563
+ const [rootKey] = key.split(".");
3564
+ const rootProperty = sdk[rootKey];
3565
+ if (typeof rootProperty === "object" && rootProperty !== null) {
3566
+ return true;
3567
+ }
3568
+ return false;
3569
+ }).map((key) => {
3521
3570
  const meta = context.meta[key];
3522
3571
  return {
3523
3572
  name: key,
@@ -3612,7 +3661,8 @@ var ListInputFieldChoicesSchema = zod.z.object({
3612
3661
  page: zod.z.number().int().min(0).optional().describe("Page number for paginated results"),
3613
3662
  // Pagination options (SDK-level)
3614
3663
  pageSize: zod.z.number().min(1).optional().describe("Number of choices per page"),
3615
- maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages")
3664
+ maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
3665
+ cursor: zod.z.string().optional().describe("Cursor to start from")
3616
3666
  }).describe("Get the available choices for a dynamic dropdown input field");
3617
3667
 
3618
3668
  // src/plugins/listInputFieldChoices/index.ts