@shopware/api-client 1.0.2 → 1.1.0
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 +52 -4
- package/api-types/adminApiSchema.json +30084 -20576
- package/api-types/adminApiSchema.overrides.json +390 -1
- package/api-types/adminApiTypes.d.ts +21977 -15773
- package/api-types/storeApiSchema.json +7133 -3832
- package/api-types/storeApiSchema.overrides.json +14 -146
- package/api-types/storeApiTypes.d.ts +1760 -702
- package/dist/index.cjs +39 -20
- package/dist/index.d.cts +31218 -23954
- package/dist/index.d.mts +31218 -23954
- package/dist/index.d.ts +31218 -23954
- package/dist/index.mjs +39 -20
- package/package.json +5 -4
|
@@ -1,4 +1,393 @@
|
|
|
1
1
|
{
|
|
2
|
-
"components": {
|
|
2
|
+
"components": {
|
|
3
|
+
"DynamicProductListingPageOpenedPayload": {
|
|
4
|
+
"required": ["page"],
|
|
5
|
+
"properties": {
|
|
6
|
+
"page": {
|
|
7
|
+
"type": "integer",
|
|
8
|
+
"description": "Current page position in the pagination"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"Include": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": { "type": "string" }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"Filters": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{ "$ref": "#/components/schemas/SimpleFilter" },
|
|
24
|
+
{ "$ref": "#/components/schemas/EqualsFilter" },
|
|
25
|
+
{ "$ref": "#/components/schemas/MultiNotFilter" },
|
|
26
|
+
{ "$ref": "#/components/schemas/RangeFilter" }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"SimpleFilter": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"type": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["contains", "equalsAny", "prefix", "suffix"]
|
|
36
|
+
},
|
|
37
|
+
"field": { "type": "string" },
|
|
38
|
+
"value": { "type": "string" }
|
|
39
|
+
},
|
|
40
|
+
"required": ["type", "field", "value"]
|
|
41
|
+
},
|
|
42
|
+
"EqualsFilter": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"type": { "type": "string", "enum": ["equals"] },
|
|
46
|
+
"field": { "type": "string" },
|
|
47
|
+
"value": {
|
|
48
|
+
"oneOf": [
|
|
49
|
+
{ "type": "string" },
|
|
50
|
+
{ "type": "number" },
|
|
51
|
+
{ "type": "boolean" },
|
|
52
|
+
{ "type": "null" }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": ["type", "field", "value"]
|
|
57
|
+
},
|
|
58
|
+
"MultiNotFilter": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"type": { "type": "string", "enum": ["multi", "not"] },
|
|
62
|
+
"operator": { "type": "string", "enum": ["AND", "and", "OR", "or"] },
|
|
63
|
+
"queries": { "$ref": "#/components/schemas/Filters" }
|
|
64
|
+
},
|
|
65
|
+
"required": ["type", "operator", "queries"]
|
|
66
|
+
},
|
|
67
|
+
"RangeFilter": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"type": { "type": "string", "enum": ["range"] },
|
|
71
|
+
"field": { "type": "string" },
|
|
72
|
+
"parameters": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"gte": { "type": "number" },
|
|
76
|
+
"gt": { "type": "number" },
|
|
77
|
+
"lte": { "type": "number" },
|
|
78
|
+
"lt": { "type": "number" }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": ["type", "field", "parameters"]
|
|
83
|
+
},
|
|
84
|
+
"Sort": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"field": { "type": "string" },
|
|
88
|
+
"order": { "type": "string", "enum": ["ASC", "DESC"] },
|
|
89
|
+
"naturalSorting": { "type": "boolean" },
|
|
90
|
+
"type": { "type": "string" }
|
|
91
|
+
},
|
|
92
|
+
"required": ["field", "order"]
|
|
93
|
+
},
|
|
94
|
+
"Association": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": { "$ref": "#/components/schemas/Criteria" }
|
|
97
|
+
},
|
|
98
|
+
"Aggregations": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"anyOf": [
|
|
102
|
+
{ "$ref": "#/components/schemas/AggregationMetrics" },
|
|
103
|
+
{
|
|
104
|
+
"title": "AggregationEntity",
|
|
105
|
+
"allOf": [
|
|
106
|
+
{ "$ref": "#/components/schemas/AggregationEntity" },
|
|
107
|
+
{ "$ref": "#/components/schemas/SubAggregations" }
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"title": "AggregationFilter",
|
|
112
|
+
"allOf": [
|
|
113
|
+
{ "$ref": "#/components/schemas/AggregationFilter" },
|
|
114
|
+
{ "$ref": "#/components/schemas/SubAggregations" }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"title": "AggregationTerms",
|
|
119
|
+
"allOf": [
|
|
120
|
+
{ "$ref": "#/components/schemas/AggregationTerms" },
|
|
121
|
+
{ "$ref": "#/components/schemas/SubAggregations" }
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"title": "AggregationHistogram",
|
|
126
|
+
"allOf": [
|
|
127
|
+
{ "$ref": "#/components/schemas/AggregationHistogram" },
|
|
128
|
+
{ "$ref": "#/components/schemas/SubAggregations" }
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"title": "AggregationRange",
|
|
133
|
+
"allOf": [
|
|
134
|
+
{ "$ref": "#/components/schemas/AggregationRange" },
|
|
135
|
+
{ "$ref": "#/components/schemas/SubAggregations" }
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"SubAggregations": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"aggregation": {
|
|
145
|
+
"anyOf": [
|
|
146
|
+
{ "$ref": "#/components/schemas/AggregationMetrics" },
|
|
147
|
+
{ "$ref": "#/components/schemas/AggregationEntity" },
|
|
148
|
+
{ "$ref": "#/components/schemas/AggregationFilter" },
|
|
149
|
+
{ "$ref": "#/components/schemas/AggregationTerms" },
|
|
150
|
+
{ "$ref": "#/components/schemas/AggregationHistogram" },
|
|
151
|
+
{ "$ref": "#/components/schemas/AggregationRange" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"AggregationEntity": {
|
|
157
|
+
"title": "AggregationEntity",
|
|
158
|
+
"type": "object",
|
|
159
|
+
"properties": {
|
|
160
|
+
"name": {
|
|
161
|
+
"description": "Give your aggregation an identifier, so you can find it easier",
|
|
162
|
+
"type": "string"
|
|
163
|
+
},
|
|
164
|
+
"type": {
|
|
165
|
+
"description": "The type of aggregation",
|
|
166
|
+
"type": "string",
|
|
167
|
+
"enum": ["entity"]
|
|
168
|
+
},
|
|
169
|
+
"field": {
|
|
170
|
+
"description": "The field you want to aggregate over.",
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"definition": {
|
|
174
|
+
"description": "The entity definition e.g \"product_manufacturer\".",
|
|
175
|
+
"type": "string"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": ["name", "type", "field", "definition"]
|
|
179
|
+
},
|
|
180
|
+
"AggregationFilter": {
|
|
181
|
+
"title": "AggregationFilter",
|
|
182
|
+
"type": "object",
|
|
183
|
+
"properties": {
|
|
184
|
+
"name": {
|
|
185
|
+
"description": "Give your aggregation an identifier, so you can find it easier",
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"type": {
|
|
189
|
+
"description": "The type of aggregation",
|
|
190
|
+
"type": "string",
|
|
191
|
+
"enum": ["filter"]
|
|
192
|
+
},
|
|
193
|
+
"filter": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": { "$ref": "#/components/schemas/Filters" }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"required": ["name", "type", "filter"]
|
|
199
|
+
},
|
|
200
|
+
"AggregationTerms": {
|
|
201
|
+
"title": "AggregationTerms",
|
|
202
|
+
"type": "object",
|
|
203
|
+
"properties": {
|
|
204
|
+
"name": {
|
|
205
|
+
"description": "Give your aggregation an identifier, so you can find it easier",
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"type": {
|
|
209
|
+
"description": "The type of aggregation",
|
|
210
|
+
"type": "string",
|
|
211
|
+
"enum": ["terms"]
|
|
212
|
+
},
|
|
213
|
+
"field": {
|
|
214
|
+
"description": "The field you want to aggregate over.",
|
|
215
|
+
"type": "string"
|
|
216
|
+
},
|
|
217
|
+
"limit": {
|
|
218
|
+
"description": "The number of terms to return",
|
|
219
|
+
"type": "number"
|
|
220
|
+
},
|
|
221
|
+
"sort": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"description": "Sorting the aggregation result.",
|
|
224
|
+
"items": { "$ref": "#/components/schemas/Sort" }
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"required": ["name", "type", "field"]
|
|
228
|
+
},
|
|
229
|
+
"AggregationHistogram": {
|
|
230
|
+
"title": "AggregationHistogram",
|
|
231
|
+
"type": "object",
|
|
232
|
+
"properties": {
|
|
233
|
+
"name": {
|
|
234
|
+
"description": "Give your aggregation an identifier, so you can find it easier",
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"type": {
|
|
238
|
+
"description": "The type of aggregation",
|
|
239
|
+
"type": "string",
|
|
240
|
+
"enum": ["histogram"]
|
|
241
|
+
},
|
|
242
|
+
"field": {
|
|
243
|
+
"description": "The field you want to aggregate over.",
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
"interval": {
|
|
247
|
+
"description": "The interval of the histogram",
|
|
248
|
+
"type": "number"
|
|
249
|
+
},
|
|
250
|
+
"format": {
|
|
251
|
+
"description": "The format of the histogram",
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
"timeZone": {
|
|
255
|
+
"description": "The timezone of the histogram",
|
|
256
|
+
"type": "string"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": ["name", "type", "field"]
|
|
260
|
+
},
|
|
261
|
+
"AggregationRange": {
|
|
262
|
+
"title": "AggregationRange",
|
|
263
|
+
"description": "For more information, see [Aggregations Reference > Range Aggregation](https://developer.shopware.com/docs/resources/references/core-reference/dal-reference/aggregations-reference.html#range-aggregations)",
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"name": {
|
|
267
|
+
"description": "Give your aggregation an identifier, so you can find it easier",
|
|
268
|
+
"type": "string"
|
|
269
|
+
},
|
|
270
|
+
"type": {
|
|
271
|
+
"description": "The type of aggregation",
|
|
272
|
+
"type": "string",
|
|
273
|
+
"enum": ["range"]
|
|
274
|
+
},
|
|
275
|
+
"field": {
|
|
276
|
+
"description": "The field you want to aggregate over.",
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"ranges": {
|
|
280
|
+
"description": "The ranges of the aggregation",
|
|
281
|
+
"type": "array",
|
|
282
|
+
"items": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"anyOf": [
|
|
285
|
+
{
|
|
286
|
+
"type": "object",
|
|
287
|
+
"title": "From and to",
|
|
288
|
+
"properties": {
|
|
289
|
+
"from": {
|
|
290
|
+
"type": "number",
|
|
291
|
+
"description": "The lower bound of the range"
|
|
292
|
+
},
|
|
293
|
+
"to": {
|
|
294
|
+
"type": "number",
|
|
295
|
+
"description": "The upper bound of the range"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"required": ["from", "to"]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"type": "object",
|
|
302
|
+
"title": "From only",
|
|
303
|
+
"properties": {
|
|
304
|
+
"from": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"description": "The lower bound of the range"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"required": ["from"]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"type": "object",
|
|
313
|
+
"title": "To only",
|
|
314
|
+
"properties": {
|
|
315
|
+
"to": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"description": "The upper bound of the range"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"required": ["to"]
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"required": ["name", "type", "field", "ranges"]
|
|
327
|
+
},
|
|
328
|
+
"AggregationMetrics": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"properties": {
|
|
331
|
+
"name": { "type": "string" },
|
|
332
|
+
"type": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"enum": ["avg", "count", "max", "min", "stats", "sum"]
|
|
335
|
+
},
|
|
336
|
+
"field": { "type": "string" }
|
|
337
|
+
},
|
|
338
|
+
"required": ["name", "type", "field"]
|
|
339
|
+
},
|
|
340
|
+
"Criteria": [
|
|
341
|
+
{
|
|
342
|
+
"properties": {
|
|
343
|
+
"query": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"items": "_DELETE_",
|
|
346
|
+
"description": "The query string to search for"
|
|
347
|
+
},
|
|
348
|
+
"filter": {
|
|
349
|
+
"type": "array",
|
|
350
|
+
"description": "List of filters to restrict the search result. For more information, see [Search Queries > Filter](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#filter)",
|
|
351
|
+
"items": {
|
|
352
|
+
"anyOf": [
|
|
353
|
+
{ "$ref": "#/components/schemas/SimpleFilter" },
|
|
354
|
+
{ "$ref": "#/components/schemas/EqualsFilter" },
|
|
355
|
+
{ "$ref": "#/components/schemas/MultiNotFilter" },
|
|
356
|
+
{ "$ref": "#/components/schemas/RangeFilter" }
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"post-filter": {
|
|
361
|
+
"type": "array",
|
|
362
|
+
"description": "Filters that applied without affecting aggregations. For more information, see [Search Queries > Post Filter](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#post-filter)",
|
|
363
|
+
"items": {
|
|
364
|
+
"anyOf": [
|
|
365
|
+
{ "$ref": "#/components/schemas/SimpleFilter" },
|
|
366
|
+
{ "$ref": "#/components/schemas/EqualsFilter" },
|
|
367
|
+
{ "$ref": "#/components/schemas/MultiNotFilter" },
|
|
368
|
+
{ "$ref": "#/components/schemas/RangeFilter" }
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"aggregations": { "$ref": "#/components/schemas/Aggregations" },
|
|
373
|
+
"ids": {
|
|
374
|
+
"type": "array",
|
|
375
|
+
"description": "List of ids to search for",
|
|
376
|
+
"items": { "type": "string" }
|
|
377
|
+
},
|
|
378
|
+
"includes": { "$ref": "#/components/schemas/Include" }
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"properties": {
|
|
383
|
+
"associations": {
|
|
384
|
+
"$ref": "#/components/schemas/Association",
|
|
385
|
+
"type": "_DELETE_",
|
|
386
|
+
"items": "_DELETE_"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
3
392
|
"paths": {}
|
|
4
393
|
}
|