@saltcorn/data 0.9.4-beta.0 → 0.9.4-beta.1

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,4 +1,151 @@
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
+ } | {
2
149
  name: string;
3
150
  sql_name: string;
4
151
  js_type: string;
@@ -447,40 +594,7 @@ export const types: ({
447
594
  show: {
448
595
  isEdit: boolean;
449
596
  description: string;
450
- run: (v: any) => any;
451
- };
452
- checkboxes: {
453
- isEdit: boolean;
454
- description: string;
455
- run: (v: any) => any;
456
- };
457
- TrueFalse: {
458
- isEdit: boolean;
459
- description: string;
460
- run: (v: any) => "" | "True" | "False";
461
- };
462
- edit: {
463
- isEdit: boolean;
464
- description: string;
465
- configFields: ({
466
- name: string;
467
- label: string;
468
- type: string;
469
- attributes: {
470
- options: string[];
471
- };
472
- } | {
473
- name: string;
474
- label: string;
475
- type: string;
476
- attributes?: undefined;
477
- })[];
478
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
479
- };
480
- switch: {
481
- isEdit: boolean;
482
- description: string;
483
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
597
+ run: (s: any) => any;
484
598
  };
485
599
  show_with_html: {
486
600
  configFields: {
@@ -497,141 +611,63 @@ export const types: ({
497
611
  description: string;
498
612
  run: (v: any, req: any, attrs?: {}) => any;
499
613
  };
500
- tristate: {
614
+ edit: {
501
615
  isEdit: boolean;
616
+ blockDisplay: boolean;
502
617
  description: string;
503
- configFields: {
504
- name: string;
505
- label: string;
506
- type: string;
507
- }[];
508
618
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
509
619
  };
510
620
  };
511
621
  attributes: object[];
512
- readFromFormRecord: (rec: any, name: string) => boolean | null;
513
- read: (v: object) => boolean | null;
514
- readFromDB: (v: object) => object;
515
- listAs: (v: object) => object;
622
+ read: (v: object) => object;
516
623
  validate: () => boolean;
517
624
  } | {
518
625
  name: string;
519
626
  sql_name: string;
520
627
  js_type: string;
521
- contract: () => Function;
522
- attributes: object[];
628
+ contract: ({ min, max }: {
629
+ min: number;
630
+ max: number;
631
+ }) => Function;
523
632
  fieldviews: {
524
633
  show: {
525
634
  isEdit: boolean;
526
635
  description: string;
527
- run: (d: any, req: any, attrs?: {}) => any;
528
- };
529
- showDay: {
530
- isEdit: boolean;
531
- description: string;
532
- run: (d: any, req: any) => any;
636
+ run: (s: any) => string;
533
637
  };
534
- format: {
638
+ edit: {
535
639
  isEdit: boolean;
640
+ blockDisplay: boolean;
536
641
  description: string;
537
642
  configFields: {
538
643
  name: string;
539
644
  label: string;
540
645
  type: string;
541
- sublabel: string;
542
646
  }[];
543
- run: (d: any, req: any, options: any) => any;
544
- };
545
- relative: {
546
- isEdit: boolean;
547
- description: string;
548
- run: (d: any, req: any) => string;
549
- };
550
- yearsAgo: {
551
- isEdit: boolean;
552
- description: string;
553
- run: (d: any, req: any) => string;
647
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
554
648
  };
555
- show_with_html: {
556
- configFields: {
557
- input_type: string;
649
+ number_slider: {
650
+ configFields: (field: any) => {
558
651
  name: string;
559
- label: string;
560
- sublabel: string;
561
- default: string;
562
- attributes: {
563
- mode: string;
564
- };
652
+ type: any;
653
+ required: boolean;
565
654
  }[];
566
655
  isEdit: boolean;
567
656
  description: string;
568
- run: (v: any, req: any, attrs?: {}) => any;
569
- };
570
- edit: {
571
- isEdit: boolean;
572
657
  blockDisplay: boolean;
573
- description: string;
574
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
658
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any) => any;
575
659
  };
576
- editDay: {
660
+ range_interval: {
661
+ configFields: (field: any) => {
662
+ name: string;
663
+ type: any;
664
+ required: boolean;
665
+ }[];
577
666
  isEdit: boolean;
667
+ isFilter: boolean;
578
668
  blockDisplay: boolean;
579
669
  description: string;
580
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
581
- };
582
- };
583
- presets: {
584
- Now: () => Date;
585
- };
586
- read: (v: object, attrs: object) => object;
587
- validate: () => boolean;
588
- } | {
589
- name: string;
590
- sql_name: string;
591
- js_type: string;
592
- contract: ({ min, max }: {
593
- min: number;
594
- max: number;
595
- }) => Function;
596
- fieldviews: {
597
- show: {
598
- isEdit: boolean;
599
- description: string;
600
- run: (s: any) => string;
601
- };
602
- edit: {
603
- isEdit: boolean;
604
- blockDisplay: boolean;
605
- description: string;
606
- configFields: {
607
- name: string;
608
- label: string;
609
- type: string;
610
- }[];
611
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
612
- };
613
- number_slider: {
614
- configFields: (field: any) => {
615
- name: string;
616
- type: any;
617
- required: boolean;
618
- }[];
619
- isEdit: boolean;
620
- description: string;
621
- blockDisplay: boolean;
622
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any) => any;
623
- };
624
- range_interval: {
625
- configFields: (field: any) => {
626
- name: string;
627
- type: any;
628
- required: boolean;
629
- }[];
630
- isEdit: boolean;
631
- isFilter: boolean;
632
- blockDisplay: boolean;
633
- description: string;
634
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
670
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
635
671
  };
636
672
  progress_bar: {
637
673
  configFields: (field: any) => ({
@@ -765,103 +801,49 @@ export const types: ({
765
801
  attributes: object[];
766
802
  read: (v: object) => string | number | undefined;
767
803
  validate: ({ min, max }: object) => boolean | object;
768
- } | {
769
- name: string;
770
- sql_name: string;
771
- js_type: string;
772
- contract: () => Function;
773
- fieldviews: {
774
- show: {
775
- isEdit: boolean;
776
- description: string;
777
- run: (s: any) => any;
778
- };
779
- show_with_html: {
780
- configFields: {
781
- input_type: string;
782
- name: string;
783
- label: string;
784
- sublabel: string;
785
- default: string;
786
- attributes: {
787
- mode: string;
788
- };
789
- }[];
790
- isEdit: boolean;
791
- description: string;
792
- run: (v: any, req: any, attrs?: {}) => any;
793
- };
794
- edit: {
795
- isEdit: boolean;
796
- blockDisplay: boolean;
797
- description: string;
798
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
799
- };
800
- };
801
- attributes: object[];
802
- read: (v: object) => object;
803
- validate: () => boolean;
804
804
  })[];
805
805
  export const viewtemplates: ({
806
806
  name: string;
807
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 }: {
808
+ get_state_fields: () => object[];
809
+ configuration_workflow: () => import("../models/workflow");
810
+ run: (table_id: number, viewname: string, { columns, layout }: {
821
811
  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>;
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[];
827
821
  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;
822
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
823
+ req: any;
833
824
  res: any;
834
- }, { getRowQuery }: {
835
- getRowQuery: any;
836
- }) => Promise<object>;
825
+ }, { actionQuery }: {
826
+ actionQuery: any;
827
+ }) => Promise<any>;
837
828
  };
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, }: {
829
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
845
830
  table_id: any;
846
- exttable_name: any;
847
- name: any;
831
+ viewname: any;
848
832
  configuration: {
849
833
  columns: any;
850
- default_state: any;
851
834
  };
852
835
  req: any;
836
+ res: any;
837
+ exttable_name: any;
853
838
  }) => {
854
- listQuery(state: any, stateHash: any): Promise<{
855
- rows: import("@saltcorn/db-common/internal").Row[];
856
- rowCount: number;
839
+ actionQuery(state: any, rndid: any): Promise<{
840
+ json: any;
841
+ }>;
842
+ distinctValuesQuery(state: any): Promise<{
843
+ distinct_values: {};
844
+ role: any;
857
845
  }>;
858
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
859
846
  };
860
- configCheck: (view: any) => Promise<{
861
- errors: string[];
862
- warnings: string[];
863
- }>;
864
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
865
847
  } | {
866
848
  name: string;
867
849
  description: string;
@@ -1015,113 +997,103 @@ export const viewtemplates: ({
1015
997
  } | {
1016
998
  name: string;
1017
999
  description: string;
1018
- get_state_fields: () => object[];
1019
1000
  configuration_workflow: (req: object) => import("../models/workflow");
1020
- run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1021
- columns: object[];
1022
- layout: object;
1023
- page_title?: string | undefined;
1024
- page_title_formula: boolean;
1025
- }, state: object, extra: object, { showQuery }: {
1026
- showQuery: any;
1027
- }) => Promise<string>;
1028
- runMany: (table_id: number, viewname: string, { columns, layout }: {
1029
- columns: object[];
1030
- layout: object;
1031
- }, state: object, extra: object, { runManyQuery }: {
1032
- runManyQuery: any;
1033
- }) => Promise<object[]>;
1034
- renderRows: (table: object, viewname: string, { columns, layout }: {
1035
- columns: object[];
1036
- layout: object;
1037
- }, extra: object, rows: object[], state: any) => Promise<string>;
1038
- initial_config: Function;
1001
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1002
+ participant_field: string;
1003
+ msg_relation: string;
1004
+ msgsender_field: any;
1005
+ msgview: string;
1006
+ msgform: string;
1007
+ participant_maxread_field: string;
1008
+ }, state: object, { req, res }: {
1009
+ req: object;
1010
+ res: object;
1011
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1012
+ getRowQuery: any;
1013
+ updateQuery: any;
1014
+ optionsQuery: any;
1015
+ }) => Promise<div>;
1016
+ get_state_fields: () => object[];
1039
1017
  display_state_form: boolean;
1040
1018
  routes: {
1041
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1042
- columns: object[];
1043
- layout: any;
1019
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1020
+ participant_field: string;
1021
+ msg_relation: string;
1022
+ msgsender_field: any;
1023
+ msgview: string;
1024
+ msgform: string;
1025
+ participant_maxread_field: string;
1044
1026
  }, body: any, { req, res }: {
1045
1027
  req: object;
1046
- res: any;
1047
- }, { actionQuery }: {
1048
- actionQuery: any;
1028
+ res: object;
1029
+ }, { submitAjaxQuery }: {
1030
+ submitAjaxQuery: any;
1049
1031
  }) => Promise<object>;
1032
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1033
+ participant_field: string;
1034
+ participant_maxread_field: string;
1035
+ }, body: any, { req, res }: {
1036
+ req: object;
1037
+ res: object;
1038
+ }, { ackReadQuery }: {
1039
+ ackReadQuery: any;
1040
+ }) => Promise<void>;
1041
+ 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>;
1050
1042
  };
1051
- getStringsForI18n({ layout }: {
1052
- layout: object;
1053
- }): string[];
1054
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1043
+ noAutoTest: boolean;
1044
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1045
+ participant_field: object;
1046
+ }, room_id: string, user: object) => Promise<object>;
1047
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1048
+ participant_field: any;
1049
+ msg_relation: string;
1050
+ msgsender_field: string;
1051
+ msgview: string;
1052
+ msgform: any;
1053
+ participant_maxread_field: any;
1054
+ }) => object[];
1055
+ getStringsForI18n(): object[];
1056
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1055
1057
  table_id: any;
