@zapier/zapier-sdk 0.4.1 → 0.5.1

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 (375) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +343 -0
  3. package/dist/api/auth.d.ts +9 -0
  4. package/dist/api/auth.d.ts.map +1 -0
  5. package/dist/api/auth.js +25 -0
  6. package/dist/api/client.d.ts +9 -0
  7. package/dist/api/client.d.ts.map +1 -0
  8. package/dist/api/client.js +322 -0
  9. package/dist/api/debug.d.ts +13 -0
  10. package/dist/api/debug.d.ts.map +1 -0
  11. package/dist/api/debug.js +55 -0
  12. package/dist/api/index.d.ts +29 -0
  13. package/dist/api/index.d.ts.map +1 -0
  14. package/dist/api/index.js +41 -0
  15. package/dist/api/polling.d.ts +16 -0
  16. package/dist/api/polling.d.ts.map +1 -0
  17. package/dist/api/polling.js +45 -0
  18. package/dist/api/schemas.d.ts +2473 -0
  19. package/dist/api/schemas.d.ts.map +1 -0
  20. package/dist/api/schemas.js +355 -0
  21. package/dist/api/types.d.ts +75 -0
  22. package/dist/api/types.d.ts.map +1 -0
  23. package/dist/api/types.js +11 -0
  24. package/dist/auth.d.ts +34 -0
  25. package/dist/auth.d.ts.map +1 -0
  26. package/dist/auth.js +47 -0
  27. package/dist/constants.d.ts +10 -0
  28. package/dist/constants.d.ts.map +1 -0
  29. package/dist/constants.js +9 -0
  30. package/dist/index.cjs +2108 -1379
  31. package/dist/index.d.mts +2440 -620
  32. package/dist/index.d.ts +17 -892
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +20 -0
  35. package/dist/index.mjs +2093 -1362
  36. package/dist/plugins/api/index.d.ts +14 -0
  37. package/dist/plugins/api/index.d.ts.map +1 -0
  38. package/dist/plugins/api/index.js +21 -0
  39. package/dist/plugins/apps/index.d.ts +11 -0
  40. package/dist/plugins/apps/index.d.ts.map +1 -0
  41. package/dist/plugins/apps/index.js +91 -0
  42. package/dist/plugins/apps/types.d.ts +30 -0
  43. package/dist/plugins/apps/types.d.ts.map +1 -0
  44. package/dist/plugins/apps/types.js +2 -0
  45. package/dist/plugins/fetch/index.d.ts +21 -0
  46. package/dist/plugins/fetch/index.d.ts.map +1 -0
  47. package/dist/plugins/fetch/index.js +20 -0
  48. package/dist/plugins/findFirstAuthentication/index.d.ts +20 -0
  49. package/dist/plugins/findFirstAuthentication/index.d.ts.map +1 -0
  50. package/dist/plugins/findFirstAuthentication/index.js +24 -0
  51. package/dist/plugins/findFirstAuthentication/index.test.d.ts +2 -0
  52. package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +1 -0
  53. package/dist/plugins/findFirstAuthentication/index.test.js +171 -0
  54. package/dist/plugins/findFirstAuthentication/schemas.d.ts +29 -0
  55. package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +1 -0
  56. package/dist/plugins/findFirstAuthentication/schemas.js +18 -0
  57. package/dist/plugins/findUniqueAuthentication/index.d.ts +20 -0
  58. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +1 -0
  59. package/dist/plugins/findUniqueAuthentication/index.js +31 -0
  60. package/dist/plugins/findUniqueAuthentication/index.test.d.ts +2 -0
  61. package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +1 -0
  62. package/dist/plugins/findUniqueAuthentication/index.test.js +152 -0
  63. package/dist/plugins/findUniqueAuthentication/schemas.d.ts +29 -0
  64. package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +1 -0
  65. package/dist/plugins/findUniqueAuthentication/schemas.js +18 -0
  66. package/dist/plugins/getAction/index.d.ts +23 -0
  67. package/dist/plugins/getAction/index.d.ts.map +1 -0
  68. package/dist/plugins/getAction/index.js +28 -0
  69. package/dist/plugins/getAction/index.test.d.ts +2 -0
  70. package/dist/plugins/getAction/index.test.d.ts.map +1 -0
  71. package/dist/plugins/getAction/index.test.js +186 -0
  72. package/dist/plugins/getAction/schemas.d.ts +23 -0
  73. package/dist/plugins/getAction/schemas.d.ts.map +1 -0
  74. package/dist/plugins/getAction/schemas.js +10 -0
  75. package/dist/plugins/getApp/index.d.ts +22 -0
  76. package/dist/plugins/getApp/index.d.ts.map +1 -0
  77. package/dist/plugins/getApp/index.js +39 -0
  78. package/dist/plugins/getApp/index.test.d.ts +2 -0
  79. package/dist/plugins/getApp/index.test.d.ts.map +1 -0
  80. package/dist/plugins/getApp/index.test.js +100 -0
  81. package/dist/plugins/getApp/schemas.d.ts +18 -0
  82. package/dist/plugins/getApp/schemas.d.ts.map +1 -0
  83. package/dist/plugins/getApp/schemas.js +10 -0
  84. package/dist/plugins/getAuthentication/index.d.ts +22 -0
  85. package/dist/plugins/getAuthentication/index.d.ts.map +1 -0
  86. package/dist/plugins/getAuthentication/index.js +41 -0
  87. package/dist/plugins/getAuthentication/index.test.d.ts +2 -0
  88. package/dist/plugins/getAuthentication/index.test.d.ts.map +1 -0
  89. package/dist/plugins/getAuthentication/index.test.js +205 -0
  90. package/dist/plugins/getAuthentication/schemas.d.ts +17 -0
  91. package/dist/plugins/getAuthentication/schemas.d.ts.map +1 -0
  92. package/dist/plugins/getAuthentication/schemas.js +11 -0
  93. package/dist/plugins/getProfile/index.d.ts +23 -0
  94. package/dist/plugins/getProfile/index.d.ts.map +1 -0
  95. package/dist/plugins/getProfile/index.js +29 -0
  96. package/dist/plugins/getProfile/schemas.d.ts +13 -0
  97. package/dist/plugins/getProfile/schemas.d.ts.map +1 -0
  98. package/dist/plugins/getProfile/schemas.js +5 -0
  99. package/dist/plugins/listActions/index.d.ts +28 -0
  100. package/dist/plugins/listActions/index.d.ts.map +1 -0
  101. package/dist/plugins/listActions/index.js +61 -0
  102. package/dist/plugins/listActions/index.test.d.ts +2 -0
  103. package/dist/plugins/listActions/index.test.d.ts.map +1 -0
  104. package/dist/plugins/listActions/index.test.js +467 -0
  105. package/dist/plugins/listActions/schemas.d.ts +29 -0
  106. package/dist/plugins/listActions/schemas.d.ts.map +1 -0
  107. package/dist/plugins/listActions/schemas.js +21 -0
  108. package/dist/plugins/listApps/index.d.ts +28 -0
  109. package/dist/plugins/listApps/index.d.ts.map +1 -0
  110. package/dist/plugins/listApps/index.js +62 -0
  111. package/dist/plugins/listApps/index.test.d.ts +2 -0
  112. package/dist/plugins/listApps/index.test.d.ts.map +1 -0
  113. package/dist/plugins/listApps/index.test.js +313 -0
  114. package/dist/plugins/listApps/schemas.d.ts +30 -0
  115. package/dist/plugins/listApps/schemas.d.ts.map +1 -0
  116. package/dist/plugins/listApps/schemas.js +23 -0
  117. package/dist/plugins/listAuthentications/index.d.ts +28 -0
  118. package/dist/plugins/listAuthentications/index.d.ts.map +1 -0
  119. package/dist/plugins/listAuthentications/index.js +77 -0
  120. package/dist/plugins/listAuthentications/index.test.d.ts +2 -0
  121. package/dist/plugins/listAuthentications/index.test.d.ts.map +1 -0
  122. package/dist/plugins/listAuthentications/index.test.js +564 -0
  123. package/dist/plugins/listAuthentications/schemas.d.ts +38 -0
  124. package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -0
  125. package/dist/plugins/listAuthentications/schemas.js +28 -0
  126. package/dist/plugins/listInputFields/index.d.ts +28 -0
  127. package/dist/plugins/listInputFields/index.d.ts.map +1 -0
  128. package/dist/plugins/listInputFields/index.js +133 -0
  129. package/dist/plugins/listInputFields/index.test.d.ts +2 -0
  130. package/dist/plugins/listInputFields/index.test.d.ts.map +1 -0
  131. package/dist/plugins/listInputFields/index.test.js +325 -0
  132. package/dist/plugins/listInputFields/schemas.d.ts +38 -0
  133. package/dist/plugins/listInputFields/schemas.d.ts.map +1 -0
  134. package/dist/plugins/listInputFields/schemas.js +22 -0
  135. package/dist/plugins/registry/index.d.ts +11 -0
  136. package/dist/plugins/registry/index.d.ts.map +1 -0
  137. package/dist/plugins/registry/index.js +14 -0
  138. package/dist/plugins/request/index.d.ts +19 -0
  139. package/dist/plugins/request/index.d.ts.map +1 -0
  140. package/dist/plugins/request/index.js +62 -0
  141. package/dist/plugins/request/index.test.d.ts +2 -0
  142. package/dist/plugins/request/index.test.d.ts.map +1 -0
  143. package/dist/plugins/request/index.test.js +256 -0
  144. package/dist/plugins/request/schemas.d.ts +69 -0
  145. package/dist/plugins/request/schemas.d.ts.map +1 -0
  146. package/dist/plugins/request/schemas.js +42 -0
  147. package/dist/plugins/runAction/index.d.ts +28 -0
  148. package/dist/plugins/runAction/index.d.ts.map +1 -0
  149. package/dist/plugins/runAction/index.js +86 -0
  150. package/dist/plugins/runAction/index.test.d.ts +2 -0
  151. package/dist/plugins/runAction/index.test.d.ts.map +1 -0
  152. package/dist/plugins/runAction/index.test.js +320 -0
  153. package/dist/plugins/runAction/schemas.d.ts +37 -0
  154. package/dist/plugins/runAction/schemas.d.ts.map +1 -0
  155. package/dist/plugins/runAction/schemas.js +22 -0
  156. package/dist/resolvers/actionKey.d.ts +9 -0
  157. package/dist/resolvers/actionKey.d.ts.map +1 -0
  158. package/dist/resolvers/actionKey.js +19 -0
  159. package/dist/resolvers/actionType.d.ts +9 -0
  160. package/dist/resolvers/actionType.d.ts.map +1 -0
  161. package/dist/resolvers/actionType.js +22 -0
  162. package/dist/resolvers/appKey.d.ts +7 -0
  163. package/dist/resolvers/appKey.d.ts.map +1 -0
  164. package/dist/resolvers/appKey.js +5 -0
  165. package/dist/resolvers/authenticationId.d.ts +9 -0
  166. package/dist/resolvers/authenticationId.d.ts.map +1 -0
  167. package/dist/resolvers/authenticationId.js +33 -0
  168. package/dist/resolvers/index.d.ts +40 -0
  169. package/dist/resolvers/index.d.ts.map +1 -0
  170. package/dist/resolvers/index.js +91 -0
  171. package/dist/resolvers/inputs.d.ts +8 -0
  172. package/dist/resolvers/inputs.d.ts.map +1 -0
  173. package/dist/resolvers/inputs.js +14 -0
  174. package/dist/schemas/Action.d.ts +243 -0
  175. package/dist/schemas/Action.d.ts.map +1 -0
  176. package/dist/schemas/Action.js +34 -0
  177. package/dist/schemas/App.d.ts +26 -0
  178. package/dist/schemas/App.d.ts.map +1 -0
  179. package/dist/schemas/App.js +22 -0
  180. package/dist/schemas/Auth.d.ts +161 -0
  181. package/dist/schemas/Auth.d.ts.map +1 -0
  182. package/dist/schemas/Auth.js +41 -0
  183. package/dist/schemas/Field.d.ts +144 -0
  184. package/dist/schemas/Field.d.ts.map +1 -0
  185. package/dist/schemas/Field.js +105 -0
  186. package/dist/schemas/UserProfile.d.ts +163 -0
  187. package/dist/schemas/UserProfile.d.ts.map +1 -0
  188. package/dist/schemas/UserProfile.js +29 -0
  189. package/dist/sdk.d.ts +10 -0
  190. package/dist/sdk.d.ts.map +1 -0
  191. package/dist/sdk.js +94 -0
  192. package/dist/sdk.test.d.ts +2 -0
  193. package/dist/sdk.test.d.ts.map +1 -0
  194. package/dist/sdk.test.js +135 -0
  195. package/dist/types/domain.d.ts +36 -0
  196. package/dist/types/domain.d.ts.map +1 -0
  197. package/dist/types/domain.js +1 -0
  198. package/dist/types/domain.test.d.ts +2 -0
  199. package/dist/types/domain.test.d.ts.map +1 -0
  200. package/dist/types/domain.test.js +39 -0
  201. package/dist/types/errors.d.ts +143 -0
  202. package/dist/types/errors.d.ts.map +1 -0
  203. package/dist/types/errors.js +187 -0
  204. package/dist/types/events.d.ts +38 -0
  205. package/dist/types/events.d.ts.map +1 -0
  206. package/dist/types/events.js +7 -0
  207. package/dist/types/functions.d.ts +26 -0
  208. package/dist/types/functions.d.ts.map +1 -0
  209. package/dist/types/functions.js +4 -0
  210. package/dist/types/plugin.d.ts +61 -0
  211. package/dist/types/plugin.d.ts.map +1 -0
  212. package/dist/types/plugin.js +9 -0
  213. package/dist/types/properties.d.ts +22 -0
  214. package/dist/types/properties.d.ts.map +1 -0
  215. package/dist/types/properties.js +50 -0
  216. package/dist/types/sdk.d.ts +43 -0
  217. package/dist/types/sdk.d.ts.map +1 -0
  218. package/dist/types/sdk.js +4 -0
  219. package/dist/utils/array-utils.d.ts +31 -0
  220. package/dist/utils/array-utils.d.ts.map +1 -0
  221. package/dist/utils/array-utils.js +36 -0
  222. package/dist/utils/array-utils.test.d.ts +2 -0
  223. package/dist/utils/array-utils.test.d.ts.map +1 -0
  224. package/dist/utils/array-utils.test.js +107 -0
  225. package/dist/utils/domain-utils.d.ts +78 -0
  226. package/dist/utils/domain-utils.d.ts.map +1 -0
  227. package/dist/utils/domain-utils.js +218 -0
  228. package/dist/utils/domain-utils.test.d.ts +2 -0
  229. package/dist/utils/domain-utils.test.d.ts.map +1 -0
  230. package/dist/utils/domain-utils.test.js +192 -0
  231. package/dist/utils/function-utils.d.ts +45 -0
  232. package/dist/utils/function-utils.d.ts.map +1 -0
  233. package/dist/utils/function-utils.js +158 -0
  234. package/dist/utils/function-utils.test.d.ts +2 -0
  235. package/dist/utils/function-utils.test.d.ts.map +1 -0
  236. package/dist/utils/function-utils.test.js +110 -0
  237. package/dist/utils/pagination-utils.d.ts +37 -0
  238. package/dist/utils/pagination-utils.d.ts.map +1 -0
  239. package/dist/utils/pagination-utils.js +165 -0
  240. package/dist/utils/pagination-utils.test.d.ts +17 -0
  241. package/dist/utils/pagination-utils.test.d.ts.map +1 -0
  242. package/dist/utils/pagination-utils.test.js +461 -0
  243. package/dist/utils/schema-utils.d.ts +45 -0
  244. package/dist/utils/schema-utils.d.ts.map +1 -0
  245. package/dist/utils/schema-utils.js +65 -0
  246. package/dist/utils/validation.d.ts +4 -0
  247. package/dist/utils/validation.d.ts.map +1 -0
  248. package/dist/utils/validation.js +30 -0
  249. package/dist/utils/validation.test.d.ts +2 -0
  250. package/dist/utils/validation.test.d.ts.map +1 -0
  251. package/dist/utils/validation.test.js +43 -0
  252. package/package.json +12 -3
  253. package/src/api/client.ts +394 -171
  254. package/src/api/debug.ts +10 -1
  255. package/src/api/index.ts +0 -2
  256. package/src/api/polling.ts +28 -7
  257. package/src/api/schemas.ts +387 -0
  258. package/src/api/types.ts +72 -136
  259. package/src/constants.ts +10 -0
  260. package/src/index.ts +40 -19
  261. package/src/plugins/api/index.ts +47 -0
  262. package/src/plugins/apps/index.ts +25 -19
  263. package/src/plugins/apps/types.ts +7 -11
  264. package/src/plugins/fetch/index.ts +48 -40
  265. package/src/plugins/findFirstAuthentication/index.test.ts +206 -0
  266. package/src/plugins/findFirstAuthentication/index.ts +55 -0
  267. package/src/plugins/findFirstAuthentication/schemas.ts +41 -0
  268. package/src/plugins/findUniqueAuthentication/index.test.ts +197 -0
  269. package/src/plugins/findUniqueAuthentication/index.ts +72 -0
  270. package/src/plugins/findUniqueAuthentication/schemas.ts +42 -0
  271. package/src/plugins/getAction/index.test.ts +239 -0
  272. package/src/plugins/getAction/index.ts +57 -0
  273. package/src/plugins/getAction/schemas.ts +33 -0
  274. package/src/plugins/getApp/index.test.ts +127 -0
  275. package/src/plugins/getApp/index.ts +66 -0
  276. package/src/plugins/getApp/schemas.ts +38 -0
  277. package/src/plugins/getAuthentication/index.test.ts +284 -0
  278. package/src/plugins/getAuthentication/index.ts +86 -0
  279. package/src/plugins/getAuthentication/schemas.ts +31 -0
  280. package/src/plugins/getProfile/index.ts +55 -0
  281. package/src/plugins/getProfile/schemas.ts +26 -0
  282. package/src/plugins/listActions/index.test.ts +582 -0
  283. package/src/plugins/listActions/index.ts +115 -0
  284. package/src/plugins/listActions/schemas.ts +54 -0
  285. package/src/plugins/listApps/index.test.ts +357 -0
  286. package/src/plugins/listApps/index.ts +121 -0
  287. package/src/plugins/listApps/schemas.ts +49 -0
  288. package/src/plugins/listAuthentications/index.test.ts +709 -0
  289. package/src/plugins/listAuthentications/index.ts +136 -0
  290. package/src/plugins/listAuthentications/schemas.ts +60 -0
  291. package/src/plugins/listInputFields/index.test.ts +408 -0
  292. package/src/plugins/listInputFields/index.ts +204 -0
  293. package/src/plugins/listInputFields/schemas.ts +56 -0
  294. package/src/plugins/registry/index.ts +30 -0
  295. package/src/plugins/request/index.test.ts +329 -0
  296. package/src/plugins/request/index.ts +103 -0
  297. package/src/{functions → plugins}/request/schemas.ts +20 -9
  298. package/src/plugins/runAction/index.test.ts +387 -0
  299. package/src/plugins/runAction/index.ts +176 -0
  300. package/src/plugins/runAction/schemas.ts +53 -0
  301. package/src/resolvers/actionKey.ts +6 -4
  302. package/src/resolvers/actionType.ts +7 -2
  303. package/src/resolvers/appKey.ts +1 -1
  304. package/src/resolvers/authenticationId.ts +12 -3
  305. package/src/resolvers/inputs.ts +3 -1
  306. package/src/schemas/Action.ts +18 -12
  307. package/src/schemas/App.ts +11 -19
  308. package/src/schemas/Auth.ts +18 -13
  309. package/src/schemas/Field.ts +106 -11
  310. package/src/schemas/UserProfile.ts +43 -0
  311. package/src/sdk.test.ts +212 -0
  312. package/src/sdk.ts +132 -102
  313. package/src/types/domain.test.ts +50 -0
  314. package/src/types/domain.ts +43 -75
  315. package/src/types/errors.ts +275 -0
  316. package/src/types/functions.ts +27 -0
  317. package/src/types/optional-zapier-sdk-cli-login.d.ts +37 -0
  318. package/src/types/plugin.ts +105 -0
  319. package/src/types/properties.ts +4 -3
  320. package/src/types/sdk.ts +70 -48
  321. package/src/utils/array-utils.test.ts +131 -0
  322. package/src/utils/array-utils.ts +41 -0
  323. package/src/utils/domain-utils.test.ts +239 -0
  324. package/src/utils/domain-utils.ts +283 -0
  325. package/src/utils/function-utils.test.ts +141 -0
  326. package/src/utils/function-utils.ts +245 -0
  327. package/src/utils/pagination-utils.test.ts +620 -0
  328. package/src/utils/pagination-utils.ts +242 -0
  329. package/src/utils/validation.test.ts +50 -0
  330. package/src/utils/validation.ts +44 -0
  331. package/tsconfig.build.json +16 -2
  332. package/tsconfig.json +3 -1
  333. package/tsconfig.tsbuildinfo +1 -0
  334. package/tsup.config.ts +2 -0
  335. package/src/functions/bundleCode/index.ts +0 -78
  336. package/src/functions/bundleCode/info.ts +0 -9
  337. package/src/functions/bundleCode/schemas.ts +0 -30
  338. package/src/functions/findFirstAuthentication/index.ts +0 -24
  339. package/src/functions/findFirstAuthentication/info.ts +0 -9
  340. package/src/functions/findFirstAuthentication/schemas.ts +0 -50
  341. package/src/functions/findUniqueAuthentication/index.ts +0 -35
  342. package/src/functions/findUniqueAuthentication/info.ts +0 -9
  343. package/src/functions/findUniqueAuthentication/schemas.ts +0 -50
  344. package/src/functions/generateTypes/index.ts +0 -363
  345. package/src/functions/generateTypes/info.ts +0 -9
  346. package/src/functions/generateTypes/schemas.ts +0 -31
  347. package/src/functions/getAction/index.ts +0 -33
  348. package/src/functions/getAction/info.ts +0 -9
  349. package/src/functions/getAction/schemas.ts +0 -25
  350. package/src/functions/getApp/index.ts +0 -41
  351. package/src/functions/getApp/info.ts +0 -9
  352. package/src/functions/getApp/schemas.ts +0 -20
  353. package/src/functions/getAuthentication/index.ts +0 -50
  354. package/src/functions/getAuthentication/info.ts +0 -9
  355. package/src/functions/getAuthentication/schemas.ts +0 -29
  356. package/src/functions/listActions/index.ts +0 -149
  357. package/src/functions/listActions/info.ts +0 -9
  358. package/src/functions/listActions/schemas.ts +0 -30
  359. package/src/functions/listApps/index.ts +0 -60
  360. package/src/functions/listApps/info.ts +0 -9
  361. package/src/functions/listApps/schemas.ts +0 -32
  362. package/src/functions/listAuthentications/index.ts +0 -162
  363. package/src/functions/listAuthentications/info.ts +0 -9
  364. package/src/functions/listAuthentications/schemas.ts +0 -50
  365. package/src/functions/listFields/index.ts +0 -86
  366. package/src/functions/listFields/info.ts +0 -9
  367. package/src/functions/listFields/schemas.ts +0 -36
  368. package/src/functions/request/index.ts +0 -150
  369. package/src/functions/request/info.ts +0 -11
  370. package/src/functions/runAction/index.ts +0 -127
  371. package/src/functions/runAction/info.ts +0 -9
  372. package/src/functions/runAction/schemas.ts +0 -34
  373. package/src/plugins/apps/info.ts +0 -12
  374. package/src/plugins/fetch/types.ts +0 -2
  375. /package/src/{schema-utils.ts → utils/schema-utils.ts} +0 -0
