@shopware/api-client 1.2.1 → 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,108 +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
- "Quote": [{ "required": ["price"] }, { "required": ["stateMachineState"] }],
461
33
  "SwagPaypalVaultToken": {
462
34
  "properties": {
463
35
  "id": {
@@ -468,305 +40,19 @@
468
40
  }
469
41
  }
470
42
  },
471
- "StateMachineState": [
472
- {
473
- "required": ["translated"]
474
- }
475
- ],
476
- "WishlistLoadRouteResponse": [
477
- {
478
- "required": ["products"]
43
+ "LineItem": {
44
+ "required": ["cover"],
45
+ "properties": {
46
+ "cover": {
47
+ "oneOf": [
48
+ { "$ref": "#/components/schemas/Media" },
49
+ { "type": "null" }
50
+ ]
51
+ }
479
52
  }
480
- ]
53
+ }
481
54
  },
482
55
  "paths": {
483
- "/account/address": {
484
- "post": [
485
- {
486
- "requestBody": {
487
- "content": {
488
- "application/json": {
489
- "schema": { "$ref": "#/components/schemas/CustomerAddressBody" }
490
- }
491
- }
492
- }
493
- }
494
- ]
495
- },
496
- "/account/change-profile": {
497
- "post": [
498
- {
499
- "requestBody": {
500
- "content": {
501
- "application/json": {
502
- "schema": {
503
- "properties": {
504
- "accountType": "_DELETE_",
505
- "company": "_DELETE_",
506
- "vatIds": "_DELETE_"
507
- }
508
- }
509
- }
510
- }
511
- }
512
- },
513
- {
514
- "requestBody": {
515
- "content": {
516
- "application/json": {
517
- "schema": {
518
- "oneOf": [
519
- {
520
- "properties": {
521
- "accountType": {
522
- "description": "Type of the customer account. Default value is 'private'.",
523
- "type": "string",
524
- "enum": ["private"],
525
- "default": "private"
526
- },
527
- "company": {
528
- "type": "null"
529
- },
530
- "vatIds": {
531
- "type": "null"
532
- }
533
- }
534
- },
535
- {
536
- "required": ["accountType", "company", "vatIds"],
537
- "properties": {
538
- "accountType": {
539
- "description": "Type of the customer account. Can be `private` or `business`.",
540
- "type": "string",
541
- "enum": ["business"]
542
- },
543
- "company": {
544
- "description": "Company of the customer. Only required when `accountType` is `business`.",
545
- "type": "string"
546
- },
547
- "vatIds": {
548
- "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.",
549
- "type": "array",
550
- "items": {
551
- "type": "string"
552
- },
553
- "minItems": 1
554
- }
555
- }
556
- }
557
- ]
558
- }
559
- }
560
- }
561
- }
562
- },
563
- {
564
- "requestBody": {
565
- "content": {
566
- "application/json": {
567
- "schema": {
568
- "required": "_DELETE_"
569
- }
570
- }
571
- }
572
- }
573
- },
574
- {
575
- "requestBody": {
576
- "content": {
577
- "application/json": {
578
- "schema": {
579
- "required": ["firstName", "lastName"]
580
- }
581
- }
582
- }
583
- }
584
- }
585
- ]
586
- },
587
- "/account/list-address": {
588
- "post": [
589
- {
590
- "responses": {
591
- "200": {
592
- "description": "",
593
- "content": {
594
- "application/json": {
595
- "schema": {
596
- "type": "_DELETE_",
597
- "items": "_DELETE_",
598
- "allOf": [
599
- {
600
- "type": "object",
601
- "required": ["elements"],
602
- "properties": {
603
- "elements": {
604
- "type": "array",
605
- "items": {
606
- "$ref": "#/components/schemas/CustomerAddress"
607
- }
608
- }
609
- }
610
- },
611
- { "$ref": "#/components/schemas/EntitySearchResult" }
612
- ]
613
- }
614
- }
615
- }
616
- }
617
- }
618
- }
619
- ]
620
- },
621
- "/account/register": {
622
- "post": [
623
- {
624
- "requestBody": {
625
- "content": {
626
- "application/json": {
627
- "schema": {
628
- "properties": {
629
- "accountType": "_DELETE_"
630
- }
631
- }
632
- }
633
- }
634
- }
635
- },
636
- {
637
- "requestBody": {
638
- "content": {
639
- "application/json": {
640
- "schema": {
641
- "oneOf": [
642
- {
643
- "properties": {
644
- "accountType": {
645
- "description": "Type of the customer account. Default value is 'private'.",
646
- "type": "string",
647
- "enum": ["private"],
648
- "default": "private"
649
- },
650
- "company": {
651
- "type": "null"
652
- },
653
- "vatIds": {
654
- "type": "null"
655
- }
656
- }
657
- },
658
- {
659
- "required": ["accountType", "company", "vatIds"],
660
- "properties": {
661
- "accountType": {
662
- "description": "Type of the customer account. Can be `private` or `business`.",
663
- "type": "string",
664
- "enum": ["business"]
665
- },
666
- "company": {
667
- "description": "Company of the customer. Only required when `accountType` is `business`.",
668
- "type": "string"
669
- },
670
- "vatIds": {
671
- "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.",
672
- "type": "array",
673
- "items": {
674
- "type": "string"
675
- },
676
- "minItems": 1
677
- }
678
- }
679
- }
680
- ]
681
- }
682
- }
683
- }
684
- }
685
- },
686
- {
687
- "requestBody": {
688
- "content": {
689
- "application/json": {
690
- "schema": {
691
- "required": "_DELETE_"
692
- }
693
- }
694
- }
695
- }
696
- },
697
- {
698
- "requestBody": {
699
- "content": {
700
- "application/json": {
701
- "schema": {
702
- "required": [
703
- "email",
704
- "password",
705
- "firstName",
706
- "lastName",
707
- "acceptedDataProtection",
708
- "storefrontUrl",
709
- "billingAddress"
710
- ]
711
- }
712
- }
713
- }
714
- }
715
- }
716
- ]
717
- },
718
- "/account/shopping-list/line-item/{id}/add": {
719
- "post": {
720
- "requestBody": {
721
- "required": true
722
- }
723
- }
724
- },
725
- "/approval-rule/{id}": {
726
- "patch": {
727
- "requestBody": {
728
- "required": true
729
- }
730
- }
731
- },
732
- "/approval-rule/create": {
733
- "post": {
734
- "requestBody": {
735
- "required": true
736
- }
737
- }
738
- },
739
- "/currency": {
740
- "post": [
741
- {
742
- "responses": {
743
- "200": {
744
- "content": {
745
- "application/json": {
746
- "schema": {
747
- "allOf": "_DELETE_"
748
- }
749
- }
750
- }
751
- }
752
- }
753
- },
754
- {
755
- "responses": {
756
- "200": {
757
- "content": {
758
- "application/json": {
759
- "schema": {
760
- "type": "array",
761
- "items": { "$ref": "#/components/schemas/Currency" }
762
- }
763
- }
764
- }
765
- }
766
- }
767
- }
768
- ]
769
- },
770
56
  "/checkout/cart/line-item": {
771
57
  "post": [
772
58
  {
@@ -843,92 +129,23 @@
843
129
  "content": {
844
130
  "application/json": {
845
131
  "schema": {
846
- "$ref": "_DELETE_",
847
- "type": "object",
848
- "required": ["items"],
849
- "properties": {
850
- "items": {
851
- "type": "array",
852
- "minItems": 1,
853
- "items": {
854
- "type": "object",
855
- "required": ["id", "quantity"],
856
- "properties": {
857
- "id": { "type": "string" },
858
- "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
+ }
859
146
  }
860
147
  }
861
148
  }
862
- }
863
- }
864
- }
865
- }
866
- }
867
- }
868
- ]
869
- },
870
- "/contact-form": {
871
- "post": [
872
- {
873
- "requestBody": {
874
- "content": {
875
- "application/json": {
876
- "schema": {
877
- "required": "_DELETE_"
878
- }
879
- }
880
- }
881
- }
882
- },
883
- {
884
- "requestBody": {
885
- "content": {
886
- "application/json": {
887
- "schema": {
888
- "required": ["email", "subject", "comment"]
889
- }
890
- }
891
- }
892
- }
893
- }
894
- ]
895
- },
896
- "/employee/{id}": {
897
- "get": {
898
- "operationId": "readB2bEmployee",
899
- "parameters": [
900
- {
901
- "name": "id",
902
- "in": "path",
903
- "description": "Identifier of the employee to be read",
904
- "required": true,
905
- "schema": {
906
- "type": "string",
907
- "format": "uuid"
908
- }
909
- }
910
- ],
911
- "responses": {
912
- "200": {
913
- "description": "Employee",
914
- "content": {
915
- "application/json": {
916
- "schema": { "$ref": "#/components/schemas/B2bEmployee" }
917
- }
918
- }
919
- }
920
- }
921
- }
922
- },
923
- "/quote/detail/{id}": {
924
- "post": [
925
- {
926
- "requestBody": {
927
- "required": false,
928
- "content": {
929
- "application/json": {
930
- "schema": {
931
- "allOf": [{ "$ref": "#/components/schemas/Criteria" }]
932
149
  }
933
150
  }
934
151
  }
@@ -936,90 +153,45 @@
936
153
  }
937
154
  ]
938
155
  },
939
- "/quote/{id}/configure": {
156
+ "/payment-method": {
940
157
  "post": {
941
158
  "requestBody": {
942
- "required": true
943
- }
944
- }
945
- },
946
- "/product": {
947
- "post": {
948
- "responses": {
949
- "200": {
950
- "content": {
951
- "application/json": {
952
- "schema": {
953
- "required": ["elements"]
954
- }
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
+ ]
955
173
  }
956
174
  }
957
175
  }
958
176
  }
959
177
  }
960
178
  },
961
- "/product/{productId}": {
962
- "post": [
963
- {
964
- "parameters": [
965
- {
966
- "name": "sw-include-seo-urls",
967
- "in": "header",
968
- "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
969
- "required": false,
970
- "schema": { "type": "boolean" }
971
- }
972
- ]
973
- }
974
- ]
975
- },
976
- "/product/{productId}/cross-selling": {
977
- "post": [
978
- {
979
- "parameters": [
980
- {
981
- "name": "sw-include-seo-urls",
982
- "in": "header",
983
- "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
984
- "required": false,
985
- "schema": { "type": "boolean" }
986
- }
987
- ]
988
- }
989
- ]
990
- },
991
179
  "/role": {
992
180
  "get": {
993
181
  "requestBody": "_DELETE_"
994
182
  }
995
183
  },
996
- "/search": {
184
+ "/shipping-method": {
997
185
  "post": {
998
186
  "parameters": [
999
187
  {
1000
- "name": "sw-include-seo-urls",
1001
- "in": "header",
1002
- "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item",
1003
- "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.",
1004
191
  "schema": { "type": "boolean" }
1005
192
  }
1006
193
  ]
1007
194
  }
1008
- },
1009
- "/shipping-method": {
1010
- "post": {
1011
- "responses": {
1012
- "200": {
1013
- "content": {
1014
- "application/json": {
1015
- "schema": {
1016
- "required": ["elements"]
1017
- }
1018
- }
1019
- }
1020
- }
1021
- }
1022
- }
1023
195
  }
1024
196
  }
1025
197
  }