generated from ProtonAgency/cloudflare-workers-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbindings.d.ts
74 lines (71 loc) · 1.72 KB
/
bindings.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
export {}
/**
* Declare kv namespaces here so using them does not throw type errors
*/
declare global {
const CART_STORE: KVNamespace
interface CartItem {
id: number //same as variant_id
properties: KeyValueObject | null
quantity: number
variant_id: number
key: string // variant_id:hash(unknown)
title: string // product_title - variant_title
price: number
original_price: number
discounted_price: number
line_price: number
original_line_price: number
total_discount: number
discounts: unknown[]
sku: string
grams: number
vendor: string
taxable: boolean
product_id: number
product_has_only_default_variant: boolean
gift_card: boolean
final_price: number
final_line_price: number
url: string
featured_image: {
aspect_ratio: number
alt: string | null
height: number
url: string
width: number
}
image: string
handle: string
requires_shipping: boolean
product_type: string
product_title: string
product_description: string
variant_title: string
variant_options: string[]
options_with_values: Array<{
name: string
value: string
}>
line_level_discount_allocations: unknown[]
line_level_total_discount: number
}
interface Cart {
token: string
note: string | null
attributes: KeyValueObject | null
original_total_price: number
total_price: number
total_discount: number
total_weight: number
item_count: number
items: CartItem[]
requires_shipping: boolean
currency: string
items_subtotal_price: number
cart_level_discount_applications: Array<unknown>
}
interface KeyValueObject {
[key: string]: string
}
}