@go-mondo/identity-sdk 0.0.2-beta.20 → 0.0.2-beta.21
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/.release-please-manifest.json +1 -1
- package/.tsbuildinfo/cjs.json +1 -1
- package/.tsbuildinfo/esm.json +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/cjs/authentication/strategies/schema/schema.d.ts +13 -13
- package/dist/cjs/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/schema.js +21 -4
- package/dist/cjs/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/email.js +1 -1
- package/dist/cjs/authentication/strategies/schema/types/password.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/password.js +1 -1
- package/dist/cjs/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/cjs/authentication/strategies/schema/types/totp.js +1 -1
- package/dist/cjs/oauth/token/schema/schema.d.ts +4 -4
- package/dist/cjs/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/cjs/oauth/token/schema/schema.js +6 -1
- package/dist/esm/authentication/strategies/schema/schema.d.ts +13 -13
- package/dist/esm/authentication/strategies/schema/schema.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/schema.js +21 -4
- package/dist/esm/authentication/strategies/schema/types/email.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/email.js +2 -2
- package/dist/esm/authentication/strategies/schema/types/password.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/password.js +2 -2
- package/dist/esm/authentication/strategies/schema/types/totp.d.ts.map +1 -1
- package/dist/esm/authentication/strategies/schema/types/totp.js +2 -2
- package/dist/esm/oauth/token/schema/schema.d.ts +4 -4
- package/dist/esm/oauth/token/schema/schema.d.ts.map +1 -1
- package/dist/esm/oauth/token/schema/schema.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-beta.21](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.20...identity-sdk-v0.0.2-beta.21) (2025-08-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* unions ([3537692](https://github.com/go-mondo/identity-node-sdk/commit/35376929279cfd089d145f0face592103644a7b3))
|
|
9
|
+
|
|
3
10
|
## [0.0.2-beta.20](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.19...identity-sdk-v0.0.2-beta.20) (2025-08-29)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Union(s)
|
|
4
4
|
*/
|
|
5
|
-
export declare const InsertStrategyPayloadSchema: z.
|
|
5
|
+
export declare const InsertStrategyPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
6
|
settings: z.ZodOptional<z.ZodObject<{
|
|
7
7
|
passwordPolicy: z.ZodObject<{
|
|
8
8
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -30,7 +30,7 @@ export declare const InsertStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
30
30
|
disabled: "disabled";
|
|
31
31
|
}>>;
|
|
32
32
|
type: z.ZodLiteral<"email">;
|
|
33
|
-
}, z.core.$strip
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
34
|
settings: z.ZodOptional<z.ZodObject<{
|
|
35
35
|
digits: z.ZodDefault<z.ZodNumber>;
|
|
36
36
|
period: z.ZodDefault<z.ZodNumber>;
|
|
@@ -46,10 +46,10 @@ export declare const InsertStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
46
46
|
disabled: "disabled";
|
|
47
47
|
}>>;
|
|
48
48
|
type: z.ZodLiteral<"totp">;
|
|
49
|
-
}, z.core.$strip>]>;
|
|
49
|
+
}, z.core.$strip>], "type">;
|
|
50
50
|
export type InsertStrategyInput = z.input<typeof InsertStrategyPayloadSchema>;
|
|
51
51
|
export type InsertStrategyPayload = z.output<typeof InsertStrategyPayloadSchema>;
|
|
52
|
-
export declare const UpdateStrategyPayloadSchema: z.
|
|
52
|
+
export declare const UpdateStrategyPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
53
|
settings: z.ZodOptional<z.ZodObject<{
|
|
54
54
|
passwordPolicy: z.ZodObject<{
|
|
55
55
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -75,7 +75,7 @@ export declare const UpdateStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
75
75
|
disabled: "disabled";
|
|
76
76
|
}>>;
|
|
77
77
|
type: z.ZodLiteral<"email">;
|
|
78
|
-
}, z.core.$strip
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
79
|
settings: z.ZodOptional<z.ZodObject<{
|
|
80
80
|
digits: z.ZodDefault<z.ZodNumber>;
|
|
81
81
|
period: z.ZodDefault<z.ZodNumber>;
|
|
@@ -90,10 +90,10 @@ export declare const UpdateStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
90
90
|
disabled: "disabled";
|
|
91
91
|
}>>;
|
|
92
92
|
type: z.ZodLiteral<"totp">;
|
|
93
|
-
}, z.core.$strip>]>;
|
|
93
|
+
}, z.core.$strip>], "type">;
|
|
94
94
|
export type UpdateStrategyInput = z.input<typeof UpdateStrategyPayloadSchema>;
|
|
95
95
|
export type UpdateStrategyPayload = z.output<typeof UpdateStrategyPayloadSchema>;
|
|
96
|
-
export declare const StrategyPayloadSchema: z.
|
|
96
|
+
export declare const StrategyPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
97
|
settings: z.ZodObject<{
|
|
98
98
|
passwordPolicy: z.ZodObject<{
|
|
99
99
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -115,7 +115,7 @@ export declare const StrategyPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
115
115
|
disabled: "disabled";
|
|
116
116
|
}>;
|
|
117
117
|
label: z.ZodString;
|
|
118
|
-
}, z.core.$strip>, z.
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
119
119
|
type: z.ZodLiteral<"email">;
|
|
120
120
|
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
121
121
|
deactivatedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
@@ -146,9 +146,9 @@ export declare const StrategyPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
146
146
|
disabled: "disabled";
|
|
147
147
|
}>;
|
|
148
148
|
label: z.ZodString;
|
|
149
|
-
}, z.core.$strip>]
|
|
149
|
+
}, z.core.$strip>], "type">;
|
|
150
150
|
export type StrategyPayload = z.input<typeof StrategyPayloadSchema>;
|
|
151
|
-
export declare const StrategySchema: z.
|
|
151
|
+
export declare const StrategySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
152
152
|
settings: z.ZodObject<{
|
|
153
153
|
passwordPolicy: z.ZodObject<{
|
|
154
154
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -184,7 +184,7 @@ export declare const StrategySchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
184
184
|
disabled: "disabled";
|
|
185
185
|
}>>;
|
|
186
186
|
label: z.ZodString;
|
|
187
|
-
}, z.core.$strip
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
188
|
settings: z.ZodObject<{
|
|
189
189
|
digits: z.ZodDefault<z.ZodNumber>;
|
|
190
190
|
period: z.ZodDefault<z.ZodNumber>;
|
|
@@ -204,7 +204,7 @@ export declare const StrategySchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
204
204
|
disabled: "disabled";
|
|
205
205
|
}>>;
|
|
206
206
|
label: z.ZodString;
|
|
207
|
-
}, z.core.$strip>]>;
|
|
207
|
+
}, z.core.$strip>], "type">;
|
|
208
208
|
export type StrategyProperties = z.input<typeof StrategySchema>;
|
|
209
209
|
export type Strategy = z.output<typeof StrategySchema>;
|
|
210
210
|
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, type AnyStrategyStatus, type AnyStrategyType, type StrategyId, type StrategyIdProperty, } from './base.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/strategies/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/strategies/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAItC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAItC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAIzB,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|
|
@@ -15,16 +15,33 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.StrategyType = exports.StrategyStatusSchema = exports.StrategyStatus = exports.StrategyLabelSchema = exports.StrategyIdSchema = exports.StrategyIdPropertySchema = exports.BaseUpdateStrategyPayloadSchema = exports.BaseStrategyPayloadSchema = exports.BaseInsertStrategyPayloadSchema = exports.StrategySchema = exports.StrategyPayloadSchema = exports.UpdateStrategyPayloadSchema = exports.InsertStrategyPayloadSchema = void 0;
|
|
18
|
+
const zod_1 = require("zod");
|
|
18
19
|
const email_js_1 = require("./types/email.js");
|
|
19
20
|
const password_js_1 = require("./types/password.js");
|
|
20
21
|
const totp_js_1 = require("./types/totp.js");
|
|
21
22
|
/**
|
|
22
23
|
* Union(s)
|
|
23
24
|
*/
|
|
24
|
-
exports.InsertStrategyPayloadSchema =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
exports.InsertStrategyPayloadSchema = zod_1.z.discriminatedUnion('type', [
|
|
26
|
+
password_js_1.InsertPasswordStrategyPayloadSchema,
|
|
27
|
+
email_js_1.InsertEmailStrategyPayloadSchema,
|
|
28
|
+
totp_js_1.InsertTOTPStrategyPayloadSchema,
|
|
29
|
+
]);
|
|
30
|
+
exports.UpdateStrategyPayloadSchema = zod_1.z.discriminatedUnion('type', [
|
|
31
|
+
password_js_1.UpdatePasswordStrategyPayloadSchema,
|
|
32
|
+
email_js_1.UpdateEmailStrategyPayloadSchema,
|
|
33
|
+
totp_js_1.UpdateTOTPStrategyPayloadSchema,
|
|
34
|
+
]);
|
|
35
|
+
exports.StrategyPayloadSchema = zod_1.z.discriminatedUnion('type', [
|
|
36
|
+
password_js_1.PasswordStrategyPayloadSchema,
|
|
37
|
+
email_js_1.EmailStrategyPayloadSchema,
|
|
38
|
+
totp_js_1.TOTPStrategyPayloadSchema,
|
|
39
|
+
]);
|
|
40
|
+
exports.StrategySchema = zod_1.z.discriminatedUnion('type', [
|
|
41
|
+
password_js_1.PasswordStrategySchema,
|
|
42
|
+
email_js_1.EmailStrategySchema,
|
|
43
|
+
totp_js_1.TOTPStrategySchema,
|
|
44
|
+
]);
|
|
28
45
|
var base_js_1 = require("./base.js");
|
|
29
46
|
Object.defineProperty(exports, "BaseInsertStrategyPayloadSchema", { enumerable: true, get: function () { return base_js_1.BaseInsertStrategyPayloadSchema; } });
|
|
30
47
|
Object.defineProperty(exports, "BaseStrategyPayloadSchema", { enumerable: true, get: function () { return base_js_1.BaseStrategyPayloadSchema; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAG9B,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;iBAGrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,eAAO,MAAM,gCAAgC;;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.SendEmailVerificationCodeSchema = exports.VerifyEmailSchema = exports.Up
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_js_1 = require("../base.js");
|
|
6
6
|
const TypeSchema = zod_1.z.object({
|
|
7
|
-
type: zod_1.z.literal(
|
|
7
|
+
type: zod_1.z.literal(base_js_1.StrategyType.EMAIL),
|
|
8
8
|
});
|
|
9
9
|
exports.EmailStrategySchema = zod_1.z.object({
|
|
10
10
|
...base_js_1.BaseStrategySchema.shape,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAMF,eAAO,MAAM,oBAAoB;;;;;;;iBAO/B,CAAC;AAMH,eAAO,MAAM,sCAAsC;;;;;;;;;;;iBAEjD,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;iBAIxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBAI9C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,mCAAmC,CAC3C,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;iBAI9C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,mCAAmC,CAC3C,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;iBAI/B,CAAC"}
|
|
@@ -13,7 +13,7 @@ exports.PasswordPolicyDefaults = {
|
|
|
13
13
|
minimumSpecial: 1,
|
|
14
14
|
};
|
|
15
15
|
const TypeSchema = zod_1.z.object({
|
|
16
|
-
type: zod_1.z.literal(
|
|
16
|
+
type: zod_1.z.literal(base_js_1.StrategyType.PASSWORD),
|
|
17
17
|
});
|
|
18
18
|
exports.PasswordPolicySchema = zod_1.z.object({
|
|
19
19
|
minimumLength: zod_1.z.number().default(exports.PasswordPolicyDefaults.minimumLength),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"totp.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/totp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"totp.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/totp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,cAAc,KAAK,CAAC;AAMjC,eAAO,MAAM,aAAa;;;;;;;;;;;CAWzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAKrD,eAAO,MAAM,0BAA0B;;;;;;iBA0BrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,eAAO,MAAM,kCAAkC;;;;;;;;iBAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CACjD,OAAO,kCAAkC,CAC1C,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE/D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;iBAIpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE7E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;iBAI1C,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC9C,OAAO,+BAA+B,CACvC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;iBAI1C,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC9C,OAAO,+BAA+B,CACvC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC"}
|
|
@@ -6,7 +6,7 @@ const base_js_1 = require("../base.js");
|
|
|
6
6
|
exports.DEFAULT_DIGITS = 6;
|
|
7
7
|
exports.DEFAULT_PERIOD = 30;
|
|
8
8
|
const TypeSchema = zod_1.z.object({
|
|
9
|
-
type: zod_1.z.literal(
|
|
9
|
+
type: zod_1.z.literal(base_js_1.StrategyType.TOTP),
|
|
10
10
|
});
|
|
11
11
|
exports.TOTPAlgorithm = {
|
|
12
12
|
DEFAULT: 'SHA256',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export * from './grants/authorization-code.js';
|
|
3
3
|
export * from './grants/client-credentials.js';
|
|
4
4
|
export * from './grants/refresh-token.js';
|
|
5
5
|
/**
|
|
6
6
|
* Union(s)
|
|
7
7
|
*/
|
|
8
|
-
export declare const Schema: z.
|
|
8
|
+
export declare const Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
9
|
code_verifier: z.ZodOptional<z.ZodString>;
|
|
10
10
|
grant_type: z.ZodEnum<{
|
|
11
11
|
authorization_code: "authorization_code";
|
|
@@ -22,7 +22,7 @@ export declare const Schema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
22
22
|
grant_type: z.ZodEnum<{
|
|
23
23
|
client_credentials: "client_credentials";
|
|
24
24
|
}>;
|
|
25
|
-
}, z.core.$strip
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
26
|
grant_type: z.ZodEnum<{
|
|
27
27
|
refresh_token: "refresh_token";
|
|
28
28
|
}>;
|
|
@@ -30,6 +30,6 @@ export declare const Schema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
30
30
|
scope: z.ZodOptional<z.ZodString>;
|
|
31
31
|
client_id: z.ZodString;
|
|
32
32
|
client_secret: z.ZodString;
|
|
33
|
-
}, z.core.$strip>]>;
|
|
33
|
+
}, z.core.$strip>], "grant_type">;
|
|
34
34
|
export type Payload = z.output<typeof Schema>;
|
|
35
35
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;iCAIjB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Schema = void 0;
|
|
18
|
+
const zod_1 = require("zod");
|
|
18
19
|
const authorization_code_js_1 = require("./grants/authorization-code.js");
|
|
19
20
|
const client_credentials_js_1 = require("./grants/client-credentials.js");
|
|
20
21
|
const refresh_token_js_1 = require("./grants/refresh-token.js");
|
|
@@ -24,4 +25,8 @@ __exportStar(require("./grants/refresh-token.js"), exports);
|
|
|
24
25
|
/**
|
|
25
26
|
* Union(s)
|
|
26
27
|
*/
|
|
27
|
-
exports.Schema =
|
|
28
|
+
exports.Schema = zod_1.z.discriminatedUnion('grant_type', [
|
|
29
|
+
authorization_code_js_1.AuthorizationCodeSchema,
|
|
30
|
+
client_credentials_js_1.ClientCredentialsSchema,
|
|
31
|
+
refresh_token_js_1.RefreshTokenSchema,
|
|
32
|
+
]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Union(s)
|
|
4
4
|
*/
|
|
5
|
-
export declare const InsertStrategyPayloadSchema: z.
|
|
5
|
+
export declare const InsertStrategyPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
6
|
settings: z.ZodOptional<z.ZodObject<{
|
|
7
7
|
passwordPolicy: z.ZodObject<{
|
|
8
8
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -30,7 +30,7 @@ export declare const InsertStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
30
30
|
disabled: "disabled";
|
|
31
31
|
}>>;
|
|
32
32
|
type: z.ZodLiteral<"email">;
|
|
33
|
-
}, z.core.$strip
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
34
|
settings: z.ZodOptional<z.ZodObject<{
|
|
35
35
|
digits: z.ZodDefault<z.ZodNumber>;
|
|
36
36
|
period: z.ZodDefault<z.ZodNumber>;
|
|
@@ -46,10 +46,10 @@ export declare const InsertStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
46
46
|
disabled: "disabled";
|
|
47
47
|
}>>;
|
|
48
48
|
type: z.ZodLiteral<"totp">;
|
|
49
|
-
}, z.core.$strip>]>;
|
|
49
|
+
}, z.core.$strip>], "type">;
|
|
50
50
|
export type InsertStrategyInput = z.input<typeof InsertStrategyPayloadSchema>;
|
|
51
51
|
export type InsertStrategyPayload = z.output<typeof InsertStrategyPayloadSchema>;
|
|
52
|
-
export declare const UpdateStrategyPayloadSchema: z.
|
|
52
|
+
export declare const UpdateStrategyPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
53
|
settings: z.ZodOptional<z.ZodObject<{
|
|
54
54
|
passwordPolicy: z.ZodObject<{
|
|
55
55
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -75,7 +75,7 @@ export declare const UpdateStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
75
75
|
disabled: "disabled";
|
|
76
76
|
}>>;
|
|
77
77
|
type: z.ZodLiteral<"email">;
|
|
78
|
-
}, z.core.$strip
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
79
|
settings: z.ZodOptional<z.ZodObject<{
|
|
80
80
|
digits: z.ZodDefault<z.ZodNumber>;
|
|
81
81
|
period: z.ZodDefault<z.ZodNumber>;
|
|
@@ -90,10 +90,10 @@ export declare const UpdateStrategyPayloadSchema: z.ZodUnion<[z.ZodUnion<[z.ZodO
|
|
|
90
90
|
disabled: "disabled";
|
|
91
91
|
}>>;
|
|
92
92
|
type: z.ZodLiteral<"totp">;
|
|
93
|
-
}, z.core.$strip>]>;
|
|
93
|
+
}, z.core.$strip>], "type">;
|
|
94
94
|
export type UpdateStrategyInput = z.input<typeof UpdateStrategyPayloadSchema>;
|
|
95
95
|
export type UpdateStrategyPayload = z.output<typeof UpdateStrategyPayloadSchema>;
|
|
96
|
-
export declare const StrategyPayloadSchema: z.
|
|
96
|
+
export declare const StrategyPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
97
|
settings: z.ZodObject<{
|
|
98
98
|
passwordPolicy: z.ZodObject<{
|
|
99
99
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -115,7 +115,7 @@ export declare const StrategyPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
115
115
|
disabled: "disabled";
|
|
116
116
|
}>;
|
|
117
117
|
label: z.ZodString;
|
|
118
|
-
}, z.core.$strip>, z.
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
119
119
|
type: z.ZodLiteral<"email">;
|
|
120
120
|
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodNull, z.ZodCustom<Map<string, string | number | boolean>, Map<string, string | number | boolean>>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>]>, z.ZodTransform<Record<string, string | number | boolean> | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
|
|
121
121
|
deactivatedAt: z.ZodOptional<z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>, z.ZodTransform<string | undefined, Date | undefined>>>;
|
|
@@ -146,9 +146,9 @@ export declare const StrategyPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
146
146
|
disabled: "disabled";
|
|
147
147
|
}>;
|
|
148
148
|
label: z.ZodString;
|
|
149
|
-
}, z.core.$strip>]
|
|
149
|
+
}, z.core.$strip>], "type">;
|
|
150
150
|
export type StrategyPayload = z.input<typeof StrategyPayloadSchema>;
|
|
151
|
-
export declare const StrategySchema: z.
|
|
151
|
+
export declare const StrategySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
152
152
|
settings: z.ZodObject<{
|
|
153
153
|
passwordPolicy: z.ZodObject<{
|
|
154
154
|
minimumLength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -184,7 +184,7 @@ export declare const StrategySchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
184
184
|
disabled: "disabled";
|
|
185
185
|
}>>;
|
|
186
186
|
label: z.ZodString;
|
|
187
|
-
}, z.core.$strip
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
188
|
settings: z.ZodObject<{
|
|
189
189
|
digits: z.ZodDefault<z.ZodNumber>;
|
|
190
190
|
period: z.ZodDefault<z.ZodNumber>;
|
|
@@ -204,7 +204,7 @@ export declare const StrategySchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
204
204
|
disabled: "disabled";
|
|
205
205
|
}>>;
|
|
206
206
|
label: z.ZodString;
|
|
207
|
-
}, z.core.$strip>]>;
|
|
207
|
+
}, z.core.$strip>], "type">;
|
|
208
208
|
export type StrategyProperties = z.input<typeof StrategySchema>;
|
|
209
209
|
export type Strategy = z.output<typeof StrategySchema>;
|
|
210
210
|
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, type AnyStrategyStatus, type AnyStrategyType, type StrategyId, type StrategyIdProperty, } from './base.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/strategies/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/authentication/strategies/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAItC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAItC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAIzB,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvD,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,WAAW,CAAC;AACnB,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,13 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { EmailStrategyPayloadSchema, EmailStrategySchema, InsertEmailStrategyPayloadSchema, UpdateEmailStrategyPayloadSchema, } from './types/email.js';
|
|
2
3
|
import { InsertPasswordStrategyPayloadSchema, PasswordStrategyPayloadSchema, PasswordStrategySchema, UpdatePasswordStrategyPayloadSchema, } from './types/password.js';
|
|
3
4
|
import { InsertTOTPStrategyPayloadSchema, TOTPStrategyPayloadSchema, TOTPStrategySchema, UpdateTOTPStrategyPayloadSchema, } from './types/totp.js';
|
|
4
5
|
/**
|
|
5
6
|
* Union(s)
|
|
6
7
|
*/
|
|
7
|
-
export const InsertStrategyPayloadSchema =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export const InsertStrategyPayloadSchema = z.discriminatedUnion('type', [
|
|
9
|
+
InsertPasswordStrategyPayloadSchema,
|
|
10
|
+
InsertEmailStrategyPayloadSchema,
|
|
11
|
+
InsertTOTPStrategyPayloadSchema,
|
|
12
|
+
]);
|
|
13
|
+
export const UpdateStrategyPayloadSchema = z.discriminatedUnion('type', [
|
|
14
|
+
UpdatePasswordStrategyPayloadSchema,
|
|
15
|
+
UpdateEmailStrategyPayloadSchema,
|
|
16
|
+
UpdateTOTPStrategyPayloadSchema,
|
|
17
|
+
]);
|
|
18
|
+
export const StrategyPayloadSchema = z.discriminatedUnion('type', [
|
|
19
|
+
PasswordStrategyPayloadSchema,
|
|
20
|
+
EmailStrategyPayloadSchema,
|
|
21
|
+
TOTPStrategyPayloadSchema,
|
|
22
|
+
]);
|
|
23
|
+
export const StrategySchema = z.discriminatedUnion('type', [
|
|
24
|
+
PasswordStrategySchema,
|
|
25
|
+
EmailStrategySchema,
|
|
26
|
+
TOTPStrategySchema,
|
|
27
|
+
]);
|
|
11
28
|
export { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseUpdateStrategyPayloadSchema, StrategyIdPropertySchema, StrategyIdSchema, StrategyLabelSchema, StrategyStatus, StrategyStatusSchema, StrategyType, } from './base.js';
|
|
12
29
|
export * from './types/email.js';
|
|
13
30
|
export * from './types/password.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAG9B,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;iBAGrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,eAAO,MAAM,gCAAgC;;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
2
|
+
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, StrategyType, } from '../base.js';
|
|
3
3
|
const TypeSchema = z.object({
|
|
4
|
-
type: z.literal(
|
|
4
|
+
type: z.literal(StrategyType.EMAIL),
|
|
5
5
|
});
|
|
6
6
|
export const EmailStrategySchema = z.object({
|
|
7
7
|
...BaseStrategySchema.shape,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAMF,eAAO,MAAM,oBAAoB;;;;;;;iBAO/B,CAAC;AAMH,eAAO,MAAM,sCAAsC;;;;;;;;;;;iBAEjD,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;iBAIxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAC5C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBAI9C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,mCAAmC,CAC3C,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;iBAI9C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,mCAAmC,CAC3C,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;iBAI/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { IdentityIdentifierSchema } from '../../../../identity/schema.js';
|
|
3
|
-
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
3
|
+
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, StrategyType, } from '../base.js';
|
|
4
4
|
export const PasswordPolicyDefaults = {
|
|
5
5
|
minimumLength: 8,
|
|
6
6
|
maximumLength: 36,
|
|
@@ -10,7 +10,7 @@ export const PasswordPolicyDefaults = {
|
|
|
10
10
|
minimumSpecial: 1,
|
|
11
11
|
};
|
|
12
12
|
const TypeSchema = z.object({
|
|
13
|
-
type: z.literal(
|
|
13
|
+
type: z.literal(StrategyType.PASSWORD),
|
|
14
14
|
});
|
|
15
15
|
export const PasswordPolicySchema = z.object({
|
|
16
16
|
minimumLength: z.number().default(PasswordPolicyDefaults.minimumLength),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"totp.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/totp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"totp.d.ts","sourceRoot":"","sources":["../../../../../../src/authentication/strategies/schema/types/totp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,cAAc,KAAK,CAAC;AAMjC,eAAO,MAAM,aAAa;;;;;;;;;;;CAWzB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAKrD,eAAO,MAAM,0BAA0B;;;;;;iBA0BrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,eAAO,MAAM,kCAAkC;;;;;;;;iBAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CACjD,OAAO,kCAAkC,CAC1C,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;iBAI7B,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE/D,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;iBAIpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE7E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;iBAI1C,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC9C,OAAO,+BAA+B,CACvC,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;iBAI1C,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAC9C,OAAO,+BAA+B,CACvC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, } from '../base.js';
|
|
2
|
+
import { BaseInsertStrategyPayloadSchema, BaseStrategyPayloadSchema, BaseStrategySchema, BaseUpdateStrategyPayloadSchema, StrategyType, } from '../base.js';
|
|
3
3
|
export const DEFAULT_DIGITS = 6;
|
|
4
4
|
export const DEFAULT_PERIOD = 30;
|
|
5
5
|
const TypeSchema = z.object({
|
|
6
|
-
type: z.literal(
|
|
6
|
+
type: z.literal(StrategyType.TOTP),
|
|
7
7
|
});
|
|
8
8
|
export const TOTPAlgorithm = {
|
|
9
9
|
DEFAULT: 'SHA256',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export * from './grants/authorization-code.js';
|
|
3
3
|
export * from './grants/client-credentials.js';
|
|
4
4
|
export * from './grants/refresh-token.js';
|
|
5
5
|
/**
|
|
6
6
|
* Union(s)
|
|
7
7
|
*/
|
|
8
|
-
export declare const Schema: z.
|
|
8
|
+
export declare const Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
9
|
code_verifier: z.ZodOptional<z.ZodString>;
|
|
10
10
|
grant_type: z.ZodEnum<{
|
|
11
11
|
authorization_code: "authorization_code";
|
|
@@ -22,7 +22,7 @@ export declare const Schema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
22
22
|
grant_type: z.ZodEnum<{
|
|
23
23
|
client_credentials: "client_credentials";
|
|
24
24
|
}>;
|
|
25
|
-
}, z.core.$strip
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
26
|
grant_type: z.ZodEnum<{
|
|
27
27
|
refresh_token: "refresh_token";
|
|
28
28
|
}>;
|
|
@@ -30,6 +30,6 @@ export declare const Schema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
|
30
30
|
scope: z.ZodOptional<z.ZodString>;
|
|
31
31
|
client_id: z.ZodString;
|
|
32
32
|
client_secret: z.ZodString;
|
|
33
|
-
}, z.core.$strip>]>;
|
|
33
|
+
}, z.core.$strip>], "grant_type">;
|
|
34
34
|
export type Payload = z.output<typeof Schema>;
|
|
35
35
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/oauth/token/schema/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;iCAIjB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { AuthorizationCodeSchema } from './grants/authorization-code.js';
|
|
2
3
|
import { ClientCredentialsSchema } from './grants/client-credentials.js';
|
|
3
4
|
import { RefreshTokenSchema } from './grants/refresh-token.js';
|
|
@@ -7,4 +8,8 @@ export * from './grants/refresh-token.js';
|
|
|
7
8
|
/**
|
|
8
9
|
* Union(s)
|
|
9
10
|
*/
|
|
10
|
-
export const Schema =
|
|
11
|
+
export const Schema = z.discriminatedUnion('grant_type', [
|
|
12
|
+
AuthorizationCodeSchema,
|
|
13
|
+
ClientCredentialsSchema,
|
|
14
|
+
RefreshTokenSchema,
|
|
15
|
+
]);
|