@freelog/tools-lib 0.1.158 → 0.1.160
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/contracts.d.ts +10 -0
- package/dist/service-API/resources.d.ts +65 -0
- package/dist/service-API/storages.d.ts +10 -0
- package/dist/tools-lib.cjs.development.js +184 -118
- 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 +184 -118
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +10 -1
- package/package.json +67 -67
- package/src/service-API/contracts.ts +20 -1
- package/src/service-API/resources.ts +746 -645
- package/src/service-API/storages.ts +391 -362
- package/src/utils/linkTo.ts +23 -2
package/dist/utils/linkTo.d.ts
CHANGED
|
@@ -29,7 +29,13 @@ interface ResourceDetailsParamsType {
|
|
|
29
29
|
export declare function resourceDetails({ resourceID, ...params }: ResourceDetailsParamsType): TReturnType;
|
|
30
30
|
interface ResourceCreatorParamsType {
|
|
31
31
|
}
|
|
32
|
+
export declare function resourceCreatorEntry({}?: ResourceCreatorParamsType): TReturnType;
|
|
33
|
+
interface ResourceCreatorParamsType {
|
|
34
|
+
}
|
|
32
35
|
export declare function resourceCreator({}?: ResourceCreatorParamsType): TReturnType;
|
|
36
|
+
interface ResourceCreatorParamsType {
|
|
37
|
+
}
|
|
38
|
+
export declare function resourceCreatorBatch({}?: ResourceCreatorParamsType): TReturnType;
|
|
33
39
|
interface MyResourcesParamsType {
|
|
34
40
|
}
|
|
35
41
|
export declare function myResources({}?: MyResourcesParamsType): TReturnType;
|
|
@@ -166,8 +172,11 @@ interface RewardParamsType {
|
|
|
166
172
|
}
|
|
167
173
|
export declare function reward({}?: RewardParamsType): string;
|
|
168
174
|
interface ContractParamsType {
|
|
175
|
+
identityType?: 1 | 2;
|
|
176
|
+
licensorName?: string;
|
|
177
|
+
licenseeName?: string;
|
|
169
178
|
}
|
|
170
|
-
export declare function contract({}?: ContractParamsType): string;
|
|
179
|
+
export declare function contract({ ...params }?: ContractParamsType): string;
|
|
171
180
|
interface SettingParamsType {
|
|
172
181
|
}
|
|
173
182
|
export declare function setting({}?: SettingParamsType): string;
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@freelog/tools-lib",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"typings": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"src"
|
|
10
|
-
],
|
|
11
|
-
"engines": {
|
|
12
|
-
"node": ">=10"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"start": "tsdx watch",
|
|
16
|
-
"build": "tsdx build",
|
|
17
|
-
"test": "tsdx test",
|
|
18
|
-
"lint": "tsdx lint",
|
|
19
|
-
"prepare": "tsdx build",
|
|
20
|
-
"size": "size-limit",
|
|
21
|
-
"analyze": "size-limit --why",
|
|
22
|
-
"publish": "npm publish --access=public"
|
|
23
|
-
},
|
|
24
|
-
"husky": {
|
|
25
|
-
"hooks": {}
|
|
26
|
-
},
|
|
27
|
-
"prettier": {
|
|
28
|
-
"printWidth": 80,
|
|
29
|
-
"semi": true,
|
|
30
|
-
"singleQuote": true,
|
|
31
|
-
"trailingComma": "es5"
|
|
32
|
-
},
|
|
33
|
-
"author": "liu-kai-github",
|
|
34
|
-
"module": "dist/tools-lib.esm.js",
|
|
35
|
-
"size-limit": [
|
|
36
|
-
{
|
|
37
|
-
"path": "dist/tools-lib.cjs.production.min.js",
|
|
38
|
-
"limit": "10 KB"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"path": "dist/tools-lib.esm.js",
|
|
42
|
-
"limit": "10 KB"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@size-limit/preset-small-lib": "^4.11.0",
|
|
47
|
-
"@types/js-cookie": "^3.0.2",
|
|
48
|
-
"@types/node": "^18.7.16",
|
|
49
|
-
"@types/nprogress": "^0.2.0",
|
|
50
|
-
"@types/react": "^18.2.17",
|
|
51
|
-
"husky": "^6.0.0",
|
|
52
|
-
"size-limit": "^4.11.0",
|
|
53
|
-
"tsdx": "^0.14.1",
|
|
54
|
-
"tslib": "^2.2.0",
|
|
55
|
-
"typescript": "^4.7.4"
|
|
56
|
-
},
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@freelog/resource-policy-lang": "1.1.26",
|
|
59
|
-
"axios": "^0.21.1",
|
|
60
|
-
"html-react-parser": "^4.2.0",
|
|
61
|
-
"i18next": "^21.8.10",
|
|
62
|
-
"js-cookie": "^3.0.1",
|
|
63
|
-
"moment": "^2.29.1",
|
|
64
|
-
"nprogress": "^0.2.0",
|
|
65
|
-
"react": "^18.2.0"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@freelog/tools-lib",
|
|
3
|
+
"version": "0.1.160",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"typings": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"src"
|
|
10
|
+
],
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=10"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"start": "tsdx watch",
|
|
16
|
+
"build": "tsdx build",
|
|
17
|
+
"test": "tsdx test",
|
|
18
|
+
"lint": "tsdx lint",
|
|
19
|
+
"prepare": "tsdx build",
|
|
20
|
+
"size": "size-limit",
|
|
21
|
+
"analyze": "size-limit --why",
|
|
22
|
+
"publish": "npm publish --access=public"
|
|
23
|
+
},
|
|
24
|
+
"husky": {
|
|
25
|
+
"hooks": {}
|
|
26
|
+
},
|
|
27
|
+
"prettier": {
|
|
28
|
+
"printWidth": 80,
|
|
29
|
+
"semi": true,
|
|
30
|
+
"singleQuote": true,
|
|
31
|
+
"trailingComma": "es5"
|
|
32
|
+
},
|
|
33
|
+
"author": "liu-kai-github",
|
|
34
|
+
"module": "dist/tools-lib.esm.js",
|
|
35
|
+
"size-limit": [
|
|
36
|
+
{
|
|
37
|
+
"path": "dist/tools-lib.cjs.production.min.js",
|
|
38
|
+
"limit": "10 KB"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "dist/tools-lib.esm.js",
|
|
42
|
+
"limit": "10 KB"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@size-limit/preset-small-lib": "^4.11.0",
|
|
47
|
+
"@types/js-cookie": "^3.0.2",
|
|
48
|
+
"@types/node": "^18.7.16",
|
|
49
|
+
"@types/nprogress": "^0.2.0",
|
|
50
|
+
"@types/react": "^18.2.17",
|
|
51
|
+
"husky": "^6.0.0",
|
|
52
|
+
"size-limit": "^4.11.0",
|
|
53
|
+
"tsdx": "^0.14.1",
|
|
54
|
+
"tslib": "^2.2.0",
|
|
55
|
+
"typescript": "^4.7.4"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@freelog/resource-policy-lang": "1.1.26",
|
|
59
|
+
"axios": "^0.21.1",
|
|
60
|
+
"html-react-parser": "^4.2.0",
|
|
61
|
+
"i18next": "^21.8.10",
|
|
62
|
+
"js-cookie": "^3.0.1",
|
|
63
|
+
"moment": "^2.29.1",
|
|
64
|
+
"nprogress": "^0.2.0",
|
|
65
|
+
"react": "^18.2.0"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -52,13 +52,15 @@ export function contractDetails({contractId, ...params}: ContractDetailsParamsTy
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// 查看合同分页列表
|
|
56
56
|
interface ContractsParamsType {
|
|
57
57
|
skip?: number;
|
|
58
58
|
limit?: number;
|
|
59
59
|
identityType: 1 | 2;
|
|
60
60
|
licensorId?: string;
|
|
61
|
+
licensorName?: string;
|
|
61
62
|
licenseeId?: string;
|
|
63
|
+
licenseeName?: string;
|
|
62
64
|
subjectIds?: string;
|
|
63
65
|
subjectType?: 1 | 2 | 3;
|
|
64
66
|
isDefault?: number;
|
|
@@ -82,6 +84,23 @@ export function contracts(params: ContractsParamsType) {
|
|
|
82
84
|
});
|
|
83
85
|
}
|
|
84
86
|
|
|
87
|
+
// 查询合约授权方搜索建议
|
|
88
|
+
interface KeywordSuggestParamsType {
|
|
89
|
+
identityType: 1 | 2;
|
|
90
|
+
prefix: string;
|
|
91
|
+
prefixType: 1 | 2;
|
|
92
|
+
startDate?: string;
|
|
93
|
+
endDate?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function keywordSuggest(params: KeywordSuggestParamsType) {
|
|
97
|
+
return FUtil.Request({
|
|
98
|
+
method: 'GET',
|
|
99
|
+
url: `/v2/contracts/keywordSuggest`,
|
|
100
|
+
params: params,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
85
104
|
// 批量查询合同列表
|
|
86
105
|
interface BatchContractsParamsType {
|
|
87
106
|
contractIds?: string;
|