@aidc-toolkit/gs1 1.0.43 → 1.0.45-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.
- package/dist/abstract-identifier-creator.d.ts +41 -0
- package/dist/abstract-identifier-creator.d.ts.map +1 -0
- package/dist/abstract-identifier-creator.js +73 -0
- package/dist/abstract-identifier-creator.js.map +1 -0
- package/dist/abstract-non-gtin-numeric-identifier-creator.d.ts +36 -0
- package/dist/abstract-non-gtin-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/abstract-non-gtin-numeric-identifier-creator.js +37 -0
- package/dist/abstract-non-gtin-numeric-identifier-creator.js.map +1 -0
- package/dist/abstract-numeric-identifier-creator.d.ts +34 -0
- package/dist/abstract-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/abstract-numeric-identifier-creator.js +154 -0
- package/dist/abstract-numeric-identifier-creator.js.map +1 -0
- package/dist/character-set.d.ts +27 -0
- package/dist/character-set.d.ts.map +1 -0
- package/dist/character-set.js +83 -0
- package/dist/character-set.js.map +1 -0
- package/dist/check.d.ts +81 -0
- package/dist/check.d.ts.map +1 -0
- package/dist/check.js +218 -0
- package/dist/check.js.map +1 -0
- package/dist/content-character-set-creators.d.ts +4 -0
- package/dist/content-character-set-creators.d.ts.map +1 -0
- package/dist/content-character-set-creators.js +9 -0
- package/dist/content-character-set-creators.js.map +1 -0
- package/dist/content-character-set.d.ts +26 -0
- package/dist/content-character-set.d.ts.map +1 -0
- package/dist/content-character-set.js +18 -0
- package/dist/content-character-set.js.map +1 -0
- package/dist/gcp-length-cache.d.ts +89 -0
- package/dist/gcp-length-cache.d.ts.map +1 -0
- package/dist/gcp-length-cache.js +240 -0
- package/dist/gcp-length-cache.js.map +1 -0
- package/dist/gcp-length-data.d.ts +108 -0
- package/dist/gcp-length-data.d.ts.map +1 -0
- package/dist/gcp-length-data.js +53 -0
- package/dist/gcp-length-data.js.map +1 -0
- package/dist/gcp-length.d.ts +97 -0
- package/dist/gcp-length.d.ts.map +1 -0
- package/dist/gcp-length.js +368 -0
- package/dist/gcp-length.js.map +1 -0
- package/dist/gtin-creator.d.ts +47 -0
- package/dist/gtin-creator.d.ts.map +1 -0
- package/dist/gtin-creator.js +64 -0
- package/dist/gtin-creator.js.map +1 -0
- package/dist/gtin-descriptor.d.ts +22 -0
- package/dist/gtin-descriptor.d.ts.map +1 -0
- package/dist/gtin-descriptor.js +2 -0
- package/dist/gtin-descriptor.js.map +1 -0
- package/dist/gtin-length.d.ts +64 -0
- package/dist/gtin-length.d.ts.map +1 -0
- package/dist/gtin-length.js +36 -0
- package/dist/gtin-length.js.map +1 -0
- package/dist/gtin-type.d.ts +26 -0
- package/dist/gtin-type.d.ts.map +1 -0
- package/dist/gtin-type.js +7 -0
- package/dist/gtin-type.js.map +1 -0
- package/dist/gtin-validator.d.ts +132 -0
- package/dist/gtin-validator.d.ts.map +1 -0
- package/dist/gtin-validator.js +349 -0
- package/dist/gtin-validator.js.map +1 -0
- package/dist/identifier-creator.d.ts +31 -0
- package/dist/identifier-creator.d.ts.map +1 -0
- package/dist/identifier-creator.js +2 -0
- package/dist/identifier-creator.js.map +1 -0
- package/dist/identifier-creators.d.ts +118 -0
- package/dist/identifier-creators.d.ts.map +1 -0
- package/dist/identifier-creators.js +92 -0
- package/dist/identifier-creators.js.map +1 -0
- package/dist/identifier-descriptor.d.ts +27 -0
- package/dist/identifier-descriptor.d.ts.map +1 -0
- package/dist/identifier-descriptor.js +2 -0
- package/dist/identifier-descriptor.js.map +1 -0
- package/dist/identifier-descriptors.d.ts +106 -0
- package/dist/identifier-descriptors.d.ts.map +1 -0
- package/dist/identifier-descriptors.js +262 -0
- package/dist/identifier-descriptors.js.map +1 -0
- package/dist/identifier-extension.d.ts +82 -0
- package/dist/identifier-extension.d.ts.map +1 -0
- package/dist/identifier-extension.js +79 -0
- package/dist/identifier-extension.js.map +1 -0
- package/dist/identifier-type.d.ts +62 -0
- package/dist/identifier-type.d.ts.map +1 -0
- package/dist/identifier-type.js +54 -0
- package/dist/identifier-type.js.map +1 -0
- package/dist/identifier-validator.d.ts +85 -0
- package/dist/identifier-validator.d.ts.map +1 -0
- package/dist/identifier-validator.js +107 -0
- package/dist/identifier-validator.js.map +1 -0
- package/dist/identifier-validators.d.ts +131 -0
- package/dist/identifier-validators.d.ts.map +1 -0
- package/dist/identifier-validators.js +167 -0
- package/dist/identifier-validators.js.map +1 -0
- package/dist/index.d.ts +63 -2205
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -3
- package/dist/index.js.map +1 -0
- package/dist/leader-type.d.ts +26 -0
- package/dist/leader-type.d.ts.map +1 -0
- package/dist/leader-type.js +18 -0
- package/dist/leader-type.js.map +1 -0
- package/dist/locale/en/locale-resources.d.ts +48 -0
- package/dist/locale/en/locale-resources.d.ts.map +1 -0
- package/dist/locale/en/locale-resources.js +47 -0
- package/dist/locale/en/locale-resources.js.map +1 -0
- package/dist/locale/fr/locale-resources.d.ts +48 -0
- package/dist/locale/fr/locale-resources.d.ts.map +1 -0
- package/dist/locale/fr/locale-resources.js +47 -0
- package/dist/locale/fr/locale-resources.js.map +1 -0
- package/dist/locale/i18n.d.ts +27 -0
- package/dist/locale/i18n.d.ts.map +1 -0
- package/dist/locale/i18n.js +35 -0
- package/dist/locale/i18n.js.map +1 -0
- package/dist/non-gtin-numeric-identifier-creator.d.ts +12 -0
- package/dist/non-gtin-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/non-gtin-numeric-identifier-creator.js +2 -0
- package/dist/non-gtin-numeric-identifier-creator.js.map +1 -0
- package/dist/non-gtin-numeric-identifier-descriptor.d.ts +22 -0
- package/dist/non-gtin-numeric-identifier-descriptor.d.ts.map +1 -0
- package/dist/non-gtin-numeric-identifier-descriptor.js +2 -0
- package/dist/non-gtin-numeric-identifier-descriptor.js.map +1 -0
- package/dist/non-gtin-numeric-identifier-type.d.ts +26 -0
- package/dist/non-gtin-numeric-identifier-type.d.ts.map +1 -0
- package/dist/non-gtin-numeric-identifier-type.js +8 -0
- package/dist/non-gtin-numeric-identifier-type.js.map +1 -0
- package/dist/non-gtin-numeric-identifier-validator.d.ts +12 -0
- package/dist/non-gtin-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/non-gtin-numeric-identifier-validator.js +10 -0
- package/dist/non-gtin-numeric-identifier-validator.js.map +1 -0
- package/dist/non-numeric-identifier-creator.d.ts +40 -0
- package/dist/non-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/non-numeric-identifier-creator.js +82 -0
- package/dist/non-numeric-identifier-creator.js.map +1 -0
- package/dist/non-numeric-identifier-descriptor.d.ts +26 -0
- package/dist/non-numeric-identifier-descriptor.d.ts.map +1 -0
- package/dist/non-numeric-identifier-descriptor.js +2 -0
- package/dist/non-numeric-identifier-descriptor.js.map +1 -0
- package/dist/non-numeric-identifier-type.d.ts +26 -0
- package/dist/non-numeric-identifier-type.d.ts.map +1 -0
- package/dist/non-numeric-identifier-type.js +8 -0
- package/dist/non-numeric-identifier-type.js.map +1 -0
- package/dist/non-numeric-identifier-validator.d.ts +41 -0
- package/dist/non-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/non-numeric-identifier-validator.js +69 -0
- package/dist/non-numeric-identifier-validator.js.map +1 -0
- package/dist/non-serializable-numeric-identifier-creator.d.ts +10 -0
- package/dist/non-serializable-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/non-serializable-numeric-identifier-creator.js +8 -0
- package/dist/non-serializable-numeric-identifier-creator.js.map +1 -0
- package/dist/non-serializable-numeric-identifier-descriptor.d.ts +12 -0
- package/dist/non-serializable-numeric-identifier-descriptor.d.ts.map +1 -0
- package/dist/non-serializable-numeric-identifier-descriptor.js +2 -0
- package/dist/non-serializable-numeric-identifier-descriptor.js.map +1 -0
- package/dist/non-serializable-numeric-identifier-type.d.ts +26 -0
- package/dist/non-serializable-numeric-identifier-type.d.ts.map +1 -0
- package/dist/non-serializable-numeric-identifier-type.js +7 -0
- package/dist/non-serializable-numeric-identifier-type.js.map +1 -0
- package/dist/non-serializable-numeric-identifier-validator.d.ts +16 -0
- package/dist/non-serializable-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/non-serializable-numeric-identifier-validator.js +17 -0
- package/dist/non-serializable-numeric-identifier-validator.js.map +1 -0
- package/dist/numeric-identifier-creator.d.ts +53 -0
- package/dist/numeric-identifier-creator.d.ts.map +1 -0
- package/dist/numeric-identifier-creator.js +2 -0
- package/dist/numeric-identifier-creator.js.map +1 -0
- package/dist/numeric-identifier-descriptor.d.ts +22 -0
- package/dist/numeric-identifier-descriptor.d.ts.map +1 -0
- package/dist/numeric-identifier-descriptor.js +2 -0
- package/dist/numeric-identifier-descriptor.js.map +1 -0
- package/dist/numeric-identifier-type.d.ts +26 -0
- package/dist/numeric-identifier-type.d.ts.map +1 -0
- package/dist/numeric-identifier-type.js +7 -0
- package/dist/numeric-identifier-type.js.map +1 -0
- package/dist/numeric-identifier-validator.d.ts +38 -0
- package/dist/numeric-identifier-validator.d.ts.map +1 -0
- package/dist/numeric-identifier-validator.js +61 -0
- package/dist/numeric-identifier-validator.js.map +1 -0
- package/dist/prefix-manager.d.ts +151 -0
- package/dist/prefix-manager.d.ts.map +1 -0
- package/dist/prefix-manager.js +297 -0
- package/dist/prefix-manager.js.map +1 -0
- package/dist/prefix-provider.d.ts +27 -0
- package/dist/prefix-provider.d.ts.map +1 -0
- package/dist/prefix-provider.js +2 -0
- package/dist/prefix-provider.js.map +1 -0
- package/dist/prefix-type.d.ts +26 -0
- package/dist/prefix-type.d.ts.map +1 -0
- package/dist/prefix-type.js +18 -0
- package/dist/prefix-type.js.map +1 -0
- package/dist/prefix-validator.d.ts +71 -0
- package/dist/prefix-validator.d.ts.map +1 -0
- package/dist/prefix-validator.js +204 -0
- package/dist/prefix-validator.js.map +1 -0
- package/dist/serializable-numeric-identifier-creator.d.ts +48 -0
- package/dist/serializable-numeric-identifier-creator.d.ts.map +1 -0
- package/dist/serializable-numeric-identifier-creator.js +93 -0
- package/dist/serializable-numeric-identifier-creator.js.map +1 -0
- package/dist/serializable-numeric-identifier-descriptor.d.ts +26 -0
- package/dist/serializable-numeric-identifier-descriptor.d.ts.map +1 -0
- package/dist/serializable-numeric-identifier-descriptor.js +2 -0
- package/dist/serializable-numeric-identifier-descriptor.js.map +1 -0
- package/dist/serializable-numeric-identifier-type.d.ts +26 -0
- package/dist/serializable-numeric-identifier-type.d.ts.map +1 -0
- package/dist/serializable-numeric-identifier-type.js +8 -0
- package/dist/serializable-numeric-identifier-type.js.map +1 -0
- package/dist/serializable-numeric-identifier-validator.d.ts +67 -0
- package/dist/serializable-numeric-identifier-validator.d.ts.map +1 -0
- package/dist/serializable-numeric-identifier-validator.js +97 -0
- package/dist/serializable-numeric-identifier-validator.js.map +1 -0
- package/dist/variable-measure.d.ts +68 -0
- package/dist/variable-measure.d.ts.map +1 -0
- package/dist/variable-measure.js +210 -0
- package/dist/variable-measure.js.map +1 -0
- package/dist/verified-by-gs1.d.ts +22 -0
- package/dist/verified-by-gs1.d.ts.map +1 -0
- package/dist/verified-by-gs1.js +46 -0
- package/dist/verified-by-gs1.js.map +1 -0
- package/package.json +4 -4
- package/src/gcp-length-cache.ts +7 -2
- package/tsconfig-src.tsbuildinfo +1 -1
- package/dist/index.cjs +0 -19
- package/dist/index.d.cts +0 -2205
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-descriptor.js","sourceRoot":"","sources":["../src/identifier-descriptor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { GTINDescriptor } from "./gtin-descriptor.js";
|
|
2
|
+
import { type GTINBaseLength } from "./gtin-length.js";
|
|
3
|
+
import type { GTINType } from "./gtin-type.js";
|
|
4
|
+
import type { IdentifierDescriptor } from "./identifier-descriptor.js";
|
|
5
|
+
import { type IdentifierTypeExtension } from "./identifier-extension.js";
|
|
6
|
+
import { type IdentifierType } from "./identifier-type.js";
|
|
7
|
+
import type { NonGTINNumericIdentifierDescriptor } from "./non-gtin-numeric-identifier-descriptor.js";
|
|
8
|
+
import type { NonNumericIdentifierDescriptor } from "./non-numeric-identifier-descriptor.js";
|
|
9
|
+
import type { NonSerializableNumericIdentifierDescriptor } from "./non-serializable-numeric-identifier-descriptor.js";
|
|
10
|
+
import type { NumericIdentifierDescriptor } from "./numeric-identifier-descriptor.js";
|
|
11
|
+
import type { SerializableNumericIdentifierDescriptor } from "./serializable-numeric-identifier-descriptor.js";
|
|
12
|
+
/**
|
|
13
|
+
* Identifier descriptor type based on identifier type type.
|
|
14
|
+
*
|
|
15
|
+
* @template TIdentifierType
|
|
16
|
+
* Identifier type type.
|
|
17
|
+
*/
|
|
18
|
+
export type IdentifierTypeDescriptor<TIdentifierType extends IdentifierType> = IdentifierTypeExtension<TIdentifierType, IdentifierDescriptor, NumericIdentifierDescriptor, GTINDescriptor, NonGTINNumericIdentifierDescriptor, NonSerializableNumericIdentifierDescriptor, SerializableNumericIdentifierDescriptor, NonNumericIdentifierDescriptor>;
|
|
19
|
+
/**
|
|
20
|
+
* Identifier descriptors entry type based on identifier type type.
|
|
21
|
+
*
|
|
22
|
+
* @template TIdentifierType
|
|
23
|
+
* Identifier type type.
|
|
24
|
+
*/
|
|
25
|
+
export type IdentifierDescriptorsEntry<TIdentifierType extends IdentifierType> = TIdentifierType extends GTINType ? Readonly<Record<GTINBaseLength, GTINDescriptor>> : IdentifierTypeDescriptor<TIdentifierType>;
|
|
26
|
+
/**
|
|
27
|
+
* Identifier descriptors record type.
|
|
28
|
+
*/
|
|
29
|
+
export type IdentifierDescriptorsRecord = {
|
|
30
|
+
readonly [TIdentifierType in IdentifierType]: IdentifierDescriptorsEntry<TIdentifierType>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Identifier descriptors for all identifier types.
|
|
34
|
+
*/
|
|
35
|
+
export declare const IdentifierDescriptors: IdentifierDescriptorsRecord;
|
|
36
|
+
/**
|
|
37
|
+
* Determine if identifier descriptors or descriptor is GTIN descriptors.
|
|
38
|
+
*
|
|
39
|
+
* @param identifierDescriptorsOrDescriptor
|
|
40
|
+
* Identifier descriptors or descriptor.
|
|
41
|
+
*
|
|
42
|
+
* @returns
|
|
43
|
+
* True if GTIN descriptors.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isGTINDescriptors(identifierDescriptorsOrDescriptor: IdentifierDescriptorsEntry<IdentifierType>): identifierDescriptorsOrDescriptor is Readonly<Record<GTINBaseLength, GTINDescriptor>>;
|
|
46
|
+
/**
|
|
47
|
+
* Determine if identifier descriptor is a numeric identifier descriptor.
|
|
48
|
+
*
|
|
49
|
+
* @param identifierDescriptor
|
|
50
|
+
* Identifier descriptor.
|
|
51
|
+
*
|
|
52
|
+
* @returns
|
|
53
|
+
* True if identifier descriptor is a numeric identifier descriptor.
|
|
54
|
+
*/
|
|
55
|
+
export declare function isNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NumericIdentifierDescriptor;
|
|
56
|
+
/**
|
|
57
|
+
* Determine if identifier descriptor is a GTIN descriptor.
|
|
58
|
+
*
|
|
59
|
+
* @param identifierDescriptor
|
|
60
|
+
* Identifier descriptor.
|
|
61
|
+
*
|
|
62
|
+
* @returns
|
|
63
|
+
* True if identifier descriptor is a GTIN descriptor.
|
|
64
|
+
*/
|
|
65
|
+
export declare function isGTINDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is GTINDescriptor;
|
|
66
|
+
/**
|
|
67
|
+
* Determine if identifier descriptor is a non-GTIN numeric identifier descriptor.
|
|
68
|
+
*
|
|
69
|
+
* @param identifierDescriptor
|
|
70
|
+
* Identifier descriptor.
|
|
71
|
+
*
|
|
72
|
+
* @returns
|
|
73
|
+
* True if identifier descriptor is a non-GTIN numeric identifier descriptor.
|
|
74
|
+
*/
|
|
75
|
+
export declare function isNonGTINNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NonGTINNumericIdentifierDescriptor;
|
|
76
|
+
/**
|
|
77
|
+
* Determine if identifier descriptor is a non-serializable numeric identifier descriptor.
|
|
78
|
+
*
|
|
79
|
+
* @param identifierDescriptor
|
|
80
|
+
* Identifier descriptor.
|
|
81
|
+
*
|
|
82
|
+
* @returns
|
|
83
|
+
* True if identifier descriptor is a non-serializable numeric identifier descriptor.
|
|
84
|
+
*/
|
|
85
|
+
export declare function isNonSerializableNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NonSerializableNumericIdentifierDescriptor;
|
|
86
|
+
/**
|
|
87
|
+
* Determine if identifier descriptor is a serializable numeric identifier descriptor.
|
|
88
|
+
*
|
|
89
|
+
* @param identifierDescriptor
|
|
90
|
+
* Identifier descriptor.
|
|
91
|
+
*
|
|
92
|
+
* @returns
|
|
93
|
+
* True if identifier descriptor is a serializable numeric identifier descriptor.
|
|
94
|
+
*/
|
|
95
|
+
export declare function isSerializableNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is SerializableNumericIdentifierDescriptor;
|
|
96
|
+
/**
|
|
97
|
+
* Determine if identifier descriptor is a non-numeric identifier descriptor.
|
|
98
|
+
*
|
|
99
|
+
* @param identifierDescriptor
|
|
100
|
+
* Identifier descriptor.
|
|
101
|
+
*
|
|
102
|
+
* @returns
|
|
103
|
+
* True if identifier descriptor is a non-numeric identifier descriptor.
|
|
104
|
+
*/
|
|
105
|
+
export declare function isNonNumericIdentifierDescriptor(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is NonNumericIdentifierDescriptor;
|
|
106
|
+
//# sourceMappingURL=identifier-descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-descriptors.d.ts","sourceRoot":"","sources":["../src/identifier-descriptors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,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,cAAc,CAAC,CAAC,CAEtM;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,2BAA2B,CAE7I;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,cAAc,CAEnH;AAED;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,kCAAkC,CAE3J;AAED;;;;;;;;GAQG;AACH,wBAAgB,4CAA4C,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,0CAA0C,CAE3K;AAED;;;;;;;;GAQG;AACH,wBAAgB,yCAAyC,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,uCAAuC,CAErK;AAED;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,8BAA8B,CAEnJ"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { ContentCharacterSets } from "./content-character-set.js";
|
|
2
|
+
import { GTINBaseLengths } from "./gtin-length.js";
|
|
3
|
+
import { isGTINExtension, isNonGTINNumericIdentifierExtension, isNonNumericIdentifierExtension, isNonSerializableNumericIdentifierExtension, isNumericIdentifierExtension, isSerializableNumericIdentifierExtension } from "./identifier-extension.js";
|
|
4
|
+
import { IdentifierTypes } from "./identifier-type.js";
|
|
5
|
+
import { LeaderTypes } from "./leader-type.js";
|
|
6
|
+
import { PrefixTypes } from "./prefix-type.js";
|
|
7
|
+
/**
|
|
8
|
+
* GTIN-13 descriptor.
|
|
9
|
+
*/
|
|
10
|
+
const GTIN13_DESCRIPTOR = {
|
|
11
|
+
identifierType: IdentifierTypes.GTIN,
|
|
12
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
13
|
+
length: GTINBaseLengths.GTIN13,
|
|
14
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
15
|
+
leaderType: LeaderTypes.IndicatorDigit
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* GTIN-12 descriptor.
|
|
19
|
+
*/
|
|
20
|
+
const GTIN12_DESCRIPTOR = {
|
|
21
|
+
identifierType: IdentifierTypes.GTIN,
|
|
22
|
+
prefixType: PrefixTypes.UPCCompanyPrefix,
|
|
23
|
+
length: GTINBaseLengths.GTIN12,
|
|
24
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
25
|
+
leaderType: LeaderTypes.IndicatorDigit
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* GTIN-8 descriptor.
|
|
29
|
+
*/
|
|
30
|
+
const GTIN8_DESCRIPTOR = {
|
|
31
|
+
identifierType: IdentifierTypes.GTIN,
|
|
32
|
+
prefixType: PrefixTypes.GS18Prefix,
|
|
33
|
+
length: GTINBaseLengths.GTIN8,
|
|
34
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
35
|
+
leaderType: LeaderTypes.IndicatorDigit
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* GTIN descriptors indexed by prefix type.
|
|
39
|
+
*/
|
|
40
|
+
const GTIN_DESCRIPTORS = {
|
|
41
|
+
[GTINBaseLengths.GTIN13]: GTIN13_DESCRIPTOR,
|
|
42
|
+
[GTINBaseLengths.GTIN12]: GTIN12_DESCRIPTOR,
|
|
43
|
+
[GTINBaseLengths.GTIN8]: GTIN8_DESCRIPTOR
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* GLN descriptor.
|
|
47
|
+
*/
|
|
48
|
+
const GLN_DESCRIPTOR = {
|
|
49
|
+
identifierType: IdentifierTypes.GLN,
|
|
50
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
51
|
+
length: 13,
|
|
52
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
53
|
+
leaderType: LeaderTypes.None
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* SSCC descriptor.
|
|
57
|
+
*/
|
|
58
|
+
const SSCC_DESCRIPTOR = {
|
|
59
|
+
identifierType: IdentifierTypes.SSCC,
|
|
60
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
61
|
+
length: 18,
|
|
62
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
63
|
+
leaderType: LeaderTypes.ExtensionDigit
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* GRAI descriptor.
|
|
67
|
+
*/
|
|
68
|
+
const GRAI_DESCRIPTOR = {
|
|
69
|
+
identifierType: IdentifierTypes.GRAI,
|
|
70
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
71
|
+
length: 13,
|
|
72
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
73
|
+
leaderType: LeaderTypes.None,
|
|
74
|
+
serialComponentLength: 16,
|
|
75
|
+
serialComponentCharacterSet: ContentCharacterSets.AI82
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* GIAI descriptor.
|
|
79
|
+
*/
|
|
80
|
+
const GIAI_DESCRIPTOR = {
|
|
81
|
+
identifierType: IdentifierTypes.GIAI,
|
|
82
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
83
|
+
length: 30,
|
|
84
|
+
referenceCharacterSet: ContentCharacterSets.AI82,
|
|
85
|
+
requiresCheckCharacterPair: false
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* GSRN descriptor.
|
|
89
|
+
*/
|
|
90
|
+
const GSRN_DESCRIPTOR = {
|
|
91
|
+
identifierType: IdentifierTypes.GSRN,
|
|
92
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
93
|
+
length: 18,
|
|
94
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
95
|
+
leaderType: LeaderTypes.None
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* GDTI descriptor.
|
|
99
|
+
*/
|
|
100
|
+
const GDTI_DESCRIPTOR = {
|
|
101
|
+
identifierType: IdentifierTypes.GDTI,
|
|
102
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
103
|
+
length: 13,
|
|
104
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
105
|
+
leaderType: LeaderTypes.None,
|
|
106
|
+
serialComponentLength: 17,
|
|
107
|
+
serialComponentCharacterSet: ContentCharacterSets.AI82
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* GINC descriptor.
|
|
111
|
+
*/
|
|
112
|
+
const GINC_DESCRIPTOR = {
|
|
113
|
+
identifierType: IdentifierTypes.GINC,
|
|
114
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
115
|
+
length: 30,
|
|
116
|
+
referenceCharacterSet: ContentCharacterSets.AI82,
|
|
117
|
+
requiresCheckCharacterPair: false
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* GSIN descriptor.
|
|
121
|
+
*/
|
|
122
|
+
const GSIN_DESCRIPTOR = {
|
|
123
|
+
identifierType: IdentifierTypes.GSIN,
|
|
124
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
125
|
+
length: 17,
|
|
126
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
127
|
+
leaderType: LeaderTypes.None
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* GCN descriptor.
|
|
131
|
+
*/
|
|
132
|
+
const GCN_DESCRIPTOR = {
|
|
133
|
+
identifierType: IdentifierTypes.GCN,
|
|
134
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
135
|
+
length: 13,
|
|
136
|
+
referenceCharacterSet: ContentCharacterSets.Numeric,
|
|
137
|
+
leaderType: LeaderTypes.None,
|
|
138
|
+
serialComponentLength: 12,
|
|
139
|
+
serialComponentCharacterSet: ContentCharacterSets.Numeric
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* CPID descriptor.
|
|
143
|
+
*/
|
|
144
|
+
const CPID_DESCRIPTOR = {
|
|
145
|
+
identifierType: IdentifierTypes.CPID,
|
|
146
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
147
|
+
length: 30,
|
|
148
|
+
referenceCharacterSet: ContentCharacterSets.AI39,
|
|
149
|
+
requiresCheckCharacterPair: false
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* GMN descriptor.
|
|
153
|
+
*/
|
|
154
|
+
const GMN_DESCRIPTOR = {
|
|
155
|
+
identifierType: IdentifierTypes.GMN,
|
|
156
|
+
prefixType: PrefixTypes.GS1CompanyPrefix,
|
|
157
|
+
length: 25,
|
|
158
|
+
referenceCharacterSet: ContentCharacterSets.AI82,
|
|
159
|
+
requiresCheckCharacterPair: true
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Identifier descriptors for all identifier types.
|
|
163
|
+
*/
|
|
164
|
+
export const IdentifierDescriptors = {
|
|
165
|
+
[IdentifierTypes.GTIN]: GTIN_DESCRIPTORS,
|
|
166
|
+
[IdentifierTypes.GLN]: GLN_DESCRIPTOR,
|
|
167
|
+
[IdentifierTypes.SSCC]: SSCC_DESCRIPTOR,
|
|
168
|
+
[IdentifierTypes.GRAI]: GRAI_DESCRIPTOR,
|
|
169
|
+
[IdentifierTypes.GIAI]: GIAI_DESCRIPTOR,
|
|
170
|
+
[IdentifierTypes.GSRN]: GSRN_DESCRIPTOR,
|
|
171
|
+
[IdentifierTypes.GDTI]: GDTI_DESCRIPTOR,
|
|
172
|
+
[IdentifierTypes.GINC]: GINC_DESCRIPTOR,
|
|
173
|
+
[IdentifierTypes.GSIN]: GSIN_DESCRIPTOR,
|
|
174
|
+
[IdentifierTypes.GCN]: GCN_DESCRIPTOR,
|
|
175
|
+
[IdentifierTypes.CPID]: CPID_DESCRIPTOR,
|
|
176
|
+
[IdentifierTypes.GMN]: GMN_DESCRIPTOR
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Determine if identifier descriptors or descriptor is GTIN descriptors.
|
|
180
|
+
*
|
|
181
|
+
* @param identifierDescriptorsOrDescriptor
|
|
182
|
+
* Identifier descriptors or descriptor.
|
|
183
|
+
*
|
|
184
|
+
* @returns
|
|
185
|
+
* True if GTIN descriptors.
|
|
186
|
+
*/
|
|
187
|
+
export function isGTINDescriptors(identifierDescriptorsOrDescriptor) {
|
|
188
|
+
return !("identifierType" in identifierDescriptorsOrDescriptor);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Determine if identifier descriptor is a numeric identifier descriptor.
|
|
192
|
+
*
|
|
193
|
+
* @param identifierDescriptor
|
|
194
|
+
* Identifier descriptor.
|
|
195
|
+
*
|
|
196
|
+
* @returns
|
|
197
|
+
* True if identifier descriptor is a numeric identifier descriptor.
|
|
198
|
+
*/
|
|
199
|
+
export function isNumericIdentifierDescriptor(identifierDescriptor) {
|
|
200
|
+
return isNumericIdentifierExtension(identifierDescriptor);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Determine if identifier descriptor is a GTIN descriptor.
|
|
204
|
+
*
|
|
205
|
+
* @param identifierDescriptor
|
|
206
|
+
* Identifier descriptor.
|
|
207
|
+
*
|
|
208
|
+
* @returns
|
|
209
|
+
* True if identifier descriptor is a GTIN descriptor.
|
|
210
|
+
*/
|
|
211
|
+
export function isGTINDescriptor(identifierDescriptor) {
|
|
212
|
+
return isGTINExtension(identifierDescriptor);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Determine if identifier descriptor is a non-GTIN numeric identifier descriptor.
|
|
216
|
+
*
|
|
217
|
+
* @param identifierDescriptor
|
|
218
|
+
* Identifier descriptor.
|
|
219
|
+
*
|
|
220
|
+
* @returns
|
|
221
|
+
* True if identifier descriptor is a non-GTIN numeric identifier descriptor.
|
|
222
|
+
*/
|
|
223
|
+
export function isNonGTINNumericIdentifierDescriptor(identifierDescriptor) {
|
|
224
|
+
return isNonGTINNumericIdentifierExtension(identifierDescriptor);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Determine if identifier descriptor is a non-serializable numeric identifier descriptor.
|
|
228
|
+
*
|
|
229
|
+
* @param identifierDescriptor
|
|
230
|
+
* Identifier descriptor.
|
|
231
|
+
*
|
|
232
|
+
* @returns
|
|
233
|
+
* True if identifier descriptor is a non-serializable numeric identifier descriptor.
|
|
234
|
+
*/
|
|
235
|
+
export function isNonSerializableNumericIdentifierDescriptor(identifierDescriptor) {
|
|
236
|
+
return isNonSerializableNumericIdentifierExtension(identifierDescriptor);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Determine if identifier descriptor is a serializable numeric identifier descriptor.
|
|
240
|
+
*
|
|
241
|
+
* @param identifierDescriptor
|
|
242
|
+
* Identifier descriptor.
|
|
243
|
+
*
|
|
244
|
+
* @returns
|
|
245
|
+
* True if identifier descriptor is a serializable numeric identifier descriptor.
|
|
246
|
+
*/
|
|
247
|
+
export function isSerializableNumericIdentifierDescriptor(identifierDescriptor) {
|
|
248
|
+
return isSerializableNumericIdentifierExtension(identifierDescriptor);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Determine if identifier descriptor is a non-numeric identifier descriptor.
|
|
252
|
+
*
|
|
253
|
+
* @param identifierDescriptor
|
|
254
|
+
* Identifier descriptor.
|
|
255
|
+
*
|
|
256
|
+
* @returns
|
|
257
|
+
* True if identifier descriptor is a non-numeric identifier descriptor.
|
|
258
|
+
*/
|
|
259
|
+
export function isNonNumericIdentifierDescriptor(identifierDescriptor) {
|
|
260
|
+
return isNonNumericIdentifierExtension(identifierDescriptor);
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=identifier-descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-descriptors.js","sourceRoot":"","sources":["../src/identifier-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAA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C;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oCAAoC,CAAC,oBAA0C;IAC3F,OAAO,mCAAmC,CAAC,oBAAoB,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,4CAA4C,CAAC,oBAA0C;IACnG,OAAO,2CAA2C,CAAC,oBAAoB,CAAC,CAAC;AAC7E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,yCAAyC,CAAC,oBAA0C;IAChG,OAAO,wCAAwC,CAAC,oBAAoB,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,gCAAgC,CAAC,oBAA0C;IACvF,OAAO,+BAA+B,CAAC,oBAAoB,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { GTINDescriptor } from "./gtin-descriptor.js";
|
|
2
|
+
import { type GTINType } from "./gtin-type.js";
|
|
3
|
+
import type { IdentifierDescriptor } from "./identifier-descriptor.js";
|
|
4
|
+
import type { IdentifierType } from "./identifier-type.js";
|
|
5
|
+
import type { NonGTINNumericIdentifierDescriptor } from "./non-gtin-numeric-identifier-descriptor.js";
|
|
6
|
+
import { type NonGTINNumericIdentifierType } from "./non-gtin-numeric-identifier-type.js";
|
|
7
|
+
import type { NonNumericIdentifierDescriptor } from "./non-numeric-identifier-descriptor.js";
|
|
8
|
+
import { type NonNumericIdentifierType } from "./non-numeric-identifier-type.js";
|
|
9
|
+
import type { NonSerializableNumericIdentifierDescriptor } from "./non-serializable-numeric-identifier-descriptor.js";
|
|
10
|
+
import { type NonSerializableNumericIdentifierType } from "./non-serializable-numeric-identifier-type.js";
|
|
11
|
+
import type { NumericIdentifierDescriptor } from "./numeric-identifier-descriptor.js";
|
|
12
|
+
import { type NumericIdentifierType } from "./numeric-identifier-type.js";
|
|
13
|
+
import type { SerializableNumericIdentifierDescriptor } from "./serializable-numeric-identifier-descriptor.js";
|
|
14
|
+
import { type SerializableNumericIdentifierType } from "./serializable-numeric-identifier-type.js";
|
|
15
|
+
/**
|
|
16
|
+
* Identifier extension type based on identifier type type.
|
|
17
|
+
*
|
|
18
|
+
* @template TIdentifierType
|
|
19
|
+
* Identifier type type.
|
|
20
|
+
*/
|
|
21
|
+
export type IdentifierTypeExtension<TIdentifierType extends IdentifierType, TIdentifierExtension extends IdentifierDescriptor, TNumericIdentifierExtension extends TIdentifierExtension & NumericIdentifierDescriptor, TGTINExtension extends TNumericIdentifierExtension & GTINDescriptor, TNonGTINNumericIdentifierExtension extends TNumericIdentifierExtension & NonGTINNumericIdentifierDescriptor, TNonSerializableNumericIdentifierExtension extends TNonGTINNumericIdentifierExtension & NonSerializableNumericIdentifierDescriptor, TSerializableNumericIdentifierExtension extends TNonGTINNumericIdentifierExtension & SerializableNumericIdentifierDescriptor, TNonNumericIdentifierExtension extends TIdentifierExtension & NonNumericIdentifierDescriptor> = TIdentifierType extends NumericIdentifierType ? TIdentifierType extends GTINType ? TGTINExtension : TIdentifierType extends NonGTINNumericIdentifierType ? TIdentifierType extends NonSerializableNumericIdentifierType ? TNonSerializableNumericIdentifierExtension : TIdentifierType extends SerializableNumericIdentifierType ? TSerializableNumericIdentifierExtension : TNonGTINNumericIdentifierExtension : TNumericIdentifierExtension : TIdentifierType extends NonNumericIdentifierType ? TNonNumericIdentifierExtension : TIdentifierExtension;
|
|
22
|
+
/**
|
|
23
|
+
* Determine if identifier extension is a numeric identifier extension.
|
|
24
|
+
*
|
|
25
|
+
* @param identifierDescriptor
|
|
26
|
+
* Identifier extension.
|
|
27
|
+
*
|
|
28
|
+
* @returns
|
|
29
|
+
* True if identifier extension is a numeric identifier extension.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isNumericIdentifierExtension<TIdentifierExtension extends IdentifierDescriptor, TNumericIdentifierExtension extends TIdentifierExtension & NumericIdentifierDescriptor>(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is TNumericIdentifierExtension;
|
|
32
|
+
/**
|
|
33
|
+
* Determine if identifier extension is a GTIN extension.
|
|
34
|
+
*
|
|
35
|
+
* @param identifierDescriptor
|
|
36
|
+
* Identifier extension.
|
|
37
|
+
*
|
|
38
|
+
* @returns
|
|
39
|
+
* True if identifier extension is a GTIN extension.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isGTINExtension<TIdentifierExtension extends IdentifierDescriptor, TNumericIdentifierExtension extends TIdentifierExtension & NumericIdentifierDescriptor, TGTINExtension extends TNumericIdentifierExtension & GTINDescriptor>(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is TGTINExtension;
|
|
42
|
+
/**
|
|
43
|
+
* Determine if identifier extension is a non-GTIN numeric identifier extension.
|
|
44
|
+
*
|
|
45
|
+
* @param identifierDescriptor
|
|
46
|
+
* Identifier extension.
|
|
47
|
+
*
|
|
48
|
+
* @returns
|
|
49
|
+
* True if identifier extension is a non-GTIN numeric identifier extension.
|
|
50
|
+
*/
|
|
51
|
+
export declare function isNonGTINNumericIdentifierExtension<TIdentifierExtension extends IdentifierDescriptor, TNumericIdentifierExtension extends TIdentifierExtension & NumericIdentifierDescriptor, TNonGTINNumericIdentifierExtension extends TNumericIdentifierExtension & NonGTINNumericIdentifierDescriptor>(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is TNonGTINNumericIdentifierExtension;
|
|
52
|
+
/**
|
|
53
|
+
* Determine if identifier extension is a non-serializable numeric identifier extension.
|
|
54
|
+
*
|
|
55
|
+
* @param identifierDescriptor
|
|
56
|
+
* Identifier extension.
|
|
57
|
+
*
|
|
58
|
+
* @returns
|
|
59
|
+
* True if identifier extension is a non-serializable numeric identifier extension.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isNonSerializableNumericIdentifierExtension<TIdentifierExtension extends IdentifierDescriptor, TNumericIdentifierExtension extends TIdentifierExtension & NumericIdentifierDescriptor, TNonGTINNumericIdentifierExtension extends TNumericIdentifierExtension & NonGTINNumericIdentifierDescriptor, TNonSerializableNumericIdentifierExtension extends TNonGTINNumericIdentifierExtension & NonSerializableNumericIdentifierDescriptor>(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is TNonSerializableNumericIdentifierExtension;
|
|
62
|
+
/**
|
|
63
|
+
* Determine if identifier extension is a serializable numeric identifier extension.
|
|
64
|
+
*
|
|
65
|
+
* @param identifierDescriptor
|
|
66
|
+
* Identifier extension.
|
|
67
|
+
*
|
|
68
|
+
* @returns
|
|
69
|
+
* True if identifier extension is a serializable numeric identifier extension.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isSerializableNumericIdentifierExtension<TIdentifierExtension extends IdentifierDescriptor, TNumericIdentifierExtension extends TIdentifierExtension & NumericIdentifierDescriptor, TNonGTINNumericIdentifierExtension extends TNumericIdentifierExtension & NonGTINNumericIdentifierDescriptor, TSerializableNumericIdentifierExtension extends TNonGTINNumericIdentifierExtension & SerializableNumericIdentifierDescriptor>(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is TSerializableNumericIdentifierExtension;
|
|
72
|
+
/**
|
|
73
|
+
* Determine if identifier extension is a non-numeric identifier extension.
|
|
74
|
+
*
|
|
75
|
+
* @param identifierDescriptor
|
|
76
|
+
* Identifier extension.
|
|
77
|
+
*
|
|
78
|
+
* @returns
|
|
79
|
+
* True if identifier extension is a non-numeric identifier extension.
|
|
80
|
+
*/
|
|
81
|
+
export declare function isNonNumericIdentifierExtension<TIdentifierExtension extends IdentifierDescriptor, TNonNumericIdentifierExtension extends TIdentifierExtension & NonNumericIdentifierDescriptor>(identifierDescriptor: IdentifierDescriptor): identifierDescriptor is TNonNumericIdentifierExtension;
|
|
82
|
+
//# sourceMappingURL=identifier-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-extension.d.ts","sourceRoot":"","sources":["../src/identifier-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,gBAAgB,CAAC;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,IAAI,uCAAuC,CAE7G;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC3C,oBAAoB,SAAS,oBAAoB,EACjD,8BAA8B,SAAS,oBAAoB,GAAG,8BAA8B,EAC9F,oBAAoB,EAAE,oBAAoB,GAAG,oBAAoB,IAAI,8BAA8B,CAEpG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { GTINTypes } from "./gtin-type.js";
|
|
2
|
+
import { NonGTINNumericIdentifierTypes } from "./non-gtin-numeric-identifier-type.js";
|
|
3
|
+
import { NonNumericIdentifierTypes } from "./non-numeric-identifier-type.js";
|
|
4
|
+
import { NonSerializableNumericIdentifierTypes } from "./non-serializable-numeric-identifier-type.js";
|
|
5
|
+
import { NumericIdentifierTypes } from "./numeric-identifier-type.js";
|
|
6
|
+
import { SerializableNumericIdentifierTypes } from "./serializable-numeric-identifier-type.js";
|
|
7
|
+
/**
|
|
8
|
+
* Determine if identifier extension is a numeric identifier extension.
|
|
9
|
+
*
|
|
10
|
+
* @param identifierDescriptor
|
|
11
|
+
* Identifier extension.
|
|
12
|
+
*
|
|
13
|
+
* @returns
|
|
14
|
+
* True if identifier extension is a numeric identifier extension.
|
|
15
|
+
*/
|
|
16
|
+
export function isNumericIdentifierExtension(identifierDescriptor) {
|
|
17
|
+
return identifierDescriptor.identifierType in NumericIdentifierTypes;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Determine if identifier extension is a GTIN extension.
|
|
21
|
+
*
|
|
22
|
+
* @param identifierDescriptor
|
|
23
|
+
* Identifier extension.
|
|
24
|
+
*
|
|
25
|
+
* @returns
|
|
26
|
+
* True if identifier extension is a GTIN extension.
|
|
27
|
+
*/
|
|
28
|
+
export function isGTINExtension(identifierDescriptor) {
|
|
29
|
+
return identifierDescriptor.identifierType in GTINTypes;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Determine if identifier extension is a non-GTIN numeric identifier extension.
|
|
33
|
+
*
|
|
34
|
+
* @param identifierDescriptor
|
|
35
|
+
* Identifier extension.
|
|
36
|
+
*
|
|
37
|
+
* @returns
|
|
38
|
+
* True if identifier extension is a non-GTIN numeric identifier extension.
|
|
39
|
+
*/
|
|
40
|
+
export function isNonGTINNumericIdentifierExtension(identifierDescriptor) {
|
|
41
|
+
return identifierDescriptor.identifierType in NonGTINNumericIdentifierTypes;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Determine if identifier extension is a non-serializable numeric identifier extension.
|
|
45
|
+
*
|
|
46
|
+
* @param identifierDescriptor
|
|
47
|
+
* Identifier extension.
|
|
48
|
+
*
|
|
49
|
+
* @returns
|
|
50
|
+
* True if identifier extension is a non-serializable numeric identifier extension.
|
|
51
|
+
*/
|
|
52
|
+
export function isNonSerializableNumericIdentifierExtension(identifierDescriptor) {
|
|
53
|
+
return identifierDescriptor.identifierType in NonSerializableNumericIdentifierTypes;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Determine if identifier extension is a serializable numeric identifier extension.
|
|
57
|
+
*
|
|
58
|
+
* @param identifierDescriptor
|
|
59
|
+
* Identifier extension.
|
|
60
|
+
*
|
|
61
|
+
* @returns
|
|
62
|
+
* True if identifier extension is a serializable numeric identifier extension.
|
|
63
|
+
*/
|
|
64
|
+
export function isSerializableNumericIdentifierExtension(identifierDescriptor) {
|
|
65
|
+
return identifierDescriptor.identifierType in SerializableNumericIdentifierTypes;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Determine if identifier extension is a non-numeric identifier extension.
|
|
69
|
+
*
|
|
70
|
+
* @param identifierDescriptor
|
|
71
|
+
* Identifier extension.
|
|
72
|
+
*
|
|
73
|
+
* @returns
|
|
74
|
+
* True if identifier extension is a non-numeric identifier extension.
|
|
75
|
+
*/
|
|
76
|
+
export function isNonNumericIdentifierExtension(identifierDescriptor) {
|
|
77
|
+
return identifierDescriptor.identifierType in NonNumericIdentifierTypes;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=identifier-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-extension.js","sourceRoot":"","sources":["../src/identifier-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAEH,6BAA6B,EAChC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAiC,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE5G,OAAO,EAEH,qCAAqC,EACxC,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAA8B,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAElG,OAAO,EAEH,kCAAkC,EACrC,MAAM,2CAA2C,CAAC;AAgCnD;;;;;;;;GAQG;AACH,MAAM,UAAU,4BAA4B,CAG1C,oBAA0C;IACxC,OAAO,oBAAoB,CAAC,cAAc,IAAI,sBAAsB,CAAC;AACzE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAI7B,oBAA0C;IACxC,OAAO,oBAAoB,CAAC,cAAc,IAAI,SAAS,CAAC;AAC5D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mCAAmC,CAIjD,oBAA0C;IACxC,OAAO,oBAAoB,CAAC,cAAc,IAAI,6BAA6B,CAAC;AAChF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,2CAA2C,CAKzD,oBAA0C;IACxC,OAAO,oBAAoB,CAAC,cAAc,IAAI,qCAAqC,CAAC;AACxF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,wCAAwC,CAKtD,oBAA0C;IACxC,OAAO,oBAAoB,CAAC,cAAc,IAAI,kCAAkC,CAAC;AACrF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAG7C,oBAA0C;IACxC,OAAO,oBAAoB,CAAC,cAAc,IAAI,yBAAyB,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifier types.
|
|
3
|
+
*/
|
|
4
|
+
export declare const IdentifierTypes: {
|
|
5
|
+
/**
|
|
6
|
+
* Global Trade Item Number.
|
|
7
|
+
*/
|
|
8
|
+
readonly GTIN: "GTIN";
|
|
9
|
+
/**
|
|
10
|
+
* Global Location Number.
|
|
11
|
+
*/
|
|
12
|
+
readonly GLN: "GLN";
|
|
13
|
+
/**
|
|
14
|
+
* Serial Shipping Container Code.
|
|
15
|
+
*/
|
|
16
|
+
readonly SSCC: "SSCC";
|
|
17
|
+
/**
|
|
18
|
+
* Global Returnable Asset Identifier.
|
|
19
|
+
*/
|
|
20
|
+
readonly GRAI: "GRAI";
|
|
21
|
+
/**
|
|
22
|
+
* Global Individual Asset Identifier.
|
|
23
|
+
*/
|
|
24
|
+
readonly GIAI: "GIAI";
|
|
25
|
+
/**
|
|
26
|
+
* Global Service Relation Number.
|
|
27
|
+
*/
|
|
28
|
+
readonly GSRN: "GSRN";
|
|
29
|
+
/**
|
|
30
|
+
* Global Document Type Identifier.
|
|
31
|
+
*/
|
|
32
|
+
readonly GDTI: "GDTI";
|
|
33
|
+
/**
|
|
34
|
+
* Global Identification Number for Consignment.
|
|
35
|
+
*/
|
|
36
|
+
readonly GINC: "GINC";
|
|
37
|
+
/**
|
|
38
|
+
* Global Shipment Identification Number.
|
|
39
|
+
*/
|
|
40
|
+
readonly GSIN: "GSIN";
|
|
41
|
+
/**
|
|
42
|
+
* Global Coupon Number.
|
|
43
|
+
*/
|
|
44
|
+
readonly GCN: "GCN";
|
|
45
|
+
/**
|
|
46
|
+
* Component/Part Identifier.
|
|
47
|
+
*/
|
|
48
|
+
readonly CPID: "CPID";
|
|
49
|
+
/**
|
|
50
|
+
* Global Model Number.
|
|
51
|
+
*/
|
|
52
|
+
readonly GMN: "GMN";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Identifier type key.
|
|
56
|
+
*/
|
|
57
|
+
export type IdentifierTypeKey = keyof typeof IdentifierTypes;
|
|
58
|
+
/**
|
|
59
|
+
* Identifier type.
|
|
60
|
+
*/
|
|
61
|
+
export type IdentifierType = typeof IdentifierTypes[IdentifierTypeKey];
|
|
62
|
+
//# sourceMappingURL=identifier-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifier-type.d.ts","sourceRoot":"","sources":["../src/identifier-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe;IACxB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEG,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,eAAe,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC,iBAAiB,CAAC,CAAC"}
|