@saltcorn/data 0.9.4-beta.6 → 0.9.4-beta.7

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,151 +1,4 @@
1
1
  export const types: ({
2
- name: string;
3
- sql_name: string;
4
- js_type: string;
5
- contract: () => Function;
6
- fieldviews: {
7
- show: {
8
- isEdit: boolean;
9
- description: string;
10
- run: (v: any) => any;
11
- };
12
- checkboxes: {
13
- isEdit: boolean;
14
- description: string;
15
- run: (v: any) => any;
16
- };
17
- TrueFalse: {
18
- isEdit: boolean;
19
- description: string;
20
- run: (v: any) => "" | "True" | "False";
21
- };
22
- edit: {
23
- isEdit: boolean;
24
- description: string;
25
- configFields: ({
26
- name: string;
27
- label: string;
28
- type: string;
29
- attributes: {
30
- options: string[];
31
- };
32
- } | {
33
- name: string;
34
- label: string;
35
- type: string;
36
- attributes?: undefined;
37
- })[];
38
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
39
- };
40
- switch: {
41
- isEdit: boolean;
42
- description: string;
43
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
44
- };
45
- show_with_html: {
46
- configFields: {
47
- input_type: string;
48
- name: string;
49
- label: string;
50
- sublabel: string;
51
- default: string;
52
- attributes: {
53
- mode: string;
54
- };
55
- }[];
56
- isEdit: boolean;
57
- description: string;
58
- run: (v: any, req: any, attrs?: {}) => any;
59
- };
60
- tristate: {
61
- isEdit: boolean;
62
- description: string;
63
- configFields: {
64
- name: string;
65
- label: string;
66
- type: string;
67
- }[];
68
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
69
- };
70
- };
71
- attributes: object[];
72
- readFromFormRecord: (rec: any, name: string) => boolean | null;
73
- read: (v: object) => boolean | null;
74
- readFromDB: (v: object) => object;
75
- listAs: (v: object) => object;
76
- validate: () => boolean;
77
- } | {
78
- name: string;
79
- sql_name: string;
80
- js_type: string;
81
- contract: () => Function;
82
- attributes: object[];
83
- fieldviews: {
84
- show: {
85
- isEdit: boolean;
86
- description: string;
87
- run: (d: any, req: any, attrs?: {}) => any;
88
- };
89
- showDay: {
90
- isEdit: boolean;
91
- description: string;
92
- run: (d: any, req: any) => any;
93
- };
94
- format: {
95
- isEdit: boolean;
96
- description: string;
97
- configFields: {
98
- name: string;
99
- label: string;
100
- type: string;
101
- sublabel: string;
102
- }[];
103
- run: (d: any, req: any, options: any) => any;
104
- };
105
- relative: {
106
- isEdit: boolean;
107
- description: string;
108
- run: (d: any, req: any) => string;
109
- };
110
- yearsAgo: {
111
- isEdit: boolean;
112
- description: string;
113
- run: (d: any, req: any) => string;
114
- };
115
- show_with_html: {
116
- configFields: {
117
- input_type: string;
118
- name: string;
119
- label: string;
120
- sublabel: string;
121
- default: string;
122
- attributes: {
123
- mode: string;
124
- };
125
- }[];
126
- isEdit: boolean;
127
- description: string;
128
- run: (v: any, req: any, attrs?: {}) => any;
129
- };
130
- edit: {
131
- isEdit: boolean;
132
- blockDisplay: boolean;
133
- description: string;
134
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
135
- };
136
- editDay: {
137
- isEdit: boolean;
138
- blockDisplay: boolean;
139
- description: string;
140
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
141
- };
142
- };
143
- presets: {
144
- Now: () => Date;
145
- };
146
- read: (v: object, attrs: object) => object;
147
- validate: () => boolean;
148
- } | {
149
2
  name: string;
150
3
  sql_name: string;
151
4
  js_type: string;
@@ -585,6 +438,42 @@ export const types: ({
585
438
  validate_attributes: ({ min, max }: object) => boolean;
586
439
  read: (v: object) => object;
587
440
  validate: ({ min, max }: object) => boolean;
441
+ } | {
442
+ name: string;
443
+ sql_name: string;
444
+ js_type: string;
445
+ contract: () => Function;
446
+ fieldviews: {
447
+ show: {
448
+ isEdit: boolean;
449
+ description: string;
450
+ run: (s: any) => any;
451
+ };
452
+ show_with_html: {
453
+ configFields: {
454
+ input_type: string;
455
+ name: string;
456
+ label: string;
457
+ sublabel: string;
458
+ default: string;
459
+ attributes: {
460
+ mode: string;
461
+ };
462
+ }[];
463
+ isEdit: boolean;
464
+ description: string;
465
+ run: (v: any, req: any, attrs?: {}) => any;
466
+ };
467
+ edit: {
468
+ isEdit: boolean;
469
+ blockDisplay: boolean;
470
+ description: string;
471
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
472
+ };
473
+ };
474
+ attributes: object[];
475
+ read: (v: object) => object;
476
+ validate: () => boolean;
588
477
  } | {
589
478
  name: string;
590
479
  sql_name: string;
@@ -770,11 +659,38 @@ export const types: ({
770
659
  sql_name: string;
771
660
  js_type: string;
772
661
  contract: () => Function;
662
+ attributes: object[];
773
663
  fieldviews: {
774
664
  show: {
775
665
  isEdit: boolean;
776
666
  description: string;
777
- run: (s: any) => any;
667
+ run: (d: any, req: any, attrs?: {}) => any;
668
+ };
669
+ showDay: {
670
+ isEdit: boolean;
671
+ description: string;
672
+ run: (d: any, req: any) => any;
673
+ };
674
+ format: {
675
+ isEdit: boolean;
676
+ description: string;
677
+ configFields: {
678
+ name: string;
679
+ label: string;
680
+ type: string;
681
+ sublabel: string;
682
+ }[];
683
+ run: (d: any, req: any, options: any) => any;
684
+ };
685
+ relative: {
686
+ isEdit: boolean;
687
+ description: string;
688
+ run: (d: any, req: any) => string;
689
+ };
690
+ yearsAgo: {
691
+ isEdit: boolean;
692
+ description: string;
693
+ run: (d: any, req: any) => string;
778
694
  };
779
695
  show_with_html: {
780
696
  configFields: {
@@ -797,53 +713,155 @@ export const types: ({
797
713
  description: string;
798
714
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
799
715
  };
716
+ editDay: {
717
+ isEdit: boolean;
718
+ blockDisplay: boolean;
719
+ description: string;
720
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
721
+ };
800
722
  };
801
- attributes: object[];
802
- read: (v: object) => object;
723
+ presets: {
724
+ Now: () => Date;
725
+ };
726
+ read: (v: object, attrs: object) => object;
803
727
  validate: () => boolean;
804
- })[];
805
- export const viewtemplates: ({
728
+ } | {
806
729
  name: string;
807
- description: string;
808
- get_state_fields: () => object[];
809
- configuration_workflow: () => import("../models/workflow");
810
- run: (table_id: number, viewname: string, { columns, layout }: {
811
- columns: object[];
812
- layout: object;
813
- }, state: object, extra: object, { distinctValuesQuery }: {
814
- distinctValuesQuery: any;
815
- }) => Promise<Layout>;
816
- initial_config: () => Promise<object>;
817
- display_state_form: boolean;
818
- getStringsForI18n({ layout }: {
819
- layout: any;
820
- }): string[];
821
- routes: {
822
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
823
- req: any;
824
- res: any;
825
- }, { actionQuery }: {
826
- actionQuery: any;
827
- }) => Promise<any>;
828
- };
829
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
830
- table_id: any;
831
- viewname: any;
832
- configuration: {
833
- columns: any;
834
- };
835
- req: any;
836
- res: any;
730
+ sql_name: string;
731
+ js_type: string;
732
+ contract: () => Function;
733
+ fieldviews: {
734
+ show: {
735
+ isEdit: boolean;
736
+ description: string;
737
+ run: (v: any) => any;
738
+ };
739
+ checkboxes: {
740
+ isEdit: boolean;
741
+ description: string;
742
+ run: (v: any) => any;
743
+ };
744
+ TrueFalse: {
745
+ isEdit: boolean;
746
+ description: string;
747
+ run: (v: any) => "" | "True" | "False";
748
+ };
749
+ edit: {
750
+ isEdit: boolean;
751
+ description: string;
752
+ configFields: ({
753
+ name: string;
754
+ label: string;
755
+ type: string;
756
+ attributes: {
757
+ options: string[];
758
+ };
759
+ } | {
760
+ name: string;
761
+ label: string;
762
+ type: string;
763
+ attributes?: undefined;
764
+ })[];
765
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
766
+ };
767
+ switch: {
768
+ isEdit: boolean;
769
+ description: string;
770
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
771
+ };
772
+ show_with_html: {
773
+ configFields: {
774
+ input_type: string;
775
+ name: string;
776
+ label: string;
777
+ sublabel: string;
778
+ default: string;
779
+ attributes: {
780
+ mode: string;
781
+ };
782
+ }[];
783
+ isEdit: boolean;
784
+ description: string;
785
+ run: (v: any, req: any, attrs?: {}) => any;
786
+ };
787
+ tristate: {
788
+ isEdit: boolean;
789
+ description: string;
790
+ configFields: {
791
+ name: string;
792
+ label: string;
793
+ type: string;
794
+ }[];
795
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
796
+ };
797
+ };
798
+ attributes: object[];
799
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
800
+ read: (v: object) => boolean | null;
801
+ readFromDB: (v: object) => object;
802
+ listAs: (v: object) => object;
803
+ validate: () => boolean;
804
+ })[];
805
+ export const viewtemplates: ({
806
+ name: string;
807
+ description: string;
808
+ configuration_workflow: (req: object) => import("../models/workflow");
809
+ run: (table_id: string | number, viewname: string, { columns, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
810
+ columns: object[];
811
+ view_to_create?: string | undefined;
812
+ create_view_display: string;
813
+ create_view_label?: string | undefined;
814
+ default_state?: object | undefined;
815
+ create_view_location?: string | undefined;
816
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
817
+ listQuery: any;
818
+ }) => Promise<any>;
819
+ view_quantity: string;
820
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
821
+ columns: object[];
822
+ }) => Function;
823
+ initial_config: Function;
824
+ on_delete: (table_id: any, viewname: string, { default_state }: {
825
+ default_state: any;
826
+ }) => Promise<void>;
827
+ routes: {
828
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
829
+ columns: object[];
830
+ layout: any;
831
+ }, body: object, { req, res }: {
832
+ req: object;
833
+ res: any;
834
+ }, { getRowQuery }: {
835
+ getRowQuery: any;
836
+ }) => Promise<object>;
837
+ };
838
+ display_state_form: (opts: object) => boolean;
839
+ default_state_form: ({ default_state }: object) => boolean;
840
+ getStringsForI18n({ columns, create_view_label }: {
841
+ columns: any;
842
+ create_view_label: any;
843
+ }): string[];
844
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
845
+ table_id: any;
837
846
  exttable_name: any;
847
+ name: any;
848
+ configuration: {
849
+ columns: any;
850
+ default_state: any;
851
+ };
852
+ req: any;
838
853
  }) => {
839
- actionQuery(state: any, rndid: any): Promise<{
840
- json: any;
841
- }>;
842
- distinctValuesQuery(state: any): Promise<{
843
- distinct_values: {};
844
- role: any;
854
+ listQuery(state: any, stateHash: any): Promise<{
855
+ rows: import("@saltcorn/db-common/internal").Row[];
856
+ rowCount: number;
845
857
  }>;
858
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
846
859
  };
860
+ configCheck: (view: any) => Promise<{
861
+ errors: string[];
862
+ warnings: string[];
863
+ }>;
864
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
847
865
  } | {
848
866
  name: string;
849
867
  description: string;
@@ -998,103 +1016,114 @@ export const viewtemplates: ({
998
1016
  } | {
999
1017
  name: string;
1000
1018
  description: string;
1001
- configuration_workflow: (req: object) => import("../models/workflow");
1002
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1003
- participant_field: string;
1004
- msg_relation: string;
1005
- msgsender_field: any;
1006
- msgview: string;
1007
- msgform: string;
1008
- participant_maxread_field: string;
1009
- }, state: object, { req, res }: {
1010
- req: object;
1011
- res: object;
1012
- }, { getRowQuery, updateQuery, optionsQuery }: {
1013
- getRowQuery: any;
1014
- updateQuery: any;
1015
- optionsQuery: any;
1016
- }) => Promise<div>;
1017
1019
  get_state_fields: () => object[];
1020
+ configuration_workflow: (req: object) => import("../models/workflow");
1021
+ run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1022
+ columns: object[];
1023
+ layout: object;
1024
+ page_title?: string | undefined;
1025
+ page_title_formula: boolean;
1026
+ }, state: object, extra: object, { showQuery }: {
1027
+ showQuery: any;
1028
+ }) => Promise<string>;
1029
+ runMany: (table_id: number, viewname: string, { columns, layout }: {
1030
+ columns: object[];
1031
+ layout: object;
1032
+ }, state: object, extra: object, { runManyQuery }: {
1033
+ runManyQuery: any;
1034
+ }) => Promise<object[]>;
1035
+ renderRows: (table: object, viewname: string, { columns, layout }: {
1036
+ columns: object[];
1037
+ layout: object;
1038
+ }, extra: object, rows: object[], state: any) => Promise<string>;
1039
+ initial_config: Function;
1018
1040
  display_state_form: boolean;
