@saltcorn/data 1.0.0-beta.16 → 1.0.0-beta.18

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.
Files changed (47) hide show
  1. package/dist/base-plugin/index.d.ts +335 -335
  2. package/dist/base-plugin/types.d.ts.map +1 -1
  3. package/dist/base-plugin/types.js +10 -3
  4. package/dist/base-plugin/types.js.map +1 -1
  5. package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
  6. package/dist/base-plugin/viewtemplates/edit.js +9 -3
  7. package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
  8. package/dist/base-plugin/viewtemplates/filter.d.ts.map +1 -1
  9. package/dist/base-plugin/viewtemplates/filter.js +1 -1
  10. package/dist/base-plugin/viewtemplates/filter.js.map +1 -1
  11. package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
  12. package/dist/base-plugin/viewtemplates/list.js +2 -2
  13. package/dist/base-plugin/viewtemplates/list.js.map +1 -1
  14. package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
  15. package/dist/base-plugin/viewtemplates/show.js +23 -6
  16. package/dist/base-plugin/viewtemplates/show.js.map +1 -1
  17. package/dist/base-plugin/viewtemplates/viewable_fields.js +1 -1
  18. package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
  19. package/dist/db/state.d.ts.map +1 -1
  20. package/dist/db/state.js +8 -0
  21. package/dist/db/state.js.map +1 -1
  22. package/dist/models/expression.d.ts.map +1 -1
  23. package/dist/models/expression.js +32 -6
  24. package/dist/models/expression.js.map +1 -1
  25. package/dist/models/field.d.ts.map +1 -1
  26. package/dist/models/field.js +4 -1
  27. package/dist/models/field.js.map +1 -1
  28. package/dist/models/table.d.ts.map +1 -1
  29. package/dist/models/table.js +4 -2
  30. package/dist/models/table.js.map +1 -1
  31. package/dist/models/user.d.ts.map +1 -1
  32. package/dist/models/user.js +1 -1
  33. package/dist/models/user.js.map +1 -1
  34. package/dist/plugin-helper.d.ts +1 -1
  35. package/dist/plugin-helper.d.ts.map +1 -1
  36. package/dist/plugin-helper.js +22 -4
  37. package/dist/plugin-helper.js.map +1 -1
  38. package/dist/tests/calc.test.js +26 -1
  39. package/dist/tests/calc.test.js.map +1 -1
  40. package/dist/tests/exact_views.test.js +7 -7
  41. package/dist/tests/exact_views.test.js.map +1 -1
  42. package/dist/tests/field.test.js +9 -0
  43. package/dist/tests/field.test.js.map +1 -1
  44. package/dist/tests/show.test.js +182 -3
  45. package/dist/tests/show.test.js.map +1 -1
  46. package/dist/utils.d.ts +3 -3
  47. package/package.json +8 -8
