@odynn/awayz-core 0.6.28 → 0.6.30

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.
Files changed (33) hide show
  1. package/dist/{AccountService-DEwilAk3.js → AccountService-CysoI2i-.js} +243 -238
  2. package/dist/{TripsService-Dqw5SICI.js → TripsService-DLwg0lrN.js} +1 -1
  3. package/dist/components/CashValue/CashValue.js +1 -1
  4. package/dist/components/CashValue/CashValue.stories.js +1 -1
  5. package/dist/components/Wallet/Card/Card.stories.js +1 -1
  6. package/dist/configs/msBaseUrl.js +8 -0
  7. package/dist/hooks/useAwayzAuth/useAwayzAuth.js +1 -1
  8. package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
  9. package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
  10. package/dist/hooks/useFeatureFlags.js +1 -1
  11. package/dist/hooks/useSearchLimit.js +1 -1
  12. package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
  13. package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -2
  14. package/dist/hooks/useWallet/useWallet.js +1 -1
  15. package/dist/hooks/useWallet/useWallet.test.js +1 -1
  16. package/dist/lib/configs/msBaseUrl.d.ts +2 -0
  17. package/dist/lib/services/instance.d.ts +1 -0
  18. package/dist/lib/services/instanceConfig.d.ts +50 -0
  19. package/dist/main.js +1 -1
  20. package/dist/providers/AwayzProvider.js +15 -14
  21. package/dist/services/account/AccountService.js +1 -1
  22. package/dist/services/bookings/BookingService.js +1 -1
  23. package/dist/services/currency/CurrencyService.js +1 -1
  24. package/dist/services/features/featureService.js +1 -1
  25. package/dist/services/index.js +1 -1
  26. package/dist/services/instance.js +4 -3
  27. package/dist/services/instanceConfig.js +7 -5
  28. package/dist/services/noRetryInstance.js +1 -1
  29. package/dist/services/preferences/PreferencesService.js +1 -1
  30. package/dist/services/rewards/RewardsService.js +1 -1
  31. package/dist/services/trips/TripsService.js +2 -2
  32. package/dist/services/wallet/WalletService.js +25 -25
  33. package/package.json +1 -1
