@aidc-toolkit/app-extension 1.0.49 → 1.0.50-beta

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 (210) hide show
  1. package/dist/app-extension-options.d.ts +52 -0
  2. package/dist/app-extension-options.d.ts.map +1 -0
  3. package/dist/app-extension-options.js +2 -0
  4. package/dist/app-extension-options.js.map +1 -0
  5. package/dist/app-extension.d.ts +194 -0
  6. package/dist/app-extension.d.ts.map +1 -0
  7. package/dist/app-extension.js +141 -0
  8. package/dist/app-extension.js.map +1 -0
  9. package/dist/app-helper-proxy.d.ts +57 -0
  10. package/dist/app-helper-proxy.d.ts.map +1 -0
  11. package/dist/app-helper-proxy.js +369 -0
  12. package/dist/app-helper-proxy.js.map +1 -0
  13. package/dist/{descriptor-D6tZH-vc.d.cts → descriptor.d.ts} +13 -13
  14. package/dist/descriptor.d.ts.map +1 -0
  15. package/dist/descriptor.js +44 -0
  16. package/dist/descriptor.js.map +1 -0
  17. package/dist/generator/functions-generator.d.ts +103 -0
  18. package/dist/generator/functions-generator.d.ts.map +1 -0
  19. package/dist/generator/functions-generator.js +179 -0
  20. package/dist/generator/functions-generator.js.map +1 -0
  21. package/dist/generator/generator.d.ts +121 -0
  22. package/dist/generator/generator.d.ts.map +1 -0
  23. package/dist/generator/generator.js +186 -0
  24. package/dist/generator/generator.js.map +1 -0
  25. package/dist/generator/index.d.ts +18 -239
  26. package/dist/generator/index.d.ts.map +1 -0
  27. package/dist/generator/index.js +3 -1
  28. package/dist/generator/index.js.map +1 -0
  29. package/dist/generator/locale-resources-generator.d.ts +2 -0
  30. package/dist/generator/locale-resources-generator.d.ts.map +1 -0
  31. package/dist/generator/locale-resources-generator.js +333 -0
  32. package/dist/generator/locale-resources-generator.js.map +1 -0
  33. package/dist/gs1/character-set-proxy.d.ts +12 -0
  34. package/dist/gs1/character-set-proxy.d.ts.map +1 -0
  35. package/dist/gs1/character-set-proxy.js +126 -0
  36. package/dist/gs1/character-set-proxy.js.map +1 -0
  37. package/dist/gs1/check-proxy.d.ts +11 -0
  38. package/dist/gs1/check-proxy.d.ts.map +1 -0
  39. package/dist/gs1/check-proxy.js +163 -0
  40. package/dist/gs1/check-proxy.js.map +1 -0
  41. package/dist/gs1/gcp-length-proxy.d.ts +11 -0
  42. package/dist/gs1/gcp-length-proxy.d.ts.map +1 -0
  43. package/dist/gs1/gcp-length-proxy.js +187 -0
  44. package/dist/gs1/gcp-length-proxy.js.map +1 -0
  45. package/dist/gs1/gtin-creator-proxy.d.ts +10 -0
  46. package/dist/gs1/gtin-creator-proxy.d.ts.map +1 -0
  47. package/dist/gs1/gtin-creator-proxy.js +85 -0
  48. package/dist/gs1/gtin-creator-proxy.js.map +1 -0
  49. package/dist/gs1/gtin-descriptor.d.ts +3 -0
  50. package/dist/gs1/gtin-descriptor.d.ts.map +1 -0
  51. package/dist/gs1/gtin-descriptor.js +8 -0
  52. package/dist/gs1/gtin-descriptor.js.map +1 -0
  53. package/dist/gs1/gtin-validator-proxy.d.ts +26 -0
  54. package/dist/gs1/gtin-validator-proxy.d.ts.map +1 -0
  55. package/dist/gs1/gtin-validator-proxy.js +256 -0
  56. package/dist/gs1/gtin-validator-proxy.js.map +1 -0
  57. package/dist/gs1/identifier-creator-proxy.d.ts +30 -0
  58. package/dist/gs1/identifier-creator-proxy.d.ts.map +1 -0
  59. package/dist/gs1/identifier-creator-proxy.js +318 -0
  60. package/dist/gs1/identifier-creator-proxy.js.map +1 -0
  61. package/dist/gs1/identifier-descriptor.d.ts +4 -0
  62. package/dist/gs1/identifier-descriptor.d.ts.map +1 -0
  63. package/dist/gs1/identifier-descriptor.js +14 -0
  64. package/dist/gs1/identifier-descriptor.js.map +1 -0
  65. package/dist/gs1/identifier-type.d.ts +22 -0
  66. package/dist/gs1/identifier-type.d.ts.map +1 -0
  67. package/dist/gs1/identifier-type.js +34 -0
  68. package/dist/gs1/identifier-type.js.map +1 -0
  69. package/dist/gs1/identifier-validator-proxy.d.ts +29 -0
  70. package/dist/gs1/identifier-validator-proxy.d.ts.map +1 -0
  71. package/dist/gs1/identifier-validator-proxy.js +212 -0
  72. package/dist/gs1/identifier-validator-proxy.js.map +1 -0
  73. package/dist/gs1/index.d.ts +11 -185
  74. package/dist/gs1/index.d.ts.map +1 -0
  75. package/dist/gs1/index.js +11 -1
  76. package/dist/gs1/index.js.map +1 -0
  77. package/dist/gs1/non-gtin-creator-proxy.d.ts +37 -0
  78. package/dist/gs1/non-gtin-creator-proxy.d.ts.map +1 -0
  79. package/dist/gs1/non-gtin-creator-proxy.js +301 -0
  80. package/dist/gs1/non-gtin-creator-proxy.js.map +1 -0
  81. package/dist/gs1/non-gtin-validator-proxy.d.ts +36 -0
  82. package/dist/gs1/non-gtin-validator-proxy.d.ts.map +1 -0
  83. package/dist/gs1/non-gtin-validator-proxy.js +302 -0
  84. package/dist/gs1/non-gtin-validator-proxy.js.map +1 -0
  85. package/dist/gs1/prefix-definition-descriptor.d.ts +4 -0
  86. package/dist/gs1/prefix-definition-descriptor.d.ts.map +1 -0
  87. package/dist/gs1/prefix-definition-descriptor.js +16 -0
  88. package/dist/gs1/prefix-definition-descriptor.js.map +1 -0
  89. package/dist/gs1/prefix-manager-proxy.d.ts +8 -0
  90. package/dist/gs1/prefix-manager-proxy.d.ts.map +1 -0
  91. package/dist/gs1/prefix-manager-proxy.js +94 -0
  92. package/dist/gs1/prefix-manager-proxy.js.map +1 -0
  93. package/dist/gs1/variable-measure-proxy.d.ts +7 -0
  94. package/dist/gs1/variable-measure-proxy.d.ts.map +1 -0
  95. package/dist/gs1/variable-measure-proxy.js +114 -0
  96. package/dist/gs1/variable-measure-proxy.js.map +1 -0
  97. package/dist/gs1/verified-by-gs1-proxy.d.ts +7 -0
  98. package/dist/gs1/verified-by-gs1-proxy.d.ts.map +1 -0
  99. package/dist/gs1/verified-by-gs1-proxy.js +100 -0
  100. package/dist/gs1/verified-by-gs1-proxy.js.map +1 -0
  101. package/dist/index.d.ts +22 -862
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +7 -1
  104. package/dist/index.js.map +1 -0
  105. package/dist/lib-proxy.d.ts +121 -0
  106. package/dist/lib-proxy.d.ts.map +1 -0
  107. package/dist/lib-proxy.js +259 -0
  108. package/dist/lib-proxy.js.map +1 -0
  109. package/dist/{index.d.cts → locale/en/locale-resources.d.ts} +2 -113
  110. package/dist/locale/en/locale-resources.d.ts.map +1 -0
  111. package/dist/locale/en/locale-resources.js +754 -0
  112. package/dist/locale/en/locale-resources.js.map +1 -0
  113. package/dist/locale/fr/locale-resources.d.ts +755 -0
  114. package/dist/locale/fr/locale-resources.d.ts.map +1 -0
  115. package/dist/locale/fr/locale-resources.js +754 -0
  116. package/dist/locale/fr/locale-resources.js.map +1 -0
  117. package/dist/locale/i18n.d.ts +27 -0
  118. package/dist/locale/i18n.d.ts.map +1 -0
  119. package/dist/locale/i18n.js +36 -0
  120. package/dist/locale/i18n.js.map +1 -0
  121. package/dist/proxy.d.ts +135 -0
  122. package/dist/proxy.d.ts.map +1 -0
  123. package/dist/proxy.js +291 -0
  124. package/dist/proxy.js.map +1 -0
  125. package/dist/streaming.d.ts +10 -0
  126. package/dist/streaming.d.ts.map +1 -0
  127. package/dist/streaming.js +2 -0
  128. package/dist/streaming.js.map +1 -0
  129. package/dist/type.d.ts +72 -0
  130. package/dist/type.d.ts.map +1 -0
  131. package/dist/type.js +2 -0
  132. package/dist/type.js.map +1 -0
  133. package/dist/utility/character-set-descriptor.d.ts +6 -0
  134. package/dist/utility/character-set-descriptor.d.ts.map +1 -0
  135. package/dist/utility/character-set-descriptor.js +28 -0
  136. package/dist/utility/character-set-descriptor.js.map +1 -0
  137. package/dist/utility/character-set-proxy.d.ts +32 -0
  138. package/dist/utility/character-set-proxy.d.ts.map +1 -0
  139. package/dist/utility/character-set-proxy.js +278 -0
  140. package/dist/utility/character-set-proxy.js.map +1 -0
  141. package/dist/utility/index.d.ts +4 -0
  142. package/dist/utility/index.d.ts.map +1 -0
  143. package/dist/utility/index.js +4 -0
  144. package/dist/utility/index.js.map +1 -0
  145. package/dist/utility/reg-exp-proxy.d.ts +8 -0
  146. package/dist/utility/reg-exp-proxy.d.ts.map +1 -0
  147. package/dist/utility/reg-exp-proxy.js +103 -0
  148. package/dist/utility/reg-exp-proxy.js.map +1 -0
  149. package/dist/utility/string-descriptor.d.ts +4 -0
  150. package/dist/utility/string-descriptor.d.ts.map +1 -0
  151. package/dist/utility/string-descriptor.js +12 -0
  152. package/dist/utility/string-descriptor.js.map +1 -0
  153. package/dist/utility/string-proxy.d.ts +7 -0
  154. package/dist/utility/string-proxy.d.ts.map +1 -0
  155. package/dist/utility/string-proxy.js +63 -0
  156. package/dist/utility/string-proxy.js.map +1 -0
  157. package/dist/utility/transformer-descriptor.d.ts +6 -0
  158. package/dist/utility/transformer-descriptor.d.ts.map +1 -0
  159. package/dist/utility/transformer-descriptor.js +24 -0
  160. package/dist/utility/transformer-descriptor.js.map +1 -0
  161. package/dist/utility/transformer-proxy.d.ts +10 -0
  162. package/dist/utility/transformer-proxy.d.ts.map +1 -0
  163. package/dist/utility/transformer-proxy.js +111 -0
  164. package/dist/utility/transformer-proxy.js.map +1 -0
  165. package/dist/version.d.ts +5 -0
  166. package/dist/version.d.ts.map +1 -0
  167. package/dist/version.js +5 -0
  168. package/dist/version.js.map +1 -0
  169. package/package.json +5 -5
  170. package/src/app-extension-options.ts +61 -0
  171. package/src/app-extension.ts +22 -32
  172. package/src/app-helper-proxy.ts +21 -33
  173. package/src/generator/functions-generator.ts +14 -45
  174. package/src/generator/generator.ts +28 -18
  175. package/src/generator/locale-resources-generator.ts +79 -52
  176. package/src/gs1/character-set-proxy.ts +6 -7
  177. package/src/gs1/check-proxy.ts +8 -8
  178. package/src/gs1/gcp-length-proxy.ts +8 -8
  179. package/src/gs1/gtin-creator-proxy.ts +4 -4
  180. package/src/gs1/gtin-validator-proxy.ts +12 -12
  181. package/src/gs1/identifier-creator-proxy.ts +14 -14
  182. package/src/gs1/identifier-validator-proxy.ts +10 -10
  183. package/src/gs1/non-gtin-creator-proxy.ts +22 -23
  184. package/src/gs1/non-gtin-validator-proxy.ts +22 -23
  185. package/src/gs1/prefix-manager-proxy.ts +2 -2
  186. package/src/gs1/variable-measure-proxy.ts +4 -4
  187. package/src/gs1/verified-by-gs1-proxy.ts +5 -11
  188. package/src/index.ts +1 -0
  189. package/src/lib-proxy.ts +27 -43
  190. package/src/locale/en/locale-resources.ts +1 -1
  191. package/src/proxy.ts +12 -15
  192. package/src/streaming.ts +3 -3
  193. package/src/type.ts +3 -22
  194. package/src/utility/character-set-proxy.ts +17 -16
  195. package/src/utility/reg-exp-proxy.ts +2 -2
  196. package/src/utility/string-proxy.ts +2 -2
  197. package/src/utility/transformer-proxy.ts +6 -5
  198. package/src/version.ts +1 -1
  199. package/tsconfig-src.tsbuildinfo +1 -1
  200. package/dist/character-set-proxy-BOW94WCe.d.cts +0 -473
  201. package/dist/character-set-proxy-BOW94WCe.d.ts +0 -473
  202. package/dist/chunk-22IRLVWO.js +0 -1
  203. package/dist/chunk-MR63TJ3B.js +0 -1
  204. package/dist/chunk-TWX7TPRC.js +0 -1
  205. package/dist/descriptor-D6tZH-vc.d.ts +0 -185
  206. package/dist/generator/index.cjs +0 -17
  207. package/dist/generator/index.d.cts +0 -240
  208. package/dist/gs1/index.cjs +0 -1
  209. package/dist/gs1/index.d.cts +0 -185
  210. package/dist/index.cjs +0 -17
