@zapier/zapier-sdk 0.18.4 → 0.19.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 (372) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +43 -31
  3. package/dist/index.cjs +365 -64
  4. package/dist/index.d.mts +220 -33
  5. package/dist/index.d.ts +2541 -40
  6. package/dist/index.mjs +345 -63
  7. package/package.json +14 -13
  8. package/dist/api/auth.d.ts +0 -19
  9. package/dist/api/auth.d.ts.map +0 -1
  10. package/dist/api/auth.js +0 -70
  11. package/dist/api/auth.test.d.ts +0 -2
  12. package/dist/api/auth.test.d.ts.map +0 -1
  13. package/dist/api/auth.test.js +0 -220
  14. package/dist/api/client.d.ts +0 -9
  15. package/dist/api/client.d.ts.map +0 -1
  16. package/dist/api/client.js +0 -356
  17. package/dist/api/client.test.d.ts +0 -2
  18. package/dist/api/client.test.d.ts.map +0 -1
  19. package/dist/api/client.test.js +0 -96
  20. package/dist/api/debug.d.ts +0 -14
  21. package/dist/api/debug.d.ts.map +0 -1
  22. package/dist/api/debug.js +0 -131
  23. package/dist/api/debug.test.d.ts +0 -2
  24. package/dist/api/debug.test.d.ts.map +0 -1
  25. package/dist/api/debug.test.js +0 -59
  26. package/dist/api/index.d.ts +0 -30
  27. package/dist/api/index.d.ts.map +0 -1
  28. package/dist/api/index.js +0 -43
  29. package/dist/api/polling.d.ts +0 -46
  30. package/dist/api/polling.d.ts.map +0 -1
  31. package/dist/api/polling.js +0 -139
  32. package/dist/api/polling.test.d.ts +0 -2
  33. package/dist/api/polling.test.d.ts.map +0 -1
  34. package/dist/api/polling.test.js +0 -318
  35. package/dist/api/schemas.d.ts +0 -422
  36. package/dist/api/schemas.d.ts.map +0 -1
  37. package/dist/api/schemas.js +0 -322
  38. package/dist/api/types.d.ts +0 -83
  39. package/dist/api/types.d.ts.map +0 -1
  40. package/dist/api/types.js +0 -1
  41. package/dist/auth.d.ts +0 -52
  42. package/dist/auth.d.ts.map +0 -1
  43. package/dist/auth.js +0 -72
  44. package/dist/auth.test.d.ts +0 -2
  45. package/dist/auth.test.d.ts.map +0 -1
  46. package/dist/auth.test.js +0 -102
  47. package/dist/constants.d.ts +0 -14
  48. package/dist/constants.d.ts.map +0 -1
  49. package/dist/constants.js +0 -13
  50. package/dist/index.d.ts.map +0 -1
  51. package/dist/index.js +0 -42
  52. package/dist/plugins/api/index.d.ts +0 -12
  53. package/dist/plugins/api/index.d.ts.map +0 -1
  54. package/dist/plugins/api/index.js +0 -24
  55. package/dist/plugins/apps/index.d.ts +0 -15
  56. package/dist/plugins/apps/index.d.ts.map +0 -1
  57. package/dist/plugins/apps/index.js +0 -112
  58. package/dist/plugins/apps/schemas.d.ts +0 -42
  59. package/dist/plugins/apps/schemas.d.ts.map +0 -1
  60. package/dist/plugins/apps/schemas.js +0 -14
  61. package/dist/plugins/eventEmission/builders.d.ts +0 -14
  62. package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
  63. package/dist/plugins/eventEmission/builders.js +0 -109
  64. package/dist/plugins/eventEmission/index.d.ts +0 -38
  65. package/dist/plugins/eventEmission/index.d.ts.map +0 -1
  66. package/dist/plugins/eventEmission/index.js +0 -336
  67. package/dist/plugins/eventEmission/index.test.d.ts +0 -5
  68. package/dist/plugins/eventEmission/index.test.d.ts.map +0 -1
  69. package/dist/plugins/eventEmission/index.test.js +0 -581
  70. package/dist/plugins/eventEmission/transport.d.ts +0 -27
  71. package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
  72. package/dist/plugins/eventEmission/transport.js +0 -104
  73. package/dist/plugins/eventEmission/transport.test.d.ts +0 -5
  74. package/dist/plugins/eventEmission/transport.test.d.ts.map +0 -1
  75. package/dist/plugins/eventEmission/transport.test.js +0 -164
  76. package/dist/plugins/eventEmission/types.d.ts +0 -63
  77. package/dist/plugins/eventEmission/types.d.ts.map +0 -1
  78. package/dist/plugins/eventEmission/types.js +0 -1
  79. package/dist/plugins/eventEmission/utils.d.ts +0 -45
  80. package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
  81. package/dist/plugins/eventEmission/utils.js +0 -114
  82. package/dist/plugins/fetch/index.d.ts +0 -36
  83. package/dist/plugins/fetch/index.d.ts.map +0 -1
  84. package/dist/plugins/fetch/index.js +0 -62
  85. package/dist/plugins/fetch/schemas.d.ts +0 -19
  86. package/dist/plugins/fetch/schemas.d.ts.map +0 -1
  87. package/dist/plugins/fetch/schemas.js +0 -31
  88. package/dist/plugins/findFirstAuthentication/index.d.ts +0 -21
  89. package/dist/plugins/findFirstAuthentication/index.d.ts.map +0 -1
  90. package/dist/plugins/findFirstAuthentication/index.js +0 -36
  91. package/dist/plugins/findFirstAuthentication/index.test.d.ts +0 -2
  92. package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +0 -1
  93. package/dist/plugins/findFirstAuthentication/index.test.js +0 -177
  94. package/dist/plugins/findFirstAuthentication/schemas.d.ts +0 -20
  95. package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +0 -1
  96. package/dist/plugins/findFirstAuthentication/schemas.js +0 -18
  97. package/dist/plugins/findUniqueAuthentication/index.d.ts +0 -21
  98. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +0 -1
  99. package/dist/plugins/findUniqueAuthentication/index.js +0 -39
  100. package/dist/plugins/findUniqueAuthentication/index.test.d.ts +0 -2
  101. package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +0 -1
  102. package/dist/plugins/findUniqueAuthentication/index.test.js +0 -159
  103. package/dist/plugins/findUniqueAuthentication/schemas.d.ts +0 -20
  104. package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +0 -1
  105. package/dist/plugins/findUniqueAuthentication/schemas.js +0 -18
  106. package/dist/plugins/getAction/index.d.ts +0 -25
  107. package/dist/plugins/getAction/index.d.ts.map +0 -1
  108. package/dist/plugins/getAction/index.js +0 -42
  109. package/dist/plugins/getAction/index.test.d.ts +0 -2
  110. package/dist/plugins/getAction/index.test.d.ts.map +0 -1
  111. package/dist/plugins/getAction/index.test.js +0 -211
  112. package/dist/plugins/getAction/schemas.d.ts +0 -30
  113. package/dist/plugins/getAction/schemas.d.ts.map +0 -1
  114. package/dist/plugins/getAction/schemas.js +0 -12
  115. package/dist/plugins/getApp/index.d.ts +0 -21
  116. package/dist/plugins/getApp/index.d.ts.map +0 -1
  117. package/dist/plugins/getApp/index.js +0 -44
  118. package/dist/plugins/getApp/index.test.d.ts +0 -2
  119. package/dist/plugins/getApp/index.test.d.ts.map +0 -1
  120. package/dist/plugins/getApp/index.test.js +0 -157
  121. package/dist/plugins/getApp/schemas.d.ts +0 -16
  122. package/dist/plugins/getApp/schemas.d.ts.map +0 -1
  123. package/dist/plugins/getApp/schemas.js +0 -8
  124. package/dist/plugins/getAuthentication/index.d.ts +0 -21
  125. package/dist/plugins/getAuthentication/index.d.ts.map +0 -1
  126. package/dist/plugins/getAuthentication/index.js +0 -29
  127. package/dist/plugins/getAuthentication/index.test.d.ts +0 -2
  128. package/dist/plugins/getAuthentication/index.test.d.ts.map +0 -1
  129. package/dist/plugins/getAuthentication/index.test.js +0 -106
  130. package/dist/plugins/getAuthentication/schemas.d.ts +0 -7
  131. package/dist/plugins/getAuthentication/schemas.d.ts.map +0 -1
  132. package/dist/plugins/getAuthentication/schemas.js +0 -1
  133. package/dist/plugins/getInputFieldsSchema/index.d.ts +0 -23
  134. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
  135. package/dist/plugins/getInputFieldsSchema/index.js +0 -53
  136. package/dist/plugins/getInputFieldsSchema/index.test.d.ts +0 -2
  137. package/dist/plugins/getInputFieldsSchema/index.test.d.ts.map +0 -1
  138. package/dist/plugins/getInputFieldsSchema/index.test.js +0 -291
  139. package/dist/plugins/getInputFieldsSchema/schemas.d.ts +0 -28
  140. package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
  141. package/dist/plugins/getInputFieldsSchema/schemas.js +0 -13
  142. package/dist/plugins/getProfile/index.d.ts +0 -25
  143. package/dist/plugins/getProfile/index.d.ts.map +0 -1
  144. package/dist/plugins/getProfile/index.js +0 -39
  145. package/dist/plugins/getProfile/schemas.d.ts +0 -13
  146. package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
  147. package/dist/plugins/getProfile/schemas.js +0 -6
  148. package/dist/plugins/listActions/index.d.ts +0 -30
  149. package/dist/plugins/listActions/index.d.ts.map +0 -1
  150. package/dist/plugins/listActions/index.js +0 -75
  151. package/dist/plugins/listActions/index.test.d.ts +0 -2
  152. package/dist/plugins/listActions/index.test.d.ts.map +0 -1
  153. package/dist/plugins/listActions/index.test.js +0 -453
  154. package/dist/plugins/listActions/schemas.d.ts +0 -35
  155. package/dist/plugins/listActions/schemas.d.ts.map +0 -1
  156. package/dist/plugins/listActions/schemas.js +0 -22
  157. package/dist/plugins/listApps/index.d.ts +0 -19
  158. package/dist/plugins/listApps/index.d.ts.map +0 -1
  159. package/dist/plugins/listApps/index.js +0 -67
  160. package/dist/plugins/listApps/index.test.d.ts +0 -2
  161. package/dist/plugins/listApps/index.test.d.ts.map +0 -1
  162. package/dist/plugins/listApps/index.test.js +0 -121
  163. package/dist/plugins/listApps/schemas.d.ts +0 -47
  164. package/dist/plugins/listApps/schemas.d.ts.map +0 -1
  165. package/dist/plugins/listApps/schemas.js +0 -49
  166. package/dist/plugins/listAuthentications/index.d.ts +0 -24
  167. package/dist/plugins/listAuthentications/index.d.ts.map +0 -1
  168. package/dist/plugins/listAuthentications/index.js +0 -77
  169. package/dist/plugins/listAuthentications/index.test.d.ts +0 -2
  170. package/dist/plugins/listAuthentications/index.test.d.ts.map +0 -1
  171. package/dist/plugins/listAuthentications/index.test.js +0 -848
  172. package/dist/plugins/listAuthentications/schemas.d.ts +0 -30
  173. package/dist/plugins/listAuthentications/schemas.d.ts.map +0 -1
  174. package/dist/plugins/listAuthentications/schemas.js +0 -32
  175. package/dist/plugins/listInputFieldChoices/index.d.ts +0 -33
  176. package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
  177. package/dist/plugins/listInputFieldChoices/index.js +0 -115
  178. package/dist/plugins/listInputFieldChoices/index.test.d.ts +0 -2
  179. package/dist/plugins/listInputFieldChoices/index.test.d.ts.map +0 -1
  180. package/dist/plugins/listInputFieldChoices/index.test.js +0 -717
  181. package/dist/plugins/listInputFieldChoices/schemas.d.ts +0 -43
  182. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
  183. package/dist/plugins/listInputFieldChoices/schemas.js +0 -65
  184. package/dist/plugins/listInputFields/index.d.ts +0 -34
  185. package/dist/plugins/listInputFields/index.d.ts.map +0 -1
  186. package/dist/plugins/listInputFields/index.js +0 -204
  187. package/dist/plugins/listInputFields/index.test.d.ts +0 -2
  188. package/dist/plugins/listInputFields/index.test.d.ts.map +0 -1
  189. package/dist/plugins/listInputFields/index.test.js +0 -359
  190. package/dist/plugins/listInputFields/schemas.d.ts +0 -35
  191. package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
  192. package/dist/plugins/listInputFields/schemas.js +0 -23
  193. package/dist/plugins/manifest/index.d.ts +0 -85
  194. package/dist/plugins/manifest/index.d.ts.map +0 -1
  195. package/dist/plugins/manifest/index.js +0 -376
  196. package/dist/plugins/manifest/index.test.d.ts +0 -2
  197. package/dist/plugins/manifest/index.test.d.ts.map +0 -1
  198. package/dist/plugins/manifest/index.test.js +0 -1139
  199. package/dist/plugins/manifest/schemas.d.ts +0 -57
  200. package/dist/plugins/manifest/schemas.d.ts.map +0 -1
  201. package/dist/plugins/manifest/schemas.js +0 -50
  202. package/dist/plugins/registry/index.d.ts +0 -21
  203. package/dist/plugins/registry/index.d.ts.map +0 -1
  204. package/dist/plugins/registry/index.js +0 -117
  205. package/dist/plugins/request/index.d.ts +0 -21
  206. package/dist/plugins/request/index.d.ts.map +0 -1
  207. package/dist/plugins/request/index.js +0 -76
  208. package/dist/plugins/request/index.test.d.ts +0 -2
  209. package/dist/plugins/request/index.test.d.ts.map +0 -1
  210. package/dist/plugins/request/index.test.js +0 -337
  211. package/dist/plugins/request/schemas.d.ts +0 -54
  212. package/dist/plugins/request/schemas.d.ts.map +0 -1
  213. package/dist/plugins/request/schemas.js +0 -41
  214. package/dist/plugins/runAction/index.d.ts +0 -33
  215. package/dist/plugins/runAction/index.d.ts.map +0 -1
  216. package/dist/plugins/runAction/index.js +0 -108
  217. package/dist/plugins/runAction/index.test.d.ts +0 -2
  218. package/dist/plugins/runAction/index.test.d.ts.map +0 -1
  219. package/dist/plugins/runAction/index.test.js +0 -333
  220. package/dist/plugins/runAction/schemas.d.ts +0 -34
  221. package/dist/plugins/runAction/schemas.d.ts.map +0 -1
  222. package/dist/plugins/runAction/schemas.js +0 -23
  223. package/dist/resolvers/actionKey.d.ts +0 -15
  224. package/dist/resolvers/actionKey.d.ts.map +0 -1
  225. package/dist/resolvers/actionKey.js +0 -19
  226. package/dist/resolvers/actionType.d.ts +0 -10
  227. package/dist/resolvers/actionType.d.ts.map +0 -1
  228. package/dist/resolvers/actionType.js +0 -21
  229. package/dist/resolvers/appKey.d.ts +0 -3
  230. package/dist/resolvers/appKey.d.ts.map +0 -1
  231. package/dist/resolvers/appKey.js +0 -5
  232. package/dist/resolvers/authenticationId.d.ts +0 -9
  233. package/dist/resolvers/authenticationId.d.ts.map +0 -1
  234. package/dist/resolvers/authenticationId.js +0 -42
  235. package/dist/resolvers/index.d.ts +0 -8
  236. package/dist/resolvers/index.d.ts.map +0 -1
  237. package/dist/resolvers/index.js +0 -8
  238. package/dist/resolvers/inputFieldKey.d.ts +0 -11
  239. package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
  240. package/dist/resolvers/inputFieldKey.js +0 -47
  241. package/dist/resolvers/inputs.d.ts +0 -17
  242. package/dist/resolvers/inputs.d.ts.map +0 -1
  243. package/dist/resolvers/inputs.js +0 -50
  244. package/dist/schemas/Action.d.ts +0 -24
  245. package/dist/schemas/Action.d.ts.map +0 -1
  246. package/dist/schemas/Action.js +0 -40
  247. package/dist/schemas/App.d.ts +0 -57
  248. package/dist/schemas/App.d.ts.map +0 -1
  249. package/dist/schemas/App.js +0 -26
  250. package/dist/schemas/Auth.d.ts +0 -55
  251. package/dist/schemas/Auth.d.ts.map +0 -1
  252. package/dist/schemas/Auth.js +0 -33
  253. package/dist/schemas/Field.d.ts +0 -61
  254. package/dist/schemas/Field.d.ts.map +0 -1
  255. package/dist/schemas/Field.js +0 -116
  256. package/dist/schemas/Run.d.ts +0 -3
  257. package/dist/schemas/Run.d.ts.map +0 -1
  258. package/dist/schemas/Run.js +0 -31
  259. package/dist/schemas/UserProfile.d.ts +0 -13
  260. package/dist/schemas/UserProfile.d.ts.map +0 -1
  261. package/dist/schemas/UserProfile.js +0 -32
  262. package/dist/sdk.d.ts +0 -146
  263. package/dist/sdk.d.ts.map +0 -1
  264. package/dist/sdk.js +0 -112
  265. package/dist/sdk.test.d.ts +0 -2
  266. package/dist/sdk.test.d.ts.map +0 -1
  267. package/dist/sdk.test.js +0 -258
  268. package/dist/services/implementations.d.ts +0 -63
  269. package/dist/services/implementations.d.ts.map +0 -1
  270. package/dist/services/implementations.js +0 -80
  271. package/dist/types/domain.d.ts +0 -52
  272. package/dist/types/domain.d.ts.map +0 -1
  273. package/dist/types/domain.js +0 -1
  274. package/dist/types/domain.test.d.ts +0 -2
  275. package/dist/types/domain.test.d.ts.map +0 -1
  276. package/dist/types/domain.test.js +0 -39
  277. package/dist/types/errors.d.ts +0 -143
  278. package/dist/types/errors.d.ts.map +0 -1
  279. package/dist/types/errors.js +0 -187
  280. package/dist/types/events.d.ts +0 -38
  281. package/dist/types/events.d.ts.map +0 -1
  282. package/dist/types/events.js +0 -7
  283. package/dist/types/functions.d.ts +0 -27
  284. package/dist/types/functions.d.ts.map +0 -1
  285. package/dist/types/functions.js +0 -1
  286. package/dist/types/plugin.d.ts +0 -75
  287. package/dist/types/plugin.d.ts.map +0 -1
  288. package/dist/types/plugin.js +0 -9
  289. package/dist/types/properties.d.ts +0 -33
  290. package/dist/types/properties.d.ts.map +0 -1
  291. package/dist/types/properties.js +0 -52
  292. package/dist/types/sdk.d.ts +0 -69
  293. package/dist/types/sdk.d.ts.map +0 -1
  294. package/dist/types/sdk.js +0 -4
  295. package/dist/types/telemetry-events.d.ts +0 -105
  296. package/dist/types/telemetry-events.d.ts.map +0 -1
  297. package/dist/types/telemetry-events.js +0 -8
  298. package/dist/utils/array-utils.d.ts +0 -31
  299. package/dist/utils/array-utils.d.ts.map +0 -1
  300. package/dist/utils/array-utils.js +0 -36
  301. package/dist/utils/array-utils.test.d.ts +0 -2
  302. package/dist/utils/array-utils.test.d.ts.map +0 -1
  303. package/dist/utils/array-utils.test.js +0 -107
  304. package/dist/utils/batch-utils.d.ts +0 -72
  305. package/dist/utils/batch-utils.d.ts.map +0 -1
  306. package/dist/utils/batch-utils.js +0 -162
  307. package/dist/utils/batch-utils.test.d.ts +0 -2
  308. package/dist/utils/batch-utils.test.d.ts.map +0 -1
  309. package/dist/utils/batch-utils.test.js +0 -476
  310. package/dist/utils/domain-utils.d.ts +0 -66
  311. package/dist/utils/domain-utils.d.ts.map +0 -1
  312. package/dist/utils/domain-utils.js +0 -164
  313. package/dist/utils/domain-utils.test.d.ts +0 -2
  314. package/dist/utils/domain-utils.test.d.ts.map +0 -1
  315. package/dist/utils/domain-utils.test.js +0 -346
  316. package/dist/utils/file-utils.d.ts +0 -4
  317. package/dist/utils/file-utils.d.ts.map +0 -1
  318. package/dist/utils/file-utils.js +0 -74
  319. package/dist/utils/file-utils.test.d.ts +0 -2
  320. package/dist/utils/file-utils.test.d.ts.map +0 -1
  321. package/dist/utils/file-utils.test.js +0 -51
  322. package/dist/utils/function-utils.d.ts +0 -73
  323. package/dist/utils/function-utils.d.ts.map +0 -1
  324. package/dist/utils/function-utils.js +0 -245
  325. package/dist/utils/function-utils.test.d.ts +0 -2
  326. package/dist/utils/function-utils.test.d.ts.map +0 -1
  327. package/dist/utils/function-utils.test.js +0 -110
  328. package/dist/utils/id-utils.d.ts +0 -13
  329. package/dist/utils/id-utils.d.ts.map +0 -1
  330. package/dist/utils/id-utils.js +0 -22
  331. package/dist/utils/id-utils.test.d.ts +0 -2
  332. package/dist/utils/id-utils.test.d.ts.map +0 -1
  333. package/dist/utils/id-utils.test.js +0 -22
  334. package/dist/utils/pagination-utils.d.ts +0 -37
  335. package/dist/utils/pagination-utils.d.ts.map +0 -1
  336. package/dist/utils/pagination-utils.js +0 -165
  337. package/dist/utils/pagination-utils.test.d.ts +0 -17
  338. package/dist/utils/pagination-utils.test.d.ts.map +0 -1
  339. package/dist/utils/pagination-utils.test.js +0 -461
  340. package/dist/utils/retry-utils.d.ts +0 -45
  341. package/dist/utils/retry-utils.d.ts.map +0 -1
  342. package/dist/utils/retry-utils.js +0 -51
  343. package/dist/utils/retry-utils.test.d.ts +0 -2
  344. package/dist/utils/retry-utils.test.d.ts.map +0 -1
  345. package/dist/utils/retry-utils.test.js +0 -90
  346. package/dist/utils/schema-utils.d.ts +0 -69
  347. package/dist/utils/schema-utils.d.ts.map +0 -1
  348. package/dist/utils/schema-utils.js +0 -72
  349. package/dist/utils/string-utils.d.ts +0 -40
  350. package/dist/utils/string-utils.d.ts.map +0 -1
  351. package/dist/utils/string-utils.js +0 -69
  352. package/dist/utils/string-utils.test.d.ts +0 -2
  353. package/dist/utils/string-utils.test.d.ts.map +0 -1
  354. package/dist/utils/string-utils.test.js +0 -59
  355. package/dist/utils/telemetry-utils.d.ts +0 -44
  356. package/dist/utils/telemetry-utils.d.ts.map +0 -1
  357. package/dist/utils/telemetry-utils.js +0 -55
  358. package/dist/utils/telemetry-utils.test.d.ts +0 -2
  359. package/dist/utils/telemetry-utils.test.d.ts.map +0 -1
  360. package/dist/utils/telemetry-utils.test.js +0 -94
  361. package/dist/utils/url-utils.d.ts +0 -19
  362. package/dist/utils/url-utils.d.ts.map +0 -1
  363. package/dist/utils/url-utils.js +0 -62
  364. package/dist/utils/url-utils.test.d.ts +0 -2
  365. package/dist/utils/url-utils.test.d.ts.map +0 -1
  366. package/dist/utils/url-utils.test.js +0 -103
  367. package/dist/utils/validation.d.ts +0 -4
  368. package/dist/utils/validation.d.ts.map +0 -1
  369. package/dist/utils/validation.js +0 -30
  370. package/dist/utils/validation.test.d.ts +0 -2
  371. package/dist/utils/validation.test.d.ts.map +0 -1
  372. package/dist/utils/validation.test.js +0 -44
