@freelog/tools-lib 0.1.86 → 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.
@@ -8,36 +8,49 @@ interface TestResourcesParamsType {
8
8
  omitResourceType?: string;
9
9
  keywords?: string;
10
10
  }
11
- export declare function testResources({ nodeId, ...params }: TestResourcesParamsType): Promise<any>;
11
+ export declare function testResources({ nodeId, ...params }: TestResourcesParamsType): Promise<void | (import("./tools").CommonReturn & {
12
+ data: any;
13
+ })>;
12
14
  interface CreateRulesParamsType {
13
15
  nodeId: number;
14
16
  testRuleText: string;
15
17
  }
16
- export declare function createRules({ nodeId, ...params }: CreateRulesParamsType): Promise<any>;
18
+ export declare function createRules({ nodeId, ...params }: CreateRulesParamsType): Promise<void | (import("./tools").CommonReturn & {
19
+ data: any;
20
+ })>;
17
21
  interface BatchTestResourcesParamsType {
18
22
  nodeId: number;
19
23
  entityType?: 'resource' | 'object';
20
24
  entityIds?: string;
21
25
  entityNames?: string;
26
+ testResourceNames?: string;
22
27
  projection?: string;
23
28
  }
24
- export declare function batchTestResources({ nodeId, ...params }: BatchTestResourcesParamsType): Promise<any>;
29
+ export declare function batchTestResources({ nodeId, ...params }: BatchTestResourcesParamsType): Promise<void | (import("./tools").CommonReturn & {
30
+ data: any;
31
+ })>;
25
32
  interface DependencyTreeParamsType {
26
33
  nodeId: number;
27
34
  keywords: string;
28
35
  resourceType?: string;
29
36
  omitResourceType?: string;
30
37
  }
31
- export declare function dependencyTree({ nodeId, ...params }: DependencyTreeParamsType): Promise<any>;
38
+ export declare function dependencyTree({ nodeId, ...params }: DependencyTreeParamsType): Promise<void | (import("./tools").CommonReturn & {
39
+ data: any;
40
+ })>;
32
41
  interface PutRulesParamsType {
33
42
  nodeId: number;
34
43
  additionalTestRule: string;
35
44
  }
36
- export declare function putRules({ nodeId, ...params }: PutRulesParamsType): Promise<any>;
45
+ export declare function putRules({ nodeId, ...params }: PutRulesParamsType): Promise<void | (import("./tools").CommonReturn & {
46
+ data: any;
47
+ })>;
37
48
  interface TestNodeRulesParamsType {
38
49
  nodeId: number;
39
50
  }
40
- export declare function testNodeRules({ nodeId }: TestNodeRulesParamsType): Promise<any>;
51
+ export declare function testNodeRules({ nodeId }: TestNodeRulesParamsType): Promise<void | (import("./tools").CommonReturn & {
52
+ data: any;
53
+ })>;
41
54
  interface UpdateTestResourceContractsParamsType {
42
55
  testResourceId: string;
43
56
  resolveResources: {
@@ -47,25 +60,35 @@ interface UpdateTestResourceContractsParamsType {
47
60
  }[];
48
61
  }[];
49
62
  }
50
- export declare function updateTestResourceContracts({ testResourceId, ...params }: UpdateTestResourceContractsParamsType): Promise<any>;
63
+ export declare function updateTestResourceContracts({ testResourceId, ...params }: UpdateTestResourceContractsParamsType): Promise<void | (import("./tools").CommonReturn & {
64
+ data: any;
65
+ })>;
51
66
  interface DependencyTreeFilterParamsType {
52
67
  testResourceId: string;
53
68
  dependentEntityId: string;
54
69
  dependentEntityVersionRange?: string;
55
70
  }
56
- export declare function dependencyTreeFilter({ testResourceId, ...params }: DependencyTreeFilterParamsType): Promise<any>;
71
+ export declare function dependencyTreeFilter({ testResourceId, ...params }: DependencyTreeFilterParamsType): Promise<void | (import("./tools").CommonReturn & {
72
+ data: any;
73
+ })>;
57
74
  interface TestResourcesDependencyTreeParamsType {
58
75
  testResourceId: string;
59
76
  }
60
- export declare function testResourcesDependencyTree({ testResourceId }: TestResourcesDependencyTreeParamsType): Promise<any>;
77
+ export declare function testResourcesDependencyTree({ testResourceId }: TestResourcesDependencyTreeParamsType): Promise<void | (import("./tools").CommonReturn & {
78
+ data: any;
79
+ })>;
61
80
  interface TestResourcesAuthTreeParamsType {
62
81
  testResourceId: string;
63
82
  }
64
- export declare function testResourcesAuthTree({ testResourceId }: TestResourcesAuthTreeParamsType): Promise<any>;
83
+ export declare function testResourcesAuthTree({ testResourceId }: TestResourcesAuthTreeParamsType): Promise<void | (import("./tools").CommonReturn & {
84
+ data: any;
85
+ })>;
65
86
  interface TestResourceDetailsParamsType {
66
87
  testResourceId: string;
67
88
  }