1019
1041
  routes: {
1020
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1021
- participant_field: string;
1022
- msg_relation: string;
1023
- msgsender_field: any;
1024
- msgview: string;
1025
- msgform: string;
1026
- participant_maxread_field: string;
1042
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1043
+ columns: object[];
1044
+ layout: any;
1027
1045
  }, body: any, { req, res }: {
1028
1046
  req: object;
1029
- res: object;
1030
- }, { submitAjaxQuery }: {
1031
- submitAjaxQuery: any;
1047
+ res: any;
1048
+ }, { actionQuery }: {
1049
+ actionQuery: any;
1032
1050
  }) => Promise<object>;
1033
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1034
- participant_field: string;
1035
- participant_maxread_field: string;
1036
- }, body: any, { req, res }: {
1037
- req: object;
1038
- res: object;
1039
- }, { ackReadQuery }: {
1040
- ackReadQuery: any;
1041
- }) => Promise<void>;
1042
- 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>;
1043
1051
  };
1044
- noAutoTest: boolean;
1045
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1046
- participant_field: object;
1047
- }, room_id: string, user: object) => Promise<object>;
1048
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1049
- participant_field: any;
1050
- msg_relation: string;
1051
- msgsender_field: string;
1052
- msgview: string;
1053
- msgform: any;
1054
- participant_maxread_field: any;
1055
- }) => object[];
1056
- getStringsForI18n(): object[];
1057
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1052
+ getStringsForI18n({ layout }: {
1053
+ layout: object;
1054
+ }): string[];
1055
+ interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1056
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1058
1057
  table_id: any;
