strapi-sdk-js 2.3.2 → 2.3.4
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/index.cjs +4 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +4 -2
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -318,9 +318,11 @@ class Strapi {
|
|
|
318
318
|
*
|
|
319
319
|
* @returns Promise<StrapiUser>
|
|
320
320
|
*/
|
|
321
|
-
async fetchUser() {
|
|
321
|
+
async fetchUser(params) {
|
|
322
322
|
try {
|
|
323
|
-
const user = await this.request("get", "/users/me"
|
|
323
|
+
const user = await this.request("get", "/users/me", {
|
|
324
|
+
params
|
|
325
|
+
});
|
|
324
326
|
this.user = user;
|
|
325
327
|
} catch (e) {
|
|
326
328
|
this.logout();
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ interface StrapiRegistrationData {
|
|
|
67
67
|
username: string;
|
|
68
68
|
email: string;
|
|
69
69
|
password: string;
|
|
70
|
+
[k: string]: unknown;
|
|
70
71
|
}
|
|
71
72
|
interface StrapiForgotPasswordData {
|
|
72
73
|
email: string;
|
|
@@ -235,7 +236,7 @@ declare class Strapi {
|
|
|
235
236
|
*
|
|
236
237
|
* @returns Promise<StrapiUser>
|
|
237
238
|
*/
|
|
238
|
-
fetchUser(): Promise<StrapiUser>;
|
|
239
|
+
fetchUser(params?: StrapiBaseRequestParams): Promise<StrapiUser>;
|
|
239
240
|
/**
|
|
240
241
|
* Retrieve token from chosen storage
|
|
241
242
|
*
|
|
@@ -257,4 +258,4 @@ declare class Strapi {
|
|
|
257
258
|
removeToken(): void;
|
|
258
259
|
}
|
|
259
260
|
|
|
260
|
-
export { PaginationByOffset, PaginationByPage, StoreConfig, StrapiAuthProvider, StrapiAuthenticationData, StrapiAuthenticationResponse, StrapiBaseRequestParams, StrapiDefaultOptions, StrapiEmailConfirmationData, StrapiError, StrapiForgotPasswordData, StrapiLocale, StrapiOptions, StrapiRegistrationData, StrapiRequestParams, StrapiResetPasswordData, StrapiResponse, StrapiUser, Strapi as default };
|
|
261
|
+
export { PaginationByOffset, PaginationByPage, StoreConfig, StrapiAuthProvider, StrapiAuthenticationData, StrapiAuthenticationResponse, StrapiBaseRequestParams, StrapiChangePasswordData, StrapiDefaultOptions, StrapiEmailConfirmationData, StrapiError, StrapiForgotPasswordData, StrapiLocale, StrapiOptions, StrapiRegistrationData, StrapiRequestParams, StrapiResetPasswordData, StrapiResponse, StrapiUser, Strapi as default };
|
package/dist/index.mjs
CHANGED
|
@@ -316,9 +316,11 @@ class Strapi {
|
|
|
316
316
|
*
|
|
317
317
|
* @returns Promise<StrapiUser>
|
|
318
318
|
*/
|
|
319
|
-
async fetchUser() {
|
|
319
|
+
async fetchUser(params) {
|
|
320
320
|
try {
|
|
321
|
-
const user = await this.request("get", "/users/me"
|
|
321
|
+
const user = await this.request("get", "/users/me", {
|
|
322
|
+
params
|
|
323
|
+
});
|
|
322
324
|
this.user = user;
|
|
323
325
|
} catch (e) {
|
|
324
326
|
this.logout();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strapi-sdk-js",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "📦 Javascript SDK for your Strapi API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"test": "run-s build lint test:unit",
|
|
59
59
|
"test:unit": "jest",
|
|
60
60
|
"commit": "git-cz",
|
|
61
|
+
"docs:release": "node ./scripts/beforeRelease.js",
|
|
61
62
|
"release": "dotenv release-it --",
|
|
62
63
|
"prepare": "rollup -c"
|
|
63
64
|
},
|