@zapier/zapier-sdk 0.18.3 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +44 -32
  3. package/dist/index.cjs +658 -693
  4. package/dist/index.d.mts +272 -138
  5. package/dist/index.d.ts +2541 -40
  6. package/dist/index.mjs +638 -692
  7. package/package.json +14 -13
  8. package/dist/api/auth.d.ts +0 -19
  9. package/dist/api/auth.d.ts.map +0 -1
  10. package/dist/api/auth.js +0 -70
  11. package/dist/api/auth.test.d.ts +0 -2
  12. package/dist/api/auth.test.d.ts.map +0 -1
  13. package/dist/api/auth.test.js +0 -220
  14. package/dist/api/client.d.ts +0 -9
  15. package/dist/api/client.d.ts.map +0 -1
  16. package/dist/api/client.integration.test.d.ts +0 -5
  17. package/dist/api/client.integration.test.d.ts.map +0 -1
  18. package/dist/api/client.integration.test.js +0 -318
  19. package/dist/api/client.js +0 -374
  20. package/dist/api/client.methods.test.d.ts +0 -2
  21. package/dist/api/client.methods.test.d.ts.map +0 -1
  22. package/dist/api/client.methods.test.js +0 -158
  23. package/dist/api/client.test.d.ts +0 -2
  24. package/dist/api/client.test.d.ts.map +0 -1
  25. package/dist/api/client.test.js +0 -96
  26. package/dist/api/debug.d.ts +0 -14
  27. package/dist/api/debug.d.ts.map +0 -1
  28. package/dist/api/debug.js +0 -131
  29. package/dist/api/debug.test.d.ts +0 -2
  30. package/dist/api/debug.test.d.ts.map +0 -1
  31. package/dist/api/debug.test.js +0 -59
  32. package/dist/api/index.d.ts +0 -30
  33. package/dist/api/index.d.ts.map +0 -1
  34. package/dist/api/index.js +0 -43
  35. package/dist/api/polling.d.ts +0 -46
  36. package/dist/api/polling.d.ts.map +0 -1
  37. package/dist/api/polling.js +0 -139
  38. package/dist/api/polling.test.d.ts +0 -2
  39. package/dist/api/polling.test.d.ts.map +0 -1
  40. package/dist/api/polling.test.js +0 -318
  41. package/dist/api/router.d.ts +0 -16
  42. package/dist/api/router.d.ts.map +0 -1
  43. package/dist/api/router.js +0 -31
  44. package/dist/api/router.test.d.ts +0 -2
  45. package/dist/api/router.test.d.ts.map +0 -1
  46. package/dist/api/router.test.js +0 -103
  47. package/dist/api/schemas.d.ts +0 -531
  48. package/dist/api/schemas.d.ts.map +0 -1
  49. package/dist/api/schemas.js +0 -389
  50. package/dist/api/types.d.ts +0 -82
  51. package/dist/api/types.d.ts.map +0 -1
  52. package/dist/api/types.js +0 -1
  53. package/dist/auth.d.ts +0 -52
  54. package/dist/auth.d.ts.map +0 -1
  55. package/dist/auth.js +0 -72
  56. package/dist/auth.test.d.ts +0 -2
  57. package/dist/auth.test.d.ts.map +0 -1
  58. package/dist/auth.test.js +0 -102
  59. package/dist/constants.d.ts +0 -14
  60. package/dist/constants.d.ts.map +0 -1
  61. package/dist/constants.js +0 -13
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/index.js +0 -42
  64. package/dist/plugins/api/index.d.ts +0 -12
  65. package/dist/plugins/api/index.d.ts.map +0 -1
  66. package/dist/plugins/api/index.js +0 -24
  67. package/dist/plugins/apps/index.d.ts +0 -15
  68. package/dist/plugins/apps/index.d.ts.map +0 -1
  69. package/dist/plugins/apps/index.js +0 -112
  70. package/dist/plugins/apps/schemas.d.ts +0 -42
  71. package/dist/plugins/apps/schemas.d.ts.map +0 -1
  72. package/dist/plugins/apps/schemas.js +0 -14
  73. package/dist/plugins/eventEmission/builders.d.ts +0 -14
  74. package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
  75. package/dist/plugins/eventEmission/builders.js +0 -109
  76. package/dist/plugins/eventEmission/index.d.ts +0 -38
  77. package/dist/plugins/eventEmission/index.d.ts.map +0 -1
  78. package/dist/plugins/eventEmission/index.js +0 -336
  79. package/dist/plugins/eventEmission/index.test.d.ts +0 -5
  80. package/dist/plugins/eventEmission/index.test.d.ts.map +0 -1
  81. package/dist/plugins/eventEmission/index.test.js +0 -581
  82. package/dist/plugins/eventEmission/transport.d.ts +0 -27
  83. package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
  84. package/dist/plugins/eventEmission/transport.js +0 -104
  85. package/dist/plugins/eventEmission/transport.test.d.ts +0 -5
  86. package/dist/plugins/eventEmission/transport.test.d.ts.map +0 -1
  87. package/dist/plugins/eventEmission/transport.test.js +0 -164
  88. package/dist/plugins/eventEmission/types.d.ts +0 -63
  89. package/dist/plugins/eventEmission/types.d.ts.map +0 -1
  90. package/dist/plugins/eventEmission/types.js +0 -1
  91. package/dist/plugins/eventEmission/utils.d.ts +0 -45
  92. package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
  93. package/dist/plugins/eventEmission/utils.js +0 -114
  94. package/dist/plugins/fetch/index.d.ts +0 -36
  95. package/dist/plugins/fetch/index.d.ts.map +0 -1
  96. package/dist/plugins/fetch/index.js +0 -62
  97. package/dist/plugins/fetch/schemas.d.ts +0 -19
  98. package/dist/plugins/fetch/schemas.d.ts.map +0 -1
  99. package/dist/plugins/fetch/schemas.js +0 -31
  100. package/dist/plugins/findFirstAuthentication/index.d.ts +0 -21
  101. package/dist/plugins/findFirstAuthentication/index.d.ts.map +0 -1
  102. package/dist/plugins/findFirstAuthentication/index.js +0 -36
  103. package/dist/plugins/findFirstAuthentication/index.test.d.ts +0 -2
  104. package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +0 -1
  105. package/dist/plugins/findFirstAuthentication/index.test.js +0 -177
  106. package/dist/plugins/findFirstAuthentication/schemas.d.ts +0 -20
  107. package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +0 -1
  108. package/dist/plugins/findFirstAuthentication/schemas.js +0 -18
  109. package/dist/plugins/findUniqueAuthentication/index.d.ts +0 -21
  110. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +0 -1
  111. package/dist/plugins/findUniqueAuthentication/index.js +0 -39
  112. package/dist/plugins/findUniqueAuthentication/index.test.d.ts +0 -2
  113. package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +0 -1
  114. package/dist/plugins/findUniqueAuthentication/index.test.js +0 -159
  115. package/dist/plugins/findUniqueAuthentication/schemas.d.ts +0 -20
  116. package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +0 -1
  117. package/dist/plugins/findUniqueAuthentication/schemas.js +0 -18
  118. package/dist/plugins/getAction/index.d.ts +0 -25
  119. package/dist/plugins/getAction/index.d.ts.map +0 -1
  120. package/dist/plugins/getAction/index.js +0 -42
  121. package/dist/plugins/getAction/index.test.d.ts +0 -2
  122. package/dist/plugins/getAction/index.test.d.ts.map +0 -1
  123. package/dist/plugins/getAction/index.test.js +0 -211
  124. package/dist/plugins/getAction/schemas.d.ts +0 -30
  125. package/dist/plugins/getAction/schemas.d.ts.map +0 -1
  126. package/dist/plugins/getAction/schemas.js +0 -12
  127. package/dist/plugins/getApp/index.d.ts +0 -21
  128. package/dist/plugins/getApp/index.d.ts.map +0 -1
  129. package/dist/plugins/getApp/index.js +0 -44
  130. package/dist/plugins/getApp/index.test.d.ts +0 -2
  131. package/dist/plugins/getApp/index.test.d.ts.map +0 -1
  132. package/dist/plugins/getApp/index.test.js +0 -157
  133. package/dist/plugins/getApp/schemas.d.ts +0 -16
  134. package/dist/plugins/getApp/schemas.d.ts.map +0 -1
  135. package/dist/plugins/getApp/schemas.js +0 -8
  136. package/dist/plugins/getAuthentication/index.d.ts +0 -21
  137. package/dist/plugins/getAuthentication/index.d.ts.map +0 -1
  138. package/dist/plugins/getAuthentication/index.js +0 -29
  139. package/dist/plugins/getAuthentication/index.test.d.ts +0 -2
  140. package/dist/plugins/getAuthentication/index.test.d.ts.map +0 -1
  141. package/dist/plugins/getAuthentication/index.test.js +0 -106
  142. package/dist/plugins/getAuthentication/schemas.d.ts +0 -7
  143. package/dist/plugins/getAuthentication/schemas.d.ts.map +0 -1
  144. package/dist/plugins/getAuthentication/schemas.js +0 -1
  145. package/dist/plugins/getInputFieldsSchema/index.d.ts +0 -23
  146. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
  147. package/dist/plugins/getInputFieldsSchema/index.js +0 -53
  148. package/dist/plugins/getInputFieldsSchema/index.test.d.ts +0 -2
  149. package/dist/plugins/getInputFieldsSchema/index.test.d.ts.map +0 -1
  150. package/dist/plugins/getInputFieldsSchema/index.test.js +0 -291
  151. package/dist/plugins/getInputFieldsSchema/schemas.d.ts +0 -28
  152. package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
  153. package/dist/plugins/getInputFieldsSchema/schemas.js +0 -13
  154. package/dist/plugins/getProfile/index.d.ts +0 -25
  155. package/dist/plugins/getProfile/index.d.ts.map +0 -1
  156. package/dist/plugins/getProfile/index.js +0 -39
  157. package/dist/plugins/getProfile/schemas.d.ts +0 -13
  158. package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
  159. package/dist/plugins/getProfile/schemas.js +0 -6
  160. package/dist/plugins/listActions/index.d.ts +0 -30
  161. package/dist/plugins/listActions/index.d.ts.map +0 -1
  162. package/dist/plugins/listActions/index.js +0 -75
  163. package/dist/plugins/listActions/index.test.d.ts +0 -2
  164. package/dist/plugins/listActions/index.test.d.ts.map +0 -1
  165. package/dist/plugins/listActions/index.test.js +0 -453
  166. package/dist/plugins/listActions/schemas.d.ts +0 -35
  167. package/dist/plugins/listActions/schemas.d.ts.map +0 -1
  168. package/dist/plugins/listActions/schemas.js +0 -22
  169. package/dist/plugins/listApps/index.d.ts +0 -25
  170. package/dist/plugins/listApps/index.d.ts.map +0 -1
  171. package/dist/plugins/listApps/index.js +0 -69
  172. package/dist/plugins/listApps/index.test.d.ts +0 -2
  173. package/dist/plugins/listApps/index.test.d.ts.map +0 -1
  174. package/dist/plugins/listApps/index.test.js +0 -141
  175. package/dist/plugins/listApps/schemas.d.ts +0 -26
  176. package/dist/plugins/listApps/schemas.d.ts.map +0 -1
  177. package/dist/plugins/listApps/schemas.js +0 -19
  178. package/dist/plugins/listAuthentications/index.d.ts +0 -24
  179. package/dist/plugins/listAuthentications/index.d.ts.map +0 -1
  180. package/dist/plugins/listAuthentications/index.js +0 -77
  181. package/dist/plugins/listAuthentications/index.test.d.ts +0 -2
  182. package/dist/plugins/listAuthentications/index.test.d.ts.map +0 -1
  183. package/dist/plugins/listAuthentications/index.test.js +0 -832
  184. package/dist/plugins/listAuthentications/schemas.d.ts +0 -30
  185. package/dist/plugins/listAuthentications/schemas.d.ts.map +0 -1
  186. package/dist/plugins/listAuthentications/schemas.js +0 -32
  187. package/dist/plugins/listInputFieldChoices/index.d.ts +0 -33
  188. package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
  189. package/dist/plugins/listInputFieldChoices/index.js +0 -115
  190. package/dist/plugins/listInputFieldChoices/index.test.d.ts +0 -2
  191. package/dist/plugins/listInputFieldChoices/index.test.d.ts.map +0 -1
  192. package/dist/plugins/listInputFieldChoices/index.test.js +0 -717
  193. package/dist/plugins/listInputFieldChoices/schemas.d.ts +0 -43
  194. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
  195. package/dist/plugins/listInputFieldChoices/schemas.js +0 -65
  196. package/dist/plugins/listInputFields/index.d.ts +0 -34
  197. package/dist/plugins/listInputFields/index.d.ts.map +0 -1
  198. package/dist/plugins/listInputFields/index.js +0 -204
  199. package/dist/plugins/listInputFields/index.test.d.ts +0 -2
  200. package/dist/plugins/listInputFields/index.test.d.ts.map +0 -1
  201. package/dist/plugins/listInputFields/index.test.js +0 -359
  202. package/dist/plugins/listInputFields/schemas.d.ts +0 -35
  203. package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
  204. package/dist/plugins/listInputFields/schemas.js +0 -23
  205. package/dist/plugins/manifest/index.d.ts +0 -85
  206. package/dist/plugins/manifest/index.d.ts.map +0 -1
  207. package/dist/plugins/manifest/index.js +0 -376
  208. package/dist/plugins/manifest/index.test.d.ts +0 -2
  209. package/dist/plugins/manifest/index.test.d.ts.map +0 -1
  210. package/dist/plugins/manifest/index.test.js +0 -1139
  211. package/dist/plugins/manifest/schemas.d.ts +0 -57
  212. package/dist/plugins/manifest/schemas.d.ts.map +0 -1
  213. package/dist/plugins/manifest/schemas.js +0 -50
  214. package/dist/plugins/registry/index.d.ts +0 -21
  215. package/dist/plugins/registry/index.d.ts.map +0 -1
  216. package/dist/plugins/registry/index.js +0 -117
  217. package/dist/plugins/request/index.d.ts +0 -21
  218. package/dist/plugins/request/index.d.ts.map +0 -1
  219. package/dist/plugins/request/index.js +0 -76
  220. package/dist/plugins/request/index.test.d.ts +0 -2
  221. package/dist/plugins/request/index.test.d.ts.map +0 -1
  222. package/dist/plugins/request/index.test.js +0 -337
  223. package/dist/plugins/request/schemas.d.ts +0 -54
  224. package/dist/plugins/request/schemas.d.ts.map +0 -1
  225. package/dist/plugins/request/schemas.js +0 -41
  226. package/dist/plugins/runAction/index.d.ts +0 -33
  227. package/dist/plugins/runAction/index.d.ts.map +0 -1
  228. package/dist/plugins/runAction/index.js +0 -108
  229. package/dist/plugins/runAction/index.test.d.ts +0 -2
  230. package/dist/plugins/runAction/index.test.d.ts.map +0 -1
  231. package/dist/plugins/runAction/index.test.js +0 -333
  232. package/dist/plugins/runAction/schemas.d.ts +0 -34
  233. package/dist/plugins/runAction/schemas.d.ts.map +0 -1
  234. package/dist/plugins/runAction/schemas.js +0 -23
  235. package/dist/resolvers/actionKey.d.ts +0 -15
  236. package/dist/resolvers/actionKey.d.ts.map +0 -1
  237. package/dist/resolvers/actionKey.js +0 -19
  238. package/dist/resolvers/actionType.d.ts +0 -10
  239. package/dist/resolvers/actionType.d.ts.map +0 -1
  240. package/dist/resolvers/actionType.js +0 -21
  241. package/dist/resolvers/appKey.d.ts +0 -3
  242. package/dist/resolvers/appKey.d.ts.map +0 -1
  243. package/dist/resolvers/appKey.js +0 -5
  244. package/dist/resolvers/authenticationId.d.ts +0 -9
  245. package/dist/resolvers/authenticationId.d.ts.map +0 -1
  246. package/dist/resolvers/authenticationId.js +0 -42
  247. package/dist/resolvers/index.d.ts +0 -8
  248. package/dist/resolvers/index.d.ts.map +0 -1
  249. package/dist/resolvers/index.js +0 -8
  250. package/dist/resolvers/inputFieldKey.d.ts +0 -11
  251. package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
  252. package/dist/resolvers/inputFieldKey.js +0 -47
  253. package/dist/resolvers/inputs.d.ts +0 -17
  254. package/dist/resolvers/inputs.d.ts.map +0 -1
  255. package/dist/resolvers/inputs.js +0 -50
  256. package/dist/schemas/Action.d.ts +0 -24
  257. package/dist/schemas/Action.d.ts.map +0 -1
  258. package/dist/schemas/Action.js +0 -40
  259. package/dist/schemas/App.d.ts +0 -57
  260. package/dist/schemas/App.d.ts.map +0 -1
  261. package/dist/schemas/App.js +0 -31
  262. package/dist/schemas/Auth.d.ts +0 -55
  263. package/dist/schemas/Auth.d.ts.map +0 -1
  264. package/dist/schemas/Auth.js +0 -33
  265. package/dist/schemas/Field.d.ts +0 -61
  266. package/dist/schemas/Field.d.ts.map +0 -1
  267. package/dist/schemas/Field.js +0 -116
  268. package/dist/schemas/Run.d.ts +0 -3
  269. package/dist/schemas/Run.d.ts.map +0 -1
  270. package/dist/schemas/Run.js +0 -31
  271. package/dist/schemas/UserProfile.d.ts +0 -13
  272. package/dist/schemas/UserProfile.d.ts.map +0 -1
  273. package/dist/schemas/UserProfile.js +0 -32
  274. package/dist/sdk.d.ts +0 -146
  275. package/dist/sdk.d.ts.map +0 -1
  276. package/dist/sdk.js +0 -112
  277. package/dist/sdk.test.d.ts +0 -2
  278. package/dist/sdk.test.d.ts.map +0 -1
  279. package/dist/sdk.test.js +0 -255
  280. package/dist/services/implementations.d.ts +0 -63
  281. package/dist/services/implementations.d.ts.map +0 -1
  282. package/dist/services/implementations.js +0 -80
  283. package/dist/temporary-internal-core/handlers/listApps.d.ts +0 -67
  284. package/dist/temporary-internal-core/handlers/listApps.d.ts.map +0 -1
  285. package/dist/temporary-internal-core/handlers/listApps.js +0 -134
  286. package/dist/temporary-internal-core/handlers/listApps.test.d.ts +0 -2
  287. package/dist/temporary-internal-core/handlers/listApps.test.d.ts.map +0 -1
  288. package/dist/temporary-internal-core/handlers/listApps.test.js +0 -367
  289. package/dist/temporary-internal-core/index.d.ts +0 -18
  290. package/dist/temporary-internal-core/index.d.ts.map +0 -1
  291. package/dist/temporary-internal-core/index.js +0 -18
  292. package/dist/temporary-internal-core/schemas/apps/index.d.ts +0 -175
  293. package/dist/temporary-internal-core/schemas/apps/index.d.ts.map +0 -1
  294. package/dist/temporary-internal-core/schemas/apps/index.js +0 -97
  295. package/dist/temporary-internal-core/schemas/errors/index.d.ts +0 -139
  296. package/dist/temporary-internal-core/schemas/errors/index.d.ts.map +0 -1
  297. package/dist/temporary-internal-core/schemas/errors/index.js +0 -129
  298. package/dist/temporary-internal-core/schemas/implementations/index.d.ts +0 -127
  299. package/dist/temporary-internal-core/schemas/implementations/index.d.ts.map +0 -1
  300. package/dist/temporary-internal-core/schemas/implementations/index.js +0 -79
  301. package/dist/temporary-internal-core/types/handler.d.ts +0 -51
  302. package/dist/temporary-internal-core/types/handler.d.ts.map +0 -1
  303. package/dist/temporary-internal-core/types/handler.js +0 -8
  304. package/dist/temporary-internal-core/types/index.d.ts +0 -5
  305. package/dist/temporary-internal-core/types/index.d.ts.map +0 -1
  306. package/dist/temporary-internal-core/types/index.js +0 -4
  307. package/dist/temporary-internal-core/utils/app-locators.d.ts +0 -34
  308. package/dist/temporary-internal-core/utils/app-locators.d.ts.map +0 -1
  309. package/dist/temporary-internal-core/utils/app-locators.js +0 -39
  310. package/dist/temporary-internal-core/utils/string-utils.d.ts +0 -28
  311. package/dist/temporary-internal-core/utils/string-utils.d.ts.map +0 -1
  312. package/dist/temporary-internal-core/utils/string-utils.js +0 -52
  313. package/dist/temporary-internal-core/utils/transformations.d.ts +0 -18
  314. package/dist/temporary-internal-core/utils/transformations.d.ts.map +0 -1
  315. package/dist/temporary-internal-core/utils/transformations.js +0 -36
  316. package/dist/types/domain.d.ts +0 -52
  317. package/dist/types/domain.d.ts.map +0 -1
  318. package/dist/types/domain.js +0 -1
  319. package/dist/types/domain.test.d.ts +0 -2
  320. package/dist/types/domain.test.d.ts.map +0 -1
  321. package/dist/types/domain.test.js +0 -39
  322. package/dist/types/errors.d.ts +0 -143
  323. package/dist/types/errors.d.ts.map +0 -1
  324. package/dist/types/errors.js +0 -187
  325. package/dist/types/events.d.ts +0 -38
  326. package/dist/types/events.d.ts.map +0 -1
  327. package/dist/types/events.js +0 -7
  328. package/dist/types/functions.d.ts +0 -27
  329. package/dist/types/functions.d.ts.map +0 -1
  330. package/dist/types/functions.js +0 -1
  331. package/dist/types/plugin.d.ts +0 -75
  332. package/dist/types/plugin.d.ts.map +0 -1
  333. package/dist/types/plugin.js +0 -9
  334. package/dist/types/properties.d.ts +0 -33
  335. package/dist/types/properties.d.ts.map +0 -1
  336. package/dist/types/properties.js +0 -52
  337. package/dist/types/sdk.d.ts +0 -69
  338. package/dist/types/sdk.d.ts.map +0 -1
  339. package/dist/types/sdk.js +0 -4
  340. package/dist/types/telemetry-events.d.ts +0 -105
  341. package/dist/types/telemetry-events.d.ts.map +0 -1
  342. package/dist/types/telemetry-events.js +0 -8
  343. package/dist/utils/array-utils.d.ts +0 -31
  344. package/dist/utils/array-utils.d.ts.map +0 -1
  345. package/dist/utils/array-utils.js +0 -36
  346. package/dist/utils/array-utils.test.d.ts +0 -2
  347. package/dist/utils/array-utils.test.d.ts.map +0 -1
  348. package/dist/utils/array-utils.test.js +0 -107
  349. package/dist/utils/batch-utils.d.ts +0 -72
  350. package/dist/utils/batch-utils.d.ts.map +0 -1
  351. package/dist/utils/batch-utils.js +0 -162
  352. package/dist/utils/batch-utils.test.d.ts +0 -2
  353. package/dist/utils/batch-utils.test.d.ts.map +0 -1
  354. package/dist/utils/batch-utils.test.js +0 -476
  355. package/dist/utils/domain-utils.d.ts +0 -66
  356. package/dist/utils/domain-utils.d.ts.map +0 -1
  357. package/dist/utils/domain-utils.js +0 -164
  358. package/dist/utils/domain-utils.test.d.ts +0 -2
  359. package/dist/utils/domain-utils.test.d.ts.map +0 -1
  360. package/dist/utils/domain-utils.test.js +0 -346
  361. package/dist/utils/file-utils.d.ts +0 -4
  362. package/dist/utils/file-utils.d.ts.map +0 -1
  363. package/dist/utils/file-utils.js +0 -74
  364. package/dist/utils/file-utils.test.d.ts +0 -2
  365. package/dist/utils/file-utils.test.d.ts.map +0 -1
  366. package/dist/utils/file-utils.test.js +0 -51
  367. package/dist/utils/function-utils.d.ts +0 -73
  368. package/dist/utils/function-utils.d.ts.map +0 -1
  369. package/dist/utils/function-utils.js +0 -245
  370. package/dist/utils/function-utils.test.d.ts +0 -2
  371. package/dist/utils/function-utils.test.d.ts.map +0 -1
  372. package/dist/utils/function-utils.test.js +0 -110
  373. package/dist/utils/id-utils.d.ts +0 -13
  374. package/dist/utils/id-utils.d.ts.map +0 -1
  375. package/dist/utils/id-utils.js +0 -22
  376. package/dist/utils/id-utils.test.d.ts +0 -2
  377. package/dist/utils/id-utils.test.d.ts.map +0 -1
  378. package/dist/utils/id-utils.test.js +0 -22
  379. package/dist/utils/pagination-utils.d.ts +0 -37
  380. package/dist/utils/pagination-utils.d.ts.map +0 -1
  381. package/dist/utils/pagination-utils.js +0 -165
  382. package/dist/utils/pagination-utils.test.d.ts +0 -17
  383. package/dist/utils/pagination-utils.test.d.ts.map +0 -1
  384. package/dist/utils/pagination-utils.test.js +0 -461
  385. package/dist/utils/retry-utils.d.ts +0 -45
  386. package/dist/utils/retry-utils.d.ts.map +0 -1
  387. package/dist/utils/retry-utils.js +0 -51
  388. package/dist/utils/retry-utils.test.d.ts +0 -2
  389. package/dist/utils/retry-utils.test.d.ts.map +0 -1
  390. package/dist/utils/retry-utils.test.js +0 -90
  391. package/dist/utils/schema-utils.d.ts +0 -69
  392. package/dist/utils/schema-utils.d.ts.map +0 -1
  393. package/dist/utils/schema-utils.js +0 -72
  394. package/dist/utils/string-utils.d.ts +0 -40
  395. package/dist/utils/string-utils.d.ts.map +0 -1
  396. package/dist/utils/string-utils.js +0 -69
  397. package/dist/utils/string-utils.test.d.ts +0 -2
  398. package/dist/utils/string-utils.test.d.ts.map +0 -1
  399. package/dist/utils/string-utils.test.js +0 -59
  400. package/dist/utils/telemetry-utils.d.ts +0 -44
  401. package/dist/utils/telemetry-utils.d.ts.map +0 -1
  402. package/dist/utils/telemetry-utils.js +0 -55
  403. package/dist/utils/telemetry-utils.test.d.ts +0 -2
  404. package/dist/utils/telemetry-utils.test.d.ts.map +0 -1
  405. package/dist/utils/telemetry-utils.test.js +0 -94
  406. package/dist/utils/url-utils.d.ts +0 -19
  407. package/dist/utils/url-utils.d.ts.map +0 -1
  408. package/dist/utils/url-utils.js +0 -62
  409. package/dist/utils/url-utils.test.d.ts +0 -2
  410. package/dist/utils/url-utils.test.d.ts.map +0 -1
  411. package/dist/utils/url-utils.test.js +0 -103
  412. package/dist/utils/validation.d.ts +0 -4
  413. package/dist/utils/validation.d.ts.map +0 -1
  414. package/dist/utils/validation.js +0 -30
  415. package/dist/utils/validation.test.d.ts +0 -2
  416. package/dist/utils/validation.test.d.ts.map +0 -1
  417. package/dist/utils/validation.test.js +0 -44
