saferoute-api 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 CHANGED
@@ -606,7 +606,33 @@ _В разработке_
606
606
 
607
607
  #### Информация об интервалах курьерской доставки
608
608
 
609
- _В разработке_
609
+ ```typescript
610
+ import api, { APIDataResponse, GetCourierScheduleParams, CourierScheduleItem } from 'saferoute-api';
611
+
612
+ const token = '******************';
613
+ const params: GetCourierScheduleParams = {
614
+ shopId: 777777,
615
+ companyId: 1,
616
+ deliveryDate: '2025-12-01',
617
+ deliveryAddress: {
618
+ city: {
619
+ countryCode: 'RU',
620
+ name: 'Москва',
621
+ type: 'г',
622
+ fias: '0c5b2444-70a0-4932-980c-b4dc0d3f02b5',
623
+ region: null,
624
+ area: null,
625
+ },
626
+ street: 'ул. Мира',
627
+ house: 10,
628
+ bulk: null,
629
+ flat: 7,
630
+ zipCode: null,
631
+ },
632
+ };
633
+
634
+ const res: APIDataResponse<CourierScheduleItem[]> = await api.other.getCourierSchedule(token, params);
635
+ ```
610
636
 
611
637
  #### Список компаний доставки (кроме возвратных)
612
638
 
@@ -4,8 +4,8 @@
4
4
  export type City = {
5
5
  countryCode: string;
6
6
  name: string;
7
- fias: string | null;
8
7
  type: string | null;
8
+ fias: string | null;
9
9
  region: string | null;
10
10
  area: string | null;
11
11
  };
@@ -22,9 +22,9 @@ export type GetCourierScheduleParams = {
22
22
  deliveryAddress: {
23
23
  city: City;
24
24
  street: string | null;
25
- house: string | null;
25
+ house: string | number | null;
26
26
  bulk: string | null;
27
- flat: string | null;
27
+ flat: string | number | null;
28
28
  zipCode: string | null;
29
29
  };
30
30
  } | {
@@ -35,16 +35,16 @@ export type GetCourierScheduleParams = {
35
35
  senderAddress: {
36
36
  city: City;
37
37
  street: string | null;
38
- house: string | null;
38
+ house: string | number | null;
39
39
  bulk: string | null;
40
- flat: string | null;
40
+ flat: string | number | null;
41
41
  };
42
42
  deliveryAddress: {
43
43
  city: City;
44
44
  street: string | null;
45
- house: string | null;
45
+ house: string | number | null;
46
46
  bulk: string | null;
47
- flat: string | null;
47
+ flat: string | number | null;
48
48
  zipCode: string | null;
49
49
  };
50
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saferoute-api",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Пакет для работы с API агрегатора служб доставки SafeRoute.",
5
5
  "main": "dist/index.js",
6
6
  "files": [