1059
- viewname: any;
1058
+ exttable_name: any;
1059
+ name: any;
1060
1060
  configuration: {
1061
1061
  columns: any;
1062
- default_state: any;
1062
+ layout: any;
1063
1063
  };
1064
1064
  req: any;
1065
+ res: any;
1065
1066
  }) => {
1066
- 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>;
1067
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1068
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1069
- json: {
1070
- msgid: {
1071
- error: string;
1072
- } | {
1073
- success: any;
1074
- };
1075
- error?: undefined;
1076
- };
1077
- } | {
1078
- json: {
1079
- error: any;
1080
- msgid?: undefined;
1081
- };
1082
- }>;
1083
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1084
- json: {
1085
- error: string;
1086
- success?: undefined;
1087
- };
1067
+ showQuery(state: any, fields: any): Promise<{
1068
+ rows: null;
1069
+ message: string;
1088
1070
  } | {
1089
- json: {
1090
- success: string;
1091
- error?: undefined;
1092
- };
1071
+ rows: import("@saltcorn/db-common/internal").Row[];
1072
+ message: null;
1073
+ }>;
1074
+ runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1075
+ where: any;
1076
+ limit: any;
1077
+ offset: any;
1078
+ joinFieldsExtra: any;
1079
+ orderBy: any;
1080
+ orderDesc: any;
1081
+ }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1082
+ actionQuery(): Promise<{
1083
+ json: any;
1093
1084
  }>;
