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

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.
@@ -1,155 +1,4 @@
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
- } | {
153
2
  name: string;
154
3
  description: string;
155
4
  sql_name: string;
@@ -979,50 +828,220 @@ export const types: ({
979
828
  attributes: object[];
980
829
  read: (v: object) => string | number | undefined;
981
830
  validate: ({ min, max }: object) => boolean | object;
982
- })[];
983
- export const viewtemplates: ({
831
+ } | {
984
832
  name: string;
985
833
  description: string;
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;
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;
1012
898
  };
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
- }>;
1024
899
  };
1025
- } | {
900
+ presets: {
901
+ Now: () => Date;
902
+ };
903
+ read: (v: object, attrs: object) => object;
904
+ validate: () => boolean;
905
+ } | {
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
+ name: string;
985
+ description: string;
986
+ configuration_workflow: (req: object) => import("../models/workflow");
987
+ run: (table_id: string | number, viewname: string, { columns, layout, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
988
+ columns: object[];
989
+ view_to_create?: string | undefined;
990
+ create_view_display: string;
991
+ create_view_label?: string | undefined;
992
+ default_state?: object | undefined;
993
+ create_view_location?: string | undefined;
994
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
995
+ listQuery: any;
996
+ }) => Promise<any>;
997
+ view_quantity: string;
998
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
999
+ columns: object[];
1000
+ }) => Function;
1001
+ initial_config: Function;
1002
+ on_delete: (table_id: any, viewname: string, { default_state }: {
1003
+ default_state: any;
1004
+ }) => Promise<void>;
1005
+ routes: {
1006
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1007
+ columns: object[];
1008
+ layout: any;
1009
+ }, body: object, { req, res }: {
1010
+ req: object;
1011
+ res: any;
1012
+ }, { getRowQuery }: {
1013
+ getRowQuery: any;
1014
+ }) => Promise<object>;
1015
+ };
1016
+ display_state_form: (opts: object) => boolean;
1017
+ default_state_form: ({ default_state }: object) => boolean;
1018
+ getStringsForI18n({ columns, create_view_label }: {
1019
+ columns: any;
1020
+ create_view_label: any;
1021
+ }): string[];
1022
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
1023
+ table_id: any;
1024
+ exttable_name: any;
1025
+ name: any;
1026
+ configuration: {
1027
+ columns: any;
1028
+ layout: any;
1029
+ default_state: any;
1030
+ };
1031
+ req: any;
1032
+ }) => {
1033
+ listQuery(state: any, stateHash: any): Promise<{
1034
+ rows: import("@saltcorn/db-common/internal").Row[];
1035
+ rowCount: number | undefined;
1036
+ }>;
1037
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1038
+ };
1039
+ configCheck: (view: any) => Promise<{
1040
+ errors: string[];
1041
+ warnings: string[];
1042
+ }>;
1043
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1044
+ } | {
1026
1045
  name: string;
1027
1046
  description: string;
1028
1047
  configuration_workflow: (req: object) => import("../models/workflow");
@@ -1182,103 +1201,114 @@ export const viewtemplates: ({
1182
1201
  } | {
1183
1202
  name: string;
1184
1203
  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
1204
  get_state_fields: () => object[];
1205
+ configuration_workflow: (req: object) => import("../models/workflow");
1206
+ run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1207
+ columns: object[];
1208
+ layout: object;
1209
+ page_title?: string | undefined;
1210
+ page_title_formula: boolean;
1211
+ }, state: object, extra: object, { showQuery }: {
1212
+ showQuery: any;
1213
+ }) => Promise<string>;
1214
+ runMany: (table_id: number, viewname: string, { columns, layout }: {
1215
+ columns: object[];
1216
+ layout: object;
1217
+ }, state: object, extra: object, { runManyQuery }: {
1218
+ runManyQuery: any;
1219
+ }) => Promise<object[]>;
1220
+ renderRows: (table: object, viewname: string, { columns, layout }: {
1221
+ columns: object[];
1222
+ layout: object;
1223
+ }, extra: object, rows: object[], state: any) => Promise<string>;
1224
+ initial_config: Function;
1202
1225
  display_state_form: boolean;
1203
1226
  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;
1227
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1228
+ columns: object[];
1229
+ layout: any;
1211
1230
  }, body: any, { req, res }: {
1212
1231
  req: object;
1213
- res: object;
1214
- }, { submitAjaxQuery }: {
1215
- submitAjaxQuery: any;
1232
+ res: any;
1233
+ }, { actionQuery }: {
1234
+ actionQuery: any;
1216
1235
  }) => 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
