@open-dpp/dto 2.9.0 → 3.0.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 +560 -20
- package/dist/aas/asset-administration-shell-json-schema.d.ts.map +1 -1
- package/dist/aas/common/basic-json-schema.d.ts +56 -2
- package/dist/aas/common/basic-json-schema.d.ts.map +1 -1
- package/dist/aas/common/language-text-json-schema.d.ts +28 -1
- package/dist/aas/common/language-text-json-schema.d.ts.map +1 -1
- package/dist/aas/concept-description-json-schema.d.ts +56 -2
- package/dist/aas/concept-description-json-schema.d.ts.map +1 -1
- package/dist/aas/enums/language-enum.d.ts +58 -2
- package/dist/aas/enums/language-enum.d.ts.map +1 -1
- package/dist/aas/enums/language-enum.js +38 -3
- package/dist/aas/environment-json-schema.d.ts +28 -1
- package/dist/aas/environment-json-schema.d.ts.map +1 -1
- package/dist/aas/security/access-permission-rule.dto.d.ts +224 -8
- package/dist/aas/security/access-permission-rule.dto.d.ts.map +1 -1
- package/dist/aas/security/security.dto.d.ts +280 -10
- package/dist/aas/security/security.dto.d.ts.map +1 -1
- package/dist/aas/submodel-base/annotated-relationship-element-json-schema.d.ts +120 -12
- package/dist/aas/submodel-base/annotated-relationship-element-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/blob-json-schema.d.ts +56 -2
- package/dist/aas/submodel-base/blob-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/create-group-from-column-schema.d.ts +4 -4
- package/dist/aas/submodel-base/entity-type-json-schema.d.ts +120 -12
- package/dist/aas/submodel-base/entity-type-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/file-json-schema.d.ts +112 -4
- package/dist/aas/submodel-base/file-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/multi-language-property-json-schema.d.ts +84 -3
- package/dist/aas/submodel-base/multi-language-property-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/property-json-schema.d.ts +112 -4
- package/dist/aas/submodel-base/property-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/range-json-schema.d.ts +56 -2
- package/dist/aas/submodel-base/range-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/reference-element-json-schema.d.ts +112 -4
- package/dist/aas/submodel-base/reference-element-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/relationship-element-json-schema.d.ts +56 -2
- package/dist/aas/submodel-base/relationship-element-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/submodel-base-json-schema.d.ts +112 -4
- package/dist/aas/submodel-base/submodel-base-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/submodel-element-collection-json-schema.d.ts +232 -16
- package/dist/aas/submodel-base/submodel-element-collection-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/submodel-element-list-json-schema.d.ts +232 -16
- package/dist/aas/submodel-base/submodel-element-list-json-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/submodel-element-modification-schema.d.ts +56 -2
- package/dist/aas/submodel-base/submodel-element-modification-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/submodel-element-schema.d.ts +720 -45
- package/dist/aas/submodel-base/submodel-element-schema.d.ts.map +1 -1
- package/dist/aas/submodel-base/submodel-json-schema.d.ts +236 -20
- package/dist/aas/submodel-base/submodel-json-schema.d.ts.map +1 -1
- package/dist/activity-history/activity-history.dto.d.ts +28 -1
- package/dist/activity-history/activity-history.dto.d.ts.map +1 -1
- package/dist/digital-product-document/digital-product-document.schemas.d.ts +28 -1
- package/dist/digital-product-document/digital-product-document.schemas.d.ts.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/passports/passport.dto.d.ts +112 -4
- package/dist/passports/passport.dto.d.ts.map +1 -1
- package/dist/permalinks/permalink.dto.d.ts +3718 -10
- package/dist/permalinks/permalink.dto.d.ts.map +1 -1
- package/dist/permalinks/permalink.dto.js +89 -6
- package/dist/shared/permalink-base-url.schema.d.ts +1 -0
- package/dist/shared/permalink-base-url.schema.d.ts.map +1 -1
- package/dist/shared/permalink-base-url.schema.js +9 -0
- package/dist/templates/template.dto.d.ts +112 -4
- package/dist/templates/template.dto.d.ts.map +1 -1
- package/dist/unique-product-identifiers/create-internal-unique-product-identifier.dto.d.ts +6 -0
- package/dist/unique-product-identifiers/create-internal-unique-product-identifier.dto.d.ts.map +1 -0
- package/dist/unique-product-identifiers/create-internal-unique-product-identifier.dto.js +9 -0
- package/dist/unique-product-identifiers/create-unique-product-identifier.dto.d.ts +9 -0
- package/dist/unique-product-identifiers/create-unique-product-identifier.dto.d.ts.map +1 -0
- package/dist/unique-product-identifiers/create-unique-product-identifier.dto.js +13 -0
- package/dist/unique-product-identifiers/gs1/gs1-ai-description.d.ts +6 -4
- package/dist/unique-product-identifiers/gs1/gs1-ai-description.d.ts.map +1 -1
- package/dist/unique-product-identifiers/gs1/gs1-ai-description.js +13 -3
- package/dist/unique-product-identifiers/gs1/gs1-digital-link.d.ts +10 -0
- package/dist/unique-product-identifiers/gs1/gs1-digital-link.d.ts.map +1 -1
- package/dist/unique-product-identifiers/gs1/gs1-digital-link.js +20 -6
- package/dist/unique-product-identifiers/unique-product-identifier-list-item.dto.d.ts +104 -0
- package/dist/unique-product-identifiers/unique-product-identifier-list-item.dto.d.ts.map +1 -0
- package/dist/unique-product-identifiers/unique-product-identifier-list-item.dto.js +42 -0
- package/dist/unique-product-identifiers/unique-product-identifier-type.d.ts +1 -1
- package/dist/unique-product-identifiers/update-unique-product-identifier.dto.d.ts +8 -0
- package/dist/unique-product-identifiers/update-unique-product-identifier.dto.d.ts.map +1 -0
- package/dist/unique-product-identifiers/update-unique-product-identifier.dto.js +12 -0
- package/dist/users/display-language.dto.d.ts +11 -0
- package/dist/users/display-language.dto.d.ts.map +1 -0
- package/dist/users/display-language.dto.js +9 -0
- package/dist/users/update-profile.dto.js +2 -2
- package/dist/users/user.dto.d.ts.map +1 -1
- package/dist/users/user.dto.js +2 -2
- package/package.json +1 -1
- package/src/aas/enums/language-enum.ts +41 -2
- package/src/index.ts +5 -0
- package/src/permalinks/permalink.dto.spec.ts +469 -0
- package/src/permalinks/permalink.dto.ts +103 -5
- package/src/shared/permalink-base-url.schema.spec.ts +17 -1
- package/src/shared/permalink-base-url.schema.ts +8 -0
- package/src/unique-product-identifiers/create-internal-unique-product-identifier.dto.ts +11 -0
- package/src/unique-product-identifiers/create-unique-product-identifier.dto.ts +15 -0
- package/src/unique-product-identifiers/gs1/gs1-ai-description.spec.ts +14 -0
- package/src/unique-product-identifiers/gs1/gs1-ai-description.ts +16 -5
- package/src/unique-product-identifiers/gs1/gs1-digital-link.spec.ts +16 -0
- package/src/unique-product-identifiers/gs1/gs1-digital-link.ts +22 -6
- package/src/unique-product-identifiers/unique-product-identifier-list-item.dto.ts +64 -0
- package/src/unique-product-identifiers/update-unique-product-identifier.dto.ts +14 -0
- package/src/users/display-language.dto.ts +9 -0
- package/src/users/update-profile.dto.spec.ts +1 -1
- package/src/users/update-profile.dto.ts +2 -2
- package/src/users/user.dto.ts +2 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UniqueProductIdentifierPermalinkSummaryDtoSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodUUID;
|
|
4
|
+
kind: z.ZodEnum<{
|
|
5
|
+
"open-dpp": "open-dpp";
|
|
6
|
+
"gs1-link": "gs1-link";
|
|
7
|
+
}>;
|
|
8
|
+
publicUrl: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type UniqueProductIdentifierPermalinkSummaryDto = z.infer<typeof UniqueProductIdentifierPermalinkSummaryDtoSchema>;
|
|
11
|
+
export declare const UniqueProductIdentifierListItemDtoSchema: z.ZodObject<{
|
|
12
|
+
uuid: z.ZodUUID;
|
|
13
|
+
referenceId: z.ZodUUID;
|
|
14
|
+
type: z.ZodEnum<{
|
|
15
|
+
readonly OPEN_DPP_UUID: "OPEN_DPP_UUID";
|
|
16
|
+
readonly GS1: "GS1";
|
|
17
|
+
readonly GTIN: "GTIN";
|
|
18
|
+
readonly EAN: "EAN";
|
|
19
|
+
}>;
|
|
20
|
+
gtin: z.ZodNullable<z.ZodString>;
|
|
21
|
+
batch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
serial: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
23
|
+
granularity: z.ZodNullable<z.ZodEnum<{
|
|
24
|
+
batch: "batch";
|
|
25
|
+
model: "model";
|
|
26
|
+
item: "item";
|
|
27
|
+
}>>;
|
|
28
|
+
digitalLink: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
passportPublished: z.ZodBoolean;
|
|
30
|
+
permalink: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
31
|
+
id: z.ZodUUID;
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
"open-dpp": "open-dpp";
|
|
34
|
+
"gs1-link": "gs1-link";
|
|
35
|
+
}>;
|
|
36
|
+
publicUrl: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type UniqueProductIdentifierListItemDto = z.infer<typeof UniqueProductIdentifierListItemDtoSchema>;
|
|
40
|
+
export declare const UniqueProductIdentifierListDtoSchema: z.ZodArray<z.ZodObject<{
|
|
41
|
+
uuid: z.ZodUUID;
|
|
42
|
+
referenceId: z.ZodUUID;
|
|
43
|
+
type: z.ZodEnum<{
|
|
44
|
+
readonly OPEN_DPP_UUID: "OPEN_DPP_UUID";
|
|
45
|
+
readonly GS1: "GS1";
|
|
46
|
+
readonly GTIN: "GTIN";
|
|
47
|
+
readonly EAN: "EAN";
|
|
48
|
+
}>;
|
|
49
|
+
gtin: z.ZodNullable<z.ZodString>;
|
|
50
|
+
batch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
serial: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
52
|
+
granularity: z.ZodNullable<z.ZodEnum<{
|
|
53
|
+
batch: "batch";
|
|
54
|
+
model: "model";
|
|
55
|
+
item: "item";
|
|
56
|
+
}>>;
|
|
57
|
+
digitalLink: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
passportPublished: z.ZodBoolean;
|
|
59
|
+
permalink: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
60
|
+
id: z.ZodUUID;
|
|
61
|
+
kind: z.ZodEnum<{
|
|
62
|
+
"open-dpp": "open-dpp";
|
|
63
|
+
"gs1-link": "gs1-link";
|
|
64
|
+
}>;
|
|
65
|
+
publicUrl: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
export type UniqueProductIdentifierListDto = z.infer<typeof UniqueProductIdentifierListDtoSchema>;
|
|
69
|
+
export declare const UniqueProductIdentifierPaginationDtoSchema: z.ZodObject<{
|
|
70
|
+
result: z.ZodArray<z.ZodObject<{
|
|
71
|
+
uuid: z.ZodUUID;
|
|
72
|
+
referenceId: z.ZodUUID;
|
|
73
|
+
type: z.ZodEnum<{
|
|
74
|
+
readonly OPEN_DPP_UUID: "OPEN_DPP_UUID";
|
|
75
|
+
readonly GS1: "GS1";
|
|
76
|
+
readonly GTIN: "GTIN";
|
|
77
|
+
readonly EAN: "EAN";
|
|
78
|
+
}>;
|
|
79
|
+
gtin: z.ZodNullable<z.ZodString>;
|
|
80
|
+
batch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
serial: z.ZodOptional<z.ZodNullable<z.ZodNullable<z.ZodString>>>;
|
|
82
|
+
granularity: z.ZodNullable<z.ZodEnum<{
|
|
83
|
+
batch: "batch";
|
|
84
|
+
model: "model";
|
|
85
|
+
item: "item";
|
|
86
|
+
}>>;
|
|
87
|
+
digitalLink: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
passportPublished: z.ZodBoolean;
|
|
89
|
+
permalink: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
90
|
+
id: z.ZodUUID;
|
|
91
|
+
kind: z.ZodEnum<{
|
|
92
|
+
"open-dpp": "open-dpp";
|
|
93
|
+
"gs1-link": "gs1-link";
|
|
94
|
+
}>;
|
|
95
|
+
publicUrl: z.ZodString;
|
|
96
|
+
}, z.core.$strip>>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
paging_metadata: z.ZodObject<{
|
|
99
|
+
cursor: z.ZodNullable<z.ZodString>;
|
|
100
|
+
total_count: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type UniqueProductIdentifierPaginationDto = z.infer<typeof UniqueProductIdentifierPaginationDtoSchema>;
|
|
104
|
+
//# sourceMappingURL=unique-product-identifier-list-item.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unique-product-identifier-list-item.dto.d.ts","sourceRoot":"","sources":["../../src/unique-product-identifiers/unique-product-identifier-list-item.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,gDAAgD;;;;;;;iBAMH,CAAC;AAE3D,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,gDAAgD,CACxD,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBH,CAAC;AAEnD,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEhD,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKZ,CAAC;AAE5C,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UniqueProductIdentifierPaginationDtoSchema = exports.UniqueProductIdentifierListDtoSchema = exports.UniqueProductIdentifierListItemDtoSchema = exports.UniqueProductIdentifierPermalinkSummaryDtoSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const unique_product_identifier_type_1 = require("./unique-product-identifier-type");
|
|
6
|
+
const gs1_digital_link_1 = require("./gs1/gs1-digital-link");
|
|
7
|
+
const permalink_dto_1 = require("../permalinks/permalink.dto");
|
|
8
|
+
const pagination_dto_1 = require("../shared/pagination.dto");
|
|
9
|
+
exports.UniqueProductIdentifierPermalinkSummaryDtoSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
id: zod_1.z.uuid(),
|
|
12
|
+
kind: permalink_dto_1.PermalinkKindSchema,
|
|
13
|
+
publicUrl: zod_1.z.string().url(),
|
|
14
|
+
})
|
|
15
|
+
.meta({ id: "UniqueProductIdentifierPermalinkSummary" });
|
|
16
|
+
exports.UniqueProductIdentifierListItemDtoSchema = zod_1.z
|
|
17
|
+
.object({
|
|
18
|
+
uuid: zod_1.z.uuid(),
|
|
19
|
+
referenceId: zod_1.z.uuid(),
|
|
20
|
+
type: unique_product_identifier_type_1.UniqueProductIdentifierTypeSchema,
|
|
21
|
+
gtin: gs1_digital_link_1.Gtin14Schema.nullable(),
|
|
22
|
+
batch: gs1_digital_link_1.Cset82ComponentSchema.nullish().overwrite((v) => v ?? null),
|
|
23
|
+
serial: gs1_digital_link_1.Cset82ComponentSchema.nullable()
|
|
24
|
+
.nullish()
|
|
25
|
+
.overwrite((v) => v ?? null),
|
|
26
|
+
granularity: unique_product_identifier_type_1.Gs1GranularitySchema.nullable(),
|
|
27
|
+
digitalLink: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.url()
|
|
30
|
+
.nullish()
|
|
31
|
+
.overwrite((v) => v ?? null),
|
|
32
|
+
passportPublished: zod_1.z.boolean(),
|
|
33
|
+
permalink: exports.UniqueProductIdentifierPermalinkSummaryDtoSchema.nullish().overwrite((v) => v ?? null),
|
|
34
|
+
})
|
|
35
|
+
.meta({ id: "UniqueProductIdentifierListItem" });
|
|
36
|
+
exports.UniqueProductIdentifierListDtoSchema = zod_1.z.array(exports.UniqueProductIdentifierListItemDtoSchema);
|
|
37
|
+
exports.UniqueProductIdentifierPaginationDtoSchema = zod_1.z
|
|
38
|
+
.object({
|
|
39
|
+
...pagination_dto_1.PagingMetadataDtoSchema.shape,
|
|
40
|
+
result: exports.UniqueProductIdentifierListItemDtoSchema.array(),
|
|
41
|
+
})
|
|
42
|
+
.meta({ id: "UniqueProductIdentifiers" });
|
|
@@ -28,8 +28,8 @@ export type UniqueProductIdentifierTypeValue = z.infer<typeof UniqueProductIdent
|
|
|
28
28
|
* - `item` — GTIN + serial (AI `21`), optionally also batch
|
|
29
29
|
*/
|
|
30
30
|
export declare const Gs1GranularitySchema: z.ZodEnum<{
|
|
31
|
-
model: "model";
|
|
32
31
|
batch: "batch";
|
|
32
|
+
model: "model";
|
|
33
33
|
item: "item";
|
|
34
34
|
}>;
|
|
35
35
|
export type Gs1Granularity = z.infer<typeof Gs1GranularitySchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdateGs1UniqueProductIdentifierRequestSchema: z.ZodObject<{
|
|
3
|
+
gtin: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
4
|
+
batch: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodTransform<string | undefined, string>>, z.ZodOptional<z.ZodString>>>;
|
|
5
|
+
serial: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodTransform<string | undefined, string>>, z.ZodOptional<z.ZodString>>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type UpdateGs1UniqueProductIdentifierRequest = z.infer<typeof UpdateGs1UniqueProductIdentifierRequestSchema>;
|
|
8
|
+
//# sourceMappingURL=update-unique-product-identifier.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-unique-product-identifier.dto.d.ts","sourceRoot":"","sources":["../../src/unique-product-identifiers/update-unique-product-identifier.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,6CAA6C;;;;iBAMA,CAAC;AAE3D,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,6CAA6C,CACrD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateGs1UniqueProductIdentifierRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const gs1_digital_link_1 = require("./gs1/gs1-digital-link");
|
|
6
|
+
exports.UpdateGs1UniqueProductIdentifierRequestSchema = zod_1.z
|
|
7
|
+
.object({
|
|
8
|
+
gtin: gs1_digital_link_1.GtinInputSchema,
|
|
9
|
+
batch: gs1_digital_link_1.Cset82ComponentInputSchema.optional(),
|
|
10
|
+
serial: gs1_digital_link_1.Cset82ComponentInputSchema.optional(),
|
|
11
|
+
})
|
|
12
|
+
.meta({ id: "UpdateGs1UniqueProductIdentifierRequest" });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DisplayLanguage: {
|
|
3
|
+
readonly en: "en";
|
|
4
|
+
readonly de: "de";
|
|
5
|
+
};
|
|
6
|
+
export declare const DisplayLanguageEnum: z.ZodEnum<{
|
|
7
|
+
readonly en: "en";
|
|
8
|
+
readonly de: "de";
|
|
9
|
+
}>;
|
|
10
|
+
export type DisplayLanguageType = z.infer<typeof DisplayLanguageEnum>;
|
|
11
|
+
//# sourceMappingURL=display-language.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-language.dto.d.ts","sourceRoot":"","sources":["../../src/users/display-language.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;EAA0B,CAAC;AAC3D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DisplayLanguageEnum = exports.DisplayLanguage = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.DisplayLanguage = {
|
|
6
|
+
en: "en",
|
|
7
|
+
de: "de",
|
|
8
|
+
};
|
|
9
|
+
exports.DisplayLanguageEnum = zod_1.z.enum(exports.DisplayLanguage);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateProfileDtoSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const display_language_dto_1 = require("./display-language.dto");
|
|
6
6
|
exports.UpdateProfileDtoSchema = zod_1.z.object({
|
|
7
7
|
// Empty string is a valid "cleared name" — admin-invited users have firstName: "".
|
|
8
8
|
// No .min(1): it would lock empty-name users out of saving any profile change.
|
|
9
9
|
firstName: zod_1.z.string().trim().max(100).optional(),
|
|
10
10
|
lastName: zod_1.z.string().trim().max(100).optional(),
|
|
11
|
-
preferredLanguage:
|
|
11
|
+
preferredLanguage: display_language_dto_1.DisplayLanguageEnum.optional(),
|
|
12
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.dto.d.ts","sourceRoot":"","sources":["../../src/users/user.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.dto.d.ts","sourceRoot":"","sources":["../../src/users/user.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;iBAWxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX,eAAO,MAAM,eAAe;;;;EAAsB,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;EAAwB,CAAC;AACvD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/users/user.dto.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MemberRoleDtoEnum = exports.MemberRoleDto = exports.UserRoleDtoEnum = exports.UserRoleDto = exports.UserDtoSchema = void 0;
|
|
4
|
-
const language_enum_1 = require("../aas/enums/language-enum");
|
|
5
4
|
const zod_1 = require("zod");
|
|
5
|
+
const display_language_dto_1 = require("./display-language.dto");
|
|
6
6
|
exports.UserDtoSchema = zod_1.z.object({
|
|
7
7
|
id: zod_1.z.string(),
|
|
8
8
|
email: zod_1.z.email(),
|
|
@@ -11,7 +11,7 @@ exports.UserDtoSchema = zod_1.z.object({
|
|
|
11
11
|
name: zod_1.z.string().nullable(),
|
|
12
12
|
image: zod_1.z.string().nullable(),
|
|
13
13
|
emailVerified: zod_1.z.boolean(),
|
|
14
|
-
preferredLanguage:
|
|
14
|
+
preferredLanguage: display_language_dto_1.DisplayLanguageEnum,
|
|
15
15
|
createdAt: zod_1.z.coerce.date(),
|
|
16
16
|
updatedAt: zod_1.z.coerce.date(),
|
|
17
17
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,47 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
export const Language = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
bg: "bg", // Bulgarian
|
|
5
|
+
cs: "cs", // Czech
|
|
6
|
+
da: "da", // Danish
|
|
7
|
+
de: "de", // German
|
|
8
|
+
el: "el", // Greek
|
|
9
|
+
en: "en", // English
|
|
10
|
+
es: "es", // Spanish
|
|
11
|
+
et: "et", // Estonian
|
|
12
|
+
fi: "fi", // Finnish
|
|
13
|
+
fr: "fr", // French
|
|
14
|
+
hr: "hr", // Croatian
|
|
15
|
+
hu: "hu", // Hungarian
|
|
16
|
+
it: "it", // Italian
|
|
17
|
+
lt: "lt", // Lithuanian
|
|
18
|
+
lv: "lv", // Latvian
|
|
19
|
+
nl: "nl", // Dutch
|
|
20
|
+
no: "no", // Norwegian
|
|
21
|
+
pl: "pl", // Polish
|
|
22
|
+
pt: "pt", // Portuguese
|
|
23
|
+
ro: "ro", // Romanian
|
|
24
|
+
ru: "ru", // Russian
|
|
25
|
+
sk: "sk", // Slovak
|
|
26
|
+
sl: "sl", // Slovenian
|
|
27
|
+
sv: "sv", // Swedish
|
|
28
|
+
tr: "tr", // Turkish
|
|
29
|
+
uk: "uk", // Ukrainian
|
|
30
|
+
bn: "bn", // Bengali
|
|
31
|
+
"zh-Hans": "zh-Hans", // Chinese (Simplified)
|
|
32
|
+
"zh-Hant": "zh-Hant", // Chinese (Traditional)
|
|
6
33
|
} as const;
|
|
7
34
|
export const LanguageEnum = z.enum(Language);
|
|
8
35
|
export type LanguageType = z.infer<typeof LanguageEnum>;
|
|
36
|
+
|
|
37
|
+
export const BcpLanguageTagSchema = z.string().refine(
|
|
38
|
+
(tag) => {
|
|
39
|
+
try {
|
|
40
|
+
return Intl.getCanonicalLocales(tag).length > 0;
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{ message: "Invalid BCP 47 language tag" },
|
|
46
|
+
);
|
|
47
|
+
export type BcpLanguageTagType = z.infer<typeof BcpLanguageTagSchema>;
|
package/src/index.ts
CHANGED
|
@@ -84,8 +84,13 @@ export * from "./users/pending-email-change.dto";
|
|
|
84
84
|
export * from "./users/request-email-change.dto";
|
|
85
85
|
export * from "./users/set-user-role.dto";
|
|
86
86
|
export * from "./users/update-profile.dto";
|
|
87
|
+
export * from "./users/display-language.dto";
|
|
87
88
|
export * from "./users/user.dto";
|
|
88
89
|
|
|
89
90
|
export * from "./activity-history/activity-history.dto";
|
|
90
91
|
export * from "./activity-history/change-event-types.dto";
|
|
91
92
|
export * from "./activity-history/activity-types.dto";
|
|
93
|
+
export * from "./unique-product-identifiers/unique-product-identifier-list-item.dto";
|
|
94
|
+
export * from "./unique-product-identifiers/create-unique-product-identifier.dto";
|
|
95
|
+
export * from "./unique-product-identifiers/create-internal-unique-product-identifier.dto";
|
|
96
|
+
export * from "./unique-product-identifiers/update-unique-product-identifier.dto";
|