@opsregistry/adapter-cdek 0.3.0 → 0.3.1
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 +11 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
- `it.identity.authenticate` - OAuth 2.0 Client Credentials, токен кешируется внутри адаптера.
|
|
13
13
|
- `logistics.shipment.quote` - расчет вариантов доставки через `/v2/calculator/tarifflist`.
|
|
14
|
+
- `logistics.shipment.track` - статус и история движения через `/v2/orders/{uuid}`.
|
|
14
15
|
- Поиск кодов городов СДЭК по названию.
|
|
15
16
|
- Несколько грузовых мест в одном расчете.
|
|
16
17
|
- Фильтрация тарифов по `deliveryMode` и `serviceCodes`.
|
|
@@ -41,6 +42,16 @@ const quote = await cdek.quoteShipment({
|
|
|
41
42
|
console.log(quote.options);
|
|
42
43
|
```
|
|
43
44
|
|
|
45
|
+
Отслеживание отправления:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
const tracking = await cdek.trackShipment({
|
|
49
|
+
shipmentId: 'provider-order-uuid'
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
console.log(tracking.status, tracking.events);
|
|
53
|
+
```
|
|
54
|
+
|
|
44
55
|
Если код города уже известен, его можно передать без дополнительного поиска:
|
|
45
56
|
|
|
46
57
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opsregistry/adapter-cdek",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "CDEK adapter for opsregistry logistics shipment operations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test": "bun test"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opsregistry/contracts": "0.1.
|
|
20
|
+
"@opsregistry/contracts": "0.1.4",
|
|
21
21
|
"zod": "4.4.3"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|