1236
  };
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, }: {
1237
+ getStringsForI18n({ layout }: {
1238
+ layout: object;
1239
+ }): string[];
1240
+ interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1241
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1242
1242
  table_id: any;
1243
- viewname: any;
1243
+ exttable_name: any;
1244
+ name: any;
1244
1245
  configuration: {
1245
1246
  columns: any;
1246
- default_state: any;
1247
+ layout: any;
1247
1248
  };
1248
1249
  req: any;
1250
+ res: any;
1249
1251
  }) => {
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
- };
1252
+ showQuery(state: any): Promise<{
1253
+ rows: null;
1254
+ message: string;
1261
1255
  } | {
1262
- json: {
1263
- error: any;
1264
- msgid?: undefined;
1265
- };
1256
+ rows: import("@saltcorn/db-common/internal").Row[];
1257
+ message: null;
1266
1258
  }>;
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
- };
1259
+ runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1260
+ where: any;
1261
+ limit: any;
1262
+ offset: any;
1263
+ joinFieldsExtra: any;
1264
+ orderBy: any;
1265
+ orderDesc: any;
1266
+ }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1267
+ actionQuery(): Promise<{
1268
+ json: any;
1277
1269
  }>;
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
1270
  };
1271
+ configCheck: (view: any) => Promise<{
1272
+ errors: string[];
1273
+ warnings: string[];
1274
+ }>;
1281
1275
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1276
+ } | {
1277
+ name: string;
1278
+ description: string;
1279
+ configuration_workflow: (req: object) => import("../models/workflow");
1280
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1281
+ list_view: string;
1282
+ show_view: string;
1283
+ subtables: object;
1284
+ }, state: any, extraArgs: any, { getRowQuery }: {
1285
+ getRowQuery: any;
1286
+ }) => Promise<div>;
1287
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1288
+ list_view: string;
1289
+ show_view: any;
1290
+ }) => Promise<object[]>;
1291
+ display_state_form: ({ list_view, _omit_state_form }: {
1292
+ list_view: string;
1293
+ _omit_state_form: boolean;
1294
+ }) => boolean;
1295
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1296
+ table_id: any;
1297
+ viewname: any;
1298
+ configuration: {
1299
+ columns: any;
1300
+ default_state: any;
1301
+ };
1302
+ req: any;
1303
+ }) => {
1304
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1305
+ };
1306
+ connectedObjects: ({ list_view, subtables }: {
1307
+ list_view: any;
1308
+ subtables: any;
1309
+ }) => Promise<{
1310
+ embeddedViews: import("../models/view")[];
1311
+ }>;
1282
1312
  } | {
1283
1313
  name: string;
1284
1314
  description: string;
@@ -1328,157 +1358,103 @@ export const viewtemplates: ({
1328
1358
  name: string;
1329
1359
  description: string;
1330
1360
  get_state_fields: () => object[];
1331
- configuration_workflow: (req: object) => import("../models/workflow");
1332
- run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1333
- columns: object[];
1334
- layout: object;
1335
- page_title?: string | undefined;
1336
- page_title_formula: boolean;
1337
- }, state: object, extra: object, { showQuery }: {
1338
- showQuery: any;
1339
- }) => Promise<string>;
1340
- runMany: (table_id: number, viewname: string, { columns, layout }: {
1341
- columns: object[];
1342
- layout: object;
1343
- }, state: object, extra: object, { runManyQuery }: {
1344
- runManyQuery: any;
1345
- }) => Promise<object[]>;
1346
- renderRows: (table: object, viewname: string, { columns, layout }: {
1361
+ configuration_workflow: () => import("../models/workflow");
1362
+ run: (table_id: number, viewname: string, { columns, layout }: {
1347
1363
  columns: object[];
1348
1364
  layout: object;
1349
- }, extra: object, rows: object[], state: any) => Promise<string>;
1350
- initial_config: Function;
1365
+ }, state: object, extra: object, { distinctValuesQuery }: {
1366
+ distinctValuesQuery: any;
1367
+ }) => Promise<Layout>;
1368
+ initial_config: () => Promise<object>;
1351
1369
  display_state_form: boolean;
1370
+ getStringsForI18n({ layout }: {
1371
+ layout: any;
1372
+ }): string[];
1352
1373
  routes: {
1353
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1354
- columns: object[];
1355
- layout: any;
1356
- }, body: any, { req, res }: {
1357
- req: object;
1374
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1375
+ req: any;
1358
1376
  res: any;
1359
1377
  }, { actionQuery }: {
1360
1378
  actionQuery: any;
1361
- }) => Promise<object>;
1379
+ }) => Promise<any>;
1362
1380
  };
1363
- getStringsForI18n({ layout }: {
1364
- layout: object;
1365
- }): string[];
1366
- interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1367
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1381
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1368
1382
  table_id: any;
