@gruncellka/porto-data 0.3.1 → 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 +85 -1
  2. package/LICENSE +199 -5
  3. package/README.md +52 -39
  4. package/index.d.ts +35 -18
  5. package/index.js +2 -1
  6. package/package.json +23 -9
  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
@@ -1,61 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/services.schema.json",
3
- "file_type": "services",
4
- "services": [
5
- {
6
- "id": "registered_mail",
7
- "name": "Einschreiben",
8
- "description": "Tracking with proof of mailing",
9
- "features": [
10
- "tracking_number",
11
- "proof_of_mailing",
12
- "delivery_confirmation"
13
- ]
14
- },
15
- {
16
- "id": "registered_mail_mailbox",
17
- "name": "Einschreiben Einwurf",
18
- "description": "Registered delivery into mailbox",
19
- "features": [
20
- "tracking_number",
21
- "mailbox_delivery",
22
- "photo_proof_delivery"
23
- ]
24
- },
25
- {
26
- "id": "registered_mail_return_receipt",
27
- "name": "Einschreiben R\u00fcckschein",
28
- "description": "Registered mail with signature and return receipt",
29
- "features": [
30
- "tracking_number",
31
- "recipient_signature",
32
- "return_receipt",
33
- "proof_of_delivery"
34
- ]
35
- },
36
- {
37
- "id": "registered_mail_personal",
38
- "name": "Einschreiben Eigenh\u00e4ndig",
39
- "description": "Personal delivery to recipient only",
40
- "features": [
41
- "tracking_number",
42
- "personal_delivery",
43
- "id_verification",
44
- "delivery_confirmation"
45
- ]
46
- },
47
- {
48
- "id": "registered_mail_personal_return_receipt",
49
- "name": "Einschreiben Eigenh\u00e4ndig R\u00fcckschein",
50
- "name_en": "Registered Mail (Personal) with Return Receipt",
51
- "description": "Personal delivery with signature and return receipt",
52
- "features": [
53
- "tracking_number",
54
- "personal_delivery",
55
- "id_verification",
56
- "recipient_signature",
57
- "return_receipt"
58
- ]
59
- }
60
- ]
61
- }
@@ -1,54 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/weight_tiers.schema.json",
3
- "file_type": "weight_tiers",
4
- "unit": {
5
- "weight": "g"
6
- },
7
- "weight_tiers": {
8
- "W0020": {
9
- "min": 0,
10
- "max": 20,
11
- "label": "Up to 20g"
12
- },
13
- "W0050": {
14
- "min": 21,
15
- "max": 50,
16
- "label": "21g to 50g"
17
- },
18
- "W0500": {
19
- "min": 51,
20
- "max": 500,
21
- "label": "51g to 500g"
22
- },
23
- "W1000": {
24
- "min": 501,
25
- "max": 1000,
26
- "label": "501g to 1000g"
27
- },
28
- "W2000": {
29
- "min": 1001,
30
- "max": 2000,
31
- "label": "1001g to 2000g"
32
- },
33
- "W5000": {
34
- "min": 2001,
35
- "max": 5000,
36
- "label": "Up to 5000g"
37
- },
38
- "W10000": {
39
- "min": 5001,
40
- "max": 10000,
41
- "label": "Up to 10000g"
42
- },
43
- "W20000": {
44
- "min": 10001,
45
- "max": 20000,
46
- "label": "Up to 20000g"
47
- },
48
- "W31500": {
49
- "min": 20001,
50
- "max": 31500,
51
- "label": "Up to 31500g"
52
- }
53
- }
54
- }
@@ -1,230 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/zones.schema.json",
3
- "file_type": "zones",
4
- "unit": {
5
- "country_code": "ISO 3166-1 alpha-2"
6
- },
7
- "zones": [
8
- {
9
- "id": "domestic",
10
- "name": "Deutschland",
11
- "description": "Germany",
12
- "country_codes": [
13
- "DE"
14
- ]
15
- },
16
- {
17
- "id": "zone_1_eu",
18
- "name": "Zone 1 - EU",
19
- "description": "European Union member countries",
20
- "country_codes": [
21
- "AT",
22
- "BE",
23
- "BG",
24
- "HR",
25
- "CY",
26
- "CZ",
27
- "DK",
28
- "EE",
29
- "FI",
30
- "FR",
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 EU (CH, NO, GB, etc.)",
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
- }
@@ -1,223 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://raw.githubusercontent.com/gruncellka/porto-data/refs/heads/main/porto_data/schemas/data_links.schema.json",
4
- "title": "Data Links Schema",
5
- "description": "Schema for data file dependencies and relationships",
6
- "type": "object",
7
- "required": [
8
- "file_type",
9
- "schema_version",
10
- "unit",
11
- "dependencies",
12
- "links",
13
- "lookup_rules",
14
- "global_settings"
15
- ],
16
- "properties": {
17
- "$schema": {
18
- "type": "string",
19
- "format": "uri",
20
- "description": "JSON Schema URI reference"
21
- },
22
- "file_type": {
23
- "type": "string",
24
- "const": "data_links",
25
- "description": "File type identifier"
26
- },
27
- "schema_version": {
28
- "type": "string",
29
- "const": "1.0",
30
- "description": "Schema version"
31
- },
32
- "unit": {
33
- "type": "object",
34
- "required": [
35
- "weight",
36
- "dimension",
37
- "price",
38
- "currency"
39
- ],
40
- "properties": {
41
- "weight": {
42
- "type": "string",
43
- "const": "g"
44
- },
45
- "dimension": {
46
- "type": "string",
47
- "const": "mm"
48
- },
49
- "price": {
50
- "type": "string",
51
- "const": "cents"
52
- },
53
- "currency": {
54
- "type": "string",
55
- "const": "EUR"
56
- }
57
- },
58
- "additionalProperties": false
59
- },
60
- "dependencies": {
61
- "type": "object",
62
- "patternProperties": {
63
- "^[a-z_]+$": {
64
- "type": "object",
65
- "required": [
66
- "file",
67
- "depends_on",
68
- "description"
69
- ],
70
- "properties": {
71
- "file": {
72
- "type": "string",
73
- "pattern": "^[a-z_]+\\.json$",
74
- "description": "Data file name"
75
- },
76
- "depends_on": {
77
- "type": "array",
78
- "items": {
79
- "type": "string",
80
- "pattern": "^[a-z_]+\\.json$"
81
- },
82
- "description": "List of dependent files"
83
- },
84
- "description": {
85
- "type": "string",
86
- "minLength": 1,
87
- "description": "Dependency description"
88
- }
89
- },
90
- "additionalProperties": false
91
- }
92
- },
93
- "additionalProperties": false
94
- },
95
- "links": {
96
- "type": "object",
97
- "patternProperties": {
98
- "^[a-z_]+$": {
99
- "type": "object",
100
- "required": [
101
- "zones",
102
- "weight_tiers"
103
- ],
104
- "properties": {
105
- "zones": {
106
- "type": "array",
107
- "minItems": 1,
108
- "items": {
109
- "type": "string",
110
- "enum": [
111
- "domestic",
112
- "zone_1_eu",
113
- "zone_2_europe",
114
- "world"
115
- ]
116
- },
117
- "description": "Available zones for this product"
118
- },
119
- "weight_tiers": {
120
- "type": "array",
121
- "minItems": 1,
122
- "items": {
123
- "type": "string",
124
- "pattern": "^W[0-9]+$"
125
- },
126
- "description": "Available weight tiers for this product"
127
- }
128
- },
129
- "additionalProperties": false
130
- }
131
- },
132
- "additionalProperties": false
133
- },
134
- "lookup_rules": {
135
- "type": "object",
136
- "required": [
137
- "price_lookup",
138
- "service_lookup",
139
- "weight_resolution",
140
- "zone_validation"
141
- ],
142
- "properties": {
143
- "price_lookup": {
144
- "type": "string",
145
- "minLength": 1,
146
- "description": "Price lookup rule description"
147
- },
148
- "service_lookup": {
149
- "type": "string",
150
- "minLength": 1,
151
- "description": "Service lookup rule description"
152
- },
153
- "weight_resolution": {
154
- "type": "string",
155
- "minLength": 1,
156
- "description": "Weight resolution rule description"
157
- },
158
- "zone_validation": {
159
- "type": "string",
160
- "minLength": 1,
161
- "description": "Zone validation rule description"
162
- }
163
- },
164
- "additionalProperties": false
165
- },
166
- "global_settings": {
167
- "type": "object",
168
- "required": [
169
- "price_source",
170
- "lookup_method",
171
- "available_services"
172
- ],
173
- "properties": {
174
- "price_source": {
175
- "type": "string",
176
- "pattern": "^[a-z_]+\\.json$",
177
- "description": "Source file for prices"
178
- },
179
- "lookup_method": {
180
- "type": "object",
181
- "required": [
182
- "file",
183
- "array",
184
- "match",
185
- "description"
186
- ],
187
- "properties": {
188
- "file": {
189
- "type": "string",
190
- "pattern": "^[a-z_]+\\.json$"
191
- },
192
- "array": {
193
- "type": "string",
194
- "minLength": 1
195
- },
196
- "match": {
197
- "type": "object",
198
- "additionalProperties": {
199
- "type": "string"
200
- }
201
- },
202
- "description": {
203
- "type": "string",
204
- "minLength": 1
205
- }
206
- },
207
- "additionalProperties": false
208
- },
209
- "available_services": {
210
- "type": "array",
211
- "minItems": 1,
212
- "items": {
213
- "type": "string",
214
- "pattern": "^[a-z_]+$"
215
- },
216
- "description": "List of available service IDs"
217
- }
218
- },
219
- "additionalProperties": false
220
- }
221
- },
222
- "additionalProperties": false
223
- }