@nomalism-com/api 0.51.14 → 0.51.15

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.cjs CHANGED
@@ -1475,6 +1475,10 @@ var Repository36 = class {
1475
1475
  );
1476
1476
  return response.data;
1477
1477
  }
1478
+ async findToday() {
1479
+ const response = await this.api.get(`${this.route}today`);
1480
+ return response.data;
1481
+ }
1478
1482
  async findByOwner(params) {
1479
1483
  const response = await this.api.get(
1480
1484
  `${this.route}by_owner`,
@@ -3595,7 +3599,7 @@ var Repository92 = class {
3595
3599
  return response.data;
3596
3600
  }
3597
3601
  async update({ id }, body) {
3598
- await this.api.post(`${this.route}${id}`, body);
3602
+ await this.api.put(`${this.route}${id}`, body);
3599
3603
  }
3600
3604
  async deleteOne({
3601
3605
  id
@@ -3616,13 +3620,6 @@ var Repository93 = class {
3616
3620
  this.api = api;
3617
3621
  this.route = route;
3618
3622
  }
3619
- async create(body) {
3620
- const response = await this.api.post(
3621
- `${this.route}`,
3622
- body
3623
- );
3624
- return response.data;
3625
- }
3626
3623
  async find() {
3627
3624
  const response = await this.api.get(`${this.route}`);
3628
3625
  return response.data;
@@ -3645,12 +3642,7 @@ var Repository93 = class {
3645
3642
  return response.data;
3646
3643
  }
3647
3644
  async update({ id }, body) {
3648
- await this.api.post(`${this.route}${id}`, body);
3649
- }
3650
- async deleteOne({
3651
- id
3652
- }) {
3653
- await this.api.delete(`${this.route}${id}`);
3645
+ await this.api.put(`${this.route}${id}`, body);
3654
3646
  }
3655
3647
  };
3656
3648
 
@@ -3697,7 +3689,7 @@ var Repository94 = class {
3697
3689
  return response.data;
3698
3690
  }
3699
3691
  async update({ id }, body) {
3700
- await this.api.post(`${this.route}${id}`, body);
3692
+ await this.api.put(`${this.route}${id}`, body);
3701
3693
  }
3702
3694
  async deleteOne({
3703
3695
  id
package/dist/index.js CHANGED
@@ -1442,6 +1442,10 @@ var Repository36 = class {
1442
1442
  );
1443
1443
  return response.data;
1444
1444
  }
1445
+ async findToday() {
1446
+ const response = await this.api.get(`${this.route}today`);
1447
+ return response.data;
1448
+ }
1445
1449
  async findByOwner(params) {
1446
1450
  const response = await this.api.get(
1447
1451
  `${this.route}by_owner`,
@@ -3562,7 +3566,7 @@ var Repository92 = class {
3562
3566
  return response.data;
3563
3567
  }
3564
3568
  async update({ id }, body) {
3565
- await this.api.post(`${this.route}${id}`, body);
3569
+ await this.api.put(`${this.route}${id}`, body);
3566
3570
  }
3567
3571
  async deleteOne({
3568
3572
  id
@@ -3583,13 +3587,6 @@ var Repository93 = class {
3583
3587
  this.api = api;
3584
3588
  this.route = route;
3585
3589
  }
3586
- async create(body) {
3587
- const response = await this.api.post(
3588
- `${this.route}`,
3589
- body
3590
- );
3591
- return response.data;
3592
- }
3593
3590
  async find() {
3594
3591
  const response = await this.api.get(`${this.route}`);
3595
3592
  return response.data;
@@ -3612,12 +3609,7 @@ var Repository93 = class {
3612
3609
  return response.data;
3613
3610
  }
3614
3611
  async update({ id }, body) {
3615
- await this.api.post(`${this.route}${id}`, body);
3616
- }
3617
- async deleteOne({
3618
- id
3619
- }) {
3620
- await this.api.delete(`${this.route}${id}`);
3612
+ await this.api.put(`${this.route}${id}`, body);
3621
3613
  }
3622
3614
  };
3623
3615
 
@@ -3664,7 +3656,7 @@ var Repository94 = class {
3664
3656
  return response.data;
3665
3657
  }
3666
3658
  async update({ id }, body) {
3667
- await this.api.post(`${this.route}${id}`, body);
3659
+ await this.api.put(`${this.route}${id}`, body);
3668
3660
  }
3669
3661
  async deleteOne({
3670
3662
  id
@@ -8,5 +8,6 @@ export default class Repository implements Nomalism.SchedulePrintJob.IRepository
8
8
  createMany(body: Nomalism.SchedulePrintJob.ICreateManySchedulePrintJobRequest): Promise<void>;
9
9
  deleteOne(selector: Nomalism.shared.IFindByIdRequest): Promise<void>;
10
10
  dispatchSchedulePrintJob(body: Nomalism.SchedulePrintJob.IDispatchSchedulePrintJobRequest): Promise<Nomalism.SchedulePrintJob.IDispatchSchedulePrintJobResponse>;
11
+ findToday(): Promise<Nomalism.SchedulePrintJob.IFindTodayItem[]>;
11
12
  findByOwner(params: Nomalism.shared.IFindByOwnerIdRequest): Promise<Nomalism.SchedulePrintJob.Entity[]>;
12
13
  }
@@ -4,10 +4,8 @@ export default class Repository implements Nomalism.CLT.IRepository {
4
4
  route: string;
5
5
  private api;
6
6
  constructor({ api, route }: IModuleConstructor);
7
- create(body: Nomalism.CLT.ICreateRequest): Promise<Nomalism.CLT.Entity>;
8
7
  find(): Promise<Nomalism.CLT.Entity[]>;
9
8
  findMinified(params?: Nomalism.CLT.IFindMinifiedRequest): Promise<Nomalism.CLT.Entity[]>;
10
9
  findById({ id, }: Nomalism.shared.IFindByIdNumberRequest): Promise<Nomalism.CLT.Entity | null>;
11
10
  update({ id }: Nomalism.shared.IFindByIdNumberRequest, body: Nomalism.CLT.IUpdateRequest): Promise<void>;
12
- deleteOne({ id, }: Nomalism.shared.IFindByIdNumberRequest): Promise<void>;
13
11
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/api",
3
3
  "description": "A nomalism API package for performing HTTP requests on API endpoints",
4
- "version": "0.51.14",
4
+ "version": "0.51.15",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "prepare": "husky"
31
31
  },
32
32
  "dependencies": {
33
- "@nomalism-com/types": "^0.51.14",
33
+ "@nomalism-com/types": "^0.51.15",
34
34
  "axios": "^1.21.0"
35
35
  },
36
36
  "devDependencies": {