package/dist/index.d.mts CHANGED
@@ -1,167 +1,681 @@
1
1
  import { z } from 'zod';
2
2
 
3
- interface Integration {
4
- key: string;
5
- name: string;
6
- description: string;
7
- version: string;
8
- category?: string;
9
- actions: Action[];
10
- triggers: Trigger[];
11
- current_implementation_id?: string;
12
- }
13
- interface Action {
14
- key: string;
15
- name: string;
16
- description: string;
17
- appKey: string;
18
- type: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
19
- inputFields: Field[];
20
- outputFields: Field[];
21
- }
22
- interface Trigger {
23
- key: string;
24
- name: string;
25
- description: string;
26
- appKey: string;
27
- type: "instant" | "polling" | "webhook";
28
- outputFields: Field[];
29
- }
30
- interface Field {
3
+ declare function isPositional(schema: z.ZodType): boolean;
4
+
5
+ declare const AppItemSchema: z.ZodObject<{
6
+ title: z.ZodString;
7
+ key: z.ZodString;
8
+ current_implementation_id: z.ZodString;
9
+ version: z.ZodOptional<z.ZodString>;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ slug: z.ZodOptional<z.ZodString>;
12
+ }, "strip", z.ZodTypeAny, {
31
13
  key: string;
32
- label: string;
33
- type: "string" | "number" | "boolean" | "datetime" | "file" | "object" | "array";
34
- required: boolean;
35
- description?: string;
36
- choices?: Choice[];
37
- }
38
- interface Choice {
39
- value: string | number;
40
- label: string;
41
- }
42
- interface ActionExecutionResult {
43
- success: boolean;
44
- data?: any;
45
- error?: string;
46
- metadata?: {
47
- executionTime?: number;
48
- requestId?: string;
49
- };
50
- }
51
- interface ActionField {
14
+ title: string;
15
+ current_implementation_id: string;
16
+ version?: string | undefined;
17
+ description?: string | undefined;
18
+ slug?: string | undefined;
19
+ }, {
52
20
  key: string;
53
- label?: string;
54
- required: boolean;
55
- type?: string;
56
- helpText?: string;
57
- helpTextHtml?: string;
58
- choices?: ActionFieldChoice[];
59
- default?: string;
60
- placeholder?: string;
61
- computed?: boolean;
62
- customField?: boolean;
63
- dependsOn?: string[];
64
- format?: string;
65
- inputFormat?: string[];
66
- }
67
- interface ActionFieldChoice {
68
- value: string | number;
69
- label: string;
70
- }
71
- interface NeedsRequest {
72
- selected_api: string;
73
- action: string;
74
- type_of: string;
75
- authentication_id?: number;
76
- params?: Record<string, any>;
77
- }
78
- interface NeedsResponse {
79
- success: boolean;
80
- needs?: ActionField[];
81
- errors?: string[];
82
- }
83
- interface Authentication {
21
+ title: string;
22
+ current_implementation_id: string;
23
+ version?: string | undefined;
24
+ description?: string | undefined;
25
+ slug?: string | undefined;
26
+ }>;
27
+
28
+ declare const AuthenticationItemSchema: z.ZodObject<Omit<{
29
+ id: z.ZodNumber;
30
+ date: z.ZodString;
31
+ lastchanged: z.ZodOptional<z.ZodString>;
32
+ account_id: z.ZodNumber;
33
+ customuser_id: z.ZodOptional<z.ZodNumber>;
34
+ selected_api: z.ZodString;
35
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ is_invite_only: z.ZodBoolean;
37
+ is_private: z.ZodBoolean;
38
+ shared_with_all: z.ZodBoolean;
39
+ is_stale: z.ZodOptional<z.ZodString>;
40
+ is_shared: z.ZodOptional<z.ZodString>;
41
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ url: z.ZodOptional<z.ZodString>;
46
+ groups: z.ZodOptional<z.ZodString>;
47
+ members: z.ZodOptional<z.ZodString>;
48
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
49
+ }, "selected_api" | "customuser_id"> & {
50
+ implementation_id: z.ZodOptional<z.ZodString>;
51
+ is_expired: z.ZodOptional<z.ZodString>;
52
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ app_key: z.ZodOptional<z.ZodString>;
54
+ version: z.ZodOptional<z.ZodString>;
55
+ user_id: z.ZodOptional<z.ZodNumber>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ date: string;
84
58
  id: number;
59
+ account_id: number;
60
+ is_invite_only: boolean;
61
+ is_private: boolean;
62
+ shared_with_all: boolean;
63
+ title?: string | null | undefined;
64
+ version?: string | undefined;
65
+ label?: string | null | undefined;
66
+ permissions?: Record<string, boolean> | undefined;
67
+ lastchanged?: string | undefined;
68
+ destination_selected_api?: string | null | undefined;
69
+ is_stale?: string | undefined;
70
+ is_shared?: string | undefined;
71
+ marked_stale_at?: string | null | undefined;
72
+ identifier?: string | null | undefined;
73
+ url?: string | undefined;
74
+ groups?: string | undefined;
75
+ members?: string | undefined;
76
+ user_id?: number | undefined;
77
+ implementation_id?: string | undefined;
78
+ is_expired?: string | undefined;
79
+ expired_at?: string | null | undefined;
80
+ app_key?: string | undefined;
81
+ }, {
85
82
  date: string;
86
- lastchanged?: string;
83
+ id: number;
87
84
  account_id: number;
88
- customuser_id?: number;
89
- selected_api: string;
90
- destination_selected_api?: string | null;
91
85
  is_invite_only: boolean;
92
86
  is_private: boolean;
93
87
  shared_with_all: boolean;
94
- is_stale?: string;
95
- is_shared?: string;
96
- marked_stale_at?: string | null;
97
- label?: string | null;
98
- identifier?: string | null;
99
- title?: string | null;
100
- url?: string;
101
- groups?: string;
102
- members?: string;
103
- permissions?: Record<string, boolean>;
104
- }
105
- interface AuthenticationsResponse {
106
- count: number;
107
- next?: string | null;
108
- previous?: string | null;
109
- results: Authentication[];
110
- }
88
+ title?: string | null | undefined;
89
+ version?: string | undefined;
90
+ label?: string | null | undefined;
91
+ permissions?: Record<string, boolean> | undefined;
92
+ lastchanged?: string | undefined;
93
+ destination_selected_api?: string | null | undefined;
94
+ is_stale?: string | undefined;
95
+ is_shared?: string | undefined;
96
+ marked_stale_at?: string | null | undefined;
97
+ identifier?: string | null | undefined;
98
+ url?: string | undefined;
99
+ groups?: string | undefined;
100
+ members?: string | undefined;
101
+ user_id?: number | undefined;
102
+ implementation_id?: string | undefined;
103
+ is_expired?: string | undefined;
104
+ expired_at?: string | null | undefined;
105
+ app_key?: string | undefined;
106
+ }>;
107
+
108
+ declare const ActionItemSchema: z.ZodObject<Omit<{
109
+ id: z.ZodOptional<z.ZodString>;
110
+ type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
111
+ key: z.ZodString;
112
+ name: z.ZodString;
113
+ noun: z.ZodOptional<z.ZodString>;
114
+ description: z.ZodString;
115
+ description_html: z.ZodOptional<z.ZodString>;
116
+ is_important: z.ZodOptional<z.ZodBoolean>;
117
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
118
+ needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ key: z.ZodString;
120
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
121
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
122
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
123
+ key: z.ZodOptional<z.ZodString>;
124
+ label: z.ZodOptional<z.ZodString>;
125
+ sample: z.ZodOptional<z.ZodString>;
126
+ value: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ value?: string | undefined;
129
+ key?: string | undefined;
130
+ label?: string | undefined;
131
+ sample?: string | undefined;
132
+ }, {
133
+ value?: string | undefined;
134
+ key?: string | undefined;
135
+ label?: string | undefined;
136
+ sample?: string | undefined;
137
+ }>, "many">>;
138
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
139
+ custom_field: z.ZodOptional<z.ZodBoolean>;
140
+ default: z.ZodOptional<z.ZodString>;
141
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
142
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
143
+ from_search: z.ZodOptional<z.ZodBoolean>;
144
+ from_write: z.ZodOptional<z.ZodBoolean>;
145
+ help_text: z.ZodOptional<z.ZodString>;
146
+ help_text_html: z.ZodOptional<z.ZodString>;
147
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
148
+ label: z.ZodOptional<z.ZodString>;
149
+ language: z.ZodOptional<z.ZodString>;
150
+ parent_key: z.ZodOptional<z.ZodString>;
151
+ placeholder: z.ZodOptional<z.ZodString>;
152
+ prefill: z.ZodOptional<z.ZodString>;
153
+ required: z.ZodOptional<z.ZodBoolean>;
154
+ searchfill: z.ZodOptional<z.ZodString>;
155
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
156
+ regex: z.ZodOptional<z.ZodString>;
157
+ type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
158
+ list: z.ZodOptional<z.ZodBoolean>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ key: string;
161
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
162
+ label?: string | undefined;
163
+ alters_custom_fields?: boolean | null | undefined;
164
+ capabilities?: string[] | undefined;
165
+ choices?: {
166
+ value?: string | undefined;
167
+ key?: string | undefined;
168
+ label?: string | undefined;
169
+ sample?: string | undefined;
170
+ }[] | undefined;
171
+ computed?: boolean | null | undefined;
172
+ custom_field?: boolean | undefined;
173
+ default?: string | undefined;
174
+ depends_on?: string[] | undefined;
175
+ format?: "SELECT" | undefined;
176
+ from_search?: boolean | undefined;
177
+ from_write?: boolean | undefined;
178
+ help_text?: string | undefined;
179
+ help_text_html?: string | undefined;
180
+ input_format?: string[] | undefined;
181
+ language?: string | undefined;
182
+ parent_key?: string | undefined;
183
+ placeholder?: string | undefined;
184
+ prefill?: string | undefined;
185
+ required?: boolean | undefined;
186
+ searchfill?: string | undefined;
187
+ send_in_json?: boolean | undefined;
188
+ regex?: string | undefined;
189
+ list?: boolean | undefined;
190
+ }, {
191
+ key: string;
192
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
193
+ label?: string | undefined;
194
+ alters_custom_fields?: boolean | null | undefined;
195
+ capabilities?: string[] | undefined;
196
+ choices?: {
197
+ value?: string | undefined;
198
+ key?: string | undefined;
199
+ label?: string | undefined;
200
+ sample?: string | undefined;
201
+ }[] | undefined;
202
+ computed?: boolean | null | undefined;
203
+ custom_field?: boolean | undefined;
204
+ default?: string | undefined;
205
+ depends_on?: string[] | undefined;
206
+ format?: "SELECT" | undefined;
207
+ from_search?: boolean | undefined;
208
+ from_write?: boolean | undefined;
209
+ help_text?: string | undefined;
210
+ help_text_html?: string | undefined;
211
+ input_format?: string[] | undefined;
212
+ language?: string | undefined;
213
+ parent_key?: string | undefined;
214
+ placeholder?: string | undefined;
215
+ prefill?: string | undefined;
216
+ required?: boolean | undefined;
217
+ searchfill?: string | undefined;
218
+ send_in_json?: boolean | undefined;
219
+ regex?: string | undefined;
220
+ list?: boolean | undefined;
221
+ }>, "many">>;
222
+ meta: z.ZodOptional<z.ZodString>;
223
+ selected_api: z.ZodOptional<z.ZodString>;
224
+ links: z.ZodOptional<z.ZodObject<{
225
+ action_url: z.ZodOptional<z.ZodString>;
226
+ }, "strip", z.ZodTypeAny, {
227
+ action_url?: string | undefined;
228
+ }, {
229
+ action_url?: string | undefined;
230
+ }>>;
231
+ permissions: z.ZodOptional<z.ZodObject<{
232
+ can_use: z.ZodOptional<z.ZodBoolean>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ can_use?: boolean | undefined;
235
+ }, {
236
+ can_use?: boolean | undefined;
237
+ }>>;
238
+ }, "type" | "name"> & {
239
+ app_key: z.ZodString;
240
+ action_type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
241
+ title: z.ZodString;
242
+ type: z.ZodLiteral<"action">;
243
+ }, "strip", z.ZodTypeAny, {
244
+ type: "action";
245
+ key: string;
246
+ title: string;
247
+ description: string;
248
+ app_key: string;
249
+ action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
250
+ id?: string | undefined;
251
+ noun?: string | undefined;
252
+ description_html?: string | undefined;
253
+ is_important?: boolean | undefined;
254
+ is_hidden?: boolean | undefined;
255
+ needs?: {
256
+ key: string;
257
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
258
+ label?: string | undefined;
259
+ alters_custom_fields?: boolean | null | undefined;
260
+ capabilities?: string[] | undefined;
261
+ choices?: {
262
+ value?: string | undefined;
263
+ key?: string | undefined;
264
+ label?: string | undefined;
265
+ sample?: string | undefined;
266
+ }[] | undefined;
267
+ computed?: boolean | null | undefined;
268
+ custom_field?: boolean | undefined;
269
+ default?: string | undefined;
270
+ depends_on?: string[] | undefined;
271
+ format?: "SELECT" | undefined;
272
+ from_search?: boolean | undefined;
273
+ from_write?: boolean | undefined;
274
+ help_text?: string | undefined;
275
+ help_text_html?: string | undefined;
276
+ input_format?: string[] | undefined;
277
+ language?: string | undefined;
278
+ parent_key?: string | undefined;
279
+ placeholder?: string | undefined;
280
+ prefill?: string | undefined;
281
+ required?: boolean | undefined;
282
+ searchfill?: string | undefined;
283
+ send_in_json?: boolean | undefined;
284
+ regex?: string | undefined;
285
+ list?: boolean | undefined;
286
+ }[] | undefined;
287
+ meta?: string | undefined;
288
+ selected_api?: string | undefined;
289
+ links?: {
290
+ action_url?: string | undefined;
291
+ } | undefined;
292
+ permissions?: {
293
+ can_use?: boolean | undefined;
294
+ } | undefined;
295
+ }, {
296
+ type: "action";
297
+ key: string;
298
+ title: string;
299
+ description: string;
300
+ app_key: string;
301
+ action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
302
+ id?: string | undefined;
303
+ noun?: string | undefined;
304
+ description_html?: string | undefined;
305
+ is_important?: boolean | undefined;
306
+ is_hidden?: boolean | undefined;
307
+ needs?: {
308
+ key: string;
309
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
310
+ label?: string | undefined;
311
+ alters_custom_fields?: boolean | null | undefined;
312
+ capabilities?: string[] | undefined;
313
+ choices?: {
314
+ value?: string | undefined;
315
+ key?: string | undefined;
316
+ label?: string | undefined;
317
+ sample?: string | undefined;
318
+ }[] | undefined;
319
+ computed?: boolean | null | undefined;
320
+ custom_field?: boolean | undefined;
321
+ default?: string | undefined;
322
+ depends_on?: string[] | undefined;
323
+ format?: "SELECT" | undefined;
324
+ from_search?: boolean | undefined;
325
+ from_write?: boolean | undefined;
326
+ help_text?: string | undefined;
327
+ help_text_html?: string | undefined;
328
+ input_format?: string[] | undefined;
329
+ language?: string | undefined;
330
+ parent_key?: string | undefined;
331
+ placeholder?: string | undefined;
332
+ prefill?: string | undefined;
333
+ required?: boolean | undefined;
334
+ searchfill?: string | undefined;
335
+ send_in_json?: boolean | undefined;
336
+ regex?: string | undefined;
337
+ list?: boolean | undefined;
338
+ }[] | undefined;
339
+ meta?: string | undefined;
340
+ selected_api?: string | undefined;
341
+ links?: {
342
+ action_url?: string | undefined;
343
+ } | undefined;
344
+ permissions?: {
345
+ can_use?: boolean | undefined;
346
+ } | undefined;
347
+ }>;
348
+
349
+ declare const InputFieldItemSchema: z.ZodObject<Omit<{
350
+ key: z.ZodString;
351
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
352
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
353
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
354
+ key: z.ZodOptional<z.ZodString>;
355
+ label: z.ZodOptional<z.ZodString>;
356
+ sample: z.ZodOptional<z.ZodString>;
357
+ value: z.ZodOptional<z.ZodString>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ value?: string | undefined;
360
+ key?: string | undefined;
361
+ label?: string | undefined;
362
+ sample?: string | undefined;
363
+ }, {
364
+ value?: string | undefined;
365
+ key?: string | undefined;
366
+ label?: string | undefined;
367
+ sample?: string | undefined;
368
+ }>, "many">>;
369
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
370
+ custom_field: z.ZodOptional<z.ZodBoolean>;
371
+ default: z.ZodOptional<z.ZodString>;
372
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
373
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
374
+ from_search: z.ZodOptional<z.ZodBoolean>;
375
+ from_write: z.ZodOptional<z.ZodBoolean>;
376
+ help_text: z.ZodOptional<z.ZodString>;
377
+ help_text_html: z.ZodOptional<z.ZodString>;
378
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
379
+ label: z.ZodOptional<z.ZodString>;
380
+ language: z.ZodOptional<z.ZodString>;
381
+ parent_key: z.ZodOptional<z.ZodString>;
382
+ placeholder: z.ZodOptional<z.ZodString>;
383
+ prefill: z.ZodOptional<z.ZodString>;
384
+ required: z.ZodOptional<z.ZodBoolean>;
385
+ searchfill: z.ZodOptional<z.ZodString>;
386
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
387
+ regex: z.ZodOptional<z.ZodString>;
388
+ type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
389
+ list: z.ZodOptional<z.ZodBoolean>;
390
+ }, "depends_on" | "format" | "placeholder" | "required"> & {
391
+ id: z.ZodString;
392
+ default_value: z.ZodString;
393
+ depends_on: z.ZodArray<z.ZodString, "many">;
394
+ description: z.ZodString;
395
+ invalidates_input_fields: z.ZodBoolean;
396
+ is_required: z.ZodBoolean;
397
+ placeholder: z.ZodString;
398
+ title: z.ZodString;
399
+ value_type: z.ZodString;
400
+ format: z.ZodOptional<z.ZodString>;
401
+ items: z.ZodOptional<z.ZodObject<{
402
+ type: z.ZodString;
403
+ }, "strip", z.ZodTypeAny, {
404
+ type: string;
405
+ }, {
406
+ type: string;
407
+ }>>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ key: string;
410
+ title: string;
411
+ description: string;
412
+ depends_on: string[];
413
+ placeholder: string;
414
+ id: string;
415
+ default_value: string;
416
+ invalidates_input_fields: boolean;
417
+ is_required: boolean;
418
+ value_type: string;
419
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
420
+ label?: string | undefined;
421
+ alters_custom_fields?: boolean | null | undefined;
422
+ capabilities?: string[] | undefined;
423
+ choices?: {
424
+ value?: string | undefined;
425
+ key?: string | undefined;
426
+ label?: string | undefined;
427
+ sample?: string | undefined;
428
+ }[] | undefined;
429
+ computed?: boolean | null | undefined;
430
+ custom_field?: boolean | undefined;
431
+ default?: string | undefined;
432
+ format?: string | undefined;
433
+ from_search?: boolean | undefined;
434
+ from_write?: boolean | undefined;
435
+ help_text?: string | undefined;
436
+ help_text_html?: string | undefined;
437
+ input_format?: string[] | undefined;
438
+ language?: string | undefined;
439
+ parent_key?: string | undefined;
440
+ prefill?: string | undefined;
441
+ searchfill?: string | undefined;
442
+ send_in_json?: boolean | undefined;
443
+ regex?: string | undefined;
444
+ list?: boolean | undefined;
445
+ items?: {
446
+ type: string;
447
+ } | undefined;
448
+ }, {
449
+ key: string;
450
+ title: string;
451
+ description: string;
452
+ depends_on: string[];
453
+ placeholder: string;
454
+ id: string;
455
+ default_value: string;
456
+ invalidates_input_fields: boolean;
457
+ is_required: boolean;
458
+ value_type: string;
459
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
460
+ label?: string | undefined;
461
+ alters_custom_fields?: boolean | null | undefined;
462
+ capabilities?: string[] | undefined;
463
+ choices?: {
464
+ value?: string | undefined;
465
+ key?: string | undefined;
466
+ label?: string | undefined;
467
+ sample?: string | undefined;
468
+ }[] | undefined;
469
+ computed?: boolean | null | undefined;
470
+ custom_field?: boolean | undefined;
471
+ default?: string | undefined;
472
+ format?: string | undefined;
473
+ from_search?: boolean | undefined;
474
+ from_write?: boolean | undefined;
475
+ help_text?: string | undefined;
476
+ help_text_html?: string | undefined;
477
+ input_format?: string[] | undefined;
478
+ language?: string | undefined;
479
+ parent_key?: string | undefined;
480
+ prefill?: string | undefined;
481
+ searchfill?: string | undefined;
482
+ send_in_json?: boolean | undefined;
483
+ regex?: string | undefined;
484
+ list?: boolean | undefined;
485
+ items?: {
486
+ type: string;
487
+ } | undefined;
488
+ }>;
489
+
490
+ declare const UserProfileItemSchema: z.ZodObject<Omit<{
491
+ id: z.ZodNumber;
492
+ code: z.ZodString;
493
+ user_id: z.ZodNumber;
494
+ auto_provisioned: z.ZodBoolean;
495
+ first_name: z.ZodString;
496
+ last_name: z.ZodString;
497
+ username: z.ZodString;
498
+ personas: z.ZodString;
499
+ user_generated_personas: z.ZodString;
500
+ last_login: z.ZodString;
501
+ email: z.ZodString;
502
+ email_hash: z.ZodString;
503
+ email_confirmed: z.ZodBoolean;
504
+ timezone: z.ZodString;
505
+ photo_url: z.ZodString;
506
+ has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
507
+ signup: z.ZodString;
508
+ since_signup: z.ZodString;
509
+ has_activated: z.ZodBoolean;
510
+ enable_gz_creator: z.ZodBoolean;
511
+ should_see_nps_survey: z.ZodBoolean;
512
+ is_developer: z.ZodBoolean;
513
+ is_expert: z.ZodBoolean;
514
+ tos_agreement: z.ZodBoolean;
515
+ should_renew_tos: z.ZodBoolean;
516
+ is_gdpr_consented: z.ZodBoolean;
517
+ disable_ssl_check: z.ZodBoolean;
518
+ identity: z.ZodNumber;
519
+ summary_schedule: z.ZodString;
520
+ alert_triggers: z.ZodString;
521
+ alert_actions: z.ZodString;
522
+ is_staff: z.ZodBoolean;
523
+ is_zt_reviewer: z.ZodBoolean;
524
+ is_high_value: z.ZodBoolean;
525
+ is_temporary: z.ZodBoolean;
526
+ banner_message: z.ZodString;
527
+ enable_totp_2fa: z.ZodBoolean;
528
+ viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
529
+ show_editor_migration_mesaging: z.ZodBoolean;
530
+ switches: z.ZodRecord<z.ZodString, z.ZodAny>;
531
+ organizations: z.ZodArray<z.ZodNullable<z.ZodAny>, "many">;
532
+ primary_organization: z.ZodNullable<z.ZodAny>;
533
+ has_active_zaps: z.ZodBoolean;
534
+ has_google_sso: z.ZodBoolean;
535
+ auth_realm: z.ZodString;
536
+ roles: z.ZodArray<z.ZodObject<{
537
+ account_id: z.ZodNumber;
538
+ role: z.ZodString;
539
+ }, "strip", z.ZodTypeAny, {
540
+ account_id: number;
541
+ role: string;
542
+ }, {
543
+ account_id: number;
544
+ role: string;
545
+ }>, "many">;
546
+ }, "user_id"> & {
547
+ full_name: z.ZodString;
548
+ }, "strip", z.ZodTypeAny, {
549
+ email: string;
550
+ code: string;
551
+ id: number;
552
+ auto_provisioned: boolean;
553
+ first_name: string;
554
+ last_name: string;
555
+ username: string;
556
+ personas: string;
557
+ user_generated_personas: string;
558
+ last_login: string;
559
+ email_hash: string;
560
+ email_confirmed: boolean;
561
+ timezone: string;
562
+ photo_url: string;
563
+ has_seen_notifications: Record<string, boolean | null>;
564
+ signup: string;
565
+ since_signup: string;
566
+ has_activated: boolean;
567
+ enable_gz_creator: boolean;
568
+ should_see_nps_survey: boolean;
569
+ is_developer: boolean;
570
+ is_expert: boolean;
571
+ tos_agreement: boolean;
572
+ should_renew_tos: boolean;
573
+ is_gdpr_consented: boolean;
574
+ disable_ssl_check: boolean;
575
+ identity: number;
576
+ summary_schedule: string;
577
+ alert_triggers: string;
578
+ alert_actions: string;
579
+ is_staff: boolean;
580
+ is_zt_reviewer: boolean;
581
+ is_high_value: boolean;
582
+ is_temporary: boolean;
583
+ banner_message: string;
584
+ enable_totp_2fa: boolean;
585
+ viewed_help: Record<string, boolean>;
586
+ show_editor_migration_mesaging: boolean;
587
+ switches: Record<string, any>;
588
+ organizations: any[];
589
+ has_active_zaps: boolean;
590
+ has_google_sso: boolean;
591
+ auth_realm: string;
592
+ roles: {
593
+ account_id: number;
594
+ role: string;
595
+ }[];
596
+ full_name: string;
597
+ primary_organization?: any;
598
+ }, {
599
+ email: string;
600
+ code: string;
601
+ id: number;
602
+ auto_provisioned: boolean;
603
+ first_name: string;
604
+ last_name: string;
605
+ username: string;
606
+ personas: string;
607
+ user_generated_personas: string;
608
+ last_login: string;
609
+ email_hash: string;
610
+ email_confirmed: boolean;
611
+ timezone: string;
612
+ photo_url: string;
613
+ has_seen_notifications: Record<string, boolean | null>;
614
+ signup: string;
615
+ since_signup: string;
616
+ has_activated: boolean;
617
+ enable_gz_creator: boolean;
618
+ should_see_nps_survey: boolean;
619
+ is_developer: boolean;
620
+ is_expert: boolean;
621
+ tos_agreement: boolean;
622
+ should_renew_tos: boolean;
623
+ is_gdpr_consented: boolean;
624
+ disable_ssl_check: boolean;
625
+ identity: number;
626
+ summary_schedule: string;
627
+ alert_triggers: string;
628
+ alert_actions: string;
629
+ is_staff: boolean;
630
+ is_zt_reviewer: boolean;
631
+ is_high_value: boolean;
632
+ is_temporary: boolean;
633
+ banner_message: string;
634
+ enable_totp_2fa: boolean;
635
+ viewed_help: Record<string, boolean>;
636
+ show_editor_migration_mesaging: boolean;
637
+ switches: Record<string, any>;
638
+ organizations: any[];
639
+ has_active_zaps: boolean;
640
+ has_google_sso: boolean;
641
+ auth_realm: string;
642
+ roles: {
643
+ account_id: number;
644
+ role: string;
645
+ }[];
646
+ full_name: string;
647
+ primary_organization?: any;
648
+ }>;
111
649
 
