@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.
Files changed (109) hide show
  1. package/dist/aas/asset-administration-shell-json-schema.d.ts +560 -20
  2. package/dist/aas/asset-administration-shell-json-schema.d.ts.map +1 -1
  3. package/dist/aas/common/basic-json-schema.d.ts +56 -2
  4. package/dist/aas/common/basic-json-schema.d.ts.map +1 -1
  5. package/dist/aas/common/language-text-json-schema.d.ts +28 -1
  6. package/dist/aas/common/language-text-json-schema.d.ts.map +1 -1
  7. package/dist/aas/concept-description-json-schema.d.ts +56 -2
  8. package/dist/aas/concept-description-json-schema.d.ts.map +1 -1
  9. package/dist/aas/enums/language-enum.d.ts +58 -2
  10. package/dist/aas/enums/language-enum.d.ts.map +1 -1
  11. package/dist/aas/enums/language-enum.js +38 -3
  12. package/dist/aas/environment-json-schema.d.ts +28 -1
  13. package/dist/aas/environment-json-schema.d.ts.map +1 -1
  14. package/dist/aas/security/access-permission-rule.dto.d.ts +224 -8
  15. package/dist/aas/security/access-permission-rule.dto.d.ts.map +1 -1
  16. package/dist/aas/security/security.dto.d.ts +280 -10
  17. package/dist/aas/security/security.dto.d.ts.map +1 -1
  18. package/dist/aas/submodel-base/annotated-relationship-element-json-schema.d.ts +120 -12
  19. package/dist/aas/submodel-base/annotated-relationship-element-json-schema.d.ts.map +1 -1
  20. package/dist/aas/submodel-base/blob-json-schema.d.ts +56 -2
  21. package/dist/aas/submodel-base/blob-json-schema.d.ts.map +1 -1
  22. package/dist/aas/submodel-base/create-group-from-column-schema.d.ts +4 -4
  23. package/dist/aas/submodel-base/entity-type-json-schema.d.ts +120 -12
  24. package/dist/aas/submodel-base/entity-type-json-schema.d.ts.map +1 -1
  25. package/dist/aas/submodel-base/file-json-schema.d.ts +112 -4
  26. package/dist/aas/submodel-base/file-json-schema.d.ts.map +1 -1
  27. package/dist/aas/submodel-base/multi-language-property-json-schema.d.ts +84 -3
  28. package/dist/aas/submodel-base/multi-language-property-json-schema.d.ts.map +1 -1
  29. package/dist/aas/submodel-base/property-json-schema.d.ts +112 -4
  30. package/dist/aas/submodel-base/property-json-schema.d.ts.map +1 -1
  31. package/dist/aas/submodel-base/range-json-schema.d.ts +56 -2
  32. package/dist/aas/submodel-base/range-json-schema.d.ts.map +1 -1
  33. package/dist/aas/submodel-base/reference-element-json-schema.d.ts +112 -4
  34. package/dist/aas/submodel-base/reference-element-json-schema.d.ts.map +1 -1
  35. package/dist/aas/submodel-base/relationship-element-json-schema.d.ts +56 -2
  36. package/dist/aas/submodel-base/relationship-element-json-schema.d.ts.map +1 -1
  37. package/dist/aas/submodel-base/submodel-base-json-schema.d.ts +112 -4
  38. package/dist/aas/submodel-base/submodel-base-json-schema.d.ts.map +1 -1
  39. package/dist/aas/submodel-base/submodel-element-collection-json-schema.d.ts +232 -16
  40. package/dist/aas/submodel-base/submodel-element-collection-json-schema.d.ts.map +1 -1
  41. package/dist/aas/submodel-base/submodel-element-list-json-schema.d.ts +232 -16
  42. package/dist/aas/submodel-base/submodel-element-list-json-schema.d.ts.map +1 -1
  43. package/dist/aas/submodel-base/submodel-element-modification-schema.d.ts +56 -2
  44. package/dist/aas/submodel-base/submodel-element-modification-schema.d.ts.map +1 -1
  45. package/dist/aas/submodel-base/submodel-element-schema.d.ts +720 -45
  46. package/dist/aas/submodel-base/submodel-element-schema.d.ts.map +1 -1
  47. package/dist/aas/submodel-base/submodel-json-schema.d.ts +236 -20
  48. package/dist/aas/submodel-base/submodel-json-schema.d.ts.map +1 -1
  49. package/dist/activity-history/activity-history.dto.d.ts +28 -1
  50. package/dist/activity-history/activity-history.dto.d.ts.map +1 -1
  51. package/dist/digital-product-document/digital-product-document.schemas.d.ts +28 -1
  52. package/dist/digital-product-document/digital-product-document.schemas.d.ts.map +1 -1
  53. package/dist/index.d.ts +5 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +5 -0
  56. package/dist/passports/passport.dto.d.ts +112 -4
  57. package/dist/passports/passport.dto.d.ts.map +1 -1
  58. package/dist/permalinks/permalink.dto.d.ts +3718 -10
  59. package/dist/permalinks/permalink.dto.d.ts.map +1 -1
  60. package/dist/permalinks/permalink.dto.js +89 -6
  61. package/dist/shared/permalink-base-url.schema.d.ts +1 -0
  62. package/dist/shared/permalink-base-url.schema.d.ts.map +1 -1
  63. package/dist/shared/permalink-base-url.schema.js +9 -0
  64. package/dist/templates/template.dto.d.ts +112 -4
  65. package/dist/templates/template.dto.d.ts.map +1 -1
  66. package/dist/unique-product-identifiers/create-internal-unique-product-identifier.dto.d.ts +6 -0
  67. package/dist/unique-product-identifiers/create-internal-unique-product-identifier.dto.d.ts.map +1 -0
  68. package/dist/unique-product-identifiers/create-internal-unique-product-identifier.dto.js +9 -0
  69. package/dist/unique-product-identifiers/create-unique-product-identifier.dto.d.ts +9 -0
  70. package/dist/unique-product-identifiers/create-unique-product-identifier.dto.d.ts.map +1 -0
  71. package/dist/unique-product-identifiers/create-unique-product-identifier.dto.js +13 -0
  72. package/dist/unique-product-identifiers/gs1/gs1-ai-description.d.ts +6 -4
  73. package/dist/unique-product-identifiers/gs1/gs1-ai-description.d.ts.map +1 -1
  74. package/dist/unique-product-identifiers/gs1/gs1-ai-description.js +13 -3
  75. package/dist/unique-product-identifiers/gs1/gs1-digital-link.d.ts +10 -0
  76. package/dist/unique-product-identifiers/gs1/gs1-digital-link.d.ts.map +1 -1
  77. package/dist/unique-product-identifiers/gs1/gs1-digital-link.js +20 -6
  78. package/dist/unique-product-identifiers/unique-product-identifier-list-item.dto.d.ts +104 -0
  79. package/dist/unique-product-identifiers/unique-product-identifier-list-item.dto.d.ts.map +1 -0
  80. package/dist/unique-product-identifiers/unique-product-identifier-list-item.dto.js +42 -0
  81. package/dist/unique-product-identifiers/unique-product-identifier-type.d.ts +1 -1
  82. package/dist/unique-product-identifiers/update-unique-product-identifier.dto.d.ts +8 -0
  83. package/dist/unique-product-identifiers/update-unique-product-identifier.dto.d.ts.map +1 -0
  84. package/dist/unique-product-identifiers/update-unique-product-identifier.dto.js +12 -0
  85. package/dist/users/display-language.dto.d.ts +11 -0
  86. package/dist/users/display-language.dto.d.ts.map +1 -0
  87. package/dist/users/display-language.dto.js +9 -0
  88. package/dist/users/update-profile.dto.js +2 -2
  89. package/dist/users/user.dto.d.ts.map +1 -1
  90. package/dist/users/user.dto.js +2 -2
  91. package/package.json +1 -1
  92. package/src/aas/enums/language-enum.ts +41 -2
  93. package/src/index.ts +5 -0
  94. package/src/permalinks/permalink.dto.spec.ts +469 -0
  95. package/src/permalinks/permalink.dto.ts +103 -5
  96. package/src/shared/permalink-base-url.schema.spec.ts +17 -1
  97. package/src/shared/permalink-base-url.schema.ts +8 -0
  98. package/src/unique-product-identifiers/create-internal-unique-product-identifier.dto.ts +11 -0
  99. package/src/unique-product-identifiers/create-unique-product-identifier.dto.ts +15 -0
  100. package/src/unique-product-identifiers/gs1/gs1-ai-description.spec.ts +14 -0
  101. package/src/unique-product-identifiers/gs1/gs1-ai-description.ts +16 -5
  102. package/src/unique-product-identifiers/gs1/gs1-digital-link.spec.ts +16 -0
  103. package/src/unique-product-identifiers/gs1/gs1-digital-link.ts +22 -6
  104. package/src/unique-product-identifiers/unique-product-identifier-list-item.dto.ts +64 -0
  105. package/src/unique-product-identifiers/update-unique-product-identifier.dto.ts +14 -0
  106. package/src/users/display-language.dto.ts +9 -0
  107. package/src/users/update-profile.dto.spec.ts +1 -1
  108. package/src/users/update-profile.dto.ts +2 -2
  109. package/src/users/user.dto.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"permalink.dto.d.ts","sourceRoot":"","sources":["../../src/permalinks/permalink.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAAoB,CAAC;AAI3E,eAAO,MAAM,mBAAmB,aAM8C,CAAC;AAE/E,MAAM,MAAM,aAAa,GA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OA,CAAC;AAE1C,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOH,CAAC;AAE3C,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PassportPermalinkBundleDtoSchema = exports.PermalinkUpdateRequestSchema = exports.PermalinkMetadataDtoSchema = exports.PermalinkListDtoSchema = exports.PermalinkPublicDtoSchema = exports.PermalinkFallbackBaseUrlSourceSchema = exports.PermalinkDtoSchema = exports.PermalinkInvariantsSchema = exports.PermalinkPublishedUrlSchema = exports.PermalinkSchema = exports.PermalinkSlugSchema = exports.PERMALINK_RESERVED_SLUGS = void 0;
3
+ exports.PassportPermalinkBundleDtoSchema = exports.PermalinkUpdateRequestSchema = exports.PermalinkCreateRequestSchema = exports.PermalinkMetadataDtoSchema = exports.PermalinkPaginationDtoSchema = exports.PermalinkListDtoSchema = exports.PermalinkPublicDtoSchema = exports.PermalinkFallbackBaseUrlSourceSchema = exports.PermalinkDtoSchema = exports.PermalinkInvariantsSchema = exports.PermalinkKindSchema = exports.LEGACY_PERMALINK_KIND = exports.PermalinkKind = exports.PermalinkPublishedUrlSchema = exports.PermalinkSchema = exports.PermalinkSlugSchema = exports.PERMALINK_RESERVED_SLUGS = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const branding_dto_1 = require("../branding/branding.dto");
6
+ const gs1_data_attributes_dto_1 = require("../unique-product-identifiers/gs1/gs1-data-attributes.dto");
6
7
  const passport_dto_1 = require("../passports/passport.dto");
7
8
  const presentation_configuration_dto_1 = require("../presentation-configurations/presentation-configuration.dto");
8
9
  const digital_product_document_schemas_1 = require("../digital-product-document/digital-product-document.schemas");
10
+ const pagination_dto_1 = require("../shared/pagination.dto");
9
11
  const permalink_base_url_schema_1 = require("../shared/permalink-base-url.schema");
10
12
  exports.PERMALINK_RESERVED_SLUGS = ["new", "edit"];
11
13
  const reservedSlugSet = new Set(exports.PERMALINK_RESERVED_SLUGS);
@@ -18,20 +20,71 @@ exports.PermalinkSlugSchema = zod_1.z
18
20
  .refine((slug) => !reservedSlugSet.has(slug), { error: "Slug is reserved" });
19
21
  exports.PermalinkSchema = zod_1.z.union([zod_1.z.uuid(), exports.PermalinkSlugSchema]);
20
22
  exports.PermalinkPublishedUrlSchema = zod_1.z.string().url().max(2048);
21
- exports.PermalinkInvariantsSchema = zod_1.z.object({
22
- presentationConfigurationId: zod_1.z.uuid(),
23
- slug: exports.PermalinkSlugSchema.nullable(),
23
+ exports.PermalinkKind = {
24
+ OPEN_DPP: "open-dpp",
25
+ GS1_LINK: "gs1-link",
26
+ };
27
+ exports.LEGACY_PERMALINK_KIND = "presentation";
28
+ exports.PermalinkKindSchema = zod_1.z.enum([exports.PermalinkKind.OPEN_DPP, exports.PermalinkKind.GS1_LINK]);
29
+ const PermalinkInvariantsOpenDppSchema = zod_1.z
30
+ .object({
31
+ kind: zod_1.z.literal(exports.PermalinkKind.OPEN_DPP),
32
+ passportId: zod_1.z.uuid(),
33
+ presentationConfigurationId: zod_1.z.uuid().nullish(),
34
+ uniqueProductIdentifierId: zod_1.z.uuid().nullish(),
35
+ slug: exports.PermalinkSlugSchema.nullish(),
36
+ baseUrl: permalink_base_url_schema_1.PermalinkBaseUrlSchema.nullable().optional(),
37
+ })
38
+ .strict();
39
+ const PermalinkInvariantsGs1LinkSchema = zod_1.z.object({
40
+ kind: zod_1.z.literal(exports.PermalinkKind.GS1_LINK),
41
+ passportId: zod_1.z.uuid(),
42
+ uniqueProductIdentifierId: zod_1.z.uuid(),
43
+ presentationConfigurationId: zod_1.z.uuid().nullable(),
44
+ gs1DataAttributes: gs1_data_attributes_dto_1.Gs1DataAttributesSchema.nullable().optional(),
45
+ slug: exports.PermalinkSlugSchema.nullish(),
24
46
  baseUrl: permalink_base_url_schema_1.PermalinkBaseUrlSchema.nullable().optional(),
25
47
  });
48
+ exports.PermalinkInvariantsSchema = zod_1.z.discriminatedUnion("kind", [
49
+ PermalinkInvariantsOpenDppSchema,
50
+ PermalinkInvariantsGs1LinkSchema,
51
+ ]);
26
52
  exports.PermalinkDtoSchema = zod_1.z
27
53
  .object({
28
54
  id: zod_1.z.uuid(),
55
+ kind: exports.PermalinkKindSchema.default(exports.PermalinkKind.OPEN_DPP),
56
+ passportId: zod_1.z.uuid(),
29
57
  slug: exports.PermalinkSlugSchema.nullable(),
30
58
  baseUrl: permalink_base_url_schema_1.PermalinkBaseUrlSchema.nullish(),
31
59
  publishedUrl: exports.PermalinkPublishedUrlSchema.nullish(),
32
- presentationConfigurationId: zod_1.z.uuid(),
60
+ presentationConfigurationId: zod_1.z.uuid().nullable(),
61
+ uniqueProductIdentifierId: zod_1.z.uuid().nullable().default(null),
62
+ gs1DataAttributes: gs1_data_attributes_dto_1.Gs1DataAttributesSchema.nullable().default(null),
33
63
  createdAt: digital_product_document_schemas_1.DateTimeSchema,
34
64
  updatedAt: digital_product_document_schemas_1.DateTimeSchema,
65
+ })
66
+ .check((ctx) => {
67
+ const { kind, uniqueProductIdentifierId, gs1DataAttributes } = ctx.value;
68
+ if (kind === exports.PermalinkKind.GS1_LINK) {
69
+ if (uniqueProductIdentifierId == null) {
70
+ ctx.issues.push({
71
+ code: "custom",
72
+ input: ctx.value,
73
+ message: 'A gs1-link permalink requires a non-null "uniqueProductIdentifierId"',
74
+ path: ["uniqueProductIdentifierId"],
75
+ });
76
+ }
77
+ }
78
+ else if (kind === exports.PermalinkKind.OPEN_DPP) {
79
+ if (gs1DataAttributes != null) {
80
+ ctx.issues.push({
81
+ code: "custom",
82
+ input: ctx.value,
83
+ message: 'An open-dpp permalink must have "gs1DataAttributes" = null',
84
+ path: ["gs1DataAttributes"],
85
+ });
86
+ }
87
+ }
35
88
  })
36
89
  .meta({ id: "Permalink" });
37
90
  exports.PermalinkFallbackBaseUrlSourceSchema = zod_1.z.enum(["branding", "instance"]);
@@ -41,22 +94,52 @@ exports.PermalinkPublicDtoSchema = exports.PermalinkDtoSchema.extend({
41
94
  fallbackBaseUrlSource: exports.PermalinkFallbackBaseUrlSourceSchema,
42
95
  }).meta({ id: "PermalinkPublic" });
43
96
  exports.PermalinkListDtoSchema = zod_1.z.array(exports.PermalinkPublicDtoSchema);
97
+ exports.PermalinkPaginationDtoSchema = zod_1.z
98
+ .object({
99
+ ...pagination_dto_1.PagingMetadataDtoSchema.shape,
100
+ result: exports.PermalinkPublicDtoSchema.array(),
101
+ })
102
+ .meta({ id: "Permalinks" });
44
103
  exports.PermalinkMetadataDtoSchema = zod_1.z.object({
45
104
  passportId: zod_1.z.uuid(),
46
105
  organizationId: zod_1.z.string().min(1),
47
106
  templateId: zod_1.z.uuid().nullish(),
48
107
  });
108
+ const PermalinkCreateOpenDppSchema = zod_1.z
109
+ .object({
110
+ kind: zod_1.z.literal(exports.PermalinkKind.OPEN_DPP),
111
+ passportId: zod_1.z.uuid(),
112
+ presentationConfigurationId: zod_1.z.uuid().nullish(),
113
+ uniqueProductIdentifierId: zod_1.z.uuid().nullish(),
114
+ slug: exports.PermalinkSlugSchema.nullish(),
115
+ baseUrl: permalink_base_url_schema_1.PermalinkBaseUrlSchema.nullable().optional(),
116
+ })
117
+ .strict();
118
+ const PermalinkCreateGs1LinkSchema = zod_1.z.object({
119
+ kind: zod_1.z.literal(exports.PermalinkKind.GS1_LINK),
120
+ passportId: zod_1.z.uuid(),
121
+ uniqueProductIdentifierId: zod_1.z.uuid(),
122
+ presentationConfigurationId: zod_1.z.uuid().nullable().optional(),
123
+ gs1DataAttributes: gs1_data_attributes_dto_1.Gs1DataAttributesSchema.nullable().optional(),
124
+ slug: exports.PermalinkSlugSchema.nullish(),
125
+ baseUrl: permalink_base_url_schema_1.PermalinkBaseUrlSchema.nullable().optional(),
126
+ });
127
+ exports.PermalinkCreateRequestSchema = zod_1.z
128
+ .discriminatedUnion("kind", [PermalinkCreateOpenDppSchema, PermalinkCreateGs1LinkSchema])
129
+ .meta({ id: "PermalinkCreateRequest" });
49
130
  exports.PermalinkUpdateRequestSchema = zod_1.z
50
131
  .object({
51
132
  slug: exports.PermalinkSlugSchema.nullish(),
52
133
  baseUrl: permalink_base_url_schema_1.PermalinkBaseUrlSchema.nullish(),
134
+ gs1DataAttributes: gs1_data_attributes_dto_1.Gs1DataAttributesSchema.nullish(),
135
+ presentationConfigurationId: zod_1.z.uuid().nullish(),
53
136
  })
54
137
  .meta({ id: "PermalinkUpdateRequest" });
55
138
  exports.PassportPermalinkBundleDtoSchema = zod_1.z
56
139
  .object({
57
140
  passport: passport_dto_1.PassportDtoSchema,
58
141
  branding: branding_dto_1.BrandingDtoSchema,
59
- presentationConfiguration: presentation_configuration_dto_1.PresentationConfigurationDtoSchema,
142
+ presentationConfiguration: presentation_configuration_dto_1.PresentationConfigurationDtoSchema.nullable(),
60
143
  publicUrl: zod_1.z.string().url(),
61
144
  })
62
145
  .meta({ id: "PassportPermalinkBundle" });
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  export declare function canonicaliseBaseUrl(s: string): string;
3
+ export declare function baseUrlOrigin(s: string): string;
3
4
  export declare const PermalinkBaseUrlSchema: z.ZodString;
4
5
  export type PermalinkBaseUrl = z.infer<typeof PermalinkBaseUrlSchema>;
5
6
  //# sourceMappingURL=permalink-base-url.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permalink-base-url.schema.d.ts","sourceRoot":"","sources":["../../src/shared/permalink-base-url.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CASrD;AAED,eAAO,MAAM,sBAAsB,aAoCF,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"permalink-base-url.schema.d.ts","sourceRoot":"","sources":["../../src/shared/permalink-base-url.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CASrD;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED,eAAO,MAAM,sBAAsB,aAoCF,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PermalinkBaseUrlSchema = void 0;
4
4
  exports.canonicaliseBaseUrl = canonicaliseBaseUrl;
5
+ exports.baseUrlOrigin = baseUrlOrigin;
5
6
  /// <reference lib="dom" />
6
7
  const zod_1 = require("zod");
7
8
  function canonicaliseBaseUrl(s) {
@@ -15,6 +16,14 @@ function canonicaliseBaseUrl(s) {
15
16
  return s;
16
17
  }
17
18
  }
19
+ function baseUrlOrigin(s) {
20
+ try {
21
+ return new URL(s).origin;
22
+ }
23
+ catch {
24
+ return s;
25
+ }
26
+ }
18
27
  exports.PermalinkBaseUrlSchema = zod_1.z
19
28
  .string()
20
29
  .min(8)
@@ -11,8 +11,35 @@ export declare const TemplateDtoSchema: z.ZodObject<{
11
11
  id: z.ZodString;
12
12
  displayName: z.ZodArray<z.ZodObject<{
13
13
  language: z.ZodEnum<{
14
- readonly en: "en";
14
+ readonly bg: "bg";
15
+ readonly cs: "cs";
16
+ readonly da: "da";
15
17
  readonly de: "de";
18
+ readonly el: "el";
19
+ readonly en: "en";
20
+ readonly es: "es";
21
+ readonly et: "et";
22
+ readonly fi: "fi";
23
+ readonly fr: "fr";
24
+ readonly hr: "hr";
25
+ readonly hu: "hu";
26
+ readonly it: "it";
27
+ readonly lt: "lt";
28
+ readonly lv: "lv";
29
+ readonly nl: "nl";
30
+ readonly no: "no";
31
+ readonly pl: "pl";
32
+ readonly pt: "pt";
33
+ readonly ro: "ro";
34
+ readonly ru: "ru";
35
+ readonly sk: "sk";
36
+ readonly sl: "sl";
37
+ readonly sv: "sv";
38
+ readonly tr: "tr";
39
+ readonly uk: "uk";
40
+ readonly bn: "bn";
41
+ readonly "zh-Hans": "zh-Hans";
42
+ readonly "zh-Hant": "zh-Hant";
16
43
  }>;
17
44
  text: z.ZodString;
18
45
  }, z.core.$strip>>;
@@ -49,8 +76,35 @@ export declare const TemplatePaginationDtoSchema: z.ZodObject<{
49
76
  id: z.ZodString;
50
77
  displayName: z.ZodArray<z.ZodObject<{
51
78
  language: z.ZodEnum<{
52
- readonly en: "en";
79
+ readonly bg: "bg";
80
+ readonly cs: "cs";
81
+ readonly da: "da";
53
82
  readonly de: "de";
83
+ readonly el: "el";
84
+ readonly en: "en";
85
+ readonly es: "es";
86
+ readonly et: "et";
87
+ readonly fi: "fi";
88
+ readonly fr: "fr";
89
+ readonly hr: "hr";
90
+ readonly hu: "hu";
91
+ readonly it: "it";
92
+ readonly lt: "lt";
93
+ readonly lv: "lv";
94
+ readonly nl: "nl";
95
+ readonly no: "no";
96
+ readonly pl: "pl";
97
+ readonly pt: "pt";
98
+ readonly ro: "ro";
99
+ readonly ru: "ru";
100
+ readonly sk: "sk";
101
+ readonly sl: "sl";
102
+ readonly sv: "sv";
103
+ readonly tr: "tr";
104
+ readonly uk: "uk";
105
+ readonly bn: "bn";
106
+ readonly "zh-Hans": "zh-Hans";
107
+ readonly "zh-Hant": "zh-Hant";
54
108
  }>;
55
109
  text: z.ZodString;
56
110
  }, z.core.$strip>>;
@@ -84,15 +138,69 @@ export declare const TemplateCreateDtoSchema: z.ZodObject<{
84
138
  assetAdministrationShells: z.ZodArray<z.ZodObject<{
85
139
  description: z.ZodDefault<z.ZodArray<z.ZodObject<{
86
140
  language: z.ZodEnum<{
87
- readonly en: "en";
141
+ readonly bg: "bg";
142
+ readonly cs: "cs";
143
+ readonly da: "da";
88
144
  readonly de: "de";
145
+ readonly el: "el";
146
+ readonly en: "en";
147
+ readonly es: "es";
148
+ readonly et: "et";
149
+ readonly fi: "fi";
150
+ readonly fr: "fr";
151
+ readonly hr: "hr";
152
+ readonly hu: "hu";
153
+ readonly it: "it";
154
+ readonly lt: "lt";
155
+ readonly lv: "lv";
156
+ readonly nl: "nl";
157
+ readonly no: "no";
158
+ readonly pl: "pl";
159
+ readonly pt: "pt";
160
+ readonly ro: "ro";
161
+ readonly ru: "ru";
162
+ readonly sk: "sk";
163
+ readonly sl: "sl";
164
+ readonly sv: "sv";
165
+ readonly tr: "tr";
166
+ readonly uk: "uk";
167
+ readonly bn: "bn";
168
+ readonly "zh-Hans": "zh-Hans";
169
+ readonly "zh-Hant": "zh-Hant";
89
170
  }>;
90
171
  text: z.ZodString;
91
172
  }, z.core.$strip>>>;
92
173
  displayName: z.ZodDefault<z.ZodArray<z.ZodObject<{
93
174
  language: z.ZodEnum<{
94
- readonly en: "en";
175
+ readonly bg: "bg";
176
+ readonly cs: "cs";
177
+ readonly da: "da";
95
178
  readonly de: "de";
179
+ readonly el: "el";
180
+ readonly en: "en";
181
+ readonly es: "es";
182
+ readonly et: "et";
183
+ readonly fi: "fi";
184
+ readonly fr: "fr";
185
+ readonly hr: "hr";
186
+ readonly hu: "hu";
187
+ readonly it: "it";
188
+ readonly lt: "lt";
189
+ readonly lv: "lv";
190
+ readonly nl: "nl";
191
+ readonly no: "no";
192
+ readonly pl: "pl";
193
+ readonly pt: "pt";
194
+ readonly ro: "ro";
195
+ readonly ru: "ru";
196
+ readonly sk: "sk";
197
+ readonly sl: "sl";
198
+ readonly sv: "sv";
199
+ readonly tr: "tr";
200
+ readonly uk: "uk";
201
+ readonly bn: "bn";
202
+ readonly "zh-Hans": "zh-Hans";
203
+ readonly "zh-Hant": "zh-Hant";
96
204
  }>;
97
205
  text: z.ZodString;
98
206
  }, z.core.$strip>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"template.dto.d.ts","sourceRoot":"","sources":["../../src/templates/template.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkC,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKZ,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"template.dto.d.ts","sourceRoot":"","sources":["../../src/templates/template.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkC,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKZ,CAAC;AAE7B,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ export declare const CreateInternalUniqueProductIdentifierRequestSchema: z.ZodObject<{
3
+ referenceId: z.ZodUUID;
4
+ }, z.core.$strip>;
5
+ export type CreateInternalUniqueProductIdentifierRequest = z.infer<typeof CreateInternalUniqueProductIdentifierRequestSchema>;
6
+ //# sourceMappingURL=create-internal-unique-product-identifier.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-internal-unique-product-identifier.dto.d.ts","sourceRoot":"","sources":["../../src/unique-product-identifiers/create-internal-unique-product-identifier.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kDAAkD;;iBAIA,CAAC;AAEhE,MAAM,MAAM,4CAA4C,GAAG,CAAC,CAAC,KAAK,CAChE,OAAO,kDAAkD,CAC1D,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateInternalUniqueProductIdentifierRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CreateInternalUniqueProductIdentifierRequestSchema = zod_1.z
6
+ .object({
7
+ referenceId: zod_1.z.uuid(),
8
+ })
9
+ .meta({ id: "CreateInternalUniqueProductIdentifierRequest" });
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const CreateGs1UniqueProductIdentifierRequestSchema: z.ZodObject<{
3
+ referenceId: z.ZodUUID;
4
+ gtin: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
5
+ batch: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodTransform<string | undefined, string>>, z.ZodOptional<z.ZodString>>>;
6
+ serial: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodTransform<string | undefined, string>>, z.ZodOptional<z.ZodString>>>;
7
+ }, z.core.$strip>;
8
+ export type CreateGs1UniqueProductIdentifierRequest = z.infer<typeof CreateGs1UniqueProductIdentifierRequestSchema>;
9
+ //# sourceMappingURL=create-unique-product-identifier.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-unique-product-identifier.dto.d.ts","sourceRoot":"","sources":["../../src/unique-product-identifiers/create-unique-product-identifier.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,6CAA6C;;;;;iBAOA,CAAC;AAE3D,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,6CAA6C,CACrD,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateGs1UniqueProductIdentifierRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const gs1_digital_link_1 = require("./gs1/gs1-digital-link");
6
+ exports.CreateGs1UniqueProductIdentifierRequestSchema = zod_1.z
7
+ .object({
8
+ referenceId: zod_1.z.uuid(),
9
+ gtin: gs1_digital_link_1.GtinInputSchema,
10
+ batch: gs1_digital_link_1.Cset82ComponentInputSchema.optional(),
11
+ serial: gs1_digital_link_1.Cset82ComponentInputSchema.optional(),
12
+ })
13
+ .meta({ id: "CreateGs1UniqueProductIdentifierRequest" });
@@ -1,15 +1,17 @@
1
- import { type Gs1AiI18nLang } from "./gs1-ai-i18n";
2
1
  /**
3
2
  * Resolve the translated description for a GS1 Application Identifier.
4
3
  *
5
4
  * Lookup chain: exact AI key -> family key ("n"/"s" collapse) -> "91-99"
6
- * range key; within the found row, the requested language falls back to
7
- * English (every vendored row carries English text).
5
+ * range key. `lang` accepts any BCP 47-ish tag ("de", "de-DE", "DE"); its
6
+ * primary subtag selects the vendored translation, and languages GS1 data
7
+ * doesn't carry fall back to English (every vendored row has English text).
8
+ * Which languages are vendored is an internal detail of this module — app
9
+ * display languages grow independently.
8
10
  *
9
11
  * Returns `undefined` for unknown AIs and non-AI input — callers fall back to
10
12
  * the English `title` from GS1_AI_TABLE as the last resort.
11
13
  *
12
14
  * Pure function, no I/O, no mutation.
13
15
  */
14
- export declare function getGs1AiDescription(ai: string, lang: Gs1AiI18nLang): string | undefined;
16
+ export declare function getGs1AiDescription(ai: string, lang: string): string | undefined;
15
17
  //# sourceMappingURL=gs1-ai-description.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gs1-ai-description.d.ts","sourceRoot":"","sources":["../../../src/unique-product-identifiers/gs1/gs1-ai-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAuBhE;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAWvF"}
1
+ {"version":3,"file":"gs1-ai-description.d.ts","sourceRoot":"","sources":["../../../src/unique-product-identifiers/gs1/gs1-ai-description.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWhF"}
@@ -21,12 +21,22 @@ function candidateKeys(ai) {
21
21
  }
22
22
  return keys;
23
23
  }
24
+ /** Resolve a language cell by BCP 47 primary subtag, falling back to English. */
25
+ function pickLanguageCell(entry, lang) {
26
+ const primary = lang.split("-")[0]?.toLowerCase() ?? "";
27
+ // Own enumerable entries only — a tag like "constructor" must not reach the prototype.
28
+ const cell = Object.entries(entry).find(([key]) => key === primary)?.[1];
29
+ return cell ?? entry.en;
30
+ }
24
31
  /**
25
32
  * Resolve the translated description for a GS1 Application Identifier.
26
33
  *
27
34
  * Lookup chain: exact AI key -> family key ("n"/"s" collapse) -> "91-99"
28
- * range key; within the found row, the requested language falls back to
29
- * English (every vendored row carries English text).
35
+ * range key. `lang` accepts any BCP 47-ish tag ("de", "de-DE", "DE"); its
36
+ * primary subtag selects the vendored translation, and languages GS1 data
37
+ * doesn't carry fall back to English (every vendored row has English text).
38
+ * Which languages are vendored is an internal detail of this module — app
39
+ * display languages grow independently.
30
40
  *
31
41
  * Returns `undefined` for unknown AIs and non-AI input — callers fall back to
32
42
  * the English `title` from GS1_AI_TABLE as the last resort.
@@ -40,7 +50,7 @@ function getGs1AiDescription(ai, lang) {
40
50
  for (const key of candidateKeys(ai)) {
41
51
  const entry = gs1_ai_i18n_1.GS1_AI_I18N[key];
42
52
  if (entry !== undefined) {
43
- return entry[lang] ?? entry.en;
53
+ return pickLanguageCell(entry, lang);
44
54
  }
45
55
  }
46
56
  return undefined;
@@ -142,6 +142,16 @@ export interface Gs1DigitalLinkParts {
142
142
  * length / the dot-segment rule.
143
143
  */
144
144
  export declare function buildGs1DigitalLink(resolverBase: string, parts: Gs1DigitalLinkParts): string;
145
+ /**
146
+ * Build the base-less canonical GS1 Digital Link path
147
+ * `01/{gtin14}[/10/{batch}][/21/{serial}]` (no leading slash, no query string).
148
+ * Same normalization, validation, and percent-encoding as `buildGs1DigitalLink`;
149
+ * usable as an exact-match canonical value for a GS1 identity.
150
+ *
151
+ * @throws Error when the GTIN is invalid or a batch/serial violates CSET-82 /
152
+ * length / the dot-segment rule.
153
+ */
154
+ export declare function buildGs1DigitalLinkPath(parts: Omit<Gs1DigitalLinkParts, "dataAttributes">): string;
145
155
  /**
146
156
  * Format a GS1 identity as its human-readable GS1 element string, e.g.
147
157
  * `(01) 04006381333931 (10) LOT-42 (21) SN-001`.
@@ -1 +1 @@
1
- {"version":3,"file":"gs1-digital-link.d.ts","sourceRoot":"","sources":["../../../src/unique-product-identifiers/gs1/gs1-digital-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAA4B,MAAM,oBAAoB,CAAC;AAelF,mCAAmC;AACnC,eAAO,MAAM,aAAa,KAAK,CAAC;AAIhC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAe3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAczD;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,wDAU1B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAI0D,CAAC;AAEpF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAmBhD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAO7D;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,aAKoD,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,sJAIE,CAAC;AAE1C,6GAA6G;AAC7G,eAAO,MAAM,WAAW,MAAoC,CAAC;AAC7D,4HAA4H;AAC5H,eAAO,MAAM,YAAY,MAAqC,CAAC;AAC/D,iHAAiH;AACjH,eAAO,MAAM,aAAa,MAA+B,CAAC;AAE1D;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,kBAAkB,CAGzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAgB/E;AAcD;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,GACpD,MAAM,CAgBR;AAED,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAChD;AAyBD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAe5F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAazE"}
1
+ {"version":3,"file":"gs1-digital-link.d.ts","sourceRoot":"","sources":["../../../src/unique-product-identifiers/gs1/gs1-digital-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAA4B,MAAM,oBAAoB,CAAC;AAelF,mCAAmC;AACnC,eAAO,MAAM,aAAa,KAAK,CAAC;AAIhC;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAe3D;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA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AAsD;IACtD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAChD;AAyBD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAK5F;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,GACjD,MAAM,CAaR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAazE"}
@@ -8,6 +8,7 @@ exports.isGs1DataAttributeAi = isGs1DataAttributeAi;
8
8
  exports.isValidGs1DataAttributeValue = isValidGs1DataAttributeValue;
9
9
  exports.buildGs1DataAttributeQuery = buildGs1DataAttributeQuery;
10
10
  exports.buildGs1DigitalLink = buildGs1DigitalLink;
11
+ exports.buildGs1DigitalLinkPath = buildGs1DigitalLinkPath;
11
12
  exports.formatGs1ElementString = formatGs1ElementString;
12
13
  const zod_1 = require("zod");
13
14
  const permalink_base_url_schema_1 = require("../../shared/permalink-base-url.schema");
@@ -280,19 +281,32 @@ function normalizeOptionalComponent(value, label) {
280
281
  * length / the dot-segment rule.
281
282
  */
282
283
  function buildGs1DigitalLink(resolverBase, parts) {
284
+ const base = (0, permalink_base_url_schema_1.canonicaliseBaseUrl)(resolverBase);
285
+ let url = `${base}/${buildGs1DigitalLinkPath(parts)}`;
286
+ url += buildGs1DataAttributeQuery(parts.dataAttributes);
287
+ return url;
288
+ }
289
+ /**
290
+ * Build the base-less canonical GS1 Digital Link path
291
+ * `01/{gtin14}[/10/{batch}][/21/{serial}]` (no leading slash, no query string).
292
+ * Same normalization, validation, and percent-encoding as `buildGs1DigitalLink`;
293
+ * usable as an exact-match canonical value for a GS1 identity.
294
+ *
295
+ * @throws Error when the GTIN is invalid or a batch/serial violates CSET-82 /
296
+ * length / the dot-segment rule.
297
+ */
298
+ function buildGs1DigitalLinkPath(parts) {
283
299
  const gtin14 = normalizeToGtin14(parts.gtin);
284
300
  const batch = normalizeOptionalComponent(parts.batch, "Batch");
285
301
  const serial = normalizeOptionalComponent(parts.serial, "Serial");
286
- const base = (0, permalink_base_url_schema_1.canonicaliseBaseUrl)(resolverBase);
287
- let url = `${base}/${exports.GS1_AI_GTIN}/${gtin14}`;
302
+ let path = `${exports.GS1_AI_GTIN}/${gtin14}`;
288
303
  if (batch !== undefined) {
289
- url += `/${exports.GS1_AI_BATCH}/${encodeRfc3986(batch)}`;
304
+ path += `/${exports.GS1_AI_BATCH}/${encodeRfc3986(batch)}`;
290
305
  }
291
306
  if (serial !== undefined) {
292
- url += `/${exports.GS1_AI_SERIAL}/${encodeRfc3986(serial)}`;
307
+ path += `/${exports.GS1_AI_SERIAL}/${encodeRfc3986(serial)}`;
293
308
  }
294
- url += buildGs1DataAttributeQuery(parts.dataAttributes);
295
- return url;
309
+ return path;
296
310
  }
297
311
  /**
298
312
  * Format a GS1 identity as its human-readable GS1 element string, e.g.