flowrix 1.0.1-beta.8 → 1.0.1-beta.80
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.d.mts +1 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +94 -29
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +2 -5
- package/dist/runtime/composables/Brand/brand.js +2 -0
- package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
- package/dist/runtime/composables/Cart/useCart.js +10 -0
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +15 -5
- package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +2 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +2 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +3 -14
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +2 -2
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +84 -73
- package/dist/runtime/composables/Checkout/useCheckout.js +36 -28
- package/dist/runtime/composables/Checkout/{useBillingAddress.d.ts → useCheckoutBillingAddress.d.ts} +6 -6
- package/dist/runtime/composables/Checkout/{useBillingAddress.js → useCheckoutBillingAddress.js} +6 -1
- package/dist/runtime/composables/Checkout/{useShippingAddress.d.ts → useCheckoutShippingAddress.d.ts} +1 -1
- package/dist/runtime/composables/Checkout/{useShippingAddress.js → useCheckoutShippingAddress.js} +7 -2
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +7 -7
- package/dist/runtime/composables/Checkout/useCreateAccount.js +3 -1
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +2 -2
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +8 -7
- package/dist/runtime/composables/Customer/useBillingAddress.d.ts +112 -0
- package/dist/runtime/composables/Customer/useBillingAddress.js +93 -0
- package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
- package/dist/runtime/composables/Customer/useLogin.js +34 -0
- package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
- package/dist/runtime/composables/Customer/useOrders.js +56 -0
- package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
- package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
- package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
- package/dist/runtime/composables/Customer/useProfile.js +106 -0
- package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
- package/dist/runtime/composables/Customer/useQuotations.js +40 -0
- package/dist/runtime/composables/Customer/useRegister.d.ts +118 -11
- package/dist/runtime/composables/Customer/useRegister.js +236 -34
- package/dist/runtime/composables/Customer/useShippingAddress.d.ts +121 -0
- package/dist/runtime/composables/Customer/useShippingAddress.js +145 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.js +94 -0
- package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
- package/dist/runtime/composables/Customer/useUserCards.js +65 -0
- package/dist/runtime/composables/{useWishlists.d.ts → Customer/useWishlists.d.ts} +5 -18
- package/dist/runtime/composables/{useWishlists.js → Customer/useWishlists.js} +19 -28
- package/dist/runtime/composables/Extras/useCountry.d.ts +11 -6
- package/dist/runtime/composables/Extras/useCountry.js +5 -4
- package/dist/runtime/composables/Header/useHeader.d.ts +6 -20
- package/dist/runtime/composables/Header/useHeader.js +3 -2
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +1 -1
- package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -1
- package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
- package/dist/runtime/composables/Product/useQuickView.js +27 -0
- package/dist/runtime/composables/Product/useService.d.ts +1 -1
- package/dist/runtime/composables/Product/useService.js +0 -3
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +2 -2
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +2 -2
- package/dist/runtime/composables/index.d.ts +15 -12
- package/dist/runtime/composables/index.js +15 -12
- package/dist/runtime/composables/useAddresses.js +6 -6
- package/dist/runtime/composables/useCards.js +2 -2
- package/dist/runtime/composables/useLocation.d.ts +2 -12
- package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
- package/dist/runtime/composables/useQuotationCheckout.js +138 -0
- package/dist/runtime/middleware/flowrix.d.ts +5 -4
- package/dist/runtime/middleware/flowrix.js +41 -21
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/server/api/albums.js +1 -1
- package/dist/runtime/server/api/auth/forgot.js +1 -1
- package/dist/runtime/server/api/auth/login.js +5 -6
- package/dist/runtime/server/api/auth/logout.js +1 -1
- package/dist/runtime/server/api/auth/register.js +1 -1
- package/dist/runtime/server/api/auth/session.get.js +1 -1
- package/dist/runtime/server/api/auth/user/reset-password.js +1 -1
- package/dist/runtime/server/api/auth/user/session.js +1 -1
- package/dist/runtime/server/api/auth/user/verify-token.js +1 -1
- package/dist/runtime/server/api/banners.js +2 -2
- package/dist/runtime/server/api/brand/{[slug].js → [...slug].js} +17 -17
- package/dist/runtime/server/api/brand/index.d.ts +2 -0
- package/dist/runtime/server/api/brand/index.js +23 -0
- package/dist/runtime/server/api/cache/[...slug].delete.d.ts +2 -0
- package/dist/runtime/server/api/cache/[...slug].delete.js +40 -0
- package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
- package/dist/runtime/server/api/cache/clean.get.js +16 -0
- package/dist/runtime/server/api/cart/[slug]/add.js +1 -1
- package/dist/runtime/server/api/cart/[slug]/update.js +1 -1
- package/dist/runtime/server/api/cart/related.d.ts +2 -0
- package/dist/runtime/server/api/cart/related.js +21 -0
- package/dist/runtime/server/api/cart/remove.js +1 -1
- package/dist/runtime/server/api/cart/service/[slug]/add.js +1 -1
- package/dist/runtime/server/api/catalog/categories.js +5 -4
- package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categoriesall.js +44 -0
- package/dist/runtime/server/api/catalog/featured.js +5 -4
- package/dist/runtime/server/api/catalog/samples.js +5 -4
- package/dist/runtime/server/api/catalog/search.js +5 -4
- package/dist/runtime/server/api/category/[...slug].js +18 -14
- package/dist/runtime/server/api/checkout/applyCoupon.js +1 -1
- package/dist/runtime/server/api/checkout/configs.d.ts +1 -1
- package/dist/runtime/server/api/checkout/configs.js +10 -11
- package/dist/runtime/server/api/checkout/countries.js +1 -1
- package/dist/runtime/server/api/checkout/paymentmethod.js +7 -7
- package/dist/runtime/server/api/checkout/quotation/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/[slug].js +21 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +37 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.js +21 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +23 -0
- package/dist/runtime/server/api/{blog/[slug].js → cmspost/[...slug].js} +7 -9
- package/dist/runtime/server/api/{blog/blog.js → cmspost/all.js} +2 -2
- package/dist/runtime/server/api/company/profile.d.ts +1 -1
- package/dist/runtime/server/api/company/profile.js +9 -9
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +1 -1
- package/dist/runtime/server/api/contact-center/webforms/create.js +1 -1
- package/dist/runtime/server/api/countries.d.ts +2 -0
- package/dist/runtime/server/api/countries.js +35 -0
- package/dist/runtime/server/api/customer/address/add.js +1 -1
- package/dist/runtime/server/api/customer/address/delete.js +2 -2
- package/dist/runtime/server/api/customer/address/setshipping.js +1 -1
- package/dist/runtime/server/api/customer/address/update.js +1 -1
- package/dist/runtime/server/api/customer/cards/delete.js +2 -2
- package/dist/runtime/server/api/customer/cards/get.js +2 -2
- package/dist/runtime/server/api/customer/change-password.js +2 -2
- package/dist/runtime/server/api/customer/checkout.js +1 -1
- package/dist/runtime/server/api/customer/orders.js +2 -2
- package/dist/runtime/server/api/customer/profile/update.js +1 -1
- package/dist/runtime/server/api/customer/quotations.js +2 -2
- package/dist/runtime/server/api/customer/search.js +1 -1
- package/dist/runtime/server/api/customer/tax-invoice.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/add.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/get.js +2 -2
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +2 -2
- package/dist/runtime/server/api/featured.d.ts +2 -0
- package/dist/runtime/server/api/featured.js +16 -0
- package/dist/runtime/server/api/location.js +1 -1
- package/dist/runtime/server/api/nav/[id]/links.js +1 -1
- package/dist/runtime/server/api/page/{[slug].js → [...slug].js} +6 -8
- package/dist/runtime/server/api/product/[...slug].js +8 -5
- package/dist/runtime/server/api/quickview/[slug].d.ts +2 -0
- package/dist/runtime/server/api/quickview/[slug].js +16 -0
- package/dist/runtime/server/api/samples.d.ts +3 -0
- package/dist/runtime/server/api/samples.js +20 -0
- package/dist/runtime/server/api/search.d.ts +3 -0
- package/dist/runtime/server/api/search.js +15 -0
- package/dist/runtime/server/api/service/[slug].js +5 -4
- package/dist/runtime/server/api/service/availability.js +1 -1
- package/dist/runtime/server/api/service/getall.d.ts +3 -0
- package/dist/runtime/server/api/service/getall.js +52 -0
- package/dist/runtime/server/api/shop.d.ts +3 -0
- package/dist/runtime/server/api/shop.js +15 -0
- package/dist/runtime/server/api/subscribe.js +1 -1
- package/dist/runtime/server/api/v2/[...slug].js +3 -1
- package/dist/runtime/server/api/webform.d.ts +3 -0
- package/dist/runtime/server/api/webform.js +16 -0
- package/dist/runtime/stores/Cart.d.ts +12 -0
- package/dist/runtime/stores/Cart.js +50 -16
- package/dist/runtime/stores/Checkout.d.ts +9 -15
- package/dist/runtime/stores/Checkout.js +19 -5
- package/dist/runtime/stores/Search.d.ts +1 -1
- package/dist/runtime/stores/Services.js +2 -2
- package/dist/runtime/stores/auth.d.ts +8 -11
- package/dist/runtime/stores/auth.js +390 -8
- package/dist/runtime/stores/countries.d.ts +1 -3
- package/dist/runtime/stores/countries.js +4 -8
- package/dist/runtime/stores/product/slug.d.ts +1 -17
- package/dist/runtime/stores/wishlists.d.ts +105 -5
- package/dist/runtime/stores/wishlists.js +200 -9
- package/dist/runtime/utils/api.js +9 -13
- package/dist/runtime/utils/htmlCache.d.ts +5 -0
- package/dist/runtime/utils/htmlCache.js +60 -0
- package/dist/types.d.mts +6 -2
- package/package.json +32 -20
- package/dist/runtime/composables/useAuth.d.ts +0 -45
- package/dist/runtime/composables/useAuth.js +0 -180
- package/dist/runtime/composables/useCountries.d.ts +0 -12
- package/dist/runtime/composables/useCountries.js +0 -50
- package/dist/runtime/composables/useOrders.d.ts +0 -21
- package/dist/runtime/composables/useOrders.js +0 -82
- package/dist/runtime/composables/useQuotations.d.ts +0 -14
- package/dist/runtime/composables/useQuotations.js +0 -50
- /package/dist/runtime/server/api/brand/{[slug].d.ts → [...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{blog/[slug].d.ts → cmspost/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{blog/blog.d.ts → cmspost/all.d.ts} +0 -0
- /package/dist/runtime/server/api/page/{[slug].d.ts → [...slug].d.ts} +0 -0
package/dist/module.d.mts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface ModuleOptions {
|
|
4
|
-
}
|
|
5
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
1
|
+
declare const _default: any;
|
|
6
2
|
|
|
7
3
|
export { _default as default };
|
|
8
|
-
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, installModule, addImportsDir, addPlugin, addImports
|
|
1
|
+
import { defineNuxtModule, createResolver, installModule, addServerHandler, addImportsDir, addPlugin, addImports } from '@nuxt/kit';
|
|
2
2
|
|
|
3
|
-
const module = defineNuxtModule({
|
|
3
|
+
const module$1 = defineNuxtModule({
|
|
4
4
|
meta: {
|
|
5
5
|
name: "flowrix",
|
|
6
6
|
configKey: "flowrix"
|
|
7
7
|
},
|
|
8
8
|
defaults: {},
|
|
9
9
|
async setup(_options, nuxt) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
public
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
10
|
+
const env = process.env;
|
|
11
|
+
const runtimeConfig = nuxt.options.runtimeConfig;
|
|
12
|
+
runtimeConfig.FLOWRIX_API_KEY ||= env.FLOWRIX_API_KEY || "";
|
|
13
|
+
runtimeConfig.FLOWRIX_API_SECRET ||= env.FLOWRIX_API_SECRET || "";
|
|
14
|
+
runtimeConfig.FLOWRIX_API_ORIGIN ||= env.FLOWRIX_API_ORIGIN || "";
|
|
15
|
+
runtimeConfig.FLOWRIX_API_BASE ||= env.FLOWRIX_API_BASE || "";
|
|
16
|
+
runtimeConfig.FLOWRIX_API_BASE_V2 ||= env.FLOWRIX_API_BASE_V2 || "";
|
|
17
|
+
Object.assign(runtimeConfig.public, {
|
|
18
|
+
...runtimeConfig.public,
|
|
19
|
+
FLOWRIX_API_KEY: runtimeConfig.public.FLOWRIX_API_KEY || env.FLOWRIX_API_KEY || "",
|
|
20
|
+
FLOWRIX_API_SECRET: runtimeConfig.public.FLOWRIX_API_SECRET || env.FLOWRIX_API_SECRET || "",
|
|
21
|
+
FLOWRIX_API_ORIGIN: runtimeConfig.public.FLOWRIX_API_ORIGIN || env.FLOWRIX_API_ORIGIN || "",
|
|
22
|
+
FLOWRIX_API_BASE: runtimeConfig.public.FLOWRIX_API_BASE || env.FLOWRIX_API_BASE || "",
|
|
23
|
+
FLOWRIX_API_BASE_V2: runtimeConfig.public.FLOWRIX_API_BASE_V2 || env.FLOWRIX_API_BASE_V2 || ""
|
|
24
|
+
});
|
|
25
|
+
console.info("\u2705 Flowrix runtime config loaded:", {
|
|
26
|
+
apiKey: runtimeConfig.public.FLOWRIX_API_KEY,
|
|
27
|
+
apiBase: runtimeConfig.public.FLOWRIX_API_BASE
|
|
28
|
+
});
|
|
28
29
|
const resolver = createResolver(import.meta.url);
|
|
29
30
|
await installModule("@pinia/nuxt");
|
|
31
|
+
addServerHandler({
|
|
32
|
+
middleware: true,
|
|
33
|
+
handler: resolver.resolve("./runtime/utils/htmlCache")
|
|
34
|
+
});
|
|
30
35
|
addImportsDir(resolver.resolve("./runtime/stores"));
|
|
31
36
|
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
32
37
|
addPlugin({
|
|
@@ -86,16 +91,20 @@ const module = defineNuxtModule({
|
|
|
86
91
|
handler: resolver.resolve("./runtime/server/api/auth/user/verify-token")
|
|
87
92
|
});
|
|
88
93
|
addServerHandler({
|
|
89
|
-
route: "/api/
|
|
90
|
-
handler: resolver.resolve("./runtime/server/api/
|
|
94
|
+
route: "/api/cmspost/**",
|
|
95
|
+
handler: resolver.resolve("./runtime/server/api/cmspost/[...slug]")
|
|
96
|
+
});
|
|
97
|
+
addServerHandler({
|
|
98
|
+
route: "/api/cmspost/all",
|
|
99
|
+
handler: resolver.resolve("./runtime/server/api/cmspost/all")
|
|
91
100
|
});
|
|
92
101
|
addServerHandler({
|
|
93
|
-
route: "/api/
|
|
94
|
-
handler: resolver.resolve("./runtime/server/api/
|
|
102
|
+
route: "/api/brand",
|
|
103
|
+
handler: resolver.resolve("./runtime/server/api/brand")
|
|
95
104
|
});
|
|
96
105
|
addServerHandler({
|
|
97
|
-
route: "/api/brand
|
|
98
|
-
handler: resolver.resolve("./runtime/server/api/brand/[slug]")
|
|
106
|
+
route: "/api/brand/**",
|
|
107
|
+
handler: resolver.resolve("./runtime/server/api/brand/[...slug]")
|
|
99
108
|
});
|
|
100
109
|
addServerHandler({
|
|
101
110
|
route: "/api/cart/remove",
|
|
@@ -113,10 +122,18 @@ const module = defineNuxtModule({
|
|
|
113
122
|
route: "/api/cart/service/:slug/add",
|
|
114
123
|
handler: resolver.resolve("./runtime/server/api/cart/service/[slug]/add")
|
|
115
124
|
});
|
|
125
|
+
addServerHandler({
|
|
126
|
+
route: "/api/cart/related",
|
|
127
|
+
handler: resolver.resolve("./runtime/server/api/cart/related")
|
|
128
|
+
});
|
|
116
129
|
addServerHandler({
|
|
117
130
|
route: "/api/catalog/categories",
|
|
118
131
|
handler: resolver.resolve("./runtime/server/api/catalog/categories")
|
|
119
132
|
});
|
|
133
|
+
addServerHandler({
|
|
134
|
+
route: "/api/catalog/categories/all",
|
|
135
|
+
handler: resolver.resolve("./runtime/server/api/catalog/categoriesall")
|
|
136
|
+
});
|
|
120
137
|
addServerHandler({
|
|
121
138
|
route: "/api/catalog/featured",
|
|
122
139
|
handler: resolver.resolve("./runtime/server/api/catalog/featured")
|
|
@@ -149,10 +166,26 @@ const module = defineNuxtModule({
|
|
|
149
166
|
route: "/api/checkout/paymentmethod",
|
|
150
167
|
handler: resolver.resolve("./runtime/server/api/checkout/paymentmethod")
|
|
151
168
|
});
|
|
169
|
+
addServerHandler({
|
|
170
|
+
route: "/api/checkout/quotation/guest/:slug",
|
|
171
|
+
handler: resolver.resolve("./runtime/server/api/checkout/quotation/guest/[slug]")
|
|
172
|
+
});
|
|
173
|
+
addServerHandler({
|
|
174
|
+
route: "/api/checkout/quotation/submit/:slug",
|
|
175
|
+
handler: resolver.resolve("./runtime/server/api/checkout/quotation/submit/[slug]")
|
|
176
|
+
});
|
|
177
|
+
addServerHandler({
|
|
178
|
+
route: "/api/checkout/quotation/:slug",
|
|
179
|
+
handler: resolver.resolve("./runtime/server/api/checkout/quotation/[slug]")
|
|
180
|
+
});
|
|
152
181
|
addServerHandler({
|
|
153
182
|
route: "/api/company/profile",
|
|
154
183
|
handler: resolver.resolve("./runtime/server/api/company/profile")
|
|
155
184
|
});
|
|
185
|
+
addServerHandler({
|
|
186
|
+
route: "/api/countries",
|
|
187
|
+
handler: resolver.resolve("./runtime/server/api/countries")
|
|
188
|
+
});
|
|
156
189
|
addServerHandler({
|
|
157
190
|
route: "/api/contact-center/webforms/create",
|
|
158
191
|
handler: resolver.resolve("./runtime/server/api/contact-center/webforms/create")
|
|
@@ -246,17 +279,25 @@ const module = defineNuxtModule({
|
|
|
246
279
|
handler: resolver.resolve("./runtime/server/api/nav/[id]/links")
|
|
247
280
|
});
|
|
248
281
|
addServerHandler({
|
|
249
|
-
route: "/api/page
|
|
250
|
-
handler: resolver.resolve("./runtime/server/api/page/[slug]")
|
|
282
|
+
route: "/api/page/**",
|
|
283
|
+
handler: resolver.resolve("./runtime/server/api/page/[...slug]")
|
|
251
284
|
});
|
|
252
285
|
addServerHandler({
|
|
253
286
|
route: "/api/product/**",
|
|
254
287
|
handler: resolver.resolve("./runtime/server/api/product/[...slug]")
|
|
255
288
|
});
|
|
289
|
+
addServerHandler({
|
|
290
|
+
route: "/api/quickview/:slug",
|
|
291
|
+
handler: resolver.resolve("./runtime/server/api/quickview/[slug]")
|
|
292
|
+
});
|
|
256
293
|
addServerHandler({
|
|
257
294
|
route: "/api/service/:slug",
|
|
258
295
|
handler: resolver.resolve("./runtime/server/api/service/[slug]")
|
|
259
296
|
});
|
|
297
|
+
addServerHandler({
|
|
298
|
+
route: "/api/service/getall",
|
|
299
|
+
handler: resolver.resolve("./runtime/server/api/service/getall")
|
|
300
|
+
});
|
|
260
301
|
addServerHandler({
|
|
261
302
|
route: "/api/service/availability",
|
|
262
303
|
handler: resolver.resolve("./runtime/server/api/service/availability")
|
|
@@ -265,7 +306,31 @@ const module = defineNuxtModule({
|
|
|
265
306
|
route: "/api/v2/**",
|
|
266
307
|
handler: resolver.resolve("./runtime/server/api/v2/[...slug]")
|
|
267
308
|
});
|
|
309
|
+
addServerHandler({
|
|
310
|
+
route: "/api/shop",
|
|
311
|
+
handler: resolver.resolve("./runtime/server/api/shop")
|
|
312
|
+
});
|
|
313
|
+
addServerHandler({
|
|
314
|
+
route: "/api/featured",
|
|
315
|
+
handler: resolver.resolve("./runtime/server/api/featured")
|
|
316
|
+
});
|
|
317
|
+
addServerHandler({
|
|
318
|
+
route: "/api/samples",
|
|
319
|
+
handler: resolver.resolve("./runtime/server/api/samples")
|
|
320
|
+
});
|
|
321
|
+
addServerHandler({
|
|
322
|
+
route: "/api/webform",
|
|
323
|
+
handler: resolver.resolve("./runtime/server/api/webform")
|
|
324
|
+
});
|
|
325
|
+
addServerHandler({
|
|
326
|
+
route: "/api/cache/clean",
|
|
327
|
+
handler: resolver.resolve("./runtime/server/api/cache/clean.get")
|
|
328
|
+
});
|
|
329
|
+
addServerHandler({
|
|
330
|
+
route: "/api/cache/**",
|
|
331
|
+
handler: resolver.resolve("./runtime/server/api/cache/[...slug].delete")
|
|
332
|
+
});
|
|
268
333
|
}
|
|
269
334
|
});
|
|
270
335
|
|
|
271
|
-
export { module as default };
|
|
336
|
+
export { module$1 as default };
|
|
@@ -101,11 +101,8 @@ export declare const useBlogIndex: () => {
|
|
|
101
101
|
loadMore: () => Promise<void>;
|
|
102
102
|
clearSearch: () => void;
|
|
103
103
|
fetchBlogData: () => Promise<{
|
|
104
|
-
data:
|
|
105
|
-
pending:
|
|
106
|
-
} | {
|
|
107
|
-
data: import("vue").Ref<null, null>;
|
|
108
|
-
pending: import("vue").Ref<boolean, boolean>;
|
|
104
|
+
data: any;
|
|
105
|
+
pending: any;
|
|
109
106
|
}>;
|
|
110
107
|
};
|
|
111
108
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent, watch } from "vue";
|
|
2
|
+
import { useRoute, useFetch } from "#imports";
|
|
2
3
|
export function useBrand(template) {
|
|
3
4
|
const route = useRoute();
|
|
4
5
|
const components = import.meta.glob(
|
|
@@ -20,6 +21,7 @@ export function useBrand(template) {
|
|
|
20
21
|
const slug = route.params.slug;
|
|
21
22
|
const query = route.query;
|
|
22
23
|
const { data: brandData, error, pending, refresh } = useFetch(`/api/brand/${slug}`, {
|
|
24
|
+
method: "post",
|
|
23
25
|
query
|
|
24
26
|
});
|
|
25
27
|
watch(brandData, (newData) => {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface Product {
|
|
2
|
+
name: string;
|
|
3
|
+
height?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
type: string;
|
|
6
|
+
image: string;
|
|
7
|
+
options: {
|
|
8
|
+
promotionlabel: Array<{
|
|
9
|
+
cartPromotionTag: string;
|
|
10
|
+
cartPromotionTagBackgroundColor: string;
|
|
11
|
+
cartPromotionTagColor: string;
|
|
12
|
+
cartDescription?: string;
|
|
13
|
+
}>;
|
|
14
|
+
summary: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
pricefloat: number;
|
|
20
|
+
qty: number;
|
|
21
|
+
rpfloat: number;
|
|
22
|
+
rowId: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
bundle?: Array<{
|
|
25
|
+
name: string;
|
|
26
|
+
qty: number;
|
|
27
|
+
price: string;
|
|
28
|
+
image?: string;
|
|
29
|
+
rrp?: string;
|
|
30
|
+
}>;
|
|
31
|
+
service?: {
|
|
32
|
+
per_order_pricing: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface CartDetailProps {
|
|
36
|
+
items: Record<string, Product>;
|
|
37
|
+
}
|
|
38
|
+
export declare const useCartDetail: (props: CartDetailProps) => Promise<{
|
|
39
|
+
response: any;
|
|
40
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface Product {
|
|
1
|
+
export interface Product {
|
|
2
2
|
name: string;
|
|
3
3
|
height?: number;
|
|
4
4
|
width?: number;
|
|
@@ -32,18 +32,28 @@ interface Product {
|
|
|
32
32
|
per_order_pricing: number;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
interface CartDetailProps {
|
|
35
|
+
export interface CartDetailProps {
|
|
36
36
|
items: Record<string, Product>;
|
|
37
37
|
}
|
|
38
38
|
export declare const useCartDetail: (props: CartDetailProps) => {
|
|
39
39
|
productAccordionStates: import("vue").Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
40
40
|
cartItems: import("vue").ComputedRef<Record<string, Product>>;
|
|
41
|
-
companyProfile:
|
|
42
|
-
checkoutData: import("vue").ComputedRef<
|
|
41
|
+
companyProfile: null;
|
|
42
|
+
checkoutData: import("vue").ComputedRef<{
|
|
43
|
+
[x: string]: any;
|
|
44
|
+
preferences?: Record<string, any>[] | undefined;
|
|
45
|
+
outlets?: Record<string, any>[] | undefined;
|
|
46
|
+
deliverytype?: string | undefined;
|
|
47
|
+
order_no?: string | undefined;
|
|
48
|
+
publishableKey?: any;
|
|
49
|
+
calculations?: any;
|
|
50
|
+
shippingmethods?: any;
|
|
51
|
+
cart?: Record<string, import("../../stores/Checkout.js").CartItem> | undefined;
|
|
52
|
+
totals?: Record<string, any> | undefined;
|
|
53
|
+
}>;
|
|
43
54
|
removeFromCartMiddleware: (productId: string, product: Product) => Promise<void>;
|
|
44
55
|
updateQuantityMiddleware: (product: Product, qty: number) => Promise<void>;
|
|
45
56
|
toggleAccordion: (rowId: string) => void;
|
|
46
57
|
dvidedsummary: (sammarydata: any[]) => any[][];
|
|
47
58
|
swatchimagesSrcset: (swatchImage: string) => string;
|
|
48
59
|
};
|
|
49
|
-
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { onMounted, ref, computed } from "vue";
|
|
2
|
+
import { useCartStore } from "../../stores/Cart.js";
|
|
3
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
4
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
2
5
|
export const useCartDetail = (props) => {
|
|
3
6
|
const cartStore = useCartStore();
|
|
4
7
|
const { profile: companyProfile } = useCompanyProfile();
|
|
@@ -6,7 +6,46 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
export default function (): {
|
|
8
8
|
checkoutStore: any;
|
|
9
|
-
user:
|
|
9
|
+
user: {
|
|
10
|
+
id: number;
|
|
11
|
+
fullname: string;
|
|
12
|
+
firstname: string;
|
|
13
|
+
lastname: string;
|
|
14
|
+
email: string;
|
|
15
|
+
avatar: string;
|
|
16
|
+
country_id: number | null;
|
|
17
|
+
country: {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
emoji: string;
|
|
21
|
+
} | null;
|
|
22
|
+
state_id: number | null;
|
|
23
|
+
state: string | null;
|
|
24
|
+
suburb: string | null;
|
|
25
|
+
dob: string | null;
|
|
26
|
+
phone: string | null;
|
|
27
|
+
address: string | null;
|
|
28
|
+
mobile: string | null;
|
|
29
|
+
company: string | null;
|
|
30
|
+
addresses: {
|
|
31
|
+
id: number;
|
|
32
|
+
fullname: string | null;
|
|
33
|
+
firstname: string;
|
|
34
|
+
middlename: string | null;
|
|
35
|
+
lastname: string;
|
|
36
|
+
address: string;
|
|
37
|
+
suburb: string;
|
|
38
|
+
state: string | null;
|
|
39
|
+
state_id: number | null;
|
|
40
|
+
country: string;
|
|
41
|
+
country_id: number;
|
|
42
|
+
postcode: string;
|
|
43
|
+
mobile: string;
|
|
44
|
+
shipping: number;
|
|
45
|
+
billing: number;
|
|
46
|
+
}[];
|
|
47
|
+
created_at: string;
|
|
48
|
+
} | null;
|
|
10
49
|
ChangeCard: (token?: string) => void;
|
|
11
50
|
getpaymentMethod: (paymentMethod: string, inputData: any, totalPrice: string) => Promise<void>;
|
|
12
51
|
saveToCheckoutSession: (inputData: any) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCheckoutStore } from "../../../stores/Checkout.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useAuthStore } from "../../../stores/auth.js";
|
|
3
3
|
export default function() {
|
|
4
4
|
const checkoutStore = useCheckoutStore();
|
|
5
|
-
const { user } =
|
|
5
|
+
const { user } = useAuthStore();
|
|
6
6
|
const payment = new PaymentJs();
|
|
7
7
|
const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
|
|
8
8
|
try {
|
|
@@ -5,5 +5,44 @@ export default function (): {
|
|
|
5
5
|
opayoMonthValidations: (inputData: any) => void;
|
|
6
6
|
opayoYearValidations: () => void;
|
|
7
7
|
ChangeCard: (token?: string) => void;
|
|
8
|
-
user:
|
|
8
|
+
user: {
|
|
9
|
+
id: number;
|
|
10
|
+
fullname: string;
|
|
11
|
+
firstname: string;
|
|
12
|
+
lastname: string;
|
|
13
|
+
email: string;
|
|
14
|
+
avatar: string;
|
|
15
|
+
country_id: number | null;
|
|
16
|
+
country: {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
emoji: string;
|
|
20
|
+
} | null;
|
|
21
|
+
state_id: number | null;
|
|
22
|
+
state: string | null;
|
|
23
|
+
suburb: string | null;
|
|
24
|
+
dob: string | null;
|
|
25
|
+
phone: string | null;
|
|
26
|
+
address: string | null;
|
|
27
|
+
mobile: string | null;
|
|
28
|
+
company: string | null;
|
|
29
|
+
addresses: {
|
|
30
|
+
id: number;
|
|
31
|
+
fullname: string | null;
|
|
32
|
+
firstname: string;
|
|
33
|
+
middlename: string | null;
|
|
34
|
+
lastname: string;
|
|
35
|
+
address: string;
|
|
36
|
+
suburb: string;
|
|
37
|
+
state: string | null;
|
|
38
|
+
state_id: number | null;
|
|
39
|
+
country: string;
|
|
40
|
+
country_id: number;
|
|
41
|
+
postcode: string;
|
|
42
|
+
mobile: string;
|
|
43
|
+
shipping: number;
|
|
44
|
+
billing: number;
|
|
45
|
+
}[];
|
|
46
|
+
created_at: string;
|
|
47
|
+
} | null;
|
|
9
48
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCheckoutStore } from "../../../stores/Checkout.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useAuthStore } from "../../../stores/auth.js";
|
|
3
3
|
export default function() {
|
|
4
4
|
const checkoutStore = useCheckoutStore();
|
|
5
|
-
const { user } =
|
|
5
|
+
const { user } = useAuthStore();
|
|
6
6
|
const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
|
|
7
7
|
try {
|
|
8
8
|
inputData.paymentmethod = paymentMethod;
|
|
@@ -22,20 +22,9 @@ export default function() {
|
|
|
22
22
|
const Zippay = defineAsyncComponent(
|
|
23
23
|
() => import("@/components/Checkout/Template01/PaymentMethods/Zippay.vue")
|
|
24
24
|
);
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const path = "/src/components/Checkout/Template01/PaymentMethods/Opayo.vue";
|
|
29
|
-
if (components[path]) {
|
|
30
|
-
return components[path]();
|
|
31
|
-
} else {
|
|
32
|
-
console.warn("Opayo.vue not found. Skipping import or loading fallback.");
|
|
33
|
-
return Promise.resolve({
|
|
34
|
-
template: "<div>Payment method not available.</div>"
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
25
|
+
const Opayo = defineAsyncComponent(
|
|
26
|
+
() => import("@/components/Checkout/Template01/PaymentMethods/Opayo.vue")
|
|
27
|
+
);
|
|
39
28
|
function getPaymentComponent(methodKey) {
|
|
40
29
|
switch (methodKey) {
|
|
41
30
|
case "web-eway":
|
|
@@ -2,6 +2,6 @@ export default function (): {
|
|
|
2
2
|
getpaymentMethod: (paymentMethod: string, inputData: any, totalPrice: string) => Promise<void>;
|
|
3
3
|
};
|
|
4
4
|
export declare const getStripeElements: (publishableKey: string, clientSecret: string) => Promise<{
|
|
5
|
-
stripe:
|
|
6
|
-
elements:
|
|
5
|
+
stripe: null;
|
|
6
|
+
elements: null;
|
|
7
7
|
}>;
|