@pear-protocol/core-sdk 0.0.6 → 0.0.8
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/index.d.ts +4 -0
- package/dist/auth/index.js +21 -0
- package/dist/info/index.d.ts +3 -0
- package/dist/info/index.js +7 -0
- package/package.json +3 -3
package/dist/auth/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare class Auth {
|
|
|
22
22
|
}>;
|
|
23
23
|
requestNonce(body: HttpTypes.RequestNonceRequest, headers?: ClientHeaders): Promise<{
|
|
24
24
|
nonce: string;
|
|
25
|
+
message: string;
|
|
25
26
|
expiresAt: number;
|
|
26
27
|
}>;
|
|
27
28
|
registerEmail(body: HttpTypes.EmailRegisterRequest, headers?: ClientHeaders): Promise<void>;
|
|
@@ -41,6 +42,9 @@ declare class Auth {
|
|
|
41
42
|
verifyEmail(body: HttpTypes.VerifyEmailRequest, headers?: ClientHeaders): Promise<void>;
|
|
42
43
|
resendVerificationForLink(headers?: ClientHeaders): Promise<void>;
|
|
43
44
|
resendVerificationForRegister(body: HttpTypes.ResendVerificationForRegisterRequest, headers?: ClientHeaders): Promise<void>;
|
|
45
|
+
changePassword(body: HttpTypes.ChangePasswordRequest, headers?: ClientHeaders): Promise<void>;
|
|
46
|
+
forgotPassword(body: HttpTypes.ForgotPasswordRequest, headers?: ClientHeaders): Promise<void>;
|
|
47
|
+
resetPassword(body: HttpTypes.ResetPasswordRequest, headers?: ClientHeaders): Promise<void>;
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
export { Auth };
|
package/dist/auth/index.js
CHANGED
|
@@ -83,6 +83,27 @@ class Auth {
|
|
|
83
83
|
body
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
+
async changePassword(body, headers) {
|
|
87
|
+
return await this.client.fetch(`/auth/password/change`, {
|
|
88
|
+
method: "POST",
|
|
89
|
+
headers,
|
|
90
|
+
body
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
async forgotPassword(body, headers) {
|
|
94
|
+
return await this.client.fetch(`/auth/password/forgot`, {
|
|
95
|
+
method: "POST",
|
|
96
|
+
headers,
|
|
97
|
+
body
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
async resetPassword(body, headers) {
|
|
101
|
+
return await this.client.fetch(`/auth/password/reset`, {
|
|
102
|
+
method: "POST",
|
|
103
|
+
headers,
|
|
104
|
+
body
|
|
105
|
+
});
|
|
106
|
+
}
|
|
86
107
|
}
|
|
87
108
|
|
|
88
109
|
export { Auth };
|
package/dist/info/index.d.ts
CHANGED
|
@@ -93,6 +93,9 @@ declare class Info {
|
|
|
93
93
|
slippageToleranceBps: number;
|
|
94
94
|
};
|
|
95
95
|
}>;
|
|
96
|
+
updateDisplayName: (body: HttpTypes.UpdateUserDisplayName, headers?: ClientHeaders) => Promise<{
|
|
97
|
+
displayName: string;
|
|
98
|
+
}>;
|
|
96
99
|
updatePreferences: (body: HttpTypes.UpdateUserPreferences, headers?: ClientHeaders) => Promise<{
|
|
97
100
|
preferences: {
|
|
98
101
|
slippageToleranceBps: number;
|
package/dist/info/index.js
CHANGED
|
@@ -51,6 +51,13 @@ class Info {
|
|
|
51
51
|
headers
|
|
52
52
|
});
|
|
53
53
|
},
|
|
54
|
+
updateDisplayName: async (body, headers) => {
|
|
55
|
+
return await this.client.fetch(`/users/profile/display-name`, {
|
|
56
|
+
method: "PATCH",
|
|
57
|
+
headers,
|
|
58
|
+
body
|
|
59
|
+
});
|
|
60
|
+
},
|
|
54
61
|
updatePreferences: async (body, headers) => {
|
|
55
62
|
return await this.client.fetch(`/users/preferences`, {
|
|
56
63
|
method: "PATCH",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/core-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Pear Protocol Core SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pear-protocol/types": "0.0.
|
|
29
|
-
"@pear-protocol/utils": "0.0.
|
|
28
|
+
"@pear-protocol/types": "0.0.7",
|
|
29
|
+
"@pear-protocol/utils": "0.0.7",
|
|
30
30
|
"qs": "^6.14.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|