1056
- exttable_name: any;
1057
- name: any;
1058
+ viewname: any;
1058
1059
  configuration: {
1059
1060
  columns: any;
1060
- layout: any;
1061
+ default_state: any;
1061
1062
  };
1062
1063
  req: any;
1063
- res: any;
1064
1064
  }) => {
1065
- showQuery(state: any, fields: any): Promise<{
1066
- rows: null;
1067
- message: string;
1068
- } | {
1069
- rows: import("@saltcorn/db-common/internal").Row[];
1070
- message: null;
1071
- }>;
1072
- runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1073
- where: any;
1074
- limit: any;
1075
- offset: any;
1076
- joinFieldsExtra: any;
1077
- orderBy: any;
1078
- orderDesc: any;
1079
- }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1080
- actionQuery(): Promise<{
1081
- json: any;
1065
+ 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>;
1066
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1067
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1068
+ json: {
1069
+ msgid: {
1070
+ error: string;
1071
+ } | {
1072
+ success: any;
1073
+ };
1074
+ error?: undefined;
1075
+ };
1076
+ } | {
1077
+ json: {
1078
+ error: any;
1079
+ msgid?: undefined;
1080
+ };
1082
1081
  }>;
1082
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1083
+ json: {
1084
+ error: string;
1085
+ success?: undefined;
1086
+ };
1087
+ } | {
1088
+ json: {
1089
+ success: string;
1090
+ error?: undefined;
1091
+ };
1092
+ }>;
1093
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1094
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1083
1095
  };
