@malevich-studio/strapi-sdk-typescript 1.2.14 → 1.2.16
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/cli.cjs +8 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +8 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ type ErrorResponse = {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
type Response<T> = SuccessResponse<T> | ErrorResponse;
|
|
44
|
+
type UserResponse<T> = (T & {
|
|
45
|
+
error: undefined;
|
|
46
|
+
}) | ErrorResponse;
|
|
44
47
|
type AuthResponse<T> = {
|
|
45
48
|
jwt: string;
|
|
46
49
|
user: T;
|
|
@@ -165,7 +168,7 @@ declare class Strapi {
|
|
|
165
168
|
}>;
|
|
166
169
|
protected baseResetPassword<T>(password: string, code: string): Promise<AuthResponse<T>>;
|
|
167
170
|
protected baseChangePassword<T>(password: string, currentPassword: string): Promise<AuthResponse<T>>;
|
|
168
|
-
protected baseMe<T, Q>(data: Q): Promise<T
|
|
171
|
+
protected baseMe<T, Q>(data: Q): Promise<UserResponse<T>>;
|
|
169
172
|
getLocales(params: RequestInit): Promise<Locale[]>;
|
|
170
173
|
getDocuments<T, Q extends object>(endpoint: string, data?: Q, params?: RequestInit): Promise<Response<T[]>>;
|
|
171
174
|
getDocument<T, Q extends object>(endpoint: string, data?: Q, params?: RequestInit): Promise<Response<T>>;
|
|
@@ -176,4 +179,4 @@ declare class Strapi {
|
|
|
176
179
|
private baseFetch;
|
|
177
180
|
}
|
|
178
181
|
|
|
179
|
-
export { type AuthResponse, type DynamiczoneComponent, type DynamiczonePopulate, type File, type FilterValue, type Filters, type Folder, type Locale, type Query, type RelationInput, Strapi };
|
|
182
|
+
export { type AuthResponse, type DynamiczoneComponent, type DynamiczonePopulate, type ErrorResponse, type File, type FilterValue, type Filters, type Folder, type Locale, type Query, type RelationInput, type Response, Strapi, type SuccessResponse, type UserResponse };
|