universal-parcel-scraper 0.70.3-main.907 → 0.71.0-main.912

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/README.md CHANGED
@@ -13,7 +13,7 @@ The engine behind [Peek](https://peektracker.com) ([GitHub](https://github.com/p
13
13
  [![License: Apache-2.0](https://img.shields.io/badge/core-Apache--2.0-blue.svg)](LICENSE)
14
14
 
15
15
  <!-- GENERATED:summary -->
16
- **3,500+ carriers** through **120 dedicated adapters** and **5 universal fallbacks**
16
+ **3,500+ carriers** through **122 dedicated adapters** and **5 universal fallbacks**
17
17
 
18
18
  <sub>207 catalog entries · 66 countries represented</sub>
19
19
  <!-- /GENERATED:summary -->
@@ -155,7 +155,7 @@ createTracker({ providers: ['ParcelsApp', 'Ship24', '17TRACK', 'Postal Ninja', '
155
155
  <!-- GENERATED:stages -->
156
156
  <img src="docs/assets/stages.svg" alt="DHL: Die Sendung wurde in das Zustellfahrzeug geladen.; Mondial Relay: En cours de livraison; Correios Brazil: Objeto saiu para entrega ao destinatário; Correos Express: EN REPARTO; Yamato Transport: 配達中; La Poste / Colissimo: DISTOU. All are filed under out_for_delivery." width="760">
157
157
 
158
- The carrier folders record 3,350 such statuses, each filed under one stage.
158
+ The carrier folders record 3,381 such statuses, each filed under one stage.
159
159
  <!-- /GENERATED:stages -->
160
160
 
161
161
  Wording nobody recorded yet goes through a classifier that reads seven European languages.
package/data/catalog.json CHANGED
@@ -4822,7 +4822,8 @@
4822
4822
  "timezone": "Europe/Athens",
4823
4823
  "tracking": {
4824
4824
  "mode": "automatic",
4825
- "adapter": "universal"
4825
+ "adapter": "box-now",
4826
+ "recognitionRank": 48
4826
4827
  },
4827
4828
  "canaryUrl": "https://boxnow.cy/track",
4828
4829
  "trackingSearchUrl": "https://boxnow.cy/track",
@@ -7215,7 +7216,8 @@
7215
7216
  "timezone": "Europe/Warsaw",
7216
7217
  "tracking": {
7217
7218
  "mode": "automatic",
7218
- "adapter": "universal"
7219
+ "adapter": "orlen-paczka",
7220
+ "recognitionRank": 49
7219
7221
  },
7220
7222
  "canaryUrl": "https://www.orlenpaczka.pl/sledz-paczke/",
7221
7223
  "trackingUrlTemplate": "https://www.orlenpaczka.pl/sledz-paczke/?numer={trackingNumber}",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "catalog": 207,
3
- "activeAdapters": 120,
3
+ "activeAdapters": 122,
4
4
  "countries": 66,
5
5
  "referenceCarriers": 100,
6
6
  "comparison": {
@@ -10022,6 +10022,7 @@
10022
10022
  "orlen-paczka"
10023
10023
  ],
10024
10024
  "asked": [
10025
+ "orlen-paczka",
10025
10026
  "la-poste",
10026
10027
  "delhivery"
10027
10028
  ]
@@ -10039,6 +10040,7 @@
10039
10040
  "orlen-paczka"
10040
10041
  ],
10041
10042
  "asked": [
10043
+ "orlen-paczka",
10042
10044
  "la-poste",
10043
10045
  "delhivery"
10044
10046
  ]
@@ -10056,6 +10058,7 @@
10056
10058
  "orlen-paczka"
10057
10059
  ],
10058
10060
  "asked": [
10061
+ "orlen-paczka",
10059
10062
  "la-poste",
10060
10063
  "delhivery"
10061
10064
  ]
@@ -10074,6 +10077,7 @@
10074
10077
  "orlen-paczka"
10075
10078
  ],
10076
10079
  "asked": [
10080
+ "orlen-paczka",
10077
10081
  "ukrposhta",
10078
10082
  "la-poste",
10079
10083
  "delhivery"
@@ -10093,6 +10097,7 @@
10093
10097
  "orlen-paczka"
10094
10098
  ],
10095
10099
  "asked": [
10100
+ "orlen-paczka",
10096
10101
  "ukrposhta",
10097
10102
  "la-poste",
10098
10103
  "delhivery"
@@ -10112,6 +10117,7 @@
10112
10117
  "orlen-paczka"
10113
10118
  ],
10114
10119
  "asked": [
10120
+ "orlen-paczka",
10115
10121
  "ukrposhta",
10116
10122
  "la-poste",
10117
10123
  "delhivery"
@@ -10130,6 +10136,7 @@
10130
10136
  "orlen-paczka"
10131
10137
  ],
10132
10138
  "asked": [
10139
+ "orlen-paczka",
10133
10140
  "la-poste",
10134
10141
  "delhivery"
10135
10142
  ]
@@ -10148,6 +10155,7 @@
10148
10155
  "orlen-paczka"
10149
10156
  ],
10150
10157
  "asked": [
10158
+ "orlen-paczka",
10151
10159
  "ukrposhta",
10152
10160
  "la-poste",
10153
10161
  "delhivery"
@@ -10166,6 +10174,7 @@
10166
10174
  "orlen-paczka"
10167
10175
  ],
10168
10176
  "asked": [
10177
+ "orlen-paczka",
10169
10178
  "la-poste",
10170
10179
  "delhivery"
10171
10180
  ]
@@ -10191,6 +10200,7 @@
10191
10200
  "orlen-paczka"
10192
10201
  ],
10193
10202
  "asked": [
10203
+ "orlen-paczka",
10194
10204
  "la-poste",
10195
10205
  "delhivery"
10196
10206
  ]
@@ -3953,7 +3953,8 @@ var ye = {
3953
3953
  timezone: "Europe/Athens",
3954
3954
  tracking: {
3955
3955
  mode: "automatic",
3956
- adapter: "universal"
3956
+ adapter: "box-now",
3957
+ recognitionRank: 48
3957
3958
  },
3958
3959
  canaryUrl: "https://boxnow.cy/track",
3959
3960
  trackingSearchUrl: "https://boxnow.cy/track",
@@ -5730,7 +5731,8 @@ var ye = {
5730
5731
  timezone: "Europe/Warsaw",
5731
5732
  tracking: {
5732
5733
  mode: "automatic",
5733
- adapter: "universal"
5734
+ adapter: "orlen-paczka",
5735
+ recognitionRank: 49
5734
5736
  },
5735
5737
  canaryUrl: "https://www.orlenpaczka.pl/sledz-paczke/",
5736
5738
  trackingUrlTemplate: "https://www.orlenpaczka.pl/sledz-paczke/?numer={trackingNumber}",
@@ -11660,6 +11662,7 @@ var _c = {
11660
11662
  aliexpress: 14,
11661
11663
  "australia-post": 6,
11662
11664
  "austrian-post": 39,
11665
+ "box-now": 48,
11663
11666
  bpost: 37,
11664
11667
  brt: 42,
11665
11668
  "canada-post": 15,
@@ -11696,6 +11699,7 @@ var _c = {
11696
11699
  "nz-post": 32,
11697
11700
  omgo: 1,
11698
11701
  ontrac: 21,
11702
+ "orlen-paczka": 49,
11699
11703
  "poczta-polska": 31,
11700
11704
  "poste-italiane": 46,
11701
11705
  posti: 27,
@@ -0,0 +1,13 @@
1
+ import { type AdapterFactory, type TrackingContext } from '../../core/adapter/index.js';
2
+ import { type StepRecorder } from '../../core/telemetry/index.js';
3
+ export declare const BOX_NOW_ENDPOINT = "https://api-production.boxnow.cy/api/v1/parcels:track";
4
+ export declare class BoxNowTracker {
5
+ private readonly options;
6
+ constructor(options?: {
7
+ fetcher?: typeof fetch;
8
+ recorder?: StepRecorder;
9
+ userAgent?: string;
10
+ });
11
+ fetch(raw: string, context?: TrackingContext): Promise<import("../../index.js").CarrierResult>;
12
+ }
13
+ export declare const adapter: AdapterFactory;
@@ -0,0 +1,51 @@
1
+ import { accepted, recognizeFromLookup } from '../../core/adapter/index.js';
2
+ import { ChallengeError, SchemaError, TransportError, UpstreamHttpError } from '../../core/errors/index.js';
3
+ import { runSteps } from '../../core/runner/index.js';
4
+ import { NOOP_RECORDER } from '../../core/telemetry/index.js';
5
+ import { decodeText, fetchBounded, parseJsonBytes, userAgentOf } from '../../core/transport/index.js';
6
+ import { BOX_NOW_MAX_BYTES, normalizeBoxNowNumber, parseBoxNow, PROVIDER } from './parser.js';
7
+ // The tracker on boxnow.cy posts here. The Greek, Bulgarian and Croatian sites
8
+ // post to their own hosts, which answer the same parcels.
9
+ export const BOX_NOW_ENDPOINT = 'https://api-production.boxnow.cy/api/v1/parcels:track';
10
+ export class BoxNowTracker {
11
+ options;
12
+ constructor(options = {}) {
13
+ this.options = options;
14
+ }
15
+ async fetch(raw, context = {}) {
16
+ const number = normalizeBoxNowNumber(raw);
17
+ return runSteps({ carrier: 'box-now', budgetMs: context.budgetMs ?? 15_000, signal: context.signal,
18
+ recorder: this.options.recorder ?? NOOP_RECORDER }, [{ id: 'direct', run: async ({ signal, remainingMs }) => {
19
+ let bytes;
20
+ try {
21
+ ({ bytes } = await fetchBounded(BOX_NOW_ENDPOINT, { method: 'POST', signal,
22
+ headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'User-Agent': userAgentOf(this.options.userAgent) },
23
+ body: JSON.stringify({ parcelId: number }) }, { provider: PROVIDER, timeoutMs: Math.max(1, Math.floor(remainingMs)), maxBytes: BOX_NOW_MAX_BYTES, fetcher: this.options.fetcher }));
24
+ }
25
+ catch (error) {
26
+ // An unknown parcel is an empty list; a missing route is not a missing parcel.
27
+ if (error instanceof UpstreamHttpError && [404, 410].includes(error.status)) {
28
+ throw new TransportError(PROVIDER, 'BOX NOW tracking endpoint is unavailable', { cause: error });
29
+ }
30
+ throw error;
31
+ }
32
+ let payload;
33
+ try {
34
+ payload = parseJsonBytes(bytes, PROVIDER);
35
+ }
36
+ catch (cause) {
37
+ // The Greek site sits behind Cloudflare's challenge; the API could too.
38
+ if (/<title>\s*Just a moment|cf-chl-|challenge-platform|cf-turnstile/i.test(decodeText(bytes.subarray(0, 64_000)))) {
39
+ throw new ChallengeError(PROVIDER, 'BOX NOW answered with a browser challenge', { cause });
40
+ }
41
+ throw new SchemaError(PROVIDER, 'BOX NOW returned invalid tracking JSON', { cause });
42
+ }
43
+ return parseBoxNow(payload, number);
44
+ } }]);
45
+ }
46
+ }
47
+ export const adapter = environment => {
48
+ const tracker = new BoxNowTracker({ fetcher: environment.fetcher, recorder: environment.recorder, userAgent: environment.userAgent });
49
+ return { id: 'box-now', recordsSteps: true, steps: ['direct'], track: (input, context) => tracker.fetch(input.number, context),
50
+ recognize: (number, context) => recognizeFromLookup(() => tracker.fetch(number, context), () => accepted(() => normalizeBoxNowNumber(number))) };
51
+ };
@@ -20,17 +20,64 @@
20
20
  "timezone": "Europe/Athens",
21
21
  "tracking": {
22
22
  "mode": "automatic",
23
- "adapter": "universal",
24
- "steps": []
23
+ "adapter": "box-now",
24
+ "steps": [
25
+ "direct"
26
+ ],
27
+ "recognition": {
28
+ "rank": 48
29
+ }
25
30
  },
26
- "capabilities": [],
31
+ "capabilities": [
32
+ "history",
33
+ "location",
34
+ "provider_code",
35
+ "eta",
36
+ "delivered_at",
37
+ "pickup_point",
38
+ "destination_country"
39
+ ],
27
40
  "portal": {
28
41
  "searchUrl": "https://boxnow.cy/track",
29
42
  "canaryUrl": "https://boxnow.cy/track",
30
- "shows": [],
31
- "scraped": [],
32
- "discarded": [],
33
- "unavailable": []
43
+ "shows": [
44
+ "status",
45
+ "history",
46
+ "location",
47
+ "eta",
48
+ "delivered_at",
49
+ "pickup_point",
50
+ "pickup_point_address",
51
+ "pickup_deadline",
52
+ "coordinates",
53
+ "sender_name",
54
+ "payment_details"
55
+ ],
56
+ "scraped": [
57
+ "status",
58
+ "history",
59
+ "location",
60
+ "provider_code",
61
+ "eta",
62
+ "delivered_at",
63
+ "pickup_point",
64
+ "destination_country"
65
+ ],
66
+ "discarded": [
67
+ "pickup_point_address",
68
+ "pickup_deadline",
69
+ "coordinates",
70
+ "sender_name",
71
+ "payment_details",
72
+ "postcodes",
73
+ "size_class",
74
+ "delivery_partner_reference"
75
+ ],
76
+ "unavailable": [
77
+ "weight",
78
+ "service_name",
79
+ "proof_of_delivery"
80
+ ]
34
81
  },
35
82
  "links": [],
36
83
  "detection": []
@@ -0,0 +1,6 @@
1
+ import type { CarrierResult } from '../../core/result/index.js';
2
+ export declare const PROVIDER = "BOX NOW";
3
+ export declare const BOX_NOW_MAX_BYTES = 256000;
4
+ /** BOX NOW's partner API manual: a parcel id is always ten digits. */
5
+ export declare function normalizeBoxNowNumber(raw: string): string;
6
+ export declare function parseBoxNow(payload: unknown, rawNumber: string): CarrierResult;
@@ -0,0 +1,97 @@
1
+ import { DateTime } from 'luxon';
2
+ import { normalizeTrackingNumber } from '../../core/detection/index.js';
3
+ import { InvalidInputError, NotFoundError, SchemaError } from '../../core/errors/index.js';
4
+ import { lastMovement } from '../../core/result/pickup.js';
5
+ import { languageStageStatus } from '../../core/status/index.js';
6
+ import { countryCode, explicitOffsetTime } from '../../core/time/index.js';
7
+ import { clean } from '../../core/transport/index.js';
8
+ import { isRecord } from '../../core/types.js';
9
+ import { boxNowStatus } from './status.js';
10
+ export const PROVIDER = 'BOX NOW';
11
+ export const BOX_NOW_MAX_BYTES = 256_000;
12
+ /** BOX NOW's partner API manual: a parcel id is always ten digits. */
13
+ export function normalizeBoxNowNumber(raw) {
14
+ const number = normalizeTrackingNumber(raw);
15
+ if (!/^\d{10}$/.test(number))
16
+ throw new InvalidInputError(PROVIDER, 'BOX NOW parcel ids are ten digits');
17
+ return number;
18
+ }
19
+ const code = (value) => {
20
+ const text = clean(value, 64);
21
+ return /^[a-z]+(?:-[a-z]+)*$/.test(text) ? text : '';
22
+ };
23
+ // The trackers stop showing the estimate once a parcel waits in its locker or
24
+ // its journey has ended; only a parcel still on its way keeps one.
25
+ const ON_THE_WAY = new Set(['registered', 'accepted', 'in_transit']);
26
+ export function parseBoxNow(payload, rawNumber) {
27
+ const number = normalizeBoxNowNumber(rawNumber);
28
+ if (!isRecord(payload) || !Array.isArray(payload.data) || payload.data.length > 10)
29
+ throw new SchemaError(PROVIDER);
30
+ // The official tracker reads an empty list as a parcel id that does not exist.
31
+ if (!payload.data.length)
32
+ throw new NotFoundError(PROVIDER);
33
+ const parcel = payload.data[0];
34
+ if (payload.data.length !== 1 || !isRecord(parcel) || parcel.id !== number) {
35
+ throw new SchemaError(PROVIDER, 'BOX NOW did not identify one matching parcel');
36
+ }
37
+ const state = code(parcel.state);
38
+ if (!state)
39
+ throw new SchemaError(PROVIDER, 'BOX NOW returned a parcel without a state');
40
+ const rows = parcel.events ?? [];
41
+ if (!Array.isArray(rows) || rows.length > 200)
42
+ throw new SchemaError(PROVIDER, 'BOX NOW returned an invalid parcel history');
43
+ const scans = [];
44
+ const seen = new Set();
45
+ for (const row of rows) {
46
+ if (!isRecord(row))
47
+ throw new SchemaError(PROVIDER, 'BOX NOW returned an incomplete scan');
48
+ const type = code(row.type);
49
+ const at = explicitOffsetTime(row.createTime);
50
+ if (!type || !at)
51
+ throw new SchemaError(PROVIDER, 'BOX NOW returned a scan without a type or clock');
52
+ const { wording, stage } = boxNowStatus(type);
53
+ // A new parcel's place is its sender. Postcodes are left out.
54
+ const location = type === 'new' ? '' : clean(row.locationDisplayName, 160);
55
+ const event = { time: at.iso, description: wording, provider_code: type,
56
+ ...(location ? { location } : {}), ...(stage ? { stage, stage_source: 'carrier_map' } : {}) };
57
+ const key = JSON.stringify(event);
58
+ if (!seen.has(key)) {
59
+ seen.add(key);
60
+ scans.push({ event, at: at.timestamp, type });
61
+ }
62
+ }
63
+ // The reply lists scans oldest first; equal clocks keep their order, reversed.
64
+ const ordered = scans.map((scan, index) => ({ ...scan, index }))
65
+ .sort((left, right) => right.at - left.at || right.index - left.index);
66
+ const events = ordered.map(({ event }) => event);
67
+ // The trackers show the newest scan's type while the parcel's state only
68
+ // says it is on its way, and the state otherwise.
69
+ const newest = ordered[0]?.type;
70
+ const shown = newest && ['in-transit', 'in-depot'].includes(state)
71
+ && ['accepted-to-locker', 'accepted-for-return', 'in-depot', 'new', 'wait-for-load'].includes(newest) ? newest : state;
72
+ const current = boxNowStatus(shown);
73
+ const stage = current.stage;
74
+ const delivered = stage === 'delivered' ? events.find(event => event.stage === 'delivered') : undefined;
75
+ const deliveredIndex = delivered ? events.indexOf(delivered) : -1;
76
+ // The recipient's locker, by name only, once the parcel waits there or was collected from it.
77
+ const destination = isRecord(parcel.destination) ? parcel.destination : null;
78
+ const collected = deliveredIndex >= 0 && lastMovement(events.slice(deliveredIndex + 1)) === 'ready_for_pickup';
79
+ const locker = destination?.type === 'apm' && (stage === 'ready_for_pickup' || collected) ? clean(destination.name, 160) : '';
80
+ const country = destination ? countryCode(destination.country) : null;
81
+ const eta = typeof parcel.etaDate === 'string' && stage && ON_THE_WAY.has(stage) ? explicitOffsetTime(parcel.etaDate) : null;
82
+ // The trackers print the estimate as a day in Athens.
83
+ const expected = eta ? DateTime.fromMillis(eta.timestamp, { zone: 'Europe/Athens' }).toISODate() : null;
84
+ return {
85
+ status: stage ? languageStageStatus(stage) : 'unknown',
86
+ ...(stage ? { current_stage: stage, current_stage_source: 'carrier_map' } : {}),
87
+ last_status_text: current.wording,
88
+ ...(events.length ? {} : { provider_code: shown, summary_only: true }),
89
+ last_update: events[0]?.time ?? null,
90
+ expected_delivery: expected,
91
+ ...(delivered?.time ? { delivered_at: delivered.time } : {}),
92
+ ...(locker ? { pickup_point: locker } : {}),
93
+ ...(country ? { destination_country: country } : {}),
94
+ events: events.slice(0, 100),
95
+ ...(events.length > 100 ? { history_truncated: true } : {}),
96
+ };
97
+ }
@@ -0,0 +1,11 @@
1
+ import type { Stage } from '../../core/status/index.js';
2
+ import type { CarrierStatusMap } from '../../core/status/statusMap.js';
3
+ /** One BOX NOW parcel state or event type: the English wording the adapter gives it and its stage. */
4
+ interface BoxNowStatus {
5
+ readonly wording: string;
6
+ readonly stage?: Stage;
7
+ }
8
+ /** The wording and stage of one state or event type; a type the map does not know keeps its code as wording. */
9
+ export declare function boxNowStatus(code: string): BoxNowStatus;
10
+ export declare const statusMap: CarrierStatusMap;
11
+ export {};
@@ -0,0 +1,36 @@
1
+ // The tracking API names each scan and the parcel's state with one vocabulary.
2
+ // Wordings follow the definitions in BOX NOW's partner API manual, else the
3
+ // English wording of its country sites' trackers. A parcel goes to the locker
4
+ // its recipient chose: final-destination is a parcel waiting there.
5
+ const STATUSES = new Map([
6
+ ['new', { wording: 'Parcel has been registered in the system', stage: 'registered' }],
7
+ ['accepted-to-locker', { wording: 'The parcel has been placed in the locker', stage: 'accepted' }],
8
+ ['accepted-in-locker', { wording: 'The parcel has been placed in the locker', stage: 'accepted' }],
9
+ ['in-transit', { wording: 'Parcel is being transferred to a specific location', stage: 'in_transit' }],
10
+ ['in-depot', { wording: 'Parcel is in one of our warehouses', stage: 'in_transit' }],
11
+ // Waiting in a locker for a courier, after a drop-off or an expired pickup.
12
+ ['wait-for-load', { wording: 'Parcel is waiting in a specific APM to be taken over by BOX NOW courier', stage: 'in_transit' }],
13
+ ['final-destination', { wording: 'Parcel has reached its final destination, waiting for pickup', stage: 'ready_for_pickup' }],
14
+ ['in-final-destination', { wording: 'Parcel has reached its final destination, waiting for pickup', stage: 'ready_for_pickup' }],
15
+ ['delivered', { wording: 'Parcel has been delivered', stage: 'delivered' }],
16
+ ['returned', { wording: 'Parcel has been returned to the sender', stage: 'returned' }],
17
+ ['expired', { wording: 'Expired', stage: 'exception' }],
18
+ ['expired-return', { wording: 'Delivery has expired', stage: 'exception' }],
19
+ ['missing', { wording: 'Parcel search - We will update you shortly', stage: 'exception' }],
20
+ ['lost', { wording: 'Lost', stage: 'exception' }],
21
+ ['canceled', { wording: 'Parcel order had been cancelled by the sender', stage: 'exception' }],
22
+ ['cancelled', { wording: 'Parcel order had been cancelled by the sender', stage: 'exception' }],
23
+ ['cancelled-return', { wording: 'Return of parcel, cancelled by sender', stage: 'exception' }],
24
+ ['accepted-for-return', { wording: 'The parcel has been placed in the locker' }],
25
+ ]);
26
+ /** The wording and stage of one state or event type; a type the map does not know keeps its code as wording. */
27
+ export function boxNowStatus(code) {
28
+ return STATUSES.get(code) ?? { wording: code };
29
+ }
30
+ export const statusMap = {
31
+ stage: (code) => (code ? STATUSES.get(code)?.stage : undefined),
32
+ gaps: [{
33
+ code: 'accepted-for-return',
34
+ note: 'A parcel put back into a locker to go back. The trackers word it like a sender drop-off, and no reply showed whether it ends the delivery or starts a return to the sender.',
35
+ }],
36
+ };
@@ -1,4 +1,23 @@
1
1
  {
2
2
  "carrier": "box-now",
3
- "entries": []
3
+ "entries": [
4
+ { "code": "new", "wording": "Parcel has been registered in the system", "language": "en", "stage": "registered", "confirmedBy": "live", "note": "The API sends the code only; the wording is the partner API manual's definition. Its place is the sender, which the adapter drops." },
5
+ { "code": "accepted-to-locker", "wording": "The parcel has been placed in the locker", "language": "en", "stage": "accepted", "confirmedBy": "live", "note": "The sender's drop-off at a locker or BOX NOW store; the wording is the Cypriot tracker's English one." },
6
+ { "code": "accepted-in-locker", "wording": "The parcel has been placed in the locker", "language": "en", "stage": "accepted", "confirmedBy": "bundle", "note": "The Bulgarian tracker shows it like accepted-to-locker." },
7
+ { "code": "in-transit", "wording": "Parcel is being transferred to a specific location", "language": "en", "stage": "in_transit", "confirmedBy": "live", "note": "Seen as a parcel's state; the trackers then show the newest scan's type." },
8
+ { "code": "in-depot", "wording": "Parcel is in one of our warehouses", "language": "en", "stage": "in_transit", "confirmedBy": "live", "note": "Its place names the hub or depot." },
9
+ { "code": "wait-for-load", "wording": "Parcel is waiting in a specific APM to be taken over by BOX NOW courier", "language": "en", "stage": "in_transit", "confirmedBy": "official-doc", "note": "The manual adds that the courier takes it back to the sender or on to another locker." },
10
+ { "code": "final-destination", "wording": "Parcel has reached its final destination, waiting for pickup", "language": "en", "stage": "ready_for_pickup", "confirmedBy": "live", "note": "Its place names the recipient's locker." },
11
+ { "code": "in-final-destination", "wording": "Parcel has reached its final destination, waiting for pickup", "language": "en", "stage": "ready_for_pickup", "confirmedBy": "live", "note": "The state of a parcel whose newest scan is final-destination." },
12
+ { "code": "delivered", "wording": "Parcel has been delivered", "language": "en", "stage": "delivered", "confirmedBy": "live", "note": "The recipient took the parcel out of the locker; the scan has no place." },
13
+ { "code": "returned", "wording": "Parcel has been returned to the sender", "language": "en", "stage": "returned", "confirmedBy": "official-doc" },
14
+ { "code": "expired", "wording": "Expired", "language": "en", "stage": "exception", "confirmedBy": "bundle", "note": "The trackers show it in red with the other ended states." },
15
+ { "code": "expired-return", "wording": "Delivery has expired", "language": "en", "stage": "exception", "confirmedBy": "official-doc", "note": "Listed among the manual's states; the wording is the trackers' English one." },
16
+ { "code": "missing", "wording": "Parcel search - We will update you shortly", "language": "en", "stage": "exception", "confirmedBy": "official-doc", "note": "A webhook event in the manual; the wording is the Cypriot tracker's English one." },
17
+ { "code": "lost", "wording": "Lost", "language": "en", "stage": "exception", "confirmedBy": "official-doc", "note": "Listed among the manual's states; the wording is the Bulgarian and Croatian trackers' English one." },
18
+ { "code": "canceled", "wording": "Parcel order had been cancelled by the sender", "language": "en", "stage": "exception", "confirmedBy": "official-doc", "note": "The manual lists both spellings." },
19
+ { "code": "cancelled", "wording": "Parcel order had been cancelled by the sender", "language": "en", "stage": "exception", "confirmedBy": "official-doc" },
20
+ { "code": "cancelled-return", "wording": "Return of parcel, cancelled by sender", "language": "en", "stage": "exception", "confirmedBy": "official-doc" },
21
+ { "code": "accepted-for-return", "wording": "The parcel has been placed in the locker", "language": "en", "confirmedBy": "bundle", "note": "Left without a stage: the trackers show it like a sender drop-off, and no reply showed whether it ends the delivery or starts a return to the sender." }
22
+ ]
4
23
  }
@@ -0,0 +1,12 @@
1
+ import { type AdapterFactory, type TrackingContext } from '../../core/adapter/index.js';
2
+ import { type StepRecorder } from '../../core/telemetry/index.js';
3
+ export declare class OrlenPaczkaTracker {
4
+ private readonly options;
5
+ constructor(options?: {
6
+ fetcher?: typeof fetch;
7
+ recorder?: StepRecorder;
8
+ userAgent?: string;
9
+ });
10
+ fetch(raw: string, context?: TrackingContext): Promise<import("../../index.js").CarrierResult>;
11
+ }
12
+ export declare const adapter: AdapterFactory;
@@ -0,0 +1,35 @@
1
+ import { accepted, recognizeFromLookup } from '../../core/adapter/index.js';
2
+ import { TransportError } from '../../core/errors/index.js';
3
+ import { runSteps } from '../../core/runner/index.js';
4
+ import { NOOP_RECORDER } from '../../core/telemetry/index.js';
5
+ import { decodeText, fetchBounded, userAgentOf } from '../../core/transport/index.js';
6
+ import { normalizeOrlenPaczkaNumber, ORLEN_PACZKA_MAX_BYTES, parseOrlenPaczka, PROVIDER } from './parser.js';
7
+ // The status service the tracking page at www.orlenpaczka.pl/sledz-paczke/ calls.
8
+ const ENDPOINT = 'https://nadaj.orlenpaczka.pl/parcel/api-status';
9
+ export class OrlenPaczkaTracker {
10
+ options;
11
+ constructor(options = {}) {
12
+ this.options = options;
13
+ }
14
+ async fetch(raw, context = {}) {
15
+ const number = normalizeOrlenPaczkaNumber(raw);
16
+ return runSteps({ carrier: 'orlen-paczka', budgetMs: context.budgetMs ?? 15_000, signal: context.signal,
17
+ recorder: this.options.recorder ?? NOOP_RECORDER }, [{ id: 'direct', run: async ({ signal, remainingMs }) => {
18
+ signal.throwIfAborted();
19
+ const { response, bytes } = await fetchBounded(`${ENDPOINT}?${new URLSearchParams({ id: number })}`, { signal,
20
+ headers: { Accept: '*/*', 'User-Agent': userAgentOf(this.options.userAgent) } }, {
21
+ provider: PROVIDER, timeoutMs: Math.max(1, Math.floor(remainingMs)), maxBytes: ORLEN_PACZKA_MAX_BYTES,
22
+ allowHttpStatuses: [404, 410], fetcher: this.options.fetcher,
23
+ });
24
+ // A missing endpoint says nothing about the parcel.
25
+ if (response.status !== 200)
26
+ throw new TransportError(PROVIDER, 'ORLEN Paczka tracking endpoint is unavailable');
27
+ return parseOrlenPaczka(decodeText(bytes), number);
28
+ } }]);
29
+ }
30
+ }
31
+ export const adapter = environment => {
32
+ const tracker = new OrlenPaczkaTracker({ fetcher: environment.fetcher, recorder: environment.recorder, userAgent: environment.userAgent });
33
+ return { id: 'orlen-paczka', recordsSteps: true, steps: ['direct'], track: (input, context) => tracker.fetch(input.number, context),
34
+ recognize: (number, context) => recognizeFromLookup(() => tracker.fetch(number, context), () => accepted(() => normalizeOrlenPaczkaNumber(number))) };
35
+ };
@@ -18,18 +18,47 @@
18
18
  "timezone": "Europe/Warsaw",
19
19
  "tracking": {
20
20
  "mode": "automatic",
21
- "adapter": "universal",
22
- "steps": []
21
+ "adapter": "orlen-paczka",
22
+ "steps": [
23
+ "direct"
24
+ ],
25
+ "recognition": {
26
+ "rank": 49
27
+ }
23
28
  },
24
- "capabilities": [],
29
+ "capabilities": [
30
+ "history",
31
+ "location",
32
+ "delivered_at",
33
+ "provider_code"
34
+ ],
25
35
  "portal": {
26
36
  "url": "https://www.orlenpaczka.pl/sledz-paczke/?numer={trackingNumber}",
27
37
  "searchUrl": "https://www.orlenpaczka.pl/sledz-paczke/",
28
38
  "canaryUrl": "https://www.orlenpaczka.pl/sledz-paczke/",
29
- "shows": [],
30
- "scraped": [],
31
- "discarded": [],
32
- "unavailable": []
39
+ "shows": [
40
+ "status",
41
+ "history",
42
+ "location",
43
+ "return_number"
44
+ ],
45
+ "scraped": [
46
+ "status",
47
+ "history",
48
+ "location",
49
+ "delivered_at",
50
+ "provider_code"
51
+ ],
52
+ "discarded": [
53
+ "return_number"
54
+ ],
55
+ "unavailable": [
56
+ "eta",
57
+ "pickup_point",
58
+ "weight",
59
+ "sender_name",
60
+ "recipient"
61
+ ]
33
62
  },
34
63
  "links": [
35
64
  {
@@ -259,7 +259,7 @@
259
259
  "access": "indexed_excerpt"
260
260
  },
261
261
  "context": {
262
- "assessment": "candidate"
262
+ "assessment": "confirmed"
263
263
  },
264
264
  "expect": {
265
265
  "carrier": "unknown",
@@ -273,7 +273,7 @@
273
273
  "orlen-paczka"
274
274
  ]
275
275
  },
276
- "note": "Looked up on ORLEN Paczka's own tracker, as an archived address shows; the capture was not opened."
276
+ "note": "Looked up on ORLEN Paczka's own tracker, as an archived address shows; the tracker returns its history."
277
277
  }
278
278
  ]
279
279
  }
@@ -0,0 +1,16 @@
1
+ import type { CarrierResult } from '../../core/result/index.js';
2
+ export declare const PROVIDER = "ORLEN Paczka";
3
+ export declare const ORLEN_PACZKA_MAX_BYTES = 1000000;
4
+ /**
5
+ * A parcel number as the tracker's own script accepts it: thirteen characters
6
+ * starting 2 or 3. The numbers seen in use, 210 and ten digits, end in a GS1
7
+ * check digit. The script's seven- and ten-digit sending codes are the
8
+ * sender's drop-off codes, not parcel numbers, and are not looked up.
9
+ */
10
+ export declare function normalizeOrlenPaczkaNumber(raw: string): string;
11
+ /**
12
+ * The tracker's reply for one parcel number. A known parcel names itself in
13
+ * `truckNo` and lists its scans oldest first; an unknown one says it has no
14
+ * data for the number it was asked about.
15
+ */
16
+ export declare function parseOrlenPaczka(body: string, rawNumber: string): CarrierResult;
@@ -0,0 +1,151 @@
1
+ import { DateTime } from 'luxon';
2
+ import { normalizeTrackingNumber } from '../../core/detection/normalize.js';
3
+ import { hasGs1CheckDigit } from '../../core/detection/numericChecksums.js';
4
+ import { ChallengeError, IndeterminateError, InvalidInputError, NotFoundError, SchemaError } from '../../core/errors/index.js';
5
+ import { languageStageStatus } from '../../core/status/index.js';
6
+ import { clean } from '../../core/transport/index.js';
7
+ import { isRecord } from '../../core/types.js';
8
+ import { orlenPaczkaStage } from './status.js';
9
+ export const PROVIDER = 'ORLEN Paczka';
10
+ export const ORLEN_PACZKA_MAX_BYTES = 1_000_000;
11
+ const ZONE = 'Europe/Warsaw';
12
+ /** The tracker's placeholder for a missing parcel number or history. */
13
+ const NO_DATA = 'Brak danych';
14
+ const MAX_SCANS = 500;
15
+ const MAX_EVENTS = 100;
16
+ /**
17
+ * A parcel number as the tracker's own script accepts it: thirteen characters
18
+ * starting 2 or 3. The numbers seen in use, 210 and ten digits, end in a GS1
19
+ * check digit. The script's seven- and ten-digit sending codes are the
20
+ * sender's drop-off codes, not parcel numbers, and are not looked up.
21
+ */
22
+ export function normalizeOrlenPaczkaNumber(raw) {
23
+ const number = normalizeTrackingNumber(raw);
24
+ if (!/^[23][0-9A-Z]{12}$/.test(number) || (/^210\d{10}$/.test(number) && !hasGs1CheckDigit(number))) {
25
+ throw new InvalidInputError(PROVIDER, 'ORLEN Paczka requires a thirteen-character parcel number');
26
+ }
27
+ return number;
28
+ }
29
+ /** The reply's JSON, inside the `callback(...)` wrapper the endpoint always adds. */
30
+ function payloadOf(body) {
31
+ const text = body.replace(/^\uFEFF/, '').trim();
32
+ const json = /^callback\(([\s\S]*)\);?$/.exec(text)?.[1] ?? (text.startsWith('{') ? text : null);
33
+ if (json === null) {
34
+ // The site's firewall answers a request it refuses with an HTML page.
35
+ if (/nie możesz kontynuować|suspiciously similar to automated requests|<title>\s*403 Access Forbidden/i.test(text)) {
36
+ throw new ChallengeError(PROVIDER, 'ORLEN Paczka refused the request as automated');
37
+ }
38
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned an unexpected tracking reply');
39
+ }
40
+ try {
41
+ return JSON.parse(json);
42
+ }
43
+ catch (cause) {
44
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned invalid tracking JSON', { cause });
45
+ }
46
+ }
47
+ /**
48
+ * The tracker's clocks are Polish wall time, the zone of the network's points
49
+ * and sorting centres and of the server's own clock. A wall clock the zone
50
+ * skips or repeats stays local.
51
+ */
52
+ function clock(raw) {
53
+ if (typeof raw !== 'string')
54
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned a scan without a date');
55
+ const text = clean(raw, 32);
56
+ const match = /^(\d{2})-(\d{2})-(\d{4}), (\d{2}):(\d{2})$/.exec(text);
57
+ const local = match ? `${match[3]}-${match[2]}-${match[1]}T${match[4]}:${match[5]}:00` : '';
58
+ const parsed = local ? DateTime.fromISO(local, { zone: ZONE }) : null;
59
+ if (!parsed?.isValid || parsed.toISO({ includeOffset: false, suppressMilliseconds: true }) !== local) {
60
+ return text ? { provider_time_text: text } : {};
61
+ }
62
+ if (parsed.getPossibleOffsets().length !== 1)
63
+ return { local_time: local };
64
+ return { time: parsed.toISO({ suppressMilliseconds: true }) };
65
+ }
66
+ /** The sorting centre a scan's wording names, as in "przyjęta w sortowni Gdańsk". */
67
+ function sortingCentre(wording) {
68
+ return /\bw sortowni (\p{Lu}[\p{L}.' -]{0,60}\p{L})$/u.exec(wording)?.[1];
69
+ }
70
+ /** A history row the tracker adds when it has nothing: an error code with the placeholder wording. */
71
+ function placeholderRow(row) {
72
+ return isRecord(row) && typeof row.code === 'string' && /^ERR\d{1,6}$/.test(row.code) && clean(row.label, 40) === NO_DATA;
73
+ }
74
+ /**
75
+ * The tracker's reply for one parcel number. A known parcel names itself in
76
+ * `truckNo` and lists its scans oldest first; an unknown one says it has no
77
+ * data for the number it was asked about.
78
+ */
79
+ export function parseOrlenPaczka(body, rawNumber) {
80
+ const number = normalizeOrlenPaczkaNumber(rawNumber);
81
+ const payload = payloadOf(body);
82
+ if (!isRecord(payload))
83
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned an invalid tracking reply');
84
+ if (Object.hasOwn(payload, 'err')) {
85
+ // Error 1004 answers some numbers of the current range that have no
86
+ // public history; the tracker shows them as untrackable, which proves
87
+ // neither a parcel nor its absence.
88
+ if (payload.err === 1004) {
89
+ throw new IndeterminateError(PROVIDER, 'ORLEN Paczka does not show tracking for this number', { reason: 'tracking_withheld' });
90
+ }
91
+ throw new IndeterminateError(PROVIDER, 'ORLEN Paczka returned a tracking error');
92
+ }
93
+ // The official page repeats a lookup answered "logged" or "guest".
94
+ if (payload.status === 'logged' || payload.status === 'guest') {
95
+ throw new IndeterminateError(PROVIDER, 'ORLEN Paczka asked for the lookup again');
96
+ }
97
+ if (typeof payload.number !== 'string' || normalizeTrackingNumber(payload.number) !== number) {
98
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka answered for a different number');
99
+ }
100
+ const status = payload.status;
101
+ const parcel = typeof payload.truckNo === 'string' ? clean(payload.truckNo, 64) : '';
102
+ if (!Array.isArray(payload.history) || payload.history.length > MAX_SCANS) {
103
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned an invalid parcel history');
104
+ }
105
+ const rows = payload.history;
106
+ if (parcel === NO_DATA && (status === '' || status === 'OK') && rows.every(placeholderRow))
107
+ throw new NotFoundError(PROVIDER);
108
+ if (status !== 'OK') {
109
+ throw new IndeterminateError(PROVIDER, 'ORLEN Paczka returned an inconclusive tracking reply');
110
+ }
111
+ if (normalizeTrackingNumber(parcel) !== number)
112
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned a different parcel');
113
+ if (!rows.length)
114
+ throw new IndeterminateError(PROVIDER, 'ORLEN Paczka returned no parcel history', { reason: 'no_history' });
115
+ const events = [];
116
+ const seen = new Set();
117
+ // The reply lists scans oldest first; the result lists them newest first,
118
+ // keeping the reply's order between scans of the same minute.
119
+ for (const row of [...rows].reverse()) {
120
+ if (!isRecord(row))
121
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned an invalid scan');
122
+ const code = typeof row.code === 'string' || typeof row.code === 'number' ? clean(String(row.code), 16) : '';
123
+ const description = clean(row.label, 300);
124
+ if (!/^[A-Z0-9]{1,16}$/.test(code) || !description)
125
+ throw new SchemaError(PROVIDER, 'ORLEN Paczka returned a scan without code or wording');
126
+ const stage = orlenPaczkaStage(code, description);
127
+ const location = sortingCentre(description);
128
+ const event = { ...clock(row.date), description, provider_code: code, ...(location ? { location } : {}),
129
+ ...(stage ? { stage, stage_source: 'carrier_map' } : {}) };
130
+ const key = JSON.stringify(event);
131
+ if (!seen.has(key)) {
132
+ seen.add(key);
133
+ events.push(event);
134
+ }
135
+ }
136
+ const latest = events[0];
137
+ const stage = latest.stage;
138
+ const delivered = stage === 'delivered' && typeof latest.time === 'string' ? latest.time : null;
139
+ return {
140
+ status: stage ? languageStageStatus(stage) : 'unknown',
141
+ ...(stage ? { current_stage: stage, current_stage_source: 'carrier_map' } : {}),
142
+ last_status_text: latest.description ?? null,
143
+ last_update: typeof latest.time === 'string' ? latest.time : null,
144
+ ...(typeof latest.local_time === 'string' ? { last_update_local: latest.local_time } : {}),
145
+ ...(delivered ? { delivered_at: delivered } : {}),
146
+ // The official page shows the whole history only when `full` is true;
147
+ // otherwise it shows the newest scan alone.
148
+ ...(payload.full === false || events.length > MAX_EVENTS ? { history_truncated: true } : {}),
149
+ events: events.slice(0, MAX_EVENTS),
150
+ };
151
+ }
@@ -0,0 +1,6 @@
1
+ import type { Stage } from '../../core/status/index.js';
2
+ import { type CarrierStatusMap } from '../../core/status/statusMap.js';
3
+ /** The stage of one scan from its code, or from its wording where the code's category does not fit it. */
4
+ export declare function orlenPaczkaStage(code: string, wording: string): Stage | undefined;
5
+ /** Every scan carries a code; wording alone gets nothing. */
6
+ export declare const statusMap: CarrierStatusMap;
@@ -0,0 +1,42 @@
1
+ import { normalizeStatusWording } from '../../core/status/statusMap.js';
2
+ /**
3
+ * The tracker's scan codes. Each comes with a short category (`labelShort`)
4
+ * and a sentence that can name the sorting centre; parcels of some services
5
+ * carry an older sentence for the same code.
6
+ */
7
+ const CODES = {
8
+ // Paczka w trakcie przygotowania: the sender has created the parcel.
9
+ 200: 'registered',
10
+ // Paczka nadana: dropped off at a point.
11
+ 210: 'accepted',
12
+ // Paczka odebrana przez kuriera: a courier collected it from the sender.
13
+ 240: 'accepted',
14
+ // Paczka w sortowni regionalnej, at the first sorting centre and at the
15
+ // destination's (653); Paczka w sortowni centralnej (300).
16
+ 100: 'in_transit',
17
+ 300: 'in_transit',
18
+ 653: 'in_transit',
19
+ // Paczka w drodze do punktu odbioru: on its way to the pickup point.
20
+ 680: 'in_transit',
21
+ // Paczka do odbioru: waiting at the pickup point.
22
+ 690: 'ready_for_pickup',
23
+ // Paczka odebrana: the recipient collected it.
24
+ 1000: 'delivered',
25
+ };
26
+ /**
27
+ * A parcel ORLEN hands to another country's carrier gets code 690 and its
28
+ * "ready for pickup" category, but its sentence says the parcel left with the
29
+ * other carrier: it is in transit, not waiting at a point.
30
+ */
31
+ const HANDOFF = /^paczka przekazana do przewoźnika w innym kraju\b/;
32
+ /** The stage of one scan from its code, or from its wording where the code's category does not fit it. */
33
+ export function orlenPaczkaStage(code, wording) {
34
+ if (HANDOFF.test(normalizeStatusWording(wording)))
35
+ return 'in_transit';
36
+ return Object.hasOwn(CODES, code) ? CODES[code] : undefined;
37
+ }
38
+ /** Every scan carries a code; wording alone gets nothing. */
39
+ export const statusMap = {
40
+ stage: (code, wording) => code === null ? undefined : orlenPaczkaStage(code, wording),
41
+ gaps: [],
42
+ };
@@ -1,4 +1,122 @@
1
1
  {
2
2
  "carrier": "orlen-paczka",
3
- "entries": []
3
+ "entries": [
4
+ {
5
+ "code": "200",
6
+ "wording": "Twoja paczka jest w trakcie przygotowania przez nadawcę",
7
+ "stage": "registered",
8
+ "language": "pl",
9
+ "confirmedBy": "live",
10
+ "firstSeen": "2026-10-11",
11
+ "note": "Short category: Paczka w trakcie przygotowania. The sender has created the parcel."
12
+ },
13
+ {
14
+ "code": "200",
15
+ "wording": "Paczka przygotowywana przez nadawcę",
16
+ "stage": "registered",
17
+ "language": "pl",
18
+ "confirmedBy": "live",
19
+ "firstSeen": "2026-10-11",
20
+ "note": "The older wording of the same code, seen on another parcel."
21
+ },
22
+ {
23
+ "code": "210",
24
+ "wording": "Paczka nadana w punkcie",
25
+ "stage": "accepted",
26
+ "language": "pl",
27
+ "confirmedBy": "live",
28
+ "firstSeen": "2026-10-11",
29
+ "note": "Short category: Paczka nadana. The sender dropped the parcel off at a point."
30
+ },
31
+ {
32
+ "code": "240",
33
+ "wording": "Twoja paczka została odebrana przez kuriera i ruszyła w drogę",
34
+ "stage": "accepted",
35
+ "language": "pl",
36
+ "confirmedBy": "live",
37
+ "firstSeen": "2026-10-11",
38
+ "note": "Short category: Paczka odebrana przez kuriera. A courier collected the parcel from the sender."
39
+ },
40
+ {
41
+ "code": "100",
42
+ "wording": "Twoja paczka została przyjęta w sortowni",
43
+ "stage": "in_transit",
44
+ "language": "pl",
45
+ "confirmedBy": "live",
46
+ "firstSeen": "2026-10-11",
47
+ "note": "Followed by the sorting centre's town, which the adapter keeps as the scan's location. Short category: Paczka w sortowni regionalnej."
48
+ },
49
+ {
50
+ "code": "100",
51
+ "wording": "Paczka przyjęta w sortowni regionalnej",
52
+ "stage": "in_transit",
53
+ "language": "pl",
54
+ "confirmedBy": "live",
55
+ "firstSeen": "2026-10-11",
56
+ "note": "The older wording of the same code; it names no town."
57
+ },
58
+ {
59
+ "code": "300",
60
+ "wording": "W sortowni centralnej",
61
+ "stage": "in_transit",
62
+ "language": "pl",
63
+ "confirmedBy": "live",
64
+ "firstSeen": "2026-10-11",
65
+ "note": "Short category: Paczka w sortowni centralnej."
66
+ },
67
+ {
68
+ "code": "653",
69
+ "wording": "Twoja paczka znajduje się w sortowni",
70
+ "stage": "in_transit",
71
+ "language": "pl",
72
+ "confirmedBy": "live",
73
+ "firstSeen": "2026-10-11",
74
+ "note": "The destination's sorting centre, followed by its town, which can be missing. Short category: Paczka w sortowni regionalnej."
75
+ },
76
+ {
77
+ "code": "680",
78
+ "wording": "Twoja paczka jest już w drodze do punktu odbioru",
79
+ "stage": "in_transit",
80
+ "language": "pl",
81
+ "confirmedBy": "live",
82
+ "firstSeen": "2026-10-11",
83
+ "note": "Short category: Paczka w drodze do punktu odbioru. On its way to the pickup point."
84
+ },
85
+ {
86
+ "code": "690",
87
+ "wording": "Twoja paczka czeka na odbiór w punkcie",
88
+ "stage": "ready_for_pickup",
89
+ "language": "pl",
90
+ "confirmedBy": "live",
91
+ "firstSeen": "2026-10-11",
92
+ "note": "Short category: Paczka do odbioru."
93
+ },
94
+ {
95
+ "code": "690",
96
+ "wording": "Paczka przekazana do przewoźnika w innym kraju. Dalszą drogę możesz śledzić w aplikacji Vinted",
97
+ "stage": "in_transit",
98
+ "language": "pl",
99
+ "confirmedBy": "live",
100
+ "firstSeen": "2026-10-11",
101
+ "note": "Handed over to another country's carrier, with the code and short category of a parcel waiting for pickup; the wording decides. A collection by the customer followed."
102
+ },
103
+ {
104
+ "code": "1000",
105
+ "wording": "Cieszymy się, że Twoja paczka została już odebrana z punktu odbioru",
106
+ "stage": "delivered",
107
+ "language": "pl",
108
+ "confirmedBy": "live",
109
+ "firstSeen": "2026-10-11",
110
+ "note": "Short category: Paczka odebrana. The recipient collected the parcel from the point."
111
+ },
112
+ {
113
+ "code": "1000",
114
+ "wording": "Odebrana przez Klienta",
115
+ "stage": "delivered",
116
+ "language": "pl",
117
+ "confirmedBy": "live",
118
+ "firstSeen": "2026-10-11",
119
+ "note": "The older wording of the same code."
120
+ }
121
+ ]
4
122
  }
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { statusMap as aliexpress } from '../../carriers/aliexpress/status.js';
14
14
  import { statusMap as anPost } from '../../carriers/an-post/status.js';
15
+ import { statusMap as boxNow } from '../../carriers/box-now/status.js';
15
16
  import { statusMap as chinaPost } from '../../carriers/china-post/status.js';
16
17
  import { statusMap as chronopost } from '../../carriers/chronopost/status.js';
17
18
  import { statusMap as correosSpain } from '../../carriers/correos-spain/status.js';
@@ -28,6 +29,7 @@ import { statusMap as jntCargo } from '../../carriers/j-and-t-cargo/status.js';
28
29
  import { statusMap as laPoste } from '../../carriers/la-poste/status.js';
29
30
  import { statusMap as oldDominion } from '../../carriers/old-dominion/status.js';
30
31
  import { statusMap as omgo } from '../../carriers/omgo/status.js';
32
+ import { statusMap as orlenPaczka } from '../../carriers/orlen-paczka/status.js';
31
33
  import { statusMap as postlogistics } from '../../carriers/postlogistics/status.js';
32
34
  import { statusMap as sagawa } from '../../carriers/sagawa/status.js';
33
35
  import { statusMap as speedx } from '../../carriers/speedx/status.js';
@@ -42,9 +44,9 @@ import { normalizeStatusWording } from '../status/statusMap.js';
42
44
  import { CARRIER_DEFINITIONS } from './definitions.js';
43
45
  /** By adapter: a carrier served by another's adapter, as Delivengo by La Poste's, reads that map. */
44
46
  export const STATUS_MAPS = {
45
- aliexpress, 'an-post': anPost, 'china-post': chinaPost, chronopost, 'correos-spain': correosSpain, 'dhl-express': dhlExpress,
47
+ aliexpress, 'an-post': anPost, 'box-now': boxNow, 'china-post': chinaPost, chronopost, 'correos-spain': correosSpain, 'dhl-express': dhlExpress,
46
48
  dpd, 'dpd-de': dpdDe, 'dpd-fr': dpdFr, 'dpd-pl': dpdPl, emile, 'gofo-fr': gofoFr, 'gofo-it': gofoIt,
47
- 'j-and-t': jAndT, 'j-and-t-cargo': jntCargo, 'la-poste': laPoste, 'old-dominion': oldDominion, omgo,
49
+ 'j-and-t': jAndT, 'j-and-t-cargo': jntCargo, 'la-poste': laPoste, 'old-dominion': oldDominion, omgo, 'orlen-paczka': orlenPaczka,
48
50
  postlogistics, sagawa, speedx, sto, 'swiss-post': swissPost, 'thailand-post': thailandPost, tnt, ups, yunexpress,
49
51
  };
50
52
  /** The carrier the app files the universal providers' scans under. */
@@ -4822,7 +4822,8 @@
4822
4822
  "timezone": "Europe/Athens",
4823
4823
  "tracking": {
4824
4824
  "mode": "automatic",
4825
- "adapter": "universal"
4825
+ "adapter": "box-now",
4826
+ "recognitionRank": 48
4826
4827
  },
4827
4828
  "canaryUrl": "https://boxnow.cy/track",
4828
4829
  "trackingSearchUrl": "https://boxnow.cy/track",
@@ -7215,7 +7216,8 @@
7215
7216
  "timezone": "Europe/Warsaw",
7216
7217
  "tracking": {
7217
7218
  "mode": "automatic",
7218
- "adapter": "universal"
7219
+ "adapter": "orlen-paczka",
7220
+ "recognitionRank": 49
7219
7221
  },
7220
7222
  "canaryUrl": "https://www.orlenpaczka.pl/sledz-paczke/",
7221
7223
  "trackingUrlTemplate": "https://www.orlenpaczka.pl/sledz-paczke/?numer={trackingNumber}",
@@ -3308,7 +3308,8 @@ export declare const CARRIER_CATALOG: {
3308
3308
  readonly timezone: "Europe/Athens";
3309
3309
  readonly tracking: {
3310
3310
  readonly mode: "automatic";
3311
- readonly adapter: "universal";
3311
+ readonly adapter: "box-now";
3312
+ readonly recognitionRank: 48;
3312
3313
  };
3313
3314
  readonly canaryUrl: "https://boxnow.cy/track";
3314
3315
  readonly trackingSearchUrl: "https://boxnow.cy/track";
@@ -4845,7 +4846,8 @@ export declare const CARRIER_CATALOG: {
4845
4846
  readonly timezone: "Europe/Warsaw";
4846
4847
  readonly tracking: {
4847
4848
  readonly mode: "automatic";
4848
- readonly adapter: "universal";
4849
+ readonly adapter: "orlen-paczka";
4850
+ readonly recognitionRank: 49;
4849
4851
  };
4850
4852
  readonly canaryUrl: "https://www.orlenpaczka.pl/sledz-paczke/";
4851
4853
  readonly trackingUrlTemplate: "https://www.orlenpaczka.pl/sledz-paczke/?numer={trackingNumber}";
@@ -4823,7 +4823,8 @@ export const CARRIER_CATALOG = {
4823
4823
  "timezone": "Europe/Athens",
4824
4824
  "tracking": {
4825
4825
  "mode": "automatic",
4826
- "adapter": "universal"
4826
+ "adapter": "box-now",
4827
+ "recognitionRank": 48
4827
4828
  },
4828
4829
  "canaryUrl": "https://boxnow.cy/track",
4829
4830
  "trackingSearchUrl": "https://boxnow.cy/track",
@@ -7216,7 +7217,8 @@ export const CARRIER_CATALOG = {
7216
7217
  "timezone": "Europe/Warsaw",
7217
7218
  "tracking": {
7218
7219
  "mode": "automatic",
7219
- "adapter": "universal"
7220
+ "adapter": "orlen-paczka",
7221
+ "recognitionRank": 49
7220
7222
  },
7221
7223
  "canaryUrl": "https://www.orlenpaczka.pl/sledz-paczke/",
7222
7224
  "trackingUrlTemplate": "https://www.orlenpaczka.pl/sledz-paczke/?numer={trackingNumber}",
@@ -4,6 +4,7 @@ export const CARRIER_RECOGNITION_RANKS = {
4
4
  "aliexpress": 14,
5
5
  "australia-post": 6,
6
6
  "austrian-post": 39,
7
+ "box-now": 48,
7
8
  "bpost": 37,
8
9
  "brt": 42,
9
10
  "canada-post": 15,
@@ -40,6 +41,7 @@ export const CARRIER_RECOGNITION_RANKS = {
40
41
  "nz-post": 32,
41
42
  "omgo": 1,
42
43
  "ontrac": 21,
44
+ "orlen-paczka": 49,
43
45
  "poczta-polska": 31,
44
46
  "poste-italiane": 46,
45
47
  "posti": 27,
@@ -7,6 +7,7 @@ import { adapter as asendia } from '../carriers/asendia/adapter.js';
7
7
  import { adapter as australiaPost } from '../carriers/australia-post/adapter.js';
8
8
  import { adapter as austrianPost } from '../carriers/austrian-post/adapter.js';
9
9
  import { adapter as blueDart } from '../carriers/blue-dart/adapter.js';
10
+ import { adapter as boxNow } from '../carriers/box-now/adapter.js';
10
11
  import { adapter as bpost } from '../carriers/bpost/adapter.js';
11
12
  import { adapter as bringPosten } from '../carriers/bring-posten/adapter.js';
12
13
  import { adapter as brt } from '../carriers/brt/adapter.js';
@@ -80,6 +81,7 @@ import { adapter as nzPost } from '../carriers/nz-post/adapter.js';
80
81
  import { adapter as oldDominion } from '../carriers/old-dominion/adapter.js';
81
82
  import { adapter as omgo } from '../carriers/omgo/adapter.js';
82
83
  import { adapter as ontrac } from '../carriers/ontrac/adapter.js';
84
+ import { adapter as orlenPaczka } from '../carriers/orlen-paczka/adapter.js';
83
85
  import { adapter as paack } from '../carriers/paack/adapter.js';
84
86
  import { adapter as packeta } from '../carriers/packeta/adapter.js';
85
87
  import { adapter as planzer } from '../carriers/planzer/adapter.js';
@@ -129,6 +131,7 @@ export const REGISTRY = {
129
131
  "australia-post": australiaPost,
130
132
  "austrian-post": austrianPost,
131
133
  "blue-dart": blueDart,
134
+ "box-now": boxNow,
132
135
  "bpost": bpost,
133
136
  "bring-posten": bringPosten,
134
137
  "brt": brt,
@@ -202,6 +205,7 @@ export const REGISTRY = {
202
205
  "old-dominion": oldDominion,
203
206
  "omgo": omgo,
204
207
  "ontrac": ontrac,
208
+ "orlen-paczka": orlenPaczka,
205
209
  "paack": paack,
206
210
  "packeta": packeta,
207
211
  "planzer": planzer,
@@ -258,7 +262,7 @@ export const REGISTRY = {
258
262
  "australia-post": "australia-post",
259
263
  "austrian-post": "austrian-post",
260
264
  "blue-dart": "blue-dart",
261
- "box-now": "universal",
265
+ "box-now": "box-now",
262
266
  "bpost": "bpost",
263
267
  "bring-posten": "bring-posten",
264
268
  "brt": "brt",
@@ -378,7 +382,7 @@ export const REGISTRY = {
378
382
  "omgo": "omgo",
379
383
  "omniva": "universal",
380
384
  "ontrac": "ontrac",
381
- "orlen-paczka": "universal",
385
+ "orlen-paczka": "orlen-paczka",
382
386
  "osm-worldwide": "universal",
383
387
  "paack": "paack",
384
388
  "packeta": "packeta",
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Universal Parcel Scraper",
5
- "version": "0.70.3"
5
+ "version": "0.71.0"
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.70.3-main.907",
3
+ "version": "0.71.0-main.912",
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",