simple-strapi 1.0.0-alpha.15 → 1.0.0-alpha.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/client.d.ts CHANGED
@@ -128,6 +128,9 @@ declare class Client {
128
128
  /**
129
129
  * Elimina un'entità specifica tramite il suo documentId.
130
130
  */
131
- delete(pluralID: string, documentId: string, options?: EntityRequest): Promise<unknown>;
131
+ delete(pluralID: string, documentId: string, options?: EntityRequest): Promise<{
132
+ data: any;
133
+ meta: any;
134
+ }>;
132
135
  }
133
136
  export default Client;
package/dist/client.js CHANGED
@@ -354,7 +354,6 @@ class Client {
354
354
  },
355
355
  });
356
356
  if (!response.ok) {
357
- // --- AGGIUNGI QUESTO BLOCCO PER IL DEBUG ---
358
357
  const errorBody = await response.json().catch(() => ({}));
359
358
  throw createSimpleException({
360
359
  code: response.status,
@@ -362,7 +361,9 @@ class Client {
362
361
  type: "error",
363
362
  source: "strapi-utils/client.ts",
364
363
  });
365
- // --------------------------------------------
364
+ }
365
+ if (response.status === 204) {
366
+ return { data: { documentId }, meta: {} };
366
367
  }
367
368
  const { data, meta } = z
368
369
  .object({ data: z.any(), meta: z.any() })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-strapi",
3
- "version": "1.0.0-alpha.15",
3
+ "version": "1.0.0-alpha.16",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",