@zapier/zapier-sdk 0.77.1 → 0.78.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 (800) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/experimental.cjs +1057 -178
  3. package/dist/experimental.d.mts +22 -39
  4. package/dist/experimental.d.ts +932 -964
  5. package/dist/experimental.mjs +1049 -179
  6. package/dist/{index-BZShISEr.d.mts → index-BgbftweS.d.mts} +4771 -3841
  7. package/dist/{index-BZShISEr.d.ts → index-BgbftweS.d.ts} +4771 -3841
  8. package/dist/index.cjs +2489 -1617
  9. package/dist/index.d.mts +1 -2
  10. package/dist/index.d.ts +6 -81
  11. package/dist/index.mjs +2481 -1618
  12. package/package.json +2 -2
  13. package/dist/api/approval-review-stream.d.ts +0 -25
  14. package/dist/api/approval-review-stream.d.ts.map +0 -1
  15. package/dist/api/approval-review-stream.js +0 -104
  16. package/dist/api/auth.d.ts +0 -14
  17. package/dist/api/auth.d.ts.map +0 -1
  18. package/dist/api/auth.js +0 -77
  19. package/dist/api/client.d.ts +0 -9
  20. package/dist/api/client.d.ts.map +0 -1
  21. package/dist/api/client.js +0 -1232
  22. package/dist/api/concurrency.d.ts +0 -28
  23. package/dist/api/concurrency.d.ts.map +0 -1
  24. package/dist/api/concurrency.js +0 -90
  25. package/dist/api/debug.d.ts +0 -14
  26. package/dist/api/debug.d.ts.map +0 -1
  27. package/dist/api/debug.js +0 -133
  28. package/dist/api/error-classification.d.ts +0 -19
  29. package/dist/api/error-classification.d.ts.map +0 -1
  30. package/dist/api/error-classification.js +0 -31
  31. package/dist/api/index.d.ts +0 -33
  32. package/dist/api/index.d.ts.map +0 -1
  33. package/dist/api/index.js +0 -44
  34. package/dist/api/polling.d.ts +0 -64
  35. package/dist/api/polling.d.ts.map +0 -1
  36. package/dist/api/polling.js +0 -180
  37. package/dist/api/schemas.d.ts +0 -423
  38. package/dist/api/schemas.d.ts.map +0 -1
  39. package/dist/api/schemas.js +0 -323
  40. package/dist/api/sse-parser.d.ts +0 -51
  41. package/dist/api/sse-parser.d.ts.map +0 -1
  42. package/dist/api/sse-parser.js +0 -95
  43. package/dist/api/types.d.ts +0 -215
  44. package/dist/api/types.d.ts.map +0 -1
  45. package/dist/api/types.js +0 -1
  46. package/dist/auth.d.ts +0 -149
  47. package/dist/auth.d.ts.map +0 -1
  48. package/dist/auth.js +0 -526
  49. package/dist/cache.d.ts +0 -50
  50. package/dist/cache.d.ts.map +0 -1
  51. package/dist/cache.js +0 -47
  52. package/dist/constants.d.ts +0 -84
  53. package/dist/constants.d.ts.map +0 -1
  54. package/dist/constants.js +0 -122
  55. package/dist/core-stack.d.ts +0 -24
  56. package/dist/core-stack.d.ts.map +0 -1
  57. package/dist/core-stack.js +0 -32
  58. package/dist/credentials.d.ts +0 -57
  59. package/dist/credentials.d.ts.map +0 -1
  60. package/dist/credentials.js +0 -184
  61. package/dist/define/apps-entrypoint.d.ts +0 -3
  62. package/dist/define/apps-entrypoint.d.ts.map +0 -1
  63. package/dist/define/apps-entrypoint.js +0 -1
  64. package/dist/define/apps-registry-keys.d.ts +0 -2
  65. package/dist/define/apps-registry-keys.d.ts.map +0 -1
  66. package/dist/define/apps-registry-keys.js +0 -2
  67. package/dist/define/apps-registry.d.ts +0 -13
  68. package/dist/define/apps-registry.d.ts.map +0 -1
  69. package/dist/define/apps-registry.js +0 -31
  70. package/dist/define/apps-registry.json +0 -9010
  71. package/dist/define/apps.d.ts +0 -11
  72. package/dist/define/apps.d.ts.map +0 -1
  73. package/dist/define/apps.js +0 -2
  74. package/dist/define/define.d.ts +0 -13
  75. package/dist/define/define.d.ts.map +0 -1
  76. package/dist/define/define.js +0 -93
  77. package/dist/define/helpers.d.ts +0 -8
  78. package/dist/define/helpers.d.ts.map +0 -1
  79. package/dist/define/helpers.js +0 -6
  80. package/dist/define/index.d.ts +0 -5
  81. package/dist/define/index.d.ts.map +0 -1
  82. package/dist/define/index.js +0 -2
  83. package/dist/define/types.d.ts +0 -246
  84. package/dist/define/types.d.ts.map +0 -1
  85. package/dist/define/types.js +0 -1
  86. package/dist/experimental.d.ts.map +0 -1
  87. package/dist/experimental.js +0 -232
  88. package/dist/formatters/action.d.ts +0 -4
  89. package/dist/formatters/action.d.ts.map +0 -1
  90. package/dist/formatters/action.js +0 -18
  91. package/dist/formatters/actionResult.d.ts +0 -3
  92. package/dist/formatters/actionResult.d.ts.map +0 -1
  93. package/dist/formatters/actionResult.js +0 -25
  94. package/dist/formatters/app.d.ts +0 -4
  95. package/dist/formatters/app.d.ts.map +0 -1
  96. package/dist/formatters/app.js +0 -10
  97. package/dist/formatters/clientCredentials.d.ts +0 -5
  98. package/dist/formatters/clientCredentials.d.ts.map +0 -1
  99. package/dist/formatters/clientCredentials.js +0 -27
  100. package/dist/formatters/connection.d.ts +0 -4
  101. package/dist/formatters/connection.d.ts.map +0 -1
  102. package/dist/formatters/connection.js +0 -26
  103. package/dist/formatters/field.d.ts +0 -4
  104. package/dist/formatters/field.d.ts.map +0 -1
  105. package/dist/formatters/field.js +0 -51
  106. package/dist/formatters/index.d.ts +0 -2
  107. package/dist/formatters/index.d.ts.map +0 -1
  108. package/dist/formatters/index.js +0 -1
  109. package/dist/formatters/inputFieldChoice.d.ts +0 -4
  110. package/dist/formatters/inputFieldChoice.d.ts.map +0 -1
  111. package/dist/formatters/inputFieldChoice.js +0 -16
  112. package/dist/formatters/tableField.d.ts +0 -4
  113. package/dist/formatters/tableField.d.ts.map +0 -1
  114. package/dist/formatters/tableField.js +0 -7
  115. package/dist/formatters/tableRecord.d.ts +0 -8
  116. package/dist/formatters/tableRecord.d.ts.map +0 -1
  117. package/dist/formatters/tableRecord.js +0 -24
  118. package/dist/formatters/triggerInbox.d.ts +0 -4
  119. package/dist/formatters/triggerInbox.d.ts.map +0 -1
  120. package/dist/formatters/triggerInbox.js +0 -31
  121. package/dist/formatters/triggerMessage.d.ts +0 -5
  122. package/dist/formatters/triggerMessage.d.ts.map +0 -1
  123. package/dist/formatters/triggerMessage.js +0 -34
  124. package/dist/formatters/userProfile.d.ts +0 -4
  125. package/dist/formatters/userProfile.d.ts.map +0 -1
  126. package/dist/formatters/userProfile.js +0 -19
  127. package/dist/index.d.ts.map +0 -1
  128. package/dist/index.js +0 -94
  129. package/dist/plugins/api/index.d.ts +0 -30
  130. package/dist/plugins/api/index.d.ts.map +0 -1
  131. package/dist/plugins/api/index.js +0 -35
  132. package/dist/plugins/apps/index.d.ts +0 -118
  133. package/dist/plugins/apps/index.d.ts.map +0 -1
  134. package/dist/plugins/apps/index.js +0 -156
  135. package/dist/plugins/apps/schemas.d.ts +0 -50
  136. package/dist/plugins/apps/schemas.d.ts.map +0 -1
  137. package/dist/plugins/apps/schemas.js +0 -37
  138. package/dist/plugins/capabilities/index.d.ts +0 -27
  139. package/dist/plugins/capabilities/index.d.ts.map +0 -1
  140. package/dist/plugins/capabilities/index.js +0 -75
  141. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +0 -70
  142. package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +0 -1
  143. package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +0 -28
  144. package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.d.ts +0 -11
  145. package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.d.ts.map +0 -1
  146. package/dist/plugins/codeSubstrate/cancelDurableRun/schemas.js +0 -12
  147. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +0 -49
  148. package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +0 -1
  149. package/dist/plugins/codeSubstrate/createWorkflow/index.js +0 -24
  150. package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +0 -20
  151. package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +0 -1
  152. package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +0 -42
  153. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +0 -75
  154. package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +0 -1
  155. package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +0 -28
  156. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +0 -10
  157. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +0 -1
  158. package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +0 -13
  159. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +0 -76
  160. package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +0 -1
  161. package/dist/plugins/codeSubstrate/disableWorkflow/index.js +0 -21
  162. package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts +0 -11
  163. package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts.map +0 -1
  164. package/dist/plugins/codeSubstrate/disableWorkflow/schemas.js +0 -12
  165. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +0 -76
  166. package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +0 -1
  167. package/dist/plugins/codeSubstrate/enableWorkflow/index.js +0 -21
  168. package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts +0 -11
  169. package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts.map +0 -1
  170. package/dist/plugins/codeSubstrate/enableWorkflow/schemas.js +0 -12
  171. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +0 -119
  172. package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +0 -1
  173. package/dist/plugins/codeSubstrate/getDurableRun/index.js +0 -21
  174. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +0 -178
  175. package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +0 -1
  176. package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +0 -126
  177. package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts +0 -47
  178. package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts.map +0 -1
  179. package/dist/plugins/codeSubstrate/getTriggerRun/index.js +0 -23
  180. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts +0 -24
  181. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts.map +0 -1
  182. package/dist/plugins/codeSubstrate/getTriggerRun/schemas.js +0 -30
  183. package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +0 -114
  184. package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +0 -1
  185. package/dist/plugins/codeSubstrate/getWorkflow/index.js +0 -21
  186. package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts +0 -81
  187. package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts.map +0 -1
  188. package/dist/plugins/codeSubstrate/getWorkflow/schemas.js +0 -71
  189. package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +0 -112
  190. package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +0 -1
  191. package/dist/plugins/codeSubstrate/getWorkflowRun/index.js +0 -25
  192. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts +0 -26
  193. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts.map +0 -1
  194. package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.js +0 -43
  195. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +0 -132
  196. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +0 -1
  197. package/dist/plugins/codeSubstrate/getWorkflowVersion/index.js +0 -25
  198. package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts +0 -30
  199. package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts.map +0 -1
  200. package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.js +0 -35
  201. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +0 -55
  202. package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +0 -1
  203. package/dist/plugins/codeSubstrate/listDurableRuns/index.js +0 -31
  204. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +0 -73
  205. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts.map +0 -1
  206. package/dist/plugins/codeSubstrate/listDurableRuns/schemas.js +0 -58
  207. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +0 -88
  208. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +0 -1
  209. package/dist/plugins/codeSubstrate/listWorkflowRuns/index.js +0 -34
  210. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts +0 -63
  211. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts.map +0 -1
  212. package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.js +0 -69
  213. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +0 -98
  214. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +0 -1
  215. package/dist/plugins/codeSubstrate/listWorkflowVersions/index.js +0 -34
  216. package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts +0 -63
  217. package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts.map +0 -1
  218. package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.js +0 -58
  219. package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +0 -61
  220. package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +0 -1
  221. package/dist/plugins/codeSubstrate/listWorkflows/index.js +0 -28
  222. package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts +0 -86
  223. package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts.map +0 -1
  224. package/dist/plugins/codeSubstrate/listWorkflows/schemas.js +0 -79
  225. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +0 -150
  226. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +0 -1
  227. package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +0 -80
  228. package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +0 -158
  229. package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +0 -1
  230. package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +0 -124
  231. package/dist/plugins/codeSubstrate/runDurable/index.d.ts +0 -94
  232. package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +0 -1
  233. package/dist/plugins/codeSubstrate/runDurable/index.js +0 -41
  234. package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts +0 -149
  235. package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts.map +0 -1
  236. package/dist/plugins/codeSubstrate/runDurable/schemas.js +0 -95
  237. package/dist/plugins/codeSubstrate/shared-schemas.d.ts +0 -41
  238. package/dist/plugins/codeSubstrate/shared-schemas.d.ts.map +0 -1
  239. package/dist/plugins/codeSubstrate/shared-schemas.js +0 -83
  240. package/dist/plugins/codeSubstrate/shared.d.ts +0 -72
  241. package/dist/plugins/codeSubstrate/shared.d.ts.map +0 -1
  242. package/dist/plugins/codeSubstrate/shared.js +0 -115
  243. package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +0 -78
  244. package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +0 -1
  245. package/dist/plugins/codeSubstrate/triggerWorkflow/index.js +0 -40
  246. package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts +0 -16
  247. package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.d.ts.map +0 -1
  248. package/dist/plugins/codeSubstrate/triggerWorkflow/schemas.js +0 -26
  249. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +0 -85
  250. package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +0 -1
  251. package/dist/plugins/codeSubstrate/updateWorkflow/index.js +0 -28
  252. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +0 -20
  253. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +0 -1
  254. package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +0 -37
  255. package/dist/plugins/connections/index.d.ts +0 -19
  256. package/dist/plugins/connections/index.d.ts.map +0 -1
  257. package/dist/plugins/connections/index.js +0 -21
  258. package/dist/plugins/createClientCredentials/index.d.ts +0 -32
  259. package/dist/plugins/createClientCredentials/index.d.ts.map +0 -1
  260. package/dist/plugins/createClientCredentials/index.js +0 -29
  261. package/dist/plugins/createClientCredentials/schemas.d.ts +0 -18
  262. package/dist/plugins/createClientCredentials/schemas.d.ts.map +0 -1
  263. package/dist/plugins/createClientCredentials/schemas.js +0 -16
  264. package/dist/plugins/createConnection/index.d.ts +0 -189
  265. package/dist/plugins/createConnection/index.d.ts.map +0 -1
  266. package/dist/plugins/createConnection/index.js +0 -71
  267. package/dist/plugins/createConnection/schemas.d.ts +0 -21
  268. package/dist/plugins/createConnection/schemas.d.ts.map +0 -1
  269. package/dist/plugins/createConnection/schemas.js +0 -38
  270. package/dist/plugins/deleteClientCredentials/index.d.ts +0 -48
  271. package/dist/plugins/deleteClientCredentials/index.d.ts.map +0 -1
  272. package/dist/plugins/deleteClientCredentials/index.js +0 -21
  273. package/dist/plugins/deleteClientCredentials/schemas.d.ts +0 -12
  274. package/dist/plugins/deleteClientCredentials/schemas.d.ts.map +0 -1
  275. package/dist/plugins/deleteClientCredentials/schemas.js +0 -8
  276. package/dist/plugins/deprecated/authentications.d.ts +0 -763
  277. package/dist/plugins/deprecated/authentications.d.ts.map +0 -1
  278. package/dist/plugins/deprecated/authentications.js +0 -100
  279. package/dist/plugins/deprecated/inputFields.d.ts +0 -503
  280. package/dist/plugins/deprecated/inputFields.d.ts.map +0 -1
  281. package/dist/plugins/deprecated/inputFields.js +0 -81
  282. package/dist/plugins/eventEmission/builders.d.ts +0 -14
  283. package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
  284. package/dist/plugins/eventEmission/builders.js +0 -117
  285. package/dist/plugins/eventEmission/event-emission-hook.d.ts +0 -10
  286. package/dist/plugins/eventEmission/event-emission-hook.d.ts.map +0 -1
  287. package/dist/plugins/eventEmission/event-emission-hook.js +0 -47
  288. package/dist/plugins/eventEmission/index.d.ts +0 -50
  289. package/dist/plugins/eventEmission/index.d.ts.map +0 -1
  290. package/dist/plugins/eventEmission/index.js +0 -398
  291. package/dist/plugins/eventEmission/method-metadata.d.ts +0 -16
  292. package/dist/plugins/eventEmission/method-metadata.d.ts.map +0 -1
  293. package/dist/plugins/eventEmission/method-metadata.js +0 -20
  294. package/dist/plugins/eventEmission/transport.d.ts +0 -27
  295. package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
  296. package/dist/plugins/eventEmission/transport.js +0 -105
  297. package/dist/plugins/eventEmission/types.d.ts +0 -67
  298. package/dist/plugins/eventEmission/types.d.ts.map +0 -1
  299. package/dist/plugins/eventEmission/types.js +0 -1
  300. package/dist/plugins/eventEmission/utils.d.ts +0 -56
  301. package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
  302. package/dist/plugins/eventEmission/utils.js +0 -142
  303. package/dist/plugins/fetch/index.d.ts +0 -72
  304. package/dist/plugins/fetch/index.d.ts.map +0 -1
  305. package/dist/plugins/fetch/index.js +0 -238
  306. package/dist/plugins/fetch/schemas.d.ts +0 -28
  307. package/dist/plugins/fetch/schemas.d.ts.map +0 -1
  308. package/dist/plugins/fetch/schemas.js +0 -52
  309. package/dist/plugins/findFirstConnection/index.d.ts +0 -115
  310. package/dist/plugins/findFirstConnection/index.d.ts.map +0 -1
  311. package/dist/plugins/findFirstConnection/index.js +0 -25
  312. package/dist/plugins/findFirstConnection/schemas.d.ts +0 -25
  313. package/dist/plugins/findFirstConnection/schemas.d.ts.map +0 -1
  314. package/dist/plugins/findFirstConnection/schemas.js +0 -9
  315. package/dist/plugins/findUniqueConnection/index.d.ts +0 -115
  316. package/dist/plugins/findUniqueConnection/index.d.ts.map +0 -1
  317. package/dist/plugins/findUniqueConnection/index.js +0 -28
  318. package/dist/plugins/findUniqueConnection/schemas.d.ts +0 -25
  319. package/dist/plugins/findUniqueConnection/schemas.d.ts.map +0 -1
  320. package/dist/plugins/findUniqueConnection/schemas.js +0 -9
  321. package/dist/plugins/getAction/index.d.ts +0 -215
  322. package/dist/plugins/getAction/index.d.ts.map +0 -1
  323. package/dist/plugins/getAction/index.js +0 -41
  324. package/dist/plugins/getAction/schemas.d.ts +0 -82
  325. package/dist/plugins/getAction/schemas.d.ts.map +0 -1
  326. package/dist/plugins/getAction/schemas.js +0 -22
  327. package/dist/plugins/getActionInputFieldsSchema/index.d.ts +0 -301
  328. package/dist/plugins/getActionInputFieldsSchema/index.d.ts.map +0 -1
  329. package/dist/plugins/getActionInputFieldsSchema/index.js +0 -57
  330. package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts +0 -97
  331. package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts.map +0 -1
  332. package/dist/plugins/getActionInputFieldsSchema/schemas.js +0 -49
  333. package/dist/plugins/getApp/index.d.ts +0 -146
  334. package/dist/plugins/getApp/index.d.ts.map +0 -1
  335. package/dist/plugins/getApp/index.js +0 -24
  336. package/dist/plugins/getApp/schemas.d.ts +0 -32
  337. package/dist/plugins/getApp/schemas.d.ts.map +0 -1
  338. package/dist/plugins/getApp/schemas.js +0 -18
  339. package/dist/plugins/getConnection/index.d.ts +0 -179
  340. package/dist/plugins/getConnection/index.d.ts.map +0 -1
  341. package/dist/plugins/getConnection/index.js +0 -33
  342. package/dist/plugins/getConnection/schemas.d.ts +0 -12
  343. package/dist/plugins/getConnection/schemas.d.ts.map +0 -1
  344. package/dist/plugins/getConnection/schemas.js +0 -14
  345. package/dist/plugins/getConnectionStartUrl/index.d.ts +0 -206
  346. package/dist/plugins/getConnectionStartUrl/index.d.ts.map +0 -1
  347. package/dist/plugins/getConnectionStartUrl/index.js +0 -39
  348. package/dist/plugins/getConnectionStartUrl/schemas.d.ts +0 -15
  349. package/dist/plugins/getConnectionStartUrl/schemas.d.ts.map +0 -1
  350. package/dist/plugins/getConnectionStartUrl/schemas.js +0 -23
  351. package/dist/plugins/getProfile/index.d.ts +0 -32
  352. package/dist/plugins/getProfile/index.d.ts.map +0 -1
  353. package/dist/plugins/getProfile/index.js +0 -28
  354. package/dist/plugins/getProfile/schemas.d.ts +0 -4
  355. package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
  356. package/dist/plugins/getProfile/schemas.js +0 -5
  357. package/dist/plugins/listActionInputFieldChoices/index.d.ts +0 -372
  358. package/dist/plugins/listActionInputFieldChoices/index.d.ts.map +0 -1
  359. package/dist/plugins/listActionInputFieldChoices/index.js +0 -110
  360. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts +0 -133
  361. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts.map +0 -1
  362. package/dist/plugins/listActionInputFieldChoices/schemas.js +0 -75
  363. package/dist/plugins/listActionInputFields/index.d.ts +0 -330
  364. package/dist/plugins/listActionInputFields/index.d.ts.map +0 -1
  365. package/dist/plugins/listActionInputFields/index.js +0 -208
  366. package/dist/plugins/listActionInputFields/schemas.d.ts +0 -113
  367. package/dist/plugins/listActionInputFields/schemas.d.ts.map +0 -1
  368. package/dist/plugins/listActionInputFields/schemas.js +0 -56
  369. package/dist/plugins/listActions/index.d.ts +0 -219
  370. package/dist/plugins/listActions/index.d.ts.map +0 -1
  371. package/dist/plugins/listActions/index.js +0 -60
  372. package/dist/plugins/listActions/schemas.d.ts +0 -78
  373. package/dist/plugins/listActions/schemas.d.ts.map +0 -1
  374. package/dist/plugins/listActions/schemas.js +0 -33
  375. package/dist/plugins/listApps/index.d.ts +0 -127
  376. package/dist/plugins/listApps/index.d.ts.map +0 -1
  377. package/dist/plugins/listApps/index.js +0 -63
  378. package/dist/plugins/listApps/schemas.d.ts +0 -43
  379. package/dist/plugins/listApps/schemas.d.ts.map +0 -1
  380. package/dist/plugins/listApps/schemas.js +0 -54
  381. package/dist/plugins/listClientCredentials/index.d.ts +0 -36
  382. package/dist/plugins/listClientCredentials/index.d.ts.map +0 -1
  383. package/dist/plugins/listClientCredentials/index.js +0 -32
  384. package/dist/plugins/listClientCredentials/schemas.d.ts +0 -17
  385. package/dist/plugins/listClientCredentials/schemas.d.ts.map +0 -1
  386. package/dist/plugins/listClientCredentials/schemas.js +0 -23
  387. package/dist/plugins/listConnections/index.d.ts +0 -243
  388. package/dist/plugins/listConnections/index.d.ts.map +0 -1
  389. package/dist/plugins/listConnections/index.js +0 -97
  390. package/dist/plugins/listConnections/schemas.d.ts +0 -34
  391. package/dist/plugins/listConnections/schemas.d.ts.map +0 -1
  392. package/dist/plugins/listConnections/schemas.js +0 -74
  393. package/dist/plugins/manifest/index.d.ts +0 -97
  394. package/dist/plugins/manifest/index.d.ts.map +0 -1
  395. package/dist/plugins/manifest/index.js +0 -395
  396. package/dist/plugins/manifest/schemas.d.ts +0 -88
  397. package/dist/plugins/manifest/schemas.d.ts.map +0 -1
  398. package/dist/plugins/manifest/schemas.js +0 -61
  399. package/dist/plugins/registry/index.d.ts +0 -17
  400. package/dist/plugins/registry/index.d.ts.map +0 -1
  401. package/dist/plugins/registry/index.js +0 -11
  402. package/dist/plugins/request/index.d.ts +0 -70
  403. package/dist/plugins/request/index.d.ts.map +0 -1
  404. package/dist/plugins/request/index.js +0 -28
  405. package/dist/plugins/request/schemas.d.ts +0 -46
  406. package/dist/plugins/request/schemas.d.ts.map +0 -1
  407. package/dist/plugins/request/schemas.js +0 -42
  408. package/dist/plugins/runAction/index.d.ts +0 -313
  409. package/dist/plugins/runAction/index.d.ts.map +0 -1
  410. package/dist/plugins/runAction/index.js +0 -190
  411. package/dist/plugins/runAction/schemas.d.ts +0 -108
  412. package/dist/plugins/runAction/schemas.d.ts.map +0 -1
  413. package/dist/plugins/runAction/schemas.js +0 -53
  414. package/dist/plugins/tables/createTable/index.d.ts +0 -48
  415. package/dist/plugins/tables/createTable/index.d.ts.map +0 -1
  416. package/dist/plugins/tables/createTable/index.js +0 -20
  417. package/dist/plugins/tables/createTable/schemas.d.ts +0 -36
  418. package/dist/plugins/tables/createTable/schemas.d.ts.map +0 -1
  419. package/dist/plugins/tables/createTable/schemas.js +0 -16
  420. package/dist/plugins/tables/createTableFields/index.d.ts +0 -92
  421. package/dist/plugins/tables/createTableFields/index.d.ts.map +0 -1
  422. package/dist/plugins/tables/createTableFields/index.js +0 -29
  423. package/dist/plugins/tables/createTableFields/schemas.d.ts +0 -317
  424. package/dist/plugins/tables/createTableFields/schemas.d.ts.map +0 -1
  425. package/dist/plugins/tables/createTableFields/schemas.js +0 -62
  426. package/dist/plugins/tables/createTableRecords/index.d.ts +0 -114
  427. package/dist/plugins/tables/createTableRecords/index.d.ts.map +0 -1
  428. package/dist/plugins/tables/createTableRecords/index.js +0 -43
  429. package/dist/plugins/tables/createTableRecords/schemas.d.ts +0 -92
  430. package/dist/plugins/tables/createTableRecords/schemas.d.ts.map +0 -1
  431. package/dist/plugins/tables/createTableRecords/schemas.js +0 -55
  432. package/dist/plugins/tables/deleteTable/index.d.ts +0 -74
  433. package/dist/plugins/tables/deleteTable/index.d.ts.map +0 -1
  434. package/dist/plugins/tables/deleteTable/index.js +0 -23
  435. package/dist/plugins/tables/deleteTable/schemas.d.ts +0 -28
  436. package/dist/plugins/tables/deleteTable/schemas.d.ts.map +0 -1
  437. package/dist/plugins/tables/deleteTable/schemas.js +0 -21
  438. package/dist/plugins/tables/deleteTableFields/index.d.ts +0 -102
  439. package/dist/plugins/tables/deleteTableFields/index.d.ts.map +0 -1
  440. package/dist/plugins/tables/deleteTableFields/index.js +0 -30
  441. package/dist/plugins/tables/deleteTableFields/schemas.d.ts +0 -34
  442. package/dist/plugins/tables/deleteTableFields/schemas.d.ts.map +0 -1
  443. package/dist/plugins/tables/deleteTableFields/schemas.js +0 -29
  444. package/dist/plugins/tables/deleteTableRecords/index.d.ts +0 -123
  445. package/dist/plugins/tables/deleteTableRecords/index.d.ts.map +0 -1
  446. package/dist/plugins/tables/deleteTableRecords/index.js +0 -23
  447. package/dist/plugins/tables/deleteTableRecords/schemas.d.ts +0 -34
  448. package/dist/plugins/tables/deleteTableRecords/schemas.d.ts.map +0 -1
  449. package/dist/plugins/tables/deleteTableRecords/schemas.js +0 -30
  450. package/dist/plugins/tables/getTable/index.d.ts +0 -81
  451. package/dist/plugins/tables/getTable/index.d.ts.map +0 -1
  452. package/dist/plugins/tables/getTable/index.js +0 -24
  453. package/dist/plugins/tables/getTable/schemas.d.ts +0 -49
  454. package/dist/plugins/tables/getTable/schemas.d.ts.map +0 -1
  455. package/dist/plugins/tables/getTable/schemas.js +0 -27
  456. package/dist/plugins/tables/getTableRecord/index.d.ts +0 -131
  457. package/dist/plugins/tables/getTableRecord/index.d.ts.map +0 -1
  458. package/dist/plugins/tables/getTableRecord/index.js +0 -38
  459. package/dist/plugins/tables/getTableRecord/schemas.d.ts +0 -88
  460. package/dist/plugins/tables/getTableRecord/schemas.d.ts.map +0 -1
  461. package/dist/plugins/tables/getTableRecord/schemas.js +0 -56
  462. package/dist/plugins/tables/listTableFields/index.d.ts +0 -86
  463. package/dist/plugins/tables/listTableFields/index.d.ts.map +0 -1
  464. package/dist/plugins/tables/listTableFields/index.js +0 -41
  465. package/dist/plugins/tables/listTableFields/schemas.d.ts +0 -225
  466. package/dist/plugins/tables/listTableFields/schemas.d.ts.map +0 -1
  467. package/dist/plugins/tables/listTableFields/schemas.js +0 -93
  468. package/dist/plugins/tables/listTableRecords/index.d.ts +0 -136
  469. package/dist/plugins/tables/listTableRecords/index.d.ts.map +0 -1
  470. package/dist/plugins/tables/listTableRecords/index.js +0 -81
  471. package/dist/plugins/tables/listTableRecords/schemas.d.ts +0 -256
  472. package/dist/plugins/tables/listTableRecords/schemas.d.ts.map +0 -1
  473. package/dist/plugins/tables/listTableRecords/schemas.js +0 -95
  474. package/dist/plugins/tables/listTables/index.d.ts +0 -60
  475. package/dist/plugins/tables/listTables/index.d.ts.map +0 -1
  476. package/dist/plugins/tables/listTables/index.js +0 -67
  477. package/dist/plugins/tables/listTables/schemas.d.ts +0 -85
  478. package/dist/plugins/tables/listTables/schemas.d.ts.map +0 -1
  479. package/dist/plugins/tables/listTables/schemas.js +0 -72
  480. package/dist/plugins/tables/shared.d.ts +0 -10
  481. package/dist/plugins/tables/shared.d.ts.map +0 -1
  482. package/dist/plugins/tables/shared.js +0 -9
  483. package/dist/plugins/tables/updateTableRecords/index.d.ts +0 -116
  484. package/dist/plugins/tables/updateTableRecords/index.d.ts.map +0 -1
  485. package/dist/plugins/tables/updateTableRecords/index.js +0 -47
  486. package/dist/plugins/tables/updateTableRecords/schemas.d.ts +0 -97
  487. package/dist/plugins/tables/updateTableRecords/schemas.d.ts.map +0 -1
  488. package/dist/plugins/tables/updateTableRecords/schemas.js +0 -55
  489. package/dist/plugins/tables/utils.d.ts +0 -69
  490. package/dist/plugins/tables/utils.d.ts.map +0 -1
  491. package/dist/plugins/tables/utils.js +0 -270
  492. package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts +0 -108
  493. package/dist/plugins/triggers/ackTriggerInboxMessages/index.d.ts.map +0 -1
  494. package/dist/plugins/triggers/ackTriggerInboxMessages/index.js +0 -36
  495. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts +0 -34
  496. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.d.ts.map +0 -1
  497. package/dist/plugins/triggers/ackTriggerInboxMessages/schemas.js +0 -17
  498. package/dist/plugins/triggers/createTriggerInbox/index.d.ts +0 -292
  499. package/dist/plugins/triggers/createTriggerInbox/index.d.ts.map +0 -1
  500. package/dist/plugins/triggers/createTriggerInbox/index.js +0 -68
  501. package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts +0 -20
  502. package/dist/plugins/triggers/createTriggerInbox/schemas.d.ts.map +0 -1
  503. package/dist/plugins/triggers/createTriggerInbox/schemas.js +0 -21
  504. package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts +0 -81
  505. package/dist/plugins/triggers/deleteTriggerInbox/index.d.ts.map +0 -1
  506. package/dist/plugins/triggers/deleteTriggerInbox/index.js +0 -29
  507. package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts +0 -13
  508. package/dist/plugins/triggers/deleteTriggerInbox/schemas.d.ts.map +0 -1
  509. package/dist/plugins/triggers/deleteTriggerInbox/schemas.js +0 -9
  510. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts +0 -277
  511. package/dist/plugins/triggers/drainTriggerInbox/index.d.ts.map +0 -1
  512. package/dist/plugins/triggers/drainTriggerInbox/index.js +0 -260
  513. package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts +0 -56
  514. package/dist/plugins/triggers/drainTriggerInbox/pipeline.d.ts.map +0 -1
  515. package/dist/plugins/triggers/drainTriggerInbox/pipeline.js +0 -225
  516. package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts +0 -104
  517. package/dist/plugins/triggers/drainTriggerInbox/schemas.d.ts.map +0 -1
  518. package/dist/plugins/triggers/drainTriggerInbox/schemas.js +0 -102
  519. package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts +0 -292
  520. package/dist/plugins/triggers/ensureTriggerInbox/index.d.ts.map +0 -1
  521. package/dist/plugins/triggers/ensureTriggerInbox/index.js +0 -65
  522. package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts +0 -20
  523. package/dist/plugins/triggers/ensureTriggerInbox/schemas.d.ts.map +0 -1
  524. package/dist/plugins/triggers/ensureTriggerInbox/schemas.js +0 -21
  525. package/dist/plugins/triggers/getTriggerInbox/index.d.ts +0 -81
  526. package/dist/plugins/triggers/getTriggerInbox/index.d.ts.map +0 -1
  527. package/dist/plugins/triggers/getTriggerInbox/index.js +0 -28
  528. package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts +0 -13
  529. package/dist/plugins/triggers/getTriggerInbox/schemas.d.ts.map +0 -1
  530. package/dist/plugins/triggers/getTriggerInbox/schemas.js +0 -9
  531. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +0 -277
  532. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts.map +0 -1
  533. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.js +0 -23
  534. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts +0 -13
  535. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.d.ts.map +0 -1
  536. package/dist/plugins/triggers/getTriggerInputFieldsSchema/schemas.js +0 -10
  537. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts +0 -89
  538. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.d.ts.map +0 -1
  539. package/dist/plugins/triggers/leaseTriggerInboxMessages/index.js +0 -74
  540. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts +0 -57
  541. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.d.ts.map +0 -1
  542. package/dist/plugins/triggers/leaseTriggerInboxMessages/schemas.js +0 -25
  543. package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts +0 -82
  544. package/dist/plugins/triggers/listTriggerInboxMessages/index.d.ts.map +0 -1
  545. package/dist/plugins/triggers/listTriggerInboxMessages/index.js +0 -40
  546. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts +0 -37
  547. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.d.ts.map +0 -1
  548. package/dist/plugins/triggers/listTriggerInboxMessages/schemas.js +0 -27
  549. package/dist/plugins/triggers/listTriggerInboxes/index.d.ts +0 -56
  550. package/dist/plugins/triggers/listTriggerInboxes/index.d.ts.map +0 -1
  551. package/dist/plugins/triggers/listTriggerInboxes/index.js +0 -42
  552. package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts +0 -58
  553. package/dist/plugins/triggers/listTriggerInboxes/schemas.d.ts.map +0 -1
  554. package/dist/plugins/triggers/listTriggerInboxes/schemas.js +0 -35
  555. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +0 -360
  556. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts.map +0 -1
  557. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.js +0 -32
  558. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts +0 -20
  559. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.d.ts.map +0 -1
  560. package/dist/plugins/triggers/listTriggerInputFieldChoices/schemas.js +0 -28
  561. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +0 -330
  562. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts.map +0 -1
  563. package/dist/plugins/triggers/listTriggerInputFields/index.js +0 -34
  564. package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts +0 -16
  565. package/dist/plugins/triggers/listTriggerInputFields/schemas.d.ts.map +0 -1
  566. package/dist/plugins/triggers/listTriggerInputFields/schemas.js +0 -21
  567. package/dist/plugins/triggers/listTriggers/index.d.ts +0 -207
  568. package/dist/plugins/triggers/listTriggers/index.d.ts.map +0 -1
  569. package/dist/plugins/triggers/listTriggers/index.js +0 -26
  570. package/dist/plugins/triggers/listTriggers/schemas.d.ts +0 -11
  571. package/dist/plugins/triggers/listTriggers/schemas.d.ts.map +0 -1
  572. package/dist/plugins/triggers/listTriggers/schemas.js +0 -18
  573. package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts +0 -81
  574. package/dist/plugins/triggers/pauseTriggerInbox/index.d.ts.map +0 -1
  575. package/dist/plugins/triggers/pauseTriggerInbox/index.js +0 -28
  576. package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts +0 -13
  577. package/dist/plugins/triggers/pauseTriggerInbox/schemas.d.ts.map +0 -1
  578. package/dist/plugins/triggers/pauseTriggerInbox/schemas.js +0 -9
  579. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts +0 -108
  580. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.d.ts.map +0 -1
  581. package/dist/plugins/triggers/releaseTriggerInboxMessages/index.js +0 -38
  582. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts +0 -34
  583. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.d.ts.map +0 -1
  584. package/dist/plugins/triggers/releaseTriggerInboxMessages/schemas.js +0 -17
  585. package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts +0 -81
  586. package/dist/plugins/triggers/resumeTriggerInbox/index.d.ts.map +0 -1
  587. package/dist/plugins/triggers/resumeTriggerInbox/index.js +0 -28
  588. package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts +0 -13
  589. package/dist/plugins/triggers/resumeTriggerInbox/schemas.d.ts.map +0 -1
  590. package/dist/plugins/triggers/resumeTriggerInbox/schemas.js +0 -9
  591. package/dist/plugins/triggers/shared.d.ts +0 -17
  592. package/dist/plugins/triggers/shared.d.ts.map +0 -1
  593. package/dist/plugins/triggers/shared.js +0 -16
  594. package/dist/plugins/triggers/updateTriggerInbox/index.d.ts +0 -82
  595. package/dist/plugins/triggers/updateTriggerInbox/index.d.ts.map +0 -1
  596. package/dist/plugins/triggers/updateTriggerInbox/index.js +0 -32
  597. package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts +0 -14
  598. package/dist/plugins/triggers/updateTriggerInbox/schemas.d.ts.map +0 -1
  599. package/dist/plugins/triggers/updateTriggerInbox/schemas.js +0 -15
  600. package/dist/plugins/triggers/utils.d.ts +0 -23
  601. package/dist/plugins/triggers/utils.d.ts.map +0 -1
  602. package/dist/plugins/triggers/utils.js +0 -45
  603. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts +0 -221
  604. package/dist/plugins/triggers/watchTriggerInbox/index.d.ts.map +0 -1
  605. package/dist/plugins/triggers/watchTriggerInbox/index.js +0 -402
  606. package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts +0 -32
  607. package/dist/plugins/triggers/watchTriggerInbox/sse.d.ts.map +0 -1
  608. package/dist/plugins/triggers/watchTriggerInbox/sse.js +0 -36
  609. package/dist/plugins/waitForNewConnection/index.d.ts +0 -209
  610. package/dist/plugins/waitForNewConnection/index.d.ts.map +0 -1
  611. package/dist/plugins/waitForNewConnection/index.js +0 -75
  612. package/dist/plugins/waitForNewConnection/schemas.d.ts +0 -17
  613. package/dist/plugins/waitForNewConnection/schemas.d.ts.map +0 -1
  614. package/dist/plugins/waitForNewConnection/schemas.js +0 -39
  615. package/dist/resolvers/actionKey.d.ts +0 -16
  616. package/dist/resolvers/actionKey.d.ts.map +0 -1
  617. package/dist/resolvers/actionKey.js +0 -20
  618. package/dist/resolvers/actionType.d.ts +0 -14
  619. package/dist/resolvers/actionType.d.ts.map +0 -1
  620. package/dist/resolvers/actionType.js +0 -24
  621. package/dist/resolvers/appKey.d.ts +0 -13
  622. package/dist/resolvers/appKey.d.ts.map +0 -1
  623. package/dist/resolvers/appKey.js +0 -50
  624. package/dist/resolvers/clientCredentialsName.d.ts +0 -3
  625. package/dist/resolvers/clientCredentialsName.d.ts.map +0 -1
  626. package/dist/resolvers/clientCredentialsName.js +0 -5
  627. package/dist/resolvers/clientId.d.ts +0 -5
  628. package/dist/resolvers/clientId.d.ts.map +0 -1
  629. package/dist/resolvers/clientId.js +0 -14
  630. package/dist/resolvers/connectionId.d.ts +0 -12
  631. package/dist/resolvers/connectionId.d.ts.map +0 -1
  632. package/dist/resolvers/connectionId.js +0 -52
  633. package/dist/resolvers/durableRunId.d.ts +0 -5
  634. package/dist/resolvers/durableRunId.d.ts.map +0 -1
  635. package/dist/resolvers/durableRunId.js +0 -15
  636. package/dist/resolvers/index.d.ts +0 -27
  637. package/dist/resolvers/index.d.ts.map +0 -1
  638. package/dist/resolvers/index.js +0 -28
  639. package/dist/resolvers/inputFieldKey.d.ts +0 -12
  640. package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
  641. package/dist/resolvers/inputFieldKey.js +0 -51
  642. package/dist/resolvers/inputs.d.ts +0 -17
  643. package/dist/resolvers/inputs.d.ts.map +0 -1
  644. package/dist/resolvers/inputs.js +0 -50
  645. package/dist/resolvers/tableFieldIds.d.ts +0 -7
  646. package/dist/resolvers/tableFieldIds.d.ts.map +0 -1
  647. package/dist/resolvers/tableFieldIds.js +0 -20
  648. package/dist/resolvers/tableFields.d.ts +0 -3
  649. package/dist/resolvers/tableFields.d.ts.map +0 -1
  650. package/dist/resolvers/tableFields.js +0 -31
  651. package/dist/resolvers/tableFilters.d.ts +0 -6
  652. package/dist/resolvers/tableFilters.d.ts.map +0 -1
  653. package/dist/resolvers/tableFilters.js +0 -74
  654. package/dist/resolvers/tableId.d.ts +0 -5
  655. package/dist/resolvers/tableId.d.ts.map +0 -1
  656. package/dist/resolvers/tableId.js +0 -30
  657. package/dist/resolvers/tableName.d.ts +0 -3
  658. package/dist/resolvers/tableName.d.ts.map +0 -1
  659. package/dist/resolvers/tableName.js +0 -5
  660. package/dist/resolvers/tableRecordId.d.ts +0 -10
  661. package/dist/resolvers/tableRecordId.d.ts.map +0 -1
  662. package/dist/resolvers/tableRecordId.js +0 -49
  663. package/dist/resolvers/tableRecords.d.ts +0 -9
  664. package/dist/resolvers/tableRecords.d.ts.map +0 -1
  665. package/dist/resolvers/tableRecords.js +0 -77
  666. package/dist/resolvers/tableSort.d.ts +0 -6
  667. package/dist/resolvers/tableSort.d.ts.map +0 -1
  668. package/dist/resolvers/tableSort.js +0 -43
  669. package/dist/resolvers/triggerInbox.d.ts +0 -5
  670. package/dist/resolvers/triggerInbox.d.ts.map +0 -1
  671. package/dist/resolvers/triggerInbox.js +0 -19
  672. package/dist/resolvers/triggerMessages.d.ts +0 -7
  673. package/dist/resolvers/triggerMessages.d.ts.map +0 -1
  674. package/dist/resolvers/triggerMessages.js +0 -21
  675. package/dist/resolvers/workflowId.d.ts +0 -5
  676. package/dist/resolvers/workflowId.d.ts.map +0 -1
  677. package/dist/resolvers/workflowId.js +0 -15
  678. package/dist/resolvers/workflowRunId.d.ts +0 -7
  679. package/dist/resolvers/workflowRunId.d.ts.map +0 -1
  680. package/dist/resolvers/workflowRunId.js +0 -20
  681. package/dist/resolvers/workflowVersionId.d.ts +0 -7
  682. package/dist/resolvers/workflowVersionId.d.ts.map +0 -1
  683. package/dist/resolvers/workflowVersionId.js +0 -20
  684. package/dist/schemas/Action.d.ts +0 -24
  685. package/dist/schemas/Action.d.ts.map +0 -1
  686. package/dist/schemas/Action.js +0 -16
  687. package/dist/schemas/App.d.ts +0 -56
  688. package/dist/schemas/App.d.ts.map +0 -1
  689. package/dist/schemas/App.js +0 -5
  690. package/dist/schemas/ClientCredentials.d.ts +0 -19
  691. package/dist/schemas/ClientCredentials.d.ts.map +0 -1
  692. package/dist/schemas/ClientCredentials.js +0 -6
  693. package/dist/schemas/Connection.d.ts +0 -32
  694. package/dist/schemas/Connection.d.ts.map +0 -1
  695. package/dist/schemas/Connection.js +0 -5
  696. package/dist/schemas/Field.d.ts +0 -61
  697. package/dist/schemas/Field.d.ts.map +0 -1
  698. package/dist/schemas/Field.js +0 -49
  699. package/dist/schemas/Run.d.ts +0 -3
  700. package/dist/schemas/Run.d.ts.map +0 -1
  701. package/dist/schemas/Run.js +0 -5
  702. package/dist/schemas/TriggerInbox.d.ts +0 -59
  703. package/dist/schemas/TriggerInbox.d.ts.map +0 -1
  704. package/dist/schemas/TriggerInbox.js +0 -49
  705. package/dist/schemas/TriggerMessage.d.ts +0 -48
  706. package/dist/schemas/TriggerMessage.d.ts.map +0 -1
  707. package/dist/schemas/TriggerMessage.js +0 -21
  708. package/dist/schemas/UserProfile.d.ts +0 -12
  709. package/dist/schemas/UserProfile.d.ts.map +0 -1
  710. package/dist/schemas/UserProfile.js +0 -13
  711. package/dist/sdk-version.d.ts +0 -28
  712. package/dist/sdk-version.d.ts.map +0 -1
  713. package/dist/sdk-version.js +0 -29
  714. package/dist/sdk.d.ts +0 -6065
  715. package/dist/sdk.d.ts.map +0 -1
  716. package/dist/sdk.js +0 -173
  717. package/dist/services/implementations.d.ts +0 -63
  718. package/dist/services/implementations.d.ts.map +0 -1
  719. package/dist/services/implementations.js +0 -79
  720. package/dist/types/connections.d.ts +0 -19
  721. package/dist/types/connections.d.ts.map +0 -1
  722. package/dist/types/connections.js +0 -20
  723. package/dist/types/credentials.d.ts +0 -186
  724. package/dist/types/credentials.d.ts.map +0 -1
  725. package/dist/types/credentials.js +0 -123
  726. package/dist/types/domain.d.ts +0 -52
  727. package/dist/types/domain.d.ts.map +0 -1
  728. package/dist/types/domain.js +0 -1
  729. package/dist/types/errors.d.ts +0 -254
  730. package/dist/types/errors.d.ts.map +0 -1
  731. package/dist/types/errors.js +0 -336
  732. package/dist/types/events.d.ts +0 -38
  733. package/dist/types/events.d.ts.map +0 -1
  734. package/dist/types/events.js +0 -7
  735. package/dist/types/functions.d.ts +0 -2
  736. package/dist/types/functions.d.ts.map +0 -1
  737. package/dist/types/functions.js +0 -1
  738. package/dist/types/properties.d.ts +0 -83
  739. package/dist/types/properties.d.ts.map +0 -1
  740. package/dist/types/properties.js +0 -120
  741. package/dist/types/sdk.d.ts +0 -97
  742. package/dist/types/sdk.d.ts.map +0 -1
  743. package/dist/types/sdk.js +0 -114
  744. package/dist/types/signals.d.ts +0 -20
  745. package/dist/types/signals.d.ts.map +0 -1
  746. package/dist/types/signals.js +0 -21
  747. package/dist/types/telemetry-events.d.ts +0 -114
  748. package/dist/types/telemetry-events.d.ts.map +0 -1
  749. package/dist/types/telemetry-events.js +0 -10
  750. package/dist/utils/abort-utils.d.ts +0 -77
  751. package/dist/utils/abort-utils.d.ts.map +0 -1
  752. package/dist/utils/abort-utils.js +0 -122
  753. package/dist/utils/agent.d.ts +0 -44
  754. package/dist/utils/agent.d.ts.map +0 -1
  755. package/dist/utils/agent.js +0 -76
  756. package/dist/utils/array-utils.d.ts +0 -31
  757. package/dist/utils/array-utils.d.ts.map +0 -1
  758. package/dist/utils/array-utils.js +0 -36
  759. package/dist/utils/batch-utils.d.ts +0 -72
  760. package/dist/utils/batch-utils.d.ts.map +0 -1
  761. package/dist/utils/batch-utils.js +0 -161
  762. package/dist/utils/caller-context.d.ts +0 -21
  763. package/dist/utils/caller-context.d.ts.map +0 -1
  764. package/dist/utils/caller-context.js +0 -35
  765. package/dist/utils/domain-utils.d.ts +0 -96
  766. package/dist/utils/domain-utils.d.ts.map +0 -1
  767. package/dist/utils/domain-utils.js +0 -248
  768. package/dist/utils/file-utils.d.ts +0 -4
  769. package/dist/utils/file-utils.d.ts.map +0 -1
  770. package/dist/utils/file-utils.js +0 -74
  771. package/dist/utils/id-utils.d.ts +0 -15
  772. package/dist/utils/id-utils.d.ts.map +0 -1
  773. package/dist/utils/id-utils.js +0 -24
  774. package/dist/utils/logging.d.ts +0 -2
  775. package/dist/utils/logging.d.ts.map +0 -1
  776. package/dist/utils/logging.js +0 -2
  777. package/dist/utils/open-approval.d.ts +0 -2
  778. package/dist/utils/open-approval.d.ts.map +0 -1
  779. package/dist/utils/open-approval.js +0 -13
  780. package/dist/utils/open-url.d.ts +0 -3
  781. package/dist/utils/open-url.d.ts.map +0 -1
  782. package/dist/utils/open-url.js +0 -79
  783. package/dist/utils/pagination.d.ts +0 -38
  784. package/dist/utils/pagination.d.ts.map +0 -1
  785. package/dist/utils/pagination.js +0 -53
  786. package/dist/utils/retry-utils.d.ts +0 -70
  787. package/dist/utils/retry-utils.d.ts.map +0 -1
  788. package/dist/utils/retry-utils.js +0 -97
  789. package/dist/utils/should-open-browser.d.ts +0 -24
  790. package/dist/utils/should-open-browser.d.ts.map +0 -1
  791. package/dist/utils/should-open-browser.js +0 -55
  792. package/dist/utils/telemetry.d.ts +0 -11
  793. package/dist/utils/telemetry.d.ts.map +0 -1
  794. package/dist/utils/telemetry.js +0 -19
  795. package/dist/utils/type-guard-utils.d.ts +0 -7
  796. package/dist/utils/type-guard-utils.d.ts.map +0 -1
  797. package/dist/utils/type-guard-utils.js +0 -11
  798. package/dist/utils/url-utils.d.ts +0 -25
  799. package/dist/utils/url-utils.d.ts.map +0 -1
  800. package/dist/utils/url-utils.js +0 -79
