@lilbox/contracts 0.0.5 → 0.1.0
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/auth.d.ts +11 -0
- package/dist/auth.js +3 -0
- package/dist/openapi.json +1 -1
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -50,6 +50,15 @@ export declare const SessionsResponse: z.ZodObject<{
|
|
|
50
50
|
last_active_at: z.ZodISODateTime;
|
|
51
51
|
}, z.core.$strip>>;
|
|
52
52
|
}, z.core.$strip>;
|
|
53
|
+
/** POST /auth/accept-terms: the user, now with terms_accepted true. */
|
|
54
|
+
export declare const AcceptTermsResponse: z.ZodObject<{
|
|
55
|
+
user: z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
email: z.ZodEmail;
|
|
58
|
+
name: z.ZodNullable<z.ZodString>;
|
|
59
|
+
terms_accepted: z.ZodBoolean;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
}, z.core.$strip>;
|
|
53
62
|
export declare const MagicLinkRequestBody: z.ZodObject<{
|
|
54
63
|
email: z.ZodEmail;
|
|
55
64
|
return_to: z.ZodOptional<z.ZodString>;
|
|
@@ -76,6 +85,7 @@ export declare const AUTH_PATHS: {
|
|
|
76
85
|
readonly refresh: "/auth/refresh";
|
|
77
86
|
readonly logout: "/auth/logout";
|
|
78
87
|
readonly sessions: "/auth/sessions";
|
|
88
|
+
readonly acceptTerms: "/auth/accept-terms";
|
|
79
89
|
readonly signIn: (provider: "google" | "github") => "/auth/github" | "/auth/google";
|
|
80
90
|
};
|
|
81
91
|
export type AuthUser = z.infer<typeof AuthUser>;
|
|
@@ -83,6 +93,7 @@ export type TokenPair = z.infer<typeof TokenPair>;
|
|
|
83
93
|
export type MagicLinkVerifyResponse = z.infer<typeof MagicLinkVerifyResponse>;
|
|
84
94
|
export type DashboardSession = z.infer<typeof DashboardSession>;
|
|
85
95
|
export type SessionsResponse = z.infer<typeof SessionsResponse>;
|
|
96
|
+
export type AcceptTermsResponse = z.infer<typeof AcceptTermsResponse>;
|
|
86
97
|
export type MagicLinkRequestBody = z.infer<typeof MagicLinkRequestBody>;
|
|
87
98
|
export type MagicLinkVerifyBody = z.infer<typeof MagicLinkVerifyBody>;
|
|
88
99
|
export type ExchangeCodeBody = z.infer<typeof ExchangeCodeBody>;
|
package/dist/auth.js
CHANGED
|
@@ -36,6 +36,8 @@ export const DashboardSession = z.object({
|
|
|
36
36
|
last_active_at: z.iso.datetime(),
|
|
37
37
|
});
|
|
38
38
|
export const SessionsResponse = z.object({ sessions: z.array(DashboardSession) });
|
|
39
|
+
/** POST /auth/accept-terms: the user, now with terms_accepted true. */
|
|
40
|
+
export const AcceptTermsResponse = z.object({ user: AuthUser });
|
|
39
41
|
// -----------------------------------------------------------------------------------------------------------
|
|
40
42
|
// Requests
|
|
41
43
|
// -----------------------------------------------------------------------------------------------------------
|
|
@@ -61,5 +63,6 @@ export const AUTH_PATHS = {
|
|
|
61
63
|
refresh: "/auth/refresh",
|
|
62
64
|
logout: "/auth/logout",
|
|
63
65
|
sessions: "/auth/sessions",
|
|
66
|
+
acceptTerms: "/auth/accept-terms",
|
|
64
67
|
signIn: (provider) => `/auth/${provider}`,
|
|
65
68
|
};
|
package/dist/openapi.json
CHANGED
package/package.json
CHANGED