1084
- configCheck: (view: any) => Promise<{
1085
- errors: string[];
1086
- warnings: string[];
1087
- }>;
1088
1096
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1089
- } | {
1090
- name: string;
1091
- description: string;
1092
- configuration_workflow: (req: object) => import("../models/workflow");
1093
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1094
- list_view: string;
1095
- show_view: string;
1096
- subtables: object;
1097
- }, state: any, extraArgs: any, { getRowQuery }: {
1098
- getRowQuery: any;
1099
- }) => Promise<div>;
1100
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1101
- list_view: string;
1102
- show_view: any;
1103
- }) => Promise<object[]>;
1104
- display_state_form: ({ list_view, _omit_state_form }: {
1105
- list_view: string;
1106
- _omit_state_form: boolean;
1107
- }) => boolean;
1108
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1109
- table_id: any;
1110
- viewname: any;
1111
- configuration: {
1112
- columns: any;
1113
- default_state: any;
1114
- };
1115
- req: any;
1116
- }) => {
1117
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1118
- };
1119
- connectedObjects: ({ list_view, subtables }: {
1120
- list_view: any;
1121
- subtables: any;
1122
- }) => Promise<{
1123
- embeddedViews: import("../models/view")[];
1124
- }>;
1125
1097
  } | {
1126
1098
  name: string;
1127
1099
  description: string;
@@ -1166,144 +1138,172 @@ export const viewtemplates: ({
1166
1138
  name: string;
1167
1139
  description: string;
1168
1140
  get_state_fields: () => object[];
1169
- configuration_workflow: () => import("../models/workflow");
1170
- run: (table_id: number, viewname: string, { columns, layout }: {
1141
+ configuration_workflow: (req: object) => import("../models/workflow");
1142
+ run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1171
1143
  columns: object[];
1172
1144
  layout: object;
1173
- }, state: object, extra: object, { distinctValuesQuery }: {
1174
- distinctValuesQuery: any;
1175
- }) => Promise<Layout>;
1176
- initial_config: () => Promise<object>;
1145
+ page_title?: string | undefined;
1146
+ page_title_formula: boolean;
1147
+ }, state: object, extra: object, { showQuery }: {
1148
+ showQuery: any;
1149
+ }) => Promise<string>;
1150
+ runMany: (table_id: number, viewname: string, { columns, layout }: {
1151
+ columns: object[];
1152
+ layout: object;
1153
+ }, state: object, extra: object, { runManyQuery }: {
1154
+ runManyQuery: any;
1155
+ }) => Promise<object[]>;
1156
+ renderRows: (table: object, viewname: string, { columns, layout }: {
1157
+ columns: object[];
1158
+ layout: object;
1159
+ }, extra: object, rows: object[], state: any) => Promise<string>;
1160
+ initial_config: Function;
1177
1161
  display_state_form: boolean;
1178
- getStringsForI18n({ layout }: {
1179
- layout: any;
1180
- }): string[];
1181
1162
  routes: {
1182
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1183
- req: any;
1163
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1164
+ columns: object[];
1165
+ layout: any;
1166
+ }, body: any, { req, res }: {
1167
+ req: object;
1184
1168
  res: any;
1185
1169
  }, { actionQuery }: {
1186
1170
  actionQuery: any;
1187
- }) => Promise<any>;
1171
+ }) => Promise<object>;
1188
1172
  };