68
- export declare function testResourceDetails({ testResourceId }: TestResourceDetailsParamsType): Promise<any>;
89
+ export declare function testResourceDetails({ testResourceId }: TestResourceDetailsParamsType): Promise<void | (import("./tools").CommonReturn & {
90
+ data: any;
91
+ })>;
69
92
  interface SearchTestResourcesByDependencyParamsType {
70
93
  nodeId: number;
71
94
  dependentEntityId: string;
@@ -73,21 +96,29 @@ interface SearchTestResourcesByDependencyParamsType {
73
96
  resourceType?: string;
74
97
  omitResourceType?: string;
75
98
  }
76
- export declare function searchTestResourcesByDependency({ nodeId, ...params }: SearchTestResourcesByDependencyParamsType): Promise<any>;
99
+ export declare function searchTestResourcesByDependency({ nodeId, ...params }: SearchTestResourcesByDependencyParamsType): Promise<void | (import("./tools").CommonReturn & {
100
+ data: any;
101
+ })>;
77
102
  interface RulesRematchParamsType {
78
103
  nodeId: number;
79
104
  isMandatoryMatch?: 0 | 1;
80
105
  }
81
- export declare function rulesRematch({ nodeId, ...params }: RulesRematchParamsType): Promise<any>;
106
+ export declare function rulesRematch({ nodeId, ...params }: RulesRematchParamsType): Promise<void | (import("./tools").CommonReturn & {
107
+ data: any;
108
+ })>;
82
109
  interface RulesPreExecutionParamsType {
83
110
  nodeId: number;
84
111
  testRuleText: string;
85
112
  }
86
- export declare function rulesPreExecution({ nodeId, ...params }: RulesPreExecutionParamsType): Promise<any>;
113
+ export declare function rulesPreExecution({ nodeId, ...params }: RulesPreExecutionParamsType): Promise<void | (import("./tools").CommonReturn & {
114
+ data: any;
115
+ })>;
87
116
  interface BatchGetAuthsParamsType {
88
117
  nodeId: number;
89
118
  exhibitIds: string;
90
119
  authType: 1 | 2 | 3;
91
120
  }
92
- export declare function batchGetAuths({ nodeId, ...params }: BatchGetAuthsParamsType): Promise<any>;
121
+ export declare function batchGetAuths({ nodeId, ...params }: BatchGetAuthsParamsType): Promise<void | (import("./tools").CommonReturn & {
122
+ data: any;
123
+ })>;
93
124
  export {};
@@ -4,12 +4,16 @@ interface PoliciesParamsType {
4
4
  subjectType?: 1 | 2 | 3;
5
5
  projection?: string;
6
6
  }
7
- export declare function policies(params: PoliciesParamsType): Promise<any>;
7
+ export declare function policies(params: PoliciesParamsType): Promise<void | (import("./tools").CommonReturn & {
8
+ data: any;
9
+ })>;
8
10
  interface PoliciesListParamsType {
9
11
  policyIds: string;
10
12
  subjectType?: number;
11
13
  userId?: number;
12
14
  projection?: string;
13
15
  }
14
- export declare function policiesList(params: PoliciesListParamsType): Promise<any>;
16
+ export declare function policiesList(params: PoliciesListParamsType): Promise<void | (import("./tools").CommonReturn & {
17
+ data: any;
18
+ })>;
15
19
  export {};
@@ -3,3 +3,7 @@ export interface CommonReturn {
3
3
  msg: string;
4
4
  ret: number;
5
5
  }
6
+ export interface RequestParamsType {
7
+ noRedirect?: boolean;
8
+ noErrorAlert?: boolean;
9
+ }
@@ -1432,20 +1432,20 @@ function request(_x, _x2) {
1432
1432
 
1433
1433
  function _request() {
1434
1434
  _request = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(config, _temp) {
1435
- var _ref, _ref$noRedirect, noRedirect, result;
1435
+ var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
1436
1436
 
1437
1437
  return runtime_1.wrap(function _callee$(_context) {
1438
1438
  while (1) {
1439
1439
  switch (_context.prev = _context.next) {
1440
1440
  case 0:
1441
- _ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect;
1441
+ _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;
1442
1442
  _context.next = 3;
1443
1443
  return axios.request(config);
1444
1444
 
1445
1445
  case 3:
1446
1446
  result = _context.sent;
1447
1447
 
1448
- if (!((result.errCode === 30 || result.errcode === 30) && !noRedirect)) {
1448
+ if (!((result.errCode === 30 || result.errCode === 30) && !noRedirect)) {
1449
1449
  _context.next = 6;
1450
1450
  break;
1451
1451
  }
@@ -1455,9 +1455,10 @@ function _request() {
1455
1455
  })));
1456
1456
 
1457
1457
  case 6:
1458
+
1458
1459
  return _context.abrupt("return", result);
1459
1460
 
1460
- case 7:
1461
+ case 8:
1461
1462
  case "end":
1462
1463
  return _context.stop();
1463
1464
  }