@gruncellka/porto-data 0.3.0 → 0.4.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +215 -0
  2. package/LICENSE +199 -5
  3. package/README.md +53 -34
  4. package/index.d.ts +35 -18
  5. package/index.js +2 -1
  6. package/package.json +28 -8
  7. package/porto_data/formats/envelopes.json +120 -0
  8. package/porto_data/formats/layouts.json +288 -0
  9. package/porto_data/mappings.json +65 -10
  10. package/porto_data/metadata.json +662 -125
  11. package/porto_data/policy/jurisdictions.json +839 -0
  12. package/porto_data/policy/markets.json +75 -0
  13. package/porto_data/policy/restrictions.json +668 -0
  14. package/porto_data/providers/deutschepost/features.json +42 -0
  15. package/porto_data/providers/deutschepost/graph.json +203 -0
  16. package/porto_data/providers/deutschepost/limits.json +17 -0
  17. package/porto_data/providers/deutschepost/marks.json +71 -0
  18. package/porto_data/providers/deutschepost/prices/products.json +239 -0
  19. package/porto_data/providers/deutschepost/prices/services.json +51 -0
  20. package/porto_data/providers/deutschepost/products.json +197 -0
  21. package/porto_data/providers/deutschepost/services.json +88 -0
  22. package/porto_data/providers/deutschepost/weights.json +46 -0
  23. package/porto_data/providers/deutschepost/zones.json +231 -0
  24. package/porto_data/providers/laposte/features.json +42 -0
  25. package/porto_data/providers/laposte/graph.json +234 -0
  26. package/porto_data/providers/laposte/limits.json +17 -0
  27. package/porto_data/providers/laposte/marks.json +39 -0
  28. package/porto_data/providers/laposte/prices/products.json +947 -0
  29. package/porto_data/providers/laposte/prices/services.json +41 -0
  30. package/porto_data/providers/laposte/products.json +276 -0
  31. package/porto_data/providers/laposte/services.json +63 -0
  32. package/porto_data/providers/laposte/weights.json +38 -0
  33. package/porto_data/providers/laposte/zones.json +230 -0
  34. package/porto_data/providers/swisspost/features.json +21 -0
  35. package/porto_data/providers/swisspost/graph.json +212 -0
  36. package/porto_data/providers/swisspost/limits.json +17 -0
  37. package/porto_data/providers/swisspost/marks.json +41 -0
  38. package/porto_data/providers/swisspost/prices/products.json +347 -0
  39. package/porto_data/providers/swisspost/prices/services.json +31 -0
  40. package/porto_data/providers/swisspost/products.json +193 -0
  41. package/porto_data/providers/swisspost/rules.json +25 -0
  42. package/porto_data/providers/swisspost/services.json +40 -0
  43. package/porto_data/providers/swisspost/weights.json +38 -0
  44. package/porto_data/providers/swisspost/zones.json +223 -0
  45. package/porto_data/providers/ukrposhta/features.json +28 -0
  46. package/porto_data/providers/ukrposhta/graph.json +148 -0
  47. package/porto_data/providers/ukrposhta/limits.json +17 -0
  48. package/porto_data/providers/ukrposhta/marks.json +25 -0
  49. package/porto_data/providers/ukrposhta/prices/products.json +123 -0
  50. package/porto_data/providers/ukrposhta/prices/services.json +42 -0
  51. package/porto_data/providers/ukrposhta/products.json +74 -0
  52. package/porto_data/providers/ukrposhta/services.json +40 -0
  53. package/porto_data/providers/ukrposhta/weights.json +26 -0
  54. package/porto_data/providers/ukrposhta/zones.json +226 -0
  55. package/porto_data/providers.json +37 -0
  56. package/porto_data/schemas/envelopes.schema.json +120 -0
  57. package/porto_data/schemas/features.schema.json +66 -55
  58. package/porto_data/schemas/graph.schema.json +189 -0
  59. package/porto_data/schemas/jurisdictions.schema.json +116 -0
  60. package/porto_data/schemas/layouts.schema.json +156 -0
  61. package/porto_data/schemas/limits.schema.json +253 -0
  62. package/porto_data/schemas/mappings.schema.json +73 -0
  63. package/porto_data/schemas/markets.schema.json +186 -0
  64. package/porto_data/schemas/marks.schema.json +127 -0
  65. package/porto_data/schemas/metadata.schema.json +183 -0
  66. package/porto_data/schemas/porto_ids.schema.json +45 -0
  67. package/porto_data/schemas/product_prices.schema.json +126 -0
  68. package/porto_data/schemas/products.schema.json +338 -110
  69. package/porto_data/schemas/providers.schema.json +71 -0
  70. package/porto_data/schemas/restrictions.schema.json +175 -355
  71. package/porto_data/schemas/rules.schema.json +104 -0
  72. package/porto_data/schemas/service_prices.schema.json +116 -0
  73. package/porto_data/schemas/services.schema.json +113 -70
  74. package/porto_data/schemas/weights.schema.json +70 -0
  75. package/porto_data/schemas/zones.schema.json +78 -72
  76. package/porto_data/data/data_links.json +0 -148
  77. package/porto_data/data/dimensions.json +0 -158
  78. package/porto_data/data/features.json +0 -66
  79. package/porto_data/data/prices.json +0 -242
  80. package/porto_data/data/products.json +0 -84
  81. package/porto_data/data/restrictions.json +0 -795
  82. package/porto_data/data/services.json +0 -61
  83. package/porto_data/data/weight_tiers.json +0 -54
  84. package/porto_data/data/zones.json +0 -230
  85. package/porto_data/schemas/data_links.schema.json +0 -223
  86. package/porto_data/schemas/dimensions.schema.json +0 -215
  87. package/porto_data/schemas/prices.schema.json +0 -180
  88. package/porto_data/schemas/weight_tiers.schema.json +0 -70
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/limits.schema.json",
3
+ "file_type": "limits",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "country_code": "ISO 3166-1 alpha-2",
7
+ "date": "ISO 8601"
8
+ },
9
+ "context": {
10
+ "national": {
11
+ "description": "Letter-format services; domestic acceptance in UA. International acceptance follows Ukrposhta operational status.",
12
+ "notes": "Add rows when Ukrposhta publishes destination suspensions or operational limits for letters."
13
+ }
14
+ },
15
+ "limits": [],
16
+ "frameworks": {}
17
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/marks.schema.json",
3
+ "file_type": "marks",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "dimension": "mm"
7
+ },
8
+ "default_profile": "domestic",
9
+ "profiles": [
10
+ {
11
+ "id": "domestic",
12
+ "mark_type": "label",
13
+ "label": "Shipment label PDF",
14
+ "description": "Standard Ukrposhta eCom sticker PDF for letters and documents",
15
+ "scope_notes": "Domestic and international letters share one label model (A5-class PDF from API)",
16
+ "size": {
17
+ "width": 148,
18
+ "height": 210
19
+ },
20
+ "mime_type": [
21
+ "application/pdf"
22
+ ]
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,123 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/product_prices.schema.json",
3
+ "file_type": "product_prices",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "price": "cents",
7
+ "currency": "UAH"
8
+ },
9
+ "product_prices": [
10
+ {
11
+ "product_id": "lyst_standartnyi",
12
+ "zone": "domestic",
13
+ "weight_tier": "W0050",
14
+ "price": [
15
+ {
16
+ "amount": 2400,
17
+ "effective_from": "2026-01-01",
18
+ "effective_to": null
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "product_id": "lyst_standartnyi",
24
+ "zone": "domestic",
25
+ "weight_tier": "W0250",
26
+ "price": [
27
+ {
28
+ "amount": 7200,
29
+ "effective_from": "2026-01-01",
30
+ "effective_to": null
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "product_id": "lyst_standartnyi",
36
+ "zone": "domestic",
37
+ "weight_tier": "W1000",
38
+ "price": [
39
+ {
40
+ "amount": 7200,
41
+ "effective_from": "2026-01-01",
42
+ "effective_to": null
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "product_id": "lyst_standartnyi",
48
+ "zone": "domestic",
49
+ "weight_tier": "W2000",
50
+ "price": [
51
+ {
52
+ "amount": 7200,
53
+ "effective_from": "2026-01-01",
54
+ "effective_to": null
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "product_id": "dokument",
60
+ "zone": "domestic",
61
+ "weight_tier": "W1000",
62
+ "price": [
63
+ {
64
+ "amount": 5500,
65
+ "effective_from": "2026-01-01",
66
+ "effective_to": null
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "product_id": "lyst_standartnyi",
72
+ "zone": "world",
73
+ "weight_tier": "W0050",
74
+ "currency": "USD",
75
+ "price": [
76
+ {
77
+ "amount": 250,
78
+ "effective_from": "2026-04-01",
79
+ "effective_to": null
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "product_id": "lyst_standartnyi",
85
+ "zone": "world",
86
+ "weight_tier": "W0250",
87
+ "currency": "USD",
88
+ "price": [
89
+ {
90
+ "amount": 400,
91
+ "effective_from": "2026-04-01",
92
+ "effective_to": null
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "product_id": "lyst_standartnyi",
98
+ "zone": "world",
99
+ "weight_tier": "W1000",
100
+ "currency": "USD",
101
+ "price": [
102
+ {
103
+ "amount": 1450,
104
+ "effective_from": "2026-04-01",
105
+ "effective_to": null
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "product_id": "lyst_standartnyi",
111
+ "zone": "world",
112
+ "weight_tier": "W2000",
113
+ "currency": "USD",
114
+ "price": [
115
+ {
116
+ "amount": 2850,
117
+ "effective_from": "2026-04-01",
118
+ "effective_to": null
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/service_prices.schema.json",
3
+ "file_type": "service_prices",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "price": "cents",
7
+ "currency": "UAH"
8
+ },
9
+ "service_prices": [
10
+ {
11
+ "service_id": "return_receipt_paper",
12
+ "price": [
13
+ {
14
+ "amount": 4800,
15
+ "effective_from": "2026-01-01",
16
+ "effective_to": null
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "service_id": "return_receipt_electronic",
22
+ "price": [
23
+ {
24
+ "amount": 2400,
25
+ "effective_from": "2026-01-01",
26
+ "effective_to": null
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "service_id": "recommended_international",
32
+ "currency": "USD",
33
+ "price": [
34
+ {
35
+ "amount": 350,
36
+ "effective_from": "2026-04-01",
37
+ "effective_to": null
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/products.schema.json",
3
+ "file_type": "products",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "weight": "g"
7
+ },
8
+ "products": [
9
+ {
10
+ "id": "lyst_standartnyi",
11
+ "porto_id": "small",
12
+ "native_id": "letter",
13
+ "name": "Лист стандартний",
14
+ "envelope_ids": [
15
+ "DL",
16
+ "C6",
17
+ "C5",
18
+ "C4"
19
+ ],
20
+ "zones": [
21
+ "domestic",
22
+ "world"
23
+ ],
24
+ "effective_from": "2026-01-01",
25
+ "effective_to": null,
26
+ "mark_type": "label",
27
+ "tracking_mode": "optional",
28
+ "delivery": [
29
+ {
30
+ "zones": [
31
+ "domestic"
32
+ ],
33
+ "span": "between",
34
+ "days_min": 2,
35
+ "days_max": 3
36
+ },
37
+ {
38
+ "zones": [
39
+ "world"
40
+ ],
41
+ "span": "within",
42
+ "days_max": 10
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "id": "dokument",
48
+ "porto_id": "large",
49
+ "native_id": "document",
50
+ "name": "Укрпошта Документ",
51
+ "envelope_ids": [
52
+ "C4",
53
+ "B4"
54
+ ],
55
+ "zones": [
56
+ "domestic"
57
+ ],
58
+ "effective_from": "2026-01-01",
59
+ "effective_to": null,
60
+ "mark_type": "label",
61
+ "tracking_mode": "included",
62
+ "delivery": [
63
+ {
64
+ "zones": [
65
+ "domestic"
66
+ ],
67
+ "span": "between",
68
+ "days_min": 2,
69
+ "days_max": 3
70
+ }
71
+ ]
72
+ }
73
+ ]
74
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/services.schema.json",
3
+ "file_type": "services",
4
+ "provider": "ukrposhta",
5
+ "services": [
6
+ {
7
+ "id": "return_receipt_paper",
8
+ "porto_id": "return_receipt",
9
+ "name": "Паперове повідомлення про вручення",
10
+ "label": "Return receipt (paper)",
11
+ "description": "Paper delivery notice returned to sender",
12
+ "features": [
13
+ "return_receipt_paper"
14
+ ],
15
+ "enables_tracking": true
16
+ },
17
+ {
18
+ "id": "return_receipt_electronic",
19
+ "porto_id": "return_receipt",
20
+ "name": "Електронне повідомлення про вручення",
21
+ "label": "Return receipt (electronic)",
22
+ "description": "Electronic delivery notice returned to sender",
23
+ "features": [
24
+ "return_receipt_electronic"
25
+ ],
26
+ "enables_tracking": true
27
+ },
28
+ {
29
+ "id": "recommended_international",
30
+ "porto_id": "registered",
31
+ "name": "Міжнародне реєстрування",
32
+ "label": "International registered",
33
+ "description": "Registered surcharge for international letters (LETTER; no declared value)",
34
+ "features": [
35
+ "recipient_signature"
36
+ ],
37
+ "enables_tracking": true
38
+ }
39
+ ]
40
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/weights.schema.json",
3
+ "file_type": "weights",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "weight": "g"
7
+ },
8
+ "weights": {
9
+ "W0050": {
10
+ "min": 0,
11
+ "max": 50
12
+ },
13
+ "W0250": {
14
+ "min": 51,
15
+ "max": 250
16
+ },
17
+ "W1000": {
18
+ "min": 251,
19
+ "max": 1000
20
+ },
21
+ "W2000": {
22
+ "min": 1001,
23
+ "max": 2000
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,226 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/zones.schema.json",
3
+ "file_type": "zones",
4
+ "provider": "ukrposhta",
5
+ "unit": {
6
+ "country_code": "ISO 3166-1 alpha-2"
7
+ },
8
+ "zones": [
9
+ {
10
+ "id": "domestic",
11
+ "name": "Ukraine (domestic)",
12
+ "description": "Domestic Ukrainian destinations",
13
+ "country_codes": [
14
+ "UA"
15
+ ]
16
+ },
17
+ {
18
+ "id": "world",
19
+ "name": "World",
20
+ "description": "All international destinations for letters (flat pricing)",
21
+ "country_codes": [
22
+ "AD",
23
+ "AE",
24
+ "AF",
25
+ "AL",
26
+ "AM",
27
+ "AO",
28
+ "AR",
29
+ "AT",
30
+ "AU",
31
+ "AZ",
32
+ "BA",
33
+ "BB",
34
+ "BD",
35
+ "BE",
36
+ "BF",
37
+ "BG",
38
+ "BH",
39
+ "BI",
40
+ "BJ",
41
+ "BN",
42
+ "BO",
43
+ "BR",
44
+ "BT",
45
+ "BW",
46
+ "BY",
47
+ "BZ",
48
+ "CA",
49
+ "CD",
50
+ "CF",
51
+ "CG",
52
+ "CH",
53
+ "CI",
54
+ "CL",
55
+ "CM",
56
+ "CN",
57
+ "CO",
58
+ "CR",
59
+ "CU",
60
+ "CV",
61
+ "CY",
62
+ "CZ",
63
+ "DE",
64
+ "DJ",
65
+ "DK",
66
+ "DM",
67
+ "DO",
68
+ "DZ",
69
+ "EC",
70
+ "EE",
71
+ "EG",
72
+ "EH",
73
+ "ER",
74
+ "ES",
75
+ "ET",
76
+ "FI",
77
+ "FJ",
78
+ "FM",
79
+ "FO",
80
+ "FR",
81
+ "GA",
82
+ "GB",
83
+ "GD",
84
+ "GE",
85
+ "GH",
86
+ "GI",
87
+ "GL",
88
+ "GM",
89
+ "GN",
90
+ "GQ",
91
+ "GR",
92
+ "GT",
93
+ "GW",
94
+ "GY",
95
+ "HK",
96
+ "HN",
97
+ "HT",
98
+ "HU",
99
+ "ID",
100
+ "IE",
101
+ "IL",
102
+ "IN",
103
+ "IQ",
104
+ "IR",
105
+ "IS",
106
+ "IT",
107
+ "JM",
108
+ "JO",
109
+ "JP",
110
+ "KE",
111
+ "KG",
112
+ "KH",
113
+ "KI",
114
+ "KM",
115
+ "KP",
116
+ "KR",
117
+ "KZ",
118
+ "LA",
119
+ "LB",
120
+ "LC",
121
+ "LI",
122
+ "LK",
123
+ "LR",
124
+ "LS",
125
+ "LT",
126
+ "LU",
127
+ "LV",
128
+ "LY",
129
+ "MA",
130
+ "MC",
131
+ "MD",
132
+ "ME",
133
+ "MG",
134
+ "MH",
135
+ "MK",
136
+ "ML",
137
+ "MM",
138
+ "MN",
139
+ "MO",
140
+ "MR",
141
+ "MS",
142
+ "MT",
143
+ "MU",
144
+ "MV",
145
+ "MW",
146
+ "MX",
147
+ "MY",
148
+ "MZ",
149
+ "NA",
150
+ "NE",
151
+ "NG",
152
+ "NI",
153
+ "NL",
154
+ "NO",
155
+ "NP",
156
+ "NR",
157
+ "NZ",
158
+ "OM",
159
+ "PA",
160
+ "PE",
161
+ "PF",
162
+ "PG",
163
+ "PH",
164
+ "PK",
165
+ "PL",
166
+ "PN",
167
+ "PR",
168
+ "PT",
169
+ "PW",
170
+ "PY",
171
+ "QA",
172
+ "RE",
173
+ "RO",
174
+ "RS",
175
+ "RU",
176
+ "RW",
177
+ "SA",
178
+ "SB",
179
+ "SC",
180
+ "SD",
181
+ "SE",
182
+ "SG",
183
+ "SH",
184
+ "SI",
185
+ "SK",
186
+ "SL",
187
+ "SM",
188
+ "SN",
189
+ "SO",
190
+ "SR",
191
+ "SS",
192
+ "ST",
193
+ "SV",
194
+ "SY",
195
+ "SZ",
196
+ "TD",
197
+ "TG",
198
+ "TH",
199
+ "TJ",
200
+ "TL",
201
+ "TM",
202
+ "TN",
203
+ "TO",
204
+ "TR",
205
+ "TT",
206
+ "TV",
207
+ "TW",
208
+ "TZ",
209
+ "UG",
210
+ "US",
211
+ "UY",
212
+ "UZ",
213
+ "VA",
214
+ "VE",
215
+ "VN",
216
+ "VU",
217
+ "WS",
218
+ "XK",
219
+ "YE",
220
+ "ZA",
221
+ "ZM",
222
+ "ZW"
223
+ ]
224
+ }
225
+ ]
226
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/providers.schema.json",
3
+ "providers": {
4
+ "deutschepost": {
5
+ "label": "Deutsche Post",
6
+ "name": "Deutsche Post AG",
7
+ "country": "DE",
8
+ "mark_types": [
9
+ "stamp"
10
+ ]
11
+ },
12
+ "ukrposhta": {
13
+ "label": "Ukrposhta",
14
+ "name": "Ukrposhta JSC",
15
+ "country": "UA",
16
+ "mark_types": [
17
+ "label"
18
+ ]
19
+ },
20
+ "laposte": {
21
+ "label": "La Poste",
22
+ "name": "La Poste S.A.",
23
+ "country": "FR",
24
+ "mark_types": [
25
+ "label"
26
+ ]
27
+ },
28
+ "swisspost": {
29
+ "label": "Swiss Post",
30
+ "name": "Die Schweizerische Post AG",
31
+ "country": "CH",
32
+ "mark_types": [
33
+ "stamp"
34
+ ]
35
+ }
36
+ }
37
+ }