@freelog/tools-lib 0.1.145 → 0.1.147

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.
@@ -1,4 +1,3 @@
1
1
  import axios, { AxiosRequestConfig } from 'axios';
2
- import "nprogress/nprogress.css";
3
2
  export default axios;
4
3
  export declare function request(config: AxiosRequestConfig, { noRedirect, noErrorAlert, }?: any): Promise<any>;
@@ -93,14 +93,20 @@ interface ResourceVersionCreateSuccessParamsType {
93
93
  version: string;
94
94
  }
95
95
  export declare function resourceVersionCreateSuccess({ resourceID, version }: ResourceVersionCreateSuccessParamsType): string;
96
+ interface ResourceVersionCreateReleaseParamsType {
97
+ resourceID: string;
98
+ version: string;
99
+ }
100
+ export declare function resourceVersionCreateRelease({ resourceID, version }: ResourceVersionCreateReleaseParamsType): string;
96
101
  interface NodeCreateSuccessParamsType {
97
102
  nodeID: number;
98
103
  }
99
104
  export declare function nodeCreateSuccess({ nodeID }: NodeCreateSuccessParamsType): string;
100
105
  interface InvitationParamsType {
101
106
  goTo?: string;
107
+ invitationCode?: string;
102
108
  }
103
- export declare function invitation({ ...params }?: InvitationParamsType): string;
109
+ export declare function invitation({ goTo, ...params }?: InvitationParamsType): string;
104
110
  interface Exception403ParamsType {
105
111
  from?: string;
106
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelog/tools-lib",
3
- "version": "0.1.145",
3
+ "version": "0.1.147",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,81 +1,81 @@
1
- import FUtil from '../utils';
2
-
3
- // 收藏资源
4
- interface CollectResourceParamsType {
5
- resourceId: string;
6
- }
7
-
8
- export function collectResource(params: CollectResourceParamsType) {
9
- // return FUtil.Axios.post('/v2/collections/resources', params);
10
- return FUtil.Request({
11
- method: 'POST',
12
- url: `/v2/collections/resources`,
13
- data: params,
14
- });
15
- }
16
-
17
- // 查看收藏的资源列表
18
- interface CollectionResourcesParamsType {
19
- skip?: number;
20
- limit?: number;
21
- keywords?: string;
22
- resourceType?: string;
23
- omitResourceType?: string;
24
- resourceStatus?: 0 | 1 | 2;
25
- }
26
-
27
- export function collectionResources(params: CollectionResourcesParamsType) {
28
- // return FUtil.Axios.get('/v2/collections/resources', {
29
- // params
30
- // });
31
- return FUtil.Request({
32
- method: 'GET',
33
- url: `/v2/collections/resources`,
34
- params: params,
35
- });
36
-
37
- }
38
-
39
- // 删除收藏的资源
40
- interface DeleteCollectResourceParamsType {
41
- resourceId: string;
42
- }
43
-
44
- export function deleteCollectResource({resourceId}: DeleteCollectResourceParamsType) {
45
- // return FUtil.Axios.delete(`/v2/collections/resources/${resourceId}`);
46
- return FUtil.Request({
47
- method: 'DELETE',
48
- url: `/v2/collections/resources/${resourceId}`,
49
- // params: params,
50
- });
51
- }
52
-
53
- // 批量查询资源是否收藏
54
- interface IsCollectedParamsType {
55
- resourceIds: string;
56
- }
57
-
58
- export function isCollected(params: IsCollectedParamsType) {
59
- // return FUtil.Axios.get('/v2/collections/resources/isCollected', {
60
- // params
61
- // });
62
- return FUtil.Request({
63
- method: 'GET',
64
- url: `/v2/collections/resources/isCollected`,
65
- params: params,
66
- });
67
- }
68
-
69
- // 查询资源总收藏数量
70
- interface CollectedCountParamsType {
71
- resourceId: string;
72
- }
73
-
74
- export function collectedCount({resourceId}: CollectedCountParamsType) {
75
- // return FUtil.Axios.get(`/v2/collections/resources/${resourceId}/count`);
76
- return FUtil.Request({
77
- method: 'GET',
78
- url: `/v2/collections/resources/${resourceId}/count`,
79
- // params: params,
80
- });
81
- }
1
+ import FUtil from '../utils';
2
+
3
+ // 收藏资源
4
+ interface CollectResourceParamsType {
5
+ resourceId: string;
6
+ }
7
+
8
+ export function collectResource(params: CollectResourceParamsType) {
9
+ // return FUtil.Axios.post('/v2/collections/resources', params);
10
+ return FUtil.Request({
11
+ method: 'POST',
12
+ url: `/v2/collections/resources`,
13
+ data: params,
14
+ });
15
+ }
16
+
17
+ // 查看收藏的资源列表
18
+ interface CollectionResourcesParamsType {
19
+ skip?: number;
20
+ limit?: number;
21
+ keywords?: string;
22
+ resourceType?: string;
23
+ omitResourceType?: string;
24
+ resourceStatus?: 0 | 1 | 2 | 4;
25
+ }
26
+
27
+ export function collectionResources(params: CollectionResourcesParamsType) {
28
+ // return FUtil.Axios.get('/v2/collections/resources', {
29
+ // params
30
+ // });
31
+ return FUtil.Request({
32
+ method: 'GET',
33
+ url: `/v2/collections/resources`,
34
+ params: params,
35
+ });
36
+
37
+ }
38
+
39
+ // 删除收藏的资源
40
+ interface DeleteCollectResourceParamsType {
41
+ resourceId: string;
42
+ }
43
+
44
+ export function deleteCollectResource({resourceId}: DeleteCollectResourceParamsType) {
45
+ // return FUtil.Axios.delete(`/v2/collections/resources/${resourceId}`);
46
+ return FUtil.Request({
47
+ method: 'DELETE',
48
+ url: `/v2/collections/resources/${resourceId}`,
49
+ // params: params,
50
+ });
51
+ }
52
+
53
+ // 批量查询资源是否收藏
54
+ interface IsCollectedParamsType {
55
+ resourceIds: string;
56
+ }
57
+
58
+ export function isCollected(params: IsCollectedParamsType) {
59
+ // return FUtil.Axios.get('/v2/collections/resources/isCollected', {
60
+ // params
61
+ // });
62
+ return FUtil.Request({
63
+ method: 'GET',
64
+ url: `/v2/collections/resources/isCollected`,
65
+ params: params,
66
+ });
67
+ }
68
+
69
+ // 查询资源总收藏数量
70
+ interface CollectedCountParamsType {
71
+ resourceId: string;
72
+ }
73
+
74
+ export function collectedCount({resourceId}: CollectedCountParamsType) {
75
+ // return FUtil.Axios.get(`/v2/collections/resources/${resourceId}/count`);
76
+ return FUtil.Request({
77
+ method: 'GET',
78
+ url: `/v2/collections/resources/${resourceId}/count`,
79
+ // params: params,
80
+ });
81
+ }