@saltcorn/data 0.8.6 → 0.8.7-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,96 +1,4 @@
1
1
  export const types: ({
2
- name: string;
3
- sql_name: string;
4
- contract: () => Function;
5
- fieldviews: {
6
- show: {
7
- isEdit: boolean;
8
- run: (v: any) => any;
9
- };
10
- checkboxes: {
11
- isEdit: boolean;
12
- run: (v: any) => any;
13
- };
14
- TrueFalse: {
15
- isEdit: boolean;
16
- run: (v: any) => "" | "True" | "False";
17
- };
18
- edit: {
19
- isEdit: boolean;
20
- configFields: {
21
- name: string;
22
- label: string;
23
- type: string;
24
- attributes: {
25
- options: string[];
26
- };
27
- }[];
28
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
29
- };
30
- switch: {
31
- isEdit: boolean;
32
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
33
- };
34
- tristate: {
35
- isEdit: boolean;
36
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
37
- };
38
- };
39
- attributes: object[];
40
- readFromFormRecord: (rec: any, name: string) => boolean | null;
41
- read: (v: object) => boolean | null;
42
- readFromDB: (v: object) => object;
43
- listAs: (v: object) => object;
44
- validate: () => boolean;
45
- } | {
46
- name: string;
47
- sql_name: string;
48
- contract: () => Function;
49
- attributes: object[];
50
- fieldviews: {
51
- show: {
52
- isEdit: boolean;
53
- run: (d: any, req: any) => any;
54
- };
55
- showDay: {
56
- isEdit: boolean;
57
- run: (d: any, req: any) => any;
58
- };
59
- format: {
60
- isEdit: boolean;
61
- configFields: {
62
- name: string;
63
- label: string;
64
- type: string;
65
- sublabel: string;
66
- }[];
67
- run: (d: any, req: any, options: any) => any;
68
- };
69
- relative: {
70
- isEdit: boolean;
71
- run: (d: any, req: any) => string;
72
- };
73
- yearsAgo: {
74
- isEdit: boolean;
75
- run: (d: any, req: any) => string;
76
- };
77
- edit: {
78
- isEdit: boolean;
79
- blockDisplay: boolean;
80
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
81
- };
82
- editDay: {
83
- isEdit: boolean;
84
- blockDisplay: boolean;
85
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
86
- };
87
- };
88
- presets: {
89
- Now: () => Date;
90
- };
91
- read: (v: object, attrs: object) => object;
92
- validate: () => boolean;
93
- } | {
94
2
  name: string;
95
3
  sql_name: string;
96
4
  attributes: ({ table }: object) => object;
@@ -377,6 +285,98 @@ export const types: ({
377
285
  validate_attributes: ({ min, max }: object) => boolean;
378
286
  read: (v: object) => object;
379
287
  validate: ({ min, max }: object) => boolean;
288
+ } | {
289
+ name: string;
290
+ sql_name: string;
291
+ contract: () => Function;
292
+ fieldviews: {
293
+ show: {
294
+ isEdit: boolean;
295
+ run: (v: any) => any;
296
+ };
297
+ checkboxes: {
298
+ isEdit: boolean;
299
+ run: (v: any) => any;
300
+ };
301
+ TrueFalse: {
302
+ isEdit: boolean;
303
+ run: (v: any) => "" | "True" | "False";
304
+ };
305
+ edit: {
306
+ isEdit: boolean;
307
+ configFields: {
308
+ name: string;
309
+ label: string;
310
+ type: string;
311
+ attributes: {
312
+ options: string[];
313
+ };
314
+ }[];
315
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
316
+ };
317
+ switch: {
318
+ isEdit: boolean;
319
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
320
+ };
321
+ tristate: {
322
+ isEdit: boolean;
323
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
324
+ };
325
+ };
326
+ attributes: object[];
327
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
328
+ read: (v: object) => boolean | null;
329
+ readFromDB: (v: object) => object;
330
+ listAs: (v: object) => object;
331
+ validate: () => boolean;
332
+ } | {
333
+ name: string;
334
+ sql_name: string;
335
+ contract: () => Function;
336
+ attributes: object[];
337
+ fieldviews: {
338
+ show: {
339
+ isEdit: boolean;
340
+ run: (d: any, req: any) => any;
341
+ };
342
+ showDay: {
343
+ isEdit: boolean;
344
+ run: (d: any, req: any) => any;
345
+ };
346
+ format: {
347
+ isEdit: boolean;
348
+ configFields: {
349
+ name: string;
350
+ label: string;
351
+ type: string;
352
+ sublabel: string;
353
+ }[];
354
+ run: (d: any, req: any, options: any) => any;
355
+ };
356
+ relative: {
357
+ isEdit: boolean;
358
+ run: (d: any, req: any) => string;
359
+ };
360
+ yearsAgo: {
361
+ isEdit: boolean;
362
+ run: (d: any, req: any) => string;
363
+ };
364
+ edit: {
365
+ isEdit: boolean;
366
+ blockDisplay: boolean;
367
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
368
+ };
369
+ editDay: {
370
+ isEdit: boolean;
371
+ blockDisplay: boolean;
372
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
373
+ };
374
+ };
375
+ presets: {
376
+ Now: () => Date;
377
+ };
378
+ read: (v: object, attrs: object) => object;
379
+ validate: () => boolean;
380
380
  } | {
381
381
  name: string;
382
382
  sql_name: string;
@@ -468,49 +468,63 @@ export const types: ({
468
468
  export const viewtemplates: ({
469
469
  name: string;
470
470
  description: string;
471
- get_state_fields: () => object[];
472
- configuration_workflow: () => import("../models/workflow");
473
- run: (table_id: number, viewname: string, { columns, layout }: {
471
+ configuration_workflow: (req: object) => import("../models/workflow");
472
+ 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, }: {
474
473
  columns: object[];
475
- layout: object;
476
- }, state: object, extra: object, { distinctValuesQuery }: {
477
- distinctValuesQuery: any;
478
- }) => Promise<Layout>;
479
- initial_config: () => Promise<object>;
480
- display_state_form: boolean;
481
- getStringsForI18n({ layout }: {
482
- layout: any;
483
- }): string[];
474
+ view_to_create?: string | undefined;
475
+ create_view_display: string;
476
+ create_view_label?: string | undefined;
477
+ default_state?: object | undefined;
478
+ create_view_location?: string | undefined;
479
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
480
+ listQuery: any;
481
+ }) => Promise<any>;
482
+ view_quantity: string;
483
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
484
+ columns: object[];
485
+ }) => Function;
486
+ initial_config: Function;
487
+ on_delete: (table_id: any, viewname: string, { default_state }: {
488
+ default_state: any;
489
+ }) => Promise<void>;
484
490
  routes: {
485
- run_action: (table_id: any, viewname: any, { columns, layout }: {
486
- columns: any;
491
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
492
+ columns: object[];
487
493
  layout: any;
488
- }, body: any, { req, res }: {
489
- req: any;
494
+ }, body: object, { req, res }: {
495
+ req: object;
490
496
  res: any;
491
- }, { actionQuery }: {
492
- actionQuery: any;
493
- }) => Promise<any>;
497
+ }, { getRowQuery }: {
498
+ getRowQuery: any;
499
+ }) => Promise<object>;
494
500
  };
495
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, res, exttable_name, }: {
501
+ display_state_form: (opts: object) => boolean;
502
+ default_state_form: ({ default_state }: object) => boolean;
503
+ getStringsForI18n({ columns, create_view_label }: {
504
+ columns: any;
505
+ create_view_label: any;
506
+ }): string[];
507
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
496
508
  table_id: any;
497
- viewname: any;
509
+ exttable_name: any;
510
+ name: any;
498
511
  configuration: {
499
512
  columns: any;
500
513
  default_state: any;
501
514
  };
502
515
  req: any;
503
- res: any;
504
- exttable_name: any;
505
516
  }) => {
506
- actionQuery(): Promise<{
507
- json: any;
508
- }>;
509
- distinctValuesQuery(state: any): Promise<{
510
- distinct_values: {};
511
- role: any;
517
+ listQuery(state: any, stateHash: any): Promise<{
518
+ rows: import("@saltcorn/db-common/internal").Row[];
519
+ rowCount: number;
512
520
  }>;
521
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
513
522
  };
523
+ configCheck: (view: any) => Promise<{
524
+ errors: string[];
525
+ warnings: string[];
526
+ }>;
527
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
514
528
  } | {
515
529
  name: string;
516
530
  description: string;
@@ -623,146 +637,6 @@ export const viewtemplates: ({
623
637
  warnings: string[];
624
638
  }>;
625
639
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
626
- } | {
627
- name: string;
628
- description: string;
629
- configuration_workflow: (req: object) => import("../models/workflow");
630
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
631
- participant_field: string;
632
- msg_relation: string;
633
- msgsender_field: any;
634
- msgview: string;
635
- msgform: string;
636
- participant_maxread_field: string;
637
- }, state: object, { req, res }: {
638
- req: object;
639
- res: object;
640
- }, { getRowQuery, updateQuery, optionsQuery }: {
641
- getRowQuery: any;
642
- updateQuery: any;
643
- optionsQuery: any;
644
- }) => Promise<div>;
645
- get_state_fields: () => object[];
646
- display_state_form: boolean;
647
- routes: {
648
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
649
- participant_field: string;
650
- msg_relation: string;
651
- msgsender_field: any;
652
- msgview: string;
653
- msgform: string;
654
- participant_maxread_field: string;
655
- }, body: any, { req, res }: {
656
- req: object;
657
- res: object;
658
- }, { submitAjaxQuery }: {
659
- submitAjaxQuery: any;
660
- }) => Promise<object>;
661
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
662
- participant_field: string;
663
- participant_maxread_field: string;
664
- }, body: any, { req, res }: {
665
- req: object;
666
- res: object;
667
- }, { ackReadQuery }: {
668
- ackReadQuery: any;
669
- }) => Promise<void>;
670
- 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>;
671
- };
672
- noAutoTest: boolean;
673
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
674
- participant_field: object;
675
- }, room_id: string, user: object) => Promise<object>;
676
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
677
- participant_field: any;
678
- msg_relation: string;
679
- msgsender_field: string;
680
- msgview: string;
681
- msgform: any;
682
- participant_maxread_field: any;
683
- }) => object[];
684
- getStringsForI18n(): object[];
685
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
686
- table_id: any;
687
- viewname: any;
688
- configuration: {
689
- columns: any;
690
- default_state: any;
691
- };
692
- req: any;
693
- }) => {
694
- 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>;
695
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
696
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
697
- json: {
698
- msgid: {
699
- error: string;
700
- } | {
701
- success: any;
702
- };
703
- error?: undefined;
704
- };
705
- } | {
706
- json: {
707
- error: any;
708
- msgid?: undefined;
709
- };
710
- }>;
711
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
712
- json: {
713
- error: string;
714
- success?: undefined;
715
- };
716
- } | {
717
- json: {
718
- success: string;
719
- error?: undefined;
720
- };
721
- }>;
722
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
723
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
724
- };
725
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
726
- } | {
727
- name: string;
728
- description: string;
729
- configuration_workflow: (req: object) => import("../models/workflow");
730
- run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, always_create_view, include_fml, empty_view, ...cols }: {
731
- show_view: string;
732
- order_field: name;
733
- descending: boolean;
734
- view_to_create?: string | undefined;
735
- create_view_display: string;
736
- in_card: boolean;
737
- masonry_columns: string;
738
- rows_per_page?: number | undefined;
739
- hide_pagination: boolean;
740
- create_view_label?: string | undefined;
741
- create_view_location?: string | undefined;
742
- always_create_view: boolean;
743
- cols: any;
744
- }, state: object, extraArgs: any, { countRowsQuery }: {
745
- countRowsQuery: any;
746
- }) => Promise<div>;
747
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
748
- show_view: any;
749
- }) => Promise<import("../models/field")>;
750
- display_state_form: boolean;
751
- getStringsForI18n({ create_view_label }: {
752
- create_view_label: any;
753
- }): string[] | Object[];
754
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
755
- table_id: any;
756
- viewname: any;
757
- configuration: {
758
- columns: any;
759
- default_state: any;
760
- };
761
- req: any;
762
- }) => {
763
- countRowsQuery(state: any): Promise<number>;
764
- };
765
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
766
640
  } | {
767
641
  name: string;
768
642
  description: string;
@@ -840,81 +714,183 @@ export const viewtemplates: ({
840
714
  name: string;
841
715
  description: string;
842
716
  configuration_workflow: (req: object) => import("../models/workflow");
843
- 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, }: {
844
- columns: object[];
717
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
718
+ list_view: string;
719
+ show_view: string;
720
+ subtables: object;
721
+ }, state: any, extraArgs: any, { getRowQuery }: {
722
+ getRowQuery: any;
723
+ }) => Promise<div>;
724
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
725
+ list_view: string;
726
+ show_view: any;
727
+ }) => Promise<object[]>;
728
+ display_state_form: ({ list_view, _omit_state_form }: {
729
+ list_view: string;
730
+ _omit_state_form: boolean;
731
+ }) => boolean;
732
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
733
+ table_id: any;
734
+ viewname: any;
735
+ configuration: {
736
+ columns: any;
737
+ default_state: any;
738
+ };
739
+ req: any;
740
+ }) => {
741
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
742
+ };
743
+ connectedObjects: ({ list_view, subtables }: {
744
+ list_view: any;
745
+ subtables: any;
746
+ }) => Promise<{
747
+ embeddedViews: import("../models/view")[];
748
+ }>;
749
+ } | {
750
+ name: string;
751
+ description: string;
752
+ configuration_workflow: (req: object) => import("../models/workflow");
753
+ run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, always_create_view, include_fml, empty_view, ...cols }: {
754
+ show_view: string;
755
+ order_field: name;
756
+ descending: boolean;
845
757
  view_to_create?: string | undefined;
846
758
  create_view_display: string;
759
+ in_card: boolean;
760
+ masonry_columns: string;
761
+ rows_per_page?: number | undefined;
762
+ hide_pagination: boolean;
847
763
  create_view_label?: string | undefined;
848
- default_state?: object | undefined;
849
764
  create_view_location?: string | undefined;
850
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
851
- listQuery: any;
852
- }) => Promise<any>;
853
- view_quantity: string;
854
- get_state_fields: (table_id: string, viewname: any, { columns }: {
765
+ always_create_view: boolean;
766
+ cols: any;
767
+ }, state: object, extraArgs: any, { countRowsQuery }: {
768
+ countRowsQuery: any;
769
+ }) => Promise<div>;
770
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
771
+ show_view: any;
772
+ }) => Promise<import("../models/field")>;
773
+ display_state_form: boolean;
774
+ getStringsForI18n({ create_view_label }: {
775
+ create_view_label: any;
776
+ }): string[] | Object[];
777
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
778
+ table_id: any;
779
+ viewname: any;
780
+ configuration: {
781
+ columns: any;
782
+ default_state: any;
783
+ };
784
+ req: any;
785
+ }) => {
786
+ countRowsQuery(state: any): Promise<number>;
787
+ };
788
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
789
+ } | {
790
+ name: string;
791
+ description: string;
792
+ get_state_fields: () => object[];
793
+ configuration_workflow: () => import("../models/workflow");
794
+ run: (table_id: number, viewname: string, { columns, layout }: {
855
795
  columns: object[];
856
- }) => Function;
857
- initial_config: Function;
858
- on_delete: (table_id: any, viewname: string, { default_state }: {
859
- default_state: any;
860
- }) => Promise<void>;
796
+ layout: object;
797
+ }, state: object, extra: object, { distinctValuesQuery }: {
798
+ distinctValuesQuery: any;
799
+ }) => Promise<Layout>;
800
+ initial_config: () => Promise<object>;
801
+ display_state_form: boolean;
802
+ getStringsForI18n({ layout }: {
803
+ layout: any;
804
+ }): string[];
861
805
  routes: {
862
- run_action: (table_id: number, viewname: any, { columns, layout }: {
863
- columns: object[];
806
+ run_action: (table_id: any, viewname: any, { columns, layout }: {
807
+ columns: any;
864
808
  layout: any;
865
- }, body: object, { req, res }: {
866
- req: object;
809
+ }, body: any, { req, res }: {
810
+ req: any;
867
811
  res: any;
868
- }, { getRowQuery }: {
869
- getRowQuery: any;
870
- }) => Promise<object>;
812
+ }, { actionQuery }: {
813
+ actionQuery: any;
814
+ }) => Promise<any>;
871
815
  };
