@databricks/sdk-logdelivery 0.1.0-dev.3 → 0.1.0-dev.4

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.
@@ -6,22 +6,24 @@ import { z } from 'zod';
6
6
  * `ENABLED`: All dependencies have executed and succeeded
7
7
  * `DISABLED`: At least one dependency has succeeded
8
8
  */
9
- export declare enum LogDeliveryConfigStatus {
9
+ export declare const LogDeliveryConfigStatus: {
10
10
  /** Configuration is enabled */
11
- ENABLED = "ENABLED",
11
+ readonly ENABLED: "ENABLED";
12
12
  /** Configuration is disabled */
13
- DISABLED = "DISABLED"
14
- }
13
+ readonly DISABLED: "DISABLED";
14
+ };
15
+ export type LogDeliveryConfigStatus = (typeof LogDeliveryConfigStatus)[keyof typeof LogDeliveryConfigStatus] | (string & {});
15
16
  /**
16
17
  * *
17
18
  * Log Delivery Output Format
18
19
  */
19
- export declare enum LogDeliveryOutputFormat {
20
+ export declare const LogDeliveryOutputFormat: {
20
21
  /** Deliver CSV files */
21
- CSV = "CSV",
22
+ readonly CSV: "CSV";
22
23
  /** Deliver JSON files */
23
- JSON = "JSON"
24
- }
24
+ readonly JSON: "JSON";
25
+ };
26
+ export type LogDeliveryOutputFormat = (typeof LogDeliveryOutputFormat)[keyof typeof LogDeliveryOutputFormat] | (string & {});
25
27
  /**
26
28
  * *
27
29
  * The status string for log delivery. Possible values are:
@@ -31,28 +33,30 @@ export declare enum LogDeliveryOutputFormat {
31
33
  * `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an <Databricks> internal error. Contact support if it doesn't go away soon.
32
34
  * `NOT_FOUND`: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.
33
35
  */
34
- export declare enum LogDeliveryStatusEnum {
36
+ export declare const LogDeliveryStatusEnum: {
35
37
  /** Configuration is just created and logs haven't delivered yet */
36
- CREATED = "CREATED",
38
+ readonly CREATED: "CREATED";
37
39
  /** Configuration has succeeded in the last run */
38
- SUCCEEDED = "SUCCEEDED",
40
+ readonly SUCCEEDED: "SUCCEEDED";
39
41
  /** Configuration has failed in the last run due to user failure */
40
- USER_FAILURE = "USER_FAILURE",
42
+ readonly USER_FAILURE: "USER_FAILURE";
41
43
  /** Configuration has failed in the last run due to system failure */
42
- SYSTEM_FAILURE = "SYSTEM_FAILURE",
44
+ readonly SYSTEM_FAILURE: "SYSTEM_FAILURE";
43
45
  /** Status not found */
44
- NOT_FOUND = "NOT_FOUND"
45
- }
46
+ readonly NOT_FOUND: "NOT_FOUND";
47
+ };
48
+ export type LogDeliveryStatusEnum = (typeof LogDeliveryStatusEnum)[keyof typeof LogDeliveryStatusEnum] | (string & {});
46
49
  /**
47
50
  * *
48
51
  * Log Delivery Type
49
52
  */
50
- export declare enum LogDeliveryType {
53
+ export declare const LogDeliveryType: {
51
54
  /** Deliver Billable Usage logs */
52
- BILLABLE_USAGE = "BILLABLE_USAGE",
55
+ readonly BILLABLE_USAGE: "BILLABLE_USAGE";
53
56
  /** Deliver Audit Logs */
54
- AUDIT_LOGS = "AUDIT_LOGS"
55
- }
57
+ readonly AUDIT_LOGS: "AUDIT_LOGS";
58
+ };
59
+ export type LogDeliveryType = (typeof LogDeliveryType)[keyof typeof LogDeliveryType] | (string & {});
56
60
  /**
57
61
  * *
58
62
  * Log Delivery Configuration
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/v1/model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB;;;;;;GAMG;AACH,oBAAY,uBAAuB;IACjC,+BAA+B;IAC/B,OAAO,YAAY;IACnB,gCAAgC;IAChC,QAAQ,aAAa;CACtB;AAED;;;GAGG;AACH,oBAAY,uBAAuB;IACjC,wBAAwB;IACxB,GAAG,QAAQ;IACX,yBAAyB;IACzB,IAAI,SAAS;CACd;AAED;;;;;;;;GAQG;AACH,oBAAY,qBAAqB;IAC/B,mEAAmE;IACnE,OAAO,YA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yB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,gMAAgM;IAChM,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,qCAAqC;IACpD,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oMAAoM;IACpM,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0UAA0U;IAC1U,MAAM,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;CAC9C;AAGD,MAAM,WAAW,sCAAsC;CAAG;AAE1D,eAAO,MAAM,qDAAqD,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAS7G,CAAC;AAER,eAAO,MAAM,kDAAkD,EAAE,CAAC,CAAC,OAAO,CAAC,mCAAmC,CASvG,CAAC;AAER,eAAO,MAAM,mDAAmD,EAAE,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAWzG,CAAC;AAER,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CA2CjF,CAAC;AAER,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAYrE,CAAC;AAEN,eAAO,MAAM,qDAAqD,EAAE,CAAC,CAAC,OAAO,CAAC,sCAAsC,CACtG,CAAC;AAEf,eAAO,MAAM,iDAAiD,EAAE,CAAC,CAAC,OAgC7D,CAAC;AAEN,eAAO,MAAM,kDAAkD,EAAE,CAAC,CAAC,OAQ9D,CAAC;AAEN,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAY1C,CAAC;AAEN,eAAO,MAAM,kDAAkD,EAAE,CAAC,CAAC,OAU9D,CAAC"}
package/dist/v1/model.js CHANGED
@@ -7,24 +7,24 @@ import { z } from 'zod';
7
7
  * `ENABLED`: All dependencies have executed and succeeded
8
8
  * `DISABLED`: At least one dependency has succeeded
9
9
  */
10
- export var LogDeliveryConfigStatus;
11
- (function (LogDeliveryConfigStatus) {
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
11
+ export const LogDeliveryConfigStatus = {
12
12
  /** Configuration is enabled */
13
- LogDeliveryConfigStatus["ENABLED"] = "ENABLED";
13
+ ENABLED: 'ENABLED',
14
14
  /** Configuration is disabled */
15
- LogDeliveryConfigStatus["DISABLED"] = "DISABLED";
16
- })(LogDeliveryConfigStatus || (LogDeliveryConfigStatus = {}));
15
+ DISABLED: 'DISABLED',
16
+ };
17
17
  /**
18
18
  * *
19
19
  * Log Delivery Output Format
20
20
  */
