@saltcorn/data 0.9.5-beta.20 → 0.9.5-beta.21

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;
@@ -616,7 +469,40 @@ export const types: ({
616
469
  show: {
617
470
  isEdit: boolean;
618
471
  description: string;
619
- run: (s: any) => any;
472
+ run: (v: any) => any;
473
+ };
474
+ checkboxes: {
475
+ isEdit: boolean;
476
+ description: string;
477
+ run: (v: any) => any;
478
+ };
479
+ TrueFalse: {
480
+ isEdit: boolean;
481
+ description: string;
482
+ run: (v: any) => "" | "True" | "False";
483
+ };
484
+ edit: {
485
+ isEdit: boolean;
486
+ description: string;
487
+ configFields: ({
488
+ name: string;
489
+ label: string;
490
+ type: string;
491
+ attributes: {
492
+ options: string[];
493
+ };
494
+ } | {
495
+ name: string;
496
+ label: string;
497
+ type: string;
498
+ attributes?: undefined;
499
+ })[];
500
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
501
+ };
502
+ switch: {
503
+ isEdit: boolean;
504
+ description: string;
505
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
620
506
  };
621
507
  show_with_html: {
622
508
  configFields: {
@@ -633,84 +519,162 @@ export const types: ({
633
519
  description: string;
634
520
  run: (v: any, req: any, attrs?: {}) => any;
635
521
  };
636
- edit: {
522
+ tristate: {
637
523
  isEdit: boolean;
638
- blockDisplay: boolean;
639
524
  description: string;
525
+ configFields: {
526
+ name: string;
527
+ label: string;
528
+ type: string;
529
+ }[];
640
530
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
641
531
  };
642
532
  };
643
533
  attributes: object[];
644
- read: (v: object) => object;
534
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
535
+ read: (v: object) => boolean | null;
536
+ readFromDB: (v: object) => object;
537
+ listAs: (v: object) => object;
645
538
  validate: () => boolean;
646
539
  } | {
647
540
  name: string;
648
541
  sql_name: string;
649
542
  js_type: string;
650
- contract: ({ min, max }: {
651
- min: number;
652
- max: number;
653
- }) => Function;
654
- distance_operators: {
655
- near: {
656
- type: string;
657
- name: string;
658
- args: any[];
659
- };
660
- };
543
+ contract: () => Function;
544
+ attributes: object[];
661
545
  fieldviews: {
662
546
  show: {
663
547
  isEdit: boolean;
664
548
  description: string;
665
- run: (s: any) => string;
549
+ run: (d: any, req: any, attrs?: {}) => any;
666
550
  };
667
- edit: {
551
+ showDay: {
552
+ isEdit: boolean;
553
+ description: string;
554
+ run: (d: any, req: any) => any;
555
+ };
556
+ format: {
668
557
  isEdit: boolean;
669
- blockDisplay: boolean;
670
558
  description: string;
671
559
  configFields: {
672
560
  name: string;
673
561
  label: string;
674
562
  type: string;
563
+ sublabel: string;
675
564
  }[];
676
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
565
+ run: (d: any, req: any, options: any) => any;
677
566
  };
678
- number_slider: {
679
- configFields: (field: any) => {
680
- name: string;
681
- type: any;
682
- required: boolean;
683
- }[];
567
+ relative: {
684
568
  isEdit: boolean;
685
569
  description: string;
686
- blockDisplay: boolean;
687
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any) => any;
570
+ run: (d: any, req: any) => string;
688
571
  };
689
- range_interval: {
690
- configFields: (field: any) => {
691
- name: string;
692
- type: any;
693
- required: boolean;
694
- }[];
572
+ yearsAgo: {
695
573
  isEdit: boolean;
696
- isFilter: boolean;
697
- blockDisplay: boolean;
698
574
  description: string;
699
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
575
+ run: (d: any, req: any) => string;
700
576
  };
701
- progress_bar: {
702
- configFields: (field: any) => ({
703
- name: string;
704
- type: string;
705
- label: string;
706
- required?: undefined;
707
- showIf?: undefined;
708
- class?: undefined;
709
- showif?: undefined;
710
- } | {
577
+ show_with_html: {
578
+ configFields: {
579
+ input_type: string;
711
580
  name: string;
712
581
  label: string;
713
- type: any;
582
+ sublabel: string;
583
+ default: string;
584
+ attributes: {
585
+ mode: string;
586
+ };
587
+ }[];
588
+ isEdit: boolean;
589
+ description: string;
590
+ run: (v: any, req: any, attrs?: {}) => any;
591
+ };
592
+ edit: {
593
+ isEdit: boolean;
594
+ blockDisplay: boolean;
595
+ description: string;
596
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
597
+ };
598
+ editDay: {
599
+ isEdit: boolean;
600
+ blockDisplay: boolean;
601
+ description: string;
602
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
603
+ };
604
+ };
605
+ presets: {
606
+ Now: () => Date;
607
+ };
608
+ read: (v: object, attrs: object) => object;
609
+ validate: () => boolean;
610
+ } | {
611
+ name: string;
612
+ sql_name: string;
613
+ js_type: string;
614
+ contract: ({ min, max }: {
615
+ min: number;
616
+ max: number;
617
+ }) => Function;
618
+ distance_operators: {
619
+ near: {
620
+ type: string;
621
+ name: string;
622
+ args: any[];
623
+ };
624
+ };
625
+ fieldviews: {
626
+ show: {
627
+ isEdit: boolean;
628
+ description: string;
629
+ run: (s: any) => string;
630
+ };
631
+ edit: {
632
+ isEdit: boolean;
633
+ blockDisplay: boolean;
634
+ description: string;
635
+ configFields: {
636
+ name: string;
637
+ label: string;
638
+ type: string;
639
+ }[];
640
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
641
+ };
642
+ number_slider: {
643
+ configFields: (field: any) => {
644
+ name: string;
645
+ type: any;
646
+ required: boolean;
647
+ }[];
648
+ isEdit: boolean;
649
+ description: string;
650
+ blockDisplay: boolean;
651
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any) => any;
652
+ };
653
+ range_interval: {
654
+ configFields: (field: any) => {
655
+ name: string;
656
+ type: any;
657
+ required: boolean;
658
+ }[];
659
+ isEdit: boolean;
660
+ isFilter: boolean;
661
+ blockDisplay: boolean;
662
+ description: string;
663
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
664
+ };
665
+ progress_bar: {
666
+ configFields: (field: any) => ({
667
+ name: string;
668
+ type: string;
669
+ label: string;
670
+ required?: undefined;
671
+ showIf?: undefined;
672
+ class?: undefined;
673
+ showif?: undefined;
674
+ } | {
675
+ name: string;
676
+ label: string;
677
+ type: any;
714
678
  required: boolean;
715
679
  showIf: {
716
680
  max_min_formula: boolean;
@@ -830,49 +794,104 @@ export const types: ({
830
794
  attributes: object[];
831
795
  read: (v: object) => string | number | undefined;
832
796
  validate: ({ min, max }: object) => boolean | object;
797
+ } | {
798
+ name: string;
799
+ sql_name: string;
800
+ js_type: string;
801
+ contract: () => Function;
802
+ fieldviews: {
803
+ show: {
804
+ isEdit: boolean;
805
+ description: string;
806
+ run: (s: any) => any;
807
+ };
808
+ show_with_html: {
809
+ configFields: {
810
+ input_type: string;
811
+ name: string;
812
+ label: string;
813
+ sublabel: string;
814
+ default: string;
815
+ attributes: {
816
+ mode: string;
817
+ };
818
+ }[];
819
+ isEdit: boolean;
820
+ description: string;
821
+ run: (v: any, req: any, attrs?: {}) => any;
822
+ };
823
+ edit: {
824
+ isEdit: boolean;
825
+ blockDisplay: boolean;
826
+ description: string;
827
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
828
+ };
829
+ };
830
+ attributes: object[];
831
+ read: (v: object) => object;
832
+ validate: () => boolean;
833
833
  })[];
834
834
  export const viewtemplates: ({
835
835
  name: string;
836
836
  description: string;
837
- get_state_fields: () => object[];
838
- configuration_workflow: () => import("../models/workflow");
839
- run: (table_id: number, viewname: string, { columns, layout }: {
837
+ configuration_workflow: (req: object) => import("../models/workflow");
838
+ 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, }: {
840
839
  columns: object[];
841
- layout: object;
842
- }, state: object, extra: object, { distinctValuesQuery }: {
843
- distinctValuesQuery: any;
844
- }) => Promise<Layout>;
845
- initial_config: () => Promise<object>;
846
- display_state_form: boolean;
847
- getStringsForI18n({ layout }: {
848
- layout: any;
849
- }): string[];
840
+ view_to_create?: string | undefined;
841
+ create_view_display: string;
842
+ create_view_label?: string | undefined;
843
+ default_state?: object | undefined;
844
+ create_view_location?: string | undefined;
845
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
846
+ listQuery: any;
847
+ }) => Promise<any>;
848
+ view_quantity: string;
849
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
850
+ columns: object[];
851
+ }) => Function;
852
+ initial_config: Function;
853
+ on_delete: (table_id: any, viewname: string, { default_state }: {
854
+ default_state: any;
855
+ }) => Promise<void>;
850
856
  routes: {
851
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
852
- req: any;
857
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
858
+ columns: object[];
859
+ layout: any;
860
+ }, body: object, { req, res }: {
861
+ req: object;
853
862
  res: any;
854
- }, { actionQuery }: {
855
- actionQuery: any;
856
- }) => Promise<any>;
863
+ }, { getRowQuery }: {
864
+ getRowQuery: any;
865
+ }) => Promise<object>;
857
866
  };
858
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
867
+ display_state_form: (opts: object) => boolean;
868
+ default_state_form: ({ default_state }: object) => boolean;
869
+ getStringsForI18n({ columns, create_view_label }: {
870
+ columns: any;
871
+ create_view_label: any;
872
+ }): string[];
873
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
859
874
  table_id: any;
860
- viewname: any;
875
+ exttable_name: any;
876
+ name: any;
861
877
  configuration: {
862
878
  columns: any;
879
+ layout: any;
880
+ default_state: any;
863
881
  };
864
882
  req: any;
865
- res: any;
866
- exttable_name: any;
867
883
  }) => {
868
- actionQuery(state: any, rndid: any): Promise<{
869
- json: any;
870
- }>;
871
- distinctValuesQuery(state: any): Promise<{
872
- distinct_values: {};
873
- role: any;
884
+ listQuery(state: any, stateHash: any): Promise<{
885
+ rows: import("@saltcorn/db-common/internal").Row[];
886
+ rowCount: number;
874
887
  }>;
888
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
875
889
  };
890
+ configCheck: (view: any) => Promise<{
891
+ errors: string[];
892
+ warnings: string[];
893
+ }>;
894
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
876
895
  } | {
877
896
  name: string;
878
897
  description: string;
@@ -1030,108 +1049,119 @@ export const viewtemplates: ({
1030
1049
  } | {
1031
1050
  name: string;
1032
1051
  description: string;
1033
- configuration_workflow: (req: object) => import("../models/workflow");
1034
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1035
- participant_field: string;
1036
- msg_relation: string;
1037
- msgsender_field: any;
1038
- msgview: string;
1039
- msgform: string;
1040
- participant_maxread_field: string;
1041
- }, state: object, { req, res }: {
1042
- req: object;
1043
- res: object;
1044
- }, { getRowQuery, updateQuery, optionsQuery }: {
1045
- getRowQuery: any;
1046
- updateQuery: any;
1047
- optionsQuery: any;
1048
- }) => Promise<div>;
1049
1052
  get_state_fields: () => object[];
1053
+ configuration_workflow: (req: object) => import("../models/workflow");
1054
+ run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1055
+ columns: object[];
1056
+ layout: object;
1057
+ page_title?: string | undefined;
1058
+ page_title_formula: boolean;
1059
+ }, state: object, extra: object, { showQuery }: {
1060
+ showQuery: any;
1061
+ }) => Promise<string>;
1062
+ runMany: (table_id: number, viewname: string, { columns, layout }: {
1063
+ columns: object[];
1064
+ layout: object;
1065
+ }, state: object, extra: object, { runManyQuery }: {
1066
+ runManyQuery: any;
1067
+ }) => Promise<object[]>;
1068
+ renderRows: (table: object, viewname: string, { columns, layout }: {
1069
+ columns: object[];
1070
+ layout: object;
1071
+ }, extra: object, rows: object[], state: any) => Promise<string>;
1072
+ initial_config: Function;
1050
1073
  display_state_form: boolean;
1051
1074
  routes: {
1052
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1053
- participant_field: string;
1054
- msg_relation: string;
1055
- msgsender_field: any;
1056
- msgview: string;
1057
- msgform: string;
1058
- participant_maxread_field: string;
1075
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1076
+ columns: object[];
1077
+ layout: any;
1059
1078
  }, body: any, { req, res }: {
1060
1079
  req: object;
1061
- res: object;
1062
- }, { submitAjaxQuery }: {
1063
- submitAjaxQuery: any;
1064
- }) => Promise<object>;
1065
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1066
- participant_field: string;
1067
- participant_maxread_field: string;
1068
- }, body: any, { req, res }: {
1069
- req: object;
1070
- res: object;
1071
- }, { ackReadQuery }: {
1072
- ackReadQuery: any;
1073
- }) => Promise<void>;
1074
- 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>;
1080
+ res: any;
1081
+ }, { actionQuery }: {
1082
+ actionQuery: any;
1083
+ }) => Promise<object>;
1075
1084
  };
