@shopify/app-bridge-types 0.0.7 → 0.0.8
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/package.json +1 -1
- package/shopify.ts +11 -3
package/package.json
CHANGED
package/shopify.ts
CHANGED
|
@@ -50,11 +50,14 @@ interface Cart {
|
|
|
50
50
|
grandTotal: string;
|
|
51
51
|
note?: string;
|
|
52
52
|
cartDiscount?: Discount;
|
|
53
|
+
cartDiscounts: Discount[];
|
|
53
54
|
customer?: Customer;
|
|
54
55
|
lineItems: LineItem[];
|
|
55
56
|
properties: Record<string, string>;
|
|
56
57
|
}
|
|
57
58
|
|
|
59
|
+
type CartDiscountType = 'Percentage' | 'FixedAmount';
|
|
60
|
+
|
|
58
61
|
type CartSubscriber = (cart: Cart) => void;
|
|
59
62
|
|
|
60
63
|
interface Collection extends Resource {
|
|
@@ -114,7 +117,7 @@ interface Device {
|
|
|
114
117
|
interface Discount {
|
|
115
118
|
amount: number;
|
|
116
119
|
title?: string;
|
|
117
|
-
type?:
|
|
120
|
+
type?: CartDiscountType;
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
interface Environment {
|
|
@@ -154,7 +157,7 @@ interface LineItem {
|
|
|
154
157
|
|
|
155
158
|
interface LineItemDiscount {
|
|
156
159
|
title: string;
|
|
157
|
-
type:
|
|
160
|
+
type: CartDiscountType;
|
|
158
161
|
amount: string;
|
|
159
162
|
}
|
|
160
163
|
|
|
@@ -191,7 +194,9 @@ interface Pos {
|
|
|
191
194
|
addAddress(address: Address): Promise<void>;
|
|
192
195
|
updateAddress(index: number, address: Address): Promise<void>;
|
|
193
196
|
applyCartDiscount(discount: Discount): Promise<void>;
|
|
197
|
+
applyCartCodeDiscount(code: string): Promise<void>;
|
|
194
198
|
removeCartDiscount(): Promise<void>;
|
|
199
|
+
removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise<void>;
|
|
195
200
|
addCartProperties(properties: Record<string, string>): Promise<void>;
|
|
196
201
|
removeCartProperties(properties: string[]): Promise<void>;
|
|
197
202
|
clear(): Promise<void>;
|
|
@@ -361,12 +366,15 @@ interface ToastOptions {
|
|
|
361
366
|
export interface UIModalAttributes {
|
|
362
367
|
id?: string;
|
|
363
368
|
variant?: Variant;
|
|
369
|
+
src?: string;
|
|
364
370
|
children?: any;
|
|
365
371
|
}
|
|
366
372
|
|
|
367
373
|
interface UIModalElement_2 extends Omit<HTMLElement, 'addEventListener' | 'removeEventListener'> {
|
|
368
374
|
variant: Variant;
|
|
369
|
-
content
|
|
375
|
+
content?: HTMLElement;
|
|
376
|
+
src?: string;
|
|
377
|
+
readonly contentWindow?: Window | null;
|
|
370
378
|
show(): Promise<void>;
|
|
371
379
|
hide(): Promise<void>;
|
|
372
380
|
toggle(): Promise<void>;
|