@keboola/api-client 40.0.0 → 41.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 (56) hide show
  1. package/API-SURFACE.md +5 -1
  2. package/CHANGELOG.md +9 -0
  3. package/dist/{componentId-C6WZa_R1.js → componentId-BJLfnaGc.js} +3 -1
  4. package/dist/componentId-BJLfnaGc.js.map +1 -0
  5. package/dist/{componentId-57vjsa2i.cjs → componentId-_IKXxICq.cjs} +3 -1
  6. package/dist/componentId-_IKXxICq.cjs.map +1 -0
  7. package/dist/{configurations-BPKGGy-M.js → configurations-CF3xz7RB.js} +2 -2
  8. package/dist/{configurations-BPKGGy-M.js.map → configurations-CF3xz7RB.js.map} +1 -1
  9. package/dist/{configurations-IYyOvhI3.cjs → configurations-VlfQ_37Y.cjs} +2 -2
  10. package/dist/{configurations-IYyOvhI3.cjs.map → configurations-VlfQ_37Y.cjs.map} +1 -1
  11. package/dist/constants/index.cjs +1 -1
  12. package/dist/constants/index.d.cts +1 -1
  13. package/dist/constants/index.d.ts +1 -1
  14. package/dist/constants/index.js +1 -1
  15. package/dist/{index-C8gRRWHL.d.ts → index-B5w7WlaU.d.cts} +3 -1
  16. package/dist/{index-C8gRRWHL.d.cts → index-B5w7WlaU.d.ts} +3 -1
  17. package/dist/{index-BkqackZf.d.ts → index-CaaTOANF.d.ts} +29 -3
  18. package/dist/{index-CPu4Nezo.d.cts → index-DbLFwXgb.d.cts} +28 -2
  19. package/dist/{index-DXYASsPP.d.cts → index-cWp_V6K5.d.cts} +29 -3
  20. package/dist/{index-Dazy-meb.d.ts → index-rwK7GcB2.d.ts} +28 -2
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.d.cts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +2 -2
  25. package/dist/queryService/index.d.cts +1 -1
  26. package/dist/queryService/index.d.ts +1 -1
  27. package/dist/queue/index.d.cts +1 -1
  28. package/dist/queue/index.d.ts +1 -1
  29. package/dist/sdk/configurations/index.cjs +1 -1
  30. package/dist/sdk/configurations/index.d.cts +1 -1
  31. package/dist/sdk/configurations/index.d.ts +1 -1
  32. package/dist/sdk/configurations/index.js +1 -1
  33. package/dist/sdk/queryService/index.d.cts +1 -1
  34. package/dist/sdk/queryService/index.d.ts +1 -1
  35. package/dist/sdk/storage/index.d.cts +1 -1
  36. package/dist/sdk/storage/index.d.ts +1 -1
  37. package/dist/storage/index.d.cts +1 -1
  38. package/dist/storage/index.d.ts +1 -1
  39. package/dist/syncActions/index.cjs +1 -1
  40. package/dist/syncActions/index.d.cts +1 -1
  41. package/dist/syncActions/index.d.ts +1 -1
  42. package/dist/syncActions/index.js +1 -1
  43. package/dist/syncActions/types.d.cts +2 -2
  44. package/dist/syncActions/types.d.ts +2 -2
  45. package/dist/{syncActions-BmmoqZO_.js → syncActions-ChNWuhYA.js} +133 -3
  46. package/dist/syncActions-ChNWuhYA.js.map +1 -0
  47. package/dist/{syncActions-CtcLGQiy.cjs → syncActions-mFlF16cl.cjs} +133 -3
  48. package/dist/syncActions-mFlF16cl.cjs.map +1 -0
  49. package/dist/{types-BYM9Ptz5.d.ts → types-CQFOCQzk.d.ts} +139 -2
  50. package/dist/{types-CFeZCQ9p.d.cts → types-CqwHP7mN.d.cts} +139 -2
  51. package/package.json +1 -1
  52. package/surface/syncActions.md +7 -0
  53. package/dist/componentId-57vjsa2i.cjs.map +0 -1
  54. package/dist/componentId-C6WZa_R1.js.map +0 -1
  55. package/dist/syncActions-BmmoqZO_.js.map +0 -1
  56. package/dist/syncActions-CtcLGQiy.cjs.map +0 -1
@@ -5,7 +5,7 @@ const require_ValidationError = require("./ValidationError-D65QU0uq.cjs");
5
5
  const require_createGenericFetchClient = require("./createGenericFetchClient-Dl9cqTvR.cjs");
6
6
  const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-BYqW-9tm.cjs");
7
7
  const require_auth = require("./auth-Dm0F2rOh.cjs");
8
- const require_componentId = require("./componentId-57vjsa2i.cjs");
8
+ const require_componentId = require("./componentId-_IKXxICq.cjs");
9
9
  let zod = require("zod");
10
10
  zod = require_rolldown_runtime.__toESM(zod, 1);
11
11
  //#region src/clients/syncActions/utils/response.ts
@@ -41,7 +41,11 @@ const SyncAction = {
41
41
  LIST_ACTORS: "listActors",
42
42
  LIST_TASKS: "listTasks",
43
43
  TEST_LOOKER_CREDENTIALS: "testLookerCredentials",
44
- SSH_KEYS_GENERATE: "generate"
44
+ SSH_KEYS_GENERATE: "generate",
45
+ ONEDRIVE_SEARCH: "search",
46
+ ONEDRIVE_GET_WORKSHEETS: "getWorksheets",
47
+ ONEDRIVE_CREATE_WORKBOOK: "createWorkbook",
48
+ ONEDRIVE_CREATE_WORKSHEET: "createWorksheet"
45
49
  };
46
50
  //#endregion
47
51
  //#region src/clients/syncActions/schemas.ts
@@ -448,6 +452,131 @@ const createLooker = (sendSyncAction) => {
448
452
  return { testCredentials };
449
453
  };
450
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
451
580
  //#region src/clients/syncActions/sshKeys/schemas.ts
452
581
  const sshKeyPairSchema = zod.object({
453
582
  status: zod.literal("success"),
@@ -509,6 +638,7 @@ const createSyncActionsClient = ({ baseUrl, middlewares, auth }) => {
509
638
  flowMigration: createFlowMigration(sendSyncAction),
510
639
  git: createGit(sendSyncAction),
511
640
  looker: createLooker(sendSyncAction),
641
+ oneDrive: createOneDrive(sendSyncAction),
512
642
  sshKeys: createSshKeys(sendSyncAction)
513
643
  };
514
644
  };
@@ -520,4 +650,4 @@ Object.defineProperty(exports, "createSyncActionsClient", {
520
650
  }
521
651
  });
