@go-mondo/identity-sdk 0.0.2-beta.75 → 0.0.2-beta.76

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.2-beta.76](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.75...identity-sdk-v0.0.2-beta.76) (2026-05-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * allow null auth values for removal ([067e3e9](https://github.com/go-mondo/identity-node-sdk/commit/067e3e9404506dbf1f9548d879523bf58b1480ba))
9
+
3
10
  ## [0.0.2-beta.75](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.74...identity-sdk-v0.0.2-beta.75) (2026-05-06)
4
11
 
5
12
 
@@ -63,19 +63,10 @@ export declare const AuthorizationPayloadSchema: z.ZodObject<{
63
63
  export type AuthorizationPayload = z.output<typeof AuthorizationPayloadSchema>;
64
64
  export declare const UpsertAuthorizationPayloadSchema: z.ZodObject<{
65
65
  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> | null | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
66
- loginUri: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<[z.ZodPipe<z.ZodCustom<URL, URL>, z.ZodTransform<string, URL>>, z.ZodURL]>, z.ZodUndefined]>>;
67
- callbackUrls: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodUnion<[z.ZodPipe<z.ZodURL, z.ZodTransform<URL, string>>, z.ZodCustom<URL, URL>]>>, z.ZodTransform<URL[], URL[]>>, z.ZodCustom<Set<URL>, Set<URL>>]>, z.ZodTransform<string[] | undefined, Set<URL> | URL[] | undefined>>>;
68
- availableAudiences: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodSet<z.ZodString>]>, z.ZodTransform<string[] | undefined, Set<string> | string[] | undefined>>>;
69
- availableGrants: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodEnum<{
70
- client_credentials: "client_credentials";
71
- authorization_code: "authorization_code";
72
- implicit: "implicit";
73
- refresh_token: "refresh_token";
74
- }>>, z.ZodCustom<Set<AnyGrantType>, Set<AnyGrantType>>]>, z.ZodTransform<("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined, Set<AnyGrantType> | ("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined>>>;
75
- defaultAudience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
76
- refreshTokenDuration: z.ZodOptional<z.ZodNumber>;
77
- accessTokenDuration: z.ZodOptional<z.ZodNumber>;
78
- accessTokenSignatureAlgorithm: z.ZodOptional<z.ZodEnum<{
66
+ loginUri: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<[z.ZodPipe<z.ZodCustom<URL, URL>, z.ZodTransform<string, URL>>, z.ZodURL]>, z.ZodNull, z.ZodUndefined]>>;
67
+ refreshTokenDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
68
+ accessTokenDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
69
+ accessTokenSignatureAlgorithm: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
79
70
  RS256: "RS256";
80
71
  RS384: "RS384";
81
72
  RS512: "RS512";
@@ -85,7 +76,16 @@ export declare const UpsertAuthorizationPayloadSchema: z.ZodObject<{
85
76
  PS256: "PS256";
86
77
  PS384: "PS384";
87
78
  PS512: "PS512";
88
- }>>;
79
+ }>>>;
80
+ callbackUrls: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodUnion<[z.ZodPipe<z.ZodURL, z.ZodTransform<URL, string>>, z.ZodCustom<URL, URL>]>>, z.ZodTransform<URL[], URL[]>>, z.ZodCustom<Set<URL>, Set<URL>>]>, z.ZodTransform<string[] | undefined, Set<URL> | URL[] | undefined>>>;
81
+ availableAudiences: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodSet<z.ZodString>]>, z.ZodTransform<string[] | undefined, Set<string> | string[] | undefined>>>;
82
+ availableGrants: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodEnum<{
83
+ client_credentials: "client_credentials";
84
+ authorization_code: "authorization_code";
85
+ implicit: "implicit";
86
+ refresh_token: "refresh_token";
87
+ }>>, z.ZodCustom<Set<AnyGrantType>, Set<AnyGrantType>>]>, z.ZodTransform<("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined, Set<AnyGrantType> | ("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined>>>;
88
+ defaultAudience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
89
89
  }, z.core.$strip>;
90
90
  export type UpsertAuthorizationInput = z.input<typeof UpsertAuthorizationPayloadSchema>;
91
91
  export type UpsertAuthorizationPayload = z.output<typeof UpsertAuthorizationPayloadSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/authorization/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAyB5B,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,8BAA8B,CAA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M,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;iBAU3C,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"}
@@ -86,11 +86,13 @@ exports.AuthorizationPayloadSchema = z.object({
86
86
  ...metadata_js_1.MetadataPayloadPropertySchema.shape,
87
87
  });
