@freelog/tools-lib 0.1.107 → 0.1.108

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.107",
3
+ "version": "0.1.108",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -0,0 +1,27 @@
1
+ import * as Storage from '../storages';
2
+
3
+ interface FileInfo {
4
+ sha1: string;
5
+ state: 'success' | 'fail' | 'nonentity';
6
+ dataSource: {
7
+ [key: string]: any;
8
+ }
9
+ }
10
+
11
+ interface GetFileInfosBySha1Params {
12
+ sha1: string[];
13
+ cdPartiallySuccess?: (s: any[]) => void;
14
+ cdPartiallyFail?: (f: any[]) => void;
15
+ }
16
+
17
+ export async function getFilesSha1Info({sha1, cdPartiallySuccess, cdPartiallyFail}: GetFileInfosBySha1Params) {
18
+ const {data} = await Storage.filesListInfo({
19
+ sha1: sha1,
20
+ });
21
+
22
+ const all: FileInfo[] = [];
23
+ const success: any = [];
24
+ const fail: any = [];
25
+
26
+ console.log(data, all, success, fail, cdPartiallySuccess, cdPartiallyFail, '093oijsdlkfsjdl')
27
+ }
@@ -1,35 +1,37 @@
1
- import * as Node from './nodes';
2
- import * as Exhibit from './presentables';
3
- import * as Storage from './storages';
4
- import * as Collection from './collections';
5
- import * as Resource from './resources';
6
- import * as User from './user';
7
- import * as InformalNode from './informalNodes';
8
- import * as Contract from './contracts';
9
- import * as Transaction from './transactions';
10
- import * as Captcha from './captcha';
11
- import * as Event from './events';
12
- import * as Activity from './activities';
13
- import * as TestQualification from './testQualifications';
14
- import * as Statistic from './statistics';
15
- import * as I18n from './i18n';
16
-
17
- const FServiceAPI = {
18
- Node,
19
- Exhibit,
20
- Storage,
21
- Collection,
22
- Resource,
23
- User,
24
- InformalNode,
25
- Contract,
26
- Transaction,
27
- Captcha,
28
- Event,
29
- Activity,
30
- TestQualification,
31
- Statistic,
32
- I18n,
33
- };
34
-
35
- export default FServiceAPI;
1
+ import * as Node from './nodes';
2
+ import * as Exhibit from './presentables';
3
+ import * as Storage from './storages';
4
+ import * as Collection from './collections';
5
+ import * as Resource from './resources';
6
+ import * as User from './user';
7
+ import * as InformalNode from './informalNodes';
8
+ import * as Contract from './contracts';
9
+ import * as Transaction from './transactions';
10
+ import * as Captcha from './captcha';
11
+ import * as Event from './events';
12
+ import * as Activity from './activities';
13
+ import * as TestQualification from './testQualifications';
14
+ import * as Statistic from './statistics';
15
+ import * as I18n from './i18n';
16
+ import * as C from './combinations';
17
+
18
+ const FServiceAPI = {
19
+ Node,
20
+ Exhibit,
21
+ Storage,
22
+ Collection,
23
+ Resource,
24
+ User,
25
+ InformalNode,
26
+ Contract,
27
+ Transaction,
28
+ Captcha,
29
+ Event,
30
+ Activity,
31
+ TestQualification,
32
+ Statistic,
33
+ I18n,
34
+ C,
35
+ };
36
+
37
+ export default FServiceAPI;
@@ -17,7 +17,7 @@ interface IResourceInfo {
17
17
  }[];
18
18
  resourceId: string;
19
19
  resourceName: string;
20
- resourceType: string;
20
+ resourceType: string[];
21
21
  resourceVersions: {
22
22
  createDate: string;
23
23
  version: string;