jcc-express-mvc 1.2.7 → 1.2.9
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/index.d.ts +29 -0
- package/index.d.ts.map +1 -0
- package/lib/App.d.ts +19 -0
- package/lib/App.d.ts.map +1 -0
- package/lib/Auth/AuthMiddleware.d.ts +8 -0
- package/lib/Auth/AuthMiddleware.d.ts.map +1 -0
- package/lib/Auth/index.d.ts +16 -0
- package/lib/Auth/index.d.ts.map +1 -0
- package/lib/Command-Line/NodeArtisanCommand.d.ts +7 -0
- package/lib/Command-Line/NodeArtisanCommand.d.ts.map +1 -0
- package/lib/Command-Line/command.d.ts +11 -0
- package/lib/Command-Line/command.d.ts.map +1 -0
- package/lib/Command-Line/files/Controller.d.ts +8 -0
- package/lib/Command-Line/files/Controller.d.ts.map +1 -0
- package/lib/Command-Line/files/Migration.d.ts +3 -0
- package/lib/Command-Line/files/Migration.d.ts.map +1 -0
- package/lib/Command-Line/files/Migration.js +1 -1
- package/lib/Command-Line/files/Models.d.ts +8 -0
- package/lib/Command-Line/files/Models.d.ts.map +1 -0
- package/lib/Command-Line/files/Request.d.ts +8 -0
- package/lib/Command-Line/files/Request.d.ts.map +1 -0
- package/lib/Command-Line/files/Request.js +1 -1
- package/lib/Command-Line/files/ResourcesController.d.ts +8 -0
- package/lib/Command-Line/files/ResourcesController.d.ts.map +1 -0
- package/lib/Command-Line/files/ResourcesController.js +2 -3
- package/lib/Command-Line/utils.d.ts +2 -0
- package/lib/Command-Line/utils.d.ts.map +1 -0
- package/lib/Config/Config.d.ts +8 -0
- package/lib/Config/Config.d.ts.map +1 -0
- package/lib/Database/src/BaseEntity.d.ts +67 -0
- package/lib/Database/src/BaseEntity.d.ts.map +1 -0
- package/lib/Database/src/BaseModel.d.ts +22 -0
- package/lib/Database/src/BaseModel.d.ts.map +1 -0
- package/lib/Database/src/Builder.d.ts +232 -0
- package/lib/Database/src/Builder.d.ts.map +1 -0
- package/lib/Database/src/Cast/index.d.ts +12 -0
- package/lib/Database/src/Cast/index.d.ts.map +1 -0
- package/lib/Database/src/Cast/types.d.ts +17 -0
- package/lib/Database/src/Cast/types.d.ts.map +1 -0
- package/lib/Database/src/Date/index.d.ts +11 -0
- package/lib/Database/src/Date/index.d.ts.map +1 -0
- package/lib/Database/src/Model.d.ts +26 -0
- package/lib/Database/src/Model.d.ts.map +1 -0
- package/lib/Database/src/Query.d.ts +7 -0
- package/lib/Database/src/Query.d.ts.map +1 -0
- package/lib/Database/src/QueryBuilder.d.ts +235 -0
- package/lib/Database/src/QueryBuilder.d.ts.map +1 -0
- package/lib/Database/src/QueryInstance.d.ts +8 -0
- package/lib/Database/src/QueryInstance.d.ts.map +1 -0
- package/lib/Database/src/RelationBuilder.d.ts +26 -0
- package/lib/Database/src/RelationBuilder.d.ts.map +1 -0
- package/lib/Database/src/Schema/BaseSchemaEntity/index.d.ts +10 -0
- package/lib/Database/src/Schema/BaseSchemaEntity/index.d.ts.map +1 -0
- package/lib/Database/src/Schema/BluePrint/index.d.ts +168 -0
- package/lib/Database/src/Schema/BluePrint/index.d.ts.map +1 -0
- package/lib/Database/src/Schema/index.d.ts +6 -0
- package/lib/Database/src/Schema/index.d.ts.map +1 -0
- package/lib/Database/src/db/connection.d.ts +5 -0
- package/lib/Database/src/db/connection.d.ts.map +1 -0
- package/lib/Database/src/type.d.ts +18 -0
- package/lib/Database/src/type.d.ts.map +1 -0
- package/lib/Database/src/utils/index.d.ts +45 -0
- package/lib/Database/src/utils/index.d.ts.map +1 -0
- package/lib/Error/AppError.d.ts +7 -0
- package/lib/Error/AppError.d.ts.map +1 -0
- package/lib/Error/AppErrorHandler.d.ts +10 -0
- package/lib/Error/AppErrorHandler.d.ts.map +1 -0
- package/lib/Error/Constants/error.d.ts +13 -0
- package/lib/Error/Constants/error.d.ts.map +1 -0
- package/lib/Error/Constants/index.d.ts +4 -0
- package/lib/Error/Constants/index.d.ts.map +1 -0
- package/lib/HttpKernel/HttpKernel.d.ts +7 -0
- package/lib/HttpKernel/HttpKernel.d.ts.map +1 -0
- package/lib/Interface/index.d.ts +43 -0
- package/lib/Interface/index.d.ts.map +1 -0
- package/lib/Middlewares/index.d.ts +45 -0
- package/lib/Middlewares/index.d.ts.map +1 -0
- package/lib/Middlewares/isLogin.d.ts +16 -0
- package/lib/Middlewares/isLogin.d.ts.map +1 -0
- package/lib/Passport/config.d.ts +10 -0
- package/lib/Passport/config.d.ts.map +1 -0
- package/lib/Request/FormRequest.d.ts +36 -0
- package/lib/Request/FormRequest.d.ts.map +1 -0
- package/lib/Request/request.d.ts +17 -0
- package/lib/Request/request.d.ts.map +1 -0
- package/lib/Response/index.d.ts +23 -0
- package/lib/Response/index.d.ts.map +1 -0
- package/lib/Routes/RouteBuilder.d.ts +45 -0
- package/lib/Routes/RouteBuilder.d.ts.map +1 -0
- package/lib/Routes/Router.d.ts +69 -0
- package/lib/Routes/Router.d.ts.map +1 -0
- package/lib/Server/index.d.ts +8 -0
- package/lib/Server/index.d.ts.map +1 -0
- package/lib/Services/ServiceContainer.d.ts +10 -0
- package/lib/Services/ServiceContainer.d.ts.map +1 -0
- package/lib/Services/ServiceProvider.d.ts +14 -0
- package/lib/Services/ServiceProvider.d.ts.map +1 -0
- package/lib/Templating-engine/engineHelper.d.ts +45 -0
- package/lib/Templating-engine/engineHelper.d.ts.map +1 -0
- package/lib/Templating-engine/expressions.d.ts +14 -0
- package/lib/Templating-engine/expressions.d.ts.map +1 -0
- package/lib/Templating-engine/index.d.ts +83 -0
- package/lib/Templating-engine/index.d.ts.map +1 -0
- package/lib/Type/index.d.ts +24 -0
- package/lib/Type/index.d.ts.map +1 -0
- package/lib/Validation/index.d.ts +12 -0
- package/lib/Validation/index.d.ts.map +1 -0
- package/lib/Validation/rules.d.ts +5 -0
- package/lib/Validation/rules.d.ts.map +1 -0
- package/lib/Validation/validate.d.ts +196 -0
- package/lib/Validation/validate.d.ts.map +1 -0
- package/lib/util/index.d.ts +93 -0
- package/lib/util/index.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../framework/lib/Database/src/Date/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAS;IAEd,YAAY,EAAE,OAAO,CAO1B;gBAEU,IAAI,EAAE,MAAM;IAIjB,gBAAgB,IAAI,MAAM,GAAG,MAAM;IAKnC,eAAe,IAAI,MAAM,GAAG,MAAM;IAYlC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAKjC,aAAa,IAAI,MAAM;CAG/B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { objType } from "./type";
|
|
2
|
+
import { BaseModel } from "./BaseModel";
|
|
3
|
+
export declare class Model extends BaseModel {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves a single record from the database table associated with the current model by its ID.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} id - The ID of the record to retrieve.
|
|
8
|
+
* @returns {Promise<Object>} A Promise that resolves with the found record, or an empty object if not found.
|
|
9
|
+
*/
|
|
10
|
+
static find(id: string | number): Promise<object>;
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves all records from the database table associated with the current model.
|
|
13
|
+
*
|
|
14
|
+
* @returns {Promise<any>} A Promise that resolves with all records.
|
|
15
|
+
*/
|
|
16
|
+
static all(): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates one or more records in the database table associated with the current model.
|
|
19
|
+
*
|
|
20
|
+
* @param {Object|Array<Object>} data - The data or array of data to insert.
|
|
21
|
+
* @returns {Promise<any>} A Promise that resolves with the inserted data.
|
|
22
|
+
* @throws {Error} Throws an error if the data type is not supported (neither object nor array).
|
|
23
|
+
*/
|
|
24
|
+
static create(data: Array<objType> | objType): Promise<any>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Database/src/Model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,KAAM,SAAQ,SAAS;IAKlC;;;;;OAKG;WACiB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI9D;;;;OAIG;WACU,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAQhC;;;;;;OAMG;WACU,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;CAgBlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Database/src/Query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,qBAAa,KAAM,SAAQ,OAAO;IACzB,KAAK,EAAE,OAAO,CAAiB;IAEtC,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;CAM/C"}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { QueryInstance, objType } from "./type";
|
|
2
|
+
import { Query } from "./Query";
|
|
3
|
+
export declare class QueryBuilder extends Query {
|
|
4
|
+
protected static guard: Array<string>;
|
|
5
|
+
protected static fillable: Array<string>;
|
|
6
|
+
protected static hidden: Array<string>;
|
|
7
|
+
protected static casts: objType;
|
|
8
|
+
/**
|
|
9
|
+
* Fetch the first record from the database table.
|
|
10
|
+
* The table name is derived from the current class name or the previously set table name.
|
|
11
|
+
* @returns {Object} The first record if found, otherwise an empty object.
|
|
12
|
+
*/
|
|
13
|
+
static first(): Promise<QueryInstance>;
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the columns to select in a query.
|
|
16
|
+
*
|
|
17
|
+
* @param {...string} columns - The columns to select.
|
|
18
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
19
|
+
*/
|
|
20
|
+
static select(...columns: string[]): typeof QueryBuilder;
|
|
21
|
+
/**
|
|
22
|
+
* Marks the query to return distinct results.
|
|
23
|
+
*
|
|
24
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
25
|
+
*/
|
|
26
|
+
static distinct(): typeof QueryBuilder;
|
|
27
|
+
/**
|
|
28
|
+
* Specifies the table to query from.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} tableName - The name of the table to query from.
|
|
31
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
32
|
+
*/
|
|
33
|
+
static from(tableName: string): typeof QueryBuilder;
|
|
34
|
+
/**
|
|
35
|
+
* Adds a WHERE clause to the query.
|
|
36
|
+
*
|
|
37
|
+
* @param {string} column - The column to apply the condition on.
|
|
38
|
+
* @param {string} operator - The operator to use for the condition (e.g., '=', '>', '<').
|
|
39
|
+
* @param {any} value - The value to compare the column against.
|
|
40
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
41
|
+
*/
|
|
42
|
+
static where(column: string, operator: string | number, value?: string | number): typeof QueryBuilder;
|
|
43
|
+
/**
|
|
44
|
+
* Adds an OR WHERE clause to the query.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} column - The column to apply the condition on.
|
|
47
|
+
* @param {string} operator - The operator to use for the condition (e.g., '=', '>', '<').
|
|
48
|
+
* @param {any} value - The value to compare the column against.
|
|
49
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
50
|
+
*/
|
|
51
|
+
static orWhere(column: string, operator: string, value?: string | number): typeof QueryBuilder;
|
|
52
|
+
/**
|
|
53
|
+
* Specifies the column and direction for ordering the query results.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} column - The column to order by.
|
|
56
|
+
* @param {string} [direction="asc"] - The direction of ordering ("asc" for ascending, "desc" for descending).
|
|
57
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
58
|
+
*/
|
|
59
|
+
static orderBy(column: string, direction?: string): typeof QueryBuilder;
|
|
60
|
+
/**
|
|
61
|
+
* Limits the number of results returned by the query.
|
|
62
|
+
*
|
|
63
|
+
* @param {number} count - The maximum number of results to return.
|
|
64
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
65
|
+
*/
|
|
66
|
+
static limit(value: string | number): typeof QueryBuilder;
|
|
67
|
+
/**
|
|
68
|
+
* Limits the number of results returned by the query.
|
|
69
|
+
*
|
|
70
|
+
* @param {number} count - The maximum number of results to return.
|
|
71
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
72
|
+
*/
|
|
73
|
+
static take(value: string | number): typeof QueryBuilder;
|
|
74
|
+
/**
|
|
75
|
+
* Specifies the offset for starting the query results.
|
|
76
|
+
*
|
|
77
|
+
* @param {number} count - The number of rows to skip before starting to return rows.
|
|
78
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
79
|
+
*/
|
|
80
|
+
static offset(count: string | number): typeof QueryBuilder;
|
|
81
|
+
/**
|
|
82
|
+
* Specifies the columns to group the query results by.
|
|
83
|
+
*
|
|
84
|
+
* @param {...string} columns - The columns to group by.
|
|
85
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
86
|
+
*/
|
|
87
|
+
static groupBy(...columns: Array<string>): typeof QueryBuilder;
|
|
88
|
+
/**
|
|
89
|
+
* Adds a HAVING clause to the query.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} column - The column to apply the condition on.
|
|
92
|
+
* @param {string} operator - The operator to use for the condition (e.g., '=', '>', '<').
|
|
93
|
+
* @param {any} value - The value to compare the column against.
|
|
94
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
95
|
+
*/
|
|
96
|
+
static having(column: string, operator: string, value: string): typeof QueryBuilder;
|
|
97
|
+
/**
|
|
98
|
+
* Adds a JOIN clause to the query.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} table - The name of the table to join.
|
|
101
|
+
* @param {string} firstColumn - The column from the current table to join on.
|
|
102
|
+
* @param {string} operator - The operator to use for the join condition (e.g., '=', '>', '<').
|
|
103
|
+
* @param {string} secondColumn - The column from the joined table to join on.
|
|
104
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
105
|
+
*/
|
|
106
|
+
static join(type: string, table: string, firstColumn: string, operator: string, secondColumn: string): typeof QueryBuilder;
|
|
107
|
+
/**
|
|
108
|
+
* Adds an INNER JOIN clause to the query.
|
|
109
|
+
*
|
|
110
|
+
* @param {string} table - The name of the table to join.
|
|
111
|
+
* @param {string} firstColumn - The column from the current table to join on.
|
|
112
|
+
* @param {string} operator - The operator to use for the join condition (e.g., '=', '>', '<').
|
|
113
|
+
* @param {string} secondColumn - The column from the joined table to join on.
|
|
114
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
115
|
+
*/
|
|
116
|
+
static innerJoin(table: string, firstColumn: string, operator: string, secondColumn: string): typeof QueryBuilder;
|
|
117
|
+
/**
|
|
118
|
+
* Adds a LEFT JOIN clause to the query.
|
|
119
|
+
*
|
|
120
|
+
* @param {string} table - The name of the table to join.
|
|
121
|
+
* @param {string} firstColumn - The column from the current table to join on.
|
|
122
|
+
* @param {string} operator - The operator to use for the join condition (e.g., '=', '>', '<').
|
|
123
|
+
* @param {string} secondColumn - The column from the joined table to join on.
|
|
124
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
125
|
+
*/
|
|
126
|
+
static leftJoin(table: string, firstColumn: string, operator: string, secondColumn: string): typeof QueryBuilder;
|
|
127
|
+
/**
|
|
128
|
+
* Adds a RIGHT JOIN clause to the query.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} table - The name of the table to join.
|
|
131
|
+
* @param {string} firstColumn - The column from the current table to join on.
|
|
132
|
+
* @param {string} operator - The operator to use for the join condition (e.g., '=', '>', '<').
|
|
133
|
+
* @param {string} secondColumn - The column from the joined table to join on.
|
|
134
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
135
|
+
*/
|
|
136
|
+
static rightJoin(table: string, firstColumn: string, operator: string, secondColumn: string): typeof QueryBuilder;
|
|
137
|
+
/**
|
|
138
|
+
* Inserts data into the database and retrieves the inserted record.
|
|
139
|
+
*
|
|
140
|
+
* @param {Object} data - The data to insert into the database.
|
|
141
|
+
* @returns {Promise<any>} The inserted record.
|
|
142
|
+
*/
|
|
143
|
+
static insert(data: any): Promise<any>;
|
|
144
|
+
/**
|
|
145
|
+
* Sets the query to perform a delete operation.
|
|
146
|
+
*
|
|
147
|
+
* @returns {this} The instance of the model, allowing for method chaining.
|
|
148
|
+
*/
|
|
149
|
+
/**
|
|
150
|
+
* Executes the constructed query, loads specified relations, and resets the query builder state.
|
|
151
|
+
*
|
|
152
|
+
* @returns {Promise<Array>} A Promise that resolves with the fetched results including loaded relations.
|
|
153
|
+
*/
|
|
154
|
+
static get(): Promise<any>;
|
|
155
|
+
/**
|
|
156
|
+
* Sets the data to update for the query.
|
|
157
|
+
*
|
|
158
|
+
* @param {Object} data - The data to update.
|
|
159
|
+
* @returns {Promise<any>} The instance of the model, allowing for method chaining.
|
|
160
|
+
*/
|
|
161
|
+
static update(data?: objType): Promise<any>;
|
|
162
|
+
static latest(column?: string): typeof QueryBuilder;
|
|
163
|
+
/**
|
|
164
|
+
* Adds the specified relationships to the model.
|
|
165
|
+
*
|
|
166
|
+
* @param {...string} relations - The names of the relationships to add.
|
|
167
|
+
* @returns {typeof QueryBuilder} The instance of the model, allowing for method chaining.
|
|
168
|
+
*/
|
|
169
|
+
static with(...relations: any): typeof QueryBuilder;
|
|
170
|
+
/**
|
|
171
|
+
* Iterates over each record returned by the query, applies a callback function to each record, and collects the results in an array.
|
|
172
|
+
*
|
|
173
|
+
* @param {Function} callback - The function to be applied to each record. The function should accept a record as an argument and return a value.
|
|
174
|
+
* @returns {Promise<Array>} A promise that resolves to an array of results from applying the callback function to each record.
|
|
175
|
+
*/
|
|
176
|
+
static each(callback: (record: Array<any>) => any): Promise<any>;
|
|
177
|
+
/**
|
|
178
|
+
* Iterates over map record returned by the query, applies a callback function to map record, and collects the results in an array.
|
|
179
|
+
*
|
|
180
|
+
* @param {Function} callback - The function to be applied to map record. The function should accept a record as an argument and return a value.
|
|
181
|
+
* @returns {Promise<Array>} A promise that resolves to an array of results from applying the callback function to each record.
|
|
182
|
+
*/
|
|
183
|
+
static map(callback: (record: objType) => objType): Promise<Array<any>>;
|
|
184
|
+
/**
|
|
185
|
+
* Retrieves the value of a specified field from the first record that matches the current query conditions.
|
|
186
|
+
*
|
|
187
|
+
* @param {string} field - The field name whose value is to be retrieved.
|
|
188
|
+
* @returns {Promise<any>} A promise that resolves to the value of the specified field, or null if no records are found.
|
|
189
|
+
*/
|
|
190
|
+
static value(field: string): Promise<string | any>;
|
|
191
|
+
/**
|
|
192
|
+
* Checks if any records exist that match the current query conditions.
|
|
193
|
+
*
|
|
194
|
+
* @returns {Promise<boolean>} A promise that resolves to true if records exist, false otherwise.
|
|
195
|
+
*/
|
|
196
|
+
static exists(): Promise<boolean>;
|
|
197
|
+
/**
|
|
198
|
+
* Checks if no records exist that match the current query conditions.
|
|
199
|
+
*
|
|
200
|
+
* @returns {Promise<boolean>} A promise that resolves to true if no records exist, false otherwise.
|
|
201
|
+
*/
|
|
202
|
+
static doesntExist(): Promise<boolean>;
|
|
203
|
+
/**
|
|
204
|
+
* Executes a count query based on the current query builder state.
|
|
205
|
+
*
|
|
206
|
+
* @returns {Promise<number>} A Promise that resolves with the count of records.
|
|
207
|
+
*/
|
|
208
|
+
static count(): Promise<number>;
|
|
209
|
+
/**
|
|
210
|
+
* Executes a max query based on the current query builder state.
|
|
211
|
+
*
|
|
212
|
+
* @returns {Promise<number>} A Promise that resolves with the max of records.
|
|
213
|
+
*/
|
|
214
|
+
static max(column: string): Promise<number>;
|
|
215
|
+
/**
|
|
216
|
+
* Executes a min query based on the current query builder state.
|
|
217
|
+
*
|
|
218
|
+
* @returns {Promise<number>} A Promise that resolves with the min of records.
|
|
219
|
+
*/
|
|
220
|
+
static min(column: string): Promise<number>;
|
|
221
|
+
/**
|
|
222
|
+
* Executes a min query based on the current query builder state.
|
|
223
|
+
*
|
|
224
|
+
* @returns {Promise<number>} A Promise that resolves with the sum of records.
|
|
225
|
+
*/
|
|
226
|
+
static sum(column: string): Promise<number>;
|
|
227
|
+
/**
|
|
228
|
+
* Executes a average query based on the current query builder state.
|
|
229
|
+
*
|
|
230
|
+
* @returns {Promise<number>} A Promise that resolves with the sum of records.
|
|
231
|
+
*/
|
|
232
|
+
static avg(column: string): Promise<number>;
|
|
233
|
+
static resetQuery(): void;
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=QueryBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryBuilder.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Database/src/QueryBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,qBAAa,YAAa,SAAQ,KAAK;IACrC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IAC3C,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IAC9C,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IAC5C,SAAS,CAAC,MAAM,CAAC,K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,GAAG,CAAC,CAAC;IAMtB;;;;;OAKG;WACiB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC;IAK/D;;;;OAIG;WACiB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAK9C;;;;OAIG;WACiB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKnD;;;;OAIG;WACiB,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAK5C;;;;OAIG;WACiB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKxD;;;;OAIG;WACiB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKxD;;;;OAIG;WACiB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKxD;;;;OAIG;WACiB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKxD,MAAM,CAAC,UAAU;CAGlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryInstance.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Database/src/QueryInstance.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa,CAAC,CAAC;gBAEd,IAAI,EAAE,GAAG;IAIrB,OAAO,CAAC,KAAK;IAGN,IAAI;IAKJ,IAAI;IAOJ,MAAM;CAId"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { objType } from "./type";
|
|
2
|
+
import { BaseEntity } from "./BaseEntity";
|
|
3
|
+
export declare class RelationBuilder extends BaseEntity {
|
|
4
|
+
private parseRelations;
|
|
5
|
+
/**
|
|
6
|
+
* Call a relationship method on a model and execute it with the provided query data.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} modelName - The name of the model to call the relationship method on.
|
|
9
|
+
* @param {string} method - The name of the relationship method to call.
|
|
10
|
+
* @param {Object} queryData - The data to pass to the relationship query.
|
|
11
|
+
* @returns {Promise<any>} The result of the relationship query.
|
|
12
|
+
* @throws {Error} If the specified method is not a function on the model.
|
|
13
|
+
*/
|
|
14
|
+
protected buildRelation(modelName: string, method: string, queryResult: Array<any> | objType): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Validates and formats related data based on the specified type.
|
|
17
|
+
*
|
|
18
|
+
* @param {Object} data - The data object containing results and type.
|
|
19
|
+
* @returns {Promise<any>} A Promise that resolves with validated and formatted data.
|
|
20
|
+
if (!modelName) {
|
|
21
|
+
throw new Error("Model name is required for hasOne relationship.");
|
|
22
|
+
} */
|
|
23
|
+
validateRelatedType<T>(data: any): Promise<T | null>;
|
|
24
|
+
loadRelations(modelName: string, relations: string | string[], records: Array<any>): Promise<any>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=RelationBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationBuilder.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Database/src/RelationBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,qBAAa,eAAgB,SAAQ,UAAU;IAE7C,OAAO,CAAC,cAAc;IAItB;;;;;;;;OAQG;cACa,aAAa,CAC3B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,GAChC,OAAO,CAAC,GAAG,CAAC;IAWf;;;;;;;UAOM;IACA,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAkC7C,aAAa,CACxB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,EAC5B,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,GAClB,OAAO,CAAC,GAAG,CAAC;CAsChB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class BaseSchemaEntity {
|
|
2
|
+
static _createdAt: string;
|
|
3
|
+
static _updatedAt: string;
|
|
4
|
+
static columns: Array<string>;
|
|
5
|
+
static constraints: Array<string>;
|
|
6
|
+
static AddQueryToLastIndex(query: string, replaceQuery?: string): any;
|
|
7
|
+
static primaryKey(column: string): number;
|
|
8
|
+
static addReferencesOn(table: string): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../framework/lib/Database/src/Schema/BaseSchemaEntity/index.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,UAAU,SAAoD;IACrE,MAAM,CAAC,UAAU,SAC8D;IAC/E,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IACnC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAM;IAEvC,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,GAAE,MAAW,GAAG,GAAG;IAYzE,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM;IAIhC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM;CAQrC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export declare class Blueprint {
|
|
2
|
+
/**
|
|
3
|
+
* Adds an "id" column to the schema with INT type, AUTO_INCREMENT, and NOT NULL constraints.
|
|
4
|
+
* Sets the "id" column as the primary key.
|
|
5
|
+
*
|
|
6
|
+
* @returns {object} - The current instance for method chaining.
|
|
7
|
+
*/
|
|
8
|
+
id(): this;
|
|
9
|
+
/**
|
|
10
|
+
* Adds an unsigned BIGINT column to the schema.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} column - The name of the column.
|
|
13
|
+
*/
|
|
14
|
+
unsignedBigInteger(column: string): any;
|
|
15
|
+
default(value: string): this;
|
|
16
|
+
/**
|
|
17
|
+
* Adds a foreign key constraint to the schema.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} column - The name of the column to reference.
|
|
20
|
+
* @returns {object} - The current instance for method chaining.
|
|
21
|
+
*/
|
|
22
|
+
foreignId(column: string): this;
|
|
23
|
+
/**
|
|
24
|
+
* Specifies the table and column that the foreign key references.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} column - The column being referenced.
|
|
27
|
+
* @returns {object} - The current instance for method chaining.
|
|
28
|
+
*/
|
|
29
|
+
references(column: string): this;
|
|
30
|
+
/**
|
|
31
|
+
* Specifies cascade behavior for the current cascade on delete.
|
|
32
|
+
*
|
|
33
|
+
* @returns {object} - The current instance for method chaining.
|
|
34
|
+
*/
|
|
35
|
+
cascade(): this;
|
|
36
|
+
/**
|
|
37
|
+
* Specifies the table on which the current foreign key references are applied.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} table - The name of the table being referenced.
|
|
40
|
+
* @returns {object} - The current instance for method chaining.
|
|
41
|
+
*/
|
|
42
|
+
on(table: string): this;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the column name and defines its data type as VARCHAR with a specified length.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} column - The name of the column.
|
|
47
|
+
* @param {number} length - The length of the VARCHAR type.
|
|
48
|
+
* @returns {object} - The current instance for method chaining.
|
|
49
|
+
*/
|
|
50
|
+
string(column: string, length?: number | string): this;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the column name and defines its data type as INT with a specified length.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} column - The name of the column.
|
|
55
|
+
* @returns {object} - The current instance for method chaining.
|
|
56
|
+
*/
|
|
57
|
+
integer(column: string): this;
|
|
58
|
+
/**
|
|
59
|
+
* Sets the column name and defines its data type as BIGINT with a specified length.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} column - The name of the column.
|
|
62
|
+
* @returns {object} - The current instance for method chaining.
|
|
63
|
+
*/
|
|
64
|
+
bigInteger(column: string): this;
|
|
65
|
+
/**
|
|
66
|
+
* Sets the column name and defines its data type as TINYINT with a specified length.
|
|
67
|
+
*
|
|
68
|
+
* @param {string} column - The name of the column.
|
|
69
|
+
* @returns {object} - The current instance for method chaining.
|
|
70
|
+
*/
|
|
71
|
+
tinyInteger(column: string, size?: Number | string): this;
|
|
72
|
+
/**
|
|
73
|
+
* Sets the column name and defines its data type as CHAR with a specified length.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} column - The name of the column.
|
|
76
|
+
* @param {number} length - The length of the CHAR type.
|
|
77
|
+
* @returns {object} - The current instance for method chaining.
|
|
78
|
+
*/
|
|
79
|
+
char(column: string, length?: number | string): this;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the column name and defines its data type as TEXT .
|
|
82
|
+
*
|
|
83
|
+
* @param {string} column - The name of the column.
|
|
84
|
+
* @returns {object} - The current instance for method chaining.
|
|
85
|
+
*/
|
|
86
|
+
text(column: string): this;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the column name and defines its data type as LONGTEXT .
|
|
89
|
+
*
|
|
90
|
+
* @param {string} column - The name of the column.
|
|
91
|
+
* @returns {object} - The current instance for method chaining.
|
|
92
|
+
*/
|
|
93
|
+
longText(column: string): this;
|
|
94
|
+
/**
|
|
95
|
+
* Sets the column name and defines its data type as TINYTEXT .
|
|
96
|
+
*
|
|
97
|
+
* @param {string} column - The name of the column.
|
|
98
|
+
* @returns {object} - The current instance for method chaining.
|
|
99
|
+
*/
|
|
100
|
+
tinyText(column: string, length?: string | number): this;
|
|
101
|
+
/**
|
|
102
|
+
* Sets the column name and defines its data type as BOOL with a specified length.
|
|
103
|
+
*
|
|
104
|
+
* @param {string} column - The name of the column.
|
|
105
|
+
* @returns {object} - The current instance for method chaining.
|
|
106
|
+
*/
|
|
107
|
+
boolean(column: string): number;
|
|
108
|
+
/**
|
|
109
|
+
* Sets the column name and defines its data type as BINARY with a specified length.
|
|
110
|
+
*
|
|
111
|
+
* @param {string} column - The name of the column.
|
|
112
|
+
* @returns {object} - The current instance for method chaining.
|
|
113
|
+
*/
|
|
114
|
+
binary(column: string, size: string | number): this;
|
|
115
|
+
/**
|
|
116
|
+
* Sets the last added column to allow NULL values.
|
|
117
|
+
*
|
|
118
|
+
* @returns {object} - The current instance for method chaining.
|
|
119
|
+
*/
|
|
120
|
+
nullable(): this;
|
|
121
|
+
/**
|
|
122
|
+
* Sets the last added column to have a UNIQUE constraint.
|
|
123
|
+
*
|
|
124
|
+
* @returns {object} - The current instance for method chaining.
|
|
125
|
+
*/
|
|
126
|
+
unique(): this;
|
|
127
|
+
/**
|
|
128
|
+
* Adds a DATETIME column to the schema.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} column - The name of the column.
|
|
131
|
+
* @returns {object} - The current instance for method chaining.
|
|
132
|
+
*/
|
|
133
|
+
dateTime(column: string): this;
|
|
134
|
+
/**
|
|
135
|
+
* Adds a DATE column to the schema.
|
|
136
|
+
*
|
|
137
|
+
* @param {string} column - The name of the column.
|
|
138
|
+
* @returns {object} - The current instance for method chaining.
|
|
139
|
+
*/
|
|
140
|
+
date(column: string): this;
|
|
141
|
+
/**
|
|
142
|
+
* Adds an ENUM column to the schema with specified types.
|
|
143
|
+
*
|
|
144
|
+
* @param {string} column - The name of the column.
|
|
145
|
+
* @param {Array<string>} types - The allowed values for the ENUM type.
|
|
146
|
+
* @returns {object} - The current instance for method chaining.
|
|
147
|
+
*/
|
|
148
|
+
enum(column: string, types?: string[]): this;
|
|
149
|
+
/**
|
|
150
|
+
* Adds a comment to the last added query in the schema.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} text - The comment text.
|
|
153
|
+
* @returns {object} - The current instance for method chaining.
|
|
154
|
+
*/
|
|
155
|
+
comment(text: string): this;
|
|
156
|
+
/**
|
|
157
|
+
* Adds "createdAt" and "updatedAt" timestamp columns to the schema.
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
timestamps(): any;
|
|
161
|
+
/**
|
|
162
|
+
* Adds a "deleted_at" column to the schema to support soft deletes.
|
|
163
|
+
*
|
|
164
|
+
*/
|
|
165
|
+
softDeletes(): number;
|
|
166
|
+
toSQL(tableName: string): string;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../framework/lib/Database/src/Schema/BluePrint/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;IAGpB;;;;;OAKG;IACH,EAAE,IAAI,IAAI;IAQV;;;;OAIG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG;IAIvC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK5B;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM;IAKzB;;;;OAIG;IACH,OAAO,IAAI,IAAI;IAKf;;;;;OAKG;IACH,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKvB;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,MAAY,GAAG,IAAI;IAK3D;;;;;OAKG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK7B;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKhC;;;;;OAKG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,GAAG,MAAW,GAAG,IAAI;IAK7D;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,GAAG,MAAY,GAAG,IAAI;IAKzD;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,GAA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{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../../framework/lib/Database/src/db/connection.ts"],"names":[],"mappings":"AAEA,qBAAa,QAAQ;YACL,OAAO;IASR,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CAI7D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type objType = {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
4
|
+
export type ICategory = {
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
};
|
|
8
|
+
export type QueryInstance = {
|
|
9
|
+
update: () => Promise<any>;
|
|
10
|
+
save: () => Promise<any>;
|
|
11
|
+
};
|
|
12
|
+
export type MassType = {
|
|
13
|
+
casts?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
hidden?: Array<string>;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../framework/lib/Database/src/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClC,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { objType } from "../type";
|
|
2
|
+
/**
|
|
3
|
+
* Pluralizes a string.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} str - The string to pluralize.
|
|
6
|
+
* @returns {string} The pluralized string.
|
|
7
|
+
*/
|
|
8
|
+
export declare const pluralize: (str: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Singularize a string.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} str - The string to singularize.
|
|
13
|
+
* @returns {string} The singularized string.
|
|
14
|
+
*/
|
|
15
|
+
export declare const singularize: (str: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Camelize a string.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} str - The string to camelize.
|
|
20
|
+
* @returns {string} The camelized string.
|
|
21
|
+
*/
|
|
22
|
+
export declare const camelize: (str: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Extracts and returns a specific value from an array of objects.
|
|
25
|
+
*
|
|
26
|
+
* @param {any} value - The value to extract from.
|
|
27
|
+
* @returns {any} The extracted value, or null if the input is not an array.
|
|
28
|
+
*/
|
|
29
|
+
export declare const countValue: (value: objType) => number;
|
|
30
|
+
/**
|
|
31
|
+
* Transforms data into keys and values arrays, formatting string values with single quotes.
|
|
32
|
+
*
|
|
33
|
+
* @param {Object} data - The data object to transform.
|
|
34
|
+
* @param {Array} guard - Array of guarded attributes.
|
|
35
|
+
* @param {Array} fillable - Array of fillable attributes.
|
|
36
|
+
* @returns {Object} Object containing keys and values arrays.
|
|
37
|
+
*/
|
|
38
|
+
export declare const transformData: (data: objType, fillable?: Array<string>, guard?: Array<string>) => {
|
|
39
|
+
keys: Array<string>;
|
|
40
|
+
values: Array<string>;
|
|
41
|
+
};
|
|
42
|
+
export declare const extractFirst: (data: Array<objType> | objType) => objType | objType;
|
|
43
|
+
export declare const appRoot: (file: string) => any;
|
|
44
|
+
export declare const getModelFile: (modelName: string) => string;
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../framework/lib/Database/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAKlC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,MAEvC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,MAEzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAS,MAAM,KAAG,MAMtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,MAU3C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,SAClB,OAAO,aACH,KAAK,CAAC,MAAM,CAAC,UAChB,KAAK,CAAC,MAAM,CAAC,KACnB;IAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAmC9C,CAAC;AAEF,eAAO,MAAM,YAAY,SACjB,KAAK,CAAC,OAAO,CAAC,GAAG,OAAO,KAC7B,OAAO,GAAG,OAKZ,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,MAAM,KAAG,GAEtC,CAAC;AAEF,eAAO,MAAM,YAAY,cAAe,MAAM,KAAG,MAEhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppError.d.ts","sourceRoot":"","sources":["../../../framework/lib/Error/AppError.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;gBACd,OAAO,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;CAMrE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Application } from "express";
|
|
2
|
+
import { AppNext, AppRequest, AppResponse } from "../Interface";
|
|
3
|
+
import { AppError } from "./AppError";
|
|
4
|
+
export declare class AppErrorHandler {
|
|
5
|
+
private app;
|
|
6
|
+
constructor(app: Application);
|
|
7
|
+
errorRoutesHandler(): Application;
|
|
8
|
+
handler(err: AppError, req: AppRequest, res: AppResponse, next: AppNext): any;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AppErrorHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppErrorHandler.d.ts","sourceRoot":"","sources":["../../../framework/lib/Error/AppErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,qBAAa,eAAe;IAC1B,OAAO,CAAC,GAAG,CAAc;gBACb,GAAG,EAAE,WAAW;IAIrB,kBAAkB;IAMzB,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO;CAuBxE"}
|