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