@zimyo/manage 0.0.3 → 0.0.4

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/main.cjs CHANGED
@@ -61,7 +61,7 @@ Check the top-level render call using <`+mt+">.")}return gt}}function tn(De,gt){
61
61
  *
62
62
  * This source code is licensed under the MIT license found in the
63
63
  * LICENSE file in the root directory of this source tree.
64
- */var yW;function Hye(){return yW||(yW=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=X,n=tJ();function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(d,p,f,m,h){var g=i(null),v;g.current===null?(v={hasValue:!1,value:null},g.current=v):v=g.current;var b=s(function(){var x=!1,E,k,R=function(_){if(!x){x=!0,E=_;var D=m(_);if(h!==void 0&&v.hasValue){var F=v.value;if(h(F,D))return k=F,F}return k=D,D}var L=E,B=k;if(r(L,_))return B;var W=m(_);return h!==void 0&&h(B,W)?B:(E=_,k=W,W)},A=f===void 0?null:f,P=function(){return R(p())},N=A===null?void 0:function(){return R(A())};return[P,N]},[p,f,m,h]),w=b[0],C=b[1],O=o(d,w,C);return a(function(){v.hasValue=!0,v.value=O},[O]),l(O),O}DD.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),DD}process.env.NODE_ENV==="production"?Lj.exports=Wye():Lj.exports=Hye();var Gye=Lj.exports;const Yye=gh(Gye);var nJ={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Uye}=X,{useSyncExternalStoreWithSelector:Xye}=Yye;let bW=!1;const qye=e=>e;function Zye(e,n=qye,t){(nJ?"production":void 0)!=="production"&&t&&!bW&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),bW=!0);const r=Xye(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return Uye(r),r}const xW=e=>{(nJ?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?Vye(e):e,t=(r,o)=>Zye(n,r,o);return Object.assign(t,n),t},rJ=e=>e?xW(e):xW,hB=rJ(e=>({session:{user:void 0,token:void 0,apiURL:void 0},setSession:n=>e(()=>({session:n})),clearSession:()=>e(()=>({session:{user:void 0,apiURL:void 0,token:void 0}}))})),LI=rJ(e=>({alert:{isLoading:!1,type:void 0,message:void 0},pushAlert:n=>e(({alert:t})=>({alert:Tr(Yt({},t),{message:n.message,type:n.type})})),setLoading:({isLoading:n})=>e(({alert:t})=>({alert:Tr(Yt({},t),{isLoading:n})})),clearAlert:()=>e(({alert:n})=>({alert:Tr(Yt({},n),{message:void 0,type:void 0})}))})),Fg=(e,n,t,r)=>{var h,g;const{pushAlert:o}=LI(),{session:{token:i="eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6IjQwNDc0MTdkLWY2MzMtNDA4MC05ODEwLWExMWQ5ODUwMTllOSJ9.eyJjYWxsYmFja191cmwiOiJodHRwczovL21hbmFnZS56aW15by5hcHAvIiwic2VydmljZSI6Im1hbmFnZSIsInJlbW90ZV9hZGRyIjoiMTIyLjE4NC4xNDAuMjAyIiwiZGV2aWNlIjoicG9zdG1hbiIsImRldmljZV90eXBlIjoicG9zdG1hbiIsInNhbHQiOiJjZjQzNzdkNS02ODVhLTQ1OTUtOTIwNy05MTZkYzBmN2VkNGYiLCJpYXQiOjE3MjExMDI5MTd9.CQ8WbIvpIJrk1VPHQK64k3uRwmqbED_Ii4Nbk8z4TB5zx9emjd771F09WKN3j4pfXTkeWwJaak9j9ybE3qtCWg",API_BASE_URL:a="https://api.zimyo.app/manage/"}}=hB(),m=n,{url:s,isNativeEndpoint:l=!0}=m,c=np(m,["url","isNativeEndpoint"]);let d=Tr(Yt({},c),{url:`${a}${s}`});l||(d=Tr(Yt({},d),{url:s})),d!=null&&d.token||(d=Tr(Yt({},d),{token:i}));let p=pve([t,d],({signal:v})=>e(d,v),Yt({enabled:!!d.token,keepPreviousData:!0,cacheTime:15*60*1e3,staleTime:15*60*1e3,refetchOnWindowFocus:!1,refetchInterval:!1,retry:3,retryDelay:2e3,onSuccess:v=>{var b,w;(b=v==null?void 0:v.data)!=null&&b.error&&o({message:((w=v==null?void 0:v.data)==null?void 0:w.message)||"Something Went Wrong",type:"error"})},onError:({response:v})=>{var b;o({message:((b=v==null?void 0:v.data)==null?void 0:b.message)||"Something Went Wrong",type:"error"})}},r));const f=p==null?void 0:p.data;return p.data=(g=(h=p==null?void 0:p.data)==null?void 0:h.data)==null?void 0:g.data,Yt({rq_data:f},p)},Kye="/auth/authenticate-token",Jye="subscription/overview",Qye="subscription/customer-subscription",ebe="subscription/manage-plans",tbe="subscription/transaction-history",nbe="wallet/add",rbe="subscription/customer-invoice",obe="subscription/client-consumption";function vh(e,n){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||n(...r)}}function If(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oJ(e){if(!If(e))return e;const n={};return Object.keys(e).forEach(t=>{n[t]=oJ(e[t])}),n}function Gl(e,n,t={clone:!0}){const r=t.clone?ae({},e):e;return If(e)&&If(n)&&Object.keys(n).forEach(o=>{If(n[o])&&Object.prototype.hasOwnProperty.call(e,o)&&If(e[o])?r[o]=Gl(e[o],n[o],t):t.clone?r[o]=If(n[o])?oJ(n[o]):n[o]:r[o]=n[o]}),r}const ibe=Object.freeze(Object.defineProperty({__proto__:null,default:Gl,isPlainObject:If},Symbol.toStringTag,{value:"Module"}));var Bj={exports:{}},tE={exports:{}},Qr={};/** @license React v16.13.1
64
+ */var yW;function Hye(){return yW||(yW=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=X,n=tJ();function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(d,p,f,m,h){var g=i(null),v;g.current===null?(v={hasValue:!1,value:null},g.current=v):v=g.current;var b=s(function(){var x=!1,E,k,R=function(_){if(!x){x=!0,E=_;var D=m(_);if(h!==void 0&&v.hasValue){var F=v.value;if(h(F,D))return k=F,F}return k=D,D}var L=E,B=k;if(r(L,_))return B;var W=m(_);return h!==void 0&&h(B,W)?B:(E=_,k=W,W)},A=f===void 0?null:f,P=function(){return R(p())},N=A===null?void 0:function(){return R(A())};return[P,N]},[p,f,m,h]),w=b[0],C=b[1],O=o(d,w,C);return a(function(){v.hasValue=!0,v.value=O},[O]),l(O),O}DD.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),DD}process.env.NODE_ENV==="production"?Lj.exports=Wye():Lj.exports=Hye();var Gye=Lj.exports;const Yye=gh(Gye);var nJ={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Uye}=X,{useSyncExternalStoreWithSelector:Xye}=Yye;let bW=!1;const qye=e=>e;function Zye(e,n=qye,t){(nJ?"production":void 0)!=="production"&&t&&!bW&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),bW=!0);const r=Xye(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return Uye(r),r}const xW=e=>{(nJ?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?Vye(e):e,t=(r,o)=>Zye(n,r,o);return Object.assign(t,n),t},rJ=e=>e?xW(e):xW,hB=rJ(e=>({session:{user:void 0,token:void 0,apiURL:void 0},setSession:n=>e(()=>({session:n})),clearSession:()=>e(()=>({session:{user:void 0,apiURL:void 0,token:void 0}}))})),LI=rJ(e=>({alert:{isLoading:!1,type:void 0,message:void 0},pushAlert:n=>e(({alert:t})=>({alert:Tr(Yt({},t),{message:n.message,type:n.type})})),setLoading:({isLoading:n})=>e(({alert:t})=>({alert:Tr(Yt({},t),{isLoading:n})})),clearAlert:()=>e(({alert:n})=>({alert:Tr(Yt({},n),{message:void 0,type:void 0})}))})),Fg=(e,n,t,r)=>{var h,g;const{pushAlert:o}=LI(),{session:{token:i,API_BASE_URL:a}}=hB(),m=n,{url:s,isNativeEndpoint:l=!0}=m,c=np(m,["url","isNativeEndpoint"]);let d=Tr(Yt({},c),{url:`${a}${s}`});l||(d=Tr(Yt({},d),{url:s})),d!=null&&d.token||(d=Tr(Yt({},d),{token:i}));let p=pve([t,d],({signal:v})=>e(d,v),Yt({enabled:!!d.token,keepPreviousData:!0,cacheTime:15*60*1e3,staleTime:15*60*1e3,refetchOnWindowFocus:!1,refetchInterval:!1,retry:3,retryDelay:2e3,onSuccess:v=>{var b,w;(b=v==null?void 0:v.data)!=null&&b.error&&o({message:((w=v==null?void 0:v.data)==null?void 0:w.message)||"Something Went Wrong",type:"error"})},onError:({response:v})=>{var b;o({message:((b=v==null?void 0:v.data)==null?void 0:b.message)||"Something Went Wrong",type:"error"})}},r));const f=p==null?void 0:p.data;return p.data=(g=(h=p==null?void 0:p.data)==null?void 0:h.data)==null?void 0:g.data,Yt({rq_data:f},p)},Kye="auth/authenticate-token",Jye="subscription/overview",Qye="subscription/customer-subscription",ebe="subscription/manage-plans",tbe="subscription/transaction-history",nbe="wallet/add",rbe="subscription/customer-invoice",obe="subscription/client-consumption";function vh(e,n){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||n(...r)}}function If(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function oJ(e){if(!If(e))return e;const n={};return Object.keys(e).forEach(t=>{n[t]=oJ(e[t])}),n}function Gl(e,n,t={clone:!0}){const r=t.clone?ae({},e):e;return If(e)&&If(n)&&Object.keys(n).forEach(o=>{If(n[o])&&Object.prototype.hasOwnProperty.call(e,o)&&If(e[o])?r[o]=Gl(e[o],n[o],t):t.clone?r[o]=If(n[o])?oJ(n[o]):n[o]:r[o]=n[o]}),r}const ibe=Object.freeze(Object.defineProperty({__proto__:null,default:Gl,isPlainObject:If},Symbol.toStringTag,{value:"Module"}));var Bj={exports:{}},tE={exports:{}},Qr={};/** @license React v16.13.1
65
65
  * react-is.production.min.js
66
66
  *
67
67
  * Copyright (c) Facebook, Inc. and its affiliates.
package/dist/main.js CHANGED
@@ -3309,7 +3309,7 @@ const _W = (e) => {
3309
3309
  }))
3310
3310
  })), Xg = (e, n, t, r) => {
3311
3311
  var h, g;
3312
- const { pushAlert: o } = KI(), { session: { token: i = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCIsImtpZCI6IjQwNDc0MTdkLWY2MzMtNDA4MC05ODEwLWExMWQ5ODUwMTllOSJ9.eyJjYWxsYmFja191cmwiOiJodHRwczovL21hbmFnZS56aW15by5hcHAvIiwic2VydmljZSI6Im1hbmFnZSIsInJlbW90ZV9hZGRyIjoiMTIyLjE4NC4xNDAuMjAyIiwiZGV2aWNlIjoicG9zdG1hbiIsImRldmljZV90eXBlIjoicG9zdG1hbiIsInNhbHQiOiJjZjQzNzdkNS02ODVhLTQ1OTUtOTIwNy05MTZkYzBmN2VkNGYiLCJpYXQiOjE3MjExMDI5MTd9.CQ8WbIvpIJrk1VPHQK64k3uRwmqbED_Ii4Nbk8z4TB5zx9emjd771F09WKN3j4pfXTkeWwJaak9j9ybE3qtCWg", API_BASE_URL: a = "https://api.zimyo.app/manage/" } } = MB(), m = n, { url: s, isNativeEndpoint: l = !0 } = m, c = dp(m, ["url", "isNativeEndpoint"]);
3312
+ const { pushAlert: o } = KI(), { session: { token: i, API_BASE_URL: a } } = MB(), m = n, { url: s, isNativeEndpoint: l = !0 } = m, c = dp(m, ["url", "isNativeEndpoint"]);
3313
3313
  let d = Ir(Yt({}, c), { url: `${a}${s}` });
3314
3314
  l || (d = Ir(Yt({}, d), { url: s })), d != null && d.token || (d = Ir(Yt({}, d), { token: i }));
3315
3315
  let p = Rve([t, d], ({ signal: v }) => e(d, v), Yt({
@@ -3324,16 +3324,22 @@ const _W = (e) => {
3324
3324
  retryDelay: 2e3,
3325
3325
  onSuccess: (v) => {
3326
3326
  var b, w;
3327
- (b = v == null ? void 0 : v.data) != null && b.error && o({ message: ((w = v == null ? void 0 : v.data) == null ? void 0 : w.message) || "Something Went Wrong", type: "error" });
3327
+ (b = v == null ? void 0 : v.data) != null && b.error && o({
3328
+ message: ((w = v == null ? void 0 : v.data) == null ? void 0 : w.message) || "Something Went Wrong",
3329
+ type: "error"
3330
+ });
3328
3331
  },
3329
3332
  onError: ({ response: v }) => {
3330
3333
  var b;
3331
- o({ message: ((b = v == null ? void 0 : v.data) == null ? void 0 : b.message) || "Something Went Wrong", type: "error" });
3334
+ o({
3335
+ message: ((b = v == null ? void 0 : v.data) == null ? void 0 : b.message) || "Something Went Wrong",
3336
+ type: "error"
3337
+ });
3332
3338
  }
3333
3339
  }, r));
3334
3340
  const f = p == null ? void 0 : p.data;
3335
3341
  return p.data = (g = (h = p == null ? void 0 : p.data) == null ? void 0 : h.data) == null ? void 0 : g.data, Yt({ rq_data: f }, p);
3336
- }, gbe = "/auth/authenticate-token", vbe = "subscription/overview", ybe = "subscription/customer-subscription", bbe = "subscription/manage-plans", xbe = "subscription/transaction-history", wbe = "wallet/add", Cbe = "subscription/customer-invoice", Sbe = "subscription/client-consumption";
3342
+ }, gbe = "auth/authenticate-token", vbe = "subscription/overview", ybe = "subscription/customer-subscription", bbe = "subscription/manage-plans", xbe = "subscription/transaction-history", wbe = "wallet/add", Cbe = "subscription/customer-invoice", Sbe = "subscription/client-consumption";
3337
3343
  function Mh(e, n) {
3338
3344
  return process.env.NODE_ENV === "production" ? () => null : function(...r) {
3339
3345
  return e(...r) || n(...r);
@@ -1,4 +1,4 @@
1
- export declare const AUTHENTICATE_TOKEN = "/auth/authenticate-token";
1
+ export declare const AUTHENTICATE_TOKEN = "auth/authenticate-token";
2
2
  /**SUBSCRIPTION */
3
3
  export declare const SUBSCRIPTION_OVERVIEW = "subscription/overview";
4
4
  export declare const CUSTOMER_SUBSCRIPTION = "subscription/customer-subscription";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimyo/manage",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"