package/dist/index.d.ts CHANGED
@@ -1,40 +1,2541 @@
1
- export * from "./types/domain";
2
- export * from "./types/functions";
3
- export * from "./types/properties";
4
- export * from "./types/errors";
5
- export * from "./plugins/apps";
6
- export * from "./plugins/fetch";
7
- export * from "./plugins/listApps";
8
- export * from "./plugins/listActions";
9
- export * from "./plugins/listInputFields";
10
- export * from "./plugins/listAuthentications";
11
- export * from "./plugins/getApp";
12
- export * from "./plugins/getAction";
13
- export * from "./plugins/getAuthentication";
14
- export * from "./plugins/findFirstAuthentication";
15
- export * from "./plugins/findUniqueAuthentication";
16
- export * from "./plugins/runAction";
17
- export * from "./plugins/request";
18
- export * from "./plugins/manifest";
19
- export * from "./plugins/getProfile";
20
- export * from "./plugins/api";
21
- export type { Action, App, Need, Field, Choice, ActionExecutionResult, ActionField, ActionFieldChoice, NeedsRequest, NeedsResponse, Authentication, AuthenticationsResponse, UserProfile, } from "./api/types";
22
- export { isPositional, PositionalMetadata } from "./utils/schema-utils";
23
- export { createFunction } from "./utils/function-utils";
24
- export type { FormattedItem, FormatMetadata } from "./utils/schema-utils";
25
- export { toSnakeCase, toTitleCase } from "./utils/string-utils";
26
- export { batch } from "./utils/batch-utils";
27
- export type { BatchOptions } from "./utils/batch-utils";
28
- export * from "./resolvers";
29
- export * from "./auth";
30
- export * from "./constants";
31
- export { RelayRequestSchema, RelayFetchSchema, } from "./plugins/request/schemas";
32
- export { createZapierSdk, createZapierSdkWithoutRegistry, createSdk, ZapierSdkOptions, } from "./sdk";
33
- export type { FunctionRegistryEntry } from "./types/sdk";
34
- export type { Plugin, PluginProvides, PluginDependencies, PluginOptions, GetSdkType, GetContextType, Sdk, } from "./types/plugin";
35
- export { registryPlugin } from "./plugins/registry";
36
- export type { ZapierSdk } from "./types/sdk";
37
- export type { BaseEvent, MethodCalledEvent } from "./types/telemetry-events";
38
- export type { EventEmissionContext, EventContext, ApplicationLifecycleEventData, EnhancedErrorEventData, MethodCalledEventData, } from "./plugins/eventEmission";
39
- export { generateEventId, getCurrentTimestamp, getReleaseId, getOsInfo, getPlatformVersions, isCi, getCiPlatform, getMemoryUsage, getCpuTime, buildApplicationLifecycleEvent, buildErrorEventWithContext, buildErrorEvent, createBaseEvent, buildMethodCalledEvent, } from "./plugins/eventEmission";
40
- //# sourceMappingURL=index.d.ts.map
1
+ import * as zod from 'zod';
2
+ import { z } from 'zod';
3
+ import { AuthenticationSchema, AuthenticationsResponseSchema, AuthenticationItem as AuthenticationItem$1, GetAuthenticationParam, GetAuthenticationResponse, GetAuthenticationParamSchema } from '@zapier/zapier-sdk-core/v0/schemas/authentications';
4
+ import { AppItem as AppItem$1 } from '@zapier/zapier-sdk-core/v0/schemas/apps';
5
+ import * as zod_v4_core from 'zod/v4/core';
6
+
7
+ /**
8
+ * SDK Event System
9
+ *
10
+ * This module provides common event type definitions for the SDK's
11
+ * event system, including authentication, API, and loading events.
12
+ */
13
+ interface SdkEvent {
14
+ type: string;
15
+ payload?: Record<string, unknown>;
16
+ timestamp?: number;
17
+ }
18
+ interface AuthEvent extends SdkEvent {
19
+ type: "auth_refreshing" | "auth_success" | "auth_error" | "auth_logout";
20
+ payload?: {
21
+ message?: string;
22
+ error?: string;
23
+ operation?: string;
24
+ };
25
+ }
26
+ interface ApiEvent extends SdkEvent {
27
+ type: "api_request" | "api_response" | "api_error";
28
+ payload?: {
29
+ url?: string;
30
+ method?: string;
31
+ status?: number;
32
+ duration?: number;
33
+ error?: string;
34
+ };
35
+ }
36
+ interface LoadingEvent extends SdkEvent {
37
+ type: "loading_start" | "loading_end";
38
+ payload?: {
39
+ operation?: string;
40
+ resource?: string;
41
+ };
42
+ }
43
+ type EventCallback = (event: SdkEvent) => void;
44
+
45
+ /**
46
+ * ------------------------------
47
+ * Plugin Type System with Explicit Context Dependencies
48
+ * ------------------------------
49
+ *
50
+ * This system makes context dependencies explicit to restore TypeScript's
51
+ * ability to catch missing context at compile time.
52
+ */
53
+
54
+ interface PluginDependencies<TSdk = {}, TContext = {}> {
55
+ sdk: TSdk;
56
+ context: TContext;
57
+ }
58
+ interface PluginProvides extends Record<string, any> {
59
+ context?: Record<string, any>;
60
+ }
61
+ interface PluginMeta {
62
+ categories: string[];
63
+ type?: "list" | "item";
64
+ itemType?: string;
65
+ returnType?: string;
66
+ inputSchema: z.ZodSchema;
67
+ outputSchema?: z.ZodSchema;
68
+ resolvers?: Record<string, any>;
69
+ [key: string]: any;
70
+ }
71
+ type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
72
+ type ExtractContextProperties<T extends PluginProvides> = T["context"];
73
+ type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
74
+ getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
75
+ };
76
+ type GetContextType<TPluginProvides extends PluginProvides> = NonNullable<ExtractContextProperties<TPluginProvides>>;
77
+ type PluginOptions<TSdk = {}, TContext = {}> = {
78
+ sdk: TSdk;
79
+ context: TContext & {
80
+ meta: Record<string, any>;
81
+ };
82
+ };
83
+ /**
84
+ * Plugin interface — now has 3 type params:
85
+ *
86
+ * TRequiresContext = what this plugin *needs* in context
87
+ * TProvides = what this plugin *returns* (sdk + context)
88
+ * TSdk = current sdk shape when plugin runs
89
+ */
90
+ interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
91
+ (params: {
92
+ sdk: TSdk;
93
+ context: TRequiresContext & {
94
+ meta: Record<string, PluginMeta>;
95
+ options: BaseSdkOptions;
96
+ };
97
+ }): TProvides;
98
+ }
99
+ type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
100
+ [K in keyof TRequired]: K extends keyof TCurrent ? never : K;
101
+ }[keyof TRequired] : keyof TRequired : never;
102
+ type ContextError<TRequired, TCurrent> = MissingContextKeys<TRequired, TCurrent> extends never ? never : MissingContextKeys<TRequired, TCurrent> extends infer Missing ? Missing extends string ? `❌ Missing required context: { ${Missing}: any }` : Missing extends number ? `❌ Missing required context: { ${Missing}: any }` : `❌ Missing required context properties. Required: ${keyof TRequired extends string ? keyof TRequired : "unknown"}, Available: ${keyof TCurrent extends string ? keyof TCurrent : "unknown"}` : "❌ Context requirement not satisfied";
103
+ /**
104
+ * SDK interface — result of createSdk()
105
+ *
106
+ * addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
107
+ * If not, TypeScript will emit a detailed error showing missing properties.
108
+ */
109
+ type Sdk<TCurrentSdk = {}, TCurrentContext = {
110
+ meta: Record<string, PluginMeta>;
111
+ }> = TCurrentSdk & {
112
+ addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
113
+ getContext(): TCurrentContext;
114
+ }, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
115
+ getContext(): TCurrentContext;
116
+ };
117
+
118
+ /**
119
+ * Event emission types matching Avro schemas for SDK telemetry
120
+ *
121
+ * These interfaces correspond to the Avro schemas:
122
+ * - application_lifecycle_event.avsc
123
+ * - error_occurred_event.avsc
124
+ */
125
+ interface BaseEvent {
126
+ event_id: string;
127
+ timestamp_ms: number;
128
+ release_id: string;
129
+ customuser_id?: number | null;
130
+ account_id?: number | null;
131
+ identity_id?: number | null;
132
+ visitor_id?: string | null;
133
+ correlation_id?: string | null;
134
+ }
135
+ interface ErrorOccurredEvent extends BaseEvent {
136
+ zap_id?: number | null;
137
+ node_id?: number | null;
138
+ selected_api?: string | null;
139
+ app_id?: number | null;
140
+ app_version_id?: number | null;
141
+ error_message: string;
142
+ error_type?: string | null;
143
+ error_status_code?: number | null;
144
+ error_stack_trace?: string | null;
145
+ error_source_method?: string | null;
146
+ error_source_file?: string | null;
147
+ error_line_number?: number | null;
148
+ operation_type?: string | null;
149
+ operation_key?: string | null;
150
+ error_severity?: string | null;
151
+ is_user_facing: boolean;
152
+ is_recoverable?: boolean | null;
153
+ sdk_version?: string | null;
154
+ error_metadata?: Record<string, string | null> | null;
155
+ parent_error_id?: string | null;
156
+ error_occurred_timestamp_ms?: number | null;
157
+ error_code?: string | null;
158
+ recovery_attempted?: boolean | null;
159
+ recovery_action?: string | null;
160
+ recovery_successful?: boolean | null;
161
+ environment?: string | null;
162
+ execution_time_before_error_ms?: number | null;
163
+ }
164
+ interface ApplicationLifecycleEvent extends BaseEvent {
165
+ lifecycle_event_type: "startup" | "exit" | "signal_termination";
166
+ selected_api?: string | null;
167
+ app_id?: number | null;
168
+ app_version_id?: number | null;
169
+ sdk_version?: string | null;
170
+ cli_version?: string | null;
171
+ exit_code?: number | null;
172
+ signal_name?: string | null;
173
+ uptime_ms?: number | null;
174
+ memory_usage_bytes?: number | null;
175
+ peak_memory_usage_bytes?: number | null;
176
+ cpu_time_ms?: number | null;
177
+ os_platform?: string | null;
178
+ os_release?: string | null;
179
+ os_architecture?: string | null;
180
+ platform_versions?: Record<string, string | null> | null;
181
+ environment?: string | null;
182
+ is_ci_environment?: boolean | null;
183
+ ci_platform?: string | null;
184
+ session_id?: string | null;
185
+ metadata?: Record<string, string | null> | null;
186
+ process_argv?: (string | null)[] | null;
187
+ is_graceful_shutdown?: boolean | null;
188
+ shutdown_duration_ms?: number | null;
189
+ active_requests_count?: number | null;
190
+ }
191
+ interface MethodCalledEvent extends BaseEvent {
192
+ method_name: string;
193
+ method_module: string | null;
194
+ execution_duration_ms: number;
195
+ success_flag: boolean;
196
+ error_message: string | null;
197
+ error_type: string | null;
198
+ argument_count: number;
199
+ is_paginated: boolean;
200
+ sdk_version: string;
201
+ environment: string | null;
202
+ selected_api: string | null;
203
+ app_id: number | null;
204
+ app_version_id: number | null;
205
+ zap_id: number | null;
206
+ node_id: number | null;
207
+ operation_type: string | null;
208
+ operation_key: string | null;
209
+ call_context: string | null;
210
+ is_retry: boolean;
211
+ retry_attempt: number | null;
212
+ argument_types: string[] | null;
213
+ return_type: string | null;
214
+ caller_method: string | null;
215
+ call_stack_depth: number | null;
216
+ is_synchronous: boolean | null;
217
+ cpu_time_ms: number | null;
218
+ memory_usage_bytes: number | null;
219
+ }
220
+
221
+ /**
222
+ * Transport abstraction layer for event emission
223
+ *
224
+ * Provides configurable transport mechanisms for emitting telemetry events.
225
+ * All transports implement silent failure to prevent SDK disruption.
226
+ */
227
+ interface EventTransport {
228
+ emit<T extends any>(subject: string, event: T): Promise<void>;
229
+ close?(): Promise<void>;
230
+ }
231
+ interface TransportConfig {
232
+ type: "http" | "console" | "noop";
233
+ endpoint?: string;
234
+ headers?: Record<string, string>;
235
+ retryAttempts?: number;
236
+ retryDelayMs?: number;
237
+ }
238
+
239
+ interface EventContext {
240
+ customuser_id?: number | null;
241
+ account_id?: number | null;
242
+ identity_id?: number | null;
243
+ visitor_id?: string | null;
244
+ correlation_id?: string | null;
245
+ selected_api?: string | null;
246
+ app_id?: number | null;
247
+ app_version_id?: number | null;
248
+ zap_id?: number | null;
249
+ node_id?: number | null;
250
+ environment?: string | null;
251
+ sdk_version?: string | null;
252
+ operation_type?: string | null;
253
+ }
254
+ interface ErrorEventData {
255
+ error_message: string;
256
+ is_user_facing: boolean;
257
+ error_type?: string | null;
258
+ error_status_code?: number | null;
259
+ error_stack_trace?: string | null;
260
+ error_source_method?: string | null;
261
+ error_source_file?: string | null;
262
+ error_line_number?: number | null;
263
+ operation_type?: string | null;
264
+ operation_key?: string | null;
265
+ error_severity?: string | null;
266
+ is_recoverable?: boolean | null;
267
+ error_metadata?: Record<string, string | null> | null;
268
+ parent_error_id?: string | null;
269
+ error_occurred_timestamp_ms?: number | null;
270
+ error_code?: string | null;
271
+ recovery_attempted?: boolean | null;
272
+ recovery_action?: string | null;
273
+ recovery_successful?: boolean | null;
274
+ execution_time_before_error_ms?: number | null;
275
+ }
276
+ interface EnhancedErrorEventData extends ErrorEventData {
277
+ execution_start_time?: number | null;
278
+ }
279
+ interface ApplicationLifecycleEventData {
280
+ lifecycle_event_type: "startup" | "exit" | "signal_termination";
281
+ exit_code?: number | null;
282
+ signal_name?: string | null;
283
+ uptime_ms?: number | null;
284
+ is_graceful_shutdown?: boolean | null;
285
+ shutdown_duration_ms?: number | null;
286
+ memory_usage_bytes?: number | null;
287
+ peak_memory_usage_bytes?: number | null;
288
+ cpu_time_ms?: number | null;
289
+ active_requests_count?: number | null;
290
+ }
291
+ interface MethodCalledEventData {
292
+ method_name: string;
293
+ method_module?: string | null;
294
+ execution_duration_ms: number;
295
+ success_flag: boolean;
296
+ error_message?: string | null;
297
+ error_type?: string | null;
298
+ argument_count: number;
299
+ is_paginated?: boolean;
300
+ }
301
+
302
+ /**
303
+ * Event builder utilities for creating telemetry events
304
+ *
305
+ * Provides builder functions that auto-populate common fields and ensure
306
+ * schema compliance for all event types.
307
+ */
308
+
309
+ declare function createBaseEvent(context?: EventContext): BaseEvent;
310
+ declare function buildErrorEvent(data: ErrorEventData, context?: EventContext): ErrorOccurredEvent;
311
+ declare function buildApplicationLifecycleEvent(data: ApplicationLifecycleEventData, context?: EventContext): ApplicationLifecycleEvent;
312
+ declare function buildErrorEventWithContext(data: EnhancedErrorEventData, context?: EventContext): ErrorOccurredEvent;
313
+ declare function buildMethodCalledEvent(data: MethodCalledEventData, context?: EventContext): MethodCalledEvent;
314
+
315
+ /**
316
+ * Simple utility functions for event emission
317
+ * These are pure functions that can be used to populate common event fields
318
+ */
319
+ /**
320
+ * Generate a unique event ID
321
+ */
322
+ declare function generateEventId(): string;
323
+ /**
324
+ * Get current timestamp in milliseconds since epoch
325
+ */
326
+ declare function getCurrentTimestamp(): number;
327
+ /**
328
+ * Get release ID (git SHA) - in production this would come from build process
329
+ */
330
+ declare function getReleaseId(): string;
331
+ /**
332
+ * Get operating system information
333
+ */
334
+ declare function getOsInfo(): {
335
+ platform: string | null;
336
+ release: string | null;
337
+ architecture: string | null;
338
+ };
339
+ /**
340
+ * Get platform versions (Node.js, npm, etc.)
341
+ */
342
+ declare function getPlatformVersions(): Record<string, string | null>;
343
+ /**
344
+ * Check if running in CI environment
345
+ */
346
+ declare function isCi(): boolean;
347
+ /**
348
+ * Get CI platform name if running in CI
349
+ */
350
+ declare function getCiPlatform(): string | null;
351
+ /**
352
+ * Get memory usage in bytes
353
+ */
354
+ declare function getMemoryUsage(): number | null;
355
+ /**
356
+ * Get CPU time in milliseconds
357
+ */
358
+ declare function getCpuTime(): number | null;
359
+
360
+ /**
361
+ * Event Emission Plugin for Zapier SDK
362
+ *
363
+ * Provides silent telemetry event emission capability to the SDK.
364
+ * All events are emitted asynchronously and failures are silently handled.
365
+ */
366
+
367
+ interface EventEmissionConfig {
368
+ enabled?: boolean;
369
+ transport?: TransportConfig;
370
+ }
371
+ interface EventEmissionContext {
372
+ eventEmission: {
373
+ transport: EventTransport;
374
+ config: EventEmissionConfig;
375
+ emit<T extends any>(subject: string, event: T): void;
376
+ createBaseEvent(): Promise<BaseEvent>;
377
+ emitMethodCalled(data: MethodCalledEventData): void;
378
+ };
379
+ }
380
+ interface EventEmissionProvides {
381
+ context: EventEmissionContext;
382
+ }
383
+
384
+ /**
385
+ * Credentials type definitions
386
+ *
387
+ * The credentials system provides a unified way to authenticate with Zapier APIs.
388
+ * It supports multiple credential types:
389
+ * - String: A token (JWT or API key) used directly
390
+ * - Client credentials: OAuth client ID + secret exchanged for a token
391
+ * - PKCE: OAuth client ID for interactive login (CLI only)
392
+ * - Function: Lazy/dynamic credential resolution
393
+ */
394
+ /**
395
+ * Client credentials for OAuth client_credentials flow.
396
+ * The SDK will exchange these for an access token.
397
+ */
398
+ interface ClientCredentialsObject {
399
+ type?: "client_credentials";
400
+ clientId: string;
401
+ clientSecret: string;
402
+ baseUrl?: string;
403
+ scope?: string;
404
+ }
405
+ /**
406
+ * PKCE credentials for interactive OAuth flow.
407
+ * Only works when @zapier/zapier-sdk-cli-login is available.
408
+ */
409
+ interface PkceCredentialsObject {
410
+ type?: "pkce";
411
+ clientId: string;
412
+ baseUrl?: string;
413
+ scope?: string;
414
+ }
415
+ /**
416
+ * Union of all credential object types.
417
+ */
418
+ type CredentialsObject = ClientCredentialsObject | PkceCredentialsObject;
419
+ /**
420
+ * Resolved credentials - what a credentials function must return.
421
+ * Either a string (token) or a credentials object.
422
+ * Functions are not allowed to return other functions.
423
+ */
424
+ type ResolvedCredentials = string | CredentialsObject;
425
+ /**
426
+ * Credentials can be:
427
+ * - A string (token or API key)
428
+ * - A credentials object (client_credentials or pkce)
429
+ * - A function that returns credentials (sync or async)
430
+ */
431
+ type Credentials = ResolvedCredentials | (() => ResolvedCredentials | Promise<ResolvedCredentials>);
432
+ /**
433
+ * Type guard for client credentials objects.
434
+ */
435
+ declare function isClientCredentials(credentials: ResolvedCredentials): credentials is ClientCredentialsObject;
436
+ /**
437
+ * Type guard for PKCE credentials objects.
438
+ */
439
+ declare function isPkceCredentials(credentials: ResolvedCredentials): credentials is PkceCredentialsObject;
440
+ /**
441
+ * Type guard for credentials objects (either type).
442
+ */
443
+ declare function isCredentialsObject(credentials: ResolvedCredentials): credentials is CredentialsObject;
444
+ /**
445
+ * Type guard for credentials functions.
446
+ */
447
+ declare function isCredentialsFunction(credentials: Credentials): credentials is () => ResolvedCredentials | Promise<ResolvedCredentials>;
448
+
449
+ declare const NeedSchema: z.ZodObject<{
450
+ key: z.ZodString;
451
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
452
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
453
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
454
+ key: z.ZodOptional<z.ZodString>;
455
+ label: z.ZodOptional<z.ZodString>;
456
+ sample: z.ZodOptional<z.ZodString>;
457
+ value: z.ZodOptional<z.ZodString>;
458
+ }, z.core.$strip>>>;
459
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
460
+ custom_field: z.ZodOptional<z.ZodBoolean>;
461
+ default: z.ZodOptional<z.ZodString>;
462
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
463
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
464
+ from_search: z.ZodOptional<z.ZodBoolean>;
465
+ from_write: z.ZodOptional<z.ZodBoolean>;
466
+ help_text: z.ZodOptional<z.ZodString>;
467
+ help_text_html: z.ZodOptional<z.ZodString>;
468
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString>>;
469
+ label: z.ZodOptional<z.ZodString>;
470
+ language: z.ZodOptional<z.ZodString>;
471
+ parent_key: z.ZodOptional<z.ZodString>;
472
+ placeholder: z.ZodOptional<z.ZodString>;
473
+ prefill: z.ZodOptional<z.ZodString>;
474
+ required: z.ZodOptional<z.ZodBoolean>;
475
+ searchfill: z.ZodOptional<z.ZodString>;
476
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
477
+ regex: z.ZodOptional<z.ZodString>;
478
+ type: z.ZodOptional<z.ZodEnum<{
479
+ string: "string";
480
+ boolean: "boolean";
481
+ file: "file";
482
+ integer: "integer";
483
+ text: "text";
484
+ datetime: "datetime";
485
+ decimal: "decimal";
486
+ copy: "copy";
487
+ password: "password";
488
+ dict: "dict";
489
+ code: "code";
490
+ filter: "filter";
491
+ json: "json";
492
+ }>>;
493
+ list: z.ZodOptional<z.ZodBoolean>;
494
+ }, z.core.$strip>;
495
+ declare const ActionSchema: z.ZodObject<{
496
+ id: z.ZodOptional<z.ZodString>;
497
+ type: z.ZodEnum<{
498
+ search: "search";
499
+ filter: "filter";
500
+ read: "read";
501
+ read_bulk: "read_bulk";
502
+ run: "run";
503
+ search_and_write: "search_and_write";
504
+ search_or_write: "search_or_write";
505
+ write: "write";
506
+ }>;
507
+ key: z.ZodString;
508
+ name: z.ZodString;
509
+ description: z.ZodString;
510
+ is_important: z.ZodOptional<z.ZodBoolean>;
511
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
512
+ selected_api: z.ZodOptional<z.ZodString>;
513
+ }, z.core.$strip>;
514
+ declare const ChoiceSchema: z.ZodObject<{
515
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
516
+ label: z.ZodString;
517
+ }, z.core.$strip>;
518
+ declare const FieldSchema: z.ZodObject<{
519
+ key: z.ZodString;
520
+ label: z.ZodString;
521
+ type: z.ZodEnum<{
522
+ string: "string";
523
+ number: "number";
524
+ boolean: "boolean";
525
+ object: "object";
526
+ file: "file";
527
+ array: "array";
528
+ datetime: "datetime";
529
+ }>;
530
+ required: z.ZodBoolean;
531
+ description: z.ZodOptional<z.ZodString>;
532
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
533
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
534
+ label: z.ZodString;
535
+ }, z.core.$strip>>>;
536
+ }, z.core.$strip>;
537
+ declare const ActionExecutionResultSchema: z.ZodObject<{
538
+ data: z.ZodArray<z.ZodUnknown>;
539
+ }, z.core.$strip>;
540
+ declare const ActionFieldChoiceSchema: z.ZodObject<{
541
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
542
+ label: z.ZodString;
543
+ }, z.core.$strip>;
544
+ declare const ActionFieldSchema: z.ZodObject<{
545
+ key: z.ZodString;
546
+ label: z.ZodOptional<z.ZodString>;
547
+ required: z.ZodBoolean;
548
+ type: z.ZodOptional<z.ZodString>;
549
+ helpText: z.ZodOptional<z.ZodString>;
550
+ helpTextHtml: z.ZodOptional<z.ZodString>;
551
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
552
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
553
+ label: z.ZodString;
554
+ }, z.core.$strip>>>;
555
+ default: z.ZodOptional<z.ZodString>;
556
+ placeholder: z.ZodOptional<z.ZodString>;
557
+ computed: z.ZodOptional<z.ZodBoolean>;
558
+ customField: z.ZodOptional<z.ZodBoolean>;
559
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
560
+ format: z.ZodOptional<z.ZodString>;
561
+ inputFormat: z.ZodOptional<z.ZodArray<z.ZodString>>;
562
+ }, z.core.$strip>;
563
+ declare const UserProfileSchema: z.ZodObject<{
564
+ id: z.ZodNumber;
565
+ code: z.ZodString;
566
+ user_id: z.ZodNumber;
567
+ auto_provisioned: z.ZodBoolean;
568
+ first_name: z.ZodString;
569
+ last_name: z.ZodString;
570
+ username: z.ZodString;
571
+ personas: z.ZodString;
572
+ user_generated_personas: z.ZodString;
573
+ last_login: z.ZodString;
574
+ email: z.ZodString;
575
+ email_hash: z.ZodString;
576
+ email_confirmed: z.ZodBoolean;
577
+ timezone: z.ZodString;
578
+ photo_url: z.ZodString;
579
+ has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
580
+ signup: z.ZodString;
581
+ since_signup: z.ZodString;
582
+ has_activated: z.ZodBoolean;
583
+ enable_gz_creator: z.ZodBoolean;
584
+ should_see_nps_survey: z.ZodBoolean;
585
+ is_developer: z.ZodBoolean;
586
+ is_expert: z.ZodBoolean;
587
+ tos_agreement: z.ZodBoolean;
588
+ should_renew_tos: z.ZodBoolean;
589
+ is_gdpr_consented: z.ZodBoolean;
590
+ disable_ssl_check: z.ZodBoolean;
591
+ identity: z.ZodNumber;
592
+ summary_schedule: z.ZodString;
593
+ alert_triggers: z.ZodString;
594
+ alert_actions: z.ZodString;
595
+ is_staff: z.ZodBoolean;
596
+ is_zt_reviewer: z.ZodBoolean;
597
+ is_high_value: z.ZodBoolean;
598
+ is_temporary: z.ZodBoolean;
599
+ banner_message: z.ZodString;
600
+ enable_totp_2fa: z.ZodBoolean;
601
+ viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
602
+ show_editor_migration_mesaging: z.ZodBoolean;
603
+ switches: z.ZodRecord<z.ZodString, z.ZodUnknown>;
604
+ organizations: z.ZodArray<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
605
+ primary_organization: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
606
+ has_active_zaps: z.ZodBoolean;
607
+ has_google_sso: z.ZodBoolean;
608
+ auth_realm: z.ZodString;
609
+ roles: z.ZodArray<z.ZodObject<{
610
+ account_id: z.ZodNumber;
611
+ role: z.ZodString;
612
+ }, z.core.$strip>>;
613
+ }, z.core.$strip>;
614
+ declare const AppSchema: z.ZodObject<{
615
+ age_in_days: z.ZodOptional<z.ZodString>;
616
+ api_docs_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
617
+ app_profile_url: z.ZodString;
618
+ banner: z.ZodOptional<z.ZodString>;
619
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
620
+ canonical_id: z.ZodOptional<z.ZodString>;
621
+ current_implementation_id: z.ZodString;
622
+ days_since_last_update: z.ZodOptional<z.ZodString>;
623
+ description: z.ZodString;
624
+ external_url: z.ZodString;
625
+ hashtag: z.ZodOptional<z.ZodString>;
626
+ id: z.ZodOptional<z.ZodNumber>;
627
+ image: z.ZodOptional<z.ZodString>;
628
+ images: z.ZodOptional<z.ZodString>;
629
+ integration_overview_html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
630
+ internal_id: z.ZodString;
631
+ invite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
632
+ is_beta: z.ZodOptional<z.ZodString>;
633
+ is_built_in: z.ZodOptional<z.ZodString>;
634
+ is_featured: z.ZodOptional<z.ZodString>;
635
+ is_premium: z.ZodOptional<z.ZodBoolean>;
636
+ is_public: z.ZodOptional<z.ZodString>;
637
+ is_upcoming: z.ZodOptional<z.ZodString>;
638
+ learn_more_url: z.ZodString;
639
+ name: z.ZodString;
640
+ popularity: z.ZodNumber;
641
+ primary_color: z.ZodString;
642
+ request_count: z.ZodOptional<z.ZodString>;
643
+ slug: z.ZodString;
644
+ zap_usage_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
645
+ }, z.core.$strip>;
646
+ declare const NeedsRequestSchema: z.ZodObject<{
647
+ selected_api: z.ZodString;
648
+ action: z.ZodString;
649
+ type_of: z.ZodString;
650
+ authentication_id: z.ZodOptional<z.ZodNumber>;
651
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
652
+ }, z.core.$strip>;
653
+ declare const NeedsResponseSchema: z.ZodObject<{
654
+ success: z.ZodBoolean;
655
+ needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
656
+ key: z.ZodString;
657
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
658
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
659
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
660
+ key: z.ZodOptional<z.ZodString>;
661
+ label: z.ZodOptional<z.ZodString>;
662
+ sample: z.ZodOptional<z.ZodString>;
663
+ value: z.ZodOptional<z.ZodString>;
664
+ }, z.core.$strip>>>;
665
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
666
+ custom_field: z.ZodOptional<z.ZodBoolean>;
667
+ default: z.ZodOptional<z.ZodString>;
668
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
669
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
670
+ from_search: z.ZodOptional<z.ZodBoolean>;
671
+ from_write: z.ZodOptional<z.ZodBoolean>;
672
+ help_text: z.ZodOptional<z.ZodString>;
673
+ help_text_html: z.ZodOptional<z.ZodString>;
674
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString>>;
675
+ label: z.ZodOptional<z.ZodString>;
676
+ language: z.ZodOptional<z.ZodString>;
677
+ parent_key: z.ZodOptional<z.ZodString>;
678
+ placeholder: z.ZodOptional<z.ZodString>;
679
+ prefill: z.ZodOptional<z.ZodString>;
680
+ required: z.ZodOptional<z.ZodBoolean>;
681
+ searchfill: z.ZodOptional<z.ZodString>;
682
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
683
+ regex: z.ZodOptional<z.ZodString>;
684
+ type: z.ZodOptional<z.ZodEnum<{
685
+ string: "string";
686
+ boolean: "boolean";
687
+ file: "file";
688
+ integer: "integer";
689
+ text: "text";
690
+ datetime: "datetime";
691
+ decimal: "decimal";
692
+ copy: "copy";
693
+ password: "password";
694
+ dict: "dict";
695
+ code: "code";
696
+ filter: "filter";
697
+ json: "json";
698
+ }>>;
699
+ list: z.ZodOptional<z.ZodBoolean>;
700
+ }, z.core.$strip>>>;
701
+ errors: z.ZodOptional<z.ZodArray<z.ZodString>>;
702
+ last_fetched_at: z.ZodOptional<z.ZodString>;
703
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
704
+ }, z.core.$strip>;
705
+
706
+ /**
707
+ * API Client Type Definitions
708
+ *
709
+ * This module contains all type definitions related to the Zapier API client,
710
+ * including configuration options, client interfaces, request/response types,
711
+ * and API response models.
712
+ *
713
+ * API response model types are inferred from Zod schemas defined in api/schemas.ts
714
+ * to ensure a single source of truth and eliminate duplication.
715
+ */
716
+
717
+ interface ApiClient {
718
+ get: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
719
+ post: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
720
+ put: <T = unknown>(path: string, data?: unknown, options?: RequestOptions) => Promise<T>;
721
+ delete: <T = unknown>(path: string, options?: RequestOptions) => Promise<T>;
722
+ poll: <T = unknown>(path: string, options?: PollOptions) => Promise<T>;
723
+ fetch: (path: string, init?: RequestInit & {
724
+ searchParams?: Record<string, string>;
725
+ authRequired?: boolean;
726
+ }) => Promise<Response>;
727
+ }
728
+ interface RequestOptions {
729
+ headers?: Record<string, string>;
730
+ searchParams?: Record<string, string>;
731
+ authRequired?: boolean;
732
+ customErrorHandler?: (errorInfo: {
733
+ status: number;
734
+ statusText: string;
735
+ data: unknown;
736
+ }) => Error | undefined;
737
+ }
738
+ interface PollOptions extends RequestOptions {
739
+ initialDelay?: number;
740
+ timeoutMs?: number;
741
+ successStatus?: number;
742
+ pendingStatus?: number;
743
+ resultExtractor?: (response: unknown) => unknown;
744
+ }
745
+ type Need = z.infer<typeof NeedSchema>;
746
+ type Action = z.infer<typeof ActionSchema>;
747
+ type Choice = z.infer<typeof ChoiceSchema>;
748
+ type Field = z.infer<typeof FieldSchema>;
749
+ type ActionExecutionResult = z.infer<typeof ActionExecutionResultSchema>;
750
+ type ActionFieldChoice = z.infer<typeof ActionFieldChoiceSchema>;
751
+ type ActionField = z.infer<typeof ActionFieldSchema>;
752
+ type Authentication = z.infer<typeof AuthenticationSchema>;
753
+ type AuthenticationsResponse = z.infer<typeof AuthenticationsResponseSchema>;
754
+ type UserProfile = z.infer<typeof UserProfileSchema>;
755
+ type App = z.infer<typeof AppSchema>;
756
+ type NeedsRequest = z.infer<typeof NeedsRequestSchema>;
757
+ type NeedsResponse = z.infer<typeof NeedsResponseSchema>;
758
+
759
+ /**
760
+ * Domain utility functions for working with app identifiers and data normalization
761
+ */
762
+
763
+ interface AppLocator {
764
+ lookupAppKey: string;
765
+ slug?: string;
766
+ implementationName?: string;
767
+ version?: string;
768
+ }
769
+ interface ResolvedAppLocator extends AppLocator {
770
+ implementationName: string;
771
+ }
772
+
773
+ declare const DEFAULT_CONFIG_PATH: ".zapierrc";
774
+ type ManifestEntry = {
775
+ implementationName: string;
776
+ version?: string;
777
+ };
778
+ type GetVersionedImplementationId = (appKey: string) => Promise<string | null>;
779
+ /**
780
+ * Action entry for storing saved action configurations
781
+ * The key in the actions record IS the user-provided name
782
+ */
783
+ declare const ActionEntrySchema: z.ZodObject<{
784
+ appKey: z.ZodString;
785
+ actionKey: z.ZodString;
786
+ actionType: z.ZodString;
787
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
788
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
789
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
790
+ createdAt: z.ZodString;
791
+ }, z.core.$strip>;
792
+ type ActionEntry = z.infer<typeof ActionEntrySchema>;
793
+ type Manifest = {
794
+ apps: Record<string, ManifestEntry>;
795
+ actions?: Record<string, ActionEntry>;
796
+ };
797
+ type ResolveAppKeys = ({ appKeys, }: {
798
+ appKeys: string[];
799
+ }) => Promise<ResolvedAppLocator[]>;
800
+ declare const ManifestPluginOptionsSchema: z.ZodObject<{
801
+ manifestPath: z.ZodOptional<z.ZodString>;
802
+ manifest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
803
+ implementationName: z.ZodString;
804
+ version: z.ZodOptional<z.ZodString>;
805
+ }, z.core.$strip>>>;
806
+ }, z.core.$strip>;
807
+
808
+ type ManifestPluginOptions = z.infer<typeof ManifestPluginOptionsSchema>;
809
+ interface UpdateManifestEntryOptions {
810
+ appKey: string;
811
+ entry: ManifestEntry;
812
+ configPath?: string;
813
+ skipWrite?: boolean;
814
+ manifest?: Manifest;
815
+ }
816
+ interface UpdateManifestEntryResult {
817
+ key: string;
818
+ entry: ManifestEntry;
819
+ manifest: Manifest;
820
+ }
821
+ interface AddActionEntryOptions {
822
+ name: string;
823
+ entry: ActionEntry;
824
+ configPath?: string;
825
+ skipWrite?: boolean;
826
+ manifest?: Manifest;
827
+ }
828
+ interface AddActionEntryResult {
829
+ name: string;
830
+ entry: ActionEntry;
831
+ manifest: Manifest;
832
+ }
833
+ interface ManifestPluginProvides {
834
+ context: {
835
+ getVersionedImplementationId: GetVersionedImplementationId;
836
+ resolveAppKeys: ResolveAppKeys;
837
+ updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
838
+ addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
839
+ findActionEntry: (options: {
840
+ name: string;
841
+ manifest: Manifest;
842
+ }) => ActionEntry | null;
843
+ listActionEntries: (options?: {
844
+ configPath?: string;
845
+ }) => Promise<Array<[string, ActionEntry]>>;
846
+ deleteActionEntry: (options: {
847
+ name: string;
848
+ configPath?: string;
849
+ skipWrite?: boolean;
850
+ }) => Promise<Manifest>;
851
+ hasActionEntry: (options: {
852
+ name: string;
853
+ manifest: Manifest;
854
+ }) => boolean;
855
+ findManifestEntry: (options: {
856
+ appKey: string;
857
+ manifest: Manifest;
858
+ }) => [string, ManifestEntry] | null;
859
+ readManifestFromFile: (filePath: string) => Promise<Manifest | null>;
860
+ };
861
+ }
862
+ /**
863
+ * Read manifest from a file path asynchronously
864
+ * Supports local files (Node.js) and browser environments (fallback to global filesystem)
865
+ */
866
+ declare function readManifestFromFile(filePath: string): Promise<Manifest | null>;
867
+ /**
868
+ * Get the preferred key for storing an app in the manifest
869
+ * Extracted from plugin to make it easier to test
870
+ */
871
+ declare function getPreferredManifestEntryKey({ appKey, api, }: {
872
+ appKey: string;
873
+ api: ApiClient;
874
+ }): Promise<string>;
875
+ /**
876
+ * Find a manifest entry by any app key (implementation name, slug, etc.).
877
+ */
878
+ declare function findManifestEntry({ appKey, manifest, }: {
879
+ appKey: string;
880
+ manifest: Manifest;
881
+ }): [string, ManifestEntry] | null;
882
+
883
+ declare const manifestPlugin: Plugin<{}, // no SDK dependencies
884
+ {
885
+ api: ApiClient;
886
+ }, ManifestPluginProvides>;
887
+
888
+ /**
889
+ * Function-related types and interfaces
890
+ */
891
+ interface FunctionOptions {
892
+ /** Base URL for Zapier API */
893
+ baseUrl?: string;
894
+ /** Authentication token */
895
+ token?: string;
896
+ /** Function to dynamically resolve authentication token */
897
+ getToken?: () => Promise<string | undefined>;
898
+ /** Optional pre-instantiated API client */
899
+ api?: ApiClient;
900
+ /** Enable debug logging */
901
+ debug?: boolean;
902
+ /** Custom fetch implementation */
903
+ fetch?: typeof globalThis.fetch;
904
+ }
905
+ type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => Promise<{
906
+ data: TItem[];
907
+ }> & AsyncIterable<{
908
+ data: TItem[];
909
+ nextCursor?: string;
910
+ }> & {
911
+ items(): AsyncIterable<TItem>;
912
+ };
913
+
914
+ /**
915
+ * Standard error format returned by the Zapier API
916
+ */
917
+ interface ApiError {
918
+ status: number;
919
+ code: string;
920
+ title: string;
921
+ detail: string;
922
+ source?: unknown;
923
+ meta?: unknown;
924
+ }
925
+ /**
926
+ * Base options for all error constructors
927
+ */
928
+ interface ErrorOptions {
929
+ statusCode?: number;
930
+ errors?: ApiError[];
931
+ cause?: unknown;
932
+ response?: unknown;
933
+ }
934
+ /**
935
+ * Base class for all Zapier SDK errors
936
+ * Use instanceof ZapierError to check if an error is from the SDK
937
+ */
938
+ declare abstract class ZapierError extends Error {
939
+ abstract readonly name: string;
940
+ statusCode?: number;
941
+ errors?: ApiError[];
942
+ cause?: unknown;
943
+ response?: unknown;
944
+ constructor(message: string, options?: ErrorOptions);
945
+ }
946
+ /**
947
+ * Error thrown when API requests fail
948
+ */
949
+ declare class ZapierApiError extends ZapierError {
950
+ readonly name = "ZapierApiError";
951
+ constructor(message: string, options?: ErrorOptions);
952
+ }
953
+ /**
954
+ * Error thrown when an app is not found
955
+ */
956
+ declare class ZapierAppNotFoundError extends ZapierError {
957
+ readonly name = "ZapierAppNotFoundError";
958
+ appKey?: string;
959
+ constructor(message: string, options?: ErrorOptions & {
960
+ appKey?: string;
961
+ });
962
+ }
963
+ /**
964
+ * Error thrown when validation fails (e.g., invalid parameters)
965
+ */
966
+ declare class ZapierValidationError extends ZapierError {
967
+ readonly name = "ZapierValidationError";
968
+ details?: unknown;
969
+ constructor(message: string, options?: ErrorOptions & {
970
+ details?: unknown;
971
+ });
972
+ }
973
+ /**
974
+ * Error for unrecognized/unknown errors that get wrapped by safe functions
975
+ */
976
+ declare class ZapierUnknownError extends ZapierError {
977
+ readonly name = "ZapierUnknownError";
978
+ constructor(message: string, options?: ErrorOptions);
979
+ }
980
+ /**
981
+ * Error thrown for authentication and authorization failures (401/403)
982
+ */
983
+ declare class ZapierAuthenticationError extends ZapierError {
984
+ readonly name = "ZapierAuthenticationError";
985
+ constructor(message: string, options?: ErrorOptions);
986
+ }
987
+ /**
988
+ * Error thrown when a requested resource is not found
989
+ */
990
+ declare class ZapierResourceNotFoundError extends ZapierError {
991
+ readonly name = "ZapierResourceNotFoundError";
992
+ resourceType?: string;
993
+ resourceId?: string;
994
+ constructor(message: string, options?: ErrorOptions & {
995
+ resourceType?: string;
996
+ resourceId?: string;
997
+ });
998
+ }
999
+ /**
1000
+ * Error thrown when required app or implementation configuration is missing
1001
+ */
1002
+ declare class ZapierConfigurationError extends ZapierError {
1003
+ readonly name = "ZapierConfigurationError";
1004
+ configType?: string;
1005
+ constructor(message: string, options?: ErrorOptions & {
1006
+ configType?: string;
1007
+ });
1008
+ }
1009
+ /**
1010
+ * Error thrown when code bundling or compilation fails
1011
+ */
1012
+ declare class ZapierBundleError extends ZapierError {
1013
+ readonly name = "ZapierBundleError";
1014
+ buildErrors?: string[];
1015
+ constructor(message: string, options?: ErrorOptions & {
1016
+ buildErrors?: string[];
1017
+ });
1018
+ }
1019
+ /**
1020
+ * Error thrown when operations timeout or exceed retry limits
1021
+ */
1022
+ declare class ZapierTimeoutError extends ZapierError {
1023
+ readonly name = "ZapierTimeoutError";
1024
+ attempts?: number;
1025
+ maxAttempts?: number;
1026
+ constructor(message: string, options?: ErrorOptions & {
1027
+ attempts?: number;
1028
+ maxAttempts?: number;
1029
+ });
1030
+ }
1031
+ /**
1032
+ * Error thrown when action execution fails due to errors returned from the third-party service
1033
+ * This happens when the Actions API returns a 200 status but includes errors in the response
1034
+ */
1035
+ declare class ZapierActionError extends ZapierError {
1036
+ readonly name = "ZapierActionError";
1037
+ appKey?: string;
1038
+ actionKey?: string;
1039
+ constructor(message: string, options?: ErrorOptions & {
1040
+ appKey?: string;
1041
+ actionKey?: string;
1042
+ });
1043
+ get actionErrors(): ApiError[] | undefined;
1044
+ }
1045
+ /**
1046
+ * Error thrown when a resource is not found (404)
1047
+ */
1048
+ declare class ZapierNotFoundError extends ZapierError {
1049
+ readonly name = "ZapierNotFoundError";
1050
+ constructor(message: string, options?: ErrorOptions);
1051
+ }
1052
+ /**
1053
+ * Utility function to format error messages for display
1054
+ */
1055
+ declare function formatErrorMessage(error: ZapierError): string;
1056
+
1057
+ declare const ListInputFieldsSchema: z.ZodObject<{
1058
+ appKey: z.ZodString & {
1059
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1060
+ };
1061
+ actionType: z.ZodEnum<{
1062
+ search: "search";
1063
+ filter: "filter";
1064
+ read: "read";
1065
+ read_bulk: "read_bulk";
1066
+ run: "run";
1067
+ search_and_write: "search_and_write";
1068
+ search_or_write: "search_or_write";
1069
+ write: "write";
1070
+ }>;
1071
+ actionKey: z.ZodString;
1072
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1073
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1074
+ pageSize: z.ZodOptional<z.ZodNumber>;
1075
+ maxItems: z.ZodOptional<z.ZodNumber>;
1076
+ cursor: z.ZodOptional<z.ZodString>;
1077
+ }, z.core.$strip>;
1078
+ type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
1079
+
1080
+ declare const FindFirstAuthenticationSchema: z.ZodObject<{
1081
+ search: z.ZodOptional<z.ZodString>;
1082
+ title: z.ZodOptional<z.ZodString>;
1083
+ appKey: z.ZodOptional<z.ZodString & {
1084
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1085
+ }>;
1086
+ accountId: z.ZodOptional<z.ZodString>;
1087
+ owner: z.ZodOptional<z.ZodString>;
1088
+ isExpired: z.ZodOptional<z.ZodBoolean>;
1089
+ }, z.core.$strip>;
1090
+ type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
1091
+
1092
+ declare const FindUniqueAuthenticationSchema: z.ZodObject<{
1093
+ search: z.ZodOptional<z.ZodString>;
1094
+ title: z.ZodOptional<z.ZodString>;
1095
+ appKey: z.ZodOptional<z.ZodString & {
1096
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1097
+ }>;
1098
+ accountId: z.ZodOptional<z.ZodString>;
1099
+ owner: z.ZodOptional<z.ZodString>;
1100
+ isExpired: z.ZodOptional<z.ZodBoolean>;
1101
+ }, z.core.$strip>;
1102
+ type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
1103
+
1104
+ declare const RelayRequestSchema: z.ZodObject<{
1105
+ url: z.ZodString;
1106
+ method: z.ZodOptional<z.ZodEnum<{
1107
+ POST: "POST";
1108
+ GET: "GET";
1109
+ PUT: "PUT";
1110
+ DELETE: "DELETE";
1111
+ PATCH: "PATCH";
1112
+ HEAD: "HEAD";
1113
+ OPTIONS: "OPTIONS";
1114
+ }>>;
1115
+ body: z.ZodOptional<z.ZodAny>;
1116
+ authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1117
+ callbackUrl: z.ZodOptional<z.ZodString>;
1118
+ authenticationTemplate: z.ZodOptional<z.ZodString>;
1119
+ headers: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodCustom<Headers, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>]>>;
1120
+ relayBaseUrl: z.ZodOptional<z.ZodString>;
1121
+ _telemetry: z.ZodOptional<z.ZodObject<{
1122
+ isNested: z.ZodOptional<z.ZodBoolean>;
1123
+ }, z.core.$strip>>;
1124
+ }, z.core.$strip>;
1125
+ type RelayRequestOptions = z.infer<typeof RelayRequestSchema>;
1126
+ declare const RelayFetchSchema: z.ZodObject<{
1127
+ url: z.ZodString;
1128
+ method: z.ZodOptional<z.ZodEnum<{
1129
+ POST: "POST";
1130
+ GET: "GET";
1131
+ PUT: "PUT";
1132
+ DELETE: "DELETE";
1133
+ PATCH: "PATCH";
1134
+ HEAD: "HEAD";
1135
+ OPTIONS: "OPTIONS";
1136
+ }>>;
1137
+ body: z.ZodOptional<z.ZodAny>;
1138
+ authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1139
+ callbackUrl: z.ZodOptional<z.ZodString>;
1140
+ authenticationTemplate: z.ZodOptional<z.ZodString>;
1141
+ headers: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodString>, z.ZodCustom<Headers, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>]>>;
1142
+ relayBaseUrl: z.ZodOptional<z.ZodString>;
1143
+ _telemetry: z.ZodOptional<z.ZodObject<{
1144
+ isNested: z.ZodOptional<z.ZodBoolean>;
1145
+ }, z.core.$strip>>;
1146
+ }, z.core.$strip>;
1147
+
1148
+ interface RegistryPluginProvides {
1149
+ getRegistry: (options?: {
1150
+ package?: string;
1151
+ }) => {
1152
+ functions: FunctionRegistryEntry[];
1153
+ categories: {
1154
+ key: string;
1155
+ title: string;
1156
+ titlePlural: string;
1157
+ functions: string[];
1158
+ }[];
1159
+ };
1160
+ }
1161
+ declare const registryPlugin: Plugin<{}, // accepts any SDK shape
1162
+ {}, // requires no context
1163
+ RegistryPluginProvides>;
1164
+
1165
+ declare const GetProfileSchema: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
1166
+ type GetProfileOptions = z.infer<typeof GetProfileSchema> & FunctionOptions;
1167
+
1168
+ interface GetProfilePluginProvides {
1169
+ getProfile: (options?: GetProfileOptions) => Promise<{
1170
+ data: UserProfileItem;
1171
+ }>;
1172
+ context: {
1173
+ meta: {
1174
+ getProfile: {
1175
+ inputSchema: typeof GetProfileSchema;
1176
+ };
1177
+ };
1178
+ };
1179
+ }
1180
+ declare const getProfilePlugin: Plugin<{}, // no SDK dependencies
1181
+ // no SDK dependencies
1182
+ {
1183
+ api: ApiClient;
1184
+ } & EventEmissionContext, // requires api and eventEmission in context
1185
+ GetProfilePluginProvides>;
1186
+
1187
+ interface ApiPluginOptions extends BaseSdkOptions {
1188
+ }
1189
+ interface ApiPluginProvides {
1190
+ context: {
1191
+ api: ApiClient;
1192
+ resolveCredentials: () => Promise<ResolvedCredentials | undefined>;
1193
+ };
1194
+ }
1195
+ declare const apiPlugin: Plugin<{}, {}, ApiPluginProvides>;
1196
+
1197
+ declare const AppKeyPropertySchema: z.ZodString & {
1198
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1199
+ };
1200
+ declare const ActionTypePropertySchema: z.ZodEnum<{
1201
+ search: "search";
1202
+ filter: "filter";
1203
+ read: "read";
1204
+ read_bulk: "read_bulk";
1205
+ run: "run";
1206
+ search_and_write: "search_and_write";
1207
+ search_or_write: "search_or_write";
1208
+ write: "write";
1209
+ }>;
1210
+ declare const ActionKeyPropertySchema: z.ZodString;
1211
+ declare const AuthenticationIdPropertySchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1212
+ declare const InputsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1213
+ declare const LimitPropertySchema: z.ZodDefault<z.ZodNumber>;
1214
+ declare const OffsetPropertySchema: z.ZodDefault<z.ZodNumber>;
1215
+ declare const OutputPropertySchema: z.ZodString;
1216
+ declare const DebugPropertySchema: z.ZodDefault<z.ZodBoolean>;
1217
+ declare const ParamsPropertySchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1218
+ type AppKeyProperty = z.infer<typeof AppKeyPropertySchema>;
1219
+ type ActionTypeProperty = z.infer<typeof ActionTypePropertySchema>;
1220
+ type ActionKeyProperty = z.infer<typeof ActionKeyPropertySchema>;
1221
+ type AuthenticationIdProperty = z.infer<typeof AuthenticationIdPropertySchema>;
1222
+ type InputsProperty = z.infer<typeof InputsPropertySchema>;
1223
+ type LimitProperty = z.infer<typeof LimitPropertySchema>;
1224
+ type OffsetProperty = z.infer<typeof OffsetPropertySchema>;
1225
+ type OutputProperty = z.infer<typeof OutputPropertySchema>;
1226
+ type DebugProperty = z.infer<typeof DebugPropertySchema>;
1227
+ type ParamsProperty = z.infer<typeof ParamsPropertySchema>;
1228
+
1229
+ declare const ActionExecutionInputSchema: z.ZodObject<{
1230
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1231
+ authenticationId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1232
+ }, z.core.$strip>;
1233
+ type ActionExecutionOptions = z.infer<typeof ActionExecutionInputSchema>;
1234
+ declare const AppFactoryInputSchema: z.ZodObject<{
1235
+ authenticationId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1236
+ }, z.core.$strip>;
1237
+ type AppFactoryInput = z.infer<typeof AppFactoryInputSchema>;
1238
+ interface BaseActionTypeProxy {
1239
+ [action: string]: (options?: ActionExecutionOptions) => Promise<{
1240
+ data: any[];
1241
+ nextCursor?: string;
1242
+ }> & AsyncIterable<{
1243
+ data: any[];
1244
+ nextCursor?: string;
1245
+ }> & {
1246
+ items(): AsyncIterable<any>;
1247
+ };
1248
+ }
1249
+ interface FetchActionType {
1250
+ fetch: (url: string | URL, init?: RequestInit & {
1251
+ authenticationId?: AuthenticationIdProperty;
1252
+ callbackUrl?: string;
1253
+ authenticationTemplate?: string;
1254
+ }) => Promise<Response>;
1255
+ }
1256
+ type ActionTypeProxy = BaseActionTypeProxy & Partial<FetchActionType>;
1257
+ interface AppProxy {
1258
+ [type: string]: ActionTypeProxy;
1259
+ }
1260
+ interface AppFactory {
1261
+ (options: AppFactoryInput): AppProxy;
1262
+ }
1263
+ type AppProxyWithFactory = AppFactory & AppProxy;
1264
+ interface ActionProxy {
1265
+ [app: string]: AppProxyWithFactory;
1266
+ }
1267
+
1268
+ interface RequestPluginProvides {
1269
+ request: (options: RelayRequestOptions) => Promise<Response>;
1270
+ context: {
1271
+ meta: {
1272
+ request: {
1273
+ inputSchema: typeof RelayRequestSchema;
1274
+ };
1275
+ };
1276
+ };
1277
+ }
1278
+ declare const requestPlugin: Plugin<{}, // no SDK dependencies
1279
+ // no SDK dependencies
1280
+ {
1281
+ api: ApiClient;
1282
+ } & EventEmissionContext, // requires api in context
1283
+ RequestPluginProvides>;
1284
+
1285
+ interface FetchPluginProvides {
1286
+ fetch: (url: string | URL, init?: RequestInit & {
1287
+ authenticationId?: string | number;
1288
+ callbackUrl?: string;
1289
+ authenticationTemplate?: string;
1290
+ }) => Promise<Response>;
1291
+ context: {
1292
+ meta: {
1293
+ fetch: {
1294
+ packages: string[];
1295
+ categories: string[];
1296
+ returnType: string;
1297
+ inputParameters: Array<{
1298
+ name: string;
1299
+ schema: z.ZodSchema;
1300
+ }>;
1301
+ };
1302
+ };
1303
+ };
1304
+ }
1305
+ /**
1306
+ * Direct plugin function - takes options + sdk + context in one object
1307
+ */
1308
+ declare const fetchPlugin: Plugin<GetSdkType<RequestPluginProvides>, // requires request in SDK
1309
+ EventEmissionContext, // requires eventEmission context for telemetry
1310
+ FetchPluginProvides>;
1311
+ type ZapierFetchInitOptions = RequestInit & {
1312
+ authenticationId?: string | number;
1313
+ callbackUrl?: string;
1314
+ authenticationTemplate?: string;
1315
+ };
1316
+
1317
+ declare const RunActionSchema: z.ZodObject<{
1318
+ appKey: z.ZodString & {
1319
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1320
+ };
1321
+ actionType: z.ZodEnum<{
1322
+ search: "search";
1323
+ filter: "filter";
1324
+ read: "read";
1325
+ read_bulk: "read_bulk";
1326
+ run: "run";
1327
+ search_and_write: "search_and_write";
1328
+ search_or_write: "search_or_write";
1329
+ write: "write";
1330
+ }>;
1331
+ actionKey: z.ZodString;
1332
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1333
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1334
+ pageSize: z.ZodOptional<z.ZodNumber>;
1335
+ maxItems: z.ZodOptional<z.ZodNumber>;
1336
+ cursor: z.ZodOptional<z.ZodString>;
1337
+ }, z.core.$strip>;
1338
+ type RunActionOptions = z.infer<typeof RunActionSchema>;
1339
+
1340
+ declare const GetActionSchema: z.ZodObject<{
1341
+ appKey: z.ZodString & {
1342
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1343
+ };
1344
+ actionType: z.ZodEnum<{
1345
+ search: "search";
1346
+ filter: "filter";
1347
+ read: "read";
1348
+ read_bulk: "read_bulk";
1349
+ run: "run";
1350
+ search_and_write: "search_and_write";
1351
+ search_or_write: "search_or_write";
1352
+ write: "write";
1353
+ }>;
1354
+ actionKey: z.ZodString;
1355
+ _telemetry: z.ZodOptional<z.ZodObject<{
1356
+ isNested: z.ZodOptional<z.ZodBoolean>;
1357
+ }, z.core.$strip>>;
1358
+ }, z.core.$strip>;
1359
+ type GetActionOptions = z.infer<typeof GetActionSchema>;
1360
+
1361
+ declare const ListActionsSchema: z.ZodObject<{
1362
+ appKey: z.ZodString & {
1363
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1364
+ };
1365
+ actionType: z.ZodOptional<z.ZodEnum<{
1366
+ search: "search";
1367
+ filter: "filter";
1368
+ read: "read";
1369
+ read_bulk: "read_bulk";
1370
+ run: "run";
1371
+ search_and_write: "search_and_write";
1372
+ search_or_write: "search_or_write";
1373
+ write: "write";
1374
+ }>>;
1375
+ pageSize: z.ZodOptional<z.ZodNumber>;
1376
+ maxItems: z.ZodOptional<z.ZodNumber>;
1377
+ cursor: z.ZodOptional<z.ZodString>;
1378
+ _telemetry: z.ZodOptional<z.ZodObject<{
1379
+ isNested: z.ZodOptional<z.ZodBoolean>;
1380
+ }, z.core.$strip>>;
1381
+ }, z.core.$strip>;
1382
+ type ListActionsOptions = z.infer<typeof ListActionsSchema>;
1383
+
1384
+ interface ListActionsPluginProvides {
1385
+ listActions: (options?: ListActionsOptions) => Promise<{
1386
+ data: ActionItem$1[];
1387
+ nextCursor?: string;
1388
+ }> & AsyncIterable<{
1389
+ data: ActionItem$1[];
1390
+ nextCursor?: string;
1391
+ }> & {
1392
+ items(): AsyncIterable<ActionItem$1>;
1393
+ };
1394
+ context: {
1395
+ meta: {
1396
+ listActions: {
1397
+ inputSchema: typeof ListActionsSchema;
1398
+ };
1399
+ };
1400
+ };
1401
+ }
1402
+ declare const listActionsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
1403
+ api: ApiClient;
1404
+ getVersionedImplementationId: GetVersionedImplementationId;
1405
+ } & EventEmissionContext, ListActionsPluginProvides>;
1406
+
1407
+ interface GetActionPluginProvides {
1408
+ getAction: (options: GetActionOptions) => Promise<{
1409
+ data: ActionItem$1;
1410
+ }>;
1411
+ context: {
1412
+ meta: {
1413
+ getAction: {
1414
+ inputSchema: typeof GetActionSchema;
1415
+ };
1416
+ };
1417
+ };
1418
+ }
1419
+ declare const getActionPlugin: Plugin<GetSdkType<ListActionsPluginProvides>, // requires listActions in SDK
1420
+ // requires listActions in SDK
1421
+ {
1422
+ api: ApiClient;
1423
+ } & EventEmissionContext, // requires api in context
1424
+ GetActionPluginProvides>;
1425
+
1426
+ declare const GetAppSchema: z.ZodObject<{
1427
+ appKey: z.ZodString & {
1428
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1429
+ };
1430
+ }, z.core.$strip>;
1431
+ type GetAppOptions = z.infer<typeof GetAppSchema>;
1432
+
1433
+ /**
1434
+ * Plugin schemas for listApps
1435
+ *
1436
+ * Imports base query schema from @zapier/zapier-sdk-core (sdkapi) and extends
1437
+ * with SDK-specific options.
1438
+ *
1439
+ * Note: The sdkapi endpoint uses ListAppsQuerySchema (HTTP query params),
1440
+ * but the SDK exposes ListAppsSchema (user-friendly options):
1441
+ * - ListAppsOptions accepts `appKeys` as array, `cursor`, `maxItems`
1442
+ * - ListAppsQuery accepts `appKeys` as comma-separated string, `offset`
1443
+ * - The plugin transforms between these formats
1444
+ */
1445
+
1446
+ /**
1447
+ * SDK user-facing options for listApps
1448
+ *
1449
+ * Extends ListAppsQuerySchema from zapier-sdk-core with SDK-specific options:
1450
+ * - appKeys: array (not comma-separated string)
1451
+ * - cursor: pagination cursor (not offset)
1452
+ * - maxItems: SDK-specific pagination limit
1453
+ */
1454
+ declare const ListAppsSchema: z.ZodObject<{
1455
+ search: z.ZodOptional<z.ZodString>;
1456
+ appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
1457
+ pageSize: z.ZodOptional<z.ZodNumber>;
1458
+ maxItems: z.ZodOptional<z.ZodNumber>;
1459
+ cursor: z.ZodOptional<z.ZodString>;
1460
+ _telemetry: z.ZodOptional<z.ZodObject<{
1461
+ isNested: z.ZodOptional<z.ZodBoolean>;
1462
+ }, z.core.$strip>>;
1463
+ }, z.core.$strip>;
1464
+ type ListAppsOptions = z.infer<typeof ListAppsSchema>;
1465
+ interface ListAppsPage {
1466
+ data: AppItem$1[];
1467
+ nextCursor?: string;
1468
+ }
1469
+
1470
+ interface ListAppsPluginProvides {
1471
+ listApps: (options?: ListAppsOptions) => Promise<ListAppsPage> & AsyncIterable<ListAppsPage> & {
1472
+ items(): AsyncIterable<AppItem$1>;
1473
+ };
1474
+ context: {
1475
+ meta: {
1476
+ listApps: {
1477
+ inputSchema: typeof ListAppsSchema;
1478
+ };
1479
+ };
1480
+ };
1481
+ }
1482
+ declare const listAppsPlugin: Plugin<{}, GetContextType<ApiPluginProvides & ManifestPluginProvides> & EventEmissionContext, ListAppsPluginProvides>;
1483
+
1484
+ interface GetAppPluginProvides {
1485
+ getApp: (options: GetAppOptions) => Promise<{
1486
+ data: AppItem;
1487
+ }>;
1488
+ context: {
1489
+ meta: {
1490
+ getApp: {
1491
+ inputSchema: typeof GetAppSchema;
1492
+ };
1493
+ };
1494
+ };
1495
+ }
1496
+ declare const getAppPlugin: Plugin<GetSdkType<ListAppsPluginProvides>, EventEmissionContext, GetAppPluginProvides>;
1497
+
1498
+ interface RunActionPluginProvides {
1499
+ runAction: (options?: RunActionOptions) => Promise<{
1500
+ data: any[];
1501
+ nextCursor?: string;
1502
+ }> & AsyncIterable<{
1503
+ data: any[];
1504
+ nextCursor?: string;
1505
+ }> & {
1506
+ items(): AsyncIterable<any>;
1507
+ };
1508
+ context: {
1509
+ meta: {
1510
+ runAction: {
1511
+ inputSchema: typeof RunActionSchema;
1512
+ };
1513
+ };
1514
+ };
1515
+ }
1516
+ declare const runActionPlugin: Plugin<GetSdkType<GetActionPluginProvides & GetAppPluginProvides>, // requires getAction and getApp in SDK
1517
+ // requires getAction and getApp in SDK
1518
+ {
1519
+ api: ApiClient;
1520
+ getVersionedImplementationId: GetVersionedImplementationId;
1521
+ } & EventEmissionContext, // requires api and eventEmission in context
1522
+ RunActionPluginProvides>;
1523
+
1524
+ interface AppsPluginProvides {
1525
+ apps: ActionProxy;
1526
+ }
1527
+ declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPluginProvides>, // requires fetch + runAction in SDK
1528
+ {}, // no context requirements
1529
+ AppsPluginProvides>;
1530
+
1531
+ interface ZapierSdkApps {
1532
+ }
1533
+
1534
+ declare const ListAuthenticationsQuerySchema: z.ZodObject<{
1535
+ search: z.ZodOptional<z.ZodString>;
1536
+ title: z.ZodOptional<z.ZodString>;
1537
+ accountId: z.ZodOptional<z.ZodString>;
1538
+ owner: z.ZodOptional<z.ZodString>;
1539
+ isExpired: z.ZodOptional<z.ZodBoolean>;
1540
+ appKey: z.ZodOptional<z.ZodString & {
1541
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1542
+ }>;
1543
+ authenticationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1544
+ pageSize: z.ZodOptional<z.ZodNumber>;
1545
+ maxItems: z.ZodOptional<z.ZodNumber>;
1546
+ cursor: z.ZodOptional<z.ZodString>;
1547
+ _telemetry: z.ZodOptional<z.ZodObject<{
1548
+ isNested: z.ZodOptional<z.ZodBoolean>;
1549
+ }, z.core.$strip>>;
1550
+ }, z.core.$strip>;
1551
+ type ListAuthenticationsOptions = z.infer<typeof ListAuthenticationsQuerySchema>;
1552
+ interface ListAuthenticationsPage {
1553
+ data: AuthenticationItem$1[];
1554
+ nextCursor?: string;
1555
+ }
1556
+
1557
+ interface ListAuthenticationsPluginProvides {
1558
+ listAuthentications: (options?: ListAuthenticationsOptions) => Promise<ListAuthenticationsPage> & AsyncIterable<ListAuthenticationsPage> & {
1559
+ items(): AsyncIterable<AuthenticationItem$1>;
1560
+ };
1561
+ context: {
1562
+ meta: {
1563
+ listAuthentications: {
1564
+ inputSchema: typeof ListAuthenticationsQuerySchema;
1565
+ };
1566
+ };
1567
+ };
1568
+ }
1569
+ declare const listAuthenticationsPlugin: Plugin<GetSdkType<ManifestPluginProvides>, {
1570
+ api: ApiClient;
1571
+ getVersionedImplementationId: GetVersionedImplementationId;
1572
+ } & EventEmissionContext, ListAuthenticationsPluginProvides>;
1573
+
1574
+ interface GetAuthenticationPluginProvides {
1575
+ getAuthentication: (options: GetAuthenticationParam) => Promise<GetAuthenticationResponse>;
1576
+ context: {
1577
+ meta: {
1578
+ getAuthentication: {
1579
+ inputSchema: typeof GetAuthenticationParamSchema;
1580
+ };
1581
+ };
1582
+ };
1583
+ }
1584
+ declare const getAuthenticationPlugin: Plugin<{}, // no SDK dependencies
1585
+ // no SDK dependencies
1586
+ {
1587
+ api: ApiClient;
1588
+ } & EventEmissionContext, // requires api in context
1589
+ GetAuthenticationPluginProvides>;
1590
+
1591
+ interface FindFirstAuthenticationPluginProvides {
1592
+ findFirstAuthentication: (options?: FindFirstAuthenticationOptions) => Promise<{
1593
+ data: AuthenticationItem;
1594
+ }>;
1595
+ context: {
1596
+ meta: {
1597
+ findFirstAuthentication: {
1598
+ inputSchema: typeof FindFirstAuthenticationSchema;
1599
+ };
1600
+ };
1601
+ };
1602
+ }
1603
+ declare const findFirstAuthenticationPlugin: Plugin<GetSdkType<ListAuthenticationsPluginProvides>, // requires listAuthentications in SDK
1604
+ EventEmissionContext, // requires eventEmission in context
1605
+ FindFirstAuthenticationPluginProvides>;
1606
+
1607
+ interface FindUniqueAuthenticationPluginProvides {
1608
+ findUniqueAuthentication: (options?: FindUniqueAuthenticationOptions) => Promise<{
1609
+ data: AuthenticationItem;
1610
+ }>;
1611
+ context: {
1612
+ meta: {
1613
+ findUniqueAuthentication: {
1614
+ inputSchema: typeof FindUniqueAuthenticationSchema;
1615
+ };
1616
+ };
1617
+ };
1618
+ }
1619
+ declare const findUniqueAuthenticationPlugin: Plugin<GetSdkType<ListAuthenticationsPluginProvides>, // requires listAuthentications in SDK
1620
+ EventEmissionContext, // requires eventEmission in context
1621
+ FindUniqueAuthenticationPluginProvides>;
1622
+
1623
+ interface ListInputFieldsPluginProvides {
1624
+ listInputFields: (options?: ListInputFieldsOptions) => Promise<{
1625
+ data: RootFieldItem[];
1626
+ nextCursor?: string;
1627
+ }> & AsyncIterable<{
1628
+ data: RootFieldItem[];
1629
+ nextCursor?: string;
1630
+ }> & {
1631
+ items(): AsyncIterable<InputFieldItem | InfoFieldItem | FieldsetItem>;
1632
+ };
1633
+ context: {
1634
+ meta: {
1635
+ listInputFields: {
1636
+ inputSchema: typeof ListInputFieldsSchema;
1637
+ };
1638
+ };
1639
+ };
1640
+ }
1641
+ declare const listInputFieldsPlugin: Plugin<GetSdkType<GetAppPluginProvides & GetActionPluginProvides>, // requires getApp and getAction in SDK
1642
+ // requires getApp and getAction in SDK
1643
+ {
1644
+ api: ApiClient;
1645
+ getVersionedImplementationId: GetVersionedImplementationId;
1646
+ } & EventEmissionContext, // requires api, getVersionedImplementationId, and eventEmission in context
1647
+ ListInputFieldsPluginProvides>;
1648
+
1649
+ declare const GetInputFieldsSchemaSchema: z.ZodObject<{
1650
+ appKey: z.ZodString & {
1651
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1652
+ };
1653
+ actionType: z.ZodEnum<{
1654
+ search: "search";
1655
+ filter: "filter";
1656
+ read: "read";
1657
+ read_bulk: "read_bulk";
1658
+ run: "run";
1659
+ search_and_write: "search_and_write";
1660
+ search_or_write: "search_or_write";
1661
+ write: "write";
1662
+ }>;
1663
+ actionKey: z.ZodString;
1664
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1665
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1666
+ }, z.core.$strip>;
1667
+ type GetInputFieldsSchemaOptions = z.infer<typeof GetInputFieldsSchemaSchema>;
1668
+
1669
+ interface GetInputFieldsSchemaPluginProvides {
1670
+ getInputFieldsSchema: (options: GetInputFieldsSchemaOptions) => Promise<{
1671
+ data: Record<string, unknown>;
1672
+ }>;
1673
+ context: {
1674
+ meta: {
1675
+ getInputFieldsSchema: {
1676
+ inputSchema: typeof GetInputFieldsSchemaSchema;
1677
+ };
1678
+ };
1679
+ };
1680
+ }
1681
+
1682
+ declare const InputFieldChoiceItemSchema: z.ZodObject<{
1683
+ key: z.ZodOptional<z.ZodString>;
1684
+ label: z.ZodOptional<z.ZodString>;
1685
+ sample: z.ZodOptional<z.ZodString>;
1686
+ value: z.ZodOptional<z.ZodString>;
1687
+ }, z.core.$strip>;
1688
+ type InputFieldChoiceItem = z.infer<typeof InputFieldChoiceItemSchema>;
1689
+ declare const ListInputFieldChoicesSchema: z.ZodObject<{
1690
+ appKey: z.ZodString & {
1691
+ _def: z.core.$ZodStringDef & PositionalMetadata;
1692
+ };
1693
+ actionType: z.ZodEnum<{
1694
+ search: "search";
1695
+ filter: "filter";
1696
+ read: "read";
1697
+ read_bulk: "read_bulk";
1698
+ run: "run";
1699
+ search_and_write: "search_and_write";
1700
+ search_or_write: "search_or_write";
1701
+ write: "write";
1702
+ }>;
1703
+ actionKey: z.ZodString;
1704
+ inputFieldKey: z.ZodString;
1705
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
1706
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1707
+ page: z.ZodOptional<z.ZodNumber>;
1708
+ pageSize: z.ZodOptional<z.ZodNumber>;
1709
+ maxItems: z.ZodOptional<z.ZodNumber>;
1710
+ cursor: z.ZodOptional<z.ZodString>;
1711
+ }, z.core.$strip>;
1712
+ type ListInputFieldChoicesOptions = z.infer<typeof ListInputFieldChoicesSchema>;
1713
+
1714
+ interface ListInputFieldChoicesPluginProvides {
1715
+ listInputFieldChoices: (options: ListInputFieldChoicesOptions) => Promise<{
1716
+ data: InputFieldChoiceItem[];
1717
+ nextCursor?: string;
1718
+ }> & AsyncIterable<{
1719
+ data: InputFieldChoiceItem[];
1720
+ nextCursor?: string;
1721
+ }> & {
1722
+ items(): AsyncIterable<InputFieldChoiceItem>;
1723
+ };
1724
+ context: {
1725
+ meta: {
1726
+ listInputFieldChoices: {
1727
+ inputSchema: typeof ListInputFieldChoicesSchema;
1728
+ };
1729
+ };
1730
+ };
1731
+ }
1732
+
1733
+ /**
1734
+ * SDK-related types and interfaces
1735
+ */
1736
+
1737
+ interface BaseSdkOptions {
1738
+ /**
1739
+ * Authentication credentials. Can be:
1740
+ * - A string (token or API key)
1741
+ * - An object with clientId/clientSecret for client_credentials flow
1742
+ * - An object with clientId (no secret) for PKCE flow
1743
+ * - A function returning any of the above
1744
+ */
1745
+ credentials?: Credentials;
1746
+ /**
1747
+ * @deprecated Use `credentials` instead.
1748
+ */
1749
+ token?: string;
1750
+ onEvent?: EventCallback;
1751
+ fetch?: typeof fetch;
1752
+ baseUrl?: string;
1753
+ trackingBaseUrl?: string;
1754
+ debug?: boolean;
1755
+ manifestPath?: string;
1756
+ manifest?: Manifest;
1757
+ eventEmission?: EventEmissionConfig;
1758
+ }
1759
+
1760
+ interface FunctionRegistryEntry {
1761
+ name: string;
1762
+ type?: "list" | "item";
1763
+ itemType?: string;
1764
+ returnType?: string;
1765
+ inputSchema?: z.ZodSchema;
1766
+ inputParameters?: Array<{
1767
+ name: string;
1768
+ schema: z.ZodSchema;
1769
+ }>;
1770
+ outputSchema?: z.ZodSchema;
1771
+ categories: string[];
1772
+ resolvers?: Record<string, any>;
1773
+ packages?: string[];
1774
+ }
1775
+ interface ZapierSdk extends GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & ManifestPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & GetInputFieldsSchemaPluginProvides & ListInputFieldChoicesPluginProvides & RequestPluginProvides & GetProfilePluginProvides & EventEmissionProvides & ApiPluginProvides> {
1776
+ apps: ActionProxy & ZapierSdkApps;
1777
+ }
1778
+
1779
+ declare const InputFieldItemSchema: z.ZodObject<{
1780
+ key: z.ZodString;
1781
+ type: z.ZodLiteral<"input_field">;
1782
+ default_value: z.ZodString;
1783
+ depends_on: z.ZodArray<z.ZodString>;
1784
+ description: z.ZodString;
1785
+ invalidates_input_fields: z.ZodBoolean;
1786
+ is_required: z.ZodBoolean;
1787
+ placeholder: z.ZodString;
1788
+ title: z.ZodString;
1789
+ value_type: z.ZodString;
1790
+ format: z.ZodOptional<z.ZodString>;
1791
+ items: z.ZodOptional<z.ZodObject<{
1792
+ type: z.ZodString;
1793
+ }, z.core.$strip>>;
1794
+ }, z.core.$strip>;
1795
+ declare const InfoFieldItemSchema: z.ZodObject<{
1796
+ key: z.ZodString;
1797
+ type: z.ZodLiteral<"info_field">;
1798
+ description: z.ZodString;
1799
+ title: z.ZodOptional<z.ZodString>;
1800
+ }, z.core.$strip>;
1801
+ type FieldsetItemType = z.infer<typeof InputFieldItemSchema> | z.infer<typeof InfoFieldItemSchema> | FieldsetItem;
1802
+ interface FieldsetItem {
1803
+ type: "fieldset";
1804
+ key: string;
1805
+ title: string;
1806
+ fields: FieldsetItemType[];
1807
+ }
1808
+ declare const RootFieldItemSchema: z.ZodUnion<readonly [z.ZodObject<{
1809
+ key: z.ZodString;
1810
+ type: z.ZodLiteral<"input_field">;
1811
+ default_value: z.ZodString;
1812
+ depends_on: z.ZodArray<z.ZodString>;
1813
+ description: z.ZodString;
1814
+ invalidates_input_fields: z.ZodBoolean;
1815
+ is_required: z.ZodBoolean;
1816
+ placeholder: z.ZodString;
1817
+ title: z.ZodString;
1818
+ value_type: z.ZodString;
1819
+ format: z.ZodOptional<z.ZodString>;
1820
+ items: z.ZodOptional<z.ZodObject<{
1821
+ type: z.ZodString;
1822
+ }, z.core.$strip>>;
1823
+ }, z.core.$strip>, z.ZodObject<{
1824
+ key: z.ZodString;
1825
+ type: z.ZodLiteral<"info_field">;
1826
+ description: z.ZodString;
1827
+ title: z.ZodOptional<z.ZodString>;
1828
+ }, z.core.$strip>, z.ZodType<FieldsetItem, unknown, z.core.$ZodTypeInternals<FieldsetItem, unknown>>]>;
1829
+ type InputFieldItem$1 = z.infer<typeof InputFieldItemSchema>;
1830
+
1831
+ interface FormattedItem {
1832
+ title: string;
1833
+ id?: string;
1834
+ key?: string;
1835
+ keys?: string[];
1836
+ description?: string;
1837
+ data?: unknown;
1838
+ details: Array<{
1839
+ text: string;
1840
+ style: "normal" | "dim" | "accent" | "warning" | "success";
1841
+ }>;
1842
+ }
1843
+ interface FormatMetadata<TItem = unknown> {
1844
+ format: (item: TItem) => FormattedItem;
1845
+ }
1846
+ interface PromptConfig {
1847
+ type: "list";
1848
+ name: string;
1849
+ message: string;
1850
+ choices: Array<{
1851
+ name: string;
1852
+ value: unknown;
1853
+ }>;
1854
+ }
1855
+ interface Resolver {
1856
+ type: string;
1857
+ depends?: readonly string[] | string[];
1858
+ }
1859
+ interface StaticResolver extends Resolver {
1860
+ type: "static";
1861
+ inputType?: "text" | "password" | "email";
1862
+ placeholder?: string;
1863
+ }
1864
+ interface DynamicResolver<TItem = unknown, TParams = Record<string, unknown>> extends Resolver {
1865
+ type: "dynamic";
1866
+ fetch: (sdk: ZapierSdk, resolvedParams: TParams) => Promise<TItem[]>;
1867
+ prompt: (items: TItem[], params: TParams) => PromptConfig;
1868
+ }
1869
+ interface PositionalMetadata {
1870
+ positionalMeta: {
1871
+ positional: true;
1872
+ };
1873
+ }
1874
+ declare function isPositional(schema: z.ZodType): boolean;
1875
+
1876
+ declare const AppItemSchema: z.ZodObject<{
1877
+ slug: z.ZodString;
1878
+ age_in_days: z.ZodOptional<z.ZodNumber>;
1879
+ auth_type: z.ZodOptional<z.ZodString>;
1880
+ banner: z.ZodOptional<z.ZodString>;
1881
+ categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
1882
+ id: z.ZodNumber;
1883
+ name: z.ZodString;
1884
+ slug: z.ZodString;
1885
+ }, z.core.$strip>>>;
1886
+ images: z.ZodOptional<z.ZodObject<{
1887
+ url_16x16: z.ZodOptional<z.ZodString>;
1888
+ url_32x32: z.ZodOptional<z.ZodString>;
1889
+ url_64x64: z.ZodOptional<z.ZodString>;
1890
+ url_128x128: z.ZodOptional<z.ZodString>;
1891
+ }, z.core.$strip>>;
1892
+ popularity: z.ZodOptional<z.ZodNumber>;
1893
+ has_filters: z.ZodOptional<z.ZodBoolean>;
1894
+ has_reads: z.ZodOptional<z.ZodBoolean>;
1895
+ has_searches: z.ZodOptional<z.ZodBoolean>;
1896
+ has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
1897
+ has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
1898
+ has_writes: z.ZodOptional<z.ZodBoolean>;
1899
+ is_beta: z.ZodOptional<z.ZodBoolean>;
1900
+ is_built_in: z.ZodOptional<z.ZodBoolean>;
1901
+ is_deprecated: z.ZodOptional<z.ZodBoolean>;
1902
+ is_featured: z.ZodOptional<z.ZodBoolean>;
1903
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
1904
+ is_invite: z.ZodOptional<z.ZodBoolean>;
1905
+ is_premium: z.ZodOptional<z.ZodBoolean>;
1906
+ is_public: z.ZodOptional<z.ZodBoolean>;
1907
+ is_upcoming: z.ZodOptional<z.ZodBoolean>;
1908
+ visibility: z.ZodOptional<z.ZodString>;
1909
+ actions: z.ZodOptional<z.ZodObject<{
1910
+ read: z.ZodOptional<z.ZodNumber>;
1911
+ read_bulk: z.ZodOptional<z.ZodNumber>;
1912
+ write: z.ZodOptional<z.ZodNumber>;
1913
+ search: z.ZodOptional<z.ZodNumber>;
1914
+ search_or_write: z.ZodOptional<z.ZodNumber>;
1915
+ search_and_write: z.ZodOptional<z.ZodNumber>;
1916
+ filter: z.ZodOptional<z.ZodNumber>;
1917
+ }, z.core.$strip>>;
1918
+ description: z.ZodOptional<z.ZodString>;
1919
+ primary_color: z.ZodOptional<z.ZodString>;
1920
+ secondary_color: z.ZodOptional<z.ZodString>;
1921
+ classification: z.ZodOptional<z.ZodString>;
1922
+ api_docs_url: z.ZodOptional<z.ZodString>;
1923
+ image: z.ZodOptional<z.ZodString>;
1924
+ title: z.ZodString;
1925
+ key: z.ZodString;
1926
+ implementation_id: z.ZodString;
1927
+ version: z.ZodOptional<z.ZodString>;
1928
+ }, z.core.$strip>;
1929
+
1930
+ declare const AuthenticationItemSchema: z.ZodObject<{
1931
+ date: z.ZodString;
1932
+ lastchanged: z.ZodOptional<z.ZodString>;
1933
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1934
+ is_invite_only: z.ZodBoolean;
1935
+ is_private: z.ZodBoolean;
1936
+ shared_with_all: z.ZodBoolean;
1937
+ is_stale: z.ZodOptional<z.ZodString>;
1938
+ is_shared: z.ZodOptional<z.ZodString>;
1939
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1940
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1941
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1942
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1943
+ url: z.ZodOptional<z.ZodString>;
1944
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1945
+ members: z.ZodOptional<z.ZodString>;
1946
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1947
+ id: z.ZodString;
1948
+ account_id: z.ZodString;
1949
+ implementation_id: z.ZodOptional<z.ZodString>;
1950
+ profile_id: z.ZodOptional<z.ZodString>;
1951
+ is_expired: z.ZodOptional<z.ZodString>;
1952
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1953
+ app_key: z.ZodOptional<z.ZodString>;
1954
+ app_version: z.ZodOptional<z.ZodString>;
1955
+ }, z.core.$strip>;
1956
+ declare const AuthItemSchema: z.ZodObject<{
1957
+ date: z.ZodString;
1958
+ lastchanged: z.ZodOptional<z.ZodString>;
1959
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1960
+ is_invite_only: z.ZodBoolean;
1961
+ is_private: z.ZodBoolean;
1962
+ shared_with_all: z.ZodBoolean;
1963
+ is_stale: z.ZodOptional<z.ZodString>;
1964
+ is_shared: z.ZodOptional<z.ZodString>;
1965
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1966
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1967
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1968
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1969
+ url: z.ZodOptional<z.ZodString>;
1970
+ groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1971
+ members: z.ZodOptional<z.ZodString>;
1972
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1973
+ id: z.ZodString;
1974
+ account_id: z.ZodString;
1975
+ implementation_id: z.ZodOptional<z.ZodString>;
1976
+ profile_id: z.ZodOptional<z.ZodString>;
1977
+ is_expired: z.ZodOptional<z.ZodString>;
1978
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1979
+ app_key: z.ZodOptional<z.ZodString>;
1980
+ app_version: z.ZodOptional<z.ZodString>;
1981
+ }, z.core.$strip>;
1982
+ type AuthItem = z.infer<typeof AuthItemSchema>;
1983
+
1984
+ declare const ActionItemSchema: z.ZodObject<{
1985
+ key: z.ZodString;
1986
+ id: z.ZodOptional<z.ZodString>;
1987
+ description: z.ZodString;
1988
+ is_important: z.ZodOptional<z.ZodBoolean>;
1989
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
1990
+ app_key: z.ZodString;
1991
+ app_version: z.ZodOptional<z.ZodString>;
1992
+ action_type: z.ZodEnum<{
1993
+ search: "search";
1994
+ filter: "filter";
1995
+ read: "read";
1996
+ read_bulk: "read_bulk";
1997
+ run: "run";
1998
+ search_and_write: "search_and_write";
1999
+ search_or_write: "search_or_write";
2000
+ write: "write";
2001
+ }>;
2002
+ title: z.ZodString;
2003
+ type: z.ZodLiteral<"action">;
2004
+ }, z.core.$strip>;
2005
+
2006
+ declare const UserProfileItemSchema: z.ZodObject<{
2007
+ id: z.ZodString;
2008
+ first_name: z.ZodString;
2009
+ last_name: z.ZodString;
2010
+ full_name: z.ZodString;
2011
+ email: z.ZodString;
2012
+ email_confirmed: z.ZodBoolean;
2013
+ timezone: z.ZodString;
2014
+ }, z.core.$strip>;
2015
+
2016
+ /**
2017
+ * Represents an app item returned by getApp and listApps functions
2018
+ * Inferred from AppItemSchema which extends the base App API schema
2019
+ */
2020
+ type AppItem = z.infer<typeof AppItemSchema>;
2021
+ /**
2022
+ * Represents an authentication item returned by listAuthentications functions
2023
+ * Inferred from AuthenticationItemSchema which extends the base Authentication API schema
2024
+ */
2025
+ type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;
2026
+ /**
2027
+ * Represents an action item returned by listActions functions
2028
+ * Inferred from ActionItemSchema which extends the base Action API schema
2029
+ */
2030
+ type ActionItem$1 = z.infer<typeof ActionItemSchema>;
2031
+ /**
2032
+ * Represents an input field item returned by listInputFields functions
2033
+ * Inferred from InputFieldItemSchema which extends the base Need API schema
2034
+ */
2035
+ type InputFieldItem = z.infer<typeof InputFieldItemSchema>;
2036
+ /**
2037
+ * Represents an info field item (help text/copy) returned by listInputFields functions
2038
+ * Inferred from InfoFieldItemSchema
2039
+ */
2040
+ type InfoFieldItem = z.infer<typeof InfoFieldItemSchema>;
2041
+
2042
+ /**
2043
+ * Represents a root field item (any field/fieldset type) returned by listInputFields
2044
+ * Inferred from RootFieldItemSchema - use as RootFieldItem[]
2045
+ */
2046
+ type RootFieldItem = z.infer<typeof RootFieldItemSchema>;
2047
+ /**
2048
+ * Represents a user profile item returned by getProfile function
2049
+ * Inferred from UserProfileItemSchema which extends the base UserProfile API schema
2050
+ */
2051
+ type UserProfileItem = z.infer<typeof UserProfileItemSchema>;
2052
+
2053
+ /**
2054
+ * Generic utility functions for creating paginated SDK functions
2055
+ */
2056
+
2057
+ /**
2058
+ * Callbacks for telemetry events during function execution
2059
+ */
2060
+ interface TelemetryCallbacks {
2061
+ onMethodCalled?: (data: {
2062
+ methodName: string;
2063
+ durationMs: number;
2064
+ success: boolean;
2065
+ error?: Error;
2066
+ argumentCount: number;
2067
+ isPaginated: boolean;
2068
+ }) => void;
2069
+ }
2070
+ /**
2071
+ * Higher-order function that creates a function from a core function
2072
+ *
2073
+ * @param coreFn - Function that returns T directly or throws errors
2074
+ * @param schema - Optional Zod schema for validation
2075
+ * @param telemetry - Optional telemetry callbacks
2076
+ * @returns A function that normalizes and rethrows errors
2077
+ */
2078
+ declare function createFunction<TOptions, TResult, TSchemaOptions extends TOptions = TOptions>(coreFn: (options: TOptions) => Promise<TResult>, schema?: z.ZodSchema<TSchemaOptions>, telemetry?: TelemetryCallbacks): (options?: TOptions) => Promise<TResult>;
2079
+
2080
+ /**
2081
+ * String utility functions for the Zapier SDK
2082
+ */
2083
+ /**
2084
+ * Converts a string to title case, handling various input formats:
2085
+ * - camelCase: "firstName" → "First Name"
2086
+ * - snake_case: "first_name" → "First Name"
2087
+ * - kebab-case: "first-name" → "First Name"
2088
+ * - mixed formats: "first_name-value" → "First Name Value"
2089
+ */
2090
+ declare function toTitleCase(input: string): string;
2091
+ /**
2092
+ * Converts a string to snake_case, handling various input formats:
2093
+ * - camelCase: "firstName" → "first_name"
2094
+ * - kebab-case: "first-name" → "first_name"
2095
+ * - title case: "First Name" → "first_name"
2096
+ * - mixed formats: "first-Name Value" → "first_name_value"
2097
+ * - starts with number: "123abc" → "_123abc"
2098
+ */
2099
+ declare function toSnakeCase(input: string): string;
2100
+
2101
+ /**
2102
+ * Batch Operation Utilities
2103
+ *
2104
+ * This module provides utilities for executing multiple async operations
2105
+ * with concurrency control and retry logic.
2106
+ */
2107
+ /**
2108
+ * Options for batch execution
2109
+ */
2110
+ interface BatchOptions {
2111
+ /**
2112
+ * Maximum number of concurrent operations (default: 10)
2113
+ * Lower values are more "polite" but slower
2114
+ * Higher values are faster but risk rate limits
2115
+ */
2116
+ concurrency?: number;
2117
+ /**
2118
+ * Whether to retry failed operations (default: true)
2119
+ * When enabled, each operation gets up to MAX_CONSECUTIVE_ERRORS retries
2120
+ */
2121
+ retry?: boolean;
2122
+ /**
2123
+ * Delay in milliseconds between starting batches (default: 100ms)
2124
+ * Adds a small delay between concurrent batches to avoid burst patterns
2125
+ */
2126
+ batchDelay?: number;
2127
+ /**
2128
+ * Overall timeout for the entire batch operation in milliseconds (default: 180000ms / 3 minutes)
2129
+ * When exceeded, throws ZapierTimeoutError and stops processing remaining tasks
2130
+ */
2131
+ timeoutMs?: number;
2132
+ /**
2133
+ * Timeout for individual tasks in milliseconds (default: none)
2134
+ * When set, each task will be cancelled if it exceeds this duration
2135
+ * Tasks that timeout will be marked as rejected in the results
2136
+ */
2137
+ taskTimeoutMs?: number;
2138
+ }
2139
+ /**
2140
+ * Execute multiple async operations with concurrency limiting and retry logic
2141
+ *
2142
+ * This prevents overwhelming APIs by:
2143
+ * 1. Limiting concurrent operations (worker pool pattern)
2144
+ * 2. Adding small delays between batches to avoid burst detection
2145
+ * 3. Retrying failed operations with exponential backoff
2146
+ *
2147
+ * Problem Solved:
2148
+ * - Rate limit prevention: Steady stream instead of burst requests
2149
+ * - Connection pool management: Stays within browser/Node limits (~6-8 per domain)
2150
+ * - Resilience: Transient failures are retried automatically
2151
+ * - Observability: Returns detailed success/failure info for each operation
2152
+ *
2153
+ * Example Usage:
2154
+ * ```typescript
2155
+ * // Instead of Promise.allSettled (fires all at once):
2156
+ * const results = await Promise.allSettled(
2157
+ * actions.map(a => sdk.listInputFields(a))
2158
+ * );
2159
+ *
2160
+ * // Use batch (controlled concurrency):
2161
+ * const results = await batch(
2162
+ * actions.map(a => () => sdk.listInputFields(a)),
2163
+ * { concurrency: 10, retry: true }
2164
+ * );
2165
+ * ```
2166
+ *
2167
+ * @param tasks - Array of functions that return promises (NOT promises themselves!)
2168
+ * @param options - Configuration for concurrency and retry behavior
2169
+ * @returns Promise resolving to array of settled results (same as Promise.allSettled)
2170
+ */
2171
+ declare function batch<T>(tasks: (() => Promise<T>)[], options?: BatchOptions): Promise<PromiseSettledResult<T>[]>;
2172
+
2173
+ declare const appKeyResolver: StaticResolver;
2174
+
2175
+ interface ActionTypeItem {
2176
+ key: string;
2177
+ name: string;
2178
+ }
2179
+ declare const actionTypeResolver: DynamicResolver<ActionTypeItem, {
2180
+ appKey: string;
2181
+ }>;
2182
+
2183
+ interface ActionItem {
2184
+ key: string;
2185
+ title?: string;
2186
+ name?: string;
2187
+ description?: string;
2188
+ action_type: string;
2189
+ }
2190
+ declare const actionKeyResolver: DynamicResolver<ActionItem, {
2191
+ appKey: string;
2192
+ actionType: ActionTypeProperty;
2193
+ }>;
2194
+
2195
+ type AuthenticationIdResolver = DynamicResolver<AuthItem, {
2196
+ appKey?: string;
2197
+ }>;
2198
+ declare const authenticationIdResolver: AuthenticationIdResolver;
2199
+ declare const authenticationIdGenericResolver: AuthenticationIdResolver;
2200
+
2201
+ type InputsResolver = {
2202
+ type: "fields";
2203
+ depends: readonly string[];
2204
+ fetch: (sdk: any, resolvedParams: {
2205
+ appKey: string;
2206
+ actionKey: string;
2207
+ actionType: ActionTypeProperty;
2208
+ authenticationId: string | number;
2209
+ inputs?: Record<string, unknown>;
2210
+ }) => Promise<RootFieldItem[]>;
2211
+ };
2212
+ declare const inputsResolver: InputsResolver;
2213
+ declare const inputsAllOptionalResolver: InputsResolver;
2214
+
2215
+ declare const inputFieldKeyResolver: DynamicResolver<InputFieldItem$1, {
2216
+ appKey: string;
2217
+ actionKey: string;
2218
+ actionType: ActionTypeProperty;
2219
+ authenticationId: string | number;
2220
+ inputs?: Record<string, unknown>;
2221
+ }>;
2222
+
2223
+ /**
2224
+ * SDK Authentication Utilities
2225
+ *
2226
+ * This module provides SDK-level authentication utilities focused
2227
+ * on token acquisition. It uses the credentials system for resolution
2228
+ * and handles different credential types appropriately.
2229
+ *
2230
+ * CLI-specific functionality like login/logout is handled by the
2231
+ * @zapier/zapier-sdk-cli-login package.
2232
+ */
2233
+
2234
+ /**
2235
+ * Options for resolving auth tokens.
2236
+ */
2237
+ interface ResolveAuthTokenOptions {
2238
+ credentials?: Credentials;
2239
+ /** @deprecated Use `credentials` instead */
2240
+ token?: string;
2241
+ onEvent?: EventCallback;
2242
+ fetch?: typeof globalThis.fetch;
2243
+ baseUrl?: string;
2244
+ }
2245
+ /**
2246
+ * Clear the token cache. Useful for testing or forcing re-authentication.
2247
+ */
2248
+ declare function clearTokenCache(): void;
2249
+ /**
2250
+ * Invalidate a cached token. Called when we get a 401 response.
2251
+ */
2252
+ declare function invalidateCachedToken(clientId: string): void;
2253
+ /**
2254
+ * Options for getTokenFromCliLogin.
2255
+ */
2256
+ interface CliLoginOptions {
2257
+ onEvent?: EventCallback;
2258
+ fetch?: typeof globalThis.fetch;
2259
+ credentials?: {
2260
+ type?: "pkce";
2261
+ clientId: string;
2262
+ baseUrl?: string;
2263
+ scope?: string;
2264
+ };
2265
+ }
2266
+ /**
2267
+ * Attempts to get a token by optionally importing from CLI login package.
2268
+ * This provides a graceful fallback when the CLI login package is not available.
2269
+ *
2270
+ * Returns undefined if no valid token is found or CLI package is not available.
2271
+ */
2272
+ declare function getTokenFromCliLogin(options: CliLoginOptions): Promise<string | undefined>;
2273
+ /**
2274
+ * Resolves an auth token from wherever it can be found.
2275
+ *
2276
+ * Resolution order:
2277
+ * 1. Explicit credentials option (or deprecated token option)
2278
+ * 2. Environment variables
2279
+ * 3. CLI login package (if available)
2280
+ *
2281
+ * For different credential types:
2282
+ * - String: Used directly as the token
2283
+ * - Client credentials: Exchanged for an access token (with caching)
2284
+ * - PKCE: Delegates to CLI login (throws if not available)
2285
+ *
2286
+ * Returns undefined if no valid token is found.
2287
+ */
2288
+ declare function resolveAuthToken(options?: ResolveAuthTokenOptions): Promise<string | undefined>;
2289
+ /**
2290
+ * Invalidate the cached token for the given credentials, if applicable.
2291
+ * This is called when we receive a 401 response, indicating the token
2292
+ * is no longer valid. Only affects client_credentials flow tokens.
2293
+ */
2294
+ declare function invalidateCredentialsToken(options: {
2295
+ credentials?: Credentials;
2296
+ token?: string;
2297
+ }): Promise<void>;
2298
+
2299
+ /**
2300
+ * Credentials Resolution
2301
+ *
2302
+ * This module provides the core logic for resolving credentials from various sources:
2303
+ * - Explicit credentials option
2304
+ * - Deprecated token option
2305
+ * - Environment variables (new and deprecated)
2306
+ * - CLI login stored tokens
2307
+ */
2308
+
2309
+ /**
2310
+ * Options for resolving credentials.
2311
+ */
2312
+ interface ResolveCredentialsOptions {
2313
+ credentials?: Credentials;
2314
+ /** @deprecated Use `credentials` instead */
2315
+ token?: string;
2316
+ /** SDK base URL - used to derive auth base URL if not specified in credentials */
2317
+ baseUrl?: string;
2318
+ }
2319
+ /**
2320
+ * Resolve credentials from environment variables.
2321
+ *
2322
+ * Precedence:
2323
+ * 1. ZAPIER_CREDENTIALS (string token)
2324
+ * 2. ZAPIER_CREDENTIALS_CLIENT_ID + ZAPIER_CREDENTIALS_CLIENT_SECRET (client credentials)
2325
+ * 3. ZAPIER_CREDENTIALS_CLIENT_ID alone (PKCE)
2326
+ * 4. Deprecated ZAPIER_TOKEN, ZAPIER_AUTH_* vars (with warnings)
2327
+ *
2328
+ * @param sdkBaseUrl - SDK base URL used to derive auth base URL if not specified
2329
+ */
2330
+ declare function resolveCredentialsFromEnv(sdkBaseUrl?: string): ResolvedCredentials | undefined;
2331
+ /**
2332
+ * Resolve credentials from all possible sources.
2333
+ *
2334
+ * Precedence:
2335
+ * 1. Explicit credentials option
2336
+ * 2. Deprecated token option (with warning)
2337
+ * 3. Environment variables
2338
+ * 4. CLI login stored token (handled separately in auth.ts)
2339
+ *
2340
+ * If credentials is a function, it is called and must return
2341
+ * a string or credentials object (not another function).
2342
+ *
2343
+ * The baseUrl option is used to derive the auth base URL if not
2344
+ * specified in credentials.
2345
+ */
2346
+ declare function resolveCredentials(options?: ResolveCredentialsOptions): Promise<ResolvedCredentials | undefined>;
2347
+ /**
2348
+ * Extract the base URL from credentials for use in auth flows.
2349
+ */
2350
+ declare function getBaseUrlFromCredentials(credentials: ResolvedCredentials | undefined): string | undefined;
2351
+ /**
2352
+ * Extract the client ID from credentials for use in auth flows.
2353
+ */
2354
+ declare function getClientIdFromCredentials(credentials: ResolvedCredentials | undefined): string | undefined;
2355
+
2356
+ /**
2357
+ * Logging utilities for the SDK
2358
+ */
2359
+ /**
2360
+ * Log a deprecation warning. Each unique message is only logged once per process.
2361
+ */
2362
+ declare function logDeprecation(message: string): void;
2363
+ /**
2364
+ * Reset the set of logged deprecation warnings.
2365
+ * Useful for testing.
2366
+ */
2367
+ declare function resetDeprecationWarnings(): void;
2368
+
2369
+ /**
2370
+ * SDK Constants
2371
+ *
2372
+ * This module contains shared constants used throughout the SDK.
2373
+ */
2374
+ /**
2375
+ * Base URL for Zapier API endpoints
2376
+ */
2377
+ declare const ZAPIER_BASE_URL: string;
2378
+ /**
2379
+ * Maximum number of items that can be requested per page across all paginated functions
2380
+ */
2381
+ declare const MAX_PAGE_LIMIT = 10000;
2382
+ /**
2383
+ * Credentials from environment variables
2384
+ */
2385
+ declare const ZAPIER_CREDENTIALS: string | undefined;
2386
+ declare const ZAPIER_CREDENTIALS_CLIENT_ID: string | undefined;
2387
+ declare const ZAPIER_CREDENTIALS_CLIENT_SECRET: string | undefined;
2388
+ declare const ZAPIER_CREDENTIALS_BASE_URL: string | undefined;
2389
+ declare const ZAPIER_CREDENTIALS_SCOPE: string | undefined;
2390
+ /**
2391
+ * Deprecated environment variables (kept for backwards compatibility)
2392
+ */
2393
+ declare const ZAPIER_TOKEN: string | undefined;
2394
+ declare const ZAPIER_AUTH_BASE_URL: string | undefined;
2395
+ declare const ZAPIER_AUTH_CLIENT_ID: string | undefined;
2396
+
2397
+ interface ZapierSdkOptions extends BaseSdkOptions {
2398
+ }
2399
+ declare function createSdk<TCurrentSdk = {}, TCurrentContext extends {
2400
+ meta: Record<string, PluginMeta>;
2401
+ } = {
2402
+ meta: Record<string, PluginMeta>;
2403
+ }>(options?: ZapierSdkOptions, initialSdk?: TCurrentSdk, initialContext?: TCurrentContext): TCurrentSdk & {
2404
+ getContext: () => TCurrentContext;
2405
+ addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
2406
+ getContext(): TCurrentContext;
2407
+ }, TRequiresContext, TProvides>, addPluginOptions?: Record<string, unknown>): Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>>;
2408
+ };
2409
+ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk<ExtractSdkProperties<EventEmissionProvides> & ExtractSdkProperties<ApiPluginProvides> & ExtractSdkProperties<ManifestPluginProvides> & ExtractSdkProperties<ListAppsPluginProvides> & ExtractSdkProperties<GetAppPluginProvides> & ExtractSdkProperties<ListActionsPluginProvides> & ExtractSdkProperties<GetActionPluginProvides> & ExtractSdkProperties<ListInputFieldsPluginProvides> & ExtractSdkProperties<GetInputFieldsSchemaPluginProvides> & ExtractSdkProperties<ListInputFieldChoicesPluginProvides> & ExtractSdkProperties<RunActionPluginProvides> & ExtractSdkProperties<ListAuthenticationsPluginProvides> & ExtractSdkProperties<GetAuthenticationPluginProvides> & ExtractSdkProperties<FindFirstAuthenticationPluginProvides> & ExtractSdkProperties<FindUniqueAuthenticationPluginProvides> & ExtractSdkProperties<RequestPluginProvides> & ExtractSdkProperties<FetchPluginProvides> & ExtractSdkProperties<AppsPluginProvides> & ExtractSdkProperties<GetProfilePluginProvides>, {
2410
+ meta: Record<string, PluginMeta>;
2411
+ } & EventEmissionContext & {
2412
+ api: ApiClient;
2413
+ resolveCredentials: () => Promise<ResolvedCredentials | undefined>;
2414
+ } & {
2415
+ getVersionedImplementationId: GetVersionedImplementationId;
2416
+ resolveAppKeys: ResolveAppKeys;
2417
+ updateManifestEntry: (options: UpdateManifestEntryOptions) => Promise<UpdateManifestEntryResult>;
2418
+ addActionEntry: (options: AddActionEntryOptions) => Promise<AddActionEntryResult>;
2419
+ findActionEntry: (options: {
2420
+ name: string;
2421
+ manifest: Manifest;
2422
+ }) => ActionEntry | null;
2423
+ listActionEntries: (options?: {
2424
+ configPath?: string;
2425
+ }) => Promise<Array<[string, ActionEntry]>>;
2426
+ deleteActionEntry: (options: {
2427
+ name: string;
2428
+ configPath?: string;
2429
+ skipWrite?: boolean;
2430
+ }) => Promise<Manifest>;
2431
+ hasActionEntry: (options: {
2432
+ name: string;
2433
+ manifest: Manifest;
2434
+ }) => boolean;
2435
+ findManifestEntry: (options: {
2436
+ appKey: string;
2437
+ manifest: Manifest;
2438
+ }) => [string, ManifestEntry] | null;
2439
+ readManifestFromFile: (filePath: string) => Promise<Manifest | null>;
2440
+ } & {
2441
+ meta: {
2442
+ listApps: {
2443
+ inputSchema: typeof ListAppsSchema;
2444
+ };
2445
+ };
2446
+ } & {
2447
+ meta: {
2448
+ getApp: {
2449
+ inputSchema: typeof GetAppSchema;
2450
+ };
2451
+ };
2452
+ } & {
2453
+ meta: {
2454
+ listActions: {
2455
+ inputSchema: typeof ListActionsSchema;
2456
+ };
2457
+ };
2458
+ } & {
2459
+ meta: {
2460
+ getAction: {
2461
+ inputSchema: typeof GetActionSchema;
2462
+ };
2463
+ };
2464
+ } & {
2465
+ meta: {
2466
+ listInputFields: {
2467
+ inputSchema: typeof ListInputFieldsSchema;
2468
+ };
2469
+ };
2470
+ } & {
2471
+ meta: {
2472
+ getInputFieldsSchema: {
2473
+ inputSchema: typeof GetInputFieldsSchemaSchema;
2474
+ };
2475
+ };
2476
+ } & {
2477
+ meta: {
2478
+ listInputFieldChoices: {
2479
+ inputSchema: typeof ListInputFieldChoicesSchema;
2480
+ };
2481
+ };
2482
+ } & {
2483
+ meta: {
2484
+ runAction: {
2485
+ inputSchema: typeof RunActionSchema;
2486
+ };
2487
+ };
2488
+ } & {
2489
+ meta: {
2490
+ listAuthentications: {
2491
+ inputSchema: typeof ListAuthenticationsQuerySchema;
2492
+ };
2493
+ };
2494
+ } & {
2495
+ meta: {
2496
+ getAuthentication: {
2497
+ inputSchema: zod.ZodObject<{
2498
+ authenticationId: zod.ZodString;
2499
+ }, zod_v4_core.$strip>;
2500
+ };
2501
+ };
2502
+ } & {
2503
+ meta: {
2504
+ findFirstAuthentication: {
2505
+ inputSchema: typeof FindFirstAuthenticationSchema;
2506
+ };
2507
+ };
2508
+ } & {
2509
+ meta: {
2510
+ findUniqueAuthentication: {
2511
+ inputSchema: typeof FindUniqueAuthenticationSchema;
2512
+ };
2513
+ };
2514
+ } & {
2515
+ meta: {
2516
+ request: {
2517
+ inputSchema: typeof RelayRequestSchema;
2518
+ };
2519
+ };
2520
+ } & {
2521
+ meta: {
2522
+ fetch: {
2523
+ packages: string[];
2524
+ categories: string[];
2525
+ returnType: string;
2526
+ inputParameters: Array<{
2527
+ name: string;
2528
+ schema: zod.ZodType;
2529
+ }>;
2530
+ };
2531
+ };
2532
+ } & {
2533
+ meta: {
2534
+ getProfile: {
2535
+ inputSchema: typeof GetProfileSchema;
2536
+ };
2537
+ };
2538
+ }>;
2539
+ declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
2540
+
2541
+ export { type Action, type ActionEntry, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem$1 as ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type AddActionEntryOptions, type AddActionEntryResult, type ApiError, type ApiEvent, type ApiPluginOptions, type ApiPluginProvides, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type ApplicationLifecycleEventData, type AppsPluginProvides, type AuthEvent, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type BaseEvent, type BatchOptions, type Choice, type ClientCredentialsObject, type Credentials, type CredentialsObject, DEFAULT_CONFIG_PATH, type DebugProperty, DebugPropertySchema, type EnhancedErrorEventData, type ErrorOptions, type EventCallback, type EventContext, type EventEmissionContext, type FetchPluginProvides, type Field, type FieldsetItem, type FindFirstAuthenticationPluginProvides, type FindUniqueAuthenticationPluginProvides, type FormatMetadata, type FormattedItem, type FunctionOptions, type FunctionRegistryEntry, type GetActionPluginProvides, type GetAppPluginProvides, type GetAuthenticationPluginProvides, type GetContextType, type GetProfilePluginProvides, type GetSdkType, type InfoFieldItem, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type ListActionsPluginProvides, type ListAppsPluginProvides, type ListAuthenticationsPluginProvides, type ListInputFieldsPluginProvides, type LoadingEvent, MAX_PAGE_LIMIT, type Manifest, type ManifestEntry, type ManifestPluginOptions, type ManifestPluginProvides, type MethodCalledEvent, type MethodCalledEventData, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type PkceCredentialsObject, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, type PositionalMetadata, RelayFetchSchema, RelayRequestSchema, type RequestPluginProvides, type ResolveAuthTokenOptions, type ResolveCredentialsOptions, type ResolvedCredentials, type RootFieldItem, type RunActionPluginProvides, type Sdk, type SdkEvent, type UpdateManifestEntryOptions, type UpdateManifestEntryResult, type UserProfile, type UserProfileItem, ZAPIER_AUTH_BASE_URL, ZAPIER_AUTH_CLIENT_ID, ZAPIER_BASE_URL, ZAPIER_CREDENTIALS, ZAPIER_CREDENTIALS_BASE_URL, ZAPIER_CREDENTIALS_CLIENT_ID, ZAPIER_CREDENTIALS_CLIENT_SECRET, ZAPIER_CREDENTIALS_SCOPE, ZAPIER_TOKEN, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkApps, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, authenticationIdGenericResolver, authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, createBaseEvent, createFunction, createSdk, createZapierSdk, createZapierSdkWithoutRegistry, fetchPlugin, findFirstAuthenticationPlugin, findManifestEntry, findUniqueAuthenticationPlugin, formatErrorMessage, generateEventId, getActionPlugin, getAppPlugin, getAuthenticationPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTokenFromCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionsPlugin, listAppsPlugin, listAuthenticationsPlugin, listInputFieldsPlugin, logDeprecation, manifestPlugin, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, toSnakeCase, toTitleCase };