@deepnote/database-integrations 1.3.4 → 1.3.5
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/index.cjs +3 -6
- package/dist/index.d.cts +85 -203
- package/dist/index.d.ts +85 -203
- package/dist/index.js +3 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@ const BigQueryAuthMethods = {
|
|
|
43
43
|
};
|
|
44
44
|
const TrinoAuthMethods = {
|
|
45
45
|
Password: "password",
|
|
46
|
-
Oauth: "oauth"
|
|
46
|
+
Oauth: "trino-oauth"
|
|
47
47
|
};
|
|
48
48
|
const DatabaseAuthMethods = {
|
|
49
49
|
UsernameAndPassword: "username-and-password",
|
|
@@ -229,6 +229,7 @@ const trinoBaseMetadataSchema = zod.z.object({
|
|
|
229
229
|
caCertificateText: zod.z.string().optional()
|
|
230
230
|
});
|
|
231
231
|
const trinoUsernamePasswordMetadataSchema = trinoBaseMetadataSchema.extend({
|
|
232
|
+
authMethod: zod.z.literal(TrinoAuthMethods.Password).nullish(),
|
|
232
233
|
user: zod.z.string(),
|
|
233
234
|
password: zod.z.string()
|
|
234
235
|
});
|
|
@@ -239,11 +240,7 @@ const trinoOAuthMetadataSchema = trinoBaseMetadataSchema.extend({
|
|
|
239
240
|
authUrl: zod.z.string().url(),
|
|
240
241
|
tokenUrl: zod.z.string().url()
|
|
241
242
|
});
|
|
242
|
-
const trinoMetadataSchema = zod.z.discriminatedUnion("authMethod", [
|
|
243
|
-
trinoUsernamePasswordMetadataSchema.extend({ authMethod: zod.z.literal(null) }),
|
|
244
|
-
trinoUsernamePasswordMetadataSchema.extend({ authMethod: zod.z.literal(TrinoAuthMethods.Password) }),
|
|
245
|
-
trinoOAuthMetadataSchema
|
|
246
|
-
]);
|
|
243
|
+
const trinoMetadataSchema = zod.z.discriminatedUnion("authMethod", [trinoUsernamePasswordMetadataSchema, trinoOAuthMetadataSchema]);
|
|
247
244
|
const commonDatabaseSchema = zod.z.object({
|
|
248
245
|
host: zod.z.string(),
|
|
249
246
|
user: zod.z.string(),
|