@freelog/tools-lib 0.1.143 → 0.1.145
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 +18 -0
- package/dist/tools-lib.cjs.development.js +74 -54
- 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 +74 -54
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +2 -1
- package/package.json +2 -2
- package/src/i18n/I18nNext.ts +2 -1
- package/src/service-API/contracts.ts +36 -0
- package/src/service-API/resources.ts +533 -533
- package/src/service-API/storages.ts +21 -21
- package/src/utils/axios.ts +51 -55
- package/src/utils/linkTo.ts +3 -1
package/dist/utils/linkTo.d.ts
CHANGED
|
@@ -121,8 +121,9 @@ interface LoginParamsType {
|
|
|
121
121
|
export declare function login({ goTo }?: LoginParamsType): string;
|
|
122
122
|
interface LoginParamsType {
|
|
123
123
|
goTo?: string;
|
|
124
|
+
invitationCode?: string;
|
|
124
125
|
}
|
|
125
|
-
export declare function logon({ goTo }?: LoginParamsType): string;
|
|
126
|
+
export declare function logon({ goTo, ...params }?: LoginParamsType): string;
|
|
126
127
|
interface RetrieveUserPasswordParamsType {
|
|
127
128
|
goTo?: string;
|
|
128
129
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@freelog/tools-lib",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.145",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"prepare": "tsdx build",
|
|
20
20
|
"size": "size-limit",
|
|
21
21
|
"analyze": "size-limit --why",
|
|
22
|
-
"publish": "npm publish --access
|
|
22
|
+
"publish": "npm publish --access=public"
|
|
23
23
|
},
|
|
24
24
|
"husky": {
|
|
25
25
|
"hooks": {}
|
package/src/i18n/I18nNext.ts
CHANGED
|
@@ -117,7 +117,8 @@ class I18nNext {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
private async _fetchData(this: I18nNext): Promise<Resource> {
|
|
120
|
-
const
|
|
120
|
+
const url: string = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
|
|
121
|
+
const res: any = await axios.get(url + '?timestamp=' + Date.now(), {
|
|
121
122
|
withCredentials: false,
|
|
122
123
|
});
|
|
123
124
|
// console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
import FUtil from '../utils';
|
|
2
2
|
|
|
3
|
+
// 创建合同
|
|
4
|
+
interface CreateContractParamsType {
|
|
5
|
+
subjectId: string;
|
|
6
|
+
subjectType: 1 | 2 | 3; // 标的物类型 1:资源 2:展品 3:用户组
|
|
7
|
+
policyId: string;
|
|
8
|
+
licenseeId: string | number;
|
|
9
|
+
licenseeIdentityType: 1 | 2 | 3; // 乙方身份类型 1:资源方 2:节点方 3:C端用户
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function createContract({...params}: CreateContractParamsType) {
|
|
13
|
+
return FUtil.Request({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: `/v2/contracts`,
|
|
16
|
+
data: params,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 批量创建合同
|
|
21
|
+
interface BatchCreateContractsParamsType {
|
|
22
|
+
subjects: {
|
|
23
|
+
subjectId: string;
|
|
24
|
+
policyId: string;
|
|
25
|
+
}[];
|
|
26
|
+
subjectType: 1 | 2 | 3; // 标的物类型 1:资源 2:展品 3:用户组
|
|
27
|
+
licenseeId: string | number;
|
|
28
|
+
licenseeIdentityType: 1 | 2 | 3; // 乙方身份类型 1:资源方 2:节点方 3:C端用户
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function batchCreateContracts({...params}: BatchCreateContractsParamsType) {
|
|
32
|
+
return FUtil.Request({
|
|
33
|
+
method: 'POST',
|
|
34
|
+
url: `/v2/contracts/batchSign`,
|
|
35
|
+
data: params,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
3
39
|
// 查看合同详情
|
|
4
40
|
interface ContractDetailsParamsType {
|
|
5
41
|
contractId: string;
|