522
652
 
523
- //# sourceMappingURL=syncActions-CtcLGQiy.cjs.map
653
+ //# sourceMappingURL=syncActions-mFlF16cl.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncActions-mFlF16cl.cjs","names":["SyncActionError","defaultValidateStatus","z","z","SyncActionError","parseOrThrow","ComponentId","z","parseOrThrow","z","parseOrThrow","ComponentId","ComponentId","z","parseOrThrow","z","parseOrThrow","ComponentId","z","z","ComponentId","parseOrThrow","ComponentId","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/flowMigration/schemas.ts","../src/clients/syncActions/flowMigration/flowMigration.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/utils/oauth.ts","../src/clients/syncActions/oneDrive/schemas.ts","../src/clients/syncActions/oneDrive/oneDrive.ts","../src/clients/syncActions/sshKeys/schemas.ts","../src/clients/syncActions/sshKeys/sshKeys.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 * Fails a sync action on a non-2xx, or on a 2xx whose body has `status: 'error'`.\n *\n * - Throws: `coreFetch` only rethrows a returned `ApiError`.\n * - `SyncActionError` is not an `ApiError`, so retry / network-error handling skips it.\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 FLOW_MIGRATION_PREVIEW: 'preview',\n FLOW_MIGRATION_VALIDATE: 'validate',\n LIST_ACTORS: 'listActors',\n LIST_TASKS: 'listTasks',\n TEST_LOOKER_CREDENTIALS: 'testLookerCredentials',\n SSH_KEYS_GENERATE: 'generate',\n ONEDRIVE_SEARCH: 'search',\n ONEDRIVE_GET_WORKSHEETS: 'getWorksheets',\n ONEDRIVE_CREATE_WORKBOOK: 'createWorkbook',\n ONEDRIVE_CREATE_WORKSHEET: 'createWorksheet',\n};\n","import * as z from 'zod';\n\n/** The Keboola-side context every sync action carries; namespaces extend it with their own fields. */\nexport const syncActionContextSchema = z.object({\n /** A numeric id or `\"default\"`; required so requests are self-describing. */\n branchId: z.string().min(1, 'Required'),\n /** Leave undefined to run the published version (not Docker `latest`); set only to pin a build. */\n tag: z.string().optional(),\n mode: z.enum(['run', 'debug']).optional(),\n});\n\n/** The `/actions` body; each namespace validates its own `configData` shape. */\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/** `componentId` is a plain string: every dbt transformation serves the same actions, so it selects nothing. */\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 * Model file name (`orders.sql`) → compiled SQL, in the component's key order.\n *\n * - A never-run configuration fails with a `SyncActionError`, not an empty payload.\n * - A missing key defaults to empty; a present key of the wrong shape still fails.\n */\nexport const dbtCompiledSchema = z\n .object({ compiled: z.record(z.string(), z.string()).default({}) })\n .transform(({ compiled }) => compiled);\n\n/** `\"Thread-1\"` → `1`; an unparseable value falls back to `0` rather than failing the timeline. */\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/** Omits `status` and `dependsOn`. */\nexport const dbtModelTimingSchema = z.object({\n id: z.string(),\n name: z.string(),\n thread: dbtThreadSchema,\n /** ISO timestamps, left unparsed. */\n timeStarted: z.string(),\n timeCompleted: z.string(),\n});\n\n/** A missing key defaults to empty, as in `dbtCompiledSchema`. */\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 * as z from 'zod';\n\nimport { syncActionContextSchema } from '../schemas';\n\nexport const flowMigrationInputSchema = syncActionContextSchema.extend({\n orchestrationIds: z.array(z.string().min(1, 'Required')),\n});\n\nexport const flowMigrationValidationResultSchema = z.object({\n orchestrationId: z.string(),\n orchestrationName: z.string(),\n valid: z.boolean(),\n issues: z.array(z.string()),\n});\n\n/** The orchestration's configuration as the flow it would become; extra keys pass through. */\nconst flowMigrationMigratedConfigurationSchema = z.looseObject({\n phases: z.array(z.unknown()).optional(),\n tasks: z.array(z.unknown()).optional(),\n parameters: z.unknown().optional(),\n});\n\n/**\n * One orchestration's dry-run outcome.\n *\n * - `skipped`: it failed validation; `issues` says why.\n * - `failed`: building the flow threw; `error` carries the message.\n */\nexport const flowMigrationPreviewResultSchema = z.object({\n orchestrationId: z.string(),\n orchestrationName: z.string(),\n status: z.enum(['dry-run', 'skipped', 'failed']),\n issues: z.array(z.string()),\n changes: z.array(z.string()),\n error: z.string().optional(),\n migratedConfiguration: flowMigrationMigratedConfigurationSchema.optional(),\n});\n\nexport const flowMigrationValidationResultsSchema = z.array(flowMigrationValidationResultSchema);\nexport const flowMigrationPreviewResultsSchema = z.array(flowMigrationPreviewResultSchema);\n\nexport type FlowMigrationInput = z.infer<typeof flowMigrationInputSchema>;\nexport type FlowMigrationValidationResult = z.infer<typeof flowMigrationValidationResultSchema>;\nexport type FlowMigrationPreviewResult = z.infer<typeof flowMigrationPreviewResultSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport {\n type FlowMigrationInput,\n flowMigrationInputSchema,\n flowMigrationPreviewResultsSchema,\n flowMigrationValidationResultsSchema,\n} from './schemas';\n\n/** Orchestration → flow migration checks; one result per requested orchestration. */\nexport const createFlowMigration = (sendSyncAction: SendSyncAction) => {\n const validate = async (input: FlowMigrationInput, signal?: AbortSignal) => {\n const { orchestrationIds, ...context } = parseOrThrow(flowMigrationInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.FLOW_MIGRATION_VALIDATE,\n componentId: ComponentId.FLOW_MIGRATION_TOOL,\n configData: { parameters: { orchestrationIds } },\n },\n { signal },\n );\n\n return parseOrThrow(flowMigrationValidationResultsSchema, data);\n };\n\n /** A dry run: nothing is written, and invalid orchestrations come back `skipped`. */\n const preview = async (input: FlowMigrationInput, signal?: AbortSignal) => {\n const { orchestrationIds, ...context } = parseOrThrow(flowMigrationInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.FLOW_MIGRATION_PREVIEW,\n componentId: ComponentId.FLOW_MIGRATION_TOOL,\n configData: { parameters: { mode: 'config', orchestrationIds } },\n },\n { signal },\n );\n\n return parseOrThrow(flowMigrationPreviewResultsSchema, data);\n };\n\n return { validate, preview };\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 /** Ignored by the component: over SSH the user is always `git`. */\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 * **Takes no `branch` — do not add one.** The component clones with `-b <branch>`, so a stale one\n * would fail the branch listing. Zod strips it.\n */\nexport const getBranchesInputSchema = gitInputSchema\n .extend({ componentId: z.enum(GIT_FAMILY) })\n .check((ctx) => {\n const { componentId, auth } = ctx.value;\n\n // The types can't vary auth by family: dbt clones over HTTPS with a password, no SSH key.\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`. */\nexport const getEntrypointsInputSchema = gitInputSchema.extend({\n componentId: z.enum(DATA_APP_FAMILY),\n /** The *git* branch (not `branchId`); omit for the repository default. `\"\"` normalises to omitted. */\n branch: z\n .string()\n .optional()\n .transform((branch) => branch || undefined),\n});\n\n/** Only `branch` is load-bearing; the rest falls back to `''` so one bad field can't fail the list. */\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/** An array, or an index-keyed object with gaps (a server-filtered PHP array). */\nconst gitBranchListSchema = z\n .union([z.array(gitBranchSchema), z.record(z.string(), gitBranchSchema)])\n .transform((branches) => (Array.isArray(branches) ? branches : Object.values(branches)));\n\n/**\n * - `repository.branches` is confirmed; the top-level position is accepted but unverified.\n * - A response with neither list is rejected, not read as no 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.\n *\n * - `default` — no `-b`; branch listing must use it, as a stale pinned branch fails the listing.\n * - `branch` — `git clone -b <branch>`.\n */\ntype GitRevision = { revision: 'default' } | { revision: 'branch'; branch: string };\n\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 * as z from 'zod';\n\n/** The OAuth broker's credentials for one configuration, under the keys the components read. */\nexport const oauthCredentialsSchema = z.object({\n appKey: z.string().min(1, 'Required'),\n '#data': z.string().min(1, 'Required'),\n '#appSecret': z.string().min(1, 'Required'),\n});\n\nexport type OauthCredentials = z.infer<typeof oauthCredentialsSchema>;\n\n/** The `configData.authorization` block every OAuth-backed component expects. */\nexport const buildOauthAuthorization = (credentials: OauthCredentials) => ({\n oauth_api: { credentials },\n});\n","import * as z from 'zod';\n\nimport { ComponentId } from '../../../constants';\nimport { syncActionContextSchema } from '../schemas';\nimport { oauthCredentialsSchema } from '../utils/oauth';\n\nconst oneDriveInputSchema = syncActionContextSchema.extend({\n credentials: oauthCredentialsSchema,\n});\n\nexport const oneDriveSearchFilesInputSchema = oneDriveInputSchema.extend({\n search: z.string().min(1, 'Required'),\n});\n\nexport const oneDriveGetWorksheetsInputSchema = oneDriveInputSchema.extend({\n componentId: z.enum([ComponentId.EX_ONEDRIVE, ComponentId.WR_ONEDRIVE]),\n driveId: z.string().min(1, 'Required'),\n fileId: z.string().min(1, 'Required'),\n});\n\nexport const oneDriveCreateWorkbookInputSchema = oneDriveInputSchema.extend({\n path: z.string().min(1, 'Required'),\n});\n\nexport const oneDriveCreateWorksheetInputSchema = oneDriveInputSchema.extend({\n driveId: z.string().min(1, 'Required'),\n fileId: z.string().min(1, 'Required'),\n name: z.string().min(1, 'Required'),\n});\n\nconst oneDriveFileSchema = z.object({\n driveId: z.string(),\n fileId: z.string(),\n name: z.string(),\n /** `null` when the component resolved no folder for the file. */\n path: z.string().nullable(),\n});\n\nconst oneDriveWorksheetSchema = z.object({\n driveId: z.string(),\n fileId: z.string(),\n worksheetId: z.string(),\n name: z.string(),\n /** `name`, suffixed with ` (hidden)` for a hidden worksheet. */\n title: z.string(),\n position: z.number(),\n visible: z.boolean(),\n});\n\nexport const oneDriveSearchFilesResultSchema = z.object({\n files: z.array(oneDriveFileSchema),\n});\n\nexport const oneDriveGetWorksheetsResultSchema = z.object({\n worksheets: z.array(oneDriveWorksheetSchema),\n});\n\nexport const oneDriveCreateWorkbookResultSchema = z.object({\n file: z.object({\n driveId: z.string(),\n fileId: z.string(),\n }),\n});\n\nexport const oneDriveCreateWorksheetResultSchema = z.object({\n worksheet: z.object({\n driveId: z.string(),\n fileId: z.string(),\n worksheetId: z.string(),\n }),\n});\n\nexport type OneDriveSearchFilesInput = z.infer<typeof oneDriveSearchFilesInputSchema>;\nexport type OneDriveGetWorksheetsInput = z.infer<typeof oneDriveGetWorksheetsInputSchema>;\nexport type OneDriveCreateWorkbookInput = z.infer<typeof oneDriveCreateWorkbookInputSchema>;\nexport type OneDriveCreateWorksheetInput = z.infer<typeof oneDriveCreateWorksheetInputSchema>;\nexport type OneDriveFile = z.infer<typeof oneDriveFileSchema>;\nexport type OneDriveWorksheet = z.infer<typeof oneDriveWorksheetSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport type { SendSyncAction } from '../syncActionsClient';\nimport { buildOauthAuthorization } from '../utils/oauth';\n\nimport {\n type OneDriveCreateWorkbookInput,\n oneDriveCreateWorkbookInputSchema,\n oneDriveCreateWorkbookResultSchema,\n type OneDriveCreateWorksheetInput,\n oneDriveCreateWorksheetInputSchema,\n oneDriveCreateWorksheetResultSchema,\n type OneDriveGetWorksheetsInput,\n oneDriveGetWorksheetsInputSchema,\n oneDriveGetWorksheetsResultSchema,\n type OneDriveSearchFilesInput,\n oneDriveSearchFilesInputSchema,\n oneDriveSearchFilesResultSchema,\n} from './schemas';\n\nexport const createOneDrive = (sendSyncAction: SendSyncAction) => {\n const searchFiles = async (input: OneDriveSearchFilesInput, signal?: AbortSignal) => {\n const { credentials, search, ...context } = parseOrThrow(oneDriveSearchFilesInputSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.ONEDRIVE_SEARCH,\n componentId: ComponentId.EX_ONEDRIVE,\n configData: {\n parameters: { workbook: { search } },\n authorization: buildOauthAuthorization(credentials),\n },\n },\n { signal },\n );\n\n return parseOrThrow(oneDriveSearchFilesResultSchema, data).files;\n };\n\n const getWorksheets = async (input: OneDriveGetWorksheetsInput, signal?: AbortSignal) => {\n const { credentials, driveId, fileId, ...context } = parseOrThrow(\n oneDriveGetWorksheetsInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.ONEDRIVE_GET_WORKSHEETS,\n configData: {\n parameters: { workbook: { driveId, fileId } },\n authorization: buildOauthAuthorization(credentials),\n },\n },\n { signal },\n );\n\n return parseOrThrow(oneDriveGetWorksheetsResultSchema, data).worksheets;\n };\n\n /** Throws `SyncActionError` when a workbook already exists at `path`. */\n const createWorkbook = async (input: OneDriveCreateWorkbookInput, signal?: AbortSignal) => {\n const { credentials, path, ...context } = parseOrThrow(\n oneDriveCreateWorkbookInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.ONEDRIVE_CREATE_WORKBOOK,\n componentId: ComponentId.WR_ONEDRIVE,\n configData: {\n parameters: { workbook: { path } },\n authorization: buildOauthAuthorization(credentials),\n },\n },\n { signal },\n );\n\n return parseOrThrow(oneDriveCreateWorkbookResultSchema, data).file;\n };\n\n /** Throws `SyncActionError` when the workbook already has a worksheet called `name`. */\n const createWorksheet = async (input: OneDriveCreateWorksheetInput, signal?: AbortSignal) => {\n const { credentials, driveId, fileId, name, ...context } = parseOrThrow(\n oneDriveCreateWorksheetInputSchema,\n input,\n );\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.ONEDRIVE_CREATE_WORKSHEET,\n componentId: ComponentId.WR_ONEDRIVE,\n configData: {\n parameters: { workbook: { driveId, fileId }, worksheet: { name } },\n authorization: buildOauthAuthorization(credentials),\n },\n },\n { signal },\n );\n\n return parseOrThrow(oneDriveCreateWorksheetResultSchema, data).worksheet;\n };\n\n return { searchFiles, getWorksheets, createWorkbook, createWorksheet };\n};\n","import * as z from 'zod';\n\nexport const sshKeyPairSchema = z.object({\n status: z.literal('success'),\n public: z.string(),\n private: z.string(),\n});\n\nexport type SshKeyPair = z.infer<typeof sshKeyPairSchema>;\n","import { ComponentId } from '../../../constants';\nimport { parseOrThrow } from '../../../errors';\nimport { SyncAction } from '../constants';\nimport { type SyncActionContext, syncActionContextSchema } from '../schemas';\nimport type { SendSyncAction } from '../syncActionsClient';\n\nimport { sshKeyPairSchema } from './schemas';\n\nexport const createSshKeys = (sendSyncAction: SendSyncAction) => {\n /** Generates a new 4096-bit RSA key pair; the component keeps no copy. */\n const generate = async (input: SyncActionContext, signal?: AbortSignal) => {\n const context = parseOrThrow(syncActionContextSchema, input);\n\n const data = await sendSyncAction(\n {\n ...context,\n action: SyncAction.SSH_KEYS_GENERATE,\n componentId: ComponentId.SSH_KEYGEN_V2,\n configData: {},\n },\n { signal },\n );\n\n return parseOrThrow(sshKeyPairSchema, data);\n };\n\n return { generate };\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 { createFlowMigration } from './flowMigration';\nimport { createGit } from './git';\nimport { createLooker } from './looker';\nimport { createOneDrive } from './oneDrive';\nimport { type SyncActionBody, syncActionBodySchema } from './schemas';\nimport { createSshKeys } from './sshKeys';\nimport type { EnrollMFAInput, PostActionsBodyRaw } from './types';\n\nexport type SendSyncActionOptions = {\n signal?: AbortSignal;\n /** Replaces `syncActionValidateStatus` for this request; delegate to it for anything else. */\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 // Generated `configData: Record<string, never>` is unsatisfiable; the schema is the contract.\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 flowMigration: createFlowMigration(sendSyncAction),\n git: createGit(sendSyncAction),\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9E,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,eAAe,oBAAoB,cAAc;EACjD,KAAK,UAAU,cAAc;EAC7B,QAAQ,aAAa,cAAc;EACnC,UAAU,eAAe,cAAc;EACvC,SAAS,cAAc,cAAc;CACvC;AACF"}
@@ -648,6 +648,124 @@ declare const lookerCredentialsResultSchema: z$1.ZodObject<{
648
648
  type TestLookerCredentialsInput = z$1.infer<typeof testLookerCredentialsInputSchema>;
649
649
  type LookerCredentialsResult = z$1.infer<typeof lookerCredentialsResultSchema>;
650
650
  //#endregion
651
+ //#region src/clients/syncActions/oneDrive/schemas.d.ts
652
+ declare const oneDriveSearchFilesInputSchema: z$1.ZodObject<{
653
+ branchId: z$1.ZodString;
654
+ tag: z$1.ZodOptional<z$1.ZodString>;
655
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
656
+ debug: "debug";
657
+ run: "run";
658
+ }>>;
659
+ credentials: z$1.ZodObject<{
660
+ appKey: z$1.ZodString;
661
+ '#data': z$1.ZodString;
662
+ '#appSecret': z$1.ZodString;
663
+ }, z$1.core.$strip>;
664
+ search: z$1.ZodString;
665
+ }, z$1.core.$strip>;
666
+ declare const oneDriveGetWorksheetsInputSchema: z$1.ZodObject<{
667
+ branchId: z$1.ZodString;
668
+ tag: z$1.ZodOptional<z$1.ZodString>;
669
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
670
+ debug: "debug";
671
+ run: "run";
672
+ }>>;
673
+ credentials: z$1.ZodObject<{
674
+ appKey: z$1.ZodString;
675
+ '#data': z$1.ZodString;
676
+ '#appSecret': z$1.ZodString;
677
+ }, z$1.core.$strip>;
678
+ componentId: z$1.ZodEnum<{
679
+ "keboola.ex-onedrive": "keboola.ex-onedrive";
680
+ "keboola.wr-onedrive": "keboola.wr-onedrive";
681
+ }>;
682
+ driveId: z$1.ZodString;
683
+ fileId: z$1.ZodString;
684
+ }, z$1.core.$strip>;
685
+ declare const oneDriveCreateWorkbookInputSchema: z$1.ZodObject<{
686
+ branchId: z$1.ZodString;
687
+ tag: z$1.ZodOptional<z$1.ZodString>;
688
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
689
+ debug: "debug";
690
+ run: "run";
691
+ }>>;
692
+ credentials: z$1.ZodObject<{
693
+ appKey: z$1.ZodString;
694
+ '#data': z$1.ZodString;
695
+ '#appSecret': z$1.ZodString;
696
+ }, z$1.core.$strip>;
697
+ path: z$1.ZodString;
698
+ }, z$1.core.$strip>;
699
+ declare const oneDriveCreateWorksheetInputSchema: z$1.ZodObject<{
700
+ branchId: z$1.ZodString;
701
+ tag: z$1.ZodOptional<z$1.ZodString>;
702
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
703
+ debug: "debug";
704
+ run: "run";
705
+ }>>;
706
+ credentials: z$1.ZodObject<{
707
+ appKey: z$1.ZodString;
708
+ '#data': z$1.ZodString;
709
+ '#appSecret': z$1.ZodString;
710
+ }, z$1.core.$strip>;
711
+ driveId: z$1.ZodString;
712
+ fileId: z$1.ZodString;
713
+ name: z$1.ZodString;
714
+ }, z$1.core.$strip>;
715
+ declare const oneDriveFileSchema: z$1.ZodObject<{
716
+ driveId: z$1.ZodString;
717
+ fileId: z$1.ZodString;
718
+ name: z$1.ZodString;
719
+ path: z$1.ZodNullable<z$1.ZodString>;
720
+ }, z$1.core.$strip>;
721
+ declare const oneDriveWorksheetSchema: z$1.ZodObject<{
722
+ driveId: z$1.ZodString;
723
+ fileId: z$1.ZodString;
724
+ worksheetId: z$1.ZodString;
725
+ name: z$1.ZodString;
726
+ title: z$1.ZodString;
727
+ position: z$1.ZodNumber;
728
+ visible: z$1.ZodBoolean;
729
+ }, z$1.core.$strip>;
730
+ declare const oneDriveSearchFilesResultSchema: z$1.ZodObject<{
731
+ files: z$1.ZodArray<z$1.ZodObject<{
732
+ driveId: z$1.ZodString;
733
+ fileId: z$1.ZodString;
734
+ name: z$1.ZodString;
735
+ path: z$1.ZodNullable<z$1.ZodString>;
736
+ }, z$1.core.$strip>>;
737
+ }, z$1.core.$strip>;
738
+ declare const oneDriveGetWorksheetsResultSchema: z$1.ZodObject<{
739
+ worksheets: z$1.ZodArray<z$1.ZodObject<{
740
+ driveId: z$1.ZodString;
741
+ fileId: z$1.ZodString;
742
+ worksheetId: z$1.ZodString;
743
+ name: z$1.ZodString;
744
+ title: z$1.ZodString;
745
+ position: z$1.ZodNumber;
746
+ visible: z$1.ZodBoolean;
747
+ }, z$1.core.$strip>>;
748
+ }, z$1.core.$strip>;
749
+ declare const oneDriveCreateWorkbookResultSchema: z$1.ZodObject<{
750
+ file: z$1.ZodObject<{
751
+ driveId: z$1.ZodString;
752
+ fileId: z$1.ZodString;
753
+ }, z$1.core.$strip>;
754
+ }, z$1.core.$strip>;
755
+ declare const oneDriveCreateWorksheetResultSchema: z$1.ZodObject<{
756
+ worksheet: z$1.ZodObject<{
757
+ driveId: z$1.ZodString;
758
+ fileId: z$1.ZodString;
759
+ worksheetId: z$1.ZodString;
760
+ }, z$1.core.$strip>;
761
+ }, z$1.core.$strip>;
762
+ type OneDriveSearchFilesInput = z$1.infer<typeof oneDriveSearchFilesInputSchema>;
763
+ type OneDriveGetWorksheetsInput = z$1.infer<typeof oneDriveGetWorksheetsInputSchema>;
764
+ type OneDriveCreateWorkbookInput = z$1.infer<typeof oneDriveCreateWorkbookInputSchema>;
765
+ type OneDriveCreateWorksheetInput = z$1.infer<typeof oneDriveCreateWorksheetInputSchema>;
766
+ type OneDriveFile = z$1.infer<typeof oneDriveFileSchema>;
767
+ type OneDriveWorksheet = z$1.infer<typeof oneDriveWorksheetSchema>;
768
+ //#endregion
651
769
  //#region src/clients/syncActions/sshKeys/schemas.d.ts