@@ -1,5 +1,11 @@
1
- import { ALPHA_URL, getLogger, I18nLanguageDetectors, type Promisable, websiteURL } from "@aidc-toolkit/core";
2
- import type { DefaultNamespace, ParseKeys } from "i18next";
1
+ import {
2
+ ALPHA_URL,
3
+ getLogger,
4
+ I18nLanguageDetectors,
5
+ isI18nParseKey,
6
+ type Promisable,
7
+ websiteURL
8
+ } from "@aidc-toolkit/core";
3
9
  import type { Logger } from "tslog";
4
10
  import { AppHelperProxy } from "../app-helper-proxy.js";
5
11
  import type { ClassDescriptor, MethodDescriptor } from "../descriptor.js";
@@ -185,7 +191,7 @@ export abstract class Generator {
185
191
  protected abstract finalize(success: boolean): Promisable<void>;
186
192
 
187
193
  /**
188
- * Generate a localization.
194
+ * Get a localization.
189
195
  *
190
196
  * @template TLocalization
191
197
  * Localization type.
@@ -202,21 +208,18 @@ export abstract class Generator {
202
208
  * @returns
203
209
  * Localization.
204
210
  */
205
- static #generateLocalization<TLocalization extends Localization>(locale: string, key: string, localizationCallback: (locale: string, localization: Localization & Partial<TLocalization>) => TLocalization): TLocalization {
211
+ static #getLocalization<TLocalization extends Localization>(locale: string, key: string, localizationCallback: (locale: string, localization: Localization & Partial<TLocalization>) => TLocalization): TLocalization {
206
212
  const lngReturnObjectsOption = {
207
213
  lng: locale,
208
214
  returnObjects: true
209
215
  } as const;
210
216
 
211
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Assume localized key exists.
212
- const parseKey = key as ParseKeys<DefaultNamespace, typeof lngReturnObjectsOption>;
213
-
214
- if (!i18nextAppExtension.exists(parseKey, lngReturnObjectsOption)) {
217
+ if (!isI18nParseKey(i18nextAppExtension, key, lngReturnObjectsOption)) {
215
218
  throw new Error(`Missing localization for ${key} in ${locale}`);
216
219
  }
217
220
 
218
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists and return type is Localization & Partial<TLocalization>.
219
- return localizationCallback(locale, i18nextAppExtension.t(key as ParseKeys<DefaultNamespace, typeof lngReturnObjectsOption>, lngReturnObjectsOption) as Localization & Partial<TLocalization>);
221
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Return type is Localization & Partial<TLocalization>.
222
+ return localizationCallback(locale, i18nextAppExtension.t(key, lngReturnObjectsOption) as Localization & Partial<TLocalization>);
220
223
  }
221
224
 
222
225
  /**
@@ -263,18 +266,25 @@ export abstract class Generator {
263
266
  this.createNamespace(namespace);
264
267
 
265
268
  for (const [category, classDescriptors] of categoryHierarchy) {
266
- const namespaceCategory = `${namespacePrefix}${category}`;
267
-
268
- const categoriesKey = `Categories.${category}`;
269
- const namespaceCategoriesKey = `Categories.${namespaceCategory}`;
269
+ const categoryKey = `Categories.${category}`;
270
+ const namespaceCategoryKey = `Categories.${namespacePrefix}${category}`;
270
271
 
271
272
  const categoryLocalizationsMap = new Map(this.locales.map((locale) => {
272
273
  const lngOption = {
273
274
  lng: locale
274
275
  } as const;
275
276
 
276
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Localized key exists.
277
- return [locale, i18nextAppExtension.t((i18nextAppExtension.exists(namespaceCategoriesKey, lngOption) ? namespaceCategoriesKey : categoriesKey) as ParseKeys, lngOption)];
277
+ let key = namespaceCategoryKey;
278
+
279
+ if (!isI18nParseKey(i18nextAppExtension, key)) {
280
+ key = categoryKey;
281
+
282
+ if (!isI18nParseKey(i18nextAppExtension, key, lngOption)) {
283
+ throw new Error(`Missing localization for ${key} in ${locale}`);
284
+ }
285
+ }
286
+
287
+ return [locale, i18nextAppExtension.t(key, lngOption)];
278
288
  }));
279
289
 
280
290
  this.createCategory(namespace, category, categoryLocalizationsMap);
@@ -295,13 +305,13 @@ export abstract class Generator {
295
305
  for (const methodDescriptor of classDescriptor.methodDescriptors) {
296
306
  const functionLocalizationsMap = new Map(methodDescriptor.isHidden !== true ?
297
307
  this.locales.map(locale =>
298
- [locale, Generator.#generateLocalization<FunctionLocalization>(locale, `Functions.${namespacePrefix}${methodDescriptor.functionName}`, (locale, localization) => ({
308
+ [locale, Generator.#getLocalization<FunctionLocalization>(locale, `Functions.${namespacePrefix}${methodDescriptor.functionName}`, (locale, localization) => ({
299
309
  ...localization,
300
310
  titleCaseName: localization.titleCaseName ?? localization.name.replace(/^[a-z]/u, c => c.toUpperCase()),
301
311
  documentationURL: `${documentationBaseURL}/${locale === this.defaultLocale ? "" : `${locale}/`}${Generator.#DOCUMENTATION_PATH}${namespacePath}${localization.name}.html`,
302
312
  parametersMap: new Map(methodDescriptor.parameterDescriptors.map(parameterDescriptor =>
303
313
  // eslint-disable-next-line max-nested-callbacks -- Callback is empty.
304
- [parameterDescriptor.name, Generator.#generateLocalization(locale, `Parameters.${parameterDescriptor.name}`, (_locale, localization) => localization)]
314
+ [parameterDescriptor.name, Generator.#getLocalization(locale, `Parameters.${parameterDescriptor.name}`, (_locale, localization) => localization)]
305
315
  ))
306
316
  }))]
307
317
  ) :
@@ -70,21 +70,21 @@ class LocaleResourcesGenerator extends Generator {
70
70
  readonly #parametersSequencer: ParametersSequencer = {};
71
71
 
72
72
  /**
73
- * Parameters locale resources.
73
+ * Template parameters locale resources.
74
74
  */
75
- readonly #parametersLocaleResources: LocaleResources = {};
75
+ readonly #templateParametersLocaleResources: LocaleResources = {};
76
76
 
77
77
  /**
78
- * Functions locale resources.
78
+ * Template functions locale resources.
79
79
  */
80
- readonly #functionsLocaleResources: LocaleResources = {};
80
+ readonly #templateFunctionsLocaleResources: LocaleResources = {};
81
81
 
82
82
  /**
83
- * Locale resources.
83
+ * Template locale resources.
84
84
  */
85
- readonly #LocaleResources: LocaleResources = {
86
- Parameters: this.#parametersLocaleResources,
87
- Functions: this.#functionsLocaleResources
85
+ readonly #templateLocaleResources: LocaleResources = {
86
+ Parameters: this.#templateParametersLocaleResources,
87
+ Functions: this.#templateFunctionsLocaleResources
88
88
  };