@@ -2,7 +2,7 @@ var m = Object.defineProperty;
2
2
  var g = (r, e, s) => e in r ? m(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s;
3
3
  var t = (r, e, s) => g(r, typeof e != "symbol" ? e + "" : e, s);
4
4
  import "./arrayExtensions-DlcBOj5a.js";
5
- import { c as n, f as p, a as c, r as T } from "./AccountService-DEwilAk3.js";
5
+ import { c as n, f as p, a as c, r as T } from "./AccountService-CysoI2i-.js";
6
6
  import "react";
7
7
  import { EMyTripsEndpoints as i } from "./configs/endpoints.js";
8
8
  import { EBookingType as l } from "./services/trips/TripService.types.js";
@@ -6,7 +6,7 @@ import { r as yt, R as gt } from "../../index-Cv-wvFlM.js";
6
6
  import { useQuery as Ct } from "@tanstack/react-query";
7
7
  import "../../arrayExtensions-DlcBOj5a.js";
8
8
  import { a as Et, b as ue, c as j } from "../../cashUtils-BDa0CVyi.js";
9
- import { E as wt } from "../../AccountService-DEwilAk3.js";
9
+ import { E as wt } from "../../AccountService-CysoI2i-.js";
10
10
  import { c as pe } from "../../index-c5toY3Pm.js";
11
11
  import { EInvalidAmountDisplayOption as S, EToolTipPosition as Pt } from "./CashValueTypes.js";
12
12
  import '../../assets/_styles5.css';import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';/* empty css */
@@ -11,7 +11,7 @@ import "react-i18next";
11
11
  import "../../configs/awayzClient.js";
12
12
  import "../../context/AwayzContext.js";
13
13
  import "@tanstack/react-query";
14
- import "../../AccountService-DEwilAk3.js";
14
+ import "../../AccountService-CysoI2i-.js";
15
15
  import { AwayzProvider as a } from "../../providers/AwayzProvider.js";
16
16
  import "../../services/noRetryInstance.js";
17
17
  import { EAuthFlow as i } from "../../types/EAuthFlow.js";
@@ -4,7 +4,7 @@ import "@tanstack/react-query";
4
4
  import "../../../arrayExtensions-DlcBOj5a.js";
5
5
  import "react";
6
6
  import "../../../configs/awayzClient.js";
7
- import "../../../AccountService-DEwilAk3.js";
7
+ import "../../../AccountService-CysoI2i-.js";
8
8
  import '../../../assets/_styles4.css';import '../../../assets/_styles3.css';import '../../../assets/_styles2.css';import '../../../assets/_styles5.css';/* empty css */
9
9
  import "react-i18next";
10
10
  /* empty css */
@@ -0,0 +1,8 @@
1
+ let s = "";
2
+ const t = () => s, a = (e) => {
3
+ s = e ? "https://qvlstiu6ci.execute-api.us-east-1.amazonaws.com/dev/api/v1" : "https://qvlstiu6ci.execute-api.us-east-1.amazonaws.com/api/v1";
4
+ };
5
+ export {
6
+ t as getMsBaseUrl,
7
+ a as setMsBaseUrl
8
+ };
@@ -1,6 +1,6 @@
1
1
  import "../../arrayExtensions-DlcBOj5a.js";
2
2
  import { g as P } from "../../cashUtils-BDa0CVyi.js";
3
- import { e as M, A as l, E as K } from "../../AccountService-DEwilAk3.js";
3
+ import { e as M, A as l, E as K } from "../../AccountService-CysoI2i-.js";
4
4
  import { a as c } from "../../keys-BcBfU51M.js";
5
5
  import { useState as f, useCallback as I, useEffect as S } from "react";
6
6
  import { awayzClient as R } from "../../configs/awayzClient.js";
@@ -1,6 +1,6 @@
1
1
  import { useQuery as g, useMutation as c } from "@tanstack/react-query";
2
2
  import "../../arrayExtensions-DlcBOj5a.js";
3
- import { E as o } from "../../AccountService-DEwilAk3.js";
3
+ import { E as o } from "../../AccountService-CysoI2i-.js";
4
4
  import "react";
5
5
  import "react/jsx-runtime";
6
6
  import { awayzClient as v } from "../../configs/awayzClient.js";
@@ -1,5 +1,5 @@
1
1
  import { EBookingEndpoints as i } from "../../configs/endpoints.js";
2
- import { c } from "../../AccountService-DEwilAk3.js";
2
+ import { c } from "../../AccountService-CysoI2i-.js";
3
3
  import "../../services/noRetryInstance.js";
4
4
  import "../../arrayExtensions-DlcBOj5a.js";
5
5
  import "react";
@@ -1,6 +1,6 @@
1
1
  import { useQuery as L } from "@tanstack/react-query";
2
2
  import "../arrayExtensions-DlcBOj5a.js";
3
- import { E as I, t as R } from "../AccountService-DEwilAk3.js";
3
+ import { E as I, t as R } from "../AccountService-CysoI2i-.js";
4
4
  import "react";
5
5
  import { FeatureService as S } from "../services/features/featureService.js";
6
6
  const U = [
@@ -1,6 +1,6 @@
1
1
  import { useQuery as u } from "@tanstack/react-query";
2
2
  import "../arrayExtensions-DlcBOj5a.js";
3
- import { E as m, A as c, a as f } from "../AccountService-DEwilAk3.js";
3
+ import { E as m, A as c, a as f } from "../AccountService-CysoI2i-.js";
4
4
  import { useEffect as d } from "react";
5
5
  import { useAwayzContext as y } from "./useAwayzContext.js";
6
6
  var i = /* @__PURE__ */ ((r) => (r.HOTEL = "Hotel", r.FLIGHT = "Flight", r))(i || {});
@@ -1,8 +1,8 @@
1
1
  import { useQuery as p, useMutation as s } from "@tanstack/react-query";
2
2
  import { h as m } from "../../arrayExtensions-DlcBOj5a.js";
3
- import { E as e } from "../../AccountService-DEwilAk3.js";
3
+ import { E as e } from "../../AccountService-CysoI2i-.js";
4
4
  import "react";
5
- import { T as t } from "../../TripsService-Dqw5SICI.js";
5
+ import { T as t } from "../../TripsService-DLwg0lrN.js";
6
6
  import "react/jsx-runtime";
7
7
  import { awayzClient as o } from "../../configs/awayzClient.js";
8
8
  import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles5.css';/* empty css */
@@ -1,12 +1,12 @@
1
1
  import { h as p } from "../../arrayExtensions-DlcBOj5a.js";
2
- import { D as f } from "../../TripsService-Dqw5SICI.js";
2
+ import { D as f } from "../../TripsService-DLwg0lrN.js";
3
3
  import "react";
4
4
  import { renderHook as o, waitFor as i } from "../../tests/TestWrapper.js";
5
5
  import { EMyTripsEndpoints as c } from "../../configs/endpoints.js";
6
6
  import "react/jsx-runtime";
7
7
  import "@tanstack/react-query";
8
8
  import "../../configs/awayzClient.js";
9
- import { c as d } from "../../AccountService-DEwilAk3.js";
9
+ import { c as d } from "../../AccountService-CysoI2i-.js";
10
10
  import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles5.css';/* empty css */
11
11
  /* empty css */
12
12
  import "react-i18next";
@@ -1,6 +1,6 @@
1
1
  import { useQuery as n, useMutation as i } from "@tanstack/react-query";
2
2
  import "../../arrayExtensions-DlcBOj5a.js";
3
- import { E as a, b as u } from "../../AccountService-DEwilAk3.js";
3
+ import { E as a, b as u } from "../../AccountService-CysoI2i-.js";
4
4
  import "react";
5
5
  import "react/jsx-runtime";
6
6
  import { awayzClient as s } from "../../configs/awayzClient.js";
@@ -4,7 +4,7 @@ import "@tanstack/react-query";
4
4
  import "../../arrayExtensions-DlcBOj5a.js";
5
5
  import "react";
6
6
  import "../../configs/awayzClient.js";
7
- import { c as l } from "../../AccountService-DEwilAk3.js";
7
+ import { c as l } from "../../AccountService-CysoI2i-.js";
8
8
  import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles5.css';/* empty css */
9
9
  /* empty css */
10
10
  import "react-i18next";
@@ -0,0 +1,2 @@
1
+ export declare const getMsBaseUrl: () => string;
2
+ export declare const setMsBaseUrl: (testMode: boolean) => void;
@@ -1,2 +1,3 @@
1
1
  export declare const instance: import('axios').AxiosInstance;
2
2
  export declare const clientInstance: import('axios').AxiosInstance;
3
+ export declare const msInstance: import('axios').AxiosInstance;
@@ -53,6 +53,56 @@ export declare const getClientConfig: (config: InternalAxiosRequestConfig<any>)
53
53
  withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
54
54
  fetchOptions?: Record<string, any>;
55
55
  };
56
+ export declare const getMsConfig: (config: InternalAxiosRequestConfig<any>) => {
57
+ headers: import('axios').AxiosRequestHeaders;
58
+ url?: string;
59
+ method?: import('axios').Method | string;
60
+ baseURL?: string;
61
+ allowAbsoluteUrls?: boolean;
62
+ transformRequest?: import('axios').AxiosRequestTransformer | import('axios').AxiosRequestTransformer[];
63
+ transformResponse?: import('axios').AxiosResponseTransformer | import('axios').AxiosResponseTransformer[];
64
+ params?: any;
65
+ paramsSerializer?: import('axios').ParamsSerializerOptions | import('axios').CustomParamsSerializer;
66
+ data?: any;
67
+ timeout?: number;
68
+ timeoutErrorMessage?: string;
69
+ withCredentials?: boolean;
70
+ adapter?: (import('axios').AxiosAdapter | ("fetch" | "xhr" | "http" | (string & {}))) | (import('axios').AxiosAdapter | ("fetch" | "xhr" | "http" | (string & {})))[];
71
+ auth?: import('axios').AxiosBasicCredentials;
72
+ responseType?: import('axios').ResponseType;
73
+ responseEncoding?: import('axios').responseEncoding | string;
74
+ xsrfCookieName?: string;
75
+ xsrfHeaderName?: string;
76
+ onUploadProgress?: (progressEvent: import('axios').AxiosProgressEvent) => void;
77
+ onDownloadProgress?: (progressEvent: import('axios').AxiosProgressEvent) => void;
78
+ maxContentLength?: number;
79
+ validateStatus?: ((status: number) => boolean) | null;
80
+ maxBodyLength?: number;
81
+ maxRedirects?: number;
82
+ maxRate?: number | [number, number];
83
+ beforeRedirect?: (options: Record<string, any>, responseDetails: {
84
+ headers: Record<string, string>;
85
+ statusCode: HttpStatusCode;
86
+ }) => void;
87
+ socketPath?: string | null;
88
+ transport?: any;
89
+ httpAgent?: any;
90
+ httpsAgent?: any;
91
+ proxy?: import('axios').AxiosProxyConfig | false;
92
+ cancelToken?: import('axios').CancelToken;
93
+ decompress?: boolean;
94
+ transitional?: import('axios').TransitionalOptions;
95
+ signal?: import('axios').GenericAbortSignal;
96
+ insecureHTTPParser?: boolean;
97
+ env?: {
98
+ FormData?: new (...args: any[]) => object;
99
+ };
100
+ formSerializer?: import('axios').FormSerializerOptions;
101
+ family?: import('axios').AddressFamily;
102
+ lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: import('axios').LookupAddress | import('axios').LookupAddress[], family?: import('axios').AddressFamily) => void) => void) | ((hostname: string, options: object) => Promise<[address: import('axios').LookupAddressEntry | import('axios').LookupAddressEntry[], family?: import('axios').AddressFamily] | import('axios').LookupAddress>);
103
+ withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
104
+ fetchOptions?: Record<string, any>;
105
+ };
56
106
  /**
57
107
  * Processes a queue of failed requests by either rejecting or resolving each request based on the presence of an error.
58
108
  *
package/dist/main.js CHANGED
@@ -11,7 +11,7 @@ import { useSearchLimit as B } from "./hooks/useSearchLimit.js";
11
11
  import { useTripManagement as k } from "./hooks/useTripManagement/useTripManagement.js";
12
12
  import { useWallet as z } from "./hooks/useWallet/useWallet.js";
13
13
  import { AwayzProvider as T } from "./providers/AwayzProvider.js";
14
- import { c as S, i as F } from "./AccountService-DEwilAk3.js";
14
+ import { c as S, i as F } from "./AccountService-CysoI2i-.js";
15
15
  import { clientNoRetryInstance as P } from "./services/noRetryInstance.js";
16
16
  import { CurrencyService as D } from "./services/currency/CurrencyService.js";
17
17
  import { EBookingType as L } from "./services/trips/TripService.types.js";
@@ -1,15 +1,16 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { QueryClientProvider as l } from "@tanstack/react-query";
3
3
  import "../arrayExtensions-DlcBOj5a.js";
4
- import { a as r } from "../keys-BcBfU51M.js";
4
+ import { a as t } from "../keys-BcBfU51M.js";
5
5
  import { useEffect as i } from "react";
6
6
  import { setCustomBaseUrl as u, setBaseUrl as d } from "../configs/baseUrl.js";
7
7
  import { defaultAwayzConfig as p } from "../configs/defaultAwayzConfig.js";
8
- import { AwayzContext as h } from "../context/AwayzContext.js";
9
- import { useAwayzAuth as n } from "../hooks/useAwayzAuth/useAwayzAuth.js";
10
- import w from "../hooks/useFeatureFlags.js";
11
- import { awayzClient as A } from "../configs/awayzClient.js";
12
- import "../AccountService-DEwilAk3.js";
8
+ import { setMsBaseUrl as h } from "../configs/msBaseUrl.js";
9
+ import { AwayzContext as w } from "../context/AwayzContext.js";
10
+ import { useAwayzAuth as A } from "../hooks/useAwayzAuth/useAwayzAuth.js";
11
+ import F from "../hooks/useFeatureFlags.js";
12
+ import { awayzClient as f } from "../configs/awayzClient.js";
13
+ import "../AccountService-CysoI2i-.js";
13
14
  import '../assets/_styles4.css';import '../assets/_styles3.css';import '../assets/_styles2.css';import '../assets/_styles.css';import '../assets/_styles5.css';/* empty css */