872
- display_state_form: (opts: object) => boolean;
873
- default_state_form: ({ default_state }: object) => boolean;
874
- getStringsForI18n({ columns, create_view_label }: {
875
- columns: any;
876
- create_view_label: any;
877
- }): string[];
878
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
816
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, res, exttable_name, }: {
879
817
  table_id: any;
880
- exttable_name: any;
881
- name: any;
818
+ viewname: any;
882
819
  configuration: {
883
820
  columns: any;
884
821
  default_state: any;
885
822
  };
886
823
  req: any;
824
+ res: any;
825
+ exttable_name: any;
887
826
  }) => {
888
- listQuery(state: any, stateHash: any): Promise<{
889
- rows: import("@saltcorn/db-common/internal").Row[];
890
- rowCount: number;
827
+ actionQuery(): Promise<{
828
+ json: any;
829
+ }>;
830
+ distinctValuesQuery(state: any): Promise<{
831
+ distinct_values: {};
832
+ role: any;
891
833
  }>;
892
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
893
834
  };
894
- configCheck: (view: any) => Promise<{
895
- errors: string[];
896
- warnings: string[];
897
- }>;
898
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
899
835
  } | {
900
836
  name: string;
901
837
  description: string;
902
838
  configuration_workflow: (req: object) => import("../models/workflow");
903
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
904
- list_view: string;
905
- show_view: string;
906
- subtables: object;
907
- }, state: any, extraArgs: any, { getRowQuery }: {
839
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
840
+ participant_field: string;
841
+ msg_relation: string;
842
+ msgsender_field: any;
843
+ msgview: string;
844
+ msgform: string;
845
+ participant_maxread_field: string;
846
+ }, state: object, { req, res }: {
847
+ req: object;
848
+ res: object;
849
+ }, { getRowQuery, updateQuery, optionsQuery }: {
908
850
  getRowQuery: any;
851
+ updateQuery: any;
852
+ optionsQuery: any;
909
853
  }) => Promise<div>;
