@zapier/zapier-sdk 0.64.0 → 0.67.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 (500) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +165 -6
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +2 -0
  5. package/dist/api/debug.d.ts.map +1 -1
  6. package/dist/api/debug.js +6 -4
  7. package/dist/api/polling.d.ts +2 -0
  8. package/dist/api/polling.d.ts.map +1 -1
  9. package/dist/api/polling.js +10 -2
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +8 -5
  12. package/dist/core-stack.d.ts +24 -0
  13. package/dist/core-stack.d.ts.map +1 -0
  14. package/dist/core-stack.js +32 -0
  15. package/dist/experimental.cjs +1803 -1332
  16. package/dist/experimental.d.mts +3508 -182
  17. package/dist/experimental.d.ts +3578 -252
  18. package/dist/experimental.d.ts.map +1 -1
  19. package/dist/experimental.js +120 -84
  20. package/dist/experimental.mjs +1789 -1331
  21. package/dist/formatters/action.d.ts +4 -0
  22. package/dist/formatters/action.d.ts.map +1 -0
  23. package/dist/formatters/action.js +18 -0
  24. package/dist/formatters/actionResult.d.ts +3 -0
  25. package/dist/formatters/actionResult.d.ts.map +1 -0
  26. package/dist/formatters/actionResult.js +25 -0
  27. package/dist/formatters/app.d.ts +4 -0
  28. package/dist/formatters/app.d.ts.map +1 -0
  29. package/dist/formatters/app.js +10 -0
  30. package/dist/formatters/clientCredentials.d.ts +5 -0
  31. package/dist/formatters/clientCredentials.d.ts.map +1 -0
  32. package/dist/formatters/clientCredentials.js +27 -0
  33. package/dist/formatters/connection.d.ts +4 -0
  34. package/dist/formatters/connection.d.ts.map +1 -0
  35. package/dist/formatters/connection.js +26 -0
  36. package/dist/formatters/field.d.ts +4 -0
  37. package/dist/formatters/field.d.ts.map +1 -0
  38. package/dist/formatters/field.js +51 -0
  39. package/dist/formatters/inputFieldChoice.d.ts +4 -0
  40. package/dist/formatters/inputFieldChoice.d.ts.map +1 -0
  41. package/dist/formatters/inputFieldChoice.js +16 -0
  42. package/dist/formatters/tableField.d.ts +4 -0
  43. package/dist/formatters/tableField.d.ts.map +1 -0
  44. package/dist/formatters/tableField.js +7 -0
  45. package/dist/formatters/tableRecord.d.ts +5 -3
  46. package/dist/formatters/tableRecord.d.ts.map +1 -1
  47. package/dist/formatters/tableRecord.js +4 -3
  48. package/dist/formatters/triggerInbox.d.ts +4 -0
  49. package/dist/formatters/triggerInbox.d.ts.map +1 -0
  50. package/dist/formatters/triggerInbox.js +31 -0
  51. package/dist/formatters/triggerMessage.d.ts +5 -0
  52. package/dist/formatters/triggerMessage.d.ts.map +1 -0
  53. package/dist/formatters/triggerMessage.js +34 -0
  54. package/dist/formatters/userProfile.d.ts +4 -0
  55. package/dist/formatters/userProfile.d.ts.map +1 -0
  56. package/dist/formatters/userProfile.js +19 -0
  57. package/dist/{index-Bfvj0KLi.d.mts → index-Dh0b5NAY.d.mts} +13058 -7731
  58. package/dist/{index-Bfvj0KLi.d.ts → index-Dh0b5NAY.d.ts} +13058 -7731
  59. package/dist/index.cjs +1745 -1464
  60. package/dist/index.d.mts +2 -2
  61. package/dist/index.d.ts +12 -9
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +21 -7
  64. package/dist/index.mjs +1731 -1463
  65. package/dist/plugins/api/index.d.ts +1 -1
  66. package/dist/plugins/api/index.js +1 -1
  67. package/dist/plugins/apps/index.d.ts +8 -5
  68. package/dist/plugins/apps/index.d.ts.map +1 -1
  69. package/dist/plugins/apps/index.js +1 -1
  70. package/dist/plugins/capabilities/index.d.ts +1 -1
  71. package/dist/plugins/capabilities/index.js +1 -1
  72. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +32 -2
  73. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -1
  74. package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +1 -1
  75. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +2 -2
  76. package/dist/plugins/codeSubstrate/createWorkflow/index.js +1 -1
  77. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +27 -2
  78. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
  79. package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +1 -1
  80. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +27 -2
  81. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
  82. package/dist/plugins/codeSubstrate/disableWorkflow/index.js +1 -1
  83. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +27 -2
  84. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
  85. package/dist/plugins/codeSubstrate/enableWorkflow/index.js +1 -1
  86. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +32 -2
  87. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +1 -1
  88. package/dist/plugins/codeSubstrate/getDurableRun/index.js +1 -1
  89. package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts +47 -0
  90. package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts.map +1 -0
  91. package/dist/plugins/codeSubstrate/getTriggerRun/index.js +23 -0
  92. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts +24 -0
  93. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts.map +1 -0
  94. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.js +30 -0
  95. package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +27 -2
  96. package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +1 -1
  97. package/dist/plugins/codeSubstrate/getWorkflow/index.js +1 -1
  98. package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +102 -0
  99. package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +1 -0
  100. package/dist/plugins/codeSubstrate/getWorkflowRun/index.js +25 -0
  101. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts +26 -0
  102. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts.map +1 -0
  103. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.js +43 -0
  104. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +51 -2
  105. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +1 -1
  106. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.js +1 -1
  107. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +3 -3
  108. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +1 -1
  109. package/dist/plugins/codeSubstrate/listDurableRuns/index.js +1 -1
  110. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +78 -0
  111. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +1 -0
  112. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.js +34 -0
  113. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts +65 -0
  114. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts.map +1 -0
  115. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.js +69 -0
  116. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +28 -3
  117. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +1 -1
  118. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.js +1 -1
  119. package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +3 -3
  120. package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +1 -1
  121. package/dist/plugins/codeSubstrate/listWorkflows/index.js +2 -3
  122. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +27 -2
  123. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -1
  124. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +1 -1
  125. package/dist/plugins/codeSubstrate/runDurable/index.d.ts +2 -2
  126. package/dist/plugins/codeSubstrate/runDurable/index.js +1 -1
  127. package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +73 -0
  128. package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +1 -0
  129. package/dist/plugins/codeSubstrate/triggerWorkflow/index.js +52 -0
  130. package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts +16 -0
  131. package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts.map +1 -0
  132. package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.js +31 -0
  133. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +27 -2
  134. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
  135. package/dist/plugins/codeSubstrate/updateWorkflow/index.js +1 -1
  136. package/dist/plugins/connections/index.d.ts +1 -1
  137. package/dist/plugins/connections/index.js +1 -1
  138. package/dist/plugins/createClientCredentials/index.d.ts +2 -2
  139. package/dist/plugins/createClientCredentials/index.d.ts.map +1 -1
  140. package/dist/plugins/createClientCredentials/index.js +4 -2
  141. package/dist/plugins/createClientCredentials/schemas.d.ts +1 -2
  142. package/dist/plugins/createClientCredentials/schemas.d.ts.map +1 -1
  143. package/dist/plugins/deleteClientCredentials/index.d.ts +24 -2
  144. package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
  145. package/dist/plugins/deleteClientCredentials/index.js +2 -2
  146. package/dist/plugins/deleteClientCredentials/schemas.d.ts +1 -2
  147. package/dist/plugins/deleteClientCredentials/schemas.d.ts.map +1 -1
  148. package/dist/plugins/deprecated/authentications.d.ts +144 -16
  149. package/dist/plugins/deprecated/authentications.d.ts.map +1 -1
  150. package/dist/plugins/deprecated/authentications.js +14 -5
  151. package/dist/plugins/deprecated/inputFields.d.ts +58 -23
  152. package/dist/plugins/deprecated/inputFields.d.ts.map +1 -1
  153. package/dist/plugins/deprecated/inputFields.js +15 -7
  154. package/dist/plugins/eventEmission/event-emission-hook.d.ts +10 -0
  155. package/dist/plugins/eventEmission/event-emission-hook.d.ts.map +1 -0
  156. package/dist/plugins/eventEmission/event-emission-hook.js +47 -0
  157. package/dist/plugins/eventEmission/index.d.ts +5 -3
  158. package/dist/plugins/eventEmission/index.d.ts.map +1 -1
  159. package/dist/plugins/eventEmission/index.js +16 -9
  160. package/dist/plugins/eventEmission/method-metadata.d.ts +16 -0
  161. package/dist/plugins/eventEmission/method-metadata.d.ts.map +1 -0
  162. package/dist/plugins/eventEmission/method-metadata.js +20 -0
  163. package/dist/plugins/eventEmission/transport.d.ts.map +1 -1
  164. package/dist/plugins/eventEmission/transport.js +2 -1
  165. package/dist/plugins/fetch/index.d.ts +11 -5
  166. package/dist/plugins/fetch/index.d.ts.map +1 -1
  167. package/dist/plugins/fetch/index.js +42 -32
  168. package/dist/plugins/fetch/schemas.d.ts +1 -1
  169. package/dist/plugins/findFirstConnection/index.d.ts +4 -4
  170. package/dist/plugins/findFirstConnection/index.d.ts.map +1 -1
  171. package/dist/plugins/findFirstConnection/index.js +4 -2
  172. package/dist/plugins/findFirstConnection/schemas.d.ts +2 -2
  173. package/dist/plugins/findUniqueConnection/index.d.ts +4 -4
  174. package/dist/plugins/findUniqueConnection/index.d.ts.map +1 -1
  175. package/dist/plugins/findUniqueConnection/index.js +4 -2
  176. package/dist/plugins/findUniqueConnection/schemas.d.ts +2 -2
  177. package/dist/plugins/getAction/index.d.ts +141 -4
  178. package/dist/plugins/getAction/index.d.ts.map +1 -1
  179. package/dist/plugins/getAction/index.js +5 -3
  180. package/dist/plugins/getAction/schemas.d.ts +6 -6
  181. package/dist/plugins/getActionInputFieldsSchema/index.d.ts +232 -3
  182. package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +1 -1
  183. package/dist/plugins/getActionInputFieldsSchema/index.js +3 -3
  184. package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts +6 -6
  185. package/dist/plugins/getApp/index.d.ts +4 -4
  186. package/dist/plugins/getApp/index.d.ts.map +1 -1
  187. package/dist/plugins/getApp/index.js +3 -1
  188. package/dist/plugins/getApp/schemas.d.ts +4 -4
  189. package/dist/plugins/getConnection/index.d.ts +125 -2
  190. package/dist/plugins/getConnection/index.d.ts.map +1 -1
  191. package/dist/plugins/getConnection/index.js +4 -2
  192. package/dist/plugins/getProfile/index.d.ts +2 -2
  193. package/dist/plugins/getProfile/index.d.ts.map +1 -1
  194. package/dist/plugins/getProfile/index.js +4 -2
  195. package/dist/plugins/getProfile/schemas.d.ts +1 -2
  196. package/dist/plugins/getProfile/schemas.d.ts.map +1 -1
  197. package/dist/plugins/listActionInputFieldChoices/index.d.ts +287 -4
  198. package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +1 -1
  199. package/dist/plugins/listActionInputFieldChoices/index.js +6 -4
  200. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts +8 -8
  201. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +1 -1
  202. package/dist/plugins/listActionInputFieldChoices/schemas.js +1 -22
  203. package/dist/plugins/listActionInputFields/index.d.ts +168 -5
  204. package/dist/plugins/listActionInputFields/index.d.ts.map +1 -1
  205. package/dist/plugins/listActionInputFields/index.js +7 -5
  206. package/dist/plugins/listActionInputFields/schemas.d.ts +6 -6
  207. package/dist/plugins/listActions/index.d.ts +140 -3
  208. package/dist/plugins/listActions/index.d.ts.map +1 -1
  209. package/dist/plugins/listActions/index.js +6 -4
  210. package/dist/plugins/listActions/schemas.d.ts +4 -4
  211. package/dist/plugins/listApps/index.d.ts +3 -3
  212. package/dist/plugins/listApps/index.d.ts.map +1 -1
  213. package/dist/plugins/listApps/index.js +6 -4
  214. package/dist/plugins/listClientCredentials/index.d.ts +3 -3
  215. package/dist/plugins/listClientCredentials/index.d.ts.map +1 -1
  216. package/dist/plugins/listClientCredentials/index.js +6 -4
  217. package/dist/plugins/listConnections/index.d.ts +140 -3
  218. package/dist/plugins/listConnections/index.d.ts.map +1 -1
  219. package/dist/plugins/listConnections/index.js +7 -5
  220. package/dist/plugins/listConnections/schemas.d.ts +2 -2
  221. package/dist/plugins/manifest/index.d.ts +1 -1
  222. package/dist/plugins/manifest/index.d.ts.map +1 -1
  223. package/dist/plugins/manifest/index.js +6 -4
  224. package/dist/plugins/registry/index.d.ts +1 -1
  225. package/dist/plugins/registry/index.js +1 -1
  226. package/dist/plugins/request/index.d.ts +8 -5
  227. package/dist/plugins/request/index.d.ts.map +1 -1
  228. package/dist/plugins/request/index.js +4 -3
  229. package/dist/plugins/request/schemas.d.ts +2 -2
  230. package/dist/plugins/runAction/index.d.ts +168 -5
  231. package/dist/plugins/runAction/index.d.ts.map +1 -1
  232. package/dist/plugins/runAction/index.js +9 -5
  233. package/dist/plugins/runAction/schemas.d.ts +6 -6
  234. package/dist/plugins/tables/createTable/index.d.ts +2 -2
  235. package/dist/plugins/tables/createTable/index.js +2 -2
  236. package/dist/plugins/tables/createTable/schemas.d.ts +1 -2
  237. package/dist/plugins/tables/createTable/schemas.d.ts.map +1 -1
  238. package/dist/plugins/tables/createTableFields/index.d.ts +34 -2
  239. package/dist/plugins/tables/createTableFields/index.d.ts.map +1 -1
  240. package/dist/plugins/tables/createTableFields/index.js +4 -2
  241. package/dist/plugins/tables/createTableFields/schemas.d.ts +3 -4
  242. package/dist/plugins/tables/createTableFields/schemas.d.ts.map +1 -1
  243. package/dist/plugins/tables/createTableRecords/index.d.ts +63 -2
  244. package/dist/plugins/tables/createTableRecords/index.d.ts.map +1 -1
  245. package/dist/plugins/tables/createTableRecords/index.js +2 -2
  246. package/dist/plugins/tables/createTableRecords/schemas.d.ts +3 -4
  247. package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +1 -1
  248. package/dist/plugins/tables/deleteTable/index.d.ts +34 -2
  249. package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
  250. package/dist/plugins/tables/deleteTable/index.js +2 -2
  251. package/dist/plugins/tables/deleteTable/schemas.d.ts +3 -4
  252. package/dist/plugins/tables/deleteTable/schemas.d.ts.map +1 -1
  253. package/dist/plugins/tables/deleteTableFields/index.d.ts +63 -2
  254. package/dist/plugins/tables/deleteTableFields/index.d.ts.map +1 -1
  255. package/dist/plugins/tables/deleteTableFields/index.js +2 -2
  256. package/dist/plugins/tables/deleteTableFields/schemas.d.ts +4 -5
  257. package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +1 -1
  258. package/dist/plugins/tables/deleteTableRecords/index.d.ts +84 -2
  259. package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +1 -1
  260. package/dist/plugins/tables/deleteTableRecords/index.js +2 -2
  261. package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +4 -5
  262. package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +1 -1
  263. package/dist/plugins/tables/getTable/index.d.ts +34 -2
  264. package/dist/plugins/tables/getTable/index.d.ts.map +1 -1
  265. package/dist/plugins/tables/getTable/index.js +2 -2
  266. package/dist/plugins/tables/getTable/schemas.d.ts +2 -2
  267. package/dist/plugins/tables/getTableRecord/index.d.ts +84 -2
  268. package/dist/plugins/tables/getTableRecord/index.d.ts.map +1 -1
  269. package/dist/plugins/tables/getTableRecord/index.js +2 -2
  270. package/dist/plugins/tables/getTableRecord/schemas.d.ts +6 -7
  271. package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +1 -1
  272. package/dist/plugins/tables/getTableRecord/schemas.js +1 -10
  273. package/dist/plugins/tables/listTableFields/index.d.ts +34 -2
  274. package/dist/plugins/tables/listTableFields/index.d.ts.map +1 -1
  275. package/dist/plugins/tables/listTableFields/index.js +4 -2
  276. package/dist/plugins/tables/listTableFields/schemas.d.ts +4 -5
  277. package/dist/plugins/tables/listTableFields/schemas.d.ts.map +1 -1
  278. package/dist/plugins/tables/listTableFields/schemas.js +1 -9
  279. package/dist/plugins/tables/listTableRecords/index.d.ts +65 -4
  280. package/dist/plugins/tables/listTableRecords/index.d.ts.map +1 -1
  281. package/dist/plugins/tables/listTableRecords/index.js +3 -3
  282. package/dist/plugins/tables/listTableRecords/schemas.d.ts +2 -2
  283. package/dist/plugins/tables/listTables/index.d.ts +3 -3
  284. package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
  285. package/dist/plugins/tables/listTables/index.js +4 -4
  286. package/dist/plugins/tables/updateTableRecords/index.d.ts +63 -2
  287. package/dist/plugins/tables/updateTableRecords/index.d.ts.map +1 -1
  288. package/dist/plugins/tables/updateTableRecords/index.js +2 -2
  289. package/dist/plugins/tables/updateTableRecords/schemas.d.ts +3 -4
  290. package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +1 -1
  291. package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +59 -2
  292. package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +1 -1
  293. package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +1 -1
  294. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +1 -1
  295. package/dist/plugins/triggers/createTriggerInbox/index.d.ts +231 -2
  296. package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +1 -1
  297. package/dist/plugins/triggers/createTriggerInbox/index.js +3 -1
  298. package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +3 -4
  299. package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +1 -1
  300. package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +33 -2
  301. package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +1 -1
  302. package/dist/plugins/triggers/deleteTriggerInbox/index.js +3 -1
  303. package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +2 -3
  304. package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +1 -1
  305. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +68 -6
  306. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +1 -1
  307. package/dist/plugins/triggers/drainTriggerInbox/index.js +1 -1
  308. package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +2 -2
  309. package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +231 -2
  310. package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +1 -1
  311. package/dist/plugins/triggers/ensureTriggerInbox/index.js +3 -1
  312. package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +3 -4
  313. package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +1 -1
  314. package/dist/plugins/triggers/getTriggerInbox/index.d.ts +33 -2
  315. package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +1 -1
  316. package/dist/plugins/triggers/getTriggerInbox/index.js +3 -1
  317. package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +2 -3
  318. package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +1 -1
  319. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +232 -3
  320. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +1 -1
  321. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +1 -1
  322. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +2 -2
  323. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +33 -2
  324. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +1 -1
  325. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +1 -1
  326. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +1 -1
  327. package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +34 -3
  328. package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +1 -1
  329. package/dist/plugins/triggers/listTriggerInboxMessages/index.js +5 -13
  330. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +1 -1
  331. package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +3 -3
  332. package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +1 -1
  333. package/dist/plugins/triggers/listTriggerInboxes/index.js +5 -14
  334. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +288 -5
  335. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +1 -1
  336. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +7 -5
  337. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +3 -3
  338. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +234 -5
  339. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +1 -1
  340. package/dist/plugins/triggers/listTriggerInputFields/index.js +6 -5
  341. package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +2 -2
  342. package/dist/plugins/triggers/listTriggers/index.d.ts +142 -5
  343. package/dist/plugins/triggers/listTriggers/index.d.ts.map +1 -1
  344. package/dist/plugins/triggers/listTriggers/index.js +6 -5
  345. package/dist/plugins/triggers/listTriggers/schemas.d.ts +1 -1
  346. package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +33 -2
  347. package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +1 -1
  348. package/dist/plugins/triggers/pauseTriggerInbox/index.js +3 -1
  349. package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +2 -3
  350. package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +1 -1
  351. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +59 -2
  352. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +1 -1
  353. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +1 -1
  354. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +1 -1
  355. package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +33 -2
  356. package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +1 -1
  357. package/dist/plugins/triggers/resumeTriggerInbox/index.js +3 -1
  358. package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +2 -3
  359. package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +1 -1
  360. package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +33 -2
  361. package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +1 -1
  362. package/dist/plugins/triggers/updateTriggerInbox/index.js +3 -1
  363. package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +2 -3
  364. package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +1 -1
  365. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +37 -6
  366. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +1 -1
  367. package/dist/plugins/triggers/watchTriggerInbox/index.js +1 -1
  368. package/dist/resolvers/actionKey.d.ts +3 -2
  369. package/dist/resolvers/actionKey.d.ts.map +1 -1
  370. package/dist/resolvers/actionType.d.ts +7 -2
  371. package/dist/resolvers/actionType.d.ts.map +1 -1
  372. package/dist/resolvers/actionType.js +3 -0
  373. package/dist/resolvers/appKey.d.ts +10 -5
  374. package/dist/resolvers/appKey.d.ts.map +1 -1
  375. package/dist/resolvers/appKey.js +3 -0
  376. package/dist/resolvers/clientCredentialsName.d.ts +1 -1
  377. package/dist/resolvers/clientCredentialsName.d.ts.map +1 -1
  378. package/dist/resolvers/clientId.d.ts +3 -2
  379. package/dist/resolvers/clientId.d.ts.map +1 -1
  380. package/dist/resolvers/clientId.js +1 -1
  381. package/dist/resolvers/connectionId.d.ts +5 -2
  382. package/dist/resolvers/connectionId.d.ts.map +1 -1
  383. package/dist/resolvers/connectionId.js +1 -1
  384. package/dist/resolvers/durableRunId.d.ts +3 -2
  385. package/dist/resolvers/durableRunId.d.ts.map +1 -1
  386. package/dist/resolvers/durableRunId.js +3 -2
  387. package/dist/resolvers/index.d.ts +1 -0
  388. package/dist/resolvers/index.d.ts.map +1 -1
  389. package/dist/resolvers/index.js +1 -0
  390. package/dist/resolvers/inputFieldKey.d.ts +3 -2
  391. package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
  392. package/dist/resolvers/inputFieldKey.js +1 -1
  393. package/dist/resolvers/tableFieldIds.d.ts +3 -2
  394. package/dist/resolvers/tableFieldIds.d.ts.map +1 -1
  395. package/dist/resolvers/tableFields.d.ts +2 -2
  396. package/dist/resolvers/tableFields.d.ts.map +1 -1
  397. package/dist/resolvers/tableFilters.d.ts +3 -2
  398. package/dist/resolvers/tableFilters.d.ts.map +1 -1
  399. package/dist/resolvers/tableId.d.ts +3 -2
  400. package/dist/resolvers/tableId.d.ts.map +1 -1
  401. package/dist/resolvers/tableId.js +1 -1
  402. package/dist/resolvers/tableName.d.ts +1 -1
  403. package/dist/resolvers/tableName.d.ts.map +1 -1
  404. package/dist/resolvers/tableRecordId.d.ts +4 -3
  405. package/dist/resolvers/tableRecordId.d.ts.map +1 -1
  406. package/dist/resolvers/tableRecords.d.ts +4 -3
  407. package/dist/resolvers/tableRecords.d.ts.map +1 -1
  408. package/dist/resolvers/tableSort.d.ts +3 -2
  409. package/dist/resolvers/tableSort.d.ts.map +1 -1
  410. package/dist/resolvers/triggerInbox.d.ts +3 -2
  411. package/dist/resolvers/triggerInbox.d.ts.map +1 -1
  412. package/dist/resolvers/triggerInbox.js +1 -1
  413. package/dist/resolvers/triggerMessages.d.ts +3 -2
  414. package/dist/resolvers/triggerMessages.d.ts.map +1 -1
  415. package/dist/resolvers/triggerMessages.js +2 -4
  416. package/dist/resolvers/workflowId.d.ts +3 -2
  417. package/dist/resolvers/workflowId.d.ts.map +1 -1
  418. package/dist/resolvers/workflowId.js +3 -2
  419. package/dist/resolvers/workflowRunId.d.ts +7 -0
  420. package/dist/resolvers/workflowRunId.d.ts.map +1 -0
  421. package/dist/resolvers/workflowRunId.js +20 -0
  422. package/dist/resolvers/workflowVersionId.d.ts +3 -2
  423. package/dist/resolvers/workflowVersionId.d.ts.map +1 -1
  424. package/dist/resolvers/workflowVersionId.js +7 -7
  425. package/dist/schemas/Action.d.ts.map +1 -1
  426. package/dist/schemas/Action.js +6 -30
  427. package/dist/schemas/App.d.ts +0 -1
  428. package/dist/schemas/App.d.ts.map +1 -1
  429. package/dist/schemas/App.js +2 -14
  430. package/dist/schemas/ClientCredentials.d.ts.map +1 -1
  431. package/dist/schemas/ClientCredentials.js +3 -41
  432. package/dist/schemas/Connection.d.ts.map +1 -1
  433. package/dist/schemas/Connection.js +2 -28
  434. package/dist/schemas/Field.d.ts.map +1 -1
  435. package/dist/schemas/Field.js +3 -70
  436. package/dist/schemas/Run.d.ts.map +1 -1
  437. package/dist/schemas/Run.js +3 -29
  438. package/dist/schemas/TriggerInbox.d.ts.map +1 -1
  439. package/dist/schemas/TriggerInbox.js +1 -33
  440. package/dist/schemas/TriggerMessage.d.ts.map +1 -1
  441. package/dist/schemas/TriggerMessage.js +2 -60
  442. package/dist/schemas/UserProfile.d.ts +0 -1
  443. package/dist/schemas/UserProfile.d.ts.map +1 -1
  444. package/dist/schemas/UserProfile.js +1 -20
  445. package/dist/sdk.d.ts +2761 -441
  446. package/dist/sdk.d.ts.map +1 -1
  447. package/dist/sdk.js +93 -129
  448. package/dist/types/errors.d.ts +44 -42
  449. package/dist/types/errors.d.ts.map +1 -1
  450. package/dist/types/errors.js +79 -33
  451. package/dist/types/functions.d.ts +1 -41
  452. package/dist/types/functions.d.ts.map +1 -1
  453. package/dist/types/properties.d.ts +7 -7
  454. package/dist/types/properties.js +1 -1
  455. package/dist/types/sdk.d.ts +1 -1
  456. package/dist/types/sdk.d.ts.map +1 -1
  457. package/dist/utils/domain-utils.js +1 -1
  458. package/dist/utils/logging.d.ts +1 -12
  459. package/dist/utils/logging.d.ts.map +1 -1
  460. package/dist/utils/logging.js +2 -20
  461. package/dist/utils/pagination.d.ts +38 -0
  462. package/dist/utils/pagination.d.ts.map +1 -0
  463. package/dist/utils/pagination.js +53 -0
  464. package/package.json +3 -2
  465. package/dist/registry.d.ts +0 -9
  466. package/dist/registry.d.ts.map +0 -1
  467. package/dist/registry.js +0 -103
  468. package/dist/types/meta.d.ts +0 -9
  469. package/dist/types/meta.d.ts.map +0 -1
  470. package/dist/types/meta.js +0 -3
  471. package/dist/types/plugin.d.ts +0 -84
  472. package/dist/types/plugin.d.ts.map +0 -1
  473. package/dist/types/plugin.js +0 -13
  474. package/dist/types/registry.d.ts +0 -54
  475. package/dist/types/registry.d.ts.map +0 -1
  476. package/dist/types/registry.js +0 -1
  477. package/dist/utils/function-utils.d.ts +0 -59
  478. package/dist/utils/function-utils.d.ts.map +0 -1
  479. package/dist/utils/function-utils.js +0 -245
  480. package/dist/utils/pagination-utils.d.ts +0 -73
  481. package/dist/utils/pagination-utils.d.ts.map +0 -1
  482. package/dist/utils/pagination-utils.js +0 -308
  483. package/dist/utils/plugin-utils.d.ts +0 -245
  484. package/dist/utils/plugin-utils.d.ts.map +0 -1
  485. package/dist/utils/plugin-utils.js +0 -234
  486. package/dist/utils/schema-utils.d.ts +0 -211
  487. package/dist/utils/schema-utils.d.ts.map +0 -1
  488. package/dist/utils/schema-utils.js +0 -72
  489. package/dist/utils/string-utils.d.ts +0 -40
  490. package/dist/utils/string-utils.d.ts.map +0 -1
  491. package/dist/utils/string-utils.js +0 -69
  492. package/dist/utils/telemetry-context.d.ts +0 -15
  493. package/dist/utils/telemetry-context.d.ts.map +0 -1
  494. package/dist/utils/telemetry-context.js +0 -48
  495. package/dist/utils/telemetry-utils.d.ts +0 -44
  496. package/dist/utils/telemetry-utils.d.ts.map +0 -1
  497. package/dist/utils/telemetry-utils.js +0 -60
  498. package/dist/utils/validation.d.ts +0 -4
  499. package/dist/utils/validation.d.ts.map +0 -1
  500. package/dist/utils/validation.js +0 -30
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
2
  export declare const AppKeyPropertySchema: z.ZodString & {
3
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
3
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
4
4
  };