@@ -1,8 +0,0 @@
1
- /**
2
- * Event emission types matching Avro schemas for SDK telemetry
3
- *
4
- * These interfaces correspond to the Avro schemas:
5
- * - application_lifecycle_event.avsc
6
- * - error_occurred_event.avsc
7
- */
8
- export {};
@@ -1,31 +0,0 @@
1
- /**
2
- * Array utility functions for working with async iterators and arrays
3
- */
4
- /**
5
- * Creates an array from an async iterable, similar to Array.from() but for async iterables
6
- *
7
- * @param asyncIterable - An async iterable to convert to an array
8
- * @returns Promise that resolves to an array containing all items from the async iterable
9
- *
10
- * @example
11
- * async function* generateNumbers() {
12
- * yield 1;
13
- * yield 2;
14
- * yield 3;
15
- * }
16
- *
17
- * const numbers = await fromAsync(generateNumbers()); // [1, 2, 3]
18
- *
19
- * @example
20
- * // With async generator that fetches data
21
- * async function* fetchUsers() {
22
- * for (let page = 1; page <= 3; page++) {
23
- * const users = await fetchUsersPage(page);
24
- * yield* users;
25
- * }
26
- * }
27
- *
28
- * const allUsers = await fromAsync(fetchUsers());
29
- */
30
- export declare function toArrayFromAsync<T>(asyncIterable: AsyncIterable<T>): Promise<T[]>;
31
- //# sourceMappingURL=array-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array-utils.d.ts","sourceRoot":"","sources":["../../src/utils/array-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,CAAC,EAAE,CAAC,CAQd"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Array utility functions for working with async iterators and arrays
3
- */
4
- /**
5
- * Creates an array from an async iterable, similar to Array.from() but for async iterables
6
- *
7
- * @param asyncIterable - An async iterable to convert to an array
8
- * @returns Promise that resolves to an array containing all items from the async iterable
9
- *
10
- * @example
11
- * async function* generateNumbers() {
12
- * yield 1;
13
- * yield 2;
14
- * yield 3;
15
- * }
16
- *
17
- * const numbers = await fromAsync(generateNumbers()); // [1, 2, 3]
18
- *
19
- * @example
20
- * // With async generator that fetches data
21
- * async function* fetchUsers() {
22
- * for (let page = 1; page <= 3; page++) {
23
- * const users = await fetchUsersPage(page);
24
- * yield* users;
25
- * }
26
- * }
27
- *
28
- * const allUsers = await fromAsync(fetchUsers());
29
- */
30
- export async function toArrayFromAsync(asyncIterable) {
31
- const result = [];
32
- for await (const item of asyncIterable) {
33
- result.push(item);
34
- }
35
- return result;
36
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=array-utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array-utils.test.d.ts","sourceRoot":"","sources":["../../src/utils/array-utils.test.ts"],"names":[],"mappings":""}
@@ -1,107 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { toArrayFromAsync } from "./array-utils";
3
- describe("array-utils", () => {
4
- describe("fromAsync", () => {
5
- it("should convert async generator to array", async () => {
6
- async function* generateNumbers() {
7
- yield 1;
8
- yield 2;
9
- yield 3;
10
- }
11
- const result = await toArrayFromAsync(generateNumbers());
12
- expect(result).toEqual([1, 2, 3]);
13
- });
14
- it("should handle empty async generator", async () => {
15
- async function* generateNothing() {
16
- // yield nothing
17
- }
18
- const result = await toArrayFromAsync(generateNothing());
19
- expect(result).toEqual([]);
20
- });
21
- it("should handle async generator with async operations", async () => {
22
- async function* generateWithDelay() {
23
- for (let i = 1; i <= 3; i++) {
24
- await new Promise((resolve) => setTimeout(resolve, 1)); // Small delay
25
- yield i * 10;
26
- }
27
- }
28
- const result = await toArrayFromAsync(generateWithDelay());
29
- expect(result).toEqual([10, 20, 30]);
30
- });
31
- it("should handle async generator that yields different types", async () => {
32
- async function* generateMixed() {
33
- yield "hello";
34
- yield 42;
35
- yield { name: "test" };
36
- yield [1, 2, 3];
37
- }
38
- const result = await toArrayFromAsync(generateMixed());
39
- expect(result).toEqual(["hello", 42, { name: "test" }, [1, 2, 3]]);
40
- });
41
- it("should handle async generator with error", async () => {
42
- async function* generateWithError() {
43
- yield 1;
44
- yield 2;
45
- throw new Error("Test error");
46
- }
47
- await expect(toArrayFromAsync(generateWithError())).rejects.toThrow("Test error");
48
- });
49
- it("should handle async iterable from array with Symbol.asyncIterator", async () => {
50
- const asyncIterable = {
51
- async *[Symbol.asyncIterator]() {
52
- for (const item of ["a", "b", "c"]) {
53
- yield item;
54
- }
55
- },
56
- };
57
- const result = await toArrayFromAsync(asyncIterable);
58
- expect(result).toEqual(["a", "b", "c"]);
59
- });
60
- it("should handle large async generator efficiently", async () => {
61
- async function* generateLargeSequence() {
62
- for (let i = 0; i < 1000; i++) {
63
- yield i;
64
- }
65
- }
66
- const result = await toArrayFromAsync(generateLargeSequence());
67
- expect(result).toHaveLength(1000);
68
- expect(result[0]).toBe(0);
69
- expect(result[999]).toBe(999);
70
- });
71
- it("should handle async generator that yields promises (promises are auto-awaited)", async () => {
72
- async function* generatePromises() {
73
- yield Promise.resolve("first");
74
- yield Promise.resolve("second");
75
- }
76
- const result = await toArrayFromAsync(generatePromises());
77
- // for await automatically awaits promises, so we get resolved values
78
- expect(result).toEqual(["first", "second"]);
79
- });
80
- it("should handle async generator that yields already resolved values", async () => {
81
- async function* generateResolvedValues() {
82
- yield await Promise.resolve("first");
83
- yield await Promise.resolve("second");
84
- }
85
- const result = await toArrayFromAsync(generateResolvedValues());
86
- // The resolved values are yielded directly
87
- expect(result).toEqual(["first", "second"]);
88
- });
89
- it("should maintain order of async generator items", async () => {
90
- async function* generateInOrder() {
91
- for (let i = 1; i <= 5; i++) {
92
- // Simulate varying delays
93
- await new Promise((resolve) => setTimeout(resolve, Math.random() * 10));
94
- yield `item-${i}`;
95
- }
96
- }
97
- const result = await toArrayFromAsync(generateInOrder());
98
- expect(result).toEqual([
99
- "item-1",
100
- "item-2",
101
- "item-3",
102
- "item-4",
103
- "item-5",
104
- ]);
105
- });
106
- });
107
- });
@@ -1,72 +0,0 @@
1
- /**
2
- * Batch Operation Utilities
3
- *
4
- * This module provides utilities for executing multiple async operations
5
- * with concurrency control and retry logic.
6
- */
7
- /**
8
- * Options for batch execution
9
- */
10
- export interface BatchOptions {
11
- /**
12
- * Maximum number of concurrent operations (default: 10)
13
- * Lower values are more "polite" but slower
14
- * Higher values are faster but risk rate limits
15
- */
16
- concurrency?: number;
17
- /**
18
- * Whether to retry failed operations (default: true)
19
- * When enabled, each operation gets up to MAX_CONSECUTIVE_ERRORS retries
20
- */
21
- retry?: boolean;
22
- /**
23
- * Delay in milliseconds between starting batches (default: 100ms)
24
- * Adds a small delay between concurrent batches to avoid burst patterns
25
- */
26
- batchDelay?: number;
27
- /**
28
- * Overall timeout for the entire batch operation in milliseconds (default: 180000ms / 3 minutes)
29
- * When exceeded, throws ZapierTimeoutError and stops processing remaining tasks
30
- */
31
- timeoutMs?: number;
32
- /**
33
- * Timeout for individual tasks in milliseconds (default: none)
34
- * When set, each task will be cancelled if it exceeds this duration
35
- * Tasks that timeout will be marked as rejected in the results
36
- */
37
- taskTimeoutMs?: number;
38
- }
39
- /**
40
- * Execute multiple async operations with concurrency limiting and retry logic
41
- *
42
- * This prevents overwhelming APIs by:
43
- * 1. Limiting concurrent operations (worker pool pattern)
44
- * 2. Adding small delays between batches to avoid burst detection
45
- * 3. Retrying failed operations with exponential backoff
46
- *
47
- * Problem Solved:
48
- * - Rate limit prevention: Steady stream instead of burst requests
49
- * - Connection pool management: Stays within browser/Node limits (~6-8 per domain)
50
- * - Resilience: Transient failures are retried automatically
51
- * - Observability: Returns detailed success/failure info for each operation
52
- *
53
- * Example Usage:
54
- * ```typescript
55
- * // Instead of Promise.allSettled (fires all at once):
56
- * const results = await Promise.allSettled(
57
- * actions.map(a => sdk.listInputFields(a))
58
- * );
59
- *
60
- * // Use batch (controlled concurrency):
61
- * const results = await batch(
62
- * actions.map(a => () => sdk.listInputFields(a)),
63
- * { concurrency: 10, retry: true }
64
- * );
65
- * ```
66
- *
67
- * @param tasks - Array of functions that return promises (NOT promises themselves!)
68
- * @param options - Configuration for concurrency and retry behavior
69
- * @returns Promise resolving to array of settled results (same as Promise.allSettled)
70
- */
71
- export declare function batch<T>(tasks: (() => Promise<T>)[], options?: BatchOptions): Promise<PromiseSettledResult<T>[]>;
72
- //# sourceMappingURL=batch-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"batch-utils.d.ts","sourceRoot":"","sources":["../../src/utils/batch-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwBH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,KAAK,CAAC,CAAC,EAC3B,KAAK,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAC3B,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,CAuIpC"}
@@ -1,162 +0,0 @@
1
- /**
2
- * Batch Operation Utilities
3
- *
4
- * This module provides utilities for executing multiple async operations
5
- * with concurrency control and retry logic.
6
- */
7
- import { setTimeout } from "timers/promises";
8
- import { calculateWaitTime, MAX_CONSECUTIVE_ERRORS } from "./retry-utils";
9
- import { ZapierTimeoutError } from "../types/errors";
10
- /**
11
- * Default number of concurrent operations
12
- * Chosen to be "polite" to APIs while still providing good throughput
13
- */
14
- const DEFAULT_CONCURRENCY = 10;
15
- /**
16
- * Delay between starting each batch of concurrent operations (milliseconds)
17
- * This prevents burst patterns that might trigger rate limiting
18
- */
19
- const BATCH_START_DELAY_MS = 25;
20
- /**
21
- * Default timeout for entire batch operation (milliseconds)
22
- * Set to 3 minutes to match polling default timeout
23
- */
24
- const DEFAULT_BATCH_TIMEOUT_MS = 180000;
25
- /**
26
- * Execute multiple async operations with concurrency limiting and retry logic
27
- *
28
- * This prevents overwhelming APIs by:
29
- * 1. Limiting concurrent operations (worker pool pattern)
30
- * 2. Adding small delays between batches to avoid burst detection
31
- * 3. Retrying failed operations with exponential backoff
32
- *
33
- * Problem Solved:
34
- * - Rate limit prevention: Steady stream instead of burst requests
35
- * - Connection pool management: Stays within browser/Node limits (~6-8 per domain)
36
- * - Resilience: Transient failures are retried automatically
37
- * - Observability: Returns detailed success/failure info for each operation
38
- *
39
- * Example Usage:
40
- * ```typescript
41
- * // Instead of Promise.allSettled (fires all at once):
42
- * const results = await Promise.allSettled(
43
- * actions.map(a => sdk.listInputFields(a))
44
- * );
45
- *
46
- * // Use batch (controlled concurrency):
47
- * const results = await batch(
48
- * actions.map(a => () => sdk.listInputFields(a)),
49
- * { concurrency: 10, retry: true }
50
- * );
51
- * ```
52
- *
53
- * @param tasks - Array of functions that return promises (NOT promises themselves!)
54
- * @param options - Configuration for concurrency and retry behavior
55
- * @returns Promise resolving to array of settled results (same as Promise.allSettled)
56
- */
57
- export async function batch(tasks, options = {}) {
58
- const { concurrency = DEFAULT_CONCURRENCY, retry = true, batchDelay = BATCH_START_DELAY_MS, timeoutMs = DEFAULT_BATCH_TIMEOUT_MS, taskTimeoutMs, } = options;
59
- // Validate inputs
60
- if (concurrency <= 0) {
61
- throw new Error("Concurrency must be greater than 0");
62
- }
63
- if (timeoutMs <= 0) {
64
- throw new Error("Timeout must be greater than 0");
65
- }
66
- if (taskTimeoutMs !== undefined && taskTimeoutMs <= 0) {
67
- throw new Error("Task timeout must be greater than 0");
68
- }
69
- if (tasks.length === 0) {
70
- return [];
71
- }
72
- // Track overall batch timing
73
- const startTime = Date.now();
74
- // Pre-allocate results array to maintain input order
75
- const results = new Array(tasks.length);
76
- // Create task queue with retry state
77
- const taskQueue = tasks.map((task, index) => ({
78
- index,
79
- task,
80
- errorCount: 0,
81
- }));
82
- /**
83
- * Execute a single task with retry logic and optional per-task timeout
84
- */
85
- async function executeTask(taskState) {
86
- const { index, task, errorCount } = taskState;
87
- try {
88
- let result;
89
- // Apply per-task timeout if specified
90
- if (taskTimeoutMs !== undefined) {
91
- const timeoutPromise = setTimeout(taskTimeoutMs).then(() => {
92
- throw new ZapierTimeoutError(`Task timed out after ${taskTimeoutMs}ms`);
93
- });
94
- result = await Promise.race([task(), timeoutPromise]);
95
- }
96
- else {
97
- result = await task();
98
- }
99
- results[index] = { status: "fulfilled", value: result };
100
- }
101
- catch (error) {
102
- const newErrorCount = errorCount + 1;
103
- // Don't retry timeout errors - they're unlikely to succeed on retry
104
- const isTimeout = error instanceof ZapierTimeoutError;
105
- // If retry is enabled and we haven't hit max errors and it's not a timeout, retry with backoff
106
- if (retry && !isTimeout && newErrorCount < MAX_CONSECUTIVE_ERRORS) {
107
- // Calculate backoff delay (base 1000ms with jitter and error scaling)
108
- const waitTime = calculateWaitTime(1000, newErrorCount);
109
- await setTimeout(waitTime);
110
- // Re-queue the task with incremented error count
111
- taskQueue.push({
112
- index,
113
- task,
114
- errorCount: newErrorCount,
115
- });
116
- }
117
- else {
118
- // Max retries reached, retry disabled, or timeout error - mark as rejected
119
- results[index] = { status: "rejected", reason: error };
120
- }
121
- }
122
- }
123
- /**
124
- * Worker that continuously picks up and executes tasks from the queue
125
- * Checks overall batch timeout before processing each task
126
- */
127
- async function worker() {
128
- while (taskQueue.length > 0) {
129
- // Check overall batch timeout before processing next task
130
- const elapsedTime = Date.now() - startTime;
131
- if (elapsedTime >= timeoutMs) {
132
- throw new ZapierTimeoutError(`Batch operation timed out after ${Math.floor(elapsedTime / 1000)}s. ${taskQueue.length} task(s) not completed.`);
133
- }
134
- const taskState = taskQueue.shift();
135
- if (!taskState)
136
- break;
137
- await executeTask(taskState);
138
- // Small delay to prevent burst patterns within a worker
139
- // Only delay if there are more tasks to process
140
- if (taskQueue.length > 0 && batchDelay > 0) {
141
- await setTimeout(batchDelay);
142
- }
143
- }
144
- }
145
- /**
146
- * Start workers in small batches to avoid initial burst
147
- * This helps avoid rate limit triggers when starting many workers
148
- */
149
- const workerCount = Math.min(concurrency, tasks.length);
150
- const workers = [];
151
- for (let i = 0; i < workerCount; i++) {
152
- workers.push(worker());
153
- // Add small delay between starting workers to stagger the initial requests
154
- // Skip delay for last worker
155
- if (i < workerCount - 1 && batchDelay > 0) {
156
- await setTimeout(batchDelay / 10); // 10ms between worker starts
157
- }
158
- }
159
- // Wait for all workers to complete
160
- await Promise.all(workers);
161
- return results;
162
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=batch-utils.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"batch-utils.test.d.ts","sourceRoot":"","sources":["../../src/utils/batch-utils.test.ts"],"names":[],"mappings":""}