@aidc-toolkit/app-extension 1.0.27-beta → 1.0.28-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 (37) hide show
  1. package/dist/index.cjs +1102 -877
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +79 -241
  4. package/dist/index.d.ts +79 -241
  5. package/dist/index.js +1100 -870
  6. package/dist/index.js.map +1 -1
  7. package/package.json +5 -5
  8. package/src/app-extension.ts +5 -5
  9. package/src/app-utility-proxy.ts +18 -24
  10. package/src/descriptor.ts +29 -259
  11. package/src/generator/generator.ts +86 -132
  12. package/src/generator/index.ts +0 -1
  13. package/src/generator/locale-resources-generator.ts +39 -14
  14. package/src/gs1/character-set-proxy.ts +5 -5
  15. package/src/gs1/check-proxy.ts +35 -42
  16. package/src/gs1/gtin-creator-proxy.ts +58 -0
  17. package/src/gs1/gtin-descriptor.ts +29 -0
  18. package/src/gs1/gtin-validator-proxy.ts +161 -0
  19. package/src/gs1/identifier-creator-proxy.ts +227 -0
  20. package/src/gs1/identifier-validator-proxy.ts +87 -0
  21. package/src/gs1/index.ts +5 -1
  22. package/src/gs1/non-gtin-creator-proxy.ts +119 -0
  23. package/src/gs1/non-gtin-validator-proxy.ts +119 -0
  24. package/src/gs1/prefix-definition-descriptor.ts +18 -0
  25. package/src/gs1/prefix-manager-proxy.ts +42 -0
  26. package/src/index.ts +1 -0
  27. package/src/lib-proxy.ts +1 -1
  28. package/src/proxy.ts +509 -0
  29. package/src/utility/character-set-descriptor.ts +5 -5
  30. package/src/utility/character-set-proxy.ts +31 -47
  31. package/src/utility/reg-exp-proxy.ts +11 -15
  32. package/src/utility/string-descriptor.ts +2 -2
  33. package/src/utility/transformer-descriptor.ts +3 -3
  34. package/src/utility/transformer-proxy.ts +16 -26
  35. package/tsconfig-src.json +1 -4
  36. package/src/generator/descriptor.ts +0 -125
  37. package/src/gs1/identifier-proxy.ts +0 -826
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I18nEnvironment, TypedSyncFunction, TypedFunction, TypedAsyncFunction, Nullishable } from '@aidc-toolkit/core';
2
2
  import { Resource, i18n } from 'i18next';
3
3
  import { StringValidation, StringValidator, CharacterSetValidator, Exclusion, CharacterSetCreator } from '@aidc-toolkit/utility';
4
- import { NumericIdentifierType, IdentifierType, IdentifierTypeValidator, GTINType, GTINLevel, NonGTINNumericIdentifierType, NonSerializableNumericIdentifierType, SerializableNumericIdentifierType, NonNumericIdentifierType, NonNumericIdentifierValidation, PrefixType, NumericIdentifierCreator, IdentifierValidation, IdentifierCreator, PrefixManager, NumericIdentifierValidation, GTINCreator, NonGTINNumericIdentifierCreator, SerializableNumericIdentifierCreator, NonNumericIdentifierCreator } from '@aidc-toolkit/gs1';
4
+ import { NumericIdentifierType, IdentifierType, IdentifierTypeValidator, GTINType, NonGTINNumericIdentifierType, NonSerializableNumericIdentifierType, SerializableNumericIdentifierType, NonNumericIdentifierType, NonNumericIdentifierValidation, GTINLevel, PrefixType, NumericIdentifierCreator, IdentifierValidation, IdentifierCreator, PrefixManager, NumericIdentifierValidation, NonGTINNumericIdentifierCreator, SerializableNumericIdentifierCreator, NonNumericIdentifierCreator, GTINCreator } from '@aidc-toolkit/gs1';
5
5
 