88
88
  exports.UpsertAuthorizationPayloadSchema = z.object({
89
- ...BaseAuthorization.shape,
90
- loginUri: z.union([url_js_1.WebUrlStringSchema, z.undefined()]).optional(),
89
+ loginUri: z.union([url_js_1.WebUrlStringSchema, z.null(), z.undefined()]).optional(),
90
+ refreshTokenDuration: z.number().nullish(),
91
+ accessTokenDuration: z.number().nullish(),
92
+ accessTokenSignatureAlgorithm: jwt_js_1.AlgorithmSchema.nullish(),
91
93
  callbackUrls: url_js_1.UniqueWebUrlStringArraySchema.optional(),
92
94
  availableAudiences: AudienceArraySchema.optional(),
93
95
  availableGrants: AvailableGrantArraySchema.optional(),
94
- defaultAudience: z.union([z.string(), z.undefined()]).optional(),
96
+ defaultAudience: z.union([z.string(), z.null(), z.undefined()]).optional(),
95
97
  ...metadata_js_1.UpsertMetadataPropertyPayloadSchema.shape,
96
98
  });
@@ -145,6 +145,18 @@ const schema_js_1 = require("./schema.js");
145
145
  const result = schema_js_1.AuthorizationSchema.safeParse(authorization);
146
146
  (0, vitest_1.expect)(result.success).toBe(false);
147
147
  });
148
+ (0, vitest_1.test)('should reject null values for removable fields', () => {
149
+ const authorization = {
150
+ loginUri: null,
151
+ refreshTokenDuration: null,
152
+ accessTokenDuration: null,
153
+ accessTokenSignatureAlgorithm: null,
154
+ defaultAudience: null,
155
+ metadata: {},
156
+ };
157
+ const result = schema_js_1.AuthorizationSchema.safeParse(authorization);
158
+ (0, vitest_1.expect)(result.success).toBe(false);
159
+ });
148
160
  });
149
161
  (0, vitest_1.describe)('AuthorizationPayloadSchema', () => {
150
162
  (0, vitest_1.test)('should accept complete authorization payload', () => {
@@ -318,6 +330,20 @@ const schema_js_1 = require("./schema.js");
318
330
  const result = schema_js_1.UpsertAuthorizationPayloadSchema.safeParse(payload);
319
331
  (0, vitest_1.expect)(result.success).toBe(true);
320
332
  });
333
+ (0, vitest_1.test)('should accept upsert with null values for removable fields', () => {
334
+ const payload = {
335
+ loginUri: null,
336
+ refreshTokenDuration: null,
337
+ accessTokenDuration: null,
338
+ accessTokenSignatureAlgorithm: null,
339
+ defaultAudience: null,
340
+ metadata: {
341
+ reset_fields: 'loginUri,refreshTokenDuration,accessTokenDuration,accessTokenSignatureAlgorithm,defaultAudience',
342
+ },
343
+ };
344
+ const result = schema_js_1.UpsertAuthorizationPayloadSchema.safeParse(payload);
345
+ (0, vitest_1.expect)(result.success).toBe(true);
346
+ });
321
347
  (0, vitest_1.test)('should accept empty metadata upsert', () => {
322
348
  const payload = {
323
349
  refreshTokenDuration: 7200,
@@ -63,19 +63,10 @@ export declare const AuthorizationPayloadSchema: z.ZodObject<{
63
63
  export type AuthorizationPayload = z.output<typeof AuthorizationPayloadSchema>;
64
64
  export declare const UpsertAuthorizationPayloadSchema: z.ZodObject<{
65
65
  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> | null | undefined, Record<string, string | number | boolean> | Map<string, string | number | boolean> | null | undefined>>>;
66
- loginUri: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<[z.ZodPipe<z.ZodCustom<URL, URL>, z.ZodTransform<string, URL>>, z.ZodURL]>, z.ZodUndefined]>>;
67
- callbackUrls: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodUnion<[z.ZodPipe<z.ZodURL, z.ZodTransform<URL, string>>, z.ZodCustom<URL, URL>]>>, z.ZodTransform<URL[], URL[]>>, z.ZodCustom<Set<URL>, Set<URL>>]>, z.ZodTransform<string[] | undefined, Set<URL> | URL[] | undefined>>>;
68
- availableAudiences: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodSet<z.ZodString>]>, z.ZodTransform<string[] | undefined, Set<string> | string[] | undefined>>>;
69
- availableGrants: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodEnum<{
70
- client_credentials: "client_credentials";
71
- authorization_code: "authorization_code";
72
- implicit: "implicit";
73
- refresh_token: "refresh_token";
74
- }>>, z.ZodCustom<Set<AnyGrantType>, Set<AnyGrantType>>]>, z.ZodTransform<("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined, Set<AnyGrantType> | ("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined>>>;
75
- defaultAudience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
76
- refreshTokenDuration: z.ZodOptional<z.ZodNumber>;
77
- accessTokenDuration: z.ZodOptional<z.ZodNumber>;
78
- accessTokenSignatureAlgorithm: z.ZodOptional<z.ZodEnum<{
66
+ loginUri: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<[z.ZodPipe<z.ZodCustom<URL, URL>, z.ZodTransform<string, URL>>, z.ZodURL]>, z.ZodNull, z.ZodUndefined]>>;
67
+ refreshTokenDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
68
+ accessTokenDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
69
+ accessTokenSignatureAlgorithm: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
79
70
  RS256: "RS256";
80
71
  RS384: "RS384";
81
72
  RS512: "RS512";
@@ -85,7 +76,16 @@ export declare const UpsertAuthorizationPayloadSchema: z.ZodObject<{
85
76
  PS256: "PS256";
86
77
  PS384: "PS384";
87
78
  PS512: "PS512";
88
- }>>;
79
+ }>>>;
80
+ callbackUrls: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodUnion<[z.ZodPipe<z.ZodURL, z.ZodTransform<URL, string>>, z.ZodCustom<URL, URL>]>>, z.ZodTransform<URL[], URL[]>>, z.ZodCustom<Set<URL>, Set<URL>>]>, z.ZodTransform<string[] | undefined, Set<URL> | URL[] | undefined>>>;
81
+ availableAudiences: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>, z.ZodSet<z.ZodString>]>, z.ZodTransform<string[] | undefined, Set<string> | string[] | undefined>>>;
82
+ availableGrants: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodUndefined, z.ZodArray<z.ZodEnum<{
83
+ client_credentials: "client_credentials";
84
+ authorization_code: "authorization_code";
85
+ implicit: "implicit";
86
+ refresh_token: "refresh_token";
87
+ }>>, z.ZodCustom<Set<AnyGrantType>, Set<AnyGrantType>>]>, z.ZodTransform<("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined, Set<AnyGrantType> | ("client_credentials" | "authorization_code" | "implicit" | "refresh_token")[] | undefined>>>;
88
+ defaultAudience: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodUndefined]>>;
89
89
  }, z.core.$strip>;
