repzo 1.0.119 → 1.0.121

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.119",
3
+ "version": "1.0.121",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -69,6 +69,7 @@ export default class Repzo {
69
69
  CUSTOM_LIST_ITEM: "custom-list-item",
70
70
  INVENTORY_ADJUSTMENT_REASON: "inventory-adjustment-reason",
71
71
  WORKORDER: "workorder",
72
+ WORKORDER_REQUEST: "workorder-request",
72
73
  SUPPLIER: "supplier",
73
74
  QUICK_CONVERT_TO_PDF: "quick-convert-to-pdf",
74
75
  VISIT: "visit",
@@ -111,6 +112,10 @@ export default class Repzo {
111
112
  MAIL_UNSUBSCRIBE: "mail-unsubscribe",
112
113
  APPROVAL_REQUEST: "approval-request",
113
114
  SAFE_INVOICE_SERIAL_COUNTER: "safe-invoice-serial-counter",
115
+ CLIENT_LOCATION: "client-location",
116
+ ASSET_TYPE: "asset-type",
117
+ ASSET: "asset",
118
+ ASSET_UNIT: "asset-unit",
114
119
  } as const;
115
120
  public END_POINTS = this._end_points;
116
121
  private async _fetch(baseUrl: string, path: string, params?: Params) {
@@ -1823,6 +1828,60 @@ export default class Repzo {
1823
1828
  },
1824
1829
  };
1825
1830
 
1831
+ workorderRequest = {
1832
+ _path: this._end_points.WORKORDER_REQUEST,
1833
+ find: async (
1834
+ params?: Service.WorkorderRequest.Find.Params
1835
+ ): Promise<Service.WorkorderRequest.Find.Result> => {
1836
+ let res: Service.WorkorderRequest.Find.Result = await this._fetch(
1837
+ this.svAPIEndpoint,
1838
+ this.workorderRequest._path,
1839
+ params
1840
+ );
1841
+ return res;
1842
+ },
1843
+ get: async (
1844
+ id: Service.WorkorderRequest.Get.ID,
1845
+ params?: Service.WorkorderRequest.Get.Params
1846
+ ): Promise<Service.WorkorderRequest.Get.Result> => {
1847
+ return await this._fetch(
1848
+ this.svAPIEndpoint,
1849
+ this.workorderRequest._path + `/${id}`,
1850
+ params
1851
+ );
1852
+ },
1853
+ create: async (
1854
+ body: Service.WorkorderRequest.Create.Body
1855
+ ): Promise<Service.WorkorderRequest.Create.Result> => {
1856
+ let res = await this._create(
1857
+ this.svAPIEndpoint,
1858
+ this.workorderRequest._path,
1859
+ body
1860
+ );
1861
+ return res;
1862
+ },
1863
+ update: async (
1864
+ id: Service.WorkorderRequest.Update.ID,
1865
+ body: Service.WorkorderRequest.Update.Body
1866
+ ): Promise<Service.WorkorderRequest.Update.Result> => {
1867
+ let res: Service.WorkorderRequest.Update.Result = await this._update(
1868
+ this.svAPIEndpoint,
1869
+ this.workorderRequest._path + `/${id}`,
1870
+ body
1871
+ );
1872
+ return res;
1873
+ },
1874
+ remove: async (
1875
+ id: Service.WorkorderRequest.Remove.ID
1876
+ ): Promise<Service.WorkorderRequest.Remove.Result> => {
1877
+ let res: Service.WorkorderRequest.Remove.Result = await this._delete(
1878
+ this.svAPIEndpoint,
1879
+ this.workorderRequest._path + `/${id}`
1880
+ );
1881
+ return res;
1882
+ },
1883
+ };
1884
+
1826
1885
  supplier = {
1827
1886
  _path: this._end_points.SUPPLIER,
1828
1887
  find: async (
@@ -3815,6 +3874,224 @@ export default class Repzo {
3815
3874
  return res;
3816
3875
  },
3817
3876
  };
3877
+
3878
+ clientLocation = {
3879
+ _path: this._end_points.CLIENT_LOCATION,
3880
+ find: async (
3881
+ params?: Service.ClientLocation.Find.Params
3882
+ ): Promise<Service.ClientLocation.Find.Result> => {
3883
+ let res: Service.ClientLocation.Find.Result = await this._fetch(
3884
+ this.svAPIEndpoint,
3885
+ this.clientLocation._path,
3886
+ params
3887
+ );
3888
+ return res;
3889
+ },
3890
+ get: async (
3891
+ id: Service.ClientLocation.Get.ID,
3892
+ params?: Service.ClientLocation.Get.Params
3893
+ ): Promise<Service.ClientLocation.Get.Result> => {
3894
+ return await this._fetch(
3895
+ this.svAPIEndpoint,
3896
+ this.clientLocation._path + `/${id}`,
3897
+ params
3898
+ );
3899
+ },
3900
+ create: async (
3901
+ body: Service.ClientLocation.Create.Body
3902
+ ): Promise<Service.ClientLocation.Create.Result> => {
3903
+ let res = await this._create(
3904
+ this.svAPIEndpoint,
3905
+ this.clientLocation._path,
3906
+ body
3907
+ );
3908
+ return res;
3909
+ },
3910
+ update: async (
3911
+ id: Service.ClientLocation.Update.ID,
3912
+ body: Service.ClientLocation.Update.Body
3913
+ ): Promise<Service.ClientLocation.Update.Result> => {
3914
+ let res: Service.ClientLocation.Update.Result = await this._update(
3915
+ this.svAPIEndpoint,
3916
+ this.clientLocation._path + `/${id}`,
3917
+ body
3918
+ );
3919
+ return res;
3920
+ },
3921
+ remove: async (
3922
+ id: Service.ClientLocation.Update.ID,
3923
+ params: Service.ClientLocation.Remove.Params
3924
+ ): Promise<Service.ClientLocation.Remove.Result> => {
3925
+ let res: Service.ClientLocation.Remove.Result = await this._delete(
3926
+ this.svAPIEndpoint,
3927
+ this.clientLocation._path + `/${id}`,
3928
+ params
3929
+ );
3930
+ return res;
3931
+ },
3932
+ };
3933
+
3934
+ assetType = {
3935
+ _path: this._end_points.ASSET_TYPE,
3936
+ find: async (
3937
+ params?: Service.AssetType.Find.Params
3938
+ ): Promise<Service.AssetType.Find.Result> => {
3939
+ let res: Service.AssetType.Find.Result = await this._fetch(
3940
+ this.svAPIEndpoint,
3941
+ this.assetType._path,
3942
+ params
3943
+ );
3944
+ return res;
3945
+ },
3946
+ get: async (
3947
+ id: Service.AssetType.Get.ID
3948
+ ): Promise<Service.AssetType.Get.Result> => {
3949
+ return await this._fetch(
3950
+ this.svAPIEndpoint,
3951
+ this.assetType._path + `/${id}`
3952
+ );
3953
+ },
3954
+ create: async (
3955
+ body: Service.AssetType.Create.Body
3956
+ ): Promise<Service.AssetType.Create.Result> => {
3957
+ let res = await this._create(
3958
+ this.svAPIEndpoint,
3959
+ this.assetType._path,
3960
+ body
3961
+ );
3962
+ return res;
3963
+ },
3964
+ update: async (
3965
+ id: Service.AssetType.Update.ID,
3966
+ body: Service.AssetType.Update.Body
3967
+ ): Promise<Service.AssetType.Update.Result> => {
3968
+ let res: Service.AssetType.Update.Result = await this._update(
3969
+ this.svAPIEndpoint,
3970
+ this.assetType._path + `/${id}`,
3971
+ body
3972
+ );
3973
+ return res;
3974
+ },
3975
+ remove: async (
3976
+ id: Service.AssetType.Update.ID,
3977
+ params: Service.AssetType.Remove.Params
3978
+ ): Promise<Service.AssetType.Remove.Result> => {
3979
+ let res: Service.AssetType.Remove.Result = await this._delete(
3980
+ this.svAPIEndpoint,
3981
+ this.assetType._path + `/${id}`,
3982
+ params
3983
+ );
3984
+ return res;
3985
+ },
3986
+ };
3987
+
3988
+ asset = {
3989
+ _path: this._end_points.ASSET,
3990
+ find: async (
3991
+ params?: Service.Asset.Find.Params
3992
+ ): Promise<Service.Asset.Find.Result> => {
3993
+ let res: Service.Asset.Find.Result = await this._fetch(
3994
+ this.svAPIEndpoint,
3995
+ this.asset._path,
3996
+ params
3997
+ );
3998
+ return res;
3999
+ },
4000
+ get: async (
4001
+ id: Service.Asset.Get.ID,
4002
+ params?: Service.Asset.Get.Params
4003
+ ): Promise<Service.Asset.Get.Result> => {
4004
+ return await this._fetch(
4005
+ this.svAPIEndpoint,
4006
+ this.asset._path + `/${id}`,
4007
+ params
4008
+ );
4009
+ },
4010
+ create: async (
4011
+ body: Service.Asset.Create.Body
4012
+ ): Promise<Service.Asset.Create.Result> => {
4013
+ let res = await this._create(this.svAPIEndpoint, this.asset._path, body);
4014
+ return res;
4015
+ },
4016
+ update: async (
4017
+ id: Service.Asset.Update.ID,
4018
+ body: Service.Asset.Update.Body
4019
+ ): Promise<Service.Asset.Update.Result> => {
4020
+ let res: Service.Asset.Update.Result = await this._update(
4021
+ this.svAPIEndpoint,
4022
+ this.asset._path + `/${id}`,
4023
+ body
4024
+ );
4025
+ return res;
4026
+ },
4027
+ remove: async (
4028
+ id: Service.Asset.Update.ID,
4029
+ params: Service.Asset.Remove.Params
4030
+ ): Promise<Service.Asset.Remove.Result> => {
4031
+ let res: Service.Asset.Remove.Result = await this._delete(
4032
+ this.svAPIEndpoint,
4033
+ this.asset._path + `/${id}`,
4034
+ params
4035
+ );
4036
+ return res;
4037
+ },
4038
+ };
4039
+
4040
+ assetUnit = {
4041
+ _path: this._end_points.ASSET_UNIT,
4042
+ find: async (
4043
+ params?: Service.AssetUnit.Find.Params
4044
+ ): Promise<Service.AssetUnit.Find.Result> => {
4045
+ let res: Service.AssetUnit.Find.Result = await this._fetch(
4046
+ this.svAPIEndpoint,
4047
+ this.assetUnit._path,
4048
+ params
4049
+ );
4050
+ return res;
4051
+ },
4052
+ get: async (
4053
+ id: Service.AssetUnit.Get.ID,
4054
+ params?: Service.AssetUnit.Get.Params
4055
+ ): Promise<Service.AssetUnit.Get.Result> => {
4056
+ return await this._fetch(
4057
+ this.svAPIEndpoint,
4058
+ this.assetUnit._path + `/${id}`,
4059
+ params
4060
+ );
4061
+ },
4062
+ create: async (
4063
+ body: Service.AssetUnit.Create.Body
4064
+ ): Promise<Service.AssetUnit.Create.Result> => {
4065
+ let res = await this._create(
4066
+ this.svAPIEndpoint,
4067
+ this.assetUnit._path,
4068
+ body
4069
+ );
4070
+ return res;
4071
+ },
4072
+ update: async (
4073
+ id: Service.AssetUnit.Update.ID,
4074
+ body: Service.AssetUnit.Update.Body
4075
+ ): Promise<Service.AssetUnit.Update.Result> => {
4076
+ let res: Service.AssetUnit.Update.Result = await this._update(
4077
+ this.svAPIEndpoint,
4078
+ this.assetUnit._path + `/${id}`,
4079
+ body
4080
+ );
4081
+ return res;
4082
+ },
4083
+ remove: async (
4084
+ id: Service.AssetUnit.Update.ID,
4085
+ params: Service.AssetUnit.Remove.Params
4086
+ ): Promise<Service.AssetUnit.Remove.Result> => {
4087
+ let res: Service.AssetUnit.Remove.Result = await this._delete(
4088
+ this.svAPIEndpoint,
4089
+ this.assetUnit._path + `/${id}`,
4090
+ params
4091
+ );
4092
+ return res;
4093
+ },
4094
+ };
3818
4095
  }
3819
4096
 
3820
4097
  function normalizeParams(params: Params): { [key: string]: any } {