universal-parcel-scraper 0.23.1-main.359 → 0.24.0-main.360
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/data/catalog.json +10 -3
- package/data/detection-golden.json +33 -6
- package/dist/browser/scraper.js +9 -5
- package/dist/carriers/amazon-logistics/carrier.json +4 -2
- package/dist/carriers/amazon-logistics/numbers.json +6 -6
- package/dist/carriers/amazon-shipping/adapter.js +3 -3
- package/dist/carriers/colisweb/carrier.json +7 -1
- package/dist/carriers/colisweb/numbers.json +3 -1
- package/dist/carriers/heppner/numbers.json +2 -0
- package/dist/carriers/inpost/numbers.json +1 -0
- package/dist/carriers/mondial-relay/numbers.json +14 -0
- package/dist/carriers/planzer/numbers.json +2 -0
- package/dist/carriers/swiss-post-cargo/numbers.json +1 -0
- package/dist/carriers/unknown/numbers.json +2 -0
- package/dist/core/catalog/amazon.js +7 -1
- package/dist/core/detection/amazon.d.ts +1 -1
- package/dist/data/catalog.json +10 -3
- package/dist/generated/catalog.d.ts +6 -3
- package/dist/generated/catalog.js +10 -3
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
package/data/catalog.json
CHANGED
|
@@ -609,7 +609,9 @@
|
|
|
609
609
|
"IS",
|
|
610
610
|
"LI",
|
|
611
611
|
"TR",
|
|
612
|
-
"US"
|
|
612
|
+
"US",
|
|
613
|
+
"CA",
|
|
614
|
+
"MX"
|
|
613
615
|
],
|
|
614
616
|
"selectable": true,
|
|
615
617
|
"timezone": "UTC",
|
|
@@ -633,7 +635,7 @@
|
|
|
633
635
|
],
|
|
634
636
|
"detectionRules": [
|
|
635
637
|
{
|
|
636
|
-
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
638
|
+
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$",
|
|
637
639
|
"confidence": "high"
|
|
638
640
|
}
|
|
639
641
|
]
|
|
@@ -1261,7 +1263,12 @@
|
|
|
1261
1263
|
]
|
|
1262
1264
|
}
|
|
1263
1265
|
],
|
|
1264
|
-
"detectionRules": [
|
|
1266
|
+
"detectionRules": [
|
|
1267
|
+
{
|
|
1268
|
+
"pattern": "^\\d{8}$",
|
|
1269
|
+
"confidence": "low"
|
|
1270
|
+
}
|
|
1271
|
+
]
|
|
1265
1272
|
},
|
|
1266
1273
|
"c-chez-vous": {
|
|
1267
1274
|
"displayName": "C Chez Vous",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"confidence": "low",
|
|
72
72
|
"candidates": [
|
|
73
73
|
"mondial-relay",
|
|
74
|
+
"colisweb",
|
|
74
75
|
"heppner"
|
|
75
76
|
]
|
|
76
77
|
},
|
|
@@ -901,6 +902,7 @@
|
|
|
901
902
|
"confidence": "low",
|
|
902
903
|
"candidates": [
|
|
903
904
|
"mondial-relay",
|
|
905
|
+
"colisweb",
|
|
904
906
|
"heppner"
|
|
905
907
|
]
|
|
906
908
|
},
|
|
@@ -1185,6 +1187,7 @@
|
|
|
1185
1187
|
"confidence": "low",
|
|
1186
1188
|
"candidates": [
|
|
1187
1189
|
"mondial-relay",
|
|
1190
|
+
"colisweb",
|
|
1188
1191
|
"heppner"
|
|
1189
1192
|
]
|
|
1190
1193
|
},
|
|
@@ -1194,6 +1197,7 @@
|
|
|
1194
1197
|
"confidence": "low",
|
|
1195
1198
|
"candidates": [
|
|
1196
1199
|
"mondial-relay",
|
|
1200
|
+
"colisweb",
|
|
1197
1201
|
"heppner"
|
|
1198
1202
|
]
|
|
1199
1203
|
},
|
|
@@ -1274,6 +1278,7 @@
|
|
|
1274
1278
|
"confidence": "low",
|
|
1275
1279
|
"candidates": [
|
|
1276
1280
|
"mondial-relay",
|
|
1281
|
+
"colisweb",
|
|
1277
1282
|
"heppner"
|
|
1278
1283
|
]
|
|
1279
1284
|
},
|
|
@@ -2558,6 +2563,7 @@
|
|
|
2558
2563
|
"confidence": "low",
|
|
2559
2564
|
"candidates": [
|
|
2560
2565
|
"mondial-relay",
|
|
2566
|
+
"colisweb",
|
|
2561
2567
|
"heppner"
|
|
2562
2568
|
]
|
|
2563
2569
|
},
|
|
@@ -2598,6 +2604,7 @@
|
|
|
2598
2604
|
"confidence": "low",
|
|
2599
2605
|
"candidates": [
|
|
2600
2606
|
"mondial-relay",
|
|
2607
|
+
"colisweb",
|
|
2601
2608
|
"heppner"
|
|
2602
2609
|
]
|
|
2603
2610
|
},
|
|
@@ -2694,6 +2701,7 @@
|
|
|
2694
2701
|
"confidence": "low",
|
|
2695
2702
|
"candidates": [
|
|
2696
2703
|
"mondial-relay",
|
|
2704
|
+
"colisweb",
|
|
2697
2705
|
"heppner"
|
|
2698
2706
|
]
|
|
2699
2707
|
},
|
|
@@ -3481,6 +3489,7 @@
|
|
|
3481
3489
|
"confidence": "low",
|
|
3482
3490
|
"candidates": [
|
|
3483
3491
|
"mondial-relay",
|
|
3492
|
+
"colisweb",
|
|
3484
3493
|
"heppner"
|
|
3485
3494
|
]
|
|
3486
3495
|
},
|
|
@@ -3518,6 +3527,7 @@
|
|
|
3518
3527
|
"confidence": "low",
|
|
3519
3528
|
"candidates": [
|
|
3520
3529
|
"mondial-relay",
|
|
3530
|
+
"colisweb",
|
|
3521
3531
|
"heppner"
|
|
3522
3532
|
]
|
|
3523
3533
|
},
|
|
@@ -3990,6 +4000,7 @@
|
|
|
3990
4000
|
"confidence": "low",
|
|
3991
4001
|
"candidates": [
|
|
3992
4002
|
"mondial-relay",
|
|
4003
|
+
"colisweb",
|
|
3993
4004
|
"heppner"
|
|
3994
4005
|
]
|
|
3995
4006
|
},
|
|
@@ -3999,6 +4010,7 @@
|
|
|
3999
4010
|
"confidence": "low",
|
|
4000
4011
|
"candidates": [
|
|
4001
4012
|
"mondial-relay",
|
|
4013
|
+
"colisweb",
|
|
4002
4014
|
"heppner"
|
|
4003
4015
|
]
|
|
4004
4016
|
},
|
|
@@ -4113,6 +4125,7 @@
|
|
|
4113
4125
|
"confidence": "low",
|
|
4114
4126
|
"candidates": [
|
|
4115
4127
|
"mondial-relay",
|
|
4128
|
+
"colisweb",
|
|
4116
4129
|
"heppner"
|
|
4117
4130
|
]
|
|
4118
4131
|
},
|
|
@@ -4208,6 +4221,7 @@
|
|
|
4208
4221
|
"confidence": "low",
|
|
4209
4222
|
"candidates": [
|
|
4210
4223
|
"mondial-relay",
|
|
4224
|
+
"colisweb",
|
|
4211
4225
|
"heppner"
|
|
4212
4226
|
]
|
|
4213
4227
|
},
|
|
@@ -4229,6 +4243,7 @@
|
|
|
4229
4243
|
"confidence": "low",
|
|
4230
4244
|
"candidates": [
|
|
4231
4245
|
"mondial-relay",
|
|
4246
|
+
"colisweb",
|
|
4232
4247
|
"heppner"
|
|
4233
4248
|
]
|
|
4234
4249
|
},
|
|
@@ -4283,6 +4298,7 @@
|
|
|
4283
4298
|
"confidence": "low",
|
|
4284
4299
|
"candidates": [
|
|
4285
4300
|
"mondial-relay",
|
|
4301
|
+
"colisweb",
|
|
4286
4302
|
"heppner"
|
|
4287
4303
|
]
|
|
4288
4304
|
},
|
|
@@ -4372,6 +4388,7 @@
|
|
|
4372
4388
|
"confidence": "low",
|
|
4373
4389
|
"candidates": [
|
|
4374
4390
|
"mondial-relay",
|
|
4391
|
+
"colisweb",
|
|
4375
4392
|
"heppner"
|
|
4376
4393
|
]
|
|
4377
4394
|
},
|
|
@@ -4479,6 +4496,7 @@
|
|
|
4479
4496
|
"confidence": "low",
|
|
4480
4497
|
"candidates": [
|
|
4481
4498
|
"mondial-relay",
|
|
4499
|
+
"colisweb",
|
|
4482
4500
|
"heppner"
|
|
4483
4501
|
]
|
|
4484
4502
|
},
|
|
@@ -4575,6 +4593,7 @@
|
|
|
4575
4593
|
"confidence": "low",
|
|
4576
4594
|
"candidates": [
|
|
4577
4595
|
"mondial-relay",
|
|
4596
|
+
"colisweb",
|
|
4578
4597
|
"heppner"
|
|
4579
4598
|
]
|
|
4580
4599
|
},
|
|
@@ -4584,6 +4603,7 @@
|
|
|
4584
4603
|
"confidence": "low",
|
|
4585
4604
|
"candidates": [
|
|
4586
4605
|
"mondial-relay",
|
|
4606
|
+
"colisweb",
|
|
4587
4607
|
"heppner"
|
|
4588
4608
|
]
|
|
4589
4609
|
},
|
|
@@ -4810,6 +4830,7 @@
|
|
|
4810
4830
|
"confidence": "low",
|
|
4811
4831
|
"candidates": [
|
|
4812
4832
|
"mondial-relay",
|
|
4833
|
+
"colisweb",
|
|
4813
4834
|
"heppner"
|
|
4814
4835
|
]
|
|
4815
4836
|
},
|
|
@@ -5096,6 +5117,7 @@
|
|
|
5096
5117
|
"confidence": "low",
|
|
5097
5118
|
"candidates": [
|
|
5098
5119
|
"mondial-relay",
|
|
5120
|
+
"colisweb",
|
|
5099
5121
|
"heppner"
|
|
5100
5122
|
]
|
|
5101
5123
|
},
|
|
@@ -5162,6 +5184,7 @@
|
|
|
5162
5184
|
"confidence": "low",
|
|
5163
5185
|
"candidates": [
|
|
5164
5186
|
"mondial-relay",
|
|
5187
|
+
"colisweb",
|
|
5165
5188
|
"heppner"
|
|
5166
5189
|
]
|
|
5167
5190
|
},
|
|
@@ -8147,15 +8170,19 @@
|
|
|
8147
8170
|
},
|
|
8148
8171
|
{
|
|
8149
8172
|
"input": "TBC 000000000000",
|
|
8150
|
-
"carrier": "
|
|
8151
|
-
"confidence": "
|
|
8152
|
-
"candidates": [
|
|
8173
|
+
"carrier": "amazon-logistics",
|
|
8174
|
+
"confidence": "high",
|
|
8175
|
+
"candidates": [
|
|
8176
|
+
"amazon-logistics"
|
|
8177
|
+
]
|
|
8153
8178
|
},
|
|
8154
8179
|
{
|
|
8155
8180
|
"input": "TBM502887274000",
|
|
8156
|
-
"carrier": "
|
|
8157
|
-
"confidence": "
|
|
8158
|
-
"candidates": [
|
|
8181
|
+
"carrier": "amazon-logistics",
|
|
8182
|
+
"confidence": "high",
|
|
8183
|
+
"candidates": [
|
|
8184
|
+
"amazon-logistics"
|
|
8185
|
+
]
|
|
8159
8186
|
},
|
|
8160
8187
|
{
|
|
8161
8188
|
"input": "TLR000083964",
|
package/dist/browser/scraper.js
CHANGED
|
@@ -553,7 +553,7 @@ var ue = {
|
|
|
553
553
|
displayName: "Amazon Logistics",
|
|
554
554
|
color: "#ff9900",
|
|
555
555
|
aliases: ["AMZL", "Amazon Logistik"],
|
|
556
|
-
countries: /* @__PURE__ */ "FR.DE.BE.GB.IT.ES.NL.AT.IE.PL.SE.PT.LU.DK.FI.CZ.SK.HU.RO.BG.HR.SI.EE.LV.LT.GR.CY.MT.CH.NO.IS.LI.TR.US".split("."),
|
|
556
|
+
countries: /* @__PURE__ */ "FR.DE.BE.GB.IT.ES.NL.AT.IE.PL.SE.PT.LU.DK.FI.CZ.SK.HU.RO.BG.HR.SI.EE.LV.LT.GR.CY.MT.CH.NO.IS.LI.TR.US.CA.MX".split("."),
|
|
557
557
|
selectable: !0,
|
|
558
558
|
timezone: "UTC",
|
|
559
559
|
tracking: {
|
|
@@ -573,7 +573,7 @@ var ue = {
|
|
|
573
573
|
detectFromNumber: !0
|
|
574
574
|
}],
|
|
575
575
|
detectionRules: [{
|
|
576
|
-
pattern: "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
576
|
+
pattern: "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$",
|
|
577
577
|
confidence: "high"
|
|
578
578
|
}]
|
|
579
579
|
},
|
|
@@ -1038,7 +1038,10 @@ var ue = {
|
|
|
1038
1038
|
domains: ["colisweb.com"],
|
|
1039
1039
|
params: ["value", "trackingNumber"]
|
|
1040
1040
|
}],
|
|
1041
|
-
detectionRules: [
|
|
1041
|
+
detectionRules: [{
|
|
1042
|
+
pattern: "^\\d{8}$",
|
|
1043
|
+
confidence: "low"
|
|
1044
|
+
}]
|
|
1042
1045
|
},
|
|
1043
1046
|
"c-chez-vous": {
|
|
1044
1047
|
displayName: "C Chez Vous",
|
|
@@ -3569,7 +3572,8 @@ function he(e, t = "") {
|
|
|
3569
3572
|
return e !== "amazon-shipping" && (e === "amazon-logistics" || me(t));
|
|
3570
3573
|
}
|
|
3571
3574
|
function ge(e) {
|
|
3572
|
-
|
|
3575
|
+
let t = e.replace(/[\s.-]/g, "").toUpperCase();
|
|
3576
|
+
return t.startsWith("TBC") ? "ca" : t.startsWith("TBM") ? "com.mx" : {
|
|
3573
3577
|
FR: "fr",
|
|
3574
3578
|
DE: "de",
|
|
3575
3579
|
AT: "de",
|
|
@@ -3584,7 +3588,7 @@ function ge(e) {
|
|
|
3584
3588
|
PL: "pl",
|
|
3585
3589
|
SE: "se",
|
|
3586
3590
|
TR: "com.tr"
|
|
3587
|
-
}[
|
|
3591
|
+
}[t.slice(0, 2)] ?? "com";
|
|
3588
3592
|
}
|
|
3589
3593
|
function _e(e) {
|
|
3590
3594
|
return `https://www.amazon.${ge(e)}/gp/your-account/order-history`;
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
"IS",
|
|
41
41
|
"LI",
|
|
42
42
|
"TR",
|
|
43
|
-
"US"
|
|
43
|
+
"US",
|
|
44
|
+
"CA",
|
|
45
|
+
"MX"
|
|
44
46
|
]
|
|
45
47
|
},
|
|
46
48
|
"brand": {
|
|
@@ -87,7 +89,7 @@
|
|
|
87
89
|
"detection": [
|
|
88
90
|
{
|
|
89
91
|
"id": "amazon-logistics-1",
|
|
90
|
-
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
92
|
+
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$",
|
|
91
93
|
"confidence": "high"
|
|
92
94
|
}
|
|
93
95
|
]
|
|
@@ -229,10 +229,10 @@
|
|
|
229
229
|
"url": "https://github.com/jkeen/tracking_number_data/blob/main/couriers/amazon.json"
|
|
230
230
|
},
|
|
231
231
|
"expect": {
|
|
232
|
-
"carrier": "
|
|
233
|
-
"confidence": "
|
|
232
|
+
"carrier": "amazon-logistics",
|
|
233
|
+
"confidence": "high"
|
|
234
234
|
},
|
|
235
|
-
"note": "Open-source project example, not a real shipment. The source
|
|
235
|
+
"note": "Open-source project example, not a real shipment. The source lists it as a valid Amazon Logistics number with the Canadian prefix."
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
"number": "UK0000000001",
|
|
@@ -303,10 +303,10 @@
|
|
|
303
303
|
"url": "https://github.com/jkeen/tracking_number_data/blob/main/couriers/amazon.json"
|
|
304
304
|
},
|
|
305
305
|
"expect": {
|
|
306
|
-
"carrier": "
|
|
307
|
-
"confidence": "
|
|
306
|
+
"carrier": "amazon-logistics",
|
|
307
|
+
"confidence": "high"
|
|
308
308
|
},
|
|
309
|
-
"note": "Open-source project example, not a real shipment. The source lists it as a valid Amazon Logistics number
|
|
309
|
+
"note": "Open-source project example, not a real shipment. The source lists it as a valid Amazon Logistics number with the Mexican prefix."
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
"number": "DE5679225276",
|
|
@@ -156,7 +156,7 @@ function metadataValue(metadata, field) {
|
|
|
156
156
|
export function normalizeAmazonShippingTrackingNumber(raw) {
|
|
157
157
|
const value = raw.trim().toLocaleUpperCase('en-US').replace(/[\s.-]/g, '');
|
|
158
158
|
if (!isAmazonTrackingNumber(value)) {
|
|
159
|
-
throw new InvalidInputError(PROVIDER, 'Amazon tracking numbers need a European country prefix and 10 digits, or TBA and 12 digits');
|
|
159
|
+
throw new InvalidInputError(PROVIDER, 'Amazon tracking numbers need a European country prefix and 10 digits, or TBA, TBC or TBM and 12 digits');
|
|
160
160
|
}
|
|
161
161
|
return value;
|
|
162
162
|
}
|
|
@@ -242,8 +242,8 @@ export function parseAmazonShippingTrackingResponse(payload, zone = 'Europe/Pari
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
export function amazonShippingTimezone(number) {
|
|
245
|
-
if (number.startsWith('
|
|
246
|
-
return null; // A
|
|
245
|
+
if (number.startsWith('TB'))
|
|
246
|
+
return null; // A North American number cannot establish a local timezone.
|
|
247
247
|
const zones = {
|
|
248
248
|
UK: 'Europe/London', GB: 'Europe/London', IE: 'Europe/Dublin', PT: 'Europe/Lisbon',
|
|
249
249
|
FI: 'Europe/Helsinki', EE: 'Europe/Tallinn', LV: 'Europe/Riga', LT: 'Europe/Vilnius',
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"confidence": "low",
|
|
18
18
|
"candidates": [
|
|
19
19
|
"mondial-relay",
|
|
20
|
+
"colisweb",
|
|
20
21
|
"heppner"
|
|
21
22
|
]
|
|
22
23
|
},
|
|
23
|
-
"note": "Public report attributed to Colisweb, whose tracking returns its history. Eight digits are shared with other carriers
|
|
24
|
+
"note": "Public report attributed to Colisweb, whose tracking returns its history. Eight digits are shared with other carriers, so Colisweb is one suggestion among several."
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
"number": "87654321",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"confidence": "low",
|
|
34
35
|
"candidates": [
|
|
35
36
|
"mondial-relay",
|
|
37
|
+
"colisweb",
|
|
36
38
|
"heppner"
|
|
37
39
|
]
|
|
38
40
|
},
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"confidence": "low",
|
|
46
46
|
"candidates": [
|
|
47
47
|
"mondial-relay",
|
|
48
|
+
"colisweb",
|
|
48
49
|
"heppner"
|
|
49
50
|
]
|
|
50
51
|
},
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"confidence": "low",
|
|
63
64
|
"candidates": [
|
|
64
65
|
"mondial-relay",
|
|
66
|
+
"colisweb",
|
|
65
67
|
"heppner"
|
|
66
68
|
]
|
|
67
69
|
},
|
|
@@ -130,6 +132,7 @@
|
|
|
130
132
|
"confidence": "low",
|
|
131
133
|
"candidates": [
|
|
132
134
|
"mondial-relay",
|
|
135
|
+
"colisweb",
|
|
133
136
|
"heppner"
|
|
134
137
|
]
|
|
135
138
|
},
|
|
@@ -174,6 +177,7 @@
|
|
|
174
177
|
"confidence": "low",
|
|
175
178
|
"candidates": [
|
|
176
179
|
"mondial-relay",
|
|
180
|
+
"colisweb",
|
|
177
181
|
"heppner"
|
|
178
182
|
]
|
|
179
183
|
},
|
|
@@ -253,6 +257,7 @@
|
|
|
253
257
|
"confidence": "low",
|
|
254
258
|
"candidates": [
|
|
255
259
|
"mondial-relay",
|
|
260
|
+
"colisweb",
|
|
256
261
|
"heppner"
|
|
257
262
|
]
|
|
258
263
|
},
|
|
@@ -271,6 +276,7 @@
|
|
|
271
276
|
"confidence": "low",
|
|
272
277
|
"candidates": [
|
|
273
278
|
"mondial-relay",
|
|
279
|
+
"colisweb",
|
|
274
280
|
"heppner"
|
|
275
281
|
]
|
|
276
282
|
},
|
|
@@ -289,6 +295,7 @@
|
|
|
289
295
|
"confidence": "low",
|
|
290
296
|
"candidates": [
|
|
291
297
|
"mondial-relay",
|
|
298
|
+
"colisweb",
|
|
292
299
|
"heppner"
|
|
293
300
|
]
|
|
294
301
|
},
|
|
@@ -307,6 +314,7 @@
|
|
|
307
314
|
"confidence": "low",
|
|
308
315
|
"candidates": [
|
|
309
316
|
"mondial-relay",
|
|
317
|
+
"colisweb",
|
|
310
318
|
"heppner"
|
|
311
319
|
]
|
|
312
320
|
},
|
|
@@ -325,6 +333,7 @@
|
|
|
325
333
|
"confidence": "low",
|
|
326
334
|
"candidates": [
|
|
327
335
|
"mondial-relay",
|
|
336
|
+
"colisweb",
|
|
328
337
|
"heppner"
|
|
329
338
|
]
|
|
330
339
|
},
|
|
@@ -343,6 +352,7 @@
|
|
|
343
352
|
"confidence": "low",
|
|
344
353
|
"candidates": [
|
|
345
354
|
"mondial-relay",
|
|
355
|
+
"colisweb",
|
|
346
356
|
"heppner"
|
|
347
357
|
]
|
|
348
358
|
},
|
|
@@ -361,6 +371,7 @@
|
|
|
361
371
|
"confidence": "low",
|
|
362
372
|
"candidates": [
|
|
363
373
|
"mondial-relay",
|
|
374
|
+
"colisweb",
|
|
364
375
|
"heppner"
|
|
365
376
|
]
|
|
366
377
|
},
|
|
@@ -379,6 +390,7 @@
|
|
|
379
390
|
"confidence": "low",
|
|
380
391
|
"candidates": [
|
|
381
392
|
"mondial-relay",
|
|
393
|
+
"colisweb",
|
|
382
394
|
"heppner"
|
|
383
395
|
]
|
|
384
396
|
},
|
|
@@ -397,6 +409,7 @@
|
|
|
397
409
|
"confidence": "low",
|
|
398
410
|
"candidates": [
|
|
399
411
|
"mondial-relay",
|
|
412
|
+
"colisweb",
|
|
400
413
|
"heppner"
|
|
401
414
|
]
|
|
402
415
|
},
|
|
@@ -415,6 +428,7 @@
|
|
|
415
428
|
"confidence": "low",
|
|
416
429
|
"candidates": [
|
|
417
430
|
"mondial-relay",
|
|
431
|
+
"colisweb",
|
|
418
432
|
"heppner"
|
|
419
433
|
]
|
|
420
434
|
},
|
|
@@ -12,7 +12,13 @@ export function requiresAmazonAccount(carrier, trackingNumber = '') {
|
|
|
12
12
|
return carrier !== 'amazon-shipping' && (carrier === 'amazon-logistics' || isAmazonTrackingNumber(trackingNumber));
|
|
13
13
|
}
|
|
14
14
|
export function amazonMarketplace(raw) {
|
|
15
|
-
const
|
|
15
|
+
const number = raw.replace(/[\s.-]/g, '').toUpperCase();
|
|
16
|
+
// TBA names no country; its Canadian and Mexican siblings do.
|
|
17
|
+
if (number.startsWith('TBC'))
|
|
18
|
+
return 'ca';
|
|
19
|
+
if (number.startsWith('TBM'))
|
|
20
|
+
return 'com.mx';
|
|
21
|
+
const prefix = number.slice(0, 2);
|
|
16
22
|
const marketplaces = {
|
|
17
23
|
FR: 'fr', DE: 'de', AT: 'de', BE: 'com.be', UK: 'co.uk', GB: 'co.uk',
|
|
18
24
|
IT: 'it', ES: 'es', PT: 'es', NL: 'nl', IE: 'ie', PL: 'pl', SE: 'se', TR: 'com.tr',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const AMAZON_NUMBER_PATTERN: "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
1
|
+
export declare const AMAZON_NUMBER_PATTERN: "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$";
|
|
2
2
|
export declare function isAmazonTrackingNumber(raw: string): boolean;
|
package/dist/data/catalog.json
CHANGED
|
@@ -609,7 +609,9 @@
|
|
|
609
609
|
"IS",
|
|
610
610
|
"LI",
|
|
611
611
|
"TR",
|
|
612
|
-
"US"
|
|
612
|
+
"US",
|
|
613
|
+
"CA",
|
|
614
|
+
"MX"
|
|
613
615
|
],
|
|
614
616
|
"selectable": true,
|
|
615
617
|
"timezone": "UTC",
|
|
@@ -633,7 +635,7 @@
|
|
|
633
635
|
],
|
|
634
636
|
"detectionRules": [
|
|
635
637
|
{
|
|
636
|
-
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
638
|
+
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$",
|
|
637
639
|
"confidence": "high"
|
|
638
640
|
}
|
|
639
641
|
]
|
|
@@ -1261,7 +1263,12 @@
|
|
|
1261
1263
|
]
|
|
1262
1264
|
}
|
|
1263
1265
|
],
|
|
1264
|
-
"detectionRules": [
|
|
1266
|
+
"detectionRules": [
|
|
1267
|
+
{
|
|
1268
|
+
"pattern": "^\\d{8}$",
|
|
1269
|
+
"confidence": "low"
|
|
1270
|
+
}
|
|
1271
|
+
]
|
|
1265
1272
|
},
|
|
1266
1273
|
"c-chez-vous": {
|
|
1267
1274
|
"displayName": "C Chez Vous",
|
|
@@ -371,7 +371,7 @@ export declare const CARRIER_CATALOG: {
|
|
|
371
371
|
readonly displayName: "Amazon Logistics";
|
|
372
372
|
readonly color: "#ff9900";
|
|
373
373
|
readonly aliases: readonly ["AMZL", "Amazon Logistik"];
|
|
374
|
-
readonly countries: readonly ["FR", "DE", "BE", "GB", "IT", "ES", "NL", "AT", "IE", "PL", "SE", "PT", "LU", "DK", "FI", "CZ", "SK", "HU", "RO", "BG", "HR", "SI", "EE", "LV", "LT", "GR", "CY", "MT", "CH", "NO", "IS", "LI", "TR", "US"];
|
|
374
|
+
readonly countries: readonly ["FR", "DE", "BE", "GB", "IT", "ES", "NL", "AT", "IE", "PL", "SE", "PT", "LU", "DK", "FI", "CZ", "SK", "HU", "RO", "BG", "HR", "SI", "EE", "LV", "LT", "GR", "CY", "MT", "CH", "NO", "IS", "LI", "TR", "US", "CA", "MX"];
|
|
375
375
|
readonly selectable: true;
|
|
376
376
|
readonly timezone: "UTC";
|
|
377
377
|
readonly tracking: {
|
|
@@ -385,7 +385,7 @@ export declare const CARRIER_CATALOG: {
|
|
|
385
385
|
readonly detectFromNumber: true;
|
|
386
386
|
}];
|
|
387
387
|
readonly detectionRules: readonly [{
|
|
388
|
-
readonly pattern: "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
388
|
+
readonly pattern: "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$";
|
|
389
389
|
readonly confidence: "high";
|
|
390
390
|
}];
|
|
391
391
|
};
|
|
@@ -783,7 +783,10 @@ export declare const CARRIER_CATALOG: {
|
|
|
783
783
|
readonly domains: readonly ["colisweb.com"];
|
|
784
784
|
readonly params: readonly ["value", "trackingNumber"];
|
|
785
785
|
}];
|
|
786
|
-
readonly detectionRules: readonly [
|
|
786
|
+
readonly detectionRules: readonly [{
|
|
787
|
+
readonly pattern: "^\\d{8}$";
|
|
788
|
+
readonly confidence: "low";
|
|
789
|
+
}];
|
|
787
790
|
};
|
|
788
791
|
readonly "c-chez-vous": {
|
|
789
792
|
readonly displayName: "C Chez Vous";
|
|
@@ -610,7 +610,9 @@ export const CARRIER_CATALOG = {
|
|
|
610
610
|
"IS",
|
|
611
611
|
"LI",
|
|
612
612
|
"TR",
|
|
613
|
-
"US"
|
|
613
|
+
"US",
|
|
614
|
+
"CA",
|
|
615
|
+
"MX"
|
|
614
616
|
],
|
|
615
617
|
"selectable": true,
|
|
616
618
|
"timezone": "UTC",
|
|
@@ -634,7 +636,7 @@ export const CARRIER_CATALOG = {
|
|
|
634
636
|
],
|
|
635
637
|
"detectionRules": [
|
|
636
638
|
{
|
|
637
|
-
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|
|
|
639
|
+
"pattern": "^(?:(?:FR|DE|BE|UK|GB|IT|ES|NL|AT|IE|PL|SE|PT|LU|DK|FI|CZ|SK|HU|RO|BG|HR|SI|EE|LV|LT|GR|CY|MT|CH|NO|IS|LI|TR)[0-9]{10}|TB[ACM][0-9]{12})$",
|
|
638
640
|
"confidence": "high"
|
|
639
641
|
}
|
|
640
642
|
]
|
|
@@ -1262,7 +1264,12 @@ export const CARRIER_CATALOG = {
|
|
|
1262
1264
|
]
|
|
1263
1265
|
}
|
|
1264
1266
|
],
|
|
1265
|
-
"detectionRules": [
|
|
1267
|
+
"detectionRules": [
|
|
1268
|
+
{
|
|
1269
|
+
"pattern": "^\\d{8}$",
|
|
1270
|
+
"confidence": "low"
|
|
1271
|
+
}
|
|
1272
|
+
]
|
|
1266
1273
|
},
|
|
1267
1274
|
"c-chez-vous": {
|
|
1268
1275
|
"displayName": "C Chez Vous",
|
package/dist/server/openapi.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-parcel-scraper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0-main.360",
|
|
4
4
|
"description": "Self-hosted parcel tracking: carrier detection, dedicated scrapers and optional universal providers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|