@freelog/tools-lib 0.1.99 → 0.1.104

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.
@@ -95,6 +95,10 @@ interface NodeCreateSuccessParamsType {
95
95
  nodeID: number;
96
96
  }
97
97
  export declare function nodeCreateSuccess({ nodeID }: NodeCreateSuccessParamsType): string;
98
+ interface InvitationParamsType {
99
+ goTo?: string;
100
+ }
101
+ export declare function invitation({ ...params }?: InvitationParamsType): string;
98
102
  interface Exception403ParamsType {
99
103
  from?: string;
100
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelog/tools-lib",
3
- "version": "0.1.99",
3
+ "version": "0.1.104",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -11,6 +11,7 @@ import * as Captcha from './captcha';
11
11
  import * as Event from './events';
12
12
  import * as Activity from './activities';
13
13
  import * as TestQualification from './testQualifications';
14
+ import * as Statistic from './statistics';
14
15
 
15
16
  const FServiceAPI = {
16
17
  Node,
@@ -26,6 +27,7 @@ const FServiceAPI = {
26
27
  Event,
27
28
  Activity,
28
29
  TestQualification,
30
+ Statistic,
29
31
  };
30
32
 
31
33
  export default FServiceAPI;
@@ -86,6 +86,7 @@ interface ListParamsType {
86
86
  isLoadPolicyInfo?: 0 | 1;
87
87
  isLoadLatestVersionInfo?: 0 | 1;
88
88
  projection?: string;
89
+ sort?: string;
89
90
  }
90
91
 
91
92
  interface ListReturnType extends CommonReturn {
@@ -1,20 +1,20 @@
1
- import FUtil from '../utils';
2
- // import {AxiosRequestConfig, Canceler} from 'axios';
3
-
4
- // 查询通用交易统计信息
5
- export interface TransactionsCommonParamsType {
6
- ownerId: string | number;
7
- ownerType?: 1 | 2;
8
- objectId?: string;
9
- objectType?: 2 | 3;
10
- beginDate?: string;
11
- endDate?: string;
12
- }
13
-
14
- export function transactionsCommon(params: TransactionsCommonParamsType) {
15
- return FUtil.Request({
16
- method: 'GET',
17
- url: `/v2/statistics/transactions/common`,
18
- params: params,
19
- });
20
- }
1
+ import FUtil from '../utils';
2
+ // import {AxiosRequestConfig, Canceler} from 'axios';
3
+
4
+ // 查询通用交易统计信息
5
+ export interface TransactionsCommonParamsType {
6
+ ownerId: string | number;
7
+ ownerType?: 1 | 2;
8
+ objectId?: string;
9
+ objectType?: 2 | 3;
10
+ beginDate?: string;
11
+ endDate?: string;
12
+ }
13
+
14
+ export function transactionsCommon(params: TransactionsCommonParamsType) {
15
+ return FUtil.Request({
16
+ method: 'GET',
17
+ url: `/v2/statistics/transactions/common`,
18
+ params: params,
19
+ });
20
+ }
@@ -1,56 +1,56 @@
1
- import FUtil from '../utils';
2
-
3
- // 使用邀请码激活内测资格
4
- interface BetaCodesActivateParamsType {
5
- code: string;
6
- }
7
-
8
- export function betaCodesActivate({...params}: BetaCodesActivateParamsType) {
9
- return FUtil.Request({
10
- method: 'POST',
11
- url: `/v2/testQualifications/beta/codes/activate`,
12
- data: params,
13
- });
14
- }
15
-
16
- // 用户申请内测资格
17
- interface BetaApplyParamsType {
18
- // province: string;
19
- // city: string;
20
- areaCode: string;
21
- occupation: string;
22
- description: string;
23
- }
24
-
25
- export function betaApply({...params}: BetaApplyParamsType) {
26
- return FUtil.Request({
27
- method: 'POST',
28
- url: `/v2/testQualifications/beta/apply`,
29
- data: params,
30
- });
31
- }
32
-
33
- // 查看内测资格申请详情
34
- interface GetBetaApply1ParamsType {
35
-
36
- }
37
-
38
- export function getBetaApply1({...params}: GetBetaApply1ParamsType = {}) {
39
- return FUtil.Request({
40
- method: 'GET',
41
- url: `/v2/testQualifications/beta/apply/current`,
42
- params: params,
43
- });
44
- }
45
-
46
- interface GetBetaApply2ParamsType {
47
- recordId: string;
48
- }
49
-
50
- export function getBetaApply2({recordId, ...params}: GetBetaApply2ParamsType) {
51
- return FUtil.Request({
52
- method: 'GET',
53
- url: `/v2/testQualifications/beta/apply/${recordId}`,
54
- data: params,
55
- });
56
- }
1
+ import FUtil from '../utils';
2
+
3
+ // 使用邀请码激活内测资格
4
+ interface BetaCodesActivateParamsType {
5
+ code: string;
6
+ }
7
+
8
+ export function betaCodesActivate({...params}: BetaCodesActivateParamsType) {
9
+ return FUtil.Request({
10
+ method: 'POST',
11
+ url: `/v2/testQualifications/beta/codes/activate`,
12
+ data: params,
13
+ });
14
+ }
15
+
16
+ // 用户申请内测资格
17
+ interface BetaApplyParamsType {
18
+ // province: string;
19
+ // city: string;
20
+ areaCode: string;
21
+ occupation: string;
22
+ description: string;
23
+ }
24
+
25
+ export function betaApply({...params}: BetaApplyParamsType) {
26
+ return FUtil.Request({
27
+ method: 'POST',
28
+ url: `/v2/testQualifications/beta/apply`,
29
+ data: params,
30
+ });
31
+ }
32
+
33
+ // 查看内测资格申请详情
34
+ interface GetBetaApply1ParamsType {
35
+
36
+ }
37
+
38
+ export function getBetaApply1({...params}: GetBetaApply1ParamsType = {}) {
39
+ return FUtil.Request({
40
+ method: 'GET',
41
+ url: `/v2/testQualifications/beta/apply/current`,
42
+ params: params,
43
+ });
44
+ }
45
+
46
+ interface GetBetaApply2ParamsType {
47
+ recordId: string;
48
+ }
49
+
50
+ export function getBetaApply2({recordId, ...params}: GetBetaApply2ParamsType) {
51
+ return FUtil.Request({
52
+ method: 'GET',
53
+ url: `/v2/testQualifications/beta/apply/${recordId}`,
54
+ data: params,
55
+ });
56
+ }
@@ -1,4 +1,5 @@
1
1
  import FUtil from '../utils';
2
+ import {AxiosRequestConfig} from "axios";
2
3
 
3
4
  // 用户登录
4
5
  interface LoginParamsType {
@@ -114,7 +115,7 @@ interface UploadHeadImgParamsType {
114
115
  file: File;
115
116
  }
116
117
 
117
- export function uploadHeadImg(params: UploadHeadImgParamsType) {
118
+ export function uploadHeadImg(params: UploadHeadImgParamsType, config?: AxiosRequestConfig) {
118
119
 
119
120
  const formData = new FormData();
120
121
  for (const [key, value] of Object.entries(params)) {
@@ -126,7 +127,8 @@ export function uploadHeadImg(params: UploadHeadImgParamsType) {
126
127
  return FUtil.Request({
127
128
  method: 'POST',
128
129
  url: `/v2/users/current/uploadHeadImg`,
129
- data: params,
130
+ data: formData,
131
+ ...config,
130
132
  });
131
133
  }
132
134
 
@@ -228,6 +228,18 @@ export function nodeCreateSuccess({nodeID}: NodeCreateSuccessParamsType) {
228
228
  return `/result/node/create/success/${nodeID}`;
229
229
  }
230
230
 
231
+ // 节点创建成功
232
+ interface InvitationParamsType {
233
+ goTo?: string;
234
+ }
235
+
236
+ export function invitation({...params}: InvitationParamsType = {}) {
237
+ // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
238
+ return `/invitation${handleQuery({
239
+ returnUrl: params.goTo ? encodeURIComponent(params.goTo) : undefined,
240
+ })}`;
241
+ }
242
+
231
243
  // 403
232
244
  interface Exception403ParamsType {
233
245
  from?: string;