@open-dpp/dto 2.4.0 → 2.6.0
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/aas/asset-administration-shell-json-schema.d.ts +3 -3
- package/dist/aas/security/access-permission-rule.dto.d.ts +2 -2
- package/dist/aas/security/security.dto.d.ts +3 -3
- package/dist/aas/submodel-base/property-json-schema.d.ts +2 -2
- package/dist/aas/submodel-base/property-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/property-json-schema.js +3 -2
- package/dist/aas/submodel-base/submodel-element-schema.d.ts +1 -1
- package/dist/organizations/member.dto.d.ts +9 -1
- package/dist/organizations/member.dto.d.ts.map +1 -1
- package/dist/organizations/member.dto.js +4 -0
- package/dist/permalinks/permalink.dto.d.ts +2 -2
- package/dist/presentation-configurations/presentation-configuration.dto.d.ts +6 -6
- package/dist/users/set-user-role.dto.d.ts +3 -2
- package/dist/users/set-user-role.dto.d.ts.map +1 -1
- package/dist/users/set-user-role.dto.js +2 -1
- package/package.json +1 -1
- package/src/aas/submodel-base/property-json-schema.ts +4 -2
- package/src/organizations/member.dto.ts +5 -1
- package/src/users/set-user-role.dto.ts +2 -1
|
@@ -163,7 +163,7 @@ export declare const AssetAdministrationShellJsonSchema: z.ZodObject<{
|
|
|
163
163
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
164
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
165
165
|
}, z.core.$strip>>>;
|
|
166
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
166
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
167
167
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
168
168
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
169
169
|
idShort: z.ZodString;
|
|
@@ -521,7 +521,7 @@ export declare const AssetAdministrationShellPaginationResponseDtoSchema: z.ZodO
|
|
|
521
521
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
522
522
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
523
523
|
}, z.core.$strip>>>;
|
|
524
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
524
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
525
525
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
526
526
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
527
527
|
idShort: z.ZodString;
|
|
@@ -835,7 +835,7 @@ export declare const AssetAdministrationShellModificationSchema: z.ZodObject<{
|
|
|
835
835
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
836
836
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
837
837
|
}, z.core.$strip>>>;
|
|
838
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
838
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
839
839
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
840
840
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
841
841
|
idShort: z.ZodString;
|
|
@@ -72,7 +72,7 @@ export declare const SubjectAttributesDtoSchema: z.ZodObject<{
|
|
|
72
72
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
73
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
74
74
|
}, z.core.$strip>>>;
|
|
75
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
75
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
76
76
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
77
77
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
78
|
idShort: z.ZodString;
|
|
@@ -348,7 +348,7 @@ export declare const AccessPermissionRuleDtoSchema: z.ZodObject<{
|
|
|
348
348
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
349
349
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
350
350
|
}, z.core.$strip>>>;
|
|
351
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
351
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
352
352
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
353
353
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
354
354
|
idShort: z.ZodString;
|
|
@@ -74,7 +74,7 @@ export declare const AccessControlDtoSchema: z.ZodObject<{
|
|
|
74
74
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
75
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
76
76
|
}, z.core.$strip>>>;
|
|
77
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
77
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
78
78
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
79
79
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
80
|
idShort: z.ZodString;
|
|
@@ -341,7 +341,7 @@ export declare const SecurityDtoSchema: z.ZodObject<{
|
|
|
341
341
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
342
342
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
343
343
|
}, z.core.$strip>>>;
|
|
344
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
344
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
345
345
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
346
346
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
347
347
|
idShort: z.ZodString;
|
|
@@ -608,7 +608,7 @@ export declare const DeletePolicyDtoSchema: z.ZodObject<{
|
|
|
608
608
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
609
609
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
610
610
|
}, z.core.$strip>>>;
|
|
611
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
611
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
612
612
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
613
613
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
614
614
|
idShort: z.ZodString;
|
|
@@ -71,7 +71,7 @@ export declare const PropertyJsonSchema: z.ZodObject<{
|
|
|
71
71
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
72
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
73
73
|
}, z.core.$strip>>>;
|
|
74
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
74
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
75
75
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
76
76
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
77
|
idShort: z.ZodString;
|
|
@@ -140,7 +140,7 @@ export declare const PropertyJsonSchema: z.ZodObject<{
|
|
|
140
140
|
}, z.core.$strip>>>;
|
|
141
141
|
}, z.core.$strip>;
|
|
142
142
|
export declare const PropertyModificationSchema: z.ZodObject<{
|
|
143
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
143
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
144
144
|
displayName: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
145
145
|
language: z.ZodEnum<{
|
|
146
146
|
readonly en: "en";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-json-schema.d.ts","sourceRoot":"","sources":["../../../src/aas/submodel-base/property-json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"property-json-schema.d.ts","sourceRoot":"","sources":["../../../src/aas/submodel-base/property-json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM7B,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAGrC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -6,14 +6,15 @@ const basic_json_schema_1 = require("../common/basic-json-schema");
|
|
|
6
6
|
const reference_json_schema_1 = require("../common/reference-json-schema");
|
|
7
7
|
const extension_json_schema_1 = require("../extension-json-schema");
|
|
8
8
|
const submodel_base_json_schema_1 = require("./submodel-base-json-schema");
|
|
9
|
+
const PropertyValueDtoSchema = zod_1.z.nullish(zod_1.z.coerce.string());
|
|
9
10
|
exports.PropertyJsonSchema = zod_1.z.object({
|
|
10
11
|
...submodel_base_json_schema_1.SubmodelBaseJsonSchema.shape,
|
|
11
12
|
valueType: basic_json_schema_1.ValueTypeSchema,
|
|
12
13
|
extensions: extension_json_schema_1.ExtensionJsonSchema.array().default([]),
|
|
13
|
-
value:
|
|
14
|
+
value: PropertyValueDtoSchema,
|
|
14
15
|
valueId: zod_1.z.nullish(reference_json_schema_1.ReferenceJsonSchema),
|
|
15
16
|
});
|
|
16
17
|
exports.PropertyModificationSchema = zod_1.z.object({
|
|
17
18
|
...submodel_base_json_schema_1.SubmodelBaseModificationSchema.shape,
|
|
18
|
-
value:
|
|
19
|
+
value: PropertyValueDtoSchema,
|
|
19
20
|
});
|
|
@@ -808,7 +808,7 @@ export declare function SubmodelElementSchemaJsonImpl(): z.ZodDiscriminatedUnion
|
|
|
808
808
|
value: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
809
809
|
refersTo: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
810
810
|
}, z.core.$strip>>>;
|
|
811
|
-
value: z.ZodOptional<z.ZodNullable<z.
|
|
811
|
+
value: z.ZodOptional<z.ZodNullable<z.ZodCoercedString<unknown>>>;
|
|
812
812
|
valueId: z.ZodOptional<z.ZodNullable<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
|
|
813
813
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
814
814
|
idShort: z.ZodString;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type UserDto } from "../users/user.dto";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
export interface MemberDto {
|
|
3
4
|
id: string;
|
|
4
5
|
organizationId: string;
|
|
@@ -8,4 +9,11 @@ export interface MemberDto {
|
|
|
8
9
|
updatedAt: Date;
|
|
9
10
|
user?: UserDto;
|
|
10
11
|
}
|
|
12
|
+
export declare const MemberRoleChangeDtoSchema: z.ZodObject<{
|
|
13
|
+
role: z.ZodEnum<{
|
|
14
|
+
readonly OWNER: "owner";
|
|
15
|
+
readonly MEMBER: "member";
|
|
16
|
+
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type MemberRoleChangeDto = z.infer<typeof MemberRoleChangeDtoSchema>;
|
|
11
19
|
//# sourceMappingURL=member.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.dto.d.ts","sourceRoot":"","sources":["../../src/organizations/member.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"member.dto.d.ts","sourceRoot":"","sources":["../../src/organizations/member.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,yBAAyB;;;;;iBAAwC,CAAC;AAC/E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MemberRoleChangeDtoSchema = void 0;
|
|
4
|
+
const user_dto_1 = require("../users/user.dto");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
exports.MemberRoleChangeDtoSchema = zod_1.z.object({ role: user_dto_1.MemberRoleDtoEnum });
|
|
@@ -121,10 +121,10 @@ export declare const PassportPermalinkBundleDtoSchema: z.ZodObject<{
|
|
|
121
121
|
readonly Passport: "passport";
|
|
122
122
|
}>;
|
|
123
123
|
label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
124
|
-
elementDesign: z.ZodDefault<z.
|
|
124
|
+
elementDesign: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
125
125
|
readonly BigNumber: "BigNumber";
|
|
126
126
|
}>>>>;
|
|
127
|
-
defaultComponents: z.ZodDefault<z.
|
|
127
|
+
defaultComponents: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
|
|
128
128
|
readonly AnnotatedRelationshipElement: "AnnotatedRelationshipElement";
|
|
129
129
|
readonly AssetAdministrationShell: "AssetAdministrationShell";
|
|
130
130
|
readonly BasicEventElement: "BasicEventElement";
|
|
@@ -24,10 +24,10 @@ export declare const PresentationConfigurationDtoSchema: z.ZodObject<{
|
|
|
24
24
|
readonly Passport: "passport";
|
|
25
25
|
}>;
|
|
26
26
|
label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
27
|
-
elementDesign: z.ZodDefault<z.
|
|
27
|
+
elementDesign: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
28
28
|
readonly BigNumber: "BigNumber";
|
|
29
29
|
}>>>>;
|
|
30
|
-
defaultComponents: z.ZodDefault<z.
|
|
30
|
+
defaultComponents: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
|
|
31
31
|
readonly AnnotatedRelationshipElement: "AnnotatedRelationshipElement";
|
|
32
32
|
readonly AssetAdministrationShell: "AssetAdministrationShell";
|
|
33
33
|
readonly BasicEventElement: "BasicEventElement";
|
|
@@ -69,10 +69,10 @@ export declare const PresentationConfigurationInvariantsSchema: z.ZodObject<{
|
|
|
69
69
|
label: z.ZodNullable<z.ZodString>;
|
|
70
70
|
}, z.core.$strip>;
|
|
71
71
|
export declare const PresentationConfigurationExportSchema: z.ZodObject<{
|
|
72
|
-
elementDesign: z.ZodDefault<z.
|
|
72
|
+
elementDesign: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
73
73
|
readonly BigNumber: "BigNumber";
|
|
74
74
|
}>>>>;
|
|
75
|
-
defaultComponents: z.ZodDefault<z.
|
|
75
|
+
defaultComponents: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
|
|
76
76
|
readonly AnnotatedRelationshipElement: "AnnotatedRelationshipElement";
|
|
77
77
|
readonly AssetAdministrationShell: "AssetAdministrationShell";
|
|
78
78
|
readonly BasicEventElement: "BasicEventElement";
|
|
@@ -115,10 +115,10 @@ export declare const PresentationConfigurationListResponseSchema: z.ZodArray<z.Z
|
|
|
115
115
|
readonly Passport: "passport";
|
|
116
116
|
}>;
|
|
117
117
|
label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
118
|
-
elementDesign: z.ZodDefault<z.
|
|
118
|
+
elementDesign: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
119
119
|
readonly BigNumber: "BigNumber";
|
|
120
120
|
}>>>>;
|
|
121
|
-
defaultComponents: z.ZodDefault<z.
|
|
121
|
+
defaultComponents: z.ZodDefault<z.ZodPreprocess<z.ZodRecord<z.ZodEnum<{
|
|
122
122
|
readonly AnnotatedRelationshipElement: "AnnotatedRelationshipElement";
|
|
123
123
|
readonly AssetAdministrationShell: "AssetAdministrationShell";
|
|
124
124
|
readonly BasicEventElement: "BasicEventElement";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const SetUserRoleDtoSchema: z.ZodObject<{
|
|
3
3
|
role: z.ZodEnum<{
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
readonly ADMIN: "admin";
|
|
5
|
+
readonly USER: "user";
|
|
6
|
+
readonly ANONYMOUS: "anonymous";
|
|
6
7
|
}>;
|
|
7
8
|
}, z.core.$strip>;
|
|
8
9
|
export type SetUserRoleDto = z.infer<typeof SetUserRoleDtoSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-user-role.dto.d.ts","sourceRoot":"","sources":["../../src/users/set-user-role.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"set-user-role.dto.d.ts","sourceRoot":"","sources":["../../src/users/set-user-role.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;;;iBAE/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SetUserRoleDtoSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const user_dto_1 = require("./user.dto");
|
|
5
6
|
exports.SetUserRoleDtoSchema = zod_1.z.object({
|
|
6
|
-
role:
|
|
7
|
+
role: user_dto_1.UserRoleDtoEnum,
|
|
7
8
|
});
|
package/package.json
CHANGED
|
@@ -7,17 +7,19 @@ import {
|
|
|
7
7
|
SubmodelBaseModificationSchema,
|
|
8
8
|
} from "./submodel-base-json-schema";
|
|
9
9
|
|
|
10
|
+
const PropertyValueDtoSchema = z.nullish(z.coerce.string());
|
|
11
|
+
|
|
10
12
|
export const PropertyJsonSchema = z.object({
|
|
11
13
|
...SubmodelBaseJsonSchema.shape,
|
|
12
14
|
valueType: ValueTypeSchema,
|
|
13
15
|
extensions: ExtensionJsonSchema.array().default([]),
|
|
14
|
-
value:
|
|
16
|
+
value: PropertyValueDtoSchema,
|
|
15
17
|
valueId: z.nullish(ReferenceJsonSchema),
|
|
16
18
|
});
|
|
17
19
|
|
|
18
20
|
export const PropertyModificationSchema = z.object({
|
|
19
21
|
...SubmodelBaseModificationSchema.shape,
|
|
20
|
-
value:
|
|
22
|
+
value: PropertyValueDtoSchema,
|
|
21
23
|
});
|
|
22
24
|
|
|
23
25
|
export type PropertyResponseDto = z.infer<typeof PropertyJsonSchema>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { MemberRoleDtoEnum, type UserDto } from "../users/user.dto";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
|
|
3
4
|
export interface MemberDto {
|
|
4
5
|
id: string;
|
|
@@ -9,3 +10,6 @@ export interface MemberDto {
|
|
|
9
10
|
updatedAt: Date;
|
|
10
11
|
user?: UserDto;
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export const MemberRoleChangeDtoSchema = z.object({ role: MemberRoleDtoEnum });
|
|
15
|
+
export type MemberRoleChangeDto = z.infer<typeof MemberRoleChangeDtoSchema>;
|