@nocobase/sdk 1.8.0-alpha.9 → 1.8.0-beta.10
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/lib/APIClient.d.ts +0 -3
- package/lib/APIClient.js +0 -32
- package/package.json +2 -2
package/lib/APIClient.d.ts
CHANGED
|
@@ -98,9 +98,6 @@ export declare class Auth {
|
|
|
98
98
|
signIn(values: any, authenticator?: string): Promise<AxiosResponse<any>>;
|
|
99
99
|
signUp(values: any, authenticator?: string): Promise<AxiosResponse<any>>;
|
|
100
100
|
signOut(): Promise<AxiosResponse<any, any>>;
|
|
101
|
-
lostPassword(values: any): Promise<AxiosResponse<any>>;
|
|
102
|
-
resetPassword(values: any): Promise<AxiosResponse<any>>;
|
|
103
|
-
checkResetToken(values: any): Promise<AxiosResponse<any>>;
|
|
104
101
|
}
|
|
105
102
|
export declare abstract class Storage {
|
|
106
103
|
abstract clear(): void;
|
package/lib/APIClient.js
CHANGED
|
@@ -232,38 +232,6 @@ const _Auth = class _Auth {
|
|
|
232
232
|
this.setAuthenticator(null);
|
|
233
233
|
return response;
|
|
234
234
|
}
|
|
235
|
-
async lostPassword(values) {
|
|
236
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
237
|
-
const paramsObject = Object.fromEntries(searchParams.entries());
|
|
238
|
-
const response = await this.api.request({
|
|
239
|
-
method: "post",
|
|
240
|
-
url: "auth:lostPassword",
|
|
241
|
-
data: {
|
|
242
|
-
...values,
|
|
243
|
-
baseURL: window.location.href.split("/forgot-password")[0]
|
|
244
|
-
},
|
|
245
|
-
headers: {
|
|
246
|
-
"X-Authenticator": paramsObject.name
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
return response;
|
|
250
|
-
}
|
|
251
|
-
async resetPassword(values) {
|
|
252
|
-
const response = await this.api.request({
|
|
253
|
-
method: "post",
|
|
254
|
-
url: "auth:resetPassword",
|
|
255
|
-
data: values
|
|
256
|
-
});
|
|
257
|
-
return response;
|
|
258
|
-
}
|
|
259
|
-
async checkResetToken(values) {
|
|
260
|
-
const response = await this.api.request({
|
|
261
|
-
method: "post",
|
|
262
|
-
url: "auth:checkResetToken",
|
|
263
|
-
data: values
|
|
264
|
-
});
|
|
265
|
-
return response;
|
|
266
|
-
}
|
|
267
235
|
};
|
|
268
236
|
__name(_Auth, "Auth");
|
|
269
237
|
let Auth = _Auth;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/sdk",
|
|
3
|
-
"version": "1.8.0-
|
|
3
|
+
"version": "1.8.0-beta.10",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"axios-mock-adapter": "^1.20.0"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "09fe854edfc44f45422fa983093dd34694416c5a"
|
|
15
15
|
}
|