@sendhome/common 1.0.175 → 1.0.177
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.
|
@@ -5,32 +5,64 @@ import { UnitType } from "../types/unit-type";
|
|
|
5
5
|
import { ReceiveCountry } from "../types/receive-country";
|
|
6
6
|
interface IGroceriesFields {
|
|
7
7
|
expiration_date?: Date;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
brand?: string;
|
|
9
|
+
weight?: number;
|
|
10
|
+
package_type?: string;
|
|
11
|
+
storage_instructions?: string;
|
|
12
|
+
expiry_date?: Date;
|
|
13
|
+
freshness?: string;
|
|
14
|
+
dietary_info?: string;
|
|
15
|
+
certifications?: string;
|
|
16
|
+
origin?: string;
|
|
12
17
|
}
|
|
13
18
|
interface IHardwareFields {
|
|
14
19
|
brand?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
model_number?: string;
|
|
21
|
+
weight?: string;
|
|
22
|
+
dimensions?: string;
|
|
23
|
+
material?: string;
|
|
24
|
+
power_source?: string;
|
|
25
|
+
voltage?: string;
|
|
26
|
+
warranty?: string;
|
|
27
|
+
certifications?: string;
|
|
28
|
+
usage?: string;
|
|
29
|
+
safety_precautions?: string;
|
|
18
30
|
}
|
|
19
31
|
interface IClothingFields {
|
|
32
|
+
brand?: string;
|
|
20
33
|
size?: string;
|
|
21
|
-
|
|
34
|
+
fit_type?: string;
|
|
22
35
|
material?: string;
|
|
36
|
+
color?: string;
|
|
37
|
+
pattern?: string;
|
|
38
|
+
sleeve_type?: string;
|
|
39
|
+
neckline?: string;
|
|
23
40
|
care_instructions?: string;
|
|
41
|
+
occasion?: string;
|
|
42
|
+
season?: string;
|
|
24
43
|
}
|
|
25
44
|
interface IFuelFields {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
brand?: string;
|
|
46
|
+
fuel_grade?: string;
|
|
47
|
+
octane_rating?: string;
|
|
48
|
+
sulfur_content?: string;
|
|
49
|
+
unit_volume?: string;
|
|
50
|
+
emissions_rating?: string;
|
|
51
|
+
biofuel_content?: string;
|
|
52
|
+
storage_requirements?: string;
|
|
29
53
|
}
|
|
30
54
|
interface IGasFields {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
brand?: string;
|
|
56
|
+
gas_type?: string;
|
|
57
|
+
energy_content?: string;
|
|
58
|
+
purity?: string;
|
|
59
|
+
density?: string;
|
|
60
|
+
boiling_point?: string;
|
|
61
|
+
pressure_requirements?: string;
|
|
62
|
+
odorant_added?: string;
|
|
63
|
+
applications?: string;
|
|
64
|
+
storage_requirements?: string;
|
|
65
|
+
emissions_rating?: string;
|
|
34
66
|
}
|
|
35
67
|
export interface ProductCreatedEvent {
|
|
36
68
|
subject: Subjects.ProductCreated;
|
|
@@ -5,32 +5,64 @@ import { UnitType } from "../types/unit-type";
|
|
|
5
5
|
import { ReceiveCountry } from "../types/receive-country";
|
|
6
6
|
interface IGroceriesFields {
|
|
7
7
|
expiration_date?: Date;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
brand?: string;
|
|
9
|
+
weight?: number;
|
|
10
|
+
package_type?: string;
|
|
11
|
+
storage_instructions?: string;
|
|
12
|
+
expiry_date?: Date;
|
|
13
|
+
freshness?: string;
|
|
14
|
+
dietary_info?: string;
|
|
15
|
+
certifications?: string;
|
|
16
|
+
origin?: string;
|
|
12
17
|
}
|
|
13
18
|
interface IHardwareFields {
|
|
14
19
|
brand?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
model_number?: string;
|
|
21
|
+
weight?: string;
|
|
22
|
+
dimensions?: string;
|
|
23
|
+
material?: string;
|
|
24
|
+
power_source?: string;
|
|
25
|
+
voltage?: string;
|
|
26
|
+
warranty?: string;
|
|
27
|
+
certifications?: string;
|
|
28
|
+
usage?: string;
|
|
29
|
+
safety_precautions?: string;
|
|
18
30
|
}
|
|
19
31
|
interface IClothingFields {
|
|
32
|
+
brand?: string;
|
|
20
33
|
size?: string;
|
|
21
|
-
|
|
34
|
+
fit_type?: string;
|
|
22
35
|
material?: string;
|
|
36
|
+
color?: string;
|
|
37
|
+
pattern?: string;
|
|
38
|
+
sleeve_type?: string;
|
|
39
|
+
neckline?: string;
|
|
23
40
|
care_instructions?: string;
|
|
41
|
+
occasion?: string;
|
|
42
|
+
season?: string;
|
|
24
43
|
}
|
|
25
44
|
interface IFuelFields {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
brand?: string;
|
|
46
|
+
fuel_grade?: string;
|
|
47
|
+
octane_rating?: string;
|
|
48
|
+
sulfur_content?: string;
|
|
49
|
+
unit_volume?: string;
|
|
50
|
+
emissions_rating?: string;
|
|
51
|
+
biofuel_content?: string;
|
|
52
|
+
storage_requirements?: string;
|
|
29
53
|
}
|
|
30
54
|
interface IGasFields {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
brand?: string;
|
|
56
|
+
gas_type?: string;
|
|
57
|
+
energy_content?: string;
|
|
58
|
+
purity?: string;
|
|
59
|
+
density?: string;
|
|
60
|
+
boiling_point?: string;
|
|
61
|
+
pressure_requirements?: string;
|
|
62
|
+
odorant_added?: string;
|
|
63
|
+
applications?: string;
|
|
64
|
+
storage_requirements?: string;
|
|
65
|
+
emissions_rating?: string;
|
|
34
66
|
}
|
|
35
67
|
export interface ProductUpdatedEvent {
|
|
36
68
|
subject: Subjects.ProductUpdated;
|
|
@@ -18,10 +18,11 @@ const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
|
18
18
|
// Middleware to validate user session per device
|
|
19
19
|
const requireAuth = (sessionServiceUrl) => {
|
|
20
20
|
return (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
var _a;
|
|
21
|
+
var _a, _b;
|
|
22
22
|
console.log("req.cookies.token", req.cookies.token);
|
|
23
23
|
try {
|
|
24
24
|
const token = req.cookies.token || ((_a = req.headers.authorization) === null || _a === void 0 ? void 0 : _a.split(' ')[1]);
|
|
25
|
+
console.log("req.headers.authorization", (_b = req.headers.authorization) === null || _b === void 0 ? void 0 : _b.split(" ")[1]);
|
|
25
26
|
if (!token) {
|
|
26
27
|
res.status(401).json({ message: 'No session token provided' });
|
|
27
28
|
return;
|