@keboola/api-client 35.0.0 → 39.0.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 (268) hide show
  1. package/AGENTS.md +12 -3
  2. package/API-SURFACE.md +14 -1
  3. package/CHANGELOG.md +102 -0
  4. package/README.md +19 -17
  5. package/dist/{ManagementClientAuthError-ey-f03vy.js → ManagementClientAuthError-Cr9IOsnJ.js} +3 -2
  6. package/dist/{ManagementClientAuthError-ey-f03vy.js.map → ManagementClientAuthError-Cr9IOsnJ.js.map} +1 -1
  7. package/dist/{ManagementClientAuthError-DD4u0EU7.cjs → ManagementClientAuthError-FcfMJNhr.cjs} +3 -2
  8. package/dist/{ManagementClientAuthError-DD4u0EU7.cjs.map → ManagementClientAuthError-FcfMJNhr.cjs.map} +1 -1
  9. package/dist/ai/index.cjs +2 -2
  10. package/dist/ai/index.js +2 -2
  11. package/dist/{appLogs-BjfUoWzs.cjs → appLogs-C_zP0lpv.cjs} +2 -2
  12. package/dist/{appLogs-BjfUoWzs.cjs.map → appLogs-C_zP0lpv.cjs.map} +1 -1
  13. package/dist/{appLogs-xsVkTriU.js → appLogs-Cl7Q_MR9.js} +2 -2
  14. package/dist/{appLogs-xsVkTriU.js.map → appLogs-Cl7Q_MR9.js.map} +1 -1
  15. package/dist/apps/index.cjs +29 -22
  16. package/dist/apps/index.cjs.map +1 -1
  17. package/dist/apps/index.d.cts +31 -73
  18. package/dist/apps/index.d.ts +31 -73
  19. package/dist/apps/index.js +29 -22
  20. package/dist/apps/index.js.map +1 -1
  21. package/dist/apps/types.d.cts +2 -2
  22. package/dist/apps/types.d.ts +2 -2
  23. package/dist/assets/index.cjs +1 -1
  24. package/dist/assets/index.js +1 -1
  25. package/dist/auth/index.cjs +1 -1
  26. package/dist/auth/index.js +1 -1
  27. package/dist/{auth-aItmDu45.js → auth-BjmkFOgd.js} +2 -2
  28. package/dist/{auth-aItmDu45.js.map → auth-BjmkFOgd.js.map} +1 -1
  29. package/dist/{auth-JQ33o3nU.cjs → auth-DLWnl18b.cjs} +2 -2
  30. package/dist/{auth-JQ33o3nU.cjs.map → auth-DLWnl18b.cjs.map} +1 -1
  31. package/dist/{authClient-_PpvGgZJ.cjs → authClient-8yU1last.cjs} +5 -5
  32. package/dist/{authClient-_PpvGgZJ.cjs.map → authClient-8yU1last.cjs.map} +1 -1
  33. package/dist/{authClient-D7W9vWPR.js → authClient-BTo4Afm6.js} +5 -5
  34. package/dist/{authClient-D7W9vWPR.js.map → authClient-BTo4Afm6.js.map} +1 -1
  35. package/dist/billing/index.cjs +2 -2
  36. package/dist/billing/index.js +2 -2
  37. package/dist/businessWorkspaceApi/index.cjs +3 -0
  38. package/dist/businessWorkspaceApi/index.d.cts +2 -0
  39. package/dist/businessWorkspaceApi/index.d.ts +2 -0
  40. package/dist/businessWorkspaceApi/index.js +2 -0
  41. package/dist/businessWorkspaceApi/types.cjs +0 -0
  42. package/dist/businessWorkspaceApi/types.d.cts +2 -0
  43. package/dist/businessWorkspaceApi/types.d.ts +2 -0
  44. package/dist/businessWorkspaceApi/types.js +1 -0
  45. package/dist/businessWorkspaceApi-BD-iUj07.js +61 -0
  46. package/dist/businessWorkspaceApi-BD-iUj07.js.map +1 -0
  47. package/dist/businessWorkspaceApi-wyBdbpIJ.cjs +66 -0
  48. package/dist/businessWorkspaceApi-wyBdbpIJ.cjs.map +1 -0
  49. package/dist/businessWorkspaceApiClient-C2WyWN3b.d.ts +529 -0
  50. package/dist/businessWorkspaceApiClient-CRM1U8b-.d.cts +529 -0
  51. package/dist/chat/index.cjs +5 -5
  52. package/dist/chat/index.cjs.map +1 -1
  53. package/dist/chat/index.d.cts +1 -1
  54. package/dist/chat/index.d.ts +1 -1
  55. package/dist/chat/index.js +5 -5
  56. package/dist/chat/index.js.map +1 -1
  57. package/dist/constants/index.cjs +1 -1
  58. package/dist/constants/index.d.cts +2 -2
  59. package/dist/constants/index.d.ts +2 -2
  60. package/dist/constants/index.js +1 -1
  61. package/dist/{constants-wfbFsqqN.js → constants-C2tYAJSj.js} +10 -1
  62. package/dist/constants-C2tYAJSj.js.map +1 -0
  63. package/dist/{constants-C4DlsF_M.cjs → constants-C6xku_Vx.cjs} +10 -1
  64. package/dist/constants-C6xku_Vx.cjs.map +1 -0
  65. package/dist/{createFetchClient-DgMiqTJ8.cjs → createFetchClient-BlgPbjFj.cjs} +14 -2
  66. package/dist/createFetchClient-BlgPbjFj.cjs.map +1 -0
  67. package/dist/{createFetchClient-U-ZrwPl2.js → createFetchClient-C-cadpBx.js} +14 -2
  68. package/dist/createFetchClient-C-cadpBx.js.map +1 -0
  69. package/dist/{createGenericFetchClient-rxvUUbap.js → createGenericFetchClient-Bnf1QK9W.js} +2 -2
  70. package/dist/{createGenericFetchClient-rxvUUbap.js.map → createGenericFetchClient-Bnf1QK9W.js.map} +1 -1
  71. package/dist/{createGenericFetchClient-o3cPJeRn.cjs → createGenericFetchClient-lcozzwk2.cjs} +2 -2
  72. package/dist/{createGenericFetchClient-o3cPJeRn.cjs.map → createGenericFetchClient-lcozzwk2.cjs.map} +1 -1
  73. package/dist/{createOpenapiFetchClient-DhUU3M1W.cjs → createOpenapiFetchClient-C3UmDXpe.cjs} +2 -2
  74. package/dist/{createOpenapiFetchClient-DhUU3M1W.cjs.map → createOpenapiFetchClient-C3UmDXpe.cjs.map} +1 -1
  75. package/dist/{createOpenapiFetchClient-BVSc9ibR.js → createOpenapiFetchClient-COaPeeQ0.js} +2 -2
  76. package/dist/{createOpenapiFetchClient-BVSc9ibR.js.map → createOpenapiFetchClient-COaPeeQ0.js.map} +1 -1
  77. package/dist/{credential-DVWvJFJs.cjs → credential-CAulvfZ-.cjs} +2 -2
  78. package/dist/{credential-DVWvJFJs.cjs.map → credential-CAulvfZ-.cjs.map} +1 -1
  79. package/dist/{credential-CihSf_xs.js → credential-DWXbo4IX.js} +2 -2
  80. package/dist/{credential-CihSf_xs.js.map → credential-DWXbo4IX.js.map} +1 -1
  81. package/dist/dataScience/index.cjs +2 -2
  82. package/dist/dataScience/index.js +2 -2
  83. package/dist/{dataScience-C1gO5zUn.js → dataScience-B_BmnB1m.js} +5 -5
  84. package/dist/{dataScience-C1gO5zUn.js.map → dataScience-B_BmnB1m.js.map} +1 -1
  85. package/dist/{dataScience-0Rl_EuV_.cjs → dataScience-D-hyc4GY.cjs} +5 -5
  86. package/dist/{dataScience-0Rl_EuV_.cjs.map → dataScience-D-hyc4GY.cjs.map} +1 -1
  87. package/dist/developerPortal/index.cjs +1 -1
  88. package/dist/developerPortal/index.js +1 -1
  89. package/dist/{developerPortalClient-ki0XS_OD.cjs → developerPortalClient-CutPqoAa.cjs} +3 -3
  90. package/dist/{developerPortalClient-ki0XS_OD.cjs.map → developerPortalClient-CutPqoAa.cjs.map} +1 -1
  91. package/dist/{developerPortalClient-C_48z8BN.js → developerPortalClient-yHFTkKPb.js} +3 -3
  92. package/dist/{developerPortalClient-C_48z8BN.js.map → developerPortalClient-yHFTkKPb.js.map} +1 -1
  93. package/dist/domain/permissions/index.d.cts +2 -2
  94. package/dist/domain/permissions/index.d.ts +2 -2
  95. package/dist/editor/index.cjs +2 -2
  96. package/dist/editor/index.js +2 -2
  97. package/dist/encryption/index.cjs +1 -1
  98. package/dist/encryption/index.d.cts +1 -1
  99. package/dist/encryption/index.d.ts +1 -1
  100. package/dist/encryption/index.js +1 -1
  101. package/dist/encryption/types.d.cts +1 -1
  102. package/dist/encryption/types.d.ts +1 -1
  103. package/dist/import/index.cjs +1 -1
  104. package/dist/import/index.js +1 -1
  105. package/dist/{import-C83w7BKz.cjs → import-7YyyD_U_.cjs} +3 -3
  106. package/dist/{import-C83w7BKz.cjs.map → import-7YyyD_U_.cjs.map} +1 -1
  107. package/dist/{import-CROEK82b.js → import-xliONVib.js} +3 -3
  108. package/dist/{import-CROEK82b.js.map → import-xliONVib.js.map} +1 -1
  109. package/dist/{index-D8rcUbnk.d.ts → index-1r_CskjU.d.ts} +2 -2
  110. package/dist/{index-P-iT5THa.d.ts → index-BK-qHT39.d.ts} +8 -4
  111. package/dist/{index-BLx14ZI4.d.cts → index-CHXnJQ9s.d.cts} +117 -76
  112. package/dist/{index-Dodwl64k.d.cts → index-CWoEnDJ_.d.cts} +8 -4
  113. package/dist/{index-NaYLwG_h.d.ts → index-DBklbaTp.d.cts} +9 -1
  114. package/dist/{index-NaYLwG_h.d.cts → index-DBklbaTp.d.ts} +9 -1
  115. package/dist/{index-BgLnWTZU.d.cts → index-DVw4Av4b.d.cts} +4 -4
  116. package/dist/{index-DR4QqItd.d.cts → index-DWf6FXOr.d.cts} +2 -2
  117. package/dist/{index-CqgtL2NU.d.ts → index-De5qUWhp.d.ts} +4 -4
  118. package/dist/{index-DFBFa3SS.d.ts → index-GfKzh267.d.ts} +117 -76
  119. package/dist/index.cjs +30 -19
  120. package/dist/index.cjs.map +1 -1
  121. package/dist/index.d.cts +3 -3
  122. package/dist/index.d.ts +3 -3
  123. package/dist/index.js +30 -20
  124. package/dist/index.js.map +1 -1
  125. package/dist/{isLoginPageRedirect-B0EmRsHr.cjs → isLoginPageRedirect-Cm6Pn8Pj.cjs} +2 -2
  126. package/dist/{isLoginPageRedirect-B0EmRsHr.cjs.map → isLoginPageRedirect-Cm6Pn8Pj.cjs.map} +1 -1
  127. package/dist/{isLoginPageRedirect-BTTAedW-.js → isLoginPageRedirect-hyPqyWNX.js} +2 -2
  128. package/dist/{isLoginPageRedirect-BTTAedW-.js.map → isLoginPageRedirect-hyPqyWNX.js.map} +1 -1
  129. package/dist/kaiAgent/index.cjs +1 -1
  130. package/dist/kaiAgent/index.d.cts +1 -1
  131. package/dist/kaiAgent/index.d.ts +1 -1
  132. package/dist/kaiAgent/index.js +1 -1
  133. package/dist/kaiAgent/types.d.cts +2 -2
  134. package/dist/kaiAgent/types.d.ts +2 -2
  135. package/dist/{kaiAgent-8LNzGhZc.js → kaiAgent-CcT2oNip.js} +41 -6
  136. package/dist/kaiAgent-CcT2oNip.js.map +1 -0
  137. package/dist/{kaiAgent-B_TaUPRt.cjs → kaiAgent-DaB6UCsh.cjs} +41 -6
  138. package/dist/kaiAgent-DaB6UCsh.cjs.map +1 -0
  139. package/dist/{kaiAgentClient-BJj_2aqt.d.ts → kaiAgentClient-B5L4gbQ1.d.ts} +8 -3
  140. package/dist/{kaiAgentClient-DhTaM3GC.d.cts → kaiAgentClient-CHpULyeG.d.cts} +8 -3
  141. package/dist/management/index.cjs +1 -1
  142. package/dist/management/index.d.cts +2 -2
  143. package/dist/management/index.d.ts +2 -2
  144. package/dist/management/index.js +1 -1
  145. package/dist/management/types.d.cts +2 -2
  146. package/dist/management/types.d.ts +2 -2
  147. package/dist/{management-BoxlRNg2.cjs → management-DeZiQSlw.cjs} +41 -8
  148. package/dist/management-DeZiQSlw.cjs.map +1 -0
  149. package/dist/{management-Bp440RsV.js → management-ckdnu1dA.js} +41 -8
  150. package/dist/management-ckdnu1dA.js.map +1 -0
  151. package/dist/metastore/index.cjs +1 -1
  152. package/dist/metastore/index.js +1 -1
  153. package/dist/{metastore-BYYWTb3m.cjs → metastore-9AGrwjmN.cjs} +4 -4
  154. package/dist/{metastore-BYYWTb3m.cjs.map → metastore-9AGrwjmN.cjs.map} +1 -1
  155. package/dist/{metastore-VCDRVhUT.js → metastore-B0PolCjQ.js} +4 -4
  156. package/dist/{metastore-VCDRVhUT.js.map → metastore-B0PolCjQ.js.map} +1 -1
  157. package/dist/microsoftGraph/index.cjs +2 -2
  158. package/dist/microsoftGraph/index.js +2 -2
  159. package/dist/notifications/index.cjs +3 -3
  160. package/dist/notifications/index.js +3 -3
  161. package/dist/oauth/index.cjs +1 -1
  162. package/dist/oauth/index.js +1 -1
  163. package/dist/{oauth--asfePw-.js → oauth-BnHVf4cB.js} +5 -5
  164. package/dist/{oauth--asfePw-.js.map → oauth-BnHVf4cB.js.map} +1 -1
  165. package/dist/{oauth-B8yqG6Sy.cjs → oauth-DNtv4Ihb.cjs} +5 -5
  166. package/dist/{oauth-B8yqG6Sy.cjs.map → oauth-DNtv4Ihb.cjs.map} +1 -1
  167. package/dist/omnisearch/index.cjs +2 -2
  168. package/dist/omnisearch/index.js +2 -2
  169. package/dist/{project-hePfzUY0.d.cts → project-BRpzv3yE.d.cts} +2 -2
  170. package/dist/{project-C2wvX0xZ.d.ts → project-DCHOxRWd.d.ts} +2 -2
  171. package/dist/queryService/index.cjs +1 -1
  172. package/dist/queryService/index.d.cts +1 -1
  173. package/dist/queryService/index.d.ts +1 -1
  174. package/dist/queryService/index.js +1 -1
  175. package/dist/{queryService-BVtjkXy1.cjs → queryService-BVwD6Vmc.cjs} +5 -5
  176. package/dist/{queryService-BVtjkXy1.cjs.map → queryService-BVwD6Vmc.cjs.map} +1 -1
  177. package/dist/{queryService-Ca65E5KH.js → queryService-j3XZ2mX6.js} +5 -5
  178. package/dist/{queryService-Ca65E5KH.js.map → queryService-j3XZ2mX6.js.map} +1 -1
  179. package/dist/queue/index.cjs +1 -1
  180. package/dist/queue/index.d.cts +1 -1
  181. package/dist/queue/index.d.ts +1 -1
  182. package/dist/queue/index.js +1 -1
  183. package/dist/{queue-DyotLFJi.js → queue-Dagl0sdP.js} +4 -4
  184. package/dist/{queue-DyotLFJi.js.map → queue-Dagl0sdP.js.map} +1 -1
  185. package/dist/{queue-OJJUUqc2.cjs → queue-e3rMWbmK.cjs} +4 -4
  186. package/dist/{queue-OJJUUqc2.cjs.map → queue-e3rMWbmK.cjs.map} +1 -1
  187. package/dist/scheduler/index.cjs +3 -3
  188. package/dist/scheduler/index.js +3 -3
  189. package/dist/sdk/configurations/index.d.cts +4 -4
  190. package/dist/sdk/configurations/index.d.ts +4 -4
  191. package/dist/sdk/developerPortal/index.cjs +3 -3
  192. package/dist/sdk/developerPortal/index.js +3 -3
  193. package/dist/sdk/queryService/index.d.cts +1 -1
  194. package/dist/sdk/queryService/index.d.ts +1 -1
  195. package/dist/sdk/semanticLayer/index.cjs +1 -1
  196. package/dist/sdk/semanticLayer/index.js +1 -1
  197. package/dist/sdk/storage/index.d.cts +1 -1
  198. package/dist/sdk/storage/index.d.ts +1 -1
  199. package/dist/sdk/vault/index.d.cts +1 -1
  200. package/dist/sdk/vault/index.d.ts +1 -1
  201. package/dist/{semanticLayer-CSqmtHRo.js → semanticLayer-6_gtFxDu.js} +38 -5
  202. package/dist/semanticLayer-6_gtFxDu.js.map +1 -0
  203. package/dist/{semanticLayer-E0Vilu8u.cjs → semanticLayer-9uTaU7UT.cjs} +38 -5
  204. package/dist/semanticLayer-9uTaU7UT.cjs.map +1 -0
  205. package/dist/{serviceIds-DRcoTnSd.d.ts → serviceIds-DC-H6ZD9.d.cts} +2 -1
  206. package/dist/{serviceIds-DRcoTnSd.d.cts → serviceIds-DC-H6ZD9.d.ts} +2 -1
  207. package/dist/status/index.cjs +1 -1
  208. package/dist/status/index.js +1 -1
  209. package/dist/storage/index.cjs +5 -4
  210. package/dist/storage/index.d.cts +2 -2
  211. package/dist/storage/index.d.ts +2 -2
  212. package/dist/storage/index.js +5 -5
  213. package/dist/storage/types.d.cts +3 -3
  214. package/dist/storage/types.d.ts +3 -3
  215. package/dist/{storage-BKm7cztt.cjs → storage-HFUdEy7P.cjs} +43 -6
  216. package/dist/storage-HFUdEy7P.cjs.map +1 -0
  217. package/dist/{storage-LYwFQPNO.js → storage-Ob1LUIDq.js} +38 -7
  218. package/dist/storage-Ob1LUIDq.js.map +1 -0
  219. package/dist/stream/index.cjs +3 -3
  220. package/dist/stream/index.js +3 -3
  221. package/dist/syncActions/index.cjs +1 -1
  222. package/dist/syncActions/index.js +1 -1
  223. package/dist/{syncActions-QeBhIVhG.js → syncActions-B3NS5a0g.js} +5 -5
  224. package/dist/{syncActions-QeBhIVhG.js.map → syncActions-B3NS5a0g.js.map} +1 -1
  225. package/dist/{syncActions-OEZdVffK.cjs → syncActions-D2DhY6pP.cjs} +5 -5
  226. package/dist/{syncActions-OEZdVffK.cjs.map → syncActions-D2DhY6pP.cjs.map} +1 -1
  227. package/dist/telemetry/index.cjs +3 -3
  228. package/dist/telemetry/index.js +3 -3
  229. package/dist/{types-B3GOGUJ7.d.cts → types-B-P4vQe0.d.cts} +47 -2
  230. package/dist/{types-DEc55spK.d.ts → types-B95uNQ9o.d.ts} +3 -3
  231. package/dist/{types-BQsOHNI0.d.ts → types-BrPlv-NS.d.ts} +3 -3
  232. package/dist/{types-DjrRmQUe.d.cts → types-CmF3pR2n.d.cts} +3 -3
  233. package/dist/{types-f8W_j6qD.d.cts → types-Crhy0c9m.d.cts} +657 -199
  234. package/dist/{types-CBgLCkYe.d.ts → types-D6UmMa6E.d.ts} +224 -401
  235. package/dist/{types-DPS8nwkV.d.cts → types-DOyNe7oe.d.cts} +2 -1
  236. package/dist/{types-BMeDOB_D.d.ts → types-DPl8pZsY.d.ts} +47 -2
  237. package/dist/{types-DARv_P6O.d.cts → types-DXskkNp8.d.cts} +224 -401
  238. package/dist/{types-CaYtinmA.d.cts → types-D_j2Uq5X.d.cts} +3 -3
  239. package/dist/{types-BupPADSm.d.ts → types-DrqKICcK.d.ts} +657 -199
  240. package/dist/{types-DBOSvWtD.d.ts → types-gi4Eay19.d.ts} +2 -1
  241. package/dist/{validateConnectionStatus-olE2sQ3U.js → validateConnectionStatus-828HV8WL.js} +4 -3
  242. package/dist/validateConnectionStatus-828HV8WL.js.map +1 -0
  243. package/dist/{validateConnectionStatus-CsvYmCOI.cjs → validateConnectionStatus-CvBKyeDO.cjs} +4 -3
  244. package/dist/validateConnectionStatus-CvBKyeDO.cjs.map +1 -0
  245. package/dist/vault/index.cjs +4 -4
  246. package/dist/vault/index.js +4 -4
  247. package/package.json +34 -8
  248. package/surface/apps.md +11 -11
  249. package/surface/billing.md +2 -2
  250. package/surface/businessWorkspaceApi.md +12 -0
  251. package/surface/chat.md +1 -1
  252. package/surface/editor.md +5 -5
  253. package/surface/kaiAgent.md +5 -2
  254. package/surface/management.md +4 -0
  255. package/dist/constants-C4DlsF_M.cjs.map +0 -1
  256. package/dist/constants-wfbFsqqN.js.map +0 -1
  257. package/dist/createFetchClient-DgMiqTJ8.cjs.map +0 -1
  258. package/dist/createFetchClient-U-ZrwPl2.js.map +0 -1
  259. package/dist/kaiAgent-8LNzGhZc.js.map +0 -1
  260. package/dist/kaiAgent-B_TaUPRt.cjs.map +0 -1
  261. package/dist/management-BoxlRNg2.cjs.map +0 -1
  262. package/dist/management-Bp440RsV.js.map +0 -1
  263. package/dist/semanticLayer-CSqmtHRo.js.map +0 -1
  264. package/dist/semanticLayer-E0Vilu8u.cjs.map +0 -1
  265. package/dist/storage-BKm7cztt.cjs.map +0 -1
  266. package/dist/storage-LYwFQPNO.js.map +0 -1
  267. package/dist/validateConnectionStatus-CsvYmCOI.cjs.map +0 -1
  268. package/dist/validateConnectionStatus-olE2sQ3U.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"syncActions-QeBhIVhG.js","names":["z","z","z","z","z"],"sources":["../src/clients/syncActions/utils/response.ts","../src/clients/syncActions/constants.ts","../src/clients/syncActions/schemas.ts","../src/clients/syncActions/apify/schemas.ts","../src/clients/syncActions/apify/utils.ts","../src/clients/syncActions/apify/apify.ts","../src/clients/syncActions/dbt/schemas.ts","../src/clients/syncActions/dbt/utils.ts","../src/clients/syncActions/dbt/dbt.ts","../src/clients/syncActions/git/constants.ts","../src/clients/syncActions/git/schemas.ts","../src/clients/syncActions/git/utils.ts","../src/clients/syncActions/git/git.ts","../src/clients/syncActions/looker/schemas.ts","../src/clients/syncActions/looker/looker.ts","../src/clients/syncActions/syncActionsClient.ts"],"sourcesContent":["import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { defaultValidateStatus } from '../../../fetchClient';\n\ntype SyncActionErrorBody = {\n status?: unknown;\n message?: unknown;\n error?: unknown;\n exceptionId?: unknown;\n code?: unknown;\n};\n\nconst asErrorBody = (data: unknown): SyncActionErrorBody | null =>\n typeof data === 'object' && data !== null ? (data as SyncActionErrorBody) : null;\n\nconst asString = (value: unknown) => (typeof value === 'string' && value ? value : undefined);\nconst asNumber = (value: unknown) => (typeof value === 'number' ? value : undefined);\n\n/**\n * A component reports failure two ways: a non-2xx response, and a **2xx** whose body carries\n * `status: 'error'` (the component ran, and said no). Both are recognised here so every sync action\n * fails as one `SyncActionError` — `validateStatus` is the only hook that sees the parsed body of a\n * successful response, which is what the second case needs.\n *\n * Throwing rather than returning the error is deliberate. `coreFetch` only rethrows a returned value\n * that is an `ApiError`, and `SyncActionError` is a peer of `ApiError`, not a subclass: a component\n * answering `status: 'error'` on a **200** gave a business answer, not a transport failure, so it\n * must not satisfy `isApiError` / `isFetchClientError` — those drive retry and \"network problem\"\n * handling, and `err.response.status` would read 200 and mislead every status-based branch.\n */\nexport const syncActionValidateStatus: ValidateStatusFn = (apiResponse) => {\n const body = asErrorBody(apiResponse.data);\n\n if (body?.status === 'error') {\n throw new SyncActionError(\n asString(body.message) ?? asString(body.error) ?? apiResponse.response.statusText,\n {\n exceptionId: asString(body.exceptionId),\n code: asNumber(body.code),\n data: apiResponse.data,\n },\n );\n }\n\n return defaultValidateStatus(apiResponse);\n};\n","export const SyncAction = {\n DATA_APP_GIT_REPOSITORY: 'git-repository',\n DATA_APP_ENTRYPOINTS: 'data-app-entrypoints',\n DBT_COMPILE: 'dbtCompile',\n DBT_RUN_RESULTS: 'dbtRunResults',\n GIT_REPOSITORY: 'gitRepository',\n ENROLL_MFA: 'enrollMFA',\n LIST_ACTORS: 'listActors',\n LIST_TASKS: 'listTasks',\n TEST_LOOKER_CREDENTIALS: 'testLookerCredentials',\n};\n","import * as z from 'zod';\n\n/**\n * The Keboola-side context every sync action carries, whichever action it is. Namespaces extend it\n * with the fields their own action needs, so a caller never assembles the rest of the body.\n */\nexport const syncActionContextSchema = z.object({\n /**\n * Required, because omitting it changes nothing: the service normalises a missing, empty or\n * `null` value to `\"default\"` and resolves that to the default branch's numeric id — the same id,\n * branch type and downstream context an explicit value resolves to, with no extra lookup either\n * way. Requiring it keeps every request self-describing. Both a numeric id and the literal\n * `\"default\"` are accepted (`keboola/runner-sync-api`: `ExecuteActionRequestProcessor` →\n * `BranchTypeResolver`).\n */\n branchId: z.string().min(1, 'Required'),\n /**\n * Leave undefined. The service then runs the component's registered tag from the Developer\n * Portal / Storage component definition — the currently published version, not Docker's\n * `latest`. Set it only to deliberately pin a specific or branch build.\n */\n tag: z.string().optional(),\n mode: z.enum(['run', 'debug']).optional(),\n});\n\n/**\n * The `/actions` request body. `configData` is whatever the component's action expects, so it is\n * only asserted to be an object here — each namespace validates the shape its own action needs\n * before handing it over.\n */\nexport const syncActionBodySchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n action: z.string().min(1, 'Required'),\n configData: z.record(z.string(), z.unknown()),\n});\n\nexport type SyncActionContext = z.infer<typeof syncActionContextSchema>;\nexport type SyncActionBody = z.infer<typeof syncActionBodySchema>;\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const apifyObjectsInputSchema = syncActionContextSchema.extend({\n '#token': z.string().min(1, 'Required'),\n});\n\nexport const apifyObjectsSchema = z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n }),\n);\n\nexport type ApifyObjectsInput = z.infer<typeof apifyObjectsInputSchema>;\n\nexport type ApifyObject = z.infer<typeof apifyObjectsSchema>[number];\n","import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { syncActionValidateStatus } from '../utils/response';\n\n/**\n * A slow Apify account makes the component answer `{ timeout: true }` on a 200 instead of the list —\n * a failure only this action knows how to spot, so it is checked before deferring to the shared\n * validation.\n */\nexport const apifyValidateStatus: ValidateStatusFn = (apiResponse) => {\n const data = apiResponse.data;\n\n if (typeof data === 'object' && data !== null && 'timeout' in data && data.timeout)\n throw new SyncActionError('Timed out while loading data from Apify.', { data });\n\n return syncActionValidateStatus(apiResponse);\n};\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { type ApifyObjectsInput, apifyObjectsInputSchema, apifyObjectsSchema } from './schemas';\nimport { apifyValidateStatus } from './utils';\n\nexport const createApify = (sendSyncAction: SendSyncAction) => {\n const _getObjects = async (action: string, input: ApifyObjectsInput, signal?: AbortSignal) => {\n const { '#token': token, ...context } = parseOrThrow(apifyObjectsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action,\n componentId: ComponentId.APIFY,\n configData: { parameters: { '#token': token } },\n },\n { signal, validateStatus: apifyValidateStatus },\n );\n\n return parseOrThrow(apifyObjectsSchema, data);\n };\n\n const getActors = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_ACTORS, input, signal);\n };\n\n const getTasks = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_TASKS, input, signal);\n };\n\n return { getActors, getTasks };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\n/**\n * `componentId` is a plain string here, unlike the git actions' closed enum. Every dbt transformation\n * answers `dbtCompile` and `dbtRunResults` under the same action name and the same payload, so the id\n * selects nothing — it only names the component to run, and rejecting an unlisted one would cost the\n * caller a cast for no guarantee. The component itself refuses an action it does not serve.\n */\nexport const dbtActionInputSchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n configId: z.string().min(1, 'Required'),\n artifacts: z.record(z.string(), z.unknown()).optional(),\n});\n\n/**\n * `compiled` maps a model's file name (`orders.sql`) to its compiled SQL. Key order is the\n * component's own and is preserved, so the caller can render the models in it.\n *\n * A configuration that has never run does **not** answer with an empty payload — the component\n * raises a user exception telling you to run it first, which arrives as a `SyncActionError` carrying\n * that sentence. The empty default here is only for a payload that omits the key anyway: rendering\n * \"nothing to show\" beats failing on a validation error no caller can act on. A key that is\n * *present* with the wrong shape still fails — that is a contract change, and reading it as \"no\n * models\" would hide it.\n */\nexport const dbtCompiledSchema = z\n .object({ compiled: z.record(z.string(), z.string()).default({}) })\n .transform(({ compiled }) => compiled);\n\n/**\n * dbt reports the worker as `\"Thread-1\"`; the number alone is what a consumer positions a row by, so\n * the prefix is stripped here rather than in every consumer. An unparseable value falls back to `0`\n * — one odd worker label must not cost the caller the whole timeline.\n */\nconst dbtThreadSchema = z\n .string()\n .transform((thread) => Number.parseInt(thread.replace(/^Thread-/, ''), 10))\n .pipe(z.number().int().nonnegative())\n .catch(0);\n\n/** Each entry also carries `status` and `dependsOn`, dropped here until a consumer needs them. */\nexport const dbtModelTimingSchema = z.object({\n id: z.string(),\n name: z.string(),\n thread: dbtThreadSchema,\n /** ISO timestamps, left as strings — the consumer decides what to parse them into. */\n timeStarted: z.string(),\n timeCompleted: z.string(),\n});\n\n/** Defaults to empty for the same reason as `compiled` above — and with the same caveat. */\nexport const dbtRunResultsSchema = z\n .object({ modelTiming: z.array(dbtModelTimingSchema).default([]) })\n .transform(({ modelTiming }) => modelTiming);\n\nexport type DbtActionInput = z.infer<typeof dbtActionInputSchema>;\nexport type DbtCompiled = z.infer<typeof dbtCompiledSchema>;\nexport type DbtModelTiming = z.infer<typeof dbtModelTimingSchema>;\n","export type DbtActionConfigDataInput = {\n configId: string;\n artifacts?: Record<string, unknown>;\n};\n\n/**\n * Both dbt artifact actions read the *stored* configuration — `configId` is what they resolve it by,\n * so the payload carries no settings of its own. `artifacts` is the configuration's own artifacts\n * section, passed through untouched: it selects which run's artifacts the component picks up, and\n * omitting it leaves the component on its default (the latest run).\n */\nexport const buildDbtActionConfigData = ({ configId, artifacts }: DbtActionConfigDataInput) => ({\n parameters: { configId },\n ...(artifacts && { artifacts }),\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n type DbtActionInput,\n dbtActionInputSchema,\n dbtCompiledSchema,\n dbtRunResultsSchema,\n} from './schemas';\nimport { buildDbtActionConfigData } from './utils';\n\n/** The dbt transformations' artifact actions — both read what the *last run* left behind. */\nexport const createDbt = (sendSyncAction: SendSyncAction) => {\n const sendDbtAction = (action: string, input: DbtActionInput, signal?: AbortSignal) => {\n const { componentId, configId, artifacts, ...context } = parseOrThrow(\n dbtActionInputSchema,\n input,\n );\n\n return sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildDbtActionConfigData({ configId, artifacts }),\n },\n { signal },\n );\n };\n\n /** The compiled SQL of every model in the configuration. */\n const compile = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_COMPILE, input, signal);\n\n return parseOrThrow(dbtCompiledSchema, data);\n };\n\n /** When each model of the last run started and finished, and on which worker. */\n const runResults = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_RUN_RESULTS, input, signal);\n\n return parseOrThrow(dbtRunResultsSchema, data);\n };\n\n return { compile, runResults };\n};\n","import { ComponentId } from '../../../constants';\n\n/**\n * Components whose git repository lives under `parameters.dataApp.git.repository` and that answer to\n * the `git-repository` action. They are the only ones serving `data-app-entrypoints`, and the only\n * ones accepting an SSH key.\n */\nexport const DATA_APP_FAMILY = [ComponentId.DATA_APPS, ComponentId.SANDBOXES] as const;\n\n/**\n * Components whose git repository lives under `parameters.git.repo` and that answer to the\n * `gitRepository` action. They authenticate over HTTPS with a username and password only.\n *\n * Deliberately a list rather than \"everything else\": `listBranches` / `list_branches` /\n * `checkBranches` also exist on unrelated third-party components (`kds-team.app-custom-python`,\n * `keboola.app-transformation-migration`, `kds-team.app-sox-migration-checker`) under a different\n * contract. Those stay on the generic `sendSyncAction` escape hatch.\n */\nconst DBT_FAMILY = [\n ComponentId.DBT_TEST_CORE_KEY_PAIR,\n ComponentId.DBT_TEST_REMOTE_SNOWFLAKE,\n ComponentId.DBT_TRANSFORMATION,\n ComponentId.DBT_TRANSFORMATION_LOCAL_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_MSSQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_POSTGRESQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_REDSHIFT,\n ComponentId.DBT_TRANSFORMATION_REMOTE_SNOWFLAKE,\n] as const;\n\nexport const GIT_FAMILY = [...DATA_APP_FAMILY, ...DBT_FAMILY] as const;\n\n/** The ids the git actions accept — anything else has no action name or payload path to resolve. */\nexport type GitComponentId = (typeof GIT_FAMILY)[number];\nexport type DataAppComponentId = (typeof DATA_APP_FAMILY)[number];\n\nconst dataAppIds: ReadonlySet<string> = new Set(DATA_APP_FAMILY);\n\nexport const isDataAppFamily = (componentId: string): componentId is DataAppComponentId =>\n dataAppIds.has(componentId);\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nimport { DATA_APP_FAMILY, GIT_FAMILY, isDataAppFamily } from './constants';\n\nexport const gitAuthSchema = z.discriminatedUnion('type', [\n z.object({ type: z.literal('public') }),\n z.object({\n type: z.literal('password'),\n username: z.string().min(1, 'Required'),\n '#password': z.string().min(1, 'Required'),\n }),\n z.object({\n type: z.literal('sshKey'),\n /**\n * Optional, unlike the password variant's — the key is the whole credential.\n *\n * - The component rewrites the URL to `git@host:path` and clones over SSH, where the user is\n * always `git` (`keboola/sandboxes`: `GitRepository::resolveRepositoryUrl`).\n * - It never reads `username` on that path, so a deploy key has none to be stored with.\n * - Accept one when the caller has it anyway; it reaches the component and is ignored there.\n */\n username: z.string().min(1, 'Required').optional(),\n '#sshKey': z.string().min(1, 'Required'),\n }),\n]);\n\nconst gitInputSchema = syncActionContextSchema.extend({\n repositoryUrl: z.string().min(1, 'Required'),\n auth: gitAuthSchema.default({ type: 'public' }),\n});\n\n/**\n * Accepts only the components that serve a git repository action — the action name and the\n * `configData` path are resolved from the id, so one from neither family has nowhere to go. The\n * enum rejects an unsupported id when parsing, before any request is sent.\n *\n * **Takes no `branch`, deliberately — do not add one.** It is a run-config field the component\n * feeds to `git clone -b <branch>`, so a stale or renamed value fails the clone and breaks the very\n * call you make to find out which branches exist. Accepting it optionally would let a caller\n * reintroduce that by spreading in an existing config; zod strips it instead.\n */\nexport const getBranchesInputSchema = gitInputSchema\n .extend({ componentId: z.enum(GIT_FAMILY) })\n .check((ctx) => {\n const { componentId, auth } = ctx.value;\n\n // The one rule the types can't carry: a single method taking either family can't also vary its\n // auth by family. dbt clones over HTTPS with a username and password, and has no SSH key field.\n if (auth.type !== 'sshKey' || isDataAppFamily(componentId)) return;\n\n ctx.issues.push({\n code: 'custom',\n input: auth,\n path: ['auth'],\n message: `Component \"${componentId}\" authenticates with a password, not an SSH key.`,\n });\n });\n\n/** Only the data-app family serves `data-app-entrypoints`; the enum rejects anything else. */\nexport const getEntrypointsInputSchema = gitInputSchema.extend({\n componentId: z.enum(DATA_APP_FAMILY),\n /**\n * Unlike `getBranches`, the branch is a real input here — it selects whose revision's files get\n * enumerated. The *git* branch, not the dev branch (`branchId`) every sync action carries.\n * Omit it for the repository's default branch; don't resolve one client-side.\n *\n * An empty string normalises to omitted rather than being rejected: a config written outside the\n * UI can carry `branch: \"\"`, and the form this replaces deleted a falsy branch before sending, so\n * refusing it would fail a call that has always meant \"the default branch\".\n */\n branch: z\n .string()\n .optional()\n .transform((branch) => branch || undefined),\n});\n\n/**\n * Only `branch` is load-bearing — it is the value the caller selects and stores. The rest is\n * decoration the UI renders beside it, so each field falls back to an empty string rather than\n * failing: one commit with no message must not cost the caller the whole branch list. They stay\n * `string` rather than becoming optional, so a consumer needs no new undefined handling.\n */\nconst gitBranchSchema = z.object({\n branch: z.string(),\n sha: z.string().catch(''),\n date: z.string().catch(''),\n comment: z.string().catch(''),\n author: z\n .object({\n name: z.string().catch(''),\n email: z.string().catch(''),\n })\n .catch({ name: '', email: '' }),\n});\n\n/**\n * Only `repository.branches` is confirmed — it is what the UI read before these actions were typed.\n * The top-level position is accepted too because the schema this replaces declared it there, and\n * nothing ever exercised that schema to settle which is right; the two families are separate\n * implementations, so both may well be real.\n *\n * A list in neither position is a different thing from an empty one, though, and is rejected rather\n * than read as none: an empty array is a real answer (a repository with no branches yet), while an\n * envelope carrying no list at all is one we do not understand, and rendering that as \"no branches\"\n * would hide the failure behind an ordinary empty state.\n */\n/**\n * Either a JSON array or an object keyed by stringified indices, gaps included:\n * `{ \"0\": …, \"1\": …, \"3\": … }`. The component filters the list server-side, and a PHP array whose\n * integer keys are no longer contiguous serializes as an object. `Object.values` reads those keys\n * back in ascending numeric order, so the branch order survives either shape.\n */\nconst gitBranchListSchema = z\n .union([z.array(gitBranchSchema), z.record(z.string(), gitBranchSchema)])\n .transform((branches) => (Array.isArray(branches) ? branches : Object.values(branches)));\n\nexport const gitBranchesSchema = z\n .object({\n repository: z.object({ branches: gitBranchListSchema.optional() }).optional(),\n branches: gitBranchListSchema.optional(),\n })\n .check((ctx) => {\n if (ctx.value.branches ?? ctx.value.repository?.branches) return;\n\n ctx.issues.push({\n code: 'custom',\n input: ctx.value,\n message: 'The response carried no branch list.',\n });\n })\n .transform(({ repository, branches }) => branches ?? repository?.branches ?? []);\n\nexport const gitEntrypointsSchema = z.object({\n entrypoints: z.array(z.string()),\n});\n\nexport type GitAuth = z.infer<typeof gitAuthSchema>;\nexport type GetBranchesInput = z.input<typeof getBranchesInputSchema>;\nexport type GetEntrypointsInput = z.input<typeof getEntrypointsInputSchema>;\nexport type GitBranch = z.infer<typeof gitBranchSchema>;\nexport type GitEntrypoints = z.infer<typeof gitEntrypointsSchema>;\n","import type { GitAuth } from './schemas';\n\n/** Every variant is already the shape the components read, minus the discriminator. */\nconst toCredentials = (auth: GitAuth) => {\n const { type: _type, ...credentials } = auth;\n\n return credentials;\n};\n\n/**\n * Which revision the component clones before it answers:\n *\n * - `default` — no `-b` flag, so the clone lands on the repository's own default branch. Branch\n * listing must use this: it clones purely to enumerate the remote branches, so pinning one that\n * is stale or renamed fails the very call made to discover the valid ones.\n * `getBranchesInputSchema` accepts no `branch`, so that path has nothing to pin with.\n * - `branch` — pins the clone with `git clone -b <branch>`, deciding whose revision the action\n * reads. Entrypoint listing uses it once the user has picked a branch.\n */\ntype GitRevision = { revision: 'default' } | { revision: 'branch'; branch: string };\n\n/** The default is the absence of a branch — the component's own `git clone` decides it. */\nconst toRevision = (rev: GitRevision) => (rev.revision === 'branch' ? { branch: rev.branch } : {});\n\nexport type GitConfigDataInput = {\n repositoryUrl: string;\n auth: GitAuth;\n} & GitRevision;\n\n/** Data apps nest their repository a level deeper, and call the URL `repository`. */\nexport const buildDataAppConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n dataApp: {\n git: {\n repository: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n },\n});\n\n/** dbt transformations keep the same settings at the top of `parameters`, under `repo`. */\nexport const buildDbtConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n git: {\n repo: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { isDataAppFamily } from './constants';\nimport {\n type GetBranchesInput,\n getBranchesInputSchema,\n type GetEntrypointsInput,\n getEntrypointsInputSchema,\n gitBranchesSchema,\n gitEntrypointsSchema,\n} from './schemas';\nimport { buildDataAppConfigData, buildDbtConfigData } from './utils';\n\n/**\n * Git repository actions, across both component families that serve them — the data apps\n * (`git-repository`) and the dbt transformations (`gitRepository`). Which action name and which\n * `configData` shape a call uses is resolved from `componentId`; see `./constants`.\n */\nexport const createGit = (sendSyncAction: SendSyncAction) => {\n const getBranches = async (input: GetBranchesInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, ...context } = parseOrThrow(\n getBranchesInputSchema,\n input,\n );\n const isDataApp = isDataAppFamily(componentId);\n const action = isDataApp ? SyncAction.DATA_APP_GIT_REPOSITORY : SyncAction.GIT_REPOSITORY;\n const buildConfigData = isDataApp ? buildDataAppConfigData : buildDbtConfigData;\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildConfigData({ repositoryUrl, auth, revision: 'default' }),\n },\n { signal },\n );\n\n return parseOrThrow(gitBranchesSchema, data);\n };\n\n const getEntrypoints = async (input: GetEntrypointsInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, branch, ...context } = parseOrThrow(\n getEntrypointsInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action: SyncAction.DATA_APP_ENTRYPOINTS,\n // Data-app only — the input schema rejects every other component, so no family branch here.\n configData: buildDataAppConfigData({\n repositoryUrl,\n auth,\n ...(branch ? { revision: 'branch', branch } : { revision: 'default' }),\n }),\n },\n { signal },\n );\n\n return parseOrThrow(gitEntrypointsSchema, data);\n };\n\n return { getBranches, getEntrypoints };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const testLookerCredentialsInputSchema = syncActionContextSchema.extend({\n credentialsId: z.string().min(1, 'Required'),\n '#token': z.string().min(1, 'Required'),\n host: z.string().min(1, 'Required'),\n});\n\n/** The component answers with a status envelope only — there is no payload to model. */\nexport const lookerCredentialsResultSchema = z.object({\n status: z.string().optional(),\n message: z.string().optional(),\n});\n\nexport type TestLookerCredentialsInput = z.infer<typeof testLookerCredentialsInputSchema>;\nexport type LookerCredentialsResult = z.infer<typeof lookerCredentialsResultSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n lookerCredentialsResultSchema,\n type TestLookerCredentialsInput,\n testLookerCredentialsInputSchema,\n} from './schemas';\n\nexport const createLooker = (sendSyncAction: SendSyncAction) => {\n /** Registers the project's Looker credentials; throws `SyncActionError` when Looker rejects them. */\n const testCredentials = async (input: TestLookerCredentialsInput, signal?: AbortSignal) => {\n const {\n credentialsId,\n '#token': token,\n host,\n ...context\n } = parseOrThrow(testLookerCredentialsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.TEST_LOOKER_CREDENTIALS,\n componentId: ComponentId.WR_LOOKER_V2,\n configData: { parameters: { looker: { credentialsId, '#token': token, host } } },\n },\n { signal },\n );\n\n return parseOrThrow(lookerCredentialsResultSchema, data);\n };\n\n return { testCredentials };\n};\n","import { parseOrThrow } from '../../errors';\nimport type { ValidateStatusFn } from '../../fetchClient';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { syncActionValidateStatus } from './utils/response';\nimport { createApify } from './apify';\nimport { SyncAction } from './constants';\nimport { createDbt } from './dbt';\nimport { createGit } from './git';\nimport { createLooker } from './looker';\nimport { type SyncActionBody, syncActionBodySchema } from './schemas';\nimport type { EnrollMFAInput, PostActionsBodyRaw } from './types';\n\nexport type SendSyncActionOptions = {\n signal?: AbortSignal;\n /**\n * Replaces the client's `syncActionValidateStatus` for this one request. Use it where a component\n * signals failure in a way only its own action knows about — delegate to the shared one for\n * everything else.\n */\n validateStatus?: ValidateStatusFn;\n};\n\nconst createSendSyncAction = (client: SyncActionClient) => {\n return async (body: SyncActionBody, options: SendSyncActionOptions = {}) => {\n const { data } = await client.post(\n '/actions',\n // The generated body type has `configData: Record<string, never>`, which nothing can satisfy;\n // `syncActionBodySchema` is the real contract and is what the request is validated against.\n { body: parseOrThrow(syncActionBodySchema, body) as unknown as PostActionsBodyRaw },\n options,\n );\n\n return data;\n };\n};\n\nexport type SendSyncAction = ReturnType<typeof createSendSyncAction>;\ntype SyncActionClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createSyncActionsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n validateStatus: syncActionValidateStatus,\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const sendSyncAction = createSendSyncAction(client);\n\n const enrollMFA = ({ email, ...rest }: EnrollMFAInput, signal?: AbortSignal) => {\n return sendSyncAction(\n {\n ...rest,\n action: SyncAction.ENROLL_MFA,\n configData: {\n parameters: {\n user: {\n email,\n },\n },\n },\n },\n { signal },\n );\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n sendSyncAction,\n enrollMFA,\n apify: createApify(sendSyncAction),\n dbt: createDbt(sendSyncAction),\n git: createGit(sendSyncAction),\n looker: createLooker(sendSyncAction),\n };\n};\n"],"mappings":";;;;;;;;;AAYA,MAAM,eAAe,SACnB,OAAO,SAAS,YAAY,SAAS,OAAQ,OAA+B;AAE9E,MAAM,YAAY,UAAoB,OAAO,UAAU,YAAY,QAAQ,QAAQ,KAAA;AACnF,MAAM,YAAY,UAAoB,OAAO,UAAU,WAAW,QAAQ,KAAA;;;;;;;;;;;;;AAc1E,MAAa,4BAA8C,gBAAgB;CACzE,MAAM,OAAO,YAAY,YAAY,IAAI;CAEzC,IAAI,MAAM,WAAW,SACnB,MAAM,IAAI,gBACR,SAAS,KAAK,OAAO,KAAK,SAAS,KAAK,KAAK,KAAK,YAAY,SAAS,YACvE;EACE,aAAa,SAAS,KAAK,WAAW;EACtC,MAAM,SAAS,KAAK,IAAI;EACxB,MAAM,YAAY;CACpB,CACF;CAGF,OAAO,sBAAsB,WAAW;AAC1C;;;AC7CA,MAAa,aAAa;CACxB,yBAAyB;CACzB,sBAAsB;CACtB,aAAa;CACb,iBAAiB;CACjB,gBAAgB;CAChB,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,yBAAyB;AAC3B;;;;;;;ACJA,MAAa,0BAA0BA,IAAE,OAAO;;;;;;;;;CAS9C,UAAUA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;;;;;;CAMtC,KAAKA,IAAE,OAAO,CAAC,CAAC,SAAS;CACzB,MAAMA,IAAE,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC,CA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AAe,UAAU;IAAO;GAAK,EAAE,EAAE;EACjF,GACA,EAAE,OAAO,CACX;EAEA,OAAO,aAAa,+BAA+B,IAAI;CACzD;CAEA,OAAO,EAAE,gBAAgB;AAC3B;;;ACTA,MAAM,wBAAwB,WAA6B;CACzD,OAAO,OAAO,MAAsB,UAAiC,CAAC,MAAM;EAC1E,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,YAGA,EAAE,MAAM,aAAa,sBAAsB,IAAI,EAAmC,GAClF,OACF;EAEA,OAAO;CACT;AACF;AAKA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;EAC/B,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,qBAAqB,MAAM;CAElD,MAAM,aAAa,EAAE,OAAO,GAAG,QAAwB,WAAyB;EAC9E,OAAO,eACL;GACE,GAAG;GACH,QAAQ,WAAW;GACnB,YAAY,EACV,YAAY,EACV,MAAM,EACJ,MACF,EACF,EACF;EACF,GACA,EAAE,OAAO,CACX;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA,OAAO,YAAY,cAAc;EACjC,KAAK,UAAU,cAAc;EAC7B,KAAK,UAAU,cAAc;EAC7B,QAAQ,aAAa,cAAc;CACrC;AACF"}