652
770
  declare const sshKeyPairSchema: z$1.ZodObject<{
653
771
  status: z$1.ZodLiteral<"success">;
@@ -656,6 +774,25 @@ declare const sshKeyPairSchema: z$1.ZodObject<{
656
774
  }, z$1.core.$strip>;
657
775
  type SshKeyPair = z$1.infer<typeof sshKeyPairSchema>;
658
776
  //#endregion
777
+ //#region src/clients/syncActions/utils/oauth.d.ts
778
+ /** The OAuth broker's credentials for one configuration, under the keys the components read. */
779
+ declare const oauthCredentialsSchema: z$1.ZodObject<{
780
+ appKey: z$1.ZodString;
781
+ '#data': z$1.ZodString;
782
+ '#appSecret': z$1.ZodString;
783
+ }, z$1.core.$strip>;
784
+ type OauthCredentials = z$1.infer<typeof oauthCredentialsSchema>;
785
+ /** The `configData.authorization` block every OAuth-backed component expects. */
786
+ declare const buildOauthAuthorization: (credentials: OauthCredentials) => {
787
+ oauth_api: {
788
+ credentials: {
789
+ appKey: string;
790
+ '#data': string;
791
+ '#appSecret': string;
792
+ };
793
+ };
794
+ };
795
+ //#endregion
659
796
  //#region src/clients/syncActions/types.d.ts
660
797
  /**
661
798
  * The generated request body, kept only so `sendSyncAction` can cast to what `openapi-fetch`
@@ -667,5 +804,5 @@ type EnrollMFAInput = Omit<SyncActionBody, 'action' | 'configData'> & {
667
804
  email: string;
668
805
  };
669
806
  //#endregion
670
- export { flowMigrationValidationResultSchema as A, ApifyObjectsInput as B, isDataAppFamily as C, flowMigrationInputSchema as D, FlowMigrationValidationResult as E, dbtActionInputSchema as F, SyncActionContext as G, apifyObjectsSchema as H, dbtCompiledSchema as I, syncActionBodySchema as K, dbtModelTimingSchema as L, DbtActionInput as M, DbtCompiled as N, flowMigrationPreviewResultSchema as O, DbtModelTiming as P, dbtRunResultsSchema as R, GitComponentId as S, FlowMigrationPreviewResult as T, paths as U, apifyObjectsInputSchema as V, SyncActionBody as W, gitBranchesSchema as _, LookerCredentialsResult as a, DataAppComponentId as b, testLookerCredentialsInputSchema as c, GitAuth as d, GitBranch as f, gitAuthSchema as g, getEntrypointsInputSchema as h, sshKeyPairSchema as i, flowMigrationValidationResultsSchema as j, flowMigrationPreviewResultsSchema as k, GetBranchesInput as l, getBranchesInputSchema as m, PostActionsBodyRaw as n, TestLookerCredentialsInput as o, GitEntrypoints as p, syncActionContextSchema as q, SshKeyPair as r, lookerCredentialsResultSchema as s, EnrollMFAInput as t, GetEntrypointsInput as u, gitEntrypointsSchema as v, FlowMigrationInput as w, GIT_FAMILY as x, DATA_APP_FAMILY as y, ApifyObject as z };
671
- //# sourceMappingURL=types-BYM9Ptz5.d.ts.map
807
+ export { dbtCompiledSchema as $, GitEntrypoints as A, isDataAppFamily as B, TestLookerCredentialsInput as C, GetEntrypointsInput as D, GetBranchesInput as E, gitEntrypointsSchema as F, flowMigrationPreviewResultSchema as G, FlowMigrationPreviewResult as H, DATA_APP_FAMILY as I, flowMigrationValidationResultsSchema as J, flowMigrationPreviewResultsSchema as K, DataAppComponentId as L, getEntrypointsInputSchema as M, gitAuthSchema as N, GitAuth as O, gitBranchesSchema as P, dbtActionInputSchema as Q, GIT_FAMILY as R, LookerCredentialsResult as S, testLookerCredentialsInputSchema as T, FlowMigrationValidationResult as U, FlowMigrationInput as V, flowMigrationInputSchema as W, DbtCompiled as X, DbtActionInput as Y, DbtModelTiming as Z, oneDriveCreateWorksheetResultSchema as _, oauthCredentialsSchema as a, apifyObjectsSchema as at, oneDriveSearchFilesInputSchema as b, OneDriveCreateWorkbookInput as c, SyncActionContext as ct, OneDriveGetWorksheetsInput as d, dbtModelTimingSchema as et, OneDriveSearchFilesInput as f, oneDriveCreateWorksheetInputSchema as g, oneDriveCreateWorkbookResultSchema as h, buildOauthAuthorization as i, apifyObjectsInputSchema as it, getBranchesInputSchema as j, GitBranch as k, OneDriveCreateWorksheetInput as l, syncActionBodySchema as lt, oneDriveCreateWorkbookInputSchema as m, PostActionsBodyRaw as n, ApifyObject as nt, SshKeyPair as o, paths as ot, OneDriveWorksheet as p, flowMigrationValidationResultSchema as q, OauthCredentials as r, ApifyObjectsInput as rt, sshKeyPairSchema as s, SyncActionBody as st, EnrollMFAInput as t, dbtRunResultsSchema as tt, OneDriveFile as u, syncActionContextSchema as ut, oneDriveGetWorksheetsInputSchema as v, lookerCredentialsResultSchema as w, oneDriveSearchFilesResultSchema as x, oneDriveGetWorksheetsResultSchema as y, GitComponentId as z };
808
+ //# sourceMappingURL=types-CQFOCQzk.d.ts.map
@@ -648,6 +648,124 @@ declare const lookerCredentialsResultSchema: z$1.ZodObject<{
648
648
  type TestLookerCredentialsInput = z$1.infer<typeof testLookerCredentialsInputSchema>;
649
649
  type LookerCredentialsResult = z$1.infer<typeof lookerCredentialsResultSchema>;
650
650
  //#endregion
651
+ //#region src/clients/syncActions/oneDrive/schemas.d.ts
652
+ declare const oneDriveSearchFilesInputSchema: z$1.ZodObject<{
653
+ branchId: z$1.ZodString;
654
+ tag: z$1.ZodOptional<z$1.ZodString>;
655
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
656
+ debug: "debug";
657
+ run: "run";
658
+ }>>;
659
+ credentials: z$1.ZodObject<{
660
+ appKey: z$1.ZodString;
661
+ '#data': z$1.ZodString;
662
+ '#appSecret': z$1.ZodString;
663
+ }, z$1.core.$strip>;
664
+ search: z$1.ZodString;
665
+ }, z$1.core.$strip>;
666
+ declare const oneDriveGetWorksheetsInputSchema: z$1.ZodObject<{
667
+ branchId: z$1.ZodString;
668
+ tag: z$1.ZodOptional<z$1.ZodString>;
669
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
670
+ debug: "debug";
671
+ run: "run";
672
+ }>>;
673
+ credentials: z$1.ZodObject<{
674
+ appKey: z$1.ZodString;
675
+ '#data': z$1.ZodString;
676
+ '#appSecret': z$1.ZodString;
677
+ }, z$1.core.$strip>;
678
+ componentId: z$1.ZodEnum<{
679
+ "keboola.ex-onedrive": "keboola.ex-onedrive";
680
+ "keboola.wr-onedrive": "keboola.wr-onedrive";
681
+ }>;
682
+ driveId: z$1.ZodString;
683
+ fileId: z$1.ZodString;
684
+ }, z$1.core.$strip>;
685
+ declare const oneDriveCreateWorkbookInputSchema: z$1.ZodObject<{
686
+ branchId: z$1.ZodString;
687
+ tag: z$1.ZodOptional<z$1.ZodString>;
688
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
689
+ debug: "debug";
690
+ run: "run";
691
+ }>>;
692
+ credentials: z$1.ZodObject<{
693
+ appKey: z$1.ZodString;
694
+ '#data': z$1.ZodString;
695
+ '#appSecret': z$1.ZodString;
696
+ }, z$1.core.$strip>;
697
+ path: z$1.ZodString;
698
+ }, z$1.core.$strip>;
699
+ declare const oneDriveCreateWorksheetInputSchema: z$1.ZodObject<{
700
+ branchId: z$1.ZodString;
701
+ tag: z$1.ZodOptional<z$1.ZodString>;
702
+ mode: z$1.ZodOptional<z$1.ZodEnum<{
703
+ debug: "debug";
704
+ run: "run";
705
+ }>>;
706
+ credentials: z$1.ZodObject<{
707
+ appKey: z$1.ZodString;
708
+ '#data': z$1.ZodString;
709
+ '#appSecret': z$1.ZodString;
710
+ }, z$1.core.$strip>;
711
+ driveId: z$1.ZodString;
712
+ fileId: z$1.ZodString;
713
+ name: z$1.ZodString;
714
+ }, z$1.core.$strip>;
715
+ declare const oneDriveFileSchema: z$1.ZodObject<{
716
+ driveId: z$1.ZodString;
717
+ fileId: z$1.ZodString;
718
+ name: z$1.ZodString;
719
+ path: z$1.ZodNullable<z$1.ZodString>;
720
+ }, z$1.core.$strip>;
721
+ declare const oneDriveWorksheetSchema: z$1.ZodObject<{
722
+ driveId: z$1.ZodString;
723
+ fileId: z$1.ZodString;
724
+ worksheetId: z$1.ZodString;
725
+ name: z$1.ZodString;
726
+ title: z$1.ZodString;
727
+ position: z$1.ZodNumber;
728
+ visible: z$1.ZodBoolean;
729
+ }, z$1.core.$strip>;
730
+ declare const oneDriveSearchFilesResultSchema: z$1.ZodObject<{
731
+ files: z$1.ZodArray<z$1.ZodObject<{
732
+ driveId: z$1.ZodString;
733
+ fileId: z$1.ZodString;
734
+ name: z$1.ZodString;
735
+ path: z$1.ZodNullable<z$1.ZodString>;
736
+ }, z$1.core.$strip>>;
737
+ }, z$1.core.$strip>;
738
+ declare const oneDriveGetWorksheetsResultSchema: z$1.ZodObject<{
739
+ worksheets: z$1.ZodArray<z$1.ZodObject<{
740
+ driveId: z$1.ZodString;
741
+ fileId: z$1.ZodString;
742
+ worksheetId: z$1.ZodString;
743
+ name: z$1.ZodString;
744
+ title: z$1.ZodString;
745
+ position: z$1.ZodNumber;
746
+ visible: z$1.ZodBoolean;
747
+ }, z$1.core.$strip>>;
748
+ }, z$1.core.$strip>;
749
+ declare const oneDriveCreateWorkbookResultSchema: z$1.ZodObject<{
750
+ file: z$1.ZodObject<{
751
+ driveId: z$1.ZodString;
752
+ fileId: z$1.ZodString;
753
+ }, z$1.core.$strip>;
754
+ }, z$1.core.$strip>;
755
+ declare const oneDriveCreateWorksheetResultSchema: z$1.ZodObject<{
756
+ worksheet: z$1.ZodObject<{
757
+ driveId: z$1.ZodString;
758
+ fileId: z$1.ZodString;
759
+ worksheetId: z$1.ZodString;
760
+ }, z$1.core.$strip>;
761
+ }, z$1.core.$strip>;
762
+ type OneDriveSearchFilesInput = z$1.infer<typeof oneDriveSearchFilesInputSchema>;
763
+ type OneDriveGetWorksheetsInput = z$1.infer<typeof oneDriveGetWorksheetsInputSchema>;
764
+ type OneDriveCreateWorkbookInput = z$1.infer<typeof oneDriveCreateWorkbookInputSchema>;
765
+ type OneDriveCreateWorksheetInput = z$1.infer<typeof oneDriveCreateWorksheetInputSchema>;
766
+ type OneDriveFile = z$1.infer<typeof oneDriveFileSchema>;
767
+ type OneDriveWorksheet = z$1.infer<typeof oneDriveWorksheetSchema>;
768
+ //#endregion
651
769
  //#region src/clients/syncActions/sshKeys/schemas.d.ts
652
770
  declare const sshKeyPairSchema: z$1.ZodObject<{
653
771
  status: z$1.ZodLiteral<"success">;
@@ -656,6 +774,25 @@ declare const sshKeyPairSchema: z$1.ZodObject<{
656
774
  }, z$1.core.$strip>;
657
775
  type SshKeyPair = z$1.infer<typeof sshKeyPairSchema>;
658
776
  //#endregion
777
+ //#region src/clients/syncActions/utils/oauth.d.ts
778
+ /** The OAuth broker's credentials for one configuration, under the keys the components read. */
779
+ declare const oauthCredentialsSchema: z$1.ZodObject<{
780
+ appKey: z$1.ZodString;
781
+ '#data': z$1.ZodString;
782
+ '#appSecret': z$1.ZodString;
783
+ }, z$1.core.$strip>;
784
+ type OauthCredentials = z$1.infer<typeof oauthCredentialsSchema>;
785
+ /** The `configData.authorization` block every OAuth-backed component expects. */
786
+ declare const buildOauthAuthorization: (credentials: OauthCredentials) => {
787
+ oauth_api: {
788
+ credentials: {
789
+ appKey: string;
790
+ '#data': string;
791
+ '#appSecret': string;
792
+ };
793
+ };
794
+ };
795
+ //#endregion
659
796
  //#region src/clients/syncActions/types.d.ts
660
797
  /**
661
798
  * The generated request body, kept only so `sendSyncAction` can cast to what `openapi-fetch`
@@ -667,5 +804,5 @@ type EnrollMFAInput = Omit<SyncActionBody, 'action' | 'configData'> & {
667
804
  email: string;
668
805
  };
669
806
  //#endregion
670
- export { flowMigrationValidationResultSchema as A, ApifyObjectsInput as B, isDataAppFamily as C, flowMigrationInputSchema as D, FlowMigrationValidationResult as E, dbtActionInputSchema as F, SyncActionContext as G, apifyObjectsSchema as H, dbtCompiledSchema as I, syncActionBodySchema as K, dbtModelTimingSchema as L, DbtActionInput as M, DbtCompiled as N, flowMigrationPreviewResultSchema as O, DbtModelTiming as P, dbtRunResultsSchema as R, GitComponentId as S, FlowMigrationPreviewResult as T, paths as U, apifyObjectsInputSchema as V, SyncActionBody as W, gitBranchesSchema as _, LookerCredentialsResult as a, DataAppComponentId as b, testLookerCredentialsInputSchema as c, GitAuth as d, GitBranch as f, gitAuthSchema as g, getEntrypointsInputSchema as h, sshKeyPairSchema as i, flowMigrationValidationResultsSchema as j, flowMigrationPreviewResultsSchema as k, GetBranchesInput as l, getBranchesInputSchema as m, PostActionsBodyRaw as n, TestLookerCredentialsInput as o, GitEntrypoints as p, syncActionContextSchema as q, SshKeyPair as r, lookerCredentialsResultSchema as s, EnrollMFAInput as t, GetEntrypointsInput as u, gitEntrypointsSchema as v, FlowMigrationInput as w, GIT_FAMILY as x, DATA_APP_FAMILY as y, ApifyObject as z };
671
- //# sourceMappingURL=types-CFeZCQ9p.d.cts.map
807
+ export { dbtCompiledSchema as $, GitEntrypoints as A, isDataAppFamily as B, TestLookerCredentialsInput as C, GetEntrypointsInput as D, GetBranchesInput as E, gitEntrypointsSchema as F, flowMigrationPreviewResultSchema as G, FlowMigrationPreviewResult as H, DATA_APP_FAMILY as I, flowMigrationValidationResultsSchema as J, flowMigrationPreviewResultsSchema as K, DataAppComponentId as L, getEntrypointsInputSchema as M, gitAuthSchema as N, GitAuth as O, gitBranchesSchema as P, dbtActionInputSchema as Q, GIT_FAMILY as R, LookerCredentialsResult as S, testLookerCredentialsInputSchema as T, FlowMigrationValidationResult as U, FlowMigrationInput as V, flowMigrationInputSchema as W, DbtCompiled as X, DbtActionInput as Y, DbtModelTiming as Z, oneDriveCreateWorksheetResultSchema as _, oauthCredentialsSchema as a, apifyObjectsSchema as at, oneDriveSearchFilesInputSchema as b, OneDriveCreateWorkbookInput as c, SyncActionContext as ct, OneDriveGetWorksheetsInput as d, dbtModelTimingSchema as et, OneDriveSearchFilesInput as f, oneDriveCreateWorksheetInputSchema as g, oneDriveCreateWorkbookResultSchema as h, buildOauthAuthorization as i, apifyObjectsInputSchema as it, getBranchesInputSchema as j, GitBranch as k, OneDriveCreateWorksheetInput as l, syncActionBodySchema as lt, oneDriveCreateWorkbookInputSchema as m, PostActionsBodyRaw as n, ApifyObject as nt, SshKeyPair as o, paths as ot, OneDriveWorksheet as p, flowMigrationValidationResultSchema as q, OauthCredentials as r, ApifyObjectsInput as rt, sshKeyPairSchema as s, SyncActionBody as st, EnrollMFAInput as t, dbtRunResultsSchema as tt, OneDriveFile as u, syncActionContextSchema as ut, oneDriveGetWorksheetsInputSchema as v, lookerCredentialsResultSchema as w, oneDriveSearchFilesResultSchema as x, oneDriveGetWorksheetsResultSchema as y, GitComponentId as z };
808
+ //# sourceMappingURL=types-CqwHP7mN.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keboola/api-client",
3
- "version": "40.0.0",
3
+ "version": "41.0.0",
4
4
  "description": "TypeScript SDK for Keboola APIs",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,6 +32,13 @@ Part of the [`@keboola/api-client` surface index](../API-SURFACE.md).
32
32
 
33
33
  - `api.syncActions.looker.testCredentials(input: { branchId: string; credentialsId: string; '#token': string; host: string; tag?: string | undefined; mode?: "run" | "debug" | undefined; }, signal?: AbortSignal | undefined): Promise<{ status?: string | undefined; message?: string | undefined; }>`
34
34
 
35
+ ### `api.syncActions.oneDrive`
36
+
37
+ - `api.syncActions.oneDrive.createWorkbook(input: { branchId: string; credentials: { appKey: string; '#data': string; '#appSecret': string; }; path: string; tag?: string | undefined; mode?: "run" | "debug" | undefined; }, signal?: AbortSignal | undefined): Promise<{ driveId: string; fileId: string; }>`
38
+ - `api.syncActions.oneDrive.createWorksheet(input: { branchId: string; credentials: { appKey: string; '#data': string; '#appSecret': string; }; driveId: string; fileId: string; name: string; tag?: string | undefined; mode?: "run" | "debug" | undefined; }, signal?: AbortSignal | undefined): Promise<{ driveId: string; fileId: string; worksheetId: string; }>`
39
+ - `api.syncActions.oneDrive.getWorksheets(input: { branchId: string; credentials: { appKey: string; '#data': string; '#appSecret': string; }; componentId: "keboola.ex-onedrive" | "keboola.wr-onedrive"; driveId: string; fileId: string; tag?: string | undefined; mode?: "run" | "debug" | undefined; }, signal?: AbortSignal | undefined): Promise<{ driveId: string; fileId: string; worksheetId: string; name: string; title: string; position: number; visible: boolean; }[]>`
40
+ - `api.syncActions.oneDrive.searchFiles(input: { branchId: string; credentials: { appKey: string; '#data': string; '#appSecret': string; }; search: string; tag?: string | undefined; mode?: "run" | "debug" | undefined; }, signal?: AbortSignal | undefined): Promise<{ driveId: string; fileId: string; name: string; path: string | null; }[]>`
41
+
35
42
  ### `api.syncActions.sshKeys`
36
43
 
37
44
  - `api.syncActions.sshKeys.generate(input: { branchId: string; tag?: string | undefined; mode?: "run" | "debug" | undefined; }, signal?: AbortSignal | undefined): Promise<{ status: "success"; public: string; private: string; }>`