@databricks/sdk-uc-schemas 0.27.0 → 0.35.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/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/v1/client.d.ts +48 -44
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +179 -226
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +3 -7
- package/dist/v1/index.js +4 -7
- package/dist/v1/model.d.ts +185 -182
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +166 -190
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +21 -17
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +60 -69
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts +18 -14
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +76 -103
- package/dist/v1/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/v1/index.d.ts.map +0 -1
- package/dist/v1/index.js.map +0 -1
package/dist/v1/model.js
CHANGED
|
@@ -1,199 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/v1/model.ts
|
|
3
4
|
/** The type of the catalog. */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
MANAGED_ONLINE_CATALOG: 'MANAGED_ONLINE_CATALOG',
|
|
5
|
+
const CatalogType = {
|
|
6
|
+
MANAGED_CATALOG: "MANAGED_CATALOG",
|
|
7
|
+
DELTASHARING_CATALOG: "DELTASHARING_CATALOG",
|
|
8
|
+
SYSTEM_CATALOG: "SYSTEM_CATALOG",
|
|
9
|
+
INTERNAL_CATALOG: "INTERNAL_CATALOG",
|
|
10
|
+
FOREIGN_CATALOG: "FOREIGN_CATALOG",
|
|
11
|
+
MANAGED_ONLINE_CATALOG: "MANAGED_ONLINE_CATALOG"
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
inheritedFromType: d.inherited_from_type,
|
|
23
|
-
inheritedFromName: d.inherited_from_name,
|
|
13
|
+
const unmarshalDeleteSchemaResponseSchema = z.object({});
|
|
14
|
+
const unmarshalEffectivePredictiveOptimizationFlagSchema = z.object({
|
|
15
|
+
value: z.string().optional(),
|
|
16
|
+
inherited_from_type: z.string().optional(),
|
|
17
|
+
inherited_from_name: z.string().optional()
|
|
18
|
+
}).transform((d) => ({
|
|
19
|
+
value: d.value,
|
|
20
|
+
inheritedFromType: d.inherited_from_type,
|
|
21
|
+
inheritedFromName: d.inherited_from_name
|
|
24
22
|
}));
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
schemas: d.schemas,
|
|
32
|
-
nextPageToken: d.next_page_token,
|
|
23
|
+
const unmarshalListSchemasResponseSchema = z.object({
|
|
24
|
+
schemas: z.array(z.lazy(() => unmarshalSchemaInfoSchema)).optional(),
|
|
25
|
+
next_page_token: z.string().optional()
|
|
26
|
+
}).transform((d) => ({
|
|
27
|
+
schemas: d.schemas,
|
|
28
|
+
nextPageToken: d.next_page_token
|
|
33
29
|
}));
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
fullName: d.full_name,
|
|
77
|
-
createdAt: d.created_at,
|
|
78
|
-
createdBy: d.created_by,
|
|
79
|
-
updatedAt: d.updated_at,
|
|
80
|
-
updatedBy: d.updated_by,
|
|
81
|
-
catalogType: d.catalog_type,
|
|
82
|
-
storageLocation: d.storage_location,
|
|
83
|
-
effectivePredictiveOptimizationFlag: d.effective_predictive_optimization_flag,
|
|
84
|
-
schemaId: d.schema_id,
|
|
85
|
-
browseOnly: d.browse_only,
|
|
86
|
-
customMaxRetentionHours: d.custom_max_retention_hours,
|
|
87
|
-
properties: d.properties,
|
|
88
|
-
options: d.options,
|
|
30
|
+
const unmarshalSchemaInfoSchema = z.object({
|
|
31
|
+
name: z.string().optional(),
|
|
32
|
+
catalog_name: z.string().optional(),
|
|
33
|
+
owner: z.string().optional(),
|
|
34
|
+
comment: z.string().optional(),
|
|
35
|
+
storage_root: z.string().optional(),
|
|
36
|
+
enable_predictive_optimization: z.string().optional(),
|
|
37
|
+
metastore_id: z.string().optional(),
|
|
38
|
+
full_name: z.string().optional(),
|
|
39
|
+
created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
40
|
+
created_by: z.string().optional(),
|
|
41
|
+
updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
42
|
+
updated_by: z.string().optional(),
|
|
43
|
+
catalog_type: z.string().optional(),
|
|
44
|
+
storage_location: z.string().optional(),
|
|
45
|
+
effective_predictive_optimization_flag: z.lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema).optional(),
|
|
46
|
+
schema_id: z.string().optional(),
|
|
47
|
+
browse_only: z.boolean().optional(),
|
|
48
|
+
custom_max_retention_hours: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
49
|
+
properties: z.record(z.string(), z.string()).optional(),
|
|
50
|
+
options: z.record(z.string(), z.string()).optional()
|
|
51
|
+
}).transform((d) => ({
|
|
52
|
+
name: d.name,
|
|
53
|
+
catalogName: d.catalog_name,
|
|
54
|
+
owner: d.owner,
|
|
55
|
+
comment: d.comment,
|
|
56
|
+
storageRoot: d.storage_root,
|
|
57
|
+
enablePredictiveOptimization: d.enable_predictive_optimization,
|
|
58
|
+
metastoreId: d.metastore_id,
|
|
59
|
+
fullName: d.full_name,
|
|
60
|
+
createdAt: d.created_at,
|
|
61
|
+
createdBy: d.created_by,
|
|
62
|
+
updatedAt: d.updated_at,
|
|
63
|
+
updatedBy: d.updated_by,
|
|
64
|
+
catalogType: d.catalog_type,
|
|
65
|
+
storageLocation: d.storage_location,
|
|
66
|
+
effectivePredictiveOptimizationFlag: d.effective_predictive_optimization_flag,
|
|
67
|
+
schemaId: d.schema_id,
|
|
68
|
+
browseOnly: d.browse_only,
|
|
69
|
+
customMaxRetentionHours: d.custom_max_retention_hours,
|
|
70
|
+
properties: d.properties,
|
|
71
|
+
options: d.options
|
|
89
72
|
}));
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
browse_only: d.browseOnly,
|
|
133
|
-
custom_max_retention_hours: d.customMaxRetentionHours,
|
|
134
|
-
properties: d.properties,
|
|
135
|
-
options: d.options,
|
|
73
|
+
const marshalCreateSchemaRequestSchema = z.object({
|
|
74
|
+
name: z.string().optional(),
|
|
75
|
+
catalogName: z.string().optional(),
|
|
76
|
+
owner: z.string().optional(),
|
|
77
|
+
comment: z.string().optional(),
|
|
78
|
+
storageRoot: z.string().optional(),
|
|
79
|
+
enablePredictiveOptimization: z.string().optional(),
|
|
80
|
+
metastoreId: z.string().optional(),
|
|
81
|
+
fullName: z.string().optional(),
|
|
82
|
+
createdAt: z.bigint().optional(),
|
|
83
|
+
createdBy: z.string().optional(),
|
|
84
|
+
updatedAt: z.bigint().optional(),
|
|
85
|
+
updatedBy: z.string().optional(),
|
|
86
|
+
catalogType: z.string().optional(),
|
|
87
|
+
storageLocation: z.string().optional(),
|
|
88
|
+
effectivePredictiveOptimizationFlag: z.lazy(() => marshalEffectivePredictiveOptimizationFlagSchema).optional(),
|
|
89
|
+
schemaId: z.string().optional(),
|
|
90
|
+
browseOnly: z.boolean().optional(),
|
|
91
|
+
customMaxRetentionHours: z.bigint().optional(),
|
|
92
|
+
properties: z.record(z.string(), z.string()).optional(),
|
|
93
|
+
options: z.record(z.string(), z.string()).optional()
|
|
94
|
+
}).transform((d) => ({
|
|
95
|
+
name: d.name,
|
|
96
|
+
catalog_name: d.catalogName,
|
|
97
|
+
owner: d.owner,
|
|
98
|
+
comment: d.comment,
|
|
99
|
+
storage_root: d.storageRoot,
|
|
100
|
+
enable_predictive_optimization: d.enablePredictiveOptimization,
|
|
101
|
+
metastore_id: d.metastoreId,
|
|
102
|
+
full_name: d.fullName,
|
|
103
|
+
created_at: d.createdAt,
|
|
104
|
+
created_by: d.createdBy,
|
|
105
|
+
updated_at: d.updatedAt,
|
|
106
|
+
updated_by: d.updatedBy,
|
|
107
|
+
catalog_type: d.catalogType,
|
|
108
|
+
storage_location: d.storageLocation,
|
|
109
|
+
effective_predictive_optimization_flag: d.effectivePredictiveOptimizationFlag,
|
|
110
|
+
schema_id: d.schemaId,
|
|
111
|
+
browse_only: d.browseOnly,
|
|
112
|
+
custom_max_retention_hours: d.customMaxRetentionHours,
|
|
113
|
+
properties: d.properties,
|
|
114
|
+
options: d.options
|
|
136
115
|
}));
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
inherited_from_type: d.inheritedFromType,
|
|
146
|
-
inherited_from_name: d.inheritedFromName,
|
|
116
|
+
const marshalEffectivePredictiveOptimizationFlagSchema = z.object({
|
|
117
|
+
value: z.string().optional(),
|
|
118
|
+
inheritedFromType: z.string().optional(),
|
|
119
|
+
inheritedFromName: z.string().optional()
|
|
120
|
+
}).transform((d) => ({
|
|
121
|
+
value: d.value,
|
|
122
|
+
inherited_from_type: d.inheritedFromType,
|
|
123
|
+
inherited_from_name: d.inheritedFromName
|
|
147
124
|
}));
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
browse_only: d.browseOnly,
|
|
195
|
-
custom_max_retention_hours: d.customMaxRetentionHours,
|
|
196
|
-
properties: d.properties,
|
|
197
|
-
options: d.options,
|
|
125
|
+
const marshalUpdateSchemaRequestSchema = z.object({
|
|
126
|
+
fullNameArg: z.string().optional(),
|
|
127
|
+
newName: z.string().optional(),
|
|
128
|
+
name: z.string().optional(),
|
|
129
|
+
catalogName: z.string().optional(),
|
|
130
|
+
owner: z.string().optional(),
|
|
131
|
+
comment: z.string().optional(),
|
|
132
|
+
storageRoot: z.string().optional(),
|
|
133
|
+
enablePredictiveOptimization: z.string().optional(),
|
|
134
|
+
metastoreId: z.string().optional(),
|
|
135
|
+
fullName: z.string().optional(),
|
|
136
|
+
createdAt: z.bigint().optional(),
|
|
137
|
+
createdBy: z.string().optional(),
|
|
138
|
+
updatedAt: z.bigint().optional(),
|
|
139
|
+
updatedBy: z.string().optional(),
|
|
140
|
+
catalogType: z.string().optional(),
|
|
141
|
+
storageLocation: z.string().optional(),
|
|
142
|
+
effectivePredictiveOptimizationFlag: z.lazy(() => marshalEffectivePredictiveOptimizationFlagSchema).optional(),
|
|
143
|
+
schemaId: z.string().optional(),
|
|
144
|
+
browseOnly: z.boolean().optional(),
|
|
145
|
+
customMaxRetentionHours: z.bigint().optional(),
|
|
146
|
+
properties: z.record(z.string(), z.string()).optional(),
|
|
147
|
+
options: z.record(z.string(), z.string()).optional()
|
|
148
|
+
}).transform((d) => ({
|
|
149
|
+
full_name_arg: d.fullNameArg,
|
|
150
|
+
new_name: d.newName,
|
|
151
|
+
name: d.name,
|
|
152
|
+
catalog_name: d.catalogName,
|
|
153
|
+
owner: d.owner,
|
|
154
|
+
comment: d.comment,
|
|
155
|
+
storage_root: d.storageRoot,
|
|
156
|
+
enable_predictive_optimization: d.enablePredictiveOptimization,
|
|
157
|
+
metastore_id: d.metastoreId,
|
|
158
|
+
full_name: d.fullName,
|
|
159
|
+
created_at: d.createdAt,
|
|
160
|
+
created_by: d.createdBy,
|
|
161
|
+
updated_at: d.updatedAt,
|
|
162
|
+
updated_by: d.updatedBy,
|
|
163
|
+
catalog_type: d.catalogType,
|
|
164
|
+
storage_location: d.storageLocation,
|
|
165
|
+
effective_predictive_optimization_flag: d.effectivePredictiveOptimizationFlag,
|
|
166
|
+
schema_id: d.schemaId,
|
|
167
|
+
browse_only: d.browseOnly,
|
|
168
|
+
custom_max_retention_hours: d.customMaxRetentionHours,
|
|
169
|
+
properties: d.properties,
|
|
170
|
+
options: d.options
|
|
198
171
|
}));
|
|
172
|
+
|
|
173
|
+
//#endregion
|
|
174
|
+
export { CatalogType, marshalCreateSchemaRequestSchema, marshalEffectivePredictiveOptimizationFlagSchema, marshalUpdateSchemaRequestSchema, unmarshalDeleteSchemaResponseSchema, unmarshalEffectivePredictiveOptimizationFlagSchema, unmarshalListSchemasResponseSchema, unmarshalSchemaInfoSchema };
|
|
199
175
|
//# sourceMappingURL=model.js.map
|
package/dist/v1/model.js.map
CHANGED
|
@@ -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,+BAA+B;AAC/B,4FAA4F;AAC5F,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,eAAe,EAAE,iBAAiB;IAClC,oBAAoB,EAAE,sBAAsB;IAC5C,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,sBAAsB,EAAE,wBAAwB;CACxC,CAAC;AAkMX,MAAM,CAAC,MAAM,mCAAmC,GAC9C,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEf,MAAM,CAAC,MAAM,kDAAkD,GAC7D,CAAC;KACE,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,mBAAmB,EAA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ACnB,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/** The type of the catalog. */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const CatalogType = {\n MANAGED_CATALOG: 'MANAGED_CATALOG',\n DELTASHARING_CATALOG: 'DELTASHARING_CATALOG',\n SYSTEM_CATALOG: 'SYSTEM_CATALOG',\n INTERNAL_CATALOG: 'INTERNAL_CATALOG',\n FOREIGN_CATALOG: 'FOREIGN_CATALOG',\n MANAGED_ONLINE_CATALOG: 'MANAGED_ONLINE_CATALOG',\n} as const;\nexport type CatalogType =\n | (typeof CatalogType)[keyof typeof CatalogType]\n | (string & {});\n\nexport interface CreateSchemaRequest {\n /** Name of schema, relative to parent catalog. */\n name?: string | undefined;\n /** Name of parent catalog. */\n catalogName?: string | undefined;\n /** Username of current owner of schema. */\n owner?: string | undefined;\n /** User-provided free-form text description. */\n comment?: string | undefined;\n /** Storage root URL for managed tables within schema. */\n storageRoot?: string | undefined;\n /** Whether predictive optimization should be enabled for this object and objects under it. */\n enablePredictiveOptimization?: string | undefined;\n /** Unique identifier of parent metastore. */\n metastoreId?: string | undefined;\n /** Full name of schema, in form of __catalog_name__.__schema_name__. */\n fullName?: string | undefined;\n /** Time at which this schema was created, in epoch milliseconds. */\n createdAt?: bigint | undefined;\n /** Username of schema creator. */\n createdBy?: string | undefined;\n /** Time at which this schema was created, in epoch milliseconds. */\n updatedAt?: bigint | undefined;\n /** Username of user who last modified schema. */\n updatedBy?: string | undefined;\n /** The type of the parent catalog. */\n catalogType?: CatalogType | undefined;\n /** Storage location for managed tables within schema. */\n storageLocation?: string | undefined;\n effectivePredictiveOptimizationFlag?:\n | EffectivePredictiveOptimizationFlag\n | undefined;\n /** The unique identifier of the schema. */\n schemaId?: string | 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 /** Custom maximum retention period in hours for the schema. */\n customMaxRetentionHours?: bigint | undefined;\n /** A map of key-value properties attached to the securable. */\n properties?: Record<string, string> | undefined;\n /** A map of key-value properties attached to the securable. */\n options?: Record<string, string> | undefined;\n}\n\nexport interface DeleteSchemaRequest {\n /** Full name of the schema. */\n fullNameArg?: string | undefined;\n /** Force deletion even if the schema is not empty. */\n force?: boolean | undefined;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DeleteSchemaResponse {}\n\nexport interface EffectivePredictiveOptimizationFlag {\n /** Whether predictive optimization should be enabled for this object and objects under it. */\n value?: string | undefined;\n /** The type of the object from which the flag was inherited. If there was no inheritance, this field is left blank. */\n inheritedFromType?: string | undefined;\n /** The name of the object from which the flag was inherited. If there was no inheritance, this field is left blank. */\n inheritedFromName?: string | undefined;\n}\n\nexport interface GetSchemaRequest {\n /** Full name of the schema. */\n fullNameArg?: string | undefined;\n /** Whether to include schemas in the response for which the principal can only access selective metadata for */\n includeBrowse?: boolean | undefined;\n}\n\nexport interface ListSchemasRequest {\n /** Parent catalog for schemas of interest. */\n catalogName?: string | undefined;\n /**\n * Maximum number of schemas to return.\n * If not set, all the schemas are returned (not recommended).\n * - when set to a value greater than 0, the page length is the minimum of this value and a server configured value;\n * - when set to 0, the page length is set to a server configured value (recommended);\n * - when set to a value less than 0, an invalid parameter error is returned;\n */\n maxResults?: number | undefined;\n /** Opaque pagination token to go to next page based on previous query. */\n pageToken?: string | undefined;\n /** Whether to include schemas in the response for which the principal can only access selective metadata for */\n includeBrowse?: boolean | undefined;\n}\n\nexport interface ListSchemasResponse {\n /** An array of schema information objects. */\n schemas?: SchemaInfo[] | 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 (for the next page of results).\n */\n nextPageToken?: string | undefined;\n}\n\nexport interface SchemaInfo {\n /** Name of schema, relative to parent catalog. */\n name?: string | undefined;\n /** Name of parent catalog. */\n catalogName?: string | undefined;\n /** Username of current owner of schema. */\n owner?: string | undefined;\n /** User-provided free-form text description. */\n comment?: string | undefined;\n /** Storage root URL for managed tables within schema. */\n storageRoot?: string | undefined;\n /** Whether predictive optimization should be enabled for this object and objects under it. */\n enablePredictiveOptimization?: string | undefined;\n /** Unique identifier of parent metastore. */\n metastoreId?: string | undefined;\n /** Full name of schema, in form of __catalog_name__.__schema_name__. */\n fullName?: string | undefined;\n /** Time at which this schema was created, in epoch milliseconds. */\n createdAt?: bigint | undefined;\n /** Username of schema creator. */\n createdBy?: string | undefined;\n /** Time at which this schema was created, in epoch milliseconds. */\n updatedAt?: bigint | undefined;\n /** Username of user who last modified schema. */\n updatedBy?: string | undefined;\n /** The type of the parent catalog. */\n catalogType?: CatalogType | undefined;\n /** Storage location for managed tables within schema. */\n storageLocation?: string | undefined;\n effectivePredictiveOptimizationFlag?:\n | EffectivePredictiveOptimizationFlag\n | undefined;\n /** The unique identifier of the schema. */\n schemaId?: string | 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 /** Custom maximum retention period in hours for the schema. */\n customMaxRetentionHours?: bigint | undefined;\n /** A map of key-value properties attached to the securable. */\n properties?: Record<string, string> | undefined;\n /** A map of key-value properties attached to the securable. */\n options?: Record<string, string> | undefined;\n}\n\nexport interface UpdateSchemaRequest {\n /** Full name of the schema. */\n fullNameArg?: string | undefined;\n /** New name for the schema. */\n newName?: string | undefined;\n /** Name of schema, relative to parent catalog. */\n name?: string | undefined;\n /** Name of parent catalog. */\n catalogName?: string | undefined;\n /** Username of current owner of schema. */\n owner?: string | undefined;\n /** User-provided free-form text description. */\n comment?: string | undefined;\n /** Storage root URL for managed tables within schema. */\n storageRoot?: string | undefined;\n /** Whether predictive optimization should be enabled for this object and objects under it. */\n enablePredictiveOptimization?: string | undefined;\n /** Unique identifier of parent metastore. */\n metastoreId?: string | undefined;\n /** Full name of schema, in form of __catalog_name__.__schema_name__. */\n fullName?: string | undefined;\n /** Time at which this schema was created, in epoch milliseconds. */\n createdAt?: bigint | undefined;\n /** Username of schema creator. */\n createdBy?: string | undefined;\n /** Time at which this schema was created, in epoch milliseconds. */\n updatedAt?: bigint | undefined;\n /** Username of user who last modified schema. */\n updatedBy?: string | undefined;\n /** The type of the parent catalog. */\n catalogType?: CatalogType | undefined;\n /** Storage location for managed tables within schema. */\n storageLocation?: string | undefined;\n effectivePredictiveOptimizationFlag?:\n | EffectivePredictiveOptimizationFlag\n | undefined;\n /** The unique identifier of the schema. */\n schemaId?: string | 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 /** Custom maximum retention period in hours for the schema. */\n customMaxRetentionHours?: bigint | undefined;\n /** A map of key-value properties attached to the securable. */\n properties?: Record<string, string> | undefined;\n /** A map of key-value properties attached to the securable. */\n options?: Record<string, string> | undefined;\n}\n\nexport const unmarshalDeleteSchemaResponseSchema: z.ZodType<DeleteSchemaResponse> =\n z.object({});\n\nexport const unmarshalEffectivePredictiveOptimizationFlagSchema: z.ZodType<EffectivePredictiveOptimizationFlag> =\n z\n .object({\n value: z.string().optional(),\n inherited_from_type: z.string().optional(),\n inherited_from_name: z.string().optional(),\n })\n .transform(d => ({\n value: d.value,\n inheritedFromType: d.inherited_from_type,\n inheritedFromName: d.inherited_from_name,\n }));\n\nexport const unmarshalListSchemasResponseSchema: z.ZodType<ListSchemasResponse> =\n z\n .object({\n schemas: z.array(z.lazy(() => unmarshalSchemaInfoSchema)).optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n schemas: d.schemas,\n nextPageToken: d.next_page_token,\n }));\n\nexport const unmarshalSchemaInfoSchema: z.ZodType<SchemaInfo> = z\n .object({\n name: z.string().optional(),\n catalog_name: z.string().optional(),\n owner: z.string().optional(),\n comment: z.string().optional(),\n storage_root: z.string().optional(),\n enable_predictive_optimization: z.string().optional(),\n metastore_id: z.string().optional(),\n full_name: 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 catalog_type: z.string().optional(),\n storage_location: z.string().optional(),\n effective_predictive_optimization_flag: z\n .lazy(() => unmarshalEffectivePredictiveOptimizationFlagSchema)\n .optional(),\n schema_id: z.string().optional(),\n browse_only: z.boolean().optional(),\n custom_max_retention_hours: z\n .union([z.number(), z.bigint()])\n .transform(v => BigInt(v))\n .optional(),\n properties: z.record(z.string(), z.string()).optional(),\n options: z.record(z.string(), z.string()).optional(),\n })\n .transform(d => ({\n name: d.name,\n catalogName: d.catalog_name,\n owner: d.owner,\n comment: d.comment,\n storageRoot: d.storage_root,\n enablePredictiveOptimization: d.enable_predictive_optimization,\n metastoreId: d.metastore_id,\n fullName: d.full_name,\n createdAt: d.created_at,\n createdBy: d.created_by,\n updatedAt: d.updated_at,\n updatedBy: d.updated_by,\n catalogType: d.catalog_type,\n storageLocation: d.storage_location,\n effectivePredictiveOptimizationFlag:\n d.effective_predictive_optimization_flag,\n schemaId: d.schema_id,\n browseOnly: d.browse_only,\n customMaxRetentionHours: d.custom_max_retention_hours,\n properties: d.properties,\n options: d.options,\n }));\n\nexport const marshalCreateSchemaRequestSchema: z.ZodType = z\n .object({\n name: z.string().optional(),\n catalogName: z.string().optional(),\n owner: z.string().optional(),\n comment: z.string().optional(),\n storageRoot: z.string().optional(),\n enablePredictiveOptimization: z.string().optional(),\n metastoreId: z.string().optional(),\n fullName: z.string().optional(),\n createdAt: z.bigint().optional(),\n createdBy: z.string().optional(),\n updatedAt: z.bigint().optional(),\n updatedBy: z.string().optional(),\n catalogType: z.string().optional(),\n storageLocation: z.string().optional(),\n effectivePredictiveOptimizationFlag: z\n .lazy(() => marshalEffectivePredictiveOptimizationFlagSchema)\n .optional(),\n schemaId: z.string().optional(),\n browseOnly: z.boolean().optional(),\n customMaxRetentionHours: z.bigint().optional(),\n properties: z.record(z.string(), z.string()).optional(),\n options: z.record(z.string(), z.string()).optional(),\n })\n .transform(d => ({\n name: d.name,\n catalog_name: d.catalogName,\n owner: d.owner,\n comment: d.comment,\n storage_root: d.storageRoot,\n enable_predictive_optimization: d.enablePredictiveOptimization,\n metastore_id: d.metastoreId,\n full_name: d.fullName,\n created_at: d.createdAt,\n created_by: d.createdBy,\n updated_at: d.updatedAt,\n updated_by: d.updatedBy,\n catalog_type: d.catalogType,\n storage_location: d.storageLocation,\n effective_predictive_optimization_flag:\n d.effectivePredictiveOptimizationFlag,\n schema_id: d.schemaId,\n browse_only: d.browseOnly,\n custom_max_retention_hours: d.customMaxRetentionHours,\n properties: d.properties,\n options: d.options,\n }));\n\nexport const marshalEffectivePredictiveOptimizationFlagSchema: z.ZodType = z\n .object({\n value: z.string().optional(),\n inheritedFromType: z.string().optional(),\n inheritedFromName: z.string().optional(),\n })\n .transform(d => ({\n value: d.value,\n inherited_from_type: d.inheritedFromType,\n inherited_from_name: d.inheritedFromName,\n }));\n\nexport const marshalUpdateSchemaRequestSchema: 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 owner: z.string().optional(),\n comment: z.string().optional(),\n storageRoot: z.string().optional(),\n enablePredictiveOptimization: z.string().optional(),\n metastoreId: z.string().optional(),\n fullName: z.string().optional(),\n createdAt: z.bigint().optional(),\n createdBy: z.string().optional(),\n updatedAt: z.bigint().optional(),\n updatedBy: z.string().optional(),\n catalogType: z.string().optional(),\n storageLocation: z.string().optional(),\n effectivePredictiveOptimizationFlag: z\n .lazy(() => marshalEffectivePredictiveOptimizationFlagSchema)\n .optional(),\n schemaId: z.string().optional(),\n browseOnly: z.boolean().optional(),\n customMaxRetentionHours: z.bigint().optional(),\n properties: z.record(z.string(), z.string()).optional(),\n options: z.record(z.string(), z.string()).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 owner: d.owner,\n comment: d.comment,\n storage_root: d.storageRoot,\n enable_predictive_optimization: d.enablePredictiveOptimization,\n metastore_id: d.metastoreId,\n full_name: d.fullName,\n created_at: d.createdAt,\n created_by: d.createdBy,\n updated_at: d.updatedAt,\n updated_by: d.updatedBy,\n catalog_type: d.catalogType,\n storage_location: d.storageLocation,\n effective_predictive_optimization_flag:\n d.effectivePredictiveOptimizationFlag,\n schema_id: d.schemaId,\n browse_only: d.browseOnly,\n custom_max_retention_hours: d.customMaxRetentionHours,\n properties: d.properties,\n options: d.options,\n }));\n"],"mappings":";;;;AAMA,MAAa,cAAc;CACzB,iBAAiB;CACjB,sBAAsB;CACtB,gBAAgB;CAChB,kBAAkB;CAClB,iBAAiB;CACjB,wBAAwB;CACzB;AAkMD,MAAa,sCACX,EAAE,OAAO,EAAE,CAAC;AAEd,MAAa,qDACX,EACG,OAAO;CACN,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,qBAAqB,EAAE,QAAQ,CAAC,UAAU;CAC1C,qBAAqB,EAAE,QAAQ,CAAC,UAAU;CAC3C,CAAC,CACD,WAAU,OAAM;CACf,OAAO,EAAE;CACT,mBAAmB,EAAE;CACrB,mBAAmB,EAAE;CACtB,EAAE;AAEP,MAAa,qCACX,EACG,OAAO;CACN,SAAS,EAAE,MAAM,EAAE,WAAW,0BAA0B,CAAC,CAAC,UAAU;CACpE,iBAAiB,EAAE,QAAQ,CAAC,UAAU;CACvC,CAAC,CACD,WAAU,OAAM;CACf,SAAS,EAAE;CACX,eAAe,EAAE;CAClB,EAAE;AAEP,MAAa,4BAAmD,EAC7D,OAAO;CACN,MAAM,EAAE,QAAQ,CAAC,UAAU;CAC3B,cAAc,EAAE,QAAQ,CAAC,UAAU;CACnC,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B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Y,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,UAAU;CACvD,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,UAAU;CACrD,CAAC,CACD,WAAU,OAAM;CACf,eAAe,EAAE;CACjB,UAAU,EAAE;CACZ,MAAM,EAAE;CACR,cAAc,EAAE;CAChB,OAAO,EAAE;CACT,SAAS,EAAE;CACX,cAAc,EAAE;CAChB,gCAAgC,EAAE;CAClC,cAAc,EAAE;CAChB,WAAW,EAAE;CACb,YAAY,EAAE;CACd,YAAY,EAAE;CACd,YAAY,EAAE;CACd,YAAY,EAAE;CACd,cAAc,EAAE;CAChB,kBAAkB,EAAE;CACpB,wCACE,EAAE;CACJ,WAAW,EAAE;CACb,aAAa,EAAE;CACf,4BAA4B,EAAE;CAC9B,YAAY,EAAE;CACd,SAAS,EAAE;CACZ,EAAE"}
|
package/dist/v1/transport.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
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","
|
|
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"}
|
package/dist/v1/transport.js
CHANGED
|
@@ -1,74 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|