universal-parcel-scraper 0.684.1-main.3243 → 0.684.2-main.3246

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 CHANGED
@@ -1153,6 +1153,8 @@
1153
1153
  "autoComplete": "postal-code"
1154
1154
  }
1155
1155
  ],
1156
+ "recognitionRank": 894,
1157
+ "recognitionPattern": "^FV\\d{8}$",
1156
1158
  "browser": true
1157
1159
  },
1158
1160
  "canaryUrl": "https://www.mondialrelay.fr/suivi-de-colis/",
@@ -1180,6 +1182,10 @@
1180
1182
  {
1181
1183
  "pattern": "^(?:\\d{8}|\\d{10}|\\d{12})$",
1182
1184
  "confidence": "low"
1185
+ },
1186
+ {
1187
+ "pattern": "^FV\\d{8}$",
1188
+ "confidence": "low"
1183
1189
  }
1184
1190
  ]
1185
1191
  },
@@ -73983,6 +73983,19 @@
73983
73983
  "fleetoptics"
73984
73984
  ]
73985
73985
  },
73986
+ {
73987
+ "input": "FV00000001",
73988
+ "carrier": "unknown",
73989
+ "confidence": "low",
73990
+ "candidates": [
73991
+ "mondial-relay",
73992
+ "tnt-it"
73993
+ ],
73994
+ "asked": [
73995
+ "mondial-relay",
73996
+ "tnt-it"
73997
+ ]
73998
+ },
73986
73999
  {
73987
74000
  "input": "FVGL9999999999",
73988
74001
  "carrier": "unknown",
@@ -1210,6 +1210,8 @@ var Ze = {
1210
1210
  inputMode: "text",
1211
1211
  autoComplete: "postal-code"
1212
1212
  }],
1213
+ recognitionRank: 894,
1214
+ recognitionPattern: "^FV\\d{8}$",
1213
1215
  browser: !0
1214
1216
  },
1215
1217
  canaryUrl: "https://www.mondialrelay.fr/suivi-de-colis/",
@@ -1224,14 +1226,21 @@ var Ze = {
1224
1226
  "trackingNumber"
1225
1227
  ]
1226
1228
  }],
1227
- detectionRules: [{
1228
- pattern: "^[0-9]{26}$",
1229
- confidence: "high",
1230
- checksum: "mondial-relay"
1231
- }, {
1232
- pattern: "^(?:\\d{8}|\\d{10}|\\d{12})$",
1233
- confidence: "low"
1234
- }]
1229
+ detectionRules: [
1230
+ {
1231
+ pattern: "^[0-9]{26}$",
1232
+ confidence: "high",
1233
+ checksum: "mondial-relay"
1234
+ },
1235
+ {
1236
+ pattern: "^(?:\\d{8}|\\d{10}|\\d{12})$",
1237
+ confidence: "low"
1238
+ },
1239
+ {
1240
+ pattern: "^FV\\d{8}$",
1241
+ confidence: "low"
1242
+ }
1243
+ ]
1235
1244
  },