910
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
911
- list_view: string;
912
- show_view: any;
913
- }) => Promise<object[]>;
914
- display_state_form: ({ list_view, _omit_state_form }: {
915
- list_view: string;
916
- _omit_state_form: boolean;
917
- }) => boolean;
854
+ get_state_fields: () => object[];
855
+ display_state_form: boolean;
856
+ routes: {
857
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
858
+ participant_field: string;
859
+ msg_relation: string;
860
+ msgsender_field: any;
861
+ msgview: string;
862
+ msgform: string;
863
+ participant_maxread_field: string;
864
+ }, body: any, { req, res }: {
865
+ req: object;
866
+ res: object;
867
+ }, { submitAjaxQuery }: {
868
+ submitAjaxQuery: any;
869
+ }) => Promise<object>;
870
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
871
+ participant_field: string;
872
+ participant_maxread_field: string;
873
+ }, body: any, { req, res }: {
874
+ req: object;
875
+ res: object;
876
+ }, { ackReadQuery }: {
877
+ ackReadQuery: any;
878
+ }) => Promise<void>;
879
+ 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>;
880
+ };
881
+ noAutoTest: boolean;
882
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
883
+ participant_field: object;
884
+ }, room_id: string, user: object) => Promise<object>;
885
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
886
+ participant_field: any;
887
+ msg_relation: string;
888
+ msgsender_field: string;
889
+ msgview: string;
890
+ msgform: any;
891
+ participant_maxread_field: any;
892
+ }) => object[];
893
+ getStringsForI18n(): object[];
918
894
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
919
895
  table_id: any;
920
896
  viewname: any;
@@ -924,14 +900,38 @@ export const viewtemplates: ({
924
900
  };
925
901
  req: any;
926
902
  }) => {
927
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
903
+ 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>;
904
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
905
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
906
+ json: {
907
+ msgid: {
908
+ error: string;
909
+ } | {
910
+ success: any;
911
+ };
912
+ error?: undefined;
913
+ };
914
+ } | {
915
+ json: {
916
+ error: any;
917
+ msgid?: undefined;
918
+ };
919
+ }>;
920
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
921
+ json: {
922
+ error: string;
923
+ success?: undefined;
924
+ };
925
+ } | {
926
+ json: {
927
+ success: string;
928
+ error?: undefined;
929
+ };
930
+ }>;
931
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
932
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
928
933
  };
929
- connectedObjects: ({ list_view, subtables }: {
930
- list_view: any;
931
- subtables: any;
932
- }) => Promise<{
933
- embeddedViews: import("../models/view")[];
934
- }>;
934
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
935
935
  })[];
936
936
  import fileviews = require("./fileviews");
937
937
  import actions = require("./actions");