@databricks/sdk-uc-functions 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/v1/model.js CHANGED
@@ -1,483 +1,356 @@
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 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',
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
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
31
- export const FunctionParameterMode = {
32
- IN: 'IN',
30
+ const FunctionParameterMode = { IN: "IN" };
31
+ const FunctionParameterType = {
32
+ PARAM: "PARAM",
33
+ COLUMN: "COLUMN"
33
34
  };
34
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
35
- export const FunctionParameterType = {
36
- PARAM: 'PARAM',
37
- COLUMN: 'COLUMN',
35
+ const FunctionInfo_ParameterStyle = { S: "S" };
36
+ const FunctionInfo_RoutineBody = {
37
+ SQL: "SQL",
38
+ EXTERNAL: "EXTERNAL"
38
39
  };
39
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
40
- export const FunctionInfo_ParameterStyle = {
41
- S: 'S',
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
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
44
- export const FunctionInfo_RoutineBody = {
45
- SQL: 'SQL',
46
- /**
47
- * When `EXTERNAL` is used,
48
- * * The language of the routine function should be specified in the `external_language` field.
49
- * * The returnParams of the function cannot be used as TABLE return type is not supported.
50
- * * The getSqlDataAccess must be NO_SQL.
51
- */
52
- EXTERNAL: 'EXTERNAL',
53
- };
54
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
55
- export const FunctionInfo_SecurityType = {
56
- DEFINER: 'DEFINER',
57
- };
58
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
59
- export const FunctionInfo_SqlDataAccess = {
60
- CONTAINS_SQL: 'CONTAINS_SQL',
61
- READS_SQL_DATA: 'READS_SQL_DATA',
62
- NO_SQL: 'NO_SQL',
63
- };
64
- export const unmarshalConnectionDependencySchema = z
65
- .object({
66
- connection_name: z.string().optional(),
67
- })
68
- .transform(d => ({
69
- connectionName: d.connection_name,
70
- }));
71
- export const unmarshalCredentialDependencySchema = z
72
- .object({
73
- credential_name: z.string().optional(),
74
- })
75
- .transform(d => ({
76
- credentialName: d.credential_name,
77
- }));
78
- export const unmarshalDeleteFunctionResponseSchema = z.object({});
79
- export const unmarshalDependencySchema = z
80
- .object({
81
- table: z.lazy(() => unmarshalTableDependencySchema).optional(),
82
- function: z.lazy(() => unmarshalFunctionDependencySchema).optional(),
83
- connection: z.lazy(() => unmarshalConnectionDependencySchema).optional(),
84
- credential: z.lazy(() => unmarshalCredentialDependencySchema).optional(),
85
- })
86
- .transform(d => ({
87
- value: d.table !== undefined
88
- ? { $case: 'table', table: d.table }
89
- : d.function !== undefined
90
- ? { $case: 'function', function: d.function }
91
- : d.connection !== undefined
92
- ? { $case: 'connection', connection: d.connection }
93
- : d.credential !== undefined
94
- ? { $case: 'credential', credential: d.credential }
95
- : undefined,
96
- }));
97
- export const unmarshalDependencyListSchema = z
98
- .object({
99
- dependencies: z.array(z.lazy(() => unmarshalDependencySchema)).optional(),
100
- })
101
- .transform(d => ({
102
- dependencies: d.dependencies,
103
- }));
104
- export const unmarshalFunctionDependencySchema = z
105
- .object({
106
- function_full_name: z.string().optional(),
107
- })
108
- .transform(d => ({
109
- functionFullName: d.function_full_name,
110
- }));
111
- export const unmarshalFunctionInfoSchema = z
112
- .object({
113
- name: z.string().optional(),
114
- catalog_name: z.string().optional(),
115
- schema_name: z.string().optional(),
116
- input_params: z
117
- .lazy(() => unmarshalFunctionParameterInfosSchema)
118
- .optional(),
119
- data_type: z.string().optional(),
120
- full_data_type: z.string().optional(),
121
- routine_body: z.string().optional(),
122
- routine_definition: z.string().optional(),
123
- parameter_style: z.string().optional(),
124
- is_deterministic: z.boolean().optional(),
125
- sql_data_access: z.string().optional(),
126
- is_null_call: z.boolean().optional(),
127
- security_type: z.string().optional(),
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
- export const marshalDependencyListSchema = z
358
- .object({
359
- dependencies: z.array(z.lazy(() => marshalDependencySchema)).optional(),
360
- })
361
- .transform(d => ({
362
- dependencies: d.dependencies,
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
- export const marshalFunctionDependencySchema = z
365
- .object({
366
- functionFullName: z.string().optional(),
367
- })
368
- .transform(d => ({
369
- function_full_name: d.functionFullName,
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
- export const marshalFunctionParameterInfoSchema = z
372
- .object({
373
- name: z.string().optional(),
374
- typeText: z.string().optional(),
375
- typeJson: z.string().optional(),
376
- typeName: z.string().optional(),
377
- typePrecision: z.number().optional(),
378
- typeScale: z.number().optional(),
379
- typeIntervalType: z.string().optional(),
380
- position: z.number().optional(),
381
- parameterMode: z.string().optional(),
382
- parameterType: z.string().optional(),
383
- parameterDefault: z.string().optional(),
384
- comment: z.string().optional(),
385
- })
386
- .transform(d => ({
387
- name: d.name,
388
- type_text: d.typeText,
389
- type_json: d.typeJson,
390
- type_name: d.typeName,
391
- type_precision: d.typePrecision,
392
- type_scale: d.typeScale,
393
- type_interval_type: d.typeIntervalType,
394
- position: d.position,
395
- parameter_mode: d.parameterMode,
396
- parameter_type: d.parameterType,
397
- parameter_default: d.parameterDefault,
398
- comment: d.comment,
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
- export const marshalFunctionParameterInfosSchema = z
401
- .object({
402
- parameters: z
403
- .array(z.lazy(() => marshalFunctionParameterInfoSchema))
404
- .optional(),
405
- })
406
- .transform(d => ({
407
- parameters: d.parameters,
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
- export const marshalTableDependencySchema = z
410
- .object({
411
- tableFullName: z.string().optional(),
412
- })
413
- .transform(d => ({
414
- table_full_name: d.tableFullName,
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
- export const marshalUpdateFunctionRequestSchema = z
417
- .object({
418
- fullNameArg: z.string().optional(),
419
- name: z.string().optional(),
420
- catalogName: z.string().optional(),
421
- schemaName: z.string().optional(),
422
- inputParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
423
- dataType: z.string().optional(),
424
- fullDataType: z.string().optional(),
425
- routineBody: z.string().optional(),
426
- routineDefinition: z.string().optional(),
427
- parameterStyle: z.string().optional(),
428
- isDeterministic: z.boolean().optional(),
429
- sqlDataAccess: z.string().optional(),
430
- isNullCall: z.boolean().optional(),
431
- securityType: z.string().optional(),
432
- specificName: z.string().optional(),
433
- returnParams: z.lazy(() => marshalFunctionParameterInfosSchema).optional(),
434
- externalName: z.string().optional(),
435
- externalLanguage: z.string().optional(),
436
- sqlPath: z.string().optional(),
437
- owner: z.string().optional(),
438
- comment: z.string().optional(),
439
- properties: z.string().optional(),
440
- routineDependencies: z.lazy(() => marshalDependencyListSchema).optional(),
441
- metastoreId: z.string().optional(),
442
- fullName: z.string().optional(),
443
- createdAt: z.bigint().optional(),
444
- createdBy: z.string().optional(),
445
- updatedAt: z.bigint().optional(),
446
- updatedBy: z.string().optional(),
447
- functionId: z.string().optional(),
448
- browseOnly: z.boolean().optional(),
449
- })
450
- .transform(d => ({
451
- full_name_arg: d.fullNameArg,
452
- name: d.name,
453
- catalog_name: d.catalogName,
454
- schema_name: d.schemaName,
455
- input_params: d.inputParams,
456
- data_type: d.dataType,
457
- full_data_type: d.fullDataType,
458
- routine_body: d.routineBody,
459
- routine_definition: d.routineDefinition,
460
- parameter_style: d.parameterStyle,
461
- is_deterministic: d.isDeterministic,
462
- sql_data_access: d.sqlDataAccess,
463
- is_null_call: d.isNullCall,
464
- security_type: d.securityType,
465
- specific_name: d.specificName,
466
- return_params: d.returnParams,
467
- external_name: d.externalName,
468
- external_language: d.externalLanguage,
469
- sql_path: d.sqlPath,
470
- owner: d.owner,
471
- comment: d.comment,
472
- properties: d.properties,
473
- routine_dependencies: d.routineDependencies,
474
- metastore_id: d.metastoreId,
475
- full_name: d.fullName,
476
- created_at: d.createdAt,
477
- created_by: d.createdBy,
478
- updated_at: d.updatedAt,
479
- updated_by: d.updatedBy,
480
- function_id: d.functionId,
481
- browse_only: d.browseOnly,
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