1094
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1095
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1096
1085
  };
1086
+ configCheck: (view: any) => Promise<{
1087
+ errors: string[];
1088
+ warnings: string[];
1089
+ }>;
1097
1090
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1091
+ } | {
1092
+ name: string;
1093
+ description: string;
1094
+ configuration_workflow: (req: object) => import("../models/workflow");
1095
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1096
+ list_view: string;
1097
+ show_view: string;
1098
+ subtables: object;
1099
+ }, state: any, extraArgs: any, { getRowQuery }: {
1100
+ getRowQuery: any;
1101
+ }) => Promise<div>;
1102
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1103
+ list_view: string;
1104
+ show_view: any;
1105
+ }) => Promise<object[]>;
1106
+ display_state_form: ({ list_view, _omit_state_form }: {
1107
+ list_view: string;
1108
+ _omit_state_form: boolean;
1109
+ }) => boolean;
1110
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1111
+ table_id: any;
1112
+ viewname: any;
1113
+ configuration: {
1114
+ columns: any;
1115
+ default_state: any;
1116
+ };
1117
+ req: any;
1118
+ }) => {
1119
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1120
+ };
1121
+ connectedObjects: ({ list_view, subtables }: {
1122
+ list_view: any;
1123
+ subtables: any;
1124
+ }) => Promise<{
1125
+ embeddedViews: import("../models/view")[];
1126
+ }>;
1098
1127
  } | {
1099
1128
  name: string;
1100
1129
  description: string;
@@ -1139,156 +1168,103 @@ export const viewtemplates: ({
1139
1168
  name: string;
1140
1169
  description: string;
1141
1170
  get_state_fields: () => object[];
1142
- configuration_workflow: (req: object) => import("../models/workflow");
1143
- run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1144
- columns: object[];
1145
- layout: object;
1146
- page_title?: string | undefined;
1147
- page_title_formula: boolean;
1148
- }, state: object, extra: object, { showQuery }: {
1149
- showQuery: any;
1150
- }) => Promise<string>;
1151
- runMany: (table_id: number, viewname: string, { columns, layout }: {
1152
- columns: object[];
1153
- layout: object;
1154
- }, state: object, extra: object, { runManyQuery }: {
1155
- runManyQuery: any;
1156
- }) => Promise<object[]>;
1157
- renderRows: (table: object, viewname: string, { columns, layout }: {
1171
+ configuration_workflow: () => import("../models/workflow");
1172
+ run: (table_id: number, viewname: string, { columns, layout }: {
1158
1173
  columns: object[];
1159
1174
  layout: object;
1160
- }, extra: object, rows: object[], state: any) => Promise<string>;
1161
- initial_config: Function;
1175
+ }, state: object, extra: object, { distinctValuesQuery }: {
1176
+ distinctValuesQuery: any;
1177
+ }) => Promise<Layout>;
1178
+ initial_config: () => Promise<object>;
1162
1179
  display_state_form: boolean;
1180
+ getStringsForI18n({ layout }: {
1181
+ layout: any;
1182
+ }): string[];
1163
1183
  routes: {
1164
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1165
- columns: object[];
1166
- layout: any;
1167
- }, body: any, { req, res }: {
1168
- req: object;
1184
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1185
+ req: any;
1169
1186
  res: any;
1170
1187
  }, { actionQuery }: {
1171
1188
  actionQuery: any;
1172
- }) => Promise<object>;
1189
+ }) => Promise<any>;
1173
1190
  };