89
89
 
90
90
  /**
@@ -201,7 +201,7 @@ class LocaleResourcesGenerator extends Generator {
201
201
  this.#saveParameterSequence(parameterDescriptor, true);
202
202
  }
203
203
 
204
- let functionsLocaleResources = this.#functionsLocaleResources;
204
+ let functionsLocaleResources = this.#templateFunctionsLocaleResources;
205
205
 
206
206
  const namespace = classDescriptor.namespace;
207
207
 
@@ -234,68 +234,92 @@ class LocaleResourcesGenerator extends Generator {
234
234
  }
235
235
 
236
236
  /**
237
- * Merge source locale resources into existing destination locale resources.
237
+ * Merge template locale resources into existing import locale resources.
238
+ *
239
+ * @param mergedLocaleResources
240
+ * Merged locale resources.
238
241
  *
239
- * @param logChanges
240
- * If true, changes are logged. Limits output when processing multiple sources.
242
+ * @param isDefaultLocale
243
+ * If true, locale being merged is the default.
241
244
  *
242
245
  * @param parentKey
243
246
  * Parent key for logging purposes.
244
247
  *
245
- * @param sourceLocaleResources
246
- * Source locale resources.
248
+ * @param templateLocaleResources
249
+ * Template locale resources.
247
250
  *
248
- * @param destinationLocaleResources
249
- * Destination locale resources.
251
+ * @param importLocaleResources
252
+ * Import locale resources.
250
253
  *
251
254
  * @param addMissing
252
255
  * Add missing if true; applies to locale resources that are not regional.
253
256
  *
254
257
  * @returns
255
- * Merged locale resources.
258
+ * True if any changes.
256
259
  */
