@nsshunt/stsrest01client 1.0.2 → 1.0.4

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.
@@ -3739,39 +3739,6 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3739
3739
  __privateGet(this, _axiosClient).WithAccessToken(accessToken);
3740
3740
  return this;
3741
3741
  });
3742
- // --- [ Resources ] ------------------------------------------------------------------------------------------------------------------
3743
- __publicField(this, "__DBResource", async (ar, resource, errorCb) => {
3744
- const retVal = await ar(resource, errorCb);
3745
- if (retVal) {
3746
- return retVal.data.detail;
3747
- } else {
3748
- return null;
3749
- }
3750
- });
3751
- __publicField(this, "__Resource", async (ar, resource, errorCb) => {
3752
- const retVal = await this.__DBResource(ar, resource, errorCb);
3753
- if (retVal) {
3754
- return retVal.resdesc;
3755
- } else {
3756
- return null;
3757
- }
3758
- });
3759
- __publicField(this, "__DBResourceEntity", async (ar, resourceEntity, errorCb) => {
3760
- const retVal = await ar(resourceEntity, errorCb);
3761
- if (retVal) {
3762
- return retVal.data.detail;
3763
- } else {
3764
- return null;
3765
- }
3766
- });
3767
- __publicField(this, "__ResourceEntity", async (ar, resourceEntity, errorCb) => {
3768
- const retVal = await this.__DBResourceEntity(ar, resourceEntity, errorCb);
3769
- if (retVal) {
3770
- return retVal.resdesc;
3771
- } else {
3772
- return null;
3773
- }
3774
- });
3775
3742
  // --- [ Resource ] -------------------------------------------------------------------------------------------------------------------
3776
3743
  // --- [ POST.Resource ] -------------------------------------------------------------------------------------------------------------------
3777
3744
  __publicField(this, "PostResourceAR", async (resource, errorCb) => {
@@ -3779,10 +3746,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3779
3746
  return await __privateGet(this, _axiosClient).InvokeResourceAPI(url, "post", resource, null, null, errorCb);
3780
3747
  });
