@go-mondo/identity-sdk 0.0.2-beta.13 → 0.0.2-beta.14
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/app/oidc/resources.js +1 -1
- package/dist/cjs/app/oidc/schema.d.ts +2 -2
- package/dist/cjs/app/oidc/schema.d.ts.map +1 -1
- package/dist/cjs/app/oidc/schema.js +3 -4
- package/dist/cjs/app/saml/resources.js +1 -1
- package/dist/cjs/app/saml/schema.d.ts +2 -2
- package/dist/cjs/app/saml/schema.d.ts.map +1 -1
- package/dist/cjs/app/saml/schema.js +3 -4
- package/dist/cjs/app/schema.d.ts +1 -1
- package/dist/cjs/app/schema.js +1 -1
- package/dist/esm/app/oidc/resources.js +1 -1
- package/dist/esm/app/oidc/schema.d.ts +2 -2
- package/dist/esm/app/oidc/schema.d.ts.map +1 -1
- package/dist/esm/app/oidc/schema.js +3 -4
- package/dist/esm/app/saml/resources.js +1 -1
- package/dist/esm/app/saml/schema.d.ts +2 -2
- package/dist/esm/app/saml/schema.d.ts.map +1 -1
- package/dist/esm/app/saml/schema.js +3 -4
- package/dist/esm/app/schema.d.ts +1 -1
- package/dist/esm/app/schema.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-beta.14](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.13...identity-sdk-v0.0.2-beta.14) (2025-08-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* removing unions ([843c740](https://github.com/go-mondo/identity-node-sdk/commit/843c7408c4b77537afef9f36d63e0514b2b19173))
|
|
9
|
+
|
|
3
10
|
## [0.0.2-beta.13](https://github.com/go-mondo/identity-node-sdk/compare/identity-sdk-v0.0.2-beta.12...identity-sdk-v0.0.2-beta.13) (2025-08-22)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -38,7 +38,7 @@ async function getOIDC(instance, appId) {
|
|
|
38
38
|
return schema_js_1.OIDCSchema.parse(await (0, operations_js_1.getItemWithAuthorization)(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer));
|
|
39
39
|
}
|
|
40
40
|
async function insertOIDC(instance, appId, item) {
|
|
41
|
-
return schema_js_1.OIDCSchema.parse(await (0, operations_js_1.insertItemWithAuthorization)(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer, schema_js_1.InsertOIDCPayloadSchema.parse(item)));
|
|
41
|
+
return schema_js_1.OIDCSchema.parse(await (0, operations_js_1.insertItemWithAuthorization)(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer, item ? schema_js_1.InsertOIDCPayloadSchema.parse(item) : undefined));
|
|
42
42
|
}
|
|
43
43
|
async function updateOIDC(instance, appId, item) {
|
|
44
44
|
return schema_js_1.OIDCSchema.parse(await (0, operations_js_1.updateItemWithAuthorization)(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer, schema_js_1.UpdateOIDCPayloadSchema.parse(item)));
|
|
@@ -14,9 +14,9 @@ export declare const OIDCPayloadSchema: z.ZodObject<{
|
|
|
14
14
|
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>>>;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type OIDCPayload = z.output<typeof OIDCPayloadSchema>;
|
|
17
|
-
export declare const InsertOIDCPayloadSchema: z.
|
|
17
|
+
export declare const InsertOIDCPayloadSchema: z.ZodObject<{
|
|
18
18
|
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>>>;
|
|
19
|
-
}, z.core.$strip
|
|
19
|
+
}, z.core.$strip>;
|
|
20
20
|
export type InsertOIDCInput = z.input<typeof InsertOIDCPayloadSchema>;
|
|
21
21
|
export type InsertOIDCPayload = z.output<typeof InsertOIDCPayloadSchema>;
|
|
22
22
|
export declare const UpdateOIDCPayloadSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/oidc/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/oidc/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;iBAAgC,CAAC;AACrE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -16,8 +16,7 @@ exports.OIDCPayloadSchema = zod_1.z.object({
|
|
|
16
16
|
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
17
17
|
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
18
18
|
});
|
|
19
|
-
exports.InsertOIDCPayloadSchema = zod_1.z.
|
|
20
|
-
metadata_js_1.UpsertMetadataPropertyPayloadSchema,
|
|
21
|
-
|
|
22
|
-
]);
|
|
19
|
+
exports.InsertOIDCPayloadSchema = zod_1.z.object({
|
|
20
|
+
...metadata_js_1.UpsertMetadataPropertyPayloadSchema.shape,
|
|
21
|
+
});
|
|
23
22
|
exports.UpdateOIDCPayloadSchema = metadata_js_1.MetadataPayloadPropertySchema;
|
|
@@ -38,7 +38,7 @@ async function getSAML(instance, appId) {
|
|
|
38
38
|
return schema_js_1.SAMLSchema.parse(await (0, operations_js_1.getItemWithAuthorization)(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer));
|
|
39
39
|
}
|
|
40
40
|
async function insertSAML(instance, appId, item) {
|
|
41
|
-
return schema_js_1.SAMLSchema.parse(await (0, operations_js_1.insertItemWithAuthorization)(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer, schema_js_1.InsertSAMLPayloadSchema.parse(item)));
|
|
41
|
+
return schema_js_1.SAMLSchema.parse(await (0, operations_js_1.insertItemWithAuthorization)(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer, item ? schema_js_1.InsertSAMLPayloadSchema.parse(item) : undefined));
|
|
42
42
|
}
|
|
43
43
|
async function updateSAML(instance, appId, item) {
|
|
44
44
|
return schema_js_1.SAMLSchema.parse(await (0, operations_js_1.updateItemWithAuthorization)(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer, schema_js_1.UpdateSAMLPayloadSchema.parse(item)));
|
|
@@ -14,9 +14,9 @@ export declare const SAMLPayloadSchema: z.ZodObject<{
|
|
|
14
14
|
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>>>;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type SAMLPayload = z.output<typeof SAMLPayloadSchema>;
|
|
17
|
-
export declare const InsertSAMLPayloadSchema: z.
|
|
17
|
+
export declare const InsertSAMLPayloadSchema: z.ZodObject<{
|
|
18
18
|
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>>>;
|
|
19
|
-
}, z.core.$strip
|
|
19
|
+
}, z.core.$strip>;
|
|
20
20
|
export type InsertSAMLInput = z.input<typeof InsertSAMLPayloadSchema>;
|
|
21
21
|
export type InsertSAMLPayload = z.output<typeof InsertSAMLPayloadSchema>;
|
|
22
22
|
export declare const UpdateSAMLPayloadSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/saml/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/saml/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;iBAAsC,CAAC;AAC3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -16,8 +16,7 @@ exports.SAMLPayloadSchema = zod_1.z.object({
|
|
|
16
16
|
deactivatedAt: dates_js_1.OptionalDatePayloadSchema.optional(),
|
|
17
17
|
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
18
18
|
});
|
|
19
|
-
exports.InsertSAMLPayloadSchema = zod_1.z.
|
|
20
|
-
metadata_js_1.UpsertMetadataPropertyPayloadSchema,
|
|
21
|
-
|
|
22
|
-
]);
|
|
19
|
+
exports.InsertSAMLPayloadSchema = zod_1.z.object({
|
|
20
|
+
...metadata_js_1.UpsertMetadataPropertyPayloadSchema.shape,
|
|
21
|
+
});
|
|
23
22
|
exports.UpdateSAMLPayloadSchema = metadata_js_1.UpsertMetadataPropertyPayloadSchema;
|
package/dist/cjs/app/schema.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare const AppPayloadSchema: z.ZodObject<{
|
|
|
43
43
|
export type AppPayload = z.output<typeof AppPayloadSchema>;
|
|
44
44
|
export declare const InsertAppPayloadSchema: z.ZodObject<{
|
|
45
45
|
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>>>;
|
|
46
|
-
id: z.
|
|
46
|
+
id: z.ZodOptional<z.ZodString>;
|
|
47
47
|
status: z.ZodDefault<z.ZodEnum<{
|
|
48
48
|
enabled: "enabled";
|
|
49
49
|
disabled: "disabled";
|
package/dist/cjs/app/schema.js
CHANGED
|
@@ -39,7 +39,7 @@ exports.AppPayloadSchema = zod_1.z.object({
|
|
|
39
39
|
...metadata_js_1.MetadataPayloadPropertySchema.shape,
|
|
40
40
|
});
|
|
41
41
|
exports.InsertAppPayloadSchema = zod_1.z.object({
|
|
42
|
-
id: exports.AppIdSchema.
|
|
42
|
+
id: exports.AppIdSchema.optional(),
|
|
43
43
|
status: StatusSchema.default(exports.AppStatus.ENABLED),
|
|
44
44
|
label: zod_1.z.string(),
|
|
45
45
|
description: zod_1.z.string().optional(),
|
|
@@ -30,7 +30,7 @@ export async function getOIDC(instance, appId) {
|
|
|
30
30
|
return OIDCSchema.parse(await getItemWithAuthorization(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer));
|
|
31
31
|
}
|
|
32
32
|
export async function insertOIDC(instance, appId, item) {
|
|
33
|
-
return OIDCSchema.parse(await insertItemWithAuthorization(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer, InsertOIDCPayloadSchema.parse(item)));
|
|
33
|
+
return OIDCSchema.parse(await insertItemWithAuthorization(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer, item ? InsertOIDCPayloadSchema.parse(item) : undefined));
|
|
34
34
|
}
|
|
35
35
|
export async function updateOIDC(instance, appId, item) {
|
|
36
36
|
return OIDCSchema.parse(await updateItemWithAuthorization(new URL(OIDCResources.buildPath(appId), instance.config.host), instance.authorizer, UpdateOIDCPayloadSchema.parse(item)));
|
|
@@ -14,9 +14,9 @@ export declare const OIDCPayloadSchema: z.ZodObject<{
|
|
|
14
14
|
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>>>;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type OIDCPayload = z.output<typeof OIDCPayloadSchema>;
|
|
17
|
-
export declare const InsertOIDCPayloadSchema: z.
|
|
17
|
+
export declare const InsertOIDCPayloadSchema: z.ZodObject<{
|
|
18
18
|
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>>>;
|
|
19
|
-
}, z.core.$strip
|
|
19
|
+
}, z.core.$strip>;
|
|
20
20
|
export type InsertOIDCInput = z.input<typeof InsertOIDCPayloadSchema>;
|
|
21
21
|
export type InsertOIDCPayload = z.output<typeof InsertOIDCPayloadSchema>;
|
|
22
22
|
export declare const UpdateOIDCPayloadSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/oidc/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/oidc/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;iBAAgC,CAAC;AACrE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -13,8 +13,7 @@ export const OIDCPayloadSchema = z.object({
|
|
|
13
13
|
deactivatedAt: OptionalDatePayloadSchema.optional(),
|
|
14
14
|
...MetadataPayloadPropertySchema.shape,
|
|
15
15
|
});
|
|
16
|
-
export const InsertOIDCPayloadSchema = z.
|
|
17
|
-
UpsertMetadataPropertyPayloadSchema,
|
|
18
|
-
|
|
19
|
-
]);
|
|
16
|
+
export const InsertOIDCPayloadSchema = z.object({
|
|
17
|
+
...UpsertMetadataPropertyPayloadSchema.shape,
|
|
18
|
+
});
|
|
20
19
|
export const UpdateOIDCPayloadSchema = MetadataPayloadPropertySchema;
|
|
@@ -30,7 +30,7 @@ export async function getSAML(instance, appId) {
|
|
|
30
30
|
return SAMLSchema.parse(await getItemWithAuthorization(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer));
|
|
31
31
|
}
|
|
32
32
|
export async function insertSAML(instance, appId, item) {
|
|
33
|
-
return SAMLSchema.parse(await insertItemWithAuthorization(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer, InsertSAMLPayloadSchema.parse(item)));
|
|
33
|
+
return SAMLSchema.parse(await insertItemWithAuthorization(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer, item ? InsertSAMLPayloadSchema.parse(item) : undefined));
|
|
34
34
|
}
|
|
35
35
|
export async function updateSAML(instance, appId, item) {
|
|
36
36
|
return SAMLSchema.parse(await updateItemWithAuthorization(new URL(SAMLResources.buildPath(appId), instance.config.host), instance.authorizer, UpdateSAMLPayloadSchema.parse(item)));
|
|
@@ -14,9 +14,9 @@ export declare const SAMLPayloadSchema: z.ZodObject<{
|
|
|
14
14
|
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>>>;
|
|
15
15
|
}, z.core.$strip>;
|
|
16
16
|
export type SAMLPayload = z.output<typeof SAMLPayloadSchema>;
|
|
17
|
-
export declare const InsertSAMLPayloadSchema: z.
|
|
17
|
+
export declare const InsertSAMLPayloadSchema: z.ZodObject<{
|
|
18
18
|
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>>>;
|
|
19
|
-
}, z.core.$strip
|
|
19
|
+
}, z.core.$strip>;
|
|
20
20
|
export type InsertSAMLInput = z.input<typeof InsertSAMLPayloadSchema>;
|
|
21
21
|
export type InsertSAMLPayload = z.output<typeof InsertSAMLPayloadSchema>;
|
|
22
22
|
export declare const UpdateSAMLPayloadSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/saml/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/app/saml/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEzE,eAAO,MAAM,uBAAuB;;iBAAsC,CAAC;AAC3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -13,8 +13,7 @@ export const SAMLPayloadSchema = z.object({
|
|
|
13
13
|
deactivatedAt: OptionalDatePayloadSchema.optional(),
|
|
14
14
|
...MetadataPayloadPropertySchema.shape,
|
|
15
15
|
});
|
|
16
|
-
export const InsertSAMLPayloadSchema = z.
|
|
17
|
-
UpsertMetadataPropertyPayloadSchema,
|
|
18
|
-
|
|
19
|
-
]);
|
|
16
|
+
export const InsertSAMLPayloadSchema = z.object({
|
|
17
|
+
...UpsertMetadataPropertyPayloadSchema.shape,
|
|
18
|
+
});
|
|
20
19
|
export const UpdateSAMLPayloadSchema = UpsertMetadataPropertyPayloadSchema;
|
package/dist/esm/app/schema.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare const AppPayloadSchema: z.ZodObject<{
|
|
|
43
43
|
export type AppPayload = z.output<typeof AppPayloadSchema>;
|
|
44
44
|
export declare const InsertAppPayloadSchema: z.ZodObject<{
|
|
45
45
|
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>>>;
|
|
46
|
-
id: z.
|
|
46
|
+
id: z.ZodOptional<z.ZodString>;
|
|
47
47
|
status: z.ZodDefault<z.ZodEnum<{
|
|
48
48
|
enabled: "enabled";
|
|
49
49
|
disabled: "disabled";
|
package/dist/esm/app/schema.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { OptionalDatePayloadSchema, OptionalDateSchema, RequiredDatePayloadSchema, RequiredDateSchema, } from '../common/index.js';
|
|
3
3
|
import { KSUIDSchema } from '../common/schema/id.js';
|
|
4
4
|
import { MetadataMapPropertySchema, MetadataPayloadPropertySchema, } from '../common/schema/metadata.js';
|
|
5
|
-
import { Model
|
|
5
|
+
import { Model } from './utils.js';
|
|
6
6
|
export const AppStatus = {
|
|
7
7
|
ENABLED: 'enabled',
|
|
8
8
|
DISABLED: 'disabled',
|
|
@@ -36,7 +36,7 @@ export const AppPayloadSchema = z.object({
|
|
|
36
36
|
...MetadataPayloadPropertySchema.shape,
|
|
37
37
|
});
|
|
38
38
|
export const InsertAppPayloadSchema = z.object({
|
|
39
|
-
id: AppIdSchema.
|
|
39
|
+
id: AppIdSchema.optional(),
|
|
40
40
|
status: StatusSchema.default(AppStatus.ENABLED),
|
|
41
41
|
label: z.string(),
|
|
42
42
|
description: z.string().optional(),
|