repzo 1.0.120 → 1.0.122

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.120",
3
+ "version": "1.0.122",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -112,6 +112,11 @@ export default class Repzo {
112
112
  MAIL_UNSUBSCRIBE: "mail-unsubscribe",
113
113
  APPROVAL_REQUEST: "approval-request",
114
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",
119
+ WORKORDER_PORTAL: "workorder-portal",
115
120
  } as const;
116
121
  public END_POINTS = this._end_points;
117
122
  private async _fetch(baseUrl: string, path: string, params?: Params) {
@@ -3870,6 +3875,278 @@ export default class Repzo {
3870
3875
  return res;
3871
3876
  },
3872
3877
  };
3878
+
3879
+ clientLocation = {
3880
+ _path: this._end_points.CLIENT_LOCATION,
3881
+ find: async (
3882
+ params?: Service.ClientLocation.Find.Params
3883
+ ): Promise<Service.ClientLocation.Find.Result> => {
3884
+ let res: Service.ClientLocation.Find.Result = await this._fetch(
3885
+ this.svAPIEndpoint,
3886
+ this.clientLocation._path,
3887
+ params
3888
+ );
3889
+ return res;
3890
+ },
3891
+ get: async (
3892
+ id: Service.ClientLocation.Get.ID,
3893
+ params?: Service.ClientLocation.Get.Params
3894
+ ): Promise<Service.ClientLocation.Get.Result> => {
3895
+ return await this._fetch(
3896
+ this.svAPIEndpoint,
3897
+ this.clientLocation._path + `/${id}`,
3898
+ params
3899
+ );
3900
+ },
3901
+ create: async (
3902
+ body: Service.ClientLocation.Create.Body
3903
+ ): Promise<Service.ClientLocation.Create.Result> => {
3904
+ let res = await this._create(
3905
+ this.svAPIEndpoint,
3906
+ this.clientLocation._path,
3907
+ body
3908
+ );
3909
+ return res;
3910
+ },
3911
+ update: async (
3912
+ id: Service.ClientLocation.Update.ID,
3913
+ body: Service.ClientLocation.Update.Body
3914
+ ): Promise<Service.ClientLocation.Update.Result> => {
3915
+ let res: Service.ClientLocation.Update.Result = await this._update(
3916
+ this.svAPIEndpoint,
3917
+ this.clientLocation._path + `/${id}`,
3918
+ body
3919
+ );
3920
+ return res;
3921
+ },
3922
+ remove: async (
3923
+ id: Service.ClientLocation.Update.ID,
3924
+ params: Service.ClientLocation.Remove.Params
3925
+ ): Promise<Service.ClientLocation.Remove.Result> => {
3926
+ let res: Service.ClientLocation.Remove.Result = await this._delete(
3927
+ this.svAPIEndpoint,
3928
+ this.clientLocation._path + `/${id}`,
3929
+ params
3930
+ );
3931
+ return res;
3932
+ },
3933
+ };
3934
+
3935
+ assetType = {
3936
+ _path: this._end_points.ASSET_TYPE,
3937
+ find: async (
3938
+ params?: Service.AssetType.Find.Params
3939
+ ): Promise<Service.AssetType.Find.Result> => {
3940
+ let res: Service.AssetType.Find.Result = await this._fetch(
3941
+ this.svAPIEndpoint,
3942
+ this.assetType._path,
3943
+ params
3944
+ );
3945
+ return res;
3946
+ },
3947
+ get: async (
3948
+ id: Service.AssetType.Get.ID
3949
+ ): Promise<Service.AssetType.Get.Result> => {
3950
+ return await this._fetch(
3951
+ this.svAPIEndpoint,
3952
+ this.assetType._path + `/${id}`
3953
+ );
3954
+ },
3955
+ create: async (
3956
+ body: Service.AssetType.Create.Body
3957
+ ): Promise<Service.AssetType.Create.Result> => {
3958
+ let res = await this._create(
3959
+ this.svAPIEndpoint,
3960
+ this.assetType._path,
3961
+ body
3962
+ );
3963
+ return res;
3964
+ },
3965
+ update: async (
3966
+ id: Service.AssetType.Update.ID,
3967
+ body: Service.AssetType.Update.Body
3968
+ ): Promise<Service.AssetType.Update.Result> => {
3969
+ let res: Service.AssetType.Update.Result = await this._update(
3970
+ this.svAPIEndpoint,
3971
+ this.assetType._path + `/${id}`,
3972
+ body
3973
+ );
3974
+ return res;
3975
+ },
3976
+ remove: async (
3977
+ id: Service.AssetType.Update.ID,
3978
+ params: Service.AssetType.Remove.Params
3979
+ ): Promise<Service.AssetType.Remove.Result> => {
3980
+ let res: Service.AssetType.Remove.Result = await this._delete(
3981
+ this.svAPIEndpoint,
3982
+ this.assetType._path + `/${id}`,
3983
+ params
3984
+ );
3985
+ return res;
3986
+ },
3987
+ };
3988
+
3989
+ asset = {
3990
+ _path: this._end_points.ASSET,
3991
+ find: async (
3992
+ params?: Service.Asset.Find.Params
3993
+ ): Promise<Service.Asset.Find.Result> => {
3994
+ let res: Service.Asset.Find.Result = await this._fetch(
3995
+ this.svAPIEndpoint,
3996
+ this.asset._path,
3997
+ params
3998
+ );
3999
+ return res;
4000
+ },
4001
+ get: async (
4002
+ id: Service.Asset.Get.ID,
4003
+ params?: Service.Asset.Get.Params
4004
+ ): Promise<Service.Asset.Get.Result> => {
4005
+ return await this._fetch(
4006
+ this.svAPIEndpoint,
4007
+ this.asset._path + `/${id}`,
4008
+ params
4009
+ );
4010
+ },
4011
+ create: async (
4012
+ body: Service.Asset.Create.Body
4013
+ ): Promise<Service.Asset.Create.Result> => {
4014
+ let res = await this._create(this.svAPIEndpoint, this.asset._path, body);
4015
+ return res;
4016
+ },
4017
+ update: async (
4018
+ id: Service.Asset.Update.ID,
4019
+ body: Service.Asset.Update.Body
4020
+ ): Promise<Service.Asset.Update.Result> => {
4021
+ let res: Service.Asset.Update.Result = await this._update(
4022
+ this.svAPIEndpoint,
4023
+ this.asset._path + `/${id}`,
4024
+ body
4025
+ );
4026
+ return res;
4027
+ },
4028
+ remove: async (
4029
+ id: Service.Asset.Update.ID,
4030
+ params: Service.Asset.Remove.Params
4031
+ ): Promise<Service.Asset.Remove.Result> => {
4032
+ let res: Service.Asset.Remove.Result = await this._delete(
4033
+ this.svAPIEndpoint,
4034
+ this.asset._path + `/${id}`,
4035
+ params
4036
+ );
4037
+ return res;
4038
+ },
4039
+ };
4040
+
4041
+ assetUnit = {
4042
+ _path: this._end_points.ASSET_UNIT,
4043
+ find: async (
4044
+ params?: Service.AssetUnit.Find.Params
4045
+ ): Promise<Service.AssetUnit.Find.Result> => {
4046
+ let res: Service.AssetUnit.Find.Result = await this._fetch(
4047
+ this.svAPIEndpoint,
4048
+ this.assetUnit._path,
4049
+ params
4050
+ );
4051
+ return res;
4052
+ },
4053
+ get: async (
4054
+ id: Service.AssetUnit.Get.ID,
4055
+ params?: Service.AssetUnit.Get.Params
4056
+ ): Promise<Service.AssetUnit.Get.Result> => {
4057
+ return await this._fetch(
4058
+ this.svAPIEndpoint,
4059
+ this.assetUnit._path + `/${id}`,
4060
+ params
4061
+ );
4062
+ },
4063
+ create: async (
4064
+ body: Service.AssetUnit.Create.Body
4065
+ ): Promise<Service.AssetUnit.Create.Result> => {
4066
+ let res = await this._create(
4067
+ this.svAPIEndpoint,
4068
+ this.assetUnit._path,
4069
+ body
4070
+ );
4071
+ return res;
4072
+ },
4073
+ update: async (
4074
+ id: Service.AssetUnit.Update.ID,
4075
+ body: Service.AssetUnit.Update.Body
4076
+ ): Promise<Service.AssetUnit.Update.Result> => {
4077
+ let res: Service.AssetUnit.Update.Result = await this._update(
4078
+ this.svAPIEndpoint,
4079
+ this.assetUnit._path + `/${id}`,
4080
+ body
4081
+ );
4082
+ return res;
4083
+ },
4084
+ remove: async (
4085
+ id: Service.AssetUnit.Update.ID,
4086
+ params: Service.AssetUnit.Remove.Params
4087
+ ): Promise<Service.AssetUnit.Remove.Result> => {
4088
+ let res: Service.AssetUnit.Remove.Result = await this._delete(
4089
+ this.svAPIEndpoint,
4090
+ this.assetUnit._path + `/${id}`,
4091
+ params
4092
+ );
4093
+ return res;
4094
+ },
4095
+ };
4096
+
4097
+ workorderPortal = {
4098
+ _path: this._end_points.WORKORDER_PORTAL,
4099
+ find: async (
4100
+ params?: Service.WorkorderPortal.Find.Params
4101
+ ): Promise<Service.WorkorderPortal.Find.Result> => {
4102
+ let res: Service.WorkorderPortal.Find.Result = await this._fetch(
4103
+ this.svAPIEndpoint,
4104
+ this.workorderPortal._path,
4105
+ params
4106
+ );
4107
+ return res;
4108
+ },
4109
+ get: async (
4110
+ id: Service.WorkorderPortal.Get.ID,
4111
+ params?: Service.WorkorderPortal.Get.Params
4112
+ ): Promise<Service.WorkorderPortal.Get.Result> => {
4113
+ return await this._fetch(
4114
+ this.svAPIEndpoint,
4115
+ this.workorderPortal._path + `/${id}`,
4116
+ params
4117
+ );
4118
+ },
4119
+ create: async (
4120
+ body: Service.WorkorderPortal.Create.Body
4121
+ ): Promise<Service.WorkorderPortal.Create.Result> => {
4122
+ let res = await this._create(
4123
+ this.svAPIEndpoint,
4124
+ this.workorderPortal._path,
4125
+ body
4126
+ );
4127
+ return res;
4128
+ },
4129
+ update: async (
4130
+ id: Service.WorkorderPortal.Update.ID,
4131
+ body: Service.WorkorderPortal.Update.Body
4132
+ ): Promise<Service.WorkorderPortal.Update.Result> => {
4133
+ let res: Service.WorkorderPortal.Update.Result = await this._update(
4134
+ this.svAPIEndpoint,
4135
+ this.workorderPortal._path + `/${id}`,
4136
+ body
4137
+ );
4138
+ return res;
4139
+ },
4140
+ remove: async (
4141
+ id: Service.WorkorderPortal.Update.ID
4142
+ ): Promise<Service.WorkorderPortal.Remove.Result> => {
4143
+ let res: Service.WorkorderPortal.Remove.Result = await this._delete(
4144
+ this.svAPIEndpoint,
4145
+ this.workorderPortal._path + `/${id}`
4146
+ );
4147
+ return res;
4148
+ },
4149
+ };
3873
4150
  }
3874
4151
 
3875
4152
  function normalizeParams(params: Params): { [key: string]: any } {