257
- #merge(logChanges: boolean, parentKey: string, sourceLocaleResources: LocaleResources, destinationLocaleResources: LocaleResources, addMissing: boolean): LocaleResources {
260
+ #merge(mergedLocaleResources: LocaleResources, isDefaultLocale: boolean, parentKey: string, templateLocaleResources: LocaleResources, importLocaleResources: LocaleResources, addMissing: boolean): boolean {
261
+ let anyChanges = false;
262
+
258
263
  // Some entries at the root are not part of the generator output.
259
264
  const atRoot = parentKey === "";
260
265
 
261
- const atFunction = parentKey.startsWith("Functions.");
266
+ if (parentKey.startsWith("Functions.") && "titleCaseName" in importLocaleResources && !("titleCaseName" in templateLocaleResources)) {
267
+ const description = templateLocaleResources["description"];
268
+
269
+ const patchTemplateLocaleResources = templateLocaleResources;
270
+
271
+ // Patch template locale resources to preserve required position of titleCaseName.
272
+ delete patchTemplateLocaleResources["description"];
273
+ patchTemplateLocaleResources["titleCaseName"] = undefined;
274
+ patchTemplateLocaleResources["description"] = description;
275
+ }
276
+
277
+ const patchMergedLocaleResources = mergedLocaleResources;
262
278
 