1076
- noAutoTest: boolean;
1077
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1078
- participant_field: object;
1079
- }, room_id: string, user: object) => Promise<object>;
1080
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1081
- participant_field: any;
1082
- msg_relation: string;
1083
- msgsender_field: string;
1084
- msgview: string;
1085
- msgform: any;
1086
- participant_maxread_field: any;
1087
- }) => object[];
1088
- getStringsForI18n(): object[];
1089
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1085
+ getStringsForI18n({ layout }: {
1086
+ layout: object;
1087
+ }): string[];
1088
+ interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1089
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1090
1090
  table_id: any;
1091
- viewname: any;
1091
+ exttable_name: any;
1092
+ name: any;
1092
1093
  configuration: {
1093
1094
  columns: any;
1094
- default_state: any;
1095
+ layout: any;
1095
1096
  };
1096
1097
  req: any;
1098
+ res: any;
1097
1099
  }) => {
1098
- 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>;
1099
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1100
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1101
- json: {
1102
- msgid: {
1103
- error: string;
1104
- } | {
1105
- success: any;
1106
- };
1107
- error?: undefined;
1108
- };
1100
+ showQuery(state: any): Promise<{
1101
+ rows: null;
1102
+ message: string;
1109
1103
  } | {
1110
- json: {
1111
- error: any;
1112
- msgid?: undefined;
1113
- };
1104
+ rows: import("@saltcorn/db-common/internal").Row[];
1105
+ message: null;
1114
1106
  }>;
1115
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1116
- json: {
1117
- error: string;
1118
- success?: undefined;
1119
- };
1120
- } | {
1121
- json: {
1122
- success: string;
1123
- error?: undefined;
1124
- };
1107
+ runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1108
+ where: any;
1109
+ limit: any;
1110
+ offset: any;
1111
+ joinFieldsExtra: any;
1112
+ orderBy: any;
1113
+ orderDesc: any;
1114
+ }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1115
+ actionQuery(): Promise<{
1116
+ json: any;
1125
1117
  }>;
