namirasoft-node 1.4.101 → 1.4.103

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,46 +1,46 @@
1
- import * as express from "express";
2
- import { ErrorOperation, SortItem } from "namirasoft-core";
3
-
4
- export abstract class BaseDatabase
5
- {
6
- private tables: { [name: string]: any } = {};
7
- public req?: express.Request;
8
- public res?: express.Response;
9
- abstract init(): Promise<void>;
10
- abstract connect(): Promise<void>;
11
- abstract sync(force: boolean): Promise<void>;
12
- async seedBefore(): Promise<void>
13
- {
14
- }
15
- async seedAfter(): Promise<void>
16
- {
17
- }
18
- addTable(name: string, table: any)
19
- {
20
- this.tables[name] = table;
21
- }
22
- getTable<T>(name: string): T
23
- {
24
- let ans = this.tables[name] as T;
25
- if (!ans)
26
- ErrorOperation.throwHTTP(404, `Table '${name}' not found`);
27
- return ans;
28
- }
29
- paginate(page_number: number, page_size: number, page_size_default?: number): { offset: number, limit: number }
30
- {
31
- // page_number
32
- if (isNaN(page_number))
33
- page_number = 1;
34
- // page_size
35
- if (isNaN(page_size))
36
- if (page_size_default)
37
- page_size = page_size_default;
38
- if (isNaN(page_size))
39
- page_size = 25;
40
- //
41
- let offset = (page_number - 1) * page_size;
42
- let limit = page_size;
43
- return { offset, limit };
44
- }
45
- public abstract getSortOptions(sorts?: SortItem[] | undefined): any;
1
+ import * as express from "express";
2
+ import { ErrorOperation, SortItem } from "namirasoft-core";
3
+
4
+ export abstract class BaseDatabase
5
+ {
6
+ private tables: { [name: string]: any } = {};
7
+ public req?: express.Request;
8
+ public res?: express.Response;
9
+ abstract init(): Promise<void>;
10
+ abstract connect(): Promise<void>;
11
+ abstract sync(force: boolean): Promise<void>;
12
+ async seedBefore(): Promise<void>
13
+ {
14
+ }
15
+ async seedAfter(): Promise<void>
16
+ {
17
+ }
18
+ addTable(name: string, table: any)
19
+ {
20
+ this.tables[name] = table;
21
+ }
22
+ getTable<T>(name: string): T
23
+ {
24
+ let ans = this.tables[name] as T;
25
+ if (!ans)
26
+ ErrorOperation.throwHTTP(404, `Table '${name}' not found`);
27
+ return ans;
28
+ }
29
+ paginate(page_number: number, page_size: number, page_size_default?: number): { offset: number, limit: number }
30
+ {
31
+ // page_number
32
+ if (isNaN(page_number))
33
+ page_number = 1;
34
+ // page_size
35
+ if (isNaN(page_size))
36
+ if (page_size_default)
37
+ page_size = page_size_default;
38
+ if (isNaN(page_size))
39
+ page_size = 25;
40
+ //
41
+ let offset = (page_number - 1) * page_size;
42
+ let limit = page_size;
43
+ return { offset, limit };
44
+ }
45
+ public abstract getSortOptions(sorts?: SortItem[] | undefined): any;
46
46
  }
@@ -1,39 +1,39 @@
1
- import nodemailer from 'nodemailer';
2
- import Mail, { AttachmentLike } from "nodemailer/lib/mailer";
3
- import { Readable } from "stream";
4
-
5
- export abstract class BaseEmailService
6
- {
7
- username: string;
8
- constructor(username: string)
9
- {
10
- this.username = username;
11
- }
12
- protected abstract getTransform(): any;
13
- send(from: string | null, to: string, subject: string, text: string, html?: string | Buffer | Readable | AttachmentLike | undefined, callback?: (err: Error | null, info: any) => void)
14
- {
15
- let transform = this.getTransform();
16
- let transporter = nodemailer.createTransport(transform);
17
-
18
- let mailOptions: Mail.Options = {
19
- from: from ?? this.username,
20
- to,
21
- subject,
22
- text,
23
- html
24
- };
25
- if (html)
26
- mailOptions.html = html;
27
-
28
- transporter.sendMail(mailOptions, function (error, info)
29
- {
30
- if (callback)
31
- callback(error, info);
32
- else
33
- {
34
- if (error)
35
- console.log(error);
36
- }
37
- });
38
- }
1
+ import nodemailer from 'nodemailer';
2
+ import Mail, { AttachmentLike } from "nodemailer/lib/mailer";
3
+ import { Readable } from "stream";
4
+
5
+ export abstract class BaseEmailService
6
+ {
7
+ username: string;
8
+ constructor(username: string)
9
+ {
10
+ this.username = username;
11
+ }
12
+ protected abstract getTransform(): any;
13
+ send(from: string | null, to: string, subject: string, text: string, html?: string | Buffer | Readable | AttachmentLike | undefined, callback?: (err: Error | null, info: any) => void)
14
+ {
15
+ let transform = this.getTransform();
16
+ let transporter = nodemailer.createTransport(transform);
17
+
18
+ let mailOptions: Mail.Options = {
19
+ from: from ?? this.username,
20
+ to,
21
+ subject,
22
+ text,
23
+ html
24
+ };
25
+ if (html)
26
+ mailOptions.html = html;
27
+
28
+ transporter.sendMail(mailOptions, function (error, info)
29
+ {
30
+ if (callback)
31
+ callback(error, info);
32
+ else
33
+ {
34
+ if (error)
35
+ console.log(error);
36
+ }
37
+ });
38
+ }
39
39
  }
@@ -1,190 +1,192 @@
1
- import { ErrorOperation, FilterItem, FilterItemOperator } from "namirasoft-core";
2
-
3
- export interface BaseFilterItemBuilder_JoinTable<WhereOptions>
4
- {
5
- main: {
6
- column: string;
7
- };
8
- secondary: {
9
- column: string;
10
- };
11
- getExtraConditions?: (column: string) => WhereOptions[];
12
- }
13
-
14
- export type BaseFilterItemBuilder_Condition<WhereOptions> = {
15
- condition: WhereOptions;
16
- independant?: { not: boolean };
17
- };
18
-
19
- export abstract class BaseFilterItemBuilder<Table extends { getName: () => string; }, WhereOptions>
20
- {
21
- public async build(table_main: Table, table_joins: { [table: string]: BaseFilterItemBuilder_JoinTable<WhereOptions> }, filters?: FilterItem[] | undefined): Promise<WhereOptions[]>
22
- {
23
- let ans: WhereOptions[] = [];
24
- if (filters)
25
- {
26
- let conditions_in_select_main: { [table: string]: WhereOptions[] } = {};
27
- function get_conditions_in_select_main(name: string)
28
- {
29
- if (!conditions_in_select_main[name])
30
- conditions_in_select_main[name] = [];
31
- return conditions_in_select_main[name];
32
- }
33
- let processed: { [index: number]: boolean } = {};
34
-
35
- let getCondition_IDInSelect = async (table: string, not: boolean, conditions: WhereOptions[]): Promise<WhereOptions> =>
36
- {
37
- let join = table_joins[table];
38
- return this.getInSelect(table, not, join, conditions);
39
- }
40
-
41
- for (let i = 0; i < filters.length; i++)
42
- if (!processed[i])
43
- {
44
- const filter = filters[i];
45
- this.checkColumn(filter.table.name, filter.column.name);
46
- let is_table_main = table_main.getName() === filter.table.name;
47
- let column_name = this.getRealColumnName(filter.table.name, filter.column.name) ?? filter.column.name;
48
-
49
- let values = filter.values;
50
-
51
- if ([
52
- FilterItemOperator.all.equals.sign,
53
- FilterItemOperator.all.lessthan.sign,
54
- FilterItemOperator.all.lessthanequal.sign,
55
- FilterItemOperator.all.morethan.sign,
56
- FilterItemOperator.all.morethanequal.sign
57
- ].includes(filter.operator.sign))
58
- for (let v = 0; v < values.length; v++)
59
- this.checkValue(filter.table.name, filter.column.name, values[i]);
60
-
61
- if (filter.operator.count > 0)
62
- for (let j = i + 1; j < filters.length; j++)
63
- {
64
- const f = filters[j];
65
- if (filter.table.name == f.table.name)
66
- if (filter.column.name == f.column.name)
67
- if (filter.not == f.not)
68
- if (filter.operator.sign == f.operator.sign)
69
- {
70
- processed[j] = true;
71
- values.push(...f.values);
72
- }
73
- }
74
-
75
- let getNumbers = () =>
76
- {
77
- let nums: number[] = values.map(x => parseFloat(x));
78
- if (nums.filter(x => isNaN(x)).length > 0)
79
- ErrorOperation.throwHTTP(400, `Invalid number values for: '${values.join(",")}'`);
80
- return nums;
81
- };
82
- let addCondition = async (res: BaseFilterItemBuilder_Condition<WhereOptions>) =>
83
- {
84
- let condition: WhereOptions = res.condition;
85
- if (is_table_main)
86
- ans.push(condition);
87
- else
88
- {
89
- let join = table_joins[filter.table.name];
90
- if (res.independant || join?.getExtraConditions)
91
- ans.push(await getCondition_IDInSelect(filter.table.name, res.independant?.not ?? false, [condition, ...(join?.getExtraConditions?.(filter.column.name) ?? [])]));
92
- else
93
- get_conditions_in_select_main(filter.table.name).push(condition);
94
- }
95
- };
96
- if (column_name === "*")
97
- {
98
- if (filter.operator !== FilterItemOperator.all.equals)
99
- ErrorOperation.throwHTTP(400, `Invalid operator for all columns (*).`);
100
- else
101
- {
102
- let columns = this.getAdvancedSearchColumns(filter.table.name);
103
- for (let i = 0; i < values.length; i++)
104
- {
105
- const value = values[i];
106
- let conditions = await this.getAdvancedSearchConditions(columns, value);
107
- ans.push(...conditions);
108
- }
109
- }
110
- }
111
- else if (filter.operator == FilterItemOperator.all.equals)
112
- await addCondition(this.getIn(column_name, filter.not, values));
113
- else if (filter.operator == FilterItemOperator.all.contains)
114
- for (const value of values)
115
- await addCondition(this.getLike(column_name, filter.not, value));
116
- else if (filter.operator == FilterItemOperator.all.regex)
117
- for (const value of values)
118
- await addCondition(this.getRegex(column_name, filter.not, value));
119
- else if (filter.operator == FilterItemOperator.all.empty)
120
- await addCondition(this.getEmpty(column_name, filter.not));
121
- else if (filter.operator == FilterItemOperator.all.exists)
122
- await addCondition(this.getExists(column_name, filter.not));
123
- else if (filter.operator == FilterItemOperator.all.includes)
124
- await addCondition(this.getIncludes(column_name, filter.not, values));
125
- else if (filter.operator == FilterItemOperator.all.startswith)
126
- for (const value of values)
127
- await addCondition(this.getStartsWith(column_name, filter.not, value));
128
- else if (filter.operator == FilterItemOperator.all.endswith)
129
- for (const value of values)
130
- await addCondition(this.getEndsWith(column_name, filter.not, value));
131
- else if (filter.operator == FilterItemOperator.all.lessthan)
132
- {
133
- if (filter.not)
134
- await addCondition(this.getGTE(column_name, Math.max(...getNumbers())));
135
- else
136
- await addCondition(this.getLT(column_name, Math.max(...getNumbers())));
137
- }
138
- else if (filter.operator == FilterItemOperator.all.lessthanequal)
139
- {
140
- if (filter.not)
141
- await addCondition(this.getGT(column_name, Math.max(...getNumbers())));
142
- else
143
- await addCondition(this.getLTE(column_name, Math.max(...getNumbers())));
144
- }
145
- else if (filter.operator == FilterItemOperator.all.morethan)
146
- {
147
- if (filter.not)
148
- await addCondition(this.getLTE(column_name, Math.max(...getNumbers())));
149
- else
150
- await addCondition(this.getGT(column_name, Math.max(...getNumbers())));
151
- }
152
- else if (filter.operator == FilterItemOperator.all.morethanequal)
153
- {
154
- if (filter.not)
155
- await addCondition(this.getLT(column_name, Math.max(...getNumbers())));
156
- else
157
- await addCondition(this.getGTE(column_name, Math.max(...getNumbers())));
158
- }
159
- }
160
- for (let table of Object.keys(conditions_in_select_main))
161
- {
162
- let conditions = conditions_in_select_main[table];
163
- if (conditions.length > 0)
164
- ans.push(await getCondition_IDInSelect(table, false, conditions));
165
- }
166
- }
167
- return ans;
168
- }
169
- public abstract checkColumn(table_name: string, column_name: string): void;
170
- public abstract checkValue(table_name: string, column_name: string, value: string): void;
171
- public abstract getRealColumnName(table_name: string, column_name: string): string;
172
- public abstract getAdvancedSearchColumns(table_name: string): string[];
173
- public abstract getAdvancedSearchConditions(columns: string[], search: string): Promise<WhereOptions[]>;
174
- public abstract getIn(column_name: string, not: boolean, values: string[]): BaseFilterItemBuilder_Condition<WhereOptions>;
175
- public abstract getLike(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
176
- public abstract getRegex(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
177
- // Empty means the column exists but the value is undefined, null or ''
178
- public abstract getEmpty(column_name: string, not: boolean): BaseFilterItemBuilder_Condition<WhereOptions>;
179
- // Exist means the column does not exist or the value is undefined, null or ''
180
- public abstract getExists(column_name: string, not: boolean): BaseFilterItemBuilder_Condition<WhereOptions>;
181
- // Include is only used when there is a join and it means the column has one of the value
182
- public abstract getIncludes(column_name: string, not: boolean, values: string[]): BaseFilterItemBuilder_Condition<WhereOptions>;
183
- public abstract getStartsWith(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
184
- public abstract getEndsWith(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
185
- public abstract getLT(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
186
- public abstract getLTE(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
187
- public abstract getGT(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
188
- public abstract getGTE(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
189
- public abstract getInSelect(table_name: string, not: boolean, join: BaseFilterItemBuilder_JoinTable<WhereOptions>, conditions: WhereOptions[]): Promise<WhereOptions>;
1
+ import { ErrorOperation, FilterItem, FilterItemOperator } from "namirasoft-core";
2
+
3
+ export interface BaseFilterItemBuilder_JoinTable<WhereOptions>
4
+ {
5
+ main: {
6
+ column: string;
7
+ };
8
+ secondary: {
9
+ column: string;
10
+ };
11
+ getExtraConditions?: (column: string) => WhereOptions[];
12
+ }
13
+
14
+ export type BaseFilterItemBuilder_Condition<WhereOptions> = {
15
+ condition: WhereOptions;
16
+ independant?: { not: boolean };
17
+ };
18
+
19
+ export abstract class BaseFilterItemBuilder<Table extends { getName: () => string; }, WhereOptions>
20
+ {
21
+ public async build(table_main: Table, table_joins: { [table: string]: BaseFilterItemBuilder_JoinTable<WhereOptions> }, filters?: FilterItem[] | undefined): Promise<WhereOptions[]>
22
+ {
23
+ let ans: WhereOptions[] = [];
24
+ if (filters)
25
+ {
26
+ let conditions_in_select_main: { [table: string]: WhereOptions[] } = {};
27
+ function get_conditions_in_select_main(name: string)
28
+ {
29
+ if (!conditions_in_select_main[name])
30
+ conditions_in_select_main[name] = [];
31
+ return conditions_in_select_main[name];
32
+ }
33
+ let processed: { [index: number]: boolean } = {};
34
+
35
+ let getCondition_IDInSelect = async (table: string, not: boolean, conditions: WhereOptions[]): Promise<WhereOptions> =>
36
+ {
37
+ let join = table_joins[table];
38
+ return this.getInSelect(table, not, join, conditions);
39
+ }
40
+
41
+ for (let i = 0; i < filters.length; i++)
42
+ if (!processed[i])
43
+ {
44
+ const filter = filters[i];
45
+ this.checkColumn(filter.table.name, filter.column.name);
46
+ let is_table_main = table_main.getName() === filter.table.name;
47
+ let column_name = this.getRealColumnName(filter.table.name, filter.column.name) ?? filter.column.name;
48
+
49
+ let values = filter.values;
50
+
51
+ if ([
52
+ FilterItemOperator.all.equals.sign,
53
+ FilterItemOperator.all.lessthan.sign,
54
+ FilterItemOperator.all.lessthanequal.sign,
55
+ FilterItemOperator.all.morethan.sign,
56
+ FilterItemOperator.all.morethanequal.sign
57
+ ].includes(filter.operator.sign))
58
+ for (let v = 0; v < values.length; v++)
59
+ this.checkValue(filter.table.name, filter.column.name, values[i]);
60
+
61
+ if (filter.operator.count > 0)
62
+ for (let j = i + 1; j < filters.length; j++)
63
+ {
64
+ const f = filters[j];
65
+ if (filter.table.name == f.table.name)
66
+ if (filter.column.name == f.column.name)
67
+ if (filter.not == f.not)
68
+ if (filter.operator.sign == f.operator.sign)
69
+ {
70
+ processed[j] = true;
71
+ values.push(...f.values);
72
+ }
73
+ }
74
+
75
+ let escapedValues = values.map(v => this.escapeValue(v));
76
+ let getNumbers = () =>
77
+ {
78
+ let nums: number[] = values.map(x => parseFloat(x));
79
+ if (nums.filter(x => isNaN(x)).length > 0)
80
+ ErrorOperation.throwHTTP(400, `Invalid number values for: '${values.join(",")}'`);
81
+ return nums;
82
+ };
83
+ let addCondition = async (res: BaseFilterItemBuilder_Condition<WhereOptions>) =>
84
+ {
85
+ let condition: WhereOptions = res.condition;
86
+ if (is_table_main)
87
+ ans.push(condition);
88
+ else
89
+ {
90
+ let join = table_joins[filter.table.name];
91
+ if (res.independant || join?.getExtraConditions)
92
+ ans.push(await getCondition_IDInSelect(filter.table.name, res.independant?.not ?? false, [condition, ...(join?.getExtraConditions?.(filter.column.name) ?? [])]));
93
+ else
94
+ get_conditions_in_select_main(filter.table.name).push(condition);
95
+ }
96
+ };
97
+ if (column_name === "*")
98
+ {
99
+ if (filter.operator !== FilterItemOperator.all.equals)
100
+ ErrorOperation.throwHTTP(400, `Invalid operator for all columns (*).`);
101
+ else
102
+ {
103
+ let columns = this.getAdvancedSearchColumns(filter.table.name);
104
+ for (let i = 0; i < escapedValues.length; i++)
105
+ {
106
+ const value = escapedValues[i];
107
+ let conditions = await this.getAdvancedSearchConditions(columns, value);
108
+ ans.push(...conditions);
109
+ }
110
+ }
111
+ }
112
+ else if (filter.operator == FilterItemOperator.all.equals)
113
+ await addCondition(this.getIn(column_name, filter.not, escapedValues));
114
+ else if (filter.operator == FilterItemOperator.all.contains)
115
+ for (const value of escapedValues)
116
+ await addCondition(this.getLike(column_name, filter.not, value));
117
+ else if (filter.operator == FilterItemOperator.all.regex)
118
+ for (const value of escapedValues)
119
+ await addCondition(this.getRegex(column_name, filter.not, value));
120
+ else if (filter.operator == FilterItemOperator.all.empty)
121
+ await addCondition(this.getEmpty(column_name, filter.not));
122
+ else if (filter.operator == FilterItemOperator.all.exists)
123
+ await addCondition(this.getExists(column_name, filter.not));
124
+ else if (filter.operator == FilterItemOperator.all.includes)
125
+ await addCondition(this.getIncludes(column_name, filter.not, escapedValues));
126
+ else if (filter.operator == FilterItemOperator.all.startswith)
127
+ for (const value of escapedValues)
128
+ await addCondition(this.getStartsWith(column_name, filter.not, value));
129
+ else if (filter.operator == FilterItemOperator.all.endswith)
130
+ for (const value of escapedValues)
131
+ await addCondition(this.getEndsWith(column_name, filter.not, value));
132
+ else if (filter.operator == FilterItemOperator.all.lessthan)
133
+ {
134
+ if (filter.not)
135
+ await addCondition(this.getGTE(column_name, Math.max(...getNumbers())));
136
+ else
137
+ await addCondition(this.getLT(column_name, Math.max(...getNumbers())));
138
+ }
139
+ else if (filter.operator == FilterItemOperator.all.lessthanequal)
140
+ {
141
+ if (filter.not)
142
+ await addCondition(this.getGT(column_name, Math.max(...getNumbers())));
143
+ else
144
+ await addCondition(this.getLTE(column_name, Math.max(...getNumbers())));
145
+ }
146
+ else if (filter.operator == FilterItemOperator.all.morethan)
147
+ {
148
+ if (filter.not)
149
+ await addCondition(this.getLTE(column_name, Math.max(...getNumbers())));
150
+ else
151
+ await addCondition(this.getGT(column_name, Math.max(...getNumbers())));
152
+ }
153
+ else if (filter.operator == FilterItemOperator.all.morethanequal)
154
+ {
155
+ if (filter.not)
156
+ await addCondition(this.getLT(column_name, Math.max(...getNumbers())));
157
+ else
158
+ await addCondition(this.getGTE(column_name, Math.max(...getNumbers())));
159
+ }
160
+ }
161
+ for (let table of Object.keys(conditions_in_select_main))
162
+ {
163
+ let conditions = conditions_in_select_main[table];
164
+ if (conditions.length > 0)
165
+ ans.push(await getCondition_IDInSelect(table, false, conditions));
166
+ }
167
+ }
168
+ return ans;
169
+ }
170
+ public abstract checkColumn(table_name: string, column_name: string): void;
171
+ public abstract checkValue(table_name: string, column_name: string, value: string): void;
172
+ public abstract escapeValue(value: string): string;
173
+ public abstract getRealColumnName(table_name: string, column_name: string): string;
174
+ public abstract getAdvancedSearchColumns(table_name: string): string[];
175
+ public abstract getAdvancedSearchConditions(columns: string[], search: string): Promise<WhereOptions[]>;
176
+ public abstract getIn(column_name: string, not: boolean, values: string[]): BaseFilterItemBuilder_Condition<WhereOptions>;
177
+ public abstract getLike(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
178
+ public abstract getRegex(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
179
+ // Empty means the column exists but the value is undefined, null or ''
180
+ public abstract getEmpty(column_name: string, not: boolean): BaseFilterItemBuilder_Condition<WhereOptions>;
181
+ // Exist means the column does not exist or the value is undefined, null or ''
182
+ public abstract getExists(column_name: string, not: boolean): BaseFilterItemBuilder_Condition<WhereOptions>;
183
+ // Include is only used when there is a join and it means the column has one of the value
184
+ public abstract getIncludes(column_name: string, not: boolean, values: string[]): BaseFilterItemBuilder_Condition<WhereOptions>;
185
+ public abstract getStartsWith(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
186
+ public abstract getEndsWith(column_name: string, not: boolean, value: string): BaseFilterItemBuilder_Condition<WhereOptions>;
187
+ public abstract getLT(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
188
+ public abstract getLTE(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
189
+ public abstract getGT(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
190
+ public abstract getGTE(column_name: string, value: any): BaseFilterItemBuilder_Condition<WhereOptions>;
191
+ public abstract getInSelect(table_name: string, not: boolean, join: BaseFilterItemBuilder_JoinTable<WhereOptions>, conditions: WhereOptions[]): Promise<WhereOptions>;
190
192
  }