6
6
  declare const _default: {
7
7
  AppExtension: {
@@ -771,7 +771,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
771
771
  * @param throwError
772
772
  * If true, errors are reported through the throw/catch mechanism.
773
773
  */
774
- protected constructor(version: string, maximumSequenceCount: number, throwError: ThrowError);
774
+ constructor(version: string, maximumSequenceCount: number, throwError: ThrowError);
775
775
  /**
776
776
  * Get the version.
777
777
  *
@@ -796,7 +796,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
796
796
  * @returns
797
797
  * Maximum width supported by the application.
798
798
  */
799
- protected abstract getMaximumWidth(): Promise<number>;
799
+ protected abstract getMaximumWidth(): number | Promise<number>;
800
800
  /**
801
801
  * Get the maximum height supported by the application.
802
802
  *
@@ -810,7 +810,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
810
810
  * @returns
811
811
  * Maximum height supported by the application.
812
812
  */
813
- protected abstract getMaximumHeight(): Promise<number>;
813
+ protected abstract getMaximumHeight(): number | Promise<number>;
814
814
  /**
815
815
  * Get the sheet address from an invocation context.
816
816
  *
@@ -820,7 +820,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
820
820
  * @returns
821
821
  * Sheet address.
822
822
  */
823
- abstract getSheetAddress(invocationContext: TInvocationContext): Promise<SheetAddress>;
823
+ abstract getSheetAddress(invocationContext: TInvocationContext): SheetAddress | Promise<SheetAddress>;
824
824
  /**
825
825
  * Get a parameter range from an invocation context.
826
826
  *
@@ -833,7 +833,7 @@ declare abstract class AppExtension<ThrowError extends boolean, TError extends E
833
833
  * @returns
834
834
  * Sheet range or null if parameter is not a range.
835
835
  */
836
- abstract getParameterSheetRange(invocationContext: TInvocationContext, parameterNumber: number): Promise<SheetRange | null>;
836
+ abstract getParameterSheetRange(invocationContext: TInvocationContext, parameterNumber: number): SheetRange | null | Promise<SheetRange | null>;
837
837
  /**
838
838
  * Validate a sequence count against the maximum supported by application.
839
839
  *
@@ -927,7 +927,7 @@ declare abstract class LibProxy<ThrowError extends boolean, TError extends Error
927
927
  /**
928
928
  * Get the application extension.
929
929
  */
930
- protected get appExtension(): AppExtension<ThrowError, TError, TInvocationContext, TBigInt>;
930
+ get appExtension(): AppExtension<ThrowError, TError, TInvocationContext, TBigInt>;
931
931
  /**
932
932
  * Map big integer to another type if necessary.
933
933
  *
@@ -1049,41 +1049,27 @@ interface TypeDescriptor extends Descriptor {
1049
1049
  readonly isMatrix: boolean;
1050
1050
  }
1051
1051
  /**
1052
- * Base parameter descriptor; all attributes required.
1052
+ * Parameter descriptor.
1053
1053
  */
1054
- interface BaseParameterDescriptor extends TypeDescriptor {
1054
+ interface ParameterDescriptor extends TypeDescriptor {
1055
1055
  /**
1056
1056
  * True if required.
1057
1057
  */
1058
1058
  readonly isRequired: boolean;
1059
1059
  }
1060
1060
  /**
1061
- * Extends parameter descriptor; extends a parameter descriptor and overrides select attributes.
1061
+ * Extends parameter descriptor.
1062
1062
  */
1063
- interface ExtendsParameterDescriptor extends Partial<BaseParameterDescriptor> {
1063
+ interface ExtendsParameterDescriptor extends Partial<ParameterDescriptor> {
1064
1064
  /**
1065
- * Base parameter descriptor that this one extends.
1065
+ * Parameter descriptor that this one extends.
1066
1066
  */
1067
- readonly extendsDescriptor: ParameterDescriptor;
1067
+ readonly extendsDescriptor: ParameterDescriptor | ExtendsParameterDescriptor;
1068
1068
  /**
1069
- * Sort order within base parameter descriptor if applicable.
1069
+ * Sort order within extended parameter descriptor.
1070
1070
  */
1071
1071
  readonly sortOrder?: number;
1072
1072
  }
1073
- /**
1074
- * Parameter descriptor, either base or extends.
1075
- */
1076
- type ParameterDescriptor = BaseParameterDescriptor | ExtendsParameterDescriptor;
1077
- /**
1078
- * Expand a parameter descriptor to its full form with all required attributes.
1079
- *
1080
- * @param parameterDescriptor
1081
- * Parameter descriptor.
1082
- *
1083
- * @returns
1084
- * Parameter descriptor in its full form.
1085
- */
1086
- declare function expandParameterDescriptor(parameterDescriptor: ParameterDescriptor): BaseParameterDescriptor;
1087
1073
  /**
1088
1074
  * Method descriptor.
1089
1075
  */
@@ -1105,6 +1091,14 @@ interface MethodDescriptor extends TypeDescriptor {
1105
1091
  * Parameter descriptors.
1106
1092
  */
1107
1093
  readonly parameterDescriptors: readonly ParameterDescriptor[];
1094
+ /**
1095
+ * Function name with optional infix.
1096
+ */
1097
+ readonly functionName: string;
1098
+ /**
1099
+ * Function name in optional namespace with optional infix.
1100
+ */
1101
+ readonly namespaceFunctionName: string;
1108
1102
  }
1109
1103
  /**
1110
1104
  * Class descriptor.
@@ -1113,11 +1107,11 @@ interface ClassDescriptor extends Descriptor {
1113
1107
  /**
1114
1108
  * Class namespace. If not provided, class is at the top level.
1115
1109
  */
1116
- readonly namespace?: string;
1110
+ readonly namespace?: string | undefined;
1117
1111
  /**
1118
1112
  * Method infix. If undefined, method name is generated verbatim.
1119
1113
  */
1120
- readonly methodInfix?: string;
1114
+ readonly methodInfix?: string | undefined;
1121
1115
  /**
1122
1116
  * Replace parameter descriptors for class hierarchies where enumeration parameter descriptors can change.
1123
1117
  */
@@ -1125,112 +1119,19 @@ interface ClassDescriptor extends Descriptor {
1125
1119
  readonly name: string;
1126
1120
  readonly replacement: ParameterDescriptor;
1127
1121
  }>;
1122
+ /**
1123
+ * Class name in optional namespace.
1124
+ */
1125
+ readonly namespaceClassName: string;
1126
+ /**
1127
+ * Object name.
1128
+ */
1129
+ readonly objectName: string;
1128
1130
  /**
1129
1131
  * Method descriptors.
1130
1132
  */
1131
1133
  readonly methodDescriptors: readonly MethodDescriptor[];
1132
1134
  }
1133
- /**
1134
- * Proxy class type with fixed constructor.
1135
- *
1136
- * @template ThrowError
1137
- * If true, errors are reported through the throw/catch mechanism.
1138
- *
1139
- * @template TError
1140
- * Error type.
1141
- *
1142
- * @template TInvocationContext
1143
- * Application-specific invocation context type.
1144
- *
1145
- * @template TBigInt
1146
- * Type to which big integer is mapped.
1147
- *
1148
- * @template T
1149
- * Proxy type.
1150
- */
1151
- type ProxyClassType<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, T extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt>> = (new (appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>) => T) & typeof LibProxy;
1152
- /**
1153
- * Proxy parameter decorator.
1154
- *
1155
- * @template ThrowError
1156
- * If true, errors are reported through the throw/catch mechanism.
1157
- *
1158
- * @template TError
1159
- * Error type.
1160
- *
1161
- * @template TInvocationContext
1162
- * Application-specific invocation context type.
1163
- *
1164
- * @template TBigInt
1165
- * Type to which big integer is mapped.
1166
- *
1167
- * @template T
1168
- * Proxy type.
1169
- *
1170
- * @param parameterDescriptor
1171
- * Parameter descriptor.
1172
- *
1173
- * @returns
1174
- * Function defining metadata for the parameter.
1175
- */
1176
- declare function ProxyParameter<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, T extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt>>(parameterDescriptor: ParameterDescriptor): ((target: T, propertyKey: string, parameterIndex: number) => void);
1177
- /**
1178
- * Proxy method decorator.
1179
- *
1180
- * @template ThrowError
1181
- * If true, errors are reported through the throw/catch mechanism.
1182
- *
1183
- * @template TError
1184
- * Error type.
1185
- *
1186
- * @template TInvocationContext
1187
- * Application-specific invocation context type.
1188
- *
1189
- * @template TBigInt
1190
- * Type to which big integer is mapped.
1191
- *
1192
- * @template T
1193
- * Proxy type.
1194
- *
1195
- * @param methodDescriptor
1196
- * Method descriptor.
1197
- *
1198
- * @returns
1199
- * Function defining metadata for the method.
1200
- */
1201
- declare function ProxyMethod<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, T extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt>>(methodDescriptor: Omit<MethodDescriptor, "name" | "parameterDescriptors">): ((target: T, propertyKey: string, propertyDescriptor: PropertyDescriptor) => void);
1202
- /**
1203
- * Proxy class decorator.
1204
- *
1205
- * @template ThrowError
1206
- * If true, errors are reported through the throw/catch mechanism.
1207
- *
1208
- * @template TError
1209
- * Error type.
1210
- *
1211
- * @template TInvocationContext
1212
- * Application-specific invocation context type.
1213
- *
1214
- * @template TBigInt
1215
- * Type to which big integer is mapped.
1216
- *
1217
- * @template T
1218
- * Proxy type.
1219
- *
1220
- * @param classDescriptor
1221
- * Class descriptor.
1222
- *
1223
- * @returns
1224
- * Function defining metadata for the class.
1225
- */
1226
- declare function ProxyClass<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, T extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt>>(classDescriptor?: Omit<ClassDescriptor, "name" | "methodDescriptors">): ((classType: ProxyClassType<ThrowError, TError, TInvocationContext, TBigInt, T>) => void);
1227
- /**
1228
- * Get class descriptors map.
1229
- *
1230
- * @returns
1231
- * Class descriptors map.
1232
- */
1233
- declare function getClassDescriptorsMap(): ReadonlyMap<string, ClassDescriptor>;
1234
1135
 
1235
1136
  /**
1236
1137
  * Application utilities.
@@ -1314,13 +1215,13 @@ declare class RegExpProxy<ThrowError extends boolean, TError extends ErrorExtend
1314
1215
 
1315
1216
  declare abstract class CharacterSetValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1316
1217
  #private;
1317
- protected constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, characterSetValidator: CharacterSetValidator);
1218
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, characterSetValidator: CharacterSetValidator);
1318
1219
  validate(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): MatrixResultError<string, ThrowError, TError>;
1319
1220
  isValid(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): MatrixResultError<boolean, ThrowError, TError>;
1320
1221
  }
1321
1222
  declare abstract class CharacterSetCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1322
1223
  #private;
1323
- protected constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, characterSetCreator: CharacterSetCreator);
1224
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, characterSetCreator: CharacterSetCreator);
1324
1225
  create(length: number, matrixValues: Matrix<number | bigint>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResultError<string, ThrowError, TError>;
1325
1226
  createSequence(length: number, startValue: number, count: number, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): Matrix<string>;
1326
1227
  valueFor(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError>;
@@ -1359,7 +1260,7 @@ declare class CheckProxy<ThrowError extends boolean, TError extends ErrorExtends
1359
1260
 
1360
1261
  declare abstract class IdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, TIdentifierType extends IdentifierType> extends StringProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1361
1262
  #private;
1362
- protected constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, validator: IdentifierTypeValidator<TIdentifierType>);
1263
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, validator: IdentifierTypeValidator<TIdentifierType>);
1363
1264
  protected get validator(): IdentifierTypeValidator<TIdentifierType>;
1364
1265
  }
1365
1266
  declare abstract class NumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, TNumericIdentifierType extends NumericIdentifierType> extends IdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt, TNumericIdentifierType> {
@@ -1376,6 +1277,7 @@ declare abstract class SerializableNumericIdentifierValidatorProxy<ThrowError ex
1376
1277
  declare abstract class NonNumericIdentifierValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends IdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt, NonNumericIdentifierType> {
1377
1278
  validate(matrixIdentifiers: Matrix<string>, exclusion: Nullishable<NonNumericIdentifierValidation["exclusion"]>): MatrixResultError<string, ThrowError, TError>;
1378
1279
  }
1280
+
1379
1281
  declare class GTIN13ValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends GTINValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1380
1282
  constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>);
1381
1283
  }
@@ -1394,6 +1296,7 @@ declare class GTINValidatorStaticProxy<ThrowError extends boolean, TError extend
1394
1296
  validateGTIN14(matrixGTIN14s: Matrix<string>): Matrix<string>;
1395
1297
  parseVariableMeasureRCN(format: string, matrixRCNs: Matrix<string>): MatrixResultError<number, ThrowError, TError>;
1396
1298
  }
1299
+
1397
1300
  declare class GLNValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends NonSerializableNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1398
1301
  constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>);
1399
1302
  }
@@ -1427,12 +1330,14 @@ declare class CPIDValidatorProxy<ThrowError extends boolean, TError extends Erro
1427
1330
  declare class GMNValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends NonNumericIdentifierValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1428
1331
  constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>);
1429
1332
  }
1333
+
1430
1334
  declare class PrefixManagerProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1431
1335
  definePrefix(prefix: string, prefixType: Nullishable<PrefixType>, tweakFactor: Nullishable<number>): Matrix<unknown>;
1432
1336
  }
1337
+
1433
1338
  declare abstract class IdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, TIdentifierType extends IdentifierType, TIdentifierValidation extends IdentifierValidation, TIdentifierCreator extends IdentifierCreator<TIdentifierType, TIdentifierValidation>> extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt> {
1434
1339
  #private;
1435
- protected constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, getCreator: (prefixManager: PrefixManager) => TIdentifierCreator);
1340
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, getCreator: (prefixManager: PrefixManager) => TIdentifierCreator);
1436
1341
  protected getCreator(prefixDefinition: Matrix<unknown>): TIdentifierCreator;
1437
1342
  }
1438
1343
  declare abstract class NumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt, TNumericIdentifierType extends NumericIdentifierType, TNumericIdentifierCreator extends NumericIdentifierCreator<TNumericIdentifierType>> extends IdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TBigInt, TNumericIdentifierType, NumericIdentifierValidation, TNumericIdentifierCreator> {
@@ -1451,11 +1356,13 @@ declare abstract class SerializableNumericIdentifierCreatorProxy<ThrowError exte
1451
1356
  declare abstract class NonNumericIdentifierCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends IdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TBigInt, NonNumericIdentifierType, NonNumericIdentifierValidation, NonNumericIdentifierCreator> {
1452
1357
  create(prefixDefinition: Matrix<unknown>, matrixReferences: Matrix<string>): MatrixResultError<string, ThrowError, TError>;
1453
1358
  }
1359
+
1454
1360
  declare class GTINCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends NumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TBigInt, GTINType, GTINCreator> {
1455
1361
  constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>);
1456
1362
  createGTIN14(indicatorDigit: string, prefixDefinition: Matrix<unknown>, matrixValues: Matrix<number | bigint>, sparse: Nullishable<boolean>): MatrixResultError<string, ThrowError, TError>;
1457
1363
  createVariableMeasureRCN(format: string, itemReference: number, matrixPricesOrWeights: Matrix<number>): MatrixResultError<string, ThrowError, TError>;
1458
1364
  }
1365
+
1459
1366
  declare class GLNCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends NonSerializableNumericIdentifierCreatorProxy<ThrowError, TError, TInvocationContext, TBigInt, NonSerializableNumericIdentifierType, NonGTINNumericIdentifierCreator> {
1460
1367
  constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>);
1461
1368
  }
@@ -1579,102 +1486,16 @@ interface FunctionLocalization extends Localization {
1579
1486
  * Documentation URL.
1580
1487
  */
1581
1488
  documentationURL: string;
1582
- }
1583
- /**
1584
- * Parameter localization.
1585
- */
1586
- interface ParameterLocalization extends Localization {
1587
- }
1588
- /**
1589
- * Localization descriptor.
1590
- *
1591
- * @param TLocalization
1592
- * Localization type.
1593
- */
1594
- interface LocalizationDescriptor<TLocalization extends Localization> {
1595
1489
  /**
1596
- * Localizations map by locale.
1490
+ * Parameters map.
1597
1491
  */
1598
- readonly localizationsMap: ReadonlyMap<string, TLocalization>;
1492
+ parametersMap: Map<string, Localization>;
1599
1493
  }
1600
- /**
1601
- * Proxy namespace descriptor.
1602
- */
1603
- interface ProxyNamespaceDescriptor {
1604
- /**
1605
- * Namespace if any.
1606
- */
1607
- readonly namespace: string | undefined;
1608
- }
1609
- /**
1610
- * Proxy class descriptor.
1611
- */
1612
- interface ProxyClassDescriptor extends ProxyNamespaceDescriptor {
1613
- /**
1614
- * Class name.
1615
- */
1616
- readonly className: string;
1617
- /**
1618
- * Namespace-qualified class name.
1619
- */
1620
- readonly namespaceClassName: string;
1621
- /**
1622
- * Class descriptor.
1623
- */
1624
- readonly classDescriptor: ClassDescriptor;
1625
- }
1626
- /**
1627
- * Proxy object descriptor.
1628
- */
1629
- interface ProxyObjectDescriptor extends ProxyClassDescriptor {
1630
- /**
1631
- * Object name.
1632
- */
1633
- readonly objectName: string;
1634
- }
1635
- /**
1636
- * Proxy parameter descriptor.
1637
- */
1638
- interface ProxyParameterDescriptor extends ProxyNamespaceDescriptor, LocalizationDescriptor<ParameterLocalization> {
1639
- /**
1640
- * Function name.
1641
- */
1642
- readonly parameterName: string;
1643
- /**
1644
- * Parameter descriptor.
1645
- */
1646
- readonly parameterDescriptor: BaseParameterDescriptor;
1647
- }
1648
- /**
1649
- * Proxy function descriptor.
1650
- */
1651
- interface ProxyFunctionDescriptor extends ProxyObjectDescriptor, LocalizationDescriptor<FunctionLocalization> {
1652
- /**
1653
- * Function name.
1654
- */
1655
- readonly functionName: string;
1656
- /**
1657
- * Namespace-qualified function name.
1658
- */
1659
- readonly namespaceFunctionName: string;
1660
- /**
1661
- * Proxy parameter descriptors
1662
- */
1663
- readonly proxyParameterDescriptors: ProxyParameterDescriptor[];
1664
- /**
1665
- * Method descriptor.
1666
- */
1667
- readonly methodDescriptor: MethodDescriptor;
1668
- }
1669
-
1670
1494
  /**
1671
1495
  * Abstract generator.
1672
1496
  */
1673
1497
  declare abstract class Generator {
1674
1498
  #private;
1675
- /**
1676
- *
1677
- */
1678
1499
  /**
1679
1500
  * Constructor.
1680
1501
  *
@@ -1693,50 +1514,56 @@ declare abstract class Generator {
1693
1514
  /**
1694
1515
  * Get function localization.
1695
1516
  *
1696
- * @param namespaceFunctionName
1697
- * Namespace function name.
1698
- *
1699
1517
  * @param locale
1700
1518
  * Locale.
1701
1519
  *
1520
+ * @param namespaceFunctionName
1521
+ * Namespace function name.
1522
+ *
1702
1523
  * @returns
1703
1524
  * Function localization.
1704
1525
  */
1705
- protected getFunctionLocalization(namespaceFunctionName: string, locale: string): FunctionLocalization;
1526
+ protected getFunctionLocalization(locale: string, namespaceFunctionName: string): FunctionLocalization;
1706
1527
  /**
1707
1528
  * Get parameter localization.
1708
1529
  *
1530
+ * @param locale
1531
+ * Locale.
1532
+ *
1709
1533
  * @param namespaceFunctionName
1710
1534
  * Namespace function name.
1711
1535
  *
1712
1536
  * @param parameterName
1713
1537
  * Parameter name.
1714
1538
  *
1715
- * @param locale
1716
- * Locale.
1717
- *
1718
1539
  * @returns
1719
- * Function localization.
1540
+ * Parameter localization.
1720
1541
  */
1721
- protected getParameterLocalization(namespaceFunctionName: string, parameterName: string, locale: string): ParameterLocalization;
1542
+ protected getParameterLocalization(locale: string, namespaceFunctionName: string, parameterName: string): Localization;
1722
1543
  /**
1723
1544
  * Initialize the generation of the output.
1724
1545
  */
1725
1546
  protected abstract initialize(): void;
1726
1547
  /**
1727
- * Create a proxy object.
1548
+ * Create a proxy object for a class.
1728
1549
  *
1729
- * @param proxyObjectDescriptor
1730
- * Proxy object descriptor.
1550
+ * @param classDescriptor
1551
+ * Class descriptor.
1731
1552
  */
1732
- protected abstract createProxyObject(proxyObjectDescriptor: ProxyObjectDescriptor): void;
1553
+ protected abstract createProxyObject(classDescriptor: ClassDescriptor): void;
1733
1554
  /**
1734
- * Create a proxy function.
1555
+ * Create a proxy function for a class and method.
1556
+ *
1557
+ * @param classDescriptor
1558
+ * Class descriptor.
1735
1559
  *
1736
- * @param proxyFunctionDescriptor
1737
- * Proxy function descriptor.
1560
+ * @param methodDescriptor
1561
+ * Method descriptor.
1562
+ *
1563
+ * @param functionLocalizationsMap
1564
+ * Localizations map.
1738
1565
  */
1739
- protected abstract createProxyFunction(proxyFunctionDescriptor: ProxyFunctionDescriptor): void;
1566
+ protected abstract createProxyFunction(classDescriptor: ClassDescriptor, methodDescriptor: MethodDescriptor, functionLocalizationsMap: ReadonlyMap<string, FunctionLocalization>): void;
1740
1567
  /**
1741
1568
  * Finalize the generation of the output.
1742
1569
  *
@@ -1750,4 +1577,15 @@ declare abstract class Generator {
1750
1577
  generate(): Promise<void>;
1751
1578
  }
1752
1579
 
1753
- export { type Address, AlphabeticProxy, AlphanumericProxy, AppExtension, type AppExtensionLocaleResources, AppUtilityProxy, type BaseParameterDescriptor, CharacterSetCreatorProxy, CharacterSetValidatorProxy, type ClassDescriptor, type ErrorExtends, type ExtendsParameterDescriptor, type FunctionLocalization, index as GS1, Generator, HexadecimalProxy, LibProxy, type Localization, type LocalizationDescriptor, type Matrix, type MatrixResultError, type MethodDescriptor, NumericProxy, type ParameterDescriptor, type ParameterLocalization, ProxyClass, type ProxyClassDescriptor, type ProxyFunctionDescriptor, ProxyMethod, type ProxyNamespaceDescriptor, type ProxyObjectDescriptor, ProxyParameter, type ProxyParameterDescriptor, type Range, RegExpProxy, type ResultError, type Sheet, type SheetAddress, type SheetRange, TransformerProxy, type Type, type TypeKey, Types, appExtensionNS, appExtensionResources, expandParameterDescriptor, getClassDescriptorsMap, i18nAppExtensionInit, i18nextAppExtension };
1580
+ /**
1581
+ * Expand a parameter descriptor to its full form with all required attributes.
1582
+ *
1583
+ * @param parameterDescriptor
1584
+ * Parameter descriptor.
1585
+ *
1586
+ * @returns
1587
+ * Parameter descriptor in its full form.
1588
+ */
1589
+ declare function expandParameterDescriptor(parameterDescriptor: ParameterDescriptor | ExtendsParameterDescriptor): ParameterDescriptor;
1590
+
1591
+ export { type Address, AlphabeticProxy, AlphanumericProxy, AppExtension, type AppExtensionLocaleResources, AppUtilityProxy, CharacterSetCreatorProxy, CharacterSetValidatorProxy, type ClassDescriptor, type ErrorExtends, type ExtendsParameterDescriptor, type FunctionLocalization, index as GS1, Generator, HexadecimalProxy, LibProxy, type Localization, type Matrix, type MatrixResultError, type MethodDescriptor, NumericProxy, type ParameterDescriptor, type Range, RegExpProxy, type ResultError, type Sheet, type SheetAddress, type SheetRange, TransformerProxy, type Type, type TypeKey, Types, appExtensionNS, appExtensionResources, expandParameterDescriptor, i18nAppExtensionInit, i18nextAppExtension };