@hostlink/light 2.7.1 → 2.8.0

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,6 +1,32 @@
1
1
  import { AxiosInstance } from 'axios';
2
+ type Operator = '==' | '<' | '<=' | '>' | '>=' | '!==';
3
+ interface FilterValue {
4
+ lt?: any;
5
+ lte?: any;
6
+ gt?: any;
7
+ gte?: any;
8
+ ne?: any;
9
+ contains?: string;
10
+ in?: any[];
11
+ nin?: any[];
12
+ between?: any[];
13
+ notBetween?: any[];
14
+ }
15
+ interface Filters {
16
+ [key: string]: any | FilterValue;
17
+ }
18
+ interface Step {
19
+ type: string;
20
+ args: any[];
21
+ }
22
+ interface MetaData {
23
+ total?: boolean;
24
+ key?: boolean;
25
+ name?: boolean;
26
+ [key: string]: any;
27
+ }
2
28
  interface Collection<Item> {
3
- constructor(fields: Object, axios: AxiosInstance): void;
29
+ constructor(fields: Record<string, any>, axios: AxiosInstance): void;
4
30
  [key: string]: any;
5
31
  /**
6
32
  * The all method returns the underlying array represented by the collection.
@@ -410,17 +436,17 @@ declare class Collection<Item> {
410
436
  _batchData: any;
411
437
  data_path: string;
412
438
  axios: AxiosInstance;
413
- filters: any;
414
- steps: any[];
415
- fields: Object;
439
+ filters: Filters;
440
+ steps: Step[];
441
+ fields: Record<string, any>;
416
442
  already_limit: boolean;
417
443
  already_offset: boolean;
418
444
  limit: null | number;
419
445
  offset: null | number;
420
446
  _sort: string | null;
421
447
  _sortDesc: boolean;
422
- meta: any;
423
- constructor(fields: Object, axios: AxiosInstance);
448
+ meta: MetaData;
449
+ constructor(fields: Record<string, any>, axios: AxiosInstance);
424
450
  }
425
- declare const _default: (name: string, axios: AxiosInstance, fields: Object) => Collection<any>;
451
+ declare const _default: (name: string, axios: AxiosInstance, fields: Record<string, any>) => Collection<any>;
426
452
  export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/drive.d.ts CHANGED
@@ -21,7 +21,7 @@ declare const _default: (index: number, axios: AxiosInstance) => {
21
21
  files: {
22
22
  list: (path: string, fields?: FileFields) => Promise<any>;
23
23
  get: (path: string, fields?: FileFields) => Promise<any>;
24
- read: (path: string) => Promise<string>;
24
+ read: (path: string) => Promise<any>;
25
25
  write: (path: string, content: string) => Promise<any>;
26
26
  delete: (path: string) => Promise<any>;
27
27
  rename: (path: string, name: string) => Promise<any>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/fs.d.ts CHANGED
@@ -20,7 +20,7 @@ declare const _default: (axios: AxiosInstance) => {
20
20
  rename: (path: string, name: string) => Promise<any>;
21
21
  };
22
22
  files: {
23
- list: (path: string) => Promise<any>;
23
+ list: (path: string) => Promise<FSFile[]>;
24
24
  read: (path: string) => Promise<string>;
25
25
  write: (path: string, content: string) => Promise<any>;
26
26
  delete: (path: string) => Promise<any>;