@keboola/api-client 41.0.0 → 42.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 (320) hide show
  1. package/API-SURFACE.md +43 -3
  2. package/CHANGELOG.md +158 -0
  3. package/README.md +1 -1
  4. package/dist/{ManagementClientAuthError-DE7lNGZQ.cjs → ManagementClientAuthError-BFZOtLgj.cjs} +2 -2
  5. package/dist/{ManagementClientAuthError-DE7lNGZQ.cjs.map → ManagementClientAuthError-BFZOtLgj.cjs.map} +1 -1
  6. package/dist/{ManagementClientAuthError-H30lti_Q.js → ManagementClientAuthError-DUbXlry2.js} +2 -2
  7. package/dist/{ManagementClientAuthError-H30lti_Q.js.map → ManagementClientAuthError-DUbXlry2.js.map} +1 -1
  8. package/dist/ai/index.cjs +2 -2
  9. package/dist/ai/index.js +2 -2
  10. package/dist/{appLogs-BBkkUOW1.js → appLogs-DfkItQCO.js} +2 -2
  11. package/dist/{appLogs-BBkkUOW1.js.map → appLogs-DfkItQCO.js.map} +1 -1
  12. package/dist/{appLogs-B9zFJIuy.cjs → appLogs-oZvt59mk.cjs} +2 -2
  13. package/dist/{appLogs-B9zFJIuy.cjs.map → appLogs-oZvt59mk.cjs.map} +1 -1
  14. package/dist/apps/index.cjs +3 -3
  15. package/dist/apps/index.js +3 -3
  16. package/dist/assets/index.cjs +1 -1
  17. package/dist/assets/index.js +1 -1
  18. package/dist/auth/index.cjs +1 -1
  19. package/dist/auth/index.d.cts +1 -1
  20. package/dist/auth/index.d.ts +1 -1
  21. package/dist/auth/index.js +1 -1
  22. package/dist/auth/types.d.cts +2 -2
  23. package/dist/auth/types.d.ts +2 -2
  24. package/dist/{auth-DworfoPy.js → auth-DUHTJTwS.js} +2 -2
  25. package/dist/{auth-DworfoPy.js.map → auth-DUHTJTwS.js.map} +1 -1
  26. package/dist/{auth-Dm0F2rOh.cjs → auth-zfI04oj7.cjs} +2 -2
  27. package/dist/{auth-Dm0F2rOh.cjs.map → auth-zfI04oj7.cjs.map} +1 -1
  28. package/dist/{authClient-BmuUo0J4.cjs → authClient-BxqRGR5c.cjs} +39 -5
  29. package/dist/authClient-BxqRGR5c.cjs.map +1 -0
  30. package/dist/{authClient-vEt_7_uk.d.cts → authClient-CBVAT3v9.d.cts} +49 -2
  31. package/dist/{authClient-CHXWJ9x3.d.ts → authClient-CRumc934.d.ts} +49 -2
  32. package/dist/{authClient-CgcDGd30.js → authClient-CX4buUMc.js} +39 -5
  33. package/dist/authClient-CX4buUMc.js.map +1 -0
  34. package/dist/billing/index.cjs +2 -2
  35. package/dist/billing/index.js +2 -2
  36. package/dist/businessWorkspaceApi/index.cjs +1 -1
  37. package/dist/businessWorkspaceApi/index.js +1 -1
  38. package/dist/{businessWorkspaceApi-BLUdefRF.js → businessWorkspaceApi-DFky1k61.js} +3 -3
  39. package/dist/{businessWorkspaceApi-BLUdefRF.js.map → businessWorkspaceApi-DFky1k61.js.map} +1 -1
  40. package/dist/{businessWorkspaceApi-6tCDdpnY.cjs → businessWorkspaceApi-Uzqu0PJM.cjs} +3 -3
  41. package/dist/{businessWorkspaceApi-6tCDdpnY.cjs.map → businessWorkspaceApi-Uzqu0PJM.cjs.map} +1 -1
  42. package/dist/chat/index.cjs +3 -3
  43. package/dist/chat/index.js +3 -3
  44. package/dist/{componentId-_IKXxICq.cjs → componentId-D4jp6a13.cjs} +17 -1
  45. package/dist/componentId-D4jp6a13.cjs.map +1 -0
  46. package/dist/{componentId-BJLfnaGc.js → componentId-DmHwHG5V.js} +17 -1
  47. package/dist/componentId-DmHwHG5V.js.map +1 -0
  48. package/dist/{configurations-VlfQ_37Y.cjs → configurations-D_Rbs0Wl.cjs} +2 -2
  49. package/dist/{configurations-VlfQ_37Y.cjs.map → configurations-D_Rbs0Wl.cjs.map} +1 -1
  50. package/dist/{configurations-CF3xz7RB.js → configurations-DcpUlC8I.js} +2 -2
  51. package/dist/{configurations-CF3xz7RB.js.map → configurations-DcpUlC8I.js.map} +1 -1
  52. package/dist/constants/index.cjs +1 -1
  53. package/dist/constants/index.d.cts +1 -1
  54. package/dist/constants/index.d.ts +1 -1
  55. package/dist/constants/index.js +1 -1
  56. package/dist/{createFetchClient-Cwp8max9.cjs → createFetchClient-BgihytBn.cjs} +2 -1
  57. package/dist/createFetchClient-BgihytBn.cjs.map +1 -0
  58. package/dist/{createFetchClient-DXHQK63w.js → createFetchClient-cgWkwgAQ.js} +2 -1
  59. package/dist/createFetchClient-cgWkwgAQ.js.map +1 -0
  60. package/dist/{createGenericFetchClient-Dl9cqTvR.cjs → createGenericFetchClient-C7Y0YVfc.cjs} +2 -2
  61. package/dist/{createGenericFetchClient-Dl9cqTvR.cjs.map → createGenericFetchClient-C7Y0YVfc.cjs.map} +1 -1
  62. package/dist/{createGenericFetchClient-Dg1rgzmG.js → createGenericFetchClient-CX9Hn3Aq.js} +2 -2
  63. package/dist/{createGenericFetchClient-Dg1rgzmG.js.map → createGenericFetchClient-CX9Hn3Aq.js.map} +1 -1
  64. package/dist/{createOpenapiFetchClient-DZUOVupy.js → createOpenapiFetchClient-BxcLLU_N.js} +2 -2
  65. package/dist/{createOpenapiFetchClient-DZUOVupy.js.map → createOpenapiFetchClient-BxcLLU_N.js.map} +1 -1
  66. package/dist/{createOpenapiFetchClient-BYqW-9tm.cjs → createOpenapiFetchClient-DY5s-aH6.cjs} +2 -2
  67. package/dist/{createOpenapiFetchClient-BYqW-9tm.cjs.map → createOpenapiFetchClient-DY5s-aH6.cjs.map} +1 -1
  68. package/dist/dataScience/index.cjs +2 -2
  69. package/dist/dataScience/index.js +2 -2
  70. package/dist/{dataScience-B5QxZnvW.cjs → dataScience-BoS8Xfvx.cjs} +5 -5
  71. package/dist/{dataScience-B5QxZnvW.cjs.map → dataScience-BoS8Xfvx.cjs.map} +1 -1
  72. package/dist/{dataScience-OXcwdk1p.js → dataScience-BxRoGfnG.js} +5 -5
  73. package/dist/{dataScience-OXcwdk1p.js.map → dataScience-BxRoGfnG.js.map} +1 -1
  74. package/dist/developerPortal/index.cjs +1 -1
  75. package/dist/developerPortal/index.js +1 -1
  76. package/dist/{developerPortalClient-B1QZ1rYi.js → developerPortalClient-C7s0kpjK.js} +3 -3
  77. package/dist/{developerPortalClient-B1QZ1rYi.js.map → developerPortalClient-C7s0kpjK.js.map} +1 -1
  78. package/dist/{developerPortalClient-CLPpBksD.cjs → developerPortalClient-DFHEsrlt.cjs} +3 -3
  79. package/dist/{developerPortalClient-CLPpBksD.cjs.map → developerPortalClient-DFHEsrlt.cjs.map} +1 -1
  80. package/dist/domain/permissions/index.d.cts +2 -2
  81. package/dist/domain/permissions/index.d.ts +2 -2
  82. package/dist/domain/storageTable/index.cjs +7 -1
  83. package/dist/domain/storageTable/index.d.cts +2 -2
  84. package/dist/domain/storageTable/index.d.ts +2 -2
  85. package/dist/domain/storageTable/index.js +2 -2
  86. package/dist/editor/index.cjs +2 -2
  87. package/dist/editor/index.js +2 -2
  88. package/dist/encryption/index.cjs +1 -1
  89. package/dist/encryption/index.d.cts +1 -1
  90. package/dist/encryption/index.d.ts +1 -1
  91. package/dist/encryption/index.js +1 -1
  92. package/dist/encryption/types.d.cts +1 -1
  93. package/dist/encryption/types.d.ts +1 -1
  94. package/dist/import/index.cjs +1 -1
  95. package/dist/import/index.js +1 -1
  96. package/dist/{import-CNk89mqy.cjs → import-BSYvG3Uy.cjs} +3 -3
  97. package/dist/{import-CNk89mqy.cjs.map → import-BSYvG3Uy.cjs.map} +1 -1
  98. package/dist/{import-DiMQCzLa.js → import-CXBcFVbk.js} +3 -3
  99. package/dist/{import-DiMQCzLa.js.map → import-CXBcFVbk.js.map} +1 -1
  100. package/dist/{index-DCRKjihs.d.ts → index-B03vhWSX.d.ts} +117 -90
  101. package/dist/{index-cWp_V6K5.d.cts → index-B2-7WJ-E.d.cts} +573 -78
  102. package/dist/{index-BDZvaRud.d.ts → index-B72LTF-k.d.ts} +6 -3
  103. package/dist/{index-DOAZmWvh.d.cts → index-BMiZx-4_.d.cts} +6 -3
  104. package/dist/{index--ZpnE3YT.d.cts → index-BUsLHNOA.d.cts} +2 -2
  105. package/dist/{index-D7-o-oGa.d.ts → index-CBWfpd-0.d.ts} +2 -2
  106. package/dist/index-CGCXR_6Q.d.ts +273 -0
  107. package/dist/{index-Cvbjp3jx.d.cts → index-CKENwClW.d.cts} +4 -4
  108. package/dist/{index-CaaTOANF.d.ts → index-CpE_NWuq.d.ts} +573 -78
  109. package/dist/{index-DnQTuc6t.d.ts → index-Cw-d6vV3.d.ts} +4 -4
  110. package/dist/{index-ByRpNVcs.d.cts → index-D3HFMfJJ.d.cts} +117 -90
  111. package/dist/index-DINB7vsV.d.cts +273 -0
  112. package/dist/{index-B5w7WlaU.d.cts → index-DeQDdut6.d.cts} +17 -1
  113. package/dist/{index-B5w7WlaU.d.ts → index-DeQDdut6.d.ts} +17 -1
  114. package/dist/{index-Qb7X6-ph.d.ts → index-DwM1EpnZ.d.ts} +12 -2
  115. package/dist/{index-CXcWpZQ2.d.ts → index-P1vR966i.d.cts} +74 -2
  116. package/dist/{index-CXcWpZQ2.d.cts → index-P1vR966i.d.ts} +74 -2
  117. package/dist/{index-DNThyEej.d.cts → index-VnJCp8IL.d.cts} +12 -2
  118. package/dist/index.cjs +65 -39
  119. package/dist/index.cjs.map +1 -1
  120. package/dist/index.d.cts +3 -3
  121. package/dist/index.d.ts +3 -3
  122. package/dist/index.js +65 -40
  123. package/dist/index.js.map +1 -1
  124. package/dist/{isLoginPageRedirect-XPwAOKK3.js → isLoginPageRedirect-CsjF95_P.js} +2 -2
  125. package/dist/{isLoginPageRedirect-XPwAOKK3.js.map → isLoginPageRedirect-CsjF95_P.js.map} +1 -1
  126. package/dist/{isLoginPageRedirect-jQHiLrG7.cjs → isLoginPageRedirect-c451CoWW.cjs} +2 -2
  127. package/dist/{isLoginPageRedirect-jQHiLrG7.cjs.map → isLoginPageRedirect-c451CoWW.cjs.map} +1 -1
  128. package/dist/kaiAgent/index.cjs +1 -1
  129. package/dist/kaiAgent/index.d.cts +2 -2
  130. package/dist/kaiAgent/index.d.ts +2 -2
  131. package/dist/kaiAgent/index.js +1 -1
  132. package/dist/{kaiAgent-QNoeVKPs.cjs → kaiAgent-ph4DRKlT.cjs} +21 -5
  133. package/dist/kaiAgent-ph4DRKlT.cjs.map +1 -0
  134. package/dist/{kaiAgent-Dp20HLTh.js → kaiAgent-xBpUwLeQ.js} +21 -5
  135. package/dist/kaiAgent-xBpUwLeQ.js.map +1 -0
  136. package/dist/{kaiMemory-D0Y_16U4.js → kaiMemory-BAniZZAN.js} +2 -2
  137. package/dist/{kaiMemory-D0Y_16U4.js.map → kaiMemory-BAniZZAN.js.map} +1 -1
  138. package/dist/{kaiMemory-CClSPInt.cjs → kaiMemory-U0DG-CpY.cjs} +2 -2
  139. package/dist/{kaiMemory-CClSPInt.cjs.map → kaiMemory-U0DG-CpY.cjs.map} +1 -1
  140. package/dist/management/index.cjs +1 -1
  141. package/dist/management/index.d.cts +1 -1
  142. package/dist/management/index.d.ts +1 -1
  143. package/dist/management/index.js +1 -1
  144. package/dist/management/types.d.cts +2 -2
  145. package/dist/management/types.d.ts +2 -2
  146. package/dist/{management-CCY0IYnq.cjs → management-5597SiC7.cjs} +79 -11
  147. package/dist/management-5597SiC7.cjs.map +1 -0
  148. package/dist/{management-DvmPiG64.js → management-D46KlXts.js} +79 -11
  149. package/dist/management-D46KlXts.js.map +1 -0
  150. package/dist/metastore/index.cjs +1 -1
  151. package/dist/metastore/index.d.cts +1 -1
  152. package/dist/metastore/index.d.ts +1 -1
  153. package/dist/metastore/index.js +1 -1
  154. package/dist/metastore/types.d.cts +2 -2
  155. package/dist/metastore/types.d.ts +2 -2
  156. package/dist/{metastore-XtWciCZT.cjs → metastore-DwMFlP2d.cjs} +52 -7
  157. package/dist/metastore-DwMFlP2d.cjs.map +1 -0
  158. package/dist/{metastore-BycJxe7A.js → metastore-_OskcLGz.js} +52 -7
  159. package/dist/metastore-_OskcLGz.js.map +1 -0
  160. package/dist/microsoftGraph/index.cjs +2 -2
  161. package/dist/microsoftGraph/index.js +2 -2
  162. package/dist/{middleware-CBwrtgQd.js → middleware-Drbo_UIZ.js} +2 -2
  163. package/dist/{middleware-CBwrtgQd.js.map → middleware-Drbo_UIZ.js.map} +1 -1
  164. package/dist/{middleware-IjYx3d5u.cjs → middleware-xhg2r2fE.cjs} +2 -2
  165. package/dist/{middleware-IjYx3d5u.cjs.map → middleware-xhg2r2fE.cjs.map} +1 -1
  166. package/dist/notifications/index.cjs +3 -3
  167. package/dist/notifications/index.js +3 -3
  168. package/dist/oauth/index.cjs +1 -1
  169. package/dist/oauth/index.js +1 -1
  170. package/dist/{oauth--2p8jkJf.cjs → oauth-L0Uic3YA.cjs} +5 -5
  171. package/dist/{oauth--2p8jkJf.cjs.map → oauth-L0Uic3YA.cjs.map} +1 -1
  172. package/dist/{oauth-l5zE39cD.js → oauth-TWwAv-va.js} +5 -5
  173. package/dist/{oauth-l5zE39cD.js.map → oauth-TWwAv-va.js.map} +1 -1
  174. package/dist/omnisearch/index.cjs +2 -2
  175. package/dist/omnisearch/index.js +2 -2
  176. package/dist/{project-cHKuGvqJ.d.cts → project-B8wtlstY.d.cts} +2 -2
  177. package/dist/{project-B15gStbM.d.ts → project-BCc3mpAy.d.ts} +2 -2
  178. package/dist/queryService/index.cjs +1 -1
  179. package/dist/queryService/index.d.cts +1 -1
  180. package/dist/queryService/index.d.ts +1 -1
  181. package/dist/queryService/index.js +1 -1
  182. package/dist/{queryService-CCOYbRbw.js → queryService-CdtogGr7.js} +5 -5
  183. package/dist/{queryService-CCOYbRbw.js.map → queryService-CdtogGr7.js.map} +1 -1
  184. package/dist/{queryService-CQzclHdL.cjs → queryService-Dx6AdxOl.cjs} +5 -5
  185. package/dist/{queryService-CQzclHdL.cjs.map → queryService-Dx6AdxOl.cjs.map} +1 -1
  186. package/dist/queue/index.cjs +1 -1
  187. package/dist/queue/index.d.cts +1 -1
  188. package/dist/queue/index.d.ts +1 -1
  189. package/dist/queue/index.js +1 -1
  190. package/dist/{queue-Cowbg6bR.js → queue-f2xsjy0o.js} +4 -4
  191. package/dist/{queue-Cowbg6bR.js.map → queue-f2xsjy0o.js.map} +1 -1
  192. package/dist/{queue-UG_BWKIC.cjs → queue-wIdnMtaZ.cjs} +4 -4
  193. package/dist/{queue-UG_BWKIC.cjs.map → queue-wIdnMtaZ.cjs.map} +1 -1
  194. package/dist/scheduler/index.cjs +3 -3
  195. package/dist/scheduler/index.js +3 -3
  196. package/dist/sdk/configurations/index.cjs +1 -1
  197. package/dist/sdk/configurations/index.d.cts +4 -4
  198. package/dist/sdk/configurations/index.d.ts +4 -4
  199. package/dist/sdk/configurations/index.js +1 -1
  200. package/dist/sdk/developerPortal/index.cjs +3 -3
  201. package/dist/sdk/developerPortal/index.js +3 -3
  202. package/dist/sdk/kaiMemory/index.cjs +1 -1
  203. package/dist/sdk/kaiMemory/index.d.cts +1 -1
  204. package/dist/sdk/kaiMemory/index.d.ts +1 -1
  205. package/dist/sdk/kaiMemory/index.js +1 -1
  206. package/dist/sdk/kaiMemory/types.d.cts +1 -1
  207. package/dist/sdk/kaiMemory/types.d.ts +1 -1
  208. package/dist/sdk/queryService/index.d.cts +1 -1
  209. package/dist/sdk/queryService/index.d.ts +1 -1
  210. package/dist/sdk/semanticLayer/index.cjs +2 -1
  211. package/dist/sdk/semanticLayer/index.d.cts +10 -3
  212. package/dist/sdk/semanticLayer/index.d.ts +10 -3
  213. package/dist/sdk/semanticLayer/index.js +2 -2
  214. package/dist/sdk/semanticLayer/types.d.cts +2 -2
  215. package/dist/sdk/semanticLayer/types.d.ts +2 -2
  216. package/dist/sdk/storage/index.cjs +12 -24
  217. package/dist/sdk/storage/index.cjs.map +1 -1
  218. package/dist/sdk/storage/index.d.cts +1 -1
  219. package/dist/sdk/storage/index.d.ts +1 -1
  220. package/dist/sdk/storage/index.js +12 -24
  221. package/dist/sdk/storage/index.js.map +1 -1
  222. package/dist/sdk/tag/index.d.cts +2 -2
  223. package/dist/sdk/tag/index.d.ts +2 -2
  224. package/dist/sdk/tag/types.d.cts +1 -1
  225. package/dist/sdk/tag/types.d.ts +1 -1
  226. package/dist/sdk/vault/index.d.cts +1 -1
  227. package/dist/sdk/vault/index.d.ts +1 -1
  228. package/dist/{semanticLayer-CKDVkU56.cjs → semanticLayer-D3NDh_QH.cjs} +115 -20
  229. package/dist/semanticLayer-D3NDh_QH.cjs.map +1 -0
  230. package/dist/{semanticLayer-pYy082Ju.js → semanticLayer-Ddg0LSnt.js} +110 -21
  231. package/dist/semanticLayer-Ddg0LSnt.js.map +1 -0
  232. package/dist/status/index.cjs +1 -1
  233. package/dist/status/index.js +1 -1
  234. package/dist/storage/index.cjs +4 -4
  235. package/dist/storage/index.d.cts +2 -2
  236. package/dist/storage/index.d.ts +2 -2
  237. package/dist/storage/index.js +4 -4
  238. package/dist/storage/types.d.cts +3 -3
  239. package/dist/storage/types.d.ts +3 -3
  240. package/dist/{storage-CZQHZcXG.js → storage-BkdjgtCU.js} +272 -134
  241. package/dist/storage-BkdjgtCU.js.map +1 -0
  242. package/dist/{storage-JinL1y1s.cjs → storage-CXQTTVXl.cjs} +272 -134
  243. package/dist/storage-CXQTTVXl.cjs.map +1 -0
  244. package/dist/{storageTable-C9crh4Ef.cjs → storageTable-BNOR2FCh.cjs} +137 -5
  245. package/dist/storageTable-BNOR2FCh.cjs.map +1 -0
  246. package/dist/{storageTable-DslXtqNL.js → storageTable-BldTNyEk.js} +102 -6
  247. package/dist/storageTable-BldTNyEk.js.map +1 -0
  248. package/dist/stream/index.cjs +3 -3
  249. package/dist/stream/index.js +3 -3
  250. package/dist/syncActions/index.cjs +4 -1
  251. package/dist/syncActions/index.d.cts +3 -2
  252. package/dist/syncActions/index.d.ts +3 -2
  253. package/dist/syncActions/index.js +2 -2
  254. package/dist/syncActions/types.d.cts +2 -2
  255. package/dist/syncActions/types.d.ts +2 -2
  256. package/dist/syncActions-BQ8kMgL6.js +1191 -0
  257. package/dist/syncActions-BQ8kMgL6.js.map +1 -0
  258. package/dist/syncActions-DyxNmbUR.cjs +1216 -0
  259. package/dist/syncActions-DyxNmbUR.cjs.map +1 -0
  260. package/dist/telemetry/index.cjs +3 -3
  261. package/dist/telemetry/index.js +3 -3
  262. package/dist/{types-DWiLcrxt.d.cts → types-04GTqleJ.d.cts} +3 -3
  263. package/dist/{types-DRCMBt89.d.ts → types-2Do0DZ60.d.ts} +3 -3
  264. package/dist/{types-Dtuvhm3K.d.cts → types-BWmLo73i.d.cts} +749 -186
  265. package/dist/{types-CQFOCQzk.d.ts → types-BaSlU0uo.d.ts} +510 -5
  266. package/dist/{types-DEzW1CfI.d.cts → types-BgHtMe8s.d.cts} +3 -3
  267. package/dist/{types-BiMahEK8.d.cts → types-BgVt8SUY.d.cts} +126 -62
  268. package/dist/{types-BS4jwuMi.d.ts → types-BhEx9iRx.d.ts} +3068 -621
  269. package/dist/{types-CMzQSHAQ.d.cts → types-BzPuxmaR.d.cts} +3 -3
  270. package/dist/{types-CKmTZSPG.d.ts → types-C0rVtqz2.d.ts} +126 -62
  271. package/dist/{types-Bl03Cg2n.d.cts → types-CAAgCRmE.d.cts} +31 -5
  272. package/dist/{types-BIECJYun.d.ts → types-CN6huo55.d.ts} +406 -5
  273. package/dist/{types-Cg14ncdV.d.ts → types-CV7jmgtX.d.ts} +3 -3
  274. package/dist/{types-CqwHP7mN.d.cts → types-CcYxlqtB.d.cts} +510 -5
  275. package/dist/{types-FwRmjsNN.d.ts → types-CigD_EF5.d.ts} +18 -6
  276. package/dist/{types-B_iLJlp4.d.ts → types-CwZgZqrA.d.ts} +31 -5
  277. package/dist/{types-BTK7Bv3n.d.cts → types-DgPt4LY_.d.cts} +406 -5
  278. package/dist/{types-bc-4z_gc.d.cts → types-DyArI_Jq.d.cts} +18 -6
  279. package/dist/{types-DekYAlA-.d.ts → types-QSchmyvO.d.ts} +3 -3
  280. package/dist/{types-DKc1gmd9.d.ts → types-R3AFJD6r.d.ts} +749 -186
  281. package/dist/{types-DDOa07rU.d.cts → types-sV9OaqTI.d.cts} +3068 -621
  282. package/dist/{validateConnectionStatus-BEYkQpu9.cjs → validateConnectionStatus-Ca1uEizv.cjs} +3 -3
  283. package/dist/{validateConnectionStatus-BEYkQpu9.cjs.map → validateConnectionStatus-Ca1uEizv.cjs.map} +1 -1
  284. package/dist/{validateConnectionStatus-BEGu8wXT.js → validateConnectionStatus-gFsBi5FV.js} +3 -3
  285. package/dist/{validateConnectionStatus-BEGu8wXT.js.map → validateConnectionStatus-gFsBi5FV.js.map} +1 -1
  286. package/dist/vault/index.cjs +4 -4
  287. package/dist/vault/index.js +4 -4
  288. package/package.json +7 -7
  289. package/surface/auth.md +7 -0
  290. package/surface/kaiAgent.md +4 -2
  291. package/surface/management.md +28 -13
  292. package/surface/metastore.md +4 -1
  293. package/surface/queue.md +1 -1
  294. package/surface/sdk.md +13 -8
  295. package/surface/storage.md +27 -24
  296. package/surface/syncActions.md +48 -1
  297. package/dist/authClient-BmuUo0J4.cjs.map +0 -1
  298. package/dist/authClient-CgcDGd30.js.map +0 -1
  299. package/dist/componentId-BJLfnaGc.js.map +0 -1
  300. package/dist/componentId-_IKXxICq.cjs.map +0 -1
  301. package/dist/createFetchClient-Cwp8max9.cjs.map +0 -1
  302. package/dist/createFetchClient-DXHQK63w.js.map +0 -1
  303. package/dist/index-DbLFwXgb.d.cts +0 -116
  304. package/dist/index-rwK7GcB2.d.ts +0 -116
  305. package/dist/kaiAgent-Dp20HLTh.js.map +0 -1
  306. package/dist/kaiAgent-QNoeVKPs.cjs.map +0 -1
  307. package/dist/management-CCY0IYnq.cjs.map +0 -1
  308. package/dist/management-DvmPiG64.js.map +0 -1
  309. package/dist/metastore-BycJxe7A.js.map +0 -1
  310. package/dist/metastore-XtWciCZT.cjs.map +0 -1
  311. package/dist/semanticLayer-CKDVkU56.cjs.map +0 -1
  312. package/dist/semanticLayer-pYy082Ju.js.map +0 -1
  313. package/dist/storage-CZQHZcXG.js.map +0 -1
  314. package/dist/storage-JinL1y1s.cjs.map +0 -1
  315. package/dist/storageTable-C9crh4Ef.cjs.map +0 -1
  316. package/dist/storageTable-DslXtqNL.js.map +0 -1
  317. package/dist/syncActions-ChNWuhYA.js +0 -646
  318. package/dist/syncActions-ChNWuhYA.js.map +0 -1
  319. package/dist/syncActions-mFlF16cl.cjs +0 -653
  320. package/dist/syncActions-mFlF16cl.cjs.map +0 -1