1
+ {"version":3,"file":"syncActions-B3NS5a0g.js","names":["z","z","z","z","z"],"sources":["../src/clients/syncActions/utils/response.ts","../src/clients/syncActions/constants.ts","../src/clients/syncActions/schemas.ts","../src/clients/syncActions/apify/schemas.ts","../src/clients/syncActions/apify/utils.ts","../src/clients/syncActions/apify/apify.ts","../src/clients/syncActions/dbt/schemas.ts","../src/clients/syncActions/dbt/utils.ts","../src/clients/syncActions/dbt/dbt.ts","../src/clients/syncActions/git/constants.ts","../src/clients/syncActions/git/schemas.ts","../src/clients/syncActions/git/utils.ts","../src/clients/syncActions/git/git.ts","../src/clients/syncActions/looker/schemas.ts","../src/clients/syncActions/looker/looker.ts","../src/clients/syncActions/syncActionsClient.ts"],"sourcesContent":["import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { defaultValidateStatus } from '../../../fetchClient';\n\ntype SyncActionErrorBody = {\n status?: unknown;\n message?: unknown;\n error?: unknown;\n exceptionId?: unknown;\n code?: unknown;\n};\n\nconst asErrorBody = (data: unknown): SyncActionErrorBody | null =>\n typeof data === 'object' && data !== null ? (data as SyncActionErrorBody) : null;\n\nconst asString = (value: unknown) => (typeof value === 'string' && value ? value : undefined);\nconst asNumber = (value: unknown) => (typeof value === 'number' ? value : undefined);\n\n/**\n * A component reports failure two ways: a non-2xx response, and a **2xx** whose body carries\n * `status: 'error'` (the component ran, and said no). Both are recognised here so every sync action\n * fails as one `SyncActionError` — `validateStatus` is the only hook that sees the parsed body of a\n * successful response, which is what the second case needs.\n *\n * Throwing rather than returning the error is deliberate. `coreFetch` only rethrows a returned value\n * that is an `ApiError`, and `SyncActionError` is a peer of `ApiError`, not a subclass: a component\n * answering `status: 'error'` on a **200** gave a business answer, not a transport failure, so it\n * must not satisfy `isApiError` / `isFetchClientError` — those drive retry and \"network problem\"\n * handling, and `err.response.status` would read 200 and mislead every status-based branch.\n */\nexport const syncActionValidateStatus: ValidateStatusFn = (apiResponse) => {\n const body = asErrorBody(apiResponse.data);\n\n if (body?.status === 'error') {\n throw new SyncActionError(\n asString(body.message) ?? asString(body.error) ?? apiResponse.response.statusText,\n {\n exceptionId: asString(body.exceptionId),\n code: asNumber(body.code),\n data: apiResponse.data,\n },\n );\n }\n\n return defaultValidateStatus(apiResponse);\n};\n","export const SyncAction = {\n DATA_APP_GIT_REPOSITORY: 'git-repository',\n DATA_APP_ENTRYPOINTS: 'data-app-entrypoints',\n DBT_COMPILE: 'dbtCompile',\n DBT_RUN_RESULTS: 'dbtRunResults',\n GIT_REPOSITORY: 'gitRepository',\n ENROLL_MFA: 'enrollMFA',\n LIST_ACTORS: 'listActors',\n LIST_TASKS: 'listTasks',\n TEST_LOOKER_CREDENTIALS: 'testLookerCredentials',\n};\n","import * as z from 'zod';\n\n/**\n * The Keboola-side context every sync action carries, whichever action it is. Namespaces extend it\n * with the fields their own action needs, so a caller never assembles the rest of the body.\n */\nexport const syncActionContextSchema = z.object({\n /**\n * Required, because omitting it changes nothing: the service normalises a missing, empty or\n * `null` value to `\"default\"` and resolves that to the default branch's numeric id — the same id,\n * branch type and downstream context an explicit value resolves to, with no extra lookup either\n * way. Requiring it keeps every request self-describing. Both a numeric id and the literal\n * `\"default\"` are accepted (`keboola/runner-sync-api`: `ExecuteActionRequestProcessor` →\n * `BranchTypeResolver`).\n */\n branchId: z.string().min(1, 'Required'),\n /**\n * Leave undefined. The service then runs the component's registered tag from the Developer\n * Portal / Storage component definition — the currently published version, not Docker's\n * `latest`. Set it only to deliberately pin a specific or branch build.\n */\n tag: z.string().optional(),\n mode: z.enum(['run', 'debug']).optional(),\n});\n\n/**\n * The `/actions` request body. `configData` is whatever the component's action expects, so it is\n * only asserted to be an object here — each namespace validates the shape its own action needs\n * before handing it over.\n */\nexport const syncActionBodySchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n action: z.string().min(1, 'Required'),\n configData: z.record(z.string(), z.unknown()),\n});\n\nexport type SyncActionContext = z.infer<typeof syncActionContextSchema>;\nexport type SyncActionBody = z.infer<typeof syncActionBodySchema>;\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const apifyObjectsInputSchema = syncActionContextSchema.extend({\n '#token': z.string().min(1, 'Required'),\n});\n\nexport const apifyObjectsSchema = z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n }),\n);\n\nexport type ApifyObjectsInput = z.infer<typeof apifyObjectsInputSchema>;\n\nexport type ApifyObject = z.infer<typeof apifyObjectsSchema>[number];\n","import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { syncActionValidateStatus } from '../utils/response';\n\n/**\n * A slow Apify account makes the component answer `{ timeout: true }` on a 200 instead of the list —\n * a failure only this action knows how to spot, so it is checked before deferring to the shared\n * validation.\n */\nexport const apifyValidateStatus: ValidateStatusFn = (apiResponse) => {\n const data = apiResponse.data;\n\n if (typeof data === 'object' && data !== null && 'timeout' in data && data.timeout)\n throw new SyncActionError('Timed out while loading data from Apify.', { data });\n\n return syncActionValidateStatus(apiResponse);\n};\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { type ApifyObjectsInput, apifyObjectsInputSchema, apifyObjectsSchema } from './schemas';\nimport { apifyValidateStatus } from './utils';\n\nexport const createApify = (sendSyncAction: SendSyncAction) => {\n const _getObjects = async (action: string, input: ApifyObjectsInput, signal?: AbortSignal) => {\n const { '#token': token, ...context } = parseOrThrow(apifyObjectsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action,\n componentId: ComponentId.APIFY,\n configData: { parameters: { '#token': token } },\n },\n { signal, validateStatus: apifyValidateStatus },\n );\n\n return parseOrThrow(apifyObjectsSchema, data);\n };\n\n const getActors = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_ACTORS, input, signal);\n };\n\n const getTasks = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_TASKS, input, signal);\n };\n\n return { getActors, getTasks };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\n/**\n * `componentId` is a plain string here, unlike the git actions' closed enum. Every dbt transformation\n * answers `dbtCompile` and `dbtRunResults` under the same action name and the same payload, so the id\n * selects nothing — it only names the component to run, and rejecting an unlisted one would cost the\n * caller a cast for no guarantee. The component itself refuses an action it does not serve.\n */\nexport const dbtActionInputSchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n configId: z.string().min(1, 'Required'),\n artifacts: z.record(z.string(), z.unknown()).optional(),\n});\n\n/**\n * `compiled` maps a model's file name (`orders.sql`) to its compiled SQL. Key order is the\n * component's own and is preserved, so the caller can render the models in it.\n *\n * A configuration that has never run does **not** answer with an empty payload — the component\n * raises a user exception telling you to run it first, which arrives as a `SyncActionError` carrying\n * that sentence. The empty default here is only for a payload that omits the key anyway: rendering\n * \"nothing to show\" beats failing on a validation error no caller can act on. A key that is\n * *present* with the wrong shape still fails — that is a contract change, and reading it as \"no\n * models\" would hide it.\n */\nexport const dbtCompiledSchema = z\n .object({ compiled: z.record(z.string(), z.string()).default({}) })\n .transform(({ compiled }) => compiled);\n\n/**\n * dbt reports the worker as `\"Thread-1\"`; the number alone is what a consumer positions a row by, so\n * the prefix is stripped here rather than in every consumer. An unparseable value falls back to `0`\n * — one odd worker label must not cost the caller the whole timeline.\n */\nconst dbtThreadSchema = z\n .string()\n .transform((thread) => Number.parseInt(thread.replace(/^Thread-/, ''), 10))\n .pipe(z.number().int().nonnegative())\n .catch(0);\n\n/** Each entry also carries `status` and `dependsOn`, dropped here until a consumer needs them. */\nexport const dbtModelTimingSchema = z.object({\n id: z.string(),\n name: z.string(),\n thread: dbtThreadSchema,\n /** ISO timestamps, left as strings — the consumer decides what to parse them into. */\n timeStarted: z.string(),\n timeCompleted: z.string(),\n});\n\n/** Defaults to empty for the same reason as `compiled` above — and with the same caveat. */\nexport const dbtRunResultsSchema = z\n .object({ modelTiming: z.array(dbtModelTimingSchema).default([]) })\n .transform(({ modelTiming }) => modelTiming);\n\nexport type DbtActionInput = z.infer<typeof dbtActionInputSchema>;\nexport type DbtCompiled = z.infer<typeof dbtCompiledSchema>;\nexport type DbtModelTiming = z.infer<typeof dbtModelTimingSchema>;\n","export type DbtActionConfigDataInput = {\n configId: string;\n artifacts?: Record<string, unknown>;\n};\n\n/**\n * Both dbt artifact actions read the *stored* configuration — `configId` is what they resolve it by,\n * so the payload carries no settings of its own. `artifacts` is the configuration's own artifacts\n * section, passed through untouched: it selects which run's artifacts the component picks up, and\n * omitting it leaves the component on its default (the latest run).\n */\nexport const buildDbtActionConfigData = ({ configId, artifacts }: DbtActionConfigDataInput) => ({\n parameters: { configId },\n ...(artifacts && { artifacts }),\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n type DbtActionInput,\n dbtActionInputSchema,\n dbtCompiledSchema,\n dbtRunResultsSchema,\n} from './schemas';\nimport { buildDbtActionConfigData } from './utils';\n\n/** The dbt transformations' artifact actions — both read what the *last run* left behind. */\nexport const createDbt = (sendSyncAction: SendSyncAction) => {\n const sendDbtAction = (action: string, input: DbtActionInput, signal?: AbortSignal) => {\n const { componentId, configId, artifacts, ...context } = parseOrThrow(\n dbtActionInputSchema,\n input,\n );\n\n return sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildDbtActionConfigData({ configId, artifacts }),\n },\n { signal },\n );\n };\n\n /** The compiled SQL of every model in the configuration. */\n const compile = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_COMPILE, input, signal);\n\n return parseOrThrow(dbtCompiledSchema, data);\n };\n\n /** When each model of the last run started and finished, and on which worker. */\n const runResults = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_RUN_RESULTS, input, signal);\n\n return parseOrThrow(dbtRunResultsSchema, data);\n };\n\n return { compile, runResults };\n};\n","import { ComponentId } from '../../../constants';\n\n/**\n * Components whose git repository lives under `parameters.dataApp.git.repository` and that answer to\n * the `git-repository` action. They are the only ones serving `data-app-entrypoints`, and the only\n * ones accepting an SSH key.\n */\nexport const DATA_APP_FAMILY = [ComponentId.DATA_APPS, ComponentId.SANDBOXES] as const;\n\n/**\n * Components whose git repository lives under `parameters.git.repo` and that answer to the\n * `gitRepository` action. They authenticate over HTTPS with a username and password only.\n *\n * Deliberately a list rather than \"everything else\": `listBranches` / `list_branches` /\n * `checkBranches` also exist on unrelated third-party components (`kds-team.app-custom-python`,\n * `keboola.app-transformation-migration`, `kds-team.app-sox-migration-checker`) under a different\n * contract. Those stay on the generic `sendSyncAction` escape hatch.\n */\nconst DBT_FAMILY = [\n ComponentId.DBT_TEST_CORE_KEY_PAIR,\n ComponentId.DBT_TEST_REMOTE_SNOWFLAKE,\n ComponentId.DBT_TRANSFORMATION,\n ComponentId.DBT_TRANSFORMATION_LOCAL_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_MSSQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_POSTGRESQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_REDSHIFT,\n ComponentId.DBT_TRANSFORMATION_REMOTE_SNOWFLAKE,\n] as const;\n\nexport const GIT_FAMILY = [...DATA_APP_FAMILY, ...DBT_FAMILY] as const;\n\n/** The ids the git actions accept — anything else has no action name or payload path to resolve. */\nexport type GitComponentId = (typeof GIT_FAMILY)[number];\nexport type DataAppComponentId = (typeof DATA_APP_FAMILY)[number];\n\nconst dataAppIds: ReadonlySet<string> = new Set(DATA_APP_FAMILY);\n\nexport const isDataAppFamily = (componentId: string): componentId is DataAppComponentId =>\n dataAppIds.has(componentId);\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nimport { DATA_APP_FAMILY, GIT_FAMILY, isDataAppFamily } from './constants';\n\nexport const gitAuthSchema = z.discriminatedUnion('type', [\n z.object({ type: z.literal('public') }),\n z.object({\n type: z.literal('password'),\n username: z.string().min(1, 'Required'),\n '#password': z.string().min(1, 'Required'),\n }),\n z.object({\n type: z.literal('sshKey'),\n /**\n * Optional, unlike the password variant's — the key is the whole credential.\n *\n * - The component rewrites the URL to `git@host:path` and clones over SSH, where the user is\n * always `git` (`keboola/sandboxes`: `GitRepository::resolveRepositoryUrl`).\n * - It never reads `username` on that path, so a deploy key has none to be stored with.\n * - Accept one when the caller has it anyway; it reaches the component and is ignored there.\n */\n username: z.string().min(1, 'Required').optional(),\n '#sshKey': z.string().min(1, 'Required'),\n }),\n]);\n\nconst gitInputSchema = syncActionContextSchema.extend({\n repositoryUrl: z.string().min(1, 'Required'),\n auth: gitAuthSchema.default({ type: 'public' }),\n});\n\n/**\n * Accepts only the components that serve a git repository action — the action name and the\n * `configData` path are resolved from the id, so one from neither family has nowhere to go. The\n * enum rejects an unsupported id when parsing, before any request is sent.\n *\n * **Takes no `branch`, deliberately — do not add one.** It is a run-config field the component\n * feeds to `git clone -b <branch>`, so a stale or renamed value fails the clone and breaks the very\n * call you make to find out which branches exist. Accepting it optionally would let a caller\n * reintroduce that by spreading in an existing config; zod strips it instead.\n */\nexport const getBranchesInputSchema = gitInputSchema\n .extend({ componentId: z.enum(GIT_FAMILY) })\n .check((ctx) => {\n const { componentId, auth } = ctx.value;\n\n // The one rule the types can't carry: a single method taking either family can't also vary its\n // auth by family. dbt clones over HTTPS with a username and password, and has no SSH key field.\n if (auth.type !== 'sshKey' || isDataAppFamily(componentId)) return;\n\n ctx.issues.push({\n code: 'custom',\n input: auth,\n path: ['auth'],\n message: `Component \"${componentId}\" authenticates with a password, not an SSH key.`,\n });\n });\n\n/** Only the data-app family serves `data-app-entrypoints`; the enum rejects anything else. */\nexport const getEntrypointsInputSchema = gitInputSchema.extend({\n componentId: z.enum(DATA_APP_FAMILY),\n /**\n * Unlike `getBranches`, the branch is a real input here — it selects whose revision's files get\n * enumerated. The *git* branch, not the dev branch (`branchId`) every sync action carries.\n * Omit it for the repository's default branch; don't resolve one client-side.\n *\n * An empty string normalises to omitted rather than being rejected: a config written outside the\n * UI can carry `branch: \"\"`, and the form this replaces deleted a falsy branch before sending, so\n * refusing it would fail a call that has always meant \"the default branch\".\n */\n branch: z\n .string()\n .optional()\n .transform((branch) => branch || undefined),\n});\n\n/**\n * Only `branch` is load-bearing — it is the value the caller selects and stores. The rest is\n * decoration the UI renders beside it, so each field falls back to an empty string rather than\n * failing: one commit with no message must not cost the caller the whole branch list. They stay\n * `string` rather than becoming optional, so a consumer needs no new undefined handling.\n */\nconst gitBranchSchema = z.object({\n branch: z.string(),\n sha: z.string().catch(''),\n date: z.string().catch(''),\n comment: z.string().catch(''),\n author: z\n .object({\n name: z.string().catch(''),\n email: z.string().catch(''),\n })\n .catch({ name: '', email: '' }),\n});\n\n/**\n * Only `repository.branches` is confirmed — it is what the UI read before these actions were typed.\n * The top-level position is accepted too because the schema this replaces declared it there, and\n * nothing ever exercised that schema to settle which is right; the two families are separate\n * implementations, so both may well be real.\n *\n * A list in neither position is a different thing from an empty one, though, and is rejected rather\n * than read as none: an empty array is a real answer (a repository with no branches yet), while an\n * envelope carrying no list at all is one we do not understand, and rendering that as \"no branches\"\n * would hide the failure behind an ordinary empty state.\n */\n/**\n * Either a JSON array or an object keyed by stringified indices, gaps included:\n * `{ \"0\": …, \"1\": …, \"3\": … }`. The component filters the list server-side, and a PHP array whose\n * integer keys are no longer contiguous serializes as an object. `Object.values` reads those keys\n * back in ascending numeric order, so the branch order survives either shape.\n */\nconst gitBranchListSchema = z\n .union([z.array(gitBranchSchema), z.record(z.string(), gitBranchSchema)])\n .transform((branches) => (Array.isArray(branches) ? branches : Object.values(branches)));\n\nexport const gitBranchesSchema = z\n .object({\n repository: z.object({ branches: gitBranchListSchema.optional() }).optional(),\n branches: gitBranchListSchema.optional(),\n })\n .check((ctx) => {\n if (ctx.value.branches ?? ctx.value.repository?.branches) return;\n\n ctx.issues.push({\n code: 'custom',\n input: ctx.value,\n message: 'The response carried no branch list.',\n });\n })\n .transform(({ repository, branches }) => branches ?? repository?.branches ?? []);\n\nexport const gitEntrypointsSchema = z.object({\n entrypoints: z.array(z.string()),\n});\n\nexport type GitAuth = z.infer<typeof gitAuthSchema>;\nexport type GetBranchesInput = z.input<typeof getBranchesInputSchema>;\nexport type GetEntrypointsInput = z.input<typeof getEntrypointsInputSchema>;\nexport type GitBranch = z.infer<typeof gitBranchSchema>;\nexport type GitEntrypoints = z.infer<typeof gitEntrypointsSchema>;\n","import type { GitAuth } from './schemas';\n\n/** Every variant is already the shape the components read, minus the discriminator. */\nconst toCredentials = (auth: GitAuth) => {\n const { type: _type, ...credentials } = auth;\n\n return credentials;\n};\n\n/**\n * Which revision the component clones before it answers:\n *\n * - `default` — no `-b` flag, so the clone lands on the repository's own default branch. Branch\n * listing must use this: it clones purely to enumerate the remote branches, so pinning one that\n * is stale or renamed fails the very call made to discover the valid ones.\n * `getBranchesInputSchema` accepts no `branch`, so that path has nothing to pin with.\n * - `branch` — pins the clone with `git clone -b <branch>`, deciding whose revision the action\n * reads. Entrypoint listing uses it once the user has picked a branch.\n */\ntype GitRevision = { revision: 'default' } | { revision: 'branch'; branch: string };\n\n/** The default is the absence of a branch — the component's own `git clone` decides it. */\nconst toRevision = (rev: GitRevision) => (rev.revision === 'branch' ? { branch: rev.branch } : {});\n\nexport type GitConfigDataInput = {\n repositoryUrl: string;\n auth: GitAuth;\n} & GitRevision;\n\n/** Data apps nest their repository a level deeper, and call the URL `repository`. */\nexport const buildDataAppConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n dataApp: {\n git: {\n repository: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n },\n});\n\n/** dbt transformations keep the same settings at the top of `parameters`, under `repo`. */\nexport const buildDbtConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n git: {\n repo: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { isDataAppFamily } from './constants';\nimport {\n type GetBranchesInput,\n getBranchesInputSchema,\n type GetEntrypointsInput,\n getEntrypointsInputSchema,\n gitBranchesSchema,\n gitEntrypointsSchema,\n} from './schemas';\nimport { buildDataAppConfigData, buildDbtConfigData } from './utils';\n\n/**\n * Git repository actions, across both component families that serve them — the data apps\n * (`git-repository`) and the dbt transformations (`gitRepository`). Which action name and which\n * `configData` shape a call uses is resolved from `componentId`; see `./constants`.\n */\nexport const createGit = (sendSyncAction: SendSyncAction) => {\n const getBranches = async (input: GetBranchesInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, ...context } = parseOrThrow(\n getBranchesInputSchema,\n input,\n );\n const isDataApp = isDataAppFamily(componentId);\n const action = isDataApp ? SyncAction.DATA_APP_GIT_REPOSITORY : SyncAction.GIT_REPOSITORY;\n const buildConfigData = isDataApp ? buildDataAppConfigData : buildDbtConfigData;\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildConfigData({ repositoryUrl, auth, revision: 'default' }),\n },\n { signal },\n );\n\n return parseOrThrow(gitBranchesSchema, data);\n };\n\n const getEntrypoints = async (input: GetEntrypointsInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, branch, ...context } = parseOrThrow(\n getEntrypointsInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action: SyncAction.DATA_APP_ENTRYPOINTS,\n // Data-app only — the input schema rejects every other component, so no family branch here.\n configData: buildDataAppConfigData({\n repositoryUrl,\n auth,\n ...(branch ? { revision: 'branch', branch } : { revision: 'default' }),\n }),\n },\n { signal },\n );\n\n return parseOrThrow(gitEntrypointsSchema, data);\n };\n\n return { getBranches, getEntrypoints };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const testLookerCredentialsInputSchema = syncActionContextSchema.extend({\n credentialsId: z.string().min(1, 'Required'),\n '#token': z.string().min(1, 'Required'),\n host: z.string().min(1, 'Required'),\n});\n\n/** The component answers with a status envelope only — there is no payload to model. */\nexport const lookerCredentialsResultSchema = z.object({\n status: z.string().optional(),\n message: z.string().optional(),\n});\n\nexport type TestLookerCredentialsInput = z.infer<typeof testLookerCredentialsInputSchema>;\nexport type LookerCredentialsResult = z.infer<typeof lookerCredentialsResultSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n lookerCredentialsResultSchema,\n type TestLookerCredentialsInput,\n testLookerCredentialsInputSchema,\n} from './schemas';\n\nexport const createLooker = (sendSyncAction: SendSyncAction) => {\n /** Registers the project's Looker credentials; throws `SyncActionError` when Looker rejects them. */\n const testCredentials = async (input: TestLookerCredentialsInput, signal?: AbortSignal) => {\n const {\n credentialsId,\n '#token': token,\n host,\n ...context\n } = parseOrThrow(testLookerCredentialsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.TEST_LOOKER_CREDENTIALS,\n componentId: ComponentId.WR_LOOKER_V2,\n configData: { parameters: { looker: { credentialsId, '#token': token, host } } },\n },\n { signal },\n );\n\n return parseOrThrow(lookerCredentialsResultSchema, data);\n };\n\n return { testCredentials };\n};\n","import { parseOrThrow } from '../../errors';\nimport type { ValidateStatusFn } from '../../fetchClient';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { syncActionValidateStatus } from './utils/response';\nimport { createApify } from './apify';\nimport { SyncAction } from './constants';\nimport { createDbt } from './dbt';\nimport { createGit } from './git';\nimport { createLooker } from './looker';\nimport { type SyncActionBody, syncActionBodySchema } from './schemas';\nimport type { EnrollMFAInput, PostActionsBodyRaw } from './types';\n\nexport type SendSyncActionOptions = {\n signal?: AbortSignal;\n /**\n * Replaces the client's `syncActionValidateStatus` for this one request. Use it where a component\n * signals failure in a way only its own action knows about — delegate to the shared one for\n * everything else.\n */\n validateStatus?: ValidateStatusFn;\n};\n\nconst createSendSyncAction = (client: SyncActionClient) => {\n return async (body: SyncActionBody, options: SendSyncActionOptions = {}) => {\n const { data } = await client.post(\n '/actions',\n // The generated body type has `configData: Record<string, never>`, which nothing can satisfy;\n // `syncActionBodySchema` is the real contract and is what the request is validated against.\n { body: parseOrThrow(syncActionBodySchema, body) as unknown as PostActionsBodyRaw },\n options,\n );\n\n return data;\n };\n};\n\nexport type SendSyncAction = ReturnType<typeof createSendSyncAction>;\ntype SyncActionClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createSyncActionsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n validateStatus: syncActionValidateStatus,\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const sendSyncAction = createSendSyncAction(client);\n\n const enrollMFA = ({ email, ...rest }: EnrollMFAInput, signal?: AbortSignal) => {\n return sendSyncAction(\n {\n ...rest,\n action: SyncAction.ENROLL_MFA,\n configData: {\n parameters: {\n user: {\n email,\n },\n },\n },\n },\n { signal },\n );\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n sendSyncAction,\n enrollMFA,\n apify: createApify(sendSyncAction),\n dbt: createDbt(sendSyncAction),\n git: createGit(sendSyncAction),\n looker: createLooker(sendSyncAction),\n };\n};\n"],"mappings":";;;;;;;;;AAYA,MAAM,eAAe,SACnB,OAAO,SAAS,YAAY,SAAS,OAAQ,OAA+B;AAE9E,MAAM,YAAY,UAAoB,OAAO,UAAU,YAAY,QAAQ,QAAQ,KAAA;AACnF,MAAM,YAAY,UAAoB,OAAO,UAAU,WAAW,QAAQ,KAAA;;;;;;;;;;;;;AAc1E,MAAa,4BAA8C,gBAAgB;CACzE,MAAM,OAAO,YAAY,YAAY,IAAI;CAEzC,IAAI,MAAM,WAAW,SACnB,MAAM,IAAI,gBACR,S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MAAM,EACJ,MACF,EACF,EACF;EACF,GACA,EAAE,OAAO,CACX;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA,OAAO,YAAY,cAAc;EACjC,KAAK,UAAU,cAAc;EAC7B,KAAK,UAAU,cAAc;EAC7B,QAAQ,aAAa,cAAc;CACrC;AACF"}
@@ -1,10 +1,10 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
- const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-BlgPbjFj.cjs");
3
3
  const require_SyncActionError = require("./SyncActionError-BG0zwchi.cjs");
