tshex-cli 1.0.18 → 1.0.20

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,102 +0,0 @@
1
- type Generic<T = unknown> = Record<string, T>
2
-
3
- /**
4
- * @description
5
- */
6
- export interface Filterable<S = Generic> {
7
- filter(selector: S): Promise<Array<S>>
8
- }
9
-
10
- /**
11
- * @description
12
- */
13
- export interface Sortable<S = Generic> {
14
- sort(selector: S): Promise<Array<S>>
15
- }
16
-
17
- /**
18
- * @description
19
- */
20
- export interface Creatable<D = Generic> {
21
- create(data: D): Promise<unknown>
22
- }
23
-
24
- /**
25
- * @description
26
- */
27
- export interface Updatable<S = Generic, D = Generic> {
28
- update(selector: S, data: D): Promise<unknown>
29
- }
30
-
31
- /**
32
- * @description
33
- */
34
- export interface Deletable<S = Generic> {
35
- delete(selector: S): Promise<unknown>
36
- }
37
-
38
- /**
39
- * @description
40
- */
41
- export interface Aggregatable<S = Generic> {
42
- aggregate(selector: S): Promise<S>
43
- }
44
-
45
- /**
46
- * @description
47
- */
48
- export interface Relatable {
49
- selectRelated(...args: unknown[]): unknown
50
-
51
- prefetchRelated(...args: unknown[]): unknown
52
- }
53
-
54
- /**
55
- * @description
56
- */
57
- export abstract class DataManager<T = Generic> {
58
- [property: string]: unknown
59
-
60
- public abstract all(): Promise<Array<T>>
61
-
62
- public abstract none(): Array<T>
63
- } //:: class
64
-
65
- /**
66
- * @description
67
- */
68
- export abstract class DatasetManager<T = Generic> extends DataManager<T> {
69
- [property: string]: unknown
70
-
71
- public abstract union(other: Array<T>): Promise<Array<T>>
72
-
73
- public abstract intersection(other: Array<T>): Promise<Array<T>>
74
-
75
- public abstract difference(other: Array<T>): Promise<Array<T>>
76
-
77
- public abstract symmetricDifference(other: Array<T>): Promise<Array<T>>
78
-
79
- public abstract complement(other: Array<T>): Promise<Array<T>>
80
- } //:: class
81
-
82
- /**
83
- * @description
84
- */
85
- export abstract class DriverManager<M extends DataManager = DataManager> {
86
- [property: string]: unknown
87
-
88
- public abstract connect(...args: unknown[]): Promise<M>
89
-
90
- public abstract disconnect(): Promise<unknown>
91
- } //:: class
92
-
93
- /**
94
- * @description Represents a data source.
95
- */
96
- export abstract class Repository<M extends DriverManager = DriverManager> {
97
- [property: string]: unknown
98
-
99
- public constructor(public readonly manager: M) {}
100
-
101
- protected abstract transform<T = Generic>(data: Generic): T
102
- } //:: class