@shopware/api-client 1.3.0 → 1.4.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.
@@ -1,331 +1,5 @@
1
1
  {
2
2
  "components": {
3
- "Association": [
4
- { "additionalProperties": { "$ref": "#/components/schemas/Association" } }
5
- ],
6
- "CalculatedPrice": [
7
- {
8
- "properties": { "rawTotal": { "type": "number" } },
9
- "required": ["rawTotal"]
10
- },
11
- {
12
- "properties": {
13
- "taxStatus": { "type": "string", "enum": ["net", "tax-free"] }
14
- },
15
- "required": ["taxStatus"]
16
- }
17
- ],
18
- "Cart": [
19
- {
20
- "required": ["price"]
21
- },
22
- {
23
- "properties": {
24
- "errors": {
25
- "type": "object",
26
- "items": "_DELETE_",
27
- "anyOf": [
28
- {
29
- "type": "array",
30
- "items": { "$ref": "#/components/schemas/CartError" }
31
- },
32
- {
33
- "type": "object",
34
- "additionalProperties": {
35
- "type": "object",
36
- "properties": {
37
- "code": {
38
- "type": "number"
39
- },
40
- "key": {
41
- "type": "string"
42
- },
43
- "level": {
44
- "type": "number"
45
- },
46
- "message": {
47
- "type": "string"
48
- },
49
- "messageKey": {
50
- "type": "string"
51
- }
52
- },
53
- "required": ["code", "key", "level", "message", "messageKey"]
54
- }
55
- }
56
- ]
57
- }
58
- }
59
- },
60
- {
61
- "required": ["apiAlias"],
62
- "properties": {
63
- "apiAlias": {
64
- "type": "string",
65
- "enum": ["cart"]
66
- }
67
- }
68
- }
69
- ],
70
- "CartError": [
71
- {
72
- "required": ["key", "level", "message", "messageKey"],
73
- "properties": {
74
- "items": "_DELETE_",
75
- "key": { "type": "string" },
76
- "level": {
77
- "type": "number",
78
- "enum": [0, 10, 20],
79
- "description": "* `0` - notice,\n* `10` - warning,\n* `20` - error"
80
- },
81
- "message": { "type": "string" },
82
- "messageKey": { "type": "string" }
83
- }
84
- }
85
- ],
86
- "CartItems": [
87
- {
88
- "required": ["items"]
89
- }
90
- ],
91
- "Category": [
92
- {
93
- "required": ["breadcrumb"],
94
- "properties": {
95
- "breadcrumb": {
96
- "readOnly": "_DELETE_"
97
- }
98
- }
99
- },
100
- {
101
- "required": ["type"],
102
- "properties": {
103
- "type": {
104
- "type": "string",
105
- "enum": ["page", "link"]
106
- }
107
- }
108
- }
109
- ],
110
- "CmsSection": [
111
- {
112
- "properties": {
113
- "type": {
114
- "type": "string",
115
- "enum": ["default", "sidebar"]
116
- }
117
- }
118
- }
119
- ],
120
- "CmsSlot": [
121
- {
122
- "required": ["apiAlias"],
123
- "properties": {
124
- "apiAlias": {
125
- "type": "string",
126
- "enum": ["cms_slot"]
127
- }
128
- }
129
- },
130
- {
131
- "properties": {
132
- "config": "_DELETE_",
133
- "data": "_DELETE_"
134
- }
135
- }
136
- ],
137
- "Criteria": [
138
- {
139
- "properties": {
140
- "query": {
141
- "type": "string",
142
- "items": "_DELETE_",
143
- "description": "The query string to search for"
144
- }
145
- }
146
- },
147
- {
148
- "properties": {
149
- "associations": {
150
- "$ref": "#/components/schemas/Association",
151
- "type": "_DELETE_",
152
- "items": "_DELETE_"
153
- }
154
- }
155
- }
156
- ],
157
- "Customer": [
158
- {
159
- "properties": {
160
- "accountType": "_DELETE_",
161
- "company": "_DELETE_",
162
- "vatIds": "_DELETE_"
163
- }
164
- },
165
- {
166
- "oneOf": [
167
- {
168
- "required": ["accountType"],
169
- "properties": {
170
- "accountType": {
171
- "type": "string",
172
- "enum": ["private"]
173
- }
174
- }
175
- },
176
- {
177
- "required": ["accountType", "vatIds", "company"],
178
- "properties": {
179
- "accountType": {
180
- "type": "string",
181
- "enum": ["business"]
182
- },
183
- "vatIds": {
184
- "type": "array",
185
- "items": {
186
- "type": "string"
187
- },
188
- "minItems": 1
189
- },
190
- "company": {
191
- "type": "string"
192
- }
193
- }
194
- }
195
- ]
196
- }
197
- ],
198
- "DeliveryInformation": [
199
- {
200
- "required": ["stock"]
201
- }
202
- ],
203
- "ListPrice": {
204
- "type": "object",
205
- "description": "",
206
- "properties": {
207
- "discount": { "type": "number" },
208
- "percentage": { "type": "number" },
209
- "price": { "type": "number" },
210
- "apiAlias": { "type": "string", "enum": ["cart_list_price"] }
211
- },
212
- "required": ["apiAlias"]
213
- },
214
- "LineItem": [
215
- {
216
- "required": ["deliveryInformation"]
217
- },
218
- {
219
- "required": ["payload"]
220
- },
221
- {
222
- "required": ["quantity"]
223
- },
224
- {
225
- "required": ["states"]
226
- }
227
- ],
228
- "Media": [
229
- {
230
- "properties": {
231
- "metaData": {
232
- "type": "object",
233
- "readOnly": "_DELETE_",
234
- "properties": {
235
- "height": {
236
- "type": "integer",
237
- "format": "int64"
238
- },
239
- "width": {
240
- "type": "integer",
241
- "format": "int64"
242
- }
243
- }
244
- }
245
- }
246
- }
247
- ],
248
- "Order": [
249
- {
250
- "required": ["price"],
251
- "properties": {
252
- "price": { "$ref": "#/components/schemas/CalculatedPrice" }
253
- }
254
- }
255
- ],
256
- "OrderRouteResponse": [
257
- {
258
- "properties": {
259
- "orders": "_DELETE_"
260
- }
261
- },
262
- {
263
- "properties": {
264
- "orders": {
265
- "type": "object",
266
- "allOf": [
267
- {
268
- "type": "object",
269
- "required": ["elements"],
270
- "properties": {
271
- "elements": {
272
- "type": "array",
273
- "items": { "$ref": "#/components/schemas/Order" }
274
- }
275
- }
276
- },
277
- { "$ref": "#/components/schemas/EntitySearchResult" }
278
- ]
279
- }
280
- }
281
- }
282
- ],
283
- "Product": [
284
- {
285
- "required": ["translated"]
286
- },
287
- {
288
- "properties": {
289
- "calculatedCheapestPrice": {
290
- "type": "object",
291
- "allOf": "_DELETE_",
292
- "properties": {
293
- "unitPrice": { "type": "number" },
294
- "quantity": { "type": "number" },
295
- "totalPrice": { "type": "number" },
296
- "referencePrice": {
297
- "oneOf": [
298
- { "$ref": "#/components/schemas/ReferencePrice" },
299
- { "type": "null" }
300
- ]
301
- },
302
- "listPrice": {
303
- "oneOf": [
304
- { "$ref": "#/components/schemas/ListPrice" },
305
- { "type": "null" }
306
- ]
307
- },
308
- "regulationPrice": {
309
- "type": "object",
310
- "properties": { "price": { "type": "number" } },
311
- "required": ["price"],
312
- "nullable": true
313
- },
314
- "hasRange": { "type": "boolean" },
315
- "variantId": {
316
- "type": "string",
317
- "format": "",
318
- "nullable": true
319
- },
320
- "apiAlias": {
321
- "type": "string",
322
- "enum": ["calculated_cheapest_price"]
323
- }
324
- }
325
- }
326
- }
327
- }
328
- ],
329
3
  "ProductJsonApi": [
330
4
  {
331
5
  "allOf": [
@@ -356,121 +30,6 @@
356
30
  ]
357
31
  }
358
32
  ],
359
- "ProductMedia": [
360
- {
361
- "properties": {
362
- "thumbnails": {
363
- "$ref": "_DELETE_",
364
- "type": "array",
365
- "items": { "$ref": "#/components/schemas/MediaThumbnail" }
366
- }
367
- }
368
- },
369
- {
370
- "required": ["media"]
371
- }
372
- ],
373
- "ProductReview": [
374
- {
375
- "properties": {
376
- "customerId": {
377
- "type": "string"
378
- }
379
- }
380
- },
381
- {
382
- "properties": {
383
- "externalUser": {
384
- "type": "string"
385
- }
386
- }
387
- }
388
- ],
389
- "PropertyGroupOption": [
390
- {
391
- "required": ["translated"]
392
- }
393
- ],
394
- "ReferencePrice": {
395
- "type": "object",
396
- "properties": {
397
- "purchaseUnit": { "type": "number" },
398
- "referenceUnit": { "type": "number" },
399
- "unitName": { "type": "string" },
400
- "price": { "type": "number" },
401
- "apiAlias": { "type": "string", "enum": ["cart_price_reference"] },
402
- "listPrice": {
403
- "oneOf": [
404
- { "$ref": "#/components/schemas/ListPrice" },
405
- { "type": "null" }
406
- ]
407
- },
408
- "regulationPrice": {
409
- "type": "object",
410
- "properties": {
411
- "price": { "type": "number" },
412
- "apiAlias": {
413
- "type": "string",
414
- "enum": ["cart_regulation_price"]
415
- }
416
- },
417
- "nullable": true
418
- },
419
- "hasRange": { "type": "boolean" },
420
- "variantId": {
421
- "type": "string",
422
- "format": "^[0-9a-f]{32}$",
423
- "nullable": true
424
- }
425
- },
426
- "required": [
427
- "hasRange",
428
- "regulationPrice",
429
- "listPrice",
430
- "calculatedTaxes",
431
- "totalPrice",
432
- "quantity",
433
- "unitName"
434
- ]
435
- },
436
- "SalesChannelContext": [
437
- {
438
- "properties": {
439
- "salesChannel": "_DELETE_"
440
- }
441
- },
442
- {
443
- "required": ["salesChannel"],
444
- "properties": {
445
- "salesChannel": {
446
- "$ref": "#/components/schemas/SalesChannel"
447
- }
448
- }
449
- },
450
- {
451
- "required": ["apiAlias"],
452
- "properties": {
453
- "apiAlias": {
454
- "type": "string",
455
- "enum": ["sales_channel_context"]
456
- }
457
- }
458
- },
459
- {
460
- "required": ["languageInfo"],
461
- "properties": {
462
- "languageInfo": {
463
- "type": "object",
464
- "required": ["localeCode", "name"],
465
- "properties": {
466
- "name": { "type": "string" },
467
- "localeCode": { "type": "string" }
468
- }
469
- }
470
- }
471
- }
472
- ],
473
- "Quote": [{ "required": ["price"] }, { "required": ["stateMachineState"] }],
474
33
  "SwagPaypalVaultToken": {
475
34
  "properties": {
476
35
  "id": {
@@ -481,305 +40,19 @@
481
40
  }
482
41
  }
483
42
  },
484
- "StateMachineState": [
485
- {
486
- "required": ["translated"]
487
- }
488
- ],
489
- "WishlistLoadRouteResponse": [
490
- {
491
- "required": ["products"]
43
+ "LineItem": {
44
+ "required": ["cover"],
45
+ "properties": {
46
+ "cover": {
47
+ "oneOf": [
48
+ { "$ref": "#/components/schemas/Media" },
49
+ { "type": "null" }
50
+ ]
51
+ }
492
52
  }
493
- ]
53
+ }
494
54
  },
495
55
  "paths": {
496
- "/account/address": {
497
- "post": [
498
- {
499
- "requestBody": {
500
- "content": {
501
- "application/json": {
502
- "schema": { "$ref": "#/components/schemas/CustomerAddressBody" }
503
- }
504
- }
505
- }
506
- }
507
- ]
508
- },
509
- "/account/change-profile": {
510
- "post": [
511
- {
512
- "requestBody": {
513
- "content": {
514
- "application/json": {
515
- "schema": {
516
- "properties": {
517
- "accountType": "_DELETE_",
518
- "company": "_DELETE_",
519
- "vatIds": "_DELETE_"
520
- }
521
- }
522
- }
523
- }
524
- }
525
- },
526
- {
527
- "requestBody": {
528
- "content": {
529
- "application/json": {
530
- "schema": {
531
- "oneOf": [
532
- {
533
- "properties": {
534
- "accountType": {
535
- "description": "Type of the customer account. Default value is 'private'.",
536
- "type": "string",
537
- "enum": ["private"],
538
- "default": "private"
539
- },
540
- "company": {
541
- "type": "null"
542
- },
543
- "vatIds": {
544
- "type": "null"
545
- }
546
- }
547
- },
548
- {
549
- "required": ["accountType", "company", "vatIds"],
550
- "properties": {
551
- "accountType": {
552
- "description": "Type of the customer account. Can be `private` or `business`.",
553
- "type": "string",
554
- "enum": ["business"]
555
- },
556
- "company": {
557
- "description": "Company of the customer. Only required when `accountType` is `business`.",
558
- "type": "string"
559
- },
560
- "vatIds": {
561
- "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.",
562
- "type": "array",
563
- "items": {
564
- "type": "string"
565
- },
566
- "minItems": 1
567
- }
568
- }
569
- }
570
- ]
571
- }
572
- }
573
- }
574
- }
575
- },
576
- {
577
- "requestBody": {
578
- "content": {
579
- "application/json": {
580
- "schema": {
581
- "required": "_DELETE_"
582
- }
583
- }
584
- }
585
- }
586
- },
587
- {
588
- "requestBody": {
589
- "content": {
590
- "application/json": {
591
- "schema": {
592
- "required": ["firstName", "lastName"]
593
- }
594
- }
595
- }
596
- }
597
- }
598
- ]
599
- },
600
- "/account/list-address": {
601
- "post": [
602
- {
603
- "responses": {
604
- "200": {
605
- "description": "",
606
- "content": {
607
- "application/json": {
608
- "schema": {
609
- "type": "_DELETE_",
610
- "items": "_DELETE_",
611
- "allOf": [
612
- {
613
- "type": "object",
614
- "required": ["elements"],
615
- "properties": {
616
- "elements": {
617
- "type": "array",
618
- "items": {
619
- "$ref": "#/components/schemas/CustomerAddress"
620
- }
621
- }
622
- }
623
- },
624
- { "$ref": "#/components/schemas/EntitySearchResult" }
625
- ]
626
- }
627
- }
628
- }
629
- }
630
- }
631
- }
632
- ]
633
- },
634
- "/account/register": {
635
- "post": [
636
- {
637
- "requestBody": {
638
- "content": {
639
- "application/json": {
640
- "schema": {
641
- "properties": {
642
- "accountType": "_DELETE_"
643
- }
644
- }
645
- }
646
- }
647
- }
648
- },
649
- {
650
- "requestBody": {
651
- "content": {
652
- "application/json": {
653
- "schema": {
654
- "oneOf": [
655
- {
656
- "properties": {
657
- "accountType": {
658
- "description": "Type of the customer account. Default value is 'private'.",
659
- "type": "string",
660
- "enum": ["private"],
661
- "default": "private"
662
- },
663
- "company": {
664
- "type": "null"
665
- },
666
- "vatIds": {
667
- "type": "null"
668
- }
669
- }
670
- },
671
- {
672
- "required": ["accountType", "company", "vatIds"],
673
- "properties": {
674
- "accountType": {
675
- "description": "Type of the customer account. Can be `private` or `business`.",
676
- "type": "string",
677
- "enum": ["business"]
678
- },
679
- "company": {
680
- "description": "Company of the customer. Only required when `accountType` is `business`.",
681
- "type": "string"
682
- },
683
- "vatIds": {
684
- "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.",
685
- "type": "array",
686
- "items": {
687
- "type": "string"
688
- },
689
- "minItems": 1
690
- }
691
- }
692
- }
693
- ]
694
- }
695
- }
696
- }
697
- }
698
- },
699
- {
700
- "requestBody": {
701
- "content": {
702
- "application/json": {
703
- "schema": {
704
- "required": "_DELETE_"
705
- }
706
- }
707
- }
708
- }
709
- },
710
- {
711
- "requestBody": {
712
- "content": {
713
- "application/json": {
714
- "schema": {
715
- "required": [
716
- "email",
717
- "password",
718
- "firstName",
719
- "lastName",
720
- "acceptedDataProtection",
721
- "storefrontUrl",
722
- "billingAddress"
723
- ]
724
- }
725
- }
726
- }
727
- }
728
- }
729
- ]
730
- },
731
- "/account/shopping-list/line-item/{id}/add": {
732
- "post": {
733
- "requestBody": {
734
- "required": true
735
- }
736
- }
737
- },
738
- "/approval-rule/{id}": {
739
- "patch": {
740
- "requestBody": {
741
- "required": true
742
- }
743
- }
744
- },
745
- "/approval-rule/create": {
746
- "post": {
747
- "requestBody": {
748
- "required": true
749
- }
750
- }
751
- },
752
- "/currency": {
753
- "post": [
754
- {
755
- "responses": {
756
- "200": {
757
- "content": {
758
- "application/json": {
759
- "schema": {
760
- "allOf": "_DELETE_"
761
- }
762
- }
763
- }
764
- }
765
- }
766
- },
767
- {
768
- "responses": {
769
- "200": {
770
- "content": {
771
- "application/json": {
772
- "schema": {
773
- "type": "array",
774
- "items": { "$ref": "#/components/schemas/Currency" }
775
- }
776
- }
777
- }
778
- }
779
- }
780
- }
781
- ]
782
- },
783
56
  "/checkout/cart/line-item": {
784
57
  "post": [
785
58
  {
@@ -856,65 +129,23 @@
856
129
  "content": {
857
130
  "application/json": {
858
131
  "schema": {
859
- "$ref": "_DELETE_",
860
- "type": "object",
861
- "required": ["items"],
862
- "properties": {
863
- "items": {
864
- "type": "array",
865
- "minItems": 1,
866
- "items": {
867
- "type": "object",
868
- "required": ["id", "quantity"],
869
- "properties": {
870
- "id": { "type": "string" },
871
- "quantity": { "type": "number" }
132
+ "$ref": "_DELETE_",
133
+ "type": "object",
134
+ "required": ["items"],
135
+ "properties": {
136
+ "items": {
137
+ "type": "array",
138
+ "minItems": 1,
139
+ "items": {
140
+ "type": "object",
141
+ "required": ["id", "quantity"],
142
+ "properties": {
143
+ "id": { "type": "string" },
144
+ "quantity": { "type": "number" }
145
+ }
872
146
  }
873
147
  }
874
148
  }
875
- }
876
- }
877
- }
878
- }
879
- }
880
- }
881
- ]
882
- },
883
- "/contact-form": {
884
- "post": [
885
- {
886
- "requestBody": {
887
- "content": {
888
- "application/json": {
889
- "schema": {
890
- "required": "_DELETE_"
891
- }
892
- }
893
- }
894
- }
895
- },
896
- {
897
- "requestBody": {
898
- "content": {
899
- "application/json": {
900
- "schema": {
901
- "required": ["email", "subject", "comment"]
902
- }
903
- }
904
- }
905
- }
906
- }
907
- ]
908
- },
909
- "/quote/detail/{id}": {
910
- "post": [
911
- {
912
- "requestBody": {
913
- "required": false,
914
- "content": {
915
- "application/json": {
916
- "schema": {
917
- "allOf": [{ "$ref": "#/components/schemas/Criteria" }]
918
149
  }
919
150
  }
920
151
  }
@@ -922,90 +153,45 @@
922
153
  }
923
154
  ]
924
155
  },
925
- "/quote/{id}/configure": {
156
+ "/payment-method": {
926
157
  "post": {
927
158
  "requestBody": {
928
- "required": true
929
- }
930
- }
931
- },
932
- "/product": {
933
- "post": {
934
- "responses": {
935
- "200": {
936
- "content": {
937
- "application/json": {
938
- "schema": {
939
- "required": ["elements"]
940
- }
159
+ "content": {
160
+ "application/json": {
161
+ "schema": {
162
+ "allOf": [
163
+ {
164
+ "properties": {
165
+ "onlyAvailable": {
166
+ "description": "List only available",
167
+ "type": "boolean"
168
+ }
169
+ },
170
+ "type": "object"
171
+ }
172
+ ]
941
173
  }
942
174
  }
943
175
  }
944
176
  }
945
177
  }
946
178
  },
947
- "/product/{productId}": {
948
- "post": [
949
- {
950
- "parameters": [
951
- {
952
- "name": "sw-include-seo-urls",
953
- "in": "header",
954
- "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
955
- "required": false,
956
- "schema": { "type": "boolean" }
957
- }
958
- ]
959
- }
960
- ]
961
- },
962
- "/product/{productId}/cross-selling": {
963
- "post": [
964
- {
965
- "parameters": [
966
- {
967
- "name": "sw-include-seo-urls",
968
- "in": "header",
969
- "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
970
- "required": false,
971
- "schema": { "type": "boolean" }
972
- }
973
- ]
974
- }
975
- ]
976
- },
977
179
  "/role": {
978
180
  "get": {
979
181
  "requestBody": "_DELETE_"
980
182
  }
981
183
  },
982
- "/search": {
184
+ "/shipping-method": {
983
185
  "post": {
984
186
  "parameters": [
985
187
  {
986
- "name": "sw-include-seo-urls",
987
- "in": "header",
988
- "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
989
- "required": false,
188
+ "name": "onlyAvailable",
189
+ "in": "query",
190
+ "description": "List only available shipping methods. This filters shipping methods methods which can not be used in the actual context because of their availability rule.",
990
191
  "schema": { "type": "boolean" }
991
192
  }
992
193
  ]
993
194
  }
994
- },
995
- "/shipping-method": {
996
- "post": {
997
- "responses": {
998
- "200": {
999
- "content": {
1000
- "application/json": {
1001
- "schema": {
1002
- "required": ["elements"]
1003
- }
1004
- }
1005
- }
1006
- }
1007
- }
1008
- }
1009
195
  }
1010
196
  }
1011
197
  }