263
- const newDestinationLocaleResources: LocaleResources = {};
279
+ // Copy over or delete any import keys that are not in template.
280
+ for (const [key, importValue] of Object.entries(importLocaleResources)) {
281
+ if (!(key in templateLocaleResources)) {
282
+ if (atRoot) {
283
+ patchMergedLocaleResources[key] = importValue;
284
+ } else {
285
+ if (isDefaultLocale) {
286
+ this.logger.info(`Deleting ${parentKey}${key}...`);
287
+ }
264
288
 
265
- // Copy over or delete any destination keys that are not in source.
266
- for (const [key, destinationValue] of Object.entries(destinationLocaleResources)) {
267
- if (!(key in sourceLocaleResources)) {
268
- if (atRoot || (atFunction && key === "titleCaseName")) {
269
- newDestinationLocaleResources[key] = destinationValue;
270
- } else if (logChanges) {
271
- this.logger.info(`Deleting ${parentKey}${key}...`);
289
+ anyChanges = true;
272
290
  }
273
291
  }
274
292
  }
275
293
 
276
- for (const [key, sourceValue] of Object.entries(sourceLocaleResources)) {
277
- if (!(key in destinationLocaleResources)) {
294
+ for (const [key, templateValue] of Object.entries(templateLocaleResources)) {
295
+ if (!(key in importLocaleResources)) {
278
296
  if (addMissing) {
279
- if (logChanges) {
297
+ if (isDefaultLocale) {
280
298
  this.logger.info(`Adding ${parentKey}${key}...`);
281
299
  }
282
300
 
283
- newDestinationLocaleResources[key] = sourceValue;
301
+ patchMergedLocaleResources[key] = templateValue;
302
+
303
+ anyChanges = true;
284
304
  }
285
305
  } else {
286
- const destinationValue = destinationLocaleResources[key];
306
+ const importValue = importLocaleResources[key];
287
307
 
288
- if (typeof sourceValue === "object" && typeof destinationValue === "object") {
289
- newDestinationLocaleResources[key] = this.#merge(logChanges, `${parentKey}${key}.`, sourceValue, destinationValue, addMissing);
290
- } else if (typeof sourceValue === "string" && typeof destinationValue === "string") {
291
- newDestinationLocaleResources[key] = destinationValue;
308
+ if (typeof templateValue === "object" && typeof importValue === "object") {
309
+ patchMergedLocaleResources[key] = {};
310
+
311
+ if (this.#merge(patchMergedLocaleResources[key], isDefaultLocale, `${parentKey}${key}.`, templateValue, importValue, addMissing)) {
312
+ anyChanges = true;
313
+ }
314
+ } else if ((typeof templateValue === "string" || typeof templateValue === "undefined") && (typeof importValue === "string" || typeof importValue === "undefined" || typeof importValue === "object")) {
315
+ patchMergedLocaleResources[key] = importValue;
292
316
  } else {
293
317
  throw new Error(`Mismatched types at ${parentKey}${key}`);
294
318
  }
295
319
  }
296
320
  }
297
321
 
298
- return newDestinationLocaleResources;
322
+ return anyChanges;
299
323
  }
300
324
 
301
325
  /**
@@ -336,7 +360,7 @@ class LocaleResourcesGenerator extends Generator {
336
360
 
337
361
  for (const [parameterName, parametersSequencerEntry] of entries) {
338
362
  if (parametersSequencerEntry.isUsed) {
339
- this.#parametersLocaleResources[parameterName] = {
363
+ this.#templateParametersLocaleResources[parameterName] = {
340
364
  name: parameterName,
341
365
  description: "*** LOCALIZATION REQUIRED ***"
342
366
  };
@@ -363,13 +387,14 @@ class LocaleResourcesGenerator extends Generator {
363
387
  * @returns
364
388
  * Output string.
365
389
  */
366
- static #buildOutput(prefix: string, value: LocaleResources | string, indentLevel: number): string {
367
- return `${" ".repeat(indentLevel)}${prefix} ${typeof value === "object" ?
368
- `{\n${
369
- Object.entries(value).map(entry => LocaleResourcesGenerator.#buildOutput(`${entry[0]}:`, entry[1], indentLevel + 1)).join(",\n")
370
- }\n${" ".repeat(indentLevel)}}` :
371
- // JSON.stringify() will apply quotes as appropriate.
372
- JSON.stringify(value)
390
+ static #buildOutput(prefix: string, value: LocaleResources | string | undefined, indentLevel: number): string {
391
+ return `${" ".repeat(indentLevel)}${prefix} ${
392
+ typeof value === "object" ?
393
+ `{\n${
394
+ Object.entries(value).map(entry => LocaleResourcesGenerator.#buildOutput(`${entry[0]}:`, entry[1], indentLevel + 1)).join(",\n")
395
+ }\n${" ".repeat(indentLevel)}}` :
396
+ // JSON.stringify() will apply quotes as appropriate.
397
+ JSON.stringify(value)
373
398
  }`;
374
399
  }
375
400
 
@@ -380,18 +405,20 @@ class LocaleResourcesGenerator extends Generator {
380
405
  if (success) {
381
406
  this.#buildParametersLocaleResources(this.#parametersSequencer);
382
407
 
383
- await Promise.all(fs.readdirSync(LocaleResourcesGenerator.#IMPORT_PATH, {
408
+ await Promise.all(await fs.promises.readdir(LocaleResourcesGenerator.#IMPORT_PATH, {
384
409
  withFileTypes: true
385
- }).filter(entry => entry.isDirectory()).map(async (entry) => {
410
+ }).then(entries => entries.filter(entry => entry.isDirectory()).map(async (entry) => {
386
411
  const localeResourcesSource = path.resolve(LocaleResourcesGenerator.#IMPORT_PATH, entry.name, "locale-resources.ts");
387
412
 
388
- return import(localeResourcesSource).then((module) => {
389
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
390
- const localeResources = this.#merge(entry.name === "en", "", this.#LocaleResources, (module as LocaleResourcesModule).default, !entry.name.includes("-"));
413
+ return import(localeResourcesSource).then(async (module) => {
414
+ const mergedLocaleResources: LocaleResources = {};
391
415
 
392
- fs.writeFileSync(localeResourcesSource, `${LocaleResourcesGenerator.#buildOutput("export default", localeResources, 0)};\n`);
416
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Module format is known.
417
+ return this.#merge(mergedLocaleResources, entry.name === "en", "", this.#templateLocaleResources, (module as LocaleResourcesModule).default, !entry.name.includes("-")) ?
418
+ fs.promises.writeFile(localeResourcesSource, `${LocaleResourcesGenerator.#buildOutput("export default", mergedLocaleResources, 0)};\n`) :
419
+ undefined;
393
420
  });
394
- }));
421
+ })));
395
422
  }
