@twin.org/standards-gs1 0.0.2-next.9 → 0.0.3-next.2
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/es/dataTypes/gs1DataTypes.js +24 -0
- package/dist/es/dataTypes/gs1DataTypes.js.map +1 -0
- package/dist/es/entities/gs1Location.js +193 -0
- package/dist/es/entities/gs1Location.js.map +1 -0
- package/dist/es/identifiers/gs1Identifiers.js +32 -0
- package/dist/es/identifiers/gs1Identifiers.js.map +1 -0
- package/dist/es/index.js +38 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/epc/IEPCClassUri.js +4 -0
- package/dist/es/models/epc/IEPCClassUri.js.map +1 -0
- package/dist/es/models/epcis20/IAggregationEvent.js +2 -0
- package/dist/es/models/epcis20/IAggregationEvent.js.map +1 -0
- package/dist/es/models/epcis20/IAssociationEvent.js +2 -0
- package/dist/es/models/epcis20/IAssociationEvent.js.map +1 -0
- package/dist/es/models/epcis20/IBaseAggregationEvent.js +2 -0
- package/dist/es/models/epcis20/IBaseAggregationEvent.js.map +1 -0
- package/dist/es/models/epcis20/IBizTransaction.js +4 -0
- package/dist/es/models/epcis20/IBizTransaction.js.map +1 -0
- package/dist/es/models/epcis20/IDestination.js +4 -0
- package/dist/es/models/epcis20/IDestination.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisDocument.js +2 -0
- package/dist/es/models/epcis20/IEpcisDocument.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisEvent.js +2 -0
- package/dist/es/models/epcis20/IEpcisEvent.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisEventDetails.js +2 -0
- package/dist/es/models/epcis20/IEpcisEventDetails.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisQuery.js +4 -0
- package/dist/es/models/epcis20/IEpcisQuery.js.map +1 -0
- package/dist/es/models/epcis20/IEpcisQueryDocument.js +2 -0
- package/dist/es/models/epcis20/IEpcisQueryDocument.js.map +1 -0
- package/dist/es/models/epcis20/IObjectEvent.js +2 -0
- package/dist/es/models/epcis20/IObjectEvent.js.map +1 -0
- package/dist/es/models/epcis20/IQuantity.js +4 -0
- package/dist/es/models/epcis20/IQuantity.js.map +1 -0
- package/dist/es/models/epcis20/ISensorElement.js +2 -0
- package/dist/es/models/epcis20/ISensorElement.js.map +1 -0
- package/dist/es/models/epcis20/ISensorMetadata.js +4 -0
- package/dist/es/models/epcis20/ISensorMetadata.js.map +1 -0
- package/dist/es/models/epcis20/ISensorReport.js +4 -0
- package/dist/es/models/epcis20/ISensorReport.js.map +1 -0
- package/dist/es/models/epcis20/ISimpleLocation.js +4 -0
- package/dist/es/models/epcis20/ISimpleLocation.js.map +1 -0
- package/dist/es/models/epcis20/ISource.js +4 -0
- package/dist/es/models/epcis20/ISource.js.map +1 -0
- package/dist/es/models/epcis20/actionTypes.js +21 -0
- package/dist/es/models/epcis20/actionTypes.js.map +1 -0
- package/dist/es/models/epcis20/bizStepTypes.js +52 -0
- package/dist/es/models/epcis20/bizStepTypes.js.map +1 -0
- package/dist/es/models/epcis20/dispositionTypes.js +45 -0
- package/dist/es/models/epcis20/dispositionTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisErrorTypes.js +11 -0
- package/dist/es/models/epcis20/epcisErrorTypes.js.map +1 -0
- package/dist/es/models/epcis20/epcisEventUnionType.js +2 -0
- package/dist/es/models/epcis20/epcisEventUnionType.js.map +1 -0
- package/dist/es/models/epcis20/eventTypes.js +29 -0
- package/dist/es/models/epcis20/eventTypes.js.map +1 -0
- package/dist/es/models/gs1/gs1Contexts.js +13 -0
- package/dist/es/models/gs1/gs1Contexts.js.map +1 -0
- package/dist/es/models/gs1/gs1IdTypes.js +90 -0
- package/dist/es/models/gs1/gs1IdTypes.js.map +1 -0
- package/dist/es/models/gs1/gs1IdentifierTypes.js +26 -0
- package/dist/es/models/gs1/gs1IdentifierTypes.js.map +1 -0
- package/dist/es/models/gs1/gs1Types.js +13 -0
- package/dist/es/models/gs1/gs1Types.js.map +1 -0
- package/dist/es/models/gs1/subSiteAttributes.js +143 -0
- package/dist/es/models/gs1/subSiteAttributes.js.map +1 -0
- package/dist/es/models/gs1/subSiteTypes.js +75 -0
- package/dist/es/models/gs1/subSiteTypes.js.map +1 -0
- package/dist/es/utils/gs1IdentifiersValidation.js +144 -0
- package/dist/es/utils/gs1IdentifiersValidation.js.map +1 -0
- package/dist/es/utils/gs1Is.js +24 -0
- package/dist/es/utils/gs1Is.js.map +1 -0
- package/dist/es/utils/gs1Validation.js +51 -0
- package/dist/es/utils/gs1Validation.js.map +1 -0
- package/dist/types/entities/gs1Location.d.ts +2 -2
- package/dist/types/index.d.ts +35 -35
- package/dist/types/models/epcis20/IAggregationEvent.d.ts +1 -1
- package/dist/types/models/epcis20/IAssociationEvent.d.ts +1 -1
- package/dist/types/models/epcis20/IBaseAggregationEvent.d.ts +2 -2
- package/dist/types/models/epcis20/IEpcisDocument.d.ts +1 -1
- package/dist/types/models/epcis20/IEpcisEvent.d.ts +2 -2
- package/dist/types/models/epcis20/IEpcisEventDetails.d.ts +6 -6
- package/dist/types/models/epcis20/IEpcisQueryDocument.d.ts +1 -1
- package/dist/types/models/epcis20/IObjectEvent.d.ts +3 -3
- package/dist/types/models/epcis20/ISensorElement.d.ts +2 -2
- package/dist/types/models/epcis20/epcisEventUnionType.d.ts +3 -3
- package/dist/types/utils/gs1IdentifiersValidation.d.ts +1 -1
- package/dist/types/utils/gs1Validation.d.ts +1 -1
- package/docs/changelog.md +69 -0
- package/docs/reference/classes/Gs1IdentifiersValidation.md +6 -6
- package/locales/en.json +0 -1
- package/package.json +20 -8
- package/dist/cjs/index.cjs +0 -991
- package/dist/esm/index.mjs +0 -974
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHandlerFactory } from "@twin.org/data-core";
|
|
4
|
+
import { GS1Contexts } from "../models/gs1/gs1Contexts.js";
|
|
5
|
+
import { Gs1Types } from "../models/gs1/gs1Types.js";
|
|
6
|
+
import { Gs1Validation } from "../utils/gs1Validation.js";
|
|
7
|
+
/**
|
|
8
|
+
* Handle all the data types for GS1.
|
|
9
|
+
* Vocabulary https://www.gs1.org/voc .
|
|
10
|
+
*/
|
|
11
|
+
export class Gs1DataTypes {
|
|
12
|
+
/**
|
|
13
|
+
* Register all the data types.
|
|
14
|
+
*/
|
|
15
|
+
static registerTypes() {
|
|
16
|
+
DataTypeHandlerFactory.register(`${GS1Contexts.ContextRoot}${Gs1Types.LocationMasterData}`, () => ({
|
|
17
|
+
context: GS1Contexts.ContextRoot,
|
|
18
|
+
type: Gs1Types.LocationMasterData,
|
|
19
|
+
defaultValue: {},
|
|
20
|
+
validate: async (propertyName, value, failures, container) => Gs1Validation.locationMasterData(propertyName, value, failures, container)
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=gs1DataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs1DataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/gs1DataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,YAAY;IACxB;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,WAAW,CAAC,WAAW,GAAG,QAAQ,CAAC,kBAAkB,EAAE,EAC1D,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,WAAW,CAAC,WAAW;YAChC,IAAI,EAAE,QAAQ,CAAC,kBAAkB;YACjC,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,CAC5D,aAAa,CAAC,kBAAkB,CAAC,YAAY,EAAE,KAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC;SAC1F,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory } from \"@twin.org/data-core\";\nimport type { Gs1Location } from \"../entities/gs1Location.js\";\nimport { GS1Contexts } from \"../models/gs1/gs1Contexts.js\";\nimport { Gs1Types } from \"../models/gs1/gs1Types.js\";\nimport { Gs1Validation } from \"../utils/gs1Validation.js\";\n\n/**\n * Handle all the data types for GS1.\n * Vocabulary https://www.gs1.org/voc .\n */\nexport class Gs1DataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${GS1Contexts.ContextRoot}${Gs1Types.LocationMasterData}`,\n\t\t\t() => ({\n\t\t\t\tcontext: GS1Contexts.ContextRoot,\n\t\t\t\ttype: Gs1Types.LocationMasterData,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\t\tGs1Validation.locationMasterData(propertyName, value as Gs1Location, failures, container)\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { entity, property } from "@twin.org/entity";
|
|
4
|
+
/**
|
|
5
|
+
* Interface describing a GS1 Location master data.
|
|
6
|
+
* Spec https://www.gs1.org/sites/default/files/docs/epc/CBV-Standard-1-2-1-r-2017-05-05.pdf .
|
|
7
|
+
* Section 10.2 .
|
|
8
|
+
*/
|
|
9
|
+
let Gs1Location = class Gs1Location {
|
|
10
|
+
/**
|
|
11
|
+
* The GS1 sgln identifier.
|
|
12
|
+
*/
|
|
13
|
+
id;
|
|
14
|
+
/**
|
|
15
|
+
* Identifies the site in which the location is contained.
|
|
16
|
+
*/
|
|
17
|
+
site;
|
|
18
|
+
/**
|
|
19
|
+
* Sub site type describes the primary business function of the sub site location.
|
|
20
|
+
*/
|
|
21
|
+
sst;
|
|
22
|
+
/**
|
|
23
|
+
* Sub site attribute further qualifies the business function of the sub site location.
|
|
24
|
+
*/
|
|
25
|
+
ssa;
|
|
26
|
+
/**
|
|
27
|
+
* Sub site detail provides additional proprietary information.
|
|
28
|
+
*/
|
|
29
|
+
ssd;
|
|
30
|
+
/**
|
|
31
|
+
* The name of the location.
|
|
32
|
+
*/
|
|
33
|
+
name;
|
|
34
|
+
/**
|
|
35
|
+
* The street address line 1.
|
|
36
|
+
*/
|
|
37
|
+
streetAddressOne;
|
|
38
|
+
/**
|
|
39
|
+
* The street address line 2.
|
|
40
|
+
*/
|
|
41
|
+
streetAddressTwo;
|
|
42
|
+
/**
|
|
43
|
+
* The street address line 3.
|
|
44
|
+
*/
|
|
45
|
+
streetAddressThree;
|
|
46
|
+
/**
|
|
47
|
+
* City.
|
|
48
|
+
*/
|
|
49
|
+
city;
|
|
50
|
+
/**
|
|
51
|
+
* State.
|
|
52
|
+
*/
|
|
53
|
+
state;
|
|
54
|
+
/**
|
|
55
|
+
* Postal Code.
|
|
56
|
+
*/
|
|
57
|
+
postalCode;
|
|
58
|
+
/**
|
|
59
|
+
* Country Code The ISO 3166-1 alpha-2 code specifying the country for the address.
|
|
60
|
+
*/
|
|
61
|
+
countryCode;
|
|
62
|
+
/**
|
|
63
|
+
* The latitude of the location in degrees.
|
|
64
|
+
*/
|
|
65
|
+
latitude;
|
|
66
|
+
/**
|
|
67
|
+
* The longitude of the location in degrees.
|
|
68
|
+
*/
|
|
69
|
+
longitude;
|
|
70
|
+
};
|
|
71
|
+
__decorate([
|
|
72
|
+
property({ description: "Unique identifier for the location.", type: "string", isPrimary: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Gs1Location.prototype, "id", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
property({
|
|
77
|
+
description: "Site identifier or name, if applicable.",
|
|
78
|
+
type: "string",
|
|
79
|
+
optional: true
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], Gs1Location.prototype, "site", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
property({
|
|
85
|
+
description: "Additional site-specific information or code.",
|
|
86
|
+
type: "string",
|
|
87
|
+
optional: true
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], Gs1Location.prototype, "sst", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property({
|
|
93
|
+
description: "Sub-site area or section information.",
|
|
94
|
+
type: "string",
|
|
95
|
+
optional: true
|
|
96
|
+
}),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], Gs1Location.prototype, "ssa", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
property({
|
|
101
|
+
description: "Detailed site description or additional data.",
|
|
102
|
+
type: "string",
|
|
103
|
+
optional: true
|
|
104
|
+
}),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], Gs1Location.prototype, "ssd", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
property({
|
|
109
|
+
description: "Name of the location.",
|
|
110
|
+
type: "string",
|
|
111
|
+
optional: true
|
|
112
|
+
}),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], Gs1Location.prototype, "name", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({
|
|
117
|
+
description: "Primary street address.",
|
|
118
|
+
type: "string",
|
|
119
|
+
optional: true
|
|
120
|
+
}),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], Gs1Location.prototype, "streetAddressOne", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({
|
|
125
|
+
description: "Secondary street address, if needed.",
|
|
126
|
+
type: "string",
|
|
127
|
+
optional: true
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], Gs1Location.prototype, "streetAddressTwo", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({
|
|
133
|
+
description: "Tertiary street address, if applicable.",
|
|
134
|
+
type: "string",
|
|
135
|
+
optional: true
|
|
136
|
+
}),
|
|
137
|
+
__metadata("design:type", String)
|
|
138
|
+
], Gs1Location.prototype, "streetAddressThree", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
property({
|
|
141
|
+
description: "City where the location is situated.",
|
|
142
|
+
type: "string",
|
|
143
|
+
optional: true
|
|
144
|
+
}),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], Gs1Location.prototype, "city", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property({
|
|
149
|
+
description: "State or province of the location.",
|
|
150
|
+
type: "string",
|
|
151
|
+
optional: true
|
|
152
|
+
}),
|
|
153
|
+
__metadata("design:type", String)
|
|
154
|
+
], Gs1Location.prototype, "state", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({
|
|
157
|
+
description: "Postal or ZIP code for the location.",
|
|
158
|
+
type: "string",
|
|
159
|
+
optional: true
|
|
160
|
+
}),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], Gs1Location.prototype, "postalCode", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
property({
|
|
165
|
+
description: "Country code where the location is located.",
|
|
166
|
+
type: "string",
|
|
167
|
+
optional: true
|
|
168
|
+
}),
|
|
169
|
+
__metadata("design:type", String)
|
|
170
|
+
], Gs1Location.prototype, "countryCode", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property({
|
|
173
|
+
description: "Latitude coordinate of the location.",
|
|
174
|
+
type: "number",
|
|
175
|
+
optional: true
|
|
176
|
+
}),
|
|
177
|
+
__metadata("design:type", Number)
|
|
178
|
+
], Gs1Location.prototype, "latitude", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
property({
|
|
181
|
+
description: "Longitude coordinate of the location.",
|
|
182
|
+
type: "number",
|
|
183
|
+
optional: true
|
|
184
|
+
}),
|
|
185
|
+
__metadata("design:type", Number)
|
|
186
|
+
], Gs1Location.prototype, "longitude", void 0);
|
|
187
|
+
Gs1Location = __decorate([
|
|
188
|
+
entity({
|
|
189
|
+
description: "Stores detailed information about locations, including addresses and geographic coordinates"
|
|
190
|
+
})
|
|
191
|
+
], Gs1Location);
|
|
192
|
+
export { Gs1Location };
|
|
193
|
+
//# sourceMappingURL=gs1Location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs1Location.js","sourceRoot":"","sources":["../../../src/entities/gs1Location.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIpD;;;;GAIG;AAKI,IAAM,WAAW,GAAjB,MAAM,WAAW;IACvB;;OAEG;IAEI,EAAE,CAAU;IAEnB;;OAEG;IAMI,IAAI,CAAU;IAErB;;OAEG;IAMI,GAAG,CAAgB;IAE1B;;OAEG;IAMI,GAAG,CAAqB;IAE/B;;OAEG;IAMI,GAAG,CAAU;IAEpB;;OAEG;IAMI,IAAI,CAAU;IAErB;;OAEG;IAMI,gBAAgB,CAAU;IAEjC;;OAEG;IAMI,gBAAgB,CAAU;IAEjC;;OAEG;IAMI,kBAAkB,CAAU;IAEnC;;OAEG;IAMI,IAAI,CAAU;IAErB;;OAEG;IAMI,KAAK,CAAU;IAEtB;;OAEG;IAMI,UAAU,CAAU;IAE3B;;OAEG;IAMI,WAAW,CAAU;IAE5B;;OAEG;IAMI,QAAQ,CAAU;IAEzB;;OAEG;IAMI,SAAS,CAAU;CAC1B,CAAA;AA7IO;IADN,QAAQ,CAAC,EAAE,WAAW,EAAE,qCAAqC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;uCAC/E;AAUZ;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;yCACmB;AAUd;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;wCACwB;AAUnB;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;wCAC6B;AAUxB;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;wCACkB;AAUb;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;yCACmB;AAUd;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,yBAAyB;QACtC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;qDAC+B;AAU1B;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;qDAC+B;AAU1B;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;uDACiC;AAU5B;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;yCACmB;AAUd;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;0CACoB;AAUf;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;+CACyB;AAUpB;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;gDAC0B;AAUrB;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;6CACuB;AAUlB;IALN,QAAQ,CAAC;QACT,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;KACd,CAAC;;8CACwB;AAjJd,WAAW;IAJvB,MAAM,CAAC;QACP,WAAW,EACV,6FAA6F;KAC9F,CAAC;GACW,WAAW,CAkJvB","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { entity, property } from \"@twin.org/entity\";\nimport type { SubSiteAttributes } from \"../models/gs1/subSiteAttributes.js\";\nimport type { SubSiteTypes } from \"../models/gs1/subSiteTypes.js\";\n\n/**\n * Interface describing a GS1 Location master data.\n * Spec https://www.gs1.org/sites/default/files/docs/epc/CBV-Standard-1-2-1-r-2017-05-05.pdf .\n * Section 10.2 .\n */\n@entity({\n\tdescription:\n\t\t\"Stores detailed information about locations, including addresses and geographic coordinates\"\n})\nexport class Gs1Location {\n\t/**\n\t * The GS1 sgln identifier.\n\t */\n\t@property({ description: \"Unique identifier for the location.\", type: \"string\", isPrimary: true })\n\tpublic id!: string;\n\n\t/**\n\t * Identifies the site in which the location is contained.\n\t */\n\t@property({\n\t\tdescription: \"Site identifier or name, if applicable.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic site?: string;\n\n\t/**\n\t * Sub site type describes the primary business function of the sub site location.\n\t */\n\t@property({\n\t\tdescription: \"Additional site-specific information or code.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic sst?: SubSiteTypes;\n\n\t/**\n\t * Sub site attribute further qualifies the business function of the sub site location.\n\t */\n\t@property({\n\t\tdescription: \"Sub-site area or section information.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic ssa?: SubSiteAttributes;\n\n\t/**\n\t * Sub site detail provides additional proprietary information.\n\t */\n\t@property({\n\t\tdescription: \"Detailed site description or additional data.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic ssd?: string;\n\n\t/**\n\t * The name of the location.\n\t */\n\t@property({\n\t\tdescription: \"Name of the location.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic name?: string;\n\n\t/**\n\t * The street address line 1.\n\t */\n\t@property({\n\t\tdescription: \"Primary street address.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic streetAddressOne?: string;\n\n\t/**\n\t * The street address line 2.\n\t */\n\t@property({\n\t\tdescription: \"Secondary street address, if needed.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic streetAddressTwo?: string;\n\n\t/**\n\t * The street address line 3.\n\t */\n\t@property({\n\t\tdescription: \"Tertiary street address, if applicable.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic streetAddressThree?: string;\n\n\t/**\n\t * City.\n\t */\n\t@property({\n\t\tdescription: \"City where the location is situated.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic city?: string;\n\n\t/**\n\t * State.\n\t */\n\t@property({\n\t\tdescription: \"State or province of the location.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic state?: string;\n\n\t/**\n\t * Postal Code.\n\t */\n\t@property({\n\t\tdescription: \"Postal or ZIP code for the location.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic postalCode?: string;\n\n\t/**\n\t * Country Code The ISO 3166-1 alpha-2 code specifying the country for the address.\n\t */\n\t@property({\n\t\tdescription: \"Country code where the location is located.\",\n\t\ttype: \"string\",\n\t\toptional: true\n\t})\n\tpublic countryCode?: string;\n\n\t/**\n\t * The latitude of the location in degrees.\n\t */\n\t@property({\n\t\tdescription: \"Latitude coordinate of the location.\",\n\t\ttype: \"number\",\n\t\toptional: true\n\t})\n\tpublic latitude?: number;\n\n\t/**\n\t * The longitude of the location in degrees.\n\t */\n\t@property({\n\t\tdescription: \"Longitude coordinate of the location.\",\n\t\ttype: \"number\",\n\t\toptional: true\n\t})\n\tpublic longitude?: number;\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { IdentifierHandlerFactory } from "@twin.org/data-core";
|
|
4
|
+
import { Gs1IdentifierTypes } from "../models/gs1/gs1IdentifierTypes.js";
|
|
5
|
+
import { Gs1IdentifiersValidation } from "../utils/gs1IdentifiersValidation.js";
|
|
6
|
+
/**
|
|
7
|
+
* Handle all identifier types for GS1.
|
|
8
|
+
*/
|
|
9
|
+
export class Gs1Identifiers {
|
|
10
|
+
/**
|
|
11
|
+
* Register all the identifiers.
|
|
12
|
+
*/
|
|
13
|
+
static registerIdentifiers() {
|
|
14
|
+
IdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcId, () => ({
|
|
15
|
+
namespace: Gs1IdentifierTypes.EpcId,
|
|
16
|
+
validate: (propertyName, value, failures) => Gs1IdentifiersValidation.epcId(propertyName, value, failures)
|
|
17
|
+
}));
|
|
18
|
+
IdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcIdGtin, () => ({
|
|
19
|
+
namespace: Gs1IdentifierTypes.EpcIdGtin,
|
|
20
|
+
validate: (propertyName, value, failures) => Gs1IdentifiersValidation.epcIdGtin(propertyName, value, failures)
|
|
21
|
+
}));
|
|
22
|
+
IdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcIdGln, () => ({
|
|
23
|
+
namespace: Gs1IdentifierTypes.EpcIdGln,
|
|
24
|
+
validate: (propertyName, value, failures) => Gs1IdentifiersValidation.epcIdGln(propertyName, value, failures)
|
|
25
|
+
}));
|
|
26
|
+
IdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcClass, () => ({
|
|
27
|
+
namespace: Gs1IdentifierTypes.EpcClass,
|
|
28
|
+
validate: (propertyName, value, failures) => Gs1IdentifiersValidation.epcClass(propertyName, value, failures)
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=gs1Identifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gs1Identifiers.js","sourceRoot":"","sources":["../../../src/identifiers/gs1Identifiers.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF;;GAEG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAC,mBAAmB;QAChC,wBAAwB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAClE,SAAS,EAAE,kBAAkB,CAAC,KAAK;YACnC,QAAQ,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAW,EAAE,CACpD,wBAAwB,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC;SAC9D,CAAC,CAAC,CAAC;QAEJ,wBAAwB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;YACtE,SAAS,EAAE,kBAAkB,CAAC,SAAS;YACvC,QAAQ,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAW,EAAE,CACpD,wBAAwB,CAAC,SAAS,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC;SAClE,CAAC,CAAC,CAAC;QAEJ,wBAAwB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;YACrE,SAAS,EAAE,kBAAkB,CAAC,QAAQ;YACtC,QAAQ,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAW,EAAE,CACpD,wBAAwB,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC;SACjE,CAAC,CAAC,CAAC;QAEJ,wBAAwB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;YACrE,SAAS,EAAE,kBAAkB,CAAC,QAAQ;YACtC,QAAQ,EAAE,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAW,EAAE,CACpD,wBAAwB,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC;SACjE,CAAC,CAAC,CAAC;IACL,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { IdentifierHandlerFactory } from \"@twin.org/data-core\";\nimport { Gs1IdentifierTypes } from \"../models/gs1/gs1IdentifierTypes.js\";\nimport { Gs1IdentifiersValidation } from \"../utils/gs1IdentifiersValidation.js\";\n\n/**\n * Handle all identifier types for GS1.\n */\nexport class Gs1Identifiers {\n\t/**\n\t * Register all the identifiers.\n\t */\n\tpublic static registerIdentifiers(): void {\n\t\tIdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcId, () => ({\n\t\t\tnamespace: Gs1IdentifierTypes.EpcId,\n\t\t\tvalidate: (propertyName, value, failures): boolean =>\n\t\t\t\tGs1IdentifiersValidation.epcId(propertyName, value, failures)\n\t\t}));\n\n\t\tIdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcIdGtin, () => ({\n\t\t\tnamespace: Gs1IdentifierTypes.EpcIdGtin,\n\t\t\tvalidate: (propertyName, value, failures): boolean =>\n\t\t\t\tGs1IdentifiersValidation.epcIdGtin(propertyName, value, failures)\n\t\t}));\n\n\t\tIdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcIdGln, () => ({\n\t\t\tnamespace: Gs1IdentifierTypes.EpcIdGln,\n\t\t\tvalidate: (propertyName, value, failures): boolean =>\n\t\t\t\tGs1IdentifiersValidation.epcIdGln(propertyName, value, failures)\n\t\t}));\n\n\t\tIdentifierHandlerFactory.register(Gs1IdentifierTypes.EpcClass, () => ({\n\t\t\tnamespace: Gs1IdentifierTypes.EpcClass,\n\t\t\tvalidate: (propertyName, value, failures): boolean =>\n\t\t\t\tGs1IdentifiersValidation.epcClass(propertyName, value, failures)\n\t\t}));\n\t}\n}\n"]}
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./dataTypes/gs1DataTypes.js";
|
|
4
|
+
export * from "./entities/gs1Location.js";
|
|
5
|
+
export * from "./identifiers/gs1Identifiers.js";
|
|
6
|
+
export * from "./models/epc/IEPCClassUri.js";
|
|
7
|
+
export * from "./models/epcis20/actionTypes.js";
|
|
8
|
+
export * from "./models/epcis20/bizStepTypes.js";
|
|
9
|
+
export * from "./models/epcis20/dispositionTypes.js";
|
|
10
|
+
export * from "./models/epcis20/epcisErrorTypes.js";
|
|
11
|
+
export * from "./models/epcis20/epcisEventUnionType.js";
|
|
12
|
+
export * from "./models/epcis20/eventTypes.js";
|
|
13
|
+
export * from "./models/epcis20/IAggregationEvent.js";
|
|
14
|
+
export * from "./models/epcis20/IAssociationEvent.js";
|
|
15
|
+
export * from "./models/epcis20/IBizTransaction.js";
|
|
16
|
+
export * from "./models/epcis20/IDestination.js";
|
|
17
|
+
export * from "./models/epcis20/IEpcisDocument.js";
|
|
18
|
+
export * from "./models/epcis20/IEpcisEvent.js";
|
|
19
|
+
export * from "./models/epcis20/IEpcisEventDetails.js";
|
|
20
|
+
export * from "./models/epcis20/IEpcisQuery.js";
|
|
21
|
+
export * from "./models/epcis20/IEpcisQueryDocument.js";
|
|
22
|
+
export * from "./models/epcis20/IObjectEvent.js";
|
|
23
|
+
export * from "./models/epcis20/IQuantity.js";
|
|
24
|
+
export * from "./models/epcis20/ISensorElement.js";
|
|
25
|
+
export * from "./models/epcis20/ISensorMetadata.js";
|
|
26
|
+
export * from "./models/epcis20/ISensorReport.js";
|
|
27
|
+
export * from "./models/epcis20/ISimpleLocation.js";
|
|
28
|
+
export * from "./models/epcis20/ISource.js";
|
|
29
|
+
export * from "./models/gs1/gs1Contexts.js";
|
|
30
|
+
export * from "./models/gs1/gs1IdentifierTypes.js";
|
|
31
|
+
export * from "./models/gs1/gs1IdTypes.js";
|
|
32
|
+
export * from "./models/gs1/gs1Types.js";
|
|
33
|
+
export * from "./models/gs1/subSiteAttributes.js";
|
|
34
|
+
export * from "./models/gs1/subSiteTypes.js";
|
|
35
|
+
export * from "./utils/gs1IdentifiersValidation.js";
|
|
36
|
+
export * from "./utils/gs1Is.js";
|
|
37
|
+
export * from "./utils/gs1Validation.js";
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/gs1DataTypes.js\";\nexport * from \"./entities/gs1Location.js\";\nexport * from \"./identifiers/gs1Identifiers.js\";\nexport * from \"./models/epc/IEPCClassUri.js\";\nexport * from \"./models/epcis20/actionTypes.js\";\nexport * from \"./models/epcis20/bizStepTypes.js\";\nexport * from \"./models/epcis20/dispositionTypes.js\";\nexport * from \"./models/epcis20/epcisErrorTypes.js\";\nexport * from \"./models/epcis20/epcisEventUnionType.js\";\nexport * from \"./models/epcis20/eventTypes.js\";\nexport * from \"./models/epcis20/IAggregationEvent.js\";\nexport * from \"./models/epcis20/IAssociationEvent.js\";\nexport * from \"./models/epcis20/IBizTransaction.js\";\nexport * from \"./models/epcis20/IDestination.js\";\nexport * from \"./models/epcis20/IEpcisDocument.js\";\nexport * from \"./models/epcis20/IEpcisEvent.js\";\nexport * from \"./models/epcis20/IEpcisEventDetails.js\";\nexport * from \"./models/epcis20/IEpcisQuery.js\";\nexport * from \"./models/epcis20/IEpcisQueryDocument.js\";\nexport * from \"./models/epcis20/IObjectEvent.js\";\nexport * from \"./models/epcis20/IQuantity.js\";\nexport * from \"./models/epcis20/ISensorElement.js\";\nexport * from \"./models/epcis20/ISensorMetadata.js\";\nexport * from \"./models/epcis20/ISensorReport.js\";\nexport * from \"./models/epcis20/ISimpleLocation.js\";\nexport * from \"./models/epcis20/ISource.js\";\nexport * from \"./models/gs1/gs1Contexts.js\";\nexport * from \"./models/gs1/gs1IdentifierTypes.js\";\nexport * from \"./models/gs1/gs1IdTypes.js\";\nexport * from \"./models/gs1/gs1Types.js\";\nexport * from \"./models/gs1/subSiteAttributes.js\";\nexport * from \"./models/gs1/subSiteTypes.js\";\nexport * from \"./utils/gs1IdentifiersValidation.js\";\nexport * from \"./utils/gs1Is.js\";\nexport * from \"./utils/gs1Validation.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEPCClassUri.js","sourceRoot":"","sources":["../../../../src/models/epc/IEPCClassUri.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface for EPC class URI.\n */\nexport interface IEPCClassUri {\n\t/**\n\t * The company prefix.\n\t */\n\tcompanyPrefix: string;\n\n\t/**\n\t * The item reference number.\n\t */\n\titemRefAndIndicator: string;\n\n\t/**\n\t * The batch/lot.\n\t */\n\tlot: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAggregationEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IAggregationEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseAggregationEvent } from \"./IBaseAggregationEvent.js\";\n\n/**\n * Describes an AggregationEvent.\n */\nexport interface IAggregationEvent extends IBaseAggregationEvent {\n\t/**\n\t * The type.\n\t */\n\ttype: \"AggregationEvent\";\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAssociationEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IAssociationEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseAggregationEvent } from \"./IBaseAggregationEvent.js\";\n\n/**\n * Association Event.\n */\nexport interface IAssociationEvent extends IBaseAggregationEvent {\n\t/**\n\t * Type.\n\t */\n\ttype: \"AssociationEvent\";\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IBaseAggregationEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IBaseAggregationEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEpcisEventDetails } from \"./IEpcisEventDetails.js\";\nimport type { IQuantity } from \"./IQuantity.js\";\n\n/**\n * Describes an AggregationEvent.\n */\nexport interface IBaseAggregationEvent extends IEpcisEventDetails {\n\t/**\n\t * Parent is only optional when action is OBSERVE.\n\t */\n\tparentID?: string;\n\n\t/**\n\t * The children EPC which can be empty when action is DELETE.\n\t */\n\tchildEPCs?: string[];\n\n\t/**\n\t * Quantity in case of class-level event visibility data.\n\t */\n\tchildQuantityList?: IQuantity[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IBizTransaction.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IBizTransaction.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Biz Transaction.\n */\nexport interface IBizTransaction {\n\t/**\n\t * Type.\n\t */\n\ttype: string;\n\n\t/**\n\t * The transaction.\n\t */\n\tbizTransaction: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDestination.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IDestination.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Destination.\n */\nexport interface IDestination {\n\t/**\n\t * Type.\n\t */\n\ttype: string;\n\n\t/**\n\t * The destination.\n\t */\n\tdestination: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEpcisDocument.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinition } from \"@twin.org/data-json-ld\";\nimport type { IEpcisEvent } from \"./IEpcisEvent.js\";\n\n/**\n * EPCIS Document.\n */\nexport interface IEpcisDocument {\n\t/**\n\t * The @context.\n\t */\n\t\"@context\": IJsonLdContextDefinition;\n\n\t/**\n\t * The JSON-LD document id.\n\t */\n\tid?: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: \"EPCISDocument\";\n\n\t/**\n\t * The EPCIS Body.\n\t */\n\tepcisBody: {\n\t\t/**\n\t\t * The list of events.\n\t\t */\n\t\teventList: IEpcisEvent[];\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEpcisEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinition } from \"@twin.org/data-json-ld\";\nimport type { IDestination } from \"./IDestination.js\";\nimport type { ISource } from \"./ISource.js\";\n\n/**\n * EPCIS Event.\n */\nexport interface IEpcisEvent {\n\t/**\n\t * JSON-LD @context.\n\t */\n\t\"@context\"?: IJsonLdContextDefinition;\n\n\t/**\n\t * UUID of the event.\n\t */\n\tid?: string;\n\n\t/**\n\t * The id of the event. Marked here as optional as we usually won't store it on Tangle.\n\t */\n\teventID?: string;\n\n\t/**\n\t * Type of Event.\n\t */\n\ttype: string;\n\n\t/**\n\t * Timestamp in UTC.\n\t */\n\teventTime: string;\n\n\t/**\n\t * Timezone offset. Useful if we want to represent timestamp in local timezone.\n\t */\n\teventTimeZoneOffset: string;\n\n\t/**\n\t * When the event was recorded. It will be automatically generated.\n\t */\n\trecordTime?: string;\n\n\t/**\n\t * Source list. Semantics according to EPCIS standard.\n\t */\n\tsourceList?: ISource[];\n\n\t/**\n\t * Destination list. Semantics according to EPCIS standard.\n\t */\n\tdestinationList?: IDestination[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEpcisEventDetails.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisEventDetails.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ActionTypes } from \"./actionTypes.js\";\nimport type { BizStepTypes } from \"./bizStepTypes.js\";\nimport type { DispositionTypes } from \"./dispositionTypes.js\";\nimport type { IBizTransaction } from \"./IBizTransaction.js\";\nimport type { IEpcisEvent } from \"./IEpcisEvent.js\";\nimport type { ISimpleLocation } from \"./ISimpleLocation.js\";\n\n/**\n * EPCIS Event Details.\n */\nexport interface IEpcisEventDetails extends IEpcisEvent {\n\t/**\n\t * Action: ADD, OBSERVE, DELETE.\n\t */\n\taction: ActionTypes;\n\n\t/**\n\t * The location of reading point.\n\t */\n\treadPoint?: ISimpleLocation;\n\n\t/**\n\t * The biz location where the item ends up.\n\t */\n\tbizLocation?: ISimpleLocation;\n\n\t/**\n\t * The business step as per EPCIS.\n\t */\n\tbizStep?: BizStepTypes;\n\n\t/**\n\t * The disposition as per EPCIS.\n\t */\n\tdisposition?: DispositionTypes;\n\n\t/**\n\t * The list of related business transactions.\n\t */\n\tbizTransactionList?: IBizTransaction[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEpcisQuery.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisQuery.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Query type.\n */\nexport interface IEpcisQuery {\n\t[key: string]: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEpcisQueryDocument.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IEpcisQueryDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinition } from \"@twin.org/data-json-ld\";\nimport type { IEpcisEvent } from \"./IEpcisEvent.js\";\n\n/**\n * EPCIS Query Document.\n */\nexport interface IEpcisQueryDocument {\n\t/**\n\t * The @context.\n\t */\n\t\"@context\": IJsonLdContextDefinition;\n\n\t/**\n\t * The JSON-LD document id.\n\t */\n\tid?: string;\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: string;\n\n\t/**\n\t * Schema version.\n\t */\n\tschemaVersion?: string;\n\t/**\n\t * Creation Date.\n\t */\n\tcreationDate?: string;\n\n\t/**\n\t * The EPCIS Body.\n\t */\n\tepcisBody: {\n\t\t/**\n\t\t * The results of the query.\n\t\t */\n\t\tqueryResults: {\n\t\t\t/**\n\t\t\t * The concerned subscription.\n\t\t\t */\n\t\t\tsubscriptionID?: string;\n\t\t\t/**\n\t\t\t * The concerned query.\n\t\t\t */\n\t\t\tqueryName: string;\n\t\t\t/**\n\t\t\t * And now the results.\n\t\t\t */\n\t\t\tresultsBody: {\n\t\t\t\t/**\n\t\t\t\t * The list of events.\n\t\t\t\t */\n\t\t\t\teventList: IEpcisEvent[];\n\t\t\t};\n\t\t};\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IObjectEvent.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IObjectEvent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEpcisEventDetails } from \"./IEpcisEventDetails.js\";\nimport type { IQuantity } from \"./IQuantity.js\";\nimport type { ISensorElement } from \"./ISensorElement.js\";\n\n/**\n * Defines an EPCIS 2.0 Object Event.\n *\n */\nexport interface IObjectEvent extends IEpcisEventDetails {\n\t/**\n\t * Fixed to ObjectEvent.\n\t */\n\ttype: \"ObjectEvent\";\n\n\t/**\n\t * List of EPCs involved.\n\t */\n\tepcList: string[];\n\n\t/**\n\t * Quantity in case of class-level event visibility data.\n\t */\n\tquantityList?: IQuantity[];\n\n\t/**\n\t * Sensor element list.\n\t */\n\tsensorElementList?: ISensorElement[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IQuantity.js","sourceRoot":"","sources":["../../../../src/models/epcis20/IQuantity.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Quantity.\n */\nexport interface IQuantity {\n\t/**\n\t * EPC Class.\n\t */\n\tepcClass: string;\n\n\t/**\n\t * Quantity.\n\t */\n\tquantity: number;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISensorElement.js","sourceRoot":"","sources":["../../../../src/models/epcis20/ISensorElement.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ISensorMetadata } from \"./ISensorMetadata.js\";\nimport type { ISensorReport } from \"./ISensorReport.js\";\n\n/**\n * EPCIS SensorElement.\n */\nexport interface ISensorElement {\n\t/**\n\t * Sensor metadata.\n\t */\n\tsensorMetadata?: ISensorMetadata;\n\n\t/**\n\t * Sensor report.\n\t */\n\tsensorReport: ISensorReport[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISensorMetadata.js","sourceRoot":"","sources":["../../../../src/models/epcis20/ISensorMetadata.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Sensor metadata.\n */\nexport interface ISensorMetadata {\n\t/**\n\t * Time.\n\t */\n\ttime: string;\n\n\t/**\n\t * Device ID.\n\t */\n\tdeviceID: string;\n\n\t/**\n\t * Device Metadata.\n\t */\n\tdeviceMetadata: string;\n\n\t/**\n\t * Raw data.\n\t */\n\trawData: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISensorReport.js","sourceRoot":"","sources":["../../../../src/models/epcis20/ISensorReport.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS SensorReport.\n */\nexport interface ISensorReport {\n\t/**\n\t * Type.\n\t */\n\ttype: string;\n\n\t/**\n\t * Value.\n\t */\n\tvalue: number;\n\n\t/**\n\t * Unit of measurement.\n\t */\n\tuom: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISimpleLocation.js","sourceRoot":"","sources":["../../../../src/models/epcis20/ISimpleLocation.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Location.\n */\nexport interface ISimpleLocation {\n\t/**\n\t * The id.\n\t */\n\tid: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISource.js","sourceRoot":"","sources":["../../../../src/models/epcis20/ISource.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS Biz Transaction.\n */\nexport interface ISource {\n\t/**\n\t * Type.\n\t */\n\ttype: string;\n\n\t/**\n\t * The source.\n\t */\n\tsource: string;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* EPCIS 2.0 action types.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const ActionTypes = {
|
|
8
|
+
/**
|
|
9
|
+
* ADD action.
|
|
10
|
+
*/
|
|
11
|
+
Add: "ADD",
|
|
12
|
+
/**
|
|
13
|
+
* OBSERVE action.
|
|
14
|
+
*/
|
|
15
|
+
Observe: "OBSERVE",
|
|
16
|
+
/**
|
|
17
|
+
* DELETE action.
|
|
18
|
+
*/
|
|
19
|
+
Delete: "DELETE"
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=actionTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionTypes.js","sourceRoot":"","sources":["../../../../src/models/epcis20/actionTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACP,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * EPCIS 2.0 action types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ActionTypes = {\n\t/**\n\t * ADD action.\n\t */\n\tAdd: \"ADD\",\n\n\t/**\n\t * OBSERVE action.\n\t */\n\tObserve: \"OBSERVE\",\n\n\t/**\n\t * DELETE action.\n\t */\n\tDelete: \"DELETE\"\n} as const;\n\n/**\n * EPCIS 2.0 action types.\n */\nexport type ActionTypes = (typeof ActionTypes)[keyof typeof ActionTypes];\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Supported EPCIS 2.0 bizStep.
|
|
5
|
+
*
|
|
6
|
+
* See EPCIS CVB specification for details.
|
|
7
|
+
*/
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
+
export const BizStepTypes = {
|
|
10
|
+
Accepting: "accepting",
|
|
11
|
+
Arriving: "arriving",
|
|
12
|
+
Assembling: "assembling",
|
|
13
|
+
Collecting: "collecting",
|
|
14
|
+
Commissioning: "commissioning",
|
|
15
|
+
Consigning: "consigning",
|
|
16
|
+
CreatingClassInstance: "creating_class_instance",
|
|
17
|
+
CycleCounting: "cycle_counting",
|
|
18
|
+
Decommissioning: "decommissioning",
|
|
19
|
+
Departing: "departing",
|
|
20
|
+
Destroying: "destroying",
|
|
21
|
+
Disassembling: "disassembling",
|
|
22
|
+
Dispensing: "dispensing",
|
|
23
|
+
Encoding: "encoding",
|
|
24
|
+
EnteringExiting: "entering_exiting",
|
|
25
|
+
Holding: "holding",
|
|
26
|
+
Inspecting: "inspecting",
|
|
27
|
+
Installing: "installing",
|
|
28
|
+
Killing: "killing",
|
|
29
|
+
Loading: "loading",
|
|
30
|
+
Other: "other",
|
|
31
|
+
Packing: "packing",
|
|
32
|
+
Picking: "picking",
|
|
33
|
+
Receiving: "receiving",
|
|
34
|
+
Removing: "removing",
|
|
35
|
+
Repackaging: "repackaging",
|
|
36
|
+
Repairing: "repairing",
|
|
37
|
+
Replacing: "replacing",
|
|
38
|
+
Reserving: "reserving",
|
|
39
|
+
RetailSelling: "retail_selling",
|
|
40
|
+
Shipping: "shipping",
|
|
41
|
+
StagingOutbound: "staging_outbound",
|
|
42
|
+
StockTaking: "stock_taking",
|
|
43
|
+
Stocking: "stocking",
|
|
44
|
+
Storing: "storing",
|
|
45
|
+
Transporting: "transporting",
|
|
46
|
+
Unloading: "unloading",
|
|
47
|
+
Unpacking: "unpacking",
|
|
48
|
+
VoidShipping: "void_shipping",
|
|
49
|
+
SensorReporting: "sensor_reporting",
|
|
50
|
+
Sampling: "sampling"
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=bizStepTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bizStepTypes.js","sourceRoot":"","sources":["../../../../src/models/epcis20/bizStepTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,SAAS,EAAE,WAAW;IAEtB,QAAQ,EAAE,UAAU;IAEpB,UAAU,EAAE,YAAY;IAExB,UAAU,EAAE,YAAY;IAExB,aAAa,EAAE,eAAe;IAE9B,UAAU,EAAE,YAAY;IAExB,qBAAqB,EAAE,yBAAyB;IAEhD,aAAa,EAAE,gBAAgB;IAE/B,eAAe,EAAE,iBAAiB;IAElC,SAAS,EAAE,WAAW;IAEtB,UAAU,EAAE,YAAY;IAExB,aAAa,EAAE,eAAe;IAE9B,UAAU,EAAE,YAAY;IAExB,QAAQ,EAAE,UAAU;IAEpB,eAAe,EAAE,kBAAkB;IAEnC,OAAO,EAAE,SAAS;IAElB,UAAU,EAAE,YAAY;IAExB,UAAU,EAAE,YAAY;IAExB,OAAO,EAAE,SAAS;IAElB,OAAO,EAAE,SAAS;IAElB,KAAK,EAAE,OAAO;IAEd,OAAO,EAAE,SAAS;IAElB,OAAO,EAAE,SAAS;IAElB,SAAS,EAAE,WAAW;IAEtB,QAAQ,EAAE,UAAU;IAEpB,WAAW,EAAE,aAAa;IAE1B,SAAS,EAAE,WAAW;IAEtB,SAAS,EAAE,WAAW;IAEtB,SAAS,EAAE,WAAW;IAEtB,aAAa,EAAE,gBAAgB;IAE/B,QAAQ,EAAE,UAAU;IAEpB,eAAe,EAAE,kBAAkB;IAEnC,WAAW,EAAE,cAAc;IAE3B,QAAQ,EAAE,UAAU;IAEpB,OAAO,EAAE,SAAS;IAElB,YAAY,EAAE,cAAc;IAE5B,SAAS,EAAE,WAAW;IAEtB,SAAS,EAAE,WAAW;IAEtB,YAAY,EAAE,eAAe;IAE7B,eAAe,EAAE,kBAAkB;IAEnC,QAAQ,EAAE,UAAU;CACX,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Supported EPCIS 2.0 bizStep.\n *\n * See EPCIS CVB specification for details.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const BizStepTypes = {\n\tAccepting: \"accepting\",\n\n\tArriving: \"arriving\",\n\n\tAssembling: \"assembling\",\n\n\tCollecting: \"collecting\",\n\n\tCommissioning: \"commissioning\",\n\n\tConsigning: \"consigning\",\n\n\tCreatingClassInstance: \"creating_class_instance\",\n\n\tCycleCounting: \"cycle_counting\",\n\n\tDecommissioning: \"decommissioning\",\n\n\tDeparting: \"departing\",\n\n\tDestroying: \"destroying\",\n\n\tDisassembling: \"disassembling\",\n\n\tDispensing: \"dispensing\",\n\n\tEncoding: \"encoding\",\n\n\tEnteringExiting: \"entering_exiting\",\n\n\tHolding: \"holding\",\n\n\tInspecting: \"inspecting\",\n\n\tInstalling: \"installing\",\n\n\tKilling: \"killing\",\n\n\tLoading: \"loading\",\n\n\tOther: \"other\",\n\n\tPacking: \"packing\",\n\n\tPicking: \"picking\",\n\n\tReceiving: \"receiving\",\n\n\tRemoving: \"removing\",\n\n\tRepackaging: \"repackaging\",\n\n\tRepairing: \"repairing\",\n\n\tReplacing: \"replacing\",\n\n\tReserving: \"reserving\",\n\n\tRetailSelling: \"retail_selling\",\n\n\tShipping: \"shipping\",\n\n\tStagingOutbound: \"staging_outbound\",\n\n\tStockTaking: \"stock_taking\",\n\n\tStocking: \"stocking\",\n\n\tStoring: \"storing\",\n\n\tTransporting: \"transporting\",\n\n\tUnloading: \"unloading\",\n\n\tUnpacking: \"unpacking\",\n\n\tVoidShipping: \"void_shipping\",\n\n\tSensorReporting: \"sensor_reporting\",\n\n\tSampling: \"sampling\"\n} as const;\n\n/**\n * EPCIS 2.0 action types.\n */\nexport type BizStepTypes = (typeof BizStepTypes)[keyof typeof BizStepTypes];\n"]}
|