@zapier/zapier-sdk 0.18.4 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +43 -31
  3. package/dist/index.cjs +365 -64
  4. package/dist/index.d.mts +220 -33
  5. package/dist/index.d.ts +2541 -40
  6. package/dist/index.mjs +345 -63
  7. package/package.json +14 -13
  8. package/dist/api/auth.d.ts +0 -19
  9. package/dist/api/auth.d.ts.map +0 -1
  10. package/dist/api/auth.js +0 -70
  11. package/dist/api/auth.test.d.ts +0 -2
  12. package/dist/api/auth.test.d.ts.map +0 -1
  13. package/dist/api/auth.test.js +0 -220
  14. package/dist/api/client.d.ts +0 -9
  15. package/dist/api/client.d.ts.map +0 -1
  16. package/dist/api/client.js +0 -356
  17. package/dist/api/client.test.d.ts +0 -2
  18. package/dist/api/client.test.d.ts.map +0 -1
  19. package/dist/api/client.test.js +0 -96
  20. package/dist/api/debug.d.ts +0 -14
  21. package/dist/api/debug.d.ts.map +0 -1
  22. package/dist/api/debug.js +0 -131
  23. package/dist/api/debug.test.d.ts +0 -2
  24. package/dist/api/debug.test.d.ts.map +0 -1
  25. package/dist/api/debug.test.js +0 -59
  26. package/dist/api/index.d.ts +0 -30
  27. package/dist/api/index.d.ts.map +0 -1
  28. package/dist/api/index.js +0 -43
  29. package/dist/api/polling.d.ts +0 -46
  30. package/dist/api/polling.d.ts.map +0 -1
  31. package/dist/api/polling.js +0 -139
  32. package/dist/api/polling.test.d.ts +0 -2
  33. package/dist/api/polling.test.d.ts.map +0 -1
  34. package/dist/api/polling.test.js +0 -318
  35. package/dist/api/schemas.d.ts +0 -422
  36. package/dist/api/schemas.d.ts.map +0 -1
  37. package/dist/api/schemas.js +0 -322
  38. package/dist/api/types.d.ts +0 -83
  39. package/dist/api/types.d.ts.map +0 -1
  40. package/dist/api/types.js +0 -1
  41. package/dist/auth.d.ts +0 -52
  42. package/dist/auth.d.ts.map +0 -1
  43. package/dist/auth.js +0 -72
  44. package/dist/auth.test.d.ts +0 -2
  45. package/dist/auth.test.d.ts.map +0 -1
  46. package/dist/auth.test.js +0 -102
  47. package/dist/constants.d.ts +0 -14
  48. package/dist/constants.d.ts.map +0 -1
  49. package/dist/constants.js +0 -13
  50. package/dist/index.d.ts.map +0 -1
  51. package/dist/index.js +0 -42
  52. package/dist/plugins/api/index.d.ts +0 -12
  53. package/dist/plugins/api/index.d.ts.map +0 -1
  54. package/dist/plugins/api/index.js +0 -24
  55. package/dist/plugins/apps/index.d.ts +0 -15
  56. package/dist/plugins/apps/index.d.ts.map +0 -1
  57. package/dist/plugins/apps/index.js +0 -112
  58. package/dist/plugins/apps/schemas.d.ts +0 -42
  59. package/dist/plugins/apps/schemas.d.ts.map +0 -1
  60. package/dist/plugins/apps/schemas.js +0 -14
  61. package/dist/plugins/eventEmission/builders.d.ts +0 -14
  62. package/dist/plugins/eventEmission/builders.d.ts.map +0 -1
  63. package/dist/plugins/eventEmission/builders.js +0 -109
  64. package/dist/plugins/eventEmission/index.d.ts +0 -38
  65. package/dist/plugins/eventEmission/index.d.ts.map +0 -1
  66. package/dist/plugins/eventEmission/index.js +0 -336
  67. package/dist/plugins/eventEmission/index.test.d.ts +0 -5
  68. package/dist/plugins/eventEmission/index.test.d.ts.map +0 -1
  69. package/dist/plugins/eventEmission/index.test.js +0 -581
  70. package/dist/plugins/eventEmission/transport.d.ts +0 -27
  71. package/dist/plugins/eventEmission/transport.d.ts.map +0 -1
  72. package/dist/plugins/eventEmission/transport.js +0 -104
  73. package/dist/plugins/eventEmission/transport.test.d.ts +0 -5
  74. package/dist/plugins/eventEmission/transport.test.d.ts.map +0 -1
  75. package/dist/plugins/eventEmission/transport.test.js +0 -164
  76. package/dist/plugins/eventEmission/types.d.ts +0 -63
  77. package/dist/plugins/eventEmission/types.d.ts.map +0 -1
  78. package/dist/plugins/eventEmission/types.js +0 -1
  79. package/dist/plugins/eventEmission/utils.d.ts +0 -45
  80. package/dist/plugins/eventEmission/utils.d.ts.map +0 -1
  81. package/dist/plugins/eventEmission/utils.js +0 -114
  82. package/dist/plugins/fetch/index.d.ts +0 -36
  83. package/dist/plugins/fetch/index.d.ts.map +0 -1
  84. package/dist/plugins/fetch/index.js +0 -62
  85. package/dist/plugins/fetch/schemas.d.ts +0 -19
  86. package/dist/plugins/fetch/schemas.d.ts.map +0 -1
  87. package/dist/plugins/fetch/schemas.js +0 -31
  88. package/dist/plugins/findFirstAuthentication/index.d.ts +0 -21
  89. package/dist/plugins/findFirstAuthentication/index.d.ts.map +0 -1
  90. package/dist/plugins/findFirstAuthentication/index.js +0 -36
  91. package/dist/plugins/findFirstAuthentication/index.test.d.ts +0 -2
  92. package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +0 -1
  93. package/dist/plugins/findFirstAuthentication/index.test.js +0 -177
  94. package/dist/plugins/findFirstAuthentication/schemas.d.ts +0 -20
  95. package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +0 -1
  96. package/dist/plugins/findFirstAuthentication/schemas.js +0 -18
  97. package/dist/plugins/findUniqueAuthentication/index.d.ts +0 -21
  98. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +0 -1
  99. package/dist/plugins/findUniqueAuthentication/index.js +0 -39
  100. package/dist/plugins/findUniqueAuthentication/index.test.d.ts +0 -2
  101. package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +0 -1
  102. package/dist/plugins/findUniqueAuthentication/index.test.js +0 -159
  103. package/dist/plugins/findUniqueAuthentication/schemas.d.ts +0 -20
  104. package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +0 -1
  105. package/dist/plugins/findUniqueAuthentication/schemas.js +0 -18
  106. package/dist/plugins/getAction/index.d.ts +0 -25
  107. package/dist/plugins/getAction/index.d.ts.map +0 -1
  108. package/dist/plugins/getAction/index.js +0 -42
  109. package/dist/plugins/getAction/index.test.d.ts +0 -2
  110. package/dist/plugins/getAction/index.test.d.ts.map +0 -1
  111. package/dist/plugins/getAction/index.test.js +0 -211
  112. package/dist/plugins/getAction/schemas.d.ts +0 -30
  113. package/dist/plugins/getAction/schemas.d.ts.map +0 -1
  114. package/dist/plugins/getAction/schemas.js +0 -12
  115. package/dist/plugins/getApp/index.d.ts +0 -21
  116. package/dist/plugins/getApp/index.d.ts.map +0 -1
  117. package/dist/plugins/getApp/index.js +0 -44
  118. package/dist/plugins/getApp/index.test.d.ts +0 -2
  119. package/dist/plugins/getApp/index.test.d.ts.map +0 -1
  120. package/dist/plugins/getApp/index.test.js +0 -157
  121. package/dist/plugins/getApp/schemas.d.ts +0 -16
  122. package/dist/plugins/getApp/schemas.d.ts.map +0 -1
  123. package/dist/plugins/getApp/schemas.js +0 -8
  124. package/dist/plugins/getAuthentication/index.d.ts +0 -21
  125. package/dist/plugins/getAuthentication/index.d.ts.map +0 -1
  126. package/dist/plugins/getAuthentication/index.js +0 -29
  127. package/dist/plugins/getAuthentication/index.test.d.ts +0 -2
  128. package/dist/plugins/getAuthentication/index.test.d.ts.map +0 -1
  129. package/dist/plugins/getAuthentication/index.test.js +0 -106
  130. package/dist/plugins/getAuthentication/schemas.d.ts +0 -7
  131. package/dist/plugins/getAuthentication/schemas.d.ts.map +0 -1
  132. package/dist/plugins/getAuthentication/schemas.js +0 -1
  133. package/dist/plugins/getInputFieldsSchema/index.d.ts +0 -23
  134. package/dist/plugins/getInputFieldsSchema/index.d.ts.map +0 -1
  135. package/dist/plugins/getInputFieldsSchema/index.js +0 -53
  136. package/dist/plugins/getInputFieldsSchema/index.test.d.ts +0 -2
  137. package/dist/plugins/getInputFieldsSchema/index.test.d.ts.map +0 -1
  138. package/dist/plugins/getInputFieldsSchema/index.test.js +0 -291
  139. package/dist/plugins/getInputFieldsSchema/schemas.d.ts +0 -28
  140. package/dist/plugins/getInputFieldsSchema/schemas.d.ts.map +0 -1
  141. package/dist/plugins/getInputFieldsSchema/schemas.js +0 -13
  142. package/dist/plugins/getProfile/index.d.ts +0 -25
  143. package/dist/plugins/getProfile/index.d.ts.map +0 -1
  144. package/dist/plugins/getProfile/index.js +0 -39
  145. package/dist/plugins/getProfile/schemas.d.ts +0 -13
  146. package/dist/plugins/getProfile/schemas.d.ts.map +0 -1
  147. package/dist/plugins/getProfile/schemas.js +0 -6
  148. package/dist/plugins/listActions/index.d.ts +0 -30
  149. package/dist/plugins/listActions/index.d.ts.map +0 -1
  150. package/dist/plugins/listActions/index.js +0 -75
  151. package/dist/plugins/listActions/index.test.d.ts +0 -2
  152. package/dist/plugins/listActions/index.test.d.ts.map +0 -1
  153. package/dist/plugins/listActions/index.test.js +0 -453
  154. package/dist/plugins/listActions/schemas.d.ts +0 -35
  155. package/dist/plugins/listActions/schemas.d.ts.map +0 -1
  156. package/dist/plugins/listActions/schemas.js +0 -22
  157. package/dist/plugins/listApps/index.d.ts +0 -19
  158. package/dist/plugins/listApps/index.d.ts.map +0 -1
  159. package/dist/plugins/listApps/index.js +0 -67
  160. package/dist/plugins/listApps/index.test.d.ts +0 -2
  161. package/dist/plugins/listApps/index.test.d.ts.map +0 -1
  162. package/dist/plugins/listApps/index.test.js +0 -121
  163. package/dist/plugins/listApps/schemas.d.ts +0 -47
  164. package/dist/plugins/listApps/schemas.d.ts.map +0 -1
  165. package/dist/plugins/listApps/schemas.js +0 -49
  166. package/dist/plugins/listAuthentications/index.d.ts +0 -24
  167. package/dist/plugins/listAuthentications/index.d.ts.map +0 -1
  168. package/dist/plugins/listAuthentications/index.js +0 -77
  169. package/dist/plugins/listAuthentications/index.test.d.ts +0 -2
  170. package/dist/plugins/listAuthentications/index.test.d.ts.map +0 -1
  171. package/dist/plugins/listAuthentications/index.test.js +0 -848
  172. package/dist/plugins/listAuthentications/schemas.d.ts +0 -30
  173. package/dist/plugins/listAuthentications/schemas.d.ts.map +0 -1
  174. package/dist/plugins/listAuthentications/schemas.js +0 -32
  175. package/dist/plugins/listInputFieldChoices/index.d.ts +0 -33
  176. package/dist/plugins/listInputFieldChoices/index.d.ts.map +0 -1
  177. package/dist/plugins/listInputFieldChoices/index.js +0 -115
  178. package/dist/plugins/listInputFieldChoices/index.test.d.ts +0 -2
  179. package/dist/plugins/listInputFieldChoices/index.test.d.ts.map +0 -1
  180. package/dist/plugins/listInputFieldChoices/index.test.js +0 -717
  181. package/dist/plugins/listInputFieldChoices/schemas.d.ts +0 -43
  182. package/dist/plugins/listInputFieldChoices/schemas.d.ts.map +0 -1
  183. package/dist/plugins/listInputFieldChoices/schemas.js +0 -65
  184. package/dist/plugins/listInputFields/index.d.ts +0 -34
  185. package/dist/plugins/listInputFields/index.d.ts.map +0 -1
  186. package/dist/plugins/listInputFields/index.js +0 -204
  187. package/dist/plugins/listInputFields/index.test.d.ts +0 -2
  188. package/dist/plugins/listInputFields/index.test.d.ts.map +0 -1
  189. package/dist/plugins/listInputFields/index.test.js +0 -359
  190. package/dist/plugins/listInputFields/schemas.d.ts +0 -35
  191. package/dist/plugins/listInputFields/schemas.d.ts.map +0 -1
  192. package/dist/plugins/listInputFields/schemas.js +0 -23
  193. package/dist/plugins/manifest/index.d.ts +0 -85
  194. package/dist/plugins/manifest/index.d.ts.map +0 -1
  195. package/dist/plugins/manifest/index.js +0 -376
  196. package/dist/plugins/manifest/index.test.d.ts +0 -2
  197. package/dist/plugins/manifest/index.test.d.ts.map +0 -1
  198. package/dist/plugins/manifest/index.test.js +0 -1139
  199. package/dist/plugins/manifest/schemas.d.ts +0 -57
  200. package/dist/plugins/manifest/schemas.d.ts.map +0 -1
  201. package/dist/plugins/manifest/schemas.js +0 -50
  202. package/dist/plugins/registry/index.d.ts +0 -21
  203. package/dist/plugins/registry/index.d.ts.map +0 -1
  204. package/dist/plugins/registry/index.js +0 -117
  205. package/dist/plugins/request/index.d.ts +0 -21
  206. package/dist/plugins/request/index.d.ts.map +0 -1
  207. package/dist/plugins/request/index.js +0 -76
  208. package/dist/plugins/request/index.test.d.ts +0 -2
  209. package/dist/plugins/request/index.test.d.ts.map +0 -1
  210. package/dist/plugins/request/index.test.js +0 -337
  211. package/dist/plugins/request/schemas.d.ts +0 -54
  212. package/dist/plugins/request/schemas.d.ts.map +0 -1
  213. package/dist/plugins/request/schemas.js +0 -41
  214. package/dist/plugins/runAction/index.d.ts +0 -33
  215. package/dist/plugins/runAction/index.d.ts.map +0 -1
  216. package/dist/plugins/runAction/index.js +0 -108
  217. package/dist/plugins/runAction/index.test.d.ts +0 -2
  218. package/dist/plugins/runAction/index.test.d.ts.map +0 -1
  219. package/dist/plugins/runAction/index.test.js +0 -333
  220. package/dist/plugins/runAction/schemas.d.ts +0 -34
  221. package/dist/plugins/runAction/schemas.d.ts.map +0 -1
  222. package/dist/plugins/runAction/schemas.js +0 -23
  223. package/dist/resolvers/actionKey.d.ts +0 -15
  224. package/dist/resolvers/actionKey.d.ts.map +0 -1
  225. package/dist/resolvers/actionKey.js +0 -19
  226. package/dist/resolvers/actionType.d.ts +0 -10
  227. package/dist/resolvers/actionType.d.ts.map +0 -1
  228. package/dist/resolvers/actionType.js +0 -21
  229. package/dist/resolvers/appKey.d.ts +0 -3
  230. package/dist/resolvers/appKey.d.ts.map +0 -1
  231. package/dist/resolvers/appKey.js +0 -5
  232. package/dist/resolvers/authenticationId.d.ts +0 -9
  233. package/dist/resolvers/authenticationId.d.ts.map +0 -1
  234. package/dist/resolvers/authenticationId.js +0 -42
  235. package/dist/resolvers/index.d.ts +0 -8
  236. package/dist/resolvers/index.d.ts.map +0 -1
  237. package/dist/resolvers/index.js +0 -8
  238. package/dist/resolvers/inputFieldKey.d.ts +0 -11
  239. package/dist/resolvers/inputFieldKey.d.ts.map +0 -1
  240. package/dist/resolvers/inputFieldKey.js +0 -47
  241. package/dist/resolvers/inputs.d.ts +0 -17
  242. package/dist/resolvers/inputs.d.ts.map +0 -1
  243. package/dist/resolvers/inputs.js +0 -50
  244. package/dist/schemas/Action.d.ts +0 -24
  245. package/dist/schemas/Action.d.ts.map +0 -1
  246. package/dist/schemas/Action.js +0 -40
  247. package/dist/schemas/App.d.ts +0 -57
  248. package/dist/schemas/App.d.ts.map +0 -1
  249. package/dist/schemas/App.js +0 -26
  250. package/dist/schemas/Auth.d.ts +0 -55
  251. package/dist/schemas/Auth.d.ts.map +0 -1
  252. package/dist/schemas/Auth.js +0 -33
  253. package/dist/schemas/Field.d.ts +0 -61
  254. package/dist/schemas/Field.d.ts.map +0 -1
  255. package/dist/schemas/Field.js +0 -116
  256. package/dist/schemas/Run.d.ts +0 -3
  257. package/dist/schemas/Run.d.ts.map +0 -1
  258. package/dist/schemas/Run.js +0 -31
  259. package/dist/schemas/UserProfile.d.ts +0 -13
  260. package/dist/schemas/UserProfile.d.ts.map +0 -1
  261. package/dist/schemas/UserProfile.js +0 -32
  262. package/dist/sdk.d.ts +0 -146
  263. package/dist/sdk.d.ts.map +0 -1
  264. package/dist/sdk.js +0 -112
  265. package/dist/sdk.test.d.ts +0 -2
  266. package/dist/sdk.test.d.ts.map +0 -1
  267. package/dist/sdk.test.js +0 -258
  268. package/dist/services/implementations.d.ts +0 -63
  269. package/dist/services/implementations.d.ts.map +0 -1
  270. package/dist/services/implementations.js +0 -80
  271. package/dist/types/domain.d.ts +0 -52
  272. package/dist/types/domain.d.ts.map +0 -1
  273. package/dist/types/domain.js +0 -1
  274. package/dist/types/domain.test.d.ts +0 -2
  275. package/dist/types/domain.test.d.ts.map +0 -1
  276. package/dist/types/domain.test.js +0 -39
  277. package/dist/types/errors.d.ts +0 -143
  278. package/dist/types/errors.d.ts.map +0 -1
  279. package/dist/types/errors.js +0 -187
  280. package/dist/types/events.d.ts +0 -38
  281. package/dist/types/events.d.ts.map +0 -1
  282. package/dist/types/events.js +0 -7
  283. package/dist/types/functions.d.ts +0 -27
  284. package/dist/types/functions.d.ts.map +0 -1
  285. package/dist/types/functions.js +0 -1
  286. package/dist/types/plugin.d.ts +0 -75
  287. package/dist/types/plugin.d.ts.map +0 -1
  288. package/dist/types/plugin.js +0 -9
  289. package/dist/types/properties.d.ts +0 -33
  290. package/dist/types/properties.d.ts.map +0 -1
  291. package/dist/types/properties.js +0 -52
  292. package/dist/types/sdk.d.ts +0 -69
  293. package/dist/types/sdk.d.ts.map +0 -1
  294. package/dist/types/sdk.js +0 -4
  295. package/dist/types/telemetry-events.d.ts +0 -105
  296. package/dist/types/telemetry-events.d.ts.map +0 -1
  297. package/dist/types/telemetry-events.js +0 -8
  298. package/dist/utils/array-utils.d.ts +0 -31
  299. package/dist/utils/array-utils.d.ts.map +0 -1
  300. package/dist/utils/array-utils.js +0 -36
  301. package/dist/utils/array-utils.test.d.ts +0 -2
  302. package/dist/utils/array-utils.test.d.ts.map +0 -1
  303. package/dist/utils/array-utils.test.js +0 -107
  304. package/dist/utils/batch-utils.d.ts +0 -72
  305. package/dist/utils/batch-utils.d.ts.map +0 -1
  306. package/dist/utils/batch-utils.js +0 -162
  307. package/dist/utils/batch-utils.test.d.ts +0 -2
  308. package/dist/utils/batch-utils.test.d.ts.map +0 -1
  309. package/dist/utils/batch-utils.test.js +0 -476
  310. package/dist/utils/domain-utils.d.ts +0 -66
  311. package/dist/utils/domain-utils.d.ts.map +0 -1
  312. package/dist/utils/domain-utils.js +0 -164
  313. package/dist/utils/domain-utils.test.d.ts +0 -2
  314. package/dist/utils/domain-utils.test.d.ts.map +0 -1
  315. package/dist/utils/domain-utils.test.js +0 -346
  316. package/dist/utils/file-utils.d.ts +0 -4
  317. package/dist/utils/file-utils.d.ts.map +0 -1
  318. package/dist/utils/file-utils.js +0 -74
  319. package/dist/utils/file-utils.test.d.ts +0 -2
  320. package/dist/utils/file-utils.test.d.ts.map +0 -1
  321. package/dist/utils/file-utils.test.js +0 -51
  322. package/dist/utils/function-utils.d.ts +0 -73
  323. package/dist/utils/function-utils.d.ts.map +0 -1
  324. package/dist/utils/function-utils.js +0 -245
  325. package/dist/utils/function-utils.test.d.ts +0 -2
  326. package/dist/utils/function-utils.test.d.ts.map +0 -1
  327. package/dist/utils/function-utils.test.js +0 -110
  328. package/dist/utils/id-utils.d.ts +0 -13
  329. package/dist/utils/id-utils.d.ts.map +0 -1
  330. package/dist/utils/id-utils.js +0 -22
  331. package/dist/utils/id-utils.test.d.ts +0 -2
  332. package/dist/utils/id-utils.test.d.ts.map +0 -1
  333. package/dist/utils/id-utils.test.js +0 -22
  334. package/dist/utils/pagination-utils.d.ts +0 -37
  335. package/dist/utils/pagination-utils.d.ts.map +0 -1
  336. package/dist/utils/pagination-utils.js +0 -165
  337. package/dist/utils/pagination-utils.test.d.ts +0 -17
  338. package/dist/utils/pagination-utils.test.d.ts.map +0 -1
  339. package/dist/utils/pagination-utils.test.js +0 -461
  340. package/dist/utils/retry-utils.d.ts +0 -45
  341. package/dist/utils/retry-utils.d.ts.map +0 -1
  342. package/dist/utils/retry-utils.js +0 -51
  343. package/dist/utils/retry-utils.test.d.ts +0 -2
  344. package/dist/utils/retry-utils.test.d.ts.map +0 -1
  345. package/dist/utils/retry-utils.test.js +0 -90
  346. package/dist/utils/schema-utils.d.ts +0 -69
  347. package/dist/utils/schema-utils.d.ts.map +0 -1
  348. package/dist/utils/schema-utils.js +0 -72
  349. package/dist/utils/string-utils.d.ts +0 -40
  350. package/dist/utils/string-utils.d.ts.map +0 -1
  351. package/dist/utils/string-utils.js +0 -69
  352. package/dist/utils/string-utils.test.d.ts +0 -2
  353. package/dist/utils/string-utils.test.d.ts.map +0 -1
  354. package/dist/utils/string-utils.test.js +0 -59
  355. package/dist/utils/telemetry-utils.d.ts +0 -44
  356. package/dist/utils/telemetry-utils.d.ts.map +0 -1
  357. package/dist/utils/telemetry-utils.js +0 -55
  358. package/dist/utils/telemetry-utils.test.d.ts +0 -2
  359. package/dist/utils/telemetry-utils.test.d.ts.map +0 -1
  360. package/dist/utils/telemetry-utils.test.js +0 -94
  361. package/dist/utils/url-utils.d.ts +0 -19
  362. package/dist/utils/url-utils.d.ts.map +0 -1
  363. package/dist/utils/url-utils.js +0 -62
  364. package/dist/utils/url-utils.test.d.ts +0 -2
  365. package/dist/utils/url-utils.test.d.ts.map +0 -1
  366. package/dist/utils/url-utils.test.js +0 -103
  367. package/dist/utils/validation.d.ts +0 -4
  368. package/dist/utils/validation.d.ts.map +0 -1
  369. package/dist/utils/validation.js +0 -30
  370. package/dist/utils/validation.test.d.ts +0 -2
  371. package/dist/utils/validation.test.d.ts.map +0 -1
  372. package/dist/utils/validation.test.js +0 -44