21
- export var LogDeliveryOutputFormat;
22
- (function (LogDeliveryOutputFormat) {
21
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
22
+ export const LogDeliveryOutputFormat = {
23
23
  /** Deliver CSV files */
24
- LogDeliveryOutputFormat["CSV"] = "CSV";
24
+ CSV: 'CSV',
25
25
  /** Deliver JSON files */
26
- LogDeliveryOutputFormat["JSON"] = "JSON";
27
- })(LogDeliveryOutputFormat || (LogDeliveryOutputFormat = {}));
26
+ JSON: 'JSON',
27
+ };
28
28
  /**
29
29
  * *
30
30
  * The status string for log delivery. Possible values are:
@@ -34,30 +34,30 @@ export var LogDeliveryOutputFormat;
34
34
  * `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an <Databricks> internal error. Contact support if it doesn't go away soon.
35
35
  * `NOT_FOUND`: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.
36
36
  */
37
- export var LogDeliveryStatusEnum;
38
- (function (LogDeliveryStatusEnum) {
37
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
38
+ export const LogDeliveryStatusEnum = {
39
39
  /** Configuration is just created and logs haven't delivered yet */
40
- LogDeliveryStatusEnum["CREATED"] = "CREATED";
40
+ CREATED: 'CREATED',
41
41
  /** Configuration has succeeded in the last run */
42
- LogDeliveryStatusEnum["SUCCEEDED"] = "SUCCEEDED";
42
+ SUCCEEDED: 'SUCCEEDED',
43
43
  /** Configuration has failed in the last run due to user failure */
44
- LogDeliveryStatusEnum["USER_FAILURE"] = "USER_FAILURE";
44
+ USER_FAILURE: 'USER_FAILURE',
45
45
  /** Configuration has failed in the last run due to system failure */
46
- LogDeliveryStatusEnum["SYSTEM_FAILURE"] = "SYSTEM_FAILURE";
46
+ SYSTEM_FAILURE: 'SYSTEM_FAILURE',
47
47
  /** Status not found */
48
- LogDeliveryStatusEnum["NOT_FOUND"] = "NOT_FOUND";
49
- })(LogDeliveryStatusEnum || (LogDeliveryStatusEnum = {}));
48
+ NOT_FOUND: 'NOT_FOUND',
49
+ };
50
50
  /**
51
51
  * *
52
52
  * Log Delivery Type
53
53
  */
54
- export var LogDeliveryType;
55
- (function (LogDeliveryType) {
54
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
55
+ export const LogDeliveryType = {
56
56
  /** Deliver Billable Usage logs */
57
- LogDeliveryType["BILLABLE_USAGE"] = "BILLABLE_USAGE";
57
+ BILLABLE_USAGE: 'BILLABLE_USAGE',
58
58
  /** Deliver Audit Logs */
59
- LogDeliveryType["AUDIT_LOGS"] = "AUDIT_LOGS";
60
- })(LogDeliveryType || (LogDeliveryType = {}));
59
+ AUDIT_LOGS: 'AUDIT_LOGS',
60
+ };
61
61
  export const unmarshalCreateLogDeliveryConfigurationResponseSchema = z
62
62
  .object({
63
63
  log_delivery_configuration: z
@@ -91,8 +91,8 @@ export const unmarshalLogDeliveryConfigurationSchema = z
91
91
  .object({
92
92
  config_id: z.string().optional(),
93
93
  config_name: z.string().optional(),
94
- log_type: z.enum(LogDeliveryType).optional(),
95
- output_format: z.enum(LogDeliveryOutputFormat).optional(),
94
+ log_type: z.string().optional(),
95
+ output_format: z.string().optional(),
96
96
  account_id: z.string().optional(),
97
97
  credentials_id: z.string().optional(),
98
98
  storage_configuration_id: z.string().optional(),
@@ -101,7 +101,7 @@ export const unmarshalLogDeliveryConfigurationSchema = z
101
101
  .optional(),
102
102
  delivery_path_prefix: z.string().optional(),
103
103
  delivery_start_time: z.string().optional(),
104
- status: z.enum(LogDeliveryConfigStatus).optional(),
104
+ status: z.string().optional(),
105
105
  creation_time: z
106
106
  .union([z.number(), z.bigint()])
107
107
  .transform(v => BigInt(v))
@@ -132,7 +132,7 @@ export const unmarshalLogDeliveryConfigurationSchema = z
132
132
  }));
133
133
  export const unmarshalLogDeliveryStatusSchema = z
134
134
  .object({
135
- status: z.enum(LogDeliveryStatusEnum).optional(),
135
+ status: z.string().optional(),
136
136
  last_attempt_time: z.string().optional(),
137
137
  last_successful_attempt_time: z.string().optional(),
138
138
  message: z.string().optional(),
@@ -148,15 +148,15 @@ export const marshalCreateLogDeliveryConfigurationParamsSchema = z
148
148
  .object({
149
149
  configId: z.string().optional(),
150
150
  configName: z.string().optional(),
151
- logType: z.enum(LogDeliveryType).optional(),
152
- outputFormat: z.enum(LogDeliveryOutputFormat).optional(),
151
+ logType: z.string().optional(),
152
+ outputFormat: z.string().optional(),
153
153
  accountId: z.string().optional(),
154
154
  credentialsId: z.string().optional(),
155
155
  storageConfigurationId: z.string().optional(),
156
156
  workspaceIdsFilter: z.array(z.bigint()).optional(),
157
157
  deliveryPathPrefix: z.string().optional(),
158
158
  deliveryStartTime: z.string().optional(),
159
- status: z.enum(LogDeliveryConfigStatus).optional(),
159
+ status: z.string().optional(),
160
160
  creationTime: z.bigint().optional(),
161
161
  updateTime: z.bigint().optional(),
162
162
  logDeliveryStatus: z.lazy(() => marshalLogDeliveryStatusSchema).optional(),
@@ -188,7 +188,7 @@ export const marshalCreateLogDeliveryConfigurationRequestSchema = z
188
188
  }));
189
189
  export const marshalLogDeliveryStatusSchema = z
190
190
  .object({
191
- status: z.enum(LogDeliveryStatusEnum).optional(),
191
+ status: z.string().optional(),
192
192
  lastAttemptTime: z.string().optional(),
193
193
  lastSuccessfulAttemptTime: z.string().optional(),
194
194
  message: z.string().optional(),
@@ -203,7 +203,7 @@ export const marshalUpdateLogDeliveryConfigurationRequestSchema = z
203
203
  .object({
204
204
  configId: z.string().optional(),
205
205
  accountId: z.string().optional(),
206
- status: z.enum(LogDeliveryConfigStatus).optional(),
206
+ status: z.string().optional(),
207
207
  })
208
208
  .transform(d => ({
209
209
  config_id: d.configId,
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/v1/model.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,+BAA+B;IAC/B,8CAAmB,CAAA;IACnB,gCAAgC;IAChC,gDAAqB,CAAA;AACvB,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,QAKlC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,wBAAwB;IACxB,sCAAW,CAAA;IACX,yBAAyB;IACzB,wCAAa,CAAA;AACf,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,QAKlC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAC/B,mEAAmE;IACnE,4CAAmB,CAAA;IACnB,kDAAkD;IAClD,gDAAuB,CAAA;IACvB,mEAAmE;IACnE,sDAA6B,CAAA;IAC7B,qEAAqE;IACrE,0DAAiC,CAAA;IACjC,uBAAuB;IACvB,gDAAuB,CAAA;AACzB,CAAC,EAXW,qBAAqB,KAArB,qBAAqB,QAWhC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,kCAAkC;IAClC,oDAAiC,CAAA;IACjC,yBAAyB;IACzB,4CAAyB,CAAA;AAC3B,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAkLD,MAAM,CAAC,MAAM,qDAAqD,GAChE,CAAC;KACE,MAAM,CAAC;IACN,0BAA0B,EAAE,CAAC;SAC1B,IAAI,CA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,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,GACzC,WAAW,CASb;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAK1E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAEvE;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,eAAe,GACtB,IAAI,CAuBN"}
package/dist/v1/utils.js CHANGED
@@ -79,7 +79,8 @@ export function buildHttpRequest(method, url, headers, signal, body) {
79
79
  }
80
80
  export function parseResponse(body, schema) {
81
81
  const text = new TextDecoder().decode(body);
82
- const parsed = jsonBigint.parse(text);
82
+ // 204 responses return an empty body; treat as `{}`.
83
+ const parsed = text === '' ? {} : jsonBigint.parse(text);
83
84
  return schema.parse(parsed);
84
85
  }
85
86
  export function marshalRequest(data, schema) {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/v1/utils.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAG/E,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAQvD,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,0EAA0E;AAC1E,6EAA6E;AAC7E,gEAAgE;AAChE,MAAM,UAAU,GAAG,OAAO,CAAC,EAAC,eAAe,EAAE,IAAI,EAAC,CAAC,CAAC;AAQpD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,IAA6C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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sdk-logdelivery",
3
- "version": "0.1.0-dev.3",
3
+ "version": "0.1.0-dev.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -12,7 +12,6 @@
12
12
  },
13
13
  "files": [
14
14
  "dist",
15
- "src",
16
15
  "LICENSE"
17
16
  ],
18
17
  "scripts": {
@@ -29,9 +28,9 @@
29
28
  "author": "Databricks",
30
29
  "license": "Apache-2.0",
31
30
  "dependencies": {
32
- "@databricks/sdk-auth": ">=0.1.0-dev.4 <1.0.0",
33
- "@databricks/sdk-core": ">=0.1.0-dev.5 <1.0.0",
34
- "@databricks/sdk-options": ">=0.1.0-dev.4 <1.0.0",
31
+ "@databricks/sdk-auth": ">=0.1.0-dev.5 <1.0.0",
32
+ "@databricks/sdk-core": ">=0.1.0-dev.6 <1.0.0",
33
+ "@databricks/sdk-options": ">=0.1.0-dev.5 <1.0.0",
35
34
  "@js-temporal/polyfill": "^0.5.0",
36
35
  "json-bigint": "^1.0.0",
37
36
  "zod": "^4.3.6"
package/src/v1/client.ts DELETED
@@ -1,241 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
4
- import {createDefault} from '@databricks/sdk-core/clientinfo';
5
- import type {Logger} from '@databricks/sdk-core/logger';
6
- import {NoOpLogger} from '@databricks/sdk-core/logger';
7
- import type {CallOptions} from '@databricks/sdk-options/call';
8
- import type {ClientOptions} from '@databricks/sdk-options/client';
9
- import type {HttpClient} from '@databricks/sdk-core/http';
10
- import {newHttpClient} from './transport';
11
- import {
12
- buildHttpRequest,
13
- executeCall,
14
- executeHttpCall,
15
- marshalRequest,
16
- parseResponse,
17
- } from './utils';
18
- import pkgJson from '../../package.json' with {type: 'json'};
19
- import type {
20
- CreateLogDeliveryConfigurationRequest,
21
- CreateLogDeliveryConfigurationResponse,
22
- GetLogDeliveryConfigurationRequest,
23
- GetLogDeliveryConfigurationResponse,
24
- ListLogDeliveryConfigurationRequest,
25
- ListLogDeliveryConfigurationResponse,
26
- LogDeliveryConfiguration,
27
- UpdateLogDeliveryConfigurationRequest,
28
- UpdateLogDeliveryConfigurationResponse,
29
- } from './model';
30
- import {
31
- marshalCreateLogDeliveryConfigurationRequestSchema,
32
- marshalUpdateLogDeliveryConfigurationRequestSchema,
33
- unmarshalCreateLogDeliveryConfigurationResponseSchema,
34
- unmarshalGetLogDeliveryConfigurationResponseSchema,
35
- unmarshalListLogDeliveryConfigurationResponseSchema,
36
- unmarshalUpdateLogDeliveryConfigurationResponseSchema,
37
- } from './model';
38
-
39
- // Package identity segment for this client to be used in the User-Agent header.
40
- const PACKAGE_SEGMENT = {
41
- key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
42
- value: pkgJson.version,
43
- };
44
-
45
- export class LogDeliveryClient {
46
- private readonly host: string;
47
- // Fallback for endpoints whose path contains {account_id}. If the request
48
- // already carries an accountId, that value wins.
49
- private readonly accountId: string | undefined;
50
- private readonly httpClient: HttpClient;
51
- private readonly logger: Logger;
52
- // User-Agent header value. Composed once at construction from
53
- // createDefault() merged with this package's identity and the active
54
- // credential's name.
55
- private readonly userAgent: string;
56
-
57
- constructor(options: ClientOptions) {
58
- if (options.host === undefined) {
59
- throw new Error('Host is required.');
60
- }
61
- this.host = options.host.replace(/\/$/, '');
62
- this.accountId = options.accountId;
63
- this.logger = options.logger ?? new NoOpLogger();
64
- const info = createDefault()
65
- .with(PACKAGE_SEGMENT)
66
- .with({key: 'sdk-js-auth', value: AUTH_VERSION})
67
- .with({key: 'auth', value: options.credentials?.name() ?? 'default'});
68
- this.userAgent = info.toString();
69
- this.httpClient = newHttpClient(options);
70
- }
71
-
72
- /**
73
- * Creates a new <Databricks> log delivery configuration to enable delivery of the specified type of logs to your storage location.
74
- * This requires that you already created a [credential object](:method:Credentials/Create) (which encapsulates a cross-account service IAM role)
75
- * and a [storage configuration object](:method:Storage/Create) (which encapsulates an S3 bucket).
76
- *
77
- * For full details, including the required IAM role policies and bucket policies,
78
- * see [Deliver and access billable usage logs](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html)
79
- * or [Configure audit logging](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
80
- *
81
- * **Note**: There is a limit on the number of log delivery configurations available per account (each limit applies separately to each log type including billable usage and audit logs).
82
- * You can create a maximum of two enabled account-level delivery configurations (configurations without a workspace filter) per type.
83
- * Additionally, you can create two enabled workspace-level delivery configurations per workspace for each log type, which means that the same workspace ID can occur in the workspace filter for no more than two delivery configurations per log type.
84
- *
85
- * You cannot delete a log delivery configuration, but you can disable it (see [Enable or disable log delivery configuration](:method:LogDelivery/PatchStatus)).
86
- */
87
- async createLogDeliveryConfiguration(
88
- req: CreateLogDeliveryConfigurationRequest,
89
- options?: CallOptions
90
- ): Promise<CreateLogDeliveryConfigurationResponse> {
91
- const url = `${this.host}/api/2.0/accounts/${req.logDeliveryConfiguration?.accountId ?? this.accountId ?? ''}/log-delivery`;
92
- const body = marshalRequest(
93
- req,
94
- marshalCreateLogDeliveryConfigurationRequestSchema
95
- );
96
- let resp: CreateLogDeliveryConfigurationResponse | undefined;
97
- const call = async (callSignal?: AbortSignal): Promise<void> => {
98
- const headers = new Headers({'Content-Type': 'application/json'});
99
- headers.set('User-Agent', this.userAgent);
100
- const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
101
- const respBody = await executeHttpCall({
102
- request: httpReq,
103
- httpClient: this.httpClient,
104
- logger: this.logger,
105
- });
106
- resp = parseResponse(
107
- respBody,
108
- unmarshalCreateLogDeliveryConfigurationResponseSchema
109
- );
110
- };
111
- await executeCall(call, options);
112
- if (resp === undefined) {
113
- throw new Error('operation completed without a result.');
114
- }
115
- return resp;
116
- }
117
-
118
- /** Gets a <Databricks> log delivery configuration object for an account, both specified by ID. */
119
- async getLogDeliveryConfiguration(
120
- req: GetLogDeliveryConfigurationRequest,
121
- options?: CallOptions
122
- ): Promise<GetLogDeliveryConfigurationResponse> {
123
- const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/log-delivery/${req.configId ?? ''}`;
124
- let resp: GetLogDeliveryConfigurationResponse | undefined;
125
- const call = async (callSignal?: AbortSignal): Promise<void> => {
126
- const headers = new Headers();
127
- headers.set('User-Agent', this.userAgent);
128
- const httpReq = buildHttpRequest('GET', url, headers, callSignal);
129
- const respBody = await executeHttpCall({
130
- request: httpReq,
131
- httpClient: this.httpClient,
132
- logger: this.logger,
133
- });
134
- resp = parseResponse(
135
- respBody,
136
- unmarshalGetLogDeliveryConfigurationResponseSchema
137
- );
138
- };
139
- await executeCall(call, options);
140
- if (resp === undefined) {
141
- throw new Error('operation completed without a result.');
142
- }
143
- return resp;
144
- }
145
-
146
- /** Gets all <Databricks> log delivery configurations associated with an account specified by ID. */
147
- async listLogDeliveryConfiguration(
148
- req: ListLogDeliveryConfigurationRequest,
149
- options?: CallOptions
150
- ): Promise<ListLogDeliveryConfigurationResponse> {
151
- const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/log-delivery`;
152
- const params = new URLSearchParams();
153
- if (req.credentialsId !== undefined) {
154
- params.append('credentials_id', req.credentialsId);
155
- }
156
- if (req.storageConfigurationId !== undefined) {
157
- params.append('storage_configuration_id', req.storageConfigurationId);
158
- }
159
- if (req.status !== undefined) {
160
- params.append('status', req.status);
161
- }
162
- if (req.pageToken !== undefined) {
163
- params.append('page_token', req.pageToken);
164
- }
165
- const query = params.toString();
166
- const fullUrl = query !== '' ? `${url}?${query}` : url;
167
- let resp: ListLogDeliveryConfigurationResponse | undefined;
168
- const call = async (callSignal?: AbortSignal): Promise<void> => {
169
- const headers = new Headers();
170
- headers.set('User-Agent', this.userAgent);
171
- const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
172
- const respBody = await executeHttpCall({
173
- request: httpReq,
174
- httpClient: this.httpClient,
175
- logger: this.logger,
176
- });
177
- resp = parseResponse(
178
- respBody,
179
- unmarshalListLogDeliveryConfigurationResponseSchema
180
- );
181
- };
182
- await executeCall(call, options);
183
- if (resp === undefined) {
184
- throw new Error('operation completed without a result.');
185
- }
186
- return resp;
187
- }
188
-
189
- async *listLogDeliveryConfigurationIter(
190
- req: ListLogDeliveryConfigurationRequest,
191
- options?: CallOptions
192
- ): AsyncGenerator<LogDeliveryConfiguration> {
193
- const pageReq: ListLogDeliveryConfigurationRequest = {...req};
194
- for (;;) {
195
- const resp = await this.listLogDeliveryConfiguration(pageReq, options);
196
- for (const item of resp.logDeliveryConfigurations ?? []) {
197
- yield item;
198
- }
199
- if (resp.nextPageToken === undefined || resp.nextPageToken === '') {
200
- return;
201
- }
202
- pageReq.pageToken = resp.nextPageToken;
203
- }
204
- }
205
-
206
- /**
207
- * Enables or disables a log delivery configuration.
208
- * Deletion of delivery configurations is not supported, so disable log delivery configurations that are no longer needed.
209
- * Note that you can't re-enable a delivery configuration if this would violate the delivery configuration limits described under [Create log delivery](:method:LogDelivery/Create).
210
- */
211
- async updateLogDeliveryConfiguration(
212
- req: UpdateLogDeliveryConfigurationRequest,
213
- options?: CallOptions
214
- ): Promise<UpdateLogDeliveryConfigurationResponse> {
215
- const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/log-delivery/${req.configId ?? ''}`;
216
- const body = marshalRequest(
217
- req,
218
- marshalUpdateLogDeliveryConfigurationRequestSchema
219
- );
220
- let resp: UpdateLogDeliveryConfigurationResponse | undefined;
221
- const call = async (callSignal?: AbortSignal): Promise<void> => {
222
- const headers = new Headers({'Content-Type': 'application/json'});
223
- headers.set('User-Agent', this.userAgent);
224
- const httpReq = buildHttpRequest('PATCH', url, headers, callSignal, body);
225
- const respBody = await executeHttpCall({
226
- request: httpReq,
227
- httpClient: this.httpClient,
228
- logger: this.logger,
229
- });
230
- resp = parseResponse(
231
- respBody,
232
- unmarshalUpdateLogDeliveryConfigurationResponseSchema
233
- );
234
- };
235
- await executeCall(call, options);
236
- if (resp === undefined) {
237
- throw new Error('operation completed without a result.');
238
- }
239
- return resp;
240
- }
241
- }
package/src/v1/index.ts DELETED
@@ -1,24 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- export {LogDeliveryClient} from './client';
4
-
5
- export {
6
- LogDeliveryConfigStatus,
7
- LogDeliveryOutputFormat,
8
- LogDeliveryStatusEnum,
9
- LogDeliveryType,
10
- } from './model';
11
-
12
- export type {
13
- CreateLogDeliveryConfigurationParams,
14
- CreateLogDeliveryConfigurationRequest,
15
- CreateLogDeliveryConfigurationResponse,
16
- GetLogDeliveryConfigurationRequest,
17
- GetLogDeliveryConfigurationResponse,
18
- ListLogDeliveryConfigurationRequest,
19
- ListLogDeliveryConfigurationResponse,
20
- LogDeliveryConfiguration,
21
- LogDeliveryStatus,
22
- UpdateLogDeliveryConfigurationRequest,
23
- UpdateLogDeliveryConfigurationResponse,
24
- } from './model';
package/src/v1/model.ts DELETED
@@ -1,404 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import {z} from 'zod';
4
-
5
- /**
6
- * *
7
- * Log Delivery Status
8
- *
9
- * `ENABLED`: All dependencies have executed and succeeded
10
- * `DISABLED`: At least one dependency has succeeded
11
- */
12
- export enum LogDeliveryConfigStatus {
13
- /** Configuration is enabled */
14
- ENABLED = 'ENABLED',
15
- /** Configuration is disabled */
16
- DISABLED = 'DISABLED',
17
- }
18
-
19
- /**
20
- * *
21
- * Log Delivery Output Format
22
- */
23
- export enum LogDeliveryOutputFormat {
24
- /** Deliver CSV files */
25
- CSV = 'CSV',
26
- /** Deliver JSON files */
27
- JSON = 'JSON',
28
- }
29
-
30
- /**
31
- * *
32
- * The status string for log delivery. Possible values are:
33
- * `CREATED`: There were no log delivery attempts since the config was created.
34
- * `SUCCEEDED`: The latest attempt of log delivery has succeeded completely.
35
- * `USER_FAILURE`: The latest attempt of log delivery failed because of misconfiguration of customer provided permissions on role or storage.
36
- * `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an <Databricks> internal error. Contact support if it doesn't go away soon.
37
- * `NOT_FOUND`: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.
38
- */
39
- export enum LogDeliveryStatusEnum {
40
- /** Configuration is just created and logs haven't delivered yet */
41
- CREATED = 'CREATED',
42
- /** Configuration has succeeded in the last run */
43
- SUCCEEDED = 'SUCCEEDED',
44
- /** Configuration has failed in the last run due to user failure */
45
- USER_FAILURE = 'USER_FAILURE',
46
- /** Configuration has failed in the last run due to system failure */
47
- SYSTEM_FAILURE = 'SYSTEM_FAILURE',
48
- /** Status not found */
49
- NOT_FOUND = 'NOT_FOUND',
50
- }
51
-
52
- /**
53
- * *
54
- * Log Delivery Type
55
- */
56
- export enum LogDeliveryType {
57
- /** Deliver Billable Usage logs */
58
- BILLABLE_USAGE = 'BILLABLE_USAGE',
59
- /** Deliver Audit Logs */
60
- AUDIT_LOGS = 'AUDIT_LOGS',
61
- }
62
-
63
- /**
64
- * *
65
- * Log Delivery Configuration
66
- */
67
- export interface CreateLogDeliveryConfigurationParams {
68
- /** The unique UUID of log delivery configuration */
69
- configId?: string | undefined;
70
- /** The optional human-readable name of the log delivery configuration. Defaults to empty. */
71
- configName?: string | undefined;
72
- /**
73
- * Log delivery type. Supported values are:
74
- * * `BILLABLE_USAGE` — Configure [billable usage log delivery](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html). For the CSV schema, see the [View billable usage](https://docs.databricks.com/administration-guide/account-settings/usage.html).
75
- * * `AUDIT_LOGS` — Configure [audit log delivery](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html). For the JSON schema, see [Configure audit logging](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html)
76
- */
77
- logType?: LogDeliveryType | undefined;
78
- /**
79
- * The file type of log delivery.
80
- * * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the CSV (comma-separated values) format is supported. For the schema, see the [View billable usage](https://docs.databricks.com/administration-guide/account-settings/usage.html)
81
- * * If `log_type` is `AUDIT_LOGS`, this value must be `JSON`. Only the JSON (JavaScript Object Notation) format is supported. For the schema, see the [Configuring audit logs](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
82
- */
83
- outputFormat?: LogDeliveryOutputFormat | undefined;
84
- /** <Databricks> account ID. */
85
- accountId?: string | undefined;
86
- /** The ID for a method:credentials/create that represents the AWS IAM role with policy and trust relationship as described in the main billable usage documentation page. See [Configure billable usage delivery](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html). */
87
- credentialsId?: string | undefined;
88
- /** The ID for a method:storage/create that represents the S3 bucket with bucket policy as described in the main billable usage documentation page. See [Configure billable usage delivery](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html). */
89
- storageConfigurationId?: string | undefined;
90
- /** Optional filter that specifies workspace IDs to deliver logs for. By default the workspace filter is empty and log delivery applies at the account level, delivering workspace-level logs for all workspaces in your account, plus account level logs. You can optionally set this field to an array of workspace IDs (each one is an `int64`) to which log delivery should apply, in which case only workspace-level logs relating to the specified workspaces are delivered. If you plan to use different log delivery configurations for different workspaces, set this field explicitly. Be aware that delivery configurations mentioning specific workspaces won't apply to new workspaces created in the future, and delivery won't include account level logs. For some types of <Databricks> deployments there is only one workspace per account ID, so this field is unnecessary. */
91
- workspaceIdsFilter?: bigint[] | undefined;
92
- /** The optional delivery path prefix within Amazon S3 storage. Defaults to empty, which means that logs are delivered to the root of the bucket. This must be a valid S3 object key. This must not start or end with a slash character. */
93
- deliveryPathPrefix?: string | undefined;
94
- /** This field applies only if log_type is BILLABLE_USAGE. This is the optional start month and year for delivery, specified in YYYY-MM format. Defaults to current year and month. BILLABLE_USAGE logs are not available for usage before March 2019 (2019-03). */
95
- deliveryStartTime?: string | undefined;
96
- /** Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed. */
97
- status?: LogDeliveryConfigStatus | undefined;
98
- /** Time in epoch milliseconds when the log delivery configuration was created. */
99
- creationTime?: bigint | undefined;
100
- /** Time in epoch milliseconds when the log delivery configuration was updated. */
101
- updateTime?: bigint | undefined;
102
- /** The LogDeliveryStatus of this log delivery configuration */
103
- logDeliveryStatus?: LogDeliveryStatus | undefined;
104
- }
105
-
106
- /**
107
- * *
108
- * Properties of the new log delivery configuration.
109
- */
110
- export interface CreateLogDeliveryConfigurationRequest {
111
- logDeliveryConfiguration?: CreateLogDeliveryConfigurationParams | undefined;
112
- }
113
-
114
- export interface CreateLogDeliveryConfigurationResponse {
115
- /** The created log delivery configuration */
116
- logDeliveryConfiguration?: LogDeliveryConfiguration | undefined;
117
- }
118
-
119
- /**
120
- * *
121
- * Get Log Delivery Configuration
122
- */
123
- export interface GetLogDeliveryConfigurationRequest {
124
- /** The log delivery configuration id of customer */
125
- configId?: string | undefined;
126
- /** <Databricks> account ID. */
127
- accountId?: string | undefined;
128
- }
129
-
130
- export interface GetLogDeliveryConfigurationResponse {
131
- /** The fetched log delivery configuration */
132
- logDeliveryConfiguration?: LogDeliveryConfiguration | undefined;
133
- }
134
-
135
- /**
136
- * *
137
- * List Log Delivery Configuration
138
- */
139
- export interface ListLogDeliveryConfigurationRequest {
140
- /** <Databricks> account ID. */
141
- accountId?: string | undefined;
142
- /** The Credentials id to filter the search results with */
143
- credentialsId?: string | undefined;
144
- /** The Storage Configuration id to filter the search results with */
145
- storageConfigurationId?: string | undefined;
146
- /** The log delivery status to filter the search results with */
147
- status?: LogDeliveryConfigStatus | undefined;
148
- /**
149
- * A page token received from a previous get all budget configurations call. This token can be used to retrieve the subsequent page.
150
- * Requests first page if absent.
151
- */
152
- pageToken?: string | undefined;
153
- }
154
-
155
- export interface ListLogDeliveryConfigurationResponse {
156
- /** Log delivery configurations were returned successfully. */
157
- logDeliveryConfigurations?: LogDeliveryConfiguration[] | undefined;
158
- /** Token which can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no subsequent budgets. */
159
- nextPageToken?: string | undefined;
160
- }
161
-
162
- /**
163
- * *
164
- * Log Delivery Configuration
165
- */
166
- export interface LogDeliveryConfiguration {
167
- /** The unique UUID of log delivery configuration */
168
- configId?: string | undefined;
169
- /** The optional human-readable name of the log delivery configuration. Defaults to empty. */
170
- configName?: string | undefined;
171
- /**
172
- * Log delivery type. Supported values are:
173
- * * `BILLABLE_USAGE` — Configure [billable usage log delivery](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html). For the CSV schema, see the [View billable usage](https://docs.databricks.com/administration-guide/account-settings/usage.html).
174
- * * `AUDIT_LOGS` — Configure [audit log delivery](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html). For the JSON schema, see [Configure audit logging](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html)
175
- */
176
- logType?: LogDeliveryType | undefined;
177
- /**
178
- * The file type of log delivery.
179
- * * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the CSV (comma-separated values) format is supported. For the schema, see the [View billable usage](https://docs.databricks.com/administration-guide/account-settings/usage.html)
180
- * * If `log_type` is `AUDIT_LOGS`, this value must be `JSON`. Only the JSON (JavaScript Object Notation) format is supported. For the schema, see the [Configuring audit logs](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
181
- */
182
- outputFormat?: LogDeliveryOutputFormat | undefined;
183
- /** <Databricks> account ID. */
184
- accountId?: string | undefined;
185
- /** The ID for a method:credentials/create that represents the AWS IAM role with policy and trust relationship as described in the main billable usage documentation page. See [Configure billable usage delivery](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html). */
186
- credentialsId?: string | undefined;
187
- /** The ID for a method:storage/create that represents the S3 bucket with bucket policy as described in the main billable usage documentation page. See [Configure billable usage delivery](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html). */
188
- storageConfigurationId?: string | undefined;
189
- /** Optional filter that specifies workspace IDs to deliver logs for. By default the workspace filter is empty and log delivery applies at the account level, delivering workspace-level logs for all workspaces in your account, plus account level logs. You can optionally set this field to an array of workspace IDs (each one is an `int64`) to which log delivery should apply, in which case only workspace-level logs relating to the specified workspaces are delivered. If you plan to use different log delivery configurations for different workspaces, set this field explicitly. Be aware that delivery configurations mentioning specific workspaces won't apply to new workspaces created in the future, and delivery won't include account level logs. For some types of <Databricks> deployments there is only one workspace per account ID, so this field is unnecessary. */
190
- workspaceIdsFilter?: bigint[] | undefined;
191
- /** The optional delivery path prefix within Amazon S3 storage. Defaults to empty, which means that logs are delivered to the root of the bucket. This must be a valid S3 object key. This must not start or end with a slash character. */
192
- deliveryPathPrefix?: string | undefined;
193
- /** This field applies only if log_type is BILLABLE_USAGE. This is the optional start month and year for delivery, specified in YYYY-MM format. Defaults to current year and month. BILLABLE_USAGE logs are not available for usage before March 2019 (2019-03). */
194
- deliveryStartTime?: string | undefined;
195
- /** Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed. */
196
- status?: LogDeliveryConfigStatus | undefined;
197
- /** Time in epoch milliseconds when the log delivery configuration was created. */
198
- creationTime?: bigint | undefined;
199
- /** Time in epoch milliseconds when the log delivery configuration was updated. */
200
- updateTime?: bigint | undefined;
201
- /** The LogDeliveryStatus of this log delivery configuration */
202
- logDeliveryStatus?: LogDeliveryStatus | undefined;
203
- }
204
-
205
- export interface LogDeliveryStatus {
206
- /**
207
- * Enum that describes the status. Possible values are:
208
- * * `CREATED`: There were no log delivery attempts since the config was created.
209
- * * `SUCCEEDED`: The latest attempt of log delivery has succeeded completely.
210
- * * `USER_FAILURE`: The latest attempt of log delivery failed because of misconfiguration of customer provided permissions on role or storage.
211
- * * `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an <Databricks> internal error. Contact support if it doesn't go away soon.
212
- * * `NOT_FOUND`: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.
213
- */
214
- status?: LogDeliveryStatusEnum | undefined;
215
- /** The UTC time for the latest log delivery attempt. */
216
- lastAttemptTime?: string | undefined;
217
- /** The UTC time for the latest successful log delivery. */
218
- lastSuccessfulAttemptTime?: string | undefined;
219
- /** Informative message about the latest log delivery attempt. If the log delivery fails with USER_FAILURE, error details will be provided for fixing misconfigurations in cloud permissions. */
220
- message?: string | undefined;
221
- }
222
-
223
- /**
224
- * *
225
- * Update Log Delivery Configuration
226
- */
227
- export interface UpdateLogDeliveryConfigurationRequest {
228
- /** The log delivery configuration id of customer */
229
- configId?: string | undefined;
230
- /** <Databricks> account ID of any type. For non-E2 account types, get your account ID from the [Accounts Console](https://docs.databricks.com/administration-guide/account-settings/usage.html). */
231
- accountId?: string | undefined;
232
- /** Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed. */
233
- status?: LogDeliveryConfigStatus | undefined;
234
- }
235
-
236
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
237
- export interface UpdateLogDeliveryConfigurationResponse {}
238
-
239
- export const unmarshalCreateLogDeliveryConfigurationResponseSchema: z.ZodType<CreateLogDeliveryConfigurationResponse> =
240
- z
241
- .object({
242
- log_delivery_configuration: z
243
- .lazy(() => unmarshalLogDeliveryConfigurationSchema)
244
- .optional(),
245
- })
246
- .transform(d => ({
247
- logDeliveryConfiguration: d.log_delivery_configuration,
248
- }));
249
-
250
- export const unmarshalGetLogDeliveryConfigurationResponseSchema: z.ZodType<GetLogDeliveryConfigurationResponse> =
251
- z
252
- .object({
253
- log_delivery_configuration: z
254
- .lazy(() => unmarshalLogDeliveryConfigurationSchema)
255
- .optional(),
256
- })
257
- .transform(d => ({
258
- logDeliveryConfiguration: d.log_delivery_configuration,
259
- }));
260
-
261
- export const unmarshalListLogDeliveryConfigurationResponseSchema: z.ZodType<ListLogDeliveryConfigurationResponse> =
262
- z
263
- .object({
264
- log_delivery_configurations: z
265
- .array(z.lazy(() => unmarshalLogDeliveryConfigurationSchema))
266
- .optional(),
267
- next_page_token: z.string().optional(),
268
- })
269
- .transform(d => ({
270
- logDeliveryConfigurations: d.log_delivery_configurations,
271
- nextPageToken: d.next_page_token,
272
- }));
273
-
274
- export const unmarshalLogDeliveryConfigurationSchema: z.ZodType<LogDeliveryConfiguration> =
275
- z
276
- .object({
277
- config_id: z.string().optional(),
278
- config_name: z.string().optional(),
279
- log_type: z.enum(LogDeliveryType).optional(),
280
- output_format: z.enum(LogDeliveryOutputFormat).optional(),
281
- account_id: z.string().optional(),
282
- credentials_id: z.string().optional(),
283
- storage_configuration_id: z.string().optional(),
284
- workspace_ids_filter: z
285
- .array(z.union([z.number(), z.bigint()]).transform(v => BigInt(v)))
286
- .optional(),
287
- delivery_path_prefix: z.string().optional(),
288
- delivery_start_time: z.string().optional(),
289
- status: z.enum(LogDeliveryConfigStatus).optional(),
290
- creation_time: z
291
- .union([z.number(), z.bigint()])
292
- .transform(v => BigInt(v))
293
- .optional(),
294
- update_time: z
295
- .union([z.number(), z.bigint()])
296
- .transform(v => BigInt(v))
297
- .optional(),
298
- log_delivery_status: z
299
- .lazy(() => unmarshalLogDeliveryStatusSchema)
300
- .optional(),
301
- })
302
- .transform(d => ({
303
- configId: d.config_id,
304
- configName: d.config_name,
305
- logType: d.log_type,
306
- outputFormat: d.output_format,
307
- accountId: d.account_id,
308
- credentialsId: d.credentials_id,
309
- storageConfigurationId: d.storage_configuration_id,
310
- workspaceIdsFilter: d.workspace_ids_filter,
311
- deliveryPathPrefix: d.delivery_path_prefix,
312
- deliveryStartTime: d.delivery_start_time,
313
- status: d.status,
314
- creationTime: d.creation_time,
315
- updateTime: d.update_time,
316
- logDeliveryStatus: d.log_delivery_status,
317
- }));
318
-
319
- export const unmarshalLogDeliveryStatusSchema: z.ZodType<LogDeliveryStatus> = z
320
- .object({
321
- status: z.enum(LogDeliveryStatusEnum).optional(),
322
- last_attempt_time: z.string().optional(),
323
- last_successful_attempt_time: z.string().optional(),
324
- message: z.string().optional(),
325
- })
326
- .transform(d => ({
327
- status: d.status,
328
- lastAttemptTime: d.last_attempt_time,
329
- lastSuccessfulAttemptTime: d.last_successful_attempt_time,
330
- message: d.message,
331
- }));
332
-
333
- export const unmarshalUpdateLogDeliveryConfigurationResponseSchema: z.ZodType<UpdateLogDeliveryConfigurationResponse> =
334
- z.object({});
335
-
336
- export const marshalCreateLogDeliveryConfigurationParamsSchema: z.ZodType = z
337
- .object({
338
- configId: z.string().optional(),
339
- configName: z.string().optional(),
340
- logType: z.enum(LogDeliveryType).optional(),
341
- outputFormat: z.enum(LogDeliveryOutputFormat).optional(),
342
- accountId: z.string().optional(),
343
- credentialsId: z.string().optional(),
344
- storageConfigurationId: z.string().optional(),
345
- workspaceIdsFilter: z.array(z.bigint()).optional(),
346
- deliveryPathPrefix: z.string().optional(),
347
- deliveryStartTime: z.string().optional(),
348
- status: z.enum(LogDeliveryConfigStatus).optional(),
349
- creationTime: z.bigint().optional(),
350
- updateTime: z.bigint().optional(),
351
- logDeliveryStatus: z.lazy(() => marshalLogDeliveryStatusSchema).optional(),
352
- })
353
- .transform(d => ({
354
- config_id: d.configId,
355
- config_name: d.configName,
356
- log_type: d.logType,
357
- output_format: d.outputFormat,
358
- account_id: d.accountId,
359
- credentials_id: d.credentialsId,
360
- storage_configuration_id: d.storageConfigurationId,
361
- workspace_ids_filter: d.workspaceIdsFilter,
362
- delivery_path_prefix: d.deliveryPathPrefix,
363
- delivery_start_time: d.deliveryStartTime,
364
- status: d.status,
365
- creation_time: d.creationTime,
366
- update_time: d.updateTime,
367
- log_delivery_status: d.logDeliveryStatus,
368
- }));
369
-
370
- export const marshalCreateLogDeliveryConfigurationRequestSchema: z.ZodType = z
371
- .object({
372
- logDeliveryConfiguration: z
373
- .lazy(() => marshalCreateLogDeliveryConfigurationParamsSchema)
374
- .optional(),
375
- })
376
- .transform(d => ({
377
- log_delivery_configuration: d.logDeliveryConfiguration,
378
- }));
379
-
380
- export const marshalLogDeliveryStatusSchema: z.ZodType = z
381
- .object({
382
- status: z.enum(LogDeliveryStatusEnum).optional(),
383
- lastAttemptTime: z.string().optional(),
384
- lastSuccessfulAttemptTime: z.string().optional(),
385
- message: z.string().optional(),
386
- })
387
- .transform(d => ({
388
- status: d.status,
389
- last_attempt_time: d.lastAttemptTime,
390
- last_successful_attempt_time: d.lastSuccessfulAttemptTime,
391
- message: d.message,
392
- }));
393
-
394
- export const marshalUpdateLogDeliveryConfigurationRequestSchema: z.ZodType = z
395
- .object({
396
- configId: z.string().optional(),
397
- accountId: z.string().optional(),
398
- status: z.enum(LogDeliveryConfigStatus).optional(),
399
- })
400
- .transform(d => ({
401
- config_id: d.configId,
402
- account_id: d.accountId,
403
- status: d.status,
404
- }));
@@ -1,73 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import type {Credentials} from '@databricks/sdk-auth';
4
- import {defaultCredentials} from '@databricks/sdk-auth/credentials';
5
- import type {
6
- HttpClient,
7
- HttpRequest,
8
- HttpResponse,
9
- } from '@databricks/sdk-core/http';
10
- import {newFetchHttpClient} from '@databricks/sdk-core/http';
11
- import type {ClientOptions} from '@databricks/sdk-options/client';
12
-
13
- /** Creates a new HTTP client with the given options. */
14
- export function newHttpClient(options?: ClientOptions): HttpClient {
15
- const opts = options ?? {};
16
-
17
- // If an HTTP client is provided, use it as-is. Throw if other options are
18
- // also set, since they would be silently ignored.
19
- if (opts.httpClient !== undefined) {
20
- if (opts.credentials !== undefined || opts.timeout !== undefined) {
21
- throw new Error(
22
- 'httpClient cannot be combined with credentials or timeout'
23
- );
24
- }
25
- return opts.httpClient;
26
- }
27
-
28
- const credentials = opts.credentials ?? defaultCredentials();
29
-
30
- const base = newFetchHttpClient();
31
- let client: HttpClient = new AuthHttpClient(base, credentials);
32
-
33
- if (opts.timeout !== undefined) {
34
- client = new TimeoutHttpClient(client, opts.timeout);
35
- }
36
-
37
- return client;
38
- }
39
-
40
- /** Wraps an HttpClient and adds authentication headers to requests. */
41
- class AuthHttpClient implements HttpClient {
42
- constructor(
43
- private readonly base: HttpClient,
44
- private readonly credentials: Credentials
45
- ) {}
46
-
47
- async send(request: HttpRequest): Promise<HttpResponse> {
48
- const authHeaders = await this.credentials.authHeaders();
49
- // Do not modify the original request.
50
- const headers = new Headers(request.headers);
51
- for (const h of authHeaders) {
52
- headers.set(h.key, h.value);
53
- }
54
- return this.base.send({...request, headers});
55
- }
56
- }
57
-
58
- /** Wraps an HttpClient and applies a default timeout to requests. */
59
- class TimeoutHttpClient implements HttpClient {
60
- constructor(
61
- private readonly base: HttpClient,
62
- private readonly timeout: number
63
- ) {}
64
-
65
- async send(request: HttpRequest): Promise<HttpResponse> {
66
- const timeoutSignal = AbortSignal.timeout(this.timeout);
67
- const signal =
68
- request.signal !== undefined
69
- ? AbortSignal.any([request.signal, timeoutSignal])
70
- : timeoutSignal;
71
- return this.base.send({...request, signal});
72
- }
73
- }
package/src/v1/utils.ts DELETED
@@ -1,156 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import type {Options} from '@databricks/sdk-core/ops';
4
- import {execute} from '@databricks/sdk-core/ops';
5
- import {ApiError} from '@databricks/sdk-core/apierror';
6
- import type {
7
- HttpClient,
8
- HttpRequest,
9
- HttpResponse,
10
- } from '@databricks/sdk-core/http';
11
- import type {Logger} from '@databricks/sdk-core/logger';
12
- import type {CallOptions} from '@databricks/sdk-options/call';
13
- import JSONBig from 'json-bigint';
14
- import type {z} from 'zod';
15
-
16
- // JSON codec that preserves int64 precision. On the way in, large integer
17
- // literals come back as bigint instead of being rounded to JS Number. On the
18
- // way out, bigint values are emitted as raw JSON number digits.
19
- const jsonBigint = JSONBig({useNativeBigInt: true});
20
-
21
- export interface HttpCallOptions {
22
- readonly request: HttpRequest;
23
- readonly httpClient: HttpClient;
24
- readonly logger: Logger;
25
- }
26
-
27
- /**
28
- * Translates public CallOptions to the internal Options shape accepted by
29
- * execute(). Even though the shapes match today, this isolates the public
30
- * API from the executor's internal type so they can diverge.
31
- */
32
- export async function executeCall(
33
- call: (signal?: AbortSignal) => Promise<void>,
34
- options?: CallOptions
35
- ): Promise<void> {
36
- const opts: Options = {
37
- ...(options?.retrier !== undefined && {retrier: options.retrier}),
38
- ...(options?.rateLimiter !== undefined && {
39
- rateLimiter: options.rateLimiter,
40
- }),
41
- ...(options?.timeout !== undefined && {timeout: options.timeout}),
42
- };
43
- return execute(options?.signal, call, opts);
44
- }
45
-
46
- async function readAll(
47
- body: ReadableStream<Uint8Array> | null
48
- ): Promise<Uint8Array> {
49
- if (body === null) {
50
- return new Uint8Array(0);
51
- }
52
- const reader = body.getReader();
53
- const chunks: Uint8Array[] = [];
54
- for (;;) {
55
- const {done, value} = await reader.read();
56
- if (done) {
57
- break;
58
- }
59
- chunks.push(value);
60
- }
61
- const totalLength = chunks.reduce((acc, chunk) => acc + chunk.length, 0);
62
- const result = new Uint8Array(totalLength);
63
- let offset = 0;
64
- for (const chunk of chunks) {
65
- result.set(chunk, offset);
66
- offset += chunk.length;
67
- }
68
- return result;
69
- }
70
-
71
- export async function executeHttpCall(
72
- opts: HttpCallOptions
73
- ): Promise<Uint8Array> {
74
- opts.logger.debug('HTTP request', {
75
- method: opts.request.method,
76
- url: opts.request.url,
77
- });
78
-
79
- let resp: HttpResponse;
80
- try {
81
- resp = await opts.httpClient.send(opts.request);
82
- } catch (e: unknown) {
83
- opts.logger.debug('HTTP request failed');
84
- throw e;
85
- }
86
-
87
- const body = await readAll(resp.body);
88
-
89
- opts.logger.debug('HTTP response', {
90
- statusCode: resp.statusCode,
91
- body: new TextDecoder().decode(body),
92
- });
93
-
94
- const apiErr = ApiError.fromHttpError(resp.statusCode, resp.headers, body);
95
- if (apiErr !== undefined) {
96
- throw apiErr;
97
- }
98
-
99
- return body;
100
- }
101
-
102
- export function buildHttpRequest(
103
- method: string,
104
- url: string,
105
- headers: Headers,
106
- signal?: AbortSignal,
107
- body?: string | ReadableStream<Uint8Array>
108
- ): HttpRequest {
109
- const req: HttpRequest = {url, method, headers};
110
- if (body !== undefined) {
111
- req.body = body;
112
- }
113
- if (signal !== undefined) {
114
- req.signal = signal;
115
- }
116
- return req;
117
- }
118
-
119
- export function parseResponse<T>(body: Uint8Array, schema: z.ZodType<T>): T {
120
- const text = new TextDecoder().decode(body);
121
- const parsed: unknown = jsonBigint.parse(text);
122
- return schema.parse(parsed);
123
- }
124
-
125
- export function marshalRequest(data: unknown, schema: z.ZodType): string {
126
- return jsonBigint.stringify(schema.parse(data));
127
- }
128
-
129
- export function flattenQueryParams(
130
- prefix: string,
131
- value: unknown,
132
- params: URLSearchParams
133
- ): void {
134
- if (value === null || value === undefined) {
135
- return;
136
- }
137
- if (Array.isArray(value)) {
138
- // arrays of objects are not yet supported
139
- for (const item of value) {
140
- params.append(prefix, String(item));
141
- }
142
- } else if (typeof value === 'object') {
143
- for (const [key, val] of Object.entries(value as Record<string, unknown>)) {
144
- flattenQueryParams(`${prefix}.${key}`, val, params);
145
- }
146
- } else if (
147
- typeof value === 'string' ||
148
- typeof value === 'number' ||
149
- typeof value === 'boolean' ||
150
- typeof value === 'bigint'
151
- ) {
152
- params.append(prefix, String(value));
153
- } else {
154
- throw new Error(`Unsupported query parameter type: ${typeof value}`);
155
- }
156
- }