@malevich-studio/strapi-sdk-typescript 1.2.22 → 1.2.24

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.d.ts CHANGED
@@ -187,7 +187,7 @@ declare class Strapi {
187
187
  getDocument<T, Q extends object>(endpoint: string, data?: Q, params?: RequestInit): Promise<Response<T>>;
188
188
  create<T, Q extends object>(endpoint: string, data: Q, params?: RequestInit): Promise<Response<T>>;
189
189
  update<T, Q extends object>(endpoint: string, id: string, data: Q, params?: RequestInit): Promise<Response<T>>;
190
- updateUser<T, Q extends object>(endpoint: string, id: string, data: Q, params?: RequestInit): Promise<T>;
190
+ protected updateBaseUser<T, Q extends object>(endpoint: string, id: string, data: Q, params?: RequestInit): Promise<T>;
191
191
  delete<T>(endpoint: string, id: string, params?: RequestInit): Promise<Response<T>>;
192
192
  uploadForm(form: FormData): Promise<File[]>;
193
193
  private baseFetch;
package/dist/index.mjs CHANGED
@@ -21407,7 +21407,7 @@ class Strapi {
21407
21407
  ...params,
21408
21408
  });
21409
21409
  }
21410
- async updateUser(endpoint, id, data, params = {}) {
21410
+ async updateBaseUser(endpoint, id, data, params = {}) {
21411
21411
  return await this.fetchData(`${endpoint}/${id}`, data, {
21412
21412
  method: 'PUT',
21413
21413
  ...params,
@@ -21438,7 +21438,10 @@ class Strapi {
21438
21438
  try {
21439
21439
  data = await response?.json() || null;
21440
21440
  }
21441
- catch (error) { }
21441
+ catch (error) {
21442
+ console.error(await response.text());
21443
+ throw error;
21444
+ }
21442
21445
  log(mergedParams);
21443
21446
  log(response);
21444
21447
  log(data);