@nok-integration/storefront-react 0.6.1 → 0.12.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/dist/index.d.ts +371 -54
- package/dist/index.mjs +2820 -1905
- package/dist/standalone/storefront.mjs +2820 -1905
- package/dist/standalone/styles.css +2198 -1202
- package/dist/styles.css +2198 -1202
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,15 +24,15 @@ declare type AddCartItemRequest = z.infer<typeof AddCartItemRequest>;
|
|
|
24
24
|
|
|
25
25
|
/** The `error` member — a machine `code`, a human `message`, and optional `details`. */
|
|
26
26
|
declare const ApiErrorBody: z.ZodObject<{
|
|
27
|
-
code: z.ZodEnum<["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
27
|
+
code: z.ZodEnum<["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "cart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
28
28
|
message: z.ZodString;
|
|
29
29
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
code: "invalid_request" | "unauthorized" | "out_of_stock" | "cart_locked" | "sku_not_found" | "category_not_found" | "amount_mismatch" | "duplicate_order" | "order_not_found" | "order_not_cancellable" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
31
|
+
code: "invalid_request" | "unauthorized" | "out_of_stock" | "cart_locked" | "sku_not_found" | "category_not_found" | "amount_mismatch" | "duplicate_order" | "order_not_found" | "order_not_cancellable" | "cart_not_found" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
32
32
|
message: string;
|
|
33
33
|
details?: Record<string, unknown> | undefined;
|
|
34
34
|
}, {
|
|
35
|
-
code: "invalid_request" | "unauthorized" | "out_of_stock" | "cart_locked" | "sku_not_found" | "category_not_found" | "amount_mismatch" | "duplicate_order" | "order_not_found" | "order_not_cancellable" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
35
|
+
code: "invalid_request" | "unauthorized" | "out_of_stock" | "cart_locked" | "sku_not_found" | "category_not_found" | "amount_mismatch" | "duplicate_order" | "order_not_found" | "order_not_cancellable" | "cart_not_found" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
36
36
|
message: string;
|
|
37
37
|
details?: Record<string, unknown> | undefined;
|
|
38
38
|
}>;
|
|
@@ -192,18 +192,17 @@ declare const CartItem: z.ZodObject<{
|
|
|
192
192
|
declare type CartItem = z.infer<typeof CartItem>;
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* A single cart line: media, title, variant,
|
|
195
|
+
* A single cart line: media, title, variant, price and the qty stepper.
|
|
196
196
|
*
|
|
197
|
-
* Title, image and variant come from the line itself (contracts 2.15.0)
|
|
198
|
-
*
|
|
199
|
-
*
|
|
197
|
+
* Title, image and variant come from the line itself (contracts 2.15.0) and are all
|
|
198
|
+
* optional — the catalogue projection is a cache, so a de-listed SKU still has a line. It
|
|
199
|
+
* degrades: the SKU stands in for a missing title, a missing image leaves the placeholder.
|
|
200
200
|
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* can always still read the price and remove the line.
|
|
201
|
+
* The figure shown is the LINE TOTAL, not the unit price. The design shows one price at
|
|
202
|
+
* qty 1, where the two are equal, so it does not settle it; line total is what reconciles
|
|
203
|
+
* with the Subtotal below.
|
|
205
204
|
*/
|
|
206
|
-
export declare function CartLineItem({ item, title, image, maxQty, onQtyChange, onRemove, pending, }: CartLineItemProps): JSX.Element;
|
|
205
|
+
export declare function CartLineItem({ item, title, image, compareAt, discountPct, maxQty, onQtyChange, onRemove, pending, }: CartLineItemProps): JSX.Element;
|
|
207
206
|
|
|
208
207
|
export declare interface CartLineItemProps {
|
|
209
208
|
item: CartItem;
|
|
@@ -214,6 +213,16 @@ export declare interface CartLineItemProps {
|
|
|
214
213
|
*/
|
|
215
214
|
title?: string;
|
|
216
215
|
image?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Was-price and discount: a struck figure under the price, and a `-NN%` badge over the
|
|
218
|
+
* thumbnail (Figma `Property 1=cart-item`).
|
|
219
|
+
*
|
|
220
|
+
* `CartView` does not supply these — `CartItem` carries no was-price, so the cart cannot
|
|
221
|
+
* know a line is discounted and will not invent one. Same escape hatch as `title`/`image`
|
|
222
|
+
* above, for a host with its own catalogue data.
|
|
223
|
+
*/
|
|
224
|
+
compareAt?: Money;
|
|
225
|
+
discountPct?: number;
|
|
217
226
|
maxQty?: number;
|
|
218
227
|
onQtyChange: (qty: number) => void;
|
|
219
228
|
onRemove: () => void;
|
|
@@ -284,8 +293,9 @@ export declare interface CartViewProps {
|
|
|
284
293
|
*
|
|
285
294
|
* DAZN's checkout is the next step and DAZN name it; a host whose own wording is
|
|
286
295
|
* "Continue" or "Go to checkout" should not have to accept ours. The locked-cart label
|
|
287
|
-
* is deliberately NOT configurable — it
|
|
288
|
-
*
|
|
296
|
+
* is deliberately NOT configurable — it takes the fan back to a checkout that already
|
|
297
|
+
* exists, which is a different action from starting one, and a host renaming it could
|
|
298
|
+
* imply a second checkout is being created.
|
|
289
299
|
*/
|
|
290
300
|
checkoutLabel?: string;
|
|
291
301
|
}
|
|
@@ -446,11 +456,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
446
456
|
}, "strip", z.ZodTypeAny, {
|
|
447
457
|
sku: string;
|
|
448
458
|
title: string;
|
|
449
|
-
category: string;
|
|
450
459
|
price: {
|
|
451
460
|
amount: number;
|
|
452
461
|
currency: string;
|
|
453
462
|
};
|
|
463
|
+
category: string;
|
|
454
464
|
media: string[];
|
|
455
465
|
variants: {
|
|
456
466
|
sku: string;
|
|
@@ -478,11 +488,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
478
488
|
}, {
|
|
479
489
|
sku: string;
|
|
480
490
|
title: string;
|
|
481
|
-
category: string;
|
|
482
491
|
price: {
|
|
483
492
|
amount: number;
|
|
484
493
|
currency: string;
|
|
485
494
|
};
|
|
495
|
+
category: string;
|
|
486
496
|
media: string[];
|
|
487
497
|
variants: {
|
|
488
498
|
sku: string;
|
|
@@ -514,11 +524,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
514
524
|
products: {
|
|
515
525
|
sku: string;
|
|
516
526
|
title: string;
|
|
517
|
-
category: string;
|
|
518
527
|
price: {
|
|
519
528
|
amount: number;
|
|
520
529
|
currency: string;
|
|
521
530
|
};
|
|
531
|
+
category: string;
|
|
522
532
|
media: string[];
|
|
523
533
|
variants: {
|
|
524
534
|
sku: string;
|
|
@@ -550,11 +560,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
550
560
|
products: {
|
|
551
561
|
sku: string;
|
|
552
562
|
title: string;
|
|
553
|
-
category: string;
|
|
554
563
|
price: {
|
|
555
564
|
amount: number;
|
|
556
565
|
currency: string;
|
|
557
566
|
};
|
|
567
|
+
category: string;
|
|
558
568
|
media: string[];
|
|
559
569
|
variants: {
|
|
560
570
|
sku: string;
|
|
@@ -594,6 +604,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
594
604
|
align?: "center" | "left" | undefined;
|
|
595
605
|
}>, z.ZodObject<{
|
|
596
606
|
kind: z.ZodLiteral<"featured">;
|
|
607
|
+
title: z.ZodOptional<z.ZodString>;
|
|
597
608
|
product: z.ZodObject<{
|
|
598
609
|
sku: z.ZodString;
|
|
599
610
|
title: z.ZodString;
|
|
@@ -669,11 +680,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
669
680
|
}, "strip", z.ZodTypeAny, {
|
|
670
681
|
sku: string;
|
|
671
682
|
title: string;
|
|
672
|
-
category: string;
|
|
673
683
|
price: {
|
|
674
684
|
amount: number;
|
|
675
685
|
currency: string;
|
|
676
686
|
};
|
|
687
|
+
category: string;
|
|
677
688
|
media: string[];
|
|
678
689
|
variants: {
|
|
679
690
|
sku: string;
|
|
@@ -701,11 +712,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
701
712
|
}, {
|
|
702
713
|
sku: string;
|
|
703
714
|
title: string;
|
|
704
|
-
category: string;
|
|
705
715
|
price: {
|
|
706
716
|
amount: number;
|
|
707
717
|
currency: string;
|
|
708
718
|
};
|
|
719
|
+
category: string;
|
|
709
720
|
media: string[];
|
|
710
721
|
variants: {
|
|
711
722
|
sku: string;
|
|
@@ -736,11 +747,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
736
747
|
product: {
|
|
737
748
|
sku: string;
|
|
738
749
|
title: string;
|
|
739
|
-
category: string;
|
|
740
750
|
price: {
|
|
741
751
|
amount: number;
|
|
742
752
|
currency: string;
|
|
743
753
|
};
|
|
754
|
+
category: string;
|
|
744
755
|
media: string[];
|
|
745
756
|
variants: {
|
|
746
757
|
sku: string;
|
|
@@ -766,16 +777,17 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
766
777
|
notes?: string[] | undefined;
|
|
767
778
|
} | undefined;
|
|
768
779
|
};
|
|
780
|
+
title?: string | undefined;
|
|
769
781
|
}, {
|
|
770
782
|
kind: "featured";
|
|
771
783
|
product: {
|
|
772
784
|
sku: string;
|
|
773
785
|
title: string;
|
|
774
|
-
category: string;
|
|
775
786
|
price: {
|
|
776
787
|
amount: number;
|
|
777
788
|
currency: string;
|
|
778
789
|
};
|
|
790
|
+
category: string;
|
|
779
791
|
media: string[];
|
|
780
792
|
variants: {
|
|
781
793
|
sku: string;
|
|
@@ -801,6 +813,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
801
813
|
notes?: string[] | undefined;
|
|
802
814
|
} | undefined;
|
|
803
815
|
};
|
|
816
|
+
title?: string | undefined;
|
|
804
817
|
}>, z.ZodObject<{
|
|
805
818
|
kind: z.ZodLiteral<"lifestyle_image">;
|
|
806
819
|
images: z.ZodArray<z.ZodString, "many">;
|
|
@@ -888,11 +901,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
888
901
|
}, "strip", z.ZodTypeAny, {
|
|
889
902
|
sku: string;
|
|
890
903
|
title: string;
|
|
891
|
-
category: string;
|
|
892
904
|
price: {
|
|
893
905
|
amount: number;
|
|
894
906
|
currency: string;
|
|
895
907
|
};
|
|
908
|
+
category: string;
|
|
896
909
|
media: string[];
|
|
897
910
|
variants: {
|
|
898
911
|
sku: string;
|
|
@@ -920,11 +933,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
920
933
|
}, {
|
|
921
934
|
sku: string;
|
|
922
935
|
title: string;
|
|
923
|
-
category: string;
|
|
924
936
|
price: {
|
|
925
937
|
amount: number;
|
|
926
938
|
currency: string;
|
|
927
939
|
};
|
|
940
|
+
category: string;
|
|
928
941
|
media: string[];
|
|
929
942
|
variants: {
|
|
930
943
|
sku: string;
|
|
@@ -956,11 +969,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
956
969
|
products: {
|
|
957
970
|
sku: string;
|
|
958
971
|
title: string;
|
|
959
|
-
category: string;
|
|
960
972
|
price: {
|
|
961
973
|
amount: number;
|
|
962
974
|
currency: string;
|
|
963
975
|
};
|
|
976
|
+
category: string;
|
|
964
977
|
media: string[];
|
|
965
978
|
variants: {
|
|
966
979
|
sku: string;
|
|
@@ -992,11 +1005,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
992
1005
|
products: {
|
|
993
1006
|
sku: string;
|
|
994
1007
|
title: string;
|
|
995
|
-
category: string;
|
|
996
1008
|
price: {
|
|
997
1009
|
amount: number;
|
|
998
1010
|
currency: string;
|
|
999
1011
|
};
|
|
1012
|
+
category: string;
|
|
1000
1013
|
media: string[];
|
|
1001
1014
|
variants: {
|
|
1002
1015
|
sku: string;
|
|
@@ -1034,18 +1047,21 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1034
1047
|
quote: string;
|
|
1035
1048
|
author: string;
|
|
1036
1049
|
}>, "many">;
|
|
1050
|
+
disclaimer: z.ZodOptional<z.ZodString>;
|
|
1037
1051
|
}, "strip", z.ZodTypeAny, {
|
|
1038
1052
|
kind: "review";
|
|
1039
1053
|
quotes: {
|
|
1040
1054
|
quote: string;
|
|
1041
1055
|
author: string;
|
|
1042
1056
|
}[];
|
|
1057
|
+
disclaimer?: string | undefined;
|
|
1043
1058
|
}, {
|
|
1044
1059
|
kind: "review";
|
|
1045
1060
|
quotes: {
|
|
1046
1061
|
quote: string;
|
|
1047
1062
|
author: string;
|
|
1048
1063
|
}[];
|
|
1064
|
+
disclaimer?: string | undefined;
|
|
1049
1065
|
}>, z.ZodObject<{
|
|
1050
1066
|
kind: z.ZodLiteral<"why_us">;
|
|
1051
1067
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -1116,11 +1132,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1116
1132
|
products: {
|
|
1117
1133
|
sku: string;
|
|
1118
1134
|
title: string;
|
|
1119
|
-
category: string;
|
|
1120
1135
|
price: {
|
|
1121
1136
|
amount: number;
|
|
1122
1137
|
currency: string;
|
|
1123
1138
|
};
|
|
1139
|
+
category: string;
|
|
1124
1140
|
media: string[];
|
|
1125
1141
|
variants: {
|
|
1126
1142
|
sku: string;
|
|
@@ -1155,11 +1171,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1155
1171
|
product: {
|
|
1156
1172
|
sku: string;
|
|
1157
1173
|
title: string;
|
|
1158
|
-
category: string;
|
|
1159
1174
|
price: {
|
|
1160
1175
|
amount: number;
|
|
1161
1176
|
currency: string;
|
|
1162
1177
|
};
|
|
1178
|
+
category: string;
|
|
1163
1179
|
media: string[];
|
|
1164
1180
|
variants: {
|
|
1165
1181
|
sku: string;
|
|
@@ -1185,6 +1201,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1185
1201
|
notes?: string[] | undefined;
|
|
1186
1202
|
} | undefined;
|
|
1187
1203
|
};
|
|
1204
|
+
title?: string | undefined;
|
|
1188
1205
|
} | {
|
|
1189
1206
|
kind: "lifestyle_image";
|
|
1190
1207
|
images: string[];
|
|
@@ -1194,11 +1211,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1194
1211
|
products: {
|
|
1195
1212
|
sku: string;
|
|
1196
1213
|
title: string;
|
|
1197
|
-
category: string;
|
|
1198
1214
|
price: {
|
|
1199
1215
|
amount: number;
|
|
1200
1216
|
currency: string;
|
|
1201
1217
|
};
|
|
1218
|
+
category: string;
|
|
1202
1219
|
media: string[];
|
|
1203
1220
|
variants: {
|
|
1204
1221
|
sku: string;
|
|
@@ -1230,6 +1247,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1230
1247
|
quote: string;
|
|
1231
1248
|
author: string;
|
|
1232
1249
|
}[];
|
|
1250
|
+
disclaimer?: string | undefined;
|
|
1233
1251
|
} | {
|
|
1234
1252
|
items: {
|
|
1235
1253
|
title: string;
|
|
@@ -1258,11 +1276,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1258
1276
|
products: {
|
|
1259
1277
|
sku: string;
|
|
1260
1278
|
title: string;
|
|
1261
|
-
category: string;
|
|
1262
1279
|
price: {
|
|
1263
1280
|
amount: number;
|
|
1264
1281
|
currency: string;
|
|
1265
1282
|
};
|
|
1283
|
+
category: string;
|
|
1266
1284
|
media: string[];
|
|
1267
1285
|
variants: {
|
|
1268
1286
|
sku: string;
|
|
@@ -1297,11 +1315,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1297
1315
|
product: {
|
|
1298
1316
|
sku: string;
|
|
1299
1317
|
title: string;
|
|
1300
|
-
category: string;
|
|
1301
1318
|
price: {
|
|
1302
1319
|
amount: number;
|
|
1303
1320
|
currency: string;
|
|
1304
1321
|
};
|
|
1322
|
+
category: string;
|
|
1305
1323
|
media: string[];
|
|
1306
1324
|
variants: {
|
|
1307
1325
|
sku: string;
|
|
@@ -1327,6 +1345,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1327
1345
|
notes?: string[] | undefined;
|
|
1328
1346
|
} | undefined;
|
|
1329
1347
|
};
|
|
1348
|
+
title?: string | undefined;
|
|
1330
1349
|
} | {
|
|
1331
1350
|
kind: "lifestyle_image";
|
|
1332
1351
|
images: string[];
|
|
@@ -1336,11 +1355,11 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1336
1355
|
products: {
|
|
1337
1356
|
sku: string;
|
|
1338
1357
|
title: string;
|
|
1339
|
-
category: string;
|
|
1340
1358
|
price: {
|
|
1341
1359
|
amount: number;
|
|
1342
1360
|
currency: string;
|
|
1343
1361
|
};
|
|
1362
|
+
category: string;
|
|
1344
1363
|
media: string[];
|
|
1345
1364
|
variants: {
|
|
1346
1365
|
sku: string;
|
|
@@ -1372,6 +1391,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1372
1391
|
quote: string;
|
|
1373
1392
|
author: string;
|
|
1374
1393
|
}[];
|
|
1394
|
+
disclaimer?: string | undefined;
|
|
1375
1395
|
} | {
|
|
1376
1396
|
items: {
|
|
1377
1397
|
title: string;
|
|
@@ -1440,9 +1460,15 @@ declare interface ClientOptions {
|
|
|
1440
1460
|
export declare function codeOf(err: unknown): ErrorCode | undefined;
|
|
1441
1461
|
|
|
1442
1462
|
/**
|
|
1443
|
-
* PDP colour selector (Figma `mobile/pdp/color`): a "
|
|
1444
|
-
* 79×105 image tiles. The selected tile gets a dark border; sold-out
|
|
1445
|
-
*
|
|
1463
|
+
* PDP colour selector (Figma `mobile/pdp/color`): a "Color: <name>" header and a row of
|
|
1464
|
+
* 79×105 image tiles. The selected tile gets a 1px dark border; a sold-out colour gets a
|
|
1465
|
+
* dark scrim reading "Out of stock".
|
|
1466
|
+
*
|
|
1467
|
+
* A sold-out colour stays SELECTABLE, per the tile's design note ("tap always selects —
|
|
1468
|
+
* sold-out selectable to view"): choosing it swaps the gallery, which is the only way a
|
|
1469
|
+
* fan can look at a colourway that happens to be unavailable. The purchase is blocked
|
|
1470
|
+
* further down, at the CTA, not here — disabling the tile would hide the product rather
|
|
1471
|
+
* than the transaction.
|
|
1446
1472
|
*/
|
|
1447
1473
|
export declare function ColorSelector({ colours, selected, onSelect }: ColorSelectorProps): JSX.Element;
|
|
1448
1474
|
|
|
@@ -1677,6 +1703,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
1677
1703
|
notes?: string[] | undefined;
|
|
1678
1704
|
} | undefined;
|
|
1679
1705
|
};
|
|
1706
|
+
title?: string | undefined;
|
|
1680
1707
|
} | {
|
|
1681
1708
|
kind: "lifestyle_image";
|
|
1682
1709
|
images: string[];
|
|
@@ -1722,6 +1749,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
1722
1749
|
quote: string;
|
|
1723
1750
|
author: string;
|
|
1724
1751
|
}[];
|
|
1752
|
+
disclaimer?: string | undefined;
|
|
1725
1753
|
} | {
|
|
1726
1754
|
kind: "why_us";
|
|
1727
1755
|
items: {
|
|
@@ -1739,6 +1767,19 @@ declare function createClient(options: ClientOptions): {
|
|
|
1739
1767
|
})[];
|
|
1740
1768
|
}>;
|
|
1741
1769
|
};
|
|
1770
|
+
content: {
|
|
1771
|
+
/** The shop entry's slides. Falls back to whatever the consumer ships with. */
|
|
1772
|
+
home: () => Promise<{
|
|
1773
|
+
slides: {
|
|
1774
|
+
title: string;
|
|
1775
|
+
subtitle: string;
|
|
1776
|
+
key: string;
|
|
1777
|
+
cta: string;
|
|
1778
|
+
image?: string | undefined;
|
|
1779
|
+
target?: string | undefined;
|
|
1780
|
+
}[];
|
|
1781
|
+
}>;
|
|
1782
|
+
};
|
|
1742
1783
|
inventory: {
|
|
1743
1784
|
get: (sku: string) => Promise<{
|
|
1744
1785
|
sku: string;
|
|
@@ -1972,6 +2013,106 @@ declare function createClient(options: ClientOptions): {
|
|
|
1972
2013
|
checkout_url: string;
|
|
1973
2014
|
}>;
|
|
1974
2015
|
};
|
|
2016
|
+
/**
|
|
2017
|
+
* The fan's own orders (ADR-0015). Session-scoped: there is no way to ask for
|
|
2018
|
+
* someone else's, because there is no parameter that names a customer.
|
|
2019
|
+
*/
|
|
2020
|
+
stockAlerts: {
|
|
2021
|
+
/** "Remind me when available" — idempotent per SKU for the session's principal. */
|
|
2022
|
+
create: (body: StockAlertRequest) => Promise<{
|
|
2023
|
+
sku: string;
|
|
2024
|
+
created_at: string;
|
|
2025
|
+
notified_at?: string | undefined;
|
|
2026
|
+
}>;
|
|
2027
|
+
};
|
|
2028
|
+
orders: {
|
|
2029
|
+
list: () => Promise<{
|
|
2030
|
+
orders: {
|
|
2031
|
+
status: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
2032
|
+
currency: string;
|
|
2033
|
+
total: {
|
|
2034
|
+
amount: number;
|
|
2035
|
+
currency: string;
|
|
2036
|
+
};
|
|
2037
|
+
order_ref: string;
|
|
2038
|
+
placed_at: string;
|
|
2039
|
+
headline: string;
|
|
2040
|
+
item_count: number;
|
|
2041
|
+
image?: string | undefined;
|
|
2042
|
+
}[];
|
|
2043
|
+
}>;
|
|
2044
|
+
get: (orderRef: string) => Promise<{
|
|
2045
|
+
status: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
2046
|
+
currency: string;
|
|
2047
|
+
items: {
|
|
2048
|
+
sku: string;
|
|
2049
|
+
qty: number;
|
|
2050
|
+
unit_price: {
|
|
2051
|
+
amount: number;
|
|
2052
|
+
currency: string;
|
|
2053
|
+
};
|
|
2054
|
+
line_total: {
|
|
2055
|
+
amount: number;
|
|
2056
|
+
currency: string;
|
|
2057
|
+
};
|
|
2058
|
+
line_ref: string;
|
|
2059
|
+
cancelled_qty: number;
|
|
2060
|
+
refunded_qty: number;
|
|
2061
|
+
attributes?: Record<string, string> | undefined;
|
|
2062
|
+
image?: string | undefined;
|
|
2063
|
+
title?: string | undefined;
|
|
2064
|
+
}[];
|
|
2065
|
+
totals: {
|
|
2066
|
+
shipping: {
|
|
2067
|
+
amount: number;
|
|
2068
|
+
currency: string;
|
|
2069
|
+
};
|
|
2070
|
+
tax: {
|
|
2071
|
+
amount: number;
|
|
2072
|
+
currency: string;
|
|
2073
|
+
};
|
|
2074
|
+
items: {
|
|
2075
|
+
amount: number;
|
|
2076
|
+
currency: string;
|
|
2077
|
+
};
|
|
2078
|
+
grand_total: {
|
|
2079
|
+
amount: number;
|
|
2080
|
+
currency: string;
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
order_ref: string;
|
|
2084
|
+
placed_at: string;
|
|
2085
|
+
ship_to: {
|
|
2086
|
+
country: string;
|
|
2087
|
+
name: string;
|
|
2088
|
+
line1: string;
|
|
2089
|
+
city: string;
|
|
2090
|
+
postcode: string;
|
|
2091
|
+
line2?: string | undefined;
|
|
2092
|
+
region?: string | undefined;
|
|
2093
|
+
};
|
|
2094
|
+
headline: string;
|
|
2095
|
+
progress: {
|
|
2096
|
+
label: string;
|
|
2097
|
+
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
2098
|
+
current: boolean;
|
|
2099
|
+
at?: string | undefined;
|
|
2100
|
+
}[];
|
|
2101
|
+
payment?: {
|
|
2102
|
+
brand: string;
|
|
2103
|
+
last4?: string | undefined;
|
|
2104
|
+
} | undefined;
|
|
2105
|
+
estimated_delivery?: {
|
|
2106
|
+
from: string;
|
|
2107
|
+
to: string;
|
|
2108
|
+
} | undefined;
|
|
2109
|
+
tracking?: {
|
|
2110
|
+
carrier: string;
|
|
2111
|
+
url?: string | undefined;
|
|
2112
|
+
reference?: string | undefined;
|
|
2113
|
+
} | undefined;
|
|
2114
|
+
}>;
|
|
2115
|
+
};
|
|
1975
2116
|
auth: {
|
|
1976
2117
|
/** Exchange a single-use DAZN identity JWT for a session (sets the cookie). */
|
|
1977
2118
|
exchangeSession: (body: SessionExchangeRequest) => Promise<{
|
|
@@ -2137,7 +2278,7 @@ export declare interface EmptyStateProps {
|
|
|
2137
2278
|
* | rate_limited | 429 | too many requests |
|
|
2138
2279
|
* | server_error | 500 | unexpected error (safe to retry idempotent) |
|
|
2139
2280
|
*/
|
|
2140
|
-
declare const ErrorCode: z.ZodEnum<["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
2281
|
+
declare const ErrorCode: z.ZodEnum<["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "cart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
2141
2282
|
|
|
2142
2283
|
declare type ErrorCode = z.infer<typeof ErrorCode>;
|
|
2143
2284
|
|
|
@@ -2160,7 +2301,7 @@ declare type ErrorCode = z.infer<typeof ErrorCode>;
|
|
|
2160
2301
|
* | rate_limited | 429 | too many requests |
|
|
2161
2302
|
* | server_error | 500 | unexpected error (safe to retry idempotent) |
|
|
2162
2303
|
*/
|
|
2163
|
-
declare const ErrorCode_2: z.ZodEnum<["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
2304
|
+
declare const ErrorCode_2: z.ZodEnum<["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "cart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
2164
2305
|
|
|
2165
2306
|
declare type ErrorCode_2 = z.infer<typeof ErrorCode_2>;
|
|
2166
2307
|
|
|
@@ -2288,7 +2429,13 @@ export declare function isDuplicateOrder(err: unknown): boolean;
|
|
|
2288
2429
|
/** A 401 anywhere in the flow means the session lapsed — re-handshake, keep the cart. */
|
|
2289
2430
|
export declare function isUnauthorized(err: unknown): boolean;
|
|
2290
2431
|
|
|
2291
|
-
/**
|
|
2432
|
+
/**
|
|
2433
|
+
* Full-width editorial image, swipeable when the CMS supplies more than one.
|
|
2434
|
+
*
|
|
2435
|
+
* It previously rendered `images[0]` and dropped the rest, which is a silent failure of
|
|
2436
|
+
* the worst kind: the block takes an array, an author publishes three, and nothing on the
|
|
2437
|
+
* screen says the other two exist.
|
|
2438
|
+
*/
|
|
2292
2439
|
export declare function LifestyleImage({ images }: {
|
|
2293
2440
|
images: string[];
|
|
2294
2441
|
}): JSX.Element | null;
|
|
@@ -2377,6 +2524,36 @@ export declare type Navigate = (to: ShopRoute) => void;
|
|
|
2377
2524
|
*/
|
|
2378
2525
|
export declare type OnEvent = (event: ShopEvent) => void;
|
|
2379
2526
|
|
|
2527
|
+
/**
|
|
2528
|
+
* One row of the timeline.
|
|
2529
|
+
*
|
|
2530
|
+
* **`at` is present only for a step that has actually happened.** A future step has no
|
|
2531
|
+
* date, rather than a projected one: a predicted date rendered in the same place as a
|
|
2532
|
+
* recorded one is indistinguishable from a promise, and this timeline is the fan's
|
|
2533
|
+
* evidence of what occurred.
|
|
2534
|
+
*/
|
|
2535
|
+
declare const OrderProgressEntry: z.ZodObject<{
|
|
2536
|
+
step: z.ZodEnum<["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]>;
|
|
2537
|
+
/** Ready-to-render label for the step, localised with the rest of the response. */
|
|
2538
|
+
label: z.ZodString;
|
|
2539
|
+
/** When the step completed. Absent = not reached yet. */
|
|
2540
|
+
at: z.ZodOptional<z.ZodString>;
|
|
2541
|
+
/** Exactly one entry is `current`; every earlier one is complete. */
|
|
2542
|
+
current: z.ZodBoolean;
|
|
2543
|
+
}, "strip", z.ZodTypeAny, {
|
|
2544
|
+
label: string;
|
|
2545
|
+
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
2546
|
+
current: boolean;
|
|
2547
|
+
at?: string | undefined;
|
|
2548
|
+
}, {
|
|
2549
|
+
label: string;
|
|
2550
|
+
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
2551
|
+
current: boolean;
|
|
2552
|
+
at?: string | undefined;
|
|
2553
|
+
}>;
|
|
2554
|
+
|
|
2555
|
+
declare type OrderProgressEntry = z.infer<typeof OrderProgressEntry>;
|
|
2556
|
+
|
|
2380
2557
|
/**
|
|
2381
2558
|
* Fulfilment order status. Lives here (not in a synchronous order contract) because the
|
|
2382
2559
|
* engine no longer owns orders (ADR-0008) — order/fulfilment status reaches us only as
|
|
@@ -2390,10 +2567,18 @@ declare type OrderStatus = z.infer<typeof OrderStatus>;
|
|
|
2390
2567
|
* The pricing breakdown. DISPLAY ONLY — every value is server-authoritative; the UI
|
|
2391
2568
|
* never sums or computes anything here.
|
|
2392
2569
|
*/
|
|
2393
|
-
export declare function OrderSummary({ pricing, deferred }: OrderSummaryProps): JSX.Element;
|
|
2570
|
+
export declare function OrderSummary({ pricing, deferred, rows }: OrderSummaryProps): JSX.Element;
|
|
2394
2571
|
|
|
2395
2572
|
export declare interface OrderSummaryProps {
|
|
2396
2573
|
pricing: Pricing;
|
|
2574
|
+
/**
|
|
2575
|
+
* Row order and wording, where a surface's design differs from the cart's.
|
|
2576
|
+
*
|
|
2577
|
+
* The order screen lists Subtotal, Tax, Shipping, Total and says "Shipping"; the cart
|
|
2578
|
+
* says "Delivery". One component, two designs — passed in rather than picked here so
|
|
2579
|
+
* neither screen silently inherits the other's wording.
|
|
2580
|
+
*/
|
|
2581
|
+
rows?: SummaryRow[];
|
|
2397
2582
|
/**
|
|
2398
2583
|
* Rows whose value is **not ours to state**, rendered as "Calculated at checkout"
|
|
2399
2584
|
* instead of the figure in `pricing`.
|
|
@@ -2410,7 +2595,42 @@ export declare interface OrderSummaryProps {
|
|
|
2410
2595
|
deferred?: DeferredLine[];
|
|
2411
2596
|
}
|
|
2412
2597
|
|
|
2413
|
-
/**
|
|
2598
|
+
/**
|
|
2599
|
+
* The order progress timeline (Figma `mobile/order/timeline-row`, 3879:13868).
|
|
2600
|
+
*
|
|
2601
|
+
* The steps come from the engine rather than being enumerated here, so the screen renders
|
|
2602
|
+
* what the order can actually evidence — three rows for a normal delivery, four when a
|
|
2603
|
+
* carrier reports the parcel out for delivery, and a cancelled tail when it applies.
|
|
2604
|
+
*
|
|
2605
|
+
* An ordered list, because it is one: the rows have a sequence and a screen reader should
|
|
2606
|
+
* announce it as such.
|
|
2607
|
+
*/
|
|
2608
|
+
export declare function OrderTimeline({ progress, locale: localeProp }: OrderTimelineProps): JSX.Element;
|
|
2609
|
+
|
|
2610
|
+
export declare interface OrderTimelineProps {
|
|
2611
|
+
progress: OrderProgressEntry[];
|
|
2612
|
+
/** Overrides the provider's locale for the step dates. */
|
|
2613
|
+
locale?: string;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* Order tracking (Figma `mobile/order/details`, ADR-0015).
|
|
2618
|
+
*
|
|
2619
|
+
* Read-only by design. Cancellation and refunds remain DAZN's under ADR-0008, so the
|
|
2620
|
+
* design's "Cancel order" and "Return items" buttons are deliberately not here: a control
|
|
2621
|
+
* that cannot complete is worse than an absent one, and both need a contract from DAZN
|
|
2622
|
+
* before they can do anything.
|
|
2623
|
+
*/
|
|
2624
|
+
export declare function OrderTrackingView(props: OrderTrackingViewProps): JSX.Element;
|
|
2625
|
+
|
|
2626
|
+
export declare interface OrderTrackingViewProps {
|
|
2627
|
+
/** DAZN's order reference, e.g. `ord_GB26081021`. */
|
|
2628
|
+
orderRef: string;
|
|
2629
|
+
/** Overrides the provider's locale for dates. */
|
|
2630
|
+
locale?: string;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
/** PCP hero — category title and tagline read over a full-screen lifestyle image. */
|
|
2414
2634
|
export declare function PcpHero({ hero }: {
|
|
2415
2635
|
hero: CategoryHero;
|
|
2416
2636
|
}): JSX.Element;
|
|
@@ -2639,11 +2859,11 @@ declare const Product: z.ZodObject<{
|
|
|
2639
2859
|
}, "strip", z.ZodTypeAny, {
|
|
2640
2860
|
sku: string;
|
|
2641
2861
|
title: string;
|
|
2642
|
-
category: string;
|
|
2643
2862
|
price: {
|
|
2644
2863
|
amount: number;
|
|
2645
2864
|
currency: string;
|
|
2646
2865
|
};
|
|
2866
|
+
category: string;
|
|
2647
2867
|
media: string[];
|
|
2648
2868
|
variants: {
|
|
2649
2869
|
sku: string;
|
|
@@ -2671,11 +2891,11 @@ declare const Product: z.ZodObject<{
|
|
|
2671
2891
|
}, {
|
|
2672
2892
|
sku: string;
|
|
2673
2893
|
title: string;
|
|
2674
|
-
category: string;
|
|
2675
2894
|
price: {
|
|
2676
2895
|
amount: number;
|
|
2677
2896
|
currency: string;
|
|
2678
2897
|
};
|
|
2898
|
+
category: string;
|
|
2679
2899
|
media: string[];
|
|
2680
2900
|
variants: {
|
|
2681
2901
|
sku: string;
|
|
@@ -2777,12 +2997,17 @@ declare type ProductPromo = z.infer<typeof ProductPromo>;
|
|
|
2777
2997
|
* 165:220 image (radius-6) with a TOP PICK flag top-left and a green sale badge
|
|
2778
2998
|
* bottom-left; below sit the title (2-line clamp) and price with a struck was-price.
|
|
2779
2999
|
*/
|
|
2780
|
-
export declare function ProductTile({ product, priority }: ProductTileProps): JSX.Element;
|
|
3000
|
+
export declare function ProductTile({ product, priority, size }: ProductTileProps): JSX.Element;
|
|
2781
3001
|
|
|
2782
3002
|
export declare interface ProductTileProps {
|
|
2783
3003
|
product: Product;
|
|
2784
3004
|
/** Priority-load the image (above-the-fold tiles). */
|
|
2785
3005
|
priority?: boolean;
|
|
3006
|
+
/**
|
|
3007
|
+
* `default` is the 165px rail/grid card. `large` is the full-width spotlight card —
|
|
3008
|
+
* a taller 343:457 image and an 18px title (Figma `size=large`).
|
|
3009
|
+
*/
|
|
3010
|
+
size?: 'default' | 'large';
|
|
2786
3011
|
}
|
|
2787
3012
|
|
|
2788
3013
|
/** `GET /v1/catalog/products` — a single purchasable variant of a product. */
|
|
@@ -2940,10 +3165,17 @@ declare interface Review {
|
|
|
2940
3165
|
author: string;
|
|
2941
3166
|
}
|
|
2942
3167
|
|
|
2943
|
-
/**
|
|
2944
|
-
export declare function ReviewCarousel({ quotes }:
|
|
3168
|
+
/** Tester-quote carousel — swipeable cards with dot pagination. */
|
|
3169
|
+
export declare function ReviewCarousel({ quotes, disclaimer }: ReviewCarouselProps): JSX.Element;
|
|
3170
|
+
|
|
3171
|
+
declare interface ReviewCarouselProps {
|
|
2945
3172
|
quotes: Review[];
|
|
2946
|
-
|
|
3173
|
+
/**
|
|
3174
|
+
* The line that says these are tester quotes rather than customer reviews. The design
|
|
3175
|
+
* makes it mandatory; without it the block is unattributed social proof.
|
|
3176
|
+
*/
|
|
3177
|
+
disclaimer?: string;
|
|
3178
|
+
}
|
|
2947
3179
|
|
|
2948
3180
|
/**
|
|
2949
3181
|
* The single green sale/discount badge (Figma `mobile/badge/sale`): success-soft
|
|
@@ -3026,14 +3258,37 @@ export declare type ShopEvent = {
|
|
|
3026
3258
|
type: 'cart_updated';
|
|
3027
3259
|
itemCount: number;
|
|
3028
3260
|
subtotal: Money;
|
|
3029
|
-
}
|
|
3261
|
+
}
|
|
3262
|
+
/**
|
|
3263
|
+
* Everything past `sku`/`qty` is display metadata (0.7.0), for a host that renders its
|
|
3264
|
+
* own add-to-cart confirmation. Optional and non-identifying: key on `sku`, and expect
|
|
3265
|
+
* any of them to be absent — they come from the catalogue projection, which is a cache.
|
|
3266
|
+
*/
|
|
3267
|
+
| {
|
|
3030
3268
|
type: 'add_to_cart';
|
|
3031
3269
|
sku: string;
|
|
3032
3270
|
qty: number;
|
|
3271
|
+
/** Product name, e.g. `DAZN Hoodie`. Display only. */
|
|
3272
|
+
title?: string;
|
|
3273
|
+
/** Mirror of `attributes.size`. Absent for a product with no size dimension. */
|
|
3274
|
+
size?: string;
|
|
3275
|
+
/** The variant's defining attributes, e.g. `{ colour: 'White', size: 'M' }`. */
|
|
3276
|
+
attributes?: Record<string, string>;
|
|
3277
|
+
/** Variant thumbnail, absolute URL. Absent = render without one. */
|
|
3278
|
+
image?: string;
|
|
3033
3279
|
} | {
|
|
3034
3280
|
type: 'remove_from_cart';
|
|
3035
3281
|
sku: string;
|
|
3036
3282
|
qty: number;
|
|
3283
|
+
}
|
|
3284
|
+
/**
|
|
3285
|
+
* A fan asked to be told when a sold-out SKU returns (0.9.0). The engine records the
|
|
3286
|
+
* interest and raises the message when stock lands; this is the host's chance to
|
|
3287
|
+
* count the demand, which is the number a merchandiser actually wants.
|
|
3288
|
+
*/
|
|
3289
|
+
| {
|
|
3290
|
+
type: 'stock_alert_requested';
|
|
3291
|
+
sku: string;
|
|
3037
3292
|
} | {
|
|
3038
3293
|
type: 'checkout_handoff';
|
|
3039
3294
|
cartId: string;
|
|
@@ -3043,10 +3298,18 @@ export declare type ShopEvent = {
|
|
|
3043
3298
|
action: string;
|
|
3044
3299
|
} | {
|
|
3045
3300
|
type: 'session_expired';
|
|
3046
|
-
}
|
|
3301
|
+
}
|
|
3302
|
+
/**
|
|
3303
|
+
* A message the SDK would have shown, handed over because the host set
|
|
3304
|
+
* `notifications: 'host'`. `description`/`image` (0.7.0) are what the rich toast draws;
|
|
3305
|
+
* a plain error notification has neither.
|
|
3306
|
+
*/
|
|
3307
|
+
| {
|
|
3047
3308
|
type: 'notification';
|
|
3048
3309
|
tone: 'neutral' | 'success' | 'critical';
|
|
3049
3310
|
message: string;
|
|
3311
|
+
description?: string;
|
|
3312
|
+
image?: string;
|
|
3050
3313
|
} | {
|
|
3051
3314
|
type: 'error';
|
|
3052
3315
|
code: ErrorCode | undefined;
|
|
@@ -3064,13 +3327,14 @@ export declare type ShopEvent = {
|
|
|
3064
3327
|
* if the design is ours, and a mismatch if only half of it is.
|
|
3065
3328
|
*
|
|
3066
3329
|
* The cart count is real, never fabricated: `useCartCount` returns `null` until it knows,
|
|
3067
|
-
* and the badge stays hidden
|
|
3068
|
-
*
|
|
3330
|
+
* and the badge stays hidden until then. It is shown at zero, as the design draws it —
|
|
3331
|
+
* `.cart.icon` has an explicit empty state carrying "0" — but a "0" that appears while the
|
|
3332
|
+
* cart is still loading and then jumps to "3" is a guess wearing a number.
|
|
3069
3333
|
*
|
|
3070
3334
|
* Mount it inside `DaznShopProvider`, and inside `CartSheet` if `showCart` is on, since
|
|
3071
3335
|
* the trigger opens that sheet.
|
|
3072
3336
|
*/
|
|
3073
|
-
export declare function ShopHeader({ onBack, onMenu, showCart, backLabel, menuLabel, className, }: ShopHeaderProps): JSX.Element;
|
|
3337
|
+
export declare function ShopHeader({ onBack, onMenu, showCart, floating, backLabel, menuLabel, className, }: ShopHeaderProps): JSX.Element;
|
|
3074
3338
|
|
|
3075
3339
|
export declare interface ShopHeaderProps {
|
|
3076
3340
|
/**
|
|
@@ -3082,6 +3346,14 @@ export declare interface ShopHeaderProps {
|
|
|
3082
3346
|
onMenu?: () => void;
|
|
3083
3347
|
/** The cart icon and its live count. */
|
|
3084
3348
|
showCart?: boolean;
|
|
3349
|
+
/**
|
|
3350
|
+
* Lay the bar over the content instead of above it, with no background of its own.
|
|
3351
|
+
*
|
|
3352
|
+
* For screens whose artwork starts at the top of the display — the category page, where
|
|
3353
|
+
* the hero's own measurements are taken from y=0. The parent must establish a containing
|
|
3354
|
+
* block, and the content beneath must expect nothing reserved for the bar.
|
|
3355
|
+
*/
|
|
3356
|
+
floating?: boolean;
|
|
3085
3357
|
/** Accessible name for the back control, for a host that is not in English. */
|
|
3086
3358
|
backLabel?: string;
|
|
3087
3359
|
menuLabel?: string;
|
|
@@ -3350,12 +3622,38 @@ export declare interface StatusBadgeProps {
|
|
|
3350
3622
|
}
|
|
3351
3623
|
|
|
3352
3624
|
/** Bottom-pinned CTA bar, safe-area aware. Holds one or two primary actions. */
|
|
3353
|
-
export declare function StickyCtaBar({ children, info }: StickyCtaBarProps): JSX.Element;
|
|
3625
|
+
export declare function StickyCtaBar({ children, info, variant }: StickyCtaBarProps): JSX.Element;
|
|
3354
3626
|
|
|
3355
3627
|
export declare interface StickyCtaBarProps {
|
|
3356
3628
|
children: ReactNode;
|
|
3357
3629
|
/** Optional content shown above the actions (e.g. a total). */
|
|
3358
3630
|
info?: ReactNode;
|
|
3631
|
+
/**
|
|
3632
|
+
* `floating` (default) is the PDP bar: rounded top, drop shadow. `divider` is the cart
|
|
3633
|
+
* bar: square, hairline top border. Two different frames in Figma, not a preference.
|
|
3634
|
+
*/
|
|
3635
|
+
variant?: 'floating' | 'divider';
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
/** `POST /v1/stock-alerts` — tell me when this is buyable again. */
|
|
3639
|
+
declare const StockAlertRequest: z.ZodObject<{
|
|
3640
|
+
/**
|
|
3641
|
+
* The variant a fan actually wants, when one is resolvable — a fan who chose Black /
|
|
3642
|
+
* M does not want telling that White / L came back. The parent product SKU is
|
|
3643
|
+
* accepted and means "any variant of this product".
|
|
3644
|
+
*/
|
|
3645
|
+
sku: z.ZodString;
|
|
3646
|
+
}, "strict", z.ZodTypeAny, {
|
|
3647
|
+
sku: string;
|
|
3648
|
+
}, {
|
|
3649
|
+
sku: string;
|
|
3650
|
+
}>;
|
|
3651
|
+
|
|
3652
|
+
declare type StockAlertRequest = z.infer<typeof StockAlertRequest>;
|
|
3653
|
+
|
|
3654
|
+
declare interface SummaryRow {
|
|
3655
|
+
label: string;
|
|
3656
|
+
key: keyof Pricing;
|
|
3359
3657
|
}
|
|
3360
3658
|
|
|
3361
3659
|
export declare function swatchColour(name: string): string;
|
|
@@ -3366,8 +3664,22 @@ export declare interface ToastAction {
|
|
|
3366
3664
|
onAction: () => void;
|
|
3367
3665
|
}
|
|
3368
3666
|
|
|
3667
|
+
/**
|
|
3668
|
+
* `show` takes a tone or an options object as its second argument. The positional form
|
|
3669
|
+
* stays because it is public API and DAZN are integrated against 0.6.x.
|
|
3670
|
+
*/
|
|
3369
3671
|
declare interface ToastApi {
|
|
3370
|
-
show: (message: string,
|
|
3672
|
+
show: (message: string, toneOrOptions?: ToastTone | ToastOptions, action?: ToastAction) => void;
|
|
3673
|
+
}
|
|
3674
|
+
|
|
3675
|
+
/** The richer toast: Figma `toast-added-to-cart`. Both fields optional and independent. */
|
|
3676
|
+
declare interface ToastOptions {
|
|
3677
|
+
tone?: ToastTone;
|
|
3678
|
+
action?: ToastAction;
|
|
3679
|
+
/** Second line, quieter and smaller — e.g. `DAZN Hoodie · Size M`. */
|
|
3680
|
+
description?: string;
|
|
3681
|
+
/** 40×40 thumbnail. Decorative, so never given alt text. */
|
|
3682
|
+
image?: string;
|
|
3371
3683
|
}
|
|
3372
3684
|
|
|
3373
3685
|
export declare function ToastProvider({ children }: {
|
|
@@ -3516,12 +3828,17 @@ export declare interface VariantSelectorProps {
|
|
|
3516
3828
|
labelAttribute?: string;
|
|
3517
3829
|
}
|
|
3518
3830
|
|
|
3519
|
-
/** "Why shop with us" reassurance
|
|
3831
|
+
/** "Why shop with us" reassurance tiles. */
|
|
3520
3832
|
export declare function WhyUs({ items }: {
|
|
3521
3833
|
items: WhyUsItem[];
|
|
3522
3834
|
}): JSX.Element;
|
|
3523
3835
|
|
|
3524
3836
|
declare interface WhyUsItem {
|
|
3837
|
+
/**
|
|
3838
|
+
* Accepted and ignored. The built design carries no icons — only the component's own
|
|
3839
|
+
* description still mentions them, and it predates the frame. Kept so a host passing it
|
|
3840
|
+
* does not break.
|
|
3841
|
+
*/
|
|
3525
3842
|
icon?: 'payment' | 'delivery' | 'returns';
|
|
3526
3843
|
title: string;
|
|
3527
3844
|
body: string;
|