@uninspired/auth-client 0.0.11 → 0.0.12
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +3 -3
- package/dist/types/index.d.ts +20 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var{defineProperty:u,getOwnPropertyNames:y,getOwnPropertyDescriptor:
|
|
1
|
+
var{defineProperty:u,getOwnPropertyNames:y,getOwnPropertyDescriptor:g}=Object,R=Object.prototype.hasOwnProperty;var a=new WeakMap,k=(e)=>{var t=a.get(e),n;if(t)return t;if(t=u({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function")y(e).map((r)=>!R.call(t,r)&&u(t,r,{get:()=>e[r],enumerable:!(n=g(e,r))||n.enumerable}));return a.set(e,t),t};var x=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0,configurable:!0,set:(r)=>t[n]=()=>r})};var S={};x(S,{makeUsBetterAuthClient:()=>A,makeRedirectIntent:()=>C,makePublicClient:()=>P,makeLoginUrl:()=>O,makeCheckoutUrl:()=>q,makeCheckoutClient:()=>d,makeAppClient:()=>b});module.exports=k(S);var m=require("hono/client"),P=(e,t)=>{return m.hc(e,t)};var h=require("hono/client"),b=(e,t)=>{return h.hc(e,{...t,fetch:(n,r)=>(t?.fetch??fetch)(n,{...r,credentials:"include",headers:{...r.headers,"Content-Type":"application/json"}})})};var o=require("better-auth/client/plugins"),f=require("better-auth/react"),A=(e)=>{return f.createAuthClient({baseURL:e,plugins:[o.customSessionClient(),o.magicLinkClient(),o.emailOTPClient(),o.passkeyClient()]})};var l=require("hono/client"),d=(e,t)=>{return l.hc(e,{...t,fetch:(n,r)=>(t?.fetch??fetch)(n,{...r,credentials:"include",headers:{...r.headers,"Content-Type":"application/json"}})})};function O(e,t,n){let r=new URL("/login",e);if(t)r.searchParams.set("intent",C(t,n));return r.toString()}function j(...e){}function q(e,t,n,r,s,p,c){j({priceId:t,productId:n,discountCode:r,loginUrl:s,pricingUrl:p,successUrl:c});let i=new URL("/auth/checkout",e);if(i.searchParams.set("priceId",t),i.searchParams.set("productId",n),r)i.searchParams.set("discountCode",r);if(s)i.searchParams.set("loginUrl",s);if(p)i.searchParams.set("pricingUrl",p);if(c)i.searchParams.set("successUrl",c);return i.toString()}function C(e,t){return JSON.stringify({type:"redirect",redirectUrl:e,appName:t})}
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=D2A8D8299A3497FE64756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"import type { AppRouter } from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport type AppClient = ReturnType<typeof hc<AppRouter>>;\n\nexport const makeAppClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): AppClient => {\n return hc<AppRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n",
|
|
7
7
|
"import {\n customSessionClient,\n magicLinkClient,\n emailOTPClient,\n passkeyClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport type { Auth } from \"@us-accounts/api\";\n\nexport const makeUsBetterAuthClient = (baseURL: string) => {\n return createAuthClient({\n baseURL,\n plugins: [\n customSessionClient<Auth>(),\n magicLinkClient(),\n emailOTPClient(),\n passkeyClient(),\n ],\n });\n};\n",
|
|
8
8
|
"import type { CheckoutRouter } from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport type CheckoutClient = ReturnType<typeof hc<CheckoutRouter>>;\n\nexport const makeCheckoutClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): CheckoutClient => {\n return hc<CheckoutRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n",
|
|
9
|
-
"import type { CheckoutSearch, RedirectIntent } from \"@us-accounts/utils\";\n\nexport function makeLoginUrl(apiUrl: string
|
|
9
|
+
"import type { CheckoutSearch, RedirectIntent } from \"@us-accounts/utils\";\n\nexport function makeLoginUrl(\n apiUrl: string,\n redirectUrl?: string,\n appName?: string,\n) {\n const url = new URL(\"/login\", apiUrl);\n if (redirectUrl) {\n url.searchParams.set(\"intent\", makeRedirectIntent(redirectUrl, appName));\n }\n return url.toString();\n}\n\nfunction noop(...args: any[]) {\n // Do nothing\n}\n\nexport function makeCheckoutUrl(\n apiUrl: string,\n priceId: string,\n productId: string,\n discountCode?: string,\n loginUrl?: string,\n pricingUrl?: string,\n successUrl?: string,\n) {\n const obj = {\n priceId,\n productId,\n discountCode,\n loginUrl,\n pricingUrl,\n successUrl,\n } satisfies CheckoutSearch;\n noop(obj);\n\n const url = new URL(\"/auth/checkout\", apiUrl);\n url.searchParams.set(\"priceId\", priceId);\n url.searchParams.set(\"productId\", productId);\n if (discountCode) {\n url.searchParams.set(\"discountCode\", discountCode);\n }\n if (loginUrl) {\n url.searchParams.set(\"loginUrl\", loginUrl);\n }\n if (pricingUrl) {\n url.searchParams.set(\"pricingUrl\", pricingUrl);\n }\n if (successUrl) {\n url.searchParams.set(\"successUrl\", successUrl);\n }\n return url.toString();\n}\n\nexport function makeRedirectIntent(\n redirectUrl: string,\n appName?: string,\n): string {\n const obj = {\n type: \"redirect\",\n redirectUrl,\n appName,\n } satisfies RedirectIntent;\n\n return JSON.stringify(obj);\n}\n"
|
|
10
10
|
],
|
|
11
|
-
"mappings": "gpBAC8C,IAA9C,yBAIa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U,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GClBI,SAAS,CAAY,CAC1B,EACA,EACA,EACA,CACA,IAAM,EAAM,IAAI,IAAI,SAAU,CAAM,EACpC,GAAI,EACF,EAAI,aAAa,IAAI,SAAU,EAAmB,EAAa,CAAO,CAAC,EAEzE,OAAO,EAAI,SAAS,EAGtB,SAAS,CAAI,IAAI,EAAa,EAIvB,SAAS,CAAe,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,CASA,EARY,CACV,UACA,YACA,eACA,WACA,aACA,YACF,CACQ,EAER,IAAM,EAAM,IAAI,IAAI,iBAAkB,CAAM,EAG5C,GAFA,EAAI,aAAa,IAAI,UAAW,CAAO,EACvC,EAAI,aAAa,IAAI,YAAa,CAAS,EACvC,EACF,EAAI,aAAa,IAAI,eAAgB,CAAY,EAEnD,GAAI,EACF,EAAI,aAAa,IAAI,WAAY,CAAQ,EAE3C,GAAI,EACF,EAAI,aAAa,IAAI,aAAc,CAAU,EAE/C,GAAI,EACF,EAAI,aAAa,IAAI,aAAc,CAAU,EAE/C,OAAO,EAAI,SAAS,EAGf,SAAS,CAAkB,CAChC,EACA,EACQ,CAOR,OAAO,KAAK,UANA,CACV,KAAM,WACN,cACA,SACF,CAEyB",
|
|
12
|
+
"debugId": "D2A8D8299A3497FE64756E2164756E21",
|
|
13
13
|
"names": []
|
|
14
14
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{hc as c}from"hono/client";var x=(t
|
|
1
|
+
import{hc as c}from"hono/client";var x=(e,t)=>{return c(e,t)};import{hc as u}from"hono/client";var A=(e,t)=>{return u(e,{...t,fetch:(n,r)=>(t?.fetch??fetch)(n,{...r,credentials:"include",headers:{...r.headers,"Content-Type":"application/json"}})})};import{customSessionClient as a,magicLinkClient as m,emailOTPClient as h,passkeyClient as f}from"better-auth/client/plugins";import{createAuthClient as l}from"better-auth/react";var q=(e)=>{return l({baseURL:e,plugins:[a(),m(),h(),f()]})};import{hc as C}from"hono/client";var L=(e,t)=>{return C(e,{...t,fetch:(n,r)=>(t?.fetch??fetch)(n,{...r,credentials:"include",headers:{...r.headers,"Content-Type":"application/json"}})})};function v(e,t,n){let r=new URL("/login",e);if(t)r.searchParams.set("intent",g(t,n));return r.toString()}function y(...e){}function z(e,t,n,r,i,s,p){y({priceId:t,productId:n,discountCode:r,loginUrl:i,pricingUrl:s,successUrl:p});let o=new URL("/auth/checkout",e);if(o.searchParams.set("priceId",t),o.searchParams.set("productId",n),r)o.searchParams.set("discountCode",r);if(i)o.searchParams.set("loginUrl",i);if(s)o.searchParams.set("pricingUrl",s);if(p)o.searchParams.set("successUrl",p);return o.toString()}function g(e,t){return JSON.stringify({type:"redirect",redirectUrl:e,appName:t})}export{q as makeUsBetterAuthClient,g as makeRedirectIntent,x as makePublicClient,v as makeLoginUrl,z as makeCheckoutUrl,L as makeCheckoutClient,A as makeAppClient};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=F9376091D0570D8C64756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"import type { AppRouter } from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport type AppClient = ReturnType<typeof hc<AppRouter>>;\n\nexport const makeAppClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): AppClient => {\n return hc<AppRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n",
|
|
7
7
|
"import {\n customSessionClient,\n magicLinkClient,\n emailOTPClient,\n passkeyClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport type { Auth } from \"@us-accounts/api\";\n\nexport const makeUsBetterAuthClient = (baseURL: string) => {\n return createAuthClient({\n baseURL,\n plugins: [\n customSessionClient<Auth>(),\n magicLinkClient(),\n emailOTPClient(),\n passkeyClient(),\n ],\n });\n};\n",
|
|
8
8
|
"import type { CheckoutRouter } from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport type CheckoutClient = ReturnType<typeof hc<CheckoutRouter>>;\n\nexport const makeCheckoutClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): CheckoutClient => {\n return hc<CheckoutRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n",
|
|
9
|
-
"import type { CheckoutSearch, RedirectIntent } from \"@us-accounts/utils\";\n\nexport function makeLoginUrl(apiUrl: string
|
|
9
|
+
"import type { CheckoutSearch, RedirectIntent } from \"@us-accounts/utils\";\n\nexport function makeLoginUrl(\n apiUrl: string,\n redirectUrl?: string,\n appName?: string,\n) {\n const url = new URL(\"/login\", apiUrl);\n if (redirectUrl) {\n url.searchParams.set(\"intent\", makeRedirectIntent(redirectUrl, appName));\n }\n return url.toString();\n}\n\nfunction noop(...args: any[]) {\n // Do nothing\n}\n\nexport function makeCheckoutUrl(\n apiUrl: string,\n priceId: string,\n productId: string,\n discountCode?: string,\n loginUrl?: string,\n pricingUrl?: string,\n successUrl?: string,\n) {\n const obj = {\n priceId,\n productId,\n discountCode,\n loginUrl,\n pricingUrl,\n successUrl,\n } satisfies CheckoutSearch;\n noop(obj);\n\n const url = new URL(\"/auth/checkout\", apiUrl);\n url.searchParams.set(\"priceId\", priceId);\n url.searchParams.set(\"productId\", productId);\n if (discountCode) {\n url.searchParams.set(\"discountCode\", discountCode);\n }\n if (loginUrl) {\n url.searchParams.set(\"loginUrl\", loginUrl);\n }\n if (pricingUrl) {\n url.searchParams.set(\"pricingUrl\", pricingUrl);\n }\n if (successUrl) {\n url.searchParams.set(\"successUrl\", successUrl);\n }\n return url.toString();\n}\n\nexport function makeRedirectIntent(\n redirectUrl: string,\n appName?: string,\n): string {\n const obj = {\n type: \"redirect\",\n redirectUrl,\n appName,\n } satisfies RedirectIntent;\n\n return JSON.stringify(obj);\n}\n"
|
|
10
10
|
],
|
|
11
|
-
"mappings": "AACA,aAAS,oBAIF,IAAM,EAAmB,CAC9B,EACA,IACiB,CACjB,OAAO,EAAiB,EAAS,CAAO,GCR1C,aAAS,oBAIF,IAAM,EAAgB,CAC3B,EACA,IACc,CACd,OAAO,EAAc,EAAS,IACzB,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GCpBH,8BACE,qBACA,oBACA,mBACA,mCAEF,2BAAS,0BAGF,IAAM,EAAyB,CAAC,IAAoB,CACzD,OAAO,EAAiB,CACtB,UACA,QAAS,CACP,EAA0B,EAC1B,EAAgB,EAChB,EAAe,EACf,EAAc,CAChB,CACF,CAAC,GCjBH,aAAS,oBAIF,IAAM,EAAqB,CAChC,EACA,IACmB,CACnB,OAAO,EAAmB,EAAS,IAC9B,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GClBI,SAAS,CAAY,
|
|
12
|
-
"debugId": "
|
|
11
|
+
"mappings": "AACA,aAAS,oBAIF,IAAM,EAAmB,CAC9B,EACA,IACiB,CACjB,OAAO,EAAiB,EAAS,CAAO,GCR1C,aAAS,oBAIF,IAAM,EAAgB,CAC3B,EACA,IACc,CACd,OAAO,EAAc,EAAS,IACzB,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,O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|
|
12
|
+
"debugId": "F9376091D0570D8C64756E2164756E21",
|
|
13
13
|
"names": []
|
|
14
14
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ declare const appRouter: hono_hono_base.HonoBase<{
|
|
|
93
93
|
input: {
|
|
94
94
|
param: {
|
|
95
95
|
subscriptionId: string;
|
|
96
|
-
action: "
|
|
96
|
+
action: "cancel" | "update";
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
output: undefined;
|
|
@@ -101,6 +101,20 @@ declare const appRouter: hono_hono_base.HonoBase<{
|
|
|
101
101
|
status: 302;
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
+
} & {
|
|
105
|
+
"/subscribe": {
|
|
106
|
+
$post: {
|
|
107
|
+
input: {};
|
|
108
|
+
output: "Unauthorized";
|
|
109
|
+
outputFormat: "text";
|
|
110
|
+
status: 401;
|
|
111
|
+
} | {
|
|
112
|
+
input: {};
|
|
113
|
+
output: "Success";
|
|
114
|
+
outputFormat: "text";
|
|
115
|
+
status: 200;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
104
118
|
}, "/">;
|
|
105
119
|
type AppRouter = typeof appRouter;
|
|
106
120
|
|
|
@@ -3143,6 +3157,7 @@ declare const makeUsBetterAuthClient: (baseURL: string) => {
|
|
|
3143
3157
|
customer: {
|
|
3144
3158
|
id: string;
|
|
3145
3159
|
};
|
|
3160
|
+
subscribedToNewsletter: boolean;
|
|
3146
3161
|
}, {
|
|
3147
3162
|
code?: string;
|
|
3148
3163
|
message?: string;
|
|
@@ -3254,6 +3269,7 @@ declare const makeUsBetterAuthClient: (baseURL: string) => {
|
|
|
3254
3269
|
customer: {
|
|
3255
3270
|
id: string;
|
|
3256
3271
|
};
|
|
3272
|
+
subscribedToNewsletter: boolean;
|
|
3257
3273
|
} | null;
|
|
3258
3274
|
isPending: boolean;
|
|
3259
3275
|
error: _better_fetch_fetch.BetterFetchError | null;
|
|
@@ -3312,6 +3328,7 @@ declare const makeUsBetterAuthClient: (baseURL: string) => {
|
|
|
3312
3328
|
customer: {
|
|
3313
3329
|
id: string;
|
|
3314
3330
|
};
|
|
3331
|
+
subscribedToNewsletter: boolean;
|
|
3315
3332
|
};
|
|
3316
3333
|
};
|
|
3317
3334
|
$fetch: _better_fetch_fetch.BetterFetch<{
|
|
@@ -3415,9 +3432,9 @@ declare const makeUsBetterAuthClient: (baseURL: string) => {
|
|
|
3415
3432
|
type CheckoutClient = ReturnType<typeof hc<CheckoutRouter>>;
|
|
3416
3433
|
declare const makeCheckoutClient: (baseURL: string, options?: ClientRequestOptions) => CheckoutClient;
|
|
3417
3434
|
|
|
3418
|
-
declare function makeLoginUrl(apiUrl: string, redirectUrl?: string): string;
|
|
3435
|
+
declare function makeLoginUrl(apiUrl: string, redirectUrl?: string, appName?: string): string;
|
|
3419
3436
|
declare function makeCheckoutUrl(apiUrl: string, priceId: string, productId: string, discountCode?: string, loginUrl?: string, pricingUrl?: string, successUrl?: string): string;
|
|
3420
|
-
declare function makeRedirectIntent(redirectUrl: string): string;
|
|
3437
|
+
declare function makeRedirectIntent(redirectUrl: string, appName?: string): string;
|
|
3421
3438
|
|
|
3422
3439
|
export { makeAppClient, makeCheckoutClient, makeCheckoutUrl, makeLoginUrl, makePublicClient, makeRedirectIntent, makeUsBetterAuthClient };
|
|
3423
3440
|
export type { AppClient, CheckoutClient, PublicClient };
|