396
423
  }
397
424
  }
@@ -1,7 +1,6 @@
1
1
  import { AI39_CREATOR, AI64_VALIDATOR, AI82_CREATOR } from "@aidc-toolkit/gs1";
2
2
  import type { AppExtension } from "../app-extension.js";
3
3
  import { expandParameterDescriptor, proxy } from "../proxy.js";
4
- import type { ErrorExtends } from "../type.js";
5
4
  import {
6
5
  exclusionAllNumericParameterDescriptor,
7
6
  exclusionNoneParameterDescriptor
@@ -18,8 +17,8 @@ import { CharacterSetCreatorProxy, CharacterSetValidatorProxy } from "../utility
18
17
  }
19
18
  ]
20
19
  })
21
- export class AI82Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
22
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
20
+ export class AI82Proxy extends CharacterSetCreatorProxy {
21
+ constructor(appExtension: AppExtension) {
23
22
  super(appExtension, AI82_CREATOR);
24
23
  }
25
24
  }
@@ -34,8 +33,8 @@ export class AI82Proxy<ThrowError extends boolean, TError extends ErrorExtends<T
34
33
  }
35
34
  ]
36
35
  })
37
- export class AI39Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
38
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
36
+ export class AI39Proxy extends CharacterSetCreatorProxy {
37
+ constructor(appExtension: AppExtension) {
39
38
  super(appExtension, AI39_CREATOR);
40
39
  }
41
40
  }
@@ -44,8 +43,8 @@ export class AI39Proxy<ThrowError extends boolean, TError extends ErrorExtends<T
44
43
  namespace: "GS1",
45
44
  methodInfix: "AI64"
46
45
  })
47
- export class AI64Proxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
48
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
46
+ export class AI64Proxy extends CharacterSetValidatorProxy {
47
+ constructor(appExtension: AppExtension) {
49
48
  super(appExtension, AI64_VALIDATOR);
50
49
  }
51
50
  }
@@ -9,7 +9,7 @@ import {
9
9
  import { type ExtendsParameterDescriptor, Multiplicities, type ParameterDescriptor, Types } from "../descriptor.js";
10
10
  import { LibProxy } from "../lib-proxy.js";
11
11
  import { proxy } from "../proxy.js";
12
- import type { ErrorExtends, Matrix, MatrixResult, SingletonResult } from "../type.js";
12
+ import type { Matrix, MatrixResult, SingletonResult } from "../type.js";
13
13
 
14
14
  const checkSParameterDescriptor: ParameterDescriptor = {
15
15
  name: "checkS",
@@ -56,13 +56,13 @@ const ai82SWithCheckCharacterPairParameterDescriptor: ExtendsParameterDescriptor
56
56
  namespace: "GS1",
57
57
  category: "checkCharacter"
58
58
  })
59
- export class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
59
+ export class CheckProxy extends LibProxy {
60
60
  @proxy.describeMethod({
61
61
  type: Types.String,
62
62
  multiplicity: Multiplicities.Matrix,
63
63
  parameterDescriptors: [numericSParameterDescriptor]
64
64
  })
65
- checkDigit(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError> {
65
+ checkDigit(matrixSs: Matrix<string>): MatrixResult<string> {
66
66
  return this.matrixResult(matrixSs, s => checkDigit(s));
67
67
  }
68
68
 
@@ -71,7 +71,7 @@ export class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<
71
71
  multiplicity: Multiplicities.Matrix,
72
72
  parameterDescriptors: [numericSWithCheckDigitParameterDescriptor]
73
73
  })
74
- hasValidCheckDigit(matrixSs: Matrix<string>): MatrixResult<boolean, ThrowError, TError> {
74
+ hasValidCheckDigit(matrixSs: Matrix<string>): MatrixResult<boolean> {
75
75
  return this.matrixResult(matrixSs, s => hasValidCheckDigit(s));
76
76
  }
77
77
 
@@ -80,7 +80,7 @@ export class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<
80
80
  multiplicity: Multiplicities.Matrix,
81
81
  parameterDescriptors: [numericSFourOrFiveDigitsParameterDescriptor]
82
82
  })
83
- priceOrWeightCheckDigit(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError> {
83
+ priceOrWeightCheckDigit(matrixSs: Matrix<string>): MatrixResult<string> {
84
84
  return this.matrixResult(matrixSs, s => priceOrWeightCheckDigit(s));
85
85
  }
86
86
 
@@ -92,7 +92,7 @@ export class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<
92
92
  multiplicity: Multiplicities.Singleton
93
93
  }, checkDigitParameterDescriptor]
94
94
  })
95
- isValidPriceOrWeightCheckDigit(s: string, checkDigit: string): SingletonResult<boolean, ThrowError, TError> {
95
+ isValidPriceOrWeightCheckDigit(s: string, checkDigit: string): SingletonResult<boolean> {
96
96
  return this.singletonResult(() => isValidPriceOrWeightCheckDigit(s, checkDigit));
97
97
  }
98
98
 
@@ -101,7 +101,7 @@ export class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<
101
101
  multiplicity: Multiplicities.Matrix,
102
102
  parameterDescriptors: [ai82SParameterDescriptor]
103
103
  })
104
- checkCharacterPair(matrixSs: Matrix<string>): MatrixResult<string, ThrowError, TError> {
104
+ checkCharacterPair(matrixSs: Matrix<string>): MatrixResult<string> {
105
105
  return this.matrixResult(matrixSs, s => checkCharacterPair(s));
106
106
  }
107
107
 
@@ -110,7 +110,7 @@ export class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends<
110
110
  multiplicity: Multiplicities.Matrix,
111
111
  parameterDescriptors: [ai82SWithCheckCharacterPairParameterDescriptor]
112
112
  })