package/dist/auth.js DELETED
@@ -1,526 +0,0 @@
1
- /**
2
- * SDK Authentication Utilities
3
- *
4
- * This module provides SDK-level authentication utilities focused
5
- * on token acquisition. It uses the credentials system for resolution
6
- * and handles different credential types appropriately.
7
- *
8
- * CLI-specific functionality like login/logout is handled by the
9
- * @zapier/zapier-sdk-cli package (imported via its `./login` subpath).
10
- */
11
- import { isClientCredentials, isPkceCredentials } from "./types/credentials";
12
- import { ZapierAuthenticationError } from "./types/errors";
13
- import { emitOnce } from "./utils/telemetry";
14
- import { resolveCredentials, getClientIdFromCredentials } from "./credentials";
15
- import { createMemoryCache } from "./cache";
16
- const DEFAULT_AUTH_BASE_URL = "https://zapier.com";
17
- export { createMemoryCache } from "./cache";
18
- export { isClientCredentials, isPkceCredentials, isCredentialsObject, isCredentialsFunction, } from "./types/credentials";
19
- export var AuthMechanism;
20
- (function (AuthMechanism) {
21
- AuthMechanism["ClientCredentials"] = "client_credentials";
22
- AuthMechanism["Jwt"] = "jwt";
23
- AuthMechanism["Token"] = "token";
24
- AuthMechanism["Pkce"] = "pkce";
25
- AuthMechanism["None"] = "none";
26
- })(AuthMechanism || (AuthMechanism = {}));
27
- /**
28
- * In-flight token exchange promises to prevent duplicate exchanges
29
- * inside the same process. When an exchange is in progress, subsequent
30
- * calls await the same promise. Cache backends are responsible for
31
- * cross-process dedup via their optional `withLock` method.
32
- */
33
- const pendingExchanges = new Map();
34
- /**
35
- * The resolved default cache adapter. Cached at module scope so
36
- * repeated calls to `resolveAuthToken` reuse the same provider.
37
- */
38
- let cachedDefaultCache;
39
- /**
40
- * Build the cache key for a client_credentials identity. baseUrl is
41
- * part of the key so the same clientId+scopes against different auth
42
- * hosts (prod vs staging) never alias.
43
- */
44
- function buildCacheKey(options) {
45
- const sortedScopes = [...options.scopes].sort().join(",");
46
- return `zapier-sdk/client-credentials/${options.clientId}:${sortedScopes}:${options.baseUrl}`;
47
- }
48
- /**
49
- * Clear in-process caches. Useful for testing or to force the next
50
- * resolve to re-import the default cache adapter. Does not touch
51
- * persistent cache — use `invalidateCachedToken` for that.
52
- */
53
- export function clearTokenCache() {
54
- pendingExchanges.clear();
55
- cachedCliLogin = undefined;
56
- cachedDefaultCache = undefined;
57
- }
58
- const TOKEN_EXPIRATION_BUFFER_MS = 5 * 60 * 1000;
59
- /**
60
- * Decide which cache adapter to use for this call. Priority:
61
- * 1. explicit `options.cache`
62
- * 2. CLI's default cache provider (if installed)
63
- * 3. in-memory fallback
64
- */
65
- async function resolveCache(options) {
66
- if (options.cache)
67
- return options.cache;
68
- if (cachedDefaultCache !== undefined)
69
- return cachedDefaultCache;
70
- const cliLogin = await getCliLogin();
71
- if (cliLogin?.createCache) {
72
- try {
73
- const cache = cliLogin.createCache();
74
- if (cache) {
75
- cachedDefaultCache = cache;
76
- return cache;
77
- }
78
- }
79
- catch {
80
- // Fall through to in-memory if the CLI provider can't be constructed.
81
- }
82
- }
83
- const fallback = createMemoryCache();
84
- cachedDefaultCache = fallback;
85
- return fallback;
86
- }
87
- function entryIsValid(entry) {
88
- if (entry.expiresAt === undefined)
89
- return true;
90
- return entry.expiresAt > Date.now() + TOKEN_EXPIRATION_BUFFER_MS;
91
- }
92
- async function readCachedToken(cacheKey, cache) {
93
- const cached = await cache.get(cacheKey);
94
- if (cached && entryIsValid(cached))
95
- return cached.value;
96
- return undefined;
97
- }
98
- /**
99
- * Invalidate the cached token for a given client_credentials identity.
100
- * Called on 401 so the next request re-exchanges. Clears both the
101
- * in-process pending-exchange map and the persistent layer via the
102
- * resolved cache adapter.
103
- */
104
- export async function invalidateCachedToken(options) {
105
- const cacheKey = buildCacheKey(options);
106
- pendingExchanges.delete(cacheKey);
107
- const cache = await resolveCache({ cache: options.cache });
108
- try {
109
- await cache.delete(cacheKey);
110
- }
111
- catch {
112
- // Best-effort: the caller is about to surface a 401 to its own
113
- // caller; a failed invalidation shouldn't add noise on top of that.
114
- }
115
- }
116
- /**
117
- * Get the token endpoint URL for client credentials exchange.
118
- */
119
- function getTokenEndpointUrl(baseUrl) {
120
- const base = baseUrl || DEFAULT_AUTH_BASE_URL;
121
- return `${base}/oauth/token/`;
122
- }
123
- /**
124
- * Merge and deduplicate scopes from credentials and required scopes.
125
- * If no credentials scope is specified, defaults to "external".
126
- * Returns a sorted array of unique scopes.
127
- */
128
- function mergeScopes(credentialsScope, requiredScopes) {
129
- const scopeSet = new Set();
130
- // Add scopes from credentials (space-separated string)
131
- // If no credentials scope specified, default to "external"
132
- if (credentialsScope) {
133
- for (const s of credentialsScope.split(" ")) {
134
- if (s.trim()) {
135
- scopeSet.add(s.trim());
136
- }
137
- }
138
- }
139
- else {
140
- scopeSet.add("external");
141
- }
142
- // Add required scopes
143
- if (requiredScopes) {
144
- for (const s of requiredScopes) {
145
- scopeSet.add(s);
146
- }
147
- }
148
- return [...scopeSet].sort();
149
- }
150
- async function exchangeClientCredentials(options) {
151
- const { clientId, clientSecret, baseUrl, scope, requiredScopes, onEvent } = options;
152
- const fetchFn = options.fetch || globalThis.fetch;
153
- const tokenUrl = getTokenEndpointUrl(baseUrl);
154
- // Merge credentials scope with required scopes
155
- const mergedScopes = mergeScopes(scope, requiredScopes);
156
- const scopeString = mergedScopes.join(" ");
157
- onEvent?.({
158
- type: "auth_exchanging",
159
- payload: {
160
- message: "Exchanging client credentials for token...",
161
- operation: "client_credentials",
162
- },
163
- timestamp: Date.now(),
164
- });
165
- const response = await fetchFn(tokenUrl, {
166
- method: "POST",
167
- headers: {
168
- "Content-Type": "application/x-www-form-urlencoded",
169
- },
170
- body: new URLSearchParams({
171
- grant_type: "client_credentials",
172
- client_id: clientId,
173
- client_secret: clientSecret,
174
- scope: scopeString,
175
- audience: "zapier.com",
176
- }),
177
- });
178
- if (!response.ok) {
179
- const errorText = await response.text();
180
- onEvent?.({
181
- type: "auth_error",
182
- payload: {
183
- message: `Client credentials exchange failed: ${response.status}`,
184
- error: errorText,
185
- operation: "client_credentials",
186
- },
187
- timestamp: Date.now(),
188
- });
189
- throw new ZapierAuthenticationError(`Client credentials exchange failed: ${response.status} ${response.statusText}`, { statusCode: response.status });
190
- }
191
- const data = await response.json();
192
- if (!data.access_token) {
193
- throw new ZapierAuthenticationError("Client credentials response missing access_token");
194
- }
195
- onEvent?.({
196
- type: "auth_success",
197
- payload: {
198
- message: "Client credentials exchange successful",
199
- operation: "client_credentials",
200
- },
201
- timestamp: Date.now(),
202
- });
203
- return {
204
- accessToken: data.access_token,
205
- expiresIn: data.expires_in || 3600,
206
- };
207
- }
208
- let cachedCliLogin;
209
- /**
210
- * Dynamically imports the CLI's login/cache entrypoint with caching.
211
- * Returns the module if the CLI package is installed in the consumer's
212
- * environment, or `undefined` if not (e.g. in a browser or minimal
213
- * server deployment). The result is cached after the first attempt.
214
- */
215
- async function getCliLogin() {
216
- if (cachedCliLogin !== undefined) {
217
- return cachedCliLogin || undefined;
218
- }
219
- try {
220
- const mod = await import("@zapier/zapier-sdk-cli/login");
221
- if (typeof mod.getToken === "function") {
222
- cachedCliLogin = mod;
223
- return cachedCliLogin;
224
- }
225
- }
226
- catch {
227
- // Not available (no CLI installed in this environment).
228
- }
229
- cachedCliLogin = false;
230
- return undefined;
231
- }
232
- /**
233
- * Inject an already-loaded CLI login module so the SDK skips its dynamic import.
234
- * This guarantees CLI and SDK share the same module instance in the same process.
235
- */
236
- export function injectCliLogin(module) {
237
- cachedCliLogin = module;
238
- }
239
- /**
240
- * Returns whether a CLI login package is available.
241
- * `undefined` if no import has been attempted yet, `true` if found, `false` if not.
242
- */
243
- export function isCliLoginAvailable() {
244
- if (cachedCliLogin === undefined)
245
- return undefined;
246
- return cachedCliLogin !== false;
247
- }
248
- function emitAuthResolved(onEvent, mechanism) {
249
- if (onEvent) {
250
- emitOnce(onEvent, {
251
- type: "auth_resolved",
252
- payload: { mechanism },
253
- timestamp: Date.now(),
254
- });
255
- }
256
- }
257
- async function getActiveCredentialsFromCli(baseUrl) {
258
- const cliLogin = await getCliLogin();
259
- return cliLogin?.getActiveCredentials?.({ baseUrl });
260
- }
261
- async function getStoredClientCredentialsFromCli(baseUrl) {
262
- const cliLogin = await getCliLogin();
263
- return cliLogin?.getStoredClientCredentials?.({ baseUrl });
264
- }
265
- /**
266
- * Attempts to get a token from the CLI login package.
267
- *
268
- * Returns undefined if no valid token is found or no login package is available.
269
- * Throws if there's an actual error (like token refresh failure).
270
- */
271
- export async function getTokenFromCliLogin(options) {
272
- const cliLogin = await getCliLogin();
273
- if (!cliLogin)
274
- return undefined;
275
- return await cliLogin.getToken(options);
276
- }
277
- async function tryStoredClientCredentialAuth(options) {
278
- const activeCredential = await getActiveCredentialsFromCli(options.baseUrl);
279
- if (!activeCredential)
280
- return undefined;
281
- const resolvedBaseUrl = activeCredential.baseUrl || options.baseUrl || DEFAULT_AUTH_BASE_URL;
282
- const mergedScopes = mergeScopes(activeCredential.scopes.join(" "), options.requiredScopes);
283
- const cacheKey = buildCacheKey({
284
- clientId: activeCredential.clientId,
285
- scopes: mergedScopes,
286
- baseUrl: resolvedBaseUrl,
287
- });
288
- const cache = await resolveCache(options);
289
- const pending = pendingExchanges.get(cacheKey);
290
- if (pending) {
291
- return {
292
- token: await pending,
293
- mechanism: AuthMechanism.ClientCredentials,
294
- clientId: activeCredential.clientId,
295
- };
296
- }
297
- const cached = await readCachedToken(cacheKey, cache);
298
- if (cached !== undefined) {
299
- if (options.debug)
300
- // Debug output goes to stderr so it never pollutes stdout when callers
301
- // (smoke tests, scripts) pipe `zapier-sdk --debug ... --json` into a
302
- // JSON parser.
303
- console.error(`[auth] Using cached token (clientId: ${activeCredential.clientId})`);
304
- emitAuthResolved(options.onEvent, AuthMechanism.ClientCredentials);
305
- return {
306
- token: cached,
307
- mechanism: AuthMechanism.ClientCredentials,
308
- clientId: activeCredential.clientId,
309
- };
310
- }
311
- const storedCredential = await getStoredClientCredentialsFromCli(resolvedBaseUrl);
312
- if (!storedCredential) {
313
- // Active credential pointer exists but the keychain secret is missing.
314
- // Falling back to JWT would silently downgrade a migrated user; surface
315
- // the broken state so they re-run login to recreate the secret.
316
- await invalidateCachedToken({
317
- clientId: activeCredential.clientId,
318
- scopes: activeCredential.scopes,
319
- baseUrl: resolvedBaseUrl,
320
- cache: options.cache,
321
- });
322
- throw new ZapierAuthenticationError(`Stored client credential is missing its secret (clientId: ${activeCredential.clientId}). Run \`zapier-sdk login\` to recreate it.`);
323
- }
324
- if (options.debug)
325
- console.error(`[auth] Using stored client credential (clientId: ${storedCredential.clientId})`);
326
- const auth = await resolveAuthFromCredentials(storedCredential, options);
327
- emitAuthResolved(options.onEvent, AuthMechanism.ClientCredentials);
328
- return {
329
- token: auth.token,
330
- mechanism: AuthMechanism.ClientCredentials,
331
- clientId: activeCredential.clientId,
332
- };
333
- }
334
- /**
335
- * Resolves auth from wherever it can be found, returning the token plus
336
- * metadata about how it was resolved.
337
- *
338
- * Resolution order:
339
- * 1. Explicit credentials option (or deprecated token option)
340
- * 2. Environment variables
341
- * 3. CLI login package (if available)
342
- *
343
- * For different credential types:
344
- * - String: Used directly as the token
345
- * - Client credentials: Exchanged for an access token (with caching)
346
- * - PKCE: Delegates to CLI login (throws if not available)
347
- *
348
- * When no auth can be resolved, returns a ResolvedAuth with
349
- * mechanism: None and no token.
350
- */
351
- export async function resolveAuth(options = {}) {
352
- // Resolve credentials from options and env vars
353
- const credentials = await resolveCredentials({
354
- credentials: options.credentials,
355
- token: options.token,
356
- baseUrl: options.baseUrl,
357
- });
358
- // If we got credentials, process them based on type
359
- if (credentials !== undefined) {
360
- return resolveAuthFromCredentials(credentials, options);
361
- }
362
- const storedAuth = await tryStoredClientCredentialAuth(options);
363
- if (storedAuth !== undefined)
364
- return storedAuth;
365
- if (options.debug) {
366
- console.error("[auth] Using JWT (no stored client credential found)");
367
- }
368
- const jwtToken = await getTokenFromCliLogin({
369
- onEvent: options.onEvent,
370
- fetch: options.fetch,
371
- debug: options.debug,
372
- });
373
- if (jwtToken !== undefined) {
374
- emitAuthResolved(options.onEvent, AuthMechanism.Jwt);
375
- return {
376
- token: jwtToken,
377
- mechanism: AuthMechanism.Jwt,
378
- clientId: null,
379
- };
380
- }
381
- return {
382
- token: undefined,
383
- mechanism: AuthMechanism.None,
384
- clientId: null,
385
- };
386
- }
387
- export async function resolveAuthToken(options = {}) {
388
- return (await resolveAuth(options)).token;
389
- }
390
- /**
391
- * Resolve an auth token from resolved credentials.
392
- */
393
- async function resolveAuthFromCredentials(credentials, options) {
394
- if (typeof credentials === "string") {
395
- emitAuthResolved(options.onEvent, AuthMechanism.Token);
396
- return {
397
- token: credentials,
398
- mechanism: AuthMechanism.Token,
399
- clientId: null,
400
- };
401
- }
402
- // Client credentials: exchange + cache through a pluggable cache
403
- // adapter. Resolution order:
404
- // 1. in-process pending exchange (dedup concurrent same-process calls)
405
- // 2. cache.get (hits keychain + config under the filesystem adapter,
406
- // RAM under the in-memory adapter, whatever the user adapter does)
407
- // 3. cache.withLock (if available) -> re-read, exchange, persist
408
- // (so N parallel processes collapse to 1 network exchange)
409
- // 4. plain exchange + persist when no lock is available
410
- if (isClientCredentials(credentials)) {
411
- const { clientId } = credentials;
412
- const mergedScopes = mergeScopes(credentials.scope, options.requiredScopes);
413
- const resolvedBaseUrl = credentials.baseUrl || options.baseUrl || DEFAULT_AUTH_BASE_URL;
414
- const cacheKey = buildCacheKey({
415
- clientId,
416
- scopes: mergedScopes,
417
- baseUrl: resolvedBaseUrl,
418
- });
419
- const cache = await resolveCache(options);
420
- // Fast-path read
421
- const cached = await readCachedToken(cacheKey, cache);
422
- if (cached !== undefined) {
423
- if (options.debug) {
424
- console.error(`[auth] Using cached token (clientId: ${clientId})`);
425
- }
426
- return {
427
- token: cached,
428
- mechanism: AuthMechanism.ClientCredentials,
429
- clientId: credentials.clientId,
430
- };
431
- }
432
- // In-process dedup
433
- const pending = pendingExchanges.get(cacheKey);
434
- if (pending) {
435
- return {
436
- token: await pending,
437
- mechanism: AuthMechanism.ClientCredentials,
438
- clientId: credentials.clientId,
439
- };
440
- }
441
- // Serialize exchange + persist inside the lock (when the adapter
442
- // supports cross-process locking). The second acquirer re-reads the
443
- // cache under the lock and uses the first's token instead of firing
444
- // another exchange.
445
- const runLocked = async () => {
446
- const recheck = await readCachedToken(cacheKey, cache);
447
- if (recheck !== undefined) {
448
- if (options.debug) {
449
- console.error(`[auth] Using cached token (clientId: ${clientId}, locked recheck)`);
450
- }
451
- return recheck;
452
- }
453
- const { accessToken, expiresIn } = await exchangeClientCredentials({
454
- clientId: credentials.clientId,
455
- clientSecret: credentials.clientSecret,
456
- baseUrl: credentials.baseUrl || options.baseUrl,
457
- scope: credentials.scope,
458
- requiredScopes: options.requiredScopes,
459
- fetch: options.fetch,
460
- onEvent: options.onEvent,
461
- });
462
- try {
463
- await cache.set(cacheKey, accessToken, {
464
- secret: true,
465
- ttl: expiresIn,
466
- });
467
- }
468
- catch {
469
- // Best-effort persistence: next process will re-exchange.
470
- }
471
- return accessToken;
472
- };
473
- const exchangePromise = (cache.withLock ? cache.withLock(cacheKey, runLocked) : runLocked()).finally(() => {
474
- pendingExchanges.delete(cacheKey);
475
- });
476
- pendingExchanges.set(cacheKey, exchangePromise);
477
- return {
478
- token: await exchangePromise,
479
- mechanism: AuthMechanism.ClientCredentials,
480
- clientId: credentials.clientId,
481
- };
482
- }
483
- // PKCE credentials: delegate to CLI login
484
- if (isPkceCredentials(credentials)) {
485
- // Try to get stored token from CLI login
486
- const storedToken = await getTokenFromCliLogin({
487
- onEvent: options.onEvent,
488
- fetch: options.fetch,
489
- credentials,
490
- debug: options.debug,
491
- });
492
- if (storedToken) {
493
- return {
494
- token: storedToken,
495
- mechanism: AuthMechanism.Pkce,
496
- clientId: null,
497
- };
498
- }
499
- // No stored token - user needs to run login
500
- throw new Error("PKCE credentials require interactive login. " +
501
- "Please run the 'login' command with the CLI first, or use client_credentials flow.");
502
- }
503
- // Should not reach here, but handle gracefully
504
- throw new Error("Unknown credentials type");
505
- }
506
- /**
507
- * Invalidate the cached token for the given credentials, if applicable.
508
- * This is called when we receive a 401 response, indicating the token
509
- * is no longer valid. Only affects client_credentials flow tokens.
510
- */
511
- export async function invalidateCredentialsToken(options) {
512
- const resolved = await resolveCredentials(options);
513
- if (!resolved)
514
- return;
515
- const clientId = getClientIdFromCredentials(resolved);
516
- if (clientId && isClientCredentials(resolved)) {
517
- const scopes = mergeScopes(resolved.scope, options.requiredScopes);
518
- const baseUrl = resolved.baseUrl || options.baseUrl || DEFAULT_AUTH_BASE_URL;
519
- await invalidateCachedToken({
520
- clientId,
521
- scopes,
522
- baseUrl,
523
- cache: options.cache,
524
- });
525
- }
526
- }
package/dist/cache.d.ts DELETED
@@ -1,50 +0,0 @@
1
- /**
2
- * Best-effort cache for the SDK.
3
- *
4
- * The SDK uses this to avoid re-fetching values it can recreate, primarily
5
- * client_credentials access tokens. Cache entries may disappear at any time:
6
- * a miss is normal and callers must be able to rebuild the value.
7
- *
8
- * The default cache is in-memory. When the CLI package is installed, the SDK
9
- * can opportunistically use its filesystem + keychain cache. Browser and
10
- * minimal server deployments fall back to memory unless a caller injects a
11
- * Redis, database, or environment-specific cache.
12
- *
13
- * Secrets: adapters receive a `secret: true` flag on `set` and decide
14
- * what to do with it (keychain for the filesystem adapter; ignored for
15
- * the in-memory adapter; user adapters can throw, plaintext, encrypt —
16
- * their call). The value returned by `get` is always the plain secret.
17
- */
18
- export interface ZapierCacheEntry {
19
- value: string;
20
- /** Millisecond epoch. Undefined means "no expiration recorded." */
21
- expiresAt?: number;
22
- }
23
- export interface ZapierCacheSetOptions {
24
- /**
25
- * Hint that this value is sensitive. Adapters may use a more secure
26
- * backend (e.g. the OS keychain for the filesystem adapter); adapters
27
- * without a secure backend may throw, warn, or accept — their call.
28
- */
29
- secret?: boolean;
30
- /** Time-to-live in seconds from now. */
31
- ttl?: number;
32
- }
33
- export interface ZapierCache {
34
- get(key: string): Promise<ZapierCacheEntry | undefined>;
35
- set(key: string, value: string, options?: ZapierCacheSetOptions): Promise<void>;
36
- delete(key: string): Promise<void>;
37
- /**
38
- * Optional mutex for caches that can coordinate beyond one JavaScript
39
- * process. The SDK re-checks the cache inside the lock before rebuilding.
40
- */
41
- withLock?<T>(key: string, fn: () => Promise<T>): Promise<T>;
42
- }
43
- /**
44
- * Simplest possible adapter: a Map. No persistence, no locking (single
45
- * process only), no differentiation between secrets and non-secrets.
46
- * This is the default when cli-login isn't installed and no custom
47
- * cache is provided.
48
- */
49
- export declare function createMemoryCache(): ZapierCache;
50
- //# sourceMappingURL=cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAAC;IACxD,GAAG,CACD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC7D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAsB/C"}
package/dist/cache.js DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * Best-effort cache for the SDK.
3
- *
4
- * The SDK uses this to avoid re-fetching values it can recreate, primarily
5
- * client_credentials access tokens. Cache entries may disappear at any time:
6
- * a miss is normal and callers must be able to rebuild the value.
7
- *
8
- * The default cache is in-memory. When the CLI package is installed, the SDK
9
- * can opportunistically use its filesystem + keychain cache. Browser and
10
- * minimal server deployments fall back to memory unless a caller injects a
11
- * Redis, database, or environment-specific cache.
12
- *
13
- * Secrets: adapters receive a `secret: true` flag on `set` and decide
14
- * what to do with it (keychain for the filesystem adapter; ignored for
15
- * the in-memory adapter; user adapters can throw, plaintext, encrypt —
16
- * their call). The value returned by `get` is always the plain secret.
17
- */
18
- /**
19
- * Simplest possible adapter: a Map. No persistence, no locking (single
20
- * process only), no differentiation between secrets and non-secrets.
21
- * This is the default when cli-login isn't installed and no custom
22
- * cache is provided.
23
- */
24
- export function createMemoryCache() {
25
- const store = new Map();
26
- return {
27
- async get(key) {
28
- const entry = store.get(key);
29
- if (!entry)
30
- return undefined;
31
- if (entry.expiresAt !== undefined && entry.expiresAt <= Date.now()) {
32
- store.delete(key);
33
- return undefined;
34
- }
35
- return { value: entry.value, expiresAt: entry.expiresAt };
36
- },
37
- async set(key, value, options) {
38
- const expiresAt = options?.ttl
39
- ? Date.now() + options.ttl * 1000
40
- : undefined;
41
- store.set(key, { value, expiresAt });
42
- },
43
- async delete(key) {
44
- store.delete(key);
45
- },
46
- };
47
- }