@pear-protocol/types 1.12.0 → 1.14.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/response.d.ts +20 -2
- package/dist/auth/response.js +11 -2
- package/package.json +1 -1
package/dist/auth/response.d.ts
CHANGED
|
@@ -23,14 +23,32 @@ export declare const RefreshTokenResponse: z.ZodObject<{
|
|
|
23
23
|
tokenType: z.ZodLiteral<"Bearer">;
|
|
24
24
|
expiresIn: z.ZodNumber;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
|
-
export declare const RefreshSessionResponse: z.
|
|
26
|
+
export declare const RefreshSessionResponse: z.ZodObject<{
|
|
27
|
+
accessToken: z.ZodString;
|
|
28
|
+
tokenType: z.ZodLiteral<"Bearer">;
|
|
29
|
+
expiresIn: z.ZodNumber;
|
|
30
|
+
}, z.core.$strip>;
|
|
27
31
|
export declare const LogoutResponse: z.ZodVoid;
|
|
28
32
|
export declare const RegisterEmailResponse: z.ZodVoid;
|
|
29
|
-
export declare const VerifyEmailResponse: z.ZodVoid;
|
|
30
33
|
export declare const ResendVerificationResponse: z.ZodVoid;
|
|
31
34
|
export declare const ChangePasswordResponse: z.ZodVoid;
|
|
32
35
|
export declare const ForgotPasswordResponse: z.ZodVoid;
|
|
33
36
|
export declare const ResetPasswordResponse: z.ZodVoid;
|
|
37
|
+
/**
|
|
38
|
+
* Verification is a terminal, one-shot action reached from an email link, and the
|
|
39
|
+
* client has no session yet to read the result back from. Returning the claim it
|
|
40
|
+
* settled lets the page confirm *what* was verified instead of inferring success
|
|
41
|
+
* from an empty 204.
|
|
42
|
+
*/
|
|
43
|
+
export declare const VerifyEmailResponse: z.ZodObject<{
|
|
44
|
+
verified: z.ZodLiteral<true>;
|
|
45
|
+
email: z.ZodString;
|
|
46
|
+
flow: z.ZodEnum<{
|
|
47
|
+
register: "register";
|
|
48
|
+
link: "link";
|
|
49
|
+
}>;
|
|
50
|
+
verifiedAt: z.ZodString;
|
|
51
|
+
}, z.core.$strip>;
|
|
34
52
|
export declare const LinkEmailResponse: z.ZodVoid;
|
|
35
53
|
export declare const LinkWalletResponse: z.ZodVoid;
|
|
36
54
|
export declare const RequestNonceResponse: z.ZodObject<{
|
package/dist/auth/response.js
CHANGED
|
@@ -12,14 +12,23 @@ const RefreshTokenResponse = z.object({
|
|
|
12
12
|
tokenType: z.literal("Bearer").describe('Token type (always "Bearer")'),
|
|
13
13
|
expiresIn: z.number().int().positive().describe("Access token expiry time in seconds")
|
|
14
14
|
}).describe("Successful token refresh response");
|
|
15
|
-
const RefreshSessionResponse = z.
|
|
15
|
+
const RefreshSessionResponse = z.object({
|
|
16
|
+
accessToken: z.string().describe("New JWT access token"),
|
|
17
|
+
tokenType: z.literal("Bearer").describe('Token type (always "Bearer")'),
|
|
18
|
+
expiresIn: z.number().int().positive().describe("Access token expiry time in seconds")
|
|
19
|
+
}).describe("Successful session refresh response");
|
|
16
20
|
const LogoutResponse = z.void().describe("Successful logout response");
|
|
17
21
|
const RegisterEmailResponse = z.void().describe("Successful email registration response");
|
|
18
|
-
const VerifyEmailResponse = z.void().describe("Successful email verification response");
|
|
19
22
|
const ResendVerificationResponse = z.void().describe("Successful resend verification email response");
|
|
20
23
|
const ChangePasswordResponse = z.void().describe("Successful password change response");
|
|
21
24
|
const ForgotPasswordResponse = z.void().describe("Successful password reset request response");
|
|
22
25
|
const ResetPasswordResponse = z.void().describe("Successful password reset response");
|
|
26
|
+
const VerifyEmailResponse = z.object({
|
|
27
|
+
verified: z.literal(true).describe("Always true; the claim behind the token is now verified"),
|
|
28
|
+
email: z.string().describe("Email address the verified claim belongs to"),
|
|
29
|
+
flow: z.enum(["register", "link"]).describe("Claim flow the token was issued for"),
|
|
30
|
+
verifiedAt: z.string().describe("ISO-8601 timestamp of when the claim was verified")
|
|
31
|
+
}).describe("Successful email verification response");
|
|
23
32
|
const LinkEmailResponse = z.void().describe("Successful email verification response");
|
|
24
33
|
const LinkWalletResponse = z.void().describe("Successful wallet link response");
|
|
25
34
|
const RequestNonceResponse = z.object({
|