@databricks/appkit-ui 0.88.1 → 0.89.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 (136) hide show
  1. package/CLAUDE.md +7 -2
  2. package/dist/cli/commands/doctor/checks-existence.js +16 -16
  3. package/dist/cli/commands/doctor/checks-existence.js.map +1 -1
  4. package/dist/cli/commands/doctor/checks.js +15 -18
  5. package/dist/cli/commands/doctor/checks.js.map +1 -1
  6. package/dist/cli/commands/doctor/databricks-client.js +8 -6
  7. package/dist/cli/commands/doctor/databricks-client.js.map +1 -1
  8. package/dist/cli/commands/registry/workspace-picker.js +34 -24
  9. package/dist/cli/commands/registry/workspace-picker.js.map +1 -1
  10. package/dist/react/genie/genie-chart-inference.js.map +1 -1
  11. package/dist/react/genie/genie-query-transform.d.ts +5 -2
  12. package/dist/react/genie/genie-query-transform.d.ts.map +1 -1
  13. package/dist/react/genie/genie-query-transform.js +14 -8
  14. package/dist/react/genie/genie-query-transform.js.map +1 -1
  15. package/dist/shared/src/genie.d.ts +9 -3
  16. package/dist/shared/src/genie.d.ts.map +1 -1
  17. package/dist/shared/src/workspace-client/factory.d.ts +0 -1
  18. package/dist/shared/src/workspace-client/index.d.ts +1 -2
  19. package/dist/shared/src/workspace-client/modular.d.ts +19 -0
  20. package/dist/shared/src/workspace-client/types.d.ts +1 -2
  21. package/dist/workspace-client/client.js +81 -23
  22. package/dist/workspace-client/client.js.map +1 -1
  23. package/dist/workspace-client/errors.d.ts +14 -2
  24. package/dist/workspace-client/errors.d.ts.map +1 -0
  25. package/dist/workspace-client/errors.js +45 -2
  26. package/dist/workspace-client/errors.js.map +1 -0
  27. package/dist/workspace-client/factory.d.ts +1 -1
  28. package/dist/workspace-client/factory.js.map +1 -1
  29. package/dist/workspace-client/index.d.ts +4 -3
  30. package/dist/workspace-client/index.js +2 -2
  31. package/dist/workspace-client/modular.d.ts +109 -0
  32. package/dist/workspace-client/modular.d.ts.map +1 -0
  33. package/dist/workspace-client/modular.js +447 -0
  34. package/dist/workspace-client/modular.js.map +1 -0
  35. package/dist/workspace-client/options.d.ts +29 -0
  36. package/dist/workspace-client/options.d.ts.map +1 -0
  37. package/dist/workspace-client/types.d.ts +35 -38
  38. package/dist/workspace-client/types.d.ts.map +1 -1
  39. package/docs/api/appkit/Class.ApiError.md +110 -0
  40. package/docs/api/appkit/Class.DatabricksAdapter.md +2 -2
  41. package/docs/api/appkit/Class.SupervisorApiAdapter.md +1 -1
  42. package/docs/api/appkit/Function.generateDatabaseCredential.md +2 -2
  43. package/docs/api/appkit/Function.getWorkspaceClient.md +2 -2
  44. package/docs/api/appkit/Interface.DirectoryEntry.md +62 -0
  45. package/docs/api/appkit/Interface.DownloadResponse.md +45 -0
  46. package/docs/api/appkit/Interface.JobAPI.md +20 -12
  47. package/docs/api/appkit/Interface.LakebasePoolConfig.md +1 -1
  48. package/docs/api/appkit/Interface.WorkspaceClient.md +168 -26
  49. package/docs/api/appkit/Interface.WorkspaceClientOptions.md +1 -14
  50. package/docs/api/appkit/TypeAlias.FilesDirectoryEntry.md +8 -0
  51. package/docs/api/appkit/TypeAlias.FilesDownloadResponse.md +8 -0
  52. package/docs/api/appkit/TypeAlias.JobsExport.md +1 -1
  53. package/docs/api/appkit/TypeAlias.WorkspaceClientLike.md +16 -0
  54. package/docs/api/appkit.md +7 -2
  55. package/docs/plugins/files.md +20 -3
  56. package/docs/plugins/jobs.md +9 -9
  57. package/docs/plugins/testing.md +10 -8
  58. package/llms.txt +7 -2
  59. package/node_modules/@databricks/sdk-genie/LICENSE +203 -0
  60. package/node_modules/@databricks/sdk-genie/README.md +23 -0
  61. package/node_modules/@databricks/sdk-genie/dist/package.js +7 -0
  62. package/node_modules/@databricks/sdk-genie/dist/package.js.map +1 -0
  63. package/node_modules/@databricks/sdk-genie/dist/v1/client.d.ts +175 -0
  64. package/node_modules/@databricks/sdk-genie/dist/v1/client.d.ts.map +1 -0
  65. package/node_modules/@databricks/sdk-genie/dist/v1/client.js +829 -0
  66. package/node_modules/@databricks/sdk-genie/dist/v1/client.js.map +1 -0
  67. package/node_modules/@databricks/sdk-genie/dist/v1/index.d.ts +3 -0
  68. package/node_modules/@databricks/sdk-genie/dist/v1/index.js +4 -0
  69. package/node_modules/@databricks/sdk-genie/dist/v1/model.d.ts +1799 -0
  70. package/node_modules/@databricks/sdk-genie/dist/v1/model.d.ts.map +1 -0
  71. package/node_modules/@databricks/sdk-genie/dist/v1/model.js +1097 -0
  72. package/node_modules/@databricks/sdk-genie/dist/v1/model.js.map +1 -0
  73. package/node_modules/@databricks/sdk-genie/dist/v1/transport.d.ts +37 -0
  74. package/node_modules/@databricks/sdk-genie/dist/v1/transport.d.ts.map +1 -0
  75. package/node_modules/@databricks/sdk-genie/dist/v1/transport.js +73 -0
  76. package/node_modules/@databricks/sdk-genie/dist/v1/transport.js.map +1 -0
  77. package/node_modules/@databricks/sdk-genie/dist/v1/utils.d.ts +43 -0
  78. package/node_modules/@databricks/sdk-genie/dist/v1/utils.d.ts.map +1 -0
  79. package/node_modules/@databricks/sdk-genie/dist/v1/utils.js +130 -0
  80. package/node_modules/@databricks/sdk-genie/dist/v1/utils.js.map +1 -0
  81. package/node_modules/@databricks/sdk-genie/package.json +46 -0
  82. package/node_modules/@databricks/sdk-statementexecution/LICENSE +203 -0
  83. package/node_modules/@databricks/sdk-statementexecution/README.md +23 -0
  84. package/node_modules/@databricks/sdk-statementexecution/dist/package.js +7 -0
  85. package/node_modules/@databricks/sdk-statementexecution/dist/package.js.map +1 -0
  86. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.d.ts +91 -0
  87. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.d.ts.map +1 -0
  88. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.js +183 -0
  89. package/node_modules/@databricks/sdk-statementexecution/dist/v1/client.js.map +1 -0
  90. package/node_modules/@databricks/sdk-statementexecution/dist/v1/index.d.ts +3 -0
  91. package/node_modules/@databricks/sdk-statementexecution/dist/v1/index.js +4 -0
  92. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.d.ts +506 -0
  93. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.d.ts.map +1 -0
  94. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.js +302 -0
  95. package/node_modules/@databricks/sdk-statementexecution/dist/v1/model.js.map +1 -0
  96. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.d.ts +37 -0
  97. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.d.ts.map +1 -0
  98. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.js +73 -0
  99. package/node_modules/@databricks/sdk-statementexecution/dist/v1/transport.js.map +1 -0
  100. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.d.ts +25 -0
  101. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.d.ts.map +1 -0
  102. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.js +87 -0
  103. package/node_modules/@databricks/sdk-statementexecution/dist/v1/utils.js.map +1 -0
  104. package/node_modules/@databricks/sdk-statementexecution/package.json +46 -0
  105. package/node_modules/@databricks/sdk-vectorsearch/LICENSE +203 -0
  106. package/node_modules/@databricks/sdk-vectorsearch/README.md +23 -0
  107. package/node_modules/@databricks/sdk-vectorsearch/dist/package.js +7 -0
  108. package/node_modules/@databricks/sdk-vectorsearch/dist/package.js.map +1 -0
  109. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.d.ts +70 -0
  110. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.d.ts.map +1 -0
  111. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.js +474 -0
  112. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/client.js.map +1 -0
  113. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/index.d.ts +3 -0
  114. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/index.js +4 -0
  115. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.d.ts +704 -0
  116. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.d.ts.map +1 -0
  117. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.js +635 -0
  118. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/model.js.map +1 -0
  119. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.d.ts +37 -0
  120. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.d.ts.map +1 -0
  121. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.js +73 -0
  122. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/transport.js.map +1 -0
  123. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.d.ts +37 -0
  124. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.d.ts.map +1 -0
  125. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.js +104 -0
  126. package/node_modules/@databricks/sdk-vectorsearch/dist/v1/utils.js.map +1 -0
  127. package/node_modules/@databricks/sdk-vectorsearch/package.json +46 -0
  128. package/package.json +29 -4
  129. package/sbom.cdx.json +1 -1
  130. package/dist/shared/src/workspace-client/errors.d.ts +0 -1
  131. package/dist/shared/src/workspace-client/legacy.d.ts +0 -3
  132. package/dist/workspace-client/legacy.d.ts +0 -34
  133. package/dist/workspace-client/legacy.d.ts.map +0 -1
  134. package/dist/workspace-client/legacy.js +0 -23
  135. package/dist/workspace-client/legacy.js.map +0 -1
  136. package/docs/api/appkit/Interface.WorkspaceClientLike.md +0 -67
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modular.js","names":["ApiError"],"sources":["../../src/workspace-client/modular.ts"],"sourcesContent":["/**\n * The single module allowed to import the modular `@databricks/sdk-*` SDK\n * directly — the new-SDK sibling of {@link ./legacy.ts}. Every other AppKit\n * module reaches these clients through the {@link WorkspaceClient} facade and\n * the type re-exports below, so the modular SDK stays isolated exactly like the\n * legacy one (the oxlint `no-restricted-imports` boundary walls `@databricks/sdk-*`\n * off everywhere outside `packages/shared/src/workspace-client/`).\n *\n * Migrated services are built here as per-service clients; the facade delegates\n * their accessors to these instead of the legacy monolithic client. Currently\n * `warehouses`, `statementExecution`, `currentUser` (SCIM), `genie`, `jobs`,\n * `files`, `vectorSearch`, `tables`, `modelServing`, `volumes`, `functions`,\n * `connections`, `database`, `postgres`, `experiments` and `apps` are\n * migrated, plus the auth + raw-request seam ({@link buildWorkspaceAuth}).\n * Only `servingEndpoints`, `config` and `apiClient` still route through\n * `legacy.ts`.\n *\n * NOTE: statementExecution relies on a pinned pnpm patch\n * (`patches/@databricks__sdk-statementexecution@0.52.0.patch`) that restores the\n * undocumented Reyden `attachment` response field, which the SDK's generated\n * unmarshal transform would otherwise strip.\n *\n * NOTE: vectorSearch relies on a pinned pnpm patch\n * (`patches/@databricks__sdk-vectorsearch@0.51.0.patch`): it adds the\n * undocumented query `debug_level` request / `debug_info` response fields (the\n * source of ai-search `queryTimeMs`), and lets row values be `bigint`, since the\n * SDK parses with json-bigint and the unpatched schema rejects ints over 2^53.\n *\n * NOTE: genie relies on a pinned pnpm patch\n * (`patches/@databricks__sdk-genie@0.54.0.patch`): the generated model types the\n * query result's `data_array` as protobuf `ListValue[]` (`{ values: [...] }`), but\n * the API returns plain `JSON_ARRAY` rows (`[[\"a\", null], ...]`), so the unmarshal\n * schema rejected every real query result. The patch restores `(string | null)[][]`.\n */\nimport { execFile } from \"node:child_process\";\nimport { STATUS_CODES } from \"node:http\";\nimport { promisify } from \"node:util\";\n\nimport type { AppsClient } from \"@databricks/sdk-apps/v1\";\nimport {\n type Credentials,\n newTokenCredentials,\n type Token,\n type TokenCredentials,\n tokenProviderFn,\n} from \"@databricks/sdk-auth\";\nimport {\n DefaultCredentialsError,\n defaultCredentials,\n M2mCredentialsError,\n newM2mCredentials,\n newPatCredentials,\n newU2mCredentials,\n PatCredentialsError,\n U2mCredentialsError,\n} from \"@databricks/sdk-auth/credentials\";\nimport {\n type HttpClient,\n type HttpRequest,\n newFetchHttpClient,\n} from \"@databricks/sdk-core/http\";\nimport { type ProfileOptions, resolve } from \"@databricks/sdk-core/profiles\";\nimport type { DatabaseClient } from \"@databricks/sdk-database/v1\";\nimport type { ExperimentsClient } from \"@databricks/sdk-experiments/v1\";\nimport type { FilesClient } from \"@databricks/sdk-files/v2\";\nimport type { GenieClient } from \"@databricks/sdk-genie/v1\";\nimport type { JobsClient } from \"@databricks/sdk-jobs/v2\";\nimport type { ModelServingClient } from \"@databricks/sdk-modelserving/v1\";\nimport type { ClientOptions } from \"@databricks/sdk-options/client\";\nimport type { PostgresClient } from \"@databricks/sdk-postgres/v1\";\nimport { ScimClient } from \"@databricks/sdk-scim/v1\";\nimport { StatementExecutionClient } from \"@databricks/sdk-statementexecution/v1\";\nimport type { ConnectionsClient } from \"@databricks/sdk-uc-connections/v1\";\nimport type { FunctionsClient } from \"@databricks/sdk-uc-functions/v1\";\nimport type { TablesClient } from \"@databricks/sdk-uc-tables/v1\";\nimport type { VolumesClient } from \"@databricks/sdk-uc-volumes/v1\";\nimport type { VectorSearchClient } from \"@databricks/sdk-vectorsearch/v1\";\nimport { WarehousesClient } from \"@databricks/sdk-warehouses/v1\";\n\nimport { ApiError } from \"./errors\";\nimport type { WorkspaceClientOptions } from \"./options\";\n\n/**\n * Prepend `https://` to a scheme-less host. The legacy SDK normalized the host\n * this way; the modular SDK does NOT — it passes the host straight into `fetch`,\n * so a bare `DATABRICKS_HOST=my-workspace.cloud.databricks.com` (the common form,\n * and what the Databricks Apps runtime sets) yields `TypeError: Invalid URL`.\n */\nfunction normalizeHost(host: string | undefined): string | undefined {\n const trimmed = host?.trim();\n if (!trimmed) return undefined;\n return /^https?:\\/\\//i.test(trimmed) ? trimmed : `https://${trimmed}`;\n}\n\n// Same margin as the legacy SDK: refresh 40s early, since Azure Databricks\n// rejects tokens that expire in 30s or less.\nconst TOKEN_REFRESH_MARGIN_MS = 40_000;\n\n/**\n * Cache a token until shortly before it expires. The modular `newM2mCredentials`\n * caches only the token endpoint and mints a fresh OAuth token on EVERY request;\n * the legacy SDK reused it until expiry. Concurrent callers share one in-flight\n * fetch. Like the legacy SDK, a token without an expiry is reused indefinitely.\n */\nfunction withTokenCache(credentials: TokenCredentials): TokenCredentials {\n let current: Token | undefined;\n let inflight: Promise<Token> | undefined;\n const isFresh = (t: Token) =>\n t.expiry === undefined ||\n t.expiry.getTime() - TOKEN_REFRESH_MARGIN_MS > Date.now();\n return newTokenCredentials(\n credentials.name(),\n tokenProviderFn(async () => {\n if (current && isFresh(current)) return current;\n inflight ??= credentials\n .token()\n .then((t) => (current = t))\n .finally(() => {\n inflight = undefined;\n });\n return inflight;\n }),\n );\n}\n\n/**\n * The SDK default chain (profile / `~/.databrickscfg`), with the token cache the\n * chain lacks: its CLI strategy shells out to `databricks auth token` and its\n * M2M strategy mints a new OAuth token on EVERY request. `DefaultCredentials`\n * hides the token behind `authHeaders()`, so mirror its strategy order (PAT →\n * M2M → CLI) to get a cacheable `TokenCredentials`. A profile `authType` naming\n * one of these (`databricks auth login` writes `databricks-cli`) pins that\n * strategy; other auth types and `groupId` keep the SDK's own (uncached) logic.\n * TODO: drop once sdk-auth caches tokens in its M2M and CLI credentials.\n */\nfunction cachedDefaultCredentials(\n profileOptions?: ProfileOptions,\n): Credentials {\n const select = async (): Promise<Credentials> => {\n const profile = await resolve(profileOptions);\n // Same as env M2M: OAuth discovery needs a scheme, which a profile may omit.\n const host = normalizeHost(profile.host)?.replace(/\\/+$/, \"\");\n const { name, token, clientId, clientSecret, authType } = profile;\n const allows = (strategy: string) => !authType || authType === strategy;\n if (host && !profile.groupId) {\n if (token && allows(\"pat\")) return newPatCredentials(token.value);\n if (clientId && clientSecret && allows(\"oauth-m2m\")) {\n return withTokenCache(\n newM2mCredentials({\n host,\n clientId,\n clientSecret: clientSecret.value,\n ...(profile.accountId !== undefined && {\n accountId: profile.accountId,\n }),\n }),\n );\n }\n if (name && allows(\"databricks-cli\")) {\n return withTokenCache(\n newU2mCredentials({\n profile: name,\n ...(profile.databricksCliPath !== undefined && {\n cliPath: profile.databricksCliPath,\n }),\n }),\n );\n }\n }\n return defaultCredentials({\n profile: { ...profile, ...(host && { host }) },\n });\n };\n let selected: Promise<Credentials> | undefined;\n return {\n name: () => \"default\",\n async authHeaders() {\n selected ??= select().catch((e) => {\n selected = undefined;\n throw e;\n });\n return (await selected).authHeaders();\n },\n };\n}\n\nconst execFileAsync = promisify(execFile);\n\n/** Auth could not be configured (missing or unsupported credentials). */\nexport class AuthConfigError extends Error {\n override name = \"AuthConfigError\";\n}\n\n/** Whether `e` means auth isn't set up, from AppKit or the modular SDK. */\nexport function isAuthConfigError(e: unknown): e is Error {\n return (\n e instanceof AuthConfigError ||\n e instanceof DefaultCredentialsError ||\n e instanceof M2mCredentialsError ||\n e instanceof PatCredentialsError ||\n e instanceof U2mCredentialsError\n );\n}\n\n/**\n * Databricks CLI auth for a host, not a profile: what the legacy SDK used when\n * only a host was configured. The modular CLI strategy needs a profile name.\n */\nfunction cliHostCredentials(host: string): TokenCredentials {\n return withTokenCache(\n newTokenCredentials(\n \"databricks-cli\",\n tokenProviderFn(async () => {\n let stdout: string;\n try {\n ({ stdout } = await execFileAsync(\"databricks\", [\n \"auth\",\n \"token\",\n \"--host\",\n host,\n ]));\n } catch (e) {\n const err = e as { stderr?: unknown; message?: string };\n const detail = String(err.stderr ?? err.message ?? e).trim();\n throw new AuthConfigError(\n `cannot get an access token for ${host} from the Databricks CLI: ${detail}`,\n );\n }\n const parsed = JSON.parse(stdout) as {\n access_token: string;\n expiry?: string;\n };\n return {\n value: parsed.access_token,\n ...(parsed.expiry && { expiry: new Date(parsed.expiry) }),\n };\n }),\n ),\n );\n}\n\n/** Credentials that fail on use with `message`, so boot surfaces it clearly. */\nfunction unsupportedCredentials(message: string): Credentials {\n return {\n name: () => \"unsupported\",\n authHeaders: async () => {\n throw new AuthConfigError(message);\n },\n };\n}\n\n/**\n * Map wrapper options onto the modular SDK's `ClientOptions`, reproducing the\n * legacy SDK's auth resolution: explicit token → PAT (the OBO path); profile →\n * profile file; otherwise the service principal from the environment. It carries\n * the privilege-escalation guard — check `token !== undefined` (NOT truthiness)\n * so an explicitly-passed token, even an empty string, pins the PAT path and\n * fails loudly at request time rather than silently falling through to the\n * service-principal env credentials (which would be an OBO privilege escalation).\n */\nfunction mapToClientOptions(opts: WorkspaceClientOptions): ClientOptions {\n const clientOptions: ClientOptions = {};\n // Resolve + scheme-normalize the host the way the legacy SDK did. Explicit\n // `opts.host` wins; otherwise fall back to `DATABRICKS_HOST` (env is where the\n // Apps runtime and dev set it). When a profile is selected without an explicit\n // host, defer to the SDK's profile-file resolution instead of the env.\n const host = normalizeHost(\n opts.host ?? (opts.profile ? undefined : process.env.DATABRICKS_HOST),\n );\n if (host) {\n clientOptions.host = host;\n }\n if (opts.token !== undefined) {\n // Explicit token (this is the OBO path: `asUser` passes the user's token).\n clientOptions.credentials = newPatCredentials(opts.token);\n } else if (opts.profile) {\n clientOptions.profileOptions = { profile: opts.profile };\n clientOptions.credentials = cachedDefaultCredentials({\n profile: opts.profile,\n });\n } else {\n // No token, no profile: authenticate as the service principal from the\n // environment. The SDK's own default chain DOES read the DATABRICKS_* env\n // vars (host, client id/secret, token) — but its M2M strategy feeds the RAW\n // `DATABRICKS_HOST` straight into OAuth token-endpoint discovery, and the\n // Databricks Apps runtime sets that host scheme-less (e.g.\n // `x.cloud.databricks.com`), so discovery fails with `Invalid URL` and every\n // request dies as \"Warehouse readiness check failed\". Resolve the SP here\n // with the scheme-normalized `host` instead: M2M from client id + secret\n // (what Apps injects), else PAT from `DATABRICKS_TOKEN`, else fall through to\n // the SDK default chain (local dev, where a `~/.databrickscfg` host already\n // carries a scheme).\n // `DATABRICKS_AUTH_TYPE`, like in the legacy SDK, pins the strategy.\n const clientId = process.env.DATABRICKS_CLIENT_ID;\n const clientSecret = process.env.DATABRICKS_CLIENT_SECRET;\n const envToken = process.env.DATABRICKS_TOKEN;\n const authType = process.env.DATABRICKS_AUTH_TYPE?.trim() || undefined;\n const allows = (strategy: string) => !authType || authType === strategy;\n if (host && clientId && clientSecret && allows(\"oauth-m2m\")) {\n clientOptions.credentials = withTokenCache(\n newM2mCredentials({ host, clientId, clientSecret }),\n );\n } else if (envToken && allows(\"pat\")) {\n clientOptions.credentials = newPatCredentials(envToken);\n } else if (host && allows(\"databricks-cli\")) {\n // A configured host means ~/.databrickscfg is NOT consulted (legacy\n // rule): a profile's credentials must never be sent to another host.\n clientOptions.credentials = cliHostCredentials(host);\n } else if (!host && !authType) {\n // Local dev with no host anywhere: the profile-based default chain.\n clientOptions.credentials = cachedDefaultCredentials();\n } else {\n clientOptions.credentials = unsupportedCredentials(\n `DATABRICKS_AUTH_TYPE=${authType ?? \"\"} cannot be satisfied: supported types are pat (DATABRICKS_TOKEN), oauth-m2m (DATABRICKS_CLIENT_ID/SECRET) and databricks-cli (\\`databricks auth login\\`).`,\n );\n }\n }\n clientOptions.httpClient = buildHttpClient(opts);\n return clientOptions;\n}\n\n/**\n * Wrap the SDK's default fetch transport to prepend AppKit's product segment\n * (e.g. `databricks-appkit/0.88.1`) to the outgoing `User-Agent`, which\n * Databricks-side dashboards match on.\n *\n * Why the transport and not the SDK's `setProduct`: that is process-global,\n * while the header on the `httpClient` is per-client, and the wrapper ships\n * inside appkit's bundled `dist`, so it also reaches deployed apps. The SDK's\n * own client-info (`sdk-js-core/…`, runtime) is already on `request.headers`,\n * so prepending keeps it intact after AppKit's segment.\n *\n * The wrapper also retries (see `sendWithRetry`). With no product configured\n * (build-time callers) it adds no AppKit segment, like the legacy behavior.\n */\nfunction buildHttpClient(opts: WorkspaceClientOptions): HttpClient {\n const co = opts.clientOptions;\n let appkitUserAgent: string | undefined;\n if (co?.product && co?.productVersion) {\n const segments = [`${co.product}/${co.productVersion}`];\n if (co.userAgentExtra) {\n for (const [key, value] of Object.entries(co.userAgentExtra)) {\n segments.push(`${key}/${String(value)}`);\n }\n }\n appkitUserAgent = segments.join(\" \");\n }\n const base = newFetchHttpClient();\n return {\n send(request) {\n if (appkitUserAgent) {\n const existing = request.headers.get(\"User-Agent\");\n request.headers.set(\n \"User-Agent\",\n existing ? `${appkitUserAgent} ${existing}` : appkitUserAgent,\n );\n }\n return sendWithRetry(base, request);\n },\n };\n}\n\n// The legacy SDK's retry policy: 429, or an error body naming a transient\n// failure; backoff of `attempt` seconds plus jitter, capped at 10s, for up to\n// 300s in total. The modular SDK retries nothing outside long-running waits.\nconst RETRY_TIMEOUT_MS = 300_000;\nconst TRANSIENT_ERROR_MESSAGES = [\n \"com.databricks.backend.manager.util.UnknownWorkerEnvironmentException\",\n \"does not have any associated worker environments\",\n \"There is no worker environment with id\",\n \"Unknown worker environment\",\n \"ClusterNotReadyException\",\n \"connection reset by peer\",\n \"TLS handshake timeout\",\n \"connection refused\",\n \"Unexpected error\",\n \"i/o timeout\",\n];\n\nasync function sendWithRetry(\n base: HttpClient,\n request: Parameters<HttpClient[\"send\"]>[0],\n): ReturnType<HttpClient[\"send\"]> {\n // A streamed body (e.g. a file upload) can only be sent once.\n if (request.body instanceof ReadableStream) return base.send(request);\n const deadline = Date.now() + RETRY_TIMEOUT_MS;\n for (let attempt = 1; ; attempt++) {\n const response = await base.send(request);\n if (response.statusCode < 400) return response;\n const body = new Uint8Array(\n await new Response(response.body).arrayBuffer(),\n );\n const text = new TextDecoder().decode(body);\n const retryable =\n response.statusCode === 429 ||\n TRANSIENT_ERROR_MESSAGES.some((m) => text.includes(m));\n const waitMs = Math.min(attempt * 1000 + 50 + Math.random() * 700, 10_000);\n if (\n !retryable ||\n request.signal?.aborted ||\n Date.now() + waitMs > deadline\n ) {\n return { ...response, body: new Response(body).body };\n }\n await new Promise((resolve) => setTimeout(resolve, waitMs));\n }\n}\n\n/** A raw REST call against the workspace host. */\nexport interface WorkspaceRequest {\n method: string;\n /** Path on the workspace host, e.g. `/api/2.0/preview/scim/v2/Me`. */\n path: string;\n query?: Record<string, string>;\n headers?: Headers;\n body?: HttpRequest[\"body\"];\n signal?: AbortSignal;\n}\n\n/** Host, auth headers, and raw requests resolved exactly like the modular clients. */\nexport interface WorkspaceAuth {\n /** Scheme-normalized workspace host, without a trailing slash. */\n getHost(): Promise<string>;\n /** Set the auth header(s) (e.g. `Authorization`) on `headers`. */\n authenticate(headers: Headers): Promise<void>;\n /**\n * Send a request through the modular transport (AppKit User-Agent + auth).\n * Returns the raw `Response` (body unread, so it can stream); throws\n * {@link ApiError} on a non-2xx status.\n */\n request(req: WorkspaceRequest): Promise<Response>;\n}\n\n/**\n * Build host/credential resolution from {@link mapToClientOptions}, mirroring\n * the modular SDK's `resolveClientConfig` (sdk-warehouses `dist/v1/transport.js`):\n * resolve the profile from config file + env, explicit options win, and fall\n * back to `defaultCredentials` over the resolved profile. Resolved once, lazily;\n * a failed resolution is retried on the next call.\n */\nexport function buildWorkspaceAuth(\n opts: WorkspaceClientOptions,\n): WorkspaceAuth {\n const options = mapToClientOptions(opts);\n const transport = options.httpClient ?? newFetchHttpClient();\n let resolved: Promise<{ host: string; credentials: Credentials }> | undefined;\n const resolveOnce = () => {\n resolved ??= (async () => {\n const profile = await resolve(options.profileOptions);\n const host = normalizeHost(options.host ?? profile.host)?.replace(\n /\\/+$/,\n \"\",\n );\n if (!host) throw new Error(\"Host is required.\");\n const credentials =\n options.credentials ??\n defaultCredentials({ profile: { ...profile, host } });\n return { host, credentials };\n })().catch((e) => {\n resolved = undefined;\n throw e;\n });\n return resolved;\n };\n const authenticate = async (headers: Headers) => {\n const { credentials } = await resolveOnce();\n for (const h of await credentials.authHeaders()) {\n headers.set(h.key, h.value);\n }\n };\n return {\n getHost: async () => (await resolveOnce()).host,\n authenticate,\n async request(req) {\n const url = new URL(req.path, (await resolveOnce()).host);\n for (const [k, v] of Object.entries(req.query ?? {})) {\n url.searchParams.set(k, v);\n }\n const headers = new Headers(req.headers);\n await authenticate(headers);\n const res = await transport.send({\n url: url.toString(),\n method: req.method,\n headers,\n body: req.body,\n signal: req.signal,\n });\n // `Response` rejects any body (even empty) on null-body statuses.\n const nullBody = [204, 205, 304].includes(res.statusCode);\n const response = new Response(nullBody ? null : res.body, {\n status: res.statusCode,\n // The modular transport drops the reason phrase; legacy error messages\n // include it (see toApiError).\n statusText: STATUS_CODES[res.statusCode],\n headers: res.headers,\n });\n if (!response.ok) throw await toApiError(response);\n return response;\n },\n };\n}\n\n/**\n * Same error class the legacy `apiClient.request` threw, so existing catch\n * sites (`instanceof ApiError`, `.statusCode`, `.errorCode`) keep working.\n * Message + code follow the legacy `parseErrorFromResponse` so callers that\n * surface `err.message` (e.g. the serving plugin's 502 body) are unchanged:\n * a body without both `error_code` and `message` (plain text, HTML, or a\n * model-specific error JSON) becomes `Response from server (<status text>) <body>`.\n */\nasync function toApiError(response: Response): Promise<ApiError> {\n const text = await response.text();\n let json:\n | { error_code?: string; message?: string; error?: string; details?: [] }\n | undefined;\n try {\n json = JSON.parse(text);\n } catch {\n // Non-JSON error body (HTML or plain text).\n }\n if (json?.message && json.error_code) {\n return new ApiError(\n json.error || json.message,\n json.error_code,\n response.status,\n json,\n json.details ?? [],\n );\n }\n const html =\n text.match(/<pre>(.*)<\\/pre>/) ??\n text.match(/<title>(Error \\d+.*?)<\\/title>/);\n return new ApiError(\n html\n ? html[1].trim().replace(/([\\s.])*$/, \"\")\n : `Response from server (${response.statusText}) ${text}`,\n response.statusText || \"UNKNOWN\",\n response.status,\n json ?? text,\n [],\n );\n}\n\n/** Build a modular Warehouses client from wrapper options. */\nexport function buildWarehousesClient(\n opts: WorkspaceClientOptions,\n): WarehousesClient {\n return new WarehousesClient(mapToClientOptions(opts));\n}\n\n/** Build a modular Statement Execution client from wrapper options. */\nexport function buildStatementExecutionClient(\n opts: WorkspaceClientOptions,\n): StatementExecutionClient {\n return new StatementExecutionClient(mapToClientOptions(opts));\n}\n\n// The modular SDK's error class, for tests that must throw what typed calls\n// really throw (status in `httpStatusCode`, not the wrapper's `statusCode`).\nexport { ApiError as ModularApiError } from \"@databricks/sdk-core/apierror\";\n\n/**\n * Build a modular SCIM client from wrapper options. Backs the facade's\n * `currentUser` accessor: legacy `currentUser.me()` is `ScimClient.me({})`.\n */\nexport function buildScimClient(opts: WorkspaceClientOptions): ScimClient {\n return new ScimClient(mapToClientOptions(opts));\n}\n\n/** Build a modular Apps client from wrapper options. */\nexport function buildAppsClient(opts: WorkspaceClientOptions): AppsClient {\n return lazyClient(\n () => import(\"@databricks/sdk-apps/v1\").then((m) => m.AppsClient),\n mapToClientOptions(opts),\n );\n}\n\n/**\n * Defer loading an SDK client's module until its first method call, so app\n * boot doesn't pay for clients it never uses. Generated methods return either\n * a Promise or (`*Iter`) an AsyncGenerator, so each proxied call returns the\n * pending result as a Promise that is also async-iterable.\n */\nfunction lazyClient<T extends object>(\n load: () => Promise<new (options: ClientOptions) => T>,\n options: ClientOptions,\n): T {\n let client: Promise<T> | undefined;\n return new Proxy({} as T, {\n get(_target, prop) {\n // Not thenable, or `await facade.someClient` would hang.\n if (typeof prop === \"symbol\" || prop === \"then\") return undefined;\n return (...args: unknown[]) => {\n client ??= load().then((Client) => new Client(options));\n const result = client.then((c) =>\n (c as Record<string, (...a: unknown[]) => unknown>)[prop](...args),\n );\n return Object.assign(result, {\n async *[Symbol.asyncIterator]() {\n yield* (await result) as AsyncIterable<unknown>;\n },\n });\n };\n },\n });\n}\n\n/** Build a modular Genie client from wrapper options. */\nexport function buildGenieClient(opts: WorkspaceClientOptions): GenieClient {\n return lazyClient(\n () => import(\"@databricks/sdk-genie/v1\").then((m) => m.GenieClient),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Jobs (API 2.2) client from wrapper options. */\nexport function buildJobsClient(opts: WorkspaceClientOptions): JobsClient {\n return lazyClient(\n () => import(\"@databricks/sdk-jobs/v2\").then((m) => m.JobsClient),\n mapToClientOptions(opts),\n );\n}\n\n/**\n * Build a modular Files client from wrapper options. `getFileMetadata` is not\n * used: its generated HEAD call parses the (empty) body and drops the response\n * headers that carry the metadata, so the connector issues that HEAD through\n * {@link WorkspaceAuth.request} instead.\n */\nexport function buildFilesClient(opts: WorkspaceClientOptions): FilesClient {\n return lazyClient(\n () => import(\"@databricks/sdk-files/v2\").then((m) => m.FilesClient),\n mapToClientOptions(opts),\n );\n}\n\n/**\n * Build a modular Vector Search client from wrapper options. Query calls rely\n * on the sdk-vectorsearch pnpm patch (`debugLevel` / `debugInfo`, `bigint` rows).\n */\nexport function buildVectorSearchClient(\n opts: WorkspaceClientOptions,\n): VectorSearchClient {\n return lazyClient(\n () =>\n import(\"@databricks/sdk-vectorsearch/v1\").then(\n (m) => m.VectorSearchClient,\n ),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Model Serving (serving endpoints) client from wrapper options. */\nexport function buildModelServingClient(\n opts: WorkspaceClientOptions,\n): ModelServingClient {\n return lazyClient(\n () =>\n import(\"@databricks/sdk-modelserving/v1\").then(\n (m) => m.ModelServingClient,\n ),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular MLflow Experiments client from wrapper options. */\nexport function buildExperimentsClient(\n opts: WorkspaceClientOptions,\n): ExperimentsClient {\n return lazyClient(\n () =>\n import(\"@databricks/sdk-experiments/v1\").then((m) => m.ExperimentsClient),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Unity Catalog Tables client from wrapper options. */\nexport function buildTablesClient(opts: WorkspaceClientOptions): TablesClient {\n return lazyClient(\n () => import(\"@databricks/sdk-uc-tables/v1\").then((m) => m.TablesClient),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Unity Catalog Volumes client from wrapper options. */\nexport function buildVolumesClient(\n opts: WorkspaceClientOptions,\n): VolumesClient {\n return lazyClient(\n () => import(\"@databricks/sdk-uc-volumes/v1\").then((m) => m.VolumesClient),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Unity Catalog Functions client from wrapper options. */\nexport function buildFunctionsClient(\n opts: WorkspaceClientOptions,\n): FunctionsClient {\n return lazyClient(\n () =>\n import(\"@databricks/sdk-uc-functions/v1\").then((m) => m.FunctionsClient),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Unity Catalog Connections client from wrapper options. */\nexport function buildConnectionsClient(\n opts: WorkspaceClientOptions,\n): ConnectionsClient {\n return lazyClient(\n () =>\n import(\"@databricks/sdk-uc-connections/v1\").then(\n (m) => m.ConnectionsClient,\n ),\n mapToClientOptions(opts),\n );\n}\n\n/** Build a modular Lakebase (provisioned) Database client from wrapper options. */\nexport function buildDatabaseClient(\n opts: WorkspaceClientOptions,\n): DatabaseClient {\n return lazyClient(\n () => import(\"@databricks/sdk-database/v1\").then((m) => m.DatabaseClient),\n mapToClientOptions(opts),\n );\n}\n\n/**\n * Resolve a `~/.databrickscfg` profile (+ env overlay, unless disabled). Exposed\n * so the CLI can read a profile offline without importing the SDK directly.\n */\nexport { resolve as resolveProfile } from \"@databricks/sdk-core/profiles\";\n\n/**\n * Build a modular Lakebase Postgres (autoscaling: projects, branches,\n * endpoints) client from wrapper options. Distinct from the provisioned\n * `/api/2.0/database` instance API.\n */\nexport function buildPostgresClient(\n opts: WorkspaceClientOptions,\n): PostgresClient {\n return lazyClient(\n () => import(\"@databricks/sdk-postgres/v1\").then((m) => m.PostgresClient),\n mapToClientOptions(opts),\n );\n}\n\n// ── Client type re-exports (for the facade accessor types) ───────────────\nexport type { DatabaseClient } from \"@databricks/sdk-database/v1\";\nexport type { ExperimentsClient } from \"@databricks/sdk-experiments/v1\";\nexport type { AppsClient } from \"@databricks/sdk-apps/v1\";\nexport type { FilesClient } from \"@databricks/sdk-files/v2\";\nexport type {\n DirectoryEntry as FilesDirectoryEntry,\n DownloadFileResponse as FilesDownloadResponse,\n} from \"@databricks/sdk-files/v2\";\nexport type { GenieClient } from \"@databricks/sdk-genie/v1\";\nexport type { JobsClient } from \"@databricks/sdk-jobs/v2\";\nexport type { ModelServingClient } from \"@databricks/sdk-modelserving/v1\";\nexport type { PostgresClient } from \"@databricks/sdk-postgres/v1\";\nexport type { ScimClient } from \"@databricks/sdk-scim/v1\";\nexport type { StatementExecutionClient } from \"@databricks/sdk-statementexecution/v1\";\nexport type { FunctionsClient } from \"@databricks/sdk-uc-functions/v1\";\nexport type { ConnectionsClient } from \"@databricks/sdk-uc-connections/v1\";\nexport type { TablesClient } from \"@databricks/sdk-uc-tables/v1\";\nexport type { VolumesClient } from \"@databricks/sdk-uc-volumes/v1\";\nexport type { VectorSearchClient } from \"@databricks/sdk-vectorsearch/v1\";\nexport type { WarehousesClient } from \"@databricks/sdk-warehouses/v1\";\n\n// ── Model type re-exports ────────────────────────────────────────────────\n// AppKit modules import request/response/enum types from the wrapper rather\n// than the SDK, so the import boundary holds. Type-only: the connector compares\n// state against string literals, which satisfy the SDK's `Enum | (string & {})`\n// field unions — no runtime enum values needed.\nexport type {\n ConnectionInfo,\n GetConnectionRequest,\n ListConnectionsRequest,\n ListConnectionsResponse,\n} from \"@databricks/sdk-uc-connections/v1\";\nexport type {\n ColumnInfo,\n Disposition,\n ExecuteStatementRequest,\n ExternalLink,\n Format,\n ResultData,\n ResultManifest,\n Schema,\n ServiceError,\n StatementParameter,\n StatementResponse,\n StatementStatus,\n StatementStatus_State,\n} from \"@databricks/sdk-statementexecution/v1\";\nexport type {\n DatabaseCredential,\n DatabaseInstance,\n GenerateDatabaseCredentialRequest,\n ListDatabaseInstancesRequest,\n ListDatabaseInstancesResponse,\n} from \"@databricks/sdk-database/v1\";\nexport type {\n App,\n ListAppsRequest,\n ListAppsResponse,\n} from \"@databricks/sdk-apps/v1\";\nexport type {\n GenieGetMessageQueryResultResponse,\n GenieMessage,\n} from \"@databricks/sdk-genie/v1\";\nexport type {\n FunctionInfo,\n GetFunctionRequest,\n} from \"@databricks/sdk-uc-functions/v1\";\nexport type {\n Experiment,\n ListExperimentsRequest,\n ListExperimentsResponse,\n} from \"@databricks/sdk-experiments/v1\";\nexport type {\n BaseRun,\n CancelRunRequest,\n GetJobRequest,\n GetJobResponse,\n GetRunOutputRequest,\n GetRunOutputResponse,\n GetRunRequest,\n GetRunResponse,\n ListRunsRequest,\n RunNowRequest,\n RunNowResponse,\n SubmitRunRequest,\n SubmitRunResponse,\n} from \"@databricks/sdk-jobs/v2\";\nexport type {\n GetInferenceEndpointRequest,\n InferenceEndpoint,\n InferenceEndpointDetailed,\n ListInferenceEndpointsRequest,\n ListInferenceEndpointsResponse,\n} from \"@databricks/sdk-modelserving/v1\";\nexport type {\n EndpointHealth,\n EndpointInfo,\n EndpointState,\n GetWarehouseResponse,\n} from \"@databricks/sdk-warehouses/v1\";\nexport type {\n QueryVectorIndexRequest,\n QueryVectorIndexResponse,\n} from \"@databricks/sdk-vectorsearch/v1\";\nexport type {\n GetVolumeRequest,\n VolumeInfo,\n} from \"@databricks/sdk-uc-volumes/v1\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,SAAS,cAAc,MAA8C;CACnE,MAAM,UAAU,MAAM,MAAM;AAC5B,KAAI,CAAC,QAAS,QAAO;AACrB,QAAO,gBAAgB,KAAK,QAAQ,GAAG,UAAU,WAAW;;AAK9D,MAAM,0BAA0B;;;;;;;AAQhC,SAAS,eAAe,aAAiD;CACvE,IAAI;CACJ,IAAI;CACJ,MAAM,WAAW,MACf,EAAE,WAAW,UACb,EAAE,OAAO,SAAS,GAAG,0BAA0B,KAAK,KAAK;AAC3D,QAAO,oBACL,YAAY,MAAM,EAClB,gBAAgB,YAAY;AAC1B,MAAI,WAAW,QAAQ,QAAQ,CAAE,QAAO;AACxC,eAAa,YACV,OAAO,CACP,MAAM,MAAO,UAAU,EAAG,CAC1B,cAAc;AACb,cAAW;IACX;AACJ,SAAO;GACP,CACH;;;;;;;;;;;;AAaH,SAAS,yBACP,gBACa;CACb,MAAM,SAAS,YAAkC;EAC/C,MAAM,UAAU,MAAM,QAAQ,eAAe;EAE7C,MAAM,OAAO,cAAc,QAAQ,KAAK,EAAE,QAAQ,QAAQ,GAAG;EAC7D,MAAM,EAAE,MAAM,OAAO,UAAU,cAAc,aAAa;EAC1D,MAAM,UAAU,aAAqB,CAAC,YAAY,aAAa;AAC/D,MAAI,QAAQ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E,gBAAgB,EAC1E,mBAAmB,KAAK,CACzB;;;AAIH,SAAgB,uBACd,MACmB;AACnB,QAAO,iBAEH,OAAO,qCAAqC,MACzC,MAAM,EAAE,kBACV,EACH,mBAAmB,KAAK,CACzB;;;AAIH,SAAgB,oBACd,MACgB;AAChB,QAAO,iBACC,OAAO,+BAA+B,MAAM,MAAM,EAAE,eAAe,EACzE,mBAAmB,KAAK,CACzB;;;;;;;AAcH,SAAgB,oBACd,MACgB;AAChB,QAAO,iBACC,OAAO,+BAA+B,MAAM,MAAM,EAAE,eAAe,EACzE,mBAAmB,KAAK,CACzB"}
@@ -0,0 +1,29 @@
1
+ //#region src/workspace-client/options.d.ts
2
+ /**
3
+ * Options used to construct the workspace client facade. AppKit's own shape,
4
+ * independent of any SDK: the modular clients are built from these in
5
+ * `modular.ts`.
6
+ */
7
+ /** User-Agent stamping: `<product>/<productVersion>` plus extra segments. */
8
+ interface ClientOptions {
9
+ product?: string;
10
+ productVersion?: string;
11
+ userAgentExtra?: Record<string, string>;
12
+ }
13
+ interface WorkspaceClientOptions {
14
+ /** Databricks host, e.g. https://my-workspace.cloud.databricks.com. Defaults to DATABRICKS_HOST / profile resolution. */
15
+ host?: string;
16
+ /** `~/.databrickscfg` profile name. Used when no host/token is provided. */
17
+ profile?: string;
18
+ /** Bearer token (PAT, or the user's OBO token). */
19
+ token?: string;
20
+ /**
21
+ * SDK client options (product / productVersion / userAgentExtra) used to
22
+ * stamp the outbound User-Agent. Produced by `getClientOptions()`; omitted
23
+ * by build-time callers that don't stamp a User-Agent.
24
+ */
25
+ clientOptions?: ClientOptions;
26
+ }
27
+ //#endregion
28
+ export { ClientOptions, WorkspaceClientOptions };
29
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","names":[],"sources":["../../src/workspace-client/options.ts"],"mappings":";;AAOA;;;;;UAAiB,aAAA;EACf,OAAA;EACA,cAAA;EACA,cAAA,GAAiB,MAAA;AAAA;AAAA,UAGF,sBAAA;EAAsB;EAErC,IAAA;EAU6B;EAR7B,OAAA;EAAA;EAEA,KAAA;EAMA;;;;;EAAA,aAAA,GAAgB,aAAA;AAAA"}
@@ -1,5 +1,4 @@
1
- import { LegacyWorkspaceClient } from "./legacy.js";
2
- import { files, jobs, serving, sql } from "@databricks/sdk-experimental";
1
+ import { App, AppsClient, AuthConfigError, BaseRun, CancelRunRequest, ColumnInfo, ConnectionInfo, ConnectionsClient, DatabaseClient, DatabaseCredential, DatabaseInstance, Disposition, EndpointHealth, EndpointInfo, EndpointState, ExecuteStatementRequest, Experiment, ExperimentsClient, ExternalLink, FilesClient, FilesDirectoryEntry, FilesDownloadResponse, Format, FunctionInfo, FunctionsClient, GenerateDatabaseCredentialRequest, GenieClient, GenieGetMessageQueryResultResponse, GenieMessage, GetConnectionRequest, GetFunctionRequest, GetInferenceEndpointRequest, GetJobRequest, GetJobResponse, GetRunOutputRequest, GetRunOutputResponse, GetRunRequest, GetRunResponse, GetVolumeRequest, GetWarehouseResponse, InferenceEndpoint, InferenceEndpointDetailed, JobsClient, ListAppsRequest, ListAppsResponse, ListConnectionsRequest, ListConnectionsResponse, ListDatabaseInstancesRequest, ListDatabaseInstancesResponse, ListExperimentsRequest, ListExperimentsResponse, ListInferenceEndpointsRequest, ListInferenceEndpointsResponse, ListRunsRequest, ModelServingClient, ModularApiError, PostgresClient, QueryVectorIndexRequest, QueryVectorIndexResponse, ResultData, ResultManifest, RunNowRequest, RunNowResponse, Schema, ScimClient, ServiceError, StatementExecutionClient, StatementParameter, StatementResponse, StatementStatus, StatementStatus_State, SubmitRunRequest, SubmitRunResponse, TablesClient, VectorSearchClient, VolumeInfo, VolumesClient, WarehousesClient, WorkspaceAuth, WorkspaceRequest, buildAppsClient, buildConnectionsClient, buildDatabaseClient, buildExperimentsClient, buildFilesClient, buildFunctionsClient, buildGenieClient, buildJobsClient, buildModelServingClient, buildPostgresClient, buildScimClient, buildStatementExecutionClient, buildTablesClient, buildVectorSearchClient, buildVolumesClient, buildWarehousesClient, buildWorkspaceAuth, isAuthConfigError, resolveProfile } from "./modular.js";
3
2
 