113
- hasValidCheckCharacterPair(matrixSs: Matrix<string>): MatrixResult<boolean, ThrowError, TError> {
113
+ hasValidCheckCharacterPair(matrixSs: Matrix<string>): MatrixResult<boolean> {
114
114
  return this.matrixResult(matrixSs, s => hasValidCheckCharacterPair(s));
115
115
  }
116
116
  }
@@ -4,7 +4,7 @@ import type { AppExtension } from "../app-extension.js";
4
4
  import { type ExtendsParameterDescriptor, Multiplicities, Types } from "../descriptor.js";
5
5
  import { LibProxy } from "../lib-proxy.js";
6
6
  import { proxy } from "../proxy.js";
7
- import type { ErrorExtends, Matrix, MatrixResult, SingletonResult } from "../type.js";
7
+ import type { Matrix, MatrixResult, SingletonResult } from "../type.js";
8
8
  import { identifierParameterDescriptor, identifierTypeParameterDescriptor } from "./identifier-descriptor.js";
9
9
  import { validateIdentifierType } from "./identifier-type.js";
10
10
 
@@ -16,7 +16,7 @@ const gcpLengthIdentifierParameterDescriptor: ExtendsParameterDescriptor = {
16
16
  /**
17
17
  * Application extension GCP length cache. Data is stored in application extension shared data.
18
18
  */
19
- class AppExtensionGCPLengthCache<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends RemoteGCPLengthCache {
19
+ class AppExtensionGCPLengthCache extends RemoteGCPLengthCache {
20
20
  /**
21
21
  * Logger.
22
22
  */
@@ -28,7 +28,7 @@ class AppExtensionGCPLengthCache<ThrowError extends boolean, TError extends Erro
28
28
  * @param appExtension
29
29
  * Application extension.
30
30
  */
31
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
31
+ constructor(appExtension: AppExtension) {
32
32
  super(appExtension.sharedAppDataStorage, RemoteGCPLengthCache.DEFAULT_BASE_URL, appExtension.httpFetch);
33
33
 
34
34
  this.#logger = appExtension.logger;
@@ -100,10 +100,10 @@ class AppExtensionGCPLengthCache<ThrowError extends boolean, TError extends Erro
100
100
  namespace: "GS1",
101
101
  category: "service"
102
102
  })
103
- export class GCPLengthProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
103
+ export class GCPLengthProxy extends LibProxy {
104
104
  readonly #gcpLength: GCPLength;
105
105
 
106
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
106
+ constructor(appExtension: AppExtension) {
107
107
  super(appExtension);
108
108
 
109
109
  this.#gcpLength = new GCPLength(new AppExtensionGCPLengthCache(appExtension));
@@ -128,7 +128,7 @@ export class GCPLengthProxy<ThrowError extends boolean, TError extends ErrorExte
128
128
  isAsync: true,
129
129
  parameterDescriptors: [identifierTypeParameterDescriptor, gcpLengthIdentifierParameterDescriptor]
130
130
  })
131
- async gcpLengthOf(identifierType: string, matrixIdentifiers: Matrix<string>): Promise<MatrixResult<number, ThrowError, TError>> {
131
+ async gcpLengthOf(identifierType: string, matrixIdentifiers: Matrix<string>): Promise<MatrixResult<number>> {
132
132
  return this.#loadGCPLengthData().then(() => this.setUpMatrixResult(
133
133
  () => validateIdentifierType(identifierType),
134
134
  matrixIdentifiers,
@@ -142,7 +142,7 @@ export class GCPLengthProxy<ThrowError extends boolean, TError extends ErrorExte
142
142
  isAsync: true,
143
143
  parameterDescriptors: []
144
144
  })
145
- async gcpLengthDateTime(): Promise<SingletonResult<string, ThrowError, TError>> {
145
+ async gcpLengthDateTime(): Promise<SingletonResult<string>> {
146
146
  return this.#loadGCPLengthData().then(() =>
147
147
  this.singletonResult(() => this.#gcpLength.dateTime.toISOString())
148
148
  );
@@ -154,7 +154,7 @@ export class GCPLengthProxy<ThrowError extends boolean, TError extends ErrorExte
154
154
  isAsync: true,
155
155
  parameterDescriptors: []
156
156
  })
157
- async gcpLengthDisclaimer(): Promise<SingletonResult<string, ThrowError, TError>> {
157
+ async gcpLengthDisclaimer(): Promise<SingletonResult<string>> {
158
158
  return this.#loadGCPLengthData().then(() =>
159
159
  this.singletonResult(() => this.#gcpLength.disclaimer)
160
160
  );
@@ -3,7 +3,7 @@ import type { GTINCreator, GTINType } from "@aidc-toolkit/gs1";
3
3
  import type { AppExtension } from "../app-extension.js";
4
4
  import { Multiplicities, Types } from "../descriptor.js";
5
5
  import { expandParameterDescriptor, proxy } from "../proxy.js";
6
- import type { ErrorExtends, Matrix, MatrixResult } from "../type.js";
6
+ import type { Matrix, MatrixResult } from "../type.js";
7
7
  import { valueParameterDescriptor } from "../utility/transformer-descriptor.js";
8
8
  import { indicatorDigitParameterDescriptor } from "./gtin-descriptor.js";
9
9
  import { NumericIdentifierCreatorProxy, sparseParameterDescriptor } from "./identifier-creator-proxy.js";
@@ -21,8 +21,8 @@ import {
21
21
  }
22
22
  ]
23
23
  })
24
- export class GTINCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends NumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt, GTINType, GTINCreator> {
25
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
24
+ export class GTINCreatorProxy extends NumericIdentifierCreatorProxy<GTINType, GTINCreator> {
25
+ constructor(appExtension: AppExtension) {
26
26
  super(appExtension, prefixManager => prefixManager.gtinCreator);
27
27
  }
28
28
 
@@ -32,7 +32,7 @@ export class GTINCreatorProxy<ThrowError extends boolean, TError extends ErrorEx
32
32
  ignoreInfix: true,
33
33
  parameterDescriptors: [indicatorDigitParameterDescriptor, prefixDefinitionAnyParameterDescriptor, valueParameterDescriptor, sparseParameterDescriptor]
34
34
  })
35
- createGTIN14(indicatorDigit: string, prefixDefinition: Matrix<unknown>, matrixValues: Matrix<number | bigint>, sparse: Nullishable<boolean>): MatrixResult<string, ThrowError, TError> {
35
+ createGTIN14(indicatorDigit: string, prefixDefinition: Matrix<unknown>, matrixValues: Matrix<number | bigint>, sparse: Nullishable<boolean>): MatrixResult<string> {
36
36
  const sparseOrUndefined = sparse ?? undefined;
37
37
 
38
38
  return this.setUpMatrixResult(() =>
@@ -4,7 +4,7 @@ import type { AppExtension } from "../app-extension.js";
4
4
  import { type ExtendsParameterDescriptor, Multiplicities, type ParameterDescriptor, Types } from "../descriptor.js";
5
5
  import { LibProxy } from "../lib-proxy.js";
6
6
  import { proxy } from "../proxy.js";
7
- import type { ErrorExtends, Matrix, MatrixResult } from "../type.js";
7
+ import type { Matrix, MatrixResult } from "../type.js";
8
8
  import { indicatorDigitParameterDescriptor } from "./gtin-descriptor.js";
9
9
  import { identifierParameterDescriptor } from "./identifier-descriptor.js";
10
10
  import { GTINValidatorProxy } from "./identifier-validator-proxy.js";
@@ -12,8 +12,8 @@ import { GTINValidatorProxy } from "./identifier-validator-proxy.js";
12
12
  @proxy.describeClass(false, {
13
13
  methodInfix: "GTIN13"
14
14
  })
15
- export class GTIN13ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
16
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
15
+ export class GTIN13ValidatorProxy extends GTINValidatorProxy {
16
+ constructor(appExtension: AppExtension) {
17
17
  super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN13]);
18
18
  }
19
19
  }
@@ -21,8 +21,8 @@ export class GTIN13ValidatorProxy<ThrowError extends boolean, TError extends Err
21
21
  @proxy.describeClass(false, {
22
22
  methodInfix: "GTIN12"
23
23
  })
24
- export class GTIN12ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
25
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
24
+ export class GTIN12ValidatorProxy extends GTINValidatorProxy {
25
+ constructor(appExtension: AppExtension) {
26
26
  super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN12]);
27
27
  }
28
28
  }
