@pear-protocol/types 1.23.0 → 1.24.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.
@@ -15,6 +15,12 @@ export declare const LinkWalletRequest: z.ZodObject<{
15
15
  signature: z.ZodString;
16
16
  nonce: z.ZodOptional<z.ZodString>;
17
17
  }, z.core.$strip>;
18
+ export declare const StartXLinkRequest: z.ZodObject<{
19
+ returnTo: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>;
21
+ export declare const StartXLoginRequest: z.ZodObject<{
22
+ returnTo: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>;
18
24
  export declare const WalletLoginRequest: z.ZodObject<{
19
25
  method: z.ZodLiteral<"wallet">;
20
26
  address: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
@@ -70,6 +76,8 @@ export type WalletLoginRequest = z.infer<typeof WalletLoginRequest>;
70
76
  export type EmailRegisterRequest = z.infer<typeof EmailRegisterRequest>;
71
77
  export type LinkEmailRequest = z.infer<typeof LinkEmailRequest>;
72
78
  export type LinkWalletRequest = z.infer<typeof LinkWalletRequest>;
79
+ export type StartXLinkRequest = z.infer<typeof StartXLinkRequest>;
80
+ export type StartXLoginRequest = z.infer<typeof StartXLoginRequest>;
73
81
  export type EmailLoginRequest = z.infer<typeof EmailLoginRequest>;
74
82
  export type LoginRequest = z.infer<typeof LoginRequest>;
75
83
  export type RefreshTokenRequest = z.infer<typeof RefreshTokenRequest>;
@@ -21,6 +21,16 @@ const LinkWalletRequest = z.object({
21
21
  signature: z.string().min(1, "Signature is required").describe("Signature of the nonce message"),
22
22
  nonce: SignedNonce
23
23
  }).describe("Link wallet credentials to the authenticated account");
24
+ const StartXLinkRequest = z.object({
25
+ returnTo: z.string().optional().describe(
26
+ "Page to send the browser back to once the link finishes, normally the page the user is on. Must be on the calling origin; defaults to that origin."
27
+ )
28
+ }).describe("Start of the X account link flow");
29
+ const StartXLoginRequest = z.object({
30
+ returnTo: z.string().optional().describe(
31
+ "Page to send the browser back to once the sign-in finishes, normally the page the user is on. Must be on the calling origin; defaults to that origin."
32
+ )
33
+ }).describe("Start of the X sign-in flow");
24
34
  const WalletLoginRequest = z.object({
25
35
  method: z.literal("wallet").describe('Must be "wallet" for wallet authentication'),
26
36
  address: EthereumAddress,
@@ -64,4 +74,4 @@ const OauthInteractionConfirmRequest = z.object({
64
74
  )
65
75
  }).describe("Consent confirmation body \u2014 the granted scope set");
66
76
 
67
- export { ChangePasswordRequest, EmailLoginRequest, EmailRegisterRequest, ForgotPasswordRequest, LinkEmailRequest, LinkWalletRequest, LoginRequest, LogoutRequest, OauthInteractionConfirmRequest, RefreshTokenRequest, RequestNonceRequest, ResendVerificationForRegisterRequest, ResetPasswordRequest, VerifyEmailRequest, WalletLoginRequest };
77
+ export { ChangePasswordRequest, EmailLoginRequest, EmailRegisterRequest, ForgotPasswordRequest, LinkEmailRequest, LinkWalletRequest, LoginRequest, LogoutRequest, OauthInteractionConfirmRequest, RefreshTokenRequest, RequestNonceRequest, ResendVerificationForRegisterRequest, ResetPasswordRequest, StartXLinkRequest, StartXLoginRequest, VerifyEmailRequest, WalletLoginRequest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "1.23.0",
3
+ "version": "1.24.0",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",