1189
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1173
+ getStringsForI18n({ layout }: {
1174
+ layout: object;
1175
+ }): string[];
1176
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1190
1177
  table_id: any;
1191
- viewname: any;
1178
+ exttable_name: any;
1179
+ name: any;
1192
1180
  configuration: {
1193
1181
  columns: any;
1182
+ layout: any;
1194
1183
  };
1195
1184
  req: any;
1196
1185
  res: any;
1197
- exttable_name: any;
1198
1186
  }) => {
1199
- actionQuery(state: any, rndid: any): Promise<{
1200
- json: any;
1187
+ showQuery(state: any, fields: any): Promise<{
1188
+ rows: null;
1189
+ message: string;
1190
+ } | {
1191
+ rows: import("@saltcorn/db-common/internal").Row[];
1192
+ message: null;
1201
1193
  }>;
1202
- distinctValuesQuery(state: any): Promise<{
1203
- distinct_values: {};
1204
- role: any;
1194
+ runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1195
+ where: any;
1196
+ limit: any;
1197
+ offset: any;
1198
+ joinFieldsExtra: any;
1199
+ orderBy: any;
1200
+ orderDesc: any;
1201
+ }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1202
+ actionQuery(): Promise<{
1203
+ json: any;
1205
1204
  }>;
1206
1205
  };
1206
+ configCheck: (view: any) => Promise<{
1207
+ errors: string[];
1208
+ warnings: string[];
1209
+ }>;
1210
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1207
1211
  } | {
1208
1212
  name: string;
1209
1213
  description: string;
1210
1214
  configuration_workflow: (req: object) => import("../models/workflow");
1211
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1212
- participant_field: string;
1213
- msg_relation: string;
1214
- msgsender_field: any;
1215
- msgview: string;
1216
- msgform: string;
1217
- participant_maxread_field: string;
1218
- }, state: object, { req, res }: {
1219
- req: object;
1220
- res: object;
1221
- }, { getRowQuery, updateQuery, optionsQuery }: {
1222
- getRowQuery: any;
1223
- updateQuery: any;
1224
- optionsQuery: any;
1225
- }) => Promise<div>;
1226
- get_state_fields: () => object[];
1227
- display_state_form: boolean;
1215
+ 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, }: {
1216
+ columns: object[];
1217
+ view_to_create?: string | undefined;
1218
+ create_view_display: string;
1219
+ create_view_label?: string | undefined;
1220
+ default_state?: object | undefined;
1221
+ create_view_location?: string | undefined;
1222
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1223
+ listQuery: any;
1224
+ }) => Promise<any>;
1225
+ view_quantity: string;
1226
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
1227
+ columns: object[];
1228
+ }) => Function;
1229
+ initial_config: Function;
1230
+ on_delete: (table_id: any, viewname: string, { default_state }: {
1231
+ default_state: any;
1232
+ }) => Promise<void>;
1228
1233
  routes: {
1229
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1230
- participant_field: string;
1231
- msg_relation: string;
1232
- msgsender_field: any;
1233
- msgview: string;
1234
- msgform: string;
1235
- participant_maxread_field: string;
1236
- }, body: any, { req, res }: {
1234
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1235
+ columns: object[];
1236
+ layout: any;
1237
+ }, body: object, { req, res }: {
1237
1238
  req: object;
1238
- res: object;
1239
- }, { submitAjaxQuery }: {
1240
- submitAjaxQuery: any;
1239
+ res: any;
1240
+ }, { getRowQuery }: {
1241
+ getRowQuery: any;
1241
1242
  }) => Promise<object>;
