@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,41 @@
1
+ {
2
+ "provider": "laposte",
3
+ "unit": {
4
+ "price": "cents",
5
+ "currency": "EUR"
6
+ },
7
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/service_prices.schema.json",
8
+ "file_type": "service_prices",
9
+ "service_prices": [
10
+ {
11
+ "service_id": "suivi_option",
12
+ "price": [
13
+ {
14
+ "amount": 50,
15
+ "effective_from": "2026-01-01",
16
+ "effective_to": null
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "service_id": "avis_de_reception_national",
22
+ "price": [
23
+ {
24
+ "amount": 145,
25
+ "effective_from": "2026-01-01",
26
+ "effective_to": null
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "service_id": "avis_de_reception_international",
32
+ "price": [
33
+ {
34
+ "amount": 150,
35
+ "effective_from": "2026-01-01",
36
+ "effective_to": null
37
+ }
38
+ ]
39
+ }
40
+ ]
41
+ }
@@ -0,0 +1,276 @@
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": "laposte",
5
+ "unit": {
6
+ "weight": "g"
7
+ },
8
+ "products": [
9
+ {
10
+ "id": "lettre_verte",
11
+ "porto_id": "small",
12
+ "name": "Lettre verte",
13
+ "envelope_ids": [
14
+ "DL",
15
+ "C6",
16
+ "C5",
17
+ "C4",
18
+ "B4"
19
+ ],
20
+ "zones": [
21
+ "domestic"
22
+ ],
23
+ "effective_from": "2026-01-01",
24
+ "effective_to": null,
25
+ "mark_type": "label",
26
+ "tracking_mode": "optional",
27
+ "delivery": [
28
+ {
29
+ "zones": [
30
+ "domestic"
31
+ ],
32
+ "span": "within",
33
+ "days_max": 3
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "id": "lettre_verte_suivie",
39
+ "porto_id": "small",
40
+ "name": "Lettre verte suivie",
41
+ "envelope_ids": [
42
+ "DL",
43
+ "C6",
44
+ "C5",
45
+ "C4",
46
+ "B4"
47
+ ],
48
+ "zones": [
49
+ "domestic",
50
+ "zone_1_eu",
51
+ "zone_2_europe",
52
+ "world"
53
+ ],
54
+ "effective_from": "2026-01-01",
55
+ "effective_to": null,
56
+ "mark_type": "label",
57
+ "tracking_mode": "included",
58
+ "included_features": [
59
+ "numero_suivi"
60
+ ],
61
+ "delivery": [
62
+ {
63
+ "zones": [
64
+ "domestic"
65
+ ],
66
+ "span": "within",
67
+ "days_max": 3
68
+ },
69
+ {
70
+ "zones": [
71
+ "zone_1_eu",
72
+ "zone_2_europe",
73
+ "world"
74
+ ],
75
+ "span": "within",
76
+ "days_max": 8
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "id": "lettre_services_plus",
82
+ "porto_id": "small",
83
+ "name": "Lettre Services Plus",
84
+ "envelope_ids": [
85
+ "DL",
86
+ "C6",
87
+ "C5",
88
+ "C4",
89
+ "B4"
90
+ ],
91
+ "zones": [
92
+ "domestic"
93
+ ],
94
+ "effective_from": "2026-01-01",
95
+ "effective_to": null,
96
+ "mark_type": "label",
97
+ "tracking_mode": "included",
98
+ "included_features": [
99
+ "numero_suivi"
100
+ ],
101
+ "delivery": [
102
+ {
103
+ "zones": [
104
+ "domestic"
105
+ ],
106
+ "span": "between",
107
+ "days_min": 1,
108
+ "days_max": 2
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "id": "lettre_recommandee_r_un",
114
+ "porto_id": "small",
115
+ "name": "Lettre recommandée R1",
116
+ "envelope_ids": [
117
+ "DL",
118
+ "C6",
119
+ "C5",
120
+ "C4",
121
+ "B4"
122
+ ],
123
+ "zones": [
124
+ "domestic"
125
+ ],
126
+ "effective_from": "2026-01-01",
127
+ "effective_to": null,
128
+ "mark_type": "label",
129
+ "tracking_mode": "included",
130
+ "included_features": [
131
+ "preuve_depot",
132
+ "signature_destinataire",
133
+ "numero_suivi"
134
+ ],
135
+ "indemnity": {
136
+ "tier": "R1",
137
+ "max": {
138
+ "amount": 1600
139
+ }
140
+ },
141
+ "delivery": [
142
+ {
143
+ "zones": [
144
+ "domestic"
145
+ ],
146
+ "span": "between",
147
+ "days_min": 1,
148
+ "days_max": 2
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "id": "lettre_recommandee_r_deux",
154
+ "porto_id": "small",
155
+ "name": "Lettre recommandée R2",
156
+ "envelope_ids": [
157
+ "DL",
158
+ "C6",
159
+ "C5",
160
+ "C4",
161
+ "B4"
162
+ ],
163
+ "zones": [
164
+ "domestic"
165
+ ],
166
+ "effective_from": "2026-01-01",
167
+ "effective_to": null,
168
+ "mark_type": "label",
169
+ "tracking_mode": "included",
170
+ "included_features": [
171
+ "preuve_depot",
172
+ "signature_destinataire",
173
+ "numero_suivi"
174
+ ],
175
+ "indemnity": {
176
+ "tier": "R2",
177
+ "max": {
178
+ "amount": 15300
179
+ }
180
+ },
181
+ "delivery": [
182
+ {
183
+ "zones": [
184
+ "domestic"
185
+ ],
186
+ "span": "between",
187
+ "days_min": 1,
188
+ "days_max": 2
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ "id": "lettre_recommandee_r_trois",
194
+ "porto_id": "small",
195
+ "name": "Lettre recommandée R3",
196
+ "envelope_ids": [
197
+ "DL",
198
+ "C6",
199
+ "C5",
200
+ "C4",
201
+ "B4"
202
+ ],
203
+ "zones": [
204
+ "domestic"
205
+ ],
206
+ "effective_from": "2026-01-01",
207
+ "effective_to": null,
208
+ "mark_type": "label",
209
+ "tracking_mode": "included",
210
+ "included_features": [
211
+ "preuve_depot",
212
+ "signature_destinataire",
213
+ "numero_suivi"
214
+ ],
215
+ "indemnity": {
216
+ "tier": "R3",
217
+ "max": {
218
+ "amount": 45800
219
+ }
220
+ },
221
+ "delivery": [
222
+ {
223
+ "zones": [
224
+ "domestic"
225
+ ],
226
+ "span": "between",
227
+ "days_min": 1,
228
+ "days_max": 2
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ "id": "lettre_recommandee_inter_r_un",
234
+ "porto_id": "small",
235
+ "name": "Lettre recommandée internationale R1",
236
+ "envelope_ids": [
237
+ "DL",
238
+ "C6",
239
+ "C5",
240
+ "C4",
241
+ "B4"
242
+ ],
243
+ "zones": [
244
+ "zone_1_eu",
245
+ "zone_2_europe",
246
+ "world"
247
+ ],
248
+ "effective_from": "2026-01-01",
249
+ "effective_to": null,
250
+ "mark_type": "label",
251
+ "tracking_mode": "included",
252
+ "included_features": [
253
+ "preuve_depot",
254
+ "signature_destinataire",
255
+ "numero_suivi"
256
+ ],
257
+ "indemnity": {
258
+ "tier": "R1",
259
+ "max": {
260
+ "amount": 4500
261
+ }
262
+ },
263
+ "delivery": [
264
+ {
265
+ "zones": [
266
+ "zone_1_eu",
267
+ "zone_2_europe",
268
+ "world"
269
+ ],
270
+ "span": "within",
271
+ "days_max": 8
272
+ }
273
+ ]
274
+ }
275
+ ]
276
+ }
@@ -0,0 +1,63 @@
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": "laposte",
5
+ "services": [
6
+ {
7
+ "id": "suivi_option",
8
+ "porto_id": "tracking",
9
+ "name": "Option suivi (add-on)",
10
+ "label": "Optional tracking add-on",
11
+ "description": "Optional tracking when posting Lettre verte without using Lettre verte suivie (e.g. Mon Timbre en ligne). Catalog uses a nominal add-on row; verify current fee on laposte.fr.",
12
+ "features": [
13
+ "numero_suivi"
14
+ ],
15
+ "enables_tracking": true,
16
+ "online_supported": true,
17
+ "integrations": {
18
+ "mon_timbre_en_ligne": true
19
+ },
20
+ "supported_zones": [
21
+ "domestic"
22
+ ]
23
+ },
24
+ {
25
+ "id": "avis_de_reception_national",
26
+ "porto_id": "return_receipt",
27
+ "name": "Avis de réception (national)",
28
+ "label": "Return receipt add-on (France)",
29
+ "description": "Optional avis de réception papier national, priced per official Lettre recommandée table (laposte.fr tarifs 2026). Add to a recommandée base product when the purchase flow offers it.",
30
+ "features": [
31
+ "avis_reception"
32
+ ],
33
+ "enables_tracking": false,
34
+ "online_supported": true,
35
+ "integrations": {
36
+ "mon_timbre_en_ligne": true
37
+ },
38
+ "supported_zones": [
39
+ "domestic"
40
+ ]
41
+ },
42
+ {
43
+ "id": "avis_de_reception_international",
44
+ "porto_id": "return_receipt",
45
+ "name": "Avis de réception (international)",
46
+ "label": "Return receipt add-on (international)",
47
+ "description": "Optional avis de réception for international registered letter, per official 2026 tariff table.",
48
+ "features": [
49
+ "avis_reception"
50
+ ],
51
+ "enables_tracking": false,
52
+ "online_supported": true,
53
+ "integrations": {
54
+ "mon_timbre_en_ligne": true
55
+ },
56
+ "supported_zones": [
57
+ "zone_1_eu",
58
+ "zone_2_europe",
59
+ "world"
60
+ ]
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,38 @@
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": "laposte",
5
+ "unit": {
6
+ "weight": "g"
7
+ },
8
+ "weights": {
9
+ "W0020": {
10
+ "min": 0,
11
+ "max": 20
12
+ },
13
+ "W0050": {
14
+ "min": 21,
15
+ "max": 50
16
+ },
17
+ "W0100": {
18
+ "min": 51,
19
+ "max": 100
20
+ },
21
+ "W0250": {
22
+ "min": 101,
23
+ "max": 250
24
+ },
25
+ "W0500": {
26
+ "min": 251,
27
+ "max": 500
28
+ },
29
+ "W1000": {
30
+ "min": 501,
31
+ "max": 1000
32
+ },
33
+ "W2000": {
34
+ "min": 1001,
35
+ "max": 2000
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,230 @@
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": "laposte",
5
+ "unit": {
6
+ "country_code": "ISO 3166-1 alpha-2"
7
+ },
8
+ "zones": [
9
+ {
10
+ "id": "domestic",
11
+ "name": "France",
12
+ "description": "France (domestic)",
13
+ "country_codes": [
14
+ "FR"
15
+ ]
16
+ },
17
+ {
18
+ "id": "zone_1_eu",
19
+ "name": "Zone 1 - EU",
20
+ "description": "European Union member countries (for France-origin international letters). Switzerland and other non-EU European states are in zone_2_europe.",
21
+ "country_codes": [
22
+ "AT",
23
+ "BE",
24
+ "BG",
25
+ "HR",
26
+ "CY",
27
+ "CZ",
28
+ "DK",
29
+ "EE",
30
+ "FI",
31
+ "GR",
32
+ "HU",
33
+ "IE",
34
+ "IT",
35
+ "LV",
36
+ "LT",
37
+ "LU",
38
+ "MT",
39
+ "NL",
40
+ "PL",
41
+ "PT",
42
+ "RO",
43
+ "SK",
44
+ "SI",
45
+ "ES",
46
+ "SE"
47
+ ]
48
+ },
49
+ {
50
+ "id": "zone_2_europe",
51
+ "name": "Zone 2 - Europa",
52
+ "description": "European countries outside the EU (e.g. CH, NO, GB). Switzerland is not an EU member and is priced here when posting from France.",
53
+ "country_codes": [
54
+ "AL",
55
+ "AD",
56
+ "BY",
57
+ "BA",
58
+ "FO",
59
+ "GI",
60
+ "GL",
61
+ "IS",
62
+ "XK",
63
+ "LI",
64
+ "MD",
65
+ "MC",
66
+ "ME",
67
+ "MK",
68
+ "NO",
69
+ "RU",
70
+ "SM",
71
+ "RS",
72
+ "CH",
73
+ "TR",
74
+ "UA",
75
+ "GB",
76
+ "VA"
77
+ ]
78
+ },
79
+ {
80
+ "id": "world",
81
+ "name": "Welt",
82
+ "description": "All countries outside Europe (international mail)",
83
+ "country_codes": [
84
+ "AF",
85
+ "DZ",
86
+ "AO",
87
+ "AR",
88
+ "AM",
89
+ "AU",
90
+ "AZ",
91
+ "BH",
92
+ "BD",
93
+ "BB",
94
+ "BZ",
95
+ "BJ",
96
+ "BT",
97
+ "BO",
98
+ "BW",
99
+ "BR",
100
+ "BN",
101
+ "BF",
102
+ "BI",
103
+ "KH",
104
+ "CM",
105
+ "CA",
106
+ "CV",
107
+ "CF",
108
+ "TD",
109
+ "CL",
110
+ "CN",
111
+ "CO",
112
+ "KM",
113
+ "CG",
114
+ "CD",
115
+ "CR",
116
+ "CI",
117
+ "CU",
118
+ "DJ",
119
+ "DM",
120
+ "DO",
121
+ "EC",
122
+ "EG",
123
+ "SV",
124
+ "GQ",
125
+ "ER",
126
+ "ET",
127
+ "FJ",
128
+ "GA",
129
+ "GM",
130
+ "GE",
131
+ "GH",
132
+ "GD",
133
+ "GT",
134
+ "GN",
135
+ "GW",
136
+ "GY",
137
+ "HT",
138
+ "HN",
139
+ "IN",
140
+ "ID",
141
+ "IR",
142
+ "IQ",
143
+ "IL",
144
+ "JM",
145
+ "JP",
146
+ "JO",
147
+ "KZ",
148
+ "KE",
149
+ "KI",
150
+ "KP",
151
+ "KR",
152
+ "KW",
153
+ "KG",
154
+ "LA",
155
+ "LB",
156
+ "LS",
157
+ "LR",
158
+ "LY",
159
+ "MG",
160
+ "MW",
161
+ "MY",
162
+ "MV",
163
+ "ML",
164
+ "MH",
165
+ "MR",
166
+ "MU",
167
+ "MX",
168
+ "FM",
169
+ "MN",
170
+ "MA",
171
+ "MZ",
172
+ "MM",
173
+ "NA",
174
+ "NR",
175
+ "NP",
176
+ "NZ",
177
+ "NI",
178
+ "NE",
179
+ "NG",
180
+ "OM",
181
+ "PK",
182
+ "PW",
183
+ "PA",
184
+ "PG",
185
+ "PY",
186
+ "PE",
187
+ "PH",
188
+ "QA",
189
+ "RW",
190
+ "WS",
191
+ "ST",
192
+ "SA",
193
+ "SN",
194
+ "SC",
195
+ "SL",
196
+ "SG",
197
+ "SB",
198
+ "SO",
199
+ "ZA",
200
+ "LK",
201
+ "SD",
202
+ "SR",
203
+ "SZ",
204
+ "SY",
205
+ "TW",
206
+ "TJ",
207
+ "TZ",
208
+ "TH",
209
+ "TL",
210
+ "TG",
211
+ "TO",
212
+ "TT",
213
+ "TN",
214
+ "TM",
215
+ "TV",
216
+ "UG",
217
+ "AE",
218
+ "US",
219
+ "UY",
220
+ "UZ",
221
+ "VU",
222
+ "VE",
223
+ "VN",
224
+ "YE",
225
+ "ZM",
226
+ "ZW"
227
+ ]
228
+ }
229
+ ]
230
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/features.schema.json",
3
+ "file_type": "features",
4
+ "provider": "swisspost",
5
+ "features": [
6
+ {
7
+ "id": "sendungsnummer",
8
+ "porto_id": "tracking_number",
9
+ "name": "Sendungsnummer",
10
+ "label": "Tracking number",
11
+ "description": "Electronic tracking for supported letter products (e.g. A-Mail Plus via WebStamp). Letter-only scope; not a parcel scan pipeline."
12
+ },
13
+ {
14
+ "id": "brief_dicke_band",
15
+ "porto_id": "thickness_surcharge",
16
+ "name": "Zuschlag Dicke",
17
+ "label": "Thickness surcharge",
18
+ "description": "Automatic surcharge when thickness exceeds the standard band; amount from rules.json and prices/services.json."
19
+ }
20
+ ]
21
+ }