@saltcorn/data 1.1.1-beta.4 → 1.1.1-beta.5
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 +240 -240
- package/dist/plugin-helper.d.ts +1 -0
- package/package.json +8 -8
- package/dist/app-locales/public/da.json +0 -3
- package/dist/migrations/202501181435.d.ts +0 -2
- package/dist/migrations/202501181435.d.ts.map +0 -1
- package/dist/migrations/202501181435.js +0 -18
- package/dist/migrations/202501181435.js.map +0 -1
- package/dist/migrations/202501181437.d.ts +0 -2
- package/dist/migrations/202501181437.d.ts.map +0 -1
- package/dist/migrations/202501181437.js +0 -22
- package/dist/migrations/202501181437.js.map +0 -1
- package/dist/migrations/202501181440.d.ts +0 -2
- package/dist/migrations/202501181440.d.ts.map +0 -1
- package/dist/migrations/202501181440.js +0 -22
- package/dist/migrations/202501181440.js.map +0 -1
|
@@ -981,42 +981,6 @@ export const types: ({
|
|
|
981
981
|
validate: () => boolean;
|
|
982
982
|
})[];
|
|
983
983
|
export const viewtemplates: ({
|
|
984
|
-
name: string;
|
|
985
|
-
description: string;
|
|
986
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
987
|
-
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
988
|
-
list_view: string;
|
|
989
|
-
show_view: string;
|
|
990
|
-
subtables: object;
|
|
991
|
-
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
992
|
-
getRowQuery: any;
|
|
993
|
-
}) => Promise<div>;
|
|
994
|
-
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
995
|
-
list_view: string;
|
|
996
|
-
show_view: any;
|
|
997
|
-
}) => Promise<object[]>;
|
|
998
|
-
display_state_form: ({ list_view, _omit_state_form }: {
|
|
999
|
-
list_view: string;
|
|
1000
|
-
_omit_state_form: boolean;
|
|
1001
|
-
}) => boolean;
|
|
1002
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1003
|
-
table_id: any;
|
|
1004
|
-
viewname: any;
|
|
1005
|
-
configuration: {
|
|
1006
|
-
columns: any;
|
|
1007
|
-
default_state: any;
|
|
1008
|
-
};
|
|
1009
|
-
req: any;
|
|
1010
|
-
}) => {
|
|
1011
|
-
getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1012
|
-
};
|
|
1013
|
-
connectedObjects: ({ list_view, subtables }: {
|
|
1014
|
-
list_view: any;
|
|
1015
|
-
subtables: any;
|
|
1016
|
-
}) => Promise<{
|
|
1017
|
-
embeddedViews: import("../models/view")[];
|
|
1018
|
-
}>;
|
|
1019
|
-
} | {
|
|
1020
984
|
name: string;
|
|
1021
985
|
description: string;
|
|
1022
986
|
configuration_workflow: (req: object) => import("../models/workflow");
|
|
@@ -1077,6 +1041,166 @@ export const viewtemplates: ({
|
|
|
1077
1041
|
warnings: string[];
|
|
1078
1042
|
}>;
|
|
1079
1043
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1044
|
+
} | {
|
|
1045
|
+
name: string;
|
|
1046
|
+
description: string;
|
|
1047
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1048
|
+
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req, isPreview }: {
|
|
1049
|
+
req: object;
|
|
1050
|
+
res: object;
|
|
1051
|
+
}, { editQuery }: {
|
|
1052
|
+
editQuery: any;
|
|
1053
|
+
}) => Promise<import("../models/form")>;
|
|
1054
|
+
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste, confirm_leave }: {
|
|
1055
|
+
columns: any;
|
|
1056
|
+
layout: any;
|
|
1057
|
+
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1058
|
+
editManyQuery: any;
|
|
1059
|
+
getRowQuery: any;
|
|
1060
|
+
optionsQuery: any;
|
|
1061
|
+
}) => Promise<import("../models/form")[]>;
|
|
1062
|
+
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, }: {
|
|
1063
|
+
columns: object[];
|
|
1064
|
+
layout: Layout;
|
|
1065
|
+
fixed: object;
|
|
1066
|
+
view_when_done: boolean;
|
|
1067
|
+
formula_destinations: object[];
|
|
1068
|
+
}, state: object, body: any, { res, req, redirect }: {
|
|
1069
|
+
res: object;
|
|
1070
|
+
req: object;
|
|
1071
|
+
redirect: string;
|
|
1072
|
+
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1073
|
+
tryInsertQuery: any;
|
|
1074
|
+
tryUpdateQuery: any;
|
|
1075
|
+
getRowQuery: any;
|
|
1076
|
+
saveFileQuery: any;
|
|
1077
|
+
saveFileFromContentsQuery: any;
|
|
1078
|
+
optionsQuery: any;
|
|
1079
|
+
getRowByIdQuery: any;
|
|
1080
|
+
}, remote: any) => Promise<void>;
|
|
1081
|
+
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
1082
|
+
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
1083
|
+
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1084
|
+
columns: any;
|
|
1085
|
+
}) => Promise<object[]>;
|
|
1086
|
+
initial_config: Function;
|
|
1087
|
+
display_state_form: boolean;
|
|
1088
|
+
authorise_post: ({ body, table_id, req }: {
|
|
1089
|
+
body: object;
|
|
1090
|
+
table_id: string;
|
|
1091
|
+
req: object;
|
|
1092
|
+
}, { authorizePostQuery }: {
|
|
1093
|
+
authorizePostQuery: any;
|
|
1094
|
+
}) => Promise<boolean>;
|
|
1095
|
+
authorise_get: ({ query, table_id, req }: {
|
|
1096
|
+
query: object;
|
|
1097
|
+
rest: any;
|
|
1098
|
+
}, { authorizeGetQuery }: {
|
|
1099
|
+
authorizeGetQuery: any;
|
|
1100
|
+
}) => Promise<boolean>;
|
|
1101
|
+
getStringsForI18n({ layout }: {
|
|
1102
|
+
layout: Layout;
|
|
1103
|
+
}): string[];
|
|
1104
|
+
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, confirm_leave, auto_create, delete_unchanged_auto_create, }, req, res, }: {
|
|
1105
|
+
table_id: any;
|
|
1106
|
+
name: any;
|
|
1107
|
+
configuration: {
|
|
1108
|
+
columns: any;
|
|
1109
|
+
default_state: any;
|
|
1110
|
+
layout: any;
|
|
1111
|
+
auto_save: any;
|
|
1112
|
+
split_paste: any;
|
|
1113
|
+
destination_type: any;
|
|
1114
|
+
fixed: any;
|
|
1115
|
+
confirm_leave: any;
|
|
1116
|
+
auto_create: any;
|
|
1117
|
+
delete_unchanged_auto_create: any;
|
|
1118
|
+
};
|
|
1119
|
+
req: any;
|
|
1120
|
+
res: any;
|
|
1121
|
+
}) => {
|
|
1122
|
+
editQuery(state: any, mobileReferrer: any, isPreview: any): Promise<import("../models/form")>;
|
|
1123
|
+
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1124
|
+
limit: any;
|
|
1125
|
+
offset: any;
|
|
1126
|
+
orderBy: any;
|
|
1127
|
+
orderDesc: any;
|
|
1128
|
+
where: any;
|
|
1129
|
+
}): Promise<{
|
|
1130
|
+
table: import("../models/table") | null;
|
|
1131
|
+
fields: import("../models/field")[];
|
|
1132
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1133
|
+
}>;
|
|
1134
|
+
tryInsertQuery(row: any): Promise<{
|
|
1135
|
+
error: string;
|
|
1136
|
+
} | {
|
|
1137
|
+
success: any;
|
|
1138
|
+
}>;
|
|
1139
|
+
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1140
|
+
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1141
|
+
saveFileFromContentsQuery(fieldVal: any, fieldId: any, fieldView: any, row: any, filename: any, encoding?: string): Promise<string | number>;
|
|
1142
|
+
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
1143
|
+
authorizeGetQuery(query: any, table_id: any): Promise<string | boolean | null | undefined>;
|
|
1144
|
+
getRowQuery(table_id: any, view_select: any, row_id: any, order_field: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1145
|
+
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1146
|
+
actionQuery(): Promise<{
|
|
1147
|
+
json: any;
|
|
1148
|
+
}>;
|
|
1149
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1150
|
+
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1151
|
+
rowError: any;
|
|
1152
|
+
inEditError?: undefined;
|
|
1153
|
+
error?: undefined;
|
|
1154
|
+
} | {
|
|
1155
|
+
inEditError: any;
|
|
1156
|
+
rowError?: undefined;
|
|
1157
|
+
error?: undefined;
|
|
1158
|
+
} | {
|
|
1159
|
+
error: any;
|
|
1160
|
+
rowError?: undefined;
|
|
1161
|
+
inEditError?: undefined;
|
|
1162
|
+
}>;
|
|
1163
|
+
};
|
|
1164
|
+
routes: {
|
|
1165
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1166
|
+
columns: object[];
|
|
1167
|
+
layout: any;
|
|
1168
|
+
}, body: any, { req, res }: {
|
|
1169
|
+
req: object;
|
|
1170
|
+
res: any;
|
|
1171
|
+
}, { actionQuery }: {
|
|
1172
|
+
actionQuery: any;
|
|
1173
|
+
}) => Promise<object>;
|
|
1174
|
+
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, }: {
|
|
1175
|
+
columns: any;
|
|
1176
|
+
layout: any;
|
|
1177
|
+
fixed: any;
|
|
1178
|
+
view_when_done: any;
|
|
1179
|
+
formula_destinations: any;
|
|
1180
|
+
auto_save: any;
|
|
1181
|
+
destination_type: any;
|
|
1182
|
+
dest_url_formula: any;
|
|
1183
|
+
page_when_done: any;
|
|
1184
|
+
page_group_when_done: any;
|
|
1185
|
+
}, body: any, { req, res, redirect }: {
|
|
1186
|
+
req: any;
|
|
1187
|
+
res: any;
|
|
1188
|
+
redirect: any;
|
|
1189
|
+
}, { updateMatchingQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1190
|
+
updateMatchingQuery: any;
|
|
1191
|
+
getRowQuery: any;
|
|
1192
|
+
saveFileQuery: any;
|
|
1193
|
+
saveFileFromContentsQuery: any;
|
|
1194
|
+
optionsQuery: any;
|
|
1195
|
+
getRowByIdQuery: any;
|
|
1196
|
+
}) => Promise<void>;
|
|
1197
|
+
};
|
|
1198
|
+
interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
|
|
1199
|
+
configCheck: (view: any) => Promise<{
|
|
1200
|
+
errors: string[];
|
|
1201
|
+
warnings: string[];
|
|
1202
|
+
}>;
|
|
1203
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1080
1204
|
} | {
|
|
1081
1205
|
name: string;
|
|
1082
1206
|
description: string;
|
|
@@ -1152,6 +1276,42 @@ export const viewtemplates: ({
|
|
|
1152
1276
|
warnings: string[];
|
|
1153
1277
|
}>;
|
|
1154
1278
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1279
|
+
} | {
|
|
1280
|
+
name: string;
|
|
1281
|
+
description: string;
|
|
1282
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1283
|
+
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
1284
|
+
list_view: string;
|
|
1285
|
+
show_view: string;
|
|
1286
|
+
subtables: object;
|
|
1287
|
+
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
1288
|
+
getRowQuery: any;
|
|
1289
|
+
}) => Promise<div>;
|
|
1290
|
+
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
1291
|
+
list_view: string;
|
|
1292
|
+
show_view: any;
|
|
1293
|
+
}) => Promise<object[]>;
|
|
1294
|
+
display_state_form: ({ list_view, _omit_state_form }: {
|
|
1295
|
+
list_view: string;
|
|
1296
|
+
_omit_state_form: boolean;
|
|
1297
|
+
}) => boolean;
|
|
1298
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1299
|
+
table_id: any;
|
|
1300
|
+
viewname: any;
|
|
1301
|
+
configuration: {
|
|
1302
|
+
columns: any;
|
|
1303
|
+
default_state: any;
|
|
1304
|
+
};
|
|
1305
|
+
req: any;
|
|
1306
|
+
}) => {
|
|
1307
|
+
getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1308
|
+
};
|
|
1309
|
+
connectedObjects: ({ list_view, subtables }: {
|
|
1310
|
+
list_view: any;
|
|
1311
|
+
subtables: any;
|
|
1312
|
+
}) => Promise<{
|
|
1313
|
+
embeddedViews: import("../models/view")[];
|
|
1314
|
+
}>;
|
|
1155
1315
|
} | {
|
|
1156
1316
|
name: string;
|
|
1157
1317
|
description: string;
|
|
@@ -1197,6 +1357,50 @@ export const viewtemplates: ({
|
|
|
1197
1357
|
}[]>;
|
|
1198
1358
|
};
|
|
1199
1359
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1360
|
+
} | {
|
|
1361
|
+
name: string;
|
|
1362
|
+
description: string;
|
|
1363
|
+
get_state_fields: () => object[];
|
|
1364
|
+
configuration_workflow: () => import("../models/workflow");
|
|
1365
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1366
|
+
columns: object[];
|
|
1367
|
+
layout: object;
|
|
1368
|
+
}, state: object, extra: object, { distinctValuesQuery, optionsQuery }: {
|
|
1369
|
+
distinctValuesQuery: any;
|
|
1370
|
+
optionsQuery: any;
|
|
1371
|
+
}) => Promise<Layout>;
|
|
1372
|
+
initial_config: () => Promise<object>;
|
|
1373
|
+
display_state_form: boolean;
|
|
1374
|
+
getStringsForI18n({ layout }: {
|
|
1375
|
+
layout: any;
|
|
1376
|
+
}): string[];
|
|
1377
|
+
routes: {
|
|
1378
|
+
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1379
|
+
req: any;
|
|
1380
|
+
res: any;
|
|
1381
|
+
}, { actionQuery }: {
|
|
1382
|
+
actionQuery: any;
|
|
1383
|
+
}) => Promise<any>;
|
|
1384
|
+
};
|
|
1385
|
+
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1386
|
+
table_id: any;
|
|
1387
|
+
viewname: any;
|
|
1388
|
+
configuration: {
|
|
1389
|
+
columns: any;
|
|
1390
|
+
};
|
|
1391
|
+
req: any;
|
|
1392
|
+
res: any;
|
|
1393
|
+
exttable_name: any;
|
|
1394
|
+
}) => {
|
|
1395
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, whereWithExisting: any, user: any): Promise<any>;
|
|
1396
|
+
actionQuery(state: any, rndid: any): Promise<{
|
|
1397
|
+
json: any;
|
|
1398
|
+
}>;
|
|
1399
|
+
distinctValuesQuery(state: any): Promise<{
|
|
1400
|
+
distinct_values: {};
|
|
1401
|
+
role: any;
|
|
1402
|
+
}>;
|
|
1403
|
+
};
|
|
1200
1404
|
} | {
|
|
1201
1405
|
name: string;
|
|
1202
1406
|
description: string;
|
|
@@ -1340,210 +1544,6 @@ export const viewtemplates: ({
|
|
|
1340
1544
|
req: any;
|
|
1341
1545
|
}) => {};
|
|
1342
1546
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1343
|
-
} | {
|
|
1344
|
-
name: string;
|
|
1345
|
-
description: string;
|
|
1346
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1347
|
-
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req, isPreview }: {
|
|
1348
|
-
req: object;
|
|
1349
|
-
res: object;
|
|
1350
|
-
}, { editQuery }: {
|
|
1351
|
-
editQuery: any;
|
|
1352
|
-
}) => Promise<import("../models/form")>;
|
|
1353
|
-
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste, confirm_leave }: {
|
|
1354
|
-
columns: any;
|
|
1355
|
-
layout: any;
|
|
1356
|
-
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1357
|
-
editManyQuery: any;
|
|
1358
|
-
getRowQuery: any;
|
|
1359
|
-
optionsQuery: any;
|
|
1360
|
-
}) => Promise<import("../models/form")[]>;
|
|
1361
|
-
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, }: {
|
|
1362
|
-
columns: object[];
|
|
1363
|
-
layout: Layout;
|
|
1364
|
-
fixed: object;
|
|
1365
|
-
view_when_done: boolean;
|
|
1366
|
-
formula_destinations: object[];
|
|
1367
|
-
}, state: object, body: any, { res, req, redirect }: {
|
|
1368
|
-
res: object;
|
|
1369
|
-
req: object;
|
|
1370
|
-
redirect: string;
|
|
1371
|
-
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1372
|
-
tryInsertQuery: any;
|
|
1373
|
-
tryUpdateQuery: any;
|
|
1374
|
-
getRowQuery: any;
|
|
1375
|
-
saveFileQuery: any;
|
|
1376
|
-
saveFileFromContentsQuery: any;
|
|
1377
|
-
optionsQuery: any;
|
|
1378
|
-
getRowByIdQuery: any;
|
|
1379
|
-
}, remote: any) => Promise<void>;
|
|
1380
|
-
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
1381
|
-
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
1382
|
-
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1383
|
-
columns: any;
|
|
1384
|
-
}) => Promise<object[]>;
|
|
1385
|
-
initial_config: Function;
|
|
1386
|
-
display_state_form: boolean;
|
|
1387
|
-
authorise_post: ({ body, table_id, req }: {
|
|
1388
|
-
body: object;
|
|
1389
|
-
table_id: string;
|
|
1390
|
-
req: object;
|
|
1391
|
-
}, { authorizePostQuery }: {
|
|
1392
|
-
authorizePostQuery: any;
|
|
1393
|
-
}) => Promise<boolean>;
|
|
1394
|
-
authorise_get: ({ query, table_id, req }: {
|
|
1395
|
-
query: object;
|
|
1396
|
-
rest: any;
|
|
1397
|
-
}, { authorizeGetQuery }: {
|
|
1398
|
-
authorizeGetQuery: any;
|
|
1399
|
-
}) => Promise<boolean>;
|
|
1400
|
-
getStringsForI18n({ layout }: {
|
|
1401
|
-
layout: Layout;
|
|
1402
|
-
}): string[];
|
|
1403
|
-
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, confirm_leave, auto_create, delete_unchanged_auto_create, }, req, res, }: {
|
|
1404
|
-
table_id: any;
|
|
1405
|
-
name: any;
|
|
1406
|
-
configuration: {
|
|
1407
|
-
columns: any;
|
|
1408
|
-
default_state: any;
|
|
1409
|
-
layout: any;
|
|
1410
|
-
auto_save: any;
|
|
1411
|
-
split_paste: any;
|
|
1412
|
-
destination_type: any;
|
|
1413
|
-
fixed: any;
|
|
1414
|
-
confirm_leave: any;
|
|
1415
|
-
auto_create: any;
|
|
1416
|
-
delete_unchanged_auto_create: any;
|
|
1417
|
-
};
|
|
1418
|
-
req: any;
|
|
1419
|
-
res: any;
|
|
1420
|
-
}) => {
|
|
1421
|
-
editQuery(state: any, mobileReferrer: any, isPreview: any): Promise<import("../models/form")>;
|
|
1422
|
-
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1423
|
-
limit: any;
|
|
1424
|
-
offset: any;
|
|
1425
|
-
orderBy: any;
|
|
1426
|
-
orderDesc: any;
|
|
1427
|
-
where: any;
|
|
1428
|
-
}): Promise<{
|
|
1429
|
-
table: import("../models/table") | null;
|
|
1430
|
-
fields: import("../models/field")[];
|
|
1431
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1432
|
-
}>;
|
|
1433
|
-
tryInsertQuery(row: any): Promise<{
|
|
1434
|
-
error: string;
|
|
1435
|
-
} | {
|
|
1436
|
-
success: any;
|
|
1437
|
-
}>;
|
|
1438
|
-
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1439
|
-
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1440
|
-
saveFileFromContentsQuery(fieldVal: any, fieldId: any, fieldView: any, row: any, filename: any, encoding?: string): Promise<string | number>;
|
|
1441
|
-
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
1442
|
-
authorizeGetQuery(query: any, table_id: any): Promise<string | boolean | null | undefined>;
|
|
1443
|
-
getRowQuery(table_id: any, view_select: any, row_id: any, order_field: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1444
|
-
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1445
|
-
actionQuery(): Promise<{
|
|
1446
|
-
json: any;
|
|
1447
|
-
}>;
|
|
1448
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1449
|
-
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1450
|
-
rowError: any;
|
|
1451
|
-
inEditError?: undefined;
|
|
1452
|
-
error?: undefined;
|
|
1453
|
-
} | {
|
|
1454
|
-
inEditError: any;
|
|
1455
|
-
rowError?: undefined;
|
|
1456
|
-
error?: undefined;
|
|
1457
|
-
} | {
|
|
1458
|
-
error: any;
|
|
1459
|
-
rowError?: undefined;
|
|
1460
|
-
inEditError?: undefined;
|
|
1461
|
-
}>;
|
|
1462
|
-
};
|
|
1463
|
-
routes: {
|
|
1464
|
-
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1465
|
-
columns: object[];
|
|
1466
|
-
layout: any;
|
|
1467
|
-
}, body: any, { req, res }: {
|
|
1468
|
-
req: object;
|
|
1469
|
-
res: any;
|
|
1470
|
-
}, { actionQuery }: {
|
|
1471
|
-
actionQuery: any;
|
|
1472
|
-
}) => Promise<object>;
|
|
1473
|
-
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, }: {
|
|
1474
|
-
columns: any;
|
|
1475
|
-
layout: any;
|
|
1476
|
-
fixed: any;
|
|
1477
|
-
view_when_done: any;
|
|
1478
|
-
formula_destinations: any;
|
|
1479
|
-
auto_save: any;
|
|
1480
|
-
destination_type: any;
|
|
1481
|
-
dest_url_formula: any;
|
|
1482
|
-
page_when_done: any;
|
|
1483
|
-
page_group_when_done: any;
|
|
1484
|
-
}, body: any, { req, res, redirect }: {
|
|
1485
|
-
req: any;
|
|
1486
|
-
res: any;
|
|
1487
|
-
redirect: any;
|
|
1488
|
-
}, { updateMatchingQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1489
|
-
updateMatchingQuery: any;
|
|
1490
|
-
getRowQuery: any;
|
|
1491
|
-
saveFileQuery: any;
|
|
1492
|
-
saveFileFromContentsQuery: any;
|
|
1493
|
-
optionsQuery: any;
|
|
1494
|
-
getRowByIdQuery: any;
|
|
1495
|
-
}) => Promise<void>;
|
|
1496
|
-
};
|
|
1497
|
-
interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
|
|
1498
|
-
configCheck: (view: any) => Promise<{
|
|
1499
|
-
errors: string[];
|
|
1500
|
-
warnings: string[];
|
|
1501
|
-
}>;
|
|
1502
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1503
|
-
} | {
|
|
1504
|
-
name: string;
|
|
1505
|
-
description: string;
|
|
1506
|
-
get_state_fields: () => object[];
|
|
1507
|
-
configuration_workflow: () => import("../models/workflow");
|
|
1508
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1509
|
-
columns: object[];
|
|
1510
|
-
layout: object;
|
|
1511
|
-
}, state: object, extra: object, { distinctValuesQuery, optionsQuery }: {
|
|
1512
|
-
distinctValuesQuery: any;
|
|
1513
|
-
optionsQuery: any;
|
|
1514
|
-
}) => Promise<Layout>;
|
|
1515
|
-
initial_config: () => Promise<object>;
|
|
1516
|
-
display_state_form: boolean;
|
|
1517
|
-
getStringsForI18n({ layout }: {
|
|
1518
|
-
layout: any;
|
|
1519
|
-
}): string[];
|
|
1520
|
-
routes: {
|
|
1521
|
-
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1522
|
-
req: any;
|
|
1523
|
-
res: any;
|
|
1524
|
-
}, { actionQuery }: {
|
|
1525
|
-
actionQuery: any;
|
|
1526
|
-
}) => Promise<any>;
|
|
1527
|
-
};
|
|
1528
|
-
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1529
|
-
table_id: any;
|
|
1530
|
-
viewname: any;
|
|
1531
|
-
configuration: {
|
|
1532
|
-
columns: any;
|
|
1533
|
-
};
|
|
1534
|
-
req: any;
|
|
1535
|
-
res: any;
|
|
1536
|
-
exttable_name: any;
|
|
1537
|
-
}) => {
|
|
1538
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, whereWithExisting: any, user: any): Promise<any>;
|
|
1539
|
-
actionQuery(state: any, rndid: any): Promise<{
|
|
1540
|
-
json: any;
|
|
1541
|
-
}>;
|
|
1542
|
-
distinctValuesQuery(state: any): Promise<{
|
|
1543
|
-
distinct_values: {};
|
|
1544
|
-
role: any;
|
|
1545
|
-
}>;
|
|
1546
|
-
};
|
|
1547
1547
|
})[];
|
|
1548
1548
|
import fileviews = require("./fileviews");
|
|
1549
1549
|
import actions = require("./actions");
|
package/dist/plugin-helper.d.ts
CHANGED
|
@@ -261,5 +261,6 @@ import { sqlBinOp } from "@saltcorn/db-common/internal";
|
|
|
261
261
|
import { sqlFun } from "@saltcorn/db-common/internal";
|
|
262
262
|
import Table = require("./models/table");
|
|
263
263
|
import Field = require("./models/field");
|
|
264
|
+
import View = require("./models/view");
|
|
264
265
|
export { add_free_variables_to_joinfields, sqlBinOp, sqlFun };
|
|
265
266
|
//# sourceMappingURL=plugin-helper.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/data",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.5",
|
|
4
4
|
"description": "Data models for Saltcorn, open-source no-code platform",
|
|
5
5
|
"homepage": "https://saltcorn.com",
|
|
6
6
|
"scripts": {
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"!dist/tsconfig.ref.tsbuildinfo"
|
|
38
38
|
],
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@saltcorn/postgres": "1.1.1-beta.
|
|
41
|
-
"@saltcorn/sqlite": "1.1.1-beta.
|
|
40
|
+
"@saltcorn/postgres": "1.1.1-beta.5",
|
|
41
|
+
"@saltcorn/sqlite": "1.1.1-beta.5"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@saltcorn/types": "1.1.1-beta.
|
|
45
|
-
"@saltcorn/markup": "1.1.1-beta.
|
|
46
|
-
"@saltcorn/common-code": "1.1.1-beta.
|
|
47
|
-
"@saltcorn/db-common": "1.1.1-beta.
|
|
48
|
-
"@saltcorn/sqlite-mobile": "1.1.1-beta.
|
|
44
|
+
"@saltcorn/types": "1.1.1-beta.5",
|
|
45
|
+
"@saltcorn/markup": "1.1.1-beta.5",
|
|
46
|
+
"@saltcorn/common-code": "1.1.1-beta.5",
|
|
47
|
+
"@saltcorn/db-common": "1.1.1-beta.5",
|
|
48
|
+
"@saltcorn/sqlite-mobile": "1.1.1-beta.5",
|
|
49
49
|
"acorn": "^8.0.3",
|
|
50
50
|
"assert": "^2.0.0",
|
|
51
51
|
"astring": "^1.4.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"202501181435.d.ts","sourceRoot":"","sources":["../../migrations/202501181435.js"],"names":[],"mappings":"AAAA,oCAeC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const js = async () => {
|
|
3
|
-
const Field = require("../models/field");
|
|
4
|
-
const stored_fields = await Field.find({
|
|
5
|
-
calculated: true,
|
|
6
|
-
stored: true,
|
|
7
|
-
});
|
|
8
|
-
for (const field of stored_fields) {
|
|
9
|
-
try {
|
|
10
|
-
await field.set_calc_joinfields();
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
console.error(error);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
module.exports = { js };
|
|
18
|
-
//# sourceMappingURL=202501181435.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"202501181435.js","sourceRoot":"","sources":["../../migrations/202501181435.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE;IACpB,MAAM,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEzC,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC;QACrC,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE;QACjC,IAAI;YACF,MAAM,KAAK,CAAC,mBAAmB,EAAE,CAAC;SACnC;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACtB;KACF;AACH,CAAC,CAAC;AACF,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"202501181437.d.ts","sourceRoot":"","sources":["../../migrations/202501181437.js"],"names":[],"mappings":"AAAA,oCAuBC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const js = async () => {
|
|
3
|
-
const Table = require("../models/table");
|
|
4
|
-
const tables = await Table.find({});
|
|
5
|
-
const { getState } = require("../db/state");
|
|
6
|
-
const state = getState();
|
|
7
|
-
await state?.refresh_plugins(false);
|
|
8
|
-
const Field = require("../models/field");
|
|
9
|
-
const stored_fields = await Field.find({
|
|
10
|
-
calculated: true,
|
|
11
|
-
stored: true,
|
|
12
|
-
});
|
|
13
|
-
for (const field of stored_fields) {
|
|
14
|
-
//try {
|
|
15
|
-
await field.set_calc_joinfields();
|
|
16
|
-
//} catch (error) {
|
|
17
|
-
//console.error(error);
|
|
18
|
-
//}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
module.exports = { js };
|
|
22
|
-
//# sourceMappingURL=202501181437.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"202501181437.js","sourceRoot":"","sources":["../../migrations/202501181437.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE;IACpB,MAAM,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEpC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAE5C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAEpC,MAAM,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEzC,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC;QACrC,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE;QAC/B,OAAO;QACT,MAAM,KAAK,CAAC,mBAAmB,EAAE,CAAC;QAClC,mBAAmB;QACnB,uBAAuB;QACvB,GAAG;KACJ;AACH,CAAC,CAAC;AACF,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"202501181440.d.ts","sourceRoot":"","sources":["../../migrations/202501181440.js"],"names":[],"mappings":"AAAA,oCAsBC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const js = async () => {
|
|
3
|
-
//not sure this is needed
|
|
4
|
-
const { getState } = require("../db/state");
|
|
5
|
-
const state = getState();
|
|
6
|
-
await state?.refresh_tables(false);
|
|
7
|
-
const Field = require("../models/field");
|
|
8
|
-
const stored_fields = await Field.find({
|
|
9
|
-
calculated: true,
|
|
10
|
-
stored: true,
|
|
11
|
-
});
|
|
12
|
-
for (const field of stored_fields) {
|
|
13
|
-
try {
|
|
14
|
-
await field.set_calc_joinfields();
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
console.error(error);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
module.exports = { js };
|
|
22
|
-
//# sourceMappingURL=202501181440.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"202501181440.js","sourceRoot":"","sources":["../../migrations/202501181440.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE;IACpB,yBAAyB;IAEzB,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAE5C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAEnC,MAAM,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEzC,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC;QACrC,UAAU,EAAE,IAAI;QAChB,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE;QACjC,IAAI;YACF,MAAM,KAAK,CAAC,mBAAmB,EAAE,CAAC;SACnC;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACtB;KACF;AACH,CAAC,CAAC;AACF,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC"}
|