3781
3748
  __publicField(this, "PostResourceDBR", async (resource, errorCb) => {
3782
- return this.__DBResource(this.PostResourceAR, resource, errorCb);
3749
+ var _a;
3750
+ return ((_a = await this.PostResourceAR(resource, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3783
3751
  });
3784
3752
  __publicField(this, "PostResource", async (resource, errorCb) => {
3785
- return this.__Resource(this.PostResourceAR, resource, errorCb);
3753
+ var _a;
3754
+ return ((_a = await this.PostResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3786
3755
  });
3787
3756
  // --- [ PUT.Resource ] -------------------------------------------------------------------------------------------------------------------
3788
3757
  __publicField(this, "PutResourceAR", async (resource, errorCb) => {
@@ -3790,10 +3759,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3790
3759
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "put", resource, null, null, errorCb);
3791
3760
  });
3792
3761
  __publicField(this, "PutResourceDBR", async (resource, errorCb) => {
3793
- return this.__DBResource(this.PutResourceAR, resource, errorCb);
3762
+ var _a;
3763
+ return ((_a = await this.PutResourceAR(resource, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3794
3764
  });
3795
3765
  __publicField(this, "PutResource", async (resource, errorCb) => {
3796
- return this.__Resource(this.PutResourceAR, resource, errorCb);
3766
+ var _a;
3767
+ return ((_a = await this.PutResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3797
3768
  });
3798
3769
  // --- [ PATCH.Resource ] -------------------------------------------------------------------------------------------------------------------
3799
3770
  __publicField(this, "PatchResourceAR", async (resource, errorCb) => {
@@ -3801,10 +3772,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3801
3772
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", resource, null, null, errorCb);
3802
3773
  });
3803
3774
  __publicField(this, "PatchResourceDBR", async (resource, errorCb) => {
3804
- return this.__DBResource(this.PatchResourceAR, resource, errorCb);
3775
+ var _a;
3776
+ return ((_a = await this.PatchResourceAR(resource, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3805
3777
  });
3806
3778
  __publicField(this, "PatchResource", async (resource, errorCb) => {
3807
- return this.__Resource(this.PatchResourceAR, resource, errorCb);
3779
+ var _a;
3780
+ return ((_a = await this.PatchResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3808
3781
  });
3809
3782
  // --- [ DELETE.Resource ] -------------------------------------------------------------------------------------------------------------------
3810
3783
  __publicField(this, "DeleteResourceAR", async (resource, errorCb) => {
@@ -3812,10 +3785,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3812
3785
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", resource, null, null, errorCb);
3813
3786
  });
3814
3787
  __publicField(this, "DeleteResourceDBR", async (resource, errorCb) => {
3815
- return this.__DBResource(this.DeleteResourceAR, resource, errorCb);
3788
+ var _a;
3789
+ return ((_a = await this.DeleteResourceAR(resource, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3816
3790
  });
3817
3791
  __publicField(this, "DeleteResource", async (resource, errorCb) => {
3818
- return this.__Resource(this.DeleteResourceAR, resource, errorCb);
3792
+ var _a;
3793
+ return ((_a = await this.DeleteResourceDBR(resource, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3819
3794
  });
3820
3795
  // --- [ GET.Resource ] -------------------------------------------------------------------------------------------------------------------
3821
3796
  __publicField(this, "GetResourceAR", async (resource, filters, errorCb) => {
@@ -3826,20 +3801,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3826
3801
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "get", resource, null, null, errorCb);
3827
3802
  });
3828
3803
  __publicField(this, "GetResourceDBR", async (resource, filters, errorCb) => {
3829
- const retVal = await this.GetResourceAR(resource, filters, errorCb);
3830
- if (retVal) {
3831
- return retVal.data.detail;
3832
- } else {
3833
- return null;
3834
- }
3804
+ var _a;
3805
+ return ((_a = await this.GetResourceAR(resource, filters, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3835
3806
  });
3836
3807
  __publicField(this, "GetResource", async (resource, filters, errorCb) => {
3837
- const retVal = await this.GetResourceDBR(resource, filters, errorCb);
3838
- if (retVal) {
3839
- return retVal.resdesc;
3840
- } else {
3841
- return null;
3842
- }
3808
+ var _a;
3809
+ return ((_a = await this.GetResourceDBR(resource, filters, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3843
3810
  });
3844
3811
  // --- [ GET.Resources ] -------------------------------------------------------------------------------------------------------------------
3845
3812
  __publicField(this, "GetResourcesAR", async (filters, errorCb) => {
@@ -3850,20 +3817,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3850
3817
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "get", null, null, null, errorCb);
3851
3818
  });
3852
3819
  __publicField(this, "GetResourcesDBR", async (filters, errorCb) => {
3853
- const retVal = await this.GetResourcesAR(filters, errorCb);
3854
- if (retVal) {
3855
- return retVal.data.detail;
3856
- } else {
3857
- return null;
3858
- }
3820
+ var _a;
3821
+ return ((_a = await this.GetResourcesAR(filters, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3859
3822
  });
3860
3823
  __publicField(this, "GetResources", async (filters, errorCb) => {
3861
- const retVal = await this.GetResourcesDBR(filters, errorCb);
3862
- if (retVal) {
3863
- return retVal.map((r) => r.resdesc);
3864
- } else {
3865
- return null;
3866
- }
3824
+ var _a;
3825
+ return ((_a = await this.GetResourcesDBR(filters, errorCb)) == null ? void 0 : _a.map((r) => r.resdesc)) ?? null;
3867
3826
  });
3868
3827
  // --- [ Entity ] -------------------------------------------------------------------------------------------------------------------
3869
3828
  // --- [ POST.Entitiy ] -------------------------------------------------------------------------------------------------------------------
@@ -3872,10 +3831,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3872
3831
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "post", resourceEntity, null, null, errorCb);
3873
3832
  });
3874
3833
  __publicField(this, "PostEntityDBR", async (resourceEntity, errorCb) => {
3875
- return this.__DBResourceEntity(this.PostEntityAR, resourceEntity, errorCb);
3834
+ var _a;
3835
+ return ((_a = await this.PostEntityAR(resourceEntity, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3876
3836
  });
3877
3837
  __publicField(this, "PostEntity", async (resourceEntity, errorCb) => {
3878
- return this.__ResourceEntity(this.PostEntityAR, resourceEntity, errorCb);
3838
+ var _a;
3839
+ return ((_a = await this.PostEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3879
3840
  });
3880
3841
  // --- [ PUT.Entity ] -------------------------------------------------------------------------------------------------------------------
3881
3842
  __publicField(this, "PutEntityAR", async (entity, errorCb) => {
@@ -3883,32 +3844,38 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3883
3844
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "put", entity, null, null, errorCb);
3884
3845
  });
3885
3846
  __publicField(this, "PutEntityDBR", async (resourceEntity, errorCb) => {
3886
- return this.__DBResourceEntity(this.PutEntityAR, resourceEntity, errorCb);
3847
+ var _a;
3848
+ return ((_a = await this.PutEntityAR(resourceEntity, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3887
3849
  });
3888
3850
  __publicField(this, "PutEntity", async (resourceEntity, errorCb) => {
3889
- return this.__ResourceEntity(this.PutEntityAR, resourceEntity, errorCb);
3851
+ var _a;
3852
+ return ((_a = await this.PutEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3890
3853
  });
3891
3854
  // --- [ PATCH.Entity ] -------------------------------------------------------------------------------------------------------------------
3892
- __publicField(this, "PatchEntityAR", async (entity, errorCb) => {
3893
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${entity.resname}/entities/${entity.entname}`;
3894
- return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", entity, null, null, errorCb);
3855
+ __publicField(this, "PatchEntityAR", async (resourceEntity, errorCb) => {
3856
+ const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3857
+ return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", resourceEntity, null, null, errorCb);
3895
3858
  });
3896
3859
  __publicField(this, "PatchEntityDBR", async (resourceEntity, errorCb) => {
3897
- return this.__DBResourceEntity(this.PatchEntityAR, resourceEntity, errorCb);
3860
+ var _a;
3861
+ return ((_a = await this.PatchEntityAR(resourceEntity, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3898
3862
  });
3899
3863
  __publicField(this, "PatchEntity", async (resourceEntity, errorCb) => {
3900
- return this.__ResourceEntity(this.PatchEntityAR, resourceEntity, errorCb);
3864
+ var _a;
3865
+ return ((_a = await this.PatchEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3901
3866
  });
3902
3867
  // --- [ DELETE.Entity ] -------------------------------------------------------------------------------------------------------------------
3903
- __publicField(this, "DeleteEntityAR", async (entity, errorCb) => {
3904
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${entity.resname}/entities/${entity.entname}`;
3905
- return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", entity, null, null, errorCb);
3868
+ __publicField(this, "DeleteEntityAR", async (resourceEntity, errorCb) => {
3869
+ const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3870
+ return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", resourceEntity, null, null, errorCb);
3906
3871
  });
3907
3872
  __publicField(this, "DeleteEntityDBR", async (resourceEntity, errorCb) => {
3908
- return this.__DBResourceEntity(this.DeleteEntityAR, resourceEntity, errorCb);
3873
+ var _a;
3874
+ return ((_a = await this.DeleteEntityAR(resourceEntity, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3909
3875
  });
3910
3876
  __publicField(this, "DeleteEntity", async (resourceEntity, errorCb) => {
3911
- return this.__ResourceEntity(this.DeleteEntityAR, resourceEntity, errorCb);
3877
+ var _a;
3878
+ return ((_a = await this.DeleteEntityDBR(resourceEntity, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3912
3879
  });
3913
3880
  // --- [ GET.Entity ] -------------------------------------------------------------------------------------------------------------------
3914
3881
  __publicField(this, "GetEntityAR", async (resourceEntity, filters, errorCb) => {
@@ -3919,20 +3886,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3919
3886
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "get", resourceEntity, null, null, errorCb);
3920
3887
  });
3921
3888
  __publicField(this, "GetEntityDBR", async (resourceEntity, filters, errorCb) => {
3922
- const retVal = await this.GetEntityAR(resourceEntity, filters, errorCb);
3923
- if (retVal) {
3924
- return retVal.data.detail;
3925
- } else {
3926
- return null;
3927
- }
3889
+ var _a;
3890
+ return ((_a = await this.GetEntityAR(resourceEntity, filters, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3928
3891
  });
3929
3892
  __publicField(this, "GetEntity", async (resourceEntity, filters, errorCb) => {
3930
- const retVal = await this.GetEntityDBR(resourceEntity, filters, errorCb);
3931
- if (retVal) {
3932
- return retVal.resdesc;
3933
- } else {
3934
- return null;
3935
- }
3893
+ var _a;
3894
+ return ((_a = await this.GetEntityDBR(resourceEntity, filters, errorCb)) == null ? void 0 : _a.resdesc) ?? null;
3936
3895
  });
3937
3896
  // --- [ GET.Entities ] -------------------------------------------------------------------------------------------------------------------
3938
3897
  __publicField(this, "GetEntitiesAR", async (resource, filters, errorCb) => {
@@ -3943,20 +3902,12 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3943
3902
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "get", null, null, null, errorCb);
3944
3903
  });
3945
3904
  __publicField(this, "GetEntitiesDBR", async (resource, filters, errorCb) => {
3946
- const retVal = await this.GetEntitiesAR(resource, filters, errorCb);
3947
- if (retVal) {
3948
- return retVal.data.detail;
3949
- } else {
3950
- return null;
3951
- }
3905
+ var _a;
3906
+ return ((_a = await this.GetEntitiesAR(resource, filters, errorCb)) == null ? void 0 : _a.data.detail) ?? null;
3952
3907
  });
3953
3908
  __publicField(this, "GetEntities", async (resource, filters, errorCb) => {
3954
- const retVal = await this.GetEntitiesDBR(resource, filters, errorCb);
3955
- if (retVal) {
3956
- return retVal.map((r) => r.resdesc);
3957
- } else {
3958
- return null;
3959
- }
3909
+ var _a;
3910
+ return ((_a = await this.GetEntitiesDBR(resource, filters, errorCb)) == null ? void 0 : _a.map((r) => r.resdesc)) ?? null;
3960
3911
  });
3961
3912
  __privateSet(this, _options2, options);
3962
3913
  __privateSet(this, _axiosClient, new AxiosClient({
@@ -3971,6 +3922,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
3971
3922
  }
3972
3923
  _axiosClient = new WeakMap();
3973
3924
  _options2 = new WeakMap();
3925
+ exports2.AxiosClient = AxiosClient;
3974
3926
  exports2.STSRest01Client = STSRest01Client;
3975
3927
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
3976
3928
  });