1174
- getStringsForI18n({ layout }: {
1175
- layout: object;
1176
- }): string[];
1177
- interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1178
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1191
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1179
1192
  table_id: any;
1180
- exttable_name: any;
1181
- name: any;
1193
+ viewname: any;
1182
1194
  configuration: {
1183
1195
  columns: any;
1184
- layout: any;
1185
1196
  };
1186
1197
  req: any;
1187
1198
  res: any;
1199
+ exttable_name: any;
1188
1200
  }) => {
1189
- showQuery(state: any, fields: any): Promise<{
1190
- rows: null;
1191
- message: string;
1192
- } | {
1193
- rows: import("@saltcorn/db-common/internal").Row[];
1194
- message: null;
1195
- }>;
1196
- runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1197
- where: any;
1198
- limit: any;
1199
- offset: any;
1200
- joinFieldsExtra: any;
1201
- orderBy: any;
1202
- orderDesc: any;
1203
- }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1204
- actionQuery(): Promise<{
1201
+ actionQuery(state: any, rndid: any): Promise<{
1205
1202
  json: any;
1206
1203
  }>;
1204
+ distinctValuesQuery(state: any): Promise<{
1205
+ distinct_values: {};
1206
+ role: any;
1207
+ }>;
1207
1208
  };
1208
- configCheck: (view: any) => Promise<{
1209
- errors: string[];
1210
- warnings: string[];
1211
- }>;
1212
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1213
1209
  } | {
1214
1210
  name: string;
1215
1211
  description: string;
1216
1212
  configuration_workflow: (req: object) => import("../models/workflow");
1217
- run: (table_id: string | number, viewname: string, { columns, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
1218
- columns: object[];
1219
- view_to_create?: string | undefined;
1220
- create_view_display: string;
1221
- create_view_label?: string | undefined;
1222
- default_state?: object | undefined;
1223
- create_view_location?: string | undefined;
1224
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1225
- listQuery: any;
1226
- }) => Promise<any>;
1227
- view_quantity: string;
1228
- get_state_fields: (table_id: string, viewname: any, { columns }: {
1229
- columns: object[];
1230
- }) => Function;
1231
- initial_config: Function;
1232
- on_delete: (table_id: any, viewname: string, { default_state }: {
1233
- default_state: any;
1234
- }) => Promise<void>;
1213
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1214
+ participant_field: string;
1215
+ msg_relation: string;
1216
+ msgsender_field: any;
1217
+ msgview: string;
1218
+ msgform: string;
1219
+ participant_maxread_field: string;
1220
+ }, state: object, { req, res }: {
1221
+ req: object;
1222
+ res: object;
1223
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1224
+ getRowQuery: any;
1225
+ updateQuery: any;
1226
+ optionsQuery: any;
1227
+ }) => Promise<div>;
1228
+ get_state_fields: () => object[];
1229
+ display_state_form: boolean;
1235
1230
  routes: {
1236
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1237
- columns: object[];
1238
- layout: any;
1239
- }, body: object, { req, res }: {
1231
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1232
+ participant_field: string;
1233
+ msg_relation: string;
1234
+ msgsender_field: any;
1235
+ msgview: string;
1236
+ msgform: string;
1237
+ participant_maxread_field: string;
1238
+ }, body: any, { req, res }: {
1240
1239
  req: object;
1241
- res: any;
1242
- }, { getRowQuery }: {
1243
- getRowQuery: any;
1240
+ res: object;
1241
+ }, { submitAjaxQuery }: {
1242
+ submitAjaxQuery: any;
1244
1243
  }) => Promise<object>;