4
3
  //#region src/workspace-client/types.d.ts
5
4
  /**
@@ -7,43 +6,41 @@ import { files, jobs, serving, sql } from "@databricks/sdk-experimental";
7
6
  * modular Databricks SDK: each service is its own accessor, so services can be
8
7
  * migrated one at a time behind this stable interface.
9
8
  *
10
- * Accessors are legacy-typed for now (delegated to the underlying legacy SDK
11
- * client); see the module docblock.
12
9
  */
13
- interface WorkspaceClient$1 {
14
- /** UC Volumes / Files API. */
15
- readonly files: LegacyWorkspaceClient["files"];
16
- /** SQL Warehouses. */
17
- readonly warehouses: LegacyWorkspaceClient["warehouses"];
18
- /** Genie / dashboards. */
19
- readonly genie: LegacyWorkspaceClient["genie"];
20
- /** Jobs. */
21
- readonly jobs: LegacyWorkspaceClient["jobs"];
22
- /** Statement Execution. */
23
- readonly statementExecution: LegacyWorkspaceClient["statementExecution"];
24
- /** Serving Endpoints. */
25
- readonly servingEndpoints: LegacyWorkspaceClient["servingEndpoints"];
26
- /** Current user. */
27
- readonly currentUser: LegacyWorkspaceClient["currentUser"];
28
- /**
29
- * SDK `Config` — exposes `host` and `authenticate(headers)`. Used by the
30
- * files-upload path and agents auth-header stamping, which bypass the typed
31
- * services.
32
- */
33
- readonly config: LegacyWorkspaceClient["config"];
34
- /**
35
- * Low-level HTTP transport (`apiClient.request(...)`). Used for endpoints
36
- * without a typed service method: SCIM header probe, warehouse listing,
37
- * serving SSE streaming, vector search, internal telemetry.
38
- */
39
- readonly apiClient: LegacyWorkspaceClient["apiClient"];
40
- /**
41
- * Returns the underlying legacy `@databricks/sdk-experimental`
42
- * `WorkspaceClient`, for handoff to code still typed against the old SDK
43
- * (`@databricks/lakebase`). Transitional.
44
- */
45
- toLegacyWorkspaceClient(): LegacyWorkspaceClient;
10
+ interface WorkspaceClient extends WorkspaceAuth {
11
+ /** UC Volumes / Files API (modular SDK). */
12
+ readonly files: FilesClient;
13
+ /** SQL Warehouses (modular SDK). */
14
+ readonly warehouses: WarehousesClient;
15
+ /** Genie (modular SDK). */
16
+ readonly genie: GenieClient;
17
+ /** Lakebase provisioned database instances + credentials (modular SDK). */
18
+ readonly database: DatabaseClient;
19
+ /** Databricks Apps (modular SDK). */
20
+ readonly apps: AppsClient;
21
+ /** Jobs (modular SDK, Jobs API 2.2). */
22
+ readonly jobs: JobsClient;
23
+ /** MLflow Experiments (modular SDK). */
24
+ readonly experiments: ExperimentsClient;
25
+ /** Vector Search (modular SDK; index metadata only, queries use `request()`). */
26
+ readonly vectorSearch: VectorSearchClient;
27
+ /** Unity Catalog Tables (modular SDK). */
28
+ readonly tables: TablesClient;
29
+ /** Lakebase Postgres: autoscaling projects, branches, endpoints (modular SDK). */
30
+ readonly postgres: PostgresClient;
31
+ /** Unity Catalog Volumes (modular SDK). */
32
+ readonly volumes: VolumesClient;
33
+ /** Unity Catalog Functions (modular SDK). */
34
+ readonly functions: FunctionsClient;
35
+ /** Unity Catalog Connections (modular SDK). */
36
+ readonly connections: ConnectionsClient;
37
+ /** Statement Execution (modular SDK). */
38
+ readonly statementExecution: StatementExecutionClient;
39
+ /** Serving endpoints (modular SDK). */
40
+ readonly modelServing: ModelServingClient;
41
+ /** Current user (modular SDK SCIM client; `me({})` returns the caller). */
42
+ readonly currentUser: ScimClient;
46
43
  }
47
44
  //#endregion
48
- export { WorkspaceClient$1 as WorkspaceClient, type files, type jobs, type serving, type sql };
45
+ export { WorkspaceClient };
49
46
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/workspace-client/types.ts"],"mappings":";;;;;;;;;;;;UA6BiB,iBAAA;EAWA;EAAA,SATN,KAAA,EAAO,qBAAA;EAYa;EAAA,SATpB,UAAA,EAAY,qBAAA;EAYM;EAAA,SATlB,KAAA,EAAO,qBAAA;EAYM;EAAA,SATb,IAAA,EAAM,qBAAA;EAgBE;EAAA,SAbR,kBAAA,EAAoB,qBAAA;EAoBT;EAAA,SAjBX,gBAAA,EAAkB,qBAAA;EAwBA;EAAA,SArBlB,WAAA,EAAa,qBAAA;EAqB0B;;;;;EAAA,SAdvC,MAAA,EAAQ,qBAAA;;;;;;WAOR,SAAA,EAAW,qBAAA;;;;;;EAOpB,uBAAA,IAA2B,qBAAA;AAAA"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/workspace-client/types.ts"],"mappings":";;;;;;;;;UAkCiB,eAAA,SAAwB,aAAA;EA0BtB;EAAA,SAxBR,KAAA,EAAO,WAAA;EA6BE;EAAA,SA1BT,UAAA,EAAY,gBAAA;EAgCC;EAAA,SA7Bb,KAAA,EAAO,WAAA;EAmCO;EAAA,SAhCd,QAAA,EAAU,cAAA;EAXoB;EAAA,SAc9B,IAAA,EAAM,UAAA;EAdqC;EAAA,SAiB3C,IAAA,EAAM,UAAA;EAfN;EAAA,SAkBA,WAAA,EAAa,iBAAA;EAfb;EAAA,SAkBA,YAAA,EAAc,kBAAA;EAfd;EAAA,SAkBA,MAAA,EAAQ,YAAA;EAfR;EAAA,SAiBA,QAAA,EAAU,cAAA;EAdV;EAAA,SAiBA,OAAA,EAAS,aAAA;EAdT;EAAA,SAiBA,SAAA,EAAW,eAAA;EAdX;EAAA,SAiBA,WAAA,EAAa,iBAAA;EAdb;EAAA,SAiBA,kBAAA,EAAoB,wBAAA;EAdpB;EAAA,SAiBA,YAAA,EAAc,kBAAA;EAfd;EAAA,SAkBA,WAAA,EAAa,UAAA;AAAA"}
@@ -0,0 +1,110 @@
1
+ # Class: ApiError
2
+
3
+ ## Extends[​](#extends "Direct link to Extends")
4
+
5
+ * `Error`
6
+
7
+ ## Constructors[​](#constructors "Direct link to Constructors")
8
+
9
+ ### Constructor[​](#constructor "Direct link to Constructor")
10
+
11
+ ```ts
12
+ new ApiError(
13
+ message: string,
14
+ errorCode: string,
15
+ statusCode: number,
16
+ response?: unknown,
17
+ details?: unknown[]): ApiError;
18
+
19
+ ```
20
+
21
+ #### Parameters[​](#parameters "Direct link to Parameters")
22
+
23
+ | Parameter | Type | Default value |
24
+ | ------------ | ------------ | ------------- |
25
+ | `message` | `string` | `undefined` |
26
+ | `errorCode` | `string` | `undefined` |
27
+ | `statusCode` | `number` | `undefined` |
28
+ | `response?` | `unknown` | `undefined` |
29
+ | `details?` | `unknown`\[] | `[]` |
30
+
31
+ #### Returns[​](#returns "Direct link to Returns")
32
+
33
+ `ApiError`
34
+
35
+ #### Overrides[​](#overrides "Direct link to Overrides")
36
+
37
+ ```ts
38
+ Error.constructor
39
+
40
+ ```
41
+
42
+ ## Properties[​](#properties "Direct link to Properties")
43
+
44
+ ### details[​](#details "Direct link to details")
45
+
46
+ ```ts
47
+ readonly details: unknown[] = [];
48
+
49
+ ```
50
+
51
+ ***
52
+
53
+ ### errorCode[​](#errorcode "Direct link to errorCode")
54
+
55
+ ```ts
56
+ readonly errorCode: string;
57
+
58
+ ```
59
+
60
+ ***
61
+
62
+ ### response?[​](#response "Direct link to response?")
63
+
64
+ ```ts
65
+ readonly optional response: unknown;
66
+
67
+ ```
68
+
69
+ ***
70
+
71
+ ### statusCode[​](#statuscode "Direct link to statusCode")
72
+
73
+ ```ts
74
+ readonly statusCode: number;
75
+
76
+ ```
77
+
78
+ ## Methods[​](#methods "Direct link to Methods")
79
+
80
+ ### isRetryable()[​](#isretryable "Direct link to isRetryable()")
81
+
82
+ ```ts
83
+ isRetryable(): boolean;
84
+
85
+ ```
86
+
87
+ Like the legacy SDK: only 429 is retryable by status alone.
88
+
89
+ #### Returns[​](#returns-1 "Direct link to Returns")
90
+
91
+ `boolean`
92
+
93
+ ***
94
+
95
+ ### \[hasInstance]\()[​](#hasinstance "Direct link to \[hasInstance]()")
96
+
97
+ ```ts
98
+ static hasInstance: boolean;
99
+
100
+ ```
101
+
102
+ #### Parameters[​](#parameters-1 "Direct link to Parameters")
103
+
104
+ | Parameter | Type |
105
+ | --------- | --------- |
106
+ | `value` | `unknown` |
107
+
108
+ #### Returns[​](#returns-2 "Direct link to Returns")
109
+
110
+ `boolean`
@@ -98,7 +98,7 @@ static fromAiGateway(options: AiGatewayOptions): Promise<DatabricksAdapter>;
98
98
 
