flamerest 1.0.92 → 1.0.93
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/REST.d.ts +1 -1
- package/REST.js +6 -2
- package/package.json +1 -1
package/REST.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ interface IREST {
|
|
|
69
69
|
* @param {object} params
|
|
70
70
|
* @returns
|
|
71
71
|
*/
|
|
72
|
-
all<T>(table: string, params?: { where?: object, extfields?: object | Array<string>, fields?: object | Array<string>, sort?: Array<string>, page?: number, perPage?: number, tree?: number }): Promise<Rows<T>>,
|
|
72
|
+
all<T>(table: string, params?: { where?: object, extfields?: object | Array<string>, fields?: object | Array<string>, sort?: Array<string>, page?: number, perPage?: number, tree?: number, params?: any }): Promise<Rows<T>>,
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Получить одну запись по ID или по условию выборки [первая запись]
|
package/REST.js
CHANGED
|
@@ -319,9 +319,10 @@ class FLAMEREST {
|
|
|
319
319
|
* @param format
|
|
320
320
|
* @param titles Это чтобы мы могли контроллить какие названия полей мы будет загружать при экспорте, чтобы они были как в таблице
|
|
321
321
|
* @param tree дерево
|
|
322
|
+
* @param params Доп параметры для кастомизации запроса на беке
|
|
322
323
|
* @return Promise<>
|
|
323
324
|
*/
|
|
324
|
-
get(table, where, extfields, fields, sortfields, page, perPage, RemoveDuplicates, format, titles, tree) {
|
|
325
|
+
get(table, where, extfields, fields, sortfields, page, perPage, RemoveDuplicates, format, titles, tree, params) {
|
|
325
326
|
|
|
326
327
|
// Нормализуем имена таблиц
|
|
327
328
|
table = table.replace(/_/g, "");
|
|
@@ -353,6 +354,9 @@ class FLAMEREST {
|
|
|
353
354
|
if (extfields !== undefined && extfields !== null)
|
|
354
355
|
json.extfields = extfields;
|
|
355
356
|
|
|
357
|
+
if (params !== undefined && params !== null)
|
|
358
|
+
json.params = params;
|
|
359
|
+
|
|
356
360
|
if (RemoveDuplicates !== undefined && RemoveDuplicates !== null)
|
|
357
361
|
json.RemoveDuplicates = true;
|
|
358
362
|
|
|
@@ -378,7 +382,7 @@ class FLAMEREST {
|
|
|
378
382
|
* @returns {object}
|
|
379
383
|
*/
|
|
380
384
|
all(table, params) {
|
|
381
|
-
return this.get(table, params?.where, params?.extfields, params?.fields, params?.sort, params?.page, params?.perPage, null, null, null, params?.tree);
|
|
385
|
+
return this.get(table, params?.where, params?.extfields, params?.fields, params?.sort, params?.page, params?.perPage, null, null, null, params?.tree, params?.params);
|
|
382
386
|
}
|
|
383
387
|
|
|
384
388
|
/**
|