5
5
  export declare const AppPropertySchema: z.ZodString & {
6
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
6
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
7
7
  };
8
8
  export declare const ActionTypePropertySchema: z.ZodEnum<{
9
9
  filter: "filter";
@@ -17,10 +17,10 @@ export declare const ActionTypePropertySchema: z.ZodEnum<{
17
17
  }>;
18
18
  export declare const ActionKeyPropertySchema: z.ZodString;
19
19
  export declare const ActionPropertySchema: z.ZodString & {
20
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
20
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
21
21
  };
22
22
  export declare const InputFieldPropertySchema: z.ZodString & {
23
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
23
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
24
24
  };
25
25
  export declare const ConnectionIdPropertySchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
26
26
  /** @deprecated Use ConnectionIdPropertySchema instead */
@@ -34,10 +34,10 @@ export declare const DebugPropertySchema: z.ZodDefault<z.ZodBoolean>;
34
34
  export declare const ParamsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
35
35
  export declare const ActionTimeoutMsPropertySchema: z.ZodOptional<z.ZodNumber>;
36
36
  export declare const TablePropertySchema: z.ZodString & {
37
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
37
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
38
38
  };
39
39
  export declare const RecordPropertySchema: z.ZodString & {
40
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
40
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
41
41
  };
42
42
  export declare const RecordsPropertySchema: z.ZodArray<z.ZodString>;
43
43
  export declare const FieldsPropertySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
@@ -45,7 +45,7 @@ export declare const AppsPropertySchema: z.ZodArray<z.ZodString>;
45
45
  export declare const TablesPropertySchema: z.ZodArray<z.ZodString>;
46
46
  export declare const ConnectionsPropertySchema: z.ZodArray<z.ZodString>;
47
47
  export declare const TriggerInboxPropertySchema: z.ZodString & {
48
- _def: z.core.$ZodStringDef & import("..").PositionalMetadata;
48
+ _def: z.core.$ZodStringDef & import("kitcore").PositionalMetadata;
49
49
  };
50
50
  export declare const TriggerInboxNamePropertySchema: z.ZodString;
51
51
  export declare const LeasePropertySchema: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { withPositional } from "../utils/schema-utils";
2
+ import { withPositional } from "kitcore";
3
3
  import { MAX_PAGE_LIMIT, DEFAULT_ACTION_TIMEOUT_MS } from "../constants";
4
4
  // Shared property definitions for common parameters across functions
5
5
  // These can be reused in function schemas without duplication
@@ -90,7 +90,7 @@ import type { GetConnectionSdkFunction } from "../plugins/getConnection/schemas"
90
90
  import type { FindFirstConnectionSdkFunction } from "../plugins/findFirstConnection/schemas";
91
91
  import type { FindUniqueConnectionSdkFunction } from "../plugins/findUniqueConnection/schemas";
92
92
  import type { RelayRequestSdkFunction } from "../plugins/request/schemas";
93
- export type { FunctionRegistryEntry, FunctionDeprecation } from "./registry";
93
+ export type { FunctionRegistryEntry, FunctionDeprecation } from "kitcore";
94
94
  export interface ZapierSdkFunctions extends ListActionInputFieldsSdkFunction, GetConnectionSdkFunction, FindFirstConnectionSdkFunction, FindUniqueConnectionSdkFunction, RelayRequestSdkFunction {
95
95
  }
96
96
  //# sourceMappingURL=sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmGb,MAAM;iBAAW,MAAM;;cAAvB,MAAM;iBAAW,MAAM;;;;;;;iBAiBzC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAG7E,MAAM,WAAW,kBACf,SAAQ,gCAAgC,EACtC,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB;CAAG"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/types/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmGb,MAAM;iBAAW,MAAM;;cAAvB,MAAM;iBAAW,MAAM;;;;;;;iBAiBzC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAG1E,MAAM,WAAW,kBACf,SAAQ,gCAAgC,EACtC,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB;CAAG"}
@@ -2,7 +2,7 @@
2
2
  * Domain utility functions for working with app identifiers and data normalization
3
3
  */
4
4
  import { ZapierValidationError, ZapierConfigurationError, } from "../types/errors";
5
- import { toSnakeCase } from "./string-utils";
5
+ import { toSnakeCase } from "kitcore";
6
6
  /**
7
7
  * Checks if a string value looks like a direct connection ID rather than a named alias.
8
8
  * Returns true for numeric strings and UUIDs.
@@ -1,13 +1,2 @@
1
- /**
2
- * Logging utilities for the SDK
3
- */
4
- /**
5
- * Log a deprecation warning. Each unique message is only logged once per process.
6
- */
7
- export declare function logDeprecation(message: string): void;
8
- /**
9
- * Reset the set of logged deprecation warnings.
10
- * Useful for testing.
11
- */
12
- export declare function resetDeprecationWarnings(): void;
1
+ export declare const logDeprecation: (message: string) => void, resetDeprecationWarnings: () => void;
13
2
  //# sourceMappingURL=logging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/utils/logging.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAIpD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/utils/logging.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,cAAc,6BAAE,wBAAwB,YAChB,CAAC"}
@@ -1,20 +1,2 @@
1
- /**
2
- * Logging utilities for the SDK
3
- */
4
- const loggedDeprecations = new Set();
5
- /**
6
- * Log a deprecation warning. Each unique message is only logged once per process.
7
- */
8
- export function logDeprecation(message) {
9
- if (loggedDeprecations.has(message))
10
- return;
11
- loggedDeprecations.add(message);
12
- console.warn(`[zapier-sdk] Deprecation: ${message}`);
13
- }
14
- /**
15
- * Reset the set of logged deprecation warnings.
16
- * Useful for testing.
17
- */
18
- export function resetDeprecationWarnings() {
19
- loggedDeprecations.clear();
20
- }
1
+ import { createDeprecationLogger } from "kitcore";
2
+ export const { logDeprecation, resetDeprecationWarnings } = createDeprecationLogger("zapier-sdk");
@@ -0,0 +1,38 @@
1
+ import type { SdkPage } from "kitcore";
2
+ /**
3
+ * Pull the cursor token out of a paginated URL's query string. Zapier
4
+ * endpoints variously use `offset` (most JSON:API responses) or `cursor`
5
+ * (trigger inbox messages); try the canonical one first and fall back.
6
+ */
7
+ export declare function extractCursorFromUrl(url: string): string | undefined;
8
+ /**
9
+ * Adapts a Zapier paginated envelope into `SdkPage<T>`, extracting the cursor
10
+ * from wherever Zapier puts it:
11
+ *
12
+ * - JSON:API envelope `{ data, links: { next: "<url>?offset=..." } }` →
13
+ * cursor from `links.next`.
14
+ * - Top-level next URL `{ data, next: "<url>?offset|cursor=..." }`
15
+ * (trigger inbox endpoints) → cursor from `next`.
16
+ * - No recognized cursor location → `{ data }` (single / last page).
17
+ *
18
+ * `data` is passed through as-is — a response without a `data` array is NOT
19
+ * coerced to an empty page; it trips the page guard in
20
+ * `createPaginatedFunction`, so a malformed response fails loudly instead of
21
+ * masquerading as a valid empty page.
22
+ */
23
+ export declare function adaptZapierPage<T>(response: unknown): SdkPage<T>;
24
+ /**
25
+ * Shared pagination config for the Zapier plugins whose handler returns a raw
26
+ * envelope: spread `...zapierPagination` into `createPaginatedPluginMethod` to
27
+ * supply `adaptZapierPage` as the per-method `adaptPage`.
28
+ *
29
+ * Spreading this typed object (rather than writing `adaptPage: adaptZapierPage`
30
+ * inline) is load-bearing: as a direct property the generic `adaptZapierPage`
31
+ * is re-instantiated against the config's `NoInfer` adapter slot and collapses
32
+ * the method's item type to `never`. Spread from this const its type is already
33
+ * resolved, so it's only checked for assignability and the item type survives.
34
+ */
35
+ export declare const zapierPagination: {
36
+ adaptPage: typeof adaptZapierPage;
37
+ };
38
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/utils/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOpE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAkBhE;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB;;CAAiC,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Pull the cursor token out of a paginated URL's query string. Zapier
3
+ * endpoints variously use `offset` (most JSON:API responses) or `cursor`
4
+ * (trigger inbox messages); try the canonical one first and fall back.
5
+ */
6
+ export function extractCursorFromUrl(url) {
7
+ try {
8
+ const params = new URL(url).searchParams;
9
+ return params.get("offset") ?? params.get("cursor") ?? undefined;
10
+ }
11
+ catch {
12
+ return undefined;
13
+ }
14
+ }
15
+ /**
16
+ * Adapts a Zapier paginated envelope into `SdkPage<T>`, extracting the cursor
17
+ * from wherever Zapier puts it:
18
+ *
19
+ * - JSON:API envelope `{ data, links: { next: "<url>?offset=..." } }` →
20
+ * cursor from `links.next`.
21
+ * - Top-level next URL `{ data, next: "<url>?offset|cursor=..." }`
22
+ * (trigger inbox endpoints) → cursor from `next`.
23
+ * - No recognized cursor location → `{ data }` (single / last page).
24
+ *
25
+ * `data` is passed through as-is — a response without a `data` array is NOT
26
+ * coerced to an empty page; it trips the page guard in
27
+ * `createPaginatedFunction`, so a malformed response fails loudly instead of
28
+ * masquerading as a valid empty page.
29
+ */
30
+ export function adaptZapierPage(response) {
31
+ const r = (response ?? {});
32
+ const data = r.data;
33
+ const linksNext = r.links?.next;
34
+ if (typeof linksNext === "string") {
35
+ return { data, nextCursor: extractCursorFromUrl(linksNext) };
36
+ }
37
+ if (typeof r.next === "string") {
38
+ return { data, nextCursor: extractCursorFromUrl(r.next) };
39
+ }
40
+ return { data };
41
+ }
42
+ /**
43
+ * Shared pagination config for the Zapier plugins whose handler returns a raw
44
+ * envelope: spread `...zapierPagination` into `createPaginatedPluginMethod` to
45
+ * supply `adaptZapierPage` as the per-method `adaptPage`.
46
+ *
47
+ * Spreading this typed object (rather than writing `adaptPage: adaptZapierPage`
48
+ * inline) is load-bearing: as a direct property the generic `adaptZapierPage`
49
+ * is re-instantiated against the config's `NoInfer` adapter slot and collapses
50
+ * the method's item type to `never`. Spread from this const its type is already
51
+ * resolved, so it's only checked for assignability and the item type survives.
52
+ */
53
+ export const zapierPagination = { adaptPage: adaptZapierPage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.64.0",
3
+ "version": "0.67.0",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -93,7 +93,8 @@
93
93
  "@types/node": "^24.0.1",
94
94
  "tsup": "^8.5.0",
95
95
  "typescript": "^5.8.3",
96
- "vitest": "^4.1.4"
96
+ "vitest": "^4.1.4",
97
+ "kitcore": "0.0.0"
97
98
  },
98
99
  "scripts": {
99
100
  "build": "tsup",
@@ -1,9 +0,0 @@
1
- import type { PluginMeta } from "./types/plugin";
2
- import type { RegistryResult } from "./types/registry";
3
- export type { RegistryResult } from "./types/registry";
4
- export declare function buildRegistry({ sdk, meta, packageFilter, }: {
5
- sdk: Record<string, unknown>;
6
- meta: Record<string, PluginMeta>;
7
- packageFilter?: string;
8
- }): RegistryResult;
9
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiDvD,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,IAAI,EACJ,aAAa,GACd,EAAE;IACD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,cAAc,CAoEjB"}
package/dist/registry.js DELETED
@@ -1,103 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Plugins with deprecated parameter aliases declare two schemas: a canonical
4
- * one (new names only, with `.meta({ aliases })` declarations) and a union
5
- * of the canonical + a deprecated variant for runtime input parsing. The
6
- * union form is what `createPluginMethod` stores in plugin meta so SDK
7
- * callers passing deprecated names keep validating; for the registry — and
8
- * all downstream consumers (CLI help, MCP tool definitions, generated
9
- * docs) — we want only the canonical.
10
- *
11
- * Convention: when a plugin's `inputSchema` is a `z.ZodUnion`, the first
12
- * variant is the canonical schema. Every plugin that uses unions today
13
- * follows this; explicit, easy to enforce, no extra metadata needed.
14
- */
15
- function canonicalInputSchema(schema) {
16
- if (schema instanceof z.ZodUnion) {
17
- return schema.options[0];
18
- }
19
- return schema;
20
- }
21
- const categoryDefinitions = {
22
- account: { title: "Account" },
23
- app: { title: "App", titlePlural: "Apps" },
24
- connection: { title: "Connection" },
25
- action: { title: "Action" },
26
- "client-credentials": {
27
- title: "Client Credentials",
28
- titlePlural: "Client Credentials",
29
- },
30
- table: { title: "Table" },
31
- trigger: { title: "Trigger" },
32
- "code-workflow": {
33
- title: "Code Workflow",
34
- titlePlural: "Code Workflows",
35
- },
36
- http: { title: "HTTP Request" },
37
- utility: { title: "Utility", titlePlural: "Utilities" },
38
- other: { title: "Other" },
39
- };
40
- const knownCategories = Object.keys(categoryDefinitions);
41
- export function buildRegistry({ sdk, meta, packageFilter, }) {
42
- const functions = Object.keys(meta)
43
- .filter((key) => {
44
- const property = sdk[key];
45
- if (typeof property === "function")
46
- return true;
47
- const [rootKey] = key.split(".");
48
- const rootProperty = sdk[rootKey];
49
- return typeof rootProperty === "object" && rootProperty !== null;
50
- })
51
- .map((key) => {
52
- const m = meta[key];
53
- return {
54
- name: key,
55
- description: m.description,
56
- type: m.type,
57
- itemType: m.itemType,
58
- returnType: m.returnType,
59
- inputSchema: canonicalInputSchema(m.inputSchema),
60
- inputParameters: m.inputParameters,
61
- outputSchema: m.outputSchema,
62
- categories: m.categories || [],
63
- resolvers: m.resolvers,
64
- formatter: m.formatter,
65
- experimental: m.experimental,
66
- packages: m.packages,
67
- confirm: m.confirm ?? (m.type === "delete" ? "delete" : undefined),
68
- deprecation: m.deprecation,
69
- aliases: m.aliases,
70
- supportsJsonOutput: m.supportsJsonOutput ?? true,
71
- };
72
- })
73
- .sort((a, b) => a.name.localeCompare(b.name));
74
- const filteredFunctions = packageFilter
75
- ? functions.filter((f) => !f.packages || f.packages.includes(packageFilter))
76
- : functions;
77
- const filteredCategories = knownCategories
78
- .slice()
79
- .sort((a, b) => {
80
- if (a === "other")
81
- return 1;
82
- if (b === "other")
83
- return -1;
84
- return categoryDefinitions[a].title.localeCompare(categoryDefinitions[b].title);
85
- })
86
- .map((categoryKey) => {
87
- const categoryFunctions = filteredFunctions
88
- .filter((f) => f.categories.includes(categoryKey) ||
89
- (categoryKey === "other" &&
90
- !f.categories.some((c) => knownCategories.includes(c))))
91
- .map((f) => f.name)
92
- .sort();
93
- const definition = categoryDefinitions[categoryKey];
94
- return {
95
- key: categoryKey,
96
- title: definition.title,
97
- titlePlural: definition.titlePlural ?? `${definition.title}s`,
98
- functions: categoryFunctions,
99
- };
100
- })
101
- .filter((category) => category.functions.length > 0);
102
- return { functions: filteredFunctions, categories: filteredCategories };
103
- }
@@ -1,9 +0,0 @@
1
- declare module "zod" {
2
- interface GlobalMeta {
3
- internal?: boolean;
4
- deprecated?: boolean;
5
- valueHint?: string;
6
- }
7
- }
8
- export {};
9
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,KAAK,CAAC;IACnB,UAAU,UAAU;QAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAGD,OAAO,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- // Augment the Zod Metadata Registry
2
- // https://zod.dev/metadata?id=metadata
3
- export {};
@@ -1,84 +0,0 @@
1
- /**
2
- * ------------------------------
3
- * Plugin Type System
4
- * ------------------------------
5
- *
6
- * Plugins receive the sdk as a positional parameter. sdk.context holds shared
7
- * internal state (api client, event emission, meta, options, etc.). SDK methods
8
- * live at the root, context nests under .context.
9
- *
10
- * A plugin is (sdk) => partialSdk. createSdk() returns an empty SDK. addPlugin
11
- * merges the plugin's result into the SDK, producing a new SDK.
12
- */
13
- import type { z } from "zod";
14
- import type { RegistryResult } from "./registry";
15
- export interface PluginProvides extends Record<string, any> {
16
- context?: {
17
- meta?: Record<string, PluginMeta>;
18
- [key: string]: any;
19
- };
20
- }
21
- export interface PluginMeta {
22
- /**
23
- * Human-readable description of the plugin function. Used by the CLI (help text),
24
- * MCP (tool description), and README generators. When omitted, falls back to
25
- * the inputSchema's `.describe()` value or a generic placeholder.
26
- */
27
- description?: string;
28
- categories?: string[];
29
- type?: "list" | "item" | "create" | "update" | "delete" | "function";
30
- itemType?: string;
31
- returnType?: string;
32
- inputSchema?: z.ZodSchema;
33
- outputSchema?: z.ZodSchema;
34
- resolvers?: Record<string, any>;
35
- /** Confirmation prompt type - prompts user before executing */
36
- confirm?: "create-secret" | "delete";
37
- /**
38
- * Marks this plugin as experimental — registered only in the
39
- * `@zapier/zapier-sdk/experimental` factory and badged in
40
- * generated docs / CLI help. Access is gated structurally by the
41
- * subpath import: stable callers can't reach experimental methods
42
- * because the stable SDK type and runtime registry don't include
43
- * them. No runtime capability check.
44
- */
45
- experimental?: boolean;
46
- [key: string]: any;
47
- }
48
- /**
49
- * Plugin interface — 2 type params:
50
- *
51
- * TSdk = what this plugin needs (the SDK shape including context)
52
- * TProvides = what this plugin returns (a partial SDK shape)
53
- *
54
- * The sdk param always includes context.meta, even if TSdk doesn't declare it.
55
- */
56
- export interface Plugin<TSdk = {}, TProvides extends PluginProvides = PluginProvides> {
57
- (sdk: TSdk & {
58
- context: {
59
- meta: Record<string, PluginMeta>;
60
- };
61
- }): TProvides;
62
- }
63
- /**
64
- * Takes an SDK shape and adds addPlugin and getRegistry methods to it.
65
- * addPlugin merges a plugin's result into the shape, producing a new SDK.
66
- * Use composePlugins(...) to bundle multiple plugins into one before
67
- * adding — addPlugin itself is single-plugin only, which keeps inference
68
- * stable through long chains.
69
- * getRegistry is a lazy view over context.meta, available on every sdk
70
- * produced by buildSdk regardless of plugin order.
71
- */
72
- export type WithAddPlugin<T = {
73
- context: {
74
- meta: Record<string, PluginMeta>;
75
- };
76
- }> = T & {
77
- addPlugin<TProvides extends PluginProvides>(plugin: Plugin<T, TProvides>, options?: {
78
- override?: boolean;
79
- }): WithAddPlugin<T & TProvides>;
80
- getRegistry(options?: {
81
- package?: string;
82
- }): RegistryResult;
83
- };
84
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACzD,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,eAAe,GAAG,QAAQ,CAAC;IACrC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM,CACrB,IAAI,GAAG,EAAE,EACT,SAAS,SAAS,cAAc,GAAG,cAAc;IAEjD,CACE,GAAG,EAAE,IAAI,GAAG;QACV,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;SAClC,CAAC;KACH,GACA,SAAS,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,GAAG;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;KAAE,CAAA;CAAE,IACnD,CAAC,GAAG;IACN,SAAS,CAAC,SAAS,SAAS,cAAc,EACxC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,EAC5B,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAC/B,aAAa,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAChC,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,cAAc,CAAC;CAC7D,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * ------------------------------
3
- * Plugin Type System
4
- * ------------------------------
5
- *
6
- * Plugins receive the sdk as a positional parameter. sdk.context holds shared
7
- * internal state (api client, event emission, meta, options, etc.). SDK methods
8
- * live at the root, context nests under .context.
9
- *
10
- * A plugin is (sdk) => partialSdk. createSdk() returns an empty SDK. addPlugin
11
- * merges the plugin's result into the SDK, producing a new SDK.
12
- */
13
- export {};
@@ -1,54 +0,0 @@
1
- import type { z } from "zod";
2
- import type { OutputFormatter } from "../utils/schema-utils";
3
- export interface FunctionRegistryEntry {
4
- name: string;
5
- /**
6
- * Human-readable description of the function. Surfaced as CLI help text,
7
- * MCP tool description, and README documentation. Prefer providing this
8
- * directly rather than relying solely on inputSchema.describe().
9
- */
10
- description?: string;
11
- type?: "list" | "item" | "create" | "update" | "delete" | "function";
12
- itemType?: string;
13
- returnType?: string;
14
- inputSchema?: z.ZodSchema;
15
- inputParameters?: Array<{
16
- name: string;
17
- schema: z.ZodSchema;
18
- }>;
19
- outputSchema?: z.ZodSchema;
20
- categories: string[];
21
- resolvers?: Record<string, any>;
22
- packages?: string[];
23
- /**
24
- * True if the plugin is registered only in the experimental SDK
25
- * factory. See `PluginMeta.experimental`.
26
- */
27
- experimental?: boolean;
28
- /** Confirmation prompt type - prompts user before executing */
29
- confirm?: "create-secret" | "delete";
30
- /**
31
- * Optional deprecation metadata for commands.
32
- */
33
- deprecation?: FunctionDeprecation;
34
- /** Short flag aliases for CLI options (e.g., { request: "X", header: "H" }) */
35
- aliases?: Record<string, string>;
36
- /** Output formatter with optional page-level enrichment (mirrors resolvers for output) */
37
- formatter?: OutputFormatter;
38
- /** Defaults to true. Set to false to suppress --json (e.g. login/logout/init). */
39
- supportsJsonOutput: boolean;
40
- }
41
- export interface FunctionDeprecation {
42
- /** User-facing deprecation message for why/how to migrate */
43
- message: string;
44
- }
45
- export interface RegistryResult {
46
- functions: FunctionRegistryEntry[];
47
- categories: {
48
- key: string;
49
- title: string;
50
- titlePlural: string;
51
- functions: string[];
52
- }[];
53
- }
54
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/types/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAA;KAAE,CAAC,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,eAAe,GAAG,QAAQ,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,kFAAkF;IAClF,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,qBAAqB,EAAE,CAAC;IACnC,UAAU,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,EAAE,CAAC;CACL"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,59 +0,0 @@
1
- /**
2
- * Generic utility functions for creating paginated SDK functions
3
- */
4
- import type { z } from "zod";
5
- import type { PaginatedSdkResult } from "../types/functions";
6
- /**
7
- * Callbacks for telemetry events during function execution
8
- */
9
- export interface TelemetryCallbacks {
10
- onMethodCalled?: (data: {
11
- methodName: string;
12
- durationMs: number;
13
- success: boolean;
14
- error?: Error;
15
- argumentCount: number;
16
- isPaginated: boolean;
17
- }) => void;
18
- }
19
- /**
20
- * Helper function to extract cursor from pagination data
21
- * Supports JSON:API style `links.next` URLs by extracting the `offset` parameter.
22
- */
23
- export declare function extractCursor(data: {
24
- next?: string | null;
25
- } | null | undefined): string | undefined;
26
- /**
27
- * Higher-order function that creates a function from a core function
28
- *
29
- * @param coreFn - Function that returns T directly or throws errors
30
- * @param schema - Optional Zod schema for validation
31
- * @param telemetry - Optional telemetry callbacks
32
- * @returns A function that normalizes and rethrows errors
33
- */
34
- export declare function createFunction<TOptions, TResult, TSchemaOptions extends TOptions = TOptions>(coreFn: (options: TOptions) => Promise<TResult>, schema?: z.ZodSchema<TSchemaOptions>, telemetry?: TelemetryCallbacks): (options?: TOptions) => Promise<TResult>;
35
- /**
36
- * Higher-order function that creates a paginated function that wraps results in {data}
37
- *
38
- * @param coreFn - Function that returns T directly or throws errors
39
- * @returns A function that normalizes errors and wraps results in {data}
40
- */
41
- /**
42
- * Extract the item type from a page handler's return shape. The handler
43
- * may return a flat `{ data: TItem[] }` (or single `data: TItem`), a bare
44
- * array, or a JSON:API envelope; in all cases the wrapper normalizes to
45
- * `SdkPage<TItem>` and this resolves the right `TItem`.
46
- */
47
- type ItemType<TResult> = TResult extends {
48
- data: infer TData;
49
- } ? TData extends readonly (infer TItem)[] ? TItem : TData : TResult extends readonly (infer TItem)[] ? TItem : TResult;
50
- export declare function createPaginatedFunction<TUserOptions, TResult>(coreFn: (options: TUserOptions & {
51
- cursor?: string;
52
- pageSize?: number;
53
- }) => Promise<TResult>, schema?: z.ZodSchema<TUserOptions>, telemetry?: TelemetryCallbacks, explicitFunctionName?: string, defaultPageSize?: number): (options?: TUserOptions & {
54
- cursor?: string;
55
- pageSize?: number;
56
- maxItems?: number;
57
- }) => PaginatedSdkResult<ItemType<TResult>>;
58
- export {};
59
- //# sourceMappingURL=function-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"function-utils.d.ts","sourceRoot":"","sources":["../../src/utils/function-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAQ7D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,OAAO,CAAC;KACtB,KAAK,IAAI,CAAC;CACZ;AAUD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAChD,MAAM,GAAG,SAAS,CAYpB;AAyBD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EACR,OAAO,EACP,cAAc,SAAS,QAAQ,GAAG,QAAQ,EAE1C,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,OAAO,CAAC,EAC/C,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,EACpC,SAAS,CAAC,EAAE,kBAAkB,cAMc,QAAQ,KAAG,OAAO,CAAC,OAAO,CAAC,CAsExE;AA6DD;;;;;GAKG;AACH;;;;;GAKG;AACH,KAAK,QAAQ,CAAC,OAAO,IAAI,OAAO,SAAS;IAAE,IAAI,EAAE,MAAM,KAAK,CAAA;CAAE,GAC1D,KAAK,SAAS,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,GACpC,KAAK,GACL,KAAK,GACP,OAAO,SAAS,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,GACtC,KAAK,GACL,OAAO,CAAC;AAEd,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,OAAO,EAC3D,MAAM,EAAE,CACN,OAAO,EAAE,YAAY,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAC3D,OAAO,CAAC,OAAO,CAAC,EACrB,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,EAClC,SAAS,CAAC,EAAE,kBAAkB,EAC9B,oBAAoB,CAAC,EAAE,MAAM,EAC7B,eAAe,CAAC,EAAE,MAAM,GACvB,CACD,OAAO,CAAC,EAAE,YAAY,GAAG;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KACE,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAiHzC"}