@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,50 +0,0 @@
1
- // Helper function to recursively make all input fields optional while preserving structure
2
- function makeFieldsOptional(fields) {
3
- return fields.map((field) => {
4
- if (field.type === "input_field") {
5
- return {
6
- ...field,
7
- is_required: false,
8
- };
9
- }
10
- else if (field.type === "fieldset") {
11
- return {
12
- ...field,
13
- fields: makeFieldsOptional(field.fields),
14
- };
15
- }
16
- else {
17
- // Info fields remain unchanged
18
- return field;
19
- }
20
- });
21
- }
22
- export const inputsResolver = {
23
- type: "fields",
24
- depends: ["appKey", "actionKey", "actionType", "authenticationId"],
25
- fetch: async (sdk, resolvedParams) => {
26
- const fieldsResponse = await sdk.listInputFields({
27
- appKey: resolvedParams.appKey,
28
- actionKey: resolvedParams.actionKey,
29
- actionType: resolvedParams.actionType,
30
- authenticationId: resolvedParams.authenticationId,
31
- inputs: resolvedParams.inputs, // Pass along currently resolved inputs
32
- });
33
- return fieldsResponse.data;
34
- },
35
- };
36
- export const inputsAllOptionalResolver = {
37
- type: "fields",
38
- depends: ["appKey", "actionKey", "actionType", "authenticationId"],
39
- fetch: async (sdk, resolvedParams) => {
40
- const fieldsResponse = await sdk.listInputFields({
41
- appKey: resolvedParams.appKey,
42
- actionKey: resolvedParams.actionKey,
43
- actionType: resolvedParams.actionType,
44
- authenticationId: resolvedParams.authenticationId,
45
- inputs: resolvedParams.inputs, // Pass along currently resolved inputs
46
- });
47
- // Return nested structure with all fields marked as optional.
48
- return makeFieldsOptional(fieldsResponse.data);
49
- },
50
- };
@@ -1,24 +0,0 @@
1
- import { z } from "zod";
2
- export declare const ActionItemSchema: z.ZodObject<{
3
- key: z.ZodString;
4
- id: z.ZodOptional<z.ZodString>;
5
- description: z.ZodString;
6
- is_important: z.ZodOptional<z.ZodBoolean>;
7
- is_hidden: z.ZodOptional<z.ZodBoolean>;
8
- app_key: z.ZodString;
9
- app_version: z.ZodOptional<z.ZodString>;
10
- action_type: z.ZodEnum<{
11
- search: "search";
12
- filter: "filter";
13
- read: "read";
14
- read_bulk: "read_bulk";
15
- run: "run";
16
- search_and_write: "search_and_write";
17
- search_or_write: "search_or_write";
18
- write: "write";
19
- }>;
20
- title: z.ZodString;
21
- type: z.ZodLiteral<"action">;
22
- }, z.core.$strip>;
23
- export type ActionItem = z.infer<typeof ActionItemSchema>;
24
- //# sourceMappingURL=Action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../src/schemas/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;iBAqC5B,CAAC;AAMF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,40 +0,0 @@
1
- import { z } from "zod";
2
- import { withFormatter } from "../utils/schema-utils";
3
- import { ActionSchema } from "../api/schemas";
4
- // ============================================================================
5
- // Action Item Schema (extends API schema with computed fields and formatting)
6
- // ============================================================================
7
- export const ActionItemSchema = withFormatter(ActionSchema.omit({ type: true, name: true, selected_api: true }).extend({
8
- app_key: z.string(), // App key without version (extracted from selected_api)
9
- app_version: z.string().optional(), // Version extracted from selected_api
10
- action_type: ActionSchema.shape.type, // Mapped from original 'type' field
11
- title: z.string(), // Mapped from original 'name' field
12
- type: z.literal("action"), // Fixed type identifier
13
- }), {
14
- format: (item) => {
15
- const details = [];
16
- details.push({
17
- text: `Type: ${item.action_type}`,
18
- style: "accent",
19
- });
20
- if (item.app_key) {
21
- details.push({
22
- text: `App: ${item.app_key}`,
23
- style: "normal",
24
- });
25
- }
26
- if (item.description) {
27
- details.push({
28
- text: item.description,
29
- style: "dim",
30
- });
31
- }
32
- return {
33
- title: item.title || item.key,
34
- id: item.id,
35
- key: item.key,
36
- description: item.description,
37
- details,
38
- };
39
- },
40
- });
@@ -1,57 +0,0 @@
1
- import { z } from "zod";
2
- export { FormattedItem, FormatMetadata } from "../utils/schema-utils";
3
- export declare const AppItemSchema: z.ZodObject<{
4
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
- id: z.ZodNumber;
6
- name: z.ZodString;
7
- slug: z.ZodString;
8
- }, z.core.$strip>>>;
9
- actions: z.ZodOptional<z.ZodObject<{
10
- read: z.ZodOptional<z.ZodNumber>;
11
- read_bulk: z.ZodOptional<z.ZodNumber>;
12
- write: z.ZodOptional<z.ZodNumber>;
13
- search: z.ZodOptional<z.ZodNumber>;
14
- search_or_write: z.ZodOptional<z.ZodNumber>;
15
- search_and_write: z.ZodOptional<z.ZodNumber>;
16
- filter: z.ZodOptional<z.ZodNumber>;
17
- }, z.core.$strip>>;
18
- description: z.ZodOptional<z.ZodString>;
19
- is_hidden: z.ZodOptional<z.ZodBoolean>;
20
- age_in_days: z.ZodOptional<z.ZodNumber>;
21
- api_docs_url: z.ZodOptional<z.ZodString>;
22
- banner: z.ZodOptional<z.ZodString>;
23
- image: z.ZodOptional<z.ZodString>;
24
- images: z.ZodOptional<z.ZodObject<{
25
- url_16x16: z.ZodOptional<z.ZodString>;
26
- url_32x32: z.ZodOptional<z.ZodString>;
27
- url_64x64: z.ZodOptional<z.ZodString>;
28
- url_128x128: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>>;
30
- is_beta: z.ZodOptional<z.ZodBoolean>;
31
- is_built_in: z.ZodOptional<z.ZodBoolean>;
32
- is_featured: z.ZodOptional<z.ZodBoolean>;
33
- is_premium: z.ZodOptional<z.ZodBoolean>;
34
- is_public: z.ZodOptional<z.ZodBoolean>;
35
- is_upcoming: z.ZodOptional<z.ZodBoolean>;
36
- popularity: z.ZodOptional<z.ZodNumber>;
37
- primary_color: z.ZodOptional<z.ZodString>;
38
- slug: z.ZodString;
39
- auth_type: z.ZodOptional<z.ZodString>;
40
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
41
- secondary_color: z.ZodOptional<z.ZodString>;
42
- has_filters: z.ZodOptional<z.ZodBoolean>;
43
- has_reads: z.ZodOptional<z.ZodBoolean>;
44
- has_searches: z.ZodOptional<z.ZodBoolean>;
45
- has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
46
- has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
47
- has_writes: z.ZodOptional<z.ZodBoolean>;
48
- is_invite: z.ZodOptional<z.ZodBoolean>;
49
- version: z.ZodOptional<z.ZodString>;
50
- visibility: z.ZodOptional<z.ZodString>;
51
- classification: z.ZodOptional<z.ZodString>;
52
- title: z.ZodString;
53
- key: z.ZodString;
54
- implementation_id: z.ZodString;
55
- }, z.core.$strip>;
56
- export type AppItem = z.infer<typeof AppItemSchema>;
57
- //# sourceMappingURL=App.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/schemas/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BzB,CAAC;AAMF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1,31 +0,0 @@
1
- import { z } from "zod";
2
- import { withFormatter } from "../utils/schema-utils";
3
- import { ImplementationMetaSchema } from "../api/schemas";
4
- import { toSnakeCase } from "../utils/string-utils";
5
- // ============================================================================
6
- // App Item Schema (extends ImplementationMetaSchema with transformed fields)
7
- // ============================================================================
8
- export const AppItemSchema = withFormatter(ImplementationMetaSchema.omit({ name: true, id: true }).extend({
9
- title: z.string(), // Mapped from name
10
- key: z.string(), // Extracted from id (base part without version)
11
- implementation_id: z.string(), // Mapped from id (full versioned ID)
12
- }), {
13
- format: (item) => {
14
- // Create additional keys if slug exists
15
- const additionalKeys = [];
16
- if (item.slug && item.slug !== item.key) {
17
- additionalKeys.push(item.slug);
18
- const snakeCaseSlug = toSnakeCase(item.slug);
19
- if (snakeCaseSlug !== item.slug && snakeCaseSlug !== item.key) {
20
- additionalKeys.push(snakeCaseSlug);
21
- }
22
- }
23
- return {
24
- title: item.title,
25
- key: item.key,
26
- keys: [item.key, ...additionalKeys],
27
- description: item.description,
28
- details: [],
29
- };
30
- },
31
- });
@@ -1,55 +0,0 @@
1
- import type { z } from "zod";
2
- export declare const AuthenticationItemSchema: z.ZodObject<{
3
- date: z.ZodString;
4
- lastchanged: z.ZodOptional<z.ZodString>;
5
- destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
- is_invite_only: z.ZodBoolean;
7
- is_private: z.ZodBoolean;
8
- shared_with_all: z.ZodBoolean;
9
- is_stale: z.ZodOptional<z.ZodString>;
10
- is_shared: z.ZodOptional<z.ZodString>;
11
- marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
- label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
- identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
- title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- url: z.ZodOptional<z.ZodString>;
16
- groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
17
- members: z.ZodOptional<z.ZodString>;
18
- permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
19
- id: z.ZodString;
20
- account_id: z.ZodString;
21
- implementation_id: z.ZodOptional<z.ZodString>;
22
- profile_id: z.ZodOptional<z.ZodString>;
23
- is_expired: z.ZodOptional<z.ZodString>;
24
- expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
- app_key: z.ZodOptional<z.ZodString>;
26
- app_version: z.ZodOptional<z.ZodString>;
27
- }, z.core.$strip>;
28
- export declare const AuthItemSchema: z.ZodObject<{
29
- date: z.ZodString;
30
- lastchanged: z.ZodOptional<z.ZodString>;
31
- destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
- is_invite_only: z.ZodBoolean;
33
- is_private: z.ZodBoolean;
34
- shared_with_all: z.ZodBoolean;
35
- is_stale: z.ZodOptional<z.ZodString>;
36
- is_shared: z.ZodOptional<z.ZodString>;
37
- marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
- label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
- identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
- title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
- url: z.ZodOptional<z.ZodString>;
42
- groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
43
- members: z.ZodOptional<z.ZodString>;
44
- permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
45
- id: z.ZodString;
46
- account_id: z.ZodString;
47
- implementation_id: z.ZodOptional<z.ZodString>;
48
- profile_id: z.ZodOptional<z.ZodString>;
49
- is_expired: z.ZodOptional<z.ZodString>;
50
- expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
- app_key: z.ZodOptional<z.ZodString>;
52
- app_version: z.ZodOptional<z.ZodString>;
53
- }, z.core.$strip>;
54
- export type AuthItem = z.infer<typeof AuthItemSchema>;
55
- //# sourceMappingURL=Auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../../src/schemas/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQ7B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;iBAgCpC,CAAC;AAGF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2B,CAAC;AAMvD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1,33 +0,0 @@
1
- import { withFormatter } from "../utils/schema-utils";
2
- import { AuthenticationItemSchema as AuthenticationItemSchemaBase } from "@zapier/zapier-sdk-core/v0/schemas/authentications";
3
- // ============================================================================
4
- // Authentication Item Schema (extends API schema with computed fields and formatting)
5
- // ============================================================================
6
- export const AuthenticationItemSchema = withFormatter(AuthenticationItemSchemaBase, {
7
- format: (item) => {
8
- const details = [];
9
- if (item.identifier) {
10
- details.push({
11
- text: `Identifier: ${item.identifier}`,
12
- style: "accent",
13
- });
14
- }
15
- details.push({
16
- text: `Account: ${item.account_id} | Private: ${item.is_private} | Shared: ${item.shared_with_all}`,
17
- style: "dim",
18
- });
19
- if (item.marked_stale_at) {
20
- details.push({
21
- text: `⚠️ Marked stale: ${new Date(item.marked_stale_at).toLocaleDateString()}`,
22
- style: "warning",
23
- });
24
- }
25
- return {
26
- title: item.title || `Authentication ${item.id}`,
27
- id: item.id?.toString(),
28
- details,
29
- };
30
- },
31
- });
32
- // Legacy alias for backward compatibility
33
- export const AuthItemSchema = AuthenticationItemSchema;
@@ -1,61 +0,0 @@
1
- import { z } from "zod";
2
- export declare const BaseFieldItemSchema: z.ZodObject<{
3
- type: z.ZodString;
4
- key: z.ZodString;
5
- }, z.core.$strip>;
6
- export declare const InputFieldItemSchema: z.ZodObject<{
7
- key: z.ZodString;
8
- type: z.ZodLiteral<"input_field">;
9
- default_value: z.ZodString;
10
- depends_on: z.ZodArray<z.ZodString>;
11
- description: z.ZodString;
12
- invalidates_input_fields: z.ZodBoolean;
13
- is_required: z.ZodBoolean;
14
- placeholder: z.ZodString;
15
- title: z.ZodString;
16
- value_type: z.ZodString;
17
- format: z.ZodOptional<z.ZodString>;
18
- items: z.ZodOptional<z.ZodObject<{
19
- type: z.ZodString;
20
- }, z.core.$strip>>;
21
- }, z.core.$strip>;
22
- export declare const InfoFieldItemSchema: z.ZodObject<{
23
- key: z.ZodString;
24
- type: z.ZodLiteral<"info_field">;
25
- description: z.ZodString;
26
- title: z.ZodOptional<z.ZodString>;
27
- }, z.core.$strip>;
28
- type FieldsetItemType = z.infer<typeof InputFieldItemSchema> | z.infer<typeof InfoFieldItemSchema> | FieldsetItem;
29
- export interface FieldsetItem {
30
- type: "fieldset";
31
- key: string;
32
- title: string;
33
- fields: FieldsetItemType[];
34
- }
35
- export declare const FieldsetItemSchema: z.ZodType<FieldsetItem>;
36
- export declare const RootFieldItemSchema: z.ZodUnion<readonly [z.ZodObject<{
37
- key: z.ZodString;
38
- type: z.ZodLiteral<"input_field">;
39
- default_value: z.ZodString;
40
- depends_on: z.ZodArray<z.ZodString>;
41
- description: z.ZodString;
42
- invalidates_input_fields: z.ZodBoolean;
43
- is_required: z.ZodBoolean;
44
- placeholder: z.ZodString;
45
- title: z.ZodString;
46
- value_type: z.ZodString;
47
- format: z.ZodOptional<z.ZodString>;
48
- items: z.ZodOptional<z.ZodObject<{
49
- type: z.ZodString;
50
- }, z.core.$strip>>;
51
- }, z.core.$strip>, z.ZodObject<{
52
- key: z.ZodString;
53
- type: z.ZodLiteral<"info_field">;
54
- description: z.ZodString;
55
- title: z.ZodOptional<z.ZodString>;
56
- }, z.core.$strip>, z.ZodType<FieldsetItem, unknown, z.core.$ZodTypeInternals<FieldsetItem, unknown>>]>;
57
- export type InputFieldItem = z.infer<typeof InputFieldItemSchema>;
58
- export type InfoFieldItem = z.infer<typeof InfoFieldItemSchema>;
59
- export type RootFieldItem = z.infer<typeof RootFieldItemSchema>;
60
- export {};
61
- //# sourceMappingURL=Field.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../src/schemas/Field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAMH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;iBAkFhC,CAAC;AAMF,eAAO,MAAM,mBAAmB;;;;;iBAc/B,CAAC;AAOF,KAAK,gBAAgB,GACjB,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GACpC,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,GACnC,YAAY,CAAC;AAEjB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAanD,CAAC;AAML,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;sGAI9B,CAAC;AAMH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1,116 +0,0 @@
1
- import { z } from "zod";
2
- import { withFormatter } from "../utils/schema-utils";
3
- // ============================================================================
4
- // Base Field Schema
5
- // ============================================================================
6
- export const BaseFieldItemSchema = z.object({
7
- type: z.string(), // "input_field", "info_field", or "fieldset"
8
- key: z.string(), // From need.key
9
- });
10
- // ============================================================================
11
- // Input Field Item Schema (extends API Need schema with computed fields and formatting)
12
- // ============================================================================
13
- export const InputFieldItemSchema = withFormatter(BaseFieldItemSchema.extend({
14
- type: z.literal("input_field"),
15
- default_value: z.string(), // Mapped from 'default' with fallback to ""
16
- depends_on: z.array(z.string()), // Mapped from 'depends_on' with fallback to []
17
- description: z.string(), // Mapped from 'help_text' with fallback to ""
18
- invalidates_input_fields: z.boolean(), // Mapped from 'alters_custom_fields' with fallback to false
19
- is_required: z.boolean(), // Mapped from 'required' with fallback to false
20
- placeholder: z.string(), // Mapped from 'placeholder' with fallback to ""
21
- title: z.string(), // Mapped from 'label' with fallback to ""
22
- value_type: z.string(), // Computed from InputFieldType enum
23
- format: z.string().optional(), // Computed from InputFieldFormat enum (optional)
24
- items: z.object({ type: z.string() }).optional(), // Computed from ItemsType enum (optional, only for arrays)
25
- }), {
26
- format: (item) => {
27
- const details = [];
28
- // Type and required status
29
- const typeInfo = [
30
- item.value_type && `Type: ${item.value_type}`,
31
- `Required: ${item.is_required ? "Yes" : "No"}`,
32
- ]
33
- .filter(Boolean)
34
- .join(" | ");
35
- if (typeInfo) {
36
- details.push({ text: typeInfo, style: "dim" });
37
- }
38
- // Description
39
- if (item.description) {
40
- details.push({
41
- text: item.description,
42
- style: "normal",
43
- });
44
- }
45
- // Default value
46
- if (item.default_value) {
47
- details.push({
48
- text: `Default: ${item.default_value}`,
49
- style: "accent",
50
- });
51
- }
52
- // Placeholder
53
- if (item.placeholder) {
54
- details.push({
55
- text: `Placeholder: ${item.placeholder}`,
56
- style: "dim",
57
- });
58
- }
59
- // Dependencies
60
- if (item.depends_on && item.depends_on.length > 0) {
61
- details.push({
62
- text: `Depends on: ${item.depends_on.join(", ")}`,
63
- style: "warning",
64
- });
65
- }
66
- // Format information
67
- if (item.format) {
68
- details.push({ text: `Format: ${item.format}`, style: "dim" });
69
- }
70
- // Items type for arrays
71
- if (item.items) {
72
- details.push({
73
- text: `Items type: ${item.items.type}`,
74
- style: "dim",
75
- });
76
- }
77
- return {
78
- title: item.title || item.key,
79
- key: item.key,
80
- description: item.description,
81
- details,
82
- };
83
- },
84
- });
85
- // ============================================================================
86
- // Info Field Item Schema (for help text and copy fields)
87
- // ============================================================================
88
- export const InfoFieldItemSchema = withFormatter(BaseFieldItemSchema.extend({
89
- type: z.literal("info_field"),
90
- description: z.string(), // From need.help_text
91
- title: z.string().optional(), // Optional title
92
- }), {
93
- format: (item) => ({
94
- title: item.title || "Info",
95
- key: item.key,
96
- description: item.description,
97
- details: [{ text: item.description, style: "normal" }],
98
- }),
99
- });
100
- export const FieldsetItemSchema = BaseFieldItemSchema.extend({
101
- type: z.literal("fieldset"),
102
- title: z.string(),
103
- fields: z.lazy(() => z.array(z.union([
104
- InputFieldItemSchema,
105
- InfoFieldItemSchema,
106
- FieldsetItemSchema,
107
- ]))),
108
- });
109
- // ============================================================================
110
- // Root Field Item Schema (union of all possible field types)
111
- // ============================================================================
112
- export const RootFieldItemSchema = z.union([
113
- InputFieldItemSchema,
114
- InfoFieldItemSchema,
115
- FieldsetItemSchema,
116
- ]);
@@ -1,3 +0,0 @@
1
- import { z } from "zod";
2
- export declare const ActionResultItemSchema: z.ZodUnknown;
3
- //# sourceMappingURL=Run.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Run.d.ts","sourceRoot":"","sources":["../../src/schemas/Run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoCxB,eAAO,MAAM,sBAAsB,cAGlC,CAAC"}
@@ -1,31 +0,0 @@
1
- import { z } from "zod";
2
- import { withFormatter } from "../utils/schema-utils";
3
- // Type guard to safely access object properties
4
- function getStringProperty(obj, key) {
5
- if (typeof obj === "object" && obj !== null && key in obj) {
6
- const value = obj[key];
7
- return typeof value === "string" ? value : undefined;
8
- }
9
- return undefined;
10
- }
11
- // Formatter for action results - handles any data structure
12
- function formatActionResult(item) {
13
- // Try to extract common fields for structured display
14
- const obj = typeof item === "object" && item !== null ? item : {};
15
- // Try common title fields
16
- const title = getStringProperty(obj, "title") ||
17
- getStringProperty(obj, "name") ||
18
- getStringProperty(obj, "label") ||
19
- getStringProperty(obj, "subject") ||
20
- "Action Result";
21
- return {
22
- title,
23
- id: getStringProperty(obj, "id"),
24
- key: getStringProperty(obj, "key"),
25
- description: getStringProperty(obj, "description"),
26
- data: item, // Let formatJsonOutput handle the JSON rendering
27
- details: [], // Not used when data is provided
28
- };
29
- }
30
- // Flexible schema for action results - can be any object
31
- export const ActionResultItemSchema = withFormatter(z.unknown().describe("Action execution result"), { format: formatActionResult });
@@ -1,13 +0,0 @@
1
- import { z } from "zod";
2
- export { FormattedItem, FormatMetadata } from "../utils/schema-utils";
3
- export declare const UserProfileItemSchema: z.ZodObject<{
4
- id: z.ZodString;
5
- first_name: z.ZodString;
6
- last_name: z.ZodString;
7
- full_name: z.ZodString;
8
- email: z.ZodString;
9
- email_confirmed: z.ZodBoolean;
10
- timezone: z.ZodString;
11
- }, z.core.$strip>;
12
- export type UserProfileItem = z.infer<typeof UserProfileItemSchema>;
13
- //# sourceMappingURL=UserProfile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserProfile.d.ts","sourceRoot":"","sources":["../../src/schemas/UserProfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMtE,eAAO,MAAM,qBAAqB;;;;;;;;iBA+BjC,CAAC;AAMF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- import { z } from "zod";
2
- import { withFormatter } from "../utils/schema-utils";
3
- // ============================================================================
4
- // User Profile Item Schema
5
- // ============================================================================
6
- export const UserProfileItemSchema = withFormatter(z.object({
7
- id: z.string(),
8
- first_name: z.string(),
9
- last_name: z.string(),
10
- full_name: z.string(),
11
- email: z.string(),
12
- email_confirmed: z.boolean(),
13
- timezone: z.string(),
14
- }), {
15
- format: (item) => {
16
- const details = [];
17
- if ("email" in item) {
18
- details.push({ text: item.email, style: "dim" });
19
- }
20
- if ("timezone" in item && item.timezone) {
21
- details.push({
22
- text: `Timezone: ${item.timezone}`,
23
- style: "accent",
24
- });
25
- }
26
- return {
27
- title: item.full_name,
28
- id: item.id,
29
- details,
30
- };
31
- },
32
- });