1242
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1243
- participant_field: string;
1244
- participant_maxread_field: string;
1245
- }, body: any, { req, res }: {
1246
- req: object;
1247
- res: object;
1248
- }, { ackReadQuery }: {
1249
- ackReadQuery: any;
1250
- }) => Promise<void>;
1251
- 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>;
1252
1243
  };
1253
- noAutoTest: boolean;
1254
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1255
- participant_field: object;
1256
- }, room_id: string, user: object) => Promise<object>;
1257
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1258
- participant_field: any;
1259
- msg_relation: string;
1260
- msgsender_field: string;
1261
- msgview: string;
1262
- msgform: any;
1263
- participant_maxread_field: any;
1264
- }) => object[];
1265
- getStringsForI18n(): object[];
1266
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1244
+ display_state_form: (opts: object) => boolean;
1245
+ default_state_form: ({ default_state }: object) => boolean;
1246
+ getStringsForI18n({ columns, create_view_label }: {
1247
+ columns: any;
1248
+ create_view_label: any;
1249
+ }): string[];
1250
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
1267
1251
  table_id: any;
1268
- viewname: any;
1252
+ exttable_name: any;
1253
+ name: any;
1269
1254
  configuration: {
1270
1255
  columns: any;
1271
1256
  default_state: any;
1272
1257
  };
