repzo 1.0.120 → 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/src/index.ts CHANGED
@@ -112,6 +112,10 @@ 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",
115
119
  } as const;
116
120
  public END_POINTS = this._end_points;
117
121
  private async _fetch(baseUrl: string, path: string, params?: Params) {
@@ -3870,6 +3874,224 @@ export default class Repzo {
3870
3874
  return res;
3871
3875
  },
3872
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
+ };
3873
4095
  }
3874
4096
 
3875
4097
  function normalizeParams(params: Params): { [key: string]: any } {