@taylordb/shared 0.3.0 → 0.4.1
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/LICENSE +21 -0
- package/dist/cjs/column-types.d.ts +150 -9
- package/dist/cjs/column-types.js +25 -0
- package/dist/cjs/column-types.js.map +1 -1
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/column-types.d.ts +150 -9
- package/dist/esm/column-types.js +23 -1
- package/dist/esm/column-types.js.map +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/cjs/table-types.d.ts +0 -26
- package/dist/cjs/table-types.js +0 -9
- package/dist/cjs/table-types.js.map +0 -1
- package/dist/esm/table-types.d.ts +0 -26
- package/dist/esm/table-types.js +0 -8
- package/dist/esm/table-types.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 TaylorDB
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -4,18 +4,159 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface FileInformation {
|
|
8
|
+
fieldname: string;
|
|
9
|
+
originalname: string;
|
|
10
|
+
encoding: string;
|
|
11
|
+
mimetype: string;
|
|
12
|
+
destination: string;
|
|
13
|
+
filename: string;
|
|
14
|
+
path: string;
|
|
15
|
+
size: number;
|
|
16
|
+
format: string;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}
|
|
20
|
+
interface UploadResponse {
|
|
21
|
+
collectionName: string;
|
|
22
|
+
fileInformation: FileInformation;
|
|
23
|
+
metadata: {
|
|
24
|
+
thumbnails: any[];
|
|
25
|
+
clips: any[];
|
|
26
|
+
};
|
|
27
|
+
baseId: string;
|
|
28
|
+
storageAdaptor: string;
|
|
29
|
+
_id: string;
|
|
30
|
+
__v: number;
|
|
31
|
+
}
|
|
32
|
+
export interface AttachmentColumnValue {
|
|
33
|
+
url: string;
|
|
34
|
+
fileType: string;
|
|
35
|
+
size: number;
|
|
36
|
+
}
|
|
37
|
+
export declare class Attachment {
|
|
38
|
+
readonly collectionName: string;
|
|
39
|
+
readonly fileInformation: FileInformation;
|
|
40
|
+
readonly metadata: {
|
|
41
|
+
thumbnails: any[];
|
|
42
|
+
clips: any[];
|
|
43
|
+
};
|
|
44
|
+
readonly baseId: string;
|
|
45
|
+
readonly storageAdaptor: string;
|
|
46
|
+
readonly _id: string;
|
|
47
|
+
constructor(data: UploadResponse);
|
|
48
|
+
toColumnValue(): AttachmentColumnValue;
|
|
49
|
+
}
|
|
50
|
+
type IsWithinOperatorValue = 'pastWeek' | 'pastMonth' | 'pastYear' | 'nextWeek' | 'nextMonth' | 'nextYear' | 'daysFromNow' | 'daysAgo' | 'currentWeek' | 'currentMonth' | 'currentYear';
|
|
51
|
+
type DefaultDateFilterValue = ('today' | 'tomorrow' | 'yesterday' | 'oneWeekAgo' | 'oneWeekFromNow' | 'oneMonthAgo' | 'oneMonthFromNow') | ['exactDay' | 'exactTimestamp', string] | ['daysAgo' | 'daysFromNow', number];
|
|
52
|
+
type DateFilters = {
|
|
53
|
+
'=': DefaultDateFilterValue;
|
|
54
|
+
'!=': DefaultDateFilterValue;
|
|
55
|
+
'<': DefaultDateFilterValue;
|
|
56
|
+
'>': DefaultDateFilterValue;
|
|
57
|
+
'<=': DefaultDateFilterValue;
|
|
58
|
+
'>=': DefaultDateFilterValue;
|
|
59
|
+
isWithIn: IsWithinOperatorValue | {
|
|
60
|
+
value: 'daysAgo' | 'daysFromNow';
|
|
61
|
+
date: number;
|
|
62
|
+
};
|
|
63
|
+
isEmpty: boolean;
|
|
64
|
+
isNotEmpty: boolean;
|
|
65
|
+
};
|
|
66
|
+
type DateAggregations = {
|
|
67
|
+
empty: number;
|
|
68
|
+
filled: number;
|
|
69
|
+
unique: number;
|
|
70
|
+
percentEmpty: number;
|
|
71
|
+
percentFilled: number;
|
|
72
|
+
percentUnique: number;
|
|
73
|
+
min: number | null;
|
|
74
|
+
max: number | null;
|
|
75
|
+
daysRange: number | null;
|
|
76
|
+
monthRange: number | null;
|
|
77
|
+
};
|
|
78
|
+
type TextFilters = {
|
|
79
|
+
'=': string;
|
|
80
|
+
'!=': string;
|
|
81
|
+
caseEqual: string;
|
|
82
|
+
hasAnyOf: string[];
|
|
83
|
+
contains: string;
|
|
84
|
+
startsWith: string;
|
|
85
|
+
endsWith: string;
|
|
86
|
+
doesNotContain: string;
|
|
87
|
+
};
|
|
88
|
+
type LinkFilters = {
|
|
89
|
+
hasAnyOf: number[];
|
|
90
|
+
hasAllOf: number[];
|
|
91
|
+
isExactly: number[];
|
|
92
|
+
'=': number;
|
|
93
|
+
hasNoneOf: number[];
|
|
94
|
+
};
|
|
95
|
+
type LinkAggregations = {
|
|
96
|
+
empty: number;
|
|
97
|
+
filled: number;
|
|
98
|
+
percentEmpty: number;
|
|
99
|
+
percentFilled: number;
|
|
100
|
+
};
|
|
101
|
+
type NumberFilters = {
|
|
102
|
+
'>': number;
|
|
103
|
+
'>=': number;
|
|
104
|
+
'<': number;
|
|
105
|
+
'<=': number;
|
|
106
|
+
hasAnyOf: number[];
|
|
107
|
+
hasNoneOf: number[];
|
|
108
|
+
};
|
|
109
|
+
type NumberAggregations = {
|
|
110
|
+
sum: number;
|
|
111
|
+
average: number;
|
|
112
|
+
median: number;
|
|
113
|
+
min: number | null;
|
|
114
|
+
max: number | null;
|
|
115
|
+
range: number;
|
|
116
|
+
standardDeviation: number;
|
|
117
|
+
histogram: Record<string, number>;
|
|
118
|
+
empty: number;
|
|
119
|
+
filled: number;
|
|
120
|
+
unique: number;
|
|
121
|
+
percentEmpty: number;
|
|
122
|
+
percentFilled: number;
|
|
123
|
+
percentUnique: number;
|
|
124
|
+
};
|
|
125
|
+
type CheckboxFilters = {
|
|
126
|
+
'=': number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* Column types
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
export type ColumnType<S, U, I, R extends boolean, F extends {
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
} = object, A extends {
|
|
136
|
+
[key: string]: any;
|
|
137
|
+
} = object> = {
|
|
8
138
|
raw: S;
|
|
9
139
|
insert: I;
|
|
10
140
|
update: U;
|
|
11
|
-
|
|
141
|
+
filters: F;
|
|
142
|
+
aggregations: A;
|
|
143
|
+
isRequired: R;
|
|
12
144
|
};
|
|
13
|
-
export type
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
deletedIds: number[];
|
|
17
|
-
} | undefined, number[] | undefined, 'link'> & {
|
|
145
|
+
export type DateColumnType<R extends boolean> = ColumnType<string, string, string, R, DateFilters, DateAggregations>;
|
|
146
|
+
export type TextColumnType<R extends boolean> = ColumnType<string, string, string, R, TextFilters>;
|
|
147
|
+
export type ALinkColumnType<T extends string, S, U, I, R extends boolean> = ColumnType<S, U, I, R, LinkFilters, LinkAggregations> & {
|
|
18
148
|
linkedTo: T;
|
|
19
149
|
};
|
|
20
|
-
export type
|
|
21
|
-
|
|
150
|
+
export type LinkColumnType<T extends string, R extends boolean> = ALinkColumnType<T, object, number | number[] | {
|
|
151
|
+
newIds: number[];
|
|
152
|
+
deletedIds: number[];
|
|
153
|
+
}, number | number[], R>;
|
|
154
|
+
export type AttachmentColumnType<R extends boolean> = ALinkColumnType<'attachmentTable', Attachment[], Attachment[] | {
|
|
155
|
+
newIds: number[];
|
|
156
|
+
deletedIds: number[];
|
|
157
|
+
} | number[], Attachment[] | number[], R>;
|
|
158
|
+
export type NumberColumnType<R extends boolean> = ColumnType<number, number, number, R, NumberFilters, NumberAggregations>;
|
|
159
|
+
export type CheckboxColumnType<R extends boolean> = ColumnType<boolean, boolean, boolean, R, CheckboxFilters>;
|
|
160
|
+
export type AutoGeneratedNumberColumnType = ColumnType<number, never, never, false, NumberFilters, NumberAggregations>;
|
|
161
|
+
export type AutoGeneratedDateColumnType = ColumnType<string, never, never, false, DateFilters, DateAggregations>;
|
|
162
|
+
export {};
|
package/dist/cjs/column-types.js
CHANGED
|
@@ -6,4 +6,29 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Attachment = void 0;
|
|
10
|
+
class Attachment {
|
|
11
|
+
collectionName;
|
|
12
|
+
fileInformation;
|
|
13
|
+
metadata;
|
|
14
|
+
baseId;
|
|
15
|
+
storageAdaptor;
|
|
16
|
+
_id;
|
|
17
|
+
constructor(data) {
|
|
18
|
+
this.collectionName = data.collectionName;
|
|
19
|
+
this.fileInformation = data.fileInformation;
|
|
20
|
+
this.metadata = data.metadata;
|
|
21
|
+
this.baseId = data.baseId;
|
|
22
|
+
this.storageAdaptor = data.storageAdaptor;
|
|
23
|
+
this._id = data._id;
|
|
24
|
+
}
|
|
25
|
+
toColumnValue() {
|
|
26
|
+
return {
|
|
27
|
+
url: this.fileInformation.path,
|
|
28
|
+
fileType: this.fileInformation.mimetype,
|
|
29
|
+
size: this.fileInformation.size,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.Attachment = Attachment;
|
|
9
34
|
//# sourceMappingURL=column-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-types.js","sourceRoot":"","sources":["../../src/column-types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
1
|
+
{"version":3,"file":"column-types.js","sourceRoot":"","sources":["../../src/column-types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAmCH,MAAa,UAAU;IACL,cAAc,CAAS;IACvB,eAAe,CAAkB;IACjC,QAAQ,CAAsC;IAC9C,MAAM,CAAS;IACf,cAAc,CAAS;IACvB,GAAG,CAAS;IAE5B,YAAY,IAAoB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACtB,CAAC;IAED,aAAa;QACX,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI;YAC9B,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ;YACvC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI;SAChC,CAAC;IACJ,CAAC;CACF;AAxBD,gCAwBC"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./@types/index.js"), exports);
|
|
18
18
|
__exportStar(require("./column-types.js"), exports);
|
|
19
19
|
__exportStar(require("./constants/index.js"), exports);
|
|
20
|
-
__exportStar(require("./table-types.js"), exports);
|
|
21
20
|
__exportStar(require("./utilities/index.js"), exports);
|
|
22
21
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,uDAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC"}
|
|
@@ -4,18 +4,159 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
interface FileInformation {
|
|
8
|
+
fieldname: string;
|
|
9
|
+
originalname: string;
|
|
10
|
+
encoding: string;
|
|
11
|
+
mimetype: string;
|
|
12
|
+
destination: string;
|
|
13
|
+
filename: string;
|
|
14
|
+
path: string;
|
|
15
|
+
size: number;
|
|
16
|
+
format: string;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}
|
|
20
|
+
interface UploadResponse {
|
|
21
|
+
collectionName: string;
|
|
22
|
+
fileInformation: FileInformation;
|
|
23
|
+
metadata: {
|
|
24
|
+
thumbnails: any[];
|
|
25
|
+
clips: any[];
|
|
26
|
+
};
|
|
27
|
+
baseId: string;
|
|
28
|
+
storageAdaptor: string;
|
|
29
|
+
_id: string;
|
|
30
|
+
__v: number;
|
|
31
|
+
}
|
|
32
|
+
export interface AttachmentColumnValue {
|
|
33
|
+
url: string;
|
|
34
|
+
fileType: string;
|
|
35
|
+
size: number;
|
|
36
|
+
}
|
|
37
|
+
export declare class Attachment {
|
|
38
|
+
readonly collectionName: string;
|
|
39
|
+
readonly fileInformation: FileInformation;
|
|
40
|
+
readonly metadata: {
|
|
41
|
+
thumbnails: any[];
|
|
42
|
+
clips: any[];
|
|
43
|
+
};
|
|
44
|
+
readonly baseId: string;
|
|
45
|
+
readonly storageAdaptor: string;
|
|
46
|
+
readonly _id: string;
|
|
47
|
+
constructor(data: UploadResponse);
|
|
48
|
+
toColumnValue(): AttachmentColumnValue;
|
|
49
|
+
}
|
|
50
|
+
type IsWithinOperatorValue = 'pastWeek' | 'pastMonth' | 'pastYear' | 'nextWeek' | 'nextMonth' | 'nextYear' | 'daysFromNow' | 'daysAgo' | 'currentWeek' | 'currentMonth' | 'currentYear';
|
|
51
|
+
type DefaultDateFilterValue = ('today' | 'tomorrow' | 'yesterday' | 'oneWeekAgo' | 'oneWeekFromNow' | 'oneMonthAgo' | 'oneMonthFromNow') | ['exactDay' | 'exactTimestamp', string] | ['daysAgo' | 'daysFromNow', number];
|
|
52
|
+
type DateFilters = {
|
|
53
|
+
'=': DefaultDateFilterValue;
|
|
54
|
+
'!=': DefaultDateFilterValue;
|
|
55
|
+
'<': DefaultDateFilterValue;
|
|
56
|
+
'>': DefaultDateFilterValue;
|
|
57
|
+
'<=': DefaultDateFilterValue;
|
|
58
|
+
'>=': DefaultDateFilterValue;
|
|
59
|
+
isWithIn: IsWithinOperatorValue | {
|
|
60
|
+
value: 'daysAgo' | 'daysFromNow';
|
|
61
|
+
date: number;
|
|
62
|
+
};
|
|
63
|
+
isEmpty: boolean;
|
|
64
|
+
isNotEmpty: boolean;
|
|
65
|
+
};
|
|
66
|
+
type DateAggregations = {
|
|
67
|
+
empty: number;
|
|
68
|
+
filled: number;
|
|
69
|
+
unique: number;
|
|
70
|
+
percentEmpty: number;
|
|
71
|
+
percentFilled: number;
|
|
72
|
+
percentUnique: number;
|
|
73
|
+
min: number | null;
|
|
74
|
+
max: number | null;
|
|
75
|
+
daysRange: number | null;
|
|
76
|
+
monthRange: number | null;
|
|
77
|
+
};
|
|
78
|
+
type TextFilters = {
|
|
79
|
+
'=': string;
|
|
80
|
+
'!=': string;
|
|
81
|
+
caseEqual: string;
|
|
82
|
+
hasAnyOf: string[];
|
|
83
|
+
contains: string;
|
|
84
|
+
startsWith: string;
|
|
85
|
+
endsWith: string;
|
|
86
|
+
doesNotContain: string;
|
|
87
|
+
};
|
|
88
|
+
type LinkFilters = {
|
|
89
|
+
hasAnyOf: number[];
|
|
90
|
+
hasAllOf: number[];
|
|
91
|
+
isExactly: number[];
|
|
92
|
+
'=': number;
|
|
93
|
+
hasNoneOf: number[];
|
|
94
|
+
};
|
|
95
|
+
type LinkAggregations = {
|
|
96
|
+
empty: number;
|
|
97
|
+
filled: number;
|
|
98
|
+
percentEmpty: number;
|
|
99
|
+
percentFilled: number;
|
|
100
|
+
};
|
|
101
|
+
type NumberFilters = {
|
|
102
|
+
'>': number;
|
|
103
|
+
'>=': number;
|
|
104
|
+
'<': number;
|
|
105
|
+
'<=': number;
|
|
106
|
+
hasAnyOf: number[];
|
|
107
|
+
hasNoneOf: number[];
|
|
108
|
+
};
|
|
109
|
+
type NumberAggregations = {
|
|
110
|
+
sum: number;
|
|
111
|
+
average: number;
|
|
112
|
+
median: number;
|
|
113
|
+
min: number | null;
|
|
114
|
+
max: number | null;
|
|
115
|
+
range: number;
|
|
116
|
+
standardDeviation: number;
|
|
117
|
+
histogram: Record<string, number>;
|
|
118
|
+
empty: number;
|
|
119
|
+
filled: number;
|
|
120
|
+
unique: number;
|
|
121
|
+
percentEmpty: number;
|
|
122
|
+
percentFilled: number;
|
|
123
|
+
percentUnique: number;
|
|
124
|
+
};
|
|
125
|
+
type CheckboxFilters = {
|
|
126
|
+
'=': number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
* Column types
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
export type ColumnType<S, U, I, R extends boolean, F extends {
|
|
134
|
+
[key: string]: any;
|
|
135
|
+
} = object, A extends {
|
|
136
|
+
[key: string]: any;
|
|
137
|
+
} = object> = {
|
|
8
138
|
raw: S;
|
|
9
139
|
insert: I;
|
|
10
140
|
update: U;
|
|
11
|
-
|
|
141
|
+
filters: F;
|
|
142
|
+
aggregations: A;
|
|
143
|
+
isRequired: R;
|
|
12
144
|
};
|
|
13
|
-
export type
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
deletedIds: number[];
|
|
17
|
-
} | undefined, number[] | undefined, 'link'> & {
|
|
145
|
+
export type DateColumnType<R extends boolean> = ColumnType<string, string, string, R, DateFilters, DateAggregations>;
|
|
146
|
+
export type TextColumnType<R extends boolean> = ColumnType<string, string, string, R, TextFilters>;
|
|
147
|
+
export type ALinkColumnType<T extends string, S, U, I, R extends boolean> = ColumnType<S, U, I, R, LinkFilters, LinkAggregations> & {
|
|
18
148
|
linkedTo: T;
|
|
19
149
|
};
|
|
20
|
-
export type
|
|
21
|
-
|
|
150
|
+
export type LinkColumnType<T extends string, R extends boolean> = ALinkColumnType<T, object, number | number[] | {
|
|
151
|
+
newIds: number[];
|
|
152
|
+
deletedIds: number[];
|
|
153
|
+
}, number | number[], R>;
|
|
154
|
+
export type AttachmentColumnType<R extends boolean> = ALinkColumnType<'attachmentTable', Attachment[], Attachment[] | {
|
|
155
|
+
newIds: number[];
|
|
156
|
+
deletedIds: number[];
|
|
157
|
+
} | number[], Attachment[] | number[], R>;
|
|
158
|
+
export type NumberColumnType<R extends boolean> = ColumnType<number, number, number, R, NumberFilters, NumberAggregations>;
|
|
159
|
+
export type CheckboxColumnType<R extends boolean> = ColumnType<boolean, boolean, boolean, R, CheckboxFilters>;
|
|
160
|
+
export type AutoGeneratedNumberColumnType = ColumnType<number, never, never, false, NumberFilters, NumberAggregations>;
|
|
161
|
+
export type AutoGeneratedDateColumnType = ColumnType<string, never, never, false, DateFilters, DateAggregations>;
|
|
162
|
+
export {};
|
package/dist/esm/column-types.js
CHANGED
|
@@ -4,5 +4,27 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
export {
|
|
7
|
+
export class Attachment {
|
|
8
|
+
collectionName;
|
|
9
|
+
fileInformation;
|
|
10
|
+
metadata;
|
|
11
|
+
baseId;
|
|
12
|
+
storageAdaptor;
|
|
13
|
+
_id;
|
|
14
|
+
constructor(data) {
|
|
15
|
+
this.collectionName = data.collectionName;
|
|
16
|
+
this.fileInformation = data.fileInformation;
|
|
17
|
+
this.metadata = data.metadata;
|
|
18
|
+
this.baseId = data.baseId;
|
|
19
|
+
this.storageAdaptor = data.storageAdaptor;
|
|
20
|
+
this._id = data._id;
|
|
21
|
+
}
|
|
22
|
+
toColumnValue() {
|
|
23
|
+
return {
|
|
24
|
+
url: this.fileInformation.path,
|
|
25
|
+
fileType: this.fileInformation.mimetype,
|
|
26
|
+
size: this.fileInformation.size,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
8
30
|
//# sourceMappingURL=column-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column-types.js","sourceRoot":"","sources":["../../src/column-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
1
|
+
{"version":3,"file":"column-types.js","sourceRoot":"","sources":["../../src/column-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmCH,MAAM,OAAO,UAAU;IACL,cAAc,CAAS;IACvB,eAAe,CAAkB;IACjC,QAAQ,CAAsC;IAC9C,MAAM,CAAS;IACf,cAAc,CAAS;IACvB,GAAG,CAAS;IAE5B,YAAY,IAAoB;QAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACtB,CAAC;IAED,aAAa;QACX,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI;YAC9B,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ;YACvC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI;SAChC,CAAC;IACJ,CAAC;CACF"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
|