14
15
  /* empty css */
15
16
  import "react-i18next";
@@ -17,22 +18,22 @@ import "react-i18next";
17
18
  /* empty css */
18
19
  /* empty css */
19
20
  import "../services/noRetryInstance.js";
20
- const x = ({ children: o, config: e }) => {
21
- const s = n({
21
+ const N = ({ children: o, config: e }) => {
22
+ const s = A({
22
23
  authFlow: e.authFlow,
23
24
  onSuccess: e.onAuthSuccess,
24
25
  onError: e.onAuthFailure,
25
26
  trustedOrigins: e.trustedOrigins,
26
27
  isTestMode: e.testMode
27
- }), { featureFlags: a, loaded: m } = w();
28
+ }), { featureFlags: a, loaded: m } = F();
28
29
  return i(() => {
29
30
  if (!e.clientId) {
30
31
  console.error("You need to provide a client ID to the AwayzProvider");
31
32
  return;
32
33
  }
33
- localStorage.setItem(r.CLIENT_ID, e.clientId), localStorage.setItem(r.AUTH_FLOW, e.authFlow), e.debugRefreshToken && e.testMode && (localStorage.setItem(r.REFRESH_TOKEN, e.debugRefreshToken), localStorage.setItem(r.TOKEN, e.debugRefreshToken)), e.overrideBaseUrl ? u(e.overrideBaseUrl) : d(e.testMode ?? !1);
34
- }, [e]), /* @__PURE__ */ t(l, { client: A, children: /* @__PURE__ */ t(
35
- h.Provider,
34
+ localStorage.setItem(t.CLIENT_ID, e.clientId), localStorage.setItem(t.AUTH_FLOW, e.authFlow), e.debugRefreshToken && e.testMode && (localStorage.setItem(t.REFRESH_TOKEN, e.debugRefreshToken), localStorage.setItem(t.TOKEN, e.debugRefreshToken)), e.overrideBaseUrl ? u(e.overrideBaseUrl) : (d(e.testMode ?? !1), h(e.testMode ?? !1));
35
+ }, [e]), /* @__PURE__ */ r(l, { client: f, children: /* @__PURE__ */ r(
36
+ w.Provider,
36
37
  {
37
38
  value: {
38
39
  ...s,
@@ -48,5 +49,5 @@ const x = ({ children: o, config: e }) => {
48
49
  ) });
49
50
  };
50
51
  export {
51
- x as AwayzProvider
52
+ N as AwayzProvider
52
53
  };
@@ -1,5 +1,5 @@
1
1
  import "../../arrayExtensions-DlcBOj5a.js";
2
- import { A as e } from "../../AccountService-DEwilAk3.js";
2
+ import { A as e } from "../../AccountService-CysoI2i-.js";
3
3
  import "../../keys-BcBfU51M.js";
4
4
  import "react";
5
5
  import "../../configs/awayzClient.js";
@@ -2,7 +2,7 @@ var m = Object.defineProperty;
2
2
  var p = (n, e, a) => e in n ? m(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a;
3
3
  var c = (n, e, a) => p(n, typeof e != "symbol" ? e + "" : e, a);
4
4
  import "../../arrayExtensions-DlcBOj5a.js";
5
- import { c as r, a as _ } from "../../AccountService-DEwilAk3.js";
5
+ import { c as r, a as _ } from "../../AccountService-CysoI2i-.js";
6
6
  import "react";
7
7
  import { EBookingEndpoints as d } from "../../configs/endpoints.js";
8
8
  const g = (n) => {
@@ -2,7 +2,7 @@ import '../../assets/_styles4.css';import '../../assets/_styles3.css';import '..
2
2
  var m = (t, r, e) => r in t ? y(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
3
  var n = (t, r, e) => m(t, typeof r != "symbol" ? r + "" : r, e);
4
4
  import "../../arrayExtensions-DlcBOj5a.js";
5
- import { A as C, E, c as s } from "../../AccountService-DEwilAk3.js";
5
+ import { A as C, E, c as s } from "../../AccountService-CysoI2i-.js";
6
6
  import "react";
7
7
  import { ECurrencyEndpoints as i } from "../../configs/endpoints.js";
8
8
  import "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { EAuthEndpoints as a } from "../../configs/endpoints.js";
2
- import { c as o } from "../../AccountService-DEwilAk3.js";
2
+ import { c as o } from "../../AccountService-CysoI2i-.js";
3
3
  class i {
4
4
  static async getFeatures() {
5
5
  try {
@@ -1,4 +1,4 @@
1
- import { c as o, i as t } from "../AccountService-DEwilAk3.js";
1
+ import { c as o, i as t } from "../AccountService-CysoI2i-.js";
2
2
  import { clientNoRetryInstance as c } from "./noRetryInstance.js";
3
3
  import { CurrencyService as a } from "./currency/CurrencyService.js";
4
4
  import { EBookingType as s } from "./trips/TripService.types.js";
@@ -1,9 +1,10 @@
1
1
  import "../arrayExtensions-DlcBOj5a.js";
2
2
  import "../keys-BcBfU51M.js";
3
3
  import "react";
4
- import { c as p, i as a } from "../AccountService-DEwilAk3.js";
4
+ import { c as o, i as r, m as c } from "../AccountService-CysoI2i-.js";
5
5
  import "../configs/baseUrl.js";
6
6
  export {
7
- p as clientInstance,
8
- a as instance
7
+ o as clientInstance,
8
+ r as instance,
9
+ c as msInstance
9
10
  };
@@ -1,15 +1,17 @@
1
1
  import "../arrayExtensions-DlcBOj5a.js";
2
2
  import "../keys-BcBfU51M.js";
3
3
  import "react";
4
- import { l, j as m, k as g, g as h, h as u, p as d } from "../AccountService-DEwilAk3.js";
4
+ import { n as l, k as g, l as n, g as h, j as u, h as d, p as f } from "../AccountService-CysoI2i-.js";
5
5
  import "../configs/baseUrl.js";
6
6
  import "../configs/endpoints.js";
7
+ import "../configs/msBaseUrl.js";
7
8
  import "../types/EAuthFlow.js";
8
9
  export {
9
10
  l as authFailurePostMessage,
10
- m as delay,
11
- g as executeWithDelay,
11
+ g as delay,
12
+ n as executeWithDelay,
12
13
  h as getClientConfig,
13
- u as handleAxiosError,
14
- d as processFailedRequests
14
+ u as getMsConfig,
15
+ d as handleAxiosError,
16
+ f as processFailedRequests
15
17
  };
@@ -1,4 +1,4 @@
1
- import { d as t, g as r, h as n } from "../AccountService-DEwilAk3.js";
1
+ import { d as t, g as r, h as n } from "../AccountService-CysoI2i-.js";
2
2
  const s = t.create();
3
3
  s.interceptors.request.use((e) => (e = r(e), e));
4
4
  const o = 1;
@@ -2,7 +2,7 @@ var a = Object.defineProperty;
2
2
  var o = (s, e, r) => e in s ? a(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r;
3
3
  var n = (s, e, r) => o(s, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { EPreferencesEndpoints as u } from "../../configs/endpoints.js";
5
- import { c as i } from "../../AccountService-DEwilAk3.js";
5
+ import { c as i } from "../../AccountService-CysoI2i-.js";
6
6
  class E {
7
7
  constructor() {
8
8
  n(this, "setCurrency", async (e) => {
@@ -2,7 +2,7 @@ var s = Object.defineProperty;
2
2
  var n = (a, e, t) => e in a ? s(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var r = (a, e, t) => n(a, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "../../arrayExtensions-DlcBOj5a.js";
5
- import { c as o, a as c } from "../../AccountService-DEwilAk3.js";
5
+ import { c as o, a as c } from "../../AccountService-CysoI2i-.js";
6
6
  import "react";
7
7
  import { ERewardsEndpoints as i } from "../../configs/endpoints.js";
8
8
  class m {
@@ -1,6 +1,6 @@
1
1
  import "../../arrayExtensions-DlcBOj5a.js";
2
- import "../../AccountService-DEwilAk3.js";
3
- import { T } from "../../TripsService-Dqw5SICI.js";
2
+ import "../../AccountService-CysoI2i-.js";
3
+ import { T } from "../../TripsService-DLwg0lrN.js";
4
4
  import "react";
5
5
  import "../../configs/endpoints.js";
6
6
  import "./TripService.types.js";
@@ -2,24 +2,24 @@ var o = Object.defineProperty;
2
2
  var i = (d, a, t) => a in d ? o(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
3
3
  var r = (d, a, t) => i(d, typeof a != "symbol" ? a + "" : a, t);
4
4
  import "../../arrayExtensions-DlcBOj5a.js";
5
- import { c as s, a as c } from "../../AccountService-DEwilAk3.js";
5
+ import { c as e, a as c, m as A } from "../../AccountService-CysoI2i-.js";
6
6
  import "react";
7
- import { EWalletEndpoints as e } from "../../configs/endpoints.js";
8
- class A {
7
+ import { EWalletEndpoints as s } from "../../configs/endpoints.js";
8
+ class u {
9
9
  constructor() {
10
10
  r(this, "getAwards", async () => {
11
11
  const {
12
12
  data: { data: a }
13
- } = await s.get(
14
- e.USER_AWARDS
13
+ } = await e.get(
14
+ s.USER_AWARDS
15
15
  );
16
16
  return c(a);
17
17
  });
18
18
  r(this, "getUserAwards", async (a, t) => {
19
19
  const {
20
20
  data: { data: n }
21
- } = await s.get(
22
- e.USER_AWARDS,
21
+ } = await e.get(
22
+ s.USER_AWARDS,
23
23
  {
24
24
  params: {
25
25
  user_id: a,
@@ -32,8 +32,8 @@ class A {
32
32
  r(this, "getLinkedUserAwards", async (a, t) => {
33
33
  const {
34
34
  data: { data: n }
35
- } = await s.get(
36
- e.LINKED_USER_AWARDS,
35
+ } = await e.get(
36
+ s.LINKED_USER_AWARDS,
37
37
  {
38
38
  params: {
39
39
  user_id: a,
@@ -44,14 +44,14 @@ class A {
44
44
  return c(n);
45
45
  });
46
46
  r(this, "addAwardProgram", async (a, t = 0) => {
47
- const { data: n } = await s.post(e.USER_AWARDS, {
47
+ const { data: n } = await e.post(s.USER_AWARDS, {
48
48
  main_program: a,
49
49
  amount: t
50
50
  });
51
51
  return n;
52
52
  });
53
53
  r(this, "removeAwardProgram", async (a) => {
54
- const { data: t } = await s.delete(e.USER_AWARDS, {
54
+ const { data: t } = await e.delete(s.USER_AWARDS, {
55
55
  data: {
56
56
  name: a
57
57
  }
@@ -59,33 +59,33 @@ class A {
59
59
  return t;
60
60
  });
61
61
  r(this, "setAwardPoints", async (a, t) => {
62
- const { data: n } = await s.put(e.USER_AWARDS, {
62
+ const { data: n } = await e.put(s.USER_AWARDS, {
63
63
  main_program: a,
64
64
  amount: t
65
65
  });
66
66
  return n;
67
67
  });
68
68
  r(this, "getBanks", async () => {
69
- const { data: a } = await s.get(
70
- e.BANKS
69
+ const { data: a } = await e.get(
70
+ s.BANKS
71
71
  );
72
72
  return a.success ? a.data.map((t) => c(t)) : [];
73
73
  });
74
74
  r(this, "getCards", async () => {
75
- const { data: a } = await s.get(
76
- e.CARDS
75
+ const { data: a } = await e.get(
76
+ s.CARDS
77
77
  );
78
78
  return a.success ? a.data.map((t) => c(t)) : [];
79
79
  });
80
80
  r(this, "getUserCards", async () => {
81
- const { data: a } = await s.get(
82
- e.USER_CARDS
81
+ const { data: a } = await e.get(
82
+ s.USER_CARDS
83
83
  );
84
84
  return a.success ? a.data.map((t) => c(t)) : [];
85
85
  });
86
86
  r(this, "addCardsToWallet", async (a) => {
87
- const { data: t } = await s.post(
88
- e.ADD_USER_CARDS,
87
+ const { data: t } = await e.post(
88
+ s.ADD_USER_CARDS,
89
89
  {
90
90
  card_ids: a
91
91
  }
@@ -93,8 +93,8 @@ class A {
93
93
  return t;
94
94
  });
95
95
  r(this, "removeCardsFromWallet", async (a) => {
96
- const { data: t } = await s.post(
97
- e.REMOVE_USER_CARDS,
96
+ const { data: t } = await e.post(
97
+ s.REMOVE_USER_CARDS,
98
98
  {
99
99
  card_ids: a
100
100
  }
@@ -102,12 +102,12 @@ class A {
102
102
  return t;
103
103
  });
104
104
  r(this, "getPointsAsCash", async () => {
105
- const { data: a } = await s.get(e.POINTS_AS_CASH);
105
+ const { data: a } = await A.get(s.POINTS_AS_CASH);
106
106
  return a.success ? c(a.data) : { availablePoints: 0, valuePerPoint: 0, currency: "" };
107
107
  });
108
108
  }
109
109
  }
110
- const l = new A();
110
+ const w = new u();
111
111
  export {
112
- l as WalletService
112
+ w as WalletService
113
113
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odynn/awayz-core",
3
- "version": "0.6.28",
3
+ "version": "0.6.30",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"