@freelog/tools-lib 0.1.80 → 0.1.81

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.
@@ -0,0 +1,8 @@
1
+ interface List4ClientParamsType {
2
+ }
3
+ export declare function list4Client(params: List4ClientParamsType): Promise<any>;
4
+ interface Find4ClientParamsType {
5
+ _id: string;
6
+ }
7
+ export declare function find4Client(params: Find4ClientParamsType): Promise<any>;
8
+ export {};
@@ -1,3 +1,32 @@
1
+ import { CommonReturn } from "./tools";
2
+ interface IResourceInfo {
3
+ baseUpcastResources: {
4
+ resourceId: string;
5
+ resourceName: string;
6
+ }[];
7
+ coverImages: string[];
8
+ createDate: string;
9
+ intro: string;
10
+ latestVersion: string;
11
+ policies: {
12
+ policyId: string;
13
+ policyName: string;
14
+ status: 0 | 1;
15
+ }[];
16
+ resourceId: string;
17
+ resourceName: string;
18
+ resourceType: string;
19
+ resourceVersions: {
20
+ createDate: string;
21
+ version: string;
22
+ versionId: string;
23
+ }[];
24
+ status: 0 | 1 | 2 | 3;
25
+ tags: string[];
26
+ updateDate: string;
27
+ userId: number;
28
+ username: string;
29
+ }
1
30
  export interface CreateParamsType {
2
31
  name: string;
3
32
  resourceType: string;
@@ -36,7 +65,10 @@ interface ListParamsType {
36
65
  isLoadLatestVersionInfo?: 0 | 1;
37
66
  projection?: string;
38
67
  }
39
- export declare function list(params: ListParamsType): Promise<any>;
68
+ interface ListReturnType extends CommonReturn {
69
+ data: IResourceInfo[];
70
+ }
71
+ export declare function list(params: ListParamsType): Promise<ListReturnType>;
40
72
  interface InfoParamsType {
41
73
  resourceIdOrName: string;
42
74
  isLoadPolicyInfo?: 0 | 1;
@@ -44,7 +76,10 @@ interface InfoParamsType {
44
76
  isLoadLatestVersionInfo?: 0 | 1;
45
77
  projection?: string;
46
78
  }
47
- export declare function info({ resourceIdOrName, ...params }: InfoParamsType): Promise<any>;
79
+ interface InfoReturnType extends CommonReturn {
80
+ data: IResourceInfo;
81
+ }
82
+ export declare function info({ resourceIdOrName, ...params }: InfoParamsType): Promise<InfoReturnType>;
48
83
  interface BatchInfoParamsType {
49
84
  resourceIds?: string;
50
85
  resourceNames?: string;
@@ -53,7 +88,10 @@ interface BatchInfoParamsType {
53
88
  isLoadLatestVersionInfo?: 0 | 1;
54
89
  projection?: string;
55
90
  }
56
- export declare function batchInfo(params: BatchInfoParamsType): Promise<any>;
91
+ interface BatchInfoReturnType extends CommonReturn {
92
+ data: IResourceInfo[];
93
+ }
94
+ export declare function batchInfo(params: BatchInfoParamsType): Promise<BatchInfoReturnType>;
57
95
  interface DependencyTreeParamsType {
58
96
  resourceId: string;
59
97
  version?: string;
@@ -160,7 +198,21 @@ export declare function batchGetCoverageVersions({ resourceId, ...params }: Batc
160
198
  interface ResolveResourcesParamsType {
161
199
  resourceId: string;
162
200
  }
163
- export declare function resolveResources(params: ResolveResourcesParamsType): Promise<any>;
201
+ interface CreateVersionReturnType extends CommonReturn {
202
+ data: {
203
+ resourceId: string;
204
+ resourceName: string;
205
+ versions: {
206
+ version: string;
207
+ versionId: string;
208
+ contracts: {
209
+ policyId: string;
210
+ contractId: string;
211
+ }[];
212
+ }[];
213
+ }[];
214
+ }
215
+ export declare function resolveResources(params: ResolveResourcesParamsType): Promise<CreateVersionReturnType>;
164
216
  interface BatchSetContractsParamsType {
165
217
  resourceId: string;
166
218
  subjects: {
@@ -0,0 +1,5 @@
1
+ export interface CommonReturn {
2
+ errCode: number;
3
+ msg: string;
4
+ ret: number;
5
+ }