1126
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1127
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1128
1118
  };
1119
+ configCheck: (view: any) => Promise<{
1120
+ errors: string[];
1121
+ warnings: string[];
1122
+ }>;
1129
1123
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1130
1124
  } | {
1131
1125
  name: string;
1132
1126
  description: string;
1133
1127
  configuration_workflow: (req: object) => import("../models/workflow");
1134
- 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, ...cols }: {
1128
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1129
+ list_view: string;
1130
+ show_view: string;
1131
+ subtables: object;
1132
+ }, state: any, extraArgs: any, { getRowQuery }: {
1133
+ getRowQuery: any;
1134
+ }) => Promise<div>;
1135
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1136
+ list_view: string;
1137
+ show_view: any;
1138
+ }) => Promise<object[]>;
1139
+ display_state_form: ({ list_view, _omit_state_form }: {
1140
+ list_view: string;
1141
+ _omit_state_form: boolean;
1142
+ }) => boolean;
1143
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1144
+ table_id: any;
1145
+ viewname: any;
1146
+ configuration: {
1147
+ columns: any;
1148
+ default_state: any;
1149
+ };
1150
+ req: any;
1151
+ }) => {
1152
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1153
+ };
1154
+ connectedObjects: ({ list_view, subtables }: {
1155
+ list_view: any;
1156
+ subtables: any;
1157
+ }) => Promise<{
1158
+ embeddedViews: import("../models/view")[];
1159
+ }>;
1160
+ } | {
1161
+ name: string;
1162
+ description: string;
1163
+ configuration_workflow: (req: object) => import("../models/workflow");
1164
+ 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 }: {
1135
1165
  show_view: string;
1136
1166
  order_field: void;
1137
1167
  descending: boolean;
@@ -1171,157 +1201,103 @@ export const viewtemplates: ({
1171
1201
  name: string;
1172
1202
  description: string;
1173
1203
  get_state_fields: () => object[];
1174
- configuration_workflow: (req: object) => import("../models/workflow");
1175
- run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1176
- columns: object[];
1177
- layout: object;
1178
- page_title?: string | undefined;
1179
- page_title_formula: boolean;
1180
- }, state: object, extra: object, { showQuery }: {
1181
- showQuery: any;
1182
- }) => Promise<string>;
1183
- runMany: (table_id: number, viewname: string, { columns, layout }: {
1184
- columns: object[];
1185
- layout: object;
1186
- }, state: object, extra: object, { runManyQuery }: {
1187
- runManyQuery: any;
1188
- }) => Promise<object[]>;
1189
- renderRows: (table: object, viewname: string, { columns, layout }: {
1204
+ configuration_workflow: () => import("../models/workflow");
1205
+ run: (table_id: number, viewname: string, { columns, layout }: {
1190
1206
  columns: object[];
1191
1207
  layout: object;
1192
- }, extra: object, rows: object[], state: any) => Promise<string>;
1193
- initial_config: Function;
1208
+ }, state: object, extra: object, { distinctValuesQuery }: {
1209
+ distinctValuesQuery: any;
1210
+ }) => Promise<Layout>;
1211
+ initial_config: () => Promise<object>;
1194
1212
  display_state_form: boolean;
1213
+ getStringsForI18n({ layout }: {
1214
+ layout: any;
1215
+ }): string[];
1195
1216
  routes: {
1196
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1197
- columns: object[];
1198
- layout: any;
1199
- }, body: any, { req, res }: {
1200
- req: object;
1217
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1218
+ req: any;
1201
1219
  res: any;
1202
1220
  }, { actionQuery }: {
1203
1221
  actionQuery: any;
1204
- }) => Promise<object>;
1222
+ }) => Promise<any>;
1205
1223
  };
