@asstio-dev/storefront 0.1.0 → 0.2.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 +42 -3
- package/dist/schema.d.ts +700 -0
- package/package.json +1 -1
- package/src/schema.d.ts +700 -0
package/dist/schema.d.ts
CHANGED
|
@@ -4,6 +4,70 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export interface paths {
|
|
7
|
+
"/v1/cart": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
get: operations["GetCart"];
|
|
15
|
+
put?: never;
|
|
16
|
+
post: operations["CreateCart"];
|
|
17
|
+
delete?: never;
|
|
18
|
+
options?: never;
|
|
19
|
+
head?: never;
|
|
20
|
+
patch?: never;
|
|
21
|
+
trace?: never;
|
|
22
|
+
};
|
|
23
|
+
"/v1/cart/lines": {
|
|
24
|
+
parameters: {
|
|
25
|
+
query?: never;
|
|
26
|
+
header?: never;
|
|
27
|
+
path?: never;
|
|
28
|
+
cookie?: never;
|
|
29
|
+
};
|
|
30
|
+
get?: never;
|
|
31
|
+
put?: never;
|
|
32
|
+
post: operations["AddCartLine"];
|
|
33
|
+
delete?: never;
|
|
34
|
+
options?: never;
|
|
35
|
+
head?: never;
|
|
36
|
+
patch?: never;
|
|
37
|
+
trace?: never;
|
|
38
|
+
};
|
|
39
|
+
"/v1/cart/lines/{id}": {
|
|
40
|
+
parameters: {
|
|
41
|
+
query?: never;
|
|
42
|
+
header?: never;
|
|
43
|
+
path?: never;
|
|
44
|
+
cookie?: never;
|
|
45
|
+
};
|
|
46
|
+
get?: never;
|
|
47
|
+
put?: never;
|
|
48
|
+
post?: never;
|
|
49
|
+
delete: operations["RemoveCartLine"];
|
|
50
|
+
options?: never;
|
|
51
|
+
head?: never;
|
|
52
|
+
patch: operations["UpdateCartLine"];
|
|
53
|
+
trace?: never;
|
|
54
|
+
};
|
|
55
|
+
"/v1/cart/market": {
|
|
56
|
+
parameters: {
|
|
57
|
+
query?: never;
|
|
58
|
+
header?: never;
|
|
59
|
+
path?: never;
|
|
60
|
+
cookie?: never;
|
|
61
|
+
};
|
|
62
|
+
get?: never;
|
|
63
|
+
put?: never;
|
|
64
|
+
post: operations["SetCartMarket"];
|
|
65
|
+
delete?: never;
|
|
66
|
+
options?: never;
|
|
67
|
+
head?: never;
|
|
68
|
+
patch?: never;
|
|
69
|
+
trace?: never;
|
|
70
|
+
};
|
|
7
71
|
"/v1/categories": {
|
|
8
72
|
parameters: {
|
|
9
73
|
query?: never;
|
|
@@ -161,11 +225,36 @@ export interface paths {
|
|
|
161
225
|
export type webhooks = Record<string, never>;
|
|
162
226
|
export interface components {
|
|
163
227
|
schemas: {
|
|
228
|
+
AddCartLineRequest: {
|
|
229
|
+
/** Format: int32 */
|
|
230
|
+
quantity: number | string;
|
|
231
|
+
sku: string;
|
|
232
|
+
};
|
|
164
233
|
AppliedFilterDto: {
|
|
165
234
|
facet: string;
|
|
166
235
|
label: string;
|
|
167
236
|
value: string;
|
|
168
237
|
};
|
|
238
|
+
CartDto: {
|
|
239
|
+
currency: string;
|
|
240
|
+
grandTotalInc: string;
|
|
241
|
+
lines: components["schemas"]["CartLineDto"][];
|
|
242
|
+
market: string;
|
|
243
|
+
status: string;
|
|
244
|
+
subtotalInc: string;
|
|
245
|
+
token: string;
|
|
246
|
+
/** Format: int32 */
|
|
247
|
+
version: number | string;
|
|
248
|
+
warnings: components["schemas"]["WarningDto"][];
|
|
249
|
+
};
|
|
250
|
+
CartLineDto: {
|
|
251
|
+
id: string;
|
|
252
|
+
price: components["schemas"]["PriceDto"];
|
|
253
|
+
productId: string;
|
|
254
|
+
/** Format: int32 */
|
|
255
|
+
quantity: number | string;
|
|
256
|
+
sku: string;
|
|
257
|
+
};
|
|
169
258
|
CategoryNodeDto: {
|
|
170
259
|
children: components["schemas"]["CategoryNodeDto"][];
|
|
171
260
|
id: string;
|
|
@@ -311,6 +400,9 @@ export interface components {
|
|
|
311
400
|
description: null | string;
|
|
312
401
|
title: string;
|
|
313
402
|
};
|
|
403
|
+
SetCartMarketRequest: {
|
|
404
|
+
market: string;
|
|
405
|
+
};
|
|
314
406
|
SiteDto: {
|
|
315
407
|
code: string;
|
|
316
408
|
configVersion: string;
|
|
@@ -376,6 +468,10 @@ export interface components {
|
|
|
376
468
|
color: null | string;
|
|
377
469
|
imageUrl: null | string;
|
|
378
470
|
};
|
|
471
|
+
UpdateCartLineRequest: {
|
|
472
|
+
/** Format: int32 */
|
|
473
|
+
quantity: number | string;
|
|
474
|
+
};
|
|
379
475
|
UrlPatternsDto: {
|
|
380
476
|
collection: string;
|
|
381
477
|
product: string;
|
|
@@ -410,6 +506,7 @@ export interface components {
|
|
|
410
506
|
};
|
|
411
507
|
WarningDto: {
|
|
412
508
|
code: string;
|
|
509
|
+
lineId?: null | string;
|
|
413
510
|
message: string;
|
|
414
511
|
redirectTo: null | string;
|
|
415
512
|
};
|
|
@@ -422,6 +519,609 @@ export interface components {
|
|
|
422
519
|
}
|
|
423
520
|
export type $defs = Record<string, never>;
|
|
424
521
|
export interface operations {
|
|
522
|
+
GetCart: {
|
|
523
|
+
parameters: {
|
|
524
|
+
query?: never;
|
|
525
|
+
header: {
|
|
526
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
527
|
+
"X-Site-Key": string;
|
|
528
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
529
|
+
"X-Market"?: string;
|
|
530
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
531
|
+
"Accept-Language"?: string;
|
|
532
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
533
|
+
"X-Cart-Token": string;
|
|
534
|
+
};
|
|
535
|
+
path?: never;
|
|
536
|
+
cookie?: never;
|
|
537
|
+
};
|
|
538
|
+
requestBody?: never;
|
|
539
|
+
responses: {
|
|
540
|
+
/** @description OK */
|
|
541
|
+
200: {
|
|
542
|
+
headers: {
|
|
543
|
+
[name: string]: unknown;
|
|
544
|
+
};
|
|
545
|
+
content: {
|
|
546
|
+
"application/json": components["schemas"]["CartDto"];
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing). */
|
|
550
|
+
400: {
|
|
551
|
+
headers: {
|
|
552
|
+
[name: string]: unknown;
|
|
553
|
+
};
|
|
554
|
+
content: {
|
|
555
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
559
|
+
401: {
|
|
560
|
+
headers: {
|
|
561
|
+
[name: string]: unknown;
|
|
562
|
+
};
|
|
563
|
+
content: {
|
|
564
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
568
|
+
403: {
|
|
569
|
+
headers: {
|
|
570
|
+
[name: string]: unknown;
|
|
571
|
+
};
|
|
572
|
+
content: {
|
|
573
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
577
|
+
404: {
|
|
578
|
+
headers: {
|
|
579
|
+
[name: string]: unknown;
|
|
580
|
+
};
|
|
581
|
+
content: {
|
|
582
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
586
|
+
410: {
|
|
587
|
+
headers: {
|
|
588
|
+
[name: string]: unknown;
|
|
589
|
+
};
|
|
590
|
+
content: {
|
|
591
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
595
|
+
429: {
|
|
596
|
+
headers: {
|
|
597
|
+
[name: string]: unknown;
|
|
598
|
+
};
|
|
599
|
+
content: {
|
|
600
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
604
|
+
503: {
|
|
605
|
+
headers: {
|
|
606
|
+
[name: string]: unknown;
|
|
607
|
+
};
|
|
608
|
+
content: {
|
|
609
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
CreateCart: {
|
|
615
|
+
parameters: {
|
|
616
|
+
query?: never;
|
|
617
|
+
header: {
|
|
618
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
619
|
+
"X-Site-Key": string;
|
|
620
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
621
|
+
"X-Market"?: string;
|
|
622
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
623
|
+
"Accept-Language"?: string;
|
|
624
|
+
};
|
|
625
|
+
path?: never;
|
|
626
|
+
cookie?: never;
|
|
627
|
+
};
|
|
628
|
+
requestBody?: never;
|
|
629
|
+
responses: {
|
|
630
|
+
/** @description OK */
|
|
631
|
+
200: {
|
|
632
|
+
headers: {
|
|
633
|
+
[name: string]: unknown;
|
|
634
|
+
};
|
|
635
|
+
content: {
|
|
636
|
+
"application/json": components["schemas"]["CartDto"];
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
/** @description problem+json. MARKET_UNKNOWN (no such market on this site) or INVALID_PAGE. */
|
|
640
|
+
400: {
|
|
641
|
+
headers: {
|
|
642
|
+
[name: string]: unknown;
|
|
643
|
+
};
|
|
644
|
+
content: {
|
|
645
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
649
|
+
401: {
|
|
650
|
+
headers: {
|
|
651
|
+
[name: string]: unknown;
|
|
652
|
+
};
|
|
653
|
+
content: {
|
|
654
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
658
|
+
403: {
|
|
659
|
+
headers: {
|
|
660
|
+
[name: string]: unknown;
|
|
661
|
+
};
|
|
662
|
+
content: {
|
|
663
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
667
|
+
404: {
|
|
668
|
+
headers: {
|
|
669
|
+
[name: string]: unknown;
|
|
670
|
+
};
|
|
671
|
+
content: {
|
|
672
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
676
|
+
429: {
|
|
677
|
+
headers: {
|
|
678
|
+
[name: string]: unknown;
|
|
679
|
+
};
|
|
680
|
+
content: {
|
|
681
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
685
|
+
503: {
|
|
686
|
+
headers: {
|
|
687
|
+
[name: string]: unknown;
|
|
688
|
+
};
|
|
689
|
+
content: {
|
|
690
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
AddCartLine: {
|
|
696
|
+
parameters: {
|
|
697
|
+
query?: never;
|
|
698
|
+
header: {
|
|
699
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
700
|
+
"X-Site-Key": string;
|
|
701
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
702
|
+
"X-Market"?: string;
|
|
703
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
704
|
+
"Accept-Language"?: string;
|
|
705
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
706
|
+
"X-Cart-Token": string;
|
|
707
|
+
/** @description An opaque client-chosen key. Replaying the exact same add with the same key is a no-op (the line's quantity is not added twice); a different key, or none, tops the existing line up like any other add. */
|
|
708
|
+
"Idempotency-Key"?: string;
|
|
709
|
+
/** @description The cart's current version, as returned in the ETag header. When present and stale, the mutation is rejected with 409 CART_CONFLICT instead of being applied last-write-wins. */
|
|
710
|
+
"If-Match"?: string;
|
|
711
|
+
};
|
|
712
|
+
path?: never;
|
|
713
|
+
cookie?: never;
|
|
714
|
+
};
|
|
715
|
+
requestBody: {
|
|
716
|
+
content: {
|
|
717
|
+
"application/json": components["schemas"]["AddCartLineRequest"];
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
responses: {
|
|
721
|
+
/** @description OK */
|
|
722
|
+
200: {
|
|
723
|
+
headers: {
|
|
724
|
+
[name: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
content: {
|
|
727
|
+
"application/json": components["schemas"]["CartDto"];
|
|
728
|
+
};
|
|
729
|
+
};
|
|
730
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing), INVALID_QUANTITY, or CART_FULL. */
|
|
731
|
+
400: {
|
|
732
|
+
headers: {
|
|
733
|
+
[name: string]: unknown;
|
|
734
|
+
};
|
|
735
|
+
content: {
|
|
736
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
740
|
+
401: {
|
|
741
|
+
headers: {
|
|
742
|
+
[name: string]: unknown;
|
|
743
|
+
};
|
|
744
|
+
content: {
|
|
745
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
749
|
+
403: {
|
|
750
|
+
headers: {
|
|
751
|
+
[name: string]: unknown;
|
|
752
|
+
};
|
|
753
|
+
content: {
|
|
754
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
758
|
+
404: {
|
|
759
|
+
headers: {
|
|
760
|
+
[name: string]: unknown;
|
|
761
|
+
};
|
|
762
|
+
content: {
|
|
763
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match), STOCK_INSUFFICIENT, or PRODUCT_GONE. */
|
|
767
|
+
409: {
|
|
768
|
+
headers: {
|
|
769
|
+
[name: string]: unknown;
|
|
770
|
+
};
|
|
771
|
+
content: {
|
|
772
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
776
|
+
410: {
|
|
777
|
+
headers: {
|
|
778
|
+
[name: string]: unknown;
|
|
779
|
+
};
|
|
780
|
+
content: {
|
|
781
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
785
|
+
429: {
|
|
786
|
+
headers: {
|
|
787
|
+
[name: string]: unknown;
|
|
788
|
+
};
|
|
789
|
+
content: {
|
|
790
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
794
|
+
503: {
|
|
795
|
+
headers: {
|
|
796
|
+
[name: string]: unknown;
|
|
797
|
+
};
|
|
798
|
+
content: {
|
|
799
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
800
|
+
};
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
};
|
|
804
|
+
RemoveCartLine: {
|
|
805
|
+
parameters: {
|
|
806
|
+
query?: never;
|
|
807
|
+
header: {
|
|
808
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
809
|
+
"X-Site-Key": string;
|
|
810
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
811
|
+
"X-Market"?: string;
|
|
812
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
813
|
+
"Accept-Language"?: string;
|
|
814
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
815
|
+
"X-Cart-Token": string;
|
|
816
|
+
/** @description The cart's current version, as returned in the ETag header. When present and stale, the mutation is rejected with 409 CART_CONFLICT instead of being applied last-write-wins. */
|
|
817
|
+
"If-Match"?: string;
|
|
818
|
+
};
|
|
819
|
+
path: {
|
|
820
|
+
id: string;
|
|
821
|
+
};
|
|
822
|
+
cookie?: never;
|
|
823
|
+
};
|
|
824
|
+
requestBody?: never;
|
|
825
|
+
responses: {
|
|
826
|
+
/** @description OK */
|
|
827
|
+
200: {
|
|
828
|
+
headers: {
|
|
829
|
+
[name: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
content: {
|
|
832
|
+
"application/json": components["schemas"]["CartDto"];
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing). */
|
|
836
|
+
400: {
|
|
837
|
+
headers: {
|
|
838
|
+
[name: string]: unknown;
|
|
839
|
+
};
|
|
840
|
+
content: {
|
|
841
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
845
|
+
401: {
|
|
846
|
+
headers: {
|
|
847
|
+
[name: string]: unknown;
|
|
848
|
+
};
|
|
849
|
+
content: {
|
|
850
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
854
|
+
403: {
|
|
855
|
+
headers: {
|
|
856
|
+
[name: string]: unknown;
|
|
857
|
+
};
|
|
858
|
+
content: {
|
|
859
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
863
|
+
404: {
|
|
864
|
+
headers: {
|
|
865
|
+
[name: string]: unknown;
|
|
866
|
+
};
|
|
867
|
+
content: {
|
|
868
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match). */
|
|
872
|
+
409: {
|
|
873
|
+
headers: {
|
|
874
|
+
[name: string]: unknown;
|
|
875
|
+
};
|
|
876
|
+
content: {
|
|
877
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
881
|
+
410: {
|
|
882
|
+
headers: {
|
|
883
|
+
[name: string]: unknown;
|
|
884
|
+
};
|
|
885
|
+
content: {
|
|
886
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
890
|
+
429: {
|
|
891
|
+
headers: {
|
|
892
|
+
[name: string]: unknown;
|
|
893
|
+
};
|
|
894
|
+
content: {
|
|
895
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
899
|
+
503: {
|
|
900
|
+
headers: {
|
|
901
|
+
[name: string]: unknown;
|
|
902
|
+
};
|
|
903
|
+
content: {
|
|
904
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
UpdateCartLine: {
|
|
910
|
+
parameters: {
|
|
911
|
+
query?: never;
|
|
912
|
+
header: {
|
|
913
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
914
|
+
"X-Site-Key": string;
|
|
915
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
916
|
+
"X-Market"?: string;
|
|
917
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
918
|
+
"Accept-Language"?: string;
|
|
919
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
920
|
+
"X-Cart-Token": string;
|
|
921
|
+
/** @description The cart's current version, as returned in the ETag header. When present and stale, the mutation is rejected with 409 CART_CONFLICT instead of being applied last-write-wins. */
|
|
922
|
+
"If-Match"?: string;
|
|
923
|
+
};
|
|
924
|
+
path: {
|
|
925
|
+
id: string;
|
|
926
|
+
};
|
|
927
|
+
cookie?: never;
|
|
928
|
+
};
|
|
929
|
+
requestBody: {
|
|
930
|
+
content: {
|
|
931
|
+
"application/json": components["schemas"]["UpdateCartLineRequest"];
|
|
932
|
+
};
|
|
933
|
+
};
|
|
934
|
+
responses: {
|
|
935
|
+
/** @description OK */
|
|
936
|
+
200: {
|
|
937
|
+
headers: {
|
|
938
|
+
[name: string]: unknown;
|
|
939
|
+
};
|
|
940
|
+
content: {
|
|
941
|
+
"application/json": components["schemas"]["CartDto"];
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing), or INVALID_QUANTITY. */
|
|
945
|
+
400: {
|
|
946
|
+
headers: {
|
|
947
|
+
[name: string]: unknown;
|
|
948
|
+
};
|
|
949
|
+
content: {
|
|
950
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
951
|
+
};
|
|
952
|
+
};
|
|
953
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
954
|
+
401: {
|
|
955
|
+
headers: {
|
|
956
|
+
[name: string]: unknown;
|
|
957
|
+
};
|
|
958
|
+
content: {
|
|
959
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
963
|
+
403: {
|
|
964
|
+
headers: {
|
|
965
|
+
[name: string]: unknown;
|
|
966
|
+
};
|
|
967
|
+
content: {
|
|
968
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
972
|
+
404: {
|
|
973
|
+
headers: {
|
|
974
|
+
[name: string]: unknown;
|
|
975
|
+
};
|
|
976
|
+
content: {
|
|
977
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match), STOCK_INSUFFICIENT, or PRODUCT_GONE. */
|
|
981
|
+
409: {
|
|
982
|
+
headers: {
|
|
983
|
+
[name: string]: unknown;
|
|
984
|
+
};
|
|
985
|
+
content: {
|
|
986
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
990
|
+
410: {
|
|
991
|
+
headers: {
|
|
992
|
+
[name: string]: unknown;
|
|
993
|
+
};
|
|
994
|
+
content: {
|
|
995
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
999
|
+
429: {
|
|
1000
|
+
headers: {
|
|
1001
|
+
[name: string]: unknown;
|
|
1002
|
+
};
|
|
1003
|
+
content: {
|
|
1004
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
1007
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
1008
|
+
503: {
|
|
1009
|
+
headers: {
|
|
1010
|
+
[name: string]: unknown;
|
|
1011
|
+
};
|
|
1012
|
+
content: {
|
|
1013
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
SetCartMarket: {
|
|
1019
|
+
parameters: {
|
|
1020
|
+
query?: never;
|
|
1021
|
+
header: {
|
|
1022
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
1023
|
+
"X-Site-Key": string;
|
|
1024
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
1025
|
+
"X-Market"?: string;
|
|
1026
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
1027
|
+
"Accept-Language"?: string;
|
|
1028
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
1029
|
+
"X-Cart-Token": string;
|
|
1030
|
+
/** @description The cart's current version, as returned in the ETag header. When present and stale, the mutation is rejected with 409 CART_CONFLICT instead of being applied last-write-wins. */
|
|
1031
|
+
"If-Match"?: string;
|
|
1032
|
+
};
|
|
1033
|
+
path?: never;
|
|
1034
|
+
cookie?: never;
|
|
1035
|
+
};
|
|
1036
|
+
requestBody: {
|
|
1037
|
+
content: {
|
|
1038
|
+
"application/json": components["schemas"]["SetCartMarketRequest"];
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
responses: {
|
|
1042
|
+
/** @description OK */
|
|
1043
|
+
200: {
|
|
1044
|
+
headers: {
|
|
1045
|
+
[name: string]: unknown;
|
|
1046
|
+
};
|
|
1047
|
+
content: {
|
|
1048
|
+
"application/json": components["schemas"]["CartDto"];
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
1051
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing), or MARKET_UNKNOWN. */
|
|
1052
|
+
400: {
|
|
1053
|
+
headers: {
|
|
1054
|
+
[name: string]: unknown;
|
|
1055
|
+
};
|
|
1056
|
+
content: {
|
|
1057
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
1061
|
+
401: {
|
|
1062
|
+
headers: {
|
|
1063
|
+
[name: string]: unknown;
|
|
1064
|
+
};
|
|
1065
|
+
content: {
|
|
1066
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
1070
|
+
403: {
|
|
1071
|
+
headers: {
|
|
1072
|
+
[name: string]: unknown;
|
|
1073
|
+
};
|
|
1074
|
+
content: {
|
|
1075
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
1079
|
+
404: {
|
|
1080
|
+
headers: {
|
|
1081
|
+
[name: string]: unknown;
|
|
1082
|
+
};
|
|
1083
|
+
content: {
|
|
1084
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match). */
|
|
1088
|
+
409: {
|
|
1089
|
+
headers: {
|
|
1090
|
+
[name: string]: unknown;
|
|
1091
|
+
};
|
|
1092
|
+
content: {
|
|
1093
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
1096
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
1097
|
+
410: {
|
|
1098
|
+
headers: {
|
|
1099
|
+
[name: string]: unknown;
|
|
1100
|
+
};
|
|
1101
|
+
content: {
|
|
1102
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
1106
|
+
429: {
|
|
1107
|
+
headers: {
|
|
1108
|
+
[name: string]: unknown;
|
|
1109
|
+
};
|
|
1110
|
+
content: {
|
|
1111
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
1115
|
+
503: {
|
|
1116
|
+
headers: {
|
|
1117
|
+
[name: string]: unknown;
|
|
1118
|
+
};
|
|
1119
|
+
content: {
|
|
1120
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
425
1125
|
GetCategories: {
|
|
426
1126
|
parameters: {
|
|
427
1127
|
query?: never;
|