@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.
- package/CHANGELOG.md +85 -1
- package/LICENSE +199 -5
- package/README.md +52 -39
- package/index.d.ts +35 -18
- package/index.js +2 -1
- package/package.json +23 -9
- package/porto_data/formats/envelopes.json +120 -0
- package/porto_data/formats/layouts.json +288 -0
- package/porto_data/mappings.json +65 -10
- package/porto_data/metadata.json +662 -125
- package/porto_data/policy/jurisdictions.json +839 -0
- package/porto_data/policy/markets.json +75 -0
- package/porto_data/policy/restrictions.json +668 -0
- package/porto_data/providers/deutschepost/features.json +42 -0
- package/porto_data/providers/deutschepost/graph.json +203 -0
- package/porto_data/providers/deutschepost/limits.json +17 -0
- package/porto_data/providers/deutschepost/marks.json +71 -0
- package/porto_data/providers/deutschepost/prices/products.json +239 -0
- package/porto_data/providers/deutschepost/prices/services.json +51 -0
- package/porto_data/providers/deutschepost/products.json +197 -0
- package/porto_data/providers/deutschepost/services.json +88 -0
- package/porto_data/providers/deutschepost/weights.json +46 -0
- package/porto_data/providers/deutschepost/zones.json +231 -0
- package/porto_data/providers/laposte/features.json +42 -0
- package/porto_data/providers/laposte/graph.json +234 -0
- package/porto_data/providers/laposte/limits.json +17 -0
- package/porto_data/providers/laposte/marks.json +39 -0
- package/porto_data/providers/laposte/prices/products.json +947 -0
- package/porto_data/providers/laposte/prices/services.json +41 -0
- package/porto_data/providers/laposte/products.json +276 -0
- package/porto_data/providers/laposte/services.json +63 -0
- package/porto_data/providers/laposte/weights.json +38 -0
- package/porto_data/providers/laposte/zones.json +230 -0
- package/porto_data/providers/swisspost/features.json +21 -0
- package/porto_data/providers/swisspost/graph.json +212 -0
- package/porto_data/providers/swisspost/limits.json +17 -0
- package/porto_data/providers/swisspost/marks.json +41 -0
- package/porto_data/providers/swisspost/prices/products.json +347 -0
- package/porto_data/providers/swisspost/prices/services.json +31 -0
- package/porto_data/providers/swisspost/products.json +193 -0
- package/porto_data/providers/swisspost/rules.json +25 -0
- package/porto_data/providers/swisspost/services.json +40 -0
- package/porto_data/providers/swisspost/weights.json +38 -0
- package/porto_data/providers/swisspost/zones.json +223 -0
- package/porto_data/providers/ukrposhta/features.json +28 -0
- package/porto_data/providers/ukrposhta/graph.json +148 -0
- package/porto_data/providers/ukrposhta/limits.json +17 -0
- package/porto_data/providers/ukrposhta/marks.json +25 -0
- package/porto_data/providers/ukrposhta/prices/products.json +123 -0
- package/porto_data/providers/ukrposhta/prices/services.json +42 -0
- package/porto_data/providers/ukrposhta/products.json +74 -0
- package/porto_data/providers/ukrposhta/services.json +40 -0
- package/porto_data/providers/ukrposhta/weights.json +26 -0
- package/porto_data/providers/ukrposhta/zones.json +226 -0
- package/porto_data/providers.json +37 -0
- package/porto_data/schemas/envelopes.schema.json +120 -0
- package/porto_data/schemas/features.schema.json +66 -55
- package/porto_data/schemas/graph.schema.json +189 -0
- package/porto_data/schemas/jurisdictions.schema.json +116 -0
- package/porto_data/schemas/layouts.schema.json +156 -0
- package/porto_data/schemas/limits.schema.json +253 -0
- package/porto_data/schemas/mappings.schema.json +73 -0
- package/porto_data/schemas/markets.schema.json +186 -0
- package/porto_data/schemas/marks.schema.json +127 -0
- package/porto_data/schemas/metadata.schema.json +183 -0
- package/porto_data/schemas/porto_ids.schema.json +45 -0
- package/porto_data/schemas/product_prices.schema.json +126 -0
- package/porto_data/schemas/products.schema.json +338 -110
- package/porto_data/schemas/providers.schema.json +71 -0
- package/porto_data/schemas/restrictions.schema.json +175 -355
- package/porto_data/schemas/rules.schema.json +104 -0
- package/porto_data/schemas/service_prices.schema.json +116 -0
- package/porto_data/schemas/services.schema.json +113 -70
- package/porto_data/schemas/weights.schema.json +70 -0
- package/porto_data/schemas/zones.schema.json +78 -72
- package/porto_data/data/data_links.json +0 -148
- package/porto_data/data/dimensions.json +0 -158
- package/porto_data/data/features.json +0 -66
- package/porto_data/data/prices.json +0 -242
- package/porto_data/data/products.json +0 -84
- package/porto_data/data/restrictions.json +0 -795
- package/porto_data/data/services.json +0 -61
- package/porto_data/data/weight_tiers.json +0 -54
- package/porto_data/data/zones.json +0 -230
- package/porto_data/schemas/data_links.schema.json +0 -223
- package/porto_data/schemas/dimensions.schema.json +0 -215
- package/porto_data/schemas/prices.schema.json +0 -180
- package/porto_data/schemas/weight_tiers.schema.json +0 -70
|
@@ -1,215 +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/dimensions.schema.json",
|
|
4
|
-
"title": "Dimensions Schema",
|
|
5
|
-
"description": "Schema for envelope dimension definitions",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"file_type",
|
|
9
|
-
"unit",
|
|
10
|
-
"dimensions"
|
|
11
|
-
],
|
|
12
|
-
"properties": {
|
|
13
|
-
"$schema": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"format": "uri",
|
|
16
|
-
"description": "JSON Schema URI reference"
|
|
17
|
-
},
|
|
18
|
-
"file_type": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"const": "dimensions",
|
|
21
|
-
"description": "File type identifier"
|
|
22
|
-
},
|
|
23
|
-
"unit": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": [
|
|
26
|
-
"dimension"
|
|
27
|
-
],
|
|
28
|
-
"properties": {
|
|
29
|
-
"dimension": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"const": "mm"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"additionalProperties": false
|
|
35
|
-
},
|
|
36
|
-
"dimensions": {
|
|
37
|
-
"type": "array",
|
|
38
|
-
"minItems": 1,
|
|
39
|
-
"items": {
|
|
40
|
-
"type": "object",
|
|
41
|
-
"required": [
|
|
42
|
-
"id",
|
|
43
|
-
"label",
|
|
44
|
-
"standard",
|
|
45
|
-
"size",
|
|
46
|
-
"print_area",
|
|
47
|
-
"stamp_area",
|
|
48
|
-
"orientation",
|
|
49
|
-
"weight_tier"
|
|
50
|
-
],
|
|
51
|
-
"properties": {
|
|
52
|
-
"id": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"pattern": "^[A-Z0-9]+$",
|
|
55
|
-
"description": "Dimension ID"
|
|
56
|
-
},
|
|
57
|
-
"label": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"minLength": 1,
|
|
60
|
-
"description": "Human-readable dimension label"
|
|
61
|
-
},
|
|
62
|
-
"standard": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"minLength": 1,
|
|
65
|
-
"description": "Standard specification"
|
|
66
|
-
},
|
|
67
|
-
"size": {
|
|
68
|
-
"type": "object",
|
|
69
|
-
"required": [
|
|
70
|
-
"width",
|
|
71
|
-
"height"
|
|
72
|
-
],
|
|
73
|
-
"properties": {
|
|
74
|
-
"width": {
|
|
75
|
-
"type": "integer",
|
|
76
|
-
"minimum": 1,
|
|
77
|
-
"description": "Width in millimeters"
|
|
78
|
-
},
|
|
79
|
-
"height": {
|
|
80
|
-
"type": "integer",
|
|
81
|
-
"minimum": 1,
|
|
82
|
-
"description": "Height in millimeters"
|
|
83
|
-
},
|
|
84
|
-
"thickness": {
|
|
85
|
-
"type": "integer",
|
|
86
|
-
"minimum": 0,
|
|
87
|
-
"description": "Thickness in millimeters"
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"additionalProperties": false
|
|
91
|
-
},
|
|
92
|
-
"print_area": {
|
|
93
|
-
"type": "object",
|
|
94
|
-
"required": [
|
|
95
|
-
"x",
|
|
96
|
-
"y",
|
|
97
|
-
"width",
|
|
98
|
-
"height"
|
|
99
|
-
],
|
|
100
|
-
"properties": {
|
|
101
|
-
"x": {
|
|
102
|
-
"type": "integer",
|
|
103
|
-
"minimum": 0,
|
|
104
|
-
"description": "X coordinate in millimeters"
|
|
105
|
-
},
|
|
106
|
-
"y": {
|
|
107
|
-
"type": "integer",
|
|
108
|
-
"minimum": 0,
|
|
109
|
-
"description": "Y coordinate in millimeters"
|
|
110
|
-
},
|
|
111
|
-
"width": {
|
|
112
|
-
"type": "integer",
|
|
113
|
-
"minimum": 1,
|
|
114
|
-
"description": "Width in millimeters"
|
|
115
|
-
},
|
|
116
|
-
"height": {
|
|
117
|
-
"type": "integer",
|
|
118
|
-
"minimum": 1,
|
|
119
|
-
"description": "Height in millimeters"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"additionalProperties": false
|
|
123
|
-
},
|
|
124
|
-
"stamp_area": {
|
|
125
|
-
"type": "object",
|
|
126
|
-
"required": [
|
|
127
|
-
"x",
|
|
128
|
-
"y",
|
|
129
|
-
"width",
|
|
130
|
-
"height"
|
|
131
|
-
],
|
|
132
|
-
"properties": {
|
|
133
|
-
"x": {
|
|
134
|
-
"type": "integer",
|
|
135
|
-
"minimum": 0,
|
|
136
|
-
"description": "X coordinate in millimeters"
|
|
137
|
-
},
|
|
138
|
-
"y": {
|
|
139
|
-
"type": "integer",
|
|
140
|
-
"minimum": 0,
|
|
141
|
-
"description": "Y coordinate in millimeters"
|
|
142
|
-
},
|
|
143
|
-
"width": {
|
|
144
|
-
"type": "integer",
|
|
145
|
-
"minimum": 1,
|
|
146
|
-
"description": "Width in millimeters"
|
|
147
|
-
},
|
|
148
|
-
"height": {
|
|
149
|
-
"type": "integer",
|
|
150
|
-
"minimum": 1,
|
|
151
|
-
"description": "Height in millimeters"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"additionalProperties": false
|
|
155
|
-
},
|
|
156
|
-
"window_supported": {
|
|
157
|
-
"type": "boolean",
|
|
158
|
-
"description": "Whether window is supported"
|
|
159
|
-
},
|
|
160
|
-
"supports_window": {
|
|
161
|
-
"type": "boolean",
|
|
162
|
-
"description": "Whether window is supported (alternative field)"
|
|
163
|
-
},
|
|
164
|
-
"window_area": {
|
|
165
|
-
"type": "object",
|
|
166
|
-
"required": [
|
|
167
|
-
"x",
|
|
168
|
-
"y",
|
|
169
|
-
"width",
|
|
170
|
-
"height"
|
|
171
|
-
],
|
|
172
|
-
"properties": {
|
|
173
|
-
"x": {
|
|
174
|
-
"type": "integer",
|
|
175
|
-
"minimum": 0,
|
|
176
|
-
"description": "X coordinate in millimeters"
|
|
177
|
-
},
|
|
178
|
-
"y": {
|
|
179
|
-
"type": "integer",
|
|
180
|
-
"minimum": 0,
|
|
181
|
-
"description": "Y coordinate in millimeters"
|
|
182
|
-
},
|
|
183
|
-
"width": {
|
|
184
|
-
"type": "integer",
|
|
185
|
-
"minimum": 1,
|
|
186
|
-
"description": "Width in millimeters"
|
|
187
|
-
},
|
|
188
|
-
"height": {
|
|
189
|
-
"type": "integer",
|
|
190
|
-
"minimum": 1,
|
|
191
|
-
"description": "Height in millimeters"
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
"additionalProperties": false
|
|
195
|
-
},
|
|
196
|
-
"orientation": {
|
|
197
|
-
"type": "string",
|
|
198
|
-
"enum": [
|
|
199
|
-
"landscape",
|
|
200
|
-
"portrait"
|
|
201
|
-
],
|
|
202
|
-
"description": "Envelope orientation"
|
|
203
|
-
},
|
|
204
|
-
"weight_tier": {
|
|
205
|
-
"type": "string",
|
|
206
|
-
"pattern": "^W[0-9]+$",
|
|
207
|
-
"description": "Weight tier ID reference"
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
"additionalProperties": false
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
"additionalProperties": false
|
|
215
|
-
}
|
|
@@ -1,180 +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/prices.schema.json",
|
|
4
|
-
"title": "Prices Schema",
|
|
5
|
-
"description": "Schema for pricing information",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"file_type",
|
|
9
|
-
"unit",
|
|
10
|
-
"prices"
|
|
11
|
-
],
|
|
12
|
-
"properties": {
|
|
13
|
-
"$schema": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"format": "uri",
|
|
16
|
-
"description": "JSON Schema URI reference"
|
|
17
|
-
},
|
|
18
|
-
"file_type": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"const": "prices",
|
|
21
|
-
"description": "File type identifier"
|
|
22
|
-
},
|
|
23
|
-
"unit": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": [
|
|
26
|
-
"price",
|
|
27
|
-
"currency"
|
|
28
|
-
],
|
|
29
|
-
"properties": {
|
|
30
|
-
"price": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"const": "cents"
|
|
33
|
-
},
|
|
34
|
-
"currency": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"const": "EUR"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"additionalProperties": false
|
|
40
|
-
},
|
|
41
|
-
"prices": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"required": [
|
|
44
|
-
"product_prices",
|
|
45
|
-
"service_prices"
|
|
46
|
-
],
|
|
47
|
-
"properties": {
|
|
48
|
-
"product_prices": {
|
|
49
|
-
"type": "array",
|
|
50
|
-
"minItems": 1,
|
|
51
|
-
"items": {
|
|
52
|
-
"type": "object",
|
|
53
|
-
"required": [
|
|
54
|
-
"product_id",
|
|
55
|
-
"zone",
|
|
56
|
-
"weight_tier",
|
|
57
|
-
"price"
|
|
58
|
-
],
|
|
59
|
-
"properties": {
|
|
60
|
-
"product_id": {
|
|
61
|
-
"type": "string",
|
|
62
|
-
"pattern": "^[a-z_]+$",
|
|
63
|
-
"description": "Product ID reference"
|
|
64
|
-
},
|
|
65
|
-
"zone": {
|
|
66
|
-
"type": "string",
|
|
67
|
-
"enum": [
|
|
68
|
-
"domestic",
|
|
69
|
-
"zone_1_eu",
|
|
70
|
-
"zone_2_europe",
|
|
71
|
-
"world"
|
|
72
|
-
],
|
|
73
|
-
"description": "Zone ID reference"
|
|
74
|
-
},
|
|
75
|
-
"weight_tier": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"pattern": "^W[0-9]+$",
|
|
78
|
-
"description": "Weight tier ID reference"
|
|
79
|
-
},
|
|
80
|
-
"price": {
|
|
81
|
-
"type": "array",
|
|
82
|
-
"minItems": 1,
|
|
83
|
-
"description": "Array of price entries with effective dates",
|
|
84
|
-
"items": {
|
|
85
|
-
"type": "object",
|
|
86
|
-
"required": [
|
|
87
|
-
"price",
|
|
88
|
-
"effective_from"
|
|
89
|
-
],
|
|
90
|
-
"properties": {
|
|
91
|
-
"price": {
|
|
92
|
-
"type": "integer",
|
|
93
|
-
"minimum": 0,
|
|
94
|
-
"description": "Price in cents"
|
|
95
|
-
},
|
|
96
|
-
"effective_from": {
|
|
97
|
-
"type": [
|
|
98
|
-
"string",
|
|
99
|
-
"null"
|
|
100
|
-
],
|
|
101
|
-
"format": "date",
|
|
102
|
-
"description": "Price effective start date"
|
|
103
|
-
},
|
|
104
|
-
"effective_to": {
|
|
105
|
-
"type": [
|
|
106
|
-
"string",
|
|
107
|
-
"null"
|
|
108
|
-
],
|
|
109
|
-
"format": "date",
|
|
110
|
-
"description": "Price effective end date"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"additionalProperties": false
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
"additionalProperties": false
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"service_prices": {
|
|
121
|
-
"type": "array",
|
|
122
|
-
"minItems": 1,
|
|
123
|
-
"items": {
|
|
124
|
-
"type": "object",
|
|
125
|
-
"required": [
|
|
126
|
-
"service_id",
|
|
127
|
-
"price"
|
|
128
|
-
],
|
|
129
|
-
"properties": {
|
|
130
|
-
"service_id": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"pattern": "^[a-z0-9_]+$",
|
|
133
|
-
"description": "Service ID reference"
|
|
134
|
-
},
|
|
135
|
-
"price": {
|
|
136
|
-
"type": "array",
|
|
137
|
-
"minItems": 1,
|
|
138
|
-
"description": "Array of price entries with effective dates",
|
|
139
|
-
"items": {
|
|
140
|
-
"type": "object",
|
|
141
|
-
"required": [
|
|
142
|
-
"price",
|
|
143
|
-
"effective_from"
|
|
144
|
-
],
|
|
145
|
-
"properties": {
|
|
146
|
-
"price": {
|
|
147
|
-
"type": "integer",
|
|
148
|
-
"minimum": 0,
|
|
149
|
-
"description": "Price in cents"
|
|
150
|
-
},
|
|
151
|
-
"effective_from": {
|
|
152
|
-
"type": [
|
|
153
|
-
"string",
|
|
154
|
-
"null"
|
|
155
|
-
],
|
|
156
|
-
"format": "date",
|
|
157
|
-
"description": "Price effective start date"
|
|
158
|
-
},
|
|
159
|
-
"effective_to": {
|
|
160
|
-
"type": [
|
|
161
|
-
"string",
|
|
162
|
-
"null"
|
|
163
|
-
],
|
|
164
|
-
"format": "date",
|
|
165
|
-
"description": "Price effective end date"
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
"additionalProperties": false
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
"additionalProperties": false
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
"additionalProperties": false
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
"additionalProperties": false
|
|
180
|
-
}
|
|
@@ -1,70 +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/weight_tiers.schema.json",
|
|
4
|
-
"title": "Weight Tiers Schema",
|
|
5
|
-
"description": "Schema for weight tier definitions",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"file_type",
|
|
9
|
-
"unit",
|
|
10
|
-
"weight_tiers"
|
|
11
|
-
],
|
|
12
|
-
"properties": {
|
|
13
|
-
"$schema": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"format": "uri",
|
|
16
|
-
"description": "JSON Schema URI reference"
|
|
17
|
-
},
|
|
18
|
-
"file_type": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"const": "weight_tiers",
|
|
21
|
-
"description": "File type identifier"
|
|
22
|
-
},
|
|
23
|
-
"unit": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"required": [
|
|
26
|
-
"weight"
|
|
27
|
-
],
|
|
28
|
-
"properties": {
|
|
29
|
-
"weight": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"const": "g"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"additionalProperties": false
|
|
35
|
-
},
|
|
36
|
-
"weight_tiers": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"patternProperties": {
|
|
39
|
-
"^W[0-9]+$": {
|
|
40
|
-
"type": "object",
|
|
41
|
-
"required": [
|
|
42
|
-
"min",
|
|
43
|
-
"max",
|
|
44
|
-
"label"
|
|
45
|
-
],
|
|
46
|
-
"properties": {
|
|
47
|
-
"min": {
|
|
48
|
-
"type": "integer",
|
|
49
|
-
"minimum": 0,
|
|
50
|
-
"description": "Minimum weight in grams"
|
|
51
|
-
},
|
|
52
|
-
"max": {
|
|
53
|
-
"type": "integer",
|
|
54
|
-
"minimum": 1,
|
|
55
|
-
"description": "Maximum weight in grams"
|
|
56
|
-
},
|
|
57
|
-
"label": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"minLength": 1,
|
|
60
|
-
"description": "Human-readable weight tier label"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"additionalProperties": false
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"additionalProperties": false
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"additionalProperties": false
|
|
70
|
-
}
|