112
650
  /**
113
- * SDK Event System
114
- *
115
- * This module provides common event type definitions for the SDK's
116
- * event system, including authentication, API, and loading events.
651
+ * Represents an app item returned by getApp and listApps functions
652
+ * Inferred from AppItemSchema which extends the base App API schema
117
653
  */
118
- interface SdkEvent {
119
- type: string;
120
- payload?: Record<string, any>;
121
- timestamp?: number;
122
- }
123
- interface AuthEvent extends SdkEvent {
124
- type: "auth_refreshing" | "auth_success" | "auth_error" | "auth_logout";
125
- payload?: {
126
- message?: string;
127
- error?: string;
128
- operation?: string;
129
- };
130
- }
131
- interface ApiEvent extends SdkEvent {
132
- type: "api_request" | "api_response" | "api_error";
133
- payload?: {
134
- url?: string;
135
- method?: string;
136
- status?: number;
137
- duration?: number;
138
- error?: string;
139
- };
140
- }
141
- interface LoadingEvent extends SdkEvent {
142
- type: "loading_start" | "loading_end";
143
- payload?: {
144
- operation?: string;
145
- resource?: string;
146
- };
147
- }
148
- type EventCallback = (event: SdkEvent) => void;
654
+ type AppItem = z.infer<typeof AppItemSchema>;
655
+ /**
656
+ * Represents an authentication item returned by listAuthentications functions
657
+ * Inferred from AuthenticationItemSchema which extends the base Authentication API schema
658
+ */
659
+ type AuthenticationItem = z.infer<typeof AuthenticationItemSchema>;
660
+ /**
661
+ * Represents an action item returned by listActions functions
662
+ * Inferred from ActionItemSchema which extends the base Action API schema
663
+ */
664
+ type ActionItem = z.infer<typeof ActionItemSchema>;
665
+ /**
666
+ * Represents an input field item returned by listInputFields functions
667
+ * Inferred from InputFieldItemSchema which extends the base Need API schema
668
+ */
669
+ type InputFieldItem = z.infer<typeof InputFieldItemSchema>;
670
+ /**
671
+ * Represents a user profile item returned by getProfile function
672
+ * Inferred from UserProfileItemSchema which extends the base UserProfile API schema
673
+ */
674
+ type UserProfileItem = z.infer<typeof UserProfileItemSchema>;
149
675
 
