@freelog/tools-lib 0.1.195 → 0.1.197

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelog/tools-lib",
3
- "version": "0.1.195",
3
+ "version": "0.1.197",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -45,12 +45,33 @@ 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: 0 | 1; // 证件有效期是否是长期; 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
51
72
  cardType: 0 | 1 | 2 | 4; // 0:对公,1:对私法人,2:对私非法人,4:对公非同名;个人商户/用户不支持对公类型,对私非法人类型;
52
73
  bankName: string; // 开户行名称
53
- cardName: string; // 持卡人姓名
74
+ // cardName: string; // 持卡人姓名
54
75
  cardNo: string; // 卡号
55
76
  provId: string; // 银行所在省ID
56
77
  areaId: 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
@@ -94,6 +128,21 @@ export function queryBindWithdrawCard({accountId}: QueryBindWithdrawCardParamsTy
94
128
  });
95
129
  }
96
130
 
131
+ // 查询提现状态
132
+ interface QueryWithdrawStatusParamsType {
133
+ ownerId: number; // 账户所有者ID; 根据账户类型动态赋值userId或nodeId
134
+ accountType: 1 | 2; // 账户类型(1:个人账户 2:节点账户)
135
+ }
136
+
137
+ export function queryWithdrawStatus(params: QueryWithdrawStatusParamsType, config?: AxiosRequestConfig) {
138
+ return FUtil.Request({
139
+ method: 'GET',
140
+ url: `/v3/transactions/withdrawCash/check`,
141
+ params: params,
142
+ ...config,
143
+ });
144
+ }
145
+
97
146
  // 用户主动提现
98
147
  interface WithdrawCashParamsType {
99
148
  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
- export function policyTemplates(params: PolicyTemplatesParamsType = {}) {
41
- return FUtil.Request({
42
- method: 'GET',
43
- url: `/v2/translate/translate-config/list4Client`,
44
- params: params,
45
- });
46
- }
47
-
48
- // 重新编译
49
- interface PolicyReCompileParamsType {
50
- _id?: string;
51
- contract?: string;
52
- fillArgs: {
53
- name: string;
54
- value: string | number;
55
- }[];
56
- }
57
-
58
- export function policyReCompile(data: PolicyReCompileParamsType) {
59
- return FUtil.Request({
60
- method: 'POST',
61
- url: `/v2/translate/reCompile`,
62
- data: data,
63
- });
64
- }
65
-
66
- // 模板策略翻译
67
- interface PolicyTranslationParamsType {
68
- contract: string;
69
- }
70
-
71
- export function policyTranslation({contract}: PolicyTranslationParamsType) {
72
- return FUtil.Request({
73
- method: 'POST',
74
- url: `/v2/translate/translate`,
75
- data: {
76
- contract: contract,
77
- },
78
- });
79
- }
80
-
81
- // 模板策略翻译
82
- interface PolicyTransferTranslationParamsType {
83
- contract: string;
84
- fsmTransfers: any;
85
- }
86
-
87
- export function policyTransferTranslation(params: PolicyTransferTranslationParamsType) {
88
- return FUtil.Request({
89
- method: 'POST',
90
- url: `/v2/translate/transfer`,
91
- data: params,
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
+ }