@go-mondo/identity-sdk 0.0.2-beta.21 → 0.0.2-beta.22
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/sessions/schema.d.ts +1 -3
- package/dist/cjs/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/cjs/authentication/sessions/schema.js +13 -6
- package/dist/esm/authentication/sessions/schema.d.ts +1 -3
- package/dist/esm/authentication/sessions/schema.d.ts.map +1 -1
- package/dist/esm/authentication/sessions/schema.js +12 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-beta.22](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.21...identity-sdk-v0.0.2-beta.22) (2025-08-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* session set ([c58f7a2](https://github.com/go-mondo/identity-node-sdk/commit/c58f7a21b10f88d205fca5bf2b3426ea642ea6a5))
|
|
9
|
+
|
|
3
10
|
## [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
11
|
|
|
5
12
|
|
|
@@ -27,12 +27,11 @@ export declare const SessionAuthenticationFactorSchema: z.ZodObject<{
|
|
|
27
27
|
state: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
export type SessionAuthenticationFactor = z.output<typeof SessionAuthenticationFactorSchema>;
|
|
30
|
-
export declare const SessionAuthenticationFactorHistorySchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>;
|
|
31
|
-
export type SessionAuthenticationFactorHistory = z.output<typeof SessionAuthenticationFactorHistorySchema>;
|
|
32
30
|
export declare const SessionSchema: z.ZodObject<{
|
|
33
31
|
metadata: 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<Map<string, string | number | boolean>, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>;
|
|
34
32
|
deactivatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
35
33
|
deletedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
34
|
+
factorHistory: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | undefined, Set<string> | string[] | undefined>>>;
|
|
36
35
|
redirectTo: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<URL, URL>]>, z.ZodTransform<string | URL, string | URL>>>;
|
|
37
36
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
38
37
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
@@ -55,7 +54,6 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
55
54
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
55
|
state: z.ZodOptional<z.ZodString>;
|
|
57
56
|
}, z.core.$strip>>, z.ZodUndefined]>>;
|
|
58
|
-
factorHistory: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>>;
|
|
59
57
|
id: z.ZodString;
|
|
60
58
|
}, z.core.$strip>;
|
|
61
59
|
export type SessionProperties = z.input<typeof SessionSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,aAAuC,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,mBAAmB;;;;EAIrB,CAAC;AAEZ,eAAO,MAAM,iCAAiC;;;;;;;;;iBAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,eAAe,aAAuC,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,mBAAmB;;;;EAIrB,CAAC;AAEZ,eAAO,MAAM,iCAAiC;;;;;;;;;iBAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC;AA0CF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;iBAW5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SessionAssociationReferenceSchema = exports.SessionPayloadSchema = exports.SessionSchema = exports.
|
|
3
|
+
exports.SessionAssociationReferenceSchema = exports.SessionPayloadSchema = exports.SessionSchema = exports.SessionAuthenticationFactorSchema = exports.SessionStatusSchema = exports.SessionIdPropertySchema = exports.SessionIdSchema = exports.SessionStatus = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const dates_js_1 = require("../../common/schema/dates.js");
|
|
6
6
|
const id_js_1 = require("../../common/schema/id.js");
|
|
@@ -30,13 +30,19 @@ exports.SessionAuthenticationFactorSchema = zod_1.z.object({
|
|
|
30
30
|
});
|
|
31
31
|
const AuthenticationFactorHistoryArraySchema = zod_1.z.array(base_js_1.StrategyIdSchema);
|
|
32
32
|
const AuthenticationFactorHistorySetSchema = zod_1.z.instanceof((Set));
|
|
33
|
-
|
|
34
|
-
.union([
|
|
33
|
+
const SessionAuthenticationFactorHistoryInput = zod_1.z.union([
|
|
35
34
|
zod_1.z.undefined(),
|
|
36
35
|
AuthenticationFactorHistoryArraySchema,
|
|
37
36
|
AuthenticationFactorHistorySetSchema,
|
|
38
|
-
])
|
|
39
|
-
|
|
37
|
+
]);
|
|
38
|
+
const SessionAuthenticationFactorHistoryArraySchema = SessionAuthenticationFactorHistoryInput.pipe(zod_1.z.transform((s) => (s instanceof Set ? Array.from(s) : s)?.length ? s : undefined));
|
|
39
|
+
// type SessionAuthenticationFactorArrayHistory = z.output<
|
|
40
|
+
// typeof SessionAuthenticationFactorHistoryArraySchema
|
|
41
|
+
// >;
|
|
42
|
+
const SessionAuthenticationFactorHistorySetSchema = SessionAuthenticationFactorHistoryInput.pipe(zod_1.z.transform((s) => (!s || s instanceof Set ? s : new Set(s))));
|
|
43
|
+
// type SessionAuthenticationFactorSetHistory = z.output<
|
|
44
|
+
// typeof SessionAuthenticationFactorHistorySetSchema
|
|
45
|
+
// >;
|
|
40
46
|
const BaseSchema = zod_1.z.object({
|
|
41
47
|
...exports.SessionIdPropertySchema.shape,
|
|
42
48
|
status: exports.SessionStatusSchema,
|
|
@@ -46,13 +52,14 @@ const BaseSchema = zod_1.z.object({
|
|
|
46
52
|
factors: zod_1.z
|
|
47
53
|
.union([zod_1.z.array(exports.SessionAuthenticationFactorSchema), zod_1.z.undefined()])
|
|
48
54
|
.optional(),
|
|
49
|
-
factorHistory:
|
|
55
|
+
factorHistory: SessionAuthenticationFactorHistoryArraySchema.optional(),
|
|
50
56
|
});
|
|
51
57
|
exports.SessionSchema = zod_1.z.object({
|
|
52
58
|
...BaseSchema.shape,
|
|
53
59
|
expiresAt: dates_js_1.RequiredDateSchema,
|
|
54
60
|
...dates_js_1.CreatedAtPropertySchema.shape,
|
|
55
61
|
...dates_js_1.UpdatedAtPropertySchema.shape,
|
|
62
|
+
factorHistory: SessionAuthenticationFactorHistorySetSchema.optional(),
|
|
56
63
|
redirectTo: zod_1.z
|
|
57
64
|
.union([zod_1.z.string(), zod_1.z.instanceof(URL)])
|
|
58
65
|
.pipe(zod_1.z.transform((v) => (!v || v instanceof URL ? v : new URL(v))))
|
|
@@ -27,12 +27,11 @@ export declare const SessionAuthenticationFactorSchema: z.ZodObject<{
|
|
|
27
27
|
state: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
export type SessionAuthenticationFactor = z.output<typeof SessionAuthenticationFactorSchema>;
|
|
30
|
-
export declare const SessionAuthenticationFactorHistorySchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>;
|
|
31
|
-
export type SessionAuthenticationFactorHistory = z.output<typeof SessionAuthenticationFactorHistorySchema>;
|
|
32
30
|
export declare const SessionSchema: z.ZodObject<{
|
|
33
31
|
metadata: 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<Map<string, string | number | boolean>, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>;
|
|
34
32
|
deactivatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
35
33
|
deletedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>>;
|
|
34
|
+
factorHistory: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | undefined, Set<string> | string[] | undefined>>>;
|
|
36
35
|
redirectTo: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodCustom<URL, URL>]>, z.ZodTransform<string | URL, string | URL>>>;
|
|
37
36
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
38
37
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>]>;
|
|
@@ -55,7 +54,6 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
55
54
|
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
55
|
state: z.ZodOptional<z.ZodString>;
|
|
57
56
|
}, z.core.$strip>>, z.ZodUndefined]>>;
|
|
58
|
-
factorHistory: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodString>, z.ZodCustom<Set<string>, Set<string>>]>, z.ZodTransform<Set<string> | string[] | undefined, Set<string> | string[] | undefined>>>;
|
|
59
57
|
id: z.ZodString;
|
|
60
58
|
}, z.core.$strip>;
|
|
61
59
|
export type SessionProperties = z.input<typeof SessionSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/authentication/sessions/schema.ts"],"names":[],"mappings":"AAAA,OAAO,E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AAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC;AA0CF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAErD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;iBAW5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,iCAAiC,CACzC,CAAC"}
|
|
@@ -27,13 +27,19 @@ export const SessionAuthenticationFactorSchema = z.object({
|
|
|
27
27
|
});
|
|
28
28
|
const AuthenticationFactorHistoryArraySchema = z.array(StrategyIdSchema);
|
|
29
29
|
const AuthenticationFactorHistorySetSchema = z.instanceof((Set));
|
|
30
|
-
|
|
31
|
-
.union([
|
|
30
|
+
const SessionAuthenticationFactorHistoryInput = z.union([
|
|
32
31
|
z.undefined(),
|
|
33
32
|
AuthenticationFactorHistoryArraySchema,
|
|
34
33
|
AuthenticationFactorHistorySetSchema,
|
|
35
|
-
])
|
|
36
|
-
|
|
34
|
+
]);
|
|
35
|
+
const SessionAuthenticationFactorHistoryArraySchema = SessionAuthenticationFactorHistoryInput.pipe(z.transform((s) => (s instanceof Set ? Array.from(s) : s)?.length ? s : undefined));
|
|
36
|
+
// type SessionAuthenticationFactorArrayHistory = z.output<
|
|
37
|
+
// typeof SessionAuthenticationFactorHistoryArraySchema
|
|
38
|
+
// >;
|
|
39
|
+
const SessionAuthenticationFactorHistorySetSchema = SessionAuthenticationFactorHistoryInput.pipe(z.transform((s) => (!s || s instanceof Set ? s : new Set(s))));
|
|
40
|
+
// type SessionAuthenticationFactorSetHistory = z.output<
|
|
41
|
+
// typeof SessionAuthenticationFactorHistorySetSchema
|
|
42
|
+
// >;
|
|
37
43
|
const BaseSchema = z.object({
|
|
38
44
|
...SessionIdPropertySchema.shape,
|
|
39
45
|
status: SessionStatusSchema,
|
|
@@ -43,13 +49,14 @@ const BaseSchema = z.object({
|
|
|
43
49
|
factors: z
|
|
44
50
|
.union([z.array(SessionAuthenticationFactorSchema), z.undefined()])
|
|
45
51
|
.optional(),
|
|
46
|
-
factorHistory:
|
|
52
|
+
factorHistory: SessionAuthenticationFactorHistoryArraySchema.optional(),
|
|
47
53
|
});
|
|
48
54
|
export const SessionSchema = z.object({
|
|
49
55
|
...BaseSchema.shape,
|
|
50
56
|
expiresAt: RequiredDateSchema,
|
|
51
57
|
...CreatedAtPropertySchema.shape,
|
|
52
58
|
...UpdatedAtPropertySchema.shape,
|
|
59
|
+
factorHistory: SessionAuthenticationFactorHistorySetSchema.optional(),
|
|
53
60
|
redirectTo: z
|
|
54
61
|
.union([z.string(), z.instanceof(URL)])
|
|
55
62
|
.pipe(z.transform((v) => (!v || v instanceof URL ? v : new URL(v))))
|