@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/cli.mjs CHANGED
@@ -21413,7 +21413,7 @@ class Strapi {
21413
21413
  ...params,
21414
21414
  });
21415
21415
  }
21416
- async updateUser(endpoint, id, data, params = {}) {
21416
+ async updateBaseUser(endpoint, id, data, params = {}) {
21417
21417
  return await this.fetchData(`${endpoint}/${id}`, data, {
21418
21418
  method: 'PUT',
21419
21419
  ...params,
@@ -21444,7 +21444,10 @@ class Strapi {
21444
21444
  try {
21445
21445
  data = await response?.json() || null;
21446
21446
  }
21447
- catch (error) { }
21447
+ catch (error) {
21448
+ console.error(await response.text());
21449
+ throw error;
21450
+ }
21448
21451
  log(mergedParams);
21449
21452
  log(response);
21450
21453
  log(data);
@@ -21954,7 +21957,7 @@ function generateMethodsCode(contentType, permissions) {
21954
21957
  ].join('\n'));
21955
21958
  methods.push([
21956
21959
  ` public async update${getContentTypeName(contentType.schema.singularName)}(id: string, data: ${modelName}Input, params?: RequestInit) {`,
21957
- ` return await this.update${modelName === 'User' ? 'User' : ''}<${modelName}, ${modelName}Input>('${contentType.schema.pluralName}', id, data, params);`,
21960
+ ` return await this.update${modelName === 'User' ? 'BaseUser' : ''}<${modelName}, ${modelName}Input>('${contentType.schema.pluralName}', id, data, params);`,
21958
21961
  ' }',
21959
21962
  ].join('\n'));
21960
21963
  methods.push([