@panneau/data 4.0.58 → 4.0.60

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
@@ -193,7 +193,7 @@ declare class MediasApi extends Base {
193
193
  update(id: any, data: any): Promise<unknown>;
194
194
  trash(id: any): Promise<unknown>;
195
195
  restore(id: any): Promise<unknown>;
196
- delete(id: any): Promise<unknown>;
196
+ destroy(id: any): Promise<unknown>;
197
197
  replace(id: any, data: any): Promise<unknown>;
198
198
  }
199
199
 
package/dist/index.js CHANGED
@@ -664,7 +664,7 @@ class MediasApi extends Base {
664
664
  update: 'medias/:media',
665
665
  trash: 'medias/trash/:media',
666
666
  restore: 'medias/restore/:media',
667
- delete: 'medias/:media',
667
+ destroy: 'medias/:media',
668
668
  replace: 'medias/replace/:media',
669
669
  ...(opts.routes || null)
670
670
  }
@@ -688,16 +688,10 @@ class MediasApi extends Base {
688
688
  return this.requestGet(this.route('index'), finalQuery);
689
689
  }
690
690
  getTrashed(query = {}, page = 1, count = 10) {
691
- const finalQuery = {
691
+ return this.get({
692
+ trashed: true,
692
693
  ...query
693
- };
694
- if (page !== null) {
695
- finalQuery.page = page;
696
- }
697
- if (count !== null) {
698
- finalQuery.count = count;
699
- }
700
- return this.requestGet(this.route('trashed'), finalQuery);
694
+ }, page, count);
701
695
  }
702
696
  getTags(query = {}, count = 10) {
703
697
  const finalQuery = {
@@ -726,8 +720,8 @@ class MediasApi extends Base {
726
720
  media: id
727
721
  }));
728
722
  }
729
- delete(id) {
730
- return this.requestDelete(this.route('delete', {
723
+ destroy(id) {
724
+ return this.requestDelete(this.route('destroy', {
731
725
  media: id
732
726
  }));
733
727
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/data",
3
- "version": "4.0.58",
3
+ "version": "4.0.60",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "408b9bef2c15c0a6c55588721d13a965ead50a5f"
74
+ "gitHead": "ec24c7cd579c8ff772ae0e751d67091f3bbb5b55"
75
75
  }