@returnflows/shop-overlay 1.0.7 → 1.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.
|
@@ -12,55 +12,12 @@ export interface CalculationParams {
|
|
|
12
12
|
lineItemId: string;
|
|
13
13
|
action: "EXCHANGE" | "REFUND" | "GIFTCARD";
|
|
14
14
|
}[];
|
|
15
|
+
countryCode?: string;
|
|
15
16
|
}
|
|
16
|
-
export declare function getCalculation({ orderId, cart, lineItems }: CalculationParams, labelCount: number): Promise<CalculationResponse>;
|
|
17
|
-
export type ShopOverlayDataResponse = ApiResponseObject<"/shop-overlay", "get">;
|
|
18
|
-
export declare function getShopOverlayData({ isFirstLoad, internalReturnId, lineIds }: {
|
|
19
|
-
isFirstLoad: boolean;
|
|
20
|
-
internalReturnId: string;
|
|
21
|
-
lineIds: string;
|
|
22
|
-
}): Promise<{
|
|
23
|
-
id: string;
|
|
24
|
-
orderId: string;
|
|
25
|
-
orderName: string;
|
|
26
|
-
instantExchange: boolean;
|
|
27
|
-
freeExchangeLabel: boolean;
|
|
28
|
-
productsToExchange: {
|
|
29
|
-
id: string;
|
|
30
|
-
shopifyLineId: string;
|
|
31
|
-
title: string;
|
|
32
|
-
variantTitle: string;
|
|
33
|
-
image: string;
|
|
34
|
-
handle: string;
|
|
35
|
-
price: number;
|
|
36
|
-
quantity: number;
|
|
37
|
-
}[];
|
|
38
|
-
productRules: {
|
|
39
|
-
id: string;
|
|
40
|
-
type: "NO_RETURN" | "NO_EXCHANGE_TO" | "NO_REFUND" | "EXTEND_PERIOD" | "FORCE_RETURN";
|
|
41
|
-
extendedBy: number | null;
|
|
42
|
-
marketId: string;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
updatedAt: string;
|
|
45
|
-
products: ({
|
|
46
|
-
id: string;
|
|
47
|
-
shopifyProductId: string;
|
|
48
|
-
ruleId: string;
|
|
49
|
-
title: string;
|
|
50
|
-
image?: unknown;
|
|
51
|
-
extendedBy?: number | null | undefined;
|
|
52
|
-
createdAt: string;
|
|
53
|
-
updatedAt?: string | undefined;
|
|
54
|
-
} | null)[];
|
|
55
|
-
}[];
|
|
56
|
-
totalPrice: number;
|
|
57
|
-
returnWindows: {
|
|
58
|
-
exchangeReturnWindow: boolean;
|
|
59
|
-
refundReturnWindow: boolean;
|
|
60
|
-
};
|
|
61
|
-
}>;
|
|
17
|
+
export declare function getCalculation({ orderId, cart, lineItems, countryCode }: CalculationParams, labelCount: number): Promise<CalculationResponse>;
|
|
18
|
+
export type ShopOverlayDataResponse = ApiResponseObject<"/shop-overlay/session/{id}", "get">;
|
|
62
19
|
export type ProcessOrderInitializationReturn = {
|
|
63
20
|
orderData: ShopOverlayDataResponse;
|
|
64
21
|
updatedCart: ShopifyCart | null;
|
|
65
22
|
};
|
|
66
|
-
export declare function processOrderInitialization({ isFirstLoad, options: { clearCartOnStart }, id:
|
|
23
|
+
export declare function processOrderInitialization({ isFirstLoad, options: { clearCartOnStart }, id: sessionId, data: cache }: WidgetConfiguration): Promise<ProcessOrderInitializationReturn>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@returnflows/shop-overlay",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Returnflows Shop Overlay Widget - Modular exchange/return widget with programmatic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.esm.js",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"build:types": "pnpm generate:types || true && tsc -p tsconfig.build.json",
|
|
36
36
|
"build:iife": "rollup -c ./rollup.config.mjs --target=iife",
|
|
37
37
|
"build:iife:staging": "rollup -c ./rollup.config.mjs --target=iife --environment=test",
|
|
38
|
-
"build:iife:euf-staging": "rollup -c ./rollup.config.mjs --target=iife --environment=euf-staging",
|
|
39
38
|
"build:iife:production": "rollup -c ./rollup.config.mjs --target=iife --environment=production",
|
|
40
39
|
"build:esm": "rollup -c ./rollup.config.mjs --target=esm && pnpm build:types",
|
|
41
40
|
"build:esm:staging": "rollup -c ./rollup.config.mjs --target=esm --environment=test && pnpm build:types",
|