@freelog/tools-lib 0.1.64 → 0.1.68
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/service-API/informalNodes.d.ts +5 -0
- package/dist/tools-lib.cjs.development.js +29 -19
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +29 -19
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +8 -4
- package/package.json +1 -1
- package/src/service-API/informalNodes.ts +14 -3
- package/src/service-API/nodes.ts +65 -65
- package/src/utils/linkTo.ts +14 -10
|
@@ -78,6 +78,11 @@ interface RulesRematchParamsType {
|
|
|
78
78
|
nodeId: number;
|
|
79
79
|
}
|
|
80
80
|
export declare function rulesRematch({ nodeId, ...params }: RulesRematchParamsType): Promise<any>;
|
|
81
|
+
interface RulesPreExecutionParamsType {
|
|
82
|
+
nodeId: number;
|
|
83
|
+
testRuleText: string;
|
|
84
|
+
}
|
|
85
|
+
export declare function rulesPreExecution({ nodeId, ...params }: RulesPreExecutionParamsType): Promise<any>;
|
|
81
86
|
interface BatchGetAuthsParamsType {
|
|
82
87
|
nodeId: number;
|
|
83
88
|
exhibitIds: string;
|
|
@@ -1021,7 +1021,6 @@ function resourceDetails(_ref2) {
|
|
|
1021
1021
|
var resourceID = _ref2.resourceID,
|
|
1022
1022
|
params = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
1023
1023
|
|
|
1024
|
-
// return `/resource/${resourceID}`;
|
|
1025
1024
|
return "/resource/details/" + resourceID + handleQuery(params);
|
|
1026
1025
|
}
|
|
1027
1026
|
function resourceCreator(_temp2) {
|
|
@@ -1111,11 +1110,14 @@ function resourceVersionCreateSuccess(_ref18) {
|
|
|
1111
1110
|
version = _ref18.version;
|
|
1112
1111
|
return "/result/resource/version/create/success/" + resourceID + "/" + version;
|
|
1113
1112
|
}
|
|
1113
|
+
function nodeCreateSuccess(_ref19) {
|
|
1114
|
+
var nodeID = _ref19.nodeID;
|
|
1115
|
+
return "/result/node/create/success/" + nodeID;
|
|
1116
|
+
}
|
|
1114
1117
|
function exception403(_temp7) {
|
|
1115
|
-
var
|
|
1116
|
-
params = _extends({},
|
|
1118
|
+
var _ref20 = _temp7 === void 0 ? {} : _temp7,
|
|
1119
|
+
params = _extends({}, _ref20);
|
|
1117
1120
|
|
|
1118
|
-
// console.log(from, 'exception403!!!!!!!!');
|
|
1119
1121
|
var fromUrl = params.from || '';
|
|
1120
1122
|
|
|
1121
1123
|
if (!fromUrl) {
|
|
@@ -1123,32 +1125,31 @@ function exception403(_temp7) {
|
|
|
1123
1125
|
href = _window$location.href,
|
|
1124
1126
|
origin = _window$location.origin;
|
|
1125
1127
|
fromUrl = href.replace(origin, '');
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
+
}
|
|
1128
1129
|
|
|
1129
1130
|
return "/exception/403" + handleQuery({
|
|
1130
1131
|
from: fromUrl
|
|
1131
1132
|
});
|
|
1132
1133
|
}
|
|
1133
1134
|
function login(_temp8) {
|
|
1134
|
-
var
|
|
1135
|
-
goTo =
|
|
1135
|
+
var _ref21 = _temp8 === void 0 ? {} : _temp8,
|
|
1136
|
+
goTo = _ref21.goTo;
|
|
1136
1137
|
|
|
1137
1138
|
return "/login" + handleQuery({
|
|
1138
1139
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
1139
1140
|
});
|
|
1140
1141
|
}
|
|
1141
1142
|
function logon(_temp9) {
|
|
1142
|
-
var
|
|
1143
|
-
goTo =
|
|
1143
|
+
var _ref22 = _temp9 === void 0 ? {} : _temp9,
|
|
1144
|
+
goTo = _ref22.goTo;
|
|
1144
1145
|
|
|
1145
1146
|
return "/logon" + handleQuery({
|
|
1146
1147
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
1147
1148
|
});
|
|
1148
1149
|
}
|
|
1149
1150
|
function retrieveUserPassword(_temp10) {
|
|
1150
|
-
var
|
|
1151
|
-
goTo =
|
|
1151
|
+
var _ref23 = _temp10 === void 0 ? {} : _temp10,
|
|
1152
|
+
goTo = _ref23.goTo;
|
|
1152
1153
|
|
|
1153
1154
|
return "/retrieve" + handleQuery({
|
|
1154
1155
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
@@ -1215,6 +1216,7 @@ var LinkTo = {
|
|
|
1215
1216
|
objectDetails: objectDetails,
|
|
1216
1217
|
resourceCreateSuccess: resourceCreateSuccess,
|
|
1217
1218
|
resourceVersionCreateSuccess: resourceVersionCreateSuccess,
|
|
1219
|
+
nodeCreateSuccess: nodeCreateSuccess,
|
|
1218
1220
|
exception403: exception403,
|
|
1219
1221
|
login: login,
|
|
1220
1222
|
logon: logon,
|
|
@@ -1507,8 +1509,7 @@ function details(params) {
|
|
|
1507
1509
|
// return FUtil.Axios.get(`/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`);
|
|
1508
1510
|
return FUtil.Request({
|
|
1509
1511
|
method: 'GET',
|
|
1510
|
-
url: "/v2/nodes/" + params.nodeId
|
|
1511
|
-
params: params
|
|
1512
|
+
url: "/v2/nodes/" + params.nodeId
|
|
1512
1513
|
});
|
|
1513
1514
|
} // return FUtil.Axios.get(`/v2/nodes/detail`, {
|
|
1514
1515
|
// params,
|
|
@@ -2444,7 +2445,8 @@ var _excluded$5 = ["nodeId"],
|
|
|
2444
2445
|
_excluded7$2 = ["testResourceId"],
|
|
2445
2446
|
_excluded8$2 = ["nodeId"],
|
|
2446
2447
|
_excluded9$2 = ["nodeId"],
|
|
2447
|
-
_excluded10$2 = ["nodeId"]
|
|
2448
|
+
_excluded10$2 = ["nodeId"],
|
|
2449
|
+
_excluded11$1 = ["nodeId"];
|
|
2448
2450
|
function testResources(_ref) {
|
|
2449
2451
|
var nodeId = _ref.nodeId,
|
|
2450
2452
|
params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
@@ -2566,21 +2568,28 @@ function rulesRematch(_ref13) {
|
|
|
2566
2568
|
var nodeId = _ref13.nodeId,
|
|
2567
2569
|
params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
|
|
2568
2570
|
|
|
2569
|
-
// return FUtil.Axios.post(`/v2/testNodes/${nodeId}/rules/rematch`, params);
|
|
2570
2571
|
return FUtil.Request({
|
|
2571
2572
|
method: 'POST',
|
|
2572
2573
|
url: "/v2/testNodes/" + nodeId + "/rules/rematch",
|
|
2573
2574
|
data: params
|
|
2574
2575
|
});
|
|
2575
2576
|
}
|
|
2576
|
-
function
|
|
2577
|
+
function rulesPreExecution(_ref14) {
|
|
2577
2578
|
var nodeId = _ref14.nodeId,
|
|
2578
2579
|
params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
|
|
2579
2580
|
|
|
2580
|
-
|
|
2581
|
+
return FUtil.Request({
|
|
2582
|
+
method: 'PUT',
|
|
2583
|
+
url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
|
|
2584
|
+
data: params
|
|
2585
|
+
});
|
|
2586
|
+
}
|
|
2587
|
+
function batchGetAuths(_ref15) {
|
|
2588
|
+
var nodeId = _ref15.nodeId,
|
|
2589
|
+
params = _objectWithoutPropertiesLoose(_ref15, _excluded11$1);
|
|
2590
|
+
|
|
2581
2591
|
return FUtil.Request({
|
|
2582
2592
|
method: 'GET',
|
|
2583
|
-
// url: `/v2/auths/testResources/nodes/${nodeId}/result`,
|
|
2584
2593
|
url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
|
|
2585
2594
|
params: params
|
|
2586
2595
|
});
|
|
@@ -2601,6 +2610,7 @@ var InformalNode = {
|
|
|
2601
2610
|
testResourceDetails: testResourceDetails,
|
|
2602
2611
|
searchTestResourcesByDependency: searchTestResourcesByDependency,
|
|
2603
2612
|
rulesRematch: rulesRematch,
|
|
2613
|
+
rulesPreExecution: rulesPreExecution,
|
|
2604
2614
|
batchGetAuths: batchGetAuths
|
|
2605
2615
|
};
|
|
2606
2616
|
|