@nok-integration/storefront-react 0.20.17 → 0.21.1
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 +320 -41
- package/dist/index.mjs +903 -539
- package/dist/standalone/storefront.mjs +903 -539
- package/dist/standalone/styles.css +71 -0
- package/dist/styles.css +71 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,15 +23,15 @@ declare type AddCartItemRequest = z.infer<typeof AddCartItemRequest>;
|
|
|
23
23
|
|
|
24
24
|
/** The `error` member — a machine `code`, a human `message`, and optional `details`. */
|
|
25
25
|
declare const ApiErrorBody: z.ZodObject<{
|
|
26
|
-
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", "support_ticket_not_found", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
26
|
+
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", "support_ticket_not_found", "vip_invite_not_found", "vip_cart_conflict", "vip_invite_mismatch", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
27
27
|
message: z.ZodString;
|
|
28
28
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
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" | "support_ticket_not_found" | "size_chart_not_found" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
30
|
+
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" | "support_ticket_not_found" | "vip_invite_not_found" | "vip_cart_conflict" | "vip_invite_mismatch" | "size_chart_not_found" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
31
31
|
message: string;
|
|
32
32
|
details?: Record<string, unknown> | undefined;
|
|
33
33
|
}, {
|
|
34
|
-
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" | "support_ticket_not_found" | "size_chart_not_found" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
34
|
+
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" | "support_ticket_not_found" | "vip_invite_not_found" | "vip_cart_conflict" | "vip_invite_mismatch" | "size_chart_not_found" | "forbidden" | "invalid_transition" | "rate_limited" | "server_error";
|
|
35
35
|
message: string;
|
|
36
36
|
details?: Record<string, unknown> | undefined;
|
|
37
37
|
}>;
|
|
@@ -194,12 +194,12 @@ declare const CartItem: z.ZodObject<{
|
|
|
194
194
|
amount: number;
|
|
195
195
|
currency: string;
|
|
196
196
|
};
|
|
197
|
+
image?: string | undefined;
|
|
197
198
|
compare_at_unit_price?: {
|
|
198
199
|
amount: number;
|
|
199
200
|
currency: string;
|
|
200
201
|
} | undefined;
|
|
201
202
|
title?: string | undefined;
|
|
202
|
-
image?: string | undefined;
|
|
203
203
|
attributes?: Record<string, string> | undefined;
|
|
204
204
|
available?: number | undefined;
|
|
205
205
|
}, {
|
|
@@ -213,12 +213,12 @@ declare const CartItem: z.ZodObject<{
|
|
|
213
213
|
amount: number;
|
|
214
214
|
currency: string;
|
|
215
215
|
};
|
|
216
|
+
image?: string | undefined;
|
|
216
217
|
compare_at_unit_price?: {
|
|
217
218
|
amount: number;
|
|
218
219
|
currency: string;
|
|
219
220
|
} | undefined;
|
|
220
221
|
title?: string | undefined;
|
|
221
|
-
image?: string | undefined;
|
|
222
222
|
attributes?: Record<string, string> | undefined;
|
|
223
223
|
available?: number | undefined;
|
|
224
224
|
}>;
|
|
@@ -1621,25 +1621,25 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1621
1621
|
title: z.ZodString;
|
|
1622
1622
|
body: z.ZodString;
|
|
1623
1623
|
}, "strip", z.ZodTypeAny, {
|
|
1624
|
-
title: string;
|
|
1625
1624
|
body: string;
|
|
1625
|
+
title: string;
|
|
1626
1626
|
icon?: "payment" | "delivery" | "returns" | undefined;
|
|
1627
1627
|
}, {
|
|
1628
|
-
title: string;
|
|
1629
1628
|
body: string;
|
|
1629
|
+
title: string;
|
|
1630
1630
|
icon?: "payment" | "delivery" | "returns" | undefined;
|
|
1631
1631
|
}>, "many">;
|
|
1632
1632
|
}, "strip", z.ZodTypeAny, {
|
|
1633
1633
|
items: {
|
|
1634
|
-
title: string;
|
|
1635
1634
|
body: string;
|
|
1635
|
+
title: string;
|
|
1636
1636
|
icon?: "payment" | "delivery" | "returns" | undefined;
|
|
1637
1637
|
}[];
|
|
1638
1638
|
kind: "why_us";
|
|
1639
1639
|
}, {
|
|
1640
1640
|
items: {
|
|
1641
|
-
title: string;
|
|
1642
1641
|
body: string;
|
|
1642
|
+
title: string;
|
|
1643
1643
|
icon?: "payment" | "delivery" | "returns" | undefined;
|
|
1644
1644
|
}[];
|
|
1645
1645
|
kind: "why_us";
|
|
@@ -1830,8 +1830,8 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1830
1830
|
disclaimer?: string | undefined;
|
|
1831
1831
|
} | {
|
|
1832
1832
|
items: {
|
|
1833
|
-
title: string;
|
|
1834
1833
|
body: string;
|
|
1834
|
+
title: string;
|
|
1835
1835
|
icon?: "payment" | "delivery" | "returns" | undefined;
|
|
1836
1836
|
}[];
|
|
1837
1837
|
kind: "why_us";
|
|
@@ -2047,8 +2047,8 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
2047
2047
|
disclaimer?: string | undefined;
|
|
2048
2048
|
} | {
|
|
2049
2049
|
items: {
|
|
2050
|
-
title: string;
|
|
2051
2050
|
body: string;
|
|
2051
|
+
title: string;
|
|
2052
2052
|
icon?: "payment" | "delivery" | "returns" | undefined;
|
|
2053
2053
|
}[];
|
|
2054
2054
|
kind: "why_us";
|
|
@@ -2684,8 +2684,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2684
2684
|
} | undefined;
|
|
2685
2685
|
};
|
|
2686
2686
|
locked?: {
|
|
2687
|
-
since: string;
|
|
2688
2687
|
reason: "checkout_handoff";
|
|
2688
|
+
since: string;
|
|
2689
2689
|
expires_at?: string | undefined;
|
|
2690
2690
|
} | undefined;
|
|
2691
2691
|
hold?: {
|
|
@@ -2693,6 +2693,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2693
2693
|
taken_at: string;
|
|
2694
2694
|
} | undefined;
|
|
2695
2695
|
hidden_lines?: ("shipping" | "tax")[] | undefined;
|
|
2696
|
+
vip?: {
|
|
2697
|
+
invite_ref: string;
|
|
2698
|
+
} | undefined;
|
|
2696
2699
|
}>;
|
|
2697
2700
|
get: (query?: CartMarketQuery) => Promise<{
|
|
2698
2701
|
currency: string;
|
|
@@ -2740,8 +2743,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2740
2743
|
} | undefined;
|
|
2741
2744
|
};
|
|
2742
2745
|
locked?: {
|
|
2743
|
-
since: string;
|
|
2744
2746
|
reason: "checkout_handoff";
|
|
2747
|
+
since: string;
|
|
2745
2748
|
expires_at?: string | undefined;
|
|
2746
2749
|
} | undefined;
|
|
2747
2750
|
hold?: {
|
|
@@ -2749,6 +2752,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2749
2752
|
taken_at: string;
|
|
2750
2753
|
} | undefined;
|
|
2751
2754
|
hidden_lines?: ("shipping" | "tax")[] | undefined;
|
|
2755
|
+
vip?: {
|
|
2756
|
+
invite_ref: string;
|
|
2757
|
+
} | undefined;
|
|
2752
2758
|
}>;
|
|
2753
2759
|
addItem: (body: AddCartItemRequest, query?: CartMarketQuery) => Promise<{
|
|
2754
2760
|
currency: string;
|
|
@@ -2796,8 +2802,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2796
2802
|
} | undefined;
|
|
2797
2803
|
};
|
|
2798
2804
|
locked?: {
|
|
2799
|
-
since: string;
|
|
2800
2805
|
reason: "checkout_handoff";
|
|
2806
|
+
since: string;
|
|
2801
2807
|
expires_at?: string | undefined;
|
|
2802
2808
|
} | undefined;
|
|
2803
2809
|
hold?: {
|
|
@@ -2805,6 +2811,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2805
2811
|
taken_at: string;
|
|
2806
2812
|
} | undefined;
|
|
2807
2813
|
hidden_lines?: ("shipping" | "tax")[] | undefined;
|
|
2814
|
+
vip?: {
|
|
2815
|
+
invite_ref: string;
|
|
2816
|
+
} | undefined;
|
|
2808
2817
|
}>;
|
|
2809
2818
|
updateItem: (sku: string, body: UpdateCartItemRequest, query?: CartMarketQuery) => Promise<{
|
|
2810
2819
|
currency: string;
|
|
@@ -2852,8 +2861,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2852
2861
|
} | undefined;
|
|
2853
2862
|
};
|
|
2854
2863
|
locked?: {
|
|
2855
|
-
since: string;
|
|
2856
2864
|
reason: "checkout_handoff";
|
|
2865
|
+
since: string;
|
|
2857
2866
|
expires_at?: string | undefined;
|
|
2858
2867
|
} | undefined;
|
|
2859
2868
|
hold?: {
|
|
@@ -2861,6 +2870,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2861
2870
|
taken_at: string;
|
|
2862
2871
|
} | undefined;
|
|
2863
2872
|
hidden_lines?: ("shipping" | "tax")[] | undefined;
|
|
2873
|
+
vip?: {
|
|
2874
|
+
invite_ref: string;
|
|
2875
|
+
} | undefined;
|
|
2864
2876
|
}>;
|
|
2865
2877
|
removeItem: (sku: string, query?: CartMarketQuery) => Promise<{
|
|
2866
2878
|
currency: string;
|
|
@@ -2908,8 +2920,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2908
2920
|
} | undefined;
|
|
2909
2921
|
};
|
|
2910
2922
|
locked?: {
|
|
2911
|
-
since: string;
|
|
2912
2923
|
reason: "checkout_handoff";
|
|
2924
|
+
since: string;
|
|
2913
2925
|
expires_at?: string | undefined;
|
|
2914
2926
|
} | undefined;
|
|
2915
2927
|
hold?: {
|
|
@@ -2917,6 +2929,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2917
2929
|
taken_at: string;
|
|
2918
2930
|
} | undefined;
|
|
2919
2931
|
hidden_lines?: ("shipping" | "tax")[] | undefined;
|
|
2932
|
+
vip?: {
|
|
2933
|
+
invite_ref: string;
|
|
2934
|
+
} | undefined;
|
|
2920
2935
|
}>;
|
|
2921
2936
|
/**
|
|
2922
2937
|
* Hand the cart to DAZN checkout and get the URL to send the fan to.
|
|
@@ -2949,9 +2964,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2949
2964
|
amount: number;
|
|
2950
2965
|
currency: string;
|
|
2951
2966
|
};
|
|
2967
|
+
headline: string;
|
|
2952
2968
|
order_ref: string;
|
|
2953
2969
|
placed_at: string;
|
|
2954
|
-
headline: string;
|
|
2955
2970
|
item_count: number;
|
|
2956
2971
|
image?: string | undefined;
|
|
2957
2972
|
images?: string[] | undefined;
|
|
@@ -2964,8 +2979,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2964
2979
|
};
|
|
2965
2980
|
status: "reported" | "package_received" | "completed";
|
|
2966
2981
|
currency: string;
|
|
2967
|
-
order_ref: string;
|
|
2968
2982
|
headline: string;
|
|
2983
|
+
order_ref: string;
|
|
2969
2984
|
item_count: number;
|
|
2970
2985
|
return_ref: string;
|
|
2971
2986
|
reported_at: string;
|
|
@@ -2998,6 +3013,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2998
3013
|
} | undefined;
|
|
2999
3014
|
returned_qty?: number | undefined;
|
|
3000
3015
|
}[];
|
|
3016
|
+
headline: string;
|
|
3001
3017
|
totals: {
|
|
3002
3018
|
shipping: {
|
|
3003
3019
|
amount: number;
|
|
@@ -3031,7 +3047,6 @@ declare function createClient(options: ClientOptions): {
|
|
|
3031
3047
|
line2?: string | undefined;
|
|
3032
3048
|
region?: string | undefined;
|
|
3033
3049
|
};
|
|
3034
|
-
headline: string;
|
|
3035
3050
|
progress: {
|
|
3036
3051
|
label: string;
|
|
3037
3052
|
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
@@ -3048,6 +3063,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
3048
3063
|
return_ref: string;
|
|
3049
3064
|
reported_at: string;
|
|
3050
3065
|
}[] | undefined;
|
|
3066
|
+
vip?: {
|
|
3067
|
+
invite_ref: string;
|
|
3068
|
+
} | undefined;
|
|
3051
3069
|
estimated_delivery?: {
|
|
3052
3070
|
from: string;
|
|
3053
3071
|
to: string;
|
|
@@ -3092,6 +3110,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
3092
3110
|
} | undefined;
|
|
3093
3111
|
returned_qty?: number | undefined;
|
|
3094
3112
|
}[];
|
|
3113
|
+
headline: string;
|
|
3095
3114
|
totals: {
|
|
3096
3115
|
shipping: {
|
|
3097
3116
|
amount: number;
|
|
@@ -3125,7 +3144,6 @@ declare function createClient(options: ClientOptions): {
|
|
|
3125
3144
|
line2?: string | undefined;
|
|
3126
3145
|
region?: string | undefined;
|
|
3127
3146
|
};
|
|
3128
|
-
headline: string;
|
|
3129
3147
|
progress: {
|
|
3130
3148
|
label: string;
|
|
3131
3149
|
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
@@ -3142,6 +3160,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
3142
3160
|
return_ref: string;
|
|
3143
3161
|
reported_at: string;
|
|
3144
3162
|
}[] | undefined;
|
|
3163
|
+
vip?: {
|
|
3164
|
+
invite_ref: string;
|
|
3165
|
+
} | undefined;
|
|
3145
3166
|
estimated_delivery?: {
|
|
3146
3167
|
from: string;
|
|
3147
3168
|
to: string;
|
|
@@ -3160,11 +3181,11 @@ declare function createClient(options: ClientOptions): {
|
|
|
3160
3181
|
items: {
|
|
3161
3182
|
sku: string;
|
|
3162
3183
|
qty: number;
|
|
3184
|
+
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
3163
3185
|
unit_price: {
|
|
3164
3186
|
amount: number;
|
|
3165
3187
|
currency: string;
|
|
3166
3188
|
};
|
|
3167
|
-
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
3168
3189
|
line_ref: string;
|
|
3169
3190
|
attributes?: Record<string, string> | undefined;
|
|
3170
3191
|
image?: string | undefined;
|
|
@@ -3193,11 +3214,11 @@ declare function createClient(options: ClientOptions): {
|
|
|
3193
3214
|
items: {
|
|
3194
3215
|
sku: string;
|
|
3195
3216
|
qty: number;
|
|
3217
|
+
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
3196
3218
|
unit_price: {
|
|
3197
3219
|
amount: number;
|
|
3198
3220
|
currency: string;
|
|
3199
3221
|
};
|
|
3200
|
-
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
3201
3222
|
line_ref: string;
|
|
3202
3223
|
attributes?: Record<string, string> | undefined;
|
|
3203
3224
|
image?: string | undefined;
|
|
@@ -3244,6 +3265,94 @@ declare function createClient(options: ClientOptions): {
|
|
|
3244
3265
|
created_at: string;
|
|
3245
3266
|
}>;
|
|
3246
3267
|
};
|
|
3268
|
+
vip: {
|
|
3269
|
+
resolve: (token: string, query?: CartMarketQuery) => Promise<{
|
|
3270
|
+
items: {
|
|
3271
|
+
product_sku: string;
|
|
3272
|
+
quantity: number;
|
|
3273
|
+
}[];
|
|
3274
|
+
state: "active";
|
|
3275
|
+
invite_ref: string;
|
|
3276
|
+
recipient_name: string;
|
|
3277
|
+
personal_message: string | null;
|
|
3278
|
+
delivery_rule: "both_free" | "standard_free" | "both_paid";
|
|
3279
|
+
expires_at: string;
|
|
3280
|
+
hero?: {
|
|
3281
|
+
image: string | null;
|
|
3282
|
+
body: string | null;
|
|
3283
|
+
headline: string;
|
|
3284
|
+
cta_label: string;
|
|
3285
|
+
} | null | undefined;
|
|
3286
|
+
} | {
|
|
3287
|
+
state: "scheduled";
|
|
3288
|
+
opens_at: string;
|
|
3289
|
+
} | {
|
|
3290
|
+
state: "claimed";
|
|
3291
|
+
} | {
|
|
3292
|
+
state: "expired";
|
|
3293
|
+
} | {
|
|
3294
|
+
state: "revoked";
|
|
3295
|
+
}>;
|
|
3296
|
+
addToCart: (body: VipCartItemRequest, query?: CartMarketQuery) => Promise<{
|
|
3297
|
+
currency: string;
|
|
3298
|
+
items: {
|
|
3299
|
+
sku: string;
|
|
3300
|
+
qty: number;
|
|
3301
|
+
unit_price: {
|
|
3302
|
+
amount: number;
|
|
3303
|
+
currency: string;
|
|
3304
|
+
};
|
|
3305
|
+
line_total: {
|
|
3306
|
+
amount: number;
|
|
3307
|
+
currency: string;
|
|
3308
|
+
};
|
|
3309
|
+
attributes?: Record<string, string> | undefined;
|
|
3310
|
+
image?: string | undefined;
|
|
3311
|
+
available?: number | undefined;
|
|
3312
|
+
title?: string | undefined;
|
|
3313
|
+
compare_at_unit_price?: {
|
|
3314
|
+
amount: number;
|
|
3315
|
+
currency: string;
|
|
3316
|
+
} | undefined;
|
|
3317
|
+
}[];
|
|
3318
|
+
cart_id: string;
|
|
3319
|
+
totals: {
|
|
3320
|
+
subtotal: {
|
|
3321
|
+
amount: number;
|
|
3322
|
+
currency: string;
|
|
3323
|
+
};
|
|
3324
|
+
shipping: {
|
|
3325
|
+
amount: number;
|
|
3326
|
+
currency: string;
|
|
3327
|
+
};
|
|
3328
|
+
tax: {
|
|
3329
|
+
amount: number;
|
|
3330
|
+
currency: string;
|
|
3331
|
+
};
|
|
3332
|
+
total: {
|
|
3333
|
+
amount: number;
|
|
3334
|
+
currency: string;
|
|
3335
|
+
};
|
|
3336
|
+
discount?: {
|
|
3337
|
+
amount: number;
|
|
3338
|
+
currency: string;
|
|
3339
|
+
} | undefined;
|
|
3340
|
+
};
|
|
3341
|
+
locked?: {
|
|
3342
|
+
reason: "checkout_handoff";
|
|
3343
|
+
since: string;
|
|
3344
|
+
expires_at?: string | undefined;
|
|
3345
|
+
} | undefined;
|
|
3346
|
+
hold?: {
|
|
3347
|
+
expires_at: string;
|
|
3348
|
+
taken_at: string;
|
|
3349
|
+
} | undefined;
|
|
3350
|
+
hidden_lines?: ("shipping" | "tax")[] | undefined;
|
|
3351
|
+
vip?: {
|
|
3352
|
+
invite_ref: string;
|
|
3353
|
+
} | undefined;
|
|
3354
|
+
}>;
|
|
3355
|
+
};
|
|
3247
3356
|
auth: {
|
|
3248
3357
|
/** Exchange a single-use DAZN identity JWT for a session (sets the cookie). */
|
|
3249
3358
|
exchangeSession: (body: SessionExchangeRequest) => Promise<{
|
|
@@ -3449,7 +3558,7 @@ export declare interface EmptyStateProps {
|
|
|
3449
3558
|
* | rate_limited | 429 | too many requests |
|
|
3450
3559
|
* | server_error | 500 | unexpected error (safe to retry idempotent) |
|
|
3451
3560
|
*/
|
|
3452
|
-
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", "support_ticket_not_found", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
3561
|
+
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", "support_ticket_not_found", "vip_invite_not_found", "vip_cart_conflict", "vip_invite_mismatch", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
3453
3562
|
|
|
3454
3563
|
declare type ErrorCode = z.infer<typeof ErrorCode>;
|
|
3455
3564
|
|
|
@@ -3472,7 +3581,7 @@ declare type ErrorCode = z.infer<typeof ErrorCode>;
|
|
|
3472
3581
|
* | rate_limited | 429 | too many requests |
|
|
3473
3582
|
* | server_error | 500 | unexpected error (safe to retry idempotent) |
|
|
3474
3583
|
*/
|
|
3475
|
-
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", "support_ticket_not_found", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
3584
|
+
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", "support_ticket_not_found", "vip_invite_not_found", "vip_cart_conflict", "vip_invite_mismatch", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]>;
|
|
3476
3585
|
|
|
3477
3586
|
declare type ErrorCode_2 = z.infer<typeof ErrorCode_2>;
|
|
3478
3587
|
|
|
@@ -3963,12 +4072,12 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
3963
4072
|
line_ref: string;
|
|
3964
4073
|
cancelled_qty: number;
|
|
3965
4074
|
refunded_qty: number;
|
|
4075
|
+
image?: string | undefined;
|
|
3966
4076
|
compare_at_unit_price?: {
|
|
3967
4077
|
amount: number;
|
|
3968
4078
|
currency: string;
|
|
3969
4079
|
} | undefined;
|
|
3970
4080
|
title?: string | undefined;
|
|
3971
|
-
image?: string | undefined;
|
|
3972
4081
|
attributes?: Record<string, string> | undefined;
|
|
3973
4082
|
returned_qty?: number | undefined;
|
|
3974
4083
|
}, {
|
|
@@ -3985,12 +4094,12 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
3985
4094
|
line_ref: string;
|
|
3986
4095
|
cancelled_qty: number;
|
|
3987
4096
|
refunded_qty: number;
|
|
4097
|
+
image?: string | undefined;
|
|
3988
4098
|
compare_at_unit_price?: {
|
|
3989
4099
|
amount: number;
|
|
3990
4100
|
currency: string;
|
|
3991
4101
|
} | undefined;
|
|
3992
4102
|
title?: string | undefined;
|
|
3993
|
-
image?: string | undefined;
|
|
3994
4103
|
attributes?: Record<string, string> | undefined;
|
|
3995
4104
|
returned_qty?: number | undefined;
|
|
3996
4105
|
}>, "many">;
|
|
@@ -4149,9 +4258,18 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4149
4258
|
return_ref: string;
|
|
4150
4259
|
reported_at: string;
|
|
4151
4260
|
}>, "many">>;
|
|
4261
|
+
/** Present when the order was claimed under a VIP invite. It cannot be ordered again. */
|
|
4262
|
+
vip: z.ZodOptional<z.ZodObject<{
|
|
4263
|
+
invite_ref: z.ZodBranded<z.ZodString, "VipInviteRef">;
|
|
4264
|
+
}, "strip", z.ZodTypeAny, {
|
|
4265
|
+
invite_ref: string & z.BRAND<"VipInviteRef">;
|
|
4266
|
+
}, {
|
|
4267
|
+
invite_ref: string;
|
|
4268
|
+
}>>;
|
|
4152
4269
|
}, "strip", z.ZodTypeAny, {
|
|
4153
4270
|
status: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
4154
4271
|
currency: string;
|
|
4272
|
+
headline: string;
|
|
4155
4273
|
items: {
|
|
4156
4274
|
sku: string;
|
|
4157
4275
|
qty: number;
|
|
@@ -4166,12 +4284,12 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4166
4284
|
line_ref: string;
|
|
4167
4285
|
cancelled_qty: number;
|
|
4168
4286
|
refunded_qty: number;
|
|
4287
|
+
image?: string | undefined;
|
|
4169
4288
|
compare_at_unit_price?: {
|
|
4170
4289
|
amount: number;
|
|
4171
4290
|
currency: string;
|
|
4172
4291
|
} | undefined;
|
|
4173
4292
|
title?: string | undefined;
|
|
4174
|
-
image?: string | undefined;
|
|
4175
4293
|
attributes?: Record<string, string> | undefined;
|
|
4176
4294
|
returned_qty?: number | undefined;
|
|
4177
4295
|
}[];
|
|
@@ -4208,7 +4326,6 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4208
4326
|
line2?: string | undefined;
|
|
4209
4327
|
region?: string | undefined;
|
|
4210
4328
|
};
|
|
4211
|
-
headline: string;
|
|
4212
4329
|
progress: {
|
|
4213
4330
|
label: string;
|
|
4214
4331
|
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
@@ -4216,6 +4333,9 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4216
4333
|
at?: string | undefined;
|
|
4217
4334
|
}[];
|
|
4218
4335
|
email?: string | undefined;
|
|
4336
|
+
vip?: {
|
|
4337
|
+
invite_ref: string & z.BRAND<"VipInviteRef">;
|
|
4338
|
+
} | undefined;
|
|
4219
4339
|
payment?: {
|
|
4220
4340
|
brand: string;
|
|
4221
4341
|
last4?: string | undefined;
|
|
@@ -4239,6 +4359,7 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4239
4359
|
}, {
|
|
4240
4360
|
status: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
4241
4361
|
currency: string;
|
|
4362
|
+
headline: string;
|
|
4242
4363
|
items: {
|
|
4243
4364
|
sku: string;
|
|
4244
4365
|
qty: number;
|
|
@@ -4253,12 +4374,12 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4253
4374
|
line_ref: string;
|
|
4254
4375
|
cancelled_qty: number;
|
|
4255
4376
|
refunded_qty: number;
|
|
4377
|
+
image?: string | undefined;
|
|
4256
4378
|
compare_at_unit_price?: {
|
|
4257
4379
|
amount: number;
|
|
4258
4380
|
currency: string;
|
|
4259
4381
|
} | undefined;
|
|
4260
4382
|
title?: string | undefined;
|
|
4261
|
-
image?: string | undefined;
|
|
4262
4383
|
attributes?: Record<string, string> | undefined;
|
|
4263
4384
|
returned_qty?: number | undefined;
|
|
4264
4385
|
}[];
|
|
@@ -4295,7 +4416,6 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4295
4416
|
line2?: string | undefined;
|
|
4296
4417
|
region?: string | undefined;
|
|
4297
4418
|
};
|
|
4298
|
-
headline: string;
|
|
4299
4419
|
progress: {
|
|
4300
4420
|
label: string;
|
|
4301
4421
|
step: "packing" | "on_its_way" | "out_for_delivery" | "delivered" | "cancelled";
|
|
@@ -4303,6 +4423,9 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4303
4423
|
at?: string | undefined;
|
|
4304
4424
|
}[];
|
|
4305
4425
|
email?: string | undefined;
|
|
4426
|
+
vip?: {
|
|
4427
|
+
invite_ref: string;
|
|
4428
|
+
} | undefined;
|
|
4306
4429
|
payment?: {
|
|
4307
4430
|
brand: string;
|
|
4308
4431
|
last4?: string | undefined;
|
|
@@ -4955,13 +5078,18 @@ declare class ProductCache {
|
|
|
4955
5078
|
* the size error). Add-to-cart calls the engine through the session so a 401 silently
|
|
4956
5079
|
* re-handshakes.
|
|
4957
5080
|
*/
|
|
4958
|
-
export declare function ProductDetail({ product, inventory, recommendations }: ProductDetailProps): JSX.Element;
|
|
5081
|
+
export declare function ProductDetail({ product, inventory, recommendations, claim, }: ProductDetailProps): JSX.Element;
|
|
4959
5082
|
|
|
4960
5083
|
export declare interface ProductDetailProps {
|
|
4961
5084
|
product: Product;
|
|
4962
5085
|
inventory: Inventory | null;
|
|
4963
5086
|
/** "You may also like" rail — related products from the engine. Empty = rail hidden. */
|
|
4964
5087
|
recommendations?: Product[];
|
|
5088
|
+
/**
|
|
5089
|
+
* Turns the page into a VIP invite's product: free, its regular price struck through, and
|
|
5090
|
+
* "Claim yours" in place of add-to-cart. Called with the chosen variant's SKU.
|
|
5091
|
+
*/
|
|
5092
|
+
claim?: (sku: string) => Promise<void>;
|
|
4965
5093
|
}
|
|
4966
5094
|
|
|
4967
5095
|
/**
|
|
@@ -5358,34 +5486,34 @@ declare const ReturnDetail: z.ZodObject<{
|
|
|
5358
5486
|
}, "strip", z.ZodTypeAny, {
|
|
5359
5487
|
sku: string;
|
|
5360
5488
|
qty: number;
|
|
5489
|
+
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5361
5490
|
unit_price: {
|
|
5362
5491
|
amount: number;
|
|
5363
5492
|
currency: string;
|
|
5364
5493
|
};
|
|
5365
|
-
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5366
5494
|
line_ref: string;
|
|
5495
|
+
image?: string | undefined;
|
|
5367
5496
|
compare_at_unit_price?: {
|
|
5368
5497
|
amount: number;
|
|
5369
5498
|
currency: string;
|
|
5370
5499
|
} | undefined;
|
|
5371
5500
|
title?: string | undefined;
|
|
5372
|
-
image?: string | undefined;
|
|
5373
5501
|
attributes?: Record<string, string> | undefined;
|
|
5374
5502
|
}, {
|
|
5375
5503
|
sku: string;
|
|
5376
5504
|
qty: number;
|
|
5505
|
+
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5377
5506
|
unit_price: {
|
|
5378
5507
|
amount: number;
|
|
5379
5508
|
currency: string;
|
|
5380
5509
|
};
|
|
5381
|
-
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5382
5510
|
line_ref: string;
|
|
5511
|
+
image?: string | undefined;
|
|
5383
5512
|
compare_at_unit_price?: {
|
|
5384
5513
|
amount: number;
|
|
5385
5514
|
currency: string;
|
|
5386
5515
|
} | undefined;
|
|
5387
5516
|
title?: string | undefined;
|
|
5388
|
-
image?: string | undefined;
|
|
5389
5517
|
attributes?: Record<string, string> | undefined;
|
|
5390
5518
|
}>, "many">;
|
|
5391
5519
|
label_url: z.ZodOptional<z.ZodString>;
|
|
@@ -5399,18 +5527,18 @@ declare const ReturnDetail: z.ZodObject<{
|
|
|
5399
5527
|
items: {
|
|
5400
5528
|
sku: string;
|
|
5401
5529
|
qty: number;
|
|
5530
|
+
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5402
5531
|
unit_price: {
|
|
5403
5532
|
amount: number;
|
|
5404
5533
|
currency: string;
|
|
5405
5534
|
};
|
|
5406
|
-
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5407
5535
|
line_ref: string;
|
|
5536
|
+
image?: string | undefined;
|
|
5408
5537
|
compare_at_unit_price?: {
|
|
5409
5538
|
amount: number;
|
|
5410
5539
|
currency: string;
|
|
5411
5540
|
} | undefined;
|
|
5412
5541
|
title?: string | undefined;
|
|
5413
|
-
image?: string | undefined;
|
|
5414
5542
|
attributes?: Record<string, string> | undefined;
|
|
5415
5543
|
}[];
|
|
5416
5544
|
order_ref: string & z.BRAND<"OrderRef">;
|
|
@@ -5429,18 +5557,18 @@ declare const ReturnDetail: z.ZodObject<{
|
|
|
5429
5557
|
items: {
|
|
5430
5558
|
sku: string;
|
|
5431
5559
|
qty: number;
|
|
5560
|
+
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5432
5561
|
unit_price: {
|
|
5433
5562
|
amount: number;
|
|
5434
5563
|
currency: string;
|
|
5435
5564
|
};
|
|
5436
|
-
reason: "too_small" | "changed_my_mind" | "too_large" | "arrived_too_late" | "item_damaged" | "not_as_described";
|
|
5437
5565
|
line_ref: string;
|
|
5566
|
+
image?: string | undefined;
|
|
5438
5567
|
compare_at_unit_price?: {
|
|
5439
5568
|
amount: number;
|
|
5440
5569
|
currency: string;
|
|
5441
5570
|
} | undefined;
|
|
5442
5571
|
title?: string | undefined;
|
|
5443
|
-
image?: string | undefined;
|
|
5444
5572
|
attributes?: Record<string, string> | undefined;
|
|
5445
5573
|
}[];
|
|
5446
5574
|
order_ref: string;
|
|
@@ -6427,14 +6555,14 @@ declare const SupportTicketRequest: z.ZodObject<{
|
|
|
6427
6555
|
email: string;
|
|
6428
6556
|
description: string;
|
|
6429
6557
|
category: string;
|
|
6430
|
-
image_url?: string | undefined;
|
|
6431
6558
|
dazn_user_id?: string | undefined;
|
|
6559
|
+
image_url?: string | undefined;
|
|
6432
6560
|
}, {
|
|
6433
6561
|
email: string;
|
|
6434
6562
|
description: string;
|
|
6435
6563
|
category: string;
|
|
6436
|
-
image_url?: string | undefined;
|
|
6437
6564
|
dazn_user_id?: string | undefined;
|
|
6565
|
+
image_url?: string | undefined;
|
|
6438
6566
|
}>;
|
|
6439
6567
|
|
|
6440
6568
|
declare type SupportTicketRequest = z.infer<typeof SupportTicketRequest>;
|
|
@@ -6687,6 +6815,157 @@ export declare interface VariantSelectorProps {
|
|
|
6687
6815
|
labelAttribute?: string;
|
|
6688
6816
|
}
|
|
6689
6817
|
|
|
6818
|
+
declare const VipCartItemRequest: z.ZodObject<{
|
|
6819
|
+
token: z.ZodString;
|
|
6820
|
+
sku: z.ZodString;
|
|
6821
|
+
qty: z.ZodNumber;
|
|
6822
|
+
}, "strict", z.ZodTypeAny, {
|
|
6823
|
+
sku: string;
|
|
6824
|
+
token: string;
|
|
6825
|
+
qty: number;
|
|
6826
|
+
}, {
|
|
6827
|
+
sku: string;
|
|
6828
|
+
token: string;
|
|
6829
|
+
qty: number;
|
|
6830
|
+
}>;
|
|
6831
|
+
|
|
6832
|
+
declare type VipCartItemRequest = z.infer<typeof VipCartItemRequest>;
|
|
6833
|
+
|
|
6834
|
+
export declare function VipHero({ hero, onContinue }: VipHeroProps): JSX.Element;
|
|
6835
|
+
|
|
6836
|
+
declare const VipHero_2: z.ZodObject<{
|
|
6837
|
+
image: z.ZodNullable<z.ZodString>;
|
|
6838
|
+
headline: z.ZodString;
|
|
6839
|
+
body: z.ZodNullable<z.ZodString>;
|
|
6840
|
+
cta_label: z.ZodString;
|
|
6841
|
+
}, "strip", z.ZodTypeAny, {
|
|
6842
|
+
image: string | null;
|
|
6843
|
+
headline: string;
|
|
6844
|
+
body: string | null;
|
|
6845
|
+
cta_label: string;
|
|
6846
|
+
}, {
|
|
6847
|
+
image: string | null;
|
|
6848
|
+
headline: string;
|
|
6849
|
+
body: string | null;
|
|
6850
|
+
cta_label: string;
|
|
6851
|
+
}>;
|
|
6852
|
+
|
|
6853
|
+
declare type VipHero_2 = z.infer<typeof VipHero_2>;
|
|
6854
|
+
|
|
6855
|
+
export declare interface VipHeroProps {
|
|
6856
|
+
hero: VipHero_2;
|
|
6857
|
+
onContinue: () => void;
|
|
6858
|
+
}
|
|
6859
|
+
|
|
6860
|
+
export declare type VipInviteUnavailableState = Exclude<VipInviteView['state'], 'active'>;
|
|
6861
|
+
|
|
6862
|
+
declare const VipInviteView: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
|
|
6863
|
+
state: z.ZodLiteral<"active">;
|
|
6864
|
+
invite_ref: z.ZodBranded<z.ZodString, "VipInviteRef">;
|
|
6865
|
+
recipient_name: z.ZodString;
|
|
6866
|
+
personal_message: z.ZodNullable<z.ZodString>;
|
|
6867
|
+
delivery_rule: z.ZodEnum<["both_free", "standard_free", "both_paid"]>;
|
|
6868
|
+
expires_at: z.ZodString;
|
|
6869
|
+
items: z.ZodArray<z.ZodObject<{
|
|
6870
|
+
product_sku: z.ZodString;
|
|
6871
|
+
quantity: z.ZodNumber;
|
|
6872
|
+
}, "strip", z.ZodTypeAny, {
|
|
6873
|
+
product_sku: string;
|
|
6874
|
+
quantity: number;
|
|
6875
|
+
}, {
|
|
6876
|
+
product_sku: string;
|
|
6877
|
+
quantity: number;
|
|
6878
|
+
}>, "many">;
|
|
6879
|
+
hero: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
6880
|
+
image: z.ZodNullable<z.ZodString>;
|
|
6881
|
+
headline: z.ZodString;
|
|
6882
|
+
body: z.ZodNullable<z.ZodString>;
|
|
6883
|
+
cta_label: z.ZodString;
|
|
6884
|
+
}, "strip", z.ZodTypeAny, {
|
|
6885
|
+
image: string | null;
|
|
6886
|
+
headline: string;
|
|
6887
|
+
body: string | null;
|
|
6888
|
+
cta_label: string;
|
|
6889
|
+
}, {
|
|
6890
|
+
image: string | null;
|
|
6891
|
+
headline: string;
|
|
6892
|
+
body: string | null;
|
|
6893
|
+
cta_label: string;
|
|
6894
|
+
}>>>;
|
|
6895
|
+
}, "strip", z.ZodTypeAny, {
|
|
6896
|
+
state: "active";
|
|
6897
|
+
invite_ref: string & z.BRAND<"VipInviteRef">;
|
|
6898
|
+
recipient_name: string;
|
|
6899
|
+
personal_message: string | null;
|
|
6900
|
+
delivery_rule: "both_free" | "standard_free" | "both_paid";
|
|
6901
|
+
expires_at: string;
|
|
6902
|
+
items: {
|
|
6903
|
+
product_sku: string;
|
|
6904
|
+
quantity: number;
|
|
6905
|
+
}[];
|
|
6906
|
+
hero?: {
|
|
6907
|
+
image: string | null;
|
|
6908
|
+
headline: string;
|
|
6909
|
+
body: string | null;
|
|
6910
|
+
cta_label: string;
|
|
6911
|
+
} | null | undefined;
|
|
6912
|
+
}, {
|
|
6913
|
+
state: "active";
|
|
6914
|
+
invite_ref: string;
|
|
6915
|
+
recipient_name: string;
|
|
6916
|
+
personal_message: string | null;
|
|
6917
|
+
delivery_rule: "both_free" | "standard_free" | "both_paid";
|
|
6918
|
+
expires_at: string;
|
|
6919
|
+
items: {
|
|
6920
|
+
product_sku: string;
|
|
6921
|
+
quantity: number;
|
|
6922
|
+
}[];
|
|
6923
|
+
hero?: {
|
|
6924
|
+
image: string | null;
|
|
6925
|
+
headline: string;
|
|
6926
|
+
body: string | null;
|
|
6927
|
+
cta_label: string;
|
|
6928
|
+
} | null | undefined;
|
|
6929
|
+
}>, z.ZodObject<{
|
|
6930
|
+
state: z.ZodLiteral<"scheduled">;
|
|
6931
|
+
opens_at: z.ZodString;
|
|
6932
|
+
}, "strip", z.ZodTypeAny, {
|
|
6933
|
+
state: "scheduled";
|
|
6934
|
+
opens_at: string;
|
|
6935
|
+
}, {
|
|
6936
|
+
state: "scheduled";
|
|
6937
|
+
opens_at: string;
|
|
6938
|
+
}>, z.ZodObject<{
|
|
6939
|
+
state: z.ZodLiteral<"claimed">;
|
|
6940
|
+
}, "strip", z.ZodTypeAny, {
|
|
6941
|
+
state: "claimed";
|
|
6942
|
+
}, {
|
|
6943
|
+
state: "claimed";
|
|
6944
|
+
}>, z.ZodObject<{
|
|
6945
|
+
state: z.ZodLiteral<"expired">;
|
|
6946
|
+
}, "strip", z.ZodTypeAny, {
|
|
6947
|
+
state: "expired";
|
|
6948
|
+
}, {
|
|
6949
|
+
state: "expired";
|
|
6950
|
+
}>, z.ZodObject<{
|
|
6951
|
+
state: z.ZodLiteral<"revoked">;
|
|
6952
|
+
}, "strip", z.ZodTypeAny, {
|
|
6953
|
+
state: "revoked";
|
|
6954
|
+
}, {
|
|
6955
|
+
state: "revoked";
|
|
6956
|
+
}>]>;
|
|
6957
|
+
|
|
6958
|
+
declare type VipInviteView = z.infer<typeof VipInviteView>;
|
|
6959
|
+
|
|
6960
|
+
export declare function VipLandingView({ token, onUnavailable }: VipLandingViewProps): JSX.Element;
|
|
6961
|
+
|
|
6962
|
+
export declare interface VipLandingViewProps {
|
|
6963
|
+
/** The token from the invite link: the last path segment of the URL the recipient opened. */
|
|
6964
|
+
token: string;
|
|
6965
|
+
/** Replaces the built-in screen for an invite that cannot be claimed. */
|
|
6966
|
+
onUnavailable?: (state: VipInviteUnavailableState) => ReactNode;
|
|
6967
|
+
}
|
|
6968
|
+
|
|
6690
6969
|
/** "Why shop with us" reassurance tiles. */
|
|
6691
6970
|
export declare function WhyUs({ items }: {
|
|
6692
6971
|
items: WhyUsItem[];
|