@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.js CHANGED
@@ -150,11 +150,21 @@ const commonSnowflakeMetadataSchema = z.object({
150
150
  accountName: z.string(),
151
151
  warehouse: z.string().optional(),
152
152
  database: z.string().optional(),
153
- role: z.string().optional()
153
+ role: z.string().optional(),
154
+ dbt: z.boolean().optional(),
155
+ dbtServiceToken: z.string().optional(),
156
+ dbtPrimaryJobId: z.string().optional(),
157
+ dbtProxyServerUrl: z.string().optional()
154
158
  });
155
- const snowflakeMetadataSchema = z.discriminatedUnion("authMethod", [
159
+ const snowflakeMetadataSchema = z.preprocess((data) => {
160
+ if (typeof data === "object" && data !== null && (!("authMethod" in data) || !data.authMethod)) return {
161
+ ...data,
162
+ authMethod: SnowflakeAuthMethods.Password
163
+ };
164
+ return data;
165
+ }, z.discriminatedUnion("authMethod", [
156
166
  commonSnowflakeMetadataSchema.extend({
157
- authMethod: z.literal(SnowflakeAuthMethods.Password),
167
+ authMethod: z.literal(SnowflakeAuthMethods.Password).optional(),
158
168
  username: z.string(),
159
169
  password: z.string()
160
170
  }),
@@ -185,7 +195,7 @@ const snowflakeMetadataSchema = z.discriminatedUnion("authMethod", [
185
195
  privateKey: z.string(),
186
196
  privateKeyPassphrase: z.string().optional()
187
197
  })
188
- ]);
198
+ ]));
189
199
  const spannerMetadataSchema = z.object({
190
200
  service_account: z.string(),
191
201
  dataBoostEnabled: z.boolean(),
@@ -386,7 +396,7 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
386
396
  commonIntegrationConfig.extend({
387
397
  type: z$1.literal("trino"),
388
398
  metadata: databaseMetadataSchemasByType["trino"],
389
- federated_auth_method: z$1.null().optional()
399
+ federated_auth_method: z$1.enum(["trino-oauth", "password"]).optional().nullable()
390
400
  })
391
401
  ]);
392
402
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnote/database-integrations",
3
- "version": "1.3.5",
3
+ "version": "1.4.1",
4
4
  "description": "Deepnote database integration definitions",
5
5
  "keywords": [],
6
6
  "repository": {