@@ -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 type { z } from "zod";
2
- export { FormattedItem, FormatMetadata } from "../utils/schema-utils";
3
- export declare const AppItemSchema: z.ZodObject<{
4
- slug: z.ZodString;
5
- age_in_days: z.ZodOptional<z.ZodNumber>;
6
- auth_type: z.ZodOptional<z.ZodString>;
7
- banner: z.ZodOptional<z.ZodString>;
8
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
9
- id: z.ZodNumber;
10
- name: z.ZodString;
11
- slug: z.ZodString;
12
- }, z.core.$strip>>>;
13
- images: z.ZodOptional<z.ZodObject<{
14
- url_16x16: z.ZodOptional<z.ZodString>;
15
- url_32x32: z.ZodOptional<z.ZodString>;
16
- url_64x64: z.ZodOptional<z.ZodString>;
17
- url_128x128: z.ZodOptional<z.ZodString>;
18
- }, z.core.$strip>>;
19
- popularity: z.ZodOptional<z.ZodNumber>;
20
- has_filters: z.ZodOptional<z.ZodBoolean>;
21
- has_reads: z.ZodOptional<z.ZodBoolean>;
22
- has_searches: z.ZodOptional<z.ZodBoolean>;
23
- has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
24
- has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
25
- has_writes: z.ZodOptional<z.ZodBoolean>;
26
- is_beta: z.ZodOptional<z.ZodBoolean>;
27
- is_built_in: z.ZodOptional<z.ZodBoolean>;
28
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
29
- is_featured: z.ZodOptional<z.ZodBoolean>;
30
- is_hidden: z.ZodOptional<z.ZodBoolean>;
31
- is_invite: z.ZodOptional<z.ZodBoolean>;
32
- is_premium: z.ZodOptional<z.ZodBoolean>;
33
- is_public: z.ZodOptional<z.ZodBoolean>;
34
- is_upcoming: z.ZodOptional<z.ZodBoolean>;
35
- visibility: z.ZodOptional<z.ZodString>;
36
- actions: z.ZodOptional<z.ZodObject<{
37
- read: z.ZodOptional<z.ZodNumber>;
38
- read_bulk: z.ZodOptional<z.ZodNumber>;
39
- write: z.ZodOptional<z.ZodNumber>;
40
- search: z.ZodOptional<z.ZodNumber>;
41
- search_or_write: z.ZodOptional<z.ZodNumber>;
42
- search_and_write: z.ZodOptional<z.ZodNumber>;
43
- filter: z.ZodOptional<z.ZodNumber>;
44
- }, z.core.$strip>>;
45
- description: z.ZodOptional<z.ZodString>;
46
- primary_color: z.ZodOptional<z.ZodString>;
47
- secondary_color: z.ZodOptional<z.ZodString>;
48
- classification: z.ZodOptional<z.ZodString>;
49
- api_docs_url: z.ZodOptional<z.ZodString>;
50
- image: z.ZodOptional<z.ZodString>;
51
- title: z.ZodString;
52
- key: z.ZodString;
53
- implementation_id: z.ZodString;
54
- version: z.ZodOptional<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,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAK7B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBxB,CAAC;AAMH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1,26 +0,0 @@
1
- import { withFormatter } from "../utils/schema-utils";
2
- import { AppItemSchema as AppItemSchemaBase } from "@zapier/zapier-sdk-core/v0/schemas/apps";
3
- import { toSnakeCase } from "../utils/string-utils";
4
- // ============================================================================
5
- // App Item Schema (wraps core schema with SDK-specific formatting)
6
- // ============================================================================
7
- export const AppItemSchema = withFormatter(AppItemSchemaBase, {
8
- format: (item) => {
9
- // Create additional keys if slug exists
10
- const additionalKeys = [];
11
- if (item.slug && item.slug !== item.key) {
12
- additionalKeys.push(item.slug);
13
- const snakeCaseSlug = toSnakeCase(item.slug);
14
- if (snakeCaseSlug !== item.slug && snakeCaseSlug !== item.key) {
15
- additionalKeys.push(snakeCaseSlug);
16
- }
17
- }
18
- return {
19
- title: item.title,
20
- key: item.key,
21
- keys: [item.key, ...additionalKeys],
22
- description: item.description,
23
- details: [],
24
- };
25
- },
26
- });
@@ -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
- });