150
- interface ActionExecutionOptions {
151
- inputs?: Record<string, any>;
152
- authenticationId?: number;
153
- }
154
- interface AuthObject {
155
- id: number;
156
- }
157
- interface BaseSdkOptions {
158
- token?: string;
159
- getToken?: () => Promise<string | undefined>;
160
- onEvent?: EventCallback;
161
- fetch?: typeof fetch;
162
- baseUrl?: string;
163
- debug?: boolean;
164
- }
676
+ /**
677
+ * Function-related types and interfaces
678
+ */
165
679
  interface FunctionOptions {
166
680
  /** Base URL for Zapier API */
167
681
  baseUrl?: string;
@@ -176,14 +690,14 @@ interface FunctionOptions {
176
690
  /** Custom fetch implementation */
177
691
  fetch?: typeof globalThis.fetch;
178
692
  }
179
- declare class ZapierSdkError extends Error {
180
- code?: string | undefined;
181
- constructor(message: string, code?: string | undefined);
182
- }
183
- declare class AppNotFoundError extends ZapierSdkError {
184
- appKey: string;
185
- constructor(appKey: string);
186
- }
693
+ type PaginatedSdkFunction<TOptions, TItem> = (options: TOptions) => Promise<{
694
+ data: TItem[];
695
+ }> & AsyncIterable<{
696
+ data: TItem[];
697
+ nextCursor?: string;
698
+ }> & {
699
+ items(): AsyncIterable<TItem>;
700
+ };
187
701
 
188
702
  declare const AppKeyPropertySchema: z.ZodString;
189
703
  declare const ActionTypePropertySchema: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
@@ -206,11 +720,158 @@ type OutputProperty = z.infer<typeof OutputPropertySchema>;
206
720
  type DebugProperty = z.infer<typeof DebugPropertySchema>;
207
721
  type ParamsProperty = z.infer<typeof ParamsPropertySchema>;
208
722
 
723
+ /**
724
+ * Standard error format returned by the Zapier API
725
+ */
726
+ interface ApiError {
727
+ status: number;
728
+ code: string;
729
+ title: string;
730
+ detail: string;
731
+ source?: any;
732
+ meta?: any;
733
+ }
734
+ /**
735
+ * Base options for all error constructors
736
+ */
737
+ interface ErrorOptions {
738
+ statusCode?: number;
739
+ errors?: ApiError[];
740
+ cause?: unknown;
741
+ response?: any;
742
+ }
743
+ /**
744
+ * Base class for all Zapier SDK errors
745
+ * Use instanceof ZapierError to check if an error is from the SDK
746
+ */
747
+ declare abstract class ZapierError extends Error {
748
+ abstract readonly name: string;
749
+ statusCode?: number;
750
+ errors?: ApiError[];
751
+ cause?: unknown;
752
+ response?: any;
753
+ constructor(message: string, options?: ErrorOptions);
754
+ }
755
+ /**
756
+ * Error thrown when API requests fail
757
+ */
758
+ declare class ZapierApiError extends ZapierError {
759
+ readonly name = "ZapierApiError";
760
+ constructor(message: string, options?: ErrorOptions);
761
+ }
762
+ /**
763
+ * Error thrown when an app is not found
764
+ */
765
+ declare class ZapierAppNotFoundError extends ZapierError {
766
+ readonly name = "ZapierAppNotFoundError";
767
+ appKey?: string;
768
+ constructor(message: string, options?: ErrorOptions & {
769
+ appKey?: string;
770
+ });
771
+ }
772
+ /**
773
+ * Error thrown when validation fails (e.g., invalid parameters)
774
+ */
775
+ declare class ZapierValidationError extends ZapierError {
776
+ readonly name = "ZapierValidationError";
777
+ details?: any;
778
+ constructor(message: string, options?: ErrorOptions & {
779
+ details?: any;
780
+ });
781
+ }
782
+ /**
783
+ * Error for unrecognized/unknown errors that get wrapped by safe functions
784
+ */
785
+ declare class ZapierUnknownError extends ZapierError {
786
+ readonly name = "ZapierUnknownError";
787
+ constructor(message: string, options?: ErrorOptions);
788
+ }
789
+ /**
790
+ * Error thrown for authentication and authorization failures (401/403)
791
+ */
792
+ declare class ZapierAuthenticationError extends ZapierError {
793
+ readonly name = "ZapierAuthenticationError";
794
+ constructor(message: string, options?: ErrorOptions);
795
+ }
796
+ /**
797
+ * Error thrown when a requested resource is not found
798
+ */
799
+ declare class ZapierResourceNotFoundError extends ZapierError {
800
+ readonly name = "ZapierResourceNotFoundError";
801
+ resourceType?: string;
802
+ resourceId?: string;
803
+ constructor(message: string, options?: ErrorOptions & {
804
+ resourceType?: string;
805
+ resourceId?: string;
806
+ });
807
+ }
808
+ /**
809
+ * Error thrown when required app or implementation configuration is missing
810
+ */
811
+ declare class ZapierConfigurationError extends ZapierError {
812
+ readonly name = "ZapierConfigurationError";
813
+ configType?: string;
814
+ constructor(message: string, options?: ErrorOptions & {
815
+ configType?: string;
816
+ });
817
+ }
818
+ /**
819
+ * Error thrown when code bundling or compilation fails
820
+ */
821
+ declare class ZapierBundleError extends ZapierError {
822
+ readonly name = "ZapierBundleError";
823
+ buildErrors?: string[];
824
+ constructor(message: string, options?: ErrorOptions & {
825
+ buildErrors?: string[];
826
+ });
827
+ }
828
+ /**
829
+ * Error thrown when operations timeout or exceed retry limits
830
+ */
831
+ declare class ZapierTimeoutError extends ZapierError {
832
+ readonly name = "ZapierTimeoutError";
833
+ attempts?: number;
834
+ maxAttempts?: number;
835
+ constructor(message: string, options?: ErrorOptions & {
836
+ attempts?: number;
837
+ maxAttempts?: number;
838
+ });
839
+ }
840
+ /**
841
+ * Error thrown when action execution fails due to errors returned from the third-party service
842
+ * This happens when the Actions API returns a 200 status but includes errors in the response
843
+ */
844
+ declare class ZapierActionError extends ZapierError {
845
+ readonly name = "ZapierActionError";
846
+ appKey?: string;
847
+ actionKey?: string;
848
+ constructor(message: string, options?: ErrorOptions & {
849
+ appKey?: string;
850
+ actionKey?: string;
851
+ });
852
+ get actionErrors(): ApiError[] | undefined;
853
+ }
854
+ /**
855
+ * Error thrown when a resource is not found (404)
856
+ */
857
+ declare class ZapierNotFoundError extends ZapierError {
858
+ readonly name = "ZapierNotFoundError";
859
+ constructor(message: string, options?: ErrorOptions);
860
+ }
861
+ /**
862
+ * Utility function to format error messages for display
863
+ */
864
+ declare function formatErrorMessage(error: ZapierError): string;
865
+
866
+ interface ActionExecutionOptions {
867
+ inputs?: Record<string, any>;
868
+ authenticationId?: number;
869
+ }
209
870
  interface AppFactoryOptions {
210
871
  authenticationId: number;
211
872
  }
212
873
  interface BaseActionTypeProxy {
213
- [action: string]: (options?: ActionExecutionOptions) => Promise<ActionExecutionResult>;
874
+ [action: string]: (options?: ActionExecutionOptions) => any;
214
875
  }
215
876
  interface FetchActionType {
216
877
  fetch: (url: string | URL, init?: RequestInit & {
@@ -230,132 +891,1517 @@ type AppProxyWithFactory = AppFactory & AppProxy;
230
891
  interface ActionProxy {
231
892
  [app: string]: AppProxyWithFactory;
232
893
  }
233
- interface AppsPluginSdkExtension {
234
- apps: ActionProxy;
894
+
895
+ /**
896
+ * ------------------------------
897
+ * Plugin Type System with Explicit Context Dependencies
898
+ * ------------------------------
899
+ *
900
+ * This system makes context dependencies explicit to restore TypeScript's
901
+ * ability to catch missing context at compile time.
902
+ */
903
+ interface PluginDependencies<TSdk = {}, TContext = {}> {
904
+ sdk: TSdk;
905
+ context: TContext;
235
906
  }
907
+ interface PluginProvides extends Record<string, any> {
908
+ context?: Record<string, any>;
909
+ }
910
+ type ExtractSdkProperties<T extends Record<string, any>> = Omit<T, "context">;
911
+ type ExtractContextProperties<T extends PluginProvides> = T["context"];
912
+ type GetSdkType<TPluginProvides extends PluginProvides> = ExtractSdkProperties<TPluginProvides> & {
913
+ getContext(): NonNullable<ExtractContextProperties<TPluginProvides>>;
914
+ };
915
+ type PluginOptions<TSdk = {}, TContext = {}> = {
916
+ sdk: TSdk;
917
+ context: TContext & {
918
+ meta: Record<string, any>;
919
+ };
920
+ };
921
+ /**
922
+ * Plugin interface — now has 3 type params:
923
+ *
924
+ * TRequiresContext = what this plugin *needs* in context
925
+ * TProvides = what this plugin *returns* (sdk + context)
926
+ * TSdk = current sdk shape when plugin runs
927
+ */
928
+ interface Plugin<TSdk = {}, TRequiresContext = {}, TProvides extends PluginProvides = PluginProvides> {
929
+ (params: {
930
+ sdk: TSdk;
931
+ context: TRequiresContext & {
932
+ meta: Record<string, any>;
933
+ };
934
+ }): TProvides;
935
+ }
936
+ type MissingContextKeys<TRequired, TCurrent> = TRequired extends Record<string, any> ? TCurrent extends Record<string, any> ? {
937
+ [K in keyof TRequired]: K extends keyof TCurrent ? never : K;
938
+ }[keyof TRequired] : keyof TRequired : never;
939
+ 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";
940
+ /**
941
+ * SDK interface — result of createSdk()
942
+ *
943
+ * addPlugin now enforces that TRequiresContext is assignable to TCurrentContext.
944
+ * If not, TypeScript will emit a detailed error showing missing properties.
945
+ */
946
+ type Sdk<TCurrentSdk = {}, TCurrentContext = {
947
+ meta: Record<string, any>;
948
+ }> = TCurrentSdk & {
949
+ addPlugin<TRequiresContext, TProvides extends PluginProvides>(plugin: Plugin<TCurrentSdk & {
950
+ getContext(): TCurrentContext;
951
+ }, TRequiresContext, TProvides>, options?: any): TCurrentContext extends TRequiresContext ? Sdk<TCurrentSdk & ExtractSdkProperties<TProvides>, TCurrentContext & NonNullable<ExtractContextProperties<TProvides>>> : ContextError<TRequiresContext, TCurrentContext>;
952
+ getContext(): TCurrentContext;
953
+ };
236
954
 
237
- declare const ListActionsSchema: z.ZodObject<{
238
- appKey: z.ZodOptional<z.ZodString>;
239
- type: z.ZodOptional<z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>>;
955
+ declare const NeedSchema: z.ZodObject<{
956
+ key: z.ZodString;
957
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
958
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
959
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
960
+ key: z.ZodOptional<z.ZodString>;
961
+ label: z.ZodOptional<z.ZodString>;
962
+ sample: z.ZodOptional<z.ZodString>;
963
+ value: z.ZodOptional<z.ZodString>;
964
+ }, "strip", z.ZodTypeAny, {
965
+ value?: string | undefined;
966
+ key?: string | undefined;
967
+ label?: string | undefined;
968
+ sample?: string | undefined;
969
+ }, {
970
+ value?: string | undefined;
971
+ key?: string | undefined;
972
+ label?: string | undefined;
973
+ sample?: string | undefined;
974
+ }>, "many">>;
975
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
976
+ custom_field: z.ZodOptional<z.ZodBoolean>;
977
+ default: z.ZodOptional<z.ZodString>;
978
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
979
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
980
+ from_search: z.ZodOptional<z.ZodBoolean>;
981
+ from_write: z.ZodOptional<z.ZodBoolean>;
982
+ help_text: z.ZodOptional<z.ZodString>;
983
+ help_text_html: z.ZodOptional<z.ZodString>;
984
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
985
+ label: z.ZodOptional<z.ZodString>;
986
+ language: z.ZodOptional<z.ZodString>;
987
+ parent_key: z.ZodOptional<z.ZodString>;
988
+ placeholder: z.ZodOptional<z.ZodString>;
989
+ prefill: z.ZodOptional<z.ZodString>;
990
+ required: z.ZodOptional<z.ZodBoolean>;
991
+ searchfill: z.ZodOptional<z.ZodString>;
992
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
993
+ regex: z.ZodOptional<z.ZodString>;
994
+ type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
995
+ list: z.ZodOptional<z.ZodBoolean>;
240
996
  }, "strip", z.ZodTypeAny, {
241
- type?: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter" | undefined;
242
- appKey?: string | undefined;
997
+ key: string;
998
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
999
+ label?: string | undefined;
1000
+ alters_custom_fields?: boolean | null | undefined;
1001
+ capabilities?: string[] | undefined;
1002
+ choices?: {
1003
+ value?: string | undefined;
1004
+ key?: string | undefined;
1005
+ label?: string | undefined;
1006
+ sample?: string | undefined;
1007
+ }[] | undefined;
1008
+ computed?: boolean | null | undefined;
1009
+ custom_field?: boolean | undefined;
1010
+ default?: string | undefined;
1011
+ depends_on?: string[] | undefined;
1012
+ format?: "SELECT" | undefined;
1013
+ from_search?: boolean | undefined;
1014
+ from_write?: boolean | undefined;
1015
+ help_text?: string | undefined;
1016
+ help_text_html?: string | undefined;
1017
+ input_format?: string[] | undefined;
1018
+ language?: string | undefined;
1019
+ parent_key?: string | undefined;
1020
+ placeholder?: string | undefined;
1021
+ prefill?: string | undefined;
1022
+ required?: boolean | undefined;
1023
+ searchfill?: string | undefined;
1024
+ send_in_json?: boolean | undefined;
1025
+ regex?: string | undefined;
1026
+ list?: boolean | undefined;
243
1027
  }, {
244
- type?: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter" | undefined;
245
- appKey?: string | undefined;
1028
+ key: string;
1029
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1030
+ label?: string | undefined;
1031
+ alters_custom_fields?: boolean | null | undefined;
1032
+ capabilities?: string[] | undefined;
1033
+ choices?: {
1034
+ value?: string | undefined;
1035
+ key?: string | undefined;
1036
+ label?: string | undefined;
1037
+ sample?: string | undefined;
1038
+ }[] | undefined;
1039
+ computed?: boolean | null | undefined;
1040
+ custom_field?: boolean | undefined;
1041
+ default?: string | undefined;
1042
+ depends_on?: string[] | undefined;
1043
+ format?: "SELECT" | undefined;
1044
+ from_search?: boolean | undefined;
1045
+ from_write?: boolean | undefined;
1046
+ help_text?: string | undefined;
1047
+ help_text_html?: string | undefined;
1048
+ input_format?: string[] | undefined;
1049
+ language?: string | undefined;
1050
+ parent_key?: string | undefined;
1051
+ placeholder?: string | undefined;
1052
+ prefill?: string | undefined;
1053
+ required?: boolean | undefined;
1054
+ searchfill?: string | undefined;
1055
+ send_in_json?: boolean | undefined;
1056
+ regex?: string | undefined;
1057
+ list?: boolean | undefined;
246
1058
  }>;
247
- type ListActionsOptions = z.infer<typeof ListActionsSchema> & FunctionOptions;
248
- interface ListActionsSdkFunction {
249
- listActions: (options?: Partial<ListActionsOptions>) => Promise<Action[]>;
250
- }
251
-
252
- declare const GetActionSchema: z.ZodObject<{
253
- appKey: z.ZodString;
254
- actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
255
- actionKey: z.ZodString;
1059
+ declare const ActionSchema: z.ZodObject<{
1060
+ id: z.ZodOptional<z.ZodString>;
1061
+ type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
1062
+ key: z.ZodString;
1063
+ name: z.ZodString;
1064
+ noun: z.ZodOptional<z.ZodString>;
1065
+ description: z.ZodString;
1066
+ description_html: z.ZodOptional<z.ZodString>;
1067
+ is_important: z.ZodOptional<z.ZodBoolean>;
1068
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
1069
+ needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1070
+ key: z.ZodString;
1071
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1072
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1073
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1074
+ key: z.ZodOptional<z.ZodString>;
1075
+ label: z.ZodOptional<z.ZodString>;
1076
+ sample: z.ZodOptional<z.ZodString>;
1077
+ value: z.ZodOptional<z.ZodString>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ value?: string | undefined;
1080
+ key?: string | undefined;
1081
+ label?: string | undefined;
1082
+ sample?: string | undefined;
1083
+ }, {
1084
+ value?: string | undefined;
1085
+ key?: string | undefined;
1086
+ label?: string | undefined;
1087
+ sample?: string | undefined;
1088
+ }>, "many">>;
1089
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1090
+ custom_field: z.ZodOptional<z.ZodBoolean>;
1091
+ default: z.ZodOptional<z.ZodString>;
1092
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1093
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
1094
+ from_search: z.ZodOptional<z.ZodBoolean>;
1095
+ from_write: z.ZodOptional<z.ZodBoolean>;
1096
+ help_text: z.ZodOptional<z.ZodString>;
1097
+ help_text_html: z.ZodOptional<z.ZodString>;
1098
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1099
+ label: z.ZodOptional<z.ZodString>;
1100
+ language: z.ZodOptional<z.ZodString>;
1101
+ parent_key: z.ZodOptional<z.ZodString>;
1102
+ placeholder: z.ZodOptional<z.ZodString>;
1103
+ prefill: z.ZodOptional<z.ZodString>;
1104
+ required: z.ZodOptional<z.ZodBoolean>;
1105
+ searchfill: z.ZodOptional<z.ZodString>;
1106
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
1107
+ regex: z.ZodOptional<z.ZodString>;
1108
+ type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
1109
+ list: z.ZodOptional<z.ZodBoolean>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ key: string;
1112
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1113
+ label?: string | undefined;
1114
+ alters_custom_fields?: boolean | null | undefined;
1115
+ capabilities?: string[] | undefined;
1116
+ choices?: {
1117
+ value?: string | undefined;
1118
+ key?: string | undefined;
1119
+ label?: string | undefined;
1120
+ sample?: string | undefined;
1121
+ }[] | undefined;
1122
+ computed?: boolean | null | undefined;
1123
+ custom_field?: boolean | undefined;
1124
+ default?: string | undefined;
1125
+ depends_on?: string[] | undefined;
1126
+ format?: "SELECT" | undefined;
1127
+ from_search?: boolean | undefined;
1128
+ from_write?: boolean | undefined;
1129
+ help_text?: string | undefined;
1130
+ help_text_html?: string | undefined;
1131
+ input_format?: string[] | undefined;
1132
+ language?: string | undefined;
1133
+ parent_key?: string | undefined;
1134
+ placeholder?: string | undefined;
1135
+ prefill?: string | undefined;
1136
+ required?: boolean | undefined;
1137
+ searchfill?: string | undefined;
1138
+ send_in_json?: boolean | undefined;
1139
+ regex?: string | undefined;
1140
+ list?: boolean | undefined;
1141
+ }, {
1142
+ key: string;
1143
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1144
+ label?: string | undefined;
1145
+ alters_custom_fields?: boolean | null | undefined;
1146
+ capabilities?: string[] | undefined;
1147
+ choices?: {
1148
+ value?: string | undefined;
1149
+ key?: string | undefined;
1150
+ label?: string | undefined;
1151
+ sample?: string | undefined;
1152
+ }[] | undefined;
1153
+ computed?: boolean | null | undefined;
1154
+ custom_field?: boolean | undefined;
1155
+ default?: string | undefined;
1156
+ depends_on?: string[] | undefined;
1157
+ format?: "SELECT" | undefined;
1158
+ from_search?: boolean | undefined;
1159
+ from_write?: boolean | undefined;
1160
+ help_text?: string | undefined;
1161
+ help_text_html?: string | undefined;
1162
+ input_format?: string[] | undefined;
1163
+ language?: string | undefined;
1164
+ parent_key?: string | undefined;
1165
+ placeholder?: string | undefined;
1166
+ prefill?: string | undefined;
1167
+ required?: boolean | undefined;
1168
+ searchfill?: string | undefined;
1169
+ send_in_json?: boolean | undefined;
1170
+ regex?: string | undefined;
1171
+ list?: boolean | undefined;
1172
+ }>, "many">>;
1173
+ meta: z.ZodOptional<z.ZodString>;
1174
+ selected_api: z.ZodOptional<z.ZodString>;
1175
+ links: z.ZodOptional<z.ZodObject<{
1176
+ action_url: z.ZodOptional<z.ZodString>;
1177
+ }, "strip", z.ZodTypeAny, {
1178
+ action_url?: string | undefined;
1179
+ }, {
1180
+ action_url?: string | undefined;
1181
+ }>>;
1182
+ permissions: z.ZodOptional<z.ZodObject<{
1183
+ can_use: z.ZodOptional<z.ZodBoolean>;
1184
+ }, "strip", z.ZodTypeAny, {
1185
+ can_use?: boolean | undefined;
1186
+ }, {
1187
+ can_use?: boolean | undefined;
1188
+ }>>;
256
1189
  }, "strip", z.ZodTypeAny, {
257
- appKey: string;
258
- actionType: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
259
- actionKey: string;
1190
+ type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
1191
+ key: string;
1192
+ description: string;
1193
+ name: string;
1194
+ id?: string | undefined;
1195
+ noun?: string | undefined;
1196
+ description_html?: string | undefined;
1197
+ is_important?: boolean | undefined;
1198
+ is_hidden?: boolean | undefined;
1199
+ needs?: {
1200
+ key: string;
1201
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1202
+ label?: string | undefined;
1203
+ alters_custom_fields?: boolean | null | undefined;
1204
+ capabilities?: string[] | undefined;
1205
+ choices?: {
1206
+ value?: string | undefined;
1207
+ key?: string | undefined;
1208
+ label?: string | undefined;
1209
+ sample?: string | undefined;
1210
+ }[] | undefined;
1211
+ computed?: boolean | null | undefined;
1212
+ custom_field?: boolean | undefined;
1213
+ default?: string | undefined;
1214
+ depends_on?: string[] | undefined;
1215
+ format?: "SELECT" | undefined;
1216
+ from_search?: boolean | undefined;
1217
+ from_write?: boolean | undefined;
1218
+ help_text?: string | undefined;
1219
+ help_text_html?: string | undefined;
1220
+ input_format?: string[] | undefined;
1221
+ language?: string | undefined;
1222
+ parent_key?: string | undefined;
1223
+ placeholder?: string | undefined;
1224
+ prefill?: string | undefined;
1225
+ required?: boolean | undefined;
1226
+ searchfill?: string | undefined;
1227
+ send_in_json?: boolean | undefined;
1228
+ regex?: string | undefined;
1229
+ list?: boolean | undefined;
1230
+ }[] | undefined;
1231
+ meta?: string | undefined;
1232
+ selected_api?: string | undefined;
1233
+ links?: {
1234
+ action_url?: string | undefined;
1235
+ } | undefined;
1236
+ permissions?: {
1237
+ can_use?: boolean | undefined;
1238
+ } | undefined;
260
1239
  }, {
261
- appKey: string;
262
- actionType: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
263
- actionKey: string;
1240
+ type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
1241
+ key: string;
1242
+ description: string;
1243
+ name: string;
1244
+ id?: string | undefined;
1245
+ noun?: string | undefined;
1246
+ description_html?: string | undefined;
1247
+ is_important?: boolean | undefined;
1248
+ is_hidden?: boolean | undefined;
1249
+ needs?: {
1250
+ key: string;
1251
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1252
+ label?: string | undefined;
1253
+ alters_custom_fields?: boolean | null | undefined;
1254
+ capabilities?: string[] | undefined;
1255
+ choices?: {
1256
+ value?: string | undefined;
1257
+ key?: string | undefined;
1258
+ label?: string | undefined;
1259
+ sample?: string | undefined;
1260
+ }[] | undefined;
1261
+ computed?: boolean | null | undefined;
1262
+ custom_field?: boolean | undefined;
1263
+ default?: string | undefined;
1264
+ depends_on?: string[] | undefined;
1265
+ format?: "SELECT" | undefined;
1266
+ from_search?: boolean | undefined;
1267
+ from_write?: boolean | undefined;
1268
+ help_text?: string | undefined;
1269
+ help_text_html?: string | undefined;
1270
+ input_format?: string[] | undefined;
1271
+ language?: string | undefined;
1272
+ parent_key?: string | undefined;
1273
+ placeholder?: string | undefined;
1274
+ prefill?: string | undefined;
1275
+ required?: boolean | undefined;
1276
+ searchfill?: string | undefined;
1277
+ send_in_json?: boolean | undefined;
1278
+ regex?: string | undefined;
1279
+ list?: boolean | undefined;
1280
+ }[] | undefined;
1281
+ meta?: string | undefined;
1282
+ selected_api?: string | undefined;
1283
+ links?: {
1284
+ action_url?: string | undefined;
1285
+ } | undefined;
1286
+ permissions?: {
1287
+ can_use?: boolean | undefined;
1288
+ } | undefined;
1289
+ }>;
1290
+ declare const ChoiceSchema: z.ZodObject<{
1291
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1292
+ label: z.ZodString;
1293
+ }, "strip", z.ZodTypeAny, {
1294
+ value: string | number;
1295
+ label: string;
1296
+ }, {
1297
+ value: string | number;
1298
+ label: string;
1299
+ }>;
1300
+ declare const FieldSchema: z.ZodObject<{
1301
+ key: z.ZodString;
1302
+ label: z.ZodString;
1303
+ type: z.ZodEnum<["string", "number", "boolean", "datetime", "file", "object", "array"]>;
1304
+ required: z.ZodBoolean;
1305
+ description: z.ZodOptional<z.ZodString>;
1306
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1307
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1308
+ label: z.ZodString;
1309
+ }, "strip", z.ZodTypeAny, {
1310
+ value: string | number;
1311
+ label: string;
1312
+ }, {
1313
+ value: string | number;
1314
+ label: string;
1315
+ }>, "many">>;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ type: "string" | "number" | "boolean" | "object" | "array" | "datetime" | "file";
1318
+ key: string;
1319
+ label: string;
1320
+ required: boolean;
1321
+ description?: string | undefined;
1322
+ choices?: {
1323
+ value: string | number;
1324
+ label: string;
1325
+ }[] | undefined;
1326
+ }, {
1327
+ type: "string" | "number" | "boolean" | "object" | "array" | "datetime" | "file";
1328
+ key: string;
1329
+ label: string;
1330
+ required: boolean;
1331
+ description?: string | undefined;
1332
+ choices?: {
1333
+ value: string | number;
1334
+ label: string;
1335
+ }[] | undefined;
1336
+ }>;
1337
+ declare const ActionExecutionResultSchema: z.ZodObject<{
1338
+ data: z.ZodArray<z.ZodAny, "many">;
1339
+ }, "strip", z.ZodTypeAny, {
1340
+ data: any[];
1341
+ }, {
1342
+ data: any[];
1343
+ }>;
1344
+ declare const ActionFieldChoiceSchema: z.ZodObject<{
1345
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1346
+ label: z.ZodString;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ value: string | number;
1349
+ label: string;
1350
+ }, {
1351
+ value: string | number;
1352
+ label: string;
1353
+ }>;
1354
+ declare const ActionFieldSchema: z.ZodObject<{
1355
+ key: z.ZodString;
1356
+ label: z.ZodOptional<z.ZodString>;
1357
+ required: z.ZodBoolean;
1358
+ type: z.ZodOptional<z.ZodString>;
1359
+ helpText: z.ZodOptional<z.ZodString>;
1360
+ helpTextHtml: z.ZodOptional<z.ZodString>;
1361
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1362
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1363
+ label: z.ZodString;
1364
+ }, "strip", z.ZodTypeAny, {
1365
+ value: string | number;
1366
+ label: string;
1367
+ }, {
1368
+ value: string | number;
1369
+ label: string;
1370
+ }>, "many">>;
1371
+ default: z.ZodOptional<z.ZodString>;
1372
+ placeholder: z.ZodOptional<z.ZodString>;
1373
+ computed: z.ZodOptional<z.ZodBoolean>;
1374
+ customField: z.ZodOptional<z.ZodBoolean>;
1375
+ dependsOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1376
+ format: z.ZodOptional<z.ZodString>;
1377
+ inputFormat: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1378
+ }, "strip", z.ZodTypeAny, {
1379
+ key: string;
1380
+ required: boolean;
1381
+ type?: string | undefined;
1382
+ label?: string | undefined;
1383
+ choices?: {
1384
+ value: string | number;
1385
+ label: string;
1386
+ }[] | undefined;
1387
+ computed?: boolean | undefined;
1388
+ default?: string | undefined;
1389
+ format?: string | undefined;
1390
+ placeholder?: string | undefined;
1391
+ helpText?: string | undefined;
1392
+ helpTextHtml?: string | undefined;
1393
+ customField?: boolean | undefined;
1394
+ dependsOn?: string[] | undefined;
1395
+ inputFormat?: string[] | undefined;
1396
+ }, {
1397
+ key: string;
1398
+ required: boolean;
1399
+ type?: string | undefined;
1400
+ label?: string | undefined;
1401
+ choices?: {
1402
+ value: string | number;
1403
+ label: string;
1404
+ }[] | undefined;
1405
+ computed?: boolean | undefined;
1406
+ default?: string | undefined;
1407
+ format?: string | undefined;
1408
+ placeholder?: string | undefined;
1409
+ helpText?: string | undefined;
1410
+ helpTextHtml?: string | undefined;
1411
+ customField?: boolean | undefined;
1412
+ dependsOn?: string[] | undefined;
1413
+ inputFormat?: string[] | undefined;
1414
+ }>;
1415
+ declare const AuthenticationSchema: z.ZodObject<{
1416
+ id: z.ZodNumber;
1417
+ date: z.ZodString;
1418
+ lastchanged: z.ZodOptional<z.ZodString>;
1419
+ account_id: z.ZodNumber;
1420
+ customuser_id: z.ZodOptional<z.ZodNumber>;
1421
+ selected_api: z.ZodString;
1422
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1423
+ is_invite_only: z.ZodBoolean;
1424
+ is_private: z.ZodBoolean;
1425
+ shared_with_all: z.ZodBoolean;
1426
+ is_stale: z.ZodOptional<z.ZodString>;
1427
+ is_shared: z.ZodOptional<z.ZodString>;
1428
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1429
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1430
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1431
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1432
+ url: z.ZodOptional<z.ZodString>;
1433
+ groups: z.ZodOptional<z.ZodString>;
1434
+ members: z.ZodOptional<z.ZodString>;
1435
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1436
+ }, "strip", z.ZodTypeAny, {
1437
+ date: string;
1438
+ id: number;
1439
+ selected_api: string;
1440
+ account_id: number;
1441
+ is_invite_only: boolean;
1442
+ is_private: boolean;
1443
+ shared_with_all: boolean;
1444
+ title?: string | null | undefined;
1445
+ label?: string | null | undefined;
1446
+ permissions?: Record<string, boolean> | undefined;
1447
+ lastchanged?: string | undefined;
1448
+ customuser_id?: number | undefined;
1449
+ destination_selected_api?: string | null | undefined;
1450
+ is_stale?: string | undefined;
1451
+ is_shared?: string | undefined;
1452
+ marked_stale_at?: string | null | undefined;
1453
+ identifier?: string | null | undefined;
1454
+ url?: string | undefined;
1455
+ groups?: string | undefined;
1456
+ members?: string | undefined;
1457
+ }, {
1458
+ date: string;
1459
+ id: number;
1460
+ selected_api: string;
1461
+ account_id: number;
1462
+ is_invite_only: boolean;
1463
+ is_private: boolean;
1464
+ shared_with_all: boolean;
1465
+ title?: string | null | undefined;
1466
+ label?: string | null | undefined;
1467
+ permissions?: Record<string, boolean> | undefined;
1468
+ lastchanged?: string | undefined;
1469
+ customuser_id?: number | undefined;
1470
+ destination_selected_api?: string | null | undefined;
1471
+ is_stale?: string | undefined;
1472
+ is_shared?: string | undefined;
1473
+ marked_stale_at?: string | null | undefined;
1474
+ identifier?: string | null | undefined;
1475
+ url?: string | undefined;
1476
+ groups?: string | undefined;
1477
+ members?: string | undefined;
1478
+ }>;
1479
+ declare const AuthenticationsResponseSchema: z.ZodObject<{
1480
+ count: z.ZodNumber;
1481
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1482
+ previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1483
+ results: z.ZodArray<z.ZodObject<{
1484
+ id: z.ZodNumber;
1485
+ date: z.ZodString;
1486
+ lastchanged: z.ZodOptional<z.ZodString>;
1487
+ account_id: z.ZodNumber;
1488
+ customuser_id: z.ZodOptional<z.ZodNumber>;
1489
+ selected_api: z.ZodString;
1490
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1491
+ is_invite_only: z.ZodBoolean;
1492
+ is_private: z.ZodBoolean;
1493
+ shared_with_all: z.ZodBoolean;
1494
+ is_stale: z.ZodOptional<z.ZodString>;
1495
+ is_shared: z.ZodOptional<z.ZodString>;
1496
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1497
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1498
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1499
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1500
+ url: z.ZodOptional<z.ZodString>;
1501
+ groups: z.ZodOptional<z.ZodString>;
1502
+ members: z.ZodOptional<z.ZodString>;
1503
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
1504
+ }, "strip", z.ZodTypeAny, {
1505
+ date: string;
1506
+ id: number;
1507
+ selected_api: string;
1508
+ account_id: number;
1509
+ is_invite_only: boolean;
1510
+ is_private: boolean;
1511
+ shared_with_all: boolean;
1512
+ title?: string | null | undefined;
1513
+ label?: string | null | undefined;
1514
+ permissions?: Record<string, boolean> | undefined;
1515
+ lastchanged?: string | undefined;
1516
+ customuser_id?: number | undefined;
1517
+ destination_selected_api?: string | null | undefined;
1518
+ is_stale?: string | undefined;
1519
+ is_shared?: string | undefined;
1520
+ marked_stale_at?: string | null | undefined;
1521
+ identifier?: string | null | undefined;
1522
+ url?: string | undefined;
1523
+ groups?: string | undefined;
1524
+ members?: string | undefined;
1525
+ }, {
1526
+ date: string;
1527
+ id: number;
1528
+ selected_api: string;
1529
+ account_id: number;
1530
+ is_invite_only: boolean;
1531
+ is_private: boolean;
1532
+ shared_with_all: boolean;
1533
+ title?: string | null | undefined;
1534
+ label?: string | null | undefined;
1535
+ permissions?: Record<string, boolean> | undefined;
1536
+ lastchanged?: string | undefined;
1537
+ customuser_id?: number | undefined;
1538
+ destination_selected_api?: string | null | undefined;
1539
+ is_stale?: string | undefined;
1540
+ is_shared?: string | undefined;
1541
+ marked_stale_at?: string | null | undefined;
1542
+ identifier?: string | null | undefined;
1543
+ url?: string | undefined;
1544
+ groups?: string | undefined;
1545
+ members?: string | undefined;
1546
+ }>, "many">;
1547
+ }, "strip", z.ZodTypeAny, {
1548
+ count: number;
1549
+ results: {
1550
+ date: string;
1551
+ id: number;
1552
+ selected_api: string;
1553
+ account_id: number;
1554
+ is_invite_only: boolean;
1555
+ is_private: boolean;
1556
+ shared_with_all: boolean;
1557
+ title?: string | null | undefined;
1558
+ label?: string | null | undefined;
1559
+ permissions?: Record<string, boolean> | undefined;
1560
+ lastchanged?: string | undefined;
1561
+ customuser_id?: number | undefined;
1562
+ destination_selected_api?: string | null | undefined;
1563
+ is_stale?: string | undefined;
1564
+ is_shared?: string | undefined;
1565
+ marked_stale_at?: string | null | undefined;
1566
+ identifier?: string | null | undefined;
1567
+ url?: string | undefined;
1568
+ groups?: string | undefined;
1569
+ members?: string | undefined;
1570
+ }[];
1571
+ next?: string | null | undefined;
1572
+ previous?: string | null | undefined;
1573
+ }, {
1574
+ count: number;
1575
+ results: {
1576
+ date: string;
1577
+ id: number;
1578
+ selected_api: string;
1579
+ account_id: number;
1580
+ is_invite_only: boolean;
1581
+ is_private: boolean;
1582
+ shared_with_all: boolean;
1583
+ title?: string | null | undefined;
1584
+ label?: string | null | undefined;
1585
+ permissions?: Record<string, boolean> | undefined;
1586
+ lastchanged?: string | undefined;
1587
+ customuser_id?: number | undefined;
1588
+ destination_selected_api?: string | null | undefined;
1589
+ is_stale?: string | undefined;
1590
+ is_shared?: string | undefined;
1591
+ marked_stale_at?: string | null | undefined;
1592
+ identifier?: string | null | undefined;
1593
+ url?: string | undefined;
1594
+ groups?: string | undefined;
1595
+ members?: string | undefined;
1596
+ }[];
1597
+ next?: string | null | undefined;
1598
+ previous?: string | null | undefined;
1599
+ }>;
1600
+ declare const UserProfileSchema: z.ZodObject<{
1601
+ id: z.ZodNumber;
1602
+ code: z.ZodString;
1603
+ user_id: z.ZodNumber;
1604
+ auto_provisioned: z.ZodBoolean;
1605
+ first_name: z.ZodString;
1606
+ last_name: z.ZodString;
1607
+ username: z.ZodString;
1608
+ personas: z.ZodString;
1609
+ user_generated_personas: z.ZodString;
1610
+ last_login: z.ZodString;
1611
+ email: z.ZodString;
1612
+ email_hash: z.ZodString;
1613
+ email_confirmed: z.ZodBoolean;
1614
+ timezone: z.ZodString;
1615
+ photo_url: z.ZodString;
1616
+ has_seen_notifications: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodBoolean>>;
1617
+ signup: z.ZodString;
1618
+ since_signup: z.ZodString;
1619
+ has_activated: z.ZodBoolean;
1620
+ enable_gz_creator: z.ZodBoolean;
1621
+ should_see_nps_survey: z.ZodBoolean;
1622
+ is_developer: z.ZodBoolean;
1623
+ is_expert: z.ZodBoolean;
1624
+ tos_agreement: z.ZodBoolean;
1625
+ should_renew_tos: z.ZodBoolean;
1626
+ is_gdpr_consented: z.ZodBoolean;
1627
+ disable_ssl_check: z.ZodBoolean;
1628
+ identity: z.ZodNumber;
1629
+ summary_schedule: z.ZodString;
1630
+ alert_triggers: z.ZodString;
1631
+ alert_actions: z.ZodString;
1632
+ is_staff: z.ZodBoolean;
1633
+ is_zt_reviewer: z.ZodBoolean;
1634
+ is_high_value: z.ZodBoolean;
1635
+ is_temporary: z.ZodBoolean;
1636
+ banner_message: z.ZodString;
1637
+ enable_totp_2fa: z.ZodBoolean;
1638
+ viewed_help: z.ZodRecord<z.ZodString, z.ZodBoolean>;
1639
+ show_editor_migration_mesaging: z.ZodBoolean;
1640
+ switches: z.ZodRecord<z.ZodString, z.ZodAny>;
1641
+ organizations: z.ZodArray<z.ZodNullable<z.ZodAny>, "many">;
1642
+ primary_organization: z.ZodNullable<z.ZodAny>;
1643
+ has_active_zaps: z.ZodBoolean;
1644
+ has_google_sso: z.ZodBoolean;
1645
+ auth_realm: z.ZodString;
1646
+ roles: z.ZodArray<z.ZodObject<{
1647
+ account_id: z.ZodNumber;
1648
+ role: z.ZodString;
1649
+ }, "strip", z.ZodTypeAny, {
1650
+ account_id: number;
1651
+ role: string;
1652
+ }, {
1653
+ account_id: number;
1654
+ role: string;
1655
+ }>, "many">;
1656
+ }, "strip", z.ZodTypeAny, {
1657
+ email: string;
1658
+ code: string;
1659
+ id: number;
1660
+ user_id: number;
1661
+ auto_provisioned: boolean;
1662
+ first_name: string;
1663
+ last_name: string;
1664
+ username: string;
1665
+ personas: string;
1666
+ user_generated_personas: string;
1667
+ last_login: string;
1668
+ email_hash: string;
1669
+ email_confirmed: boolean;
1670
+ timezone: string;
1671
+ photo_url: string;
1672
+ has_seen_notifications: Record<string, boolean | null>;
1673
+ signup: string;
1674
+ since_signup: string;
1675
+ has_activated: boolean;
1676
+ enable_gz_creator: boolean;
1677
+ should_see_nps_survey: boolean;
1678
+ is_developer: boolean;
1679
+ is_expert: boolean;
1680
+ tos_agreement: boolean;
1681
+ should_renew_tos: boolean;
1682
+ is_gdpr_consented: boolean;
1683
+ disable_ssl_check: boolean;
1684
+ identity: number;
1685
+ summary_schedule: string;
1686
+ alert_triggers: string;
1687
+ alert_actions: string;
1688
+ is_staff: boolean;
1689
+ is_zt_reviewer: boolean;
1690
+ is_high_value: boolean;
1691
+ is_temporary: boolean;
1692
+ banner_message: string;
1693
+ enable_totp_2fa: boolean;
1694
+ viewed_help: Record<string, boolean>;
1695
+ show_editor_migration_mesaging: boolean;
1696
+ switches: Record<string, any>;
1697
+ organizations: any[];
1698
+ has_active_zaps: boolean;
1699
+ has_google_sso: boolean;
1700
+ auth_realm: string;
1701
+ roles: {
1702
+ account_id: number;
1703
+ role: string;
1704
+ }[];
1705
+ primary_organization?: any;
1706
+ }, {
1707
+ email: string;
1708
+ code: string;
1709
+ id: number;
1710
+ user_id: number;
1711
+ auto_provisioned: boolean;
1712
+ first_name: string;
1713
+ last_name: string;
1714
+ username: string;
1715
+ personas: string;
1716
+ user_generated_personas: string;
1717
+ last_login: string;
1718
+ email_hash: string;
1719
+ email_confirmed: boolean;
1720
+ timezone: string;
1721
+ photo_url: string;
1722
+ has_seen_notifications: Record<string, boolean | null>;
1723
+ signup: string;
1724
+ since_signup: string;
1725
+ has_activated: boolean;
1726
+ enable_gz_creator: boolean;
1727
+ should_see_nps_survey: boolean;
1728
+ is_developer: boolean;
1729
+ is_expert: boolean;
1730
+ tos_agreement: boolean;
1731
+ should_renew_tos: boolean;
1732
+ is_gdpr_consented: boolean;
1733
+ disable_ssl_check: boolean;
1734
+ identity: number;
1735
+ summary_schedule: string;
1736
+ alert_triggers: string;
1737
+ alert_actions: string;
1738
+ is_staff: boolean;
1739
+ is_zt_reviewer: boolean;
1740
+ is_high_value: boolean;
1741
+ is_temporary: boolean;
1742
+ banner_message: string;
1743
+ enable_totp_2fa: boolean;
1744
+ viewed_help: Record<string, boolean>;
1745
+ show_editor_migration_mesaging: boolean;
1746
+ switches: Record<string, any>;
1747
+ organizations: any[];
1748
+ has_active_zaps: boolean;
1749
+ has_google_sso: boolean;
1750
+ auth_realm: string;
1751
+ roles: {
1752
+ account_id: number;
1753
+ role: string;
1754
+ }[];
1755
+ primary_organization?: any;
1756
+ }>;
1757
+ declare const AppSchema: z.ZodObject<{
1758
+ age_in_days: z.ZodOptional<z.ZodString>;
1759
+ api_docs_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1760
+ app_profile_url: z.ZodString;
1761
+ banner: z.ZodOptional<z.ZodString>;
1762
+ categories: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1763
+ canonical_id: z.ZodOptional<z.ZodString>;
1764
+ current_implementation_id: z.ZodString;
1765
+ days_since_last_update: z.ZodOptional<z.ZodString>;
1766
+ description: z.ZodString;
1767
+ external_url: z.ZodString;
1768
+ hashtag: z.ZodOptional<z.ZodString>;
1769
+ id: z.ZodOptional<z.ZodNumber>;
1770
+ image: z.ZodOptional<z.ZodString>;
1771
+ images: z.ZodOptional<z.ZodString>;
1772
+ integration_overview_html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1773
+ internal_id: z.ZodString;
1774
+ invite_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1775
+ is_beta: z.ZodOptional<z.ZodString>;
1776
+ is_built_in: z.ZodOptional<z.ZodString>;
1777
+ is_featured: z.ZodOptional<z.ZodString>;
1778
+ is_premium: z.ZodOptional<z.ZodBoolean>;
1779
+ is_public: z.ZodOptional<z.ZodString>;
1780
+ is_upcoming: z.ZodOptional<z.ZodString>;
1781
+ learn_more_url: z.ZodString;
1782
+ name: z.ZodString;
1783
+ popularity: z.ZodNumber;
1784
+ primary_color: z.ZodString;
1785
+ request_count: z.ZodOptional<z.ZodString>;
1786
+ slug: z.ZodString;
1787
+ zap_usage_count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1788
+ }, "strip", z.ZodTypeAny, {
1789
+ current_implementation_id: string;
1790
+ description: string;
1791
+ slug: string;
1792
+ name: string;
1793
+ app_profile_url: string;
1794
+ external_url: string;
1795
+ internal_id: string;
1796
+ learn_more_url: string;
1797
+ popularity: number;
1798
+ primary_color: string;
1799
+ id?: number | undefined;
1800
+ age_in_days?: string | undefined;
1801
+ api_docs_url?: string | null | undefined;
1802
+ banner?: string | undefined;
1803
+ categories?: any[] | undefined;
1804
+ canonical_id?: string | undefined;
1805
+ days_since_last_update?: string | undefined;
1806
+ hashtag?: string | undefined;
1807
+ image?: string | undefined;
1808
+ images?: string | undefined;
1809
+ integration_overview_html?: string | null | undefined;
1810
+ invite_url?: string | null | undefined;
1811
+ is_beta?: string | undefined;
1812
+ is_built_in?: string | undefined;
1813
+ is_featured?: string | undefined;
1814
+ is_premium?: boolean | undefined;
1815
+ is_public?: string | undefined;
1816
+ is_upcoming?: string | undefined;
1817
+ request_count?: string | undefined;
1818
+ zap_usage_count?: number | null | undefined;
1819
+ }, {
1820
+ current_implementation_id: string;
1821
+ description: string;
1822
+ slug: string;
1823
+ name: string;
1824
+ app_profile_url: string;
1825
+ external_url: string;
1826
+ internal_id: string;
1827
+ learn_more_url: string;
1828
+ popularity: number;
1829
+ primary_color: string;
1830
+ id?: number | undefined;
1831
+ age_in_days?: string | undefined;
1832
+ api_docs_url?: string | null | undefined;
1833
+ banner?: string | undefined;
1834
+ categories?: any[] | undefined;
1835
+ canonical_id?: string | undefined;
1836
+ days_since_last_update?: string | undefined;
1837
+ hashtag?: string | undefined;
1838
+ image?: string | undefined;
1839
+ images?: string | undefined;
1840
+ integration_overview_html?: string | null | undefined;
1841
+ invite_url?: string | null | undefined;
1842
+ is_beta?: string | undefined;
1843
+ is_built_in?: string | undefined;
1844
+ is_featured?: string | undefined;
1845
+ is_premium?: boolean | undefined;
1846
+ is_public?: string | undefined;
1847
+ is_upcoming?: string | undefined;
1848
+ request_count?: string | undefined;
1849
+ zap_usage_count?: number | null | undefined;
1850
+ }>;
1851
+ declare const NeedsRequestSchema: z.ZodObject<{
1852
+ selected_api: z.ZodString;
1853
+ action: z.ZodString;
1854
+ type_of: z.ZodString;
1855
+ authentication_id: z.ZodOptional<z.ZodNumber>;
1856
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1857
+ }, "strip", z.ZodTypeAny, {
1858
+ selected_api: string;
1859
+ action: string;
1860
+ type_of: string;
1861
+ params?: Record<string, any> | undefined;
1862
+ authentication_id?: number | undefined;
1863
+ }, {
1864
+ selected_api: string;
1865
+ action: string;
1866
+ type_of: string;
1867
+ params?: Record<string, any> | undefined;
1868
+ authentication_id?: number | undefined;
1869
+ }>;
1870
+ declare const NeedsResponseSchema: z.ZodObject<{
1871
+ success: z.ZodBoolean;
1872
+ needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1873
+ key: z.ZodString;
1874
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1875
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1876
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1877
+ key: z.ZodOptional<z.ZodString>;
1878
+ label: z.ZodOptional<z.ZodString>;
1879
+ sample: z.ZodOptional<z.ZodString>;
1880
+ value: z.ZodOptional<z.ZodString>;
1881
+ }, "strip", z.ZodTypeAny, {
1882
+ value?: string | undefined;
1883
+ key?: string | undefined;
1884
+ label?: string | undefined;
1885
+ sample?: string | undefined;
1886
+ }, {
1887
+ value?: string | undefined;
1888
+ key?: string | undefined;
1889
+ label?: string | undefined;
1890
+ sample?: string | undefined;
1891
+ }>, "many">>;
1892
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1893
+ custom_field: z.ZodOptional<z.ZodBoolean>;
1894
+ default: z.ZodOptional<z.ZodString>;
1895
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1896
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
1897
+ from_search: z.ZodOptional<z.ZodBoolean>;
1898
+ from_write: z.ZodOptional<z.ZodBoolean>;
1899
+ help_text: z.ZodOptional<z.ZodString>;
1900
+ help_text_html: z.ZodOptional<z.ZodString>;
1901
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1902
+ label: z.ZodOptional<z.ZodString>;
1903
+ language: z.ZodOptional<z.ZodString>;
1904
+ parent_key: z.ZodOptional<z.ZodString>;
1905
+ placeholder: z.ZodOptional<z.ZodString>;
1906
+ prefill: z.ZodOptional<z.ZodString>;
1907
+ required: z.ZodOptional<z.ZodBoolean>;
1908
+ searchfill: z.ZodOptional<z.ZodString>;
1909
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
1910
+ regex: z.ZodOptional<z.ZodString>;
1911
+ type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
1912
+ list: z.ZodOptional<z.ZodBoolean>;
1913
+ }, "strip", z.ZodTypeAny, {
1914
+ key: string;
1915
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1916
+ label?: string | undefined;
1917
+ alters_custom_fields?: boolean | null | undefined;
1918
+ capabilities?: string[] | undefined;
1919
+ choices?: {
1920
+ value?: string | undefined;
1921
+ key?: string | undefined;
1922
+ label?: string | undefined;
1923
+ sample?: string | undefined;
1924
+ }[] | undefined;
1925
+ computed?: boolean | null | undefined;
1926
+ custom_field?: boolean | undefined;
1927
+ default?: string | undefined;
1928
+ depends_on?: string[] | undefined;
1929
+ format?: "SELECT" | undefined;
1930
+ from_search?: boolean | undefined;
1931
+ from_write?: boolean | undefined;
1932
+ help_text?: string | undefined;
1933
+ help_text_html?: string | undefined;
1934
+ input_format?: string[] | undefined;
1935
+ language?: string | undefined;
1936
+ parent_key?: string | undefined;
1937
+ placeholder?: string | undefined;
1938
+ prefill?: string | undefined;
1939
+ required?: boolean | undefined;
1940
+ searchfill?: string | undefined;
1941
+ send_in_json?: boolean | undefined;
1942
+ regex?: string | undefined;
1943
+ list?: boolean | undefined;
1944
+ }, {
1945
+ key: string;
1946
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1947
+ label?: string | undefined;
1948
+ alters_custom_fields?: boolean | null | undefined;
1949
+ capabilities?: string[] | undefined;
1950
+ choices?: {
1951
+ value?: string | undefined;
1952
+ key?: string | undefined;
1953
+ label?: string | undefined;
1954
+ sample?: string | undefined;
1955
+ }[] | undefined;
1956
+ computed?: boolean | null | undefined;
1957
+ custom_field?: boolean | undefined;
1958
+ default?: string | undefined;
1959
+ depends_on?: string[] | undefined;
1960
+ format?: "SELECT" | undefined;
1961
+ from_search?: boolean | undefined;
1962
+ from_write?: boolean | undefined;
1963
+ help_text?: string | undefined;
1964
+ help_text_html?: string | undefined;
1965
+ input_format?: string[] | undefined;
1966
+ language?: string | undefined;
1967
+ parent_key?: string | undefined;
1968
+ placeholder?: string | undefined;
1969
+ prefill?: string | undefined;
1970
+ required?: boolean | undefined;
1971
+ searchfill?: string | undefined;
1972
+ send_in_json?: boolean | undefined;
1973
+ regex?: string | undefined;
1974
+ list?: boolean | undefined;
1975
+ }>, "many">>;
1976
+ errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1977
+ last_fetched_at: z.ZodOptional<z.ZodString>;
1978
+ }, "strip", z.ZodTypeAny, {
1979
+ success: boolean;
1980
+ needs?: {
1981
+ key: string;
1982
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
1983
+ label?: string | undefined;
1984
+ alters_custom_fields?: boolean | null | undefined;
1985
+ capabilities?: string[] | undefined;
1986
+ choices?: {
1987
+ value?: string | undefined;
1988
+ key?: string | undefined;
1989
+ label?: string | undefined;
1990
+ sample?: string | undefined;
1991
+ }[] | undefined;
1992
+ computed?: boolean | null | undefined;
1993
+ custom_field?: boolean | undefined;
1994
+ default?: string | undefined;
1995
+ depends_on?: string[] | undefined;
1996
+ format?: "SELECT" | undefined;
1997
+ from_search?: boolean | undefined;
1998
+ from_write?: boolean | undefined;
1999
+ help_text?: string | undefined;
2000
+ help_text_html?: string | undefined;
2001
+ input_format?: string[] | undefined;
2002
+ language?: string | undefined;
2003
+ parent_key?: string | undefined;
2004
+ placeholder?: string | undefined;
2005
+ prefill?: string | undefined;
2006
+ required?: boolean | undefined;
2007
+ searchfill?: string | undefined;
2008
+ send_in_json?: boolean | undefined;
2009
+ regex?: string | undefined;
2010
+ list?: boolean | undefined;
2011
+ }[] | undefined;
2012
+ errors?: string[] | undefined;
2013
+ last_fetched_at?: string | undefined;
2014
+ }, {
2015
+ success: boolean;
2016
+ needs?: {
2017
+ key: string;
2018
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
2019
+ label?: string | undefined;
2020
+ alters_custom_fields?: boolean | null | undefined;
2021
+ capabilities?: string[] | undefined;
2022
+ choices?: {
2023
+ value?: string | undefined;
2024
+ key?: string | undefined;
2025
+ label?: string | undefined;
2026
+ sample?: string | undefined;
2027
+ }[] | undefined;
2028
+ computed?: boolean | null | undefined;
2029
+ custom_field?: boolean | undefined;
2030
+ default?: string | undefined;
2031
+ depends_on?: string[] | undefined;
2032
+ format?: "SELECT" | undefined;
2033
+ from_search?: boolean | undefined;
2034
+ from_write?: boolean | undefined;
2035
+ help_text?: string | undefined;
2036
+ help_text_html?: string | undefined;
2037
+ input_format?: string[] | undefined;
2038
+ language?: string | undefined;
2039
+ parent_key?: string | undefined;
2040
+ placeholder?: string | undefined;
2041
+ prefill?: string | undefined;
2042
+ required?: boolean | undefined;
2043
+ searchfill?: string | undefined;
2044
+ send_in_json?: boolean | undefined;
2045
+ regex?: string | undefined;
2046
+ list?: boolean | undefined;
2047
+ }[] | undefined;
2048
+ errors?: string[] | undefined;
2049
+ last_fetched_at?: string | undefined;
264
2050
  }>;