@@ -1,4 +1,155 @@
1
1
  export const types: ({
2
+ name: string;
3
+ description: string;
4
+ sql_name: string;
5
+ js_type: string;
6
+ contract: () => Function;
7
+ fieldviews: {
8
+ show: {
9
+ isEdit: boolean;
10
+ description: string;
11
+ run: (v: any, req: any) => any;
12
+ };
13
+ checkboxes: {
14
+ isEdit: boolean;
15
+ description: string;
16
+ run: (v: any) => any;
17
+ };
18
+ TrueFalse: {
19
+ isEdit: boolean;
20
+ description: string;
21
+ run: (v: any) => "" | "True" | "False";
22
+ };
23
+ edit: {
24
+ isEdit: boolean;
25
+ description: string;
26
+ configFields: ({
27
+ name: string;
28
+ label: string;
29
+ type: string;
30
+ attributes: {
31
+ options: string[];
32
+ };
33
+ } | {
34
+ name: string;
35
+ label: string;
36
+ type: string;
37
+ attributes?: undefined;
38
+ })[];
39
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
40
+ };
41
+ switch: {
42
+ isEdit: boolean;
43
+ description: string;
44
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
45
+ };
46
+ show_with_html: {
47
+ configFields: {
48
+ input_type: string;
49
+ name: string;
50
+ label: string;
51
+ sublabel: string;
52
+ default: string;
53
+ attributes: {
54
+ mode: string;
55
+ };
56
+ }[];
57
+ isEdit: boolean;
58
+ description: string;
59
+ run: (v: any, req: any, attrs?: {}) => any;
60
+ };
61
+ tristate: {
62
+ isEdit: boolean;
63
+ description: string;
64
+ configFields: {
65
+ name: string;
66
+ label: string;
67
+ type: string;
68
+ }[];
69
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
70
+ };
71
+ };
72
+ attributes: object[];
73
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
74
+ read: (v: object) => boolean | null;
75
+ readFromDB: (v: object) => object;
76
+ listAs: (v: object) => object;
77
+ validate: () => boolean;
78
+ } | {
79
+ name: string;
80
+ description: string;
81
+ sql_name: string;
82
+ js_type: string;
83
+ contract: () => Function;
84
+ attributes: object[];
85
+ fieldviews: {
86
+ show: {
87
+ isEdit: boolean;
88
+ description: string;
89
+ run: (d: any, req: any, attrs?: {}) => any;
90
+ };
91
+ showDay: {
92
+ isEdit: boolean;
93
+ description: string;
94
+ run: (d: any, req: any) => any;
95
+ };
96
+ format: {
97
+ isEdit: boolean;
98
+ description: string;
99
+ configFields: {
100
+ name: string;
101
+ label: string;
102
+ type: string;
103
+ help: {
104
+ topic: string;
105
+ };
106
+ }[];
107
+ run: (d: any, req: any, options: any) => any;
108
+ };
109
+ relative: {
110
+ isEdit: boolean;
111
+ description: string;
112
+ run: (d: any, req: any) => string;
113
+ };
114
+ yearsAgo: {
115
+ isEdit: boolean;
116
+ description: string;
117
+ run: (d: any, req: any) => string;
118
+ };
119
+ show_with_html: {
120
+ configFields: {
121
+ input_type: string;
122
+ name: string;
123
+ label: string;
124
+ sublabel: string;
125
+ default: string;
126
+ attributes: {
127
+ mode: string;
128
+ };
129
+ }[];
130
+ isEdit: boolean;
131
+ description: string;
132
+ run: (v: any, req: any, attrs?: {}) => any;
133
+ };
134
+ edit: {
135
+ isEdit: boolean;
136
+ blockDisplay: boolean;
137
+ description: string;
138
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
139
+ };
140
+ editDay: {
141
+ isEdit: boolean;
142
+ blockDisplay: boolean;
143
+ description: string;
144
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
145
+ };
146
+ };
147
+ presets: {
148
+ Now: () => Date;
149
+ };
150
+ read: (v: object, attrs: object) => object;
151
+ validate: () => boolean;
152
+ } | {
2
153
  name: string;
3
154
  description: string;
4
155
  sql_name: string;
@@ -828,159 +979,50 @@ export const types: ({
828
979
  attributes: object[];
829
980
  read: (v: object) => string | number | undefined;
830
981
  validate: ({ min, max }: object) => boolean | object;
831
- } | {
982
+ })[];
983
+ export const viewtemplates: ({
832
984
  name: string;
833
985
  description: string;
834
- sql_name: string;
835
- js_type: string;
836
- contract: () => Function;
837
- attributes: object[];
838
- fieldviews: {
839
- show: {
840
- isEdit: boolean;
841
- description: string;
842
- run: (d: any, req: any, attrs?: {}) => any;
843
- };
844
- showDay: {
845
- isEdit: boolean;
846
- description: string;
847
- run: (d: any, req: any) => any;
848
- };
849
- format: {
850
- isEdit: boolean;
851
- description: string;
852
- configFields: {
853
- name: string;
854
- label: string;
855
- type: string;
856
- help: {
857
- topic: string;
858
- };
859
- }[];
860
- run: (d: any, req: any, options: any) => any;
861
- };
862
- relative: {
863
- isEdit: boolean;
864
- description: string;
865
- run: (d: any, req: any) => string;
866
- };
867
- yearsAgo: {
868
- isEdit: boolean;
869
- description: string;
870
- run: (d: any, req: any) => string;
871
- };
872
- show_with_html: {
873
- configFields: {
874
- input_type: string;
875
- name: string;
876
- label: string;
877
- sublabel: string;
878
- default: string;
879
- attributes: {
880
- mode: string;
881
- };
882
- }[];
883
- isEdit: boolean;
884
- description: string;
885
- run: (v: any, req: any, attrs?: {}) => any;
886
- };
887
- edit: {
888
- isEdit: boolean;
889
- blockDisplay: boolean;
890
- description: string;
891
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
892
- };
893
- editDay: {
894
- isEdit: boolean;
895
- blockDisplay: boolean;
896
- description: string;
897
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
986
+ get_state_fields: () => object[];
987
+ configuration_workflow: () => import("../models/workflow");
988
+ run: (table_id: number, viewname: string, { columns, layout }: {
989
+ columns: object[];
990
+ layout: object;
991
+ }, state: object, extra: object, { distinctValuesQuery }: {
992
+ distinctValuesQuery: any;
993
+ }) => Promise<Layout>;
994
+ initial_config: () => Promise<object>;
995
+ display_state_form: boolean;
996
+ getStringsForI18n({ layout }: {
997
+ layout: any;
998
+ }): string[];
999
+ routes: {
1000
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1001
+ req: any;
1002
+ res: any;
1003
+ }, { actionQuery }: {
1004
+ actionQuery: any;
1005
+ }) => Promise<any>;
1006
+ };
1007
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1008
+ table_id: any;
1009
+ viewname: any;
1010
+ configuration: {
1011
+ columns: any;
898
1012
  };
1013
+ req: any;
1014
+ res: any;
1015
+ exttable_name: any;
1016
+ }) => {
1017
+ actionQuery(state: any, rndid: any): Promise<{
1018
+ json: any;
1019
+ }>;
1020
+ distinctValuesQuery(state: any): Promise<{
1021
+ distinct_values: {};
1022
+ role: any;
1023
+ }>;
899
1024
  };
900
- presets: {
901
- Now: () => Date;
902
- };
903
- read: (v: object, attrs: object) => object;
904
- validate: () => boolean;
905
1025
  } | {
906
- name: string;
907
- description: string;
908
- sql_name: string;
909
- js_type: string;
910
- contract: () => Function;
911
- fieldviews: {
912
- show: {
913
- isEdit: boolean;
914
- description: string;
915
- run: (v: any, req: any) => any;
916
- };
917
- checkboxes: {
918
- isEdit: boolean;
919
- description: string;
920
- run: (v: any) => any;
921
- };
922
- TrueFalse: {
923
- isEdit: boolean;
924
- description: string;
925
- run: (v: any) => "" | "True" | "False";
926
- };
927
- edit: {
928
- isEdit: boolean;
929
- description: string;
930
- configFields: ({
931
- name: string;
932
- label: string;
933
- type: string;
934
- attributes: {
935
- options: string[];
936
- };
937
- } | {
938
- name: string;
939
- label: string;
940
- type: string;
941
- attributes?: undefined;
942
- })[];
943
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
944
- };
945
- switch: {
946
- isEdit: boolean;
947
- description: string;
948
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
949
- };
950
- show_with_html: {
951
- configFields: {
952
- input_type: string;
953
- name: string;
954
- label: string;
955
- sublabel: string;
956
- default: string;
957
- attributes: {
958
- mode: string;
959
- };
960
- }[];
961
- isEdit: boolean;
962
- description: string;
963
- run: (v: any, req: any, attrs?: {}) => any;
964
- };
965
- tristate: {
966
- isEdit: boolean;
967
- description: string;
968
- configFields: {
969
- name: string;
970
- label: string;
971
- type: string;
972
- }[];
973
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
974
- };
975
- };
976
- attributes: object[];
977
- readFromFormRecord: (rec: any, name: string) => boolean | null;
978
- read: (v: object) => boolean | null;
979
- readFromDB: (v: object) => object;
980
- listAs: (v: object) => object;
981
- validate: () => boolean;
982
- })[];
983
- export const viewtemplates: ({
984
1026
  name: string;
985
1027
  description: string;
986
1028
  configuration_workflow: (req: object) => import("../models/workflow");
@@ -1137,6 +1179,151 @@ export const viewtemplates: ({
1137
1179
  warnings: string[];
1138
1180
  }>;
1139
1181
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1182
+ } | {
1183
+ name: string;
1184
+ description: string;
1185
+ configuration_workflow: (req: object) => import("../models/workflow");
1186
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1187
+ participant_field: string;
1188
+ msg_relation: string;
1189
+ msgsender_field: any;
1190
+ msgview: string;
1191
+ msgform: string;
1192
+ participant_maxread_field: string;
1193
+ }, state: object, { req, res }: {
1194
+ req: object;
1195
+ res: object;
1196
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1197
+ getRowQuery: any;
1198
+ updateQuery: any;
1199
+ optionsQuery: any;
1200
+ }) => Promise<div>;
1201
+ get_state_fields: () => object[];
1202
+ display_state_form: boolean;
1203
+ routes: {
1204
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1205
+ participant_field: string;
1206
+ msg_relation: string;
1207
+ msgsender_field: any;
1208
+ msgview: string;
1209
+ msgform: string;
1210
+ participant_maxread_field: string;
1211
+ }, body: any, { req, res }: {
1212
+ req: object;
1213
+ res: object;
1214
+ }, { submitAjaxQuery }: {
1215
+ submitAjaxQuery: any;
1216
+ }) => Promise<object>;
1217
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1218
+ participant_field: string;
1219
+ participant_maxread_field: string;
1220
+ }, body: any, { req, res }: {
1221
+ req: object;
1222
+ res: object;
1223
+ }, { ackReadQuery }: {
1224
+ ackReadQuery: any;
1225
+ }) => Promise<void>;
1226
+ fetch_older_msg: (table_id: any, viewname: any, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: object, body: object, { req, res }: string, { fetchOlderMsgQuery }: any) => Promise<object>;
1227
+ };
1228
+ noAutoTest: boolean;
1229
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1230
+ participant_field: object;
1231
+ }, room_id: string, user: object) => Promise<object>;
1232
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1233
+ participant_field: any;
1234
+ msg_relation: string;
1235
+ msgsender_field: string;
1236
+ msgview: string;
1237
+ msgform: any;
1238
+ participant_maxread_field: any;
1239
+ }) => object[];
1240
+ getStringsForI18n(): object[];
1241
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1242
+ table_id: any;
1243
+ viewname: any;
1244
+ configuration: {
1245
+ columns: any;
1246
+ default_state: any;
1247
+ };
1248
+ req: any;
1249
+ }) => {
1250
+ getRowQuery(state_id: any, part_table_name: any, part_user_field: any, part_key_to_room: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1251
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1252
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1253
+ json: {
1254
+ msgid: {
1255
+ error: string;
1256
+ } | {
1257
+ success: any;
1258
+ };
1259
+ error?: undefined;
1260
+ };
1261
+ } | {
1262
+ json: {
1263
+ error: any;
1264
+ msgid?: undefined;
1265
+ };
1266
+ }>;
1267
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1268
+ json: {
1269
+ error: string;
1270
+ success?: undefined;
1271
+ };
1272
+ } | {
1273
+ json: {
1274
+ success: string;
1275
+ error?: undefined;
1276
+ };
1277
+ }>;
1278
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1279
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1280
+ };
1281
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1282
+ } | {
1283
+ name: string;
1284
+ description: string;
1285
+ configuration_workflow: (req: object) => import("../models/workflow");
1286
+ run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, initial_open_accordions, title_formula, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, create_view_showif, always_create_view, include_fml, exclusion_relation, exclusion_where, empty_view, groupby, lazy_accordions, ...cols }: {
1287
+ show_view: string;
1288
+ order_field: void;
1289
+ descending: boolean;
1290
+ view_to_create?: string | undefined;
1291
+ create_view_display: string;
1292
+ in_card: boolean;
1293
+ masonry_columns: string;
1294
+ rows_per_page?: number | undefined;
1295
+ hide_pagination: boolean;
1296
+ create_view_label?: string | undefined;
1297
+ create_view_location?: string | undefined;
1298
+ always_create_view: boolean;
1299
+ cols: any;
1300
+ }, state: object, extraArgs: any, { countRowsQuery, runManyQuery }: {
1301
+ countRowsQuery: any;
1302
+ runManyQuery: any;
1303
+ }) => Promise<div>;
1304
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
1305
+ show_view: any;
1306
+ }) => Promise<import("../models/field")>;
1307
+ display_state_form: boolean;
1308
+ getStringsForI18n({ create_view_label }: {
1309
+ create_view_label: any;
1310
+ }): string[] | Object[];
1311
+ queries: ({ table_id, viewname, configuration: { show_view }, req, res, }: {
1312
+ table_id: any;
1313
+ viewname: any;
1314
+ configuration: {
1315
+ show_view: any;
1316
+ };
1317
+ req: any;
1318
+ res: any;
1319
+ }) => {
1320
+ countRowsQuery(state: any): Promise<number>;
1321
+ runManyQuery(state: any, qextra: any, selectOpts: any): Promise<string[] | {
1322
+ html: string;
1323
+ row: any;
1324
+ }[]>;
1325
+ };
1326
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1140
1327
  } | {
1141
1328
  name: string;
1142
1329
  description: string;
@@ -1309,193 +1496,6 @@ export const viewtemplates: ({
1309
1496
  }) => Promise<{
1310
1497
  embeddedViews: import("../models/view")[];
1311
1498
  }>;
1312
- } | {
1313
- name: string;
1314
- description: string;
1315
- configuration_workflow: (req: object) => import("../models/workflow");
1316
- run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, initial_open_accordions, title_formula, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, create_view_showif, always_create_view, include_fml, exclusion_relation, exclusion_where, empty_view, groupby, lazy_accordions, ...cols }: {
1317
- show_view: string;
1318
- order_field: void;
1319
- descending: boolean;
1320
- view_to_create?: string | undefined;
1321
- create_view_display: string;
1322
- in_card: boolean;
1323
- masonry_columns: string;
1324
- rows_per_page?: number | undefined;
1325
- hide_pagination: boolean;
1326
- create_view_label?: string | undefined;
1327
- create_view_location?: string | undefined;
1328
- always_create_view: boolean;
1329
- cols: any;
1330
- }, state: object, extraArgs: any, { countRowsQuery, runManyQuery }: {
1331
- countRowsQuery: any;
1332
- runManyQuery: any;
1333
- }) => Promise<div>;
1334
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
1335
- show_view: any;
1336
- }) => Promise<import("../models/field")>;
1337
- display_state_form: boolean;
1338
- getStringsForI18n({ create_view_label }: {
1339
- create_view_label: any;
1340
- }): string[] | Object[];
1341
- queries: ({ table_id, viewname, configuration: { show_view }, req, res, }: {
1342
- table_id: any;
1343
- viewname: any;
1344
- configuration: {
1345
- show_view: any;
1346
- };
1347
- req: any;
1348
- res: any;
1349
- }) => {
1350
- countRowsQuery(state: any): Promise<number>;
1351
- runManyQuery(state: any, qextra: any, selectOpts: any): Promise<string[] | {
1352
- html: string;
1353
- row: any;
1354
- }[]>;
1355
- };
1356
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1357
- } | {
1358
- name: string;
1359
- description: string;
1360
- get_state_fields: () => object[];
1361
- configuration_workflow: () => import("../models/workflow");
1362
- run: (table_id: number, viewname: string, { columns, layout }: {
1363
- columns: object[];
1364
- layout: object;
1365
- }, state: object, extra: object, { distinctValuesQuery }: {
1366
- distinctValuesQuery: any;
1367
- }) => Promise<Layout>;
1368
- initial_config: () => Promise<object>;
1369
- display_state_form: boolean;
1370
- getStringsForI18n({ layout }: {
1371
- layout: any;
1372
- }): string[];
1373
- routes: {
1374
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1375
- req: any;
1376
- res: any;
1377
- }, { actionQuery }: {
1378
- actionQuery: any;
1379
- }) => Promise<any>;
1380
- };
1381
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1382
- table_id: any;
1383
- viewname: any;
1384
- configuration: {
1385
- columns: any;
1386
- };
1387
- req: any;
1388
- res: any;
1389
- exttable_name: any;
1390
- }) => {
1391
- actionQuery(state: any, rndid: any): Promise<{
1392
- json: any;
1393
- }>;
1394
- distinctValuesQuery(state: any): Promise<{
1395
- distinct_values: {};
1396
- role: any;
1397
- }>;
1398
- };
1399
- } | {
1400
- name: string;
1401
- description: string;
1402
- configuration_workflow: (req: object) => import("../models/workflow");
1403
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1404
- participant_field: string;
1405
- msg_relation: string;
1406
- msgsender_field: any;
1407
- msgview: string;
1408
- msgform: string;
1409
- participant_maxread_field: string;
1410
- }, state: object, { req, res }: {
1411
- req: object;
1412
- res: object;
1413
- }, { getRowQuery, updateQuery, optionsQuery }: {
1414
- getRowQuery: any;
1415
- updateQuery: any;
1416
- optionsQuery: any;
1417
- }) => Promise<div>;
1418
- get_state_fields: () => object[];
1419
- display_state_form: boolean;
1420
- routes: {
1421
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1422
- participant_field: string;
1423
- msg_relation: string;
1424
- msgsender_field: any;
1425
- msgview: string;
1426
- msgform: string;
1427
- participant_maxread_field: string;
1428
- }, body: any, { req, res }: {
1429
- req: object;
1430
- res: object;
1431
- }, { submitAjaxQuery }: {
1432
- submitAjaxQuery: any;
1433
- }) => Promise<object>;
1434
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1435
- participant_field: string;
1436
- participant_maxread_field: string;
1437
- }, body: any, { req, res }: {
1438
- req: object;
1439
- res: object;
1440
- }, { ackReadQuery }: {
1441
- ackReadQuery: any;
1442
- }) => Promise<void>;
1443
- fetch_older_msg: (table_id: any, viewname: any, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: object, body: object, { req, res }: string, { fetchOlderMsgQuery }: any) => Promise<object>;
1444
- };
1445
- noAutoTest: boolean;
1446
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1447
- participant_field: object;
1448
- }, room_id: string, user: object) => Promise<object>;
1449
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1450
- participant_field: any;
1451
- msg_relation: string;
1452
- msgsender_field: string;
1453
- msgview: string;
1454
- msgform: any;
1455
- participant_maxread_field: any;
1456
- }) => object[];
1457
- getStringsForI18n(): object[];
1458
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1459
- table_id: any;
1460
- viewname: any;
1461
- configuration: {
1462
- columns: any;
1463
- default_state: any;
1464
- };
1465
- req: any;
1466
- }) => {
1467
- getRowQuery(state_id: any, part_table_name: any, part_user_field: any, part_key_to_room: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1468
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1469
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1470
- json: {
1471
- msgid: {
1472
- error: string;
1473
- } | {
1474
- success: any;
1475
- };
1476
- error?: undefined;
1477
- };
1478
- } | {
1479
- json: {
1480
- error: any;
1481
- msgid?: undefined;
1482
- };
1483
- }>;
1484
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1485
- json: {
1486
- error: string;
1487
- success?: undefined;
1488
- };
1489
- } | {
1490
- json: {
1491
- success: string;
1492
- error?: undefined;
1493
- };
1494
- }>;
1495
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1496
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1497
- };
1498
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1499
1499
  })[];
1500
1500
  import fileviews = require("./fileviews");
1501
1501
  import actions = require("./actions");