@asstio-dev/storefront 0.1.0 → 0.3.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 +62 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/media.d.ts +51 -0
- package/dist/media.js +114 -0
- package/dist/schema.d.ts +772 -1
- package/package.json +7 -4
- package/src/schema.d.ts +772 -1
package/src/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,37 @@ 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
|
+
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
253
|
+
price: components["schemas"]["PriceDto"];
|
|
254
|
+
productId: string;
|
|
255
|
+
/** Format: int32 */
|
|
256
|
+
quantity: number | string;
|
|
257
|
+
sku: string;
|
|
258
|
+
};
|
|
169
259
|
CategoryNodeDto: {
|
|
170
260
|
children: components["schemas"]["CategoryNodeDto"][];
|
|
171
261
|
id: string;
|
|
@@ -250,6 +340,68 @@ export interface components {
|
|
|
250
340
|
language: string;
|
|
251
341
|
urlTemplate: string;
|
|
252
342
|
};
|
|
343
|
+
MediaDescriptorDto: {
|
|
344
|
+
alt: {
|
|
345
|
+
[key: string]: string;
|
|
346
|
+
};
|
|
347
|
+
/** @description Passed through opaque, exactly as Purchase wrote it (spec 2026-09-18 §3); no fixed shape. */
|
|
348
|
+
attributes: null | {
|
|
349
|
+
[key: string]: unknown;
|
|
350
|
+
};
|
|
351
|
+
bg: null | string;
|
|
352
|
+
blurhash: null | string;
|
|
353
|
+
/** Format: int64 */
|
|
354
|
+
bytes: number | null | string;
|
|
355
|
+
caption: null | {
|
|
356
|
+
[key: string]: string;
|
|
357
|
+
};
|
|
358
|
+
color: null | string;
|
|
359
|
+
/** Format: int32 */
|
|
360
|
+
duration: number | null | string;
|
|
361
|
+
filename: null | string;
|
|
362
|
+
formats: string[];
|
|
363
|
+
/** Format: int32 */
|
|
364
|
+
h: number | null | string;
|
|
365
|
+
id: string;
|
|
366
|
+
kind: string;
|
|
367
|
+
/** Format: int32 */
|
|
368
|
+
order: number | string;
|
|
369
|
+
/** Format: int32 */
|
|
370
|
+
pages: number | null | string;
|
|
371
|
+
poster: null | components["schemas"]["MediaPosterDto"];
|
|
372
|
+
/** Format: int32 */
|
|
373
|
+
recipe: number | string;
|
|
374
|
+
role: string;
|
|
375
|
+
variants: components["schemas"]["MediaVideoVariantDto"][] | null;
|
|
376
|
+
view: null | string;
|
|
377
|
+
/** Format: int32 */
|
|
378
|
+
w: number | null | string;
|
|
379
|
+
widths: (number | string)[];
|
|
380
|
+
};
|
|
381
|
+
MediaDto: {
|
|
382
|
+
baseUrl: string;
|
|
383
|
+
templates: components["schemas"]["MediaTemplatesDto"];
|
|
384
|
+
};
|
|
385
|
+
MediaPosterDto: {
|
|
386
|
+
formats: string[];
|
|
387
|
+
widths: (number | string)[];
|
|
388
|
+
};
|
|
389
|
+
MediaTemplatesDto: {
|
|
390
|
+
file: string;
|
|
391
|
+
image: string;
|
|
392
|
+
poster: string;
|
|
393
|
+
video: string;
|
|
394
|
+
};
|
|
395
|
+
MediaVideoVariantDto: {
|
|
396
|
+
/** Format: int64 */
|
|
397
|
+
bytes: number | string;
|
|
398
|
+
format: string;
|
|
399
|
+
/** Format: int32 */
|
|
400
|
+
h: number | string;
|
|
401
|
+
name: string;
|
|
402
|
+
/** Format: int32 */
|
|
403
|
+
w: number | string;
|
|
404
|
+
};
|
|
253
405
|
OptionDto: {
|
|
254
406
|
name: string;
|
|
255
407
|
values: string[];
|
|
@@ -264,6 +416,7 @@ export interface components {
|
|
|
264
416
|
ProductCardDto: {
|
|
265
417
|
collections: string[];
|
|
266
418
|
id: string;
|
|
419
|
+
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
267
420
|
inStock: boolean;
|
|
268
421
|
name: string;
|
|
269
422
|
price: null | components["schemas"]["PriceDto"];
|
|
@@ -280,7 +433,10 @@ export interface components {
|
|
|
280
433
|
};
|
|
281
434
|
categories: components["schemas"]["CategoryRefDto"][];
|
|
282
435
|
collections: components["schemas"]["CollectionRefDto"][];
|
|
436
|
+
files: components["schemas"]["MediaDescriptorDto"][];
|
|
283
437
|
id: string;
|
|
438
|
+
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
439
|
+
images: components["schemas"]["MediaDescriptorDto"][];
|
|
284
440
|
matchedVariantId: null | string;
|
|
285
441
|
name: string;
|
|
286
442
|
options: components["schemas"]["OptionDto"][];
|
|
@@ -311,11 +467,15 @@ export interface components {
|
|
|
311
467
|
description: null | string;
|
|
312
468
|
title: string;
|
|
313
469
|
};
|
|
470
|
+
SetCartMarketRequest: {
|
|
471
|
+
market: string;
|
|
472
|
+
};
|
|
314
473
|
SiteDto: {
|
|
315
474
|
code: string;
|
|
316
475
|
configVersion: string;
|
|
317
476
|
defaultMarket: string;
|
|
318
477
|
markets: components["schemas"]["MarketDto"][];
|
|
478
|
+
media: components["schemas"]["MediaDto"];
|
|
319
479
|
name: string;
|
|
320
480
|
preview: boolean;
|
|
321
481
|
urlPatterns: components["schemas"]["UrlPatternsDto"];
|
|
@@ -374,14 +534,21 @@ export interface components {
|
|
|
374
534
|
};
|
|
375
535
|
SwatchDto: {
|
|
376
536
|
color: null | string;
|
|
377
|
-
|
|
537
|
+
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
538
|
+
};
|
|
539
|
+
UpdateCartLineRequest: {
|
|
540
|
+
/** Format: int32 */
|
|
541
|
+
quantity: number | string;
|
|
378
542
|
};
|
|
379
543
|
UrlPatternsDto: {
|
|
380
544
|
collection: string;
|
|
381
545
|
product: string;
|
|
382
546
|
};
|
|
383
547
|
VariantDto: {
|
|
548
|
+
hasOwnImages: boolean;
|
|
384
549
|
id: string;
|
|
550
|
+
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
551
|
+
images: components["schemas"]["MediaDescriptorDto"][];
|
|
385
552
|
inStock: boolean;
|
|
386
553
|
price: null | components["schemas"]["PriceDto"];
|
|
387
554
|
selectedOptions: {
|
|
@@ -410,6 +577,7 @@ export interface components {
|
|
|
410
577
|
};
|
|
411
578
|
WarningDto: {
|
|
412
579
|
code: string;
|
|
580
|
+
lineId?: null | string;
|
|
413
581
|
message: string;
|
|
414
582
|
redirectTo: null | string;
|
|
415
583
|
};
|
|
@@ -422,6 +590,609 @@ export interface components {
|
|
|
422
590
|
}
|
|
423
591
|
export type $defs = Record<string, never>;
|
|
424
592
|
export interface operations {
|
|
593
|
+
GetCart: {
|
|
594
|
+
parameters: {
|
|
595
|
+
query?: never;
|
|
596
|
+
header: {
|
|
597
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
598
|
+
"X-Site-Key": string;
|
|
599
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
600
|
+
"X-Market"?: string;
|
|
601
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
602
|
+
"Accept-Language"?: string;
|
|
603
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
604
|
+
"X-Cart-Token": string;
|
|
605
|
+
};
|
|
606
|
+
path?: never;
|
|
607
|
+
cookie?: never;
|
|
608
|
+
};
|
|
609
|
+
requestBody?: never;
|
|
610
|
+
responses: {
|
|
611
|
+
/** @description OK */
|
|
612
|
+
200: {
|
|
613
|
+
headers: {
|
|
614
|
+
[name: string]: unknown;
|
|
615
|
+
};
|
|
616
|
+
content: {
|
|
617
|
+
"application/json": components["schemas"]["CartDto"];
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing). */
|
|
621
|
+
400: {
|
|
622
|
+
headers: {
|
|
623
|
+
[name: string]: unknown;
|
|
624
|
+
};
|
|
625
|
+
content: {
|
|
626
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
630
|
+
401: {
|
|
631
|
+
headers: {
|
|
632
|
+
[name: string]: unknown;
|
|
633
|
+
};
|
|
634
|
+
content: {
|
|
635
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
639
|
+
403: {
|
|
640
|
+
headers: {
|
|
641
|
+
[name: string]: unknown;
|
|
642
|
+
};
|
|
643
|
+
content: {
|
|
644
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
645
|
+
};
|
|
646
|
+
};
|
|
647
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
648
|
+
404: {
|
|
649
|
+
headers: {
|
|
650
|
+
[name: string]: unknown;
|
|
651
|
+
};
|
|
652
|
+
content: {
|
|
653
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
657
|
+
410: {
|
|
658
|
+
headers: {
|
|
659
|
+
[name: string]: unknown;
|
|
660
|
+
};
|
|
661
|
+
content: {
|
|
662
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
666
|
+
429: {
|
|
667
|
+
headers: {
|
|
668
|
+
[name: string]: unknown;
|
|
669
|
+
};
|
|
670
|
+
content: {
|
|
671
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
675
|
+
503: {
|
|
676
|
+
headers: {
|
|
677
|
+
[name: string]: unknown;
|
|
678
|
+
};
|
|
679
|
+
content: {
|
|
680
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
CreateCart: {
|
|
686
|
+
parameters: {
|
|
687
|
+
query?: never;
|
|
688
|
+
header: {
|
|
689
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
690
|
+
"X-Site-Key": string;
|
|
691
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
692
|
+
"X-Market"?: string;
|
|
693
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
694
|
+
"Accept-Language"?: string;
|
|
695
|
+
};
|
|
696
|
+
path?: never;
|
|
697
|
+
cookie?: never;
|
|
698
|
+
};
|
|
699
|
+
requestBody?: never;
|
|
700
|
+
responses: {
|
|
701
|
+
/** @description OK */
|
|
702
|
+
200: {
|
|
703
|
+
headers: {
|
|
704
|
+
[name: string]: unknown;
|
|
705
|
+
};
|
|
706
|
+
content: {
|
|
707
|
+
"application/json": components["schemas"]["CartDto"];
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
/** @description problem+json. MARKET_UNKNOWN (no such market on this site) or INVALID_PAGE. */
|
|
711
|
+
400: {
|
|
712
|
+
headers: {
|
|
713
|
+
[name: string]: unknown;
|
|
714
|
+
};
|
|
715
|
+
content: {
|
|
716
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
720
|
+
401: {
|
|
721
|
+
headers: {
|
|
722
|
+
[name: string]: unknown;
|
|
723
|
+
};
|
|
724
|
+
content: {
|
|
725
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
729
|
+
403: {
|
|
730
|
+
headers: {
|
|
731
|
+
[name: string]: unknown;
|
|
732
|
+
};
|
|
733
|
+
content: {
|
|
734
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
738
|
+
404: {
|
|
739
|
+
headers: {
|
|
740
|
+
[name: string]: unknown;
|
|
741
|
+
};
|
|
742
|
+
content: {
|
|
743
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
747
|
+
429: {
|
|
748
|
+
headers: {
|
|
749
|
+
[name: string]: unknown;
|
|
750
|
+
};
|
|
751
|
+
content: {
|
|
752
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
756
|
+
503: {
|
|
757
|
+
headers: {
|
|
758
|
+
[name: string]: unknown;
|
|
759
|
+
};
|
|
760
|
+
content: {
|
|
761
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
AddCartLine: {
|
|
767
|
+
parameters: {
|
|
768
|
+
query?: never;
|
|
769
|
+
header: {
|
|
770
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
771
|
+
"X-Site-Key": string;
|
|
772
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
773
|
+
"X-Market"?: string;
|
|
774
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
775
|
+
"Accept-Language"?: string;
|
|
776
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
777
|
+
"X-Cart-Token": string;
|
|
778
|
+
/** @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. */
|
|
779
|
+
"Idempotency-Key"?: string;
|
|
780
|
+
/** @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. */
|
|
781
|
+
"If-Match"?: string;
|
|
782
|
+
};
|
|
783
|
+
path?: never;
|
|
784
|
+
cookie?: never;
|
|
785
|
+
};
|
|
786
|
+
requestBody: {
|
|
787
|
+
content: {
|
|
788
|
+
"application/json": components["schemas"]["AddCartLineRequest"];
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
responses: {
|
|
792
|
+
/** @description OK */
|
|
793
|
+
200: {
|
|
794
|
+
headers: {
|
|
795
|
+
[name: string]: unknown;
|
|
796
|
+
};
|
|
797
|
+
content: {
|
|
798
|
+
"application/json": components["schemas"]["CartDto"];
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing), INVALID_QUANTITY, or CART_FULL. */
|
|
802
|
+
400: {
|
|
803
|
+
headers: {
|
|
804
|
+
[name: string]: unknown;
|
|
805
|
+
};
|
|
806
|
+
content: {
|
|
807
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
811
|
+
401: {
|
|
812
|
+
headers: {
|
|
813
|
+
[name: string]: unknown;
|
|
814
|
+
};
|
|
815
|
+
content: {
|
|
816
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
820
|
+
403: {
|
|
821
|
+
headers: {
|
|
822
|
+
[name: string]: unknown;
|
|
823
|
+
};
|
|
824
|
+
content: {
|
|
825
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
829
|
+
404: {
|
|
830
|
+
headers: {
|
|
831
|
+
[name: string]: unknown;
|
|
832
|
+
};
|
|
833
|
+
content: {
|
|
834
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match), STOCK_INSUFFICIENT, or PRODUCT_GONE. */
|
|
838
|
+
409: {
|
|
839
|
+
headers: {
|
|
840
|
+
[name: string]: unknown;
|
|
841
|
+
};
|
|
842
|
+
content: {
|
|
843
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
847
|
+
410: {
|
|
848
|
+
headers: {
|
|
849
|
+
[name: string]: unknown;
|
|
850
|
+
};
|
|
851
|
+
content: {
|
|
852
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
856
|
+
429: {
|
|
857
|
+
headers: {
|
|
858
|
+
[name: string]: unknown;
|
|
859
|
+
};
|
|
860
|
+
content: {
|
|
861
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
865
|
+
503: {
|
|
866
|
+
headers: {
|
|
867
|
+
[name: string]: unknown;
|
|
868
|
+
};
|
|
869
|
+
content: {
|
|
870
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
RemoveCartLine: {
|
|
876
|
+
parameters: {
|
|
877
|
+
query?: never;
|
|
878
|
+
header: {
|
|
879
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
880
|
+
"X-Site-Key": string;
|
|
881
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
882
|
+
"X-Market"?: string;
|
|
883
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
884
|
+
"Accept-Language"?: string;
|
|
885
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
886
|
+
"X-Cart-Token": string;
|
|
887
|
+
/** @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. */
|
|
888
|
+
"If-Match"?: string;
|
|
889
|
+
};
|
|
890
|
+
path: {
|
|
891
|
+
id: string;
|
|
892
|
+
};
|
|
893
|
+
cookie?: never;
|
|
894
|
+
};
|
|
895
|
+
requestBody?: never;
|
|
896
|
+
responses: {
|
|
897
|
+
/** @description OK */
|
|
898
|
+
200: {
|
|
899
|
+
headers: {
|
|
900
|
+
[name: string]: unknown;
|
|
901
|
+
};
|
|
902
|
+
content: {
|
|
903
|
+
"application/json": components["schemas"]["CartDto"];
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing). */
|
|
907
|
+
400: {
|
|
908
|
+
headers: {
|
|
909
|
+
[name: string]: unknown;
|
|
910
|
+
};
|
|
911
|
+
content: {
|
|
912
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
916
|
+
401: {
|
|
917
|
+
headers: {
|
|
918
|
+
[name: string]: unknown;
|
|
919
|
+
};
|
|
920
|
+
content: {
|
|
921
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
925
|
+
403: {
|
|
926
|
+
headers: {
|
|
927
|
+
[name: string]: unknown;
|
|
928
|
+
};
|
|
929
|
+
content: {
|
|
930
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
934
|
+
404: {
|
|
935
|
+
headers: {
|
|
936
|
+
[name: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
content: {
|
|
939
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match). */
|
|
943
|
+
409: {
|
|
944
|
+
headers: {
|
|
945
|
+
[name: string]: unknown;
|
|
946
|
+
};
|
|
947
|
+
content: {
|
|
948
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
952
|
+
410: {
|
|
953
|
+
headers: {
|
|
954
|
+
[name: string]: unknown;
|
|
955
|
+
};
|
|
956
|
+
content: {
|
|
957
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
958
|
+
};
|
|
959
|
+
};
|
|
960
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
961
|
+
429: {
|
|
962
|
+
headers: {
|
|
963
|
+
[name: string]: unknown;
|
|
964
|
+
};
|
|
965
|
+
content: {
|
|
966
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
970
|
+
503: {
|
|
971
|
+
headers: {
|
|
972
|
+
[name: string]: unknown;
|
|
973
|
+
};
|
|
974
|
+
content: {
|
|
975
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
UpdateCartLine: {
|
|
981
|
+
parameters: {
|
|
982
|
+
query?: never;
|
|
983
|
+
header: {
|
|
984
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
985
|
+
"X-Site-Key": string;
|
|
986
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
987
|
+
"X-Market"?: string;
|
|
988
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
989
|
+
"Accept-Language"?: string;
|
|
990
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
991
|
+
"X-Cart-Token": string;
|
|
992
|
+
/** @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. */
|
|
993
|
+
"If-Match"?: string;
|
|
994
|
+
};
|
|
995
|
+
path: {
|
|
996
|
+
id: string;
|
|
997
|
+
};
|
|
998
|
+
cookie?: never;
|
|
999
|
+
};
|
|
1000
|
+
requestBody: {
|
|
1001
|
+
content: {
|
|
1002
|
+
"application/json": components["schemas"]["UpdateCartLineRequest"];
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
responses: {
|
|
1006
|
+
/** @description OK */
|
|
1007
|
+
200: {
|
|
1008
|
+
headers: {
|
|
1009
|
+
[name: string]: unknown;
|
|
1010
|
+
};
|
|
1011
|
+
content: {
|
|
1012
|
+
"application/json": components["schemas"]["CartDto"];
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing), or INVALID_QUANTITY. */
|
|
1016
|
+
400: {
|
|
1017
|
+
headers: {
|
|
1018
|
+
[name: string]: unknown;
|
|
1019
|
+
};
|
|
1020
|
+
content: {
|
|
1021
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
1025
|
+
401: {
|
|
1026
|
+
headers: {
|
|
1027
|
+
[name: string]: unknown;
|
|
1028
|
+
};
|
|
1029
|
+
content: {
|
|
1030
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1031
|
+
};
|
|
1032
|
+
};
|
|
1033
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
1034
|
+
403: {
|
|
1035
|
+
headers: {
|
|
1036
|
+
[name: string]: unknown;
|
|
1037
|
+
};
|
|
1038
|
+
content: {
|
|
1039
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
1043
|
+
404: {
|
|
1044
|
+
headers: {
|
|
1045
|
+
[name: string]: unknown;
|
|
1046
|
+
};
|
|
1047
|
+
content: {
|
|
1048
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1049
|
+
};
|
|
1050
|
+
};
|
|
1051
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match), STOCK_INSUFFICIENT, or PRODUCT_GONE. */
|
|
1052
|
+
409: {
|
|
1053
|
+
headers: {
|
|
1054
|
+
[name: string]: unknown;
|
|
1055
|
+
};
|
|
1056
|
+
content: {
|
|
1057
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
1061
|
+
410: {
|
|
1062
|
+
headers: {
|
|
1063
|
+
[name: string]: unknown;
|
|
1064
|
+
};
|
|
1065
|
+
content: {
|
|
1066
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
1070
|
+
429: {
|
|
1071
|
+
headers: {
|
|
1072
|
+
[name: string]: unknown;
|
|
1073
|
+
};
|
|
1074
|
+
content: {
|
|
1075
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
1079
|
+
503: {
|
|
1080
|
+
headers: {
|
|
1081
|
+
[name: string]: unknown;
|
|
1082
|
+
};
|
|
1083
|
+
content: {
|
|
1084
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
SetCartMarket: {
|
|
1090
|
+
parameters: {
|
|
1091
|
+
query?: never;
|
|
1092
|
+
header: {
|
|
1093
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
1094
|
+
"X-Site-Key": string;
|
|
1095
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
1096
|
+
"X-Market"?: string;
|
|
1097
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
1098
|
+
"Accept-Language"?: string;
|
|
1099
|
+
/** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
|
|
1100
|
+
"X-Cart-Token": string;
|
|
1101
|
+
/** @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. */
|
|
1102
|
+
"If-Match"?: string;
|
|
1103
|
+
};
|
|
1104
|
+
path?: never;
|
|
1105
|
+
cookie?: never;
|
|
1106
|
+
};
|
|
1107
|
+
requestBody: {
|
|
1108
|
+
content: {
|
|
1109
|
+
"application/json": components["schemas"]["SetCartMarketRequest"];
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
responses: {
|
|
1113
|
+
/** @description OK */
|
|
1114
|
+
200: {
|
|
1115
|
+
headers: {
|
|
1116
|
+
[name: string]: unknown;
|
|
1117
|
+
};
|
|
1118
|
+
content: {
|
|
1119
|
+
"application/json": components["schemas"]["CartDto"];
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
/** @description problem+json. NOT_FOUND (X-Cart-Token missing), or MARKET_UNKNOWN. */
|
|
1123
|
+
400: {
|
|
1124
|
+
headers: {
|
|
1125
|
+
[name: string]: unknown;
|
|
1126
|
+
};
|
|
1127
|
+
content: {
|
|
1128
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
1132
|
+
401: {
|
|
1133
|
+
headers: {
|
|
1134
|
+
[name: string]: unknown;
|
|
1135
|
+
};
|
|
1136
|
+
content: {
|
|
1137
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
1141
|
+
403: {
|
|
1142
|
+
headers: {
|
|
1143
|
+
[name: string]: unknown;
|
|
1144
|
+
};
|
|
1145
|
+
content: {
|
|
1146
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
1150
|
+
404: {
|
|
1151
|
+
headers: {
|
|
1152
|
+
[name: string]: unknown;
|
|
1153
|
+
};
|
|
1154
|
+
content: {
|
|
1155
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1156
|
+
};
|
|
1157
|
+
};
|
|
1158
|
+
/** @description problem+json. CART_CONFLICT (stale If-Match). */
|
|
1159
|
+
409: {
|
|
1160
|
+
headers: {
|
|
1161
|
+
[name: string]: unknown;
|
|
1162
|
+
};
|
|
1163
|
+
content: {
|
|
1164
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
/** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
|
|
1168
|
+
410: {
|
|
1169
|
+
headers: {
|
|
1170
|
+
[name: string]: unknown;
|
|
1171
|
+
};
|
|
1172
|
+
content: {
|
|
1173
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
1177
|
+
429: {
|
|
1178
|
+
headers: {
|
|
1179
|
+
[name: string]: unknown;
|
|
1180
|
+
};
|
|
1181
|
+
content: {
|
|
1182
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
1186
|
+
503: {
|
|
1187
|
+
headers: {
|
|
1188
|
+
[name: string]: unknown;
|
|
1189
|
+
};
|
|
1190
|
+
content: {
|
|
1191
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1192
|
+
};
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
425
1196
|
GetCategories: {
|
|
426
1197
|
parameters: {
|
|
427
1198
|
query?: never;
|