1369
- exttable_name: any;
1370
- name: any;
1383
+ viewname: any;
1371
1384
  configuration: {
1372
1385
  columns: any;
1373
- layout: any;
1374
1386
  };
1375
1387
  req: any;
1376
1388
  res: any;
1389
+ exttable_name: any;
1377
1390
  }) => {
1378
- showQuery(state: any): Promise<{
1379
- rows: null;
1380
- message: string;
1381
- } | {
1382
- rows: import("@saltcorn/db-common/internal").Row[];
1383
- message: null;
1384
- }>;
1385
- runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1386
- where: any;
1387
- limit: any;
1388
- offset: any;
1389
- joinFieldsExtra: any;
1390
- orderBy: any;
1391
- orderDesc: any;
1392
- }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1393
- actionQuery(): Promise<{
1391
+ actionQuery(state: any, rndid: any): Promise<{
1394
1392
  json: any;
1395
1393
  }>;
1394
+ distinctValuesQuery(state: any): Promise<{
1395
+ distinct_values: {};
1396
+ role: any;
1397
+ }>;
1396
1398
  };
1397
- configCheck: (view: any) => Promise<{
1398
- errors: string[];
1399
- warnings: string[];
1400
- }>;
1401
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1402
1399
  } | {
1403
1400
  name: string;
1404
1401
  description: string;
1405
1402
  configuration_workflow: (req: object) => import("../models/workflow");
1406
- run: (table_id: string | number, viewname: string, { columns, layout, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
1407
- columns: object[];
1408
- view_to_create?: string | undefined;
1409
- create_view_display: string;
1410
- create_view_label?: string | undefined;
1411
- default_state?: object | undefined;
1412
- create_view_location?: string | undefined;
1413
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1414
- listQuery: any;
1415
- }) => Promise<any>;
1416
- view_quantity: string;
1417
- get_state_fields: (table_id: string, viewname: any, { columns }: {
1418
- columns: object[];
1419
- }) => Function;
1420
- initial_config: Function;
1421
- on_delete: (table_id: any, viewname: string, { default_state }: {
1422
- default_state: any;
1423
- }) => Promise<void>;
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;
1424
1420
  routes: {
1425
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1426
- columns: object[];
1427
- layout: any;
1428
- }, body: object, { req, res }: {
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
1429
  req: object;
1430
- res: any;
1431
- }, { getRowQuery }: {
1432
- getRowQuery: any;
1430
+ res: object;
1431
+ }, { submitAjaxQuery }: {
1432
+ submitAjaxQuery: any;
1433
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>;
1434
1444
  };
1435
- display_state_form: (opts: object) => boolean;
1436
- default_state_form: ({ default_state }: object) => boolean;
1437
- getStringsForI18n({ columns, create_view_label }: {
1438
- columns: any;
1439
- create_view_label: any;
1440
- }): string[];
1441
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
1442
- table_id: any;
1443
- exttable_name: any;
1444
- name: any;
1445
- configuration: {
1446
- columns: any;
1447
- layout: any;
1448
- default_state: any;
1449
- };
1450
- req: any;
1451
- }) => {
1452
- listQuery(state: any, stateHash: any): Promise<{
1453
- rows: import("@saltcorn/db-common/internal").Row[];
1454
- rowCount: number;
1455
- }>;
1456
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1457
- };
1458
- configCheck: (view: any) => Promise<{
1459
- errors: string[];
1460
- warnings: string[];
1461
- }>;
1462
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1463
- } | {
1464
- name: string;
1465
- description: string;
1466
- configuration_workflow: (req: object) => import("../models/workflow");
1467
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1468
- list_view: string;
1469
- show_view: string;
1470
- subtables: object;
1471
- }, state: any, extraArgs: any, { getRowQuery }: {
1472
- getRowQuery: any;
1473
- }) => Promise<div>;
1474
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1475
- list_view: string;
1476
- show_view: any;
1477
- }) => Promise<object[]>;
1478
- display_state_form: ({ list_view, _omit_state_form }: {
1479
- list_view: string;
1480
- _omit_state_form: boolean;
1481
- }) => boolean;
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[];
1482
1458
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1483
1459
  table_id: any;
1484
1460
  viewname: any;
@@ -1488,14 +1464,38 @@ export const viewtemplates: ({
1488
1464
  };
1489
1465
  req: any;
1490
1466
  }) => {
1491
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
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>;
1492
1497
  };
1493
- connectedObjects: ({ list_view, subtables }: {
1494
- list_view: any;
1495
- subtables: any;
1496
- }) => Promise<{
1497
- embeddedViews: import("../models/view")[];
1498
- }>;
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");