1273
1258
  req: any;
1274
1259
  }) => {
1275
- 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>;
1276
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1277
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1278
- json: {
1279
- msgid: {
1280
- error: string;
1281
- } | {
1282
- success: any;
1283
- };
1284
- error?: undefined;
1285
- };
1286
- } | {
1287
- json: {
1288
- error: any;
1289
- msgid?: undefined;
1290
- };
1291
- }>;
1292
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1293
- json: {
1294
- error: string;
1295
- success?: undefined;
1296
- };
1297
- } | {
1298
- json: {
1299
- success: string;
1300
- error?: undefined;
1301
- };
1260
+ listQuery(state: any, stateHash: any): Promise<{
1261
+ rows: import("@saltcorn/db-common/internal").Row[];
1262
+ rowCount: number;
1302
1263
  }>;
1303
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1304
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1264
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1305
1265
  };
1266
+ configCheck: (view: any) => Promise<{
1267
+ errors: string[];
1268
+ warnings: string[];
1269
+ }>;
1306
1270
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1271
+ } | {
1272
+ name: string;
1273
+ description: string;
1274
+ configuration_workflow: (req: object) => import("../models/workflow");
1275
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1276
+ list_view: string;
1277
+ show_view: string;
1278
+ subtables: object;
1279
+ }, state: any, extraArgs: any, { getRowQuery }: {
1280
+ getRowQuery: any;
1281
+ }) => Promise<div>;
1282
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1283
+ list_view: string;
1284
+ show_view: any;
1285
+ }) => Promise<object[]>;
1286
+ display_state_form: ({ list_view, _omit_state_form }: {
1287
+ list_view: string;
1288
+ _omit_state_form: boolean;
1289
+ }) => boolean;
1290
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1291
+ table_id: any;
1292
+ viewname: any;
1293
+ configuration: {
1294
+ columns: any;
1295
+ default_state: any;
1296
+ };
1297
+ req: any;
1298
+ }) => {
1299
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1300
+ };
1301
+ connectedObjects: ({ list_view, subtables }: {
1302
+ list_view: any;
1303
+ subtables: any;
1304
+ }) => Promise<{
1305
+ embeddedViews: import("../models/view")[];
1306
+ }>;
1307
1307
  })[];
1308
1308
  import fileviews = require("./fileviews");
1309
1309
  import actions = require("./actions");