@saltcorn/data 0.9.1-beta.8 → 0.9.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 (92) hide show
  1. package/dist/base-plugin/actions.d.ts +306 -44
  2. package/dist/base-plugin/actions.d.ts.map +1 -1
  3. package/dist/base-plugin/actions.js +164 -5
  4. package/dist/base-plugin/actions.js.map +1 -1
  5. package/dist/base-plugin/fieldviews.js +1 -1
  6. package/dist/base-plugin/fieldviews.js.map +1 -1
  7. package/dist/base-plugin/index.d.ts +371 -371
  8. package/dist/base-plugin/types.d.ts.map +1 -1
  9. package/dist/base-plugin/types.js +38 -17
  10. package/dist/base-plugin/types.js.map +1 -1
  11. package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
  12. package/dist/base-plugin/viewtemplates/edit.js +56 -21
  13. package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
  14. package/dist/base-plugin/viewtemplates/feed.js +1 -1
  15. package/dist/base-plugin/viewtemplates/feed.js.map +1 -1
  16. package/dist/base-plugin/viewtemplates/filter.d.ts.map +1 -1
  17. package/dist/base-plugin/viewtemplates/filter.js +18 -5
  18. package/dist/base-plugin/viewtemplates/filter.js.map +1 -1
  19. package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
  20. package/dist/base-plugin/viewtemplates/list.js +5 -3
  21. package/dist/base-plugin/viewtemplates/list.js.map +1 -1
  22. package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
  23. package/dist/base-plugin/viewtemplates/show.js +38 -10
  24. package/dist/base-plugin/viewtemplates/show.js.map +1 -1
  25. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts +2 -2
  26. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
  27. package/dist/base-plugin/viewtemplates/viewable_fields.js +24 -15
  28. package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
  29. package/dist/db/state.d.ts.map +1 -1
  30. package/dist/db/state.js +5 -2
  31. package/dist/db/state.js.map +1 -1
  32. package/dist/models/config.d.ts.map +1 -1
  33. package/dist/models/config.js +37 -2
  34. package/dist/models/config.js.map +1 -1
  35. package/dist/models/discovery.d.ts +1 -0
  36. package/dist/models/discovery.d.ts.map +1 -1
  37. package/dist/models/discovery.js +6 -3
  38. package/dist/models/discovery.js.map +1 -1
  39. package/dist/models/field.d.ts +1 -0
  40. package/dist/models/field.d.ts.map +1 -1
  41. package/dist/models/field.js +4 -1
  42. package/dist/models/field.js.map +1 -1
  43. package/dist/models/file.d.ts +1 -1
  44. package/dist/models/file.d.ts.map +1 -1
  45. package/dist/models/file.js +3 -2
  46. package/dist/models/file.js.map +1 -1
  47. package/dist/models/index.d.ts +1 -1
  48. package/dist/models/index.d.ts.map +1 -1
  49. package/dist/models/index.js +1 -1
  50. package/dist/models/index.js.map +1 -1
  51. package/dist/models/page.d.ts.map +1 -1
  52. package/dist/models/page.js +23 -5
  53. package/dist/models/page.js.map +1 -1
  54. package/dist/models/plugin.d.ts +1 -0
  55. package/dist/models/plugin.d.ts.map +1 -1
  56. package/dist/models/plugin.js +5 -0
  57. package/dist/models/plugin.js.map +1 -1
  58. package/dist/models/table.d.ts +100 -5
  59. package/dist/models/table.d.ts.map +1 -1
  60. package/dist/models/table.js +123 -7
  61. package/dist/models/table.js.map +1 -1
  62. package/dist/models/trigger.js +2 -2
  63. package/dist/models/trigger.js.map +1 -1
  64. package/dist/models/view.d.ts +1 -0
  65. package/dist/models/view.d.ts.map +1 -1
  66. package/dist/models/view.js +41 -14
  67. package/dist/models/view.js.map +1 -1
  68. package/dist/plugin-helper.d.ts +4 -5
  69. package/dist/plugin-helper.d.ts.map +1 -1
  70. package/dist/plugin-helper.js +95 -26
  71. package/dist/plugin-helper.js.map +1 -1
  72. package/dist/tests/actions.test.js +21 -3
  73. package/dist/tests/actions.test.js.map +1 -1
  74. package/dist/tests/auth.test.js +1 -1
  75. package/dist/tests/auth.test.js.map +1 -1
  76. package/dist/tests/auxtest.test.js +12 -1
  77. package/dist/tests/auxtest.test.js.map +1 -1
  78. package/dist/tests/common_helpers.d.ts.map +1 -1
  79. package/dist/tests/common_helpers.js +108 -0
  80. package/dist/tests/common_helpers.js.map +1 -1
  81. package/dist/tests/email.test.js +1 -1
  82. package/dist/tests/exact_views.test.js +12 -12
  83. package/dist/tests/exact_views.test.js.map +1 -1
  84. package/dist/tests/table.test.js +31 -0
  85. package/dist/tests/table.test.js.map +1 -1
  86. package/dist/tests/view.test.js +3 -2
  87. package/dist/tests/view.test.js.map +1 -1
  88. package/dist/utils.d.ts +2 -0
  89. package/dist/utils.d.ts.map +1 -1
  90. package/dist/utils.js +28 -0
  91. package/dist/utils.js.map +1 -1
  92. package/package.json +7 -7
