@freelog/tools-lib 0.1.132 → 0.1.133
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/LICENSE +20 -20
- package/README.md +103 -103
- package/dist/service-API/policies.d.ts +1 -1
- package/dist/service-API/recombinations/index.d.ts +4 -1
- package/dist/tools-lib.cjs.development.js +214 -197
- 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 +214 -197
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/format.d.ts +0 -4
- package/package.json +1 -1
- package/src/i18n/I18nNext.ts +154 -154
- package/src/i18n/index.ts +7 -7
- package/src/index.ts +9 -9
- package/src/service-API/activities.ts +231 -231
- package/src/service-API/captcha.ts +30 -30
- package/src/service-API/collections.ts +81 -81
- package/src/service-API/contracts.ts +101 -101
- package/src/service-API/events.ts +18 -18
- package/src/service-API/i18n.ts +35 -35
- package/src/service-API/index.ts +39 -39
- package/src/service-API/informalNodes.ts +238 -238
- package/src/service-API/nodes.ts +65 -65
- package/src/service-API/policies.ts +75 -72
- package/src/service-API/presentables.ts +287 -287
- package/src/service-API/recombinations/index.ts +92 -69
- package/src/service-API/resources.ts +532 -532
- package/src/service-API/statistics.ts +20 -20
- package/src/service-API/storages.ts +358 -358
- package/src/service-API/testQualifications.ts +109 -109
- package/src/service-API/tools/index.ts +10 -10
- package/src/service-API/transactions.ts +109 -109
- package/src/service-API/user.ts +270 -270
- package/src/utils/axios.ts +145 -145
- package/src/utils/format.ts +98 -98
- package/src/utils/index.ts +20 -20
- package/src/utils/linkTo.ts +399 -399
- package/src/utils/predefined.ts +37 -37
- package/src/utils/regexp.ts +52 -52
- package/src/utils/tools.ts +85 -85
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 查看合同详情
|
|
4
|
-
interface ContractDetailsParamsType {
|
|
5
|
-
contractId: string;
|
|
6
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
7
|
-
projection?: string;
|
|
8
|
-
isTranslate?: 0 | 1;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function contractDetails({contractId, ...params}: ContractDetailsParamsType) {
|
|
12
|
-
return FUtil.Request({
|
|
13
|
-
method: 'GET',
|
|
14
|
-
url: `/v2/contracts/${contractId}`,
|
|
15
|
-
params: params,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 查询合同分页列表
|
|
20
|
-
interface ContractsParamsType {
|
|
21
|
-
skip?: number;
|
|
22
|
-
limit?: number;
|
|
23
|
-
identityType: 1 | 2;
|
|
24
|
-
licensorId?: string;
|
|
25
|
-
licenseeId?: string;
|
|
26
|
-
subjectIds?: string;
|
|
27
|
-
subjectType?: 1 | 2 | 3;
|
|
28
|
-
isDefault?: number;
|
|
29
|
-
keywords?: string;
|
|
30
|
-
status?: 0 | 1 | 2; // 合同状态 0:生效中 1:已终止 2:异常的
|
|
31
|
-
authStatus?: 1 | 2 | 128; // 合同授权状态 1:正式授权 2:测试授权 128:未获得授权,多个通过'与'运算
|
|
32
|
-
order?: 'asc' | 'desc'; // asc:正序 desc:倒序
|
|
33
|
-
licenseeIdentityType?: number;
|
|
34
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
35
|
-
isTranslate?: 0 | 1;
|
|
36
|
-
startDate?: string;
|
|
37
|
-
endDate?: string;
|
|
38
|
-
projection?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function contracts(params: ContractsParamsType) {
|
|
42
|
-
return FUtil.Request({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
url: `/v2/contracts`,
|
|
45
|
-
params: params,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// 批量查询合同列表
|
|
50
|
-
interface BatchContractsParamsType {
|
|
51
|
-
contractIds?: string;
|
|
52
|
-
subjectIds?: string;
|
|
53
|
-
subjectType?: 1 | 2 | 3;
|
|
54
|
-
licenseeIdentityType?: 1 | 2 | 3;
|
|
55
|
-
licensorId?: string;
|
|
56
|
-
licenseeId?: string | number;
|
|
57
|
-
isLoadPolicyInfo?: 0 | 1;
|
|
58
|
-
projection?: string;
|
|
59
|
-
isTranslate?: 0 | 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function batchContracts(params: BatchContractsParamsType) {
|
|
63
|
-
return FUtil.Request({
|
|
64
|
-
method: 'GET',
|
|
65
|
-
url: `/v2/contracts/list`,
|
|
66
|
-
params: params,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// 查看合同流转记录分页列表
|
|
71
|
-
interface TransitionRecordsParamsType {
|
|
72
|
-
contractId: string;
|
|
73
|
-
skip?: number;
|
|
74
|
-
limit?: number;
|
|
75
|
-
isTranslate?: 0 | 1;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export function transitionRecords({contractId, ...params}: TransitionRecordsParamsType) {
|
|
79
|
-
return FUtil.Request({
|
|
80
|
-
method: 'GET',
|
|
81
|
-
url: `/v2/contracts/${contractId}/transitionRecords`,
|
|
82
|
-
params: params,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// 统计合约签约量
|
|
87
|
-
interface ContractsSignCountParamsType {
|
|
88
|
-
objectIds: string | number;
|
|
89
|
-
objectType: 1 | 2 | 3 | 4 | 5; // 统计对象类型(1:甲方ID 2:甲方所属ID 3:乙方ID 4:乙方所属ID 5:标的物ID)
|
|
90
|
-
subjectType: 1 | 2 | 3; // 标的物类型(1:资源 2:展品 3:用户组)
|
|
91
|
-
startDate?: string;
|
|
92
|
-
endDate?: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export function contractsSignCount(params: ContractsSignCountParamsType) {
|
|
96
|
-
return FUtil.Request({
|
|
97
|
-
method: 'GET',
|
|
98
|
-
url: `/v2/contracts/signCount`,
|
|
99
|
-
params: params,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 查看合同详情
|
|
4
|
+
interface ContractDetailsParamsType {
|
|
5
|
+
contractId: string;
|
|
6
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
7
|
+
projection?: string;
|
|
8
|
+
isTranslate?: 0 | 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function contractDetails({contractId, ...params}: ContractDetailsParamsType) {
|
|
12
|
+
return FUtil.Request({
|
|
13
|
+
method: 'GET',
|
|
14
|
+
url: `/v2/contracts/${contractId}`,
|
|
15
|
+
params: params,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 查询合同分页列表
|
|
20
|
+
interface ContractsParamsType {
|
|
21
|
+
skip?: number;
|
|
22
|
+
limit?: number;
|
|
23
|
+
identityType: 1 | 2;
|
|
24
|
+
licensorId?: string;
|
|
25
|
+
licenseeId?: string;
|
|
26
|
+
subjectIds?: string;
|
|
27
|
+
subjectType?: 1 | 2 | 3;
|
|
28
|
+
isDefault?: number;
|
|
29
|
+
keywords?: string;
|
|
30
|
+
status?: 0 | 1 | 2; // 合同状态 0:生效中 1:已终止 2:异常的
|
|
31
|
+
authStatus?: 1 | 2 | 128; // 合同授权状态 1:正式授权 2:测试授权 128:未获得授权,多个通过'与'运算
|
|
32
|
+
order?: 'asc' | 'desc'; // asc:正序 desc:倒序
|
|
33
|
+
licenseeIdentityType?: number;
|
|
34
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
35
|
+
isTranslate?: 0 | 1;
|
|
36
|
+
startDate?: string;
|
|
37
|
+
endDate?: string;
|
|
38
|
+
projection?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function contracts(params: ContractsParamsType) {
|
|
42
|
+
return FUtil.Request({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
url: `/v2/contracts`,
|
|
45
|
+
params: params,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 批量查询合同列表
|
|
50
|
+
interface BatchContractsParamsType {
|
|
51
|
+
contractIds?: string;
|
|
52
|
+
subjectIds?: string;
|
|
53
|
+
subjectType?: 1 | 2 | 3;
|
|
54
|
+
licenseeIdentityType?: 1 | 2 | 3;
|
|
55
|
+
licensorId?: string;
|
|
56
|
+
licenseeId?: string | number;
|
|
57
|
+
isLoadPolicyInfo?: 0 | 1;
|
|
58
|
+
projection?: string;
|
|
59
|
+
isTranslate?: 0 | 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function batchContracts(params: BatchContractsParamsType) {
|
|
63
|
+
return FUtil.Request({
|
|
64
|
+
method: 'GET',
|
|
65
|
+
url: `/v2/contracts/list`,
|
|
66
|
+
params: params,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 查看合同流转记录分页列表
|
|
71
|
+
interface TransitionRecordsParamsType {
|
|
72
|
+
contractId: string;
|
|
73
|
+
skip?: number;
|
|
74
|
+
limit?: number;
|
|
75
|
+
isTranslate?: 0 | 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function transitionRecords({contractId, ...params}: TransitionRecordsParamsType) {
|
|
79
|
+
return FUtil.Request({
|
|
80
|
+
method: 'GET',
|
|
81
|
+
url: `/v2/contracts/${contractId}/transitionRecords`,
|
|
82
|
+
params: params,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 统计合约签约量
|
|
87
|
+
interface ContractsSignCountParamsType {
|
|
88
|
+
objectIds: string | number;
|
|
89
|
+
objectType: 1 | 2 | 3 | 4 | 5; // 统计对象类型(1:甲方ID 2:甲方所属ID 3:乙方ID 4:乙方所属ID 5:标的物ID)
|
|
90
|
+
subjectType: 1 | 2 | 3; // 标的物类型(1:资源 2:展品 3:用户组)
|
|
91
|
+
startDate?: string;
|
|
92
|
+
endDate?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function contractsSignCount(params: ContractsSignCountParamsType) {
|
|
96
|
+
return FUtil.Request({
|
|
97
|
+
method: 'GET',
|
|
98
|
+
url: `/v2/contracts/signCount`,
|
|
99
|
+
params: params,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 批量获取授权策略列表
|
|
4
|
-
interface TransactionParamsType {
|
|
5
|
-
contractId: string;
|
|
6
|
-
eventId: string;
|
|
7
|
-
accountId: string;
|
|
8
|
-
transactionAmount: number;
|
|
9
|
-
password: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function transaction({contractId, ...params}: TransactionParamsType) {
|
|
13
|
-
return FUtil.Request({
|
|
14
|
-
method: 'POST',
|
|
15
|
-
url: `/v2/contracts/${contractId}/events/payment`,
|
|
16
|
-
data: params,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 批量获取授权策略列表
|
|
4
|
+
interface TransactionParamsType {
|
|
5
|
+
contractId: string;
|
|
6
|
+
eventId: string;
|
|
7
|
+
accountId: string;
|
|
8
|
+
transactionAmount: number;
|
|
9
|
+
password: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function transaction({contractId, ...params}: TransactionParamsType) {
|
|
13
|
+
return FUtil.Request({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: `/v2/contracts/${contractId}/events/payment`,
|
|
16
|
+
data: params,
|
|
17
|
+
});
|
|
18
|
+
}
|
package/src/service-API/i18n.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import FUtil from '../utils';
|
|
2
|
-
|
|
3
|
-
// 列出翻译
|
|
4
|
-
interface ConfigsListParamsType {
|
|
5
|
-
key: string;
|
|
6
|
-
content: string;
|
|
7
|
-
tagIds: string[];
|
|
8
|
-
status: 0 | 1 | 2 | 3; // 0:全部 1:待翻译 2:待发布 3:已发布
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function configsList(params: ConfigsListParamsType) {
|
|
12
|
-
// console.log('####@30984i2o3jdsjflfkjsdl')
|
|
13
|
-
return FUtil.Request({
|
|
14
|
-
method: 'POST',
|
|
15
|
-
url: `/v2/i18n/configs/list`,
|
|
16
|
-
data: params,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// oss保存的翻译
|
|
21
|
-
// interface ConfigsListParamsType {
|
|
22
|
-
// key: string;
|
|
23
|
-
// content: string;
|
|
24
|
-
// tagIds: string[];
|
|
25
|
-
// status: 0 | 1 | 2 | 3; // 0:全部 1:待翻译 2:待发布 3:已发布
|
|
26
|
-
// }
|
|
27
|
-
//
|
|
28
|
-
// export function configsList(params: ConfigsListParamsType) {
|
|
29
|
-
// // console.log('####@30984i2o3jdsjflfkjsdl')
|
|
30
|
-
// return FUtil.Request({
|
|
31
|
-
// method: 'POST',
|
|
32
|
-
// url: `/v2/i18n/configs/list`,
|
|
33
|
-
// data: params,
|
|
34
|
-
// });
|
|
35
|
-
// }
|
|
1
|
+
import FUtil from '../utils';
|
|
2
|
+
|
|
3
|
+
// 列出翻译
|
|
4
|
+
interface ConfigsListParamsType {
|
|
5
|
+
key: string;
|
|
6
|
+
content: string;
|
|
7
|
+
tagIds: string[];
|
|
8
|
+
status: 0 | 1 | 2 | 3; // 0:全部 1:待翻译 2:待发布 3:已发布
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function configsList(params: ConfigsListParamsType) {
|
|
12
|
+
// console.log('####@30984i2o3jdsjflfkjsdl')
|
|
13
|
+
return FUtil.Request({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: `/v2/i18n/configs/list`,
|
|
16
|
+
data: params,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// oss保存的翻译
|
|
21
|
+
// interface ConfigsListParamsType {
|
|
22
|
+
// key: string;
|
|
23
|
+
// content: string;
|
|
24
|
+
// tagIds: string[];
|
|
25
|
+
// status: 0 | 1 | 2 | 3; // 0:全部 1:待翻译 2:待发布 3:已发布
|
|
26
|
+
// }
|
|
27
|
+
//
|
|
28
|
+
// export function configsList(params: ConfigsListParamsType) {
|
|
29
|
+
// // console.log('####@30984i2o3jdsjflfkjsdl')
|
|
30
|
+
// return FUtil.Request({
|
|
31
|
+
// method: 'POST',
|
|
32
|
+
// url: `/v2/i18n/configs/list`,
|
|
33
|
+
// data: params,
|
|
34
|
+
// });
|
|
35
|
+
// }
|
package/src/service-API/index.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import * as Node from './nodes';
|
|
2
|
-
import * as Exhibit from './presentables';
|
|
3
|
-
import * as Storage from './storages';
|
|
4
|
-
import * as Collection from './collections';
|
|
5
|
-
import * as Resource from './resources';
|
|
6
|
-
import * as User from './user';
|
|
7
|
-
import * as InformalNode from './informalNodes';
|
|
8
|
-
import * as Contract from './contracts';
|
|
9
|
-
import * as Transaction from './transactions';
|
|
10
|
-
import * as Captcha from './captcha';
|
|
11
|
-
import * as Event from './events';
|
|
12
|
-
import * as Activity from './activities';
|
|
13
|
-
import * as TestQualification from './testQualifications';
|
|
14
|
-
import * as Statistic from './statistics';
|
|
15
|
-
import * as I18n from './i18n';
|
|
16
|
-
import * as Policy from './policies';
|
|
17
|
-
import * as recombination from './recombinations';
|
|
18
|
-
|
|
19
|
-
const FServiceAPI = {
|
|
20
|
-
Node,
|
|
21
|
-
Exhibit,
|
|
22
|
-
Storage,
|
|
23
|
-
Collection,
|
|
24
|
-
Resource,
|
|
25
|
-
User,
|
|
26
|
-
InformalNode,
|
|
27
|
-
Contract,
|
|
28
|
-
Transaction,
|
|
29
|
-
Captcha,
|
|
30
|
-
Event,
|
|
31
|
-
Activity,
|
|
32
|
-
TestQualification,
|
|
33
|
-
Statistic,
|
|
34
|
-
I18n,
|
|
35
|
-
Policy,
|
|
36
|
-
recombination,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default FServiceAPI;
|
|
1
|
+
import * as Node from './nodes';
|
|
2
|
+
import * as Exhibit from './presentables';
|
|
3
|
+
import * as Storage from './storages';
|
|
4
|
+
import * as Collection from './collections';
|
|
5
|
+
import * as Resource from './resources';
|
|
6
|
+
import * as User from './user';
|
|
7
|
+
import * as InformalNode from './informalNodes';
|
|
8
|
+
import * as Contract from './contracts';
|
|
9
|
+
import * as Transaction from './transactions';
|
|
10
|
+
import * as Captcha from './captcha';
|
|
11
|
+
import * as Event from './events';
|
|
12
|
+
import * as Activity from './activities';
|
|
13
|
+
import * as TestQualification from './testQualifications';
|
|
14
|
+
import * as Statistic from './statistics';
|
|
15
|
+
import * as I18n from './i18n';
|
|
16
|
+
import * as Policy from './policies';
|
|
17
|
+
import * as recombination from './recombinations';
|
|
18
|
+
|
|
19
|
+
const FServiceAPI = {
|
|
20
|
+
Node,
|
|
21
|
+
Exhibit,
|
|
22
|
+
Storage,
|
|
23
|
+
Collection,
|
|
24
|
+
Resource,
|
|
25
|
+
User,
|
|
26
|
+
InformalNode,
|
|
27
|
+
Contract,
|
|
28
|
+
Transaction,
|
|
29
|
+
Captcha,
|
|
30
|
+
Event,
|
|
31
|
+
Activity,
|
|
32
|
+
TestQualification,
|
|
33
|
+
Statistic,
|
|
34
|
+
I18n,
|
|
35
|
+
Policy,
|
|
36
|
+
recombination,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default FServiceAPI;
|