@moonbase.sh/storefront-api 0.4.67 → 0.4.68
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.cjs +5 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1110,7 +1110,9 @@ var OrderEndpoints = class {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
if (options == null ? void 0 : options.checkout) {
|
|
1112
1112
|
query.append("checkout", "true");
|
|
1113
|
-
|
|
1113
|
+
if (options.checkout.returnUrl) {
|
|
1114
|
+
query.append("returnUrl", options.checkout.returnUrl);
|
|
1115
|
+
}
|
|
1114
1116
|
}
|
|
1115
1117
|
const response = await this.api.fetch(`/api/customer/orders/${orderId}?${query.toString()}`, orderSchema, {
|
|
1116
1118
|
abort: options == null ? void 0 : options.abort
|
|
@@ -1123,7 +1125,8 @@ var OrderEndpoints = class {
|
|
|
1123
1125
|
};
|
|
1124
1126
|
if (checkout) {
|
|
1125
1127
|
query.checkout = "true";
|
|
1126
|
-
|
|
1128
|
+
if (checkout.returnUrl)
|
|
1129
|
+
query.returnUrl = checkout.returnUrl;
|
|
1127
1130
|
}
|
|
1128
1131
|
const response = await this.api.fetch(
|
|
1129
1132
|
`/api/customer/orders/${order.id}?${new URLSearchParams(query).toString()}`,
|
package/dist/index.d.cts
CHANGED
|
@@ -18338,7 +18338,7 @@ declare class OrderEndpoints {
|
|
|
18338
18338
|
abort?: AbortSignal;
|
|
18339
18339
|
finalize?: boolean;
|
|
18340
18340
|
checkout?: {
|
|
18341
|
-
returnUrl
|
|
18341
|
+
returnUrl?: string;
|
|
18342
18342
|
};
|
|
18343
18343
|
}): Promise<{
|
|
18344
18344
|
id: string;
|
|
@@ -19431,7 +19431,7 @@ declare class OrderEndpoints {
|
|
|
19431
19431
|
replaced?: string[];
|
|
19432
19432
|
})[];
|
|
19433
19433
|
}, checkout?: {
|
|
19434
|
-
returnUrl
|
|
19434
|
+
returnUrl?: string;
|
|
19435
19435
|
}, utm?: UrchinTrackingModule): Promise<OpenOrder>;
|
|
19436
19436
|
addBillingDetails(orderId: string, details: {
|
|
19437
19437
|
name: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -18338,7 +18338,7 @@ declare class OrderEndpoints {
|
|
|
18338
18338
|
abort?: AbortSignal;
|
|
18339
18339
|
finalize?: boolean;
|
|
18340
18340
|
checkout?: {
|
|
18341
|
-
returnUrl
|
|
18341
|
+
returnUrl?: string;
|
|
18342
18342
|
};
|
|
18343
18343
|
}): Promise<{
|
|
18344
18344
|
id: string;
|
|
@@ -19431,7 +19431,7 @@ declare class OrderEndpoints {
|
|
|
19431
19431
|
replaced?: string[];
|
|
19432
19432
|
})[];
|
|
19433
19433
|
}, checkout?: {
|
|
19434
|
-
returnUrl
|
|
19434
|
+
returnUrl?: string;
|
|
19435
19435
|
}, utm?: UrchinTrackingModule): Promise<OpenOrder>;
|
|
19436
19436
|
addBillingDetails(orderId: string, details: {
|
|
19437
19437
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -1053,7 +1053,9 @@ var OrderEndpoints = class {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
if (options == null ? void 0 : options.checkout) {
|
|
1055
1055
|
query.append("checkout", "true");
|
|
1056
|
-
|
|
1056
|
+
if (options.checkout.returnUrl) {
|
|
1057
|
+
query.append("returnUrl", options.checkout.returnUrl);
|
|
1058
|
+
}
|
|
1057
1059
|
}
|
|
1058
1060
|
const response = await this.api.fetch(`/api/customer/orders/${orderId}?${query.toString()}`, orderSchema, {
|
|
1059
1061
|
abort: options == null ? void 0 : options.abort
|
|
@@ -1066,7 +1068,8 @@ var OrderEndpoints = class {
|
|
|
1066
1068
|
};
|
|
1067
1069
|
if (checkout) {
|
|
1068
1070
|
query.checkout = "true";
|
|
1069
|
-
|
|
1071
|
+
if (checkout.returnUrl)
|
|
1072
|
+
query.returnUrl = checkout.returnUrl;
|
|
1070
1073
|
}
|
|
1071
1074
|
const response = await this.api.fetch(
|
|
1072
1075
|
`/api/customer/orders/${order.id}?${new URLSearchParams(query).toString()}`,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moonbase.sh/storefront-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.68",
|
|
5
5
|
"description": "Package to let you build storefronts with Moonbase.sh as payment and delivery provider",
|
|
6
6
|
"author": "Tobias Lønnerød Madsen <m@dsen.tv>",
|
|
7
7
|
"license": "MIT",
|