@lightdash/common 0.2263.0 → 0.2263.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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/types/userWarehouseCredentials.d.ts +22 -2
- package/dist/cjs/types/userWarehouseCredentials.d.ts.map +1 -1
- package/dist/cjs/types/userWarehouseCredentials.js +14 -0
- package/dist/cjs/types/userWarehouseCredentials.js.map +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/types/userWarehouseCredentials.d.ts +22 -2
- package/dist/esm/types/userWarehouseCredentials.d.ts.map +1 -1
- package/dist/esm/types/userWarehouseCredentials.js +13 -1
- package/dist/esm/types/userWarehouseCredentials.js.map +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/types/userWarehouseCredentials.d.ts +22 -2
- package/dist/types/types/userWarehouseCredentials.d.ts.map +1 -1
- package/dist/types/types/userWarehouseCredentials.js +13 -1
- package/dist/types/types/userWarehouseCredentials.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SnowflakeAuthenticationType, WarehouseTypes, type CreateBigqueryCredentials, type CreateClickhouseCredentials, type CreateDatabricksCredentials, type CreatePostgresCredentials, type CreateRedshiftCredentials, type CreateSnowflakeCredentials, type CreateTrinoCredentials } from './projects';
|
|
2
3
|
export type UserWarehouseCredentials = {
|
|
3
4
|
uuid: string;
|
|
4
5
|
userUuid: string;
|
|
@@ -8,10 +9,29 @@ export type UserWarehouseCredentials = {
|
|
|
8
9
|
credentials: Pick<CreateRedshiftCredentials | CreatePostgresCredentials | CreateSnowflakeCredentials | CreateTrinoCredentials | CreateClickhouseCredentials, 'type' | 'user'> | Pick<CreateBigqueryCredentials, 'type'> | Pick<CreateDatabricksCredentials, 'type'>;
|
|
9
10
|
};
|
|
10
11
|
export type UserWarehouseCredentialsWithSecrets = Pick<UserWarehouseCredentials, 'uuid'> & {
|
|
11
|
-
credentials: Pick<CreateRedshiftCredentials, 'type' | 'user' | 'password'> | Pick<CreatePostgresCredentials, 'type' | 'user' | 'password'> | Pick<CreateSnowflakeCredentials, 'type' | 'user' | 'password' | 'authenticationType' | '
|
|
12
|
+
credentials: Pick<CreateRedshiftCredentials, 'type' | 'user' | 'password'> | Pick<CreatePostgresCredentials, 'type' | 'user' | 'password'> | Pick<CreateSnowflakeCredentials, 'type' | 'user' | 'password' | 'authenticationType' | 'refreshToken'> | Pick<CreateTrinoCredentials, 'type' | 'user' | 'password'> | Pick<CreateClickhouseCredentials, 'type' | 'user' | 'password'> | Pick<CreateBigqueryCredentials, 'type' | 'keyfileContents' | 'authenticationType'> | (Pick<CreateDatabricksCredentials, 'type' | 'personalAccessToken' | 'authenticationType' | 'refreshToken'> & Partial<Pick<CreateDatabricksCredentials, 'database' | 'serverHostName' | 'httpPath'>>);
|
|
12
13
|
};
|
|
13
14
|
export type UpsertUserWarehouseCredentials = {
|
|
14
15
|
name: string;
|
|
15
16
|
credentials: UserWarehouseCredentialsWithSecrets['credentials'];
|
|
16
17
|
};
|
|
18
|
+
export declare const snowflakeSsoUserCredentialsSchema: z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<WarehouseTypes.SNOWFLAKE>;
|
|
20
|
+
user: z.ZodOptional<z.ZodString>;
|
|
21
|
+
password: z.ZodOptional<z.ZodString>;
|
|
22
|
+
authenticationType: z.ZodLiteral<SnowflakeAuthenticationType.SSO>;
|
|
23
|
+
refreshToken: z.ZodString;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
type: WarehouseTypes.SNOWFLAKE;
|
|
26
|
+
refreshToken: string;
|
|
27
|
+
authenticationType: SnowflakeAuthenticationType.SSO;
|
|
28
|
+
user?: string | undefined;
|
|
29
|
+
password?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
type: WarehouseTypes.SNOWFLAKE;
|
|
32
|
+
refreshToken: string;
|
|
33
|
+
authenticationType: SnowflakeAuthenticationType.SSO;
|
|
34
|
+
user?: string | undefined;
|
|
35
|
+
password?: string | undefined;
|
|
36
|
+
}>;
|
|
17
37
|
//# sourceMappingURL=userWarehouseCredentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userWarehouseCredentials.d.ts","sourceRoot":"","sources":["../../../src/types/userWarehouseCredentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC9B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,EACL,IAAI,CACE,yBAAyB,GACzB,yBAAyB,GACzB,0BAA0B,GAC1B,sBAAsB,GACtB,2BAA2B,EAC7B,MAAM,GAAG,MAAM,CAClB,GACD,IAAI,CAAC,yBAAyB,EAAE,MAAM,CAAC,GACvC,IAAI,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG,IAAI,CAClD,wBAAwB,EACxB,MAAM,CACT,GAAG;IACA,WAAW,EACL,IAAI,CAAC,yBAAyB,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,GAC7D,IAAI,CAAC,yBAAyB,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,GAC7D,IAAI,CACA,0BAA0B,
|
|
1
|
+
{"version":3,"file":"userWarehouseCredentials.d.ts","sourceRoot":"","sources":["../../../src/types/userWarehouseCredentials.ts"],"names":[],"m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B,EACzB,MAAM,GACN,qBAAqB,GACrB,oBAAoB,GACpB,cAAc,CACnB,GACG,OAAO,CACH,IAAI,CACA,2BAA2B,EAC3B,UAAU,GAAG,gBAAgB,GAAG,UAAU,CAC7C,CACJ,CAAC,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,mCAAmC,CAAC,aAAa,CAAC,CAAC;CACnE,CAAC;AAIF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;EAQjC,CAAC"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SnowflakeAuthenticationType, WarehouseTypes, } from './projects';
|
|
3
|
+
// Zod schema for validating Snowflake SSO user warehouse credentials
|
|
4
|
+
// Requires refreshToken and disallows token field
|
|
5
|
+
export const snowflakeSsoUserCredentialsSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
type: z.literal(WarehouseTypes.SNOWFLAKE),
|
|
8
|
+
user: z.string().optional(),
|
|
9
|
+
password: z.string().optional(),
|
|
10
|
+
authenticationType: z.literal(SnowflakeAuthenticationType.SSO),
|
|
11
|
+
refreshToken: z.string(),
|
|
12
|
+
})
|
|
13
|
+
.strict();
|
|
2
14
|
//# sourceMappingURL=userWarehouseCredentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userWarehouseCredentials.js","sourceRoot":"","sources":["../../../src/types/userWarehouseCredentials.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"userWarehouseCredentials.js","sourceRoot":"","sources":["../../../src/types/userWarehouseCredentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,2BAA2B,EAC3B,cAAc,GAQjB,MAAM,YAAY,CAAC;AA8DpB,qEAAqE;AACrE,kDAAkD;AAClD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC7C,MAAM,CAAC;IACJ,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,GAAG,CAAC;IAC9D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC;KACD,MAAM,EAAE,CAAC"}
|