@@ -1,653 +0,0 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
- const require_createFetchClient = require("./createFetchClient-Cwp8max9.cjs");
3
- const require_SyncActionError = require("./SyncActionError-BG0zwchi.cjs");
4
- const require_ValidationError = require("./ValidationError-D65QU0uq.cjs");
5
- const require_createGenericFetchClient = require("./createGenericFetchClient-Dl9cqTvR.cjs");
6
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-BYqW-9tm.cjs");
7
- const require_auth = require("./auth-Dm0F2rOh.cjs");
8
- const require_componentId = require("./componentId-_IKXxICq.cjs");
9
- let zod = require("zod");
10
- zod = require_rolldown_runtime.__toESM(zod, 1);
11
- //#region src/clients/syncActions/utils/response.ts
12
- const asErrorBody = (data) => typeof data === "object" && data !== null ? data : null;
13
- const asString = (value) => typeof value === "string" && value ? value : void 0;
14
- const asNumber = (value) => typeof value === "number" ? value : void 0;
15
- /**
16
- * Fails a sync action on a non-2xx, or on a 2xx whose body has `status: 'error'`.
17
- *
18
- * - Throws: `coreFetch` only rethrows a returned `ApiError`.
19
- * - `SyncActionError` is not an `ApiError`, so retry / network-error handling skips it.
20
- */
21
- const syncActionValidateStatus = (apiResponse) => {
22
- const body = asErrorBody(apiResponse.data);
23
- if (body?.status === "error") throw new require_SyncActionError.SyncActionError(asString(body.message) ?? asString(body.error) ?? apiResponse.response.statusText, {
24
- exceptionId: asString(body.exceptionId),
25
- code: asNumber(body.code),
26
- data: apiResponse.data
27
- });
28
- return require_createFetchClient.defaultValidateStatus(apiResponse);
29
- };
30
- //#endregion
31
- //#region src/clients/syncActions/constants.ts
32
- const SyncAction = {
33
- DATA_APP_GIT_REPOSITORY: "git-repository",
34
- DATA_APP_ENTRYPOINTS: "data-app-entrypoints",
35
- DBT_COMPILE: "dbtCompile",
36
- DBT_RUN_RESULTS: "dbtRunResults",
37
- GIT_REPOSITORY: "gitRepository",
38
- ENROLL_MFA: "enrollMFA",
39
- FLOW_MIGRATION_PREVIEW: "preview",
40
- FLOW_MIGRATION_VALIDATE: "validate",
41
- LIST_ACTORS: "listActors",
42
- LIST_TASKS: "listTasks",
43
- TEST_LOOKER_CREDENTIALS: "testLookerCredentials",
44
- SSH_KEYS_GENERATE: "generate",
45
- ONEDRIVE_SEARCH: "search",
46
- ONEDRIVE_GET_WORKSHEETS: "getWorksheets",
47
- ONEDRIVE_CREATE_WORKBOOK: "createWorkbook",
48
- ONEDRIVE_CREATE_WORKSHEET: "createWorksheet"
49
- };
50
- //#endregion
51
- //#region src/clients/syncActions/schemas.ts
52
- /** The Keboola-side context every sync action carries; namespaces extend it with their own fields. */
53
- const syncActionContextSchema = zod.object({
54
- /** A numeric id or `"default"`; required so requests are self-describing. */
55
- branchId: zod.string().min(1, "Required"),
56
- /** Leave undefined to run the published version (not Docker `latest`); set only to pin a build. */
57
- tag: zod.string().optional(),
58
- mode: zod.enum(["run", "debug"]).optional()
59
- });
60
- /** The `/actions` body; each namespace validates its own `configData` shape. */
61
- const syncActionBodySchema = syncActionContextSchema.extend({
62
- componentId: zod.string().min(1, "Required"),
63
- action: zod.string().min(1, "Required"),
64
- configData: zod.record(zod.string(), zod.unknown())
65
- });
66
- //#endregion
67
- //#region src/clients/syncActions/apify/schemas.ts
68
- const apifyObjectsInputSchema = syncActionContextSchema.extend({ "#token": zod.string().min(1, "Required") });
69
- const apifyObjectsSchema = zod.array(zod.object({
70
- id: zod.string(),
71
- name: zod.string()
72
- }));
73
- //#endregion
74
- //#region src/clients/syncActions/apify/utils.ts
75
- /**
76
- * A slow Apify account makes the component answer `{ timeout: true }` on a 200 instead of the list —
77
- * a failure only this action knows how to spot, so it is checked before deferring to the shared
78
- * validation.
79
- */
80
- const apifyValidateStatus = (apiResponse) => {
81
- const data = apiResponse.data;
82
- if (typeof data === "object" && data !== null && "timeout" in data && data.timeout) throw new require_SyncActionError.SyncActionError("Timed out while loading data from Apify.", { data });
83
- return syncActionValidateStatus(apiResponse);
84
- };
85
- //#endregion
86
- //#region src/clients/syncActions/apify/apify.ts
87
- const createApify = (sendSyncAction) => {
88
- const _getObjects = async (action, input, signal) => {
89
- const { "#token": token, ...context } = require_ValidationError.parseOrThrow(apifyObjectsInputSchema, input);
90
- const data = await sendSyncAction({
91
- ...context,
92
- action,
93
- componentId: require_componentId.ComponentId.APIFY,
94
- configData: { parameters: { "#token": token } }
95
- }, {
96
- signal,
97
- validateStatus: apifyValidateStatus
98
- });
99
- return require_ValidationError.parseOrThrow(apifyObjectsSchema, data);
100
- };
101
- const getActors = (input, signal) => {
102
- return _getObjects(SyncAction.LIST_ACTORS, input, signal);
103
- };
104
- const getTasks = (input, signal) => {
105
- return _getObjects(SyncAction.LIST_TASKS, input, signal);
106
- };
107
- return {
108
- getActors,
109
- getTasks
110
- };
111
- };
112
- //#endregion
113
- //#region src/clients/syncActions/dbt/schemas.ts
114
- /** `componentId` is a plain string: every dbt transformation serves the same actions, so it selects nothing. */
115
- const dbtActionInputSchema = syncActionContextSchema.extend({
116
- componentId: zod.string().min(1, "Required"),
117
- configId: zod.string().min(1, "Required"),
118
- artifacts: zod.record(zod.string(), zod.unknown()).optional()
119
- });
120
- /**
121
- * Model file name (`orders.sql`) → compiled SQL, in the component's key order.
122
- *
123
- * - A never-run configuration fails with a `SyncActionError`, not an empty payload.
124
- * - A missing key defaults to empty; a present key of the wrong shape still fails.
125
- */
126
- const dbtCompiledSchema = zod.object({ compiled: zod.record(zod.string(), zod.string()).default({}) }).transform(({ compiled }) => compiled);
127
- /** `"Thread-1"` → `1`; an unparseable value falls back to `0` rather than failing the timeline. */
128
- const dbtThreadSchema = zod.string().transform((thread) => Number.parseInt(thread.replace(/^Thread-/, ""), 10)).pipe(zod.number().int().nonnegative()).catch(0);
129
- /** Omits `status` and `dependsOn`. */
130
- const dbtModelTimingSchema = zod.object({
131
- id: zod.string(),
132
- name: zod.string(),
133
- thread: dbtThreadSchema,
134
- /** ISO timestamps, left unparsed. */
135
- timeStarted: zod.string(),
136
- timeCompleted: zod.string()
137
- });
138
- /** A missing key defaults to empty, as in `dbtCompiledSchema`. */
139
- const dbtRunResultsSchema = zod.object({ modelTiming: zod.array(dbtModelTimingSchema).default([]) }).transform(({ modelTiming }) => modelTiming);
140
- //#endregion
141
- //#region src/clients/syncActions/dbt/utils.ts
142
- /**
143
- * Both dbt artifact actions read the *stored* configuration — `configId` is what they resolve it by,
144
- * so the payload carries no settings of its own. `artifacts` is the configuration's own artifacts
145
- * section, passed through untouched: it selects which run's artifacts the component picks up, and
146
- * omitting it leaves the component on its default (the latest run).
147
- */
148
- const buildDbtActionConfigData = ({ configId, artifacts }) => ({
149
- parameters: { configId },
150
- ...artifacts && { artifacts }
151
- });
152
- //#endregion
153
- //#region src/clients/syncActions/dbt/dbt.ts
154
- /** The dbt transformations' artifact actions — both read what the *last run* left behind. */
155
- const createDbt = (sendSyncAction) => {
156
- const sendDbtAction = (action, input, signal) => {
157
- const { componentId, configId, artifacts, ...context } = require_ValidationError.parseOrThrow(dbtActionInputSchema, input);
158
- return sendSyncAction({
159
- ...context,
160
- componentId,
161
- action,
162
- configData: buildDbtActionConfigData({
163
- configId,
164
- artifacts
165
- })
166
- }, { signal });
167
- };
168
- /** The compiled SQL of every model in the configuration. */
169
- const compile = async (input, signal) => {
170
- const data = await sendDbtAction(SyncAction.DBT_COMPILE, input, signal);
171
- return require_ValidationError.parseOrThrow(dbtCompiledSchema, data);
172
- };
173
- /** When each model of the last run started and finished, and on which worker. */
174
- const runResults = async (input, signal) => {
175
- const data = await sendDbtAction(SyncAction.DBT_RUN_RESULTS, input, signal);
176
- return require_ValidationError.parseOrThrow(dbtRunResultsSchema, data);
177
- };
178
- return {
179
- compile,
180
- runResults
181
- };
182
- };
183
- //#endregion
184
- //#region src/clients/syncActions/flowMigration/schemas.ts
185
- const flowMigrationInputSchema = syncActionContextSchema.extend({ orchestrationIds: zod.array(zod.string().min(1, "Required")) });
186
- const flowMigrationValidationResultSchema = zod.object({
187
- orchestrationId: zod.string(),
188
- orchestrationName: zod.string(),
189
- valid: zod.boolean(),
190
- issues: zod.array(zod.string())
191
- });
192
- /** The orchestration's configuration as the flow it would become; extra keys pass through. */
193
- const flowMigrationMigratedConfigurationSchema = zod.looseObject({
194
- phases: zod.array(zod.unknown()).optional(),
195
- tasks: zod.array(zod.unknown()).optional(),
196
- parameters: zod.unknown().optional()
197
- });
198
- /**
199
- * One orchestration's dry-run outcome.
200
- *
201
- * - `skipped`: it failed validation; `issues` says why.
202
- * - `failed`: building the flow threw; `error` carries the message.
203
- */
204
- const flowMigrationPreviewResultSchema = zod.object({
205
- orchestrationId: zod.string(),
206
- orchestrationName: zod.string(),
207
- status: zod.enum([
208
- "dry-run",
209
- "skipped",
210
- "failed"
211
- ]),
212
- issues: zod.array(zod.string()),
213
- changes: zod.array(zod.string()),
214
- error: zod.string().optional(),
215
- migratedConfiguration: flowMigrationMigratedConfigurationSchema.optional()
216
- });
217
- const flowMigrationValidationResultsSchema = zod.array(flowMigrationValidationResultSchema);
218
- const flowMigrationPreviewResultsSchema = zod.array(flowMigrationPreviewResultSchema);
219
- //#endregion
220
- //#region src/clients/syncActions/flowMigration/flowMigration.ts
221
- /** Orchestration → flow migration checks; one result per requested orchestration. */
222
- const createFlowMigration = (sendSyncAction) => {
223
- const validate = async (input, signal) => {
224
- const { orchestrationIds, ...context } = require_ValidationError.parseOrThrow(flowMigrationInputSchema, input);
225
- const data = await sendSyncAction({
226
- ...context,
227
- action: SyncAction.FLOW_MIGRATION_VALIDATE,
228
- componentId: require_componentId.ComponentId.FLOW_MIGRATION_TOOL,
229
- configData: { parameters: { orchestrationIds } }
230
- }, { signal });
231
- return require_ValidationError.parseOrThrow(flowMigrationValidationResultsSchema, data);
232
- };
233
- /** A dry run: nothing is written, and invalid orchestrations come back `skipped`. */
234
- const preview = async (input, signal) => {
235
- const { orchestrationIds, ...context } = require_ValidationError.parseOrThrow(flowMigrationInputSchema, input);
236
- const data = await sendSyncAction({
237
- ...context,
238
- action: SyncAction.FLOW_MIGRATION_PREVIEW,
239
- componentId: require_componentId.ComponentId.FLOW_MIGRATION_TOOL,
240
- configData: { parameters: {
241
- mode: "config",
242
- orchestrationIds
243
- } }
244
- }, { signal });
245
- return require_ValidationError.parseOrThrow(flowMigrationPreviewResultsSchema, data);
246
- };
247
- return {
248
- validate,
249
- preview
250
- };
251
- };
252
- //#endregion
253
- //#region src/clients/syncActions/git/constants.ts
254
- /**
255
- * Components whose git repository lives under `parameters.dataApp.git.repository` and that answer to
256
- * the `git-repository` action. They are the only ones serving `data-app-entrypoints`, and the only
257
- * ones accepting an SSH key.
258
- */
259
- const DATA_APP_FAMILY = [require_componentId.ComponentId.DATA_APPS, require_componentId.ComponentId.SANDBOXES];
260
- /**
261
- * Components whose git repository lives under `parameters.git.repo` and that answer to the
262
- * `gitRepository` action. They authenticate over HTTPS with a username and password only.
263
- *
264
- * Deliberately a list rather than "everything else": `listBranches` / `list_branches` /
265
- * `checkBranches` also exist on unrelated third-party components (`kds-team.app-custom-python`,
266
- * `keboola.app-transformation-migration`, `kds-team.app-sox-migration-checker`) under a different
267
- * contract. Those stay on the generic `sendSyncAction` escape hatch.
268
- */
269
- const DBT_FAMILY = [
270
- require_componentId.ComponentId.DBT_TEST_CORE_KEY_PAIR,
271
- require_componentId.ComponentId.DBT_TEST_REMOTE_SNOWFLAKE,
272
- require_componentId.ComponentId.DBT_TRANSFORMATION,
273
- require_componentId.ComponentId.DBT_TRANSFORMATION_LOCAL_BIGQUERY,
274
- require_componentId.ComponentId.DBT_TRANSFORMATION_REMOTE_BIGQUERY,
275
- require_componentId.ComponentId.DBT_TRANSFORMATION_REMOTE_MSSQL,
276
- require_componentId.ComponentId.DBT_TRANSFORMATION_REMOTE_POSTGRESQL,
277
- require_componentId.ComponentId.DBT_TRANSFORMATION_REMOTE_REDSHIFT,
278
- require_componentId.ComponentId.DBT_TRANSFORMATION_REMOTE_SNOWFLAKE
279
- ];
280
- const GIT_FAMILY = [...DATA_APP_FAMILY, ...DBT_FAMILY];
281
- const dataAppIds = new Set(DATA_APP_FAMILY);
282
- const isDataAppFamily = (componentId) => dataAppIds.has(componentId);
283
- //#endregion
284
- //#region src/clients/syncActions/git/schemas.ts
285
- const gitAuthSchema = zod.discriminatedUnion("type", [
286
- zod.object({ type: zod.literal("public") }),
287
- zod.object({
288
- type: zod.literal("password"),
289
- username: zod.string().min(1, "Required"),
290
- "#password": zod.string().min(1, "Required")
291
- }),
292
- zod.object({
293
- type: zod.literal("sshKey"),
294
- /** Ignored by the component: over SSH the user is always `git`. */
295
- username: zod.string().min(1, "Required").optional(),
296
- "#sshKey": zod.string().min(1, "Required")
297
- })
298
- ]);
299
- const gitInputSchema = syncActionContextSchema.extend({
300
- repositoryUrl: zod.string().min(1, "Required"),
301
- auth: gitAuthSchema.default({ type: "public" })
302
- });
303
- /**
304
- * **Takes no `branch` — do not add one.** The component clones with `-b <branch>`, so a stale one
305
- * would fail the branch listing. Zod strips it.
306
- */
307
- const getBranchesInputSchema = gitInputSchema.extend({ componentId: zod.enum(GIT_FAMILY) }).check((ctx) => {
308
- const { componentId, auth } = ctx.value;
309
- if (auth.type !== "sshKey" || isDataAppFamily(componentId)) return;
310
- ctx.issues.push({
311
- code: "custom",
312
- input: auth,
313
- path: ["auth"],
314
- message: `Component "${componentId}" authenticates with a password, not an SSH key.`
315
- });
316
- });
317
- /** Only the data-app family serves `data-app-entrypoints`. */
318
- const getEntrypointsInputSchema = gitInputSchema.extend({
319
- componentId: zod.enum(DATA_APP_FAMILY),
320
- /** The *git* branch (not `branchId`); omit for the repository default. `""` normalises to omitted. */
321
- branch: zod.string().optional().transform((branch) => branch || void 0)
322
- });
323
- /** Only `branch` is load-bearing; the rest falls back to `''` so one bad field can't fail the list. */
324
- const gitBranchSchema = zod.object({
325
- branch: zod.string(),
326
- sha: zod.string().catch(""),
327
- date: zod.string().catch(""),
328
- comment: zod.string().catch(""),
329
- author: zod.object({
330
- name: zod.string().catch(""),
331
- email: zod.string().catch("")
332
- }).catch({
333
- name: "",
334
- email: ""
335
- })
336
- });
337
- /** An array, or an index-keyed object with gaps (a server-filtered PHP array). */
338
- const gitBranchListSchema = zod.union([zod.array(gitBranchSchema), zod.record(zod.string(), gitBranchSchema)]).transform((branches) => Array.isArray(branches) ? branches : Object.values(branches));
339
- /**
340
- * - `repository.branches` is confirmed; the top-level position is accepted but unverified.
341
- * - A response with neither list is rejected, not read as no branches.
342
- */
343
- const gitBranchesSchema = zod.object({
344
- repository: zod.object({ branches: gitBranchListSchema.optional() }).optional(),
345
- branches: gitBranchListSchema.optional()
346
- }).check((ctx) => {
347
- if (ctx.value.branches ?? ctx.value.repository?.branches) return;
348
- ctx.issues.push({
349
- code: "custom",
350
- input: ctx.value,
351
- message: "The response carried no branch list."
352
- });
353
- }).transform(({ repository, branches }) => branches ?? repository?.branches ?? []);
354
- const gitEntrypointsSchema = zod.object({ entrypoints: zod.array(zod.string()) });
355
- //#endregion
356
- //#region src/clients/syncActions/git/utils.ts
357
- /** Every variant is already the shape the components read, minus the discriminator. */
358
- const toCredentials = (auth) => {
359
- const { type: _type, ...credentials } = auth;
360
- return credentials;
361
- };
362
- const toRevision = (rev) => rev.revision === "branch" ? { branch: rev.branch } : {};
363
- /** Data apps nest their repository a level deeper, and call the URL `repository`. */
364
- const buildDataAppConfigData = ({ repositoryUrl, auth, ...rev }) => ({ parameters: { dataApp: { git: {
365
- repository: repositoryUrl,
366
- ...toCredentials(auth),
367
- ...toRevision(rev)
368
- } } } });
369
- /** dbt transformations keep the same settings at the top of `parameters`, under `repo`. */
370
- const buildDbtConfigData = ({ repositoryUrl, auth, ...rev }) => ({ parameters: { git: {
371
- repo: repositoryUrl,
372
- ...toCredentials(auth),
373
- ...toRevision(rev)
374
- } } });
375
- //#endregion
376
- //#region src/clients/syncActions/git/git.ts
377
- /**
378
- * Git repository actions, across both component families that serve them — the data apps
379
- * (`git-repository`) and the dbt transformations (`gitRepository`). Which action name and which
380
- * `configData` shape a call uses is resolved from `componentId`; see `./constants`.
381
- */
382
- const createGit = (sendSyncAction) => {
383
- const getBranches = async (input, signal) => {
384
- const { componentId, repositoryUrl, auth, ...context } = require_ValidationError.parseOrThrow(getBranchesInputSchema, input);
385
- const isDataApp = isDataAppFamily(componentId);
386
- const action = isDataApp ? SyncAction.DATA_APP_GIT_REPOSITORY : SyncAction.GIT_REPOSITORY;
387
- const buildConfigData = isDataApp ? buildDataAppConfigData : buildDbtConfigData;
388
- const data = await sendSyncAction({
389
- ...context,
390
- componentId,
391
- action,
392
- configData: buildConfigData({
393
- repositoryUrl,
394
- auth,
395
- revision: "default"
396
- })
397
- }, { signal });
398
- return require_ValidationError.parseOrThrow(gitBranchesSchema, data);
399
- };
400
- const getEntrypoints = async (input, signal) => {
401
- const { componentId, repositoryUrl, auth, branch, ...context } = require_ValidationError.parseOrThrow(getEntrypointsInputSchema, input);
402
- const data = await sendSyncAction({
403
- ...context,
404
- componentId,
405
- action: SyncAction.DATA_APP_ENTRYPOINTS,
406
- configData: buildDataAppConfigData({
407
- repositoryUrl,
408
- auth,
409
- ...branch ? {
410
- revision: "branch",
411
- branch
412
- } : { revision: "default" }
413
- })
414
- }, { signal });
415
- return require_ValidationError.parseOrThrow(gitEntrypointsSchema, data);
416
- };
417
- return {
418
- getBranches,
419
- getEntrypoints
420
- };
421
- };
422
- //#endregion
423
- //#region src/clients/syncActions/looker/schemas.ts
424
- const testLookerCredentialsInputSchema = syncActionContextSchema.extend({
425
- credentialsId: zod.string().min(1, "Required"),
426
- "#token": zod.string().min(1, "Required"),
427
- host: zod.string().min(1, "Required")
428
- });
429
- /** The component answers with a status envelope only — there is no payload to model. */
430
- const lookerCredentialsResultSchema = zod.object({
431
- status: zod.string().optional(),
432
- message: zod.string().optional()
433
- });
434
- //#endregion
435
- //#region src/clients/syncActions/looker/looker.ts
436
- const createLooker = (sendSyncAction) => {
437
- /** Registers the project's Looker credentials; throws `SyncActionError` when Looker rejects them. */
438
- const testCredentials = async (input, signal) => {
439
- const { credentialsId, "#token": token, host, ...context } = require_ValidationError.parseOrThrow(testLookerCredentialsInputSchema, input);
440
- const data = await sendSyncAction({
441
- ...context,
442
- action: SyncAction.TEST_LOOKER_CREDENTIALS,
443
- componentId: require_componentId.ComponentId.WR_LOOKER_V2,
444
- configData: { parameters: { looker: {
445
- credentialsId,
446
- "#token": token,
447
- host
448
- } } }
449
- }, { signal });
450
- return require_ValidationError.parseOrThrow(lookerCredentialsResultSchema, data);
451
- };
452
- return { testCredentials };
453
- };
454
- //#endregion
455
- //#region src/clients/syncActions/utils/oauth.ts
456
- /** The OAuth broker's credentials for one configuration, under the keys the components read. */
457
- const oauthCredentialsSchema = zod.object({
458
- appKey: zod.string().min(1, "Required"),
459
- "#data": zod.string().min(1, "Required"),
460
- "#appSecret": zod.string().min(1, "Required")
461
- });
462
- /** The `configData.authorization` block every OAuth-backed component expects. */
463
- const buildOauthAuthorization = (credentials) => ({ oauth_api: { credentials } });
464
- //#endregion
465
- //#region src/clients/syncActions/oneDrive/schemas.ts
466
- const oneDriveInputSchema = syncActionContextSchema.extend({ credentials: oauthCredentialsSchema });
467
- const oneDriveSearchFilesInputSchema = oneDriveInputSchema.extend({ search: zod.string().min(1, "Required") });
468
- const oneDriveGetWorksheetsInputSchema = oneDriveInputSchema.extend({
469
- componentId: zod.enum([require_componentId.ComponentId.EX_ONEDRIVE, require_componentId.ComponentId.WR_ONEDRIVE]),
470
- driveId: zod.string().min(1, "Required"),
471
- fileId: zod.string().min(1, "Required")
472
- });
473
- const oneDriveCreateWorkbookInputSchema = oneDriveInputSchema.extend({ path: zod.string().min(1, "Required") });
474
- const oneDriveCreateWorksheetInputSchema = oneDriveInputSchema.extend({
475
- driveId: zod.string().min(1, "Required"),
476
- fileId: zod.string().min(1, "Required"),
477
- name: zod.string().min(1, "Required")
478
- });
479
- const oneDriveFileSchema = zod.object({
480
- driveId: zod.string(),
481
- fileId: zod.string(),
482
- name: zod.string(),
483
- /** `null` when the component resolved no folder for the file. */
484
- path: zod.string().nullable()
485
- });
486
- const oneDriveWorksheetSchema = zod.object({
487
- driveId: zod.string(),
488
- fileId: zod.string(),
489
- worksheetId: zod.string(),
490
- name: zod.string(),
491
- /** `name`, suffixed with ` (hidden)` for a hidden worksheet. */
492
- title: zod.string(),
493
- position: zod.number(),
494
- visible: zod.boolean()
495
- });
496
- const oneDriveSearchFilesResultSchema = zod.object({ files: zod.array(oneDriveFileSchema) });
497
- const oneDriveGetWorksheetsResultSchema = zod.object({ worksheets: zod.array(oneDriveWorksheetSchema) });
498
- const oneDriveCreateWorkbookResultSchema = zod.object({ file: zod.object({
499
- driveId: zod.string(),
500
- fileId: zod.string()
501
- }) });
502
- const oneDriveCreateWorksheetResultSchema = zod.object({ worksheet: zod.object({
503
- driveId: zod.string(),
504
- fileId: zod.string(),
505
- worksheetId: zod.string()
506
- }) });
507
- //#endregion
508
- //#region src/clients/syncActions/oneDrive/oneDrive.ts
509
- const createOneDrive = (sendSyncAction) => {
510
- const searchFiles = async (input, signal) => {
511
- const { credentials, search, ...context } = require_ValidationError.parseOrThrow(oneDriveSearchFilesInputSchema, input);
512
- const data = await sendSyncAction({
513
- ...context,
514
- action: SyncAction.ONEDRIVE_SEARCH,
515
- componentId: require_componentId.ComponentId.EX_ONEDRIVE,
516
- configData: {
517
- parameters: { workbook: { search } },
518
- authorization: buildOauthAuthorization(credentials)
519
- }
520
- }, { signal });
521
- return require_ValidationError.parseOrThrow(oneDriveSearchFilesResultSchema, data).files;
522
- };
523
- const getWorksheets = async (input, signal) => {
524
- const { credentials, driveId, fileId, ...context } = require_ValidationError.parseOrThrow(oneDriveGetWorksheetsInputSchema, input);
525
- const data = await sendSyncAction({
526
- ...context,
527
- action: SyncAction.ONEDRIVE_GET_WORKSHEETS,
528
- configData: {
529
- parameters: { workbook: {
530
- driveId,
531
- fileId
532
- } },
533
- authorization: buildOauthAuthorization(credentials)
534
- }
535
- }, { signal });
536
- return require_ValidationError.parseOrThrow(oneDriveGetWorksheetsResultSchema, data).worksheets;
537
- };
538
- /** Throws `SyncActionError` when a workbook already exists at `path`. */
539
- const createWorkbook = async (input, signal) => {
540
- const { credentials, path, ...context } = require_ValidationError.parseOrThrow(oneDriveCreateWorkbookInputSchema, input);
541
- const data = await sendSyncAction({
542
- ...context,
543
- action: SyncAction.ONEDRIVE_CREATE_WORKBOOK,
544
- componentId: require_componentId.ComponentId.WR_ONEDRIVE,
545
- configData: {
546
- parameters: { workbook: { path } },
547
- authorization: buildOauthAuthorization(credentials)
548
- }
549
- }, { signal });
550
- return require_ValidationError.parseOrThrow(oneDriveCreateWorkbookResultSchema, data).file;
551
- };
552
- /** Throws `SyncActionError` when the workbook already has a worksheet called `name`. */
553
- const createWorksheet = async (input, signal) => {
554
- const { credentials, driveId, fileId, name, ...context } = require_ValidationError.parseOrThrow(oneDriveCreateWorksheetInputSchema, input);
555
- const data = await sendSyncAction({
556
- ...context,
557
- action: SyncAction.ONEDRIVE_CREATE_WORKSHEET,
558
- componentId: require_componentId.ComponentId.WR_ONEDRIVE,
559
- configData: {
560
- parameters: {
561
- workbook: {
562
- driveId,
563
- fileId
564
- },
565
- worksheet: { name }
566
- },
567
- authorization: buildOauthAuthorization(credentials)
568
- }
569
- }, { signal });
570
- return require_ValidationError.parseOrThrow(oneDriveCreateWorksheetResultSchema, data).worksheet;
571
- };
572
- return {
573
- searchFiles,
574
- getWorksheets,
575
- createWorkbook,
576
- createWorksheet
577
- };
578
- };
579
- //#endregion
580
- //#region src/clients/syncActions/sshKeys/schemas.ts
581
- const sshKeyPairSchema = zod.object({
582
- status: zod.literal("success"),
583
- public: zod.string(),
584
- private: zod.string()
585
- });
586
- //#endregion
587
- //#region src/clients/syncActions/sshKeys/sshKeys.ts
588
- const createSshKeys = (sendSyncAction) => {
589
- /** Generates a new 4096-bit RSA key pair; the component keeps no copy. */
590
- const generate = async (input, signal) => {
591
- const data = await sendSyncAction({
592
- ...require_ValidationError.parseOrThrow(syncActionContextSchema, input),
593
- action: SyncAction.SSH_KEYS_GENERATE,
594
- componentId: require_componentId.ComponentId.SSH_KEYGEN_V2,
595
- configData: {}
596
- }, { signal });
597
- return require_ValidationError.parseOrThrow(sshKeyPairSchema, data);
598
- };
599
- return { generate };
600
- };
601
- //#endregion
602
- //#region src/clients/syncActions/syncActionsClient.ts
603
- const createSendSyncAction = (client) => {
604
- return async (body, options = {}) => {
605
- const { data } = await client.post("/actions", { body: require_ValidationError.parseOrThrow(syncActionBodySchema, body) }, options);
606
- return data;
607
- };
608
- };
609
- const createSyncActionsClient = ({ baseUrl, middlewares, auth }) => {
610
- const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
611
- baseUrl,
612
- middlewares,
613
- headers: require_auth.createAuthHeaders(auth),
614
- validateStatus: syncActionValidateStatus
615
- });
616
- const genericClient = require_createGenericFetchClient.createGenericFetchClient({
617
- baseUrl,
618
- middlewares
619
- });
620
- const sendSyncAction = createSendSyncAction(client);
621
- const enrollMFA = ({ email, ...rest }, signal) => {
622
- return sendSyncAction({
623
- ...rest,
624
- action: SyncAction.ENROLL_MFA,
625
- configData: { parameters: { user: { email } } }
626
- }, { signal });
627
- };
628
- const healthCheck = async (signal) => {
629
- const { data } = await genericClient.get("/health-check", {}, { signal });
630
- return data;
631
- };
632
- return {
633
- healthCheck,
634
- sendSyncAction,
635
- enrollMFA,
636
- apify: createApify(sendSyncAction),
637
- dbt: createDbt(sendSyncAction),
638
- flowMigration: createFlowMigration(sendSyncAction),
639
- git: createGit(sendSyncAction),
640
- looker: createLooker(sendSyncAction),
641
- oneDrive: createOneDrive(sendSyncAction),
642
- sshKeys: createSshKeys(sendSyncAction)
643
- };
644
- };
645
- //#endregion
646
- Object.defineProperty(exports, "createSyncActionsClient", {
647
- enumerable: true,
648
- get: function() {
649
- return createSyncActionsClient;
650
- }
651
- });
652
-
653
- //# sourceMappingURL=syncActions-mFlF16cl.cjs.map