1206
- getStringsForI18n({ layout }: {
1207
- layout: object;
1208
- }): string[];
1209
- interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1210
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1224
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1211
1225
  table_id: any;
1212
- exttable_name: any;
1213
- name: any;
1226
+ viewname: any;
1214
1227
  configuration: {
1215
1228
  columns: any;
1216
- layout: any;
1217
1229
  };
1218
1230
  req: any;
1219
1231
  res: any;
1232
+ exttable_name: any;
1220
1233
  }) => {
1221
- showQuery(state: any, fields: any): Promise<{
1222
- rows: null;
1223
- message: string;
1224
- } | {
1225
- rows: import("@saltcorn/db-common/internal").Row[];
1226
- message: null;
1227
- }>;
1228
- runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1229
- where: any;
1230
- limit: any;
1231
- offset: any;
1232
- joinFieldsExtra: any;
1233
- orderBy: any;
1234
- orderDesc: any;
1235
- }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1236
- actionQuery(): Promise<{
1234
+ actionQuery(state: any, rndid: any): Promise<{
1237
1235
  json: any;
1238
1236
  }>;
1237
+ distinctValuesQuery(state: any): Promise<{
1238
+ distinct_values: {};
1239
+ role: any;
1240
+ }>;
1239
1241
  };
1240
- configCheck: (view: any) => Promise<{
1241
- errors: string[];
1242
- warnings: string[];
1243
- }>;
1244
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1245
1242
  } | {
1246
1243
  name: string;
1247
1244
  description: string;
1248
1245
  configuration_workflow: (req: object) => import("../models/workflow");
1249
- 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, }: {
1250
- columns: object[];
1251
- view_to_create?: string | undefined;
1252
- create_view_display: string;
1253
- create_view_label?: string | undefined;
1254
- default_state?: object | undefined;
1255
- create_view_location?: string | undefined;
1256
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1257
- listQuery: any;
1258
- }) => Promise<any>;
1259
- view_quantity: string;
1260
- get_state_fields: (table_id: string, viewname: any, { columns }: {
1261
- columns: object[];
1262
- }) => Function;
1263
- initial_config: Function;
1264
- on_delete: (table_id: any, viewname: string, { default_state }: {
1265
- default_state: any;
1266
- }) => Promise<void>;
1246
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1247
+ participant_field: string;
1248
+ msg_relation: string;
1249
+ msgsender_field: any;
1250
+ msgview: string;
1251
+ msgform: string;
1252
+ participant_maxread_field: string;
1253
+ }, state: object, { req, res }: {
1254
+ req: object;
1255
+ res: object;
1256
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1257
+ getRowQuery: any;
1258
+ updateQuery: any;
1259
+ optionsQuery: any;
1260
+ }) => Promise<div>;
1261
+ get_state_fields: () => object[];
1262
+ display_state_form: boolean;
1267
1263
  routes: {
1268
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1269
- columns: object[];
1270
- layout: any;
1271
- }, body: object, { req, res }: {
1264
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1265
+ participant_field: string;
1266
+ msg_relation: string;
1267
+ msgsender_field: any;
1268
+ msgview: string;
1269
+ msgform: string;
1270
+ participant_maxread_field: string;
1271
+ }, body: any, { req, res }: {
1272
1272
  req: object;
1273
- res: any;
1274
- }, { getRowQuery }: {
1275
- getRowQuery: any;
1273
+ res: object;
1274
+ }, { submitAjaxQuery }: {
1275
+ submitAjaxQuery: any;
1276
1276
  }) => Promise<object>;
