@deepnote/database-integrations 1.3.5 → 1.4.1
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 +15 -5
- package/dist/index.d.cts +536 -268
- package/dist/index.d.ts +536 -268
- package/dist/index.js +15 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -174,11 +174,21 @@ const commonSnowflakeMetadataSchema = zod.z.object({
|
|
|
174
174
|
accountName: zod.z.string(),
|
|
175
175
|
warehouse: zod.z.string().optional(),
|
|
176
176
|
database: zod.z.string().optional(),
|
|
177
|
-
role: zod.z.string().optional()
|
|
177
|
+
role: zod.z.string().optional(),
|
|
178
|
+
dbt: zod.z.boolean().optional(),
|
|
179
|
+
dbtServiceToken: zod.z.string().optional(),
|
|
180
|
+
dbtPrimaryJobId: zod.z.string().optional(),
|
|
181
|
+
dbtProxyServerUrl: zod.z.string().optional()
|
|
178
182
|
});
|
|
179
|
-
const snowflakeMetadataSchema = zod.z.
|
|
183
|
+
const snowflakeMetadataSchema = zod.z.preprocess((data) => {
|
|
184
|
+
if (typeof data === "object" && data !== null && (!("authMethod" in data) || !data.authMethod)) return {
|
|
185
|
+
...data,
|
|
186
|
+
authMethod: SnowflakeAuthMethods.Password
|
|
187
|
+
};
|
|
188
|
+
return data;
|
|
189
|
+
}, zod.z.discriminatedUnion("authMethod", [
|
|
180
190
|
commonSnowflakeMetadataSchema.extend({
|
|
181
|
-
authMethod: zod.z.literal(SnowflakeAuthMethods.Password),
|
|
191
|
+
authMethod: zod.z.literal(SnowflakeAuthMethods.Password).optional(),
|
|
182
192
|
username: zod.z.string(),
|
|
183
193
|
password: zod.z.string()
|
|
184
194
|
}),
|
|
@@ -209,7 +219,7 @@ const snowflakeMetadataSchema = zod.z.discriminatedUnion("authMethod", [
|
|
|
209
219
|
privateKey: zod.z.string(),
|
|
210
220
|
privateKeyPassphrase: zod.z.string().optional()
|
|
211
221
|
})
|
|
212
|
-
]);
|
|
222
|
+
]));
|
|
213
223
|
const spannerMetadataSchema = zod.z.object({
|
|
214
224
|
service_account: zod.z.string(),
|
|
215
225
|
dataBoostEnabled: zod.z.boolean(),
|
|
@@ -410,7 +420,7 @@ const databaseIntegrationConfigSchema = zod.default.discriminatedUnion("type", [
|
|
|
410
420
|
commonIntegrationConfig.extend({
|
|
411
421
|
type: zod.default.literal("trino"),
|
|
412
422
|
metadata: databaseMetadataSchemasByType["trino"],
|
|
413
|
-
federated_auth_method: zod.default.
|
|
423
|
+
federated_auth_method: zod.default.enum(["trino-oauth", "password"]).optional().nullable()
|
|
414
424
|
})
|
|
415
425
|
]);
|
|
416
426
|
|