@databricks/sdk-uc-functions 0.34.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 +63 -59
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +195 -244
- 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 +361 -358
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +344 -471
- 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,483 +1,356 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/v1/model.ts
|
|
4
|
+
const ColumnTypeName = {
|
|
5
|
+
BOOLEAN: "BOOLEAN",
|
|
6
|
+
BYTE: "BYTE",
|
|
7
|
+
SHORT: "SHORT",
|
|
8
|
+
INT: "INT",
|
|
9
|
+
LONG: "LONG",
|
|
10
|
+
FLOAT: "FLOAT",
|
|
11
|
+
DOUBLE: "DOUBLE",
|
|
12
|
+
DATE: "DATE",
|
|
13
|
+
TIMESTAMP: "TIMESTAMP",
|
|
14
|
+
STRING: "STRING",
|
|
15
|
+
BINARY: "BINARY",
|
|
16
|
+
DECIMAL: "DECIMAL",
|
|
17
|
+
INTERVAL: "INTERVAL",
|
|
18
|
+
ARRAY: "ARRAY",
|
|
19
|
+
STRUCT: "STRUCT",
|
|
20
|
+
MAP: "MAP",
|
|
21
|
+
CHAR: "CHAR",
|
|
22
|
+
NULL: "NULL",
|
|
23
|
+
USER_DEFINED_TYPE: "USER_DEFINED_TYPE",
|
|
24
|
+
TIMESTAMP_NTZ: "TIMESTAMP_NTZ",
|
|
25
|
+
VARIANT: "VARIANT",
|
|
26
|
+
GEOMETRY: "GEOMETRY",
|
|
27
|
+
GEOGRAPHY: "GEOGRAPHY",
|
|
28
|
+
TABLE_TYPE: "TABLE_TYPE"
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const FunctionParameterMode = { IN: "IN" };
|
|
31
|
+
const FunctionParameterType = {
|
|
32
|
+
PARAM: "PARAM",
|
|
33
|
+
COLUMN: "COLUMN"
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const FunctionInfo_ParameterStyle = { S: "S" };
|
|
36
|
+
const FunctionInfo_RoutineBody = {
|
|
37
|
+
SQL: "SQL",
|
|
38
|
+
EXTERNAL: "EXTERNAL"
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const FunctionInfo_SecurityType = { DEFINER: "DEFINER" };
|
|
41
|
+
const FunctionInfo_SqlDataAccess = {
|
|
42
|
+
CONTAINS_SQL: "CONTAINS_SQL",
|
|
43
|
+
READS_SQL_DATA: "READS_SQL_DATA",
|
|
44
|
+
NO_SQL: "NO_SQL"
|
|
42
45
|
};
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
specific_name: z.string().optional(),
|
|
129
|
-
return_params: z
|
|
130
|
-
.lazy(() => unmarshalFunctionParameterInfosSchema)
|
|
131
|
-
.optional(),
|
|
132
|
-
external_name: z.string().optional(),
|
|
133
|
-
external_language: z.string().optional(),
|
|
134
|
-
sql_path: z.string().optional(),
|
|
135
|
-
owner: z.string().optional(),
|
|
136
|
-
comment: z.string().optional(),
|
|
137
|
-
properties: z.string().optional(),
|
|
138
|
-
routine_dependencies: z
|
|
139
|
-
.lazy(() => unmarshalDependencyListSchema)
|
|
140
|
-
.optional(),
|
|
141
|
-
metastore_id: z.string().optional(),
|
|
142
|
-
full_name: z.string().optional(),
|
|
143
|
-
created_at: z
|
|
144
|
-
.union([z.number(), z.bigint()])
|
|
145
|
-
.transform(v => BigInt(v))
|
|
146
|
-
.optional(),
|
|
147
|
-
created_by: z.string().optional(),
|
|
148
|
-
updated_at: z
|
|
149
|
-
.union([z.number(), z.bigint()])
|
|
150
|
-
.transform(v => BigInt(v))
|
|
151
|
-
.optional(),
|
|
152
|
-
updated_by: z.string().optional(),
|
|
153
|
-
function_id: z.string().optional(),
|
|
154
|
-
browse_only: z.boolean().optional(),
|
|
155
|
-
})
|
|
156
|
-
.transform(d => ({
|
|
157
|
-
name: d.name,
|
|
158
|
-
catalogName: d.catalog_name,
|
|
159
|
-
schemaName: d.schema_name,
|
|
160
|
-
inputParams: d.input_params,
|
|
161
|
-
dataType: d.data_type,
|
|
162
|
-
fullDataType: d.full_data_type,
|
|
163
|
-
routineBody: d.routine_body,
|
|
164
|
-
routineDefinition: d.routine_definition,
|
|
165
|
-
parameterStyle: d.parameter_style,
|
|
166
|
-
isDeterministic: d.is_deterministic,
|
|
167
|
-
sqlDataAccess: d.sql_data_access,
|
|
168
|
-
isNullCall: d.is_null_call,
|
|
169
|
-
securityType: d.security_type,
|
|
170
|
-
specificName: d.specific_name,
|
|
171
|
-
returnParams: d.return_params,
|
|
172
|
-
externalName: d.external_name,
|
|
173
|
-
externalLanguage: d.external_language,
|
|
174
|
-
sqlPath: d.sql_path,
|
|
175
|
-
owner: d.owner,
|
|
176
|
-
comment: d.comment,
|
|
177
|
-
properties: d.properties,
|
|
178
|
-
routineDependencies: d.routine_dependencies,
|
|
179
|
-
metastoreId: d.metastore_id,
|
|
180
|
-
fullName: d.full_name,
|
|
181
|
-
createdAt: d.created_at,
|
|
182
|
-
createdBy: d.created_by,
|
|
183
|
-
updatedAt: d.updated_at,
|
|
184
|
-
updatedBy: d.updated_by,
|
|
185
|
-
functionId: d.function_id,
|
|
186
|
-
browseOnly: d.browse_only,
|
|
187
|
-
}));
|
|
188
|
-
export const unmarshalFunctionParameterInfoSchema = z
|
|
189
|
-
.object({
|
|
190
|
-
name: z.string().optional(),
|
|
191
|
-
type_text: z.string().optional(),
|
|
192
|
-
type_json: z.string().optional(),
|
|
193
|
-
type_name: z.string().optional(),
|
|
194
|
-
type_precision: z.number().optional(),
|
|
195
|
-
type_scale: z.number().optional(),
|
|
196
|
-
type_interval_type: z.string().optional(),
|
|
197
|
-
position: z.number().optional(),
|
|
198
|
-
parameter_mode: z.string().optional(),
|
|
199
|
-
parameter_type: z.string().optional(),
|
|
200
|
-
parameter_default: z.string().optional(),
|
|
201
|
-
comment: z.string().optional(),
|
|
202
|
-
})
|
|
203
|
-
.transform(d => ({
|
|
204
|
-
name: d.name,
|
|
205
|
-
typeText: d.type_text,
|
|
206
|
-
typeJson: d.type_json,
|
|
207
|
-
typeName: d.type_name,
|
|
208
|
-
typePrecision: d.type_precision,
|
|
209
|
-
typeScale: d.type_scale,
|
|
210
|
-
typeIntervalType: d.type_interval_type,
|
|
211
|
-
position: d.position,
|
|
212
|
-
parameterMode: d.parameter_mode,
|
|
213
|
-
parameterType: d.parameter_type,
|
|
214
|
-
parameterDefault: d.parameter_default,
|
|
215
|
-
comment: d.comment,
|
|
216
|
-
}));
|
|
217
|
-
export const unmarshalFunctionParameterInfosSchema = z
|
|
218
|
-
.object({
|
|
219
|
-
parameters: z
|
|
220
|
-
.array(z.lazy(() => unmarshalFunctionParameterInfoSchema))
|
|
221
|
-
.optional(),
|
|
222
|
-
})
|
|
223
|
-
.transform(d => ({
|
|
224
|
-
parameters: d.parameters,
|
|
225
|
-
}));
|
|
226
|
-
export const unmarshalListFunctionsResponseSchema = z
|
|
227
|
-
.object({
|
|
228
|
-
functions: z.array(z.lazy(() => unmarshalFunctionInfoSchema)).optional(),
|
|
229
|
-
next_page_token: z.string().optional(),
|
|
230
|
-
})
|
|
231
|
-
.transform(d => ({
|
|
232
|
-
functions: d.functions,
|
|
233
|
-
nextPageToken: d.next_page_token,
|
|
234
|
-
}));
|
|
235
|
-
export const unmarshalTableDependencySchema = z
|
|
236
|
-
.object({
|
|
237
|
-
table_full_name: z.string().optional(),
|
|
238
|
-
})
|
|
239
|
-
.transform(d => ({
|
|
240
|
-
tableFullName: d.table_full_name,
|
|
241
|
-
}));
|
|
242
|
-
export const marshalConnectionDependencySchema = z
|
|
243
|
-
.object({
|
|
244
|
-
connectionName: z.string().optional(),
|
|
245
|
-
})
|
|
246
|
-
.transform(d => ({
|
|
247
|
-
connection_name: d.connectionName,
|
|
248
|
-
}));
|
|
249
|
-
export const marshalCreateFunctionSchema = z
|
|
250
|
-
.object({
|
|
251
|
-
name: z.string().optional(),
|
|
252
|
-
catalogName: z.string().optional(),
|
|
253
|
-
schemaName: z.string().optional(),
|
|
254
|
-
inputParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
|
|
255
|
-
dataType: z.string().optional(),
|
|
256
|
-
fullDataType: z.string().optional(),
|
|
257
|
-
routineBody: z.string().optional(),
|
|
258
|
-
routineDefinition: z.string().optional(),
|
|
259
|
-
parameterStyle: z.string().optional(),
|
|
260
|
-
isDeterministic: z.boolean().optional(),
|
|
261
|
-
sqlDataAccess: z.string().optional(),
|
|
262
|
-
isNullCall: z.boolean().optional(),
|
|
263
|
-
securityType: z.string().optional(),
|
|
264
|
-
specificName: z.string().optional(),
|
|
265
|
-
returnParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
|
|
266
|
-
externalName: z.string().optional(),
|
|
267
|
-
externalLanguage: z.string().optional(),
|
|
268
|
-
sqlPath: z.string().optional(),
|
|
269
|
-
owner: z.string().optional(),
|
|
270
|
-
comment: z.string().optional(),
|
|
271
|
-
properties: z.string().optional(),
|
|
272
|
-
routineDependencies: z.lazy(() => marshalDependencyListSchema).optional(),
|
|
273
|
-
metastoreId: z.string().optional(),
|
|
274
|
-
fullName: z.string().optional(),
|
|
275
|
-
createdAt: z.bigint().optional(),
|
|
276
|
-
createdBy: z.string().optional(),
|
|
277
|
-
updatedAt: z.bigint().optional(),
|
|
278
|
-
updatedBy: z.string().optional(),
|
|
279
|
-
functionId: z.string().optional(),
|
|
280
|
-
browseOnly: z.boolean().optional(),
|
|
281
|
-
})
|
|
282
|
-
.transform(d => ({
|
|
283
|
-
name: d.name,
|
|
284
|
-
catalog_name: d.catalogName,
|
|
285
|
-
schema_name: d.schemaName,
|
|
286
|
-
input_params: d.inputParams,
|
|
287
|
-
data_type: d.dataType,
|
|
288
|
-
full_data_type: d.fullDataType,
|
|
289
|
-
routine_body: d.routineBody,
|
|
290
|
-
routine_definition: d.routineDefinition,
|
|
291
|
-
parameter_style: d.parameterStyle,
|
|
292
|
-
is_deterministic: d.isDeterministic,
|
|
293
|
-
sql_data_access: d.sqlDataAccess,
|
|
294
|
-
is_null_call: d.isNullCall,
|
|
295
|
-
security_type: d.securityType,
|
|
296
|
-
specific_name: d.specificName,
|
|
297
|
-
return_params: d.returnParams,
|
|
298
|
-
external_name: d.externalName,
|
|
299
|
-
external_language: d.externalLanguage,
|
|
300
|
-
sql_path: d.sqlPath,
|
|
301
|
-
owner: d.owner,
|
|
302
|
-
comment: d.comment,
|
|
303
|
-
properties: d.properties,
|
|
304
|
-
routine_dependencies: d.routineDependencies,
|
|
305
|
-
metastore_id: d.metastoreId,
|
|
306
|
-
full_name: d.fullName,
|
|
307
|
-
created_at: d.createdAt,
|
|
308
|
-
created_by: d.createdBy,
|
|
309
|
-
updated_at: d.updatedAt,
|
|
310
|
-
updated_by: d.updatedBy,
|
|
311
|
-
function_id: d.functionId,
|
|
312
|
-
browse_only: d.browseOnly,
|
|
313
|
-
}));
|
|
314
|
-
export const marshalCreateFunctionRequestSchema = z
|
|
315
|
-
.object({
|
|
316
|
-
functionInfo: z.lazy(() => marshalCreateFunctionSchema).optional(),
|
|
317
|
-
})
|
|
318
|
-
.transform(d => ({
|
|
319
|
-
function_info: d.functionInfo,
|
|
320
|
-
}));
|
|
321
|
-
export const marshalCredentialDependencySchema = z
|
|
322
|
-
.object({
|
|
323
|
-
credentialName: z.string().optional(),
|
|
324
|
-
})
|
|
325
|
-
.transform(d => ({
|
|
326
|
-
credential_name: d.credentialName,
|
|
327
|
-
}));
|
|
328
|
-
export const marshalDependencySchema = z
|
|
329
|
-
.object({
|
|
330
|
-
value: z
|
|
331
|
-
.discriminatedUnion('$case', [
|
|
332
|
-
z.object({
|
|
333
|
-
$case: z.literal('table'),
|
|
334
|
-
table: z.lazy(() => marshalTableDependencySchema),
|
|
335
|
-
}),
|
|
336
|
-
z.object({
|
|
337
|
-
$case: z.literal('function'),
|
|
338
|
-
function: z.lazy(() => marshalFunctionDependencySchema),
|
|
339
|
-
}),
|
|
340
|
-
z.object({
|
|
341
|
-
$case: z.literal('connection'),
|
|
342
|
-
connection: z.lazy(() => marshalConnectionDependencySchema),
|
|
343
|
-
}),
|
|
344
|
-
z.object({
|
|
345
|
-
$case: z.literal('credential'),
|
|
346
|
-
credential: z.lazy(() => marshalCredentialDependencySchema),
|
|
347
|
-
}),
|
|
348
|
-
])
|
|
349
|
-
.optional(),
|
|
350
|
-
})
|
|
351
|
-
.transform(d => ({
|
|
352
|
-
...(d.value?.$case === 'table' && { table: d.value.table }),
|
|
353
|
-
...(d.value?.$case === 'function' && { function: d.value.function }),
|
|
354
|
-
...(d.value?.$case === 'connection' && { connection: d.value.connection }),
|
|
355
|
-
...(d.value?.$case === 'credential' && { credential: d.value.credential }),
|
|
46
|
+
const unmarshalConnectionDependencySchema = z.object({ connection_name: z.string().optional() }).transform((d) => ({ connectionName: d.connection_name }));
|
|
47
|
+
const unmarshalCredentialDependencySchema = z.object({ credential_name: z.string().optional() }).transform((d) => ({ credentialName: d.credential_name }));
|
|
48
|
+
const unmarshalDeleteFunctionResponseSchema = z.object({});
|
|
49
|
+
const unmarshalDependencySchema = z.object({
|
|
50
|
+
table: z.lazy(() => unmarshalTableDependencySchema).optional(),
|
|
51
|
+
function: z.lazy(() => unmarshalFunctionDependencySchema).optional(),
|
|
52
|
+
connection: z.lazy(() => unmarshalConnectionDependencySchema).optional(),
|
|
53
|
+
credential: z.lazy(() => unmarshalCredentialDependencySchema).optional()
|
|
54
|
+
}).transform((d) => ({ value: d.table !== void 0 ? {
|
|
55
|
+
$case: "table",
|
|
56
|
+
table: d.table
|
|
57
|
+
} : d.function !== void 0 ? {
|
|
58
|
+
$case: "function",
|
|
59
|
+
function: d.function
|
|
60
|
+
} : d.connection !== void 0 ? {
|
|
61
|
+
$case: "connection",
|
|
62
|
+
connection: d.connection
|
|
63
|
+
} : d.credential !== void 0 ? {
|
|
64
|
+
$case: "credential",
|
|
65
|
+
credential: d.credential
|
|
66
|
+
} : void 0 }));
|
|
67
|
+
const unmarshalDependencyListSchema = z.object({ dependencies: z.array(z.lazy(() => unmarshalDependencySchema)).optional() }).transform((d) => ({ dependencies: d.dependencies }));
|
|
68
|
+
const unmarshalFunctionDependencySchema = z.object({ function_full_name: z.string().optional() }).transform((d) => ({ functionFullName: d.function_full_name }));
|
|
69
|
+
const unmarshalFunctionInfoSchema = z.object({
|
|
70
|
+
name: z.string().optional(),
|
|
71
|
+
catalog_name: z.string().optional(),
|
|
72
|
+
schema_name: z.string().optional(),
|
|
73
|
+
input_params: z.lazy(() => unmarshalFunctionParameterInfosSchema).optional(),
|
|
74
|
+
data_type: z.string().optional(),
|
|
75
|
+
full_data_type: z.string().optional(),
|
|
76
|
+
routine_body: z.string().optional(),
|
|
77
|
+
routine_definition: z.string().optional(),
|
|
78
|
+
parameter_style: z.string().optional(),
|
|
79
|
+
is_deterministic: z.boolean().optional(),
|
|
80
|
+
sql_data_access: z.string().optional(),
|
|
81
|
+
is_null_call: z.boolean().optional(),
|
|
82
|
+
security_type: z.string().optional(),
|
|
83
|
+
specific_name: z.string().optional(),
|
|
84
|
+
return_params: z.lazy(() => unmarshalFunctionParameterInfosSchema).optional(),
|
|
85
|
+
external_name: z.string().optional(),
|
|
86
|
+
external_language: z.string().optional(),
|
|
87
|
+
sql_path: z.string().optional(),
|
|
88
|
+
owner: z.string().optional(),
|
|
89
|
+
comment: z.string().optional(),
|
|
90
|
+
properties: z.string().optional(),
|
|
91
|
+
routine_dependencies: z.lazy(() => unmarshalDependencyListSchema).optional(),
|
|
92
|
+
metastore_id: z.string().optional(),
|
|
93
|
+
full_name: z.string().optional(),
|
|
94
|
+
created_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
95
|
+
created_by: z.string().optional(),
|
|
96
|
+
updated_at: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
97
|
+
updated_by: z.string().optional(),
|
|
98
|
+
function_id: z.string().optional(),
|
|
99
|
+
browse_only: z.boolean().optional()
|
|
100
|
+
}).transform((d) => ({
|
|
101
|
+
name: d.name,
|
|
102
|
+
catalogName: d.catalog_name,
|
|
103
|
+
schemaName: d.schema_name,
|
|
104
|
+
inputParams: d.input_params,
|
|
105
|
+
dataType: d.data_type,
|
|
106
|
+
fullDataType: d.full_data_type,
|
|
107
|
+
routineBody: d.routine_body,
|
|
108
|
+
routineDefinition: d.routine_definition,
|
|
109
|
+
parameterStyle: d.parameter_style,
|
|
110
|
+
isDeterministic: d.is_deterministic,
|
|
111
|
+
sqlDataAccess: d.sql_data_access,
|
|
112
|
+
isNullCall: d.is_null_call,
|
|
113
|
+
securityType: d.security_type,
|
|
114
|
+
specificName: d.specific_name,
|
|
115
|
+
returnParams: d.return_params,
|
|
116
|
+
externalName: d.external_name,
|
|
117
|
+
externalLanguage: d.external_language,
|
|
118
|
+
sqlPath: d.sql_path,
|
|
119
|
+
owner: d.owner,
|
|
120
|
+
comment: d.comment,
|
|
121
|
+
properties: d.properties,
|
|
122
|
+
routineDependencies: d.routine_dependencies,
|
|
123
|
+
metastoreId: d.metastore_id,
|
|
124
|
+
fullName: d.full_name,
|
|
125
|
+
createdAt: d.created_at,
|
|
126
|
+
createdBy: d.created_by,
|
|
127
|
+
updatedAt: d.updated_at,
|
|
128
|
+
updatedBy: d.updated_by,
|
|
129
|
+
functionId: d.function_id,
|
|
130
|
+
browseOnly: d.browse_only
|
|
356
131
|
}));
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
132
|
+
const unmarshalFunctionParameterInfoSchema = z.object({
|
|
133
|
+
name: z.string().optional(),
|
|
134
|
+
type_text: z.string().optional(),
|
|
135
|
+
type_json: z.string().optional(),
|
|
136
|
+
type_name: z.string().optional(),
|
|
137
|
+
type_precision: z.number().optional(),
|
|
138
|
+
type_scale: z.number().optional(),
|
|
139
|
+
type_interval_type: z.string().optional(),
|
|
140
|
+
position: z.number().optional(),
|
|
141
|
+
parameter_mode: z.string().optional(),
|
|
142
|
+
parameter_type: z.string().optional(),
|
|
143
|
+
parameter_default: z.string().optional(),
|
|
144
|
+
comment: z.string().optional()
|
|
145
|
+
}).transform((d) => ({
|
|
146
|
+
name: d.name,
|
|
147
|
+
typeText: d.type_text,
|
|
148
|
+
typeJson: d.type_json,
|
|
149
|
+
typeName: d.type_name,
|
|
150
|
+
typePrecision: d.type_precision,
|
|
151
|
+
typeScale: d.type_scale,
|
|
152
|
+
typeIntervalType: d.type_interval_type,
|
|
153
|
+
position: d.position,
|
|
154
|
+
parameterMode: d.parameter_mode,
|
|
155
|
+
parameterType: d.parameter_type,
|
|
156
|
+
parameterDefault: d.parameter_default,
|
|
157
|
+
comment: d.comment
|
|
363
158
|
}));
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
159
|
+
const unmarshalFunctionParameterInfosSchema = z.object({ parameters: z.array(z.lazy(() => unmarshalFunctionParameterInfoSchema)).optional() }).transform((d) => ({ parameters: d.parameters }));
|
|
160
|
+
const unmarshalListFunctionsResponseSchema = z.object({
|
|
161
|
+
functions: z.array(z.lazy(() => unmarshalFunctionInfoSchema)).optional(),
|
|
162
|
+
next_page_token: z.string().optional()
|
|
163
|
+
}).transform((d) => ({
|
|
164
|
+
functions: d.functions,
|
|
165
|
+
nextPageToken: d.next_page_token
|
|
370
166
|
}));
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
167
|
+
const unmarshalTableDependencySchema = z.object({ table_full_name: z.string().optional() }).transform((d) => ({ tableFullName: d.table_full_name }));
|
|
168
|
+
const marshalConnectionDependencySchema = z.object({ connectionName: z.string().optional() }).transform((d) => ({ connection_name: d.connectionName }));
|
|
169
|
+
const marshalCreateFunctionSchema = z.object({
|
|
170
|
+
name: z.string().optional(),
|
|
171
|
+
catalogName: z.string().optional(),
|
|
172
|
+
schemaName: z.string().optional(),
|
|
173
|
+
inputParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
|
|
174
|
+
dataType: z.string().optional(),
|
|
175
|
+
fullDataType: z.string().optional(),
|
|
176
|
+
routineBody: z.string().optional(),
|
|
177
|
+
routineDefinition: z.string().optional(),
|
|
178
|
+
parameterStyle: z.string().optional(),
|
|
179
|
+
isDeterministic: z.boolean().optional(),
|
|
180
|
+
sqlDataAccess: z.string().optional(),
|
|
181
|
+
isNullCall: z.boolean().optional(),
|
|
182
|
+
securityType: z.string().optional(),
|
|
183
|
+
specificName: z.string().optional(),
|
|
184
|
+
returnParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
|
|
185
|
+
externalName: z.string().optional(),
|
|
186
|
+
externalLanguage: z.string().optional(),
|
|
187
|
+
sqlPath: z.string().optional(),
|
|
188
|
+
owner: z.string().optional(),
|
|
189
|
+
comment: z.string().optional(),
|
|
190
|
+
properties: z.string().optional(),
|
|
191
|
+
routineDependencies: z.lazy(() => marshalDependencyListSchema).optional(),
|
|
192
|
+
metastoreId: z.string().optional(),
|
|
193
|
+
fullName: z.string().optional(),
|
|
194
|
+
createdAt: z.bigint().optional(),
|
|
195
|
+
createdBy: z.string().optional(),
|
|
196
|
+
updatedAt: z.bigint().optional(),
|
|
197
|
+
updatedBy: z.string().optional(),
|
|
198
|
+
functionId: z.string().optional(),
|
|
199
|
+
browseOnly: z.boolean().optional()
|
|
200
|
+
}).transform((d) => ({
|
|
201
|
+
name: d.name,
|
|
202
|
+
catalog_name: d.catalogName,
|
|
203
|
+
schema_name: d.schemaName,
|
|
204
|
+
input_params: d.inputParams,
|
|
205
|
+
data_type: d.dataType,
|
|
206
|
+
full_data_type: d.fullDataType,
|
|
207
|
+
routine_body: d.routineBody,
|
|
208
|
+
routine_definition: d.routineDefinition,
|
|
209
|
+
parameter_style: d.parameterStyle,
|
|
210
|
+
is_deterministic: d.isDeterministic,
|
|
211
|
+
sql_data_access: d.sqlDataAccess,
|
|
212
|
+
is_null_call: d.isNullCall,
|
|
213
|
+
security_type: d.securityType,
|
|
214
|
+
specific_name: d.specificName,
|
|
215
|
+
return_params: d.returnParams,
|
|
216
|
+
external_name: d.externalName,
|
|
217
|
+
external_language: d.externalLanguage,
|
|
218
|
+
sql_path: d.sqlPath,
|
|
219
|
+
owner: d.owner,
|
|
220
|
+
comment: d.comment,
|
|
221
|
+
properties: d.properties,
|
|
222
|
+
routine_dependencies: d.routineDependencies,
|
|
223
|
+
metastore_id: d.metastoreId,
|
|
224
|
+
full_name: d.fullName,
|
|
225
|
+
created_at: d.createdAt,
|
|
226
|
+
created_by: d.createdBy,
|
|
227
|
+
updated_at: d.updatedAt,
|
|
228
|
+
updated_by: d.updatedBy,
|
|
229
|
+
function_id: d.functionId,
|
|
230
|
+
browse_only: d.browseOnly
|
|
399
231
|
}));
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
232
|
+
const marshalCreateFunctionRequestSchema = z.object({ functionInfo: z.lazy(() => marshalCreateFunctionSchema).optional() }).transform((d) => ({ function_info: d.functionInfo }));
|
|
233
|
+
const marshalCredentialDependencySchema = z.object({ credentialName: z.string().optional() }).transform((d) => ({ credential_name: d.credentialName }));
|
|
234
|
+
const marshalDependencySchema = z.object({ value: z.discriminatedUnion("$case", [
|
|
235
|
+
z.object({
|
|
236
|
+
$case: z.literal("table"),
|
|
237
|
+
table: z.lazy(() => marshalTableDependencySchema)
|
|
238
|
+
}),
|
|
239
|
+
z.object({
|
|
240
|
+
$case: z.literal("function"),
|
|
241
|
+
function: z.lazy(() => marshalFunctionDependencySchema)
|
|
242
|
+
}),
|
|
243
|
+
z.object({
|
|
244
|
+
$case: z.literal("connection"),
|
|
245
|
+
connection: z.lazy(() => marshalConnectionDependencySchema)
|
|
246
|
+
}),
|
|
247
|
+
z.object({
|
|
248
|
+
$case: z.literal("credential"),
|
|
249
|
+
credential: z.lazy(() => marshalCredentialDependencySchema)
|
|
250
|
+
})
|
|
251
|
+
]).optional() }).transform((d) => ({
|
|
252
|
+
...d.value?.$case === "table" && { table: d.value.table },
|
|
253
|
+
...d.value?.$case === "function" && { function: d.value.function },
|
|
254
|
+
...d.value?.$case === "connection" && { connection: d.value.connection },
|
|
255
|
+
...d.value?.$case === "credential" && { credential: d.value.credential }
|
|
408
256
|
}));
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
257
|
+
const marshalDependencyListSchema = z.object({ dependencies: z.array(z.lazy(() => marshalDependencySchema)).optional() }).transform((d) => ({ dependencies: d.dependencies }));
|
|
258
|
+
const marshalFunctionDependencySchema = z.object({ functionFullName: z.string().optional() }).transform((d) => ({ function_full_name: d.functionFullName }));
|
|
259
|
+
const marshalFunctionParameterInfoSchema = z.object({
|
|
260
|
+
name: z.string().optional(),
|
|
261
|
+
typeText: z.string().optional(),
|
|
262
|
+
typeJson: z.string().optional(),
|
|
263
|
+
typeName: z.string().optional(),
|
|
264
|
+
typePrecision: z.number().optional(),
|
|
265
|
+
typeScale: z.number().optional(),
|
|
266
|
+
typeIntervalType: z.string().optional(),
|
|
267
|
+
position: z.number().optional(),
|
|
268
|
+
parameterMode: z.string().optional(),
|
|
269
|
+
parameterType: z.string().optional(),
|
|
270
|
+
parameterDefault: z.string().optional(),
|
|
271
|
+
comment: z.string().optional()
|
|
272
|
+
}).transform((d) => ({
|
|
273
|
+
name: d.name,
|
|
274
|
+
type_text: d.typeText,
|
|
275
|
+
type_json: d.typeJson,
|
|
276
|
+
type_name: d.typeName,
|
|
277
|
+
type_precision: d.typePrecision,
|
|
278
|
+
type_scale: d.typeScale,
|
|
279
|
+
type_interval_type: d.typeIntervalType,
|
|
280
|
+
position: d.position,
|
|
281
|
+
parameter_mode: d.parameterMode,
|
|
282
|
+
parameter_type: d.parameterType,
|
|
283
|
+
parameter_default: d.parameterDefault,
|
|
284
|
+
comment: d.comment
|
|
415
285
|
}));
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
286
|
+
const marshalFunctionParameterInfosSchema = z.object({ parameters: z.array(z.lazy(() => marshalFunctionParameterInfoSchema)).optional() }).transform((d) => ({ parameters: d.parameters }));
|
|
287
|
+
const marshalTableDependencySchema = z.object({ tableFullName: z.string().optional() }).transform((d) => ({ table_full_name: d.tableFullName }));
|
|
288
|
+
const marshalUpdateFunctionRequestSchema = z.object({
|
|
289
|
+
fullNameArg: z.string().optional(),
|
|
290
|
+
name: z.string().optional(),
|
|
291
|
+
catalogName: z.string().optional(),
|
|
292
|
+
schemaName: z.string().optional(),
|
|
293
|
+
inputParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
|
|
294
|
+
dataType: z.string().optional(),
|
|
295
|
+
fullDataType: z.string().optional(),
|
|
296
|
+
routineBody: z.string().optional(),
|
|
297
|
+
routineDefinition: z.string().optional(),
|
|
298
|
+
parameterStyle: z.string().optional(),
|
|
299
|
+
isDeterministic: z.boolean().optional(),
|
|
300
|
+
sqlDataAccess: z.string().optional(),
|
|
301
|
+
isNullCall: z.boolean().optional(),
|
|
302
|
+
securityType: z.string().optional(),
|
|
303
|
+
specificName: z.string().optional(),
|
|
304
|
+
returnParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
|
|
305
|
+
externalName: z.string().optional(),
|
|
306
|
+
externalLanguage: z.string().optional(),
|
|
307
|
+
sqlPath: z.string().optional(),
|
|
308
|
+
owner: z.string().optional(),
|
|
309
|
+
comment: z.string().optional(),
|
|
310
|
+
properties: z.string().optional(),
|
|
311
|
+
routineDependencies: z.lazy(() => marshalDependencyListSchema).optional(),
|
|
312
|
+
metastoreId: z.string().optional(),
|
|
313
|
+
fullName: z.string().optional(),
|
|
314
|
+
createdAt: z.bigint().optional(),
|
|
315
|
+
createdBy: z.string().optional(),
|
|
316
|
+
updatedAt: z.bigint().optional(),
|
|
317
|
+
updatedBy: z.string().optional(),
|
|
318
|
+
functionId: z.string().optional(),
|
|
319
|
+
browseOnly: z.boolean().optional()
|
|
320
|
+
}).transform((d) => ({
|
|
321
|
+
full_name_arg: d.fullNameArg,
|
|
322
|
+
name: d.name,
|
|
323
|
+
catalog_name: d.catalogName,
|
|
324
|
+
schema_name: d.schemaName,
|
|
325
|
+
input_params: d.inputParams,
|
|
326
|
+
data_type: d.dataType,
|
|
327
|
+
full_data_type: d.fullDataType,
|
|
328
|
+
routine_body: d.routineBody,
|
|
329
|
+
routine_definition: d.routineDefinition,
|
|
330
|
+
parameter_style: d.parameterStyle,
|
|
331
|
+
is_deterministic: d.isDeterministic,
|
|
332
|
+
sql_data_access: d.sqlDataAccess,
|
|
333
|
+
is_null_call: d.isNullCall,
|
|
334
|
+
security_type: d.securityType,
|
|
335
|
+
specific_name: d.specificName,
|
|
336
|
+
return_params: d.returnParams,
|
|
337
|
+
external_name: d.externalName,
|
|
338
|
+
external_language: d.externalLanguage,
|
|
339
|
+
sql_path: d.sqlPath,
|
|
340
|
+
owner: d.owner,
|
|
341
|
+
comment: d.comment,
|
|
342
|
+
properties: d.properties,
|
|
343
|
+
routine_dependencies: d.routineDependencies,
|
|
344
|
+
metastore_id: d.metastoreId,
|
|
345
|
+
full_name: d.fullName,
|
|
346
|
+
created_at: d.createdAt,
|
|
347
|
+
created_by: d.createdBy,
|
|
348
|
+
updated_at: d.updatedAt,
|
|
349
|
+
updated_by: d.updatedBy,
|
|
350
|
+
function_id: d.functionId,
|
|
351
|
+
browse_only: d.browseOnly
|
|
482
352
|
}));
|
|
353
|
+
|
|
354
|
+
//#endregion
|
|
355
|
+
export { ColumnTypeName, FunctionInfo_ParameterStyle, FunctionInfo_RoutineBody, FunctionInfo_SecurityType, FunctionInfo_SqlDataAccess, FunctionParameterMode, FunctionParameterType, marshalConnectionDependencySchema, marshalCreateFunctionRequestSchema, marshalCreateFunctionSchema, marshalCredentialDependencySchema, marshalDependencyListSchema, marshalDependencySchema, marshalFunctionDependencySchema, marshalFunctionParameterInfoSchema, marshalFunctionParameterInfosSchema, marshalTableDependencySchema, marshalUpdateFunctionRequestSchema, unmarshalConnectionDependencySchema, unmarshalCredentialDependencySchema, unmarshalDeleteFunctionResponseSchema, unmarshalDependencyListSchema, unmarshalDependencySchema, unmarshalFunctionDependencySchema, unmarshalFunctionInfoSchema, unmarshalFunctionParameterInfoSchema, unmarshalFunctionParameterInfosSchema, unmarshalListFunctionsResponseSchema, unmarshalTableDependencySchema };
|
|
483
356
|
//# sourceMappingURL=model.js.map
|