1244
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1245
+ participant_field: string;
1246
+ participant_maxread_field: string;
1247
+ }, body: any, { req, res }: {
1248
+ req: object;
1249
+ res: object;
1250
+ }, { ackReadQuery }: {
1251
+ ackReadQuery: any;
1252
+ }) => Promise<void>;
1253
+ 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>;
1245
1254
  };
1246
- display_state_form: (opts: object) => boolean;
1247
- default_state_form: ({ default_state }: object) => boolean;
1248
- getStringsForI18n({ columns, create_view_label }: {
1249
- columns: any;
1250
- create_view_label: any;
1251
- }): string[];
1252
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
1253
- table_id: any;
1254
- exttable_name: any;
1255
- name: any;
1256
- configuration: {
1257
- columns: any;
1258
- default_state: any;
1259
- };
1260
- req: any;
1261
- }) => {
1262
- listQuery(state: any, stateHash: any): Promise<{
1263
- rows: import("@saltcorn/db-common/internal").Row[];
1264
- rowCount: number;
1265
- }>;
1266
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1267
- };
1268
- configCheck: (view: any) => Promise<{
1269
- errors: string[];
1270
- warnings: string[];
1271
- }>;
1272
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1273
- } | {
1274
- name: string;
1275
- description: string;
1276
- configuration_workflow: (req: object) => import("../models/workflow");
1277
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1278
- list_view: string;
1279
- show_view: string;
1280
- subtables: object;
1281
- }, state: any, extraArgs: any, { getRowQuery }: {
1282
- getRowQuery: any;
1283
- }) => Promise<div>;
1284
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1285
- list_view: string;
1286
- show_view: any;
1287
- }) => Promise<object[]>;
1288
- display_state_form: ({ list_view, _omit_state_form }: {
1289
- list_view: string;
1290
- _omit_state_form: boolean;
1291
- }) => boolean;
1255
+ noAutoTest: boolean;
1256
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1257
+ participant_field: object;
1258
+ }, room_id: string, user: object) => Promise<object>;
1259
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1260
+ participant_field: any;
1261
+ msg_relation: string;
1262
+ msgsender_field: string;
1263
+ msgview: string;
1264
+ msgform: any;
1265
+ participant_maxread_field: any;
1266
+ }) => object[];
1267
+ getStringsForI18n(): object[];
1292
1268
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1293
1269
  table_id: any;
1294
1270
  viewname: any;
@@ -1298,14 +1274,38 @@ export const viewtemplates: ({
1298
1274
  };
1299
1275
  req: any;
1300
1276
  }) => {
1301
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1277
+ 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>;
1278
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1279
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1280
+ json: {
1281
+ msgid: {
1282
+ error: string;
1283
+ } | {
1284
+ success: any;
1285
+ };
1286
+ error?: undefined;
1287
+ };
1288
+ } | {
1289
+ json: {
1290
+ error: any;
1291
+ msgid?: undefined;
1292
+ };
1293
+ }>;
1294
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1295
+ json: {
1296
+ error: string;
1297
+ success?: undefined;
1298
+ };
1299
+ } | {
1300
+ json: {
1301
+ success: string;
1302
+ error?: undefined;
1303
+ };
1304
+ }>;
1305
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1306
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1302
1307
  };
1303
- connectedObjects: ({ list_view, subtables }: {
1304
- list_view: any;
1305
- subtables: any;
1306
- }) => Promise<{
1307
- embeddedViews: import("../models/view")[];
1308
- }>;
1308
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1309
1309
  })[];
1310
1310
  import fileviews = require("./fileviews");
1311
1311
  import actions = require("./actions");