@@ -1,141 +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
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
34
- };
35
- switch: {
36
- isEdit: boolean;
37
- description: string;
38
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
39
- };
40
- show_with_html: {
41
- configFields: {
42
- input_type: string;
43
- name: string;
44
- label: string;
45
- sublabel: string;
46
- default: string;
47
- attributes: {
48
- mode: string;
49
- };
50
- }[];
51
- isEdit: boolean;
52
- description: string;
53
- run: (v: any, req: any, attrs?: {}) => any;
54
- };
55
- tristate: {
56
- isEdit: boolean;
57
- description: string;
58
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
59
- };
60
- };
61
- attributes: object[];
62
- readFromFormRecord: (rec: any, name: string) => boolean | null;
63
- read: (v: object) => boolean | null;
64
- readFromDB: (v: object) => object;
65
- listAs: (v: object) => object;
66
- validate: () => boolean;
67
- } | {
68
- name: string;
69
- sql_name: string;
70
- js_type: string;
71
- contract: () => Function;
72
- attributes: object[];
73
- fieldviews: {
74
- show: {
75
- isEdit: boolean;
76
- description: string;
77
- run: (d: any, req: any, attrs?: {}) => any;
78
- };
79
- showDay: {
80
- isEdit: boolean;
81
- description: string;
82
- run: (d: any, req: any) => any;
83
- };
84
- format: {
85
- isEdit: boolean;
86
- description: string;
87
- configFields: {
88
- name: string;
89
- label: string;
90
- type: string;
91
- sublabel: string;
92
- }[];
93
- run: (d: any, req: any, options: any) => any;
94
- };
95
- relative: {
96
- isEdit: boolean;
97
- description: string;
98
- run: (d: any, req: any) => string;
99
- };
100
- yearsAgo: {
101
- isEdit: boolean;
102
- description: string;
103
- run: (d: any, req: any) => string;
104
- };
105
- show_with_html: {
106
- configFields: {
107
- input_type: string;
108
- name: string;
109
- label: string;
110
- sublabel: string;
111
- default: string;
112
- attributes: {
113
- mode: string;
114
- };
115
- }[];
116
- isEdit: boolean;
117
- description: string;
118
- run: (v: any, req: any, attrs?: {}) => any;
119
- };
120
- edit: {
121
- isEdit: boolean;
122
- blockDisplay: boolean;
123
- description: string;
124
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
125
- };
126
- editDay: {
127
- isEdit: boolean;
128
- blockDisplay: boolean;
129
- description: string;
130
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
131
- };
132
- };
133
- presets: {
134
- Now: () => Date;
135
- };
136
- read: (v: object, attrs: object) => object;
137
- validate: () => boolean;
138
- } | {
139
2
  name: string;
140
3
  sql_name: string;
141
4
  js_type: string;
@@ -530,7 +393,100 @@ export const types: ({
530
393
  show: {
531
394
  isEdit: boolean;
532
395
  description: string;
533
- run: (s: any) => any;
396
+ run: (v: any) => any;
397
+ };
398
+ checkboxes: {
399
+ isEdit: boolean;
400
+ description: string;
401
+ run: (v: any) => any;
402
+ };
403
+ TrueFalse: {
404
+ isEdit: boolean;
405
+ description: string;
406
+ run: (v: any) => "" | "True" | "False";
407
+ };
408
+ edit: {
409
+ isEdit: boolean;
410
+ description: string;
411
+ configFields: {
412
+ name: string;
413
+ label: string;
414
+ type: string;
415
+ attributes: {
416
+ options: string[];
417
+ };
418
+ }[];
419
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
420
+ };
421
+ switch: {
422
+ isEdit: boolean;
423
+ description: string;
424
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
425
+ };
426
+ show_with_html: {
427
+ configFields: {
428
+ input_type: string;
429
+ name: string;
430
+ label: string;
431
+ sublabel: string;
432
+ default: string;
433
+ attributes: {
434
+ mode: string;
435
+ };
436
+ }[];
437
+ isEdit: boolean;
438
+ description: string;
439
+ run: (v: any, req: any, attrs?: {}) => any;
440
+ };
441
+ tristate: {
442
+ isEdit: boolean;
443
+ description: string;
444
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
445
+ };
446
+ };
447
+ attributes: object[];
448
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
449
+ read: (v: object) => boolean | null;
450
+ readFromDB: (v: object) => object;
451
+ listAs: (v: object) => object;
452
+ validate: () => boolean;
453
+ } | {
454
+ name: string;
455
+ sql_name: string;
456
+ js_type: string;
457
+ contract: () => Function;
458
+ attributes: object[];
459
+ fieldviews: {
460
+ show: {
461
+ isEdit: boolean;
462
+ description: string;
463
+ run: (d: any, req: any, attrs?: {}) => any;
464
+ };
465
+ showDay: {
466
+ isEdit: boolean;
467
+ description: string;
468
+ run: (d: any, req: any) => any;
469
+ };
470
+ format: {
471
+ isEdit: boolean;
472
+ description: string;
473
+ configFields: {
474
+ name: string;
475
+ label: string;
476
+ type: string;
477
+ sublabel: string;
478
+ }[];
479
+ run: (d: any, req: any, options: any) => any;
480
+ };
481
+ relative: {
482
+ isEdit: boolean;
483
+ description: string;
484
+ run: (d: any, req: any) => string;
485
+ };
486
+ yearsAgo: {
487
+ isEdit: boolean;
488
+ description: string;
489
+ run: (d: any, req: any) => string;
534
490
  };
535
491
  show_with_html: {
536
492
  configFields: {
@@ -553,9 +509,17 @@ export const types: ({
553
509
  description: string;
554
510
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
555
511
  };
512
+ editDay: {
513
+ isEdit: boolean;
514
+ blockDisplay: boolean;
515
+ description: string;
516
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
517
+ };
556
518
  };
557
- attributes: object[];
558
- read: (v: object) => object;
519
+ presets: {
520
+ Now: () => Date;
521
+ };
522
+ read: (v: object, attrs: object) => object;
559
523
  validate: () => boolean;
560
524
  } | {
561
525
  name: string;
@@ -683,49 +647,103 @@ export const types: ({
683
647
  attributes: object[];
684
648
  read: (v: object) => string | number | undefined;
685
649
  validate: ({ min, max }: object) => boolean | object;
686
- })[];
687
- export const viewtemplates: ({
650
+ } | {
688
651
  name: string;
689
- description: string;
690
- get_state_fields: () => object[];
691
- configuration_workflow: () => import("../models/workflow");
692
- run: (table_id: number, viewname: string, { columns, layout }: {
693
- columns: object[];
694
- layout: object;
695
- }, state: object, extra: object, { distinctValuesQuery }: {
696
- distinctValuesQuery: any;
697
- }) => Promise<Layout>;
698
- initial_config: () => Promise<object>;
699
- display_state_form: boolean;
700
- getStringsForI18n({ layout }: {
701
- layout: any;
702
- }): string[];
652
+ sql_name: string;
653
+ js_type: string;
654
+ contract: () => Function;
655
+ fieldviews: {
656
+ show: {
657
+ isEdit: boolean;
658
+ description: string;
659
+ run: (s: any) => any;
660
+ };
661
+ show_with_html: {
662
+ configFields: {
663
+ input_type: string;
664
+ name: string;
665
+ label: string;
666
+ sublabel: string;
667
+ default: string;
668
+ attributes: {
669
+ mode: string;
670
+ };
671
+ }[];
672
+ isEdit: boolean;
673
+ description: string;
674
+ run: (v: any, req: any, attrs?: {}) => any;
675
+ };
676
+ edit: {
677
+ isEdit: boolean;
678
+ blockDisplay: boolean;
679
+ description: string;
680
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
681
+ };
682
+ };
683
+ attributes: object[];
684
+ read: (v: object) => object;
685
+ validate: () => boolean;
686
+ })[];
687
+ export const viewtemplates: ({
688
+ name: string;
689
+ description: string;
690
+ configuration_workflow: (req: object) => import("../models/workflow");
691
+ 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, }: {
692
+ columns: object[];
693
+ view_to_create?: string | undefined;
694
+ create_view_display: string;
695
+ create_view_label?: string | undefined;
696
+ default_state?: object | undefined;
697
+ create_view_location?: string | undefined;
698
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
699
+ listQuery: any;
700
+ }) => Promise<any>;
701
+ view_quantity: string;
702
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
703
+ columns: object[];
704
+ }) => Function;
705
+ initial_config: Function;
706
+ on_delete: (table_id: any, viewname: string, { default_state }: {
707
+ default_state: any;
708
+ }) => Promise<void>;
703
709
  routes: {
704
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
705
- req: any;
710
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
711
+ columns: object[];
712
+ layout: any;
713
+ }, body: object, { req, res }: {
714
+ req: object;
706
715
  res: any;
707
- }, { actionQuery }: {
708
- actionQuery: any;
709
- }) => Promise<any>;
716
+ }, { getRowQuery }: {
717
+ getRowQuery: any;
718
+ }) => Promise<object>;
710
719
  };
