@freelog/tools-lib 0.1.84 → 0.1.87
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/activities.d.ts +2 -0
- package/dist/service-API/informalNodes.d.ts +46 -15
- package/dist/service-API/policies.d.ts +6 -2
- package/dist/service-API/resources.d.ts +4 -3
- package/dist/service-API/tools/index.d.ts +4 -0
- package/dist/tools-lib.cjs.development.js +47 -41
- 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 +47 -41
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/axios.d.ts +4 -4
- package/package.json +1 -1
- package/src/service-API/activities.ts +2 -0
- package/src/service-API/informalNodes.ts +238 -237
- package/src/service-API/resources.ts +496 -496
- package/src/service-API/tools/index.ts +10 -5
- package/src/utils/axios.ts +137 -132
- package/src/utils/linkTo.ts +2 -2
package/dist/tools-lib.esm.js
CHANGED
|
@@ -1022,11 +1022,11 @@ function activities(_temp2) {
|
|
|
1022
1022
|
|
|
1023
1023
|
_objectDestructuringEmpty(_ref2);
|
|
1024
1024
|
|
|
1025
|
-
return "/
|
|
1025
|
+
return "/activities";
|
|
1026
1026
|
}
|
|
1027
1027
|
function activity(_ref3) {
|
|
1028
1028
|
var activityID = _ref3.activityID;
|
|
1029
|
-
return "/
|
|
1029
|
+
return "/activity/" + activityID;
|
|
1030
1030
|
}
|
|
1031
1031
|
function dashboard(_temp3) {
|
|
1032
1032
|
var _ref4 = _temp3 === void 0 ? {} : _temp3;
|
|
@@ -1426,20 +1426,20 @@ function request(_x, _x2) {
|
|
|
1426
1426
|
|
|
1427
1427
|
function _request() {
|
|
1428
1428
|
_request = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(config, _temp) {
|
|
1429
|
-
var _ref, _ref$noRedirect, noRedirect, result;
|
|
1429
|
+
var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
|
|
1430
1430
|
|
|
1431
1431
|
return runtime_1.wrap(function _callee$(_context) {
|
|
1432
1432
|
while (1) {
|
|
1433
1433
|
switch (_context.prev = _context.next) {
|
|
1434
1434
|
case 0:
|
|
1435
|
-
_ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect;
|
|
1435
|
+
_ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect, _ref$noErrorAlert = _ref.noErrorAlert, noErrorAlert = _ref$noErrorAlert === void 0 ? false : _ref$noErrorAlert;
|
|
1436
1436
|
_context.next = 3;
|
|
1437
1437
|
return axios.request(config);
|
|
1438
1438
|
|
|
1439
1439
|
case 3:
|
|
1440
1440
|
result = _context.sent;
|
|
1441
1441
|
|
|
1442
|
-
if (!((result.errCode === 30 || result.
|
|
1442
|
+
if (!((result.errCode === 30 || result.errCode === 30) && !noRedirect)) {
|
|
1443
1443
|
_context.next = 6;
|
|
1444
1444
|
break;
|
|
1445
1445
|
}
|
|
@@ -1449,9 +1449,10 @@ function _request() {
|
|
|
1449
1449
|
})));
|
|
1450
1450
|
|
|
1451
1451
|
case 6:
|
|
1452
|
+
|
|
1452
1453
|
return _context.abrupt("return", result);
|
|
1453
1454
|
|
|
1454
|
-
case
|
|
1455
|
+
case 8:
|
|
1455
1456
|
case "end":
|
|
1456
1457
|
return _context.stop();
|
|
1457
1458
|
}
|
|
@@ -2076,13 +2077,14 @@ var _excluded$3 = ["resourceIdOrName"],
|
|
|
2076
2077
|
_excluded2$3 = ["resourceId"],
|
|
2077
2078
|
_excluded3$2 = ["resourceId"],
|
|
2078
2079
|
_excluded4$2 = ["resourceId"],
|
|
2079
|
-
_excluded5$2 = ["
|
|
2080
|
+
_excluded5$2 = ["resourceId", "version"],
|
|
2080
2081
|
_excluded6$1 = ["fileSha1"],
|
|
2081
|
-
_excluded7$1 = ["
|
|
2082
|
+
_excluded7$1 = ["fileSha1"],
|
|
2082
2083
|
_excluded8$1 = ["resourceId"],
|
|
2083
2084
|
_excluded9$1 = ["resourceId"],
|
|
2084
2085
|
_excluded10$1 = ["resourceId"],
|
|
2085
|
-
_excluded11 = ["resourceId"]
|
|
2086
|
+
_excluded11 = ["resourceId"],
|
|
2087
|
+
_excluded12 = ["resourceId"];
|
|
2086
2088
|
function create$1(params) {
|
|
2087
2089
|
return FUtil.Request({
|
|
2088
2090
|
method: 'POST',
|
|
@@ -2152,24 +2154,27 @@ function createVersion(_ref4) {
|
|
|
2152
2154
|
data: params
|
|
2153
2155
|
});
|
|
2154
2156
|
}
|
|
2155
|
-
function
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
url: "/v2/resources/" + params.resourceId + "/versions/" + params.version,
|
|
2160
|
-
params: params
|
|
2161
|
-
});
|
|
2162
|
-
}
|
|
2157
|
+
function resourceVersionInfo1(_ref5) {
|
|
2158
|
+
var resourceId = _ref5.resourceId,
|
|
2159
|
+
version = _ref5.version,
|
|
2160
|
+
params = _objectWithoutPropertiesLoose(_ref5, _excluded5$2);
|
|
2163
2161
|
|
|
2162
|
+
return FUtil.Request({
|
|
2163
|
+
method: 'GET',
|
|
2164
|
+
url: "/v2/resources/" + resourceId + "/versions/" + version,
|
|
2165
|
+
params: params
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
function resourceVersionInfo2(params) {
|
|
2164
2169
|
return FUtil.Request({
|
|
2165
2170
|
method: 'GET',
|
|
2166
2171
|
url: "/v2/resources/versions/detail",
|
|
2167
2172
|
params: params
|
|
2168
2173
|
});
|
|
2169
2174
|
}
|
|
2170
|
-
function getResourceVersionBySha1(
|
|
2171
|
-
var fileSha1 =
|
|
2172
|
-
params = _objectWithoutPropertiesLoose(
|
|
2175
|
+
function getResourceVersionBySha1(_ref6) {
|
|
2176
|
+
var fileSha1 = _ref6.fileSha1,
|
|
2177
|
+
params = _objectWithoutPropertiesLoose(_ref6, _excluded6$1);
|
|
2173
2178
|
|
|
2174
2179
|
// return FUtil.Axios.get(`/v2/resources/files/${fileSha1}/versions`, {
|
|
2175
2180
|
// params,
|
|
@@ -2180,9 +2185,9 @@ function getResourceVersionBySha1(_ref5) {
|
|
|
2180
2185
|
params: params
|
|
2181
2186
|
});
|
|
2182
2187
|
}
|
|
2183
|
-
function getResourceBySha1(
|
|
2184
|
-
var fileSha1 =
|
|
2185
|
-
params = _objectWithoutPropertiesLoose(
|
|
2188
|
+
function getResourceBySha1(_ref7) {
|
|
2189
|
+
var fileSha1 = _ref7.fileSha1,
|
|
2190
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
2186
2191
|
|
|
2187
2192
|
// return FUtil.Axios.get(`/v2/resources/files/${fileSha1}`, {
|
|
2188
2193
|
// params,
|
|
@@ -2232,9 +2237,9 @@ function resourcesDownload(params) {
|
|
|
2232
2237
|
// responseType: 'arraybuffer',
|
|
2233
2238
|
// });
|
|
2234
2239
|
}
|
|
2235
|
-
function batchGetCoverageVersions(
|
|
2236
|
-
var resourceId =
|
|
2237
|
-
params = _objectWithoutPropertiesLoose(
|
|
2240
|
+
function batchGetCoverageVersions(_ref8) {
|
|
2241
|
+
var resourceId = _ref8.resourceId,
|
|
2242
|
+
params = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
|
|
2238
2243
|
|
|
2239
2244
|
// return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
|
|
2240
2245
|
// params,
|
|
@@ -2252,9 +2257,9 @@ function resolveResources(params) {
|
|
|
2252
2257
|
url: "/v2/resources/" + params.resourceId + "/resolveResources"
|
|
2253
2258
|
});
|
|
2254
2259
|
}
|
|
2255
|
-
function batchSetContracts(
|
|
2256
|
-
var resourceId =
|
|
2257
|
-
params = _objectWithoutPropertiesLoose(
|
|
2260
|
+
function batchSetContracts(_ref9) {
|
|
2261
|
+
var resourceId = _ref9.resourceId,
|
|
2262
|
+
params = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
|
|
2258
2263
|
|
|
2259
2264
|
// return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
|
|
2260
2265
|
return FUtil.Request({
|
|
@@ -2263,9 +2268,9 @@ function batchSetContracts(_ref8) {
|
|
|
2263
2268
|
data: params
|
|
2264
2269
|
});
|
|
2265
2270
|
}
|
|
2266
|
-
function cycleDependencyCheck$1(
|
|
2267
|
-
var resourceId =
|
|
2268
|
-
params = _objectWithoutPropertiesLoose(
|
|
2271
|
+
function cycleDependencyCheck$1(_ref10) {
|
|
2272
|
+
var resourceId = _ref10.resourceId,
|
|
2273
|
+
params = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
|
|
2269
2274
|
|
|
2270
2275
|
// return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
|
|
2271
2276
|
return FUtil.Request({
|
|
@@ -2274,9 +2279,9 @@ function cycleDependencyCheck$1(_ref9) {
|
|
|
2274
2279
|
data: params
|
|
2275
2280
|
});
|
|
2276
2281
|
}
|
|
2277
|
-
function relationTree$1(
|
|
2278
|
-
var resourceId =
|
|
2279
|
-
params = _objectWithoutPropertiesLoose(
|
|
2282
|
+
function relationTree$1(_ref11) {
|
|
2283
|
+
var resourceId = _ref11.resourceId,
|
|
2284
|
+
params = _objectWithoutPropertiesLoose(_ref11, _excluded11);
|
|
2280
2285
|
|
|
2281
2286
|
// return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
|
|
2282
2287
|
// params,
|
|
@@ -2287,9 +2292,9 @@ function relationTree$1(_ref10) {
|
|
|
2287
2292
|
params: params
|
|
2288
2293
|
});
|
|
2289
2294
|
}
|
|
2290
|
-
function relationTreeAuth(
|
|
2291
|
-
var resourceId =
|
|
2292
|
-
params = _objectWithoutPropertiesLoose(
|
|
2295
|
+
function relationTreeAuth(_ref12) {
|
|
2296
|
+
var resourceId = _ref12.resourceId,
|
|
2297
|
+
params = _objectWithoutPropertiesLoose(_ref12, _excluded12);
|
|
2293
2298
|
|
|
2294
2299
|
return FUtil.Request({
|
|
2295
2300
|
method: 'GET',
|
|
@@ -2297,8 +2302,8 @@ function relationTreeAuth(_ref11) {
|
|
|
2297
2302
|
params: params
|
|
2298
2303
|
});
|
|
2299
2304
|
}
|
|
2300
|
-
function batchAuth$1(
|
|
2301
|
-
var params = _extends({},
|
|
2305
|
+
function batchAuth$1(_ref13) {
|
|
2306
|
+
var params = _extends({}, _ref13);
|
|
2302
2307
|
|
|
2303
2308
|
return FUtil.Request({
|
|
2304
2309
|
method: 'GET',
|
|
@@ -2317,7 +2322,8 @@ var Resource = {
|
|
|
2317
2322
|
dependencyTree: dependencyTree$1,
|
|
2318
2323
|
authTree: authTree$1,
|
|
2319
2324
|
createVersion: createVersion,
|
|
2320
|
-
|
|
2325
|
+
resourceVersionInfo1: resourceVersionInfo1,
|
|
2326
|
+
resourceVersionInfo2: resourceVersionInfo2,
|
|
2321
2327
|
getResourceVersionBySha1: getResourceVersionBySha1,
|
|
2322
2328
|
getResourceBySha1: getResourceBySha1,
|
|
2323
2329
|
updateResourceVersionInfo: updateResourceVersionInfo,
|