@dremio/js-sdk 0.31.8 → 0.32.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/cloud/Dremio.d.ts +3 -2
- package/dist/cloud/Dremio.js +2 -2
- package/dist/cloud/Dremio.js.map +1 -1
- package/dist/cloud/ai/AIResource.d.ts +125 -0
- package/dist/cloud/ai/AIResource.js +113 -0
- package/dist/cloud/ai/AIResource.js.map +1 -0
- package/dist/cloud/ai/DremioModelProvider.d.ts +12 -0
- package/dist/cloud/ai/DremioModelProvider.js +49 -0
- package/dist/cloud/ai/DremioModelProvider.js.map +1 -0
- package/dist/cloud/ai/index.d.ts +4 -0
- package/dist/cloud/ai/index.js +20 -0
- package/dist/cloud/ai/index.js.map +1 -0
- package/dist/cloud/ai/modelProviderCodec.d.ts +180 -0
- package/dist/cloud/ai/modelProviderCodec.js +54 -0
- package/dist/cloud/ai/modelProviderCodec.js.map +1 -0
- package/dist/cloud/catalog/EnterpriseCatalogResource.d.ts +10 -3
- package/dist/cloud/catalog/EnterpriseCatalogResource.js +38 -0
- package/dist/cloud/catalog/EnterpriseCatalogResource.js.map +1 -1
- package/dist/cloud/catalog/FileUpload.d.ts +117 -0
- package/dist/cloud/catalog/FileUpload.js +103 -0
- package/dist/cloud/catalog/FileUpload.js.map +1 -0
- package/dist/cloud/getResourceConfig.d.ts +1 -0
- package/dist/cloud/getResourceConfig.js +3 -0
- package/dist/cloud/getResourceConfig.js.map +1 -1
- package/dist/cloud/interfaces.d.ts +3 -1
- package/dist/cloud/interfaces.js +3 -1
- package/dist/cloud/interfaces.js.map +1 -1
- package/dist/cloud/organizations/Organization.d.ts +10 -0
- package/dist/cloud/organizations/Organization.js +12 -0
- package/dist/cloud/organizations/Organization.js.map +1 -1
- package/dist/cloud/projects/Project.d.ts +1 -0
- package/dist/cloud/projects/Project.js +2 -0
- package/dist/cloud/projects/Project.js.map +1 -1
- package/dist/cloud/projects/projectPropertiesCodec.d.ts +6 -0
- package/dist/cloud/projects/projectPropertiesCodec.js +1 -0
- package/dist/cloud/projects/projectPropertiesCodec.js.map +1 -1
- package/dist/cloud/replaceOriginResource.js +6 -1
- package/dist/cloud/replaceOriginResource.js.map +1 -1
- package/dist/common/Config.d.ts +14 -0
- package/dist/common/Config.js.map +1 -1
- package/dist/common/createRequest.d.ts +1 -0
- package/dist/common/createRequest.js +1 -1
- package/dist/common/createRequest.js.map +1 -1
- package/dist/common/createXHR.d.ts +2 -0
- package/dist/common/createXHR.js +58 -0
- package/dist/common/createXHR.js.map +1 -0
- package/dist/enterprise/Dremio.d.ts +3 -1
- package/dist/enterprise/Dremio.js +3 -0
- package/dist/enterprise/Dremio.js.map +1 -1
- package/dist/enterprise/ai/AIResource.d.ts +118 -0
- package/dist/enterprise/ai/AIResource.js +123 -0
- package/dist/enterprise/ai/AIResource.js.map +1 -0
- package/dist/enterprise/ai/ModelProvider.d.ts +181 -0
- package/dist/enterprise/ai/ModelProvider.js +87 -0
- package/dist/enterprise/ai/ModelProvider.js.map +1 -0
- package/dist/enterprise/ai/chat/AgentChatPartialResponse.d.ts +42 -0
- package/dist/enterprise/ai/chat/AgentChatPartialResponse.js +65 -0
- package/dist/enterprise/ai/chat/AgentChatPartialResponse.js.map +1 -0
- package/dist/enterprise/ai/chat/AgentChatResponse.d.ts +87 -0
- package/dist/enterprise/ai/chat/AgentChatResponse.js +138 -0
- package/dist/enterprise/ai/chat/AgentChatResponse.js.map +1 -0
- package/dist/enterprise/ai/chat/AgentErrorResponseContent.d.ts +4 -0
- package/dist/enterprise/ai/chat/AgentErrorResponseContent.js +22 -0
- package/dist/enterprise/ai/chat/AgentErrorResponseContent.js.map +1 -0
- package/dist/enterprise/ai/chat/AgentModelResponseContent.d.ts +6 -0
- package/dist/enterprise/ai/chat/AgentModelResponseContent.js +24 -0
- package/dist/enterprise/ai/chat/AgentModelResponseContent.js.map +1 -0
- package/dist/enterprise/ai/chat/AgentToolRequestResponseContent.d.ts +9 -0
- package/dist/enterprise/ai/chat/AgentToolRequestResponseContent.js +35 -0
- package/dist/enterprise/ai/chat/AgentToolRequestResponseContent.js.map +1 -0
- package/dist/enterprise/ai/chat/AgentToolResultResponseContent.d.ts +8 -0
- package/dist/enterprise/ai/chat/AgentToolResultResponseContent.js +31 -0
- package/dist/enterprise/ai/chat/AgentToolResultResponseContent.js.map +1 -0
- package/dist/enterprise/ai/chat/ChatSession.d.ts +32 -0
- package/dist/enterprise/ai/chat/ChatSession.js +77 -0
- package/dist/enterprise/ai/chat/ChatSession.js.map +1 -0
- package/dist/enterprise/ai/chat/UserChatMessage.d.ts +30 -0
- package/dist/enterprise/ai/chat/UserChatMessage.js +68 -0
- package/dist/enterprise/ai/chat/UserChatMessage.js.map +1 -0
- package/dist/enterprise/ai/chat/UserChatMessageContent.d.ts +19 -0
- package/dist/enterprise/ai/chat/UserChatMessageContent.js +44 -0
- package/dist/enterprise/ai/chat/UserChatMessageContent.js.map +1 -0
- package/dist/enterprise/ai/chat/chatEventSchema.d.ts +35 -0
- package/dist/enterprise/ai/chat/chatEventSchema.js +52 -0
- package/dist/enterprise/ai/chat/chatEventSchema.js.map +1 -0
- package/dist/enterprise/ai/chat/index.d.ts +9 -0
- package/dist/enterprise/ai/chat/index.js +25 -0
- package/dist/enterprise/ai/chat/index.js.map +1 -0
- package/dist/enterprise/ai/index.d.ts +3 -0
- package/dist/enterprise/ai/index.js +19 -0
- package/dist/enterprise/ai/index.js.map +1 -0
- package/dist/enterprise/ai/modelProviderCodec.d.ts +465 -0
- package/dist/enterprise/ai/modelProviderCodec.js +154 -0
- package/dist/enterprise/ai/modelProviderCodec.js.map +1 -0
- package/dist/enterprise/ai/modelProviderConfigSchemas.d.ts +296 -0
- package/dist/enterprise/ai/modelProviderConfigSchemas.js +159 -0
- package/dist/enterprise/ai/modelProviderConfigSchemas.js.map +1 -0
- package/dist/enterprise/interfaces.d.ts +1 -0
- package/dist/enterprise/interfaces.js +1 -0
- package/dist/enterprise/interfaces.js.map +1 -1
- package/dist/enterprise/users/EnterpriseUsersResource.d.ts +7 -0
- package/dist/enterprise/users/EnterpriseUsersResource.js +31 -0
- package/dist/enterprise/users/EnterpriseUsersResource.js.map +1 -1
- package/dist/enterprise/users/ServiceUser.d.ts +85 -0
- package/dist/enterprise/users/ServiceUser.js +79 -0
- package/dist/enterprise/users/ServiceUser.js.map +1 -0
- package/dist/enterprise/users/serviceUserOauthCredentialsCodec.d.ts +43 -0
- package/dist/enterprise/users/serviceUserOauthCredentialsCodec.js +110 -0
- package/dist/enterprise/users/serviceUserOauthCredentialsCodec.js.map +1 -0
- package/package.json +1 -1
- package/dist/cloud/ai/AiResource.d.ts +0 -12
- package/dist/cloud/ai/AiResource.js +0 -52
- package/dist/cloud/ai/AiResource.js.map +0 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024-2025 Dremio Corporation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import * as z from "zod/mini";
|
|
17
|
+
import { amazonBedrockModelProviderConfigRetrieveSchema, amazonBedrockModelProviderConfigSchema, amazonBedrockModelProviderConfigUpdateSchema, anthropicModelProviderConfigRetrieveSchema, anthropicModelProviderConfigSchema, azureOpenAiModelProviderConfigRetrieveSchema, azureOpenAiModelProviderConfigSchema, azureOpenAiModelProviderConfigUpdateSchema, googleGeminiModelProviderConfigRetrieveSchema, googleGeminiModelProviderConfigSchema, openAiModelProviderConfigRetrieveSchema, openAiModelProviderConfigSchema, } from "./modelProviderConfigSchemas.js";
|
|
18
|
+
import { Temporal } from "temporal-polyfill";
|
|
19
|
+
const modelProviderBaseSchema = z.object({
|
|
20
|
+
createdAt: z.string().check(z.iso.datetime()),
|
|
21
|
+
createdBy: z.string(),
|
|
22
|
+
defaultModelName: z.string(),
|
|
23
|
+
id: z.string(),
|
|
24
|
+
isDefault: z.boolean(),
|
|
25
|
+
modifiedAt: z.string().check(z.iso.datetime()),
|
|
26
|
+
modifiedBy: z.string(),
|
|
27
|
+
// eslint-disable-next-line regexp/prefer-w, regexp/use-ignore-case
|
|
28
|
+
name: z.string().check(z.regex(/^[a-zA-Z0-9_-]+$/)),
|
|
29
|
+
sqlModelNames: z.array(z.string()),
|
|
30
|
+
tag: z.string(),
|
|
31
|
+
});
|
|
32
|
+
const modelProviderRetrieveInSchema = z.extend(modelProviderBaseSchema, {
|
|
33
|
+
config: z.union([
|
|
34
|
+
z.strictObject({
|
|
35
|
+
amazonBedrock: amazonBedrockModelProviderConfigRetrieveSchema,
|
|
36
|
+
}),
|
|
37
|
+
z.strictObject({
|
|
38
|
+
anthropic: anthropicModelProviderConfigRetrieveSchema,
|
|
39
|
+
}),
|
|
40
|
+
z.strictObject({
|
|
41
|
+
azureOpenAi: azureOpenAiModelProviderConfigRetrieveSchema,
|
|
42
|
+
}),
|
|
43
|
+
z.strictObject({
|
|
44
|
+
googleGemini: googleGeminiModelProviderConfigRetrieveSchema,
|
|
45
|
+
}),
|
|
46
|
+
z.strictObject({
|
|
47
|
+
openAi: openAiModelProviderConfigRetrieveSchema,
|
|
48
|
+
}),
|
|
49
|
+
]),
|
|
50
|
+
});
|
|
51
|
+
const modelProviderCreateInSchema = z.extend(z.pick(modelProviderBaseSchema, {
|
|
52
|
+
defaultModelName: true,
|
|
53
|
+
isDefault: true,
|
|
54
|
+
name: true,
|
|
55
|
+
sqlModelNames: true,
|
|
56
|
+
}), {
|
|
57
|
+
config: z.union([
|
|
58
|
+
z.strictObject({
|
|
59
|
+
amazonBedrock: amazonBedrockModelProviderConfigSchema,
|
|
60
|
+
}),
|
|
61
|
+
z.strictObject({
|
|
62
|
+
anthropic: anthropicModelProviderConfigSchema,
|
|
63
|
+
}),
|
|
64
|
+
z.strictObject({
|
|
65
|
+
azureOpenAi: azureOpenAiModelProviderConfigSchema,
|
|
66
|
+
}),
|
|
67
|
+
z.strictObject({
|
|
68
|
+
googleGemini: googleGeminiModelProviderConfigSchema,
|
|
69
|
+
}),
|
|
70
|
+
z.strictObject({
|
|
71
|
+
openAi: openAiModelProviderConfigSchema,
|
|
72
|
+
}),
|
|
73
|
+
]),
|
|
74
|
+
});
|
|
75
|
+
const modelProviderUpdateInSchema = z.extend(z.omit(modelProviderCreateInSchema, { config: true }), {
|
|
76
|
+
config: z.union([
|
|
77
|
+
z.strictObject({
|
|
78
|
+
amazonBedrock: amazonBedrockModelProviderConfigUpdateSchema,
|
|
79
|
+
}),
|
|
80
|
+
z.strictObject({
|
|
81
|
+
anthropic: z.partial(anthropicModelProviderConfigSchema),
|
|
82
|
+
}),
|
|
83
|
+
z.strictObject({
|
|
84
|
+
azureOpenAi: azureOpenAiModelProviderConfigUpdateSchema,
|
|
85
|
+
}),
|
|
86
|
+
z.strictObject({
|
|
87
|
+
googleGemini: z.partial(googleGeminiModelProviderConfigSchema),
|
|
88
|
+
}),
|
|
89
|
+
z.strictObject({
|
|
90
|
+
openAi: z.partial(openAiModelProviderConfigSchema),
|
|
91
|
+
}),
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
94
|
+
export const modelProviderRetrieveCodec = z.codec(modelProviderRetrieveInSchema, z.extend(z.omit(modelProviderRetrieveInSchema, {
|
|
95
|
+
createdAt: true,
|
|
96
|
+
modifiedAt: true,
|
|
97
|
+
sqlModelNames: true,
|
|
98
|
+
}), {
|
|
99
|
+
createdAt: z.instanceof(Temporal.Instant),
|
|
100
|
+
modifiedAt: z.instanceof(Temporal.Instant),
|
|
101
|
+
sqlModelNames: z.set(z.string()),
|
|
102
|
+
}), {
|
|
103
|
+
decode(v) {
|
|
104
|
+
return {
|
|
105
|
+
...v,
|
|
106
|
+
createdAt: Temporal.Instant.from(v.createdAt),
|
|
107
|
+
modifiedAt: Temporal.Instant.from(v.modifiedAt),
|
|
108
|
+
sqlModelNames: new Set(v.sqlModelNames),
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
encode(v) {
|
|
112
|
+
return {
|
|
113
|
+
...v,
|
|
114
|
+
createdAt: v.createdAt.toString(),
|
|
115
|
+
modifiedAt: v.modifiedAt.toString(),
|
|
116
|
+
sqlModelNames: Array.from(v.sqlModelNames),
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
export const modelProviderCreateCodec = z.codec(modelProviderCreateInSchema, z.extend(z.omit(modelProviderCreateInSchema, {
|
|
121
|
+
sqlModelNames: true,
|
|
122
|
+
}), {
|
|
123
|
+
sqlModelNames: z.set(z.string()),
|
|
124
|
+
}), {
|
|
125
|
+
decode(v) {
|
|
126
|
+
return {
|
|
127
|
+
...v,
|
|
128
|
+
sqlModelNames: new Set(v.sqlModelNames),
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
encode(v) {
|
|
132
|
+
return {
|
|
133
|
+
...v,
|
|
134
|
+
sqlModelNames: Array.from(v.sqlModelNames),
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
export const modelProviderUpdateCodec = z.codec(modelProviderUpdateInSchema, z.extend(z.omit(modelProviderUpdateInSchema, { sqlModelNames: true }), {
|
|
139
|
+
sqlModelNames: z.set(z.string()),
|
|
140
|
+
}), {
|
|
141
|
+
decode(v) {
|
|
142
|
+
return {
|
|
143
|
+
...v,
|
|
144
|
+
sqlModelNames: new Set(v.sqlModelNames),
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
encode(v) {
|
|
148
|
+
return {
|
|
149
|
+
...v,
|
|
150
|
+
sqlModelNames: Array.from(v.sqlModelNames),
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=modelProviderCodec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelProviderCodec.js","sourceRoot":"","sources":["../../../src/enterprise/ai/modelProviderCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EACL,8CAA8C,EAC9C,sCAAsC,EACtC,4CAA4C,EAC5C,0CAA0C,EAC1C,kCAAkC,EAClC,4CAA4C,EAC5C,oCAAoC,EACpC,0CAA0C,EAC1C,6CAA6C,EAC7C,qCAAqC,EACrC,uCAAuC,EACvC,+BAA+B,GAChC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,mEAAmE;IACnE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACnD,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,C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,IAAI,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC;SACxC,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,CAAC;QACN,OAAO;YACL,GAAG,CAAC;YACJ,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;SAC3C,CAAC;IACJ,CAAC;CACF,CACF,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\nimport {\n amazonBedrockModelProviderConfigRetrieveSchema,\n amazonBedrockModelProviderConfigSchema,\n amazonBedrockModelProviderConfigUpdateSchema,\n anthropicModelProviderConfigRetrieveSchema,\n anthropicModelProviderConfigSchema,\n azureOpenAiModelProviderConfigRetrieveSchema,\n azureOpenAiModelProviderConfigSchema,\n azureOpenAiModelProviderConfigUpdateSchema,\n googleGeminiModelProviderConfigRetrieveSchema,\n googleGeminiModelProviderConfigSchema,\n openAiModelProviderConfigRetrieveSchema,\n openAiModelProviderConfigSchema,\n} from \"./modelProviderConfigSchemas.ts\";\nimport { Temporal } from \"temporal-polyfill\";\n\nconst modelProviderBaseSchema = z.object({\n createdAt: z.string().check(z.iso.datetime()),\n createdBy: z.string(),\n defaultModelName: z.string(),\n id: z.string(),\n isDefault: z.boolean(),\n modifiedAt: z.string().check(z.iso.datetime()),\n modifiedBy: z.string(),\n // eslint-disable-next-line regexp/prefer-w, regexp/use-ignore-case\n name: z.string().check(z.regex(/^[a-zA-Z0-9_-]+$/)),\n sqlModelNames: z.array(z.string()),\n tag: z.string(),\n});\n\nconst modelProviderRetrieveInSchema = z.extend(modelProviderBaseSchema, {\n config: z.union([\n z.strictObject({\n amazonBedrock: amazonBedrockModelProviderConfigRetrieveSchema,\n }),\n z.strictObject({\n anthropic: anthropicModelProviderConfigRetrieveSchema,\n }),\n z.strictObject({\n azureOpenAi: azureOpenAiModelProviderConfigRetrieveSchema,\n }),\n z.strictObject({\n googleGemini: googleGeminiModelProviderConfigRetrieveSchema,\n }),\n z.strictObject({\n openAi: openAiModelProviderConfigRetrieveSchema,\n }),\n ]),\n});\n\nconst modelProviderCreateInSchema = z.extend(\n z.pick(modelProviderBaseSchema, {\n defaultModelName: true,\n isDefault: true,\n name: true,\n sqlModelNames: true,\n }),\n {\n config: z.union([\n z.strictObject({\n amazonBedrock: amazonBedrockModelProviderConfigSchema,\n }),\n z.strictObject({\n anthropic: anthropicModelProviderConfigSchema,\n }),\n z.strictObject({\n azureOpenAi: azureOpenAiModelProviderConfigSchema,\n }),\n z.strictObject({\n googleGemini: googleGeminiModelProviderConfigSchema,\n }),\n z.strictObject({\n openAi: openAiModelProviderConfigSchema,\n }),\n ]),\n },\n);\n\nconst modelProviderUpdateInSchema = z.extend(\n z.omit(modelProviderCreateInSchema, { config: true }),\n {\n config: z.union([\n z.strictObject({\n amazonBedrock: amazonBedrockModelProviderConfigUpdateSchema,\n }),\n z.strictObject({\n anthropic: z.partial(anthropicModelProviderConfigSchema),\n }),\n z.strictObject({\n azureOpenAi: azureOpenAiModelProviderConfigUpdateSchema,\n }),\n z.strictObject({\n googleGemini: z.partial(googleGeminiModelProviderConfigSchema),\n }),\n z.strictObject({\n openAi: z.partial(openAiModelProviderConfigSchema),\n }),\n ]),\n },\n);\n\nexport const modelProviderRetrieveCodec = z.codec(\n modelProviderRetrieveInSchema,\n z.extend(\n z.omit(modelProviderRetrieveInSchema, {\n createdAt: true,\n modifiedAt: true,\n sqlModelNames: true,\n }),\n {\n createdAt: z.instanceof(Temporal.Instant),\n modifiedAt: z.instanceof(Temporal.Instant),\n sqlModelNames: z.set(z.string()),\n },\n ),\n {\n decode(v) {\n return {\n ...v,\n createdAt: Temporal.Instant.from(v.createdAt),\n modifiedAt: Temporal.Instant.from(v.modifiedAt),\n sqlModelNames: new Set(v.sqlModelNames),\n };\n },\n encode(v) {\n return {\n ...v,\n createdAt: v.createdAt.toString(),\n modifiedAt: v.modifiedAt.toString(),\n sqlModelNames: Array.from(v.sqlModelNames),\n };\n },\n },\n);\n\nexport const modelProviderCreateCodec = z.codec(\n modelProviderCreateInSchema,\n z.extend(\n z.omit(modelProviderCreateInSchema, {\n sqlModelNames: true,\n }),\n {\n sqlModelNames: z.set(z.string()),\n },\n ),\n {\n decode(v) {\n return {\n ...v,\n sqlModelNames: new Set(v.sqlModelNames),\n };\n },\n encode(v) {\n return {\n ...v,\n sqlModelNames: Array.from(v.sqlModelNames),\n };\n },\n },\n);\n\nexport const modelProviderUpdateCodec = z.codec(\n modelProviderUpdateInSchema,\n z.extend(z.omit(modelProviderUpdateInSchema, { sqlModelNames: true }), {\n sqlModelNames: z.set(z.string()),\n }),\n {\n decode(v) {\n return {\n ...v,\n sqlModelNames: new Set(v.sqlModelNames),\n };\n },\n encode(v) {\n return {\n ...v,\n sqlModelNames: Array.from(v.sqlModelNames),\n };\n },\n },\n);\n"]}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
/**
|
|
3
|
+
* Amazon Bedrock
|
|
4
|
+
*/
|
|
5
|
+
export declare const amazonBedrockRegionSchema: z.ZodMiniEnum<{
|
|
6
|
+
"ap-east-2": "ap-east-2";
|
|
7
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
8
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
9
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
10
|
+
"ap-south-1": "ap-south-1";
|
|
11
|
+
"ap-south-2": "ap-south-2";
|
|
12
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
13
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
14
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
15
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
16
|
+
"ap-southeast-5": "ap-southeast-5";
|
|
17
|
+
"ap-southeast-7": "ap-southeast-7";
|
|
18
|
+
"ca-central-1": "ca-central-1";
|
|
19
|
+
"eu-central-1": "eu-central-1";
|
|
20
|
+
"eu-central-2": "eu-central-2";
|
|
21
|
+
"eu-north-1": "eu-north-1";
|
|
22
|
+
"eu-south-1": "eu-south-1";
|
|
23
|
+
"eu-south-2": "eu-south-2";
|
|
24
|
+
"eu-west-1": "eu-west-1";
|
|
25
|
+
"eu-west-2": "eu-west-2";
|
|
26
|
+
"eu-west-3": "eu-west-3";
|
|
27
|
+
"il-central-1": "il-central-1";
|
|
28
|
+
"me-central-1": "me-central-1";
|
|
29
|
+
"sa-east-1": "sa-east-1";
|
|
30
|
+
"us-east-1": "us-east-1";
|
|
31
|
+
"us-east-2": "us-east-2";
|
|
32
|
+
"us-gov-east-1": "us-gov-east-1";
|
|
33
|
+
"us-gov-west-1": "us-gov-west-1";
|
|
34
|
+
"us-west-1": "us-west-1";
|
|
35
|
+
"us-west-2": "us-west-2";
|
|
36
|
+
}>;
|
|
37
|
+
export declare const amazonBedrockModelProviderConfigSchema: z.ZodMiniObject<{
|
|
38
|
+
auth: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
39
|
+
accessKey: z.ZodMiniObject<{
|
|
40
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
41
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
44
|
+
role: z.ZodMiniObject<{
|
|
45
|
+
roleArn: z.ZodMiniString<string>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
}, z.core.$strict>]>;
|
|
48
|
+
region: z.ZodMiniEnum<{
|
|
49
|
+
"ap-east-2": "ap-east-2";
|
|
50
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
51
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
52
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
53
|
+
"ap-south-1": "ap-south-1";
|
|
54
|
+
"ap-south-2": "ap-south-2";
|
|
55
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
56
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
57
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
58
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
59
|
+
"ap-southeast-5": "ap-southeast-5";
|
|
60
|
+
"ap-southeast-7": "ap-southeast-7";
|
|
61
|
+
"ca-central-1": "ca-central-1";
|
|
62
|
+
"eu-central-1": "eu-central-1";
|
|
63
|
+
"eu-central-2": "eu-central-2";
|
|
64
|
+
"eu-north-1": "eu-north-1";
|
|
65
|
+
"eu-south-1": "eu-south-1";
|
|
66
|
+
"eu-south-2": "eu-south-2";
|
|
67
|
+
"eu-west-1": "eu-west-1";
|
|
68
|
+
"eu-west-2": "eu-west-2";
|
|
69
|
+
"eu-west-3": "eu-west-3";
|
|
70
|
+
"il-central-1": "il-central-1";
|
|
71
|
+
"me-central-1": "me-central-1";
|
|
72
|
+
"sa-east-1": "sa-east-1";
|
|
73
|
+
"us-east-1": "us-east-1";
|
|
74
|
+
"us-east-2": "us-east-2";
|
|
75
|
+
"us-gov-east-1": "us-gov-east-1";
|
|
76
|
+
"us-gov-west-1": "us-gov-west-1";
|
|
77
|
+
"us-west-1": "us-west-1";
|
|
78
|
+
"us-west-2": "us-west-2";
|
|
79
|
+
}>;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
export declare const amazonBedrockModelProviderConfigRetrieveSchema: z.ZodMiniObject<{
|
|
82
|
+
auth: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
83
|
+
accessKey: z.ZodMiniObject<{
|
|
84
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
87
|
+
role: z.ZodMiniObject<{
|
|
88
|
+
roleArn: z.ZodMiniString<string>;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
}, z.core.$strict>]>;
|
|
91
|
+
region: z.ZodMiniEnum<{
|
|
92
|
+
"ap-east-2": "ap-east-2";
|
|
93
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
94
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
95
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
96
|
+
"ap-south-1": "ap-south-1";
|
|
97
|
+
"ap-south-2": "ap-south-2";
|
|
98
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
99
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
100
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
101
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
102
|
+
"ap-southeast-5": "ap-southeast-5";
|
|
103
|
+
"ap-southeast-7": "ap-southeast-7";
|
|
104
|
+
"ca-central-1": "ca-central-1";
|
|
105
|
+
"eu-central-1": "eu-central-1";
|
|
106
|
+
"eu-central-2": "eu-central-2";
|
|
107
|
+
"eu-north-1": "eu-north-1";
|
|
108
|
+
"eu-south-1": "eu-south-1";
|
|
109
|
+
"eu-south-2": "eu-south-2";
|
|
110
|
+
"eu-west-1": "eu-west-1";
|
|
111
|
+
"eu-west-2": "eu-west-2";
|
|
112
|
+
"eu-west-3": "eu-west-3";
|
|
113
|
+
"il-central-1": "il-central-1";
|
|
114
|
+
"me-central-1": "me-central-1";
|
|
115
|
+
"sa-east-1": "sa-east-1";
|
|
116
|
+
"us-east-1": "us-east-1";
|
|
117
|
+
"us-east-2": "us-east-2";
|
|
118
|
+
"us-gov-east-1": "us-gov-east-1";
|
|
119
|
+
"us-gov-west-1": "us-gov-west-1";
|
|
120
|
+
"us-west-1": "us-west-1";
|
|
121
|
+
"us-west-2": "us-west-2";
|
|
122
|
+
}>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
export declare const amazonBedrockModelProviderConfigUpdateSchema: z.ZodMiniObject<{
|
|
125
|
+
auth: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
126
|
+
accessKey: z.ZodMiniObject<{
|
|
127
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
128
|
+
secretAccessKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
129
|
+
}, z.core.$strict>;
|
|
130
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
131
|
+
role: z.ZodMiniObject<{
|
|
132
|
+
roleArn: z.ZodMiniString<string>;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
}, z.core.$strict>]>>;
|
|
135
|
+
region: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
136
|
+
"ap-east-2": "ap-east-2";
|
|
137
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
138
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
139
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
140
|
+
"ap-south-1": "ap-south-1";
|
|
141
|
+
"ap-south-2": "ap-south-2";
|
|
142
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
143
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
144
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
145
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
146
|
+
"ap-southeast-5": "ap-southeast-5";
|
|
147
|
+
"ap-southeast-7": "ap-southeast-7";
|
|
148
|
+
"ca-central-1": "ca-central-1";
|
|
149
|
+
"eu-central-1": "eu-central-1";
|
|
150
|
+
"eu-central-2": "eu-central-2";
|
|
151
|
+
"eu-north-1": "eu-north-1";
|
|
152
|
+
"eu-south-1": "eu-south-1";
|
|
153
|
+
"eu-south-2": "eu-south-2";
|
|
154
|
+
"eu-west-1": "eu-west-1";
|
|
155
|
+
"eu-west-2": "eu-west-2";
|
|
156
|
+
"eu-west-3": "eu-west-3";
|
|
157
|
+
"il-central-1": "il-central-1";
|
|
158
|
+
"me-central-1": "me-central-1";
|
|
159
|
+
"sa-east-1": "sa-east-1";
|
|
160
|
+
"us-east-1": "us-east-1";
|
|
161
|
+
"us-east-2": "us-east-2";
|
|
162
|
+
"us-gov-east-1": "us-gov-east-1";
|
|
163
|
+
"us-gov-west-1": "us-gov-west-1";
|
|
164
|
+
"us-west-1": "us-west-1";
|
|
165
|
+
"us-west-2": "us-west-2";
|
|
166
|
+
}>>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
/**
|
|
169
|
+
* Anthropic
|
|
170
|
+
*/
|
|
171
|
+
export declare const anthropicModelProviderConfigSchema: z.ZodMiniObject<{
|
|
172
|
+
accessKey: z.ZodMiniString<string>;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
export declare const azureOpenAiModelProviderConfigSchema: z.ZodMiniObject<{
|
|
175
|
+
auth: z.ZodMiniObject<{
|
|
176
|
+
clientSecretAuth: z.ZodMiniObject<{
|
|
177
|
+
azureClientId: z.ZodMiniString<string>;
|
|
178
|
+
azureClientSecret: z.ZodMiniString<string>;
|
|
179
|
+
azureTenantId: z.ZodMiniString<string>;
|
|
180
|
+
}, z.core.$strict>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
resourceName: z.ZodMiniString<string>;
|
|
183
|
+
}, z.core.$strict>;
|
|
184
|
+
export declare const azureOpenAiModelProviderConfigRetrieveSchema: z.ZodMiniObject<{
|
|
185
|
+
auth: z.ZodMiniObject<{
|
|
186
|
+
clientSecretAuth: z.ZodMiniObject<{
|
|
187
|
+
azureClientId: z.ZodMiniString<string>;
|
|
188
|
+
azureTenantId: z.ZodMiniString<string>;
|
|
189
|
+
}, z.core.$strict>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
resourceName: z.ZodMiniString<string>;
|
|
192
|
+
}, z.core.$strict>;
|
|
193
|
+
export declare const azureOpenAiModelProviderConfigUpdateSchema: z.ZodMiniObject<{
|
|
194
|
+
auth: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
195
|
+
clientSecretAuth: z.ZodMiniObject<{
|
|
196
|
+
azureClientId: z.ZodMiniString<string>;
|
|
197
|
+
azureClientSecret: z.ZodMiniString<string>;
|
|
198
|
+
azureTenantId: z.ZodMiniString<string>;
|
|
199
|
+
}, z.core.$strict>;
|
|
200
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
201
|
+
clientSecretAuth: z.ZodMiniObject<{
|
|
202
|
+
azureClientId: z.ZodMiniString<string>;
|
|
203
|
+
azureTenantId: z.ZodMiniString<string>;
|
|
204
|
+
azureClientSecret: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
205
|
+
}, z.core.$strict>;
|
|
206
|
+
}, z.core.$strict>]>>;
|
|
207
|
+
resourceName: z.ZodMiniString<string>;
|
|
208
|
+
}, z.core.$strict>;
|
|
209
|
+
export declare const anthropicModelProviderConfigRetrieveSchema: z.ZodMiniObject<{}, z.core.$strict>;
|
|
210
|
+
/**
|
|
211
|
+
* Google Gemini
|
|
212
|
+
*/
|
|
213
|
+
export declare const googleGeminiModelProviderConfigSchema: z.ZodMiniObject<{
|
|
214
|
+
accessKey: z.ZodMiniString<string>;
|
|
215
|
+
}, z.core.$strict>;
|
|
216
|
+
export declare const googleGeminiModelProviderConfigRetrieveSchema: z.ZodMiniObject<{}, z.core.$strict>;
|
|
217
|
+
/**
|
|
218
|
+
* OpenAI
|
|
219
|
+
*/
|
|
220
|
+
export declare const openAiModelProviderConfigSchema: z.ZodMiniObject<{
|
|
221
|
+
accessKey: z.ZodMiniString<string>;
|
|
222
|
+
organizationId: z.ZodMiniString<string>;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
export declare const openAiModelProviderConfigRetrieveSchema: z.ZodMiniObject<{
|
|
225
|
+
organizationId: z.ZodMiniString<string>;
|
|
226
|
+
}, z.core.$strict>;
|
|
227
|
+
export declare const listModelsPropertiesSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
228
|
+
amazonBedrock: z.ZodMiniObject<{
|
|
229
|
+
auth: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
230
|
+
accessKey: z.ZodMiniObject<{
|
|
231
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
232
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
233
|
+
}, z.core.$strict>;
|
|
234
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
235
|
+
role: z.ZodMiniObject<{
|
|
236
|
+
roleArn: z.ZodMiniString<string>;
|
|
237
|
+
}, z.core.$strict>;
|
|
238
|
+
}, z.core.$strict>]>;
|
|
239
|
+
region: z.ZodMiniEnum<{
|
|
240
|
+
"ap-east-2": "ap-east-2";
|
|
241
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
242
|
+
"ap-northeast-2": "ap-northeast-2";
|
|
243
|
+
"ap-northeast-3": "ap-northeast-3";
|
|
244
|
+
"ap-south-1": "ap-south-1";
|
|
245
|
+
"ap-south-2": "ap-south-2";
|
|
246
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
247
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
248
|
+
"ap-southeast-3": "ap-southeast-3";
|
|
249
|
+
"ap-southeast-4": "ap-southeast-4";
|
|
250
|
+
"ap-southeast-5": "ap-southeast-5";
|
|
251
|
+
"ap-southeast-7": "ap-southeast-7";
|
|
252
|
+
"ca-central-1": "ca-central-1";
|
|
253
|
+
"eu-central-1": "eu-central-1";
|
|
254
|
+
"eu-central-2": "eu-central-2";
|
|
255
|
+
"eu-north-1": "eu-north-1";
|
|
256
|
+
"eu-south-1": "eu-south-1";
|
|
257
|
+
"eu-south-2": "eu-south-2";
|
|
258
|
+
"eu-west-1": "eu-west-1";
|
|
259
|
+
"eu-west-2": "eu-west-2";
|
|
260
|
+
"eu-west-3": "eu-west-3";
|
|
261
|
+
"il-central-1": "il-central-1";
|
|
262
|
+
"me-central-1": "me-central-1";
|
|
263
|
+
"sa-east-1": "sa-east-1";
|
|
264
|
+
"us-east-1": "us-east-1";
|
|
265
|
+
"us-east-2": "us-east-2";
|
|
266
|
+
"us-gov-east-1": "us-gov-east-1";
|
|
267
|
+
"us-gov-west-1": "us-gov-west-1";
|
|
268
|
+
"us-west-1": "us-west-1";
|
|
269
|
+
"us-west-2": "us-west-2";
|
|
270
|
+
}>;
|
|
271
|
+
}, z.core.$strict>;
|
|
272
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
273
|
+
anthropic: z.ZodMiniObject<{
|
|
274
|
+
accessKey: z.ZodMiniString<string>;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
277
|
+
azureOpenAi: z.ZodMiniObject<{
|
|
278
|
+
auth: z.ZodMiniObject<{
|
|
279
|
+
clientSecretAuth: z.ZodMiniObject<{
|
|
280
|
+
azureClientId: z.ZodMiniString<string>;
|
|
281
|
+
azureClientSecret: z.ZodMiniString<string>;
|
|
282
|
+
azureTenantId: z.ZodMiniString<string>;
|
|
283
|
+
}, z.core.$strict>;
|
|
284
|
+
}, z.core.$strict>;
|
|
285
|
+
resourceName: z.ZodMiniString<string>;
|
|
286
|
+
}, z.core.$strict>;
|
|
287
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
288
|
+
googleGemini: z.ZodMiniObject<{
|
|
289
|
+
accessKey: z.ZodMiniString<string>;
|
|
290
|
+
}, z.core.$strict>;
|
|
291
|
+
}, z.core.$strict>, z.ZodMiniObject<{
|
|
292
|
+
openAi: z.ZodMiniObject<{
|
|
293
|
+
accessKey: z.ZodMiniString<string>;
|
|
294
|
+
organizationId: z.ZodMiniString<string>;
|
|
295
|
+
}, z.core.$strict>;
|
|
296
|
+
}, z.core.$strict>]>;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024-2025 Dremio Corporation
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import * as z from "zod/mini";
|
|
17
|
+
/**
|
|
18
|
+
* Amazon Bedrock
|
|
19
|
+
*/
|
|
20
|
+
export const amazonBedrockRegionSchema = z.enum([
|
|
21
|
+
"ap-east-2",
|
|
22
|
+
"ap-northeast-1",
|
|
23
|
+
"ap-northeast-2",
|
|
24
|
+
"ap-northeast-3",
|
|
25
|
+
"ap-south-1",
|
|
26
|
+
"ap-south-2",
|
|
27
|
+
"ap-southeast-1",
|
|
28
|
+
"ap-southeast-2",
|
|
29
|
+
"ap-southeast-3",
|
|
30
|
+
"ap-southeast-4",
|
|
31
|
+
"ap-southeast-5",
|
|
32
|
+
"ap-southeast-7",
|
|
33
|
+
"ca-central-1",
|
|
34
|
+
"eu-central-1",
|
|
35
|
+
"eu-central-2",
|
|
36
|
+
"eu-north-1",
|
|
37
|
+
"eu-south-1",
|
|
38
|
+
"eu-south-2",
|
|
39
|
+
"eu-west-1",
|
|
40
|
+
"eu-west-2",
|
|
41
|
+
"eu-west-3",
|
|
42
|
+
"il-central-1",
|
|
43
|
+
"me-central-1",
|
|
44
|
+
"sa-east-1",
|
|
45
|
+
"us-east-1",
|
|
46
|
+
"us-east-2",
|
|
47
|
+
"us-gov-east-1",
|
|
48
|
+
"us-gov-west-1",
|
|
49
|
+
"us-west-1",
|
|
50
|
+
"us-west-2",
|
|
51
|
+
]);
|
|
52
|
+
const amazonBedrockAccessKeyAuth = z.strictObject({
|
|
53
|
+
accessKey: z.strictObject({
|
|
54
|
+
accessKeyId: z.string(),
|
|
55
|
+
secretAccessKey: z.string(),
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
58
|
+
const amazonBedrockRoleAuth = z.strictObject({
|
|
59
|
+
role: z.strictObject({
|
|
60
|
+
roleArn: z.string(),
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
export const amazonBedrockModelProviderConfigSchema = z.strictObject({
|
|
64
|
+
auth: z.union([amazonBedrockAccessKeyAuth, amazonBedrockRoleAuth]),
|
|
65
|
+
region: amazonBedrockRegionSchema,
|
|
66
|
+
});
|
|
67
|
+
export const amazonBedrockModelProviderConfigRetrieveSchema = z.strictObject({
|
|
68
|
+
auth: z.union([
|
|
69
|
+
z.strictObject({
|
|
70
|
+
accessKey: z.omit(amazonBedrockAccessKeyAuth.shape.accessKey, { secretAccessKey: true }),
|
|
71
|
+
}),
|
|
72
|
+
amazonBedrockRoleAuth,
|
|
73
|
+
]),
|
|
74
|
+
region: amazonBedrockRegionSchema,
|
|
75
|
+
});
|
|
76
|
+
export const amazonBedrockModelProviderConfigUpdateSchema = z.strictObject({
|
|
77
|
+
auth: z.optional(z.union([
|
|
78
|
+
z.strictObject({
|
|
79
|
+
accessKey: z.extend(z.omit(amazonBedrockAccessKeyAuth.shape.accessKey, { secretAccessKey: true }), {
|
|
80
|
+
secretAccessKey: z.optional(amazonBedrockAccessKeyAuth.shape.accessKey.shape.secretAccessKey),
|
|
81
|
+
}),
|
|
82
|
+
}),
|
|
83
|
+
amazonBedrockRoleAuth,
|
|
84
|
+
])),
|
|
85
|
+
region: z.optional(amazonBedrockRegionSchema),
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* Anthropic
|
|
89
|
+
*/
|
|
90
|
+
export const anthropicModelProviderConfigSchema = z.strictObject({
|
|
91
|
+
accessKey: z.string(),
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Azure OpenAI
|
|
95
|
+
*/
|
|
96
|
+
const azureOpenAiAuth = z.strictObject({
|
|
97
|
+
clientSecretAuth: z.strictObject({
|
|
98
|
+
azureClientId: z.string(),
|
|
99
|
+
azureClientSecret: z.string(),
|
|
100
|
+
azureTenantId: z.string(),
|
|
101
|
+
}),
|
|
102
|
+
});
|
|
103
|
+
export const azureOpenAiModelProviderConfigSchema = z.strictObject({
|
|
104
|
+
auth: z.strictObject(azureOpenAiAuth.shape),
|
|
105
|
+
resourceName: z.string(),
|
|
106
|
+
});
|
|
107
|
+
export const azureOpenAiModelProviderConfigRetrieveSchema = z.strictObject({
|
|
108
|
+
auth: z.strictObject({
|
|
109
|
+
clientSecretAuth: z.omit(azureOpenAiAuth.shape.clientSecretAuth, { azureClientSecret: true }),
|
|
110
|
+
}),
|
|
111
|
+
resourceName: z.string(),
|
|
112
|
+
});
|
|
113
|
+
export const azureOpenAiModelProviderConfigUpdateSchema = z.strictObject({
|
|
114
|
+
auth: z.optional(z.union([
|
|
115
|
+
azureOpenAiModelProviderConfigSchema.shape.auth,
|
|
116
|
+
z.strictObject({
|
|
117
|
+
clientSecretAuth: z.extend(z.omit(azureOpenAiAuth.shape.clientSecretAuth, { azureClientSecret: true }), {
|
|
118
|
+
azureClientSecret: z.optional(azureOpenAiAuth.shape.clientSecretAuth.shape.azureClientSecret),
|
|
119
|
+
}),
|
|
120
|
+
}),
|
|
121
|
+
])),
|
|
122
|
+
resourceName: z.string(),
|
|
123
|
+
});
|
|
124
|
+
export const anthropicModelProviderConfigRetrieveSchema = z.strictObject({});
|
|
125
|
+
/**
|
|
126
|
+
* Google Gemini
|
|
127
|
+
*/
|
|
128
|
+
export const googleGeminiModelProviderConfigSchema = z.strictObject({
|
|
129
|
+
accessKey: z.string(),
|
|
130
|
+
});
|
|
131
|
+
export const googleGeminiModelProviderConfigRetrieveSchema = z.strictObject({});
|
|
132
|
+
/**
|
|
133
|
+
* OpenAI
|
|
134
|
+
*/
|
|
135
|
+
export const openAiModelProviderConfigSchema = z.strictObject({
|
|
136
|
+
accessKey: z.string(),
|
|
137
|
+
organizationId: z.string(),
|
|
138
|
+
});
|
|
139
|
+
export const openAiModelProviderConfigRetrieveSchema = z.strictObject({
|
|
140
|
+
organizationId: z.string(),
|
|
141
|
+
});
|
|
142
|
+
export const listModelsPropertiesSchema = z.union([
|
|
143
|
+
z.strictObject({
|
|
144
|
+
amazonBedrock: amazonBedrockModelProviderConfigSchema,
|
|
145
|
+
}),
|
|
146
|
+
z.strictObject({
|
|
147
|
+
anthropic: anthropicModelProviderConfigSchema,
|
|
148
|
+
}),
|
|
149
|
+
z.strictObject({
|
|
150
|
+
azureOpenAi: azureOpenAiModelProviderConfigSchema,
|
|
151
|
+
}),
|
|
152
|
+
z.strictObject({
|
|
153
|
+
googleGemini: googleGeminiModelProviderConfigSchema,
|
|
154
|
+
}),
|
|
155
|
+
z.strictObject({
|
|
156
|
+
openAi: openAiModelProviderConfigSchema,
|
|
157
|
+
}),
|
|
158
|
+
]);
|
|
159
|
+
//# sourceMappingURL=modelProviderConfigSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelProviderConfigSchemas.js","sourceRoot":"","sources":["../../../src/enterprise/ai/modelProviderConfigSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,WAAW;IACX,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,e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b,SAAS,EAAE,kCAAkC;KAC9C,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb,WAAW,EAAE,oCAAoC;KAClD,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb,YAAY,EAAE,qCAAqC;KACpD,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb,MAAM,EAAE,+BAA+B;KACxC,CAAC;CACH,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\n\n/**\n * Amazon Bedrock\n */\nexport const amazonBedrockRegionSchema = z.enum([\n \"ap-east-2\",\n \"ap-northeast-1\",\n \"ap-northeast-2\",\n \"ap-northeast-3\",\n \"ap-south-1\",\n \"ap-south-2\",\n \"ap-southeast-1\",\n \"ap-southeast-2\",\n \"ap-southeast-3\",\n \"ap-southeast-4\",\n \"ap-southeast-5\",\n \"ap-southeast-7\",\n \"ca-central-1\",\n \"eu-central-1\",\n \"eu-central-2\",\n \"eu-north-1\",\n \"eu-south-1\",\n \"eu-south-2\",\n \"eu-west-1\",\n \"eu-west-2\",\n \"eu-west-3\",\n \"il-central-1\",\n \"me-central-1\",\n \"sa-east-1\",\n \"us-east-1\",\n \"us-east-2\",\n \"us-gov-east-1\",\n \"us-gov-west-1\",\n \"us-west-1\",\n \"us-west-2\",\n]);\n\nconst amazonBedrockAccessKeyAuth = z.strictObject({\n accessKey: z.strictObject({\n accessKeyId: z.string(),\n secretAccessKey: z.string(),\n }),\n});\n\nconst amazonBedrockRoleAuth = z.strictObject({\n role: z.strictObject({\n roleArn: z.string(),\n }),\n});\n\nexport const amazonBedrockModelProviderConfigSchema = z.strictObject({\n auth: z.union([amazonBedrockAccessKeyAuth, amazonBedrockRoleAuth]),\n region: amazonBedrockRegionSchema,\n});\n\nexport const amazonBedrockModelProviderConfigRetrieveSchema = z.strictObject({\n auth: z.union([\n z.strictObject({\n accessKey: z.omit(amazonBedrockAccessKeyAuth.shape.accessKey, { secretAccessKey: true }),\n }),\n amazonBedrockRoleAuth,\n ]),\n region: amazonBedrockRegionSchema,\n});\n\nexport const amazonBedrockModelProviderConfigUpdateSchema = z.strictObject({\n auth: z.optional(\n z.union([\n z.strictObject({\n accessKey: z.extend(\n z.omit(amazonBedrockAccessKeyAuth.shape.accessKey, { secretAccessKey: true }),\n {\n secretAccessKey: z.optional(\n amazonBedrockAccessKeyAuth.shape.accessKey.shape.secretAccessKey,\n ),\n },\n ),\n }),\n amazonBedrockRoleAuth,\n ]),\n ),\n region: z.optional(amazonBedrockRegionSchema),\n});\n\n/**\n * Anthropic\n */\nexport const anthropicModelProviderConfigSchema = z.strictObject({\n accessKey: z.string(),\n});\n\n/**\n * Azure OpenAI\n */\nconst azureOpenAiAuth = z.strictObject({\n clientSecretAuth: z.strictObject({\n azureClientId: z.string(),\n azureClientSecret: z.string(),\n azureTenantId: z.string(),\n }),\n});\n\nexport const azureOpenAiModelProviderConfigSchema = z.strictObject({\n auth: z.strictObject(azureOpenAiAuth.shape),\n resourceName: z.string(),\n});\n\nexport const azureOpenAiModelProviderConfigRetrieveSchema = z.strictObject({\n auth: z.strictObject({\n clientSecretAuth: z.omit(azureOpenAiAuth.shape.clientSecretAuth, { azureClientSecret: true }),\n }),\n resourceName: z.string(),\n});\n\nexport const azureOpenAiModelProviderConfigUpdateSchema = z.strictObject({\n auth: z.optional(\n z.union([\n azureOpenAiModelProviderConfigSchema.shape.auth,\n z.strictObject({\n clientSecretAuth: z.extend(\n z.omit(azureOpenAiAuth.shape.clientSecretAuth, { azureClientSecret: true }),\n {\n azureClientSecret: z.optional(\n azureOpenAiAuth.shape.clientSecretAuth.shape.azureClientSecret,\n ),\n },\n ),\n }),\n ]),\n ),\n resourceName: z.string(),\n});\n\nexport const anthropicModelProviderConfigRetrieveSchema = z.strictObject({});\n\n/**\n * Google Gemini\n */\nexport const googleGeminiModelProviderConfigSchema = z.strictObject({\n accessKey: z.string(),\n});\n\nexport const googleGeminiModelProviderConfigRetrieveSchema = z.strictObject({});\n\n/**\n * OpenAI\n */\nexport const openAiModelProviderConfigSchema = z.strictObject({\n accessKey: z.string(),\n organizationId: z.string(),\n});\n\nexport const openAiModelProviderConfigRetrieveSchema = z.strictObject({\n organizationId: z.string(),\n});\n\nexport const listModelsPropertiesSchema = z.union([\n z.strictObject({\n amazonBedrock: amazonBedrockModelProviderConfigSchema,\n }),\n z.strictObject({\n anthropic: anthropicModelProviderConfigSchema,\n }),\n z.strictObject({\n azureOpenAi: azureOpenAiModelProviderConfigSchema,\n }),\n z.strictObject({\n googleGemini: googleGeminiModelProviderConfigSchema,\n }),\n z.strictObject({\n openAi: openAiModelProviderConfigSchema,\n }),\n]);\n"]}
|
|
@@ -15,3 +15,4 @@ export * from "./Grantee.ts";
|
|
|
15
15
|
export type { Engine, EnterpriseCatalogObject, EnterpriseCatalogReference, EnterpriseScript, EnterpriseUser, Job, JobResultsSchema, Reflection, ReflectionSummary, Role, BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference, };
|
|
16
16
|
export * from "./catalog/catalogSearch/CatalogSearchResult.ts";
|
|
17
17
|
export * from "./grants/Grant.ts";
|
|
18
|
+
export * from "./ai/index.ts";
|