@saltcorn/data 0.8.9 → 0.9.0-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.
Files changed (47) hide show
  1. package/dist/base-plugin/fieldviews.d.ts.map +1 -1
  2. package/dist/base-plugin/fieldviews.js +23 -1
  3. package/dist/base-plugin/fieldviews.js.map +1 -1
  4. package/dist/base-plugin/index.d.ts +328 -322
  5. package/dist/base-plugin/index.d.ts.map +1 -1
  6. package/dist/base-plugin/types.d.ts +11 -0
  7. package/dist/base-plugin/types.d.ts.map +1 -1
  8. package/dist/base-plugin/types.js +6 -0
  9. package/dist/base-plugin/types.js.map +1 -1
  10. package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
  11. package/dist/base-plugin/viewtemplates/edit.js +14 -5
  12. package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
  13. package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
  14. package/dist/base-plugin/viewtemplates/list.js +1 -0
  15. package/dist/base-plugin/viewtemplates/list.js.map +1 -1
  16. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
  17. package/dist/base-plugin/viewtemplates/viewable_fields.js +21 -5
  18. package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
  19. package/dist/models/config.d.ts.map +1 -1
  20. package/dist/models/config.js +6 -0
  21. package/dist/models/config.js.map +1 -1
  22. package/dist/models/field.d.ts +4 -0
  23. package/dist/models/field.d.ts.map +1 -1
  24. package/dist/models/field.js +1 -0
  25. package/dist/models/field.js.map +1 -1
  26. package/dist/models/file.js +1 -1
  27. package/dist/models/file.js.map +1 -1
  28. package/dist/models/index.d.ts +1 -1
  29. package/dist/models/internal/table_helper.d.ts +33 -0
  30. package/dist/models/internal/table_helper.d.ts.map +1 -0
  31. package/dist/models/internal/table_helper.js +134 -0
  32. package/dist/models/internal/table_helper.js.map +1 -0
  33. package/dist/models/table.d.ts +156 -19
  34. package/dist/models/table.d.ts.map +1 -1
  35. package/dist/models/table.js +131 -15
  36. package/dist/models/table.js.map +1 -1
  37. package/dist/models/user.d.ts.map +1 -1
  38. package/dist/models/user.js +1 -2
  39. package/dist/models/user.js.map +1 -1
  40. package/dist/plugin-helper.d.ts +1 -1
  41. package/dist/plugin-helper.d.ts.map +1 -1
  42. package/dist/plugin-helper.js +13 -1
  43. package/dist/plugin-helper.js.map +1 -1
  44. package/dist/tests/exact_views.test.js +14 -14
  45. package/dist/tests/exact_views.test.js.map +1 -1
  46. package/package.json +7 -7
  47. package/webpack.config.js +2 -0