1236
1245
  "relais-colis": {
1237
1246
  displayName: "Relais Colis",
@@ -24455,7 +24464,11 @@ var Ze = {
24455
24464
  "dpd-fr-3",
24456
24465
  "dpd-fr-2"
24457
24466
  ],
24458
- "mondial-relay": ["mondial-relay-1", "mondial-relay-2"],
24467
+ "mondial-relay": [
24468
+ "mondial-relay-1",
24469
+ "mondial-relay-2",
24470
+ "mondial-relay-3"
24471
+ ],
24459
24472
  "relais-colis": [
24460
24473
  "relais-colis-1",
24461
24474
  "relais-colis-2",
@@ -31345,6 +31358,7 @@ var Ul = {
31345
31358
  "metropolitan-warehouse": 8,
31346
31359
  "micro-express": 697,
31347
31360
  "mng-kargo": 360,
31361
+ "mondial-relay": 894,
31348
31362
  "mongol-infinity-post": 681,
31349
31363
  "morning-global": 682,
31350
31364
  mtscn: 986,
@@ -1,4 +1,4 @@
1
- import type { AdapterFactory, TrackingContext } from '../../core/adapter/index.js';
1
+ import { type AdapterFactory, type Recognition, type TrackingContext } from '../../core/adapter/index.js';
2
2
  import type { CarrierResult } from '../../core/result/index.js';
3
3
  import { type StepRecorder } from '../../core/telemetry/index.js';
4
4
  import { type TrawlClient } from '../../core/transport/index.js';
@@ -41,6 +41,11 @@ export declare class MondialRelayTracker {
41
41
  readonly directTimeoutMs: number;
42
42
  constructor(options?: MondialRelayTrackerOptions);
43
43
  fetch(rawShipment: string, rawPostcode?: string, context?: TrackingContext): Promise<CarrierResult>;
44
+ /**
45
+ * Only InPost Spain's own numbers are recognized: its page answers each one alone and a number it
46
+ * does not hold is not found. Mondial Relay's own numbers need a browser or an account.
47
+ */
48
+ recognize(rawShipment: string, context?: TrackingContext): Promise<Recognition>;
44
49
  }
45
50
  export declare const adapter: AdapterFactory;
46
51
  export {};
@@ -1,5 +1,6 @@
1
1
  import { load } from 'cheerio';
2
2
  import { DateTime } from 'luxon';
3
+ import { recognizeFromLookup } from '../../core/adapter/index.js';
3
4
  import { DELIVERY_POSTCODE, deliveryPostcodeText } from '../../core/catalog/postcode.js';
4
5
  import { isValidMondialRelayBarcode } from '../../core/detection/index.js';
5
6
  import { ChallengeError, InputRequiredError, InvalidInputError, NotFoundError, SchemaError } from '../../core/errors/index.js';
@@ -364,6 +365,14 @@ export class MondialRelayTracker {
364
365
  // same solved browser identity, and the app's access token is renewed once.
365
366
  return takeTurn(this.#serialize, 'Mondial Relay', context, (left) => this.#lookup(normalizeMondialRelayCredential(rawShipment, rawPostcode), left));
366
367
  }
368
+ /**
369
+ * Only InPost Spain's own numbers are recognized: its page answers each one alone and a number it
370
+ * does not hold is not found. Mondial Relay's own numbers need a browser or an account.
371
+ */
372
+ recognize(rawShipment, context = {}) {
373
+ const inpost = inpostSpainNumber(rawShipment);
374
+ return recognizeFromLookup(() => this.#inpostSpain(inpost, context), () => inpost !== null);
375
+ }
367
376
  async #lookup(credential, context) {
368
377
  // Cloudflare blocks every non-browser client of the website with an HTTP
369
378
  // 403 WAF block (verified from multiple networks, 2026-09-10). The app's
@@ -458,5 +467,6 @@ export const adapter = (environment) => {
458
467
  // InPost Spain's own numbers are read from its page, retried once when it cannot be reached.
459
468
  steps: ['app', 'trawl', 'inpost-es', 'retry'],
460
469
  track: (input, context) => tracker.fetch(input.number, input.postcode ?? '', context),
470
+ recognize: (number, context) => tracker.recognize(number, context),
461
471
  };
462
472
  };
@@ -43,6 +43,10 @@
43
43
  "inpost-es",
44
44
  "retry"
45
45
  ],
46
+ "recognition": {
47
+ "rank": 894,
48
+ "pattern": "^FV\\d{8}$"
49
+ },
46
50
  "browser": true
47
51
  },
48
52
  "capabilities": [
@@ -106,6 +110,11 @@
106
110
  "id": "mondial-relay-2",
107
111
  "pattern": "^(?:\\d{8}|\\d{10}|\\d{12})$",
108
112
  "confidence": "low"
113
+ },
114
+ {
115
+ "id": "mondial-relay-3",
116
+ "pattern": "^FV\\d{8}$",
117
+ "confidence": "low"
109
118
  }
110
119
  ]
111
120
  }
@@ -1124,6 +1124,22 @@
1124
1124
  "confidence": "high"
1125
1125
  },
1126
1126
  "note": "An archived tracking link with a 26-digit label barcode whose check digits pass. Mondial Relay's tracker finds no parcel under it any more."
1127
+ },
1128
+ {
1129
+ "number": "FV00000001",
1130
+ "role": "shipment",
1131
+ "evidence": "synthetic",
1132
+ "derivedFrom": "donated_real",
1133
+ "shapeConfirmed": "2026-10-23",
1134
+ "expect": {
1135
+ "carrier": "unknown",
1136
+ "confidence": "low",
1137
+ "candidates": [
1138
+ "mondial-relay",
1139
+ "tnt-it"
1140
+ ]
1141
+ },
1142
+ "note": "Made-up number in the shape of a parcel the app tracked, which InPost Spain’s own tracking page answered and a universal provider filed under InPost (ES): FV and eight digits."
1127
1143
  }