1277
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1278
+ participant_field: string;
1279
+ participant_maxread_field: string;
1280
+ }, body: any, { req, res }: {
1281
+ req: object;
1282
+ res: object;
1283
+ }, { ackReadQuery }: {
1284
+ ackReadQuery: any;
1285
+ }) => Promise<void>;
1286
+ 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>;
1277
1287
  };
1278
- display_state_form: (opts: object) => boolean;
1279
- default_state_form: ({ default_state }: object) => boolean;
1280
- getStringsForI18n({ columns, create_view_label }: {
1281
- columns: any;
1282
- create_view_label: any;
1283
- }): string[];
1284
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
1285
- table_id: any;
1286
- exttable_name: any;
1287
- name: any;
1288
- configuration: {
1289
- columns: any;
1290
- layout: any;
1291
- default_state: any;
1292
- };
1293
- req: any;
1294
- }) => {
1295
- listQuery(state: any, stateHash: any): Promise<{
1296
- rows: import("@saltcorn/db-common/internal").Row[];
1297
- rowCount: number;
1298
- }>;
1299
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1300
- };
1301
- configCheck: (view: any) => Promise<{
1302
- errors: string[];
1303
- warnings: string[];
1304
- }>;
1305
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1306
- } | {
1307
- name: string;
1308
- description: string;
1309
- configuration_workflow: (req: object) => import("../models/workflow");
1310
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1311
- list_view: string;
1312
- show_view: string;
1313
- subtables: object;
1314
- }, state: any, extraArgs: any, { getRowQuery }: {
1315
- getRowQuery: any;
1316
- }) => Promise<div>;
1317
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1318
- list_view: string;
1319
- show_view: any;
1320
- }) => Promise<object[]>;
1321
- display_state_form: ({ list_view, _omit_state_form }: {
1322
- list_view: string;
1323
- _omit_state_form: boolean;
1324
- }) => boolean;
1288
+ noAutoTest: boolean;
1289
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1290
+ participant_field: object;
1291
+ }, room_id: string, user: object) => Promise<object>;
1292
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1293
+ participant_field: any;
1294
+ msg_relation: string;
1295
+ msgsender_field: string;
1296
+ msgview: string;
1297
+ msgform: any;
1298
+ participant_maxread_field: any;
1299
+ }) => object[];
1300
+ getStringsForI18n(): object[];
1325
1301
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1326
1302
  table_id: any;
1327
1303
  viewname: any;
@@ -1331,14 +1307,38 @@ export const viewtemplates: ({
1331
1307
  };
1332
1308
  req: any;
1333
1309
  }) => {
1334
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1310
+ 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>;
1311
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1312
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1313
+ json: {
1314
+ msgid: {
1315
+ error: string;
1316
+ } | {
1317
+ success: any;
1318
+ };
1319
+ error?: undefined;
1320
+ };
1321
+ } | {
1322
+ json: {
1323
+ error: any;
1324
+ msgid?: undefined;
1325
+ };
1326
+ }>;
1327
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1328
+ json: {
1329
+ error: string;
1330
+ success?: undefined;
1331
+ };
1332
+ } | {
1333
+ json: {
1334
+ success: string;
1335
+ error?: undefined;
1336
+ };
1337
+ }>;
1338
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1339
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1335
1340
  };
1336
- connectedObjects: ({ list_view, subtables }: {
1337
- list_view: any;
1338
- subtables: any;
1339
- }) => Promise<{
1340
- embeddedViews: import("../models/view")[];
1341
- }>;
1341
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1342
1342
  })[];
1343
1343
  import fileviews = require("./fileviews");
1344
1344
  import actions = require("./actions");