@zapier/zapier-sdk 0.4.1 → 0.5.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 (374) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/api/auth.d.ts +9 -0
  3. package/dist/api/auth.d.ts.map +1 -0
  4. package/dist/api/auth.js +25 -0
  5. package/dist/api/client.d.ts +9 -0
  6. package/dist/api/client.d.ts.map +1 -0
  7. package/dist/api/client.js +322 -0
  8. package/dist/api/debug.d.ts +13 -0
  9. package/dist/api/debug.d.ts.map +1 -0
  10. package/dist/api/debug.js +55 -0
  11. package/dist/api/index.d.ts +29 -0
  12. package/dist/api/index.d.ts.map +1 -0
  13. package/dist/api/index.js +41 -0
  14. package/dist/api/polling.d.ts +16 -0
  15. package/dist/api/polling.d.ts.map +1 -0
  16. package/dist/api/polling.js +45 -0
  17. package/dist/api/schemas.d.ts +2473 -0
  18. package/dist/api/schemas.d.ts.map +1 -0
  19. package/dist/api/schemas.js +355 -0
  20. package/dist/api/types.d.ts +75 -0
  21. package/dist/api/types.d.ts.map +1 -0
  22. package/dist/api/types.js +11 -0
  23. package/dist/auth.d.ts +34 -0
  24. package/dist/auth.d.ts.map +1 -0
  25. package/dist/auth.js +47 -0
  26. package/dist/constants.d.ts +10 -0
  27. package/dist/constants.d.ts.map +1 -0
  28. package/dist/constants.js +9 -0
  29. package/dist/index.cjs +2108 -1379
  30. package/dist/index.d.mts +2440 -620
  31. package/dist/index.d.ts +17 -892
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +20 -0
  34. package/dist/index.mjs +2093 -1362
  35. package/dist/plugins/api/index.d.ts +14 -0
  36. package/dist/plugins/api/index.d.ts.map +1 -0
  37. package/dist/plugins/api/index.js +21 -0
  38. package/dist/plugins/apps/index.d.ts +11 -0
  39. package/dist/plugins/apps/index.d.ts.map +1 -0
  40. package/dist/plugins/apps/index.js +91 -0
  41. package/dist/plugins/apps/types.d.ts +30 -0
  42. package/dist/plugins/apps/types.d.ts.map +1 -0
  43. package/dist/plugins/apps/types.js +2 -0
  44. package/dist/plugins/fetch/index.d.ts +21 -0
  45. package/dist/plugins/fetch/index.d.ts.map +1 -0
  46. package/dist/plugins/fetch/index.js +20 -0
  47. package/dist/plugins/findFirstAuthentication/index.d.ts +20 -0
  48. package/dist/plugins/findFirstAuthentication/index.d.ts.map +1 -0
  49. package/dist/plugins/findFirstAuthentication/index.js +24 -0
  50. package/dist/plugins/findFirstAuthentication/index.test.d.ts +2 -0
  51. package/dist/plugins/findFirstAuthentication/index.test.d.ts.map +1 -0
  52. package/dist/plugins/findFirstAuthentication/index.test.js +171 -0
  53. package/dist/plugins/findFirstAuthentication/schemas.d.ts +29 -0
  54. package/dist/plugins/findFirstAuthentication/schemas.d.ts.map +1 -0
  55. package/dist/plugins/findFirstAuthentication/schemas.js +18 -0
  56. package/dist/plugins/findUniqueAuthentication/index.d.ts +20 -0
  57. package/dist/plugins/findUniqueAuthentication/index.d.ts.map +1 -0
  58. package/dist/plugins/findUniqueAuthentication/index.js +31 -0
  59. package/dist/plugins/findUniqueAuthentication/index.test.d.ts +2 -0
  60. package/dist/plugins/findUniqueAuthentication/index.test.d.ts.map +1 -0
  61. package/dist/plugins/findUniqueAuthentication/index.test.js +152 -0
  62. package/dist/plugins/findUniqueAuthentication/schemas.d.ts +29 -0
  63. package/dist/plugins/findUniqueAuthentication/schemas.d.ts.map +1 -0
  64. package/dist/plugins/findUniqueAuthentication/schemas.js +18 -0
  65. package/dist/plugins/getAction/index.d.ts +23 -0
  66. package/dist/plugins/getAction/index.d.ts.map +1 -0
  67. package/dist/plugins/getAction/index.js +28 -0
  68. package/dist/plugins/getAction/index.test.d.ts +2 -0
  69. package/dist/plugins/getAction/index.test.d.ts.map +1 -0
  70. package/dist/plugins/getAction/index.test.js +186 -0
  71. package/dist/plugins/getAction/schemas.d.ts +23 -0
  72. package/dist/plugins/getAction/schemas.d.ts.map +1 -0
  73. package/dist/plugins/getAction/schemas.js +10 -0
  74. package/dist/plugins/getApp/index.d.ts +22 -0
  75. package/dist/plugins/getApp/index.d.ts.map +1 -0
  76. package/dist/plugins/getApp/index.js +39 -0
  77. package/dist/plugins/getApp/index.test.d.ts +2 -0
  78. package/dist/plugins/getApp/index.test.d.ts.map +1 -0
  79. package/dist/plugins/getApp/index.test.js +100 -0
  80. package/dist/plugins/getApp/schemas.d.ts +18 -0
  81. package/dist/plugins/getApp/schemas.d.ts.map +1 -0
  82. package/dist/plugins/getApp/schemas.js +10 -0
  83. package/dist/plugins/getAuthentication/index.d.ts +22 -0
  84. package/dist/plugins/getAuthentication/index.d.ts.map +1 -0
  85. package/dist/plugins/getAuthentication/index.js +41 -0
  86. package/dist/plugins/getAuthentication/index.test.d.ts +2 -0
  87. package/dist/plugins/getAuthentication/index.test.d.ts.map +1 -0
  88. package/dist/plugins/getAuthentication/index.test.js +205 -0
  89. package/dist/plugins/getAuthentication/schemas.d.ts +17 -0
  90. package/dist/plugins/getAuthentication/schemas.d.ts.map +1 -0
  91. package/dist/plugins/getAuthentication/schemas.js +11 -0
  92. package/dist/plugins/getProfile/index.d.ts +23 -0
  93. package/dist/plugins/getProfile/index.d.ts.map +1 -0
  94. package/dist/plugins/getProfile/index.js +29 -0
  95. package/dist/plugins/getProfile/schemas.d.ts +13 -0
  96. package/dist/plugins/getProfile/schemas.d.ts.map +1 -0
  97. package/dist/plugins/getProfile/schemas.js +5 -0
  98. package/dist/plugins/listActions/index.d.ts +28 -0
  99. package/dist/plugins/listActions/index.d.ts.map +1 -0
  100. package/dist/plugins/listActions/index.js +61 -0
  101. package/dist/plugins/listActions/index.test.d.ts +2 -0
  102. package/dist/plugins/listActions/index.test.d.ts.map +1 -0
  103. package/dist/plugins/listActions/index.test.js +467 -0
  104. package/dist/plugins/listActions/schemas.d.ts +29 -0
  105. package/dist/plugins/listActions/schemas.d.ts.map +1 -0
  106. package/dist/plugins/listActions/schemas.js +21 -0
  107. package/dist/plugins/listApps/index.d.ts +28 -0
  108. package/dist/plugins/listApps/index.d.ts.map +1 -0
  109. package/dist/plugins/listApps/index.js +62 -0
  110. package/dist/plugins/listApps/index.test.d.ts +2 -0
  111. package/dist/plugins/listApps/index.test.d.ts.map +1 -0
  112. package/dist/plugins/listApps/index.test.js +313 -0
  113. package/dist/plugins/listApps/schemas.d.ts +30 -0
  114. package/dist/plugins/listApps/schemas.d.ts.map +1 -0
  115. package/dist/plugins/listApps/schemas.js +23 -0
  116. package/dist/plugins/listAuthentications/index.d.ts +28 -0
  117. package/dist/plugins/listAuthentications/index.d.ts.map +1 -0
  118. package/dist/plugins/listAuthentications/index.js +77 -0
  119. package/dist/plugins/listAuthentications/index.test.d.ts +2 -0
  120. package/dist/plugins/listAuthentications/index.test.d.ts.map +1 -0
  121. package/dist/plugins/listAuthentications/index.test.js +564 -0
  122. package/dist/plugins/listAuthentications/schemas.d.ts +38 -0
  123. package/dist/plugins/listAuthentications/schemas.d.ts.map +1 -0
  124. package/dist/plugins/listAuthentications/schemas.js +28 -0
  125. package/dist/plugins/listInputFields/index.d.ts +28 -0
  126. package/dist/plugins/listInputFields/index.d.ts.map +1 -0
  127. package/dist/plugins/listInputFields/index.js +133 -0
  128. package/dist/plugins/listInputFields/index.test.d.ts +2 -0
  129. package/dist/plugins/listInputFields/index.test.d.ts.map +1 -0
  130. package/dist/plugins/listInputFields/index.test.js +325 -0
  131. package/dist/plugins/listInputFields/schemas.d.ts +38 -0
  132. package/dist/plugins/listInputFields/schemas.d.ts.map +1 -0
  133. package/dist/plugins/listInputFields/schemas.js +22 -0
  134. package/dist/plugins/registry/index.d.ts +11 -0
  135. package/dist/plugins/registry/index.d.ts.map +1 -0
  136. package/dist/plugins/registry/index.js +14 -0
  137. package/dist/plugins/request/index.d.ts +19 -0
  138. package/dist/plugins/request/index.d.ts.map +1 -0
  139. package/dist/plugins/request/index.js +62 -0
  140. package/dist/plugins/request/index.test.d.ts +2 -0
  141. package/dist/plugins/request/index.test.d.ts.map +1 -0
  142. package/dist/plugins/request/index.test.js +256 -0
  143. package/dist/plugins/request/schemas.d.ts +69 -0
  144. package/dist/plugins/request/schemas.d.ts.map +1 -0
  145. package/dist/plugins/request/schemas.js +42 -0
  146. package/dist/plugins/runAction/index.d.ts +28 -0
  147. package/dist/plugins/runAction/index.d.ts.map +1 -0
  148. package/dist/plugins/runAction/index.js +86 -0
  149. package/dist/plugins/runAction/index.test.d.ts +2 -0
  150. package/dist/plugins/runAction/index.test.d.ts.map +1 -0
  151. package/dist/plugins/runAction/index.test.js +320 -0
  152. package/dist/plugins/runAction/schemas.d.ts +37 -0
  153. package/dist/plugins/runAction/schemas.d.ts.map +1 -0
  154. package/dist/plugins/runAction/schemas.js +22 -0
  155. package/dist/resolvers/actionKey.d.ts +9 -0
  156. package/dist/resolvers/actionKey.d.ts.map +1 -0
  157. package/dist/resolvers/actionKey.js +19 -0
  158. package/dist/resolvers/actionType.d.ts +9 -0
  159. package/dist/resolvers/actionType.d.ts.map +1 -0
  160. package/dist/resolvers/actionType.js +22 -0
  161. package/dist/resolvers/appKey.d.ts +7 -0
  162. package/dist/resolvers/appKey.d.ts.map +1 -0
  163. package/dist/resolvers/appKey.js +5 -0
  164. package/dist/resolvers/authenticationId.d.ts +9 -0
  165. package/dist/resolvers/authenticationId.d.ts.map +1 -0
  166. package/dist/resolvers/authenticationId.js +33 -0
  167. package/dist/resolvers/index.d.ts +40 -0
  168. package/dist/resolvers/index.d.ts.map +1 -0
  169. package/dist/resolvers/index.js +91 -0
  170. package/dist/resolvers/inputs.d.ts +8 -0
  171. package/dist/resolvers/inputs.d.ts.map +1 -0
  172. package/dist/resolvers/inputs.js +14 -0
  173. package/dist/schemas/Action.d.ts +243 -0
  174. package/dist/schemas/Action.d.ts.map +1 -0
  175. package/dist/schemas/Action.js +34 -0
  176. package/dist/schemas/App.d.ts +26 -0
  177. package/dist/schemas/App.d.ts.map +1 -0
  178. package/dist/schemas/App.js +22 -0
  179. package/dist/schemas/Auth.d.ts +161 -0
  180. package/dist/schemas/Auth.d.ts.map +1 -0
  181. package/dist/schemas/Auth.js +41 -0
  182. package/dist/schemas/Field.d.ts +144 -0
  183. package/dist/schemas/Field.d.ts.map +1 -0
  184. package/dist/schemas/Field.js +105 -0
  185. package/dist/schemas/UserProfile.d.ts +163 -0
  186. package/dist/schemas/UserProfile.d.ts.map +1 -0
  187. package/dist/schemas/UserProfile.js +29 -0
  188. package/dist/sdk.d.ts +10 -0
  189. package/dist/sdk.d.ts.map +1 -0
  190. package/dist/sdk.js +94 -0
  191. package/dist/sdk.test.d.ts +2 -0
  192. package/dist/sdk.test.d.ts.map +1 -0
  193. package/dist/sdk.test.js +135 -0
  194. package/dist/types/domain.d.ts +36 -0
  195. package/dist/types/domain.d.ts.map +1 -0
  196. package/dist/types/domain.js +1 -0
  197. package/dist/types/domain.test.d.ts +2 -0
  198. package/dist/types/domain.test.d.ts.map +1 -0
  199. package/dist/types/domain.test.js +39 -0
  200. package/dist/types/errors.d.ts +143 -0
  201. package/dist/types/errors.d.ts.map +1 -0
  202. package/dist/types/errors.js +187 -0
  203. package/dist/types/events.d.ts +38 -0
  204. package/dist/types/events.d.ts.map +1 -0
  205. package/dist/types/events.js +7 -0
  206. package/dist/types/functions.d.ts +26 -0
  207. package/dist/types/functions.d.ts.map +1 -0
  208. package/dist/types/functions.js +4 -0
  209. package/dist/types/plugin.d.ts +61 -0
  210. package/dist/types/plugin.d.ts.map +1 -0
  211. package/dist/types/plugin.js +9 -0
  212. package/dist/types/properties.d.ts +22 -0
  213. package/dist/types/properties.d.ts.map +1 -0
  214. package/dist/types/properties.js +50 -0
  215. package/dist/types/sdk.d.ts +43 -0
  216. package/dist/types/sdk.d.ts.map +1 -0
  217. package/dist/types/sdk.js +4 -0
  218. package/dist/utils/array-utils.d.ts +31 -0
  219. package/dist/utils/array-utils.d.ts.map +1 -0
  220. package/dist/utils/array-utils.js +36 -0
  221. package/dist/utils/array-utils.test.d.ts +2 -0
  222. package/dist/utils/array-utils.test.d.ts.map +1 -0
  223. package/dist/utils/array-utils.test.js +107 -0
  224. package/dist/utils/domain-utils.d.ts +78 -0
  225. package/dist/utils/domain-utils.d.ts.map +1 -0
  226. package/dist/utils/domain-utils.js +218 -0
  227. package/dist/utils/domain-utils.test.d.ts +2 -0
  228. package/dist/utils/domain-utils.test.d.ts.map +1 -0
  229. package/dist/utils/domain-utils.test.js +192 -0
  230. package/dist/utils/function-utils.d.ts +45 -0
  231. package/dist/utils/function-utils.d.ts.map +1 -0
  232. package/dist/utils/function-utils.js +158 -0
  233. package/dist/utils/function-utils.test.d.ts +2 -0
  234. package/dist/utils/function-utils.test.d.ts.map +1 -0
  235. package/dist/utils/function-utils.test.js +110 -0
  236. package/dist/utils/pagination-utils.d.ts +37 -0
  237. package/dist/utils/pagination-utils.d.ts.map +1 -0
  238. package/dist/utils/pagination-utils.js +165 -0
  239. package/dist/utils/pagination-utils.test.d.ts +17 -0
  240. package/dist/utils/pagination-utils.test.d.ts.map +1 -0
  241. package/dist/utils/pagination-utils.test.js +461 -0
  242. package/dist/utils/schema-utils.d.ts +45 -0
  243. package/dist/utils/schema-utils.d.ts.map +1 -0
  244. package/dist/utils/schema-utils.js +65 -0
  245. package/dist/utils/validation.d.ts +4 -0
  246. package/dist/utils/validation.d.ts.map +1 -0
  247. package/dist/utils/validation.js +30 -0
  248. package/dist/utils/validation.test.d.ts +2 -0
  249. package/dist/utils/validation.test.d.ts.map +1 -0
  250. package/dist/utils/validation.test.js +43 -0
  251. package/package.json +12 -3
  252. package/src/api/client.ts +394 -171
  253. package/src/api/debug.ts +10 -1
  254. package/src/api/index.ts +0 -2
  255. package/src/api/polling.ts +28 -7
  256. package/src/api/schemas.ts +387 -0
  257. package/src/api/types.ts +72 -136
  258. package/src/constants.ts +10 -0
  259. package/src/index.ts +40 -19
  260. package/src/plugins/api/index.ts +47 -0
  261. package/src/plugins/apps/index.ts +25 -19
  262. package/src/plugins/apps/types.ts +7 -11
  263. package/src/plugins/fetch/index.ts +48 -40
  264. package/src/plugins/findFirstAuthentication/index.test.ts +206 -0
  265. package/src/plugins/findFirstAuthentication/index.ts +55 -0
  266. package/src/plugins/findFirstAuthentication/schemas.ts +41 -0
  267. package/src/plugins/findUniqueAuthentication/index.test.ts +197 -0
  268. package/src/plugins/findUniqueAuthentication/index.ts +72 -0
  269. package/src/plugins/findUniqueAuthentication/schemas.ts +42 -0
  270. package/src/plugins/getAction/index.test.ts +239 -0
  271. package/src/plugins/getAction/index.ts +57 -0
  272. package/src/plugins/getAction/schemas.ts +33 -0
  273. package/src/plugins/getApp/index.test.ts +127 -0
  274. package/src/plugins/getApp/index.ts +66 -0
  275. package/src/plugins/getApp/schemas.ts +38 -0
  276. package/src/plugins/getAuthentication/index.test.ts +284 -0
  277. package/src/plugins/getAuthentication/index.ts +86 -0
  278. package/src/plugins/getAuthentication/schemas.ts +31 -0
  279. package/src/plugins/getProfile/index.ts +55 -0
  280. package/src/plugins/getProfile/schemas.ts +26 -0
  281. package/src/plugins/listActions/index.test.ts +582 -0
  282. package/src/plugins/listActions/index.ts +115 -0
  283. package/src/plugins/listActions/schemas.ts +54 -0
  284. package/src/plugins/listApps/index.test.ts +357 -0
  285. package/src/plugins/listApps/index.ts +121 -0
  286. package/src/plugins/listApps/schemas.ts +49 -0
  287. package/src/plugins/listAuthentications/index.test.ts +709 -0
  288. package/src/plugins/listAuthentications/index.ts +136 -0
  289. package/src/plugins/listAuthentications/schemas.ts +60 -0
  290. package/src/plugins/listInputFields/index.test.ts +408 -0
  291. package/src/plugins/listInputFields/index.ts +204 -0
  292. package/src/plugins/listInputFields/schemas.ts +56 -0
  293. package/src/plugins/registry/index.ts +30 -0
  294. package/src/plugins/request/index.test.ts +329 -0
  295. package/src/plugins/request/index.ts +103 -0
  296. package/src/{functions → plugins}/request/schemas.ts +20 -9
  297. package/src/plugins/runAction/index.test.ts +387 -0
  298. package/src/plugins/runAction/index.ts +176 -0
  299. package/src/plugins/runAction/schemas.ts +53 -0
  300. package/src/resolvers/actionKey.ts +6 -4
  301. package/src/resolvers/actionType.ts +7 -2
  302. package/src/resolvers/appKey.ts +1 -1
  303. package/src/resolvers/authenticationId.ts +12 -3
  304. package/src/resolvers/inputs.ts +3 -1
  305. package/src/schemas/Action.ts +18 -12
  306. package/src/schemas/App.ts +11 -19
  307. package/src/schemas/Auth.ts +18 -13
  308. package/src/schemas/Field.ts +106 -11
  309. package/src/schemas/UserProfile.ts +43 -0
  310. package/src/sdk.test.ts +212 -0
  311. package/src/sdk.ts +132 -102
  312. package/src/types/domain.test.ts +50 -0
  313. package/src/types/domain.ts +43 -75
  314. package/src/types/errors.ts +275 -0
  315. package/src/types/functions.ts +27 -0
  316. package/src/types/optional-zapier-sdk-cli-login.d.ts +37 -0
  317. package/src/types/plugin.ts +105 -0
  318. package/src/types/properties.ts +4 -3
  319. package/src/types/sdk.ts +70 -48
  320. package/src/utils/array-utils.test.ts +131 -0
  321. package/src/utils/array-utils.ts +41 -0
  322. package/src/utils/domain-utils.test.ts +239 -0
  323. package/src/utils/domain-utils.ts +283 -0
  324. package/src/utils/function-utils.test.ts +141 -0
  325. package/src/utils/function-utils.ts +245 -0
  326. package/src/utils/pagination-utils.test.ts +620 -0
  327. package/src/utils/pagination-utils.ts +242 -0
  328. package/src/utils/validation.test.ts +50 -0
  329. package/src/utils/validation.ts +44 -0
  330. package/tsconfig.build.json +16 -2
  331. package/tsconfig.json +3 -1
  332. package/tsconfig.tsbuildinfo +1 -0
  333. package/tsup.config.ts +2 -0
  334. package/src/functions/bundleCode/index.ts +0 -78
  335. package/src/functions/bundleCode/info.ts +0 -9
  336. package/src/functions/bundleCode/schemas.ts +0 -30
  337. package/src/functions/findFirstAuthentication/index.ts +0 -24
  338. package/src/functions/findFirstAuthentication/info.ts +0 -9
  339. package/src/functions/findFirstAuthentication/schemas.ts +0 -50
  340. package/src/functions/findUniqueAuthentication/index.ts +0 -35
  341. package/src/functions/findUniqueAuthentication/info.ts +0 -9
  342. package/src/functions/findUniqueAuthentication/schemas.ts +0 -50
  343. package/src/functions/generateTypes/index.ts +0 -363
  344. package/src/functions/generateTypes/info.ts +0 -9
  345. package/src/functions/generateTypes/schemas.ts +0 -31
  346. package/src/functions/getAction/index.ts +0 -33
  347. package/src/functions/getAction/info.ts +0 -9
  348. package/src/functions/getAction/schemas.ts +0 -25
  349. package/src/functions/getApp/index.ts +0 -41
  350. package/src/functions/getApp/info.ts +0 -9
  351. package/src/functions/getApp/schemas.ts +0 -20
  352. package/src/functions/getAuthentication/index.ts +0 -50
  353. package/src/functions/getAuthentication/info.ts +0 -9
  354. package/src/functions/getAuthentication/schemas.ts +0 -29
  355. package/src/functions/listActions/index.ts +0 -149
  356. package/src/functions/listActions/info.ts +0 -9
  357. package/src/functions/listActions/schemas.ts +0 -30
  358. package/src/functions/listApps/index.ts +0 -60
  359. package/src/functions/listApps/info.ts +0 -9
  360. package/src/functions/listApps/schemas.ts +0 -32
  361. package/src/functions/listAuthentications/index.ts +0 -162
  362. package/src/functions/listAuthentications/info.ts +0 -9
  363. package/src/functions/listAuthentications/schemas.ts +0 -50
  364. package/src/functions/listFields/index.ts +0 -86
  365. package/src/functions/listFields/info.ts +0 -9
  366. package/src/functions/listFields/schemas.ts +0 -36
  367. package/src/functions/request/index.ts +0 -150
  368. package/src/functions/request/info.ts +0 -11
  369. package/src/functions/runAction/index.ts +0 -127
  370. package/src/functions/runAction/info.ts +0 -9
  371. package/src/functions/runAction/schemas.ts +0 -34
  372. package/src/plugins/apps/info.ts +0 -12
  373. package/src/plugins/fetch/types.ts +0 -2
  374. /package/src/{schema-utils.ts → utils/schema-utils.ts} +0 -0
