@deepnote/database-integrations 1.4.2 → 1.4.3

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
@@ -299,12 +299,12 @@ const commonIntegrationConfig = z$1.object({
299
299
  const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
300
300
  commonIntegrationConfig.extend({
301
301
  type: z$1.literal("alloydb"),
302
- metadata: databaseMetadataSchemasByType["alloydb"],
302
+ metadata: databaseMetadataSchemasByType.alloydb,
303
303
  federated_auth_method: z$1.null().optional()
304
304
  }),
305
305
  commonIntegrationConfig.extend({
306
306
  type: z$1.literal("athena"),
307
- metadata: databaseMetadataSchemasByType["athena"],
307
+ metadata: databaseMetadataSchemasByType.athena,
308
308
  federated_auth_method: z$1.null().optional()
309
309
  }),
310
310
  commonIntegrationConfig.extend({
@@ -314,42 +314,42 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
314
314
  }),
315
315
  commonIntegrationConfig.extend({
316
316
  type: z$1.literal("clickhouse"),
317
- metadata: databaseMetadataSchemasByType["clickhouse"],
317
+ metadata: databaseMetadataSchemasByType.clickhouse,
318
318
  federated_auth_method: z$1.null().optional()
319
319
  }),
320
320
  commonIntegrationConfig.extend({
321
321
  type: z$1.literal("databricks"),
322
- metadata: databaseMetadataSchemasByType["databricks"],
322
+ metadata: databaseMetadataSchemasByType.databricks,
323
323
  federated_auth_method: z$1.null().optional()
324
324
  }),
325
325
  commonIntegrationConfig.extend({
326
326
  type: z$1.literal("dremio"),
327
- metadata: databaseMetadataSchemasByType["dremio"],
327
+ metadata: databaseMetadataSchemasByType.dremio,
328
328
  federated_auth_method: z$1.null().optional()
329
329
  }),
330
330
  commonIntegrationConfig.extend({
331
331
  type: z$1.literal("mariadb"),
332
- metadata: databaseMetadataSchemasByType["mariadb"],
332
+ metadata: databaseMetadataSchemasByType.mariadb,
333
333
  federated_auth_method: z$1.null().optional()
334
334
  }),
335
335
  commonIntegrationConfig.extend({
336
336
  type: z$1.literal("materialize"),
337
- metadata: databaseMetadataSchemasByType["materialize"],
337
+ metadata: databaseMetadataSchemasByType.materialize,
338
338
  federated_auth_method: z$1.null().optional()
339
339
  }),
340
340
  commonIntegrationConfig.extend({
341
341
  type: z$1.literal("mindsdb"),
342
- metadata: databaseMetadataSchemasByType["mindsdb"],
342
+ metadata: databaseMetadataSchemasByType.mindsdb,
343
343
  federated_auth_method: z$1.null().optional()
344
344
  }),
345
345
  commonIntegrationConfig.extend({
346
346
  type: z$1.literal("mongodb"),
347
- metadata: databaseMetadataSchemasByType["mongodb"],
347
+ metadata: databaseMetadataSchemasByType.mongodb,
348
348
  federated_auth_method: z$1.null().optional()
349
349
  }),
350
350
  commonIntegrationConfig.extend({
351
351
  type: z$1.literal("mysql"),
352
- metadata: databaseMetadataSchemasByType["mysql"],
352
+ metadata: databaseMetadataSchemasByType.mysql,
353
353
  federated_auth_method: z$1.null().optional()
354
354
  }),
355
355
  commonIntegrationConfig.extend({
@@ -359,12 +359,12 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
359
359
  }),
360
360
  commonIntegrationConfig.extend({
361
361
  type: z$1.literal("pgsql"),
362
- metadata: databaseMetadataSchemasByType["pgsql"],
362
+ metadata: databaseMetadataSchemasByType.pgsql,
363
363
  federated_auth_method: z$1.null().optional()
364
364
  }),
365
365
  commonIntegrationConfig.extend({
366
366
  type: z$1.literal("redshift"),
367
- metadata: databaseMetadataSchemasByType["redshift"],
367
+ metadata: databaseMetadataSchemasByType.redshift,
368
368
  federated_auth_method: z$1.enum([
369
369
  "username-and-password",
370
370
  "iam-role",
@@ -373,7 +373,7 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
373
373
  }),
374
374
  commonIntegrationConfig.extend({
375
375
  type: z$1.literal("snowflake"),
376
- metadata: databaseMetadataSchemasByType["snowflake"],
376
+ metadata: databaseMetadataSchemasByType.snowflake,
377
377
  federated_auth_method: z$1.enum([
378
378
  "okta",
379
379
  "snowflake",
@@ -385,7 +385,7 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
385
385
  }),
386
386
  commonIntegrationConfig.extend({
387
387
  type: z$1.literal("spanner"),
388
- metadata: databaseMetadataSchemasByType["spanner"],
388
+ metadata: databaseMetadataSchemasByType.spanner,
389
389
  federated_auth_method: z$1.null().optional()
390
390
  }),
391
391
  commonIntegrationConfig.extend({
@@ -395,7 +395,7 @@ const databaseIntegrationConfigSchema = z$1.discriminatedUnion("type", [
395
395
  }),
396
396
  commonIntegrationConfig.extend({
397
397
  type: z$1.literal("trino"),
398
- metadata: databaseMetadataSchemasByType["trino"],
398
+ metadata: databaseMetadataSchemasByType.trino,
399
399
  federated_auth_method: z$1.enum(["trino-oauth", "password"]).optional().nullable()
400
400
  })
401
401
  ]);
@@ -875,4 +875,61 @@ function isDatabaseIntegrationTypeWithSslSupport(type) {
875
875
  }
876
876
 
877
877
  //#endregion
878
- export { AwsAuthMethods, BigQueryAuthMethods, BigQueryServiceAccountParseError, DatabaseAuthMethods, SnowflakeAuthMethods, SpannerServiceAccountParseError, TrinoAuthMethods, databaseIntegrationConfigSchema, databaseIntegrationTypes, databaseIntegrationTypesWithSslSupport, databaseMetadataSchemasByType, federatedAuthMethods, getEnvironmentVariablesForIntegrations, getSnowflakeFederatedAuthSqlAlchemyInput, getSqlAlchemyInput, isDatabaseIntegrationType, isDatabaseIntegrationTypeWithSslSupport, isFederatedAuthMetadata, isFederatedAuthMethod, isSqlIntegrationType, sqlIntegrationTypes };
878
+ //#region src/secret-field-paths.ts
879
+ /**
880
+ * All secret fields for each integration type.
881
+ * This includes all possible secret fields regardless of auth method.
882
+ *
883
+ * Note: For integrations with multiple auth methods (e.g., snowflake, bigquery),
884
+ * this includes all secret fields from all auth variants.
885
+ */
886
+ const SECRET_PATHS = {
887
+ alloydb: ["password", "caCertificateText"],
888
+ mariadb: ["password", "caCertificateText"],
889
+ materialize: ["password", "caCertificateText"],
890
+ mindsdb: ["password", "caCertificateText"],
891
+ mysql: ["password", "caCertificateText"],
892
+ pgsql: ["password", "caCertificateText"],
893
+ "sql-server": ["password"],
894
+ clickhouse: ["password", "caCertificateText"],
895
+ databricks: ["token"],
896
+ dremio: ["token"],
897
+ athena: ["secret_access_key"],
898
+ spanner: ["service_account"],
899
+ mongodb: [
900
+ "password",
901
+ "connection_string",
902
+ "rawConnectionString",
903
+ "caCertificateText"
904
+ ],
905
+ "pandas-dataframe": [],
906
+ "big-query": ["service_account", "clientSecret"],
907
+ snowflake: [
908
+ "password",
909
+ "clientSecret",
910
+ "privateKey",
911
+ "privateKeyPassphrase"
912
+ ],
913
+ redshift: ["password", "caCertificateText"],
914
+ trino: [
915
+ "password",
916
+ "clientSecret",
917
+ "caCertificateText"
918
+ ]
919
+ };
920
+ /**
921
+ * Get the list of secret field paths for a given integration type.
922
+ *
923
+ * @param type - The integration type (e.g., 'pgsql', 'snowflake')
924
+ * @returns Array of field names that contain secrets
925
+ *
926
+ * @example
927
+ * getSecretFieldPaths('pgsql') // => ['password', 'caCertificateText']
928
+ * getSecretFieldPaths('snowflake') // => ['password', 'clientSecret', 'privateKey', 'privateKeyPassphrase']
929
+ */
930
+ function getSecretFieldPaths(type) {
931
+ return SECRET_PATHS[type] ?? [];
932
+ }
933
+
934
+ //#endregion
935
+ export { AwsAuthMethods, BigQueryAuthMethods, BigQueryServiceAccountParseError, DatabaseAuthMethods, SnowflakeAuthMethods, SpannerServiceAccountParseError, TrinoAuthMethods, databaseIntegrationConfigSchema, databaseIntegrationTypes, databaseIntegrationTypesWithSslSupport, databaseMetadataSchemasByType, federatedAuthMethods, getEnvironmentVariablesForIntegrations, getSecretFieldPaths, getSnowflakeFederatedAuthSqlAlchemyInput, getSqlAlchemyInput, isDatabaseIntegrationType, isDatabaseIntegrationTypeWithSslSupport, isFederatedAuthMetadata, isFederatedAuthMethod, isSqlIntegrationType, sqlIntegrationTypes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnote/database-integrations",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Deepnote database integration definitions",
5
5
  "keywords": [],
6
6
  "repository": {