@@ -30,8 +30,8 @@ export class GTIN12ValidatorProxy<ThrowError extends boolean, TError extends Err
30
30
  @proxy.describeClass(false, {
31
31
  methodInfix: "GTIN8"
32
32
  })
33
- export class GTIN8ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
34
- constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) {
33
+ export class GTIN8ValidatorProxy extends GTINValidatorProxy {
34
+ constructor(appExtension: AppExtension) {
35
35
  super(appExtension, IdentifierValidators.GTIN[GTINLengths.GTIN8]);
36
36
  }
37
37
  }
@@ -77,13 +77,13 @@ const validateGTIN14ParameterDescriptor: ExtendsParameterDescriptor = {
77
77
  namespace: "GS1",
78
78
  category: "identifierValidation"
79
79
  })
80
- export class GTINValidatorStaticProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
80
+ export class GTINValidatorStaticProxy extends LibProxy {
81
81
  @proxy.describeMethod({
82
82
  type: Types.String,
83
83
  multiplicity: Multiplicities.Matrix,
84
84
  parameterDescriptors: [zeroSuppressibleGTIN12ParameterDescriptor]
85
85
  })
86
- zeroSuppressGTIN12(matrixGTIN12s: Matrix<string>): MatrixResult<string, ThrowError, TError> {
86
+ zeroSuppressGTIN12(matrixGTIN12s: Matrix<string>): MatrixResult<string> {
87
87
  return this.matrixResult(matrixGTIN12s, gtin12 => GTINValidator.zeroSuppress(gtin12));
88
88
  }
89
89
 
@@ -92,7 +92,7 @@ export class GTINValidatorStaticProxy<ThrowError extends boolean, TError extends
92
92
  multiplicity: Multiplicities.Matrix,
93
93
  parameterDescriptors: [zeroSuppressedGTIN12ParameterDescriptor]
94
94
  })
95
- zeroExpandGTIN12(matrixZeroSuppressedGTIN12s: Matrix<string>): MatrixResult<string, ThrowError, TError> {
95
+ zeroExpandGTIN12(matrixZeroSuppressedGTIN12s: Matrix<string>): MatrixResult<string> {
96
96
  return this.matrixResult(matrixZeroSuppressedGTIN12s, zeroSuppressedGTIN12 => GTINValidator.zeroExpand(zeroSuppressedGTIN12));
97
97
  }
98
98
 
@@ -101,7 +101,7 @@ export class GTINValidatorStaticProxy<ThrowError extends boolean, TError extends
101
101
  multiplicity: Multiplicities.Matrix,
102
102
  parameterDescriptors: [indicatorDigitParameterDescriptor, convertGTINParameterDescriptor]
103
103
  })
104
- convertToGTIN14(indicatorDigit: string, matrixGTINs: Matrix<string>): MatrixResult<string, ThrowError, TError> {
104
+ convertToGTIN14(indicatorDigit: string, matrixGTINs: Matrix<string>): MatrixResult<string> {
105
105
  return this.matrixResult(matrixGTINs, gtin => GTINValidator.convertToGTIN14(indicatorDigit, gtin));
106
106
  }
107
107
 
@@ -110,7 +110,7 @@ export class GTINValidatorStaticProxy<ThrowError extends boolean, TError extends
110
110
  multiplicity: Multiplicities.Matrix,
111
111
  parameterDescriptors: [normalizeGTINParameterDescriptor]
112
112
  })
113
- normalizeGTIN(matrixGTINs: Matrix<string>): MatrixResult<string, ThrowError, TError> {
113
+ normalizeGTIN(matrixGTINs: Matrix<string>): MatrixResult<string> {
114
114
  return this.matrixResult(matrixGTINs, gtin => GTINValidator.normalize(gtin));
115
115
  }
116
116