@@ -1,6 +1,101 @@
1
1
  export const types: ({
2
2
  name: string;
3
3
  sql_name: string;
4
+ js_type: string;
5
+ contract: () => Function;
6
+ fieldviews: {
7
+ show: {
8
+ isEdit: boolean;
9
+ run: (v: any) => any;
10
+ };
11
+ checkboxes: {
12
+ isEdit: boolean;
13
+ run: (v: any) => any;
14
+ };
15
+ TrueFalse: {
16
+ isEdit: boolean;
17
+ run: (v: any) => "" | "True" | "False";
18
+ };
19
+ edit: {
20
+ isEdit: boolean;
21
+ configFields: {
22
+ name: string;
23
+ label: string;
24
+ type: string;
25
+ attributes: {
26
+ options: string[];
27
+ };
28
+ }[];
29
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
30
+ };
31
+ switch: {
32
+ isEdit: boolean;
33
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
34
+ };
35
+ tristate: {
36
+ isEdit: boolean;
37
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
38
+ };
39
+ };
40
+ attributes: object[];
41
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
42
+ read: (v: object) => boolean | null;
43
+ readFromDB: (v: object) => object;
44
+ listAs: (v: object) => object;
45
+ validate: () => boolean;
46
+ } | {
47
+ name: string;
48
+ sql_name: string;
49
+ js_type: string;
50
+ contract: () => Function;
51
+ attributes: object[];
52
+ fieldviews: {
53
+ show: {
54
+ isEdit: boolean;
55
+ run: (d: any, req: any) => any;
56
+ };
57
+ showDay: {
58
+ isEdit: boolean;
59
+ run: (d: any, req: any) => any;
60
+ };
61
+ format: {
62
+ isEdit: boolean;
63
+ configFields: {
64
+ name: string;
65
+ label: string;
66
+ type: string;
67
+ sublabel: string;
68
+ }[];
69
+ run: (d: any, req: any, options: any) => any;
70
+ };
71
+ relative: {
72
+ isEdit: boolean;
73
+ run: (d: any, req: any) => string;
74
+ };
75
+ yearsAgo: {
76
+ isEdit: boolean;
77
+ run: (d: any, req: any) => string;
78
+ };
79
+ edit: {
80
+ isEdit: boolean;
81
+ blockDisplay: boolean;
82
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
83
+ };
84
+ editDay: {
85
+ isEdit: boolean;
86
+ blockDisplay: boolean;
87
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
88
+ };
89
+ };
90
+ presets: {
91
+ Now: () => Date;
92
+ };
93
+ read: (v: object, attrs: object) => object;
94
+ validate: () => boolean;
95
+ } | {
96
+ name: string;
97
+ sql_name: string;
98
+ js_type: string;
4
99
  attributes: ({ table }: object) => object;
5
100
  contract: ({ options }: {
6
101
  options: string | undefined;
@@ -178,6 +273,7 @@ export const types: ({
178
273
  } | {
179
274
  name: string;
180
275
  sql_name: string;
276
+ js_type: string;
181
277
  contract: ({ min, max }: {
182
278
  min: number;
183
279
  max: number;
@@ -323,98 +419,7 @@ export const types: ({
323
419
  } | {
324
420
  name: string;
325
421
  sql_name: string;
326
- contract: () => Function;
327
- fieldviews: {
328
- show: {
329
- isEdit: boolean;
330
- run: (v: any) => any;
331
- };
332
- checkboxes: {
333
- isEdit: boolean;
334
- run: (v: any) => any;
335
- };
336
- TrueFalse: {
337
- isEdit: boolean;
338
- run: (v: any) => "" | "True" | "False";
339
- };
340
- edit: {
341
- isEdit: boolean;
342
- configFields: {
343
- name: string;
344
- label: string;
345
- type: string;
346
- attributes: {
347
- options: string[];
348
- };
349
- }[];
350
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
351
- };
352
- switch: {
353
- isEdit: boolean;
354
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
355
- };
356
- tristate: {
357
- isEdit: boolean;
358
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
359
- };
360
- };
361
- attributes: object[];
362
- readFromFormRecord: (rec: any, name: string) => boolean | null;
363
- read: (v: object) => boolean | null;
364
- readFromDB: (v: object) => object;
365
- listAs: (v: object) => object;
366
- validate: () => boolean;
367
- } | {
368
- name: string;
369
- sql_name: string;
370
- contract: () => Function;
371
- attributes: object[];
372
- fieldviews: {
373
- show: {
374
- isEdit: boolean;
375
- run: (d: any, req: any) => any;
376
- };
377
- showDay: {
378
- isEdit: boolean;
379
- run: (d: any, req: any) => any;
380
- };
381
- format: {
382
- isEdit: boolean;
383
- configFields: {
384
- name: string;
385
- label: string;
386
- type: string;
387
- sublabel: string;
388
- }[];
389
- run: (d: any, req: any, options: any) => any;
390
- };
391
- relative: {
392
- isEdit: boolean;
393
- run: (d: any, req: any) => string;
394
- };
395
- yearsAgo: {
396
- isEdit: boolean;
397
- run: (d: any, req: any) => string;
398
- };
399
- edit: {
400
- isEdit: boolean;
401
- blockDisplay: boolean;
402
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
403
- };
404
- editDay: {
405
- isEdit: boolean;
406
- blockDisplay: boolean;
407
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
408
- };
409
- };
410
- presets: {
411
- Now: () => Date;
412
- };
413
- read: (v: object, attrs: object) => object;
414
- validate: () => boolean;
415
- } | {
416
- name: string;
417
- sql_name: string;
422
+ js_type: string;
418
423
  contract: ({ min, max }: {
419
424
  min: number;
420
425
  max: number;
@@ -519,6 +524,7 @@ export const types: ({
519
524
  } | {
520
525
  name: string;
521
526
  sql_name: string;
527
+ js_type: string;
522
528
  contract: () => Function;
523
529
  fieldviews: {
524
530
  show: {
@@ -538,103 +544,45 @@ export const types: ({
538
544
  export const viewtemplates: ({
539
545
  name: string;
540
546
  description: string;
541
- configuration_workflow: (req: object) => import("../models/workflow");
542
- run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, title_formula, 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 }: {
543
- show_view: string;
544
- order_field: name;
545
- descending: boolean;
546
- view_to_create?: string | undefined;
547
- create_view_display: string;
548
- in_card: boolean;
549
- masonry_columns: string;
550
- rows_per_page?: number | undefined;
551
- hide_pagination: boolean;
552
- create_view_label?: string | undefined;
553
- create_view_location?: string | undefined;
554
- always_create_view: boolean;
555
- cols: any;
556
- }, state: object, extraArgs: any, { countRowsQuery }: {
557
- countRowsQuery: any;
558
- }) => Promise<div>;
559
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
560
- show_view: any;
561
- }) => Promise<import("../models/field")>;
547
+ get_state_fields: () => object[];
548
+ configuration_workflow: () => import("../models/workflow");
549
+ run: (table_id: number, viewname: string, { columns, layout }: {
550
+ columns: object[];
551
+ layout: object;
552
+ }, state: object, extra: object, { distinctValuesQuery }: {
553
+ distinctValuesQuery: any;
554
+ }) => Promise<Layout>;
555
+ initial_config: () => Promise<object>;
562
556
  display_state_form: boolean;
563
- getStringsForI18n({ create_view_label }: {
564
- create_view_label: any;
565
- }): string[] | Object[];
566
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
557
+ getStringsForI18n({ layout }: {
558
+ layout: any;
559
+ }): string[];
560
+ routes: {
561
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
562
+ req: any;
563
+ res: any;
564
+ }, { actionQuery }: {
565
+ actionQuery: any;
566
+ }) => Promise<any>;
567
+ };
568
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
567
569
  table_id: any;
568
570
  viewname: any;
569
571
  configuration: {
570
572
  columns: any;
571
- default_state: any;
572
573
  };
573
574
  req: any;
575
+ res: any;
576
+ exttable_name: any;
574
577
  }) => {
575
- countRowsQuery(state: any): Promise<number>;
578
+ actionQuery(state: any, rndid: any): Promise<{
579
+ json: any;
580
+ }>;
581
+ distinctValuesQuery(state: any): Promise<{
582
+ distinct_values: {};
583
+ role: any;
584
+ }>;
576
585
  };
577
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
578
- } | {
579
- name: string;
580
- description: string;
581
- configuration_workflow: (req: object) => import("../models/workflow");
582
- 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, }: {
583
- columns: object[];
584
- view_to_create?: string | undefined;
585
- create_view_display: string;
586
- create_view_label?: string | undefined;
587
- default_state?: object | undefined;
588
- create_view_location?: string | undefined;
589
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
590
- listQuery: any;
591
- }) => Promise<any>;
592
- view_quantity: string;
593
- get_state_fields: (table_id: string, viewname: any, { columns }: {
594
- columns: object[];
595
- }) => Function;
596
- initial_config: Function;
597
- on_delete: (table_id: any, viewname: string, { default_state }: {
598
- default_state: any;
599
- }) => Promise<void>;
600
- routes: {
601
- run_action: (table_id: number, viewname: any, { columns, layout }: {
602
- columns: object[];
603
- layout: any;
604
- }, body: object, { req, res }: {
605
- req: object;
606
- res: any;
607
- }, { getRowQuery }: {
608
- getRowQuery: any;
609
- }) => Promise<object>;
610
- };
611
- display_state_form: (opts: object) => boolean;
612
- default_state_form: ({ default_state }: object) => boolean;
613
- getStringsForI18n({ columns, create_view_label }: {
614
- columns: any;
615
- create_view_label: any;
616
- }): string[];
617
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
618
- table_id: any;
619
- exttable_name: any;
620
- name: any;
621
- configuration: {
622
- columns: any;
623
- default_state: any;
624
- };
625
- req: any;
626
- }) => {
627
- listQuery(state: any, stateHash: any): Promise<{
628
- rows: import("@saltcorn/db-common/internal").Row[];
629
- rowCount: number;
630
- }>;
631
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
632
- };
633
- configCheck: (view: any) => Promise<{
634
- errors: string[];
635
- warnings: string[];
636
- }>;
637
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
638
586
  } | {
639
587
  name: string;
640
588
  description: string;
@@ -784,6 +732,146 @@ export const viewtemplates: ({
784
732
  warnings: string[];
785
733
  }>;
786
734
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
735
+ } | {
736
+ name: string;
737
+ description: string;
738
+ configuration_workflow: (req: object) => import("../models/workflow");
739
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
740
+ participant_field: string;
741
+ msg_relation: string;
742
+ msgsender_field: any;
743
+ msgview: string;
744
+ msgform: string;
745
+ participant_maxread_field: string;
746
+ }, state: object, { req, res }: {
747
+ req: object;
748
+ res: object;
749
+ }, { getRowQuery, updateQuery, optionsQuery }: {
750
+ getRowQuery: any;
751
+ updateQuery: any;
752
+ optionsQuery: any;
753
+ }) => Promise<div>;
754
+ get_state_fields: () => object[];
755
+ display_state_form: boolean;
756
+ routes: {
757
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
758
+ participant_field: string;
759
+ msg_relation: string;
760
+ msgsender_field: any;
761
+ msgview: string;
762
+ msgform: string;
763
+ participant_maxread_field: string;
764
+ }, body: any, { req, res }: {
765
+ req: object;
766
+ res: object;
767
+ }, { submitAjaxQuery }: {
768
+ submitAjaxQuery: any;
769
+ }) => Promise<object>;
770
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
771
+ participant_field: string;
772
+ participant_maxread_field: string;
773
+ }, body: any, { req, res }: {
774
+ req: object;
775
+ res: object;
776
+ }, { ackReadQuery }: {
777
+ ackReadQuery: any;
778
+ }) => Promise<void>;
779
+ 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>;
780
+ };
781
+ noAutoTest: boolean;
782
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
783
+ participant_field: object;
784
+ }, room_id: string, user: object) => Promise<object>;
785
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
786
+ participant_field: any;
787
+ msg_relation: string;
788
+ msgsender_field: string;
789
+ msgview: string;
790
+ msgform: any;
791
+ participant_maxread_field: any;
792
+ }) => object[];
793
+ getStringsForI18n(): object[];
794
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
795
+ table_id: any;
796
+ viewname: any;
797
+ configuration: {
798
+ columns: any;
799
+ default_state: any;
800
+ };
801
+ req: any;
802
+ }) => {
803
+ 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>;
804
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
805
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
806
+ json: {
807
+ msgid: {
808
+ error: string;
809
+ } | {
810
+ success: any;
811
+ };
812
+ error?: undefined;
813
+ };
814
+ } | {
815
+ json: {
816
+ error: any;
817
+ msgid?: undefined;
818
+ };
819
+ }>;
820
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
821
+ json: {
822
+ error: string;
823
+ success?: undefined;
824
+ };
825
+ } | {
826
+ json: {
827
+ success: string;
828
+ error?: undefined;
829
+ };
830
+ }>;
831
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
832
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
833
+ };
834
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
835
+ } | {
836
+ name: string;
837
+ description: string;
838
+ configuration_workflow: (req: object) => import("../models/workflow");
839
+ run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, title_formula, 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 }: {
840
+ show_view: string;
841
+ order_field: name;
842
+ descending: boolean;
843
+ view_to_create?: string | undefined;
844
+ create_view_display: string;
845
+ in_card: boolean;
846
+ masonry_columns: string;
847
+ rows_per_page?: number | undefined;
848
+ hide_pagination: boolean;
849
+ create_view_label?: string | undefined;
850
+ create_view_location?: string | undefined;
851
+ always_create_view: boolean;
852
+ cols: any;
853
+ }, state: object, extraArgs: any, { countRowsQuery }: {
854
+ countRowsQuery: any;
855
+ }) => Promise<div>;
856
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
857
+ show_view: any;
858
+ }) => Promise<import("../models/field")>;
859
+ display_state_form: boolean;
860
+ getStringsForI18n({ create_view_label }: {
861
+ create_view_label: any;
862
+ }): string[] | Object[];
863
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
864
+ table_id: any;
865
+ viewname: any;
866
+ configuration: {
867
+ columns: any;
868
+ default_state: any;
869
+ };
870
+ req: any;
871
+ }) => {
872
+ countRowsQuery(state: any): Promise<number>;
873
+ };
874
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
787
875
  } | {
788
876
  name: string;
789
877
  description: string;
@@ -857,6 +945,66 @@ export const viewtemplates: ({
857
945
  warnings: string[];
858
946
  }>;
859
947
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
948
+ } | {
949
+ name: string;
950
+ description: string;
951
+ configuration_workflow: (req: object) => import("../models/workflow");
952
+ 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, }: {
953
+ columns: object[];
954
+ view_to_create?: string | undefined;
955
+ create_view_display: string;
956
+ create_view_label?: string | undefined;
957
+ default_state?: object | undefined;
958
+ create_view_location?: string | undefined;
959
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
960
+ listQuery: any;
961
+ }) => Promise<any>;
962
+ view_quantity: string;
963
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
964
+ columns: object[];
965
+ }) => Function;
966
+ initial_config: Function;
967
+ on_delete: (table_id: any, viewname: string, { default_state }: {
968
+ default_state: any;
969
+ }) => Promise<void>;
970
+ routes: {
971
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
972
+ columns: object[];
973
+ layout: any;
974
+ }, body: object, { req, res }: {
975
+ req: object;
976
+ res: any;
977
+ }, { getRowQuery }: {
978
+ getRowQuery: any;
979
+ }) => Promise<object>;
980
+ };
981
+ display_state_form: (opts: object) => boolean;
982
+ default_state_form: ({ default_state }: object) => boolean;
983
+ getStringsForI18n({ columns, create_view_label }: {
984
+ columns: any;
985
+ create_view_label: any;
986
+ }): string[];
987
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
988
+ table_id: any;
989
+ exttable_name: any;
990
+ name: any;
991
+ configuration: {
992
+ columns: any;
993
+ default_state: any;
994
+ };
995
+ req: any;
996
+ }) => {
997
+ listQuery(state: any, stateHash: any): Promise<{
998
+ rows: import("@saltcorn/db-common/internal").Row[];
999
+ rowCount: number;
1000
+ }>;
1001
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1002
+ };
1003
+ configCheck: (view: any) => Promise<{
1004
+ errors: string[];
1005
+ warnings: string[];
1006
+ }>;
1007
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
860
1008
  } | {
861
1009
  name: string;
862
1010
  description: string;
@@ -893,148 +1041,6 @@ export const viewtemplates: ({
893
1041
  }) => Promise<{
894
1042
  embeddedViews: import("../models/view")[];
895
1043
  }>;
896
- } | {
897
- name: string;
898
- description: string;
899
- get_state_fields: () => object[];
900
- configuration_workflow: () => import("../models/workflow");
901
- run: (table_id: number, viewname: string, { columns, layout }: {
902
- columns: object[];
903
- layout: object;
904
- }, state: object, extra: object, { distinctValuesQuery }: {
905
- distinctValuesQuery: any;
906
- }) => Promise<Layout>;
907
- initial_config: () => Promise<object>;
908
- display_state_form: boolean;
909
- getStringsForI18n({ layout }: {
910
- layout: any;
911
- }): string[];
912
- routes: {
913
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
914
- req: any;
915
- res: any;
916
- }, { actionQuery }: {
917
- actionQuery: any;
918
- }) => Promise<any>;
919
- };
920
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
921
- table_id: any;
922
- viewname: any;
923
- configuration: {
924
- columns: any;
925
- };
926
- req: any;
927
- res: any;
928
- exttable_name: any;
929
- }) => {
930
- actionQuery(state: any, rndid: any): Promise<{
931
- json: any;
932
- }>;
933
- distinctValuesQuery(state: any): Promise<{
934
- distinct_values: {};
935
- role: any;
936
- }>;
937
- };
938
- } | {
939
- name: string;
940
- description: string;
941
- configuration_workflow: (req: object) => import("../models/workflow");
942
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
943
- participant_field: string;
944
- msg_relation: string;
945
- msgsender_field: any;
946
- msgview: string;
947
- msgform: string;
948
- participant_maxread_field: string;
949
- }, state: object, { req, res }: {
950
- req: object;
951
- res: object;
952
- }, { getRowQuery, updateQuery, optionsQuery }: {
953
- getRowQuery: any;
954
- updateQuery: any;
955
- optionsQuery: any;
956
- }) => Promise<div>;
957
- get_state_fields: () => object[];
958
- display_state_form: boolean;
959
- routes: {
960
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
961
- participant_field: string;
962
- msg_relation: string;
963
- msgsender_field: any;
964
- msgview: string;
965
- msgform: string;
966
- participant_maxread_field: string;
967
- }, body: any, { req, res }: {
968
- req: object;
969
- res: object;
970
- }, { submitAjaxQuery }: {
971
- submitAjaxQuery: any;
972
- }) => Promise<object>;
973
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
974
- participant_field: string;
975
- participant_maxread_field: string;
976
- }, body: any, { req, res }: {
977
- req: object;
978
- res: object;
979
- }, { ackReadQuery }: {
980
- ackReadQuery: any;
981
- }) => Promise<void>;
982
- 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>;
983
- };
984
- noAutoTest: boolean;
985
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
986
- participant_field: object;
987
- }, room_id: string, user: object) => Promise<object>;
988
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
989
- participant_field: any;
990
- msg_relation: string;
991
- msgsender_field: string;
992
- msgview: string;
993
- msgform: any;
994
- participant_maxread_field: any;
995
- }) => object[];
996
- getStringsForI18n(): object[];
997
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
998
- table_id: any;
999
- viewname: any;
1000
- configuration: {
1001
- columns: any;
1002
- default_state: any;
1003
- };
1004
- req: any;
1005
- }) => {
1006
- 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>;
1007
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1008
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1009
- json: {
1010
- msgid: {
1011
- error: string;
1012
- } | {
1013
- success: any;
1014
- };
1015
- error?: undefined;
1016
- };
1017
- } | {
1018
- json: {
1019
- error: any;
1020
- msgid?: undefined;
1021
- };
1022
- }>;
1023
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1024
- json: {
1025
- error: string;
1026
- success?: undefined;
1027
- };
1028
- } | {
1029
- json: {
1030
- success: string;
1031
- error?: undefined;
1032
- };
1033
- }>;
1034
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1035
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1036
- };
1037
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1038
1044
  })[];
1039
1045
  import fileviews = require("./fileviews");
1040
1046
  import actions = require("./actions");