@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.js
CHANGED
|
@@ -19,7 +19,7 @@ const BigQueryAuthMethods = {
|
|
|
19
19
|
};
|
|
20
20
|
const TrinoAuthMethods = {
|
|
21
21
|
Password: "password",
|
|
22
|
-
Oauth: "oauth"
|
|
22
|
+
Oauth: "trino-oauth"
|
|
23
23
|
};
|
|
24
24
|
const DatabaseAuthMethods = {
|
|
25
25
|
UsernameAndPassword: "username-and-password",
|
|
@@ -205,6 +205,7 @@ const trinoBaseMetadataSchema = z.object({
|
|
|
205
205
|
caCertificateText: z.string().optional()
|
|
206
206
|
});
|
|
207
207
|
const trinoUsernamePasswordMetadataSchema = trinoBaseMetadataSchema.extend({
|
|
208
|
+
authMethod: z.literal(TrinoAuthMethods.Password).nullish(),
|
|
208
209
|
user: z.string(),
|
|
209
210
|
password: z.string()
|
|
210
211
|
});
|
|
@@ -215,11 +216,7 @@ const trinoOAuthMetadataSchema = trinoBaseMetadataSchema.extend({
|
|
|
215
216
|
authUrl: z.string().url(),
|
|
216
217
|
tokenUrl: z.string().url()
|
|
217
218
|
});
|
|
218
|
-
const trinoMetadataSchema = z.discriminatedUnion("authMethod", [
|
|
219
|
-
trinoUsernamePasswordMetadataSchema.extend({ authMethod: z.literal(null) }),
|
|
220
|
-
trinoUsernamePasswordMetadataSchema.extend({ authMethod: z.literal(TrinoAuthMethods.Password) }),
|
|
221
|
-
trinoOAuthMetadataSchema
|
|
222
|
-
]);
|
|
219
|
+
const trinoMetadataSchema = z.discriminatedUnion("authMethod", [trinoUsernamePasswordMetadataSchema, trinoOAuthMetadataSchema]);
|
|
223
220
|
const commonDatabaseSchema = z.object({
|
|
224
221
|
host: z.string(),
|
|
225
222
|
user: z.string(),
|