@laioutr/app-shopware 0.15.4 → 0.17.0
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/module.json +1 -1
- package/dist/module.mjs +7 -2
- package/dist/runtime/app/components/ShopwareEmbedFrame.d.vue.ts +13 -3
- package/dist/runtime/app/components/ShopwareEmbedFrame.vue +48 -5
- package/dist/runtime/app/components/ShopwareEmbedFrame.vue.d.ts +13 -3
- package/dist/runtime/app/composables/useShopwareEmbedBridge.d.ts +3 -1
- package/dist/runtime/app/composables/useShopwareEmbedBridge.js +7 -3
- package/dist/runtime/app/const/bridge.d.ts +20 -0
- package/dist/runtime/app/const/bridge.js +7 -0
- package/dist/runtime/app/lib/createBridgeHandler.d.ts +3 -0
- package/dist/runtime/app/lib/createBridgeHandler.js +7 -1
- package/dist/runtime/app/lib/createOrderHandoffRefresher.d.ts +24 -0
- package/dist/runtime/app/lib/createOrderHandoffRefresher.js +21 -0
- package/dist/runtime/app/lib/parseBridgeMessage.js +2 -1
- package/dist/runtime/app/sections/SectionShopwareCheckout.vue +42 -4
- package/dist/runtime/server/const/checkout.d.ts +1 -1
- package/dist/runtime/server/const/checkout.js +10 -2
- package/dist/runtime/server/orchestr/product/base.resolver.js +18 -2
- package/dist/runtime/server/orchestr/product/variants.link.js +6 -4
- package/dist/runtime/server/orchestr/product-variant/base.resolver.js +9 -4
- package/dist/runtime/server/orchestr-helper/requestedFields.d.ts +1 -3
- package/dist/runtime/server/orchestr-helper/requestedFields.js +54 -42
- package/dist/runtime/server/routes/checkout.js +12 -1
- package/dist/runtime/server/routes/order-handoff.post.d.ts +14 -0
- package/dist/runtime/server/routes/order-handoff.post.js +33 -0
- package/dist/runtime/server/shopware-helper/fetchAllProductVariants.d.ts +2 -1
- package/dist/runtime/server/shopware-helper/fetchAllProductVariants.js +39 -11
- package/dist/runtime/server/shopware-helper/optionGroupsMapper.d.ts +23 -0
- package/dist/runtime/server/shopware-helper/optionGroupsMapper.js +37 -0
- package/dist/runtime/server/shopware-helper/resolveCheckout.d.ts +2 -0
- package/dist/runtime/server/shopware-helper/resolveCheckout.js +4 -3
- package/dist/runtime/server/shopware-helper/sessionHandoff.d.ts +6 -0
- package/dist/runtime/server/shopware-helper/sessionHandoff.js +6 -1
- package/dist/runtime/server/shopware-helper/wellKnownOptionName.d.ts +2 -0
- package/dist/runtime/server/shopware-helper/wellKnownOptionName.js +278 -0
- package/dist/runtime/shared/const/checkout.d.ts +33 -0
- package/dist/runtime/shared/const/checkout.js +5 -0
- package/package.json +3 -3
|
@@ -16,3 +16,36 @@ export declare const CHECKOUT_ENDPOINT_PATH = "/app-shopware/checkout";
|
|
|
16
16
|
* `/api/laioutr/*` namespace.
|
|
17
17
|
*/
|
|
18
18
|
export declare const ADOPT_SESSION_ENDPOINT_PATH = "/app-shopware/adopt-session";
|
|
19
|
+
/**
|
|
20
|
+
* Same-origin route the embedded checkout section POSTs to for a fresh single-use handoff
|
|
21
|
+
* code, which it then hands to the storefront frame.
|
|
22
|
+
*
|
|
23
|
+
* The confirm form submits into the top-level window so redirect-based payment providers are
|
|
24
|
+
* never framed. When the storefront sits on a different registrable domain than laioutr, that
|
|
25
|
+
* top-level request lands in a cookie jar with no storefront session, so the code travels in
|
|
26
|
+
* the form and installs one before the order is placed. Minting stays server-side: the raw
|
|
27
|
+
* `sw-context-token` never reaches the browser.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ORDER_HANDOFF_ENDPOINT_PATH = "/app-shopware/order-handoff";
|
|
30
|
+
/**
|
|
31
|
+
* Storefront route name of the checkout confirm page.
|
|
32
|
+
*
|
|
33
|
+
* The section only keeps a handoff code minted while the frame sits on this page: it is the
|
|
34
|
+
* only page whose submit needs one, and a code outlives its mint by about a minute.
|
|
35
|
+
*/
|
|
36
|
+
export declare const CHECKOUT_CONFIRM_ROUTE = "frontend.checkout.confirm.page";
|
|
37
|
+
/**
|
|
38
|
+
* Storefront route that can still take payment for an order whose cart is gone. A cancelled or
|
|
39
|
+
* declined payment lands here, and the frame is pointed at it so the retry happens in place.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CHECKOUT_RETRY_ROUTE = "frontend.account.edit-order.page";
|
|
42
|
+
/** Query key the storefront uses to hand a failed order back for a retry. */
|
|
43
|
+
export declare const RETRY_ORDER_QUERY_KEY = "retry-order";
|
|
44
|
+
/**
|
|
45
|
+
* Marks the frame's own navigation to the retry route, so the storefront leaves it in place.
|
|
46
|
+
*
|
|
47
|
+
* Without it the storefront cannot tell this apart from a shopper the payment provider bounced
|
|
48
|
+
* to the same route at top level, and would send the frame back to Laioutr — which points the
|
|
49
|
+
* frame at the retry again, forever.
|
|
50
|
+
*/
|
|
51
|
+
export declare const RETRY_FRAME_MARKER_KEY = "laioutr-retry";
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export const CHECKOUT_ENDPOINT_PATH = "/app-shopware/checkout";
|
|
2
2
|
export const ADOPT_SESSION_ENDPOINT_PATH = "/app-shopware/adopt-session";
|
|
3
|
+
export const ORDER_HANDOFF_ENDPOINT_PATH = "/app-shopware/order-handoff";
|
|
4
|
+
export const CHECKOUT_CONFIRM_ROUTE = "frontend.checkout.confirm.page";
|
|
5
|
+
export const CHECKOUT_RETRY_ROUTE = "frontend.account.edit-order.page";
|
|
6
|
+
export const RETRY_ORDER_QUERY_KEY = "retry-order";
|
|
7
|
+
export const RETRY_FRAME_MARKER_KEY = "laioutr-retry";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laioutr/app-shopware",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Laioutr integration with Shopware 6",
|
|
5
5
|
"repository": "github:laioutr/app-shopware",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@changesets/cli": "^2.31.0",
|
|
42
42
|
"@laioutr-app/ui": "^2.10.6",
|
|
43
|
-
"@laioutr-core/canonical-types": "^0.
|
|
43
|
+
"@laioutr-core/canonical-types": "^0.31.0",
|
|
44
44
|
"@laioutr-core/core-types": "^0.40.3",
|
|
45
45
|
"@laioutr-core/devtools": "^0.40.3",
|
|
46
46
|
"@laioutr-core/frontend-core": "^0.40.3",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"vue-tsc": "2.2.10"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@laioutr-core/canonical-types": ">=0.
|
|
72
|
+
"@laioutr-core/canonical-types": ">=0.31.0",
|
|
73
73
|
"@laioutr-core/core-types": ">=0.40.3",
|
|
74
74
|
"@laioutr-core/frontend-core": ">=0.40.3",
|
|
75
75
|
"@laioutr-core/kit": ">=0.40.3",
|