@@ -0,0 +1,8 @@
1
+ import type { ZapierSdk } from "../types/sdk";
2
+ export interface InputsResolver {
3
+ type: "fields";
4
+ depends: readonly string[];
5
+ fetch: (sdk: ZapierSdk, resolvedParams: Record<string, any>) => Promise<any[]>;
6
+ }
7
+ export declare const inputsResolver: InputsResolver;
8
+ //# sourceMappingURL=inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/resolvers/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,CACL,GAAG,EAAE,SAAS,EACd,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAChC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,cAa5B,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const inputsResolver = {
2
+ type: "fields",
3
+ depends: ["appKey", "actionKey", "actionType", "authenticationId"],
4
+ fetch: async (sdk, resolvedParams) => {
5
+ const fieldsResponse = await sdk.listInputFields({
6
+ appKey: resolvedParams.appKey,
7
+ actionKey: resolvedParams.actionKey,
8
+ actionType: resolvedParams.actionType,
9
+ authenticationId: resolvedParams.authenticationId,
10
+ inputs: resolvedParams.inputs, // Pass along currently resolved inputs
11
+ });
12
+ return fieldsResponse.data;
13
+ },
14
+ };
@@ -0,0 +1,243 @@
1
+ import { z } from "zod";
2
+ export declare const ActionItemSchema: z.ZodObject<Omit<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
5
+ key: z.ZodString;
6
+ name: z.ZodString;
7
+ noun: z.ZodOptional<z.ZodString>;
8
+ description: z.ZodString;
9
+ description_html: z.ZodOptional<z.ZodString>;
10
+ is_important: z.ZodOptional<z.ZodBoolean>;
11
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
12
+ needs: z.ZodOptional<z.ZodArray<z.ZodObject<{
13
+ key: z.ZodString;
14
+ alters_custom_fields: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
15
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
+ choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ key: z.ZodOptional<z.ZodString>;
18
+ label: z.ZodOptional<z.ZodString>;
19
+ sample: z.ZodOptional<z.ZodString>;
20
+ value: z.ZodOptional<z.ZodString>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ value?: string | undefined;
23
+ key?: string | undefined;
24
+ label?: string | undefined;
25
+ sample?: string | undefined;
26
+ }, {
27
+ value?: string | undefined;
28
+ key?: string | undefined;
29
+ label?: string | undefined;
30
+ sample?: string | undefined;
31
+ }>, "many">>;
32
+ computed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
33
+ custom_field: z.ZodOptional<z.ZodBoolean>;
34
+ default: z.ZodOptional<z.ZodString>;
35
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
36
+ format: z.ZodOptional<z.ZodLiteral<"SELECT">>;
37
+ from_search: z.ZodOptional<z.ZodBoolean>;
38
+ from_write: z.ZodOptional<z.ZodBoolean>;
39
+ help_text: z.ZodOptional<z.ZodString>;
40
+ help_text_html: z.ZodOptional<z.ZodString>;
41
+ input_format: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
+ label: z.ZodOptional<z.ZodString>;
43
+ language: z.ZodOptional<z.ZodString>;
44
+ parent_key: z.ZodOptional<z.ZodString>;
45
+ placeholder: z.ZodOptional<z.ZodString>;
46
+ prefill: z.ZodOptional<z.ZodString>;
47
+ required: z.ZodOptional<z.ZodBoolean>;
48
+ searchfill: z.ZodOptional<z.ZodString>;
49
+ send_in_json: z.ZodOptional<z.ZodBoolean>;
50
+ regex: z.ZodOptional<z.ZodString>;
51
+ type: z.ZodOptional<z.ZodEnum<["integer", "string", "text", "datetime", "boolean", "file", "decimal", "copy", "password", "dict", "code", "filter", "json"]>>;
52
+ list: z.ZodOptional<z.ZodBoolean>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ key: string;
55
+ default?: string | undefined;
56
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
57
+ label?: string | undefined;
58
+ alters_custom_fields?: boolean | null | undefined;
59
+ capabilities?: string[] | undefined;
60
+ choices?: {
61
+ value?: string | undefined;
62
+ key?: string | undefined;
63
+ label?: string | undefined;
64
+ sample?: string | undefined;
65
+ }[] | undefined;
66
+ computed?: boolean | null | undefined;
67
+ custom_field?: boolean | undefined;
68
+ depends_on?: string[] | undefined;
69
+ format?: "SELECT" | undefined;
70
+ from_search?: boolean | undefined;
71
+ from_write?: boolean | undefined;
72
+ help_text?: string | undefined;
73
+ help_text_html?: string | undefined;
74
+ input_format?: string[] | undefined;
75
+ language?: string | undefined;
76
+ parent_key?: string | undefined;
77
+ placeholder?: string | undefined;
78
+ prefill?: string | undefined;
79
+ required?: boolean | undefined;
80
+ searchfill?: string | undefined;
81
+ send_in_json?: boolean | undefined;
82
+ regex?: string | undefined;
83
+ list?: boolean | undefined;
84
+ }, {
85
+ key: string;
86
+ default?: string | undefined;
87
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
88
+ label?: string | undefined;
89
+ alters_custom_fields?: boolean | null | undefined;
90
+ capabilities?: string[] | undefined;
91
+ choices?: {
92
+ value?: string | undefined;
93
+ key?: string | undefined;
94
+ label?: string | undefined;
95
+ sample?: string | undefined;
96
+ }[] | undefined;
97
+ computed?: boolean | null | undefined;
98
+ custom_field?: boolean | undefined;
99
+ depends_on?: string[] | undefined;
100
+ format?: "SELECT" | undefined;
101
+ from_search?: boolean | undefined;
102
+ from_write?: boolean | undefined;
103
+ help_text?: string | undefined;
104
+ help_text_html?: string | undefined;
105
+ input_format?: string[] | undefined;
106
+ language?: string | undefined;
107
+ parent_key?: string | undefined;
108
+ placeholder?: string | undefined;
109
+ prefill?: string | undefined;
110
+ required?: boolean | undefined;
111
+ searchfill?: string | undefined;
112
+ send_in_json?: boolean | undefined;
113
+ regex?: string | undefined;
114
+ list?: boolean | undefined;
115
+ }>, "many">>;
116
+ meta: z.ZodOptional<z.ZodString>;
117
+ selected_api: z.ZodOptional<z.ZodString>;
118
+ links: z.ZodOptional<z.ZodObject<{
119
+ action_url: z.ZodOptional<z.ZodString>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ action_url?: string | undefined;
122
+ }, {
123
+ action_url?: string | undefined;
124
+ }>>;
125
+ permissions: z.ZodOptional<z.ZodObject<{
126
+ can_use: z.ZodOptional<z.ZodBoolean>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ can_use?: boolean | undefined;
129
+ }, {
130
+ can_use?: boolean | undefined;
131
+ }>>;
132
+ }, "type" | "name"> & {
133
+ app_key: z.ZodString;
134
+ action_type: z.ZodEnum<["filter", "read", "read_bulk", "run", "search", "search_and_write", "search_or_write", "write"]>;
135
+ title: z.ZodString;
136
+ type: z.ZodLiteral<"action">;
137
+ }, "strip", z.ZodTypeAny, {
138
+ type: "action";
139
+ key: string;
140
+ title: string;
141
+ description: string;
142
+ app_key: string;
143
+ action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
144
+ id?: string | undefined;
145
+ noun?: string | undefined;
146
+ description_html?: string | undefined;
147
+ is_important?: boolean | undefined;
148
+ is_hidden?: boolean | undefined;
149
+ needs?: {
150
+ key: string;
151
+ default?: string | undefined;
152
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
153
+ label?: string | undefined;
154
+ alters_custom_fields?: boolean | null | undefined;
155
+ capabilities?: string[] | undefined;
156
+ choices?: {
157
+ value?: string | undefined;
158
+ key?: string | undefined;
159
+ label?: string | undefined;
160
+ sample?: string | undefined;
161
+ }[] | undefined;
162
+ computed?: boolean | null | undefined;
163
+ custom_field?: boolean | undefined;
164
+ depends_on?: string[] | undefined;
165
+ format?: "SELECT" | undefined;
166
+ from_search?: boolean | undefined;
167
+ from_write?: boolean | undefined;
168
+ help_text?: string | undefined;
169
+ help_text_html?: string | undefined;
170
+ input_format?: string[] | undefined;
171
+ language?: string | undefined;
172
+ parent_key?: string | undefined;
173
+ placeholder?: string | undefined;
174
+ prefill?: string | undefined;
175
+ required?: boolean | undefined;
176
+ searchfill?: string | undefined;
177
+ send_in_json?: boolean | undefined;
178
+ regex?: string | undefined;
179
+ list?: boolean | undefined;
180
+ }[] | undefined;
181
+ meta?: string | undefined;
182
+ selected_api?: string | undefined;
183
+ links?: {
184
+ action_url?: string | undefined;
185
+ } | undefined;
186
+ permissions?: {
187
+ can_use?: boolean | undefined;
188
+ } | undefined;
189
+ }, {
190
+ type: "action";
191
+ key: string;
192
+ title: string;
193
+ description: string;
194
+ app_key: string;
195
+ action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
196
+ id?: string | undefined;
197
+ noun?: string | undefined;
198
+ description_html?: string | undefined;
199
+ is_important?: boolean | undefined;
200
+ is_hidden?: boolean | undefined;
201
+ needs?: {
202
+ key: string;
203
+ default?: string | undefined;
204
+ type?: "string" | "boolean" | "text" | "password" | "code" | "filter" | "integer" | "datetime" | "file" | "decimal" | "copy" | "dict" | "json" | undefined;
205
+ label?: string | undefined;
206
+ alters_custom_fields?: boolean | null | undefined;
207
+ capabilities?: string[] | undefined;
208
+ choices?: {
209
+ value?: string | undefined;
210
+ key?: string | undefined;
211
+ label?: string | undefined;
212
+ sample?: string | undefined;
213
+ }[] | undefined;
214
+ computed?: boolean | null | undefined;
215
+ custom_field?: boolean | undefined;
216
+ depends_on?: string[] | undefined;
217
+ format?: "SELECT" | undefined;
218
+ from_search?: boolean | undefined;
219
+ from_write?: boolean | undefined;
220
+ help_text?: string | undefined;
221
+ help_text_html?: string | undefined;
222
+ input_format?: string[] | undefined;
223
+ language?: string | undefined;
224
+ parent_key?: string | undefined;
225
+ placeholder?: string | undefined;
226
+ prefill?: string | undefined;
227
+ required?: boolean | undefined;
228
+ searchfill?: string | undefined;
229
+ send_in_json?: boolean | undefined;
230
+ regex?: string | undefined;
231
+ list?: boolean | undefined;
232
+ }[] | undefined;
233
+ meta?: string | undefined;
234
+ selected_api?: string | undefined;
235
+ links?: {
236
+ action_url?: string | undefined;
237
+ } | undefined;
238
+ permissions?: {
239
+ can_use?: boolean | undefined;
240
+ } | undefined;
241
+ }>;
242
+ export type ActionItem = z.infer<typeof ActionItemSchema>;
243
+ //# sourceMappingURL=Action.d.ts.map
@@ -0,0 +1 @@
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B5B,CAAC;AAMF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,34 @@
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 }).extend({
8
+ app_key: z.string(), // Mapped from selected_api
9
+ action_type: ActionSchema.shape.type, // Mapped from original 'type' field
10
+ title: z.string(), // Mapped from original 'name' field
11
+ type: z.literal("action"), // Fixed type identifier
12
+ }), {
13
+ format: (item) => {
14
+ const details = [];
15
+ details.push({
16
+ text: `Type: ${item.action_type}`,
17
+ style: "accent",
18
+ });
19
+ if (item.app_key) {
20
+ details.push({
21
+ text: `App: ${item.app_key}`,
22
+ style: "normal",
23
+ });
24
+ }
25
+ if (item.description) {
26
+ details.push({ text: item.description, style: "dim" });
27
+ }
28
+ return {
29
+ title: item.title || item.name || item.key,
30
+ subtitle: `(${item.key})`,
31
+ details,
32
+ };
33
+ },
34
+ });
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ export { FormattedItem, FormatMetadata } from "../utils/schema-utils";
3
+ export declare const AppItemSchema: z.ZodObject<{
4
+ title: z.ZodString;
5
+ key: z.ZodString;
6
+ current_implementation_id: z.ZodString;
7
+ version: z.ZodOptional<z.ZodString>;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ slug: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ key: string;
12
+ title: string;
13
+ current_implementation_id: string;
14
+ version?: string | undefined;
15
+ description?: string | undefined;
16
+ slug?: string | undefined;
17
+ }, {
18
+ key: string;
19
+ title: string;
20
+ current_implementation_id: string;
21
+ version?: string | undefined;
22
+ description?: string | undefined;
23
+ slug?: string | undefined;
24
+ }>;
25
+ export type AppItem = z.infer<typeof AppItemSchema>;
26
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/schemas/App.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMtE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;EAmBzB,CAAC;AAMF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ import { withFormatter } from "../utils/schema-utils";
3
+ // ============================================================================
4
+ // App Item Schema (extends API schema with computed fields and formatting)
5
+ // ============================================================================
6
+ export const AppItemSchema = withFormatter(z.object({
7
+ // Essential properties only
8
+ title: z.string(), // Mapped from name
9
+ key: z.string(), // Mapped from selected_api
10
+ current_implementation_id: z.string(), // From id, keeps the full version
11
+ version: z.string().optional(), // Extracted from implementation ID
12
+ description: z.string().optional(),
13
+ slug: z.string().optional(),
14
+ }), {
15
+ format: (item) => {
16
+ return {
17
+ title: item.title,
18
+ subtitle: `(${item.key})`,
19
+ details: [],
20
+ };
21
+ },
22
+ });
@@ -0,0 +1,161 @@
1
+ import { z } from "zod";
2
+ export declare const AuthenticationItemSchema: z.ZodObject<Omit<{
3
+ id: z.ZodNumber;
4
+ date: z.ZodString;
5
+ lastchanged: z.ZodOptional<z.ZodString>;
6
+ account_id: z.ZodNumber;
7
+ customuser_id: z.ZodOptional<z.ZodNumber>;
8
+ selected_api: z.ZodString;
9
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ is_invite_only: z.ZodBoolean;
11
+ is_private: z.ZodBoolean;
12
+ shared_with_all: z.ZodBoolean;
13
+ is_stale: z.ZodOptional<z.ZodString>;
14
+ is_shared: z.ZodOptional<z.ZodString>;
15
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ url: z.ZodOptional<z.ZodString>;
20
+ groups: z.ZodOptional<z.ZodString>;
21
+ members: z.ZodOptional<z.ZodString>;
22
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
23
+ }, "selected_api" | "customuser_id"> & {
24
+ implementation_id: z.ZodOptional<z.ZodString>;
25
+ is_expired: z.ZodOptional<z.ZodString>;
26
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ app_key: z.ZodOptional<z.ZodString>;
28
+ version: z.ZodOptional<z.ZodString>;
29
+ user_id: z.ZodOptional<z.ZodNumber>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ date: string;
32
+ id: number;
33
+ account_id: number;
34
+ is_invite_only: boolean;
35
+ is_private: boolean;
36
+ shared_with_all: boolean;
37
+ title?: string | null | undefined;
38
+ version?: string | undefined;
39
+ label?: string | null | undefined;
40
+ permissions?: Record<string, boolean> | undefined;
41
+ lastchanged?: string | undefined;
42
+ destination_selected_api?: string | null | undefined;
43
+ is_stale?: string | undefined;
44
+ is_shared?: string | undefined;
45
+ marked_stale_at?: string | null | undefined;
46
+ identifier?: string | null | undefined;
47
+ url?: string | undefined;
48
+ groups?: string | undefined;
49
+ members?: string | undefined;
50
+ user_id?: number | undefined;
51
+ implementation_id?: string | undefined;
52
+ is_expired?: string | undefined;
53
+ expired_at?: string | null | undefined;
54
+ app_key?: string | undefined;
55
+ }, {
56
+ date: string;
57
+ id: number;
58
+ account_id: number;
59
+ is_invite_only: boolean;
60
+ is_private: boolean;
61
+ shared_with_all: boolean;
62
+ title?: string | null | undefined;
63
+ version?: string | undefined;
64
+ label?: string | null | undefined;
65
+ permissions?: Record<string, boolean> | undefined;
66
+ lastchanged?: string | undefined;
67
+ destination_selected_api?: string | null | undefined;
68
+ is_stale?: string | undefined;
69
+ is_shared?: string | undefined;
70
+ marked_stale_at?: string | null | undefined;
71
+ identifier?: string | null | undefined;
72
+ url?: string | undefined;
73
+ groups?: string | undefined;
74
+ members?: string | undefined;
75
+ user_id?: number | undefined;
76
+ implementation_id?: string | undefined;
77
+ is_expired?: string | undefined;
78
+ expired_at?: string | null | undefined;
79
+ app_key?: string | undefined;
80
+ }>;
81
+ export declare const AuthItemSchema: z.ZodObject<Omit<{
82
+ id: z.ZodNumber;
83
+ date: z.ZodString;
84
+ lastchanged: z.ZodOptional<z.ZodString>;
85
+ account_id: z.ZodNumber;
86
+ customuser_id: z.ZodOptional<z.ZodNumber>;
87
+ selected_api: z.ZodString;
88
+ destination_selected_api: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ is_invite_only: z.ZodBoolean;
90
+ is_private: z.ZodBoolean;
91
+ shared_with_all: z.ZodBoolean;
92
+ is_stale: z.ZodOptional<z.ZodString>;
93
+ is_shared: z.ZodOptional<z.ZodString>;
94
+ marked_stale_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ url: z.ZodOptional<z.ZodString>;
99
+ groups: z.ZodOptional<z.ZodString>;
100
+ members: z.ZodOptional<z.ZodString>;
101
+ permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
102
+ }, "selected_api" | "customuser_id"> & {
103
+ implementation_id: z.ZodOptional<z.ZodString>;
104
+ is_expired: z.ZodOptional<z.ZodString>;
105
+ expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ app_key: z.ZodOptional<z.ZodString>;
107
+ version: z.ZodOptional<z.ZodString>;
108
+ user_id: z.ZodOptional<z.ZodNumber>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ date: string;
111
+ id: number;
112
+ account_id: number;
113
+ is_invite_only: boolean;
114
+ is_private: boolean;
115
+ shared_with_all: boolean;
116
+ title?: string | null | undefined;
117
+ version?: string | undefined;
118
+ label?: string | null | undefined;
119
+ permissions?: Record<string, boolean> | undefined;
120
+ lastchanged?: string | undefined;
121
+ destination_selected_api?: string | null | undefined;
122
+ is_stale?: string | undefined;
123
+ is_shared?: string | undefined;
124
+ marked_stale_at?: string | null | undefined;
125
+ identifier?: string | null | undefined;
126
+ url?: string | undefined;
127
+ groups?: string | undefined;
128
+ members?: string | undefined;
129
+ user_id?: number | undefined;
130
+ implementation_id?: string | undefined;
131
+ is_expired?: string | undefined;
132
+ expired_at?: string | null | undefined;
133
+ app_key?: string | undefined;
134
+ }, {
135
+ date: string;
136
+ id: number;
137
+ account_id: number;
138
+ is_invite_only: boolean;
139
+ is_private: boolean;
140
+ shared_with_all: boolean;
141
+ title?: string | null | undefined;
142
+ version?: string | undefined;
143
+ label?: string | null | undefined;
144
+ permissions?: Record<string, boolean> | undefined;
145
+ lastchanged?: string | undefined;
146
+ destination_selected_api?: string | null | undefined;
147
+ is_stale?: string | undefined;
148
+ is_shared?: string | undefined;
149
+ marked_stale_at?: string | null | undefined;
150
+ identifier?: string | null | undefined;
151
+ url?: string | undefined;
152
+ groups?: string | undefined;
153
+ members?: string | undefined;
154
+ user_id?: number | undefined;
155
+ implementation_id?: string | undefined;
156
+ is_expired?: string | undefined;
157
+ expired_at?: string | null | undefined;
158
+ app_key?: string | undefined;
159
+ }>;
160
+ export type AuthItem = z.infer<typeof AuthItemSchema>;
161
+ //# sourceMappingURL=Auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../../src/schemas/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCpC,CAAC;AAGF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAC;AAMvD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ import { withFormatter } from "../utils/schema-utils";
3
+ import { AuthenticationSchema } from "../api/schemas";
4
+ // ============================================================================
5
+ // Authentication Item Schema (extends API schema with computed fields and formatting)
6
+ // ============================================================================
7
+ export const AuthenticationItemSchema = withFormatter(AuthenticationSchema.omit({ selected_api: true, customuser_id: true }).extend({
8
+ implementation_id: z.string().optional(), // Renamed from selected_api
9
+ is_expired: z.string().optional(), // Mapped from is_stale
10
+ expired_at: z.string().nullable().optional(), // Mapped from marked_stale_at
11
+ app_key: z.string().optional(), // App key from implementations endpoint
12
+ version: z.string().optional(), // Version extracted from implementation_id
13
+ user_id: z.number().optional(),
14
+ }), {
15
+ format: (item) => {
16
+ const details = [];
17
+ if (item.identifier) {
18
+ details.push({
19
+ text: `Identifier: ${item.identifier}`,
20
+ style: "accent",
21
+ });
22
+ }
23
+ details.push({
24
+ text: `Account: ${item.account_id} | Private: ${item.is_private} | Shared: ${item.shared_with_all}`,
25
+ style: "dim",
26
+ });
27
+ if (item.marked_stale_at) {
28
+ details.push({
29
+ text: `⚠️ Marked stale: ${new Date(item.marked_stale_at).toLocaleDateString()}`,
30
+ style: "warning",
31
+ });
32
+ }
33
+ return {
34
+ title: item.title || `Authentication ${item.id}`,
35
+ subtitle: `(ID: ${item.id})`,
36
+ details,
37
+ };
38
+ },
39
+ });
40
+ // Legacy alias for backward compatibility
41
+ export const AuthItemSchema = AuthenticationItemSchema;