711
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
720
+ display_state_form: (opts: object) => boolean;
721
+ default_state_form: ({ default_state }: object) => boolean;
722
+ getStringsForI18n({ columns, create_view_label }: {
723
+ columns: any;
724
+ create_view_label: any;
725
+ }): string[];
726
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
712
727
  table_id: any;
713
- viewname: any;
728
+ exttable_name: any;
729
+ name: any;
714
730
  configuration: {
715
731
  columns: any;
732
+ default_state: any;
716
733
  };
717
734
  req: any;
718
- res: any;
719
- exttable_name: any;
720
735
  }) => {
721
- actionQuery(state: any, rndid: any): Promise<{
722
- json: any;
723
- }>;
724
- distinctValuesQuery(state: any): Promise<{
725
- distinct_values: {};
726
- role: any;
736
+ listQuery(state: any, stateHash: any): Promise<{
737
+ rows: import("@saltcorn/db-common/internal").Row[];
738
+ rowCount: number;
727
739
  }>;
740
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
728
741
  };
742
+ configCheck: (view: any) => Promise<{
743
+ errors: string[];
744
+ warnings: string[];
745
+ }>;
746
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
729
747
  } | {
730
748
  name: string;
731
749
  description: string;
@@ -875,146 +893,6 @@ export const viewtemplates: ({
875
893
  warnings: string[];
876
894
  }>;
877
895
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
878
- } | {
879
- name: string;
880
- description: string;
881
- configuration_workflow: (req: object) => import("../models/workflow");
882
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
883
- participant_field: string;
884
- msg_relation: string;
885
- msgsender_field: any;
886
- msgview: string;
887
- msgform: string;
888
- participant_maxread_field: string;
889
- }, state: object, { req, res }: {
890
- req: object;
891
- res: object;
892
- }, { getRowQuery, updateQuery, optionsQuery }: {
893
- getRowQuery: any;
894
- updateQuery: any;
895
- optionsQuery: any;
896
- }) => Promise<div>;
897
- get_state_fields: () => object[];
898
- display_state_form: boolean;
899
- routes: {
900
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
901
- participant_field: string;
902
- msg_relation: string;
903
- msgsender_field: any;
904
- msgview: string;
905
- msgform: string;
906
- participant_maxread_field: string;
907
- }, body: any, { req, res }: {
908
- req: object;
909
- res: object;
910
- }, { submitAjaxQuery }: {
911
- submitAjaxQuery: any;
912
- }) => Promise<object>;
913
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
914
- participant_field: string;
915
- participant_maxread_field: string;
916
- }, body: any, { req, res }: {
917
- req: object;
918
- res: object;
919
- }, { ackReadQuery }: {
920
- ackReadQuery: any;
921
- }) => Promise<void>;
922
- 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>;
923
- };
924
- noAutoTest: boolean;
925
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
926
- participant_field: object;
927
- }, room_id: string, user: object) => Promise<object>;
928
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
929
- participant_field: any;
930
- msg_relation: string;
931
- msgsender_field: string;
932
- msgview: string;
933
- msgform: any;
934
- participant_maxread_field: any;
935
- }) => object[];
936
- getStringsForI18n(): object[];
937
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
938
- table_id: any;
939
- viewname: any;
940
- configuration: {
941
- columns: any;
942
- default_state: any;
943
- };
944
- req: any;
945
- }) => {
946
- 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>;
947
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
948
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
949
- json: {
950
- msgid: {
951
- error: string;
952
- } | {
953
- success: any;
954
- };
955
- error?: undefined;
956
- };
957
- } | {
958
- json: {
959
- error: any;
960
- msgid?: undefined;
961
- };
962
- }>;
963
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
964
- json: {
965
- error: string;
966
- success?: undefined;
967
- };
968
- } | {
969
- json: {
970
- success: string;
971
- error?: undefined;
972
- };
973
- }>;
974
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
975
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
976
- };
977
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
978
- } | {
979
- name: string;
980
- description: string;
981
- configuration_workflow: (req: object) => import("../models/workflow");
982
- 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, always_create_view, include_fml, empty_view, groupby, ...cols }: {
983
- show_view: string;
984
- order_field: name;
985
- descending: boolean;
986
- view_to_create?: string | undefined;
987
- create_view_display: string;
988
- in_card: boolean;
989
- masonry_columns: string;
990
- rows_per_page?: number | undefined;
991
- hide_pagination: boolean;
992
- create_view_label?: string | undefined;
993
- create_view_location?: string | undefined;
994
- always_create_view: boolean;
995
- cols: any;
996
- }, state: object, extraArgs: any, { countRowsQuery }: {
997
- countRowsQuery: any;
998
- }) => Promise<div>;
999
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
1000
- show_view: any;
1001
- }) => Promise<import("../models/field")>;
1002
- display_state_form: boolean;
1003
- getStringsForI18n({ create_view_label }: {
1004
- create_view_label: any;
1005
- }): string[] | Object[];
1006
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1007
- table_id: any;
1008
- viewname: any;
1009
- configuration: {
1010
- columns: any;
1011
- default_state: any;
1012
- };
1013
- req: any;
1014
- }) => {
1015
- countRowsQuery(state: any): Promise<number>;
1016
- };
1017
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1018
896
  } | {
1019
897
  name: string;
1020
898
  description: string;
@@ -1089,66 +967,6 @@ export const viewtemplates: ({
1089
967
  warnings: string[];
1090
968
  }>;
1091
969
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1092
- } | {
1093
- name: string;
1094
- description: string;
1095
- configuration_workflow: (req: object) => import("../models/workflow");
1096
- 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, }: {
1097
- columns: object[];
1098
- view_to_create?: string | undefined;
1099
- create_view_display: string;
1100
- create_view_label?: string | undefined;
1101
- default_state?: object | undefined;
1102
- create_view_location?: string | undefined;
1103
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1104
- listQuery: any;
1105
- }) => Promise<any>;
1106
- view_quantity: string;
1107
- get_state_fields: (table_id: string, viewname: any, { columns }: {
1108
- columns: object[];
1109
- }) => Function;
1110
- initial_config: Function;
1111
- on_delete: (table_id: any, viewname: string, { default_state }: {
1112
- default_state: any;
1113
- }) => Promise<void>;
1114
- routes: {
1115
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1116
- columns: object[];
1117
- layout: any;
1118
- }, body: object, { req, res }: {
1119
- req: object;
1120
- res: any;
1121
- }, { getRowQuery }: {
1122
- getRowQuery: any;
1123
- }) => Promise<object>;
1124
- };
1125
- display_state_form: (opts: object) => boolean;
1126
- default_state_form: ({ default_state }: object) => boolean;
1127
- getStringsForI18n({ columns, create_view_label }: {
1128
- columns: any;
1129
- create_view_label: any;
1130
- }): string[];
1131
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
1132
- table_id: any;
1133
- exttable_name: any;
1134
- name: any;
1135
- configuration: {
1136
- columns: any;
1137
- default_state: any;
1138
- };
1139
- req: any;
1140
- }) => {
1141
- listQuery(state: any, stateHash: any): Promise<{
1142
- rows: import("@saltcorn/db-common/internal").Row[];
1143
- rowCount: number;
1144
- }>;
1145
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1146
- };
1147
- configCheck: (view: any) => Promise<{
1148
- errors: string[];
1149
- warnings: string[];
1150
- }>;
1151
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1152
970
  } | {
1153
971
  name: string;
1154
972
  description: string;
@@ -1185,6 +1003,188 @@ export const viewtemplates: ({
1185
1003
  }) => Promise<{
1186
1004
  embeddedViews: import("../models/view")[];
1187
1005
  }>;
1006
+ } | {
1007
+ name: string;
1008
+ description: string;
1009
+ configuration_workflow: (req: object) => import("../models/workflow");
1010
+ 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, always_create_view, include_fml, empty_view, groupby, ...cols }: {
1011
+ show_view: string;
1012
+ order_field: name;
1013
+ descending: boolean;
1014
+ view_to_create?: string | undefined;
1015
+ create_view_display: string;
1016
+ in_card: boolean;
1017
+ masonry_columns: string;
1018
+ rows_per_page?: number | undefined;
1019
+ hide_pagination: boolean;
1020
+ create_view_label?: string | undefined;
1021
+ create_view_location?: string | undefined;
1022
+ always_create_view: boolean;
1023
+ cols: any;
1024
+ }, state: object, extraArgs: any, { countRowsQuery }: {
1025
+ countRowsQuery: any;
1026
+ }) => Promise<div>;
1027
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
1028
+ show_view: any;
1029
+ }) => Promise<import("../models/field")>;
1030
+ display_state_form: boolean;
1031
+ getStringsForI18n({ create_view_label }: {
1032
+ create_view_label: any;
1033
+ }): string[] | Object[];
1034
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1035
+ table_id: any;
1036
+ viewname: any;
1037
+ configuration: {
1038
+ columns: any;
1039
+ default_state: any;
1040
+ };
1041
+ req: any;
1042
+ }) => {
1043
+ countRowsQuery(state: any): Promise<number>;
1044
+ };
1045
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1046
+ } | {
1047
+ name: string;
1048
+ description: string;
1049
+ get_state_fields: () => object[];
1050
+ configuration_workflow: () => import("../models/workflow");
1051
+ run: (table_id: number, viewname: string, { columns, layout }: {
1052
+ columns: object[];
1053
+ layout: object;
1054
+ }, state: object, extra: object, { distinctValuesQuery }: {
1055
+ distinctValuesQuery: any;
1056
+ }) => Promise<Layout>;
1057
+ initial_config: () => Promise<object>;
1058
+ display_state_form: boolean;
1059
+ getStringsForI18n({ layout }: {
1060
+ layout: any;
1061
+ }): string[];
1062
+ routes: {
1063
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1064
+ req: any;
1065
+ res: any;
1066
+ }, { actionQuery }: {
1067
+ actionQuery: any;
1068
+ }) => Promise<any>;
1069
+ };
1070
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1071
+ table_id: any;
1072
+ viewname: any;
1073
+ configuration: {
1074
+ columns: any;
1075
+ };
1076
+ req: any;
1077
+ res: any;
1078
+ exttable_name: any;
1079
+ }) => {
1080
+ actionQuery(state: any, rndid: any): Promise<{
1081
+ json: any;
1082
+ }>;
1083
+ distinctValuesQuery(state: any): Promise<{
1084
+ distinct_values: {};
1085
+ role: any;
1086
+ }>;
1087
+ };
1088
+ } | {
1089
+ name: string;
1090
+ description: string;
1091
+ configuration_workflow: (req: object) => import("../models/workflow");
1092
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1093
+ participant_field: string;
1094
+ msg_relation: string;
1095
+ msgsender_field: any;
1096
+ msgview: string;
1097
+ msgform: string;
1098
+ participant_maxread_field: string;
1099
+ }, state: object, { req, res }: {
1100
+ req: object;
1101
+ res: object;
1102
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1103
+ getRowQuery: any;
1104
+ updateQuery: any;
1105
+ optionsQuery: any;
1106
+ }) => Promise<div>;
1107
+ get_state_fields: () => object[];
1108
+ display_state_form: boolean;
1109
+ routes: {
1110
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1111
+ participant_field: string;
1112
+ msg_relation: string;
1113
+ msgsender_field: any;
1114
+ msgview: string;
1115
+ msgform: string;
1116
+ participant_maxread_field: string;
1117
+ }, body: any, { req, res }: {
1118
+ req: object;
1119
+ res: object;
1120
+ }, { submitAjaxQuery }: {
1121
+ submitAjaxQuery: any;
1122
+ }) => Promise<object>;
1123
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1124
+ participant_field: string;
1125
+ participant_maxread_field: string;
1126
+ }, body: any, { req, res }: {
1127
+ req: object;
1128
+ res: object;
1129
+ }, { ackReadQuery }: {
1130
+ ackReadQuery: any;
1131
+ }) => Promise<void>;
1132
+ 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>;
1133
+ };
1134
+ noAutoTest: boolean;
1135
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1136
+ participant_field: object;
1137
+ }, room_id: string, user: object) => Promise<object>;
1138
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1139
+ participant_field: any;
1140
+ msg_relation: string;
1141
+ msgsender_field: string;
1142
+ msgview: string;
1143
+ msgform: any;
1144
+ participant_maxread_field: any;
1145
+ }) => object[];
1146
+ getStringsForI18n(): object[];
1147
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1148
+ table_id: any;
1149
+ viewname: any;
1150
+ configuration: {
1151
+ columns: any;
1152
+ default_state: any;
1153
+ };
1154
+ req: any;
1155
+ }) => {
1156
+ 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>;
1157
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1158
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1159
+ json: {
1160
+ msgid: {
1161
+ error: string;
1162
+ } | {
1163
+ success: any;
1164
+ };
1165
+ error?: undefined;
1166
+ };
1167
+ } | {
1168
+ json: {
1169
+ error: any;
1170
+ msgid?: undefined;
1171
+ };
1172
+ }>;
1173
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1174
+ json: {
1175
+ error: string;
1176
+ success?: undefined;
1177
+ };
1178
+ } | {
1179
+ json: {
1180
+ success: string;
1181
+ error?: undefined;
1182
+ };
1183
+ }>;
1184
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1185
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1186
+ };
1187
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1188
1188
  })[];
1189
1189
  import fileviews = require("./fileviews");
1190
1190
  import actions = require("./actions");