90
90
  export type UpsertAuthorizationInput = z.input<typeof UpsertAuthorizationPayloadSchema>;
91
91
  export type UpsertAuthorizationPayload = z.output<typeof UpsertAuthorizationPayloadSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/authorization/schema.ts"],"names":[],"mappings":"AAA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H,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE/E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;iBAU3C,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"}
@@ -50,11 +50,13 @@ export const AuthorizationPayloadSchema = z.object({
50
50
  ...MetadataPayloadPropertySchema.shape,
51
51
  });
52
52
  export const UpsertAuthorizationPayloadSchema = z.object({
53
- ...BaseAuthorization.shape,
54
- loginUri: z.union([WebUrlStringSchema, z.undefined()]).optional(),
53
+ loginUri: z.union([WebUrlStringSchema, z.null(), z.undefined()]).optional(),
54
+ refreshTokenDuration: z.number().nullish(),
55
+ accessTokenDuration: z.number().nullish(),
56
+ accessTokenSignatureAlgorithm: AlgorithmSchema.nullish(),
55
57
  callbackUrls: UniqueWebUrlStringArraySchema.optional(),
56
58
  availableAudiences: AudienceArraySchema.optional(),
57
59
  availableGrants: AvailableGrantArraySchema.optional(),
58
- defaultAudience: z.union([z.string(), z.undefined()]).optional(),
60
+ defaultAudience: z.union([z.string(), z.null(), z.undefined()]).optional(),
59
61
  ...UpsertMetadataPropertyPayloadSchema.shape,
60
62
  });
@@ -143,6 +143,18 @@ describe('App Authorization - Schema', () => {
143
143
  const result = AuthorizationSchema.safeParse(authorization);
144
144
  expect(result.success).toBe(false);
145
145
  });
146
+ test('should reject null values for removable fields', () => {
147
+ const authorization = {
148
+ loginUri: null,
149
+ refreshTokenDuration: null,
150
+ accessTokenDuration: null,
151
+ accessTokenSignatureAlgorithm: null,
152
+ defaultAudience: null,
153
+ metadata: {},
154
+ };
155
+ const result = AuthorizationSchema.safeParse(authorization);
156
+ expect(result.success).toBe(false);
157
+ });
146
158
  });
147
159
  describe('AuthorizationPayloadSchema', () => {
148
160
  test('should accept complete authorization payload', () => {
@@ -316,6 +328,20 @@ describe('App Authorization - Schema', () => {
316
328
  const result = UpsertAuthorizationPayloadSchema.safeParse(payload);
317
329
  expect(result.success).toBe(true);
318
330
  });
331
+ test('should accept upsert with null values for removable fields', () => {
332
+ const payload = {
333
+ loginUri: null,
334
+ refreshTokenDuration: null,
335
+ accessTokenDuration: null,
336
+ accessTokenSignatureAlgorithm: null,
337
+ defaultAudience: null,
338
+ metadata: {
339
+ reset_fields: 'loginUri,refreshTokenDuration,accessTokenDuration,accessTokenSignatureAlgorithm,defaultAudience',
340
+ },
341
+ };
342
+ const result = UpsertAuthorizationPayloadSchema.safeParse(payload);
343
+ expect(result.success).toBe(true);
344
+ });
319
345
  test('should accept empty metadata upsert', () => {
320
346
  const payload = {
321
347
  refreshTokenDuration: 7200,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mondo/identity-sdk",
3
- "version": "0.0.2-beta.75",
3
+ "version": "0.0.2-beta.76",
4
4
  "type": "module",
5
5
  "description": "A node SDK for Mondo Identity",
6
6
  "license": "MIT",