99
99
  Creates a DatabricksAdapter that talks to the Databricks AI Gateway Chat Completions endpoint (`/ai-gateway/mlflow/v1/chat/completions`).
100
100
 
101
- Unlike [fromModelServing](#frommodelserving), the target model is named in the request body (`model`, e.g. `"system.ai.claude-opus-5-5"`) rather than in the URL: the gateway is a single fixed path that routes by the body's `model`. Auth and transport reuse the SDK's `apiClient.request`, same as the serving path, so no bespoke `fetch()` + token handling. The request/response wire format and tool-calling loop are identical to the serving path.
101
+ Unlike [fromModelServing](#frommodelserving), the target model is named in the request body (`model`, e.g. `"system.ai.claude-opus-5-5"`) rather than in the URL: the gateway is a single fixed path that routes by the body's `model`. Auth and transport reuse the workspace client's `request()`, same as the serving path, so no bespoke `fetch()` + token handling. The request/response wire format and tool-calling loop are identical to the serving path.
102
102
 
103
103
  #### Parameters[​](#parameters-2 "Direct link to Parameters")
104
104
 
@@ -185,7 +185,7 @@ static fromServingEndpoint(options: ServingEndpointOptions): Promise<DatabricksA
185
185
 
186
186
  Creates a DatabricksAdapter for a Databricks Model Serving endpoint.
187
187
 
188
- Routes through the shared `connectors/serving/stream` helper, which delegates to the SDK's `apiClient.request({ raw: true })`. That gives the adapter centralised URL encoding + authentication with the rest of the serving surface — no bespoke `fetch()` + `authenticate()` plumbing.
188
+ Routes through the shared `connectors/serving/stream` helper, which delegates to the workspace client's raw `request()`. That gives the adapter centralised URL encoding + authentication with the rest of the serving surface — no bespoke `fetch()` + `authenticate()` plumbing.
189
189
 
190
190
  #### Parameters[​](#parameters-4 "Direct link to Parameters")
191
191
 
@@ -4,7 +4,7 @@ Adapter that calls the Databricks AI Gateway Responses API (`/ai-gateway/mlflow/
4
4
 
5
5
  Streams SSE events in the OpenAI Responses API wire format and maps them to the AppKit `AgentEvent` protocol. Tool execution is handled server-side, so the adapter ignores the agents-plugin tool index.
6
6
 
7
- Authentication is handled via the Databricks SDK credential chain — the same mechanism used by `DatabricksAdapter.fromModelServing`. The transport is injected via SupervisorApiAdapterCtorOptions.streamBody; the [fromSupervisorApi](./docs/api/appkit/Function.fromSupervisorApi.md) factory wires it through the SDK's `apiClient.request({ raw: true })`.
7
+ Authentication is handled via the Databricks SDK credential chain — the same mechanism used by `DatabricksAdapter.fromModelServing`. The transport is injected via SupervisorApiAdapterCtorOptions.streamBody; the [fromSupervisorApi](./docs/api/appkit/Function.fromSupervisorApi.md) factory wires it through the workspace client's raw `request()`.
8
8
 
9
9
  Set `DEBUG=appkit:agents:supervisor-api` to log the outbound request shape (model, instructions length, input shape, tool count) and to be notified when the recovery path engages (no incremental deltas, text pulled from `response.completed.output[]`). The no-delta warning includes a per-turn event-type histogram and the SA-reported status/error/ incomplete\_details, so it's already actionable without DEBUG.
10
10
 
@@ -1,7 +1,7 @@
1
1
  # Function: generateDatabaseCredential()
2
2
 
3
3
  ```ts
4
- function generateDatabaseCredential(workspaceClient: WorkspaceClient, request: GenerateDatabaseCredentialRequest): Promise<DatabaseCredential>;
4
+ function generateDatabaseCredential(workspaceClient: LakebaseWorkspaceClient, request: GenerateDatabaseCredentialRequest): Promise<DatabaseCredential>;
5
5
 
6
6
  ```
7
7
 
@@ -13,7 +13,7 @@ This generates a time-limited OAuth token (expires after 1 hour) that can be use
13
13
 
14
14
  | Parameter | Type | Description |
15
15
  | ----------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
16
- | `workspaceClient` | `WorkspaceClient` | Databricks workspace client for authentication |
16
+ | `workspaceClient` | `LakebaseWorkspaceClient` | Databricks workspace client for authentication |
17
17
  | `request` | [`GenerateDatabaseCredentialRequest`](./docs/api/appkit/Interface.GenerateDatabaseCredentialRequest.md) | Request parameters including endpoint path and optional UC claims |
18
18
 
19
19
  ## Returns[​](#returns "Direct link to Returns")
@@ -1,7 +1,7 @@
1
1
  # Function: getWorkspaceClient()
2
2
 
3
3
  ```ts
4
- function getWorkspaceClient(config: Partial<LakebasePoolConfig>): WorkspaceClient;
4
+ function getWorkspaceClient(config: Partial<LakebasePoolConfig>): LakebaseWorkspaceClient;
5
5
 
6
6
  ```
7
7
 
@@ -15,4 +15,4 @@ Get workspace client from config or SDK default auth chain
15
15
 
16
16
  ## Returns[​](#returns "Direct link to Returns")
17
17
 
18
- `WorkspaceClient`
18
+ `LakebaseWorkspaceClient`
@@ -0,0 +1,62 @@
1
+ # ~~Interface: DirectoryEntry~~
2
+
3
+ A single entry returned when listing a directory (Files API wire shape).
4
+
5
+ ## Deprecated[​](#deprecated "Direct link to Deprecated")
6
+
7
+ Legacy snake\_case shape; use [FilesDirectoryEntry](./docs/api/appkit/TypeAlias.FilesDirectoryEntry.md).
8
+
9
+ ## Properties[​](#properties "Direct link to Properties")
10
+
11
+ ### ~~file\_size?~~[​](#file_size "Direct link to file_size")
12
+
13
+ ```ts
14
+ optional file_size: number;
15
+
16
+ ```
17
+
18
+ The length of the file in bytes. Omitted for directories.
19
+
20
+ ***
21
+
22
+ ### ~~is\_directory?~~[​](#is_directory "Direct link to is_directory")
23
+
24
+ ```ts
25
+ optional is_directory: boolean;
26
+
27
+ ```
28
+
29
+ True if the path is a directory.
30
+
31
+ ***
32
+
33
+ ### ~~last\_modified?~~[​](#last_modified "Direct link to last_modified")
34
+
35
+ ```ts
36
+ optional last_modified: number;
37
+
38
+ ```
39
+
40
+ Last modification time in milliseconds since unix epoch.
41
+
42
+ ***
43
+
44
+ ### ~~name?~~[​](#name "Direct link to name")
45
+
46
+ ```ts
47
+ optional name: string;
48
+
49
+ ```
50
+
51
+ The name of the file or directory (last path component).
52
+
53
+ ***
54
+
55
+ ### ~~path?~~[​](#path "Direct link to path")
56
+
57
+ ```ts
58
+ optional path: string;
59
+
60
+ ```
61
+
62
+ The absolute path of the file or directory.
@@ -0,0 +1,45 @@
1
+ # ~~Interface: DownloadResponse~~
2
+
3
+ Response object for file downloads containing a readable stream.
4
+
5
+ ## Deprecated[​](#deprecated "Direct link to Deprecated")
6
+
7
+ Legacy header-keyed shape; use [FilesDownloadResponse](./docs/api/appkit/TypeAlias.FilesDownloadResponse.md).
8
+
9
+ ## Properties[​](#properties "Direct link to Properties")
10
+
11
+ ### ~~content-length?~~[​](#content-length "Direct link to content-length")
12
+
13
+ ```ts
14
+ optional content-length: number;
15
+
16
+ ```
17
+
18
+ ***
19
+
20
+ ### ~~content-type?~~[​](#content-type "Direct link to content-type")
21
+
22
+ ```ts
23
+ optional content-type: string;
24
+
25
+ ```
26
+
27
+ ***
28
+
29
+ ### ~~contents?~~[​](#contents "Direct link to contents")
30
+
31
+ ```ts
32
+ optional contents: ReadableStream<any>;
33
+
34
+ ```
35
+
36
+ ***
37
+
38
+ ### ~~last-modified?~~[​](#last-modified "Direct link to last-modified")
39
+
40
+ ```ts
41
+ optional last-modified: string;
42
+
43
+ ```
44
+
45
+ Last modified time in HTTP-date (RFC 7231) format.
@@ -28,7 +28,8 @@ Cancel a specific run.
28
28
  ### getJob()[​](#getjob "Direct link to getJob()")
29
29
 
30
30
  ```ts
31
- getJob(): Promise<ExecutionResult<Job>>;
31
+ getJob(): Promise<ExecutionResult<{
32
+ }>>;
32
33
 
33
34
  ```
34
35
 
@@ -36,14 +37,15 @@ Get the job definition.
36
37
 
37
38
  #### Returns[​](#returns-1 "Direct link to Returns")
38
39
 
39
- `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`Job`>>
40
+ `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<{ }>>
40
41
 
41
42
  ***
42
43
 
43
44
  ### getRun()[​](#getrun "Direct link to getRun()")
44
45
 
45
46
  ```ts
46
- getRun(runId: number): Promise<ExecutionResult<Run>>;
47
+ getRun(runId: number): Promise<ExecutionResult<{
48
+ }>>;
47
49
 
48
50
  ```
49
51
 
@@ -57,14 +59,15 @@ Get a specific run by ID.
57
59
 
58
60
  #### Returns[​](#returns-2 "Direct link to Returns")
59
61
 
60
- `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`Run`>>
62
+ `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<{ }>>
61
63
 
62
64
  ***
63
65
 
64
66
  ### getRunOutput()[​](#getrunoutput "Direct link to getRunOutput()")
65
67
 
66
68
  ```ts
67
- getRunOutput(runId: number): Promise<ExecutionResult<RunOutput>>;
69
+ getRunOutput(runId: number): Promise<ExecutionResult<{
70
+ }>>;
68
71
 
69
72
  ```
70
73
 
@@ -78,14 +81,17 @@ Get output of a specific run.
78
81
 
79
82
  #### Returns[​](#returns-3 "Direct link to Returns")
80
83
 
81
- `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`RunOutput`>>
84
+ `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<{ }>>
82
85
 
83
86
  ***
84
87
 
85
88
  ### lastRun()[​](#lastrun "Direct link to lastRun()")
86
89
 
87
90
  ```ts
88
- lastRun(): Promise<ExecutionResult<BaseRun | undefined>>;
91
+ lastRun(): Promise<ExecutionResult<
92
+ | {
93
+ }
94
+ | undefined>>;
89
95
 
90
96
  ```
91
97
 
@@ -93,7 +99,7 @@ Get the most recent run for this job.
93
99
 
94
100
  #### Returns[​](#returns-4 "Direct link to Returns")
95
101
 
96
- `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`BaseRun` | `undefined`>>
102
+ `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)< | { } | `undefined`>>
97
103
 
98
104
  ***
99
105
 
@@ -102,7 +108,8 @@ Get the most recent run for this job.
102
108
  ```ts
103
109
  listRuns(options?: {
104
110
  limit?: number;
105
- }): Promise<ExecutionResult<BaseRun[]>>;
111
+ }): Promise<ExecutionResult<{
112
+ }[]>>;
106
113
 
107
114
  ```
108
115
 
@@ -117,7 +124,7 @@ List runs for this job.
117
124
 
118
125
  #### Returns[​](#returns-5 "Direct link to Returns")
119
126
 
120
- `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`BaseRun`\[]>>
127
+ `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<{ }\[]>>
121
128
 
122
129
  ***
123
130
 
@@ -146,7 +153,8 @@ Trigger and poll until completion, yielding status updates.
146
153
  ### runNow()[​](#runnow "Direct link to runNow()")
147
154
 
148
155
  ```ts
149
- runNow(params?: Record<string, unknown>): Promise<ExecutionResult<RunNowResponse>>;
156
+ runNow(params?: Record<string, unknown>): Promise<ExecutionResult<{
157
+ }>>;
150
158
 
151
159
  ```
152
160
 
@@ -160,4 +168,4 @@ Trigger the configured job with validated params. Returns the run response.
160
168
 
161
169
  #### Returns[​](#returns-7 "Direct link to Returns")
162
170
 
163
- `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<`RunNowResponse`>>
171
+ `Promise`<[`ExecutionResult`](./docs/api/appkit/TypeAlias.ExecutionResult.md)<{ }>>
@@ -118,7 +118,7 @@ Telemetry configuration
118
118
  ### workspaceClient?[​](#workspaceclient "Direct link to workspaceClient?")
119
119
 
120
120
  ```ts
121
- optional workspaceClient: WorkspaceClient;
121
+ optional workspaceClient: LakebaseWorkspaceClient;
122
122
 
123
123
  ```
124
124