flowrix 1.0.1-beta.27 → 1.0.1-beta.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flowrix",
3
3
  "configKey": "flowrix",
4
- "version": "1.0.1-beta.27",
4
+ "version": "1.0.1-beta.29",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -177,7 +177,7 @@ export default function (): {
177
177
  CheckUserAccount(email: string): Promise<any>;
178
178
  saveToCheckoutSession(fieldsData: import("../../stores/index.js").FieldData): Promise<void>;
179
179
  }>;
180
- countries: any;
180
+ countries: import("vue").Ref<any, any>;
181
181
  BillingDetailsForm: any;
182
182
  DeliveryMethodForm: any;
183
183
  ShippingDetailsForm: any;
@@ -1,6 +1,6 @@
1
- export declare const useCountry: () => {
2
- data: any;
3
- error: any;
4
- refresh: any;
5
- execute: any;
6
- };
1
+ export interface Country {
2
+ code: string;
3
+ name: string;
4
+ }
5
+ import { AsyncData } from '#app';
6
+ export declare const useCountry: () => AsyncData<any, any>;
@@ -1,11 +1,9 @@
1
+ import { useAsyncData } from "#app";
1
2
  export const useCountry = () => {
2
- const { data, error, refresh, execute } = useAsyncData("countries", () => $fetch("/api/checkout/countries"), {
3
- server: true
4
- });
5
- return {
6
- data,
7
- error,
8
- refresh,
9
- execute
10
- };
3
+ const { data, error, refresh, execute } = useAsyncData(
4
+ "countries",
5
+ () => $fetch("/api/checkout/countries"),
6
+ { server: true }
7
+ );
8
+ return { data, error, refresh, execute };
11
9
  };
@@ -1,3 +1,4 @@
1
+ import { useRuntimeConfig } from "nuxt/app";
1
2
  const isServer = typeof process !== "undefined" && process.server;
2
3
  function getEnv(key) {
3
4
  try {
@@ -10,12 +11,12 @@ function getEnv(key) {
10
11
  }
11
12
  async function request(method, endpoint, options = {}, apiversion) {
12
13
  console.log("checkt useRuntimeConfig", typeof useRuntimeConfig === "function");
13
- const FLOWRIX_API_KEY = getEnv("FLOWRIX_API_KEY") || "b91abf43-8a9c-47fa-a308-9bbea9e18d0e";
14
- const FLOWRIX_API_SECRET = getEnv("FLOWRIX_API_SECRET") || "XNkYmluMvvfIIh17pfntNLVBW65ez7q2f82WLeadB0iOFwX4D3BZrbWfuTDboFM4G4R0a5u7EH2eTXpeVPXADTSpSr0qgucIFFnKaiFBDcuSDWiusdf6SB3vAn8J6DX3RdMzhiMjC5TxK0HNXgPPTkMyMs76dLjfflHs8KjYwz2YfPmRsppvhywcaMn7RYHfKKkyJDxqLtP0wQxEtTT0Er1qkzUZwZKouqYayPXZxa0r3U0X7dj8IU3iqedTox8z";
15
- const FLOWRIX_API_ORIGIN = getEnv("FLOWRIX_API_ORIGIN") || "https://pvwgp6m2mg.ap-southeast-2.awsapprunner.com";
16
- let FLOWRIX_API_BASE = getEnv("FLOWRIX_API_BASE") || "https://crosbyblinds.dev.flowrix.app/api/v1/";
14
+ const FLOWRIX_API_KEY = getEnv("FLOWRIX_API_KEY");
15
+ const FLOWRIX_API_SECRET = getEnv("FLOWRIX_API_SECRET");
16
+ const FLOWRIX_API_ORIGIN = getEnv("FLOWRIX_API_ORIGIN");
17
+ let FLOWRIX_API_BASE = getEnv("FLOWRIX_API_BASE");
17
18
  if (apiversion == "v2") {
18
- FLOWRIX_API_BASE = getEnv("FLOWRIX_API_BASE_V2") || "https://crosbyblinds.dev.flowrix.app/api/v2/";
19
+ FLOWRIX_API_BASE = getEnv("FLOWRIX_API_BASE_V2");
19
20
  }
20
21
  const headers = {
21
22
  "x-api-key": FLOWRIX_API_KEY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowrix",
3
- "version": "1.0.1-beta.27",
3
+ "version": "1.0.1-beta.29",
4
4
  "description": "lug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
5
5
  "license": "MIT",
6
6
  "type": "module",