1128
1144
  ]
1129
1145
  }
@@ -1153,6 +1153,8 @@
1153
1153
  "autoComplete": "postal-code"
1154
1154
  }
1155
1155
  ],
1156
+ "recognitionRank": 894,
1157
+ "recognitionPattern": "^FV\\d{8}$",
1156
1158
  "browser": true
1157
1159
  },
1158
1160
  "canaryUrl": "https://www.mondialrelay.fr/suivi-de-colis/",
@@ -1180,6 +1182,10 @@
1180
1182
  {
1181
1183
  "pattern": "^(?:\\d{8}|\\d{10}|\\d{12})$",
1182
1184
  "confidence": "low"
1185
+ },
1186
+ {
1187
+ "pattern": "^FV\\d{8}$",
1188
+ "confidence": "low"
1183
1189
  }
1184
1190
  ]
1185
1191
  },
@@ -745,6 +745,8 @@ export declare const CARRIER_CATALOG: {
745
745
  readonly inputMode: "text";
746
746
  readonly autoComplete: "postal-code";
747
747
  }];
748
+ readonly recognitionRank: 894;
749
+ readonly recognitionPattern: "^FV\\d{8}$";
748
750
  readonly browser: true;
749
751
  };
750
752
  readonly canaryUrl: "https://www.mondialrelay.fr/suivi-de-colis/";
@@ -761,6 +763,9 @@ export declare const CARRIER_CATALOG: {
761
763
  }, {
762
764
  readonly pattern: "^(?:\\d{8}|\\d{10}|\\d{12})$";
763
765
  readonly confidence: "low";
766
+ }, {
767
+ readonly pattern: "^FV\\d{8}$";
768
+ readonly confidence: "low";
764
769
  }];
765
770
  };
766
771
  readonly "relais-colis": {
@@ -1154,6 +1154,8 @@ export const CARRIER_CATALOG = {
1154
1154
  "autoComplete": "postal-code"
1155
1155
  }
1156
1156
  ],
1157
+ "recognitionRank": 894,
1158
+ "recognitionPattern": "^FV\\d{8}$",
1157
1159
  "browser": true
1158
1160
  },
1159
1161
  "canaryUrl": "https://www.mondialrelay.fr/suivi-de-colis/",
@@ -1181,6 +1183,10 @@ export const CARRIER_CATALOG = {
1181
1183
  {
1182
1184
  "pattern": "^(?:\\d{8}|\\d{10}|\\d{12})$",
1183
1185
  "confidence": "low"
1186
+ },
1187
+ {
1188
+ "pattern": "^FV\\d{8}$",
1189
+ "confidence": "low"
1184
1190
  }
1185
1191
  ]
1186
1192
  },
@@ -33082,7 +33088,7 @@ export const DETECTION_RULE_IDS = {
33082
33088
  "gls-ch": ["gls-ch-1", "gls-ch-2", "gls-ch-3", "gls-ch-4"],
33083
33089
  "dpd": ["dpd-2", "dpd-1", "dpd-3"],
33084
33090
  "dpd-fr": ["dpd-fr-1", "dpd-fr-4", "dpd-fr-3", "dpd-fr-2"],
33085
- "mondial-relay": ["mondial-relay-1", "mondial-relay-2"],
33091
+ "mondial-relay": ["mondial-relay-1", "mondial-relay-2", "mondial-relay-3"],
33086
33092
  "relais-colis": ["relais-colis-1", "relais-colis-2", "relais-colis-3"],
33087
33093
  "la-poste": ["la-poste-1", "la-poste-4", "la-poste-5", "la-poste-6", "la-poste-7", "la-poste-2", "la-poste-3"],
33088
33094
  "chronopost": ["chronopost-1", "chronopost-own-suffix", "chronopost-2", "chronopost-3", "chronopost-4"],
@@ -273,6 +273,7 @@ export const CARRIER_RECOGNITION_RANKS = {
273
273
  "metropolitan-warehouse": 8,
274
274
  "micro-express": 697,
275
275
  "mng-kargo": 360,
276
+ "mondial-relay": 894,
276
277
  "mongol-infinity-post": 681,
277
278
  "morning-global": 682,
278
279
  "mtscn": 986,
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Universal Parcel Scraper",
5
- "version": "0.684.1"
5
+ "version": "0.684.2"
6
6
  },
7
7
  "paths": {
8
8
  "/health": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-parcel-scraper",
3
- "version": "0.684.1-main.3243",
3
+ "version": "0.684.2-main.3246",
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",