repzo 1.0.108 → 1.0.109

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.108",
3
+ "version": "1.0.109",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -107,6 +107,7 @@ export default class Repzo {
107
107
  ACTIVITY_AI_SALES_ORDER: "activity-ai-sales-order",
108
108
  OCR_INVOICE_JOB: "ocr-invoice-job",
109
109
  OCR_INVOICE_JOB_PAGE: "ocr-invoice-job-page",
110
+ SETTINGS: "settings",
110
111
  } as const;
111
112
  public END_POINTS = this._end_points;
112
113
  private async _fetch(baseUrl: string, path: string, params?: Params) {
@@ -1784,6 +1785,36 @@ export default class Repzo {
1784
1785
  params
1785
1786
  );
1786
1787
  },
1788
+ create: async (
1789
+ body: Service.Workorder.Create.Body
1790
+ ): Promise<Service.Workorder.Create.Result> => {
1791
+ let res = await this._create(
1792
+ this.svAPIEndpoint,
1793
+ this.workorder._path,
1794
+ body
1795
+ );
1796
+ return res;
1797
+ },
1798
+ update: async (
1799
+ id: Service.Workorder.Update.ID,
1800
+ body: Service.Workorder.Update.Body
1801
+ ): Promise<Service.Workorder.Update.Result> => {
1802
+ let res: Service.Workorder.Update.Result = await this._update(
1803
+ this.svAPIEndpoint,
1804
+ this.workorder._path + `/${id}`,
1805
+ body
1806
+ );
1807
+ return res;
1808
+ },
1809
+ remove: async (
1810
+ id: Service.Workorder.Remove.ID
1811
+ ): Promise<Service.Workorder.Remove.Result> => {
1812
+ let res: Service.Workorder.Remove.Result = await this._delete(
1813
+ this.svAPIEndpoint,
1814
+ this.workorder._path + `/${id}`
1815
+ );
1816
+ return res;
1817
+ },
1787
1818
  };
1788
1819
 
1789
1820
  supplier = {
@@ -3648,4 +3679,37 @@ export default class Repzo {
3648
3679
  return res;
3649
3680
  },
3650
3681
  };
3682
+
3683
+ settings = {
3684
+ _path: this._end_points.SETTINGS,
3685
+ find: async (
3686
+ params?: Service.Settings.Find.Params
3687
+ ): Promise<Service.Settings.Find.Result> => {
3688
+ let res: Service.Settings.Find.Result = await this._fetch(
3689
+ this.svAPIEndpoint,
3690
+ this.settings._path,
3691
+ params
3692
+ );
3693
+ return res;
3694
+ },
3695
+ get: async (
3696
+ id: Service.Settings.Get.ID
3697
+ ): Promise<Service.Settings.Get.Result> => {
3698
+ return await this._fetch(
3699
+ this.svAPIEndpoint,
3700
+ this.settings._path + `/${id}`
3701
+ );
3702
+ },
3703
+ update: async (
3704
+ id: Service.Settings.Update.ID,
3705
+ body: Service.Settings.Update.Body
3706
+ ): Promise<Service.Settings.Update.Result> => {
3707
+ let res: Service.Settings.Update.Result = await this._update(
3708
+ this.svAPIEndpoint,
3709
+ this.settings._path + `/${id}`,
3710
+ body
3711
+ );
3712
+ return res;
3713
+ },
3714
+ };
3651
3715
  }