@freelog/tools-lib 0.1.150 → 0.1.152

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.150",
3
+ "version": "0.1.152",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,82 +1,82 @@
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
- resourceTypeCode?: string;
24
- omitResourceType?: string;
25
- resourceStatus?: 0 | 1 | 2 | 4;
26
- }
27
-
28
- export function collectionResources(params: CollectionResourcesParamsType) {
29
- // return FUtil.Axios.get('/v2/collections/resources', {
30
- // params
31
- // });
32
- return FUtil.Request({
33
- method: 'GET',
34
- url: `/v2/collections/resources`,
35
- params: params,
36
- });
37
-
38
- }
39
-
40
- // 删除收藏的资源
41
- interface DeleteCollectResourceParamsType {
42
- resourceId: string;
43
- }
44
-
45
- export function deleteCollectResource({resourceId}: DeleteCollectResourceParamsType) {
46
- // return FUtil.Axios.delete(`/v2/collections/resources/${resourceId}`);
47
- return FUtil.Request({
48
- method: 'DELETE',
49
- url: `/v2/collections/resources/${resourceId}`,
50
- // params: params,
51
- });
52
- }
53
-
54
- // 批量查询资源是否收藏
55
- interface IsCollectedParamsType {
56
- resourceIds: string;
57
- }
58
-
59
- export function isCollected(params: IsCollectedParamsType) {
60
- // return FUtil.Axios.get('/v2/collections/resources/isCollected', {
61
- // params
62
- // });
63
- return FUtil.Request({
64
- method: 'GET',
65
- url: `/v2/collections/resources/isCollected`,
66
- params: params,
67
- });
68
- }
69
-
70
- // 查询资源总收藏数量
71
- interface CollectedCountParamsType {
72
- resourceId: string;
73
- }
74
-
75
- export function collectedCount({resourceId}: CollectedCountParamsType) {
76
- // return FUtil.Axios.get(`/v2/collections/resources/${resourceId}/count`);
77
- return FUtil.Request({
78
- method: 'GET',
79
- url: `/v2/collections/resources/${resourceId}/count`,
80
- // params: params,
81
- });
82
- }
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
+ resourceTypeCode?: string;
24
+ omitResourceType?: string;
25
+ resourceStatus?: 0 | 1 | 2 | 4;
26
+ }
27
+
28
+ export function collectionResources(params: CollectionResourcesParamsType) {
29
+ // return FUtil.Axios.get('/v2/collections/resources', {
30
+ // params
31
+ // });
32
+ return FUtil.Request({
33
+ method: 'GET',
34
+ url: `/v2/collections/resources`,
35
+ params: params,
36
+ });
37
+
38
+ }
39
+
40
+ // 删除收藏的资源
41
+ interface DeleteCollectResourceParamsType {
42
+ resourceId: string;
43
+ }
44
+
45
+ export function deleteCollectResource({resourceId}: DeleteCollectResourceParamsType) {
46
+ // return FUtil.Axios.delete(`/v2/collections/resources/${resourceId}`);
47
+ return FUtil.Request({
48
+ method: 'DELETE',
49
+ url: `/v2/collections/resources/${resourceId}`,
50
+ // params: params,
51
+ });
52
+ }
53
+
54
+ // 批量查询资源是否收藏
55
+ interface IsCollectedParamsType {
56
+ resourceIds: string;
57
+ }
58
+
59
+ export function isCollected(params: IsCollectedParamsType) {
60
+ // return FUtil.Axios.get('/v2/collections/resources/isCollected', {
61
+ // params
62
+ // });
63
+ return FUtil.Request({
64
+ method: 'GET',
65
+ url: `/v2/collections/resources/isCollected`,
66
+ params: params,
67
+ });
68
+ }
69
+
70
+ // 查询资源总收藏数量
71
+ interface CollectedCountParamsType {
72
+ resourceId: string;
73
+ }
74
+
75
+ export function collectedCount({resourceId}: CollectedCountParamsType) {
76
+ // return FUtil.Axios.get(`/v2/collections/resources/${resourceId}/count`);
77
+ return FUtil.Request({
78
+ method: 'GET',
79
+ url: `/v2/collections/resources/${resourceId}/count`,
80
+ // params: params,
81
+ });
82
+ }
@@ -1,81 +1,81 @@
1
- import FUtil from '../utils';
2
-
3
- // 创建节点
4
- export interface CreateParamsType {
5
- nodeName: string;
6
- nodeDomain: string;
7
- }
8
-
9
- export function create(params: CreateParamsType) {
10
- // return FUtil.Axios.post('/v2/nodes', params);
11
- return FUtil.Request({
12
- method: 'POST',
13
- url: `/v2/nodes`,
14
- data: params,
15
- });
16
- }
17
-
18
- // 查看节点详情
19
- interface NodeDetailParamsType1 {
20
- nodeId: number;
21
- }
22
-
23
- interface NodeDetailParamsType2 {
24
- nodeName?: string;
25
- nodeDomain?: string;
26
- }
27
-
28
- export function details(params: NodeDetailParamsType1 | NodeDetailParamsType2) {
29
- if ((params as NodeDetailParamsType1).nodeId) {
30
- // return FUtil.Axios.get(`/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`);
31
- return FUtil.Request({
32
- method: 'GET',
33
- url: `/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`,
34
- // params: params,
35
- });
36
- }
37
- // return FUtil.Axios.get(`/v2/nodes/detail`, {
38
- // params,
39
- // });
40
- return FUtil.Request({
41
- method: 'GET',
42
- url: `/v2/nodes/detail`,
43
- params: params,
44
- });
45
- }
46
-
47
- // 查看节点列表
48
- interface NodesParamsType {
49
- skip?: number;
50
- limit?: number;
51
- status?: 0 | 1 | 2; // 0:正常 1:未审核 2:冻结
52
- projection?: string;
53
- }
54
-
55
- export function nodes(params: NodesParamsType) {
56
- return FUtil.Request({
57
- method: 'GET',
58
- url: `/v2/nodes`,
59
- params: params,
60
- });
61
- }
62
-
63
- // 设置节点信息
64
- interface SetNodeInfoParamsType {
65
- nodeId: number;
66
- nodeLogo: string;
67
- nodeTitle: string;
68
- nodeShortDescription: string;
69
- // nodeVisibility: 1 | 2 | 3; // 可见性 1:公开 2:私密 3:暂停
70
- status: 1 | 2 | 8; // 可见性 1:公开 2:私密 3:暂停
71
- nodeSuspendInfo: string;
72
- }
73
-
74
- export function setNodeInfo(params: SetNodeInfoParamsType) {
75
- return FUtil.Request({
76
- method: 'POST',
77
- url: `/v2/nodes/setNodeInfo`,
78
- data: params,
79
- });
80
- }
81
-
1
+ import FUtil from '../utils';
2
+
3
+ // 创建节点
4
+ export interface CreateParamsType {
5
+ nodeName: string;
6
+ nodeDomain: string;
7
+ }
8
+
9
+ export function create(params: CreateParamsType) {
10
+ // return FUtil.Axios.post('/v2/nodes', params);
11
+ return FUtil.Request({
12
+ method: 'POST',
13
+ url: `/v2/nodes`,
14
+ data: params,
15
+ });
16
+ }
17
+
18
+ // 查看节点详情
19
+ interface NodeDetailParamsType1 {
20
+ nodeId: number;
21
+ }
22
+
23
+ interface NodeDetailParamsType2 {
24
+ nodeName?: string;
25
+ nodeDomain?: string;
26
+ }
27
+
28
+ export function details(params: NodeDetailParamsType1 | NodeDetailParamsType2) {
29
+ if ((params as NodeDetailParamsType1).nodeId) {
30
+ // return FUtil.Axios.get(`/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`);
31
+ return FUtil.Request({
32
+ method: 'GET',
33
+ url: `/v2/nodes/${(params as NodeDetailParamsType1).nodeId}`,
34
+ // params: params,
35
+ });
36
+ }
37
+ // return FUtil.Axios.get(`/v2/nodes/detail`, {
38
+ // params,
39
+ // });
40
+ return FUtil.Request({
41
+ method: 'GET',
42
+ url: `/v2/nodes/detail`,
43
+ params: params,
44
+ });
45
+ }
46
+
47
+ // 查看节点列表
48
+ interface NodesParamsType {
49
+ skip?: number;
50
+ limit?: number;
51
+ status?: 0 | 1 | 2; // 0:正常 1:未审核 2:冻结
52
+ projection?: string;
53
+ }
54
+
55
+ export function nodes(params: NodesParamsType) {
56
+ return FUtil.Request({
57
+ method: 'GET',
58
+ url: `/v2/nodes`,
59
+ params: params,
60
+ });
61
+ }
62
+
63
+ // 设置节点信息
64
+ interface SetNodeInfoParamsType {
65
+ nodeId: number;
66
+ nodeLogo: string;
67
+ nodeTitle: string;
68
+ nodeShortDescription: string;
69
+ // nodeVisibility: 1 | 2 | 3; // 可见性 1:公开 2:私密 3:暂停
70
+ status: 1 | 2 | 8; // 可见性 1:公开 2:私密 3:暂停
71
+ nodeSuspendInfo: string;
72
+ }
73
+
74
+ export function setNodeInfo(params: SetNodeInfoParamsType) {
75
+ return FUtil.Request({
76
+ method: 'POST',
77
+ url: `/v2/nodes/setNodeInfo`,
78
+ data: params,
79
+ });
80
+ }
81
+
@@ -3,6 +3,7 @@ import FUtil from '../utils';
3
3
  // 列出运营分类分组排序
4
4
  interface OperationCategoriesParamsType {
5
5
  name?: string;
6
+ status?: number;
6
7
  }
7
8
 
8
9
  export function operationCategories({...params}: OperationCategoriesParamsType = {}) {