@saltcorn/data 1.4.5 → 1.4.6
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/dist/base-plugin/index.d.ts +243 -243
- package/dist/base-plugin/index.d.ts.map +1 -1
- package/dist/models/table.d.ts.map +1 -1
- package/dist/models/table.js +21 -13
- package/dist/models/table.js.map +1 -1
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/user.js +1 -0
- package/dist/models/user.js.map +1 -1
- package/package.json +8 -8
- package/webpack.config.js +10 -0
|
@@ -1028,31 +1028,6 @@ export const types: ({
|
|
|
1028
1028
|
validate: () => boolean;
|
|
1029
1029
|
})[];
|
|
1030
1030
|
export const viewtemplates: ({
|
|
1031
|
-
name: string;
|
|
1032
|
-
description: string;
|
|
1033
|
-
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1034
|
-
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
1035
|
-
list_view: string;
|
|
1036
|
-
show_view: string;
|
|
1037
|
-
subtables: object;
|
|
1038
|
-
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
1039
|
-
getRowQuery: any;
|
|
1040
|
-
}) => Promise<import("@saltcorn/markup/types").TagFunction>;
|
|
1041
|
-
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
1042
|
-
list_view: string;
|
|
1043
|
-
show_view: any;
|
|
1044
|
-
}) => Promise<object[]>;
|
|
1045
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1046
|
-
list_view: string;
|
|
1047
|
-
_omit_state_form: boolean;
|
|
1048
|
-
}) => boolean;
|
|
1049
|
-
connectedObjects: ({ list_view, subtables }: {
|
|
1050
|
-
list_view: any;
|
|
1051
|
-
subtables: any;
|
|
1052
|
-
}) => Promise<{
|
|
1053
|
-
embeddedViews: import("../models").View[];
|
|
1054
|
-
}>;
|
|
1055
|
-
} | {
|
|
1056
1031
|
name: string;
|
|
1057
1032
|
description: string;
|
|
1058
1033
|
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
@@ -1119,6 +1094,183 @@ export const viewtemplates: ({
|
|
|
1119
1094
|
warnings: string[];
|
|
1120
1095
|
}>;
|
|
1121
1096
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1097
|
+
} | {
|
|
1098
|
+
name: string;
|
|
1099
|
+
description: string;
|
|
1100
|
+
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1101
|
+
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req, isPreview, hiddenLoginDest }: {
|
|
1102
|
+
req: object;
|
|
1103
|
+
res: object;
|
|
1104
|
+
}, { editQuery }: {
|
|
1105
|
+
editQuery: any;
|
|
1106
|
+
}) => Promise<import("../models").Form>;
|
|
1107
|
+
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste, confirm_leave, enable_realtime, update_events, }: {
|
|
1108
|
+
columns: any;
|
|
1109
|
+
layout: any;
|
|
1110
|
+
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1111
|
+
editManyQuery: any;
|
|
1112
|
+
getRowQuery: any;
|
|
1113
|
+
optionsQuery: any;
|
|
1114
|
+
}) => Promise<import("../models").Form[]>;
|
|
1115
|
+
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1116
|
+
columns: object[];
|
|
1117
|
+
layout: Layout;
|
|
1118
|
+
fixed: object;
|
|
1119
|
+
view_when_done: boolean;
|
|
1120
|
+
formula_destinations: object[];
|
|
1121
|
+
}, state: object, body: any, { res, req, redirect }: {
|
|
1122
|
+
res: object;
|
|
1123
|
+
req: object;
|
|
1124
|
+
redirect: string;
|
|
1125
|
+
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1126
|
+
tryInsertQuery: any;
|
|
1127
|
+
tryUpdateQuery: any;
|
|
1128
|
+
getRowQuery: any;
|
|
1129
|
+
saveFileQuery: any;
|
|
1130
|
+
saveFileFromContentsQuery: any;
|
|
1131
|
+
optionsQuery: any;
|
|
1132
|
+
getRowByIdQuery: any;
|
|
1133
|
+
}, remote: any) => Promise<void>;
|
|
1134
|
+
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
1135
|
+
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
1136
|
+
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1137
|
+
columns: any;
|
|
1138
|
+
}) => Promise<object[]>;
|
|
1139
|
+
initial_config: Function;
|
|
1140
|
+
createBasicView: ({ table, viewname, template_view, template_table, all_views_created, }: {
|
|
1141
|
+
table: any;
|
|
1142
|
+
viewname: any;
|
|
1143
|
+
template_view: any;
|
|
1144
|
+
template_table: any;
|
|
1145
|
+
all_views_created: any;
|
|
1146
|
+
}) => Promise<any>;
|
|
1147
|
+
authorise_post: ({ body, table_id, req }: {
|
|
1148
|
+
body: object;
|
|
1149
|
+
table_id: string;
|
|
1150
|
+
req: object;
|
|
1151
|
+
}, { authorizePostQuery }: {
|
|
1152
|
+
authorizePostQuery: any;
|
|
1153
|
+
}) => Promise<boolean>;
|
|
1154
|
+
virtual_triggers: (table_id: any, viewname: any, { enable_realtime, update_events }: {
|
|
1155
|
+
enable_realtime: any;
|
|
1156
|
+
update_events: any;
|
|
1157
|
+
}) => {
|
|
1158
|
+
when_trigger: string;
|
|
1159
|
+
table_id: any;
|
|
1160
|
+
run: (row: any, { old_row, user }: {
|
|
1161
|
+
old_row: any;
|
|
1162
|
+
user: any;
|
|
1163
|
+
}) => Promise<void>;
|
|
1164
|
+
}[];
|
|
1165
|
+
authorise_get: ({ query, table_id, req }: {
|
|
1166
|
+
query: object;
|
|
1167
|
+
rest: any[];
|
|
1168
|
+
}, { authorizeGetQuery }: {
|
|
1169
|
+
authorizeGetQuery: any;
|
|
1170
|
+
}) => Promise<boolean>;
|
|
1171
|
+
getStringsForI18n({ layout }: {
|
|
1172
|
+
layout: Layout;
|
|
1173
|
+
}): string[];
|
|
1174
|
+
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, confirm_leave, auto_create, delete_unchanged_auto_create, enable_realtime, update_events, }, req, res, }: {
|
|
1175
|
+
table_id: any;
|
|
1176
|
+
name: any;
|
|
1177
|
+
configuration: {
|
|
1178
|
+
columns: any;
|
|
1179
|
+
default_state: any;
|
|
1180
|
+
layout: any;
|
|
1181
|
+
auto_save: any;
|
|
1182
|
+
split_paste: any;
|
|
1183
|
+
destination_type: any;
|
|
1184
|
+
fixed: any;
|
|
1185
|
+
confirm_leave: any;
|
|
1186
|
+
auto_create: any;
|
|
1187
|
+
delete_unchanged_auto_create: any;
|
|
1188
|
+
enable_realtime: any;
|
|
1189
|
+
update_events: any;
|
|
1190
|
+
};
|
|
1191
|
+
req: any;
|
|
1192
|
+
res: any;
|
|
1193
|
+
}) => {
|
|
1194
|
+
editQuery(state: any, mobileReferrer: any, isPreview: any, hiddenLoginDest: any): Promise<import("../models").Form>;
|
|
1195
|
+
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1196
|
+
limit: any;
|
|
1197
|
+
offset: any;
|
|
1198
|
+
orderBy: any;
|
|
1199
|
+
orderDesc: any;
|
|
1200
|
+
where: any;
|
|
1201
|
+
}): Promise<{
|
|
1202
|
+
table: import("../models").Table | null;
|
|
1203
|
+
fields: import("../models").Field[];
|
|
1204
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1205
|
+
}>;
|
|
1206
|
+
tryInsertQuery(row: any): Promise<{
|
|
1207
|
+
error: string;
|
|
1208
|
+
} | {
|
|
1209
|
+
success: import("@saltcorn/db-common/internal").PrimaryKeyValue;
|
|
1210
|
+
}>;
|
|
1211
|
+
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1212
|
+
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1213
|
+
saveFileFromContentsQuery(fieldVal: any, fieldId: any, fieldView: any, row: any, filename: any, encoding?: string): Promise<string | number>;
|
|
1214
|
+
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null>;
|
|
1215
|
+
authorizeGetQuery(query: any, table_id: any): Promise<string | number | boolean | null | undefined>;
|
|
1216
|
+
getRowQuery(table_id: any, view_select: any, row_id: any, order_field: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1217
|
+
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1218
|
+
actionQuery(): Promise<any>;
|
|
1219
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1220
|
+
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1221
|
+
rowError: any;
|
|
1222
|
+
inEditError?: undefined;
|
|
1223
|
+
error?: undefined;
|
|
1224
|
+
} | {
|
|
1225
|
+
inEditError: any;
|
|
1226
|
+
rowError?: undefined;
|
|
1227
|
+
error?: undefined;
|
|
1228
|
+
} | {
|
|
1229
|
+
error: any;
|
|
1230
|
+
rowError?: undefined;
|
|
1231
|
+
inEditError?: undefined;
|
|
1232
|
+
}>;
|
|
1233
|
+
};
|
|
1234
|
+
routes: {
|
|
1235
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1236
|
+
columns: object[];
|
|
1237
|
+
layout: any;
|
|
1238
|
+
}, body: any, { req, res }: {
|
|
1239
|
+
req: object;
|
|
1240
|
+
res: any;
|
|
1241
|
+
}, { actionQuery }: {
|
|
1242
|
+
actionQuery: any;
|
|
1243
|
+
}) => Promise<object>;
|
|
1244
|
+
update_matching_rows: (table_id: any, viewname: any, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1245
|
+
columns: any;
|
|
1246
|
+
layout: any;
|
|
1247
|
+
fixed: any;
|
|
1248
|
+
view_when_done: any;
|
|
1249
|
+
formula_destinations: any;
|
|
1250
|
+
auto_save: any;
|
|
1251
|
+
destination_type: any;
|
|
1252
|
+
dest_url_formula: any;
|
|
1253
|
+
page_when_done: any;
|
|
1254
|
+
page_group_when_done: any;
|
|
1255
|
+
}, body: any, { req, res, redirect }: {
|
|
1256
|
+
req: any;
|
|
1257
|
+
res: any;
|
|
1258
|
+
redirect: any;
|
|
1259
|
+
}, { updateMatchingQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1260
|
+
updateMatchingQuery: any;
|
|
1261
|
+
getRowQuery: any;
|
|
1262
|
+
saveFileQuery: any;
|
|
1263
|
+
saveFileFromContentsQuery: any;
|
|
1264
|
+
optionsQuery: any;
|
|
1265
|
+
getRowByIdQuery: any;
|
|
1266
|
+
}) => Promise<void>;
|
|
1267
|
+
};
|
|
1268
|
+
interpolate_title_string(table_id: any, title: any, state: any): Promise<string>;
|
|
1269
|
+
configCheck: (view: any) => Promise<{
|
|
1270
|
+
errors: string[];
|
|
1271
|
+
warnings: string[];
|
|
1272
|
+
}>;
|
|
1273
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1122
1274
|
} | {
|
|
1123
1275
|
name: string;
|
|
1124
1276
|
description: string;
|
|
@@ -1198,6 +1350,31 @@ export const viewtemplates: ({
|
|
|
1198
1350
|
warnings: string[];
|
|
1199
1351
|
}>;
|
|
1200
1352
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1353
|
+
} | {
|
|
1354
|
+
name: string;
|
|
1355
|
+
description: string;
|
|
1356
|
+
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1357
|
+
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
1358
|
+
list_view: string;
|
|
1359
|
+
show_view: string;
|
|
1360
|
+
subtables: object;
|
|
1361
|
+
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
1362
|
+
getRowQuery: any;
|
|
1363
|
+
}) => Promise<import("@saltcorn/markup/types").TagFunction>;
|
|
1364
|
+
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
1365
|
+
list_view: string;
|
|
1366
|
+
show_view: any;
|
|
1367
|
+
}) => Promise<object[]>;
|
|
1368
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1369
|
+
list_view: string;
|
|
1370
|
+
_omit_state_form: boolean;
|
|
1371
|
+
}) => boolean;
|
|
1372
|
+
connectedObjects: ({ list_view, subtables }: {
|
|
1373
|
+
list_view: any;
|
|
1374
|
+
subtables: any;
|
|
1375
|
+
}) => Promise<{
|
|
1376
|
+
embeddedViews: import("../models").View[];
|
|
1377
|
+
}>;
|
|
1201
1378
|
} | {
|
|
1202
1379
|
name: string;
|
|
1203
1380
|
description: string;
|
|
@@ -1242,6 +1419,47 @@ export const viewtemplates: ({
|
|
|
1242
1419
|
}[]>;
|
|
1243
1420
|
};
|
|
1244
1421
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1422
|
+
} | {
|
|
1423
|
+
name: string;
|
|
1424
|
+
description: string;
|
|
1425
|
+
get_state_fields: () => object[];
|
|
1426
|
+
configuration_workflow: (req: any) => import("../models").Workflow;
|
|
1427
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1428
|
+
columns: object[];
|
|
1429
|
+
layout: object;
|
|
1430
|
+
}, state: object, extra: object, { distinctValuesQuery, optionsQuery }: {
|
|
1431
|
+
distinctValuesQuery: any;
|
|
1432
|
+
optionsQuery: any;
|
|
1433
|
+
}) => Promise<Layout>;
|
|
1434
|
+
initial_config: () => Promise<object>;
|
|
1435
|
+
getStringsForI18n({ layout }: {
|
|
1436
|
+
layout: any;
|
|
1437
|
+
}): string[];
|
|
1438
|
+
routes: {
|
|
1439
|
+
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1440
|
+
req: any;
|
|
1441
|
+
res: any;
|
|
1442
|
+
}, { actionQuery }: {
|
|
1443
|
+
actionQuery: any;
|
|
1444
|
+
}) => Promise<any>;
|
|
1445
|
+
};
|
|
1446
|
+
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1447
|
+
table_id: any;
|
|
1448
|
+
viewname: any;
|
|
1449
|
+
configuration: {
|
|
1450
|
+
columns: any;
|
|
1451
|
+
};
|
|
1452
|
+
req: any;
|
|
1453
|
+
res: any;
|
|
1454
|
+
exttable_name: any;
|
|
1455
|
+
}) => {
|
|
1456
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, whereWithExisting: any, user: any): Promise<any>;
|
|
1457
|
+
actionQuery(state: any, rndid: any): Promise<any>;
|
|
1458
|
+
distinctValuesQuery(state: any): Promise<{
|
|
1459
|
+
distinct_values: {};
|
|
1460
|
+
role: any;
|
|
1461
|
+
}>;
|
|
1462
|
+
};
|
|
1245
1463
|
} | {
|
|
1246
1464
|
name: string;
|
|
1247
1465
|
description: string;
|
|
@@ -1363,224 +1581,6 @@ export const viewtemplates: ({
|
|
|
1363
1581
|
req: any;
|
|
1364
1582
|
}) => {};
|
|
1365
1583
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1366
|
-
} | {
|
|
1367
|
-
name: string;
|
|
1368
|
-
description: string;
|
|
1369
|
-
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1370
|
-
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req, isPreview, hiddenLoginDest }: {
|
|
1371
|
-
req: object;
|
|
1372
|
-
res: object;
|
|
1373
|
-
}, { editQuery }: {
|
|
1374
|
-
editQuery: any;
|
|
1375
|
-
}) => Promise<import("../models").Form>;
|
|
1376
|
-
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste, confirm_leave, enable_realtime, update_events, }: {
|
|
1377
|
-
columns: any;
|
|
1378
|
-
layout: any;
|
|
1379
|
-
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1380
|
-
editManyQuery: any;
|
|
1381
|
-
getRowQuery: any;
|
|
1382
|
-
optionsQuery: any;
|
|
1383
|
-
}) => Promise<import("../models").Form[]>;
|
|
1384
|
-
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1385
|
-
columns: object[];
|
|
1386
|
-
layout: Layout;
|
|
1387
|
-
fixed: object;
|
|
1388
|
-
view_when_done: boolean;
|
|
1389
|
-
formula_destinations: object[];
|
|
1390
|
-
}, state: object, body: any, { res, req, redirect }: {
|
|
1391
|
-
res: object;
|
|
1392
|
-
req: object;
|
|
1393
|
-
redirect: string;
|
|
1394
|
-
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1395
|
-
tryInsertQuery: any;
|
|
1396
|
-
tryUpdateQuery: any;
|
|
1397
|
-
getRowQuery: any;
|
|
1398
|
-
saveFileQuery: any;
|
|
1399
|
-
saveFileFromContentsQuery: any;
|
|
1400
|
-
optionsQuery: any;
|
|
1401
|
-
getRowByIdQuery: any;
|
|
1402
|
-
}, remote: any) => Promise<void>;
|
|
1403
|
-
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
1404
|
-
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
1405
|
-
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1406
|
-
columns: any;
|
|
1407
|
-
}) => Promise<object[]>;
|
|
1408
|
-
initial_config: Function;
|
|
1409
|
-
createBasicView: ({ table, viewname, template_view, template_table, all_views_created, }: {
|
|
1410
|
-
table: any;
|
|
1411
|
-
viewname: any;
|
|
1412
|
-
template_view: any;
|
|
1413
|
-
template_table: any;
|
|
1414
|
-
all_views_created: any;
|
|
1415
|
-
}) => Promise<any>;
|
|
1416
|
-
authorise_post: ({ body, table_id, req }: {
|
|
1417
|
-
body: object;
|
|
1418
|
-
table_id: string;
|
|
1419
|
-
req: object;
|
|
1420
|
-
}, { authorizePostQuery }: {
|
|
1421
|
-
authorizePostQuery: any;
|
|
1422
|
-
}) => Promise<boolean>;
|
|
1423
|
-
virtual_triggers: (table_id: any, viewname: any, { enable_realtime, update_events }: {
|
|
1424
|
-
enable_realtime: any;
|
|
1425
|
-
update_events: any;
|
|
1426
|
-
}) => {
|
|
1427
|
-
when_trigger: string;
|
|
1428
|
-
table_id: any;
|
|
1429
|
-
run: (row: any, { old_row, user }: {
|
|
1430
|
-
old_row: any;
|
|
1431
|
-
user: any;
|
|
1432
|
-
}) => Promise<void>;
|
|
1433
|
-
}[];
|
|
1434
|
-
authorise_get: ({ query, table_id, req }: {
|
|
1435
|
-
query: object;
|
|
1436
|
-
rest: any[];
|
|
1437
|
-
}, { authorizeGetQuery }: {
|
|
1438
|
-
authorizeGetQuery: any;
|
|
1439
|
-
}) => Promise<boolean>;
|
|
1440
|
-
getStringsForI18n({ layout }: {
|
|
1441
|
-
layout: Layout;
|
|
1442
|
-
}): string[];
|
|
1443
|
-
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, confirm_leave, auto_create, delete_unchanged_auto_create, enable_realtime, update_events, }, req, res, }: {
|
|
1444
|
-
table_id: any;
|
|
1445
|
-
name: any;
|
|
1446
|
-
configuration: {
|
|
1447
|
-
columns: any;
|
|
1448
|
-
default_state: any;
|
|
1449
|
-
layout: any;
|
|
1450
|
-
auto_save: any;
|
|
1451
|
-
split_paste: any;
|
|
1452
|
-
destination_type: any;
|
|
1453
|
-
fixed: any;
|
|
1454
|
-
confirm_leave: any;
|
|
1455
|
-
auto_create: any;
|
|
1456
|
-
delete_unchanged_auto_create: any;
|
|
1457
|
-
enable_realtime: any;
|
|
1458
|
-
update_events: any;
|
|
1459
|
-
};
|
|
1460
|
-
req: any;
|
|
1461
|
-
res: any;
|
|
1462
|
-
}) => {
|
|
1463
|
-
editQuery(state: any, mobileReferrer: any, isPreview: any, hiddenLoginDest: any): Promise<import("../models").Form>;
|
|
1464
|
-
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1465
|
-
limit: any;
|
|
1466
|
-
offset: any;
|
|
1467
|
-
orderBy: any;
|
|
1468
|
-
orderDesc: any;
|
|
1469
|
-
where: any;
|
|
1470
|
-
}): Promise<{
|
|
1471
|
-
table: import("../models").Table | null;
|
|
1472
|
-
fields: import("../models").Field[];
|
|
1473
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1474
|
-
}>;
|
|
1475
|
-
tryInsertQuery(row: any): Promise<{
|
|
1476
|
-
error: string;
|
|
1477
|
-
} | {
|
|
1478
|
-
success: import("@saltcorn/db-common/internal").PrimaryKeyValue;
|
|
1479
|
-
}>;
|
|
1480
|
-
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1481
|
-
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1482
|
-
saveFileFromContentsQuery(fieldVal: any, fieldId: any, fieldView: any, row: any, filename: any, encoding?: string): Promise<string | number>;
|
|
1483
|
-
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null>;
|
|
1484
|
-
authorizeGetQuery(query: any, table_id: any): Promise<string | number | boolean | null | undefined>;
|
|
1485
|
-
getRowQuery(table_id: any, view_select: any, row_id: any, order_field: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1486
|
-
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1487
|
-
actionQuery(): Promise<any>;
|
|
1488
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1489
|
-
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1490
|
-
rowError: any;
|
|
1491
|
-
inEditError?: undefined;
|
|
1492
|
-
error?: undefined;
|
|
1493
|
-
} | {
|
|
1494
|
-
inEditError: any;
|
|
1495
|
-
rowError?: undefined;
|
|
1496
|
-
error?: undefined;
|
|
1497
|
-
} | {
|
|
1498
|
-
error: any;
|
|
1499
|
-
rowError?: undefined;
|
|
1500
|
-
inEditError?: undefined;
|
|
1501
|
-
}>;
|
|
1502
|
-
};
|
|
1503
|
-
routes: {
|
|
1504
|
-
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1505
|
-
columns: object[];
|
|
1506
|
-
layout: any;
|
|
1507
|
-
}, body: any, { req, res }: {
|
|
1508
|
-
req: object;
|
|
1509
|
-
res: any;
|
|
1510
|
-
}, { actionQuery }: {
|
|
1511
|
-
actionQuery: any;
|
|
1512
|
-
}) => Promise<object>;
|
|
1513
|
-
update_matching_rows: (table_id: any, viewname: any, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1514
|
-
columns: any;
|
|
1515
|
-
layout: any;
|
|
1516
|
-
fixed: any;
|
|
1517
|
-
view_when_done: any;
|
|
1518
|
-
formula_destinations: any;
|
|
1519
|
-
auto_save: any;
|
|
1520
|
-
destination_type: any;
|
|
1521
|
-
dest_url_formula: any;
|
|
1522
|
-
page_when_done: any;
|
|
1523
|
-
page_group_when_done: any;
|
|
1524
|
-
}, body: any, { req, res, redirect }: {
|
|
1525
|
-
req: any;
|
|
1526
|
-
res: any;
|
|
1527
|
-
redirect: any;
|
|
1528
|
-
}, { updateMatchingQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1529
|
-
updateMatchingQuery: any;
|
|
1530
|
-
getRowQuery: any;
|
|
1531
|
-
saveFileQuery: any;
|
|
1532
|
-
saveFileFromContentsQuery: any;
|
|
1533
|
-
optionsQuery: any;
|
|
1534
|
-
getRowByIdQuery: any;
|
|
1535
|
-
}) => Promise<void>;
|
|
1536
|
-
};
|
|
1537
|
-
interpolate_title_string(table_id: any, title: any, state: any): Promise<string>;
|
|
1538
|
-
configCheck: (view: any) => Promise<{
|
|
1539
|
-
errors: string[];
|
|
1540
|
-
warnings: string[];
|
|
1541
|
-
}>;
|
|
1542
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1543
|
-
} | {
|
|
1544
|
-
name: string;
|
|
1545
|
-
description: string;
|
|
1546
|
-
get_state_fields: () => object[];
|
|
1547
|
-
configuration_workflow: (req: any) => import("../models").Workflow;
|
|
1548
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1549
|
-
columns: object[];
|
|
1550
|
-
layout: object;
|
|
1551
|
-
}, state: object, extra: object, { distinctValuesQuery, optionsQuery }: {
|
|
1552
|
-
distinctValuesQuery: any;
|
|
1553
|
-
optionsQuery: any;
|
|
1554
|
-
}) => Promise<Layout>;
|
|
1555
|
-
initial_config: () => Promise<object>;
|
|
1556
|
-
getStringsForI18n({ layout }: {
|
|
1557
|
-
layout: any;
|
|
1558
|
-
}): string[];
|
|
1559
|
-
routes: {
|
|
1560
|
-
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1561
|
-
req: any;
|
|
1562
|
-
res: any;
|
|
1563
|
-
}, { actionQuery }: {
|
|
1564
|
-
actionQuery: any;
|
|
1565
|
-
}) => Promise<any>;
|
|
1566
|
-
};
|
|
1567
|
-
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1568
|
-
table_id: any;
|
|
1569
|
-
viewname: any;
|
|
1570
|
-
configuration: {
|
|
1571
|
-
columns: any;
|
|
1572
|
-
};
|
|
1573
|
-
req: any;
|
|
1574
|
-
res: any;
|
|
1575
|
-
exttable_name: any;
|
|
1576
|
-
}) => {
|
|
1577
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, whereWithExisting: any, user: any): Promise<any>;
|
|
1578
|
-
actionQuery(state: any, rndid: any): Promise<any>;
|
|
1579
|
-
distinctValuesQuery(state: any): Promise<{
|
|
1580
|
-
distinct_values: {};
|
|
1581
|
-
role: any;
|
|
1582
|
-
}>;
|
|
1583
|
-
};
|
|
1584
1584
|
})[];
|
|
1585
1585
|
import fileviews = require("./fileviews");
|
|
1586
1586
|
import actions = require("./actions");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAwCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,KAAK,CAAC;YACjB,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,OAAO,CAAC,EAAE,KAAK,CAAC;SACjB,EAAE,CAAC;QACJ,iBAAiB,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC;IAEF,KAAY,cAAc,GAAG;QAC3B,eAAe,EAAE;YACf,SAAS,EAAE,KAAK,CAAC;YACjB,KAAK,EAAE,KAAK,CAAC;SACd,EAAE,CAAC;QACJ,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC;IAEF,KAAY,YAAY,GAAG;QACzB,aAAa,EAAE,KAAK,CAAC;QACrB,aAAa,EAAE,KAAK,CAAC;KACtB,CAAC;CACH;AAED,KAAK,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;AAC7C,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;AAC3C,KAAK,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;AAEvC,SAAS,KAAK,CAAC"}
|
package/dist/models/table.js
CHANGED
|
@@ -755,16 +755,23 @@ class Table {
|
|
|
755
755
|
const schema = db_1.default.getTenantSchemaPrefix();
|
|
756
756
|
const pkName = this.pk_name || "id";
|
|
757
757
|
if (isNode()) {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
758
|
+
const pkVals = ids.map((row) => row[pkName]);
|
|
759
|
+
await db_1.default.query(`delete from ${schema}"${db_1.default.sqlsanitize(this.name)}_sync_info" where ref = ANY($1)`, [pkVals]);
|
|
760
|
+
const tsParam = timestamp.valueOf() / 1000.0;
|
|
761
|
+
const insertParams = [tsParam];
|
|
762
|
+
const valueClauses = pkVals.map((pkVal, i) => {
|
|
763
|
+
insertParams.push(pkVal);
|
|
764
|
+
return `($${i + 2}, date_trunc('milliseconds', to_timestamp($1)), true)`;
|
|
765
|
+
});
|
|
766
|
+
await db_1.default.query(`insert into ${schema}"${db_1.default.sqlsanitize(this.name)}_sync_info" (ref, last_modified, deleted)
|
|
767
|
+
values ${valueClauses.join(",")}`, insertParams);
|
|
763
768
|
}
|
|
764
769
|
else {
|
|
770
|
+
const pkVals = ids.map((row) => row[pkName]);
|
|
771
|
+
const placeholders = pkVals.map((_, i) => `$${i + 1}`).join(",");
|
|
765
772
|
await db_1.default.query(`update "${db_1.default.sqlsanitize(this.name)}_sync_info"
|
|
766
773
|
set deleted = true, modified_local = true
|
|
767
|
-
where ref in (${
|
|
774
|
+
where ref in (${placeholders})`, pkVals);
|
|
768
775
|
}
|
|
769
776
|
}
|
|
770
777
|
}, (e) => {
|
|
@@ -1420,8 +1427,8 @@ class Table {
|
|
|
1420
1427
|
}
|
|
1421
1428
|
else {
|
|
1422
1429
|
await db_1.default.query(`insert into "${db_1.default.sqlsanitize(this.name)}_sync_info"
|
|
1423
|
-
(ref, modified_local, deleted)
|
|
1424
|
-
values(
|
|
1430
|
+
(ref, modified_local, deleted)
|
|
1431
|
+
values($1, true, false)`, [id]);
|
|
1425
1432
|
}
|
|
1426
1433
|
}, (e) => {
|
|
1427
1434
|
require("../db/state")
|
|
@@ -1441,8 +1448,8 @@ class Table {
|
|
|
1441
1448
|
]);
|
|
1442
1449
|
}
|
|
1443
1450
|
else {
|
|
1444
|
-
await db_1.default.query(`update "${db_1.default.sqlsanitize(this.name)}_sync_info" set modified_local = true
|
|
1445
|
-
where ref = $
|
|
1451
|
+
await db_1.default.query(`update "${db_1.default.sqlsanitize(this.name)}_sync_info" set modified_local = true
|
|
1452
|
+
where ref = $1 and last_modified = $2`, [id, oldLastModified ? oldLastModified.valueOf() : null]);
|
|
1446
1453
|
}
|
|
1447
1454
|
}, (e) => {
|
|
1448
1455
|
require("../db/state")
|
|
@@ -1696,14 +1703,15 @@ class Table {
|
|
|
1696
1703
|
await db_1.default.tryCatchInTransaction(async () => {
|
|
1697
1704
|
if (isNode()) {
|
|
1698
1705
|
const schemaPrefix = db_1.default.getTenantSchemaPrefix();
|
|
1706
|
+
const tsParam = (syncTimestamp ? syncTimestamp : await db_1.default.time()).valueOf() /
|
|
1707
|
+
1000.0;
|
|
1699
1708
|
await db_1.default.query(`insert into ${schemaPrefix}"${db_1.default.sqlsanitize(this.name)}_sync_info"
|
|
1700
|
-
|
|
1701
|
-
1000.0})))`);
|
|
1709
|
+
(ref, last_modified) values($1, date_trunc('milliseconds', to_timestamp($2)))`, [id, tsParam]);
|
|
1702
1710
|
}
|
|
1703
1711
|
else {
|
|
1704
1712
|
await db_1.default.query(`insert into "${db_1.default.sqlsanitize(this.name)}_sync_info"
|
|
1705
1713
|
(last_modified, ref, modified_local, deleted)
|
|
1706
|
-
values(NULL, $
|
|
1714
|
+
values(NULL, $1, true, false)`, [id]);
|
|
1707
1715
|
}
|
|
1708
1716
|
}, (e) => {
|
|
1709
1717
|
state.log(2, `Error inserting sync info for table ${this.name}: ${e.message}`);
|