265
- type GetActionOptions = z.infer<typeof GetActionSchema> & FunctionOptions;
266
- interface GetActionSdkFunction {
267
- getAction: (options: GetActionOptions) => Promise<Action>;
268
- }
269
2051
 
270
- declare const GetAppSchema: z.ZodObject<{
271
- appKey: z.ZodString;
2052
+ /**
2053
+ * API Client Type Definitions
2054
+ *
2055
+ * This module contains all type definitions related to the Zapier API client,
2056
+ * including configuration options, client interfaces, request/response types,
2057
+ * and API response models.
2058
+ *
2059
+ * API response model types are inferred from Zod schemas defined in api/schemas.ts
2060
+ * to ensure a single source of truth and eliminate duplication.
2061
+ */
2062
+
2063
+ type Need = z.infer<typeof NeedSchema>;
2064
+ type Action = z.infer<typeof ActionSchema>;
2065
+ type Choice = z.infer<typeof ChoiceSchema>;
2066
+ type Field = z.infer<typeof FieldSchema>;
2067
+ type ActionExecutionResult = z.infer<typeof ActionExecutionResultSchema>;
2068
+ type ActionFieldChoice = z.infer<typeof ActionFieldChoiceSchema>;
2069
+ type ActionField = z.infer<typeof ActionFieldSchema>;
2070
+ type Authentication = z.infer<typeof AuthenticationSchema>;
2071
+ type AuthenticationsResponse = z.infer<typeof AuthenticationsResponseSchema>;
2072
+ type UserProfile = z.infer<typeof UserProfileSchema>;
2073
+ type App = z.infer<typeof AppSchema>;
2074
+ type NeedsRequest = z.infer<typeof NeedsRequestSchema>;
2075
+ type NeedsResponse = z.infer<typeof NeedsResponseSchema>;
2076
+
2077
+ declare const RelayRequestSchema: z.ZodObject<{
2078
+ url: z.ZodString;
2079
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
2080
+ body: z.ZodOptional<z.ZodAny>;
2081
+ authenticationId: z.ZodOptional<z.ZodNumber>;
2082
+ callbackUrl: z.ZodOptional<z.ZodString>;
2083
+ authenticationTemplate: z.ZodOptional<z.ZodString>;
2084
+ headers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodType<Headers, z.ZodTypeDef, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">]>>;
2085
+ } & {
2086
+ relayBaseUrl: z.ZodOptional<z.ZodString>;
272
2087
  }, "strip", z.ZodTypeAny, {
273
- appKey: string;
2088
+ url: string;
2089
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
2090
+ body?: any;
2091
+ authenticationId?: number | undefined;
2092
+ callbackUrl?: string | undefined;
2093
+ authenticationTemplate?: string | undefined;
2094
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
2095
+ relayBaseUrl?: string | undefined;
274
2096
  }, {
275
- appKey: string;
2097
+ url: string;
2098
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
2099
+ body?: any;
2100
+ authenticationId?: number | undefined;
2101
+ callbackUrl?: string | undefined;
2102
+ authenticationTemplate?: string | undefined;
2103
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
2104
+ relayBaseUrl?: string | undefined;
276
2105
  }>;
277
- type GetAppOptions = z.infer<typeof GetAppSchema> & FunctionOptions;
278
- interface GetAppSdkFunction {
279
- getApp: (options: GetAppOptions) => Promise<Integration>;
2106
+ type RelayRequestOptions = z.infer<typeof RelayRequestSchema>;
2107
+ declare const RelayFetchSchema: z.ZodObject<{
2108
+ url: z.ZodString;
2109
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
2110
+ body: z.ZodOptional<z.ZodAny>;
2111
+ authenticationId: z.ZodOptional<z.ZodNumber>;
2112
+ callbackUrl: z.ZodOptional<z.ZodString>;
2113
+ authenticationTemplate: z.ZodOptional<z.ZodString>;
2114
+ headers: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodType<Headers, z.ZodTypeDef, Headers>, z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">]>>;
2115
+ } & {
2116
+ relayBaseUrl: z.ZodOptional<z.ZodString>;
2117
+ }, "strip", z.ZodTypeAny, {
2118
+ url: string;
2119
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
2120
+ body?: any;
2121
+ authenticationId?: number | undefined;
2122
+ callbackUrl?: string | undefined;
2123
+ authenticationTemplate?: string | undefined;
2124
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
2125
+ relayBaseUrl?: string | undefined;
2126
+ }, {
2127
+ url: string;
2128
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
2129
+ body?: any;
2130
+ authenticationId?: number | undefined;
2131
+ callbackUrl?: string | undefined;
2132
+ authenticationTemplate?: string | undefined;
2133
+ headers?: Record<string, string> | [string, string][] | Headers | undefined;
2134
+ relayBaseUrl?: string | undefined;
2135
+ }>;
2136
+
2137
+ interface RequestPluginProvides {
2138
+ request: (options: RelayRequestOptions) => Promise<Response>;
2139
+ context: {
2140
+ meta: {
2141
+ request: {
2142
+ inputSchema: typeof RelayRequestSchema;
2143
+ };
2144
+ };
2145
+ };
280
2146
  }
281
2147
 
2148
+ interface FetchPluginProvides {
2149
+ fetch: (url: string | URL, init?: RequestInit & {
2150
+ authenticationId?: number;
2151
+ callbackUrl?: string;
2152
+ authenticationTemplate?: string;
2153
+ }) => Promise<Response>;
2154
+ }
2155
+ /**
2156
+ * Direct plugin function - takes options + sdk + context in one object
2157
+ */
2158
+ declare const fetchPlugin: Plugin<GetSdkType<RequestPluginProvides>, // requires request in SDK
2159
+ {}, // requires no context (uses SDK methods)
2160
+ FetchPluginProvides>;
2161
+ type ZapierFetchInitOptions = RequestInit & {
2162
+ authenticationId?: number;
2163
+ callbackUrl?: string;
2164
+ authenticationTemplate?: string;
2165
+ };
2166
+
282
2167
  declare const RunActionSchema: z.ZodObject<{
283
2168
  appKey: z.ZodString;
284
2169
  actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
285
2170
  actionKey: z.ZodString;
2171
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
286
2172
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
287
- authenticationId: z.ZodOptional<z.ZodNumber>;
2173
+ pageSize: z.ZodOptional<z.ZodNumber>;
2174
+ maxItems: z.ZodOptional<z.ZodNumber>;
288
2175
  }, "strip", z.ZodTypeAny, {
289
2176
  appKey: string;
290
- actionType: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
2177
+ actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
291
2178
  actionKey: string;
2179
+ authenticationId?: number | null | undefined;
2180
+ maxItems?: number | undefined;
2181
+ pageSize?: number | undefined;
292
2182
  inputs?: Record<string, any> | undefined;
293
- authenticationId?: number | undefined;
294
2183
  }, {
295
2184
  appKey: string;
296
- actionType: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
2185
+ actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
297
2186
  actionKey: string;
2187
+ authenticationId?: number | null | undefined;
2188
+ maxItems?: number | undefined;
2189
+ pageSize?: number | undefined;
298
2190
  inputs?: Record<string, any> | undefined;
299
- authenticationId?: number | undefined;
300
2191
  }>;
301
- type RunActionOptions = z.infer<typeof RunActionSchema> & FunctionOptions;
302
- interface RunActionSdkFunction {
303
- runAction: (options: RunActionOptions) => Promise<ActionExecutionResult>;
304
- }
2192
+ type RunActionOptions = z.infer<typeof RunActionSchema>;
305
2193
 
306
- declare const ListFieldsSchema: z.ZodObject<{
2194
+ declare const GetActionSchema: z.ZodObject<{
307
2195
  appKey: z.ZodString;
308
2196
  actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
309
2197
  actionKey: z.ZodString;
310
- authenticationId: z.ZodOptional<z.ZodNumber>;
311
- params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
312
2198
  }, "strip", z.ZodTypeAny, {
313
2199
  appKey: string;
314
- actionType: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
2200
+ actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
315
2201
  actionKey: string;
316
- params?: Record<string, any> | undefined;
317
- authenticationId?: number | undefined;
318
2202
  }, {
319
2203
  appKey: string;
320
- actionType: "read" | "read_bulk" | "write" | "run" | "search" | "search_or_write" | "search_and_write" | "filter";
2204
+ actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
321
2205
  actionKey: string;
322
- params?: Record<string, any> | undefined;
323
- authenticationId?: number | undefined;
324
2206
  }>;
325
- type ListFieldsOptions = z.infer<typeof ListFieldsSchema> & FunctionOptions;
326
- interface ListFieldsSdkFunction {
327
- listFields: (options: ListFieldsOptions) => Promise<ActionField[]>;
328
- }
2207
+ type GetActionOptions = z.infer<typeof GetActionSchema>;
329
2208
 
330
- declare const ListAuthenticationsSchema: z.ZodObject<{
331
- appKey: z.ZodOptional<z.ZodString>;
2209
+ declare const ListActionsSchema: z.ZodObject<{
2210
+ appKey: z.ZodString;
2211
+ actionType: z.ZodOptional<z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>>;
2212
+ pageSize: z.ZodOptional<z.ZodNumber>;
2213
+ maxItems: z.ZodOptional<z.ZodNumber>;
2214
+ }, "strip", z.ZodTypeAny, {
2215
+ appKey: string;
2216
+ maxItems?: number | undefined;
2217
+ pageSize?: number | undefined;
2218
+ actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
2219
+ }, {
2220
+ appKey: string;
2221
+ maxItems?: number | undefined;
2222
+ pageSize?: number | undefined;
2223
+ actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
2224
+ }>;
2225
+ type ListActionsOptions = z.infer<typeof ListActionsSchema>;
2226
+
2227
+ declare const GetAppSchema: z.ZodObject<{
2228
+ appKey: z.ZodString;
2229
+ }, "strip", z.ZodTypeAny, {
2230
+ appKey: string;
2231
+ }, {
2232
+ appKey: string;
2233
+ }>;
2234
+ type GetAppOptions = z.infer<typeof GetAppSchema>;
2235
+
2236
+ declare const ListAppsSchema: z.ZodObject<{
2237
+ appKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
332
2238
  search: z.ZodOptional<z.ZodString>;
333
- title: z.ZodOptional<z.ZodString>;
334
- account_id: z.ZodOptional<z.ZodString>;
335
- owner: z.ZodOptional<z.ZodString>;
336
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
337
- offset: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
2239
+ pageSize: z.ZodOptional<z.ZodNumber>;
2240
+ maxItems: z.ZodOptional<z.ZodNumber>;
2241
+ }, "strip", z.ZodTypeAny, {
2242
+ search?: string | undefined;
2243
+ maxItems?: number | undefined;
2244
+ pageSize?: number | undefined;
2245
+ appKeys?: string[] | undefined;
2246
+ }, {
2247
+ search?: string | undefined;
2248
+ maxItems?: number | undefined;
2249
+ pageSize?: number | undefined;
2250
+ appKeys?: string[] | undefined;
2251
+ }>;
2252
+ type ListAppsOptions = z.infer<typeof ListAppsSchema>;
2253
+
2254
+ interface ListAppsPluginProvides {
2255
+ listApps: (options?: ListAppsOptions) => Promise<{
2256
+ data: AppItem[];
2257
+ }> & AsyncIterable<{
2258
+ data: AppItem[];
2259
+ nextCursor?: string;
2260
+ }> & {
2261
+ items(): AsyncIterable<AppItem>;
2262
+ };
2263
+ context: {
2264
+ meta: {
2265
+ listApps: {
2266
+ inputSchema: typeof ListAppsSchema;
2267
+ };
2268
+ };
2269
+ };
2270
+ }
2271
+
2272
+ interface GetAppPluginProvides {
2273
+ getApp: (options: GetAppOptions) => Promise<{
2274
+ data: AppItem;
2275
+ }>;
2276
+ context: {
2277
+ meta: {
2278
+ getApp: {
2279
+ inputSchema: typeof GetAppSchema;
2280
+ };
2281
+ };
2282
+ };
2283
+ }
2284
+
2285
+ interface ListActionsPluginProvides {
2286
+ listActions: (options?: ListActionsOptions) => Promise<{
2287
+ data: ActionItem[];
2288
+ }> & AsyncIterable<{
2289
+ data: ActionItem[];
2290
+ nextCursor?: string;
2291
+ }> & {
2292
+ items(): AsyncIterable<ActionItem>;
2293
+ };
2294
+ context: {
2295
+ meta: {
2296
+ listActions: {
2297
+ inputSchema: typeof ListActionsSchema;
2298
+ };
2299
+ };
2300
+ };
2301
+ }
2302
+
2303
+ interface GetActionPluginProvides {
2304
+ getAction: (options: GetActionOptions) => Promise<{
2305
+ data: ActionItem;
2306
+ }>;
2307
+ context: {
2308
+ meta: {
2309
+ getAction: {
2310
+ inputSchema: typeof GetActionSchema;
2311
+ };
2312
+ };
2313
+ };
2314
+ }
2315
+
2316
+ interface RunActionPluginProvides {
2317
+ runAction: (options?: RunActionOptions) => Promise<{
2318
+ data: any[];
2319
+ }> & AsyncIterable<{
2320
+ data: any[];
2321
+ nextCursor?: string;
2322
+ }> & {
2323
+ items(): AsyncIterable<any>;
2324
+ };
2325
+ context: {
2326
+ meta: {
2327
+ runAction: {
2328
+ inputSchema: typeof RunActionSchema;
2329
+ };
2330
+ };
2331
+ };
2332
+ }
2333
+
2334
+ interface AppsPluginProvides {
2335
+ apps: ActionProxy;
2336
+ }
2337
+ declare const appsPlugin: Plugin<GetSdkType<FetchPluginProvides & RunActionPluginProvides>, // requires fetch + runAction in SDK
2338
+ {}, // no context requirements
2339
+ AppsPluginProvides>;
2340
+
2341
+ /**
2342
+ * SDK Event System
2343
+ *
2344
+ * This module provides common event type definitions for the SDK's
2345
+ * event system, including authentication, API, and loading events.
2346
+ */
2347
+ interface SdkEvent {
2348
+ type: string;
2349
+ payload?: Record<string, any>;
2350
+ timestamp?: number;
2351
+ }
2352
+ interface AuthEvent extends SdkEvent {
2353
+ type: "auth_refreshing" | "auth_success" | "auth_error" | "auth_logout";
2354
+ payload?: {
2355
+ message?: string;
2356
+ error?: string;
2357
+ operation?: string;
2358
+ };
2359
+ }
2360
+ interface ApiEvent extends SdkEvent {
2361
+ type: "api_request" | "api_response" | "api_error";
2362
+ payload?: {
2363
+ url?: string;
2364
+ method?: string;
2365
+ status?: number;
2366
+ duration?: number;
2367
+ error?: string;
2368
+ };
2369
+ }
2370
+ interface LoadingEvent extends SdkEvent {
2371
+ type: "loading_start" | "loading_end";
2372
+ payload?: {
2373
+ operation?: string;
2374
+ resource?: string;
2375
+ };
2376
+ }
2377
+ type EventCallback = (event: SdkEvent) => void;
2378
+
2379
+ declare const ListInputFieldsSchema: z.ZodObject<{
2380
+ appKey: z.ZodString;
2381
+ actionType: z.ZodEnum<["read", "read_bulk", "write", "run", "search", "search_or_write", "search_and_write", "filter"]>;
2382
+ actionKey: z.ZodString;
2383
+ authenticationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2384
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2385
+ pageSize: z.ZodOptional<z.ZodNumber>;
2386
+ maxItems: z.ZodOptional<z.ZodNumber>;
338
2387
  }, "strip", z.ZodTypeAny, {
339
- search?: string | undefined;
340
- appKey?: string | undefined;
341
- title?: string | undefined;
342
- account_id?: string | undefined;
343
- owner?: string | undefined;
344
- limit?: number | undefined;
345
- offset?: number | undefined;
2388
+ appKey: string;
2389
+ actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2390
+ actionKey: string;
2391
+ authenticationId?: number | null | undefined;
2392
+ maxItems?: number | undefined;
2393
+ pageSize?: number | undefined;
2394
+ inputs?: Record<string, any> | undefined;
346
2395
  }, {
347
- search?: string | undefined;
348
- appKey?: string | undefined;
349
- title?: string | undefined;
350
- account_id?: string | undefined;
351
- owner?: string | undefined;
352
- limit?: number | undefined;
353
- offset?: number | undefined;
2396
+ appKey: string;
2397
+ actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
2398
+ actionKey: string;
2399
+ authenticationId?: number | null | undefined;
2400
+ maxItems?: number | undefined;
2401
+ pageSize?: number | undefined;
2402
+ inputs?: Record<string, any> | undefined;
354
2403
  }>;
355
- type ListAuthenticationsOptions = z.infer<typeof ListAuthenticationsSchema> & FunctionOptions;
356
- interface ListAuthenticationsSdkFunction {
357
- listAuthentications: (options?: Partial<ListAuthenticationsOptions>) => Promise<Authentication[]>;
358
- }
2404
+ type ListInputFieldsOptions = z.infer<typeof ListInputFieldsSchema>;
359
2405
 
360
2406
  declare const GetAuthenticationSchema: z.ZodObject<{
361
2407
  authenticationId: z.ZodNumber;
@@ -364,10 +2410,7 @@ declare const GetAuthenticationSchema: z.ZodObject<{
364
2410
  }, {
365
2411
  authenticationId: number;
366
2412
  }>;
367
- type GetAuthenticationOptions = z.infer<typeof GetAuthenticationSchema> & FunctionOptions;
368
- interface GetAuthenticationSdkFunction {
369
- getAuthentication: (options: GetAuthenticationOptions) => Promise<Authentication>;
370
- }
2413
+ type GetAuthenticationOptions = z.infer<typeof GetAuthenticationSchema>;
371
2414
 
372
2415
  declare const FindFirstAuthenticationSchema: z.ZodObject<{
373
2416
  appKey: z.ZodOptional<z.ZodString>;
@@ -375,29 +2418,20 @@ declare const FindFirstAuthenticationSchema: z.ZodObject<{
375
2418
  title: z.ZodOptional<z.ZodString>;
376
2419
  account_id: z.ZodOptional<z.ZodString>;
377
2420
  owner: z.ZodOptional<z.ZodString>;
378
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
379
- offset: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
380
2421
  }, "strip", z.ZodTypeAny, {
381
- search?: string | undefined;
382
- appKey?: string | undefined;
383
2422
  title?: string | undefined;
2423
+ search?: string | undefined;
384
2424
  account_id?: string | undefined;
2425
+ appKey?: string | undefined;
385
2426
  owner?: string | undefined;
386
- limit?: number | undefined;
387
- offset?: number | undefined;
388
2427
  }, {
389
- search?: string | undefined;
390
- appKey?: string | undefined;
391
2428
  title?: string | undefined;
2429
+ search?: string | undefined;
392
2430
  account_id?: string | undefined;
2431
+ appKey?: string | undefined;
393
2432
  owner?: string | undefined;
394
- limit?: number | undefined;
395
- offset?: number | undefined;
396
2433
  }>;
397
- type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema> & FunctionOptions;
398
- interface FindFirstAuthenticationSdkFunction {
399
- findFirstAuthentication: (options?: Partial<FindFirstAuthenticationOptions>) => Promise<Authentication | null>;
400
- }
2434
+ type FindFirstAuthenticationOptions = z.infer<typeof FindFirstAuthenticationSchema>;
401
2435
 
402
2436
  declare const FindUniqueAuthenticationSchema: z.ZodObject<{
403
2437
  appKey: z.ZodOptional<z.ZodString>;
@@ -405,231 +2439,162 @@ declare const FindUniqueAuthenticationSchema: z.ZodObject<{
405
2439
  title: z.ZodOptional<z.ZodString>;
406
2440
  account_id: z.ZodOptional<z.ZodString>;
407
2441
  owner: z.ZodOptional<z.ZodString>;
408
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
409
- offset: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
410
2442
  }, "strip", z.ZodTypeAny, {
411
- search?: string | undefined;
412
- appKey?: string | undefined;
413
2443
  title?: string | undefined;
2444
+ search?: string | undefined;
414
2445
  account_id?: string | undefined;
2446
+ appKey?: string | undefined;
415
2447
  owner?: string | undefined;
416
- limit?: number | undefined;
417
- offset?: number | undefined;
418
2448
  }, {
419
- search?: string | undefined;
420
- appKey?: string | undefined;
421
2449
  title?: string | undefined;
2450
+ search?: string | undefined;
422
2451
  account_id?: string | undefined;
2452
+ appKey?: string | undefined;
423
2453
  owner?: string | undefined;
424
- limit?: number | undefined;
425
- offset?: number | undefined;
426
2454
  }>;
427
- type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema> & FunctionOptions;
428
- interface FindUniqueAuthenticationSdkFunction {
429
- findUniqueAuthentication: (options?: Partial<FindUniqueAuthenticationOptions>) => Promise<Authentication>;
430
- }
2455
+ type FindUniqueAuthenticationOptions = z.infer<typeof FindUniqueAuthenticationSchema>;
431
2456
 
432
- declare const GenerateTypesSchema: z.ZodObject<{
433
- appKey: z.ZodString;
434
- authenticationId: z.ZodOptional<z.ZodNumber>;
435
- output: z.ZodOptional<z.ZodString>;
436
- debug: z.ZodDefault<z.ZodBoolean>;
437
- }, "strip", z.ZodTypeAny, {
438
- appKey: string;
439
- debug: boolean;
440
- authenticationId?: number | undefined;
441
- output?: string | undefined;
442
- }, {
443
- appKey: string;
444
- authenticationId?: number | undefined;
445
- output?: string | undefined;
446
- debug?: boolean | undefined;
447
- }>;
448
- type GenerateTypesOptions = z.infer<typeof GenerateTypesSchema> & FunctionOptions;
449
- interface GenerateTypesSdkFunction {
450
- generateTypes: (options: GenerateTypesOptions) => Promise<string>;
2457
+ interface RegistryPluginProvides {
2458
+ __registry: FunctionRegistryEntry[];
451
2459
  }
452
2460
 
453
- declare const ListAppsSchema: z.ZodObject<{
454
- category: z.ZodOptional<z.ZodString>;
455
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
456
- offset: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
457
- }, "strip", z.ZodTypeAny, {
458
- limit?: number | undefined;
459
- offset?: number | undefined;
460
- category?: string | undefined;
461
- }, {
462
- limit?: number | undefined;
463
- offset?: number | undefined;
464
- category?: string | undefined;
465
- }>;
466
- type ListAppsOptions = z.infer<typeof ListAppsSchema> & FunctionOptions;
467
- interface ListAppsSdkFunction {
468
- listApps: (options?: Partial<ListAppsOptions>) => Promise<Integration[]>;
469
- }
470
-
471
- declare const BundleCodeSchema: z.ZodObject<{
472
- input: z.ZodString;
473
- output: z.ZodOptional<z.ZodString>;
474
- string: z.ZodDefault<z.ZodBoolean>;
475
- minify: z.ZodDefault<z.ZodBoolean>;
476
- target: z.ZodDefault<z.ZodString>;
477
- cjs: z.ZodDefault<z.ZodBoolean>;
478
- }, "strip", z.ZodTypeAny, {
479
- string: boolean;
480
- input: string;
481
- minify: boolean;
482
- target: string;
483
- cjs: boolean;
484
- output?: string | undefined;
485
- }, {
486
- input: string;
487
- string?: boolean | undefined;
488
- output?: string | undefined;
489
- minify?: boolean | undefined;
490
- target?: string | undefined;
491
- cjs?: boolean | undefined;
492
- }>;
493
- type BundleCodeOptions = z.infer<typeof BundleCodeSchema>;
494
- interface BundleCodeSdkFunction {
495
- bundleCode: (options: BundleCodeOptions) => Promise<string>;
496
- }
2461
+ declare const GetProfileSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
2462
+ type GetProfileOptions = z.infer<typeof GetProfileSchema> & FunctionOptions;
497
2463
 
498
- declare const RelayRequestSchema: z.ZodObject<{
499
- url: z.ZodString;
500
- method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
501
- body: z.ZodOptional<z.ZodString>;
502
- authenticationId: z.ZodOptional<z.ZodNumber>;
503
- callbackUrl: z.ZodOptional<z.ZodString>;
504
- authenticationTemplate: z.ZodOptional<z.ZodString>;
505
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
506
- }, "strip", z.ZodTypeAny, {
507
- url: string;
508
- authenticationId?: number | undefined;
509
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
510
- body?: string | undefined;
511
- callbackUrl?: string | undefined;
512
- authenticationTemplate?: string | undefined;
513
- headers?: Record<string, string> | undefined;
514
- }, {
515
- url: string;
516
- authenticationId?: number | undefined;
517
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
518
- body?: string | undefined;
519
- callbackUrl?: string | undefined;
520
- authenticationTemplate?: string | undefined;
521
- headers?: Record<string, string> | undefined;
522
- }>;
523
- type RelayRequestOptions$1 = z.infer<typeof RelayRequestSchema> & FunctionOptions & {
524
- /** Base URL for Relay service */
525
- relayBaseUrl?: string;
526
- };
527
- interface RelayRequestSdkFunction {
528
- request: (options: RelayRequestOptions$1) => Promise<Response>;
2464
+ interface GetProfilePluginProvides {
2465
+ getProfile: (options?: GetProfileOptions) => Promise<{
2466
+ data: UserProfileItem;
2467
+ }>;
2468
+ context: {
2469
+ meta: {
2470
+ getProfile: {
2471
+ inputSchema: typeof GetProfileSchema;
2472
+ };
2473
+ };
2474
+ };
529
2475
  }
530
- declare const RelayFetchSchema: z.ZodObject<{
531
- url: z.ZodString;
532
- method: z.ZodOptional<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]>>;
533
- body: z.ZodOptional<z.ZodString>;
534
- authenticationId: z.ZodOptional<z.ZodNumber>;
535
- callbackUrl: z.ZodOptional<z.ZodString>;
536
- authenticationTemplate: z.ZodOptional<z.ZodString>;
537
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2476
+
2477
+ declare const ListAuthenticationsSchema: z.ZodObject<{
2478
+ appKey: z.ZodOptional<z.ZodString>;
2479
+ search: z.ZodOptional<z.ZodString>;
2480
+ title: z.ZodOptional<z.ZodString>;
2481
+ account_id: z.ZodOptional<z.ZodString>;
2482
+ owner: z.ZodOptional<z.ZodString>;
2483
+ pageSize: z.ZodOptional<z.ZodNumber>;
2484
+ maxItems: z.ZodOptional<z.ZodNumber>;
538
2485
  }, "strip", z.ZodTypeAny, {
539
- url: string;
540
- authenticationId?: number | undefined;
541
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
542
- body?: string | undefined;
543
- callbackUrl?: string | undefined;
544
- authenticationTemplate?: string | undefined;
545
- headers?: Record<string, string> | undefined;
2486
+ title?: string | undefined;
2487
+ search?: string | undefined;
2488
+ account_id?: string | undefined;
2489
+ maxItems?: number | undefined;
2490
+ pageSize?: number | undefined;
2491
+ appKey?: string | undefined;
2492
+ owner?: string | undefined;
546
2493
  }, {
547
- url: string;
548
- authenticationId?: number | undefined;
549
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
550
- body?: string | undefined;
551
- callbackUrl?: string | undefined;
552
- authenticationTemplate?: string | undefined;
553
- headers?: Record<string, string> | undefined;
2494
+ title?: string | undefined;
2495
+ search?: string | undefined;
2496
+ account_id?: string | undefined;
2497
+ maxItems?: number | undefined;
2498
+ pageSize?: number | undefined;
2499
+ appKey?: string | undefined;
2500
+ owner?: string | undefined;
554
2501
  }>;
2502
+ type ListAuthenticationsOptions = z.infer<typeof ListAuthenticationsSchema>;
555
2503
 
556
- interface FetchPluginOptions {
557
- sdk: ZapierSdk;
558
- }
559
- /**
560
- * Creates a fetch function with standard fetch signature that delegates to sdk.request
561
- */
562
- declare function createFetchPlugin(options: FetchPluginOptions): (url: string | URL, init?: RequestInit & {
563
- authenticationId?: number;
564
- callbackUrl?: string;
565
- authenticationTemplate?: string;
566
- }) => Promise<Response>;
567
- interface FetchPluginSdkExtension {
568
- fetch: (url: string | URL, init?: RequestInit & {
569
- authenticationId?: number;
570
- callbackUrl?: string;
571
- authenticationTemplate?: string;
572
- }) => Promise<Response>;
2504
+ interface ListAuthenticationsPluginProvides {
2505
+ listAuthentications: (options?: ListAuthenticationsOptions) => Promise<{
2506
+ data: AuthenticationItem[];
2507
+ }> & AsyncIterable<{
2508
+ data: AuthenticationItem[];
2509
+ nextCursor?: string;
2510
+ }> & {
2511
+ items(): AsyncIterable<AuthenticationItem>;
2512
+ };
2513
+ context: {
2514
+ meta: {
2515
+ listAuthentications: {
2516
+ inputSchema: typeof ListAuthenticationsSchema;
2517
+ };
2518
+ };
2519
+ };
573
2520
  }
574
2521
 
575
- interface ZapierSdkFunctions extends ListActionsSdkFunction, GetActionSdkFunction, GetAppSdkFunction, RunActionSdkFunction, ListFieldsSdkFunction, ListAuthenticationsSdkFunction, GetAuthenticationSdkFunction, FindFirstAuthenticationSdkFunction, FindUniqueAuthenticationSdkFunction, GenerateTypesSdkFunction, ListAppsSdkFunction, BundleCodeSdkFunction, RelayRequestSdkFunction {
576
- }
577
- interface ZapierSdkPlugins extends AppsPluginSdkExtension, FetchPluginSdkExtension {
578
- }
579
- interface BaseZapierSdk extends ZapierSdkFunctions {
580
- __registry: Array<{
581
- name: string;
582
- inputSchema: any;
583
- implementation: Function;
2522
+ interface GetAuthenticationPluginProvides {
2523
+ getAuthentication: (options: GetAuthenticationOptions) => Promise<{
2524
+ data: AuthenticationItem;
584
2525
  }>;
2526
+ context: {
2527
+ meta: {
2528
+ getAuthentication: {
2529
+ inputSchema: typeof GetAuthenticationSchema;
2530
+ };
2531
+ };
2532
+ };
585
2533
  }
586
- interface ZapierSdk extends ZapierSdkFunctions, ZapierSdkPlugins {
587
- __registry: Array<{
588
- name: string;
589
- inputSchema: any;
590
- implementation: Function;
2534
+
2535
+ interface FindFirstAuthenticationPluginProvides {
2536
+ findFirstAuthentication: (options?: FindFirstAuthenticationOptions) => Promise<{
2537
+ data: AuthenticationItem | null;
591
2538
  }>;
2539
+ context: {
2540
+ meta: {
2541
+ findFirstAuthentication: {
2542
+ inputSchema: typeof FindFirstAuthenticationSchema;
2543
+ };
2544
+ };
2545
+ };
592
2546
  }
593
2547
 
594
- interface AppsPluginOptions {
595
- sdk: ZapierSdk;
2548
+ interface FindUniqueAuthenticationPluginProvides {
2549
+ findUniqueAuthentication: (options?: FindUniqueAuthenticationOptions) => Promise<{
2550
+ data: AuthenticationItem;
2551
+ }>;
2552
+ context: {
2553
+ meta: {
2554
+ findUniqueAuthentication: {
2555
+ inputSchema: typeof FindUniqueAuthenticationSchema;
2556
+ };
2557
+ };
2558
+ };
596
2559
  }
597
- declare function createAppsPlugin(options: AppsPluginOptions): ActionProxy;
598
2560
 
599
- declare function isPositional(schema: z.ZodType): boolean;
2561
+ interface ListInputFieldsPluginProvides {
2562
+ listInputFields: (options?: ListInputFieldsOptions) => Promise<{
2563
+ data: InputFieldItem[];
2564
+ }> & AsyncIterable<{
2565
+ data: InputFieldItem[];
2566
+ nextCursor?: string;
2567
+ }> & {
2568
+ items(): AsyncIterable<InputFieldItem>;
2569
+ };
2570
+ context: {
2571
+ meta: {
2572
+ listInputFields: {
2573
+ inputSchema: typeof ListInputFieldsSchema;
2574
+ };
2575
+ };
2576
+ };
2577
+ }
600
2578
 
601
2579
  /**
602
- * SDK Authentication Utilities
603
- *
604
- * This module provides SDK-level authentication utilities focused
605
- * solely on token acquisition. CLI-specific functionality like login/logout
606
- * is handled by the @zapier/zapier-sdk-cli-login package.
2580
+ * SDK-related types and interfaces
607
2581
  */
608
2582
 
609
- interface AuthOptions {
2583
+ interface BaseSdkOptions {
2584
+ token?: string;
2585
+ getToken?: () => Promise<string | undefined>;
610
2586
  onEvent?: EventCallback;
611
- fetch?: typeof globalThis.fetch;
2587
+ fetch?: typeof fetch;
2588
+ baseUrl?: string;
2589
+ debug?: boolean;
612
2590
  }
613
- /**
614
- * Gets the ZAPIER_TOKEN from environment variables.
615
- * Returns undefined if not set.
616
- */
617
- declare function getTokenFromEnv(): string | undefined;
618
- /**
619
- * Attempts to get a token by optionally importing from CLI login package.
620
- * This provides a graceful fallback when the CLI login package is not available.
621
- *
622
- * Returns undefined if no valid token is found or CLI package is not available.
623
- */
624
- declare function getTokenFromCliLogin(options?: AuthOptions): Promise<string | undefined>;
625
- /**
626
- * Attempts to get a token with the following precedence:
627
- * 1. ZAPIER_TOKEN environment variable
628
- * 2. CLI login package (if available) with auto-refresh
629
- *
630
- * Returns undefined if no valid token is found.
631
- */
632
- declare function getTokenFromEnvOrConfig(options?: AuthOptions): Promise<string | undefined>;
2591
+
2592
+ interface FunctionRegistryEntry {
2593
+ name: string;
2594
+ inputSchema: z.ZodSchema;
2595
+ implementation: Function;
2596
+ }
2597
+ type ZapierSdk = GetSdkType<RegistryPluginProvides & FetchPluginProvides & AppsPluginProvides & ListAppsPluginProvides & GetAppPluginProvides & ListActionsPluginProvides & GetActionPluginProvides & RunActionPluginProvides & ListAuthenticationsPluginProvides & GetAuthenticationPluginProvides & FindFirstAuthenticationPluginProvides & FindUniqueAuthenticationPluginProvides & ListInputFieldsPluginProvides & RequestPluginProvides & GetProfilePluginProvides>;
633
2598
 
634
2599
  interface InputsResolver {
635
2600
  type: "fields";
@@ -705,188 +2670,43 @@ declare function getResolutionOrder(paramName: string, resolved?: Set<string>):
705
2670
  declare function getResolutionOrderForParams(paramNames: string[]): string[];
706
2671
 
707
2672
  /**
708
- * List available authentications with optional filtering
709
- *
710
- * This function can be used standalone without instantiating a full SDK,
711
- * which enables better tree-shaking in applications that only need this functionality.
712
- *
713
- * @param options - Filtering, pagination, and API configuration options
714
- * @returns Promise<Authentication[]> with pagination metadata
715
- */
716
- declare function listAuthentications(options?: Partial<ListAuthenticationsOptions>): Promise<Authentication[]>;
717
-
718
- /**
719
- * Get a specific authentication by ID
720
- *
721
- * This function can be used standalone without instantiating a full SDK,
722
- * which enables better tree-shaking in applications that only need this functionality.
723
- *
724
- * @param options - Authentication ID and API configuration options
725
- * @returns Promise<Authentication> - The authentication details
726
- * @throws Error if authentication not found or access denied
727
- */
728
- declare function getAuthentication(options: GetAuthenticationOptions): Promise<Authentication>;
729
-
730
- /**
731
- * Find the first authentication matching the given criteria
732
- *
733
- * This function can be used standalone without instantiating a full SDK,
734
- * which enables better tree-shaking in applications that only need this functionality.
735
- *
736
- * @param options - Filtering and API configuration options
737
- * @returns Promise<Authentication | null> - First matching authentication or null if not found
738
- */
739
- declare function findFirstAuthentication(options?: Partial<FindFirstAuthenticationOptions>): Promise<Authentication | null>;
740
-
741
- /**
742
- * Find a unique authentication matching the given criteria
743
- *
744
- * This function can be used standalone without instantiating a full SDK,
745
- * which enables better tree-shaking in applications that only need this functionality.
746
- *
747
- * @param options - Filtering and API configuration options
748
- * @returns Promise<Authentication> - The unique matching authentication
749
- * @throws Error if no authentication found or multiple authentications found
750
- */
751
- declare function findUniqueAuthentication(options?: Partial<FindUniqueAuthenticationOptions>): Promise<Authentication>;
752
-
753
- /**
754
- * List available apps with optional filtering
755
- *
756
- * This function can be used standalone without instantiating a full SDK,
757
- * which enables better tree-shaking in applications that only need this functionality.
758
- *
759
- * @param options - Filtering, pagination, and API configuration options
760
- * @returns Promise<Integration[]> with pagination metadata
761
- */
762
- declare function listApps(options?: ListAppsOptions): Promise<Integration[]>;
763
-
764
- /**
765
- * Get a specific app by key
766
- *
767
- * This function can be used standalone without instantiating a full SDK,
768
- * which enables better tree-shaking in applications that only need this functionality.
769
- *
770
- * @param options - App key and API configuration options
771
- * @returns Promise<Integration>
772
- */
773
- declare function getApp(options: GetAppOptions): Promise<Integration>;
774
-
775
- /**
776
- * List available actions with optional filtering
777
- *
778
- * This function can be used standalone without instantiating a full SDK,
779
- * which enables better tree-shaking in applications that only need this functionality.
780
- *
781
- * @param options - Filtering and API configuration options
782
- * @returns Promise<Action[]> with pagination metadata
783
- */
784
- declare function listActions(options?: Partial<ListActionsOptions>): Promise<Action[]>;
785
-
786
- /**
787
- * Get a specific action by app, action key, and type
788
- *
789
- * This function can be used standalone without instantiating a full SDK,
790
- * which enables better tree-shaking in applications that only need this functionality.
791
- *
792
- * @param options - App key, action key, type, and API configuration options
793
- * @returns Promise<Action>
794
- */
795
- declare function getAction(options: GetActionOptions): Promise<Action>;
796
-
797
- /**
798
- * Execute an action
799
- *
800
- * This function can be used standalone without instantiating a full SDK,
801
- * which enables better tree-shaking in applications that only need this functionality.
2673
+ * SDK Authentication Utilities
802
2674
  *
803
- * @param options - Action execution parameters and API configuration options
804
- * @returns Promise<ActionExecutionResult>
2675
+ * This module provides SDK-level authentication utilities focused
2676
+ * solely on token acquisition. CLI-specific functionality like login/logout
2677
+ * is handled by the @zapier/zapier-sdk-cli-login package.
805
2678
  */
806
- declare function runAction(options: RunActionOptions): Promise<ActionExecutionResult>;
807
2679
 
2680
+ interface AuthOptions {
2681
+ onEvent?: EventCallback;
2682
+ fetch?: typeof globalThis.fetch;
2683
+ }
808
2684
  /**
809
- * List available fields for an action
810
- *
811
- * This function can be used standalone without instantiating a full SDK,
812
- * which enables better tree-shaking in applications that only need this functionality.
813
- *
814
- * @param options - Action details, authentication ID, params, and API configuration options
815
- * @returns Promise<ActionField[]>
2685
+ * Gets the ZAPIER_TOKEN from environment variables.
2686
+ * Returns undefined if not set.
816
2687
  */
817
- declare function listFields(options: ListFieldsOptions): Promise<ActionField[]>;
818
-
2688
+ declare function getTokenFromEnv(): string | undefined;
819
2689
  /**
820
- * Generate TypeScript types for a specific app
821
- *
822
- * This function can be used standalone without instantiating a full SDK,
823
- * which enables better tree-shaking in applications that only need this functionality.
2690
+ * Attempts to get a token by optionally importing from CLI login package.
2691
+ * This provides a graceful fallback when the CLI login package is not available.
824
2692
  *
825
- * @param options - App key, authentication ID, output path, and API configuration options
826
- * @returns Promise<string> - Generated TypeScript code
2693
+ * Returns undefined if no valid token is found or CLI package is not available.
827
2694
  */
828
- declare function generateTypes(options: GenerateTypesOptions): Promise<string>;
829
-
830
- /**
831
- * Bundle TypeScript code into executable JavaScript
832
- *
833
- * This function can be used standalone without instantiating a full SDK,
834
- * which enables better tree-shaking in applications that only need this functionality.
835
- *
836
- * @param options - Bundling configuration options
837
- * @returns Promise<string> - Bundled JavaScript code
838
- */
839
- declare function bundleCode(options: BundleCodeOptions): Promise<string>;
840
-
841
- interface RelayRequestOptions {
842
- /** HTTP method */
843
- method?: string;
844
- /** Request body (can be string, FormData, Blob, etc.) */
845
- body?: BodyInit | null;
846
- /** Request headers */
847
- headers?: HeadersInit;
848
- /** Zapier authentication ID to use for the request */
849
- authenticationId?: number;
850
- /** URL to send async response to (makes request async) */
851
- callbackUrl?: string;
852
- /** Optional JSON string authentication template to bypass Notary lookup */
853
- authenticationTemplate?: string;
854
- }
855
- interface RelayFetchConfig extends FunctionOptions {
856
- /** Event callback function */
857
- onEvent?: (event: any) => void;
858
- }
2695
+ declare function getTokenFromCliLogin(options?: AuthOptions): Promise<string | undefined>;
859
2696
  /**
860
- * Fetch function that can make requests to external APIs through Zapier's Relay service
861
- *
862
- * This function takes full URLs (like https://api.github.com/user) and transforms them
863
- * into the relay format (/relay/api.github.com/user) for the API client to route
864
- * to relay.zapier.com.
2697
+ * Attempts to get a token with the following precedence:
2698
+ * 1. ZAPIER_TOKEN environment variable
2699
+ * 2. CLI login package (if available) with auto-refresh
865
2700
  *
866
- * @param url - The full URL to fetch
867
- * @param options - Fetch options with additional Relay-specific parameters
868
- * @param config - SDK configuration options
869
- * @returns Promise<Response> - The response from the request
870
- */
871
- /**
872
- * Schema-compatible wrapper function for the request functionality
873
- */
874
- declare function request(options: {
875
- url: string;
876
- method?: string;
877
- body?: BodyInit | null;
878
- headers?: HeadersInit;
879
- authenticationId?: number;
880
- callbackUrl?: string;
881
- authenticationTemplate?: string;
882
- } & FunctionOptions): Promise<Response>;
883
- /**
884
- * Internal fetch implementation
2701
+ * Returns undefined if no valid token is found.
885
2702
  */
886
- declare function relayFetch(url: string | URL, options?: RelayRequestOptions, config?: RelayFetchConfig): Promise<Response>;
2703
+ declare function getTokenFromEnvOrConfig(options?: AuthOptions): Promise<string | undefined>;
887
2704
 
888
2705
  interface ZapierSdkOptions extends BaseSdkOptions {
889
2706
  }
2707
+ declare function createSdk<TCurrentSdk = {}, TCurrentContext = {
2708
+ meta: Record<string, any>;
2709
+ }>(initialSdk?: TCurrentSdk, initialContext?: TCurrentContext): Sdk<TCurrentSdk, TCurrentContext>;
890
2710
  declare function createZapierSdk(options?: ZapierSdkOptions): ZapierSdk;
891
2711
 
892
- export { type Action, type ActionExecutionOptions, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionKeyProperty, ActionKeyPropertySchema, type ActionProxy, type ActionTypeProperty, ActionTypePropertySchema, type ApiEvent, type AppKeyProperty, AppKeyPropertySchema, AppNotFoundError, type AppsPluginOptions, type AppsPluginSdkExtension, type AuthEvent, type AuthObject, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationsResponse, type BaseSdkOptions, type BaseZapierSdk, type Choice, type DebugProperty, DebugPropertySchema, type EventCallback, type FetchPluginOptions, type FetchPluginSdkExtension, type Field, type FunctionOptions, type InputsProperty, InputsPropertySchema, type Integration, type LimitProperty, LimitPropertySchema, type LoadingEvent, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type ParamsProperty, ParamsPropertySchema, RelayFetchSchema, RelayRequestSchema, type ResolverName, type ResolverType, type SdkEvent, type Trigger, type ZapierSdk, ZapierSdkError, type ZapierSdkOptions, actionKeyResolver, actionTypeResolver, appKeyResolver, authenticationIdResolver, bundleCode, createAppsPlugin, createFetchPlugin, createZapierSdk, findFirstAuthentication, findUniqueAuthentication, generateTypes, getAction, getApp, getAuthentication, getResolutionOrder, getResolutionOrderForParams, getResolvableParams, getResolver, getResolversForMissingParams, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, hasResolver, inputsResolver, isPositional, listActions, listApps, listAuthentications, listFields, relayFetch, request, resolverRegistry, runAction };
2712
+ export { type Action, type ActionExecutionResult, type ActionField, type ActionFieldChoice, type ActionItem, type ActionKeyProperty, ActionKeyPropertySchema, type ActionTypeProperty, ActionTypePropertySchema, type ApiError, type ApiEvent, type App, type AppItem, type AppKeyProperty, AppKeyPropertySchema, type AppsPluginProvides, type AuthEvent, type AuthOptions, type Authentication, type AuthenticationIdProperty, AuthenticationIdPropertySchema, type AuthenticationItem, type AuthenticationsResponse, type Choice, type DebugProperty, DebugPropertySchema, type ErrorOptions, type EventCallback, type FetchPluginProvides, type Field, type FunctionOptions, type FunctionRegistryEntry, type GetSdkType, type InputFieldItem, type InputsProperty, InputsPropertySchema, type LimitProperty, LimitPropertySchema, type LoadingEvent, type Need, type NeedsRequest, type NeedsResponse, type OffsetProperty, OffsetPropertySchema, type OutputProperty, OutputPropertySchema, type PaginatedSdkFunction, type ParamsProperty, ParamsPropertySchema, type Plugin, type PluginDependencies, type PluginOptions, type PluginProvides, RelayFetchSchema, RelayRequestSchema, type ResolverName, type ResolverType, type Sdk, type SdkEvent, type UserProfile, type UserProfileItem, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierError, type ZapierFetchInitOptions, ZapierNotFoundError, ZapierResourceNotFoundError, type ZapierSdk, type ZapierSdkOptions, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, appKeyResolver, appsPlugin, authenticationIdResolver, createSdk, createZapierSdk, fetchPlugin, formatErrorMessage, getResolutionOrder, getResolutionOrderForParams, getResolvableParams, getResolver, getResolversForMissingParams, getTokenFromCliLogin, getTokenFromEnv, getTokenFromEnvOrConfig, hasResolver, inputsResolver, isPositional, resolverRegistry };