@nsshunt/stsrest01client 1.0.5 → 1.0.7
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.
|
@@ -3611,7 +3611,10 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3611
3611
|
} else {
|
|
3612
3612
|
accessToken = await __privateGet(this, _options).GetAccessToken();
|
|
3613
3613
|
}
|
|
3614
|
-
|
|
3614
|
+
let requestConfig = new stsutils.STSAxiosConfig(url, httpVerb).withAuthHeaders(accessToken, __privateGet(this, _DUMMY_USER));
|
|
3615
|
+
if (!(httpVerb.localeCompare("get") === 0 || httpVerb.localeCompare("head") === 0)) {
|
|
3616
|
+
requestConfig.withData(filters ? filters : resource ? resource : void 0);
|
|
3617
|
+
}
|
|
3615
3618
|
if (isNode && __privateGet(this, _options).agentManager) {
|
|
3616
3619
|
requestConfig.withAgentManager(__privateGet(this, _options).agentManager);
|
|
3617
3620
|
}
|
|
@@ -3742,7 +3745,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3742
3745
|
// --- [ Resource ] -------------------------------------------------------------------------------------------------------------------
|
|
3743
3746
|
// --- [ POST.Resource ] -------------------------------------------------------------------------------------------------------------------
|
|
3744
3747
|
__publicField(this, "PostResourceAR", async (resource, errorCb) => {
|
|
3745
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3748
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources`;
|
|
3746
3749
|
return await __privateGet(this, _axiosClient).InvokeResourceAPI(url, "post", resource, null, null, errorCb);
|
|
3747
3750
|
});
|
|
3748
3751
|
__publicField(this, "PostResourceDBR", async (resource, errorCb) => {
|
|
@@ -3755,7 +3758,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3755
3758
|
});
|
|
3756
3759
|
// --- [ PUT.Resource ] -------------------------------------------------------------------------------------------------------------------
|
|
3757
3760
|
__publicField(this, "PutResourceAR", async (resource, errorCb) => {
|
|
3758
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3761
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
|
|
3759
3762
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "put", resource, null, null, errorCb);
|
|
3760
3763
|
});
|
|
3761
3764
|
__publicField(this, "PutResourceDBR", async (resource, errorCb) => {
|
|
@@ -3768,7 +3771,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3768
3771
|
});
|
|
3769
3772
|
// --- [ PATCH.Resource ] -------------------------------------------------------------------------------------------------------------------
|
|
3770
3773
|
__publicField(this, "PatchResourceAR", async (resource, errorCb) => {
|
|
3771
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3774
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
|
|
3772
3775
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", resource, null, null, errorCb);
|
|
3773
3776
|
});
|
|
3774
3777
|
__publicField(this, "PatchResourceDBR", async (resource, errorCb) => {
|
|
@@ -3781,7 +3784,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3781
3784
|
});
|
|
3782
3785
|
// --- [ DELETE.Resource ] -------------------------------------------------------------------------------------------------------------------
|
|
3783
3786
|
__publicField(this, "DeleteResourceAR", async (resource, errorCb) => {
|
|
3784
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3787
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
|
|
3785
3788
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", resource, null, null, errorCb);
|
|
3786
3789
|
});
|
|
3787
3790
|
__publicField(this, "DeleteResourceDBR", async (resource, errorCb) => {
|
|
@@ -3794,7 +3797,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3794
3797
|
});
|
|
3795
3798
|
// --- [ GET.Resource ] -------------------------------------------------------------------------------------------------------------------
|
|
3796
3799
|
__publicField(this, "GetResourceAR", async (resource, filters, errorCb) => {
|
|
3797
|
-
let url = `${__privateGet(this, _options2).endpoint}
|
|
3800
|
+
let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
|
|
3798
3801
|
if (filters && filters.localeCompare("") !== 0) {
|
|
3799
3802
|
url = `${url}?${filters}`;
|
|
3800
3803
|
}
|
|
@@ -3810,7 +3813,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3810
3813
|
});
|
|
3811
3814
|
// --- [ GET.Resources ] -------------------------------------------------------------------------------------------------------------------
|
|
3812
3815
|
__publicField(this, "GetResourcesAR", async (filters, errorCb) => {
|
|
3813
|
-
let url = `${__privateGet(this, _options2).endpoint}
|
|
3816
|
+
let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources`;
|
|
3814
3817
|
if (filters && filters.localeCompare("") !== 0) {
|
|
3815
3818
|
url = `${url}?${filters}`;
|
|
3816
3819
|
}
|
|
@@ -3827,7 +3830,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3827
3830
|
// --- [ Entity ] -------------------------------------------------------------------------------------------------------------------
|
|
3828
3831
|
// --- [ POST.Entitiy ] -------------------------------------------------------------------------------------------------------------------
|
|
3829
3832
|
__publicField(this, "PostEntityAR", async (resourceEntity, errorCb) => {
|
|
3830
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3833
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities`;
|
|
3831
3834
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "post", resourceEntity, null, null, errorCb);
|
|
3832
3835
|
});
|
|
3833
3836
|
__publicField(this, "PostEntityDBR", async (resourceEntity, errorCb) => {
|
|
@@ -3840,7 +3843,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3840
3843
|
});
|
|
3841
3844
|
// --- [ PUT.Entity ] -------------------------------------------------------------------------------------------------------------------
|
|
3842
3845
|
__publicField(this, "PutEntityAR", async (entity, errorCb) => {
|
|
3843
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3846
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${entity.resname}/entities/${entity.entname}`;
|
|
3844
3847
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "put", entity, null, null, errorCb);
|
|
3845
3848
|
});
|
|
3846
3849
|
__publicField(this, "PutEntityDBR", async (resourceEntity, errorCb) => {
|
|
@@ -3853,7 +3856,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3853
3856
|
});
|
|
3854
3857
|
// --- [ PATCH.Entity ] -------------------------------------------------------------------------------------------------------------------
|
|
3855
3858
|
__publicField(this, "PatchEntityAR", async (resourceEntity, errorCb) => {
|
|
3856
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3859
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
|
|
3857
3860
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", resourceEntity, null, null, errorCb);
|
|
3858
3861
|
});
|
|
3859
3862
|
__publicField(this, "PatchEntityDBR", async (resourceEntity, errorCb) => {
|
|
@@ -3866,7 +3869,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3866
3869
|
});
|
|
3867
3870
|
// --- [ DELETE.Entity ] -------------------------------------------------------------------------------------------------------------------
|
|
3868
3871
|
__publicField(this, "DeleteEntityAR", async (resourceEntity, errorCb) => {
|
|
3869
|
-
const url = `${__privateGet(this, _options2).endpoint}
|
|
3872
|
+
const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
|
|
3870
3873
|
return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", resourceEntity, null, null, errorCb);
|
|
3871
3874
|
});
|
|
3872
3875
|
__publicField(this, "DeleteEntityDBR", async (resourceEntity, errorCb) => {
|
|
@@ -3879,7 +3882,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3879
3882
|
});
|
|
3880
3883
|
// --- [ GET.Entity ] -------------------------------------------------------------------------------------------------------------------
|
|
3881
3884
|
__publicField(this, "GetEntityAR", async (resourceEntity, filters, errorCb) => {
|
|
3882
|
-
let url = `${__privateGet(this, _options2).endpoint}
|
|
3885
|
+
let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
|
|
3883
3886
|
if (filters && filters.localeCompare("") !== 0) {
|
|
3884
3887
|
url = `${url}?${filters}`;
|
|
3885
3888
|
}
|
|
@@ -3895,7 +3898,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
3895
3898
|
});
|
|
3896
3899
|
// --- [ GET.Entities ] -------------------------------------------------------------------------------------------------------------------
|
|
3897
3900
|
__publicField(this, "GetEntitiesAR", async (resource, filters, errorCb) => {
|
|
3898
|
-
let url = `${__privateGet(this, _options2).endpoint}
|
|
3901
|
+
let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}/entities`;
|
|
3899
3902
|
if (filters && filters.localeCompare("") !== 0) {
|
|
3900
3903
|
url = `${url}?${filters}`;
|
|
3901
3904
|
}
|