4
4
  const require_ValidationError = require("./ValidationError-CLVJCCwH.cjs");
5
- const require_createGenericFetchClient = require("./createGenericFetchClient-o3cPJeRn.cjs");
6
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DhUU3M1W.cjs");
7
- const require_auth = require("./auth-JQ33o3nU.cjs");
5
+ const require_createGenericFetchClient = require("./createGenericFetchClient-lcozzwk2.cjs");
6
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C3UmDXpe.cjs");
7
+ const require_auth = require("./auth-DLWnl18b.cjs");
8
8
  const require_componentId = require("./componentId-DkyQ8PM0.cjs");
9
9
  let zod = require("zod");
10
10
  zod = require_rolldown_runtime.__toESM(zod, 1);
@@ -501,4 +501,4 @@ Object.defineProperty(exports, "createSyncActionsClient", {
501
501
  }
502
502
  });
503
503
 
504
- //# sourceMappingURL=syncActions-OEZdVffK.cjs.map
504
+ //# sourceMappingURL=syncActions-D2DhY6pP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"syncActions-OEZdVffK.cjs","names":["SyncActionError","defaultValidateStatus","z","z","SyncActionError","parseOrThrow","ComponentId","z","parseOrThrow","ComponentId","z","parseOrThrow","z","parseOrThrow","ComponentId","parseOrThrow","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient"],"sources":["../src/clients/syncActions/utils/response.ts","../src/clients/syncActions/constants.ts","../src/clients/syncActions/schemas.ts","../src/clients/syncActions/apify/schemas.ts","../src/clients/syncActions/apify/utils.ts","../src/clients/syncActions/apify/apify.ts","../src/clients/syncActions/dbt/schemas.ts","../src/clients/syncActions/dbt/utils.ts","../src/clients/syncActions/dbt/dbt.ts","../src/clients/syncActions/git/constants.ts","../src/clients/syncActions/git/schemas.ts","../src/clients/syncActions/git/utils.ts","../src/clients/syncActions/git/git.ts","../src/clients/syncActions/looker/schemas.ts","../src/clients/syncActions/looker/looker.ts","../src/clients/syncActions/syncActionsClient.ts"],"sourcesContent":["import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { defaultValidateStatus } from '../../../fetchClient';\n\ntype SyncActionErrorBody = {\n status?: unknown;\n message?: unknown;\n error?: unknown;\n exceptionId?: unknown;\n code?: unknown;\n};\n\nconst asErrorBody = (data: unknown): SyncActionErrorBody | null =>\n typeof data === 'object' && data !== null ? (data as SyncActionErrorBody) : null;\n\nconst asString = (value: unknown) => (typeof value === 'string' && value ? value : undefined);\nconst asNumber = (value: unknown) => (typeof value === 'number' ? value : undefined);\n\n/**\n * A component reports failure two ways: a non-2xx response, and a **2xx** whose body carries\n * `status: 'error'` (the component ran, and said no). Both are recognised here so every sync action\n * fails as one `SyncActionError` — `validateStatus` is the only hook that sees the parsed body of a\n * successful response, which is what the second case needs.\n *\n * Throwing rather than returning the error is deliberate. `coreFetch` only rethrows a returned value\n * that is an `ApiError`, and `SyncActionError` is a peer of `ApiError`, not a subclass: a component\n * answering `status: 'error'` on a **200** gave a business answer, not a transport failure, so it\n * must not satisfy `isApiError` / `isFetchClientError` — those drive retry and \"network problem\"\n * handling, and `err.response.status` would read 200 and mislead every status-based branch.\n */\nexport const syncActionValidateStatus: ValidateStatusFn = (apiResponse) => {\n const body = asErrorBody(apiResponse.data);\n\n if (body?.status === 'error') {\n throw new SyncActionError(\n asString(body.message) ?? asString(body.error) ?? apiResponse.response.statusText,\n {\n exceptionId: asString(body.exceptionId),\n code: asNumber(body.code),\n data: apiResponse.data,\n },\n );\n }\n\n return defaultValidateStatus(apiResponse);\n};\n","export const SyncAction = {\n DATA_APP_GIT_REPOSITORY: 'git-repository',\n DATA_APP_ENTRYPOINTS: 'data-app-entrypoints',\n DBT_COMPILE: 'dbtCompile',\n DBT_RUN_RESULTS: 'dbtRunResults',\n GIT_REPOSITORY: 'gitRepository',\n ENROLL_MFA: 'enrollMFA',\n LIST_ACTORS: 'listActors',\n LIST_TASKS: 'listTasks',\n TEST_LOOKER_CREDENTIALS: 'testLookerCredentials',\n};\n","import * as z from 'zod';\n\n/**\n * The Keboola-side context every sync action carries, whichever action it is. Namespaces extend it\n * with the fields their own action needs, so a caller never assembles the rest of the body.\n */\nexport const syncActionContextSchema = z.object({\n /**\n * Required, because omitting it changes nothing: the service normalises a missing, empty or\n * `null` value to `\"default\"` and resolves that to the default branch's numeric id — the same id,\n * branch type and downstream context an explicit value resolves to, with no extra lookup either\n * way. Requiring it keeps every request self-describing. Both a numeric id and the literal\n * `\"default\"` are accepted (`keboola/runner-sync-api`: `ExecuteActionRequestProcessor` →\n * `BranchTypeResolver`).\n */\n branchId: z.string().min(1, 'Required'),\n /**\n * Leave undefined. The service then runs the component's registered tag from the Developer\n * Portal / Storage component definition — the currently published version, not Docker's\n * `latest`. Set it only to deliberately pin a specific or branch build.\n */\n tag: z.string().optional(),\n mode: z.enum(['run', 'debug']).optional(),\n});\n\n/**\n * The `/actions` request body. `configData` is whatever the component's action expects, so it is\n * only asserted to be an object here — each namespace validates the shape its own action needs\n * before handing it over.\n */\nexport const syncActionBodySchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n action: z.string().min(1, 'Required'),\n configData: z.record(z.string(), z.unknown()),\n});\n\nexport type SyncActionContext = z.infer<typeof syncActionContextSchema>;\nexport type SyncActionBody = z.infer<typeof syncActionBodySchema>;\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const apifyObjectsInputSchema = syncActionContextSchema.extend({\n '#token': z.string().min(1, 'Required'),\n});\n\nexport const apifyObjectsSchema = z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n }),\n);\n\nexport type ApifyObjectsInput = z.infer<typeof apifyObjectsInputSchema>;\n\nexport type ApifyObject = z.infer<typeof apifyObjectsSchema>[number];\n","import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { syncActionValidateStatus } from '../utils/response';\n\n/**\n * A slow Apify account makes the component answer `{ timeout: true }` on a 200 instead of the list —\n * a failure only this action knows how to spot, so it is checked before deferring to the shared\n * validation.\n */\nexport const apifyValidateStatus: ValidateStatusFn = (apiResponse) => {\n const data = apiResponse.data;\n\n if (typeof data === 'object' && data !== null && 'timeout' in data && data.timeout)\n throw new SyncActionError('Timed out while loading data from Apify.', { data });\n\n return syncActionValidateStatus(apiResponse);\n};\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { type ApifyObjectsInput, apifyObjectsInputSchema, apifyObjectsSchema } from './schemas';\nimport { apifyValidateStatus } from './utils';\n\nexport const createApify = (sendSyncAction: SendSyncAction) => {\n const _getObjects = async (action: string, input: ApifyObjectsInput, signal?: AbortSignal) => {\n const { '#token': token, ...context } = parseOrThrow(apifyObjectsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action,\n componentId: ComponentId.APIFY,\n configData: { parameters: { '#token': token } },\n },\n { signal, validateStatus: apifyValidateStatus },\n );\n\n return parseOrThrow(apifyObjectsSchema, data);\n };\n\n const getActors = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_ACTORS, input, signal);\n };\n\n const getTasks = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_TASKS, input, signal);\n };\n\n return { getActors, getTasks };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\n/**\n * `componentId` is a plain string here, unlike the git actions' closed enum. Every dbt transformation\n * answers `dbtCompile` and `dbtRunResults` under the same action name and the same payload, so the id\n * selects nothing — it only names the component to run, and rejecting an unlisted one would cost the\n * caller a cast for no guarantee. The component itself refuses an action it does not serve.\n */\nexport const dbtActionInputSchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n configId: z.string().min(1, 'Required'),\n artifacts: z.record(z.string(), z.unknown()).optional(),\n});\n\n/**\n * `compiled` maps a model's file name (`orders.sql`) to its compiled SQL. Key order is the\n * component's own and is preserved, so the caller can render the models in it.\n *\n * A configuration that has never run does **not** answer with an empty payload — the component\n * raises a user exception telling you to run it first, which arrives as a `SyncActionError` carrying\n * that sentence. The empty default here is only for a payload that omits the key anyway: rendering\n * \"nothing to show\" beats failing on a validation error no caller can act on. A key that is\n * *present* with the wrong shape still fails — that is a contract change, and reading it as \"no\n * models\" would hide it.\n */\nexport const dbtCompiledSchema = z\n .object({ compiled: z.record(z.string(), z.string()).default({}) })\n .transform(({ compiled }) => compiled);\n\n/**\n * dbt reports the worker as `\"Thread-1\"`; the number alone is what a consumer positions a row by, so\n * the prefix is stripped here rather than in every consumer. An unparseable value falls back to `0`\n * — one odd worker label must not cost the caller the whole timeline.\n */\nconst dbtThreadSchema = z\n .string()\n .transform((thread) => Number.parseInt(thread.replace(/^Thread-/, ''), 10))\n .pipe(z.number().int().nonnegative())\n .catch(0);\n\n/** Each entry also carries `status` and `dependsOn`, dropped here until a consumer needs them. */\nexport const dbtModelTimingSchema = z.object({\n id: z.string(),\n name: z.string(),\n thread: dbtThreadSchema,\n /** ISO timestamps, left as strings — the consumer decides what to parse them into. */\n timeStarted: z.string(),\n timeCompleted: z.string(),\n});\n\n/** Defaults to empty for the same reason as `compiled` above — and with the same caveat. */\nexport const dbtRunResultsSchema = z\n .object({ modelTiming: z.array(dbtModelTimingSchema).default([]) })\n .transform(({ modelTiming }) => modelTiming);\n\nexport type DbtActionInput = z.infer<typeof dbtActionInputSchema>;\nexport type DbtCompiled = z.infer<typeof dbtCompiledSchema>;\nexport type DbtModelTiming = z.infer<typeof dbtModelTimingSchema>;\n","export type DbtActionConfigDataInput = {\n configId: string;\n artifacts?: Record<string, unknown>;\n};\n\n/**\n * Both dbt artifact actions read the *stored* configuration — `configId` is what they resolve it by,\n * so the payload carries no settings of its own. `artifacts` is the configuration's own artifacts\n * section, passed through untouched: it selects which run's artifacts the component picks up, and\n * omitting it leaves the component on its default (the latest run).\n */\nexport const buildDbtActionConfigData = ({ configId, artifacts }: DbtActionConfigDataInput) => ({\n parameters: { configId },\n ...(artifacts && { artifacts }),\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n type DbtActionInput,\n dbtActionInputSchema,\n dbtCompiledSchema,\n dbtRunResultsSchema,\n} from './schemas';\nimport { buildDbtActionConfigData } from './utils';\n\n/** The dbt transformations' artifact actions — both read what the *last run* left behind. */\nexport const createDbt = (sendSyncAction: SendSyncAction) => {\n const sendDbtAction = (action: string, input: DbtActionInput, signal?: AbortSignal) => {\n const { componentId, configId, artifacts, ...context } = parseOrThrow(\n dbtActionInputSchema,\n input,\n );\n\n return sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildDbtActionConfigData({ configId, artifacts }),\n },\n { signal },\n );\n };\n\n /** The compiled SQL of every model in the configuration. */\n const compile = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_COMPILE, input, signal);\n\n return parseOrThrow(dbtCompiledSchema, data);\n };\n\n /** When each model of the last run started and finished, and on which worker. */\n const runResults = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_RUN_RESULTS, input, signal);\n\n return parseOrThrow(dbtRunResultsSchema, data);\n };\n\n return { compile, runResults };\n};\n","import { ComponentId } from '../../../constants';\n\n/**\n * Components whose git repository lives under `parameters.dataApp.git.repository` and that answer to\n * the `git-repository` action. They are the only ones serving `data-app-entrypoints`, and the only\n * ones accepting an SSH key.\n */\nexport const DATA_APP_FAMILY = [ComponentId.DATA_APPS, ComponentId.SANDBOXES] as const;\n\n/**\n * Components whose git repository lives under `parameters.git.repo` and that answer to the\n * `gitRepository` action. They authenticate over HTTPS with a username and password only.\n *\n * Deliberately a list rather than \"everything else\": `listBranches` / `list_branches` /\n * `checkBranches` also exist on unrelated third-party components (`kds-team.app-custom-python`,\n * `keboola.app-transformation-migration`, `kds-team.app-sox-migration-checker`) under a different\n * contract. Those stay on the generic `sendSyncAction` escape hatch.\n */\nconst DBT_FAMILY = [\n ComponentId.DBT_TEST_CORE_KEY_PAIR,\n ComponentId.DBT_TEST_REMOTE_SNOWFLAKE,\n ComponentId.DBT_TRANSFORMATION,\n ComponentId.DBT_TRANSFORMATION_LOCAL_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_MSSQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_POSTGRESQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_REDSHIFT,\n ComponentId.DBT_TRANSFORMATION_REMOTE_SNOWFLAKE,\n] as const;\n\nexport const GIT_FAMILY = [...DATA_APP_FAMILY, ...DBT_FAMILY] as const;\n\n/** The ids the git actions accept — anything else has no action name or payload path to resolve. */\nexport type GitComponentId = (typeof GIT_FAMILY)[number];\nexport type DataAppComponentId = (typeof DATA_APP_FAMILY)[number];\n\nconst dataAppIds: ReadonlySet<string> = new Set(DATA_APP_FAMILY);\n\nexport const isDataAppFamily = (componentId: string): componentId is DataAppComponentId =>\n dataAppIds.has(componentId);\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nimport { DATA_APP_FAMILY, GIT_FAMILY, isDataAppFamily } from './constants';\n\nexport const gitAuthSchema = z.discriminatedUnion('type', [\n z.object({ type: z.literal('public') }),\n z.object({\n type: z.literal('password'),\n username: z.string().min(1, 'Required'),\n '#password': z.string().min(1, 'Required'),\n }),\n z.object({\n type: z.literal('sshKey'),\n /**\n * Optional, unlike the password variant's — the key is the whole credential.\n *\n * - The component rewrites the URL to `git@host:path` and clones over SSH, where the user is\n * always `git` (`keboola/sandboxes`: `GitRepository::resolveRepositoryUrl`).\n * - It never reads `username` on that path, so a deploy key has none to be stored with.\n * - Accept one when the caller has it anyway; it reaches the component and is ignored there.\n */\n username: z.string().min(1, 'Required').optional(),\n '#sshKey': z.string().min(1, 'Required'),\n }),\n]);\n\nconst gitInputSchema = syncActionContextSchema.extend({\n repositoryUrl: z.string().min(1, 'Required'),\n auth: gitAuthSchema.default({ type: 'public' }),\n});\n\n/**\n * Accepts only the components that serve a git repository action — the action name and the\n * `configData` path are resolved from the id, so one from neither family has nowhere to go. The\n * enum rejects an unsupported id when parsing, before any request is sent.\n *\n * **Takes no `branch`, deliberately — do not add one.** It is a run-config field the component\n * feeds to `git clone -b <branch>`, so a stale or renamed value fails the clone and breaks the very\n * call you make to find out which branches exist. Accepting it optionally would let a caller\n * reintroduce that by spreading in an existing config; zod strips it instead.\n */\nexport const getBranchesInputSchema = gitInputSchema\n .extend({ componentId: z.enum(GIT_FAMILY) })\n .check((ctx) => {\n const { componentId, auth } = ctx.value;\n\n // The one rule the types can't carry: a single method taking either family can't also vary its\n // auth by family. dbt clones over HTTPS with a username and password, and has no SSH key field.\n if (auth.type !== 'sshKey' || isDataAppFamily(componentId)) return;\n\n ctx.issues.push({\n code: 'custom',\n input: auth,\n path: ['auth'],\n message: `Component \"${componentId}\" authenticates with a password, not an SSH key.`,\n });\n });\n\n/** Only the data-app family serves `data-app-entrypoints`; the enum rejects anything else. */\nexport const getEntrypointsInputSchema = gitInputSchema.extend({\n componentId: z.enum(DATA_APP_FAMILY),\n /**\n * Unlike `getBranches`, the branch is a real input here — it selects whose revision's files get\n * enumerated. The *git* branch, not the dev branch (`branchId`) every sync action carries.\n * Omit it for the repository's default branch; don't resolve one client-side.\n *\n * An empty string normalises to omitted rather than being rejected: a config written outside the\n * UI can carry `branch: \"\"`, and the form this replaces deleted a falsy branch before sending, so\n * refusing it would fail a call that has always meant \"the default branch\".\n */\n branch: z\n .string()\n .optional()\n .transform((branch) => branch || undefined),\n});\n\n/**\n * Only `branch` is load-bearing — it is the value the caller selects and stores. The rest is\n * decoration the UI renders beside it, so each field falls back to an empty string rather than\n * failing: one commit with no message must not cost the caller the whole branch list. They stay\n * `string` rather than becoming optional, so a consumer needs no new undefined handling.\n */\nconst gitBranchSchema = z.object({\n branch: z.string(),\n sha: z.string().catch(''),\n date: z.string().catch(''),\n comment: z.string().catch(''),\n author: z\n .object({\n name: z.string().catch(''),\n email: z.string().catch(''),\n })\n .catch({ name: '', email: '' }),\n});\n\n/**\n * Only `repository.branches` is confirmed — it is what the UI read before these actions were typed.\n * The top-level position is accepted too because the schema this replaces declared it there, and\n * nothing ever exercised that schema to settle which is right; the two families are separate\n * implementations, so both may well be real.\n *\n * A list in neither position is a different thing from an empty one, though, and is rejected rather\n * than read as none: an empty array is a real answer (a repository with no branches yet), while an\n * envelope carrying no list at all is one we do not understand, and rendering that as \"no branches\"\n * would hide the failure behind an ordinary empty state.\n */\n/**\n * Either a JSON array or an object keyed by stringified indices, gaps included:\n * `{ \"0\": …, \"1\": …, \"3\": … }`. The component filters the list server-side, and a PHP array whose\n * integer keys are no longer contiguous serializes as an object. `Object.values` reads those keys\n * back in ascending numeric order, so the branch order survives either shape.\n */\nconst gitBranchListSchema = z\n .union([z.array(gitBranchSchema), z.record(z.string(), gitBranchSchema)])\n .transform((branches) => (Array.isArray(branches) ? branches : Object.values(branches)));\n\nexport const gitBranchesSchema = z\n .object({\n repository: z.object({ branches: gitBranchListSchema.optional() }).optional(),\n branches: gitBranchListSchema.optional(),\n })\n .check((ctx) => {\n if (ctx.value.branches ?? ctx.value.repository?.branches) return;\n\n ctx.issues.push({\n code: 'custom',\n input: ctx.value,\n message: 'The response carried no branch list.',\n });\n })\n .transform(({ repository, branches }) => branches ?? repository?.branches ?? []);\n\nexport const gitEntrypointsSchema = z.object({\n entrypoints: z.array(z.string()),\n});\n\nexport type GitAuth = z.infer<typeof gitAuthSchema>;\nexport type GetBranchesInput = z.input<typeof getBranchesInputSchema>;\nexport type GetEntrypointsInput = z.input<typeof getEntrypointsInputSchema>;\nexport type GitBranch = z.infer<typeof gitBranchSchema>;\nexport type GitEntrypoints = z.infer<typeof gitEntrypointsSchema>;\n","import type { GitAuth } from './schemas';\n\n/** Every variant is already the shape the components read, minus the discriminator. */\nconst toCredentials = (auth: GitAuth) => {\n const { type: _type, ...credentials } = auth;\n\n return credentials;\n};\n\n/**\n * Which revision the component clones before it answers:\n *\n * - `default` — no `-b` flag, so the clone lands on the repository's own default branch. Branch\n * listing must use this: it clones purely to enumerate the remote branches, so pinning one that\n * is stale or renamed fails the very call made to discover the valid ones.\n * `getBranchesInputSchema` accepts no `branch`, so that path has nothing to pin with.\n * - `branch` — pins the clone with `git clone -b <branch>`, deciding whose revision the action\n * reads. Entrypoint listing uses it once the user has picked a branch.\n */\ntype GitRevision = { revision: 'default' } | { revision: 'branch'; branch: string };\n\n/** The default is the absence of a branch — the component's own `git clone` decides it. */\nconst toRevision = (rev: GitRevision) => (rev.revision === 'branch' ? { branch: rev.branch } : {});\n\nexport type GitConfigDataInput = {\n repositoryUrl: string;\n auth: GitAuth;\n} & GitRevision;\n\n/** Data apps nest their repository a level deeper, and call the URL `repository`. */\nexport const buildDataAppConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n dataApp: {\n git: {\n repository: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n },\n});\n\n/** dbt transformations keep the same settings at the top of `parameters`, under `repo`. */\nexport const buildDbtConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n git: {\n repo: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { isDataAppFamily } from './constants';\nimport {\n type GetBranchesInput,\n getBranchesInputSchema,\n type GetEntrypointsInput,\n getEntrypointsInputSchema,\n gitBranchesSchema,\n gitEntrypointsSchema,\n} from './schemas';\nimport { buildDataAppConfigData, buildDbtConfigData } from './utils';\n\n/**\n * Git repository actions, across both component families that serve them — the data apps\n * (`git-repository`) and the dbt transformations (`gitRepository`). Which action name and which\n * `configData` shape a call uses is resolved from `componentId`; see `./constants`.\n */\nexport const createGit = (sendSyncAction: SendSyncAction) => {\n const getBranches = async (input: GetBranchesInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, ...context } = parseOrThrow(\n getBranchesInputSchema,\n input,\n );\n const isDataApp = isDataAppFamily(componentId);\n const action = isDataApp ? SyncAction.DATA_APP_GIT_REPOSITORY : SyncAction.GIT_REPOSITORY;\n const buildConfigData = isDataApp ? buildDataAppConfigData : buildDbtConfigData;\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildConfigData({ repositoryUrl, auth, revision: 'default' }),\n },\n { signal },\n );\n\n return parseOrThrow(gitBranchesSchema, data);\n };\n\n const getEntrypoints = async (input: GetEntrypointsInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, branch, ...context } = parseOrThrow(\n getEntrypointsInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action: SyncAction.DATA_APP_ENTRYPOINTS,\n // Data-app only — the input schema rejects every other component, so no family branch here.\n configData: buildDataAppConfigData({\n repositoryUrl,\n auth,\n ...(branch ? { revision: 'branch', branch } : { revision: 'default' }),\n }),\n },\n { signal },\n );\n\n return parseOrThrow(gitEntrypointsSchema, data);\n };\n\n return { getBranches, getEntrypoints };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const testLookerCredentialsInputSchema = syncActionContextSchema.extend({\n credentialsId: z.string().min(1, 'Required'),\n '#token': z.string().min(1, 'Required'),\n host: z.string().min(1, 'Required'),\n});\n\n/** The component answers with a status envelope only — there is no payload to model. */\nexport const lookerCredentialsResultSchema = z.object({\n status: z.string().optional(),\n message: z.string().optional(),\n});\n\nexport type TestLookerCredentialsInput = z.infer<typeof testLookerCredentialsInputSchema>;\nexport type LookerCredentialsResult = z.infer<typeof lookerCredentialsResultSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n lookerCredentialsResultSchema,\n type TestLookerCredentialsInput,\n testLookerCredentialsInputSchema,\n} from './schemas';\n\nexport const createLooker = (sendSyncAction: SendSyncAction) => {\n /** Registers the project's Looker credentials; throws `SyncActionError` when Looker rejects them. */\n const testCredentials = async (input: TestLookerCredentialsInput, signal?: AbortSignal) => {\n const {\n credentialsId,\n '#token': token,\n host,\n ...context\n } = parseOrThrow(testLookerCredentialsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.TEST_LOOKER_CREDENTIALS,\n componentId: ComponentId.WR_LOOKER_V2,\n configData: { parameters: { looker: { credentialsId, '#token': token, host } } },\n },\n { signal },\n );\n\n return parseOrThrow(lookerCredentialsResultSchema, data);\n };\n\n return { testCredentials };\n};\n","import { parseOrThrow } from '../../errors';\nimport type { ValidateStatusFn } from '../../fetchClient';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { syncActionValidateStatus } from './utils/response';\nimport { createApify } from './apify';\nimport { SyncAction } from './constants';\nimport { createDbt } from './dbt';\nimport { createGit } from './git';\nimport { createLooker } from './looker';\nimport { type SyncActionBody, syncActionBodySchema } from './schemas';\nimport type { EnrollMFAInput, PostActionsBodyRaw } from './types';\n\nexport type SendSyncActionOptions = {\n signal?: AbortSignal;\n /**\n * Replaces the client's `syncActionValidateStatus` for this one request. Use it where a component\n * signals failure in a way only its own action knows about — delegate to the shared one for\n * everything else.\n */\n validateStatus?: ValidateStatusFn;\n};\n\nconst createSendSyncAction = (client: SyncActionClient) => {\n return async (body: SyncActionBody, options: SendSyncActionOptions = {}) => {\n const { data } = await client.post(\n '/actions',\n // The generated body type has `configData: Record<string, never>`, which nothing can satisfy;\n // `syncActionBodySchema` is the real contract and is what the request is validated against.\n { body: parseOrThrow(syncActionBodySchema, body) as unknown as PostActionsBodyRaw },\n options,\n );\n\n return data;\n };\n};\n\nexport type SendSyncAction = ReturnType<typeof createSendSyncAction>;\ntype SyncActionClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createSyncActionsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n validateStatus: syncActionValidateStatus,\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const sendSyncAction = createSendSyncAction(client);\n\n const enrollMFA = ({ email, ...rest }: EnrollMFAInput, signal?: AbortSignal) => {\n return sendSyncAction(\n {\n ...rest,\n action: SyncAction.ENROLL_MFA,\n configData: {\n parameters: {\n user: {\n email,\n },\n },\n },\n },\n { signal },\n );\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n sendSyncAction,\n enrollMFA,\n apify: createApify(sendSyncAction),\n dbt: createDbt(sendSyncAction),\n git: createGit(sendSyncAction),\n looker: createLooker(sendSyncAction),\n };\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,eAAe,SACnB,OAAO,SAAS,YAAY,SAAS,OAAQ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AO,OAAO,MAAsB,UAAiC,CAAC,MAAM;EAC1E,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,YAGA,EAAE,MAAME,wBAAAA,aAAa,sBAAsB,IAAI,EAAmC,GAClF,OACF;EAEA,OAAO;CACT;AACF;AAKA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASC,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;EAC/B,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,qBAAqB,MAAM;CAElD,MAAM,aAAa,EAAE,OAAO,GAAG,QAAwB,WAAyB;EAC9E,OAAO,eACL;GACE,GAAG;GACH,QAAQ,WAAW;GACnB,YAAY,EACV,YAAY,EACV,MAAM,EACJ,MACF,EACF,EACF;EACF,GACA,EAAE,OAAO,CACX;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA,OAAO,YAAY,cAAc;EACjC,KAAK,UAAU,cAAc;EAC7B,KAAK,UAAU,cAAc;EAC7B,QAAQ,aAAa,cAAc;CACrC;AACF"}
1
+ {"version":3,"file":"syncActions-D2DhY6pP.cjs","names":["SyncActionError","defaultValidateStatus","z","z","SyncActionError","parseOrThrow","ComponentId","z","parseOrThrow","ComponentId","z","parseOrThrow","z","parseOrThrow","ComponentId","parseOrThrow","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient"],"sources":["../src/clients/syncActions/utils/response.ts","../src/clients/syncActions/constants.ts","../src/clients/syncActions/schemas.ts","../src/clients/syncActions/apify/schemas.ts","../src/clients/syncActions/apify/utils.ts","../src/clients/syncActions/apify/apify.ts","../src/clients/syncActions/dbt/schemas.ts","../src/clients/syncActions/dbt/utils.ts","../src/clients/syncActions/dbt/dbt.ts","../src/clients/syncActions/git/constants.ts","../src/clients/syncActions/git/schemas.ts","../src/clients/syncActions/git/utils.ts","../src/clients/syncActions/git/git.ts","../src/clients/syncActions/looker/schemas.ts","../src/clients/syncActions/looker/looker.ts","../src/clients/syncActions/syncActionsClient.ts"],"sourcesContent":["import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { defaultValidateStatus } from '../../../fetchClient';\n\ntype SyncActionErrorBody = {\n status?: unknown;\n message?: unknown;\n error?: unknown;\n exceptionId?: unknown;\n code?: unknown;\n};\n\nconst asErrorBody = (data: unknown): SyncActionErrorBody | null =>\n typeof data === 'object' && data !== null ? (data as SyncActionErrorBody) : null;\n\nconst asString = (value: unknown) => (typeof value === 'string' && value ? value : undefined);\nconst asNumber = (value: unknown) => (typeof value === 'number' ? value : undefined);\n\n/**\n * A component reports failure two ways: a non-2xx response, and a **2xx** whose body carries\n * `status: 'error'` (the component ran, and said no). Both are recognised here so every sync action\n * fails as one `SyncActionError` — `validateStatus` is the only hook that sees the parsed body of a\n * successful response, which is what the second case needs.\n *\n * Throwing rather than returning the error is deliberate. `coreFetch` only rethrows a returned value\n * that is an `ApiError`, and `SyncActionError` is a peer of `ApiError`, not a subclass: a component\n * answering `status: 'error'` on a **200** gave a business answer, not a transport failure, so it\n * must not satisfy `isApiError` / `isFetchClientError` — those drive retry and \"network problem\"\n * handling, and `err.response.status` would read 200 and mislead every status-based branch.\n */\nexport const syncActionValidateStatus: ValidateStatusFn = (apiResponse) => {\n const body = asErrorBody(apiResponse.data);\n\n if (body?.status === 'error') {\n throw new SyncActionError(\n asString(body.message) ?? asString(body.error) ?? apiResponse.response.statusText,\n {\n exceptionId: asString(body.exceptionId),\n code: asNumber(body.code),\n data: apiResponse.data,\n },\n );\n }\n\n return defaultValidateStatus(apiResponse);\n};\n","export const SyncAction = {\n DATA_APP_GIT_REPOSITORY: 'git-repository',\n DATA_APP_ENTRYPOINTS: 'data-app-entrypoints',\n DBT_COMPILE: 'dbtCompile',\n DBT_RUN_RESULTS: 'dbtRunResults',\n GIT_REPOSITORY: 'gitRepository',\n ENROLL_MFA: 'enrollMFA',\n LIST_ACTORS: 'listActors',\n LIST_TASKS: 'listTasks',\n TEST_LOOKER_CREDENTIALS: 'testLookerCredentials',\n};\n","import * as z from 'zod';\n\n/**\n * The Keboola-side context every sync action carries, whichever action it is. Namespaces extend it\n * with the fields their own action needs, so a caller never assembles the rest of the body.\n */\nexport const syncActionContextSchema = z.object({\n /**\n * Required, because omitting it changes nothing: the service normalises a missing, empty or\n * `null` value to `\"default\"` and resolves that to the default branch's numeric id — the same id,\n * branch type and downstream context an explicit value resolves to, with no extra lookup either\n * way. Requiring it keeps every request self-describing. Both a numeric id and the literal\n * `\"default\"` are accepted (`keboola/runner-sync-api`: `ExecuteActionRequestProcessor` →\n * `BranchTypeResolver`).\n */\n branchId: z.string().min(1, 'Required'),\n /**\n * Leave undefined. The service then runs the component's registered tag from the Developer\n * Portal / Storage component definition — the currently published version, not Docker's\n * `latest`. Set it only to deliberately pin a specific or branch build.\n */\n tag: z.string().optional(),\n mode: z.enum(['run', 'debug']).optional(),\n});\n\n/**\n * The `/actions` request body. `configData` is whatever the component's action expects, so it is\n * only asserted to be an object here — each namespace validates the shape its own action needs\n * before handing it over.\n */\nexport const syncActionBodySchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n action: z.string().min(1, 'Required'),\n configData: z.record(z.string(), z.unknown()),\n});\n\nexport type SyncActionContext = z.infer<typeof syncActionContextSchema>;\nexport type SyncActionBody = z.infer<typeof syncActionBodySchema>;\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const apifyObjectsInputSchema = syncActionContextSchema.extend({\n '#token': z.string().min(1, 'Required'),\n});\n\nexport const apifyObjectsSchema = z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n }),\n);\n\nexport type ApifyObjectsInput = z.infer<typeof apifyObjectsInputSchema>;\n\nexport type ApifyObject = z.infer<typeof apifyObjectsSchema>[number];\n","import { SyncActionError } from '../../../errors';\nimport type { ValidateStatusFn } from '../../../fetchClient';\nimport { syncActionValidateStatus } from '../utils/response';\n\n/**\n * A slow Apify account makes the component answer `{ timeout: true }` on a 200 instead of the list —\n * a failure only this action knows how to spot, so it is checked before deferring to the shared\n * validation.\n */\nexport const apifyValidateStatus: ValidateStatusFn = (apiResponse) => {\n const data = apiResponse.data;\n\n if (typeof data === 'object' && data !== null && 'timeout' in data && data.timeout)\n throw new SyncActionError('Timed out while loading data from Apify.', { data });\n\n return syncActionValidateStatus(apiResponse);\n};\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { type ApifyObjectsInput, apifyObjectsInputSchema, apifyObjectsSchema } from './schemas';\nimport { apifyValidateStatus } from './utils';\n\nexport const createApify = (sendSyncAction: SendSyncAction) => {\n const _getObjects = async (action: string, input: ApifyObjectsInput, signal?: AbortSignal) => {\n const { '#token': token, ...context } = parseOrThrow(apifyObjectsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action,\n componentId: ComponentId.APIFY,\n configData: { parameters: { '#token': token } },\n },\n { signal, validateStatus: apifyValidateStatus },\n );\n\n return parseOrThrow(apifyObjectsSchema, data);\n };\n\n const getActors = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_ACTORS, input, signal);\n };\n\n const getTasks = (input: ApifyObjectsInput, signal?: AbortSignal) => {\n return _getObjects(SyncAction.LIST_TASKS, input, signal);\n };\n\n return { getActors, getTasks };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\n/**\n * `componentId` is a plain string here, unlike the git actions' closed enum. Every dbt transformation\n * answers `dbtCompile` and `dbtRunResults` under the same action name and the same payload, so the id\n * selects nothing — it only names the component to run, and rejecting an unlisted one would cost the\n * caller a cast for no guarantee. The component itself refuses an action it does not serve.\n */\nexport const dbtActionInputSchema = syncActionContextSchema.extend({\n componentId: z.string().min(1, 'Required'),\n configId: z.string().min(1, 'Required'),\n artifacts: z.record(z.string(), z.unknown()).optional(),\n});\n\n/**\n * `compiled` maps a model's file name (`orders.sql`) to its compiled SQL. Key order is the\n * component's own and is preserved, so the caller can render the models in it.\n *\n * A configuration that has never run does **not** answer with an empty payload — the component\n * raises a user exception telling you to run it first, which arrives as a `SyncActionError` carrying\n * that sentence. The empty default here is only for a payload that omits the key anyway: rendering\n * \"nothing to show\" beats failing on a validation error no caller can act on. A key that is\n * *present* with the wrong shape still fails — that is a contract change, and reading it as \"no\n * models\" would hide it.\n */\nexport const dbtCompiledSchema = z\n .object({ compiled: z.record(z.string(), z.string()).default({}) })\n .transform(({ compiled }) => compiled);\n\n/**\n * dbt reports the worker as `\"Thread-1\"`; the number alone is what a consumer positions a row by, so\n * the prefix is stripped here rather than in every consumer. An unparseable value falls back to `0`\n * — one odd worker label must not cost the caller the whole timeline.\n */\nconst dbtThreadSchema = z\n .string()\n .transform((thread) => Number.parseInt(thread.replace(/^Thread-/, ''), 10))\n .pipe(z.number().int().nonnegative())\n .catch(0);\n\n/** Each entry also carries `status` and `dependsOn`, dropped here until a consumer needs them. */\nexport const dbtModelTimingSchema = z.object({\n id: z.string(),\n name: z.string(),\n thread: dbtThreadSchema,\n /** ISO timestamps, left as strings — the consumer decides what to parse them into. */\n timeStarted: z.string(),\n timeCompleted: z.string(),\n});\n\n/** Defaults to empty for the same reason as `compiled` above — and with the same caveat. */\nexport const dbtRunResultsSchema = z\n .object({ modelTiming: z.array(dbtModelTimingSchema).default([]) })\n .transform(({ modelTiming }) => modelTiming);\n\nexport type DbtActionInput = z.infer<typeof dbtActionInputSchema>;\nexport type DbtCompiled = z.infer<typeof dbtCompiledSchema>;\nexport type DbtModelTiming = z.infer<typeof dbtModelTimingSchema>;\n","export type DbtActionConfigDataInput = {\n configId: string;\n artifacts?: Record<string, unknown>;\n};\n\n/**\n * Both dbt artifact actions read the *stored* configuration — `configId` is what they resolve it by,\n * so the payload carries no settings of its own. `artifacts` is the configuration's own artifacts\n * section, passed through untouched: it selects which run's artifacts the component picks up, and\n * omitting it leaves the component on its default (the latest run).\n */\nexport const buildDbtActionConfigData = ({ configId, artifacts }: DbtActionConfigDataInput) => ({\n parameters: { configId },\n ...(artifacts && { artifacts }),\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n type DbtActionInput,\n dbtActionInputSchema,\n dbtCompiledSchema,\n dbtRunResultsSchema,\n} from './schemas';\nimport { buildDbtActionConfigData } from './utils';\n\n/** The dbt transformations' artifact actions — both read what the *last run* left behind. */\nexport const createDbt = (sendSyncAction: SendSyncAction) => {\n const sendDbtAction = (action: string, input: DbtActionInput, signal?: AbortSignal) => {\n const { componentId, configId, artifacts, ...context } = parseOrThrow(\n dbtActionInputSchema,\n input,\n );\n\n return sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildDbtActionConfigData({ configId, artifacts }),\n },\n { signal },\n );\n };\n\n /** The compiled SQL of every model in the configuration. */\n const compile = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_COMPILE, input, signal);\n\n return parseOrThrow(dbtCompiledSchema, data);\n };\n\n /** When each model of the last run started and finished, and on which worker. */\n const runResults = async (input: DbtActionInput, signal?: AbortSignal) => {\n const data = await sendDbtAction(SyncAction.DBT_RUN_RESULTS, input, signal);\n\n return parseOrThrow(dbtRunResultsSchema, data);\n };\n\n return { compile, runResults };\n};\n","import { ComponentId } from '../../../constants';\n\n/**\n * Components whose git repository lives under `parameters.dataApp.git.repository` and that answer to\n * the `git-repository` action. They are the only ones serving `data-app-entrypoints`, and the only\n * ones accepting an SSH key.\n */\nexport const DATA_APP_FAMILY = [ComponentId.DATA_APPS, ComponentId.SANDBOXES] as const;\n\n/**\n * Components whose git repository lives under `parameters.git.repo` and that answer to the\n * `gitRepository` action. They authenticate over HTTPS with a username and password only.\n *\n * Deliberately a list rather than \"everything else\": `listBranches` / `list_branches` /\n * `checkBranches` also exist on unrelated third-party components (`kds-team.app-custom-python`,\n * `keboola.app-transformation-migration`, `kds-team.app-sox-migration-checker`) under a different\n * contract. Those stay on the generic `sendSyncAction` escape hatch.\n */\nconst DBT_FAMILY = [\n ComponentId.DBT_TEST_CORE_KEY_PAIR,\n ComponentId.DBT_TEST_REMOTE_SNOWFLAKE,\n ComponentId.DBT_TRANSFORMATION,\n ComponentId.DBT_TRANSFORMATION_LOCAL_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_BIGQUERY,\n ComponentId.DBT_TRANSFORMATION_REMOTE_MSSQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_POSTGRESQL,\n ComponentId.DBT_TRANSFORMATION_REMOTE_REDSHIFT,\n ComponentId.DBT_TRANSFORMATION_REMOTE_SNOWFLAKE,\n] as const;\n\nexport const GIT_FAMILY = [...DATA_APP_FAMILY, ...DBT_FAMILY] as const;\n\n/** The ids the git actions accept — anything else has no action name or payload path to resolve. */\nexport type GitComponentId = (typeof GIT_FAMILY)[number];\nexport type DataAppComponentId = (typeof DATA_APP_FAMILY)[number];\n\nconst dataAppIds: ReadonlySet<string> = new Set(DATA_APP_FAMILY);\n\nexport const isDataAppFamily = (componentId: string): componentId is DataAppComponentId =>\n dataAppIds.has(componentId);\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nimport { DATA_APP_FAMILY, GIT_FAMILY, isDataAppFamily } from './constants';\n\nexport const gitAuthSchema = z.discriminatedUnion('type', [\n z.object({ type: z.literal('public') }),\n z.object({\n type: z.literal('password'),\n username: z.string().min(1, 'Required'),\n '#password': z.string().min(1, 'Required'),\n }),\n z.object({\n type: z.literal('sshKey'),\n /**\n * Optional, unlike the password variant's — the key is the whole credential.\n *\n * - The component rewrites the URL to `git@host:path` and clones over SSH, where the user is\n * always `git` (`keboola/sandboxes`: `GitRepository::resolveRepositoryUrl`).\n * - It never reads `username` on that path, so a deploy key has none to be stored with.\n * - Accept one when the caller has it anyway; it reaches the component and is ignored there.\n */\n username: z.string().min(1, 'Required').optional(),\n '#sshKey': z.string().min(1, 'Required'),\n }),\n]);\n\nconst gitInputSchema = syncActionContextSchema.extend({\n repositoryUrl: z.string().min(1, 'Required'),\n auth: gitAuthSchema.default({ type: 'public' }),\n});\n\n/**\n * Accepts only the components that serve a git repository action — the action name and the\n * `configData` path are resolved from the id, so one from neither family has nowhere to go. The\n * enum rejects an unsupported id when parsing, before any request is sent.\n *\n * **Takes no `branch`, deliberately — do not add one.** It is a run-config field the component\n * feeds to `git clone -b <branch>`, so a stale or renamed value fails the clone and breaks the very\n * call you make to find out which branches exist. Accepting it optionally would let a caller\n * reintroduce that by spreading in an existing config; zod strips it instead.\n */\nexport const getBranchesInputSchema = gitInputSchema\n .extend({ componentId: z.enum(GIT_FAMILY) })\n .check((ctx) => {\n const { componentId, auth } = ctx.value;\n\n // The one rule the types can't carry: a single method taking either family can't also vary its\n // auth by family. dbt clones over HTTPS with a username and password, and has no SSH key field.\n if (auth.type !== 'sshKey' || isDataAppFamily(componentId)) return;\n\n ctx.issues.push({\n code: 'custom',\n input: auth,\n path: ['auth'],\n message: `Component \"${componentId}\" authenticates with a password, not an SSH key.`,\n });\n });\n\n/** Only the data-app family serves `data-app-entrypoints`; the enum rejects anything else. */\nexport const getEntrypointsInputSchema = gitInputSchema.extend({\n componentId: z.enum(DATA_APP_FAMILY),\n /**\n * Unlike `getBranches`, the branch is a real input here — it selects whose revision's files get\n * enumerated. The *git* branch, not the dev branch (`branchId`) every sync action carries.\n * Omit it for the repository's default branch; don't resolve one client-side.\n *\n * An empty string normalises to omitted rather than being rejected: a config written outside the\n * UI can carry `branch: \"\"`, and the form this replaces deleted a falsy branch before sending, so\n * refusing it would fail a call that has always meant \"the default branch\".\n */\n branch: z\n .string()\n .optional()\n .transform((branch) => branch || undefined),\n});\n\n/**\n * Only `branch` is load-bearing — it is the value the caller selects and stores. The rest is\n * decoration the UI renders beside it, so each field falls back to an empty string rather than\n * failing: one commit with no message must not cost the caller the whole branch list. They stay\n * `string` rather than becoming optional, so a consumer needs no new undefined handling.\n */\nconst gitBranchSchema = z.object({\n branch: z.string(),\n sha: z.string().catch(''),\n date: z.string().catch(''),\n comment: z.string().catch(''),\n author: z\n .object({\n name: z.string().catch(''),\n email: z.string().catch(''),\n })\n .catch({ name: '', email: '' }),\n});\n\n/**\n * Only `repository.branches` is confirmed — it is what the UI read before these actions were typed.\n * The top-level position is accepted too because the schema this replaces declared it there, and\n * nothing ever exercised that schema to settle which is right; the two families are separate\n * implementations, so both may well be real.\n *\n * A list in neither position is a different thing from an empty one, though, and is rejected rather\n * than read as none: an empty array is a real answer (a repository with no branches yet), while an\n * envelope carrying no list at all is one we do not understand, and rendering that as \"no branches\"\n * would hide the failure behind an ordinary empty state.\n */\n/**\n * Either a JSON array or an object keyed by stringified indices, gaps included:\n * `{ \"0\": …, \"1\": …, \"3\": … }`. The component filters the list server-side, and a PHP array whose\n * integer keys are no longer contiguous serializes as an object. `Object.values` reads those keys\n * back in ascending numeric order, so the branch order survives either shape.\n */\nconst gitBranchListSchema = z\n .union([z.array(gitBranchSchema), z.record(z.string(), gitBranchSchema)])\n .transform((branches) => (Array.isArray(branches) ? branches : Object.values(branches)));\n\nexport const gitBranchesSchema = z\n .object({\n repository: z.object({ branches: gitBranchListSchema.optional() }).optional(),\n branches: gitBranchListSchema.optional(),\n })\n .check((ctx) => {\n if (ctx.value.branches ?? ctx.value.repository?.branches) return;\n\n ctx.issues.push({\n code: 'custom',\n input: ctx.value,\n message: 'The response carried no branch list.',\n });\n })\n .transform(({ repository, branches }) => branches ?? repository?.branches ?? []);\n\nexport const gitEntrypointsSchema = z.object({\n entrypoints: z.array(z.string()),\n});\n\nexport type GitAuth = z.infer<typeof gitAuthSchema>;\nexport type GetBranchesInput = z.input<typeof getBranchesInputSchema>;\nexport type GetEntrypointsInput = z.input<typeof getEntrypointsInputSchema>;\nexport type GitBranch = z.infer<typeof gitBranchSchema>;\nexport type GitEntrypoints = z.infer<typeof gitEntrypointsSchema>;\n","import type { GitAuth } from './schemas';\n\n/** Every variant is already the shape the components read, minus the discriminator. */\nconst toCredentials = (auth: GitAuth) => {\n const { type: _type, ...credentials } = auth;\n\n return credentials;\n};\n\n/**\n * Which revision the component clones before it answers:\n *\n * - `default` — no `-b` flag, so the clone lands on the repository's own default branch. Branch\n * listing must use this: it clones purely to enumerate the remote branches, so pinning one that\n * is stale or renamed fails the very call made to discover the valid ones.\n * `getBranchesInputSchema` accepts no `branch`, so that path has nothing to pin with.\n * - `branch` — pins the clone with `git clone -b <branch>`, deciding whose revision the action\n * reads. Entrypoint listing uses it once the user has picked a branch.\n */\ntype GitRevision = { revision: 'default' } | { revision: 'branch'; branch: string };\n\n/** The default is the absence of a branch — the component's own `git clone` decides it. */\nconst toRevision = (rev: GitRevision) => (rev.revision === 'branch' ? { branch: rev.branch } : {});\n\nexport type GitConfigDataInput = {\n repositoryUrl: string;\n auth: GitAuth;\n} & GitRevision;\n\n/** Data apps nest their repository a level deeper, and call the URL `repository`. */\nexport const buildDataAppConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n dataApp: {\n git: {\n repository: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n },\n});\n\n/** dbt transformations keep the same settings at the top of `parameters`, under `repo`. */\nexport const buildDbtConfigData = ({ repositoryUrl, auth, ...rev }: GitConfigDataInput) => ({\n parameters: {\n git: {\n repo: repositoryUrl,\n ...toCredentials(auth),\n ...toRevision(rev),\n },\n },\n});\n","import { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { isDataAppFamily } from './constants';\nimport {\n type GetBranchesInput,\n getBranchesInputSchema,\n type GetEntrypointsInput,\n getEntrypointsInputSchema,\n gitBranchesSchema,\n gitEntrypointsSchema,\n} from './schemas';\nimport { buildDataAppConfigData, buildDbtConfigData } from './utils';\n\n/**\n * Git repository actions, across both component families that serve them — the data apps\n * (`git-repository`) and the dbt transformations (`gitRepository`). Which action name and which\n * `configData` shape a call uses is resolved from `componentId`; see `./constants`.\n */\nexport const createGit = (sendSyncAction: SendSyncAction) => {\n const getBranches = async (input: GetBranchesInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, ...context } = parseOrThrow(\n getBranchesInputSchema,\n input,\n );\n const isDataApp = isDataAppFamily(componentId);\n const action = isDataApp ? SyncAction.DATA_APP_GIT_REPOSITORY : SyncAction.GIT_REPOSITORY;\n const buildConfigData = isDataApp ? buildDataAppConfigData : buildDbtConfigData;\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action,\n configData: buildConfigData({ repositoryUrl, auth, revision: 'default' }),\n },\n { signal },\n );\n\n return parseOrThrow(gitBranchesSchema, data);\n };\n\n const getEntrypoints = async (input: GetEntrypointsInput, signal?: AbortSignal) => {\n const { componentId, repositoryUrl, auth, branch, ...context } = parseOrThrow(\n getEntrypointsInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n componentId,\n action: SyncAction.DATA_APP_ENTRYPOINTS,\n // Data-app only — the input schema rejects every other component, so no family branch here.\n configData: buildDataAppConfigData({\n repositoryUrl,\n auth,\n ...(branch ? { revision: 'branch', branch } : { revision: 'default' }),\n }),\n },\n { signal },\n );\n\n return parseOrThrow(gitEntrypointsSchema, data);\n };\n\n return { getBranches, getEntrypoints };\n};\n","import * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const testLookerCredentialsInputSchema = syncActionContextSchema.extend({\n credentialsId: z.string().min(1, 'Required'),\n '#token': z.string().min(1, 'Required'),\n host: z.string().min(1, 'Required'),\n});\n\n/** The component answers with a status envelope only — there is no payload to model. */\nexport const lookerCredentialsResultSchema = z.object({\n status: z.string().optional(),\n message: z.string().optional(),\n});\n\nexport type TestLookerCredentialsInput = z.infer<typeof testLookerCredentialsInputSchema>;\nexport type LookerCredentialsResult = z.infer<typeof lookerCredentialsResultSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n lookerCredentialsResultSchema,\n type TestLookerCredentialsInput,\n testLookerCredentialsInputSchema,\n} from './schemas';\n\nexport const createLooker = (sendSyncAction: SendSyncAction) => {\n /** Registers the project's Looker credentials; throws `SyncActionError` when Looker rejects them. */\n const testCredentials = async (input: TestLookerCredentialsInput, signal?: AbortSignal) => {\n const {\n credentialsId,\n '#token': token,\n host,\n ...context\n } = parseOrThrow(testLookerCredentialsInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.TEST_LOOKER_CREDENTIALS,\n componentId: ComponentId.WR_LOOKER_V2,\n configData: { parameters: { looker: { credentialsId, '#token': token, host } } },\n },\n { signal },\n );\n\n return parseOrThrow(lookerCredentialsResultSchema, data);\n };\n\n return { testCredentials };\n};\n","import { parseOrThrow } from '../../errors';\nimport type { ValidateStatusFn } from '../../fetchClient';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { syncActionValidateStatus } from './utils/response';\nimport { createApify } from './apify';\nimport { SyncAction } from './constants';\nimport { createDbt } from './dbt';\nimport { createGit } from './git';\nimport { createLooker } from './looker';\nimport { type SyncActionBody, syncActionBodySchema } from './schemas';\nimport type { EnrollMFAInput, PostActionsBodyRaw } from './types';\n\nexport type SendSyncActionOptions = {\n signal?: AbortSignal;\n /**\n * Replaces the client's `syncActionValidateStatus` for this one request. Use it where a component\n * signals failure in a way only its own action knows about — delegate to the shared one for\n * everything else.\n */\n validateStatus?: ValidateStatusFn;\n};\n\nconst createSendSyncAction = (client: SyncActionClient) => {\n return async (body: SyncActionBody, options: SendSyncActionOptions = {}) => {\n const { data } = await client.post(\n '/actions',\n // The generated body type has `configData: Record<string, never>`, which nothing can satisfy;\n // `syncActionBodySchema` is the real contract and is what the request is validated against.\n { body: parseOrThrow(syncActionBodySchema, body) as unknown as PostActionsBodyRaw },\n options,\n );\n\n return data;\n };\n};\n\nexport type SendSyncAction = ReturnType<typeof createSendSyncAction>;\ntype SyncActionClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createSyncActionsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n validateStatus: syncActionValidateStatus,\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const sendSyncAction = createSendSyncAction(client);\n\n const enrollMFA = ({ email, ...rest }: EnrollMFAInput, signal?: AbortSignal) => {\n return sendSyncAction(\n {\n ...rest,\n action: SyncAction.ENROLL_MFA,\n configData: {\n parameters: {\n user: {\n email,\n },\n },\n },\n },\n { signal },\n );\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n sendSyncAction,\n enrollMFA,\n apify: createApify(sendSyncAction),\n dbt: createDbt(sendSyncAction),\n git: createGit(sendSyncAction),\n looker: createLooker(sendSyncAction),\n };\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,eAAe,SACnB,OAAO,SAAS,YAAY,SAAS,OAAQ,OAA+B;AAE9E,MAAM,YAAY,UAAoB,OAAO,UAAU,YAAY,QAAQ,QAAQ,KAAA;AACnF,MAAM,YAAY,UAAoB,OAAO,UAAU,WAAW,QAAQ,KAAA;;;;;;;;;;;;;AAc1E,MAAa,4BAA8C,gBAAgB;CACzE,MAAM,OAAO,YAAY,YAAY,IAAI;CAEzC,IAAI,MAAM,WAAW,SACnB,MAAM,IAAIA,wBAA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;EACA,SAASC,aAAAA,kBAAkB,IAAI;EAC/B,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,iBAAiB,qBAAqB,MAAM;CAElD,MAAM,aAAa,EAAE,OAAO,GAAG,QAAwB,WAAyB;EAC9E,OAAO,eACL;GACE,GAAG;GACH,QAAQ,WAAW;GACnB,YAAY,EACV,YAAY,EACV,MAAM,EACJ,MACF,EACF,EACF;EACF,GACA,EAAE,OAAO,CACX;CACF;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA,OAAO,YAAY,cAAc;EACjC,KAAK,UAAU,cAAc;EAC7B,KAAK,UAAU,cAAc;EAC7B,QAAQ,aAAa,cAAc;CACrC;AACF"}
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_createFetchClient = require("../createFetchClient-DgMiqTJ8.cjs");
3
- const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-DhUU3M1W.cjs");
4
- const require_auth = require("../auth-JQ33o3nU.cjs");
2
+ const require_createFetchClient = require("../createFetchClient-BlgPbjFj.cjs");
3
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-C3UmDXpe.cjs");
4
+ const require_auth = require("../auth-DLWnl18b.cjs");
5
5
  //#region src/clients/telemetry/telemetryClient.ts
6
6
  /**
7
7
  * Takes the plain telemetry service URL. An ingress rule routes the service under `/provisioning` on
@@ -1,6 +1,6 @@
1
- import { d as normalizeBaseUrl } from "../createFetchClient-U-ZrwPl2.js";
2
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-BVSc9ibR.js";
3
- import { t as createAuthHeaders } from "../auth-aItmDu45.js";
1
+ import { d as normalizeBaseUrl } from "../createFetchClient-C-cadpBx.js";
2
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-COaPeeQ0.js";
3
+ import { t as createAuthHeaders } from "../auth-BjmkFOgd.js";
4
4
  //#region src/clients/telemetry/telemetryClient.ts
5
5
  /**
6
6
  * Takes the plain telemetry service URL. An ingress rule routes the service under `/provisioning` on
@@ -16277,6 +16277,39 @@ type CreditPaymentRequest = Omit<OpenapiReturnType<paths['/pay-as-you-go/billing
16277
16277
  };
16278
16278
  type CreatePaymentRequestBody = OpenapiBodyType<paths['/pay-as-you-go/billing/create-payment-request']['post']>;
16279
16279
  //#endregion
16280
+ //#region src/clients/management/programmaticProjects/types.d.ts
16281
+ /**
16282
+ * `POST /manage/programmatic-projects/confirm`, hand-declared.
16283
+ *
16284
+ * - The generated schema is produced from production's spec (`redocly.yaml`), which does not carry
16285
+ * this path yet — keboola/connection#8162 has not shipped there.
16286
+ * - Replace both types with `operations['post_/manage/programmatic-projects/confirm::…']` once a
16287
+ * regenerated `__generated__/schema.d.ts` contains the path.
16288
+ */
16289
+ type ConfirmProgrammaticProjectPayload = {
16290
+ /**
16291
+ * `kbc_apc_<claimId>_<secret>`.
16292
+ *
16293
+ * Optional, because Connection also accepts the claim from the `HttpOnly` cookie its confirmation
16294
+ * page sets — which is the only copy left once the visitor has been through sign-up or an IdP, the
16295
+ * flows that take the token out of the URL and out of this app's memory. Omit it there; the
16296
+ * browser presents the cookie on its own. When both are sent, the body wins.
16297
+ */
16298
+ claimToken?: string;
16299
+ };
16300
+ /**
16301
+ * The confirmed project and the account that now owns it.
16302
+ *
16303
+ * - Carries no token: the claim is spent and the agent's session is revoked, so there is nothing
16304
+ * left to hand back that would still work.
16305
+ */
16306
+ type ConfirmProgrammaticProjectResult = {
16307
+ project: {
16308
+ id: number;
16309
+ };
16310
+ confirmedByAdminId: number;
16311
+ };
16312
+ //#endregion
16280
16313
  //#region src/clients/management/users/types.d.ts
16281
16314
  type AddUserFeaturePath = {
16282
16315
  userIdOrMail: string;
@@ -16436,6 +16469,18 @@ type CreateProjectInvitationBody = {
16436
16469
  role?: User['role'];
16437
16470
  /** After how many seconds the invitation and the resulting membership expire. */
16438
16471
  expirationSeconds?: number;
16472
+ /**
16473
+ * The ui-app the invitation leads to, instead of the Keboola project.
16474
+ *
16475
+ * - Values are `ui_apps` keys — the same keys Connection registers and serves an app under — so
16476
+ * a second app is one more member of the union, not a second flag.
16477
+ * - Connection picks the email template from it, and honours it only for projects holding the
16478
+ * matching project feature. Without the feature the invitation is still created; it just gets
16479
+ * the ordinary email.
16480
+ * - Absent means the ordinary email, pointing at the Keboola project.
16481
+ * - A stack that does not know the field ignores it, so sending it is safe on every stack.
16482
+ */
16483
+ landingApp?: 'business-workspace';
16439
16484
  };
16440
16485
  type DeleteProjectInvitationPath = {
16441
16486
  projectId: number;
@@ -16548,5 +16593,5 @@ type ActivateUiAppVersionPath = OpenapiPathType<paths['/manage/ui-apps/{id}/acti
16548
16593
  //#region src/clients/management/tokenTypes.d.ts
16549
16594
  type ManagementToken = components['schemas']['ManageTokenVerifyResponse'];
16550
16595
  //#endregion
16551
- export { RemoveProjectUserPath as $, FeatureProject as $n, MaintainerInvitationPath as $t, GetProjectPath as A, OrganizationUserPath as An, CreditPaymentRequest as At, ProjectBase as B, FileStorageGcs as Bn, CompleteSamlSetupBody as Bt, CreateProjectFeatureBody as C, OrganizationInvitationDetail as Cn, UserDetail as Ct, DeleteProjectInvitationPath as D, OrganizationMetadataItemPath as Dn, UserPath as Dt, CreateProjectInvitationPath as E, OrganizationMaintainer as En, UserOrganizationMembership as Et, ListProjectJoinRequestsPath as F, CreateFileStorageAbsBody as Fn, TopUpSetting as Ft, ProjectMetadataInput as G, RotateFileStorageGcsBody as Gn, CreateMaintainerOrganizationBody as Gt, ProjectInvitationDetail as H, RotateFileStorageAbsBody as Hn, CreateMaintainerBody as Ht, ListProjectUsersPath as I, CreateFileStorageGcsBody as In, UpdateStripeCustomerBody as It, ProjectTemplate as J, RotateFileStorageS3Body as Jn, CreateSamlConfigInput as Jt, ProjectMetadataItem as K, RotateFileStorageGcsInput as Kn, CreateMaintainerOrganizationInput as Kt, MoveProjectBody as L, CreateFileStorageS3Body as Ln, UpdateTopUpSettingBody as Lt, JoinProjectBody as M, SetOrganizationMetadataInput as Mn, PayAsYouGoBillingConfiguration as Mt, JoinProjectInput as N, UpdateOrganizationBody as Nn, StripeCustomer as Nt, DeleteProjectMetadataPath as O, OrganizationPath as On, UserProjectMembership as Ot, ListProjectInvitationsPath as P, UpdateOrganizationInput as Pn, StripeCustomerCard as Pt, RemoveProjectTemplateFeaturePath as Q, FeatureAdmin as Qn, MaintainerInvitationDetail as Qt, MoveProjectInput as R, FileStorage as Rn, AddMaintainerUserBody as Rt, ChangeProjectUserRolePath as S, OrganizationDetail as Sn, User as St, CreateProjectInvitationBody as T, OrganizationListItem as Tn, UserMaintainerMembership as Tt, ProjectJoinRequestDetail as U, RotateFileStorageAbsInput as Un, CreateMaintainerInvitationBody as Ut, ProjectInvitableRole as V, FileStorageS3 as Vn, CompleteSamlSetupInput as Vt, ProjectJoinRequestPath as W, RotateFileStorageAbsPath as Wn, CreateMaintainerInvitationInput as Wt, RemoveProjectFeaturePath as X, RotateFileStorageS3Path as Xn, Maintainer as Xt, ProjectTemplatePath as Y, RotateFileStorageS3Input as Yn, CreateSamlConfigPath as Yt, RemoveProjectLimitPath as Z, Feature as Zn, MaintainerDetail as Zt, AddProjectUserPath as _, CreateOrganizationInvitationBody as _n, RemoveUserFeaturePath as _t, CreateBigqueryStorageBackendBody as a, SamlConfigDetail as an, MaintainerInvitation as ar, SetProjectLimitsBody as at, ChangeProjectUserRoleBody as b, CreateOrganizationProjectInput as bn, UpdateUserBody as bt, StorageBackend as c, SetMaintainerMetadataBody as cn, ProjectJoinRequest as cr, SetProjectMetadataPath as ct, StorageBackendProject as d, UpdateMaintainerInput as dn, UpdateProjectBody as dt, MaintainerMetadataItemPath as en, FeatureType as er, RequestProjectAccessBody as et, UpdateBigqueryStorageBackendBody as f, UpdateSamlConfigBody as fn, UpdateProjectInput as ft, AddProjectUserBody as g, AdminUser as gn, GetUsersQuery as gt, UpdateStorageBackendInput as h, AddOrganizationUserInput as hn, DeleteUserMetadataPath as ht, UiApp as i, MetadataItem as in, DeletedProjectsListQuery as ir, SetProjectDisabledInput as it, GetProjectReviewersPath as j, SetOrganizationMetadataBody as jn, CreditPurchase as jt, GetProjectMetadataPath as k, OrganizationProject as kn, CreatePaymentRequestBody as kt, StorageBackendMaintainer as l, SetMaintainerMetadataInput as ln, paths as lr, SetProjectReviewersBody as lt, UpdateStorageBackendBody as m, AddOrganizationUserBody as mn, AddUserFeaturePath as mt, ActivateUiAppVersionPath as n, MaintainerUser as nn, DeletedProject as nr, Reviewer as nt, CreateSnowflakeStorageBackendBody as o, SamlConfigPath as on, OrganizationInvitation as or, SetProjectLimitsInput as ot, UpdateBigqueryStorageBackendInput as p, UpdateSamlConfigInput as pn, AddUserFeatureBody as pt, ProjectPath as q, RotateFileStorageGcsPath as qn, CreateSamlConfigBody as qt, RegisterUiAppBody as r, MaintainerUserPath as rn, DeletedProjectPurgeResult as rr, SetProjectDisabledBody as rt, GetStorageBackendProjectsQuery as s, SamlConfigSummary as sn, ProjectInvitation as sr, SetProjectMetadataBody as st, ManagementToken as t, MaintainerPath as tn, GetAllFeaturesQuery as tr, RequestProjectAccessInput as tt, StorageBackendPath as u, UpdateMaintainerBody as un, SetProjectReviewersPath as ut, AssignFeatureBody as v, CreateOrganizationInvitationInput as vn, SetUserMetadataBody as vt, CreateProjectFeaturePath as w, OrganizationInvitationPath as wn, UserListItem as wt, ChangeProjectUserRoleInput as x, Organization as xn, UpdateUserInput as xt, AssignProjectTemplateFeatureInput as y, CreateOrganizationProjectBody as yn, SetUserMetadataInput as yt, Project as z, FileStorageAbs as zn, AddMaintainerUserInput as zt };
16552
- //# sourceMappingURL=types-B3GOGUJ7.d.cts.map
16596
+ export { RemoveProjectUserPath as $, Feature as $n, MaintainerDetail as $t, GetProjectPath as A, OrganizationPath as An, ConfirmProgrammaticProjectResult as At, ProjectBase as B, FileStorage as Bn, AddMaintainerUserBody as Bt, CreateProjectFeatureBody as C, Organization as Cn, UserDetail as Ct, DeleteProjectInvitationPath as D, OrganizationListItem as Dn, UserPath as Dt, CreateProjectInvitationPath as E, OrganizationInvitationPath as En, UserOrganizationMembership as Et, ListProjectJoinRequestsPath as F, UpdateOrganizationBody as Fn, StripeCustomer as Ft, ProjectMetadataInput as G, RotateFileStorageAbsInput as Gn, CreateMaintainerInvitationBody as Gt, ProjectInvitationDetail as H, FileStorageGcs as Hn, CompleteSamlSetupBody as Ht, ListProjectUsersPath as I, UpdateOrganizationInput as In, StripeCustomerCard as It, ProjectTemplate as J, RotateFileStorageGcsInput as Jn, CreateMaintainerOrganizationInput as Jt, ProjectMetadataItem as K, RotateFileStorageAbsPath as Kn, CreateMaintainerInvitationInput as Kt, MoveProjectBody as L, CreateFileStorageAbsBody as Ln, TopUpSetting as Lt, JoinProjectBody as M, OrganizationUserPath as Mn, CreditPaymentRequest as Mt, JoinProjectInput as N, SetOrganizationMetadataBody as Nn, CreditPurchase as Nt, DeleteProjectMetadataPath as O, OrganizationMaintainer as On, UserProjectMembership as Ot, ListProjectInvitationsPath as P, SetOrganizationMetadataInput as Pn, PayAsYouGoBillingConfiguration as Pt, RemoveProjectTemplateFeaturePath as Q, RotateFileStorageS3Path as Qn, Maintainer as Qt, MoveProjectInput as R, CreateFileStorageGcsBody as Rn, UpdateStripeCustomerBody as Rt, ChangeProjectUserRolePath as S, CreateOrganizationProjectInput as Sn, User as St, CreateProjectInvitationBody as T, OrganizationInvitationDetail as Tn, UserMaintainerMembership as Tt, ProjectJoinRequestDetail as U, FileStorageS3 as Un, CompleteSamlSetupInput as Ut, ProjectInvitableRole as V, FileStorageAbs as Vn, AddMaintainerUserInput as Vt, ProjectJoinRequestPath as W, RotateFileStorageAbsBody as Wn, CreateMaintainerBody as Wt, RemoveProjectFeaturePath as X, RotateFileStorageS3Body as Xn, CreateSamlConfigInput as Xt, ProjectTemplatePath as Y, RotateFileStorageGcsPath as Yn, CreateSamlConfigBody as Yt, RemoveProjectLimitPath as Z, RotateFileStorageS3Input as Zn, CreateSamlConfigPath as Zt, AddProjectUserPath as _, AddOrganizationUserInput as _n, RemoveUserFeaturePath as _t, CreateBigqueryStorageBackendBody as a, MaintainerUserPath as an, DeletedProjectPurgeResult as ar, SetProjectLimitsBody as at, ChangeProjectUserRoleBody as b, CreateOrganizationInvitationInput as bn, UpdateUserBody as bt, StorageBackend as c, SamlConfigPath as cn, OrganizationInvitation as cr, SetProjectMetadataPath as ct, StorageBackendProject as d, SetMaintainerMetadataInput as dn, paths as dr, UpdateProjectBody as dt, MaintainerInvitationDetail as en, FeatureAdmin as er, RequestProjectAccessBody as et, UpdateBigqueryStorageBackendBody as f, UpdateMaintainerBody as fn, UpdateProjectInput as ft, AddProjectUserBody as g, AddOrganizationUserBody as gn, GetUsersQuery as gt, UpdateStorageBackendInput as h, UpdateSamlConfigInput as hn, DeleteUserMetadataPath as ht, UiApp as i, MaintainerUser as in, DeletedProject as ir, SetProjectDisabledInput as it, GetProjectReviewersPath as j, OrganizationProject as jn, CreatePaymentRequestBody as jt, GetProjectMetadataPath as k, OrganizationMetadataItemPath as kn, ConfirmProgrammaticProjectPayload as kt, StorageBackendMaintainer as l, SamlConfigSummary as ln, ProjectInvitation as lr, SetProjectReviewersBody as lt, UpdateStorageBackendBody as m, UpdateSamlConfigBody as mn, AddUserFeaturePath as mt, ActivateUiAppVersionPath as n, MaintainerMetadataItemPath as nn, FeatureType as nr, Reviewer as nt, CreateSnowflakeStorageBackendBody as o, MetadataItem as on, DeletedProjectsListQuery as or, SetProjectLimitsInput as ot, UpdateBigqueryStorageBackendInput as p, UpdateMaintainerInput as pn, AddUserFeatureBody as pt, ProjectPath as q, RotateFileStorageGcsBody as qn, CreateMaintainerOrganizationBody as qt, RegisterUiAppBody as r, MaintainerPath as rn, GetAllFeaturesQuery as rr, SetProjectDisabledBody as rt, GetStorageBackendProjectsQuery as s, SamlConfigDetail as sn, MaintainerInvitation as sr, SetProjectMetadataBody as st, ManagementToken as t, MaintainerInvitationPath as tn, FeatureProject as tr, RequestProjectAccessInput as tt, StorageBackendPath as u, SetMaintainerMetadataBody as un, ProjectJoinRequest as ur, SetProjectReviewersPath as ut, AssignFeatureBody as v, AdminUser as vn, SetUserMetadataBody as vt, CreateProjectFeaturePath as w, OrganizationDetail as wn, UserListItem as wt, ChangeProjectUserRoleInput as x, CreateOrganizationProjectBody as xn, UpdateUserInput as xt, AssignProjectTemplateFeatureInput as y, CreateOrganizationInvitationBody as yn, SetUserMetadataInput as yt, Project as z, CreateFileStorageS3Body as zn, UpdateTopUpSettingBody as zt };
16597
+ //# sourceMappingURL=types-B-P4vQe0.d.cts.map
@@ -1,6 +1,6 @@
1
1
  import { a as OpenapiParametersType, c as OpenapiReturnType, n as ArrayElement, o as OpenapiPathType, r as OpenapiBodyType, s as OpenapiQueryType } from "./index-KuQ79Mnz.js";
2
- import { t as ServiceId } from "./serviceIds-DRcoTnSd.js";
3
- import { g as paths, h as components } from "./types-DBOSvWtD.js";
2
+ import { t as ServiceId } from "./serviceIds-DC-H6ZD9.js";
3
+ import { g as paths, h as components } from "./types-gi4Eay19.js";
4
4
  //#region src/clients/storage/bucketExternal/types.d.ts
5
5
  type RegisterBucketBody = OpenapiBodyType<paths['/v2/storage/buckets/register']['post']>;
6
6
  type RegisteredBucketQuery = OpenapiQueryType<paths['/v2/storage/buckets/register']['post']>;
@@ -1943,4 +1943,4 @@ type StackInfo = {
1943
1943
  type PartialKey<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
1944
1944
  //#endregion
1945
1945
  export { ConfigurationRowVersionDetailPath as $, UpdateBucketListingSchemaBody as $a, DeleteTablesInput as $i, UpdateConfigurationRowStatePath as $n, CreateScheduledRefreshBody as $o, CreateEventInput as $r, ConfigurationDiff as $t, GetJobsQuery as A, TableDetail as Aa, CreateAliasTableBody as Ai, UpdateConfigurationSchemaQuery as An, CreateBucketBody as Ao, CreateDevBranchBody as Ar, CreateConfigurationWorkspaceInput as At, MergeRequestActivityLogEntry as B, UpdateTableDefinitionSchemaBody as Ba, CreateTableDefinitionBody as Bi, DeleteConfigurationRowInput as Bn, GetBucketsQuery as Bo, AddFileTagBody as Br, ComponentProcessorConfiguration as Bt, CreateTriggerBody as C, SaveTableMetadataPath as Ca, CreateTablePrimaryKeySchemaBody as Ci, SearchComponentConfigurationsInput as Cn, Bucket as Co, WorkspaceInputMappingLoadPreviewPath as Cr, GetConfigurationMetadataPath as Ct, UpdateTriggerInput as D, SetAliasTableFilterPath as Da, DeleteTableColumnQuery as Di, UpdateConfigurationInput as Dn, BucketOwner as Do, WorkspaceObject as Dr, BackendType as Dt, UpdateTriggerBody as E, SetAliasTableFilterInput as Ea, DeleteTableColumnPath as Ei, UpdateConfigurationBody as En, BucketMetadata as Eo, WorkspaceLoginType as Er, SaveConfigurationMetadataPath as Et, StorageJobStatus as F, TableMetadataResponse as Fa, CreateTableAsyncFromTimeTravelBody as Fi, CreateConfigurationRowInput as Fn, GetBucketOwnerInput as Fo, DevBranchPath as Fr, Component as Ft, MergeRequestDetailWithActivityLog as G, CreateBucketListingInput as Ga, DeleteTableMetadataInput as Gi, GetConfigurationRowPath as Gn, UpdateBucketBody as Go, File as Gr, GetComponentsInput as Gt, MergeRequestChangeLogEntry as H, WhereFilters as Ha, CreateTableDefinitionPath as Hi, DeleteConfigurationRowSchemaBody as Hn, SaveBucketMetadataBody as Ho, AddFileTagPath as Hr, ComponentVendor as Ht, CreateMergeRequestBody as I, UpdateTableBody as Ia, CreateTableAsyncFromWorkspaceBody as Ii, CreateConfigurationRowPath as In, GetBucketPath as Io, SaveDevBranchMetadataInput as Ir, ComponentData as It, UpdateMergeRequestBody as J, ProjectBucketListing as Ja, DeleteTableRows as Ji, UpdateConfigurationRowInput as Jn, UpdateBucketOwnerInput as Jo, GetFilesQuery as Jr, GetComponentsSchemaPath as Jt, MergeRequestReviewer as K, CreateBucketListingPath as Ka, DeleteTableMetadataPath as Ki, Row as Kn, UpdateBucketInput as Ko, GetFileContentPath as Kr, GetComponentsPath as Kt, CreateMergeRequestSchemaBody as L, UpdateTableDefinitionBody as La, CreateTableAsyncInput as Li, CreateConfigurationRowSchemaBody as Ln, GetBucketQuery as Lo, SaveDevBranchMetadataPath as Lr, ComponentDataTypesConfiguration as Lt, Job as M, TableExportAsyncSchemaBody as Ma, CreateTableAsyncBody as Mi, UpdateConfigurationStateInput as Mn, DeleteBucketAsyncInput as Mo, DeleteDevBranchMetadataPath as Mr, CreateConfigurationWorkspaceSchemaBody as Mt, JobOperation as N, TableImportAsyncBody as Na, CreateTableAsyncFromFileBody as Ni, UpdateConfigurationStateSchemaBody as Nn, DeleteBucketMetadataInput as No, DeleteDevBranchMetadataSchemaPath as Nr, GetConfigurationWorkspacesPath as Nt, UpdateTriggerRequest as O, SetAliasTableFilterSchemaBody as Oa, RemoveTablePrimaryKeyInput as Oi, UpdateConfigurationResult as On, BucketShared as Oo, WorkspaceRaw as Or, ConfigurationUseCaseType as Ot, JobUnion as P, TableImportAsyncSchemaBody as Pa, CreateTableAsyncFromSnapshotBody as Pi, CreateConfigurationRowBody as Pn, GetBucketInput as Po, DevBranch as Pr, LoginType as Pt, ConfigurationRowVersionDetail as Q, UpdateBucketListingPath as Qa, DeleteTableSchemaQuery as Qi, UpdateConfigurationRowStateInput as Qn, BucketRegistrationGuideSchemaQuery as Qo, CreateEventBody as Qr, ConfigType as Qt, MergeRequest as R, UpdateTableDefinitionInput as Ra, CreateTableAsyncPath as Ri, CreateConfigurationRowsInput as Rn, GetBucketsInput as Ro, UpdateDevBranchInput as Rr, ComponentDefinition as Rt, SearchTablesSchemaQuery as S, SaveTableMetadataInput as Sa, CreateTablePrimaryKeyPath as Si, SearchComponentConfiguration as Sn, UnshareBucketSchemaQuery as So, WorkspaceInputMappingLoadPreviewInput as Sr, DeleteConfigurationMetadataPath as St, Trigger as T, SetAliasTableFilterBody as Ta, DeleteTableColumnInput as Ti, SearchComponentConfigurationsSchemaQuery as Tn, BucketDetail as To, WorkspaceInputMappingLoadPreviewResponse as Tr, SaveConfigurationMetadataInput as Tt, MergeRequestConflict as U, BucketListingDetail as Ua, CreateTableDefinitionSchemaBody as Ui, DeleteConfigurationRowsInput as Un, SaveBucketMetadataInput as Uo, DeleteFilePath as Ur, GetComponentPath as Ut, MergeRequestChangeLog as V, UpdateTableInput as Va, CreateTableDefinitionInput as Vi, DeleteConfigurationRowPath as Vn, GetBucketsSchemaQuery as Vo, AddFileTagInput as Vr, ComponentStagingStorage as Vt, MergeRequestDetail as W, CreateBucketListingBody as Wa, DeleteTableInput as Wi, GetConfigurationRowInput as Wn, SaveBucketMetadataPath as Wo, DeleteFileTagPath as Wr, GetComponentSchemaPath as Wt, UpdateMergeRequestSchemaBody as X, UpdateBucketListingBody as Xa, DeleteTableRowsPath as Xi, UpdateConfigurationRowSchemaBody as Xn, BucketRegistrationGuide as Xo, PrepareFileBody as Xr, BaseComponentConfig as Xt, UpdateMergeRequestInput as Y, Subscriber as Ya, DeleteTableRowsInput as Yi, UpdateConfigurationRowPath as Yn, UpdateBucketOwnerSchemaBody as Yo, GetFilesSchemaParams as Yr, GetComponentsSchemaQuery as Yt, ConfigurationRowVersion as Z, UpdateBucketListingInput as Za, DeleteTableRowsSchemaQuery as Zi, UpdateConfigurationRowStateBody as Zn, BucketRegistrationGuideQuery as Zo, PrepareFileSchemaBody as Zr, ComponentConfig as Zt, GlobalSearchItemType as _, PreviewData as _a, AddTableColumnInput as _i, RebaseConfigurationInput as _n, ShareBucketToUsersSchemaBody as _o, UnloadWorkspacePath as _r, RollbackConfigurationRowToVersionSchemaBody as _t, Service as a, GetDataPreviewQuery as aa, GetBucketEventsPath as ai, ConfigurationPath as an, ShareBucketToOrganizationInput as ao, DeleteWorkspacePath as ar, RegisteredBucketQuery as as, ConfigurationVersionDetailPath as at, GlobalSearchSchemaQuery as b, PullTableAsyncSchemaPath as ba, CreateTablePrimaryKeyBody as bi, RebaseConfigurationSchemaBody as bn, SharedBucketsQuery as bo, WorkspaceConnection as br, RollbackConfigurationToVersionSchemaBody as bt, RunIdStats as c, GetTablePath as ca, GetEventsInput as ci, CreateConfigurationSchemaBody as cn, ShareBucketToOrganizationSchemaQuery as co, GetWorkspacePath as cr, ConfigurationVersionsSchemaPath as ct, CreateSnapshotInput as d, GetTablesQuery as da, GetTableEventsInput as di, GetConfigurationsPath as dn, ShareBucketToProjectsPath as do, ResetWorkspacePassword as dr, CopyConfigurationFromVersionPath as dt, ExportAsyncInput as ea, CreateEventPath as ei, ConfigurationDiffContent as en, ForceUnlinkBucketInput as eo, UpdateConfigurationRowStateSchemaBody as er, CreateScheduledRefreshInput as es, ConfigurationRowVersionPath as et, GetSnapshotsQuery as f, GetTablesSchemaQuery as fa, GetTableEventsPath as fi, GetSearchComponentConfigurationsPath as fn, ShareBucketToProjectsSchemaBody as fo, ResetWorkspacePasswordPath as fr, CopyConfigurationFromVersionResult as ft, GlobalSearchItem as g, PrevieData as ga, AddTableColumnBody as gi, RebaseConfigurationDiff as gn, ShareBucketToUsersPath as go, UnloadWorkspaceInput as gr, RollbackConfigurationRowToVersionInput as gt, GlobalSearchFilterType as h, Metadata as ha, StorageEventRaw as hi, RebaseConfigurationBody as hn, ShareBucketToUsersInput as ho, SetWorkspacePublicKeyPath as hr, CopyConfigurationRowFromVersionSchemaBody as ht, PartialKey as i, GetDataPreviewPath as ia, GetBucketEventsInput as ii, ConfigurationDiffSideContent as in, LinkBucketSchemaBody as io, DeleteWorkspaceObjectPath as ir, RegisterBucketBody as is, ConfigurationVersionDetail as it, GetJobsSchemaQuery as j, TableExportAsyncBody as ja, CreateAliasTableInput as ji, UpdateConfigurationStateBody as jn, CreateBucketSchemaBody as jo, CreateDevBranchSchemaBody as jr, CreateConfigurationWorkspacePath as jt, GetJobPath as k, Table as ka, SaveColumnMetadataInput as ki, UpdateConfigurationSchemaBody as kn, BucketStage as ko, WorkspaceSaml2Login as kr, CreateConfigurationWorkspaceBody as kt, RunIdTableStat as l, GetTablesInput as la, GetEventsPath as li, CreatorToken as ln, ShareBucketToProjectsBody as lo, GetWorkspaceSaml2LoginPath as lr, CopyConfigurationFromVersionBody as lt, Snapshot as m, ImportAsyncPath as ma, StorageEvent as mi, PurgeConfigurationsInput as mn, ShareBucketToUsersBody as mo, SetWorkspacePublicKeyBody as mr, CopyConfigurationRowFromVersionInput as mt, GetStackInfoQuery as n, FilterOperator as na, CreatedEvent as ni, ConfigurationDiffRow as nn, ForceUnlinkBucketSchemaQuery as no, DeleteWorkspaceObjectBody as nr, RefreshExternalBucketInput as ns, ConfigurationRowVersionsSchemaPath as nt, StackComponent as o, GetDataPreviewSchemaQuery as oa, GetBucketEventsQuery as oi, CreateConfigurationBody as on, ShareBucketToOrganizationProjectInput as oo, DeleteWorkspacesInput as or, ScheduledTask as os, ConfigurationVersionPath as ot, GetTableSnapshotsInput as p, ImportAsyncInput as pa, GetTableEventsQuery as pi, PurgeConfigurationInput as pn, ShareBucketToProjectsSchemaQuery as po, SetWorkspacePublicInput as pr, CopyConfigurationFromVersionSchemaBody as pt, MergeRequestReviewerStatus as q, CreateBucketListingSchemaBody as qa, DeleteTablePath as qi, UpdateConfigurationRowBody as qn, UpdateBucketOwnerBody as qo, GetFilePath as qr, GetComponentsQuery as qt, GetStackInfoSchemaParams as r, GetDataPreviewInput as ra, EventType as ri, ConfigurationDiffSide as rn, LinkBucketBody as ro, DeleteWorkspaceObjectInput as rr, RefreshExternalBucketQuery as rs, ConfigurationVersion as rt, StackInfo as s, GetTableInput as sa, GetEventPath as si, CreateConfigurationInput as sn, ShareBucketToOrganizationProjectSchemaQuery as so, GetWorkspaceObjectsPath as sr, ConfigurationVersionSchemaPath as st, ComponentType as t, ExportAsyncPath as ta, CreateEventSchemaBody as ti, ConfigurationDiffPath as tn, ForceUnlinkBucketSchemaPath as to, WrDbRow as tr, CreateScheduledRefreshPath as ts, ConfigurationRowVersionSchemaPath as tt, CreateSnapshotBody as u, GetTablesPath as ua, GetEventsQuery as ui, DeleteConfigurationInput as un, ShareBucketToProjectsInput as uo, GetWorkspacesPath as ur, CopyConfigurationFromVersionInput as ut, GlobalSearchQuery as v, PullTableAsyncInput as va, AddTableColumnPath as vi, RebaseConfigurationPath as vn, ShareBucketToUsersSchemaQuery as vo, UnloadWorkspaceQuery as vr, RollbackConfigurationToVersionInput as vt, GetTriggersQuery as w, SaveTableMetadataSchemaBody as wa, DeleteColumnMetadataInput as wi, SearchComponentConfigurationsQuery as wn, BucketBackend as wo, WorkspaceInputMappingLoadPreviewQuery as wr, SaveConfigurationMetadataBody as wt, SearchTablesQuery as x, SaveMetadataBody as xa, CreateTablePrimaryKeyInput as xi, RebaseConfigurationToDeletedInput as xn, UnshareBucketInput as xo, WorkspaceInputMappingLoadPreviewBody as xr, ConfigurationMetadataItem as xt, GlobalSearchResponse as y, PullTableAsyncPath as ya, AddTableColumnSchemaBody as yi, RebaseConfigurationRow as yn, SharedBuckets as yo, Workspace as yr, RollbackConfigurationToVersionResult as yt, MergeRequestActivityEventType as z, UpdateTableDefinitionPath as za, CreateTableAsyncSchemaBody as zi, DeleteConfigurationRowBody as zn, GetBucketsPath as zo, UpdateDevBranchSchemaBody as zr, ComponentLogging as zt };
1946
- //# sourceMappingURL=types-DEc55spK.d.ts.map
1946
+ //# sourceMappingURL=types-B95uNQ9o.d.ts.map
@@ -1,5 +1,5 @@
1
- import { a as ProjectId } from "./types-DBOSvWtD.js";
2
- import "./types-DEc55spK.js";
1
+ import { a as ProjectId } from "./types-gi4Eay19.js";
2
+ import "./types-B95uNQ9o.js";
3
3
  //#region src/clients/encryption/types.d.ts
4
4
  type BranchType = 'default' | 'dev';
5
5
  type EncryptParamsByScope = {
@@ -63,4 +63,4 @@ type EncryptQuery = {
63
63
  type EncryptBody = string | Record<string, unknown>;
64
64
  //#endregion
65
65
  export { EncryptQuery as a, EncryptParamsByScope as i, EncryptBody as n, EncryptionScope as o, EncryptParams as r, ScopedSecrets as s, BranchType as t };
66
- //# sourceMappingURL=types-BQsOHNI0.d.ts.map
66
+ //# sourceMappingURL=types-BrPlv-NS.d.ts.map