@deepnote/database-integrations 1.2.2 → 1.3.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 +10 -4
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +10 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -302,7 +302,7 @@ const databaseIntegrationConfigSchema = zod.default.discriminatedUnion("type", [
|
|
|
302
302
|
commonIntegrationConfig.extend({
|
|
303
303
|
type: zod.default.literal("big-query"),
|
|
304
304
|
metadata: databaseMetadataSchemasByType["big-query"],
|
|
305
|
-
federated_auth_method: zod.default.enum(["google-oauth"]).optional().nullable()
|
|
305
|
+
federated_auth_method: zod.default.enum(["service-account", "google-oauth"]).optional().nullable()
|
|
306
306
|
}),
|
|
307
307
|
commonIntegrationConfig.extend({
|
|
308
308
|
type: zod.default.literal("clickhouse"),
|
|
@@ -357,7 +357,11 @@ const databaseIntegrationConfigSchema = zod.default.discriminatedUnion("type", [
|
|
|
357
357
|
commonIntegrationConfig.extend({
|
|
358
358
|
type: zod.default.literal("redshift"),
|
|
359
359
|
metadata: databaseMetadataSchemasByType["redshift"],
|
|
360
|
-
federated_auth_method: zod.default.enum([
|
|
360
|
+
federated_auth_method: zod.default.enum([
|
|
361
|
+
"username-and-password",
|
|
362
|
+
"iam-role",
|
|
363
|
+
"individual-credentials"
|
|
364
|
+
]).optional().nullable()
|
|
361
365
|
}),
|
|
362
366
|
commonIntegrationConfig.extend({
|
|
363
367
|
type: zod.default.literal("snowflake"),
|
|
@@ -366,7 +370,9 @@ const databaseIntegrationConfigSchema = zod.default.discriminatedUnion("type", [
|
|
|
366
370
|
"okta",
|
|
367
371
|
"snowflake",
|
|
368
372
|
"azure",
|
|
369
|
-
"key-pair"
|
|
373
|
+
"key-pair",
|
|
374
|
+
"password",
|
|
375
|
+
"service-account-key-pair"
|
|
370
376
|
]).optional().nullable()
|
|
371
377
|
}),
|
|
372
378
|
commonIntegrationConfig.extend({
|
|
@@ -522,7 +528,7 @@ function getEnvVarForSqlCells(integration, params) {
|
|
|
522
528
|
* https://github.com/deepnote/deepnote-toolkit/blob/main/deepnote_toolkit/sql/sql_execution.py#L321
|
|
523
529
|
*/
|
|
524
530
|
function getSqlAlchemyInput(integration, params) {
|
|
525
|
-
if (integration.federated_auth_method) return null;
|
|
531
|
+
if (integration.federated_auth_method != null && isFederatedAuthMethod(integration.federated_auth_method)) return null;
|
|
526
532
|
switch (integration.type) {
|
|
527
533
|
case "alloydb":
|
|
528
534
|
case "pgsql": return getPostgresSqlAlchemyInput(integration.id, params.projectRootDirectory, integration.metadata);
|
package/dist/index.d.cts
CHANGED
|
@@ -176,7 +176,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
176
176
|
clientId: string;
|
|
177
177
|
clientSecret: string;
|
|
178
178
|
}>]>;
|
|
179
|
-
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["google-oauth"]>>>;
|
|
179
|
+
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["service-account", "google-oauth"]>>>;
|
|
180
180
|
}, "strip", z$1.ZodTypeAny, {
|
|
181
181
|
type: "big-query";
|
|
182
182
|
id: string;
|
|
@@ -190,7 +190,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
190
190
|
clientId: string;
|
|
191
191
|
clientSecret: string;
|
|
192
192
|
};
|
|
193
|
-
federated_auth_method?: "google-oauth" | null | undefined;
|
|
193
|
+
federated_auth_method?: "service-account" | "google-oauth" | null | undefined;
|
|
194
194
|
}, {
|
|
195
195
|
type: "big-query";
|
|
196
196
|
id: string;
|
|
@@ -204,7 +204,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
204
204
|
clientId: string;
|
|
205
205
|
clientSecret: string;
|
|
206
206
|
};
|
|
207
|
-
federated_auth_method?: "google-oauth" | null | undefined;
|
|
207
|
+
federated_auth_method?: "service-account" | "google-oauth" | null | undefined;
|
|
208
208
|
}>, z$1.ZodObject<{
|
|
209
209
|
id: z$1.ZodString;
|
|
210
210
|
name: z$1.ZodString;
|
|
@@ -1113,7 +1113,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1113
1113
|
caCertificateName?: string | undefined;
|
|
1114
1114
|
caCertificateText?: string | undefined;
|
|
1115
1115
|
}>]>;
|
|
1116
|
-
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["individual-credentials"]>>>;
|
|
1116
|
+
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["username-and-password", "iam-role", "individual-credentials"]>>>;
|
|
1117
1117
|
}, "strip", z$1.ZodTypeAny, {
|
|
1118
1118
|
type: "redshift";
|
|
1119
1119
|
id: string;
|
|
@@ -1160,7 +1160,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1160
1160
|
caCertificateName?: string | undefined;
|
|
1161
1161
|
caCertificateText?: string | undefined;
|
|
1162
1162
|
};
|
|
1163
|
-
federated_auth_method?: "individual-credentials" | null | undefined;
|
|
1163
|
+
federated_auth_method?: "iam-role" | "username-and-password" | "individual-credentials" | null | undefined;
|
|
1164
1164
|
}, {
|
|
1165
1165
|
type: "redshift";
|
|
1166
1166
|
id: string;
|
|
@@ -1207,7 +1207,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1207
1207
|
caCertificateName?: string | undefined;
|
|
1208
1208
|
caCertificateText?: string | undefined;
|
|
1209
1209
|
};
|
|
1210
|
-
federated_auth_method?: "individual-credentials" | null | undefined;
|
|
1210
|
+
federated_auth_method?: "iam-role" | "username-and-password" | "individual-credentials" | null | undefined;
|
|
1211
1211
|
}>, z$1.ZodObject<{
|
|
1212
1212
|
id: z$1.ZodString;
|
|
1213
1213
|
name: z$1.ZodString;
|
|
@@ -1376,7 +1376,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1376
1376
|
role?: string | undefined;
|
|
1377
1377
|
privateKeyPassphrase?: string | undefined;
|
|
1378
1378
|
}>]>;
|
|
1379
|
-
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["okta", "snowflake", "azure", "key-pair"]>>>;
|
|
1379
|
+
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["okta", "snowflake", "azure", "key-pair", "password", "service-account-key-pair"]>>>;
|
|
1380
1380
|
}, "strip", z$1.ZodTypeAny, {
|
|
1381
1381
|
type: "snowflake";
|
|
1382
1382
|
id: string;
|
|
@@ -1434,7 +1434,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1434
1434
|
role?: string | undefined;
|
|
1435
1435
|
privateKeyPassphrase?: string | undefined;
|
|
1436
1436
|
};
|
|
1437
|
-
federated_auth_method?: "azure" | "key-pair" | "snowflake" | "okta" | null | undefined;
|
|
1437
|
+
federated_auth_method?: "azure" | "key-pair" | "service-account-key-pair" | "snowflake" | "okta" | "password" | null | undefined;
|
|
1438
1438
|
}, {
|
|
1439
1439
|
type: "snowflake";
|
|
1440
1440
|
id: string;
|
|
@@ -1492,7 +1492,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1492
1492
|
role?: string | undefined;
|
|
1493
1493
|
privateKeyPassphrase?: string | undefined;
|
|
1494
1494
|
};
|
|
1495
|
-
federated_auth_method?: "azure" | "key-pair" | "snowflake" | "okta" | null | undefined;
|
|
1495
|
+
federated_auth_method?: "azure" | "key-pair" | "service-account-key-pair" | "snowflake" | "okta" | "password" | null | undefined;
|
|
1496
1496
|
}>, z$1.ZodObject<{
|
|
1497
1497
|
id: z$1.ZodString;
|
|
1498
1498
|
name: z$1.ZodString;
|
package/dist/index.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
176
176
|
clientId: string;
|
|
177
177
|
clientSecret: string;
|
|
178
178
|
}>]>;
|
|
179
|
-
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["google-oauth"]>>>;
|
|
179
|
+
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["service-account", "google-oauth"]>>>;
|
|
180
180
|
}, "strip", z$1.ZodTypeAny, {
|
|
181
181
|
type: "big-query";
|
|
182
182
|
id: string;
|
|
@@ -190,7 +190,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
190
190
|
clientId: string;
|
|
191
191
|
clientSecret: string;
|
|
192
192
|
};
|
|
193
|
-
federated_auth_method?: "google-oauth" | null | undefined;
|
|
193
|
+
federated_auth_method?: "service-account" | "google-oauth" | null | undefined;
|
|
194
194
|
}, {
|
|
195
195
|
type: "big-query";
|
|
196
196
|
id: string;
|
|
@@ -204,7 +204,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
204
204
|
clientId: string;
|
|
205
205
|
clientSecret: string;
|
|
206
206
|
};
|
|
207
|
-
federated_auth_method?: "google-oauth" | null | undefined;
|
|
207
|
+
federated_auth_method?: "service-account" | "google-oauth" | null | undefined;
|
|
208
208
|
}>, z$1.ZodObject<{
|
|
209
209
|
id: z$1.ZodString;
|
|
210
210
|
name: z$1.ZodString;
|
|
@@ -1113,7 +1113,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1113
1113
|
caCertificateName?: string | undefined;
|
|
1114
1114
|
caCertificateText?: string | undefined;
|
|
1115
1115
|
}>]>;
|
|
1116
|
-
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["individual-credentials"]>>>;
|
|
1116
|
+
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["username-and-password", "iam-role", "individual-credentials"]>>>;
|
|
1117
1117
|
}, "strip", z$1.ZodTypeAny, {
|
|
1118
1118
|
type: "redshift";
|
|
1119
1119
|
id: string;
|
|
@@ -1160,7 +1160,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1160
1160
|
caCertificateName?: string | undefined;
|
|
1161
1161
|
caCertificateText?: string | undefined;
|
|
1162
1162
|
};
|
|
1163
|
-
federated_auth_method?: "individual-credentials" | null | undefined;
|
|
1163
|
+
federated_auth_method?: "iam-role" | "username-and-password" | "individual-credentials" | null | undefined;
|
|
1164
1164
|
}, {
|
|
1165
1165
|
type: "redshift";
|
|
1166
1166
|
id: string;
|
|
@@ -1207,7 +1207,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1207
1207
|
caCertificateName?: string | undefined;
|
|
1208
1208
|
caCertificateText?: string | undefined;
|
|
1209
1209
|
};
|
|
1210
|
-
federated_auth_method?: "individual-credentials" | null | undefined;
|
|
1210
|
+
federated_auth_method?: "iam-role" | "username-and-password" | "individual-credentials" | null | undefined;
|
|
1211
1211
|
}>, z$1.ZodObject<{
|
|
1212
1212
|
id: z$1.ZodString;
|
|
1213
1213
|
name: z$1.ZodString;
|
|
@@ -1376,7 +1376,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1376
1376
|
role?: string | undefined;
|
|
1377
1377
|
privateKeyPassphrase?: string | undefined;
|
|
1378
1378
|
}>]>;
|
|
1379
|
-
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["okta", "snowflake", "azure", "key-pair"]>>>;
|
|
1379
|
+
federated_auth_method: z$1.ZodNullable<z$1.ZodOptional<z$1.ZodEnum<["okta", "snowflake", "azure", "key-pair", "password", "service-account-key-pair"]>>>;
|
|
1380
1380
|
}, "strip", z$1.ZodTypeAny, {
|
|
1381
1381
|
type: "snowflake";
|
|
1382
1382
|
id: string;
|
|
@@ -1434,7 +1434,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1434
1434
|
role?: string | undefined;
|
|
1435
1435
|
privateKeyPassphrase?: string | undefined;
|
|
1436
1436
|
};
|
|
1437
|
-
federated_auth_method?: "azure" | "key-pair" | "snowflake" | "okta" | null | undefined;
|
|
1437
|
+
federated_auth_method?: "azure" | "key-pair" | "service-account-key-pair" | "snowflake" | "okta" | "password" | null | undefined;
|
|
1438
1438
|
}, {
|
|
1439
1439
|
type: "snowflake";
|
|
1440
1440
|
id: string;
|
|
@@ -1492,7 +1492,7 @@ declare const databaseIntegrationConfigSchema: z$1.ZodDiscriminatedUnion<"type",
|
|
|
1492
1492
|
role?: string | undefined;
|
|
1493
1493
|
privateKeyPassphrase?: string | undefined;
|
|
1494
1494
|
};
|
|
1495
|
-
federated_auth_method?: "azure" | "key-pair" | "snowflake" | "okta" | null | undefined;
|
|
1495
|
+
federated_auth_method?: "azure" | "key-pair" | "service-account-key-pair" | "snowflake" | "okta" | "password" | null | undefined;
|
|
1496
1496
|
}>, z$1.ZodObject<{
|
|
1497
1497
|
id: z$1.ZodString;
|
|
1498
1498
|
name: z$1.ZodString;
|
package/dist/index.js
CHANGED
|
@@ -278,7 +278,7 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
|
|
|
278
278
|
commonIntegrationConfig.extend({
|
|
279
279
|
type: z$1.literal("big-query"),
|
|
280
280
|
metadata: databaseMetadataSchemasByType["big-query"],
|
|
281
|
-
federated_auth_method: z$1.enum(["google-oauth"]).optional().nullable()
|
|
281
|
+
federated_auth_method: z$1.enum(["service-account", "google-oauth"]).optional().nullable()
|
|
282
282
|
}),
|
|
283
283
|
commonIntegrationConfig.extend({
|
|
284
284
|
type: z$1.literal("clickhouse"),
|
|
@@ -333,7 +333,11 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
|
|
|
333
333
|
commonIntegrationConfig.extend({
|
|
334
334
|
type: z$1.literal("redshift"),
|
|
335
335
|
metadata: databaseMetadataSchemasByType["redshift"],
|
|
336
|
-
federated_auth_method: z$1.enum([
|
|
336
|
+
federated_auth_method: z$1.enum([
|
|
337
|
+
"username-and-password",
|
|
338
|
+
"iam-role",
|
|
339
|
+
"individual-credentials"
|
|
340
|
+
]).optional().nullable()
|
|
337
341
|
}),
|
|
338
342
|
commonIntegrationConfig.extend({
|
|
339
343
|
type: z$1.literal("snowflake"),
|
|
@@ -342,7 +346,9 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
|
|
|
342
346
|
"okta",
|
|
343
347
|
"snowflake",
|
|
344
348
|
"azure",
|
|
345
|
-
"key-pair"
|
|
349
|
+
"key-pair",
|
|
350
|
+
"password",
|
|
351
|
+
"service-account-key-pair"
|
|
346
352
|
]).optional().nullable()
|
|
347
353
|
}),
|
|
348
354
|
commonIntegrationConfig.extend({
|
|
@@ -498,7 +504,7 @@ function getEnvVarForSqlCells(integration, params) {
|
|
|
498
504
|
* https://github.com/deepnote/deepnote-toolkit/blob/main/deepnote_toolkit/sql/sql_execution.py#L321
|
|
499
505
|
*/
|
|
500
506
|
function getSqlAlchemyInput(integration, params) {
|
|
501
|
-
if (integration.federated_auth_method) return null;
|
|
507
|
+
if (integration.federated_auth_method != null && isFederatedAuthMethod(integration.federated_auth_method)) return null;
|
|
502
508
|
switch (integration.type) {
|
|
503
509
|
case "alloydb":
|
|
504
510
|
case "pgsql": return getPostgresSqlAlchemyInput(integration.id, params.projectRootDirectory, integration.metadata);
|