@freelog/tools-lib 0.1.194 → 0.1.196
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/payment.d.ts +14 -0
- package/dist/service-API/policies.d.ts +2 -0
- package/dist/tools-lib.cjs.development.js +53 -26
- 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 +53 -26
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +12 -4
- package/package.json +1 -1
- package/src/service-API/payment.ts +35 -1
- package/src/service-API/policies.ts +95 -93
- package/src/utils/linkTo.ts +26 -7
package/dist/utils/linkTo.d.ts
CHANGED
|
@@ -209,14 +209,22 @@ interface GlobalSearchParamsType {
|
|
|
209
209
|
search: string;
|
|
210
210
|
}
|
|
211
211
|
export declare function globalSearch({ search }: GlobalSearchParamsType): string;
|
|
212
|
-
interface
|
|
212
|
+
interface SettlementInfoCreatorParamsType {
|
|
213
213
|
nodeID?: number;
|
|
214
214
|
}
|
|
215
|
-
export declare function
|
|
215
|
+
export declare function settlementInfoCreator({ nodeID }: SettlementInfoCreatorParamsType): string;
|
|
216
|
+
interface SettlementInfoParamsType {
|
|
217
|
+
accountID: string;
|
|
218
|
+
}
|
|
219
|
+
export declare function settlementInfo({ accountID }: SettlementInfoParamsType): string;
|
|
216
220
|
interface SettlementInfoEditorParamsType {
|
|
217
|
-
|
|
221
|
+
accountID: string;
|
|
222
|
+
}
|
|
223
|
+
export declare function settlementInfoEditor({ accountID }: SettlementInfoEditorParamsType): string;
|
|
224
|
+
interface SettlementBankCardEditorParamsType {
|
|
225
|
+
accountID: string;
|
|
218
226
|
}
|
|
219
|
-
export declare function
|
|
227
|
+
export declare function settlementBankCardEditor({ accountID }: SettlementBankCardEditorParamsType): string;
|
|
220
228
|
/************** console End ******************************************************/
|
|
221
229
|
/************** user Start ******************************************************/
|
|
222
230
|
interface LoginParamsType {
|
package/package.json
CHANGED
|
@@ -45,6 +45,27 @@ export function openFinancialAccount(params: OpenFinancialAccountParamsType, con
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
|
|
49
|
+
// 修改金融账户信息
|
|
50
|
+
interface UpdateFinancialAccountParamsType {
|
|
51
|
+
accountId: string; // 金融账户ID
|
|
52
|
+
certNo: string; // 证件号码;例如身份证号
|
|
53
|
+
name: string; // 证件上的名称;例如身份证上的姓名
|
|
54
|
+
certValidityType: 1 | 2; // 证件有效期是否是长期; 0:非长期有效 1:长期有效
|
|
55
|
+
certBeginDate: string; // 证件有效期开始日期
|
|
56
|
+
certEndDate?: string; // 证件有效期结束日期(长期有效时此处不传)
|
|
57
|
+
certImagePaths: string[]; // 证件照保密存放的path部分; 身份证号码识别接口会返回
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function updateFinancialAccount({accountId, ...params}: UpdateFinancialAccountParamsType, config?: AxiosRequestConfig) {
|
|
61
|
+
return FUtil.Request({
|
|
62
|
+
method: 'PUT',
|
|
63
|
+
url: `/v3/transactions/accounts/${accountId}`,
|
|
64
|
+
data: params,
|
|
65
|
+
...config,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
48
69
|
// 金融账户绑定提现卡
|
|
49
70
|
interface BindWithdrawCardParamsType {
|
|
50
71
|
accountId: string; // 金融账户ID
|
|
@@ -66,7 +87,7 @@ export function bindWithdrawCard({accountId, ...params}: BindWithdrawCardParamsT
|
|
|
66
87
|
});
|
|
67
88
|
}
|
|
68
89
|
|
|
69
|
-
//
|
|
90
|
+
// 金融登账户信息查询
|
|
70
91
|
interface QueryFinancialAccountInfoParamsType {
|
|
71
92
|
accountType: 1 | 2; // 账户类型(1:个人账户 2:节点账户)
|
|
72
93
|
ownerId: number; // 账户所有者ID; 根据账户类型动态赋值userId或nodeId
|
|
@@ -81,6 +102,19 @@ export function queryFinancialAccountInfo(params: QueryFinancialAccountInfoParam
|
|
|
81
102
|
});
|
|
82
103
|
}
|
|
83
104
|
|
|
105
|
+
interface QueryFinancialAccountInfo2ParamsType {
|
|
106
|
+
accountId: string; // 账户ID
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function queryFinancialAccountInfo2({accountId}: QueryFinancialAccountInfo2ParamsType, config?: AxiosRequestConfig) {
|
|
110
|
+
return FUtil.Request({
|
|
111
|
+
method: 'GET',
|
|
112
|
+
url: `/v3/transactions/accounts/${accountId}`,
|
|
113
|
+
// params: { accountId },
|
|
114
|
+
...config,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
84
118
|
// 查询绑定提现卡
|
|
85
119
|
interface QueryBindWithdrawCardParamsType {
|
|
86
120
|
accountId: string; // 金融账户ID
|
|
@@ -1,93 +1,95 @@
|
|
|
1
|
-
// import {Base64} from 'js-base64';
|
|
2
|
-
import FUtil from '../utils';
|
|
3
|
-
|
|
4
|
-
// 批量获取授权策略列表
|
|
5
|
-
interface PoliciesParamsType {
|
|
6
|
-
page?: number;
|
|
7
|
-
pageSize?: number;
|
|
8
|
-
subjectType?: 1 | 2 | 3; // 1:资源 2:展品 3:用户组
|
|
9
|
-
projection?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function policies(params: PoliciesParamsType) {
|
|
13
|
-
return FUtil.Request({
|
|
14
|
-
method: 'GET',
|
|
15
|
-
url: `/v2/policies`,
|
|
16
|
-
params: params,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// 批量获取授权策略列表
|
|
21
|
-
interface PoliciesListParamsType {
|
|
22
|
-
policyIds: string;
|
|
23
|
-
subjectType?: number;
|
|
24
|
-
userId?: number;
|
|
25
|
-
projection?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function policiesList(params: PoliciesListParamsType) {
|
|
29
|
-
return FUtil.Request({
|
|
30
|
-
method: 'GET',
|
|
31
|
-
url: `/v2/policies/list`,
|
|
32
|
-
params: params,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// 策略模板
|
|
37
|
-
interface PolicyTemplatesParamsType {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
// import {Base64} from 'js-base64';
|
|
2
|
+
import FUtil from '../utils';
|
|
3
|
+
|
|
4
|
+
// 批量获取授权策略列表
|
|
5
|
+
interface PoliciesParamsType {
|
|
6
|
+
page?: number;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
subjectType?: 1 | 2 | 3; // 1:资源 2:展品 3:用户组
|
|
9
|
+
projection?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function policies(params: PoliciesParamsType) {
|
|
13
|
+
return FUtil.Request({
|
|
14
|
+
method: 'GET',
|
|
15
|
+
url: `/v2/policies`,
|
|
16
|
+
params: params,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// 批量获取授权策略列表
|
|
21
|
+
interface PoliciesListParamsType {
|
|
22
|
+
policyIds: string;
|
|
23
|
+
subjectType?: number;
|
|
24
|
+
userId?: number;
|
|
25
|
+
projection?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function policiesList(params: PoliciesListParamsType) {
|
|
29
|
+
return FUtil.Request({
|
|
30
|
+
method: 'GET',
|
|
31
|
+
url: `/v2/policies/list`,
|
|
32
|
+
params: params,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 策略模板
|
|
37
|
+
interface PolicyTemplatesParamsType {
|
|
38
|
+
resourceTypeCodes4Resource?: string[];
|
|
39
|
+
resourceTypeCodes4Presentable?: string[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function policyTemplates(params: PolicyTemplatesParamsType = {}) {
|
|
43
|
+
return FUtil.Request({
|
|
44
|
+
method: 'POST',
|
|
45
|
+
url: `/v2/translate/translate-config/list4Client`,
|
|
46
|
+
data: params,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 重新编译
|
|
51
|
+
interface PolicyReCompileParamsType {
|
|
52
|
+
_id?: string;
|
|
53
|
+
contract?: string;
|
|
54
|
+
fillArgs: {
|
|
55
|
+
name: string;
|
|
56
|
+
value: string | number;
|
|
57
|
+
}[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function policyReCompile(data: PolicyReCompileParamsType) {
|
|
61
|
+
return FUtil.Request({
|
|
62
|
+
method: 'POST',
|
|
63
|
+
url: `/v2/translate/reCompile`,
|
|
64
|
+
data: data,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 模板策略翻译
|
|
69
|
+
interface PolicyTranslationParamsType {
|
|
70
|
+
contract: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function policyTranslation({contract}: PolicyTranslationParamsType) {
|
|
74
|
+
return FUtil.Request({
|
|
75
|
+
method: 'POST',
|
|
76
|
+
url: `/v2/translate/translate`,
|
|
77
|
+
data: {
|
|
78
|
+
contract: contract,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 模板策略翻译
|
|
84
|
+
interface PolicyTransferTranslationParamsType {
|
|
85
|
+
contract: string;
|
|
86
|
+
fsmTransfers: any;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function policyTransferTranslation(params: PolicyTransferTranslationParamsType) {
|
|
90
|
+
return FUtil.Request({
|
|
91
|
+
method: 'POST',
|
|
92
|
+
url: `/v2/translate/transfer`,
|
|
93
|
+
data: params,
|
|
94
|
+
});
|
|
95
|
+
}
|
package/src/utils/linkTo.ts
CHANGED
|
@@ -562,24 +562,43 @@ export function globalSearch({ search }: GlobalSearchParamsType) {
|
|
|
562
562
|
})}`;
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
-
//
|
|
566
|
-
interface
|
|
565
|
+
// 结算信息创建
|
|
566
|
+
interface SettlementInfoCreatorParamsType {
|
|
567
567
|
nodeID?: number;
|
|
568
568
|
}
|
|
569
569
|
|
|
570
|
-
export function
|
|
571
|
-
return `/
|
|
570
|
+
export function settlementInfoCreator({ nodeID }: SettlementInfoCreatorParamsType) {
|
|
571
|
+
return `/settlementCreator${handleQuery({ nodeID })}`;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// 结算信息详情
|
|
575
|
+
interface SettlementInfoParamsType {
|
|
576
|
+
accountID: string;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export function settlementInfo({ accountID }: SettlementInfoParamsType) {
|
|
580
|
+
return `/settlementInfo/${accountID}`;
|
|
572
581
|
}
|
|
573
582
|
|
|
574
583
|
// 结算信息编辑
|
|
575
584
|
interface SettlementInfoEditorParamsType {
|
|
576
|
-
|
|
585
|
+
accountID: string;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export function settlementInfoEditor({ accountID }: SettlementInfoEditorParamsType) {
|
|
589
|
+
return `/settlementEditor/${accountID}`;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// 结算银行卡编辑
|
|
593
|
+
interface SettlementBankCardEditorParamsType {
|
|
594
|
+
accountID: string;
|
|
577
595
|
}
|
|
578
596
|
|
|
579
|
-
export function
|
|
580
|
-
return `/
|
|
597
|
+
export function settlementBankCardEditor({ accountID }: SettlementBankCardEditorParamsType) {
|
|
598
|
+
return `/settlementBankCardEditor/${accountID}`;
|
|
581
599
|
}
|
|
582
600
|
|
|
601
|
+
// 结算银行卡详情
|
|
583
602
|
/************** console End ******************************************************/
|
|
584
603
|
|
|
585
604
|
/************** user Start ******************************************************/
|