@databricks/sdk-uc-volumes 0.34.0 → 0.36.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.
package/dist/v1/model.js CHANGED
@@ -1,201 +1,161 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { z } from 'zod';
3
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
4
- export const SseEncryptionAlgorithm = {
5
- SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED: 'SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED',
6
- AWS_SSE_S3: 'AWS_SSE_S3',
7
- AWS_SSE_KMS: 'AWS_SSE_KMS',
1
+ import { z } from "zod";
2
+
3
+ //#region src/v1/model.ts
4
+ const SseEncryptionAlgorithm = {
5
+ SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED: "SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED",
6
+ AWS_SSE_S3: "AWS_SSE_S3",
7
+ AWS_SSE_KMS: "AWS_SSE_KMS"
8
8
  };
9
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
10
- export const VolumeType = {
11
- MANAGED: 'MANAGED',
12
- EXTERNAL: 'EXTERNAL',
9
+ const VolumeType = {
10
+ MANAGED: "MANAGED",
11
+ EXTERNAL: "EXTERNAL"
13
12
  };
14
- export const unmarshalDeleteVolumeResponseSchema = z.object({});
15
- export const unmarshalEncryptionDetailsSchema = z
16
- .object({
17
- sse_encryption_details: z
18
- .lazy(() => unmarshalSseEncryptionDetailsSchema)
19
- .optional(),
20
- })
21
- .transform(d => ({
22
- encryptionDetailsType: d.sse_encryption_details !== undefined
23
- ? {
24
- $case: 'sseEncryptionDetails',
25
- sseEncryptionDetails: d.sse_encryption_details,
26
- }
27
- : undefined,
13
+ const unmarshalDeleteVolumeResponseSchema = z.object({});
14
+ const unmarshalEncryptionDetailsSchema = z.object({ sse_encryption_details: z.lazy(() => unmarshalSseEncryptionDetailsSchema).optional() }).transform((d) => ({ encryptionDetailsType: d.sse_encryption_details !== void 0 ? {
15
+ $case: "sseEncryptionDetails",
16
+ sseEncryptionDetails: d.sse_encryption_details
17
+ } : void 0 }));
18
+ const unmarshalListVolumesResponseSchema = z.object({
19
+ volumes: z.array(z.lazy(() => unmarshalVolumeInfoSchema)).optional(),
20
+ next_page_token: z.string().optional()
21
+ }).transform((d) => ({
22
+ volumes: d.volumes,
23
+ nextPageToken: d.next_page_token
28
24
  }));
29
- export const unmarshalListVolumesResponseSchema = z
30
- .object({
31
- volumes: z.array(z.lazy(() => unmarshalVolumeInfoSchema)).optional(),
32
- next_page_token: z.string().optional(),
33
- })
34
- .transform(d => ({
35
- volumes: d.volumes,
36
- nextPageToken: d.next_page_token,
25
+ const unmarshalSseEncryptionDetailsSchema = z.object({
26
+ algorithm: z.string().optional(),
27
+ aws_kms_key_arn: z.string().optional()
28
+ }).transform((d) => ({
29
+ algorithm: d.algorithm,
30
+ awsKmsKeyArn: d.aws_kms_key_arn
37
31
  }));
38
- export const unmarshalSseEncryptionDetailsSchema = z
39
- .object({
40
- algorithm: z.string().optional(),
41
- aws_kms_key_arn: z.string().optional(),
42
- })
43
- .transform(d => ({
44
- algorithm: d.algorithm,
45
- awsKmsKeyArn: d.aws_kms_key_arn,
32
+ const unmarshalVolumeInfoSchema = z.object({
33
+ name: z.string().optional(),
34
+ catalog_name: z.string().optional(),
35
+ schema_name: z.string().optional(),
36
+ volume_type: z.string().optional(),
37
+ storage_location: z.string().optional(),
38
+ owner: z.string().optional(),
39
+ comment: z.string().optional(),
40
+ full_name: z.string().optional(),
41
+ volume_id: z.string().optional(),
42
+ metastore_id: z.string().optional(),
43
+ created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
44
+ created_by: z.string().optional(),
45
+ updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
46
+ updated_by: z.string().optional(),
47
+ access_point: z.string().optional(),
48
+ encryption_details: z.lazy(() => unmarshalEncryptionDetailsSchema).optional(),
49
+ browse_only: z.boolean().optional()
50
+ }).transform((d) => ({
51
+ name: d.name,
52
+ catalogName: d.catalog_name,
53
+ schemaName: d.schema_name,
54
+ volumeType: d.volume_type,
55
+ storageLocation: d.storage_location,
56
+ owner: d.owner,
57
+ comment: d.comment,
58
+ fullName: d.full_name,
59
+ volumeId: d.volume_id,
60
+ metastoreId: d.metastore_id,
61
+ createdAt: d.created_at,
62
+ createdBy: d.created_by,
63
+ updatedAt: d.updated_at,
64
+ updatedBy: d.updated_by,
65
+ accessPoint: d.access_point,
66
+ encryptionDetails: d.encryption_details,
67
+ browseOnly: d.browse_only
46
68
  }));
47
- export const unmarshalVolumeInfoSchema = z
48
- .object({
49
- name: z.string().optional(),
50
- catalog_name: z.string().optional(),
51
- schema_name: z.string().optional(),
52
- volume_type: z.string().optional(),
53
- storage_location: z.string().optional(),
54
- owner: z.string().optional(),
55
- comment: z.string().optional(),
56
- full_name: z.string().optional(),
57
- volume_id: z.string().optional(),
58
- metastore_id: z.string().optional(),
59
- created_at: z
60
- .union([z.number(), z.bigint()])
61
- .transform(v => BigInt(v))
62
- .optional(),
63
- created_by: z.string().optional(),
64
- updated_at: z
65
- .union([z.number(), z.bigint()])
66
- .transform(v => BigInt(v))
67
- .optional(),
68
- updated_by: z.string().optional(),
69
- access_point: z.string().optional(),
70
- encryption_details: z
71
- .lazy(() => unmarshalEncryptionDetailsSchema)
72
- .optional(),
73
- browse_only: z.boolean().optional(),
74
- })
75
- .transform(d => ({
76
- name: d.name,
77
- catalogName: d.catalog_name,
78
- schemaName: d.schema_name,
79
- volumeType: d.volume_type,
80
- storageLocation: d.storage_location,
81
- owner: d.owner,
82
- comment: d.comment,
83
- fullName: d.full_name,
84
- volumeId: d.volume_id,
85
- metastoreId: d.metastore_id,
86
- createdAt: d.created_at,
87
- createdBy: d.created_by,
88
- updatedAt: d.updated_at,
89
- updatedBy: d.updated_by,
90
- accessPoint: d.access_point,
91
- encryptionDetails: d.encryption_details,
92
- browseOnly: d.browse_only,
69
+ const marshalCreateVolumeRequestSchema = z.object({
70
+ name: z.string().optional(),
71
+ catalogName: z.string().optional(),
72
+ schemaName: z.string().optional(),
73
+ volumeType: z.string().optional(),
74
+ storageLocation: z.string().optional(),
75
+ owner: z.string().optional(),
76
+ comment: z.string().optional(),
77
+ fullName: z.string().optional(),
78
+ volumeId: z.string().optional(),
79
+ metastoreId: z.string().optional(),
80
+ createdAt: z.bigint().optional(),
81
+ createdBy: z.string().optional(),
82
+ updatedAt: z.bigint().optional(),
83
+ updatedBy: z.string().optional(),
84
+ accessPoint: z.string().optional(),
85
+ encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),
86
+ browseOnly: z.boolean().optional()
87
+ }).transform((d) => ({
88
+ name: d.name,
89
+ catalog_name: d.catalogName,
90
+ schema_name: d.schemaName,
91
+ volume_type: d.volumeType,
92
+ storage_location: d.storageLocation,
93
+ owner: d.owner,
94
+ comment: d.comment,
95
+ full_name: d.fullName,
96
+ volume_id: d.volumeId,
97
+ metastore_id: d.metastoreId,
98
+ created_at: d.createdAt,
99
+ created_by: d.createdBy,
100
+ updated_at: d.updatedAt,
101
+ updated_by: d.updatedBy,
102
+ access_point: d.accessPoint,
103
+ encryption_details: d.encryptionDetails,
104
+ browse_only: d.browseOnly
93
105
  }));
94
- export const marshalCreateVolumeRequestSchema = z
95
- .object({
96
- name: z.string().optional(),
97
- catalogName: z.string().optional(),
98
- schemaName: z.string().optional(),
99
- volumeType: z.string().optional(),
100
- storageLocation: z.string().optional(),
101
- owner: z.string().optional(),
102
- comment: z.string().optional(),
103
- fullName: z.string().optional(),
104
- volumeId: z.string().optional(),
105
- metastoreId: z.string().optional(),
106
- createdAt: z.bigint().optional(),
107
- createdBy: z.string().optional(),
108
- updatedAt: z.bigint().optional(),
109
- updatedBy: z.string().optional(),
110
- accessPoint: z.string().optional(),
111
- encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),
112
- browseOnly: z.boolean().optional(),
113
- })
114
- .transform(d => ({
115
- name: d.name,
116
- catalog_name: d.catalogName,
117
- schema_name: d.schemaName,
118
- volume_type: d.volumeType,
119
- storage_location: d.storageLocation,
120
- owner: d.owner,
121
- comment: d.comment,
122
- full_name: d.fullName,
123
- volume_id: d.volumeId,
124
- metastore_id: d.metastoreId,
125
- created_at: d.createdAt,
126
- created_by: d.createdBy,
127
- updated_at: d.updatedAt,
128
- updated_by: d.updatedBy,
129
- access_point: d.accessPoint,
130
- encryption_details: d.encryptionDetails,
131
- browse_only: d.browseOnly,
106
+ const marshalEncryptionDetailsSchema = z.object({ encryptionDetailsType: z.discriminatedUnion("$case", [z.object({
107
+ $case: z.literal("sseEncryptionDetails"),
108
+ sseEncryptionDetails: z.lazy(() => marshalSseEncryptionDetailsSchema)
109
+ })]).optional() }).transform((d) => ({ ...d.encryptionDetailsType?.$case === "sseEncryptionDetails" && { sse_encryption_details: d.encryptionDetailsType.sseEncryptionDetails } }));
110
+ const marshalSseEncryptionDetailsSchema = z.object({
111
+ algorithm: z.string().optional(),
112
+ awsKmsKeyArn: z.string().optional()
113
+ }).transform((d) => ({
114
+ algorithm: d.algorithm,
115
+ aws_kms_key_arn: d.awsKmsKeyArn
132
116
  }));
133
- export const marshalEncryptionDetailsSchema = z
134
- .object({
135
- encryptionDetailsType: z
136
- .discriminatedUnion('$case', [
137
- z.object({
138
- $case: z.literal('sseEncryptionDetails'),
139
- sseEncryptionDetails: z.lazy(() => marshalSseEncryptionDetailsSchema),
140
- }),
141
- ])
142
- .optional(),
143
- })
144
- .transform(d => ({
145
- ...(d.encryptionDetailsType?.$case === 'sseEncryptionDetails' && {
146
- sse_encryption_details: d.encryptionDetailsType.sseEncryptionDetails,
147
- }),
148
- }));
149
- export const marshalSseEncryptionDetailsSchema = z
150
- .object({
151
- algorithm: z.string().optional(),
152
- awsKmsKeyArn: z.string().optional(),
153
- })
154
- .transform(d => ({
155
- algorithm: d.algorithm,
156
- aws_kms_key_arn: d.awsKmsKeyArn,
157
- }));
158
- export const marshalUpdateVolumeRequestSchema = z
159
- .object({
160
- fullNameArg: z.string().optional(),
161
- newName: z.string().optional(),
162
- name: z.string().optional(),
163
- catalogName: z.string().optional(),
164
- schemaName: z.string().optional(),
165
- volumeType: z.string().optional(),
166
- storageLocation: z.string().optional(),
167
- owner: z.string().optional(),
168
- comment: z.string().optional(),
169
- fullName: z.string().optional(),
170
- volumeId: z.string().optional(),
171
- metastoreId: z.string().optional(),
172
- createdAt: z.bigint().optional(),
173
- createdBy: z.string().optional(),
174
- updatedAt: z.bigint().optional(),
175
- updatedBy: z.string().optional(),
176
- accessPoint: z.string().optional(),
177
- encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),
178
- browseOnly: z.boolean().optional(),
179
- })
180
- .transform(d => ({
181
- full_name_arg: d.fullNameArg,
182
- new_name: d.newName,
183
- name: d.name,
184
- catalog_name: d.catalogName,
185
- schema_name: d.schemaName,
186
- volume_type: d.volumeType,
187
- storage_location: d.storageLocation,
188
- owner: d.owner,
189
- comment: d.comment,
190
- full_name: d.fullName,
191
- volume_id: d.volumeId,
192
- metastore_id: d.metastoreId,
193
- created_at: d.createdAt,
194
- created_by: d.createdBy,
195
- updated_at: d.updatedAt,
196
- updated_by: d.updatedBy,
197
- access_point: d.accessPoint,
198
- encryption_details: d.encryptionDetails,
199
- browse_only: d.browseOnly,
117
+ const marshalUpdateVolumeRequestSchema = z.object({
118
+ fullNameArg: z.string().optional(),
119
+ newName: z.string().optional(),
120
+ name: z.string().optional(),
121
+ catalogName: z.string().optional(),
122
+ schemaName: z.string().optional(),
123
+ volumeType: z.string().optional(),
124
+ storageLocation: z.string().optional(),
125
+ owner: z.string().optional(),
126
+ comment: z.string().optional(),
127
+ fullName: z.string().optional(),
128
+ volumeId: z.string().optional(),
129
+ metastoreId: z.string().optional(),
130
+ createdAt: z.bigint().optional(),
131
+ createdBy: z.string().optional(),
132
+ updatedAt: z.bigint().optional(),
133
+ updatedBy: z.string().optional(),
134
+ accessPoint: z.string().optional(),
135
+ encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),
136
+ browseOnly: z.boolean().optional()
137
+ }).transform((d) => ({
138
+ full_name_arg: d.fullNameArg,
139
+ new_name: d.newName,
140
+ name: d.name,
141
+ catalog_name: d.catalogName,
142
+ schema_name: d.schemaName,
143
+ volume_type: d.volumeType,
144
+ storage_location: d.storageLocation,
145
+ owner: d.owner,
146
+ comment: d.comment,
147
+ full_name: d.fullName,
148
+ volume_id: d.volumeId,
149
+ metastore_id: d.metastoreId,
150
+ created_at: d.createdAt,
151
+ created_by: d.createdBy,
152
+ updated_at: d.updatedAt,
153
+ updated_by: d.updatedBy,
154
+ access_point: d.accessPoint,
155
+ encryption_details: d.encryptionDetails,
156
+ browse_only: d.browseOnly
200
157
  }));
158
+
159
+ //#endregion
160
+ export { SseEncryptionAlgorithm, VolumeType, marshalCreateVolumeRequestSchema, marshalEncryptionDetailsSchema, marshalSseEncryptionDetailsSchema, marshalUpdateVolumeRequestSchema, unmarshalDeleteVolumeResponseSchema, unmarshalEncryptionDetailsSchema, unmarshalListVolumesResponseSchema, unmarshalSseEncryptionDetailsSchema, unmarshalVolumeInfoSchema };
201
161
  //# sourceMappingURL=model.js.map
@@ -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,4FAA4F;AAC5F,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,oCAAoC,EAAE,sCAAsC;IAC5E,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;CAClB,CAAC;AAKX,4FAA4F;AAC5F,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAgMX,MAAM,CAAC,MAAM,mCAAmC,GAC9C,CAAC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CAAC;IACf,aAAa,EAAE,CAAC,CAAC,WAAW;IAC5B,QAAQ,EAAE,CAAC,CAAC,OAAO;IACnB,IAAI,EAAE,CAAC,CAAC,IAAI;IACZ,YAAY,EAAE,CAAC,CAAC,WAAW;IAC3B,WAAW,EAAE,CAAC,CAAC,UAAU;IACzB,WAAW,EAAE,CAAC,CAAC,UAAU;IACzB,gBAAgB,EAAE,CAAC,CAAC,eAAe;IACnC,KAAK,EAAE,CAAC,CAAC,KAAK;IACd,OAAO,EAAE,CAAC,CAAC,OAAO;IAClB,SAAS,EAAE,CAAC,CAAC,QAAQ;IACrB,SAAS,EAAE,CAAC,CAAC,QAAQ;IACrB,YAAY,EAAE,CAAC,CAAC,WAAW;IAC3B,UAAU,EAAE,CAAC,CAAC,SAAS;IACvB,UAAU,EAAE,CAAC,CAAC,SAAS;IACvB,UAAU,EAAE,CAAC,CAAC,SAAS;IACvB,UAAU,EAAE,CAAC,CAAC,SAAS;IACvB,YAAY,EAAE,CAAC,CAAC,WAAW;IAC3B,kBAAkB,EAAE,CAAC,CAAC,iBAAiB;IACvC,WAAW,EAAE,CAAC,CAAC,UAAU;CAC1B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"model.js","names":[],"sources":["../../src/v1/model.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {z} from 'zod';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const SseEncryptionAlgorithm = {\n SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED: 'SSE_ENCRYPTION_ALGORITHM_UNSPECIFIED',\n AWS_SSE_S3: 'AWS_SSE_S3',\n AWS_SSE_KMS: 'AWS_SSE_KMS',\n} as const;\nexport type SseEncryptionAlgorithm =\n | (typeof SseEncryptionAlgorithm)[keyof typeof SseEncryptionAlgorithm]\n | (string & {});\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const VolumeType = {\n MANAGED: 'MANAGED',\n EXTERNAL: 'EXTERNAL',\n} as const;\nexport type VolumeType =\n | (typeof VolumeType)[keyof typeof VolumeType]\n | (string & {});\n\nexport interface CreateVolumeRequest {\n /** The name of the volume */\n name?: string | undefined;\n /** The name of the catalog where the schema and the volume are */\n catalogName?: string | undefined;\n /** The name of the schema where the volume is */\n schemaName?: string | undefined;\n /**\n * The type of the volume. An external volume is located in the specified external location.\n * A managed volume is located in the default location which is specified by the parent schema, or the parent catalog, or the Metastore.\n * [Learn more](https://docs.databricks.com/aws/en/volumes/managed-vs-external)\n */\n volumeType?: VolumeType | undefined;\n /** The storage location on the cloud */\n storageLocation?: string | undefined;\n /** The identifier of the user who owns the volume */\n owner?: string | undefined;\n /** The comment attached to the volume */\n comment?: string | undefined;\n /** The three-level (fully qualified) name of the volume */\n fullName?: string | undefined;\n /** The unique identifier of the volume */\n volumeId?: string | undefined;\n /** The unique identifier of the metastore */\n metastoreId?: string | undefined;\n createdAt?: bigint | undefined;\n /** The identifier of the user who created the volume */\n createdBy?: string | undefined;\n updatedAt?: bigint | undefined;\n /** The identifier of the user who updated the volume last time */\n updatedBy?: string | undefined;\n /** The AWS access point to use when accesing s3 for this external location. */\n accessPoint?: string | undefined;\n encryptionDetails?: EncryptionDetails | undefined;\n /** Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. */\n browseOnly?: boolean | undefined;\n}\n\nexport interface DeleteVolumeRequest {\n /** The three-level (fully qualified) name of the volume */\n fullNameArg?: string | undefined;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DeleteVolumeResponse {}\n\n/** Encryption options that apply to clients connecting to cloud storage. */\nexport interface EncryptionDetails {\n encryptionDetailsType?:\n | {\n $case: 'sseEncryptionDetails';\n /** Server-Side Encryption properties for clients communicating with AWS s3. */\n sseEncryptionDetails: SseEncryptionDetails;\n }\n | undefined;\n}\n\nexport interface GetVolumeRequest {\n /** The three-level (fully qualified) name of the volume */\n fullNameArg?: string | undefined;\n /** Whether to include volumes in the response for which the principal can only access selective metadata for */\n includeBrowse?: boolean | undefined;\n}\n\nexport interface ListVolumesRequest {\n /** The identifier of the catalog */\n catalogName?: string | undefined;\n /** The identifier of the schema */\n schemaName?: string | undefined;\n /** Whether to include volumes in the response for which the principal can only access selective metadata for */\n includeBrowse?: boolean | undefined;\n /**\n * Maximum number of volumes to return (page length).\n *\n * If not set, the page length is set to a server configured value (10000, as of 1/29/2024).\n * - when set to a value greater than 0, the page length is the minimum of this value and a server configured value (10000, as of 1/29/2024);\n * - when set to 0, the page length is set to a server configured value (10000, as of 1/29/2024) (recommended);\n * - when set to a value less than 0, an invalid parameter error is returned;\n *\n * Note: this parameter controls only the maximum number of volumes to return. The actual number of volumes returned in a page\n * may be smaller than this value, including 0, even if there are more pages.\n */\n maxResults?: number | undefined;\n /** Opaque token returned by a previous request. It must be included in the request to retrieve the next page of results (pagination). */\n pageToken?: string | undefined;\n}\n\nexport interface ListVolumesResponse {\n volumes?: VolumeInfo[] | undefined;\n /**\n * Opaque token to retrieve the next page of results. Absent if there are no more pages.\n * __page_token__ should be set to this value for the next request to retrieve the next page of results.\n */\n nextPageToken?: string | undefined;\n}\n\n/** Server-Side Encryption properties for clients communicating with AWS s3. */\nexport interface SseEncryptionDetails {\n /** Sets the value of the 'x-amz-server-side-encryption' header in S3 request. */\n algorithm?: SseEncryptionAlgorithm | undefined;\n /**\n * Optional. The ARN of the SSE-KMS key used with the S3 location, when algorithm = \"SSE-KMS\".\n * Sets the value of the 'x-amz-server-side-encryption-aws-kms-key-id' header.\n */\n awsKmsKeyArn?: string | undefined;\n}\n\nexport interface UpdateVolumeRequest {\n /** The three-level (fully qualified) name of the volume */\n fullNameArg?: string | undefined;\n /** New name for the volume. */\n newName?: string | undefined;\n /** The name of the volume */\n name?: string | undefined;\n /** The name of the catalog where the schema and the volume are */\n catalogName?: string | undefined;\n /** The name of the schema where the volume is */\n schemaName?: string | undefined;\n /**\n * The type of the volume. An external volume is located in the specified external location.\n * A managed volume is located in the default location which is specified by the parent schema, or the parent catalog, or the Metastore.\n * [Learn more](https://docs.databricks.com/aws/en/volumes/managed-vs-external)\n */\n volumeType?: VolumeType | undefined;\n /** The storage location on the cloud */\n storageLocation?: string | undefined;\n /** The identifier of the user who owns the volume */\n owner?: string | undefined;\n /** The comment attached to the volume */\n comment?: string | undefined;\n /** The three-level (fully qualified) name of the volume */\n fullName?: string | undefined;\n /** The unique identifier of the volume */\n volumeId?: string | undefined;\n /** The unique identifier of the metastore */\n metastoreId?: string | undefined;\n createdAt?: bigint | undefined;\n /** The identifier of the user who created the volume */\n createdBy?: string | undefined;\n updatedAt?: bigint | undefined;\n /** The identifier of the user who updated the volume last time */\n updatedBy?: string | undefined;\n /** The AWS access point to use when accesing s3 for this external location. */\n accessPoint?: string | undefined;\n encryptionDetails?: EncryptionDetails | undefined;\n /** Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. */\n browseOnly?: boolean | undefined;\n}\n\nexport interface VolumeInfo {\n /** The name of the volume */\n name?: string | undefined;\n /** The name of the catalog where the schema and the volume are */\n catalogName?: string | undefined;\n /** The name of the schema where the volume is */\n schemaName?: string | undefined;\n /**\n * The type of the volume. An external volume is located in the specified external location.\n * A managed volume is located in the default location which is specified by the parent schema, or the parent catalog, or the Metastore.\n * [Learn more](https://docs.databricks.com/aws/en/volumes/managed-vs-external)\n */\n volumeType?: VolumeType | undefined;\n /** The storage location on the cloud */\n storageLocation?: string | undefined;\n /** The identifier of the user who owns the volume */\n owner?: string | undefined;\n /** The comment attached to the volume */\n comment?: string | undefined;\n /** The three-level (fully qualified) name of the volume */\n fullName?: string | undefined;\n /** The unique identifier of the volume */\n volumeId?: string | undefined;\n /** The unique identifier of the metastore */\n metastoreId?: string | undefined;\n createdAt?: bigint | undefined;\n /** The identifier of the user who created the volume */\n createdBy?: string | undefined;\n updatedAt?: bigint | undefined;\n /** The identifier of the user who updated the volume last time */\n updatedBy?: string | undefined;\n /** The AWS access point to use when accesing s3 for this external location. */\n accessPoint?: string | undefined;\n encryptionDetails?: EncryptionDetails | undefined;\n /** Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. */\n browseOnly?: boolean | undefined;\n}\n\nexport const unmarshalDeleteVolumeResponseSchema: z.ZodType<DeleteVolumeResponse> =\n z.object({});\n\nexport const unmarshalEncryptionDetailsSchema: z.ZodType<EncryptionDetails> = z\n .object({\n sse_encryption_details: z\n .lazy(() => unmarshalSseEncryptionDetailsSchema)\n .optional(),\n })\n .transform(d => ({\n encryptionDetailsType:\n d.sse_encryption_details !== undefined\n ? {\n $case: 'sseEncryptionDetails' as const,\n sseEncryptionDetails: d.sse_encryption_details,\n }\n : undefined,\n }));\n\nexport const unmarshalListVolumesResponseSchema: z.ZodType<ListVolumesResponse> =\n z\n .object({\n volumes: z.array(z.lazy(() => unmarshalVolumeInfoSchema)).optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n volumes: d.volumes,\n nextPageToken: d.next_page_token,\n }));\n\nexport const unmarshalSseEncryptionDetailsSchema: z.ZodType<SseEncryptionDetails> =\n z\n .object({\n algorithm: z.string().optional(),\n aws_kms_key_arn: z.string().optional(),\n })\n .transform(d => ({\n algorithm: d.algorithm,\n awsKmsKeyArn: d.aws_kms_key_arn,\n }));\n\nexport const unmarshalVolumeInfoSchema: z.ZodType<VolumeInfo> = z\n .object({\n name: z.string().optional(),\n catalog_name: z.string().optional(),\n schema_name: z.string().optional(),\n volume_type: z.string().optional(),\n storage_location: z.string().optional(),\n owner: z.string().optional(),\n comment: z.string().optional(),\n full_name: z.string().optional(),\n volume_id: z.string().optional(),\n metastore_id: z.string().optional(),\n created_at: z\n .union([z.number(), z.bigint()])\n .transform(v => BigInt(v))\n .optional(),\n created_by: z.string().optional(),\n updated_at: z\n .union([z.number(), z.bigint()])\n .transform(v => BigInt(v))\n .optional(),\n updated_by: z.string().optional(),\n access_point: z.string().optional(),\n encryption_details: z\n .lazy(() => unmarshalEncryptionDetailsSchema)\n .optional(),\n browse_only: z.boolean().optional(),\n })\n .transform(d => ({\n name: d.name,\n catalogName: d.catalog_name,\n schemaName: d.schema_name,\n volumeType: d.volume_type,\n storageLocation: d.storage_location,\n owner: d.owner,\n comment: d.comment,\n fullName: d.full_name,\n volumeId: d.volume_id,\n metastoreId: d.metastore_id,\n createdAt: d.created_at,\n createdBy: d.created_by,\n updatedAt: d.updated_at,\n updatedBy: d.updated_by,\n accessPoint: d.access_point,\n encryptionDetails: d.encryption_details,\n browseOnly: d.browse_only,\n }));\n\nexport const marshalCreateVolumeRequestSchema: z.ZodType = z\n .object({\n name: z.string().optional(),\n catalogName: z.string().optional(),\n schemaName: z.string().optional(),\n volumeType: z.string().optional(),\n storageLocation: z.string().optional(),\n owner: z.string().optional(),\n comment: z.string().optional(),\n fullName: z.string().optional(),\n volumeId: z.string().optional(),\n metastoreId: z.string().optional(),\n createdAt: z.bigint().optional(),\n createdBy: z.string().optional(),\n updatedAt: z.bigint().optional(),\n updatedBy: z.string().optional(),\n accessPoint: z.string().optional(),\n encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),\n browseOnly: z.boolean().optional(),\n })\n .transform(d => ({\n name: d.name,\n catalog_name: d.catalogName,\n schema_name: d.schemaName,\n volume_type: d.volumeType,\n storage_location: d.storageLocation,\n owner: d.owner,\n comment: d.comment,\n full_name: d.fullName,\n volume_id: d.volumeId,\n metastore_id: d.metastoreId,\n created_at: d.createdAt,\n created_by: d.createdBy,\n updated_at: d.updatedAt,\n updated_by: d.updatedBy,\n access_point: d.accessPoint,\n encryption_details: d.encryptionDetails,\n browse_only: d.browseOnly,\n }));\n\nexport const marshalEncryptionDetailsSchema: z.ZodType = z\n .object({\n encryptionDetailsType: z\n .discriminatedUnion('$case', [\n z.object({\n $case: z.literal('sseEncryptionDetails'),\n sseEncryptionDetails: z.lazy(() => marshalSseEncryptionDetailsSchema),\n }),\n ])\n .optional(),\n })\n .transform(d => ({\n ...(d.encryptionDetailsType?.$case === 'sseEncryptionDetails' && {\n sse_encryption_details: d.encryptionDetailsType.sseEncryptionDetails,\n }),\n }));\n\nexport const marshalSseEncryptionDetailsSchema: z.ZodType = z\n .object({\n algorithm: z.string().optional(),\n awsKmsKeyArn: z.string().optional(),\n })\n .transform(d => ({\n algorithm: d.algorithm,\n aws_kms_key_arn: d.awsKmsKeyArn,\n }));\n\nexport const marshalUpdateVolumeRequestSchema: z.ZodType = z\n .object({\n fullNameArg: z.string().optional(),\n newName: z.string().optional(),\n name: z.string().optional(),\n catalogName: z.string().optional(),\n schemaName: z.string().optional(),\n volumeType: z.string().optional(),\n storageLocation: z.string().optional(),\n owner: z.string().optional(),\n comment: z.string().optional(),\n fullName: z.string().optional(),\n volumeId: z.string().optional(),\n metastoreId: z.string().optional(),\n createdAt: z.bigint().optional(),\n createdBy: z.string().optional(),\n updatedAt: z.bigint().optional(),\n updatedBy: z.string().optional(),\n accessPoint: z.string().optional(),\n encryptionDetails: z.lazy(() => marshalEncryptionDetailsSchema).optional(),\n browseOnly: z.boolean().optional(),\n })\n .transform(d => ({\n full_name_arg: d.fullNameArg,\n new_name: d.newName,\n name: d.name,\n catalog_name: d.catalogName,\n schema_name: d.schemaName,\n volume_type: d.volumeType,\n storage_location: d.storageLocation,\n owner: d.owner,\n comment: d.comment,\n full_name: d.fullName,\n volume_id: d.volumeId,\n metastore_id: d.metastoreId,\n created_at: d.createdAt,\n created_by: d.createdBy,\n updated_at: d.updatedAt,\n updated_by: d.updatedBy,\n access_point: d.accessPoint,\n encryption_details: d.encryptionDetails,\n browse_only: d.browseOnly,\n }));\n"],"mappings":";;;AAKA,MAAa,yBAAyB;CACpC,sCAAsC;CACtC,YAAY;CACZ,aAAa;CACd;AAMD,MAAa,aAAa;CACxB,SAAS;CACT,UAAU;CACX;AAgMD,MAAa,sCACX,EAAE,OAAO,EAAE,CAAC;AAEd,MAAa,mCAAiE,EAC3E,OAAO,EACN,wBAAwB,EACrB,WAAW,o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AClC,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,mBAAmB,EAAE,WAAW,+BAA+B,CAAC,UAAU;CAC1E,YAAY,EAAE,SAAS,CAAC,UAAU;CACnC,CAAC,CACD,WAAU,OAAM;CACf,eAAe,EAAE;CACjB,UAAU,EAAE;CACZ,MAAM,EAAE;CACR,cAAc,EAAE;CAChB,aAAa,EAAE;CACf,aAAa,EAAE;CACf,kBAAkB,EAAE;CACpB,OAAO,EAAE;CACT,SAAS,EAAE;CACX,WAAW,EAAE;CACb,WAAW,EAAE;CACb,cAAc,EAAE;CAChB,YAAY,EAAE;CACd,YAAY,EAAE;CACd,YAAY,EAAE;CACd,YAAY,EAAE;CACd,cAAc,EAAE;CAChB,oBAAoB,EAAE;CACtB,aAAa,EAAE;CAChB,EAAE"}
@@ -1,23 +1,25 @@
1
- import type { HttpClient } from '@databricks/sdk-core/http';
2
- import type { ClientOptions } from '@databricks/sdk-options/client';
1
+ import { HttpClient } from "@databricks/sdk-core/http";
2
+ import { ClientOptions } from "@databricks/sdk-options/client";
3
+
4
+ //#region src/v1/transport.d.ts
3
5
  /**
4
6
  * The configuration a client needs to issue requests, resolved from
5
7
  * {@link ClientOptions} and a configuration profile.
6
8
  */
7
- export interface ResolvedClientConfig {
8
- /** Host with any trailing slash removed. */
9
- host: string;
10
- /**
11
- * Default account ID for account-level paths that contain an account_id
12
- * segment. A request's own accountId still wins.
13
- */
14
- accountId?: string;
15
- /**
16
- * Workspace ID used to route workspace-level calls on unified hosts (SPOG).
17
- */
18
- workspaceId?: string;
19
- /** HTTP client with authentication, and any configured timeout, applied. */
20
- httpClient: HttpClient;
9
+ interface ResolvedClientConfig {
10
+ /** Host with any trailing slash removed. */
11
+ host: string;
12
+ /**
13
+ * Default account ID for account-level paths that contain an account_id
14
+ * segment. A request's own accountId still wins.
15
+ */
16
+ accountId?: string;
17
+ /**
18
+ * Workspace ID used to route workspace-level calls on unified hosts (SPOG).
19
+ */
20
+ workspaceId?: string;
21
+ /** HTTP client with authentication, and any configured timeout, applied. */
22
+ httpClient: HttpClient;
21
23
  }
22
24
  /**
23
25
  * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.
@@ -29,5 +31,7 @@ export interface ResolvedClientConfig {
29
31
  *
30
32
  * @throws if host is neither provided nor present in the resolved profile.
31
33
  */
32
- export declare function resolveClientConfig(options: ClientOptions): Promise<ResolvedClientConfig>;
34
+ declare function resolveClientConfig(options: ClientOptions): Promise<ResolvedClientConfig>;
35
+ //#endregion
36
+ export { ResolvedClientConfig, resolveClientConfig };
33
37
  //# sourceMappingURL=transport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/v1/transport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EAGX,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAElE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,4EAA4E;IAC5E,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,oBAAoB,CAAC,CA4B/B"}
1
+ {"version":3,"file":"transport.d.ts","names":[],"sources":["../../src/v1/transport.ts"],"mappings":";;;;;;AAkBA;;UAAiB,oBAAA;EAgBO;EAdtB,IAAA;EAMA;;;;EAAA,SAAA;EAQsB;AAaxB;;EAhBE,WAAA;EAiBS;EAdT,UAAA,EAAY,UAAA;AAAA;;;;;;;;;;;iBAaQ,mBAAA,CACpB,OAAA,EAAS,aAAA,GACR,OAAA,CAAQ,oBAAA"}
@@ -1,74 +1,65 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
- import { defaultCredentials } from '@databricks/sdk-auth/credentials';
3
- import { newFetchHttpClient } from '@databricks/sdk-core/http';
4
- import { resolve } from '@databricks/sdk-core/profiles';
1
+ import { defaultCredentials } from "@databricks/sdk-auth/credentials";
2
+ import { newFetchHttpClient } from "@databricks/sdk-core/http";
3
+ import { resolve } from "@databricks/sdk-core/profiles";
4
+
5
+ //#region src/v1/transport.ts
5
6
  /**
6
- * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.
7
- *
8
- * A configuration profile is always resolved from the config file and
9
- * environment variables (per options.profileOptions); it supplies host,
10
- * accountId, workspaceId, and credentials wherever the caller did not set them
11
- * explicitly. Explicit options always take precedence.
12
- *
13
- * @throws if host is neither provided nor present in the resolved profile.
14
- */
15
- export async function resolveClientConfig(options) {
16
- const profile = await resolve(options.profileOptions);
17
- const host = options.host ?? profile.host;
18
- if (host === undefined) {
19
- throw new Error('Host is required.');
20
- }
21
- // The provided httpClient (or the default fetch client) is the base wire;
22
- // authentication and the optional timeout are layered on top of it. The
23
- // default credential chain reuses the profile resolved above so that the
24
- // same profileOptions govern host and authentication alike.
25
- const base = options.httpClient ?? newFetchHttpClient();
26
- const credentials = options.credentials ?? defaultCredentials({ profile });
27
- let httpClient = new AuthHttpClient(base, credentials);
28
- if (options.timeout !== undefined) {
29
- httpClient = new TimeoutHttpClient(httpClient, options.timeout);
30
- }
31
- const accountId = options.accountId ?? profile.accountId;
32
- const workspaceId = options.workspaceId ?? profile.workspaceId;
33
- return {
34
- host: host.replace(/\/$/, ''),
35
- httpClient,
36
- ...(accountId !== undefined && { accountId }),
37
- ...(workspaceId !== undefined && { workspaceId }),
38
- };
7
+ * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.
8
+ *
9
+ * A configuration profile is always resolved from the config file and
10
+ * environment variables (per options.profileOptions); it supplies host,
11
+ * accountId, workspaceId, and credentials wherever the caller did not set them
12
+ * explicitly. Explicit options always take precedence.
13
+ *
14
+ * @throws if host is neither provided nor present in the resolved profile.
15
+ */
16
+ async function resolveClientConfig(options) {
17
+ const profile = await resolve(options.profileOptions);
18
+ const host = options.host ?? profile.host;
19
+ if (host === void 0) throw new Error("Host is required.");
20
+ let httpClient = new AuthHttpClient(options.httpClient ?? newFetchHttpClient(), options.credentials ?? defaultCredentials({ profile }));
21
+ if (options.timeout !== void 0) httpClient = new TimeoutHttpClient(httpClient, options.timeout);
22
+ const accountId = options.accountId ?? profile.accountId;
23
+ const workspaceId = options.workspaceId ?? profile.workspaceId;
24
+ return {
25
+ host: host.replace(/\/$/, ""),
26
+ httpClient,
27
+ ...accountId !== void 0 && { accountId },
28
+ ...workspaceId !== void 0 && { workspaceId }
29
+ };
39
30
  }
40
31
  /** Wraps an HttpClient and adds authentication headers to requests. */
41
- class AuthHttpClient {
42
- base;
43
- credentials;
44
- constructor(base, credentials) {
45
- this.base = base;
46
- this.credentials = credentials;
47
- }
48
- async send(request) {
49
- const authHeaders = await this.credentials.authHeaders();
50
- // Do not modify the original request.
51
- const headers = new Headers(request.headers);
52
- for (const h of authHeaders) {
53
- headers.set(h.key, h.value);
54
- }
55
- return this.base.send({ ...request, headers });
56
- }
57
- }
32
+ var AuthHttpClient = class {
33
+ constructor(base, credentials) {
34
+ this.base = base;
35
+ this.credentials = credentials;
36
+ }
37
+ async send(request) {
38
+ const authHeaders = await this.credentials.authHeaders();
39
+ const headers = new Headers(request.headers);
40
+ for (const h of authHeaders) headers.set(h.key, h.value);
41
+ return this.base.send({
42
+ ...request,
43
+ headers
44
+ });
45
+ }
46
+ };
58
47
  /** Wraps an HttpClient and applies a default timeout to requests. */
59
- class TimeoutHttpClient {
60
- base;
61
- timeout;
62
- constructor(base, timeout) {
63
- this.base = base;
64
- this.timeout = timeout;
65
- }
66
- async send(request) {
67
- const timeoutSignal = AbortSignal.timeout(this.timeout);
68
- const signal = request.signal !== undefined
69
- ? AbortSignal.any([request.signal, timeoutSignal])
70
- : timeoutSignal;
71
- return this.base.send({ ...request, signal });
72
- }
73
- }
48
+ var TimeoutHttpClient = class {
49
+ constructor(base, timeout) {
50
+ this.base = base;
51
+ this.timeout = timeout;
52
+ }
53
+ async send(request) {
54
+ const timeoutSignal = AbortSignal.timeout(this.timeout);
55
+ const signal = request.signal !== void 0 ? AbortSignal.any([request.signal, timeoutSignal]) : timeoutSignal;
56
+ return this.base.send({
57
+ ...request,
58
+ signal
59
+ });
60
+ }
61
+ };
62
+
63
+ //#endregion
64
+ export { resolveClientConfig };
74
65
  //# sourceMappingURL=transport.js.map