@saltcorn/data 0.9.1-beta.6 → 0.9.1-beta.7
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.
- package/dist/base-plugin/index.d.ts +334 -334
- package/dist/models/email.d.ts +6 -5
- package/dist/models/email.d.ts.map +1 -1
- package/dist/models/eventlog.js +1 -1
- package/dist/models/eventlog.js.map +1 -1
- package/dist/models/table.d.ts.map +1 -1
- package/dist/models/table.js +26 -1
- package/dist/models/table.js.map +1 -1
- package/dist/models/trigger.d.ts +11 -4
- package/dist/models/trigger.d.ts.map +1 -1
- package/dist/models/trigger.js +20 -6
- package/dist/models/trigger.js.map +1 -1
- package/dist/models/user.d.ts +1 -0
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/user.js +22 -5
- package/dist/models/user.js.map +1 -1
- package/dist/tests/actions.test.js +127 -0
- package/dist/tests/actions.test.js.map +1 -1
- package/dist/tests/edit.test.d.ts +2 -0
- package/dist/tests/edit.test.d.ts.map +1 -0
- package/dist/tests/edit.test.js +309 -0
- package/dist/tests/edit.test.js.map +1 -0
- package/dist/tests/mocks.d.ts +6 -5
- package/dist/tests/mocks.d.ts.map +1 -1
- package/dist/tests/mocks.js +17 -5
- package/dist/tests/mocks.js.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +5 -0
- package/dist/utils.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,4 +1,111 @@
|
|
|
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
|
+
tristate: {
|
|
41
|
+
isEdit: boolean;
|
|
42
|
+
description: string;
|
|
43
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
attributes: object[];
|
|
47
|
+
readFromFormRecord: (rec: any, name: string) => boolean | null;
|
|
48
|
+
read: (v: object) => boolean | null;
|
|
49
|
+
readFromDB: (v: object) => object;
|
|
50
|
+
listAs: (v: object) => object;
|
|
51
|
+
validate: () => boolean;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
sql_name: string;
|
|
55
|
+
js_type: string;
|
|
56
|
+
contract: () => Function;
|
|
57
|
+
attributes: object[];
|
|
58
|
+
fieldviews: {
|
|
59
|
+
show: {
|
|
60
|
+
isEdit: boolean;
|
|
61
|
+
description: string;
|
|
62
|
+
run: (d: any, req: any) => any;
|
|
63
|
+
};
|
|
64
|
+
showDay: {
|
|
65
|
+
isEdit: boolean;
|
|
66
|
+
description: string;
|
|
67
|
+
run: (d: any, req: any) => any;
|
|
68
|
+
};
|
|
69
|
+
format: {
|
|
70
|
+
isEdit: boolean;
|
|
71
|
+
description: string;
|
|
72
|
+
configFields: {
|
|
73
|
+
name: string;
|
|
74
|
+
label: string;
|
|
75
|
+
type: string;
|
|
76
|
+
sublabel: string;
|
|
77
|
+
}[];
|
|
78
|
+
run: (d: any, req: any, options: any) => any;
|
|
79
|
+
};
|
|
80
|
+
relative: {
|
|
81
|
+
isEdit: boolean;
|
|
82
|
+
description: string;
|
|
83
|
+
run: (d: any, req: any) => string;
|
|
84
|
+
};
|
|
85
|
+
yearsAgo: {
|
|
86
|
+
isEdit: boolean;
|
|
87
|
+
description: string;
|
|
88
|
+
run: (d: any, req: any) => string;
|
|
89
|
+
};
|
|
90
|
+
edit: {
|
|
91
|
+
isEdit: boolean;
|
|
92
|
+
blockDisplay: boolean;
|
|
93
|
+
description: string;
|
|
94
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
95
|
+
};
|
|
96
|
+
editDay: {
|
|
97
|
+
isEdit: boolean;
|
|
98
|
+
blockDisplay: boolean;
|
|
99
|
+
description: string;
|
|
100
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
presets: {
|
|
104
|
+
Now: () => Date;
|
|
105
|
+
};
|
|
106
|
+
read: (v: object, attrs: object) => object;
|
|
107
|
+
validate: () => boolean;
|
|
108
|
+
} | {
|
|
2
109
|
name: string;
|
|
3
110
|
sql_name: string;
|
|
4
111
|
js_type: string;
|
|
@@ -354,113 +461,6 @@ export const types: ({
|
|
|
354
461
|
validate_attributes: ({ min, max }: object) => boolean;
|
|
355
462
|
read: (v: object) => object;
|
|
356
463
|
validate: ({ min, max }: object) => boolean;
|
|
357
|
-
} | {
|
|
358
|
-
name: string;
|
|
359
|
-
sql_name: string;
|
|
360
|
-
js_type: string;
|
|
361
|
-
contract: () => Function;
|
|
362
|
-
fieldviews: {
|
|
363
|
-
show: {
|
|
364
|
-
isEdit: boolean;
|
|
365
|
-
description: string;
|
|
366
|
-
run: (v: any) => any;
|
|
367
|
-
};
|
|
368
|
-
checkboxes: {
|
|
369
|
-
isEdit: boolean;
|
|
370
|
-
description: string;
|
|
371
|
-
run: (v: any) => any;
|
|
372
|
-
};
|
|
373
|
-
TrueFalse: {
|
|
374
|
-
isEdit: boolean;
|
|
375
|
-
description: string;
|
|
376
|
-
run: (v: any) => "" | "True" | "False";
|
|
377
|
-
};
|
|
378
|
-
edit: {
|
|
379
|
-
isEdit: boolean;
|
|
380
|
-
description: string;
|
|
381
|
-
configFields: {
|
|
382
|
-
name: string;
|
|
383
|
-
label: string;
|
|
384
|
-
type: string;
|
|
385
|
-
attributes: {
|
|
386
|
-
options: string[];
|
|
387
|
-
};
|
|
388
|
-
}[];
|
|
389
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
390
|
-
};
|
|
391
|
-
switch: {
|
|
392
|
-
isEdit: boolean;
|
|
393
|
-
description: string;
|
|
394
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
395
|
-
};
|
|
396
|
-
tristate: {
|
|
397
|
-
isEdit: boolean;
|
|
398
|
-
description: string;
|
|
399
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
attributes: object[];
|
|
403
|
-
readFromFormRecord: (rec: any, name: string) => boolean | null;
|
|
404
|
-
read: (v: object) => boolean | null;
|
|
405
|
-
readFromDB: (v: object) => object;
|
|
406
|
-
listAs: (v: object) => object;
|
|
407
|
-
validate: () => boolean;
|
|
408
|
-
} | {
|
|
409
|
-
name: string;
|
|
410
|
-
sql_name: string;
|
|
411
|
-
js_type: string;
|
|
412
|
-
contract: () => Function;
|
|
413
|
-
attributes: object[];
|
|
414
|
-
fieldviews: {
|
|
415
|
-
show: {
|
|
416
|
-
isEdit: boolean;
|
|
417
|
-
description: string;
|
|
418
|
-
run: (d: any, req: any) => any;
|
|
419
|
-
};
|
|
420
|
-
showDay: {
|
|
421
|
-
isEdit: boolean;
|
|
422
|
-
description: string;
|
|
423
|
-
run: (d: any, req: any) => any;
|
|
424
|
-
};
|
|
425
|
-
format: {
|
|
426
|
-
isEdit: boolean;
|
|
427
|
-
description: string;
|
|
428
|
-
configFields: {
|
|
429
|
-
name: string;
|
|
430
|
-
label: string;
|
|
431
|
-
type: string;
|
|
432
|
-
sublabel: string;
|
|
433
|
-
}[];
|
|
434
|
-
run: (d: any, req: any, options: any) => any;
|
|
435
|
-
};
|
|
436
|
-
relative: {
|
|
437
|
-
isEdit: boolean;
|
|
438
|
-
description: string;
|
|
439
|
-
run: (d: any, req: any) => string;
|
|
440
|
-
};
|
|
441
|
-
yearsAgo: {
|
|
442
|
-
isEdit: boolean;
|
|
443
|
-
description: string;
|
|
444
|
-
run: (d: any, req: any) => string;
|
|
445
|
-
};
|
|
446
|
-
edit: {
|
|
447
|
-
isEdit: boolean;
|
|
448
|
-
blockDisplay: boolean;
|
|
449
|
-
description: string;
|
|
450
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
451
|
-
};
|
|
452
|
-
editDay: {
|
|
453
|
-
isEdit: boolean;
|
|
454
|
-
blockDisplay: boolean;
|
|
455
|
-
description: string;
|
|
456
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
presets: {
|
|
460
|
-
Now: () => Date;
|
|
461
|
-
};
|
|
462
|
-
read: (v: object, attrs: object) => object;
|
|
463
|
-
validate: () => boolean;
|
|
464
464
|
} | {
|
|
465
465
|
name: string;
|
|
466
466
|
sql_name: string;
|
|
@@ -597,103 +597,45 @@ export const types: ({
|
|
|
597
597
|
export const viewtemplates: ({
|
|
598
598
|
name: string;
|
|
599
599
|
description: string;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
rows_per_page?: number | undefined;
|
|
610
|
-
hide_pagination: boolean;
|
|
611
|
-
create_view_label?: string | undefined;
|
|
612
|
-
create_view_location?: string | undefined;
|
|
613
|
-
always_create_view: boolean;
|
|
614
|
-
cols: any;
|
|
615
|
-
}, state: object, extraArgs: any, { countRowsQuery }: {
|
|
616
|
-
countRowsQuery: any;
|
|
617
|
-
}) => Promise<div>;
|
|
618
|
-
get_state_fields: (table_id: number, viewname: any, { show_view }: {
|
|
619
|
-
show_view: any;
|
|
620
|
-
}) => Promise<import("../models/field")>;
|
|
600
|
+
get_state_fields: () => object[];
|
|
601
|
+
configuration_workflow: () => import("../models/workflow");
|
|
602
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
603
|
+
columns: object[];
|
|
604
|
+
layout: object;
|
|
605
|
+
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
606
|
+
distinctValuesQuery: any;
|
|
607
|
+
}) => Promise<Layout>;
|
|
608
|
+
initial_config: () => Promise<object>;
|
|
621
609
|
display_state_form: boolean;
|
|
622
|
-
getStringsForI18n({
|
|
623
|
-
|
|
624
|
-
}): string[]
|
|
625
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
626
|
-
table_id: any;
|
|
627
|
-
viewname: any;
|
|
628
|
-
configuration: {
|
|
629
|
-
columns: any;
|
|
630
|
-
default_state: any;
|
|
631
|
-
};
|
|
632
|
-
req: any;
|
|
633
|
-
}) => {
|
|
634
|
-
countRowsQuery(state: any): Promise<number>;
|
|
635
|
-
};
|
|
636
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
637
|
-
} | {
|
|
638
|
-
name: string;
|
|
639
|
-
description: string;
|
|
640
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
641
|
-
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, }: {
|
|
642
|
-
columns: object[];
|
|
643
|
-
view_to_create?: string | undefined;
|
|
644
|
-
create_view_display: string;
|
|
645
|
-
create_view_label?: string | undefined;
|
|
646
|
-
default_state?: object | undefined;
|
|
647
|
-
create_view_location?: string | undefined;
|
|
648
|
-
}, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
|
|
649
|
-
listQuery: any;
|
|
650
|
-
}) => Promise<any>;
|
|
651
|
-
view_quantity: string;
|
|
652
|
-
get_state_fields: (table_id: string, viewname: any, { columns }: {
|
|
653
|
-
columns: object[];
|
|
654
|
-
}) => Function;
|
|
655
|
-
initial_config: Function;
|
|
656
|
-
on_delete: (table_id: any, viewname: string, { default_state }: {
|
|
657
|
-
default_state: any;
|
|
658
|
-
}) => Promise<void>;
|
|
610
|
+
getStringsForI18n({ layout }: {
|
|
611
|
+
layout: any;
|
|
612
|
+
}): string[];
|
|
659
613
|
routes: {
|
|
660
|
-
run_action: (table_id:
|
|
661
|
-
|
|
662
|
-
layout: any;
|
|
663
|
-
}, body: object, { req, res }: {
|
|
664
|
-
req: object;
|
|
614
|
+
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
615
|
+
req: any;
|
|
665
616
|
res: any;
|
|
666
|
-
}, {
|
|
667
|
-
|
|
668
|
-
}) => Promise<
|
|
617
|
+
}, { actionQuery }: {
|
|
618
|
+
actionQuery: any;
|
|
619
|
+
}) => Promise<any>;
|
|
669
620
|
};
|
|
670
|
-
|
|
671
|
-
default_state_form: ({ default_state }: object) => boolean;
|
|
672
|
-
getStringsForI18n({ columns, create_view_label }: {
|
|
673
|
-
columns: any;
|
|
674
|
-
create_view_label: any;
|
|
675
|
-
}): string[];
|
|
676
|
-
queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
|
|
621
|
+
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
677
622
|
table_id: any;
|
|
678
|
-
|
|
679
|
-
name: any;
|
|
623
|
+
viewname: any;
|
|
680
624
|
configuration: {
|
|
681
625
|
columns: any;
|
|
682
|
-
default_state: any;
|
|
683
626
|
};
|
|
684
627
|
req: any;
|
|
628
|
+
res: any;
|
|
629
|
+
exttable_name: any;
|
|
685
630
|
}) => {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
631
|
+
actionQuery(state: any, rndid: any): Promise<{
|
|
632
|
+
json: any;
|
|
633
|
+
}>;
|
|
634
|
+
distinctValuesQuery(state: any): Promise<{
|
|
635
|
+
distinct_values: {};
|
|
636
|
+
role: any;
|
|
689
637
|
}>;
|
|
690
|
-
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
691
638
|
};
|
|
692
|
-
configCheck: (view: any) => Promise<{
|
|
693
|
-
errors: string[];
|
|
694
|
-
warnings: string[];
|
|
695
|
-
}>;
|
|
696
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
697
639
|
} | {
|
|
698
640
|
name: string;
|
|
699
641
|
description: string;
|
|
@@ -843,6 +785,146 @@ export const viewtemplates: ({
|
|
|
843
785
|
warnings: string[];
|
|
844
786
|
}>;
|
|
845
787
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
788
|
+
} | {
|
|
789
|
+
name: string;
|
|
790
|
+
description: string;
|
|
791
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
792
|
+
run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
793
|
+
participant_field: string;
|
|
794
|
+
msg_relation: string;
|
|
795
|
+
msgsender_field: any;
|
|
796
|
+
msgview: string;
|
|
797
|
+
msgform: string;
|
|
798
|
+
participant_maxread_field: string;
|
|
799
|
+
}, state: object, { req, res }: {
|
|
800
|
+
req: object;
|
|
801
|
+
res: object;
|
|
802
|
+
}, { getRowQuery, updateQuery, optionsQuery }: {
|
|
803
|
+
getRowQuery: any;
|
|
804
|
+
updateQuery: any;
|
|
805
|
+
optionsQuery: any;
|
|
806
|
+
}) => Promise<div>;
|
|
807
|
+
get_state_fields: () => object[];
|
|
808
|
+
display_state_form: boolean;
|
|
809
|
+
routes: {
|
|
810
|
+
submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
811
|
+
participant_field: string;
|
|
812
|
+
msg_relation: string;
|
|
813
|
+
msgsender_field: any;
|
|
814
|
+
msgview: string;
|
|
815
|
+
msgform: string;
|
|
816
|
+
participant_maxread_field: string;
|
|
817
|
+
}, body: any, { req, res }: {
|
|
818
|
+
req: object;
|
|
819
|
+
res: object;
|
|
820
|
+
}, { submitAjaxQuery }: {
|
|
821
|
+
submitAjaxQuery: any;
|
|
822
|
+
}) => Promise<object>;
|
|
823
|
+
ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
|
|
824
|
+
participant_field: string;
|
|
825
|
+
participant_maxread_field: string;
|
|
826
|
+
}, body: any, { req, res }: {
|
|
827
|
+
req: object;
|
|
828
|
+
res: object;
|
|
829
|
+
}, { ackReadQuery }: {
|
|
830
|
+
ackReadQuery: any;
|
|
831
|
+
}) => Promise<void>;
|
|
832
|
+
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>;
|
|
833
|
+
};
|
|
834
|
+
noAutoTest: boolean;
|
|
835
|
+
authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
|
|
836
|
+
participant_field: object;
|
|
837
|
+
}, room_id: string, user: object) => Promise<object>;
|
|
838
|
+
virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
839
|
+
participant_field: any;
|
|
840
|
+
msg_relation: string;
|
|
841
|
+
msgsender_field: string;
|
|
842
|
+
msgview: string;
|
|
843
|
+
msgform: any;
|
|
844
|
+
participant_maxread_field: any;
|
|
845
|
+
}) => object[];
|
|
846
|
+
getStringsForI18n(): object[];
|
|
847
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
848
|
+
table_id: any;
|
|
849
|
+
viewname: any;
|
|
850
|
+
configuration: {
|
|
851
|
+
columns: any;
|
|
852
|
+
default_state: any;
|
|
853
|
+
};
|
|
854
|
+
req: any;
|
|
855
|
+
}) => {
|
|
856
|
+
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>;
|
|
857
|
+
updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
|
|
858
|
+
submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
|
|
859
|
+
json: {
|
|
860
|
+
msgid: {
|
|
861
|
+
error: string;
|
|
862
|
+
} | {
|
|
863
|
+
success: any;
|
|
864
|
+
};
|
|
865
|
+
error?: undefined;
|
|
866
|
+
};
|
|
867
|
+
} | {
|
|
868
|
+
json: {
|
|
869
|
+
error: any;
|
|
870
|
+
msgid?: undefined;
|
|
871
|
+
};
|
|
872
|
+
}>;
|
|
873
|
+
ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
|
|
874
|
+
json: {
|
|
875
|
+
error: string;
|
|
876
|
+
success?: undefined;
|
|
877
|
+
};
|
|
878
|
+
} | {
|
|
879
|
+
json: {
|
|
880
|
+
success: string;
|
|
881
|
+
error?: undefined;
|
|
882
|
+
};
|
|
883
|
+
}>;
|
|
884
|
+
fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
885
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
886
|
+
};
|
|
887
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
888
|
+
} | {
|
|
889
|
+
name: string;
|
|
890
|
+
description: string;
|
|
891
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
892
|
+
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 }: {
|
|
893
|
+
show_view: string;
|
|
894
|
+
order_field: name;
|
|
895
|
+
descending: boolean;
|
|
896
|
+
view_to_create?: string | undefined;
|
|
897
|
+
create_view_display: string;
|
|
898
|
+
in_card: boolean;
|
|
899
|
+
masonry_columns: string;
|
|
900
|
+
rows_per_page?: number | undefined;
|
|
901
|
+
hide_pagination: boolean;
|
|
902
|
+
create_view_label?: string | undefined;
|
|
903
|
+
create_view_location?: string | undefined;
|
|
904
|
+
always_create_view: boolean;
|
|
905
|
+
cols: any;
|
|
906
|
+
}, state: object, extraArgs: any, { countRowsQuery }: {
|
|
907
|
+
countRowsQuery: any;
|
|
908
|
+
}) => Promise<div>;
|
|
909
|
+
get_state_fields: (table_id: number, viewname: any, { show_view }: {
|
|
910
|
+
show_view: any;
|
|
911
|
+
}) => Promise<import("../models/field")>;
|
|
912
|
+
display_state_form: boolean;
|
|
913
|
+
getStringsForI18n({ create_view_label }: {
|
|
914
|
+
create_view_label: any;
|
|
915
|
+
}): string[] | Object[];
|
|
916
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
917
|
+
table_id: any;
|
|
918
|
+
viewname: any;
|
|
919
|
+
configuration: {
|
|
920
|
+
columns: any;
|
|
921
|
+
default_state: any;
|
|
922
|
+
};
|
|
923
|
+
req: any;
|
|
924
|
+
}) => {
|
|
925
|
+
countRowsQuery(state: any): Promise<number>;
|
|
926
|
+
};
|
|
927
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
846
928
|
} | {
|
|
847
929
|
name: string;
|
|
848
930
|
description: string;
|
|
@@ -917,6 +999,66 @@ export const viewtemplates: ({
|
|
|
917
999
|
warnings: string[];
|
|
918
1000
|
}>;
|
|
919
1001
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1002
|
+
} | {
|
|
1003
|
+
name: string;
|
|
1004
|
+
description: string;
|
|
1005
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1006
|
+
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, }: {
|
|
1007
|
+
columns: object[];
|
|
1008
|
+
view_to_create?: string | undefined;
|
|
1009
|
+
create_view_display: string;
|
|
1010
|
+
create_view_label?: string | undefined;
|
|
1011
|
+
default_state?: object | undefined;
|
|
1012
|
+
create_view_location?: string | undefined;
|
|
1013
|
+
}, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
|
|
1014
|
+
listQuery: any;
|
|
1015
|
+
}) => Promise<any>;
|
|
1016
|
+
view_quantity: string;
|
|
1017
|
+
get_state_fields: (table_id: string, viewname: any, { columns }: {
|
|
1018
|
+
columns: object[];
|
|
1019
|
+
}) => Function;
|
|
1020
|
+
initial_config: Function;
|
|
1021
|
+
on_delete: (table_id: any, viewname: string, { default_state }: {
|
|
1022
|
+
default_state: any;
|
|
1023
|
+
}) => Promise<void>;
|
|
1024
|
+
routes: {
|
|
1025
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1026
|
+
columns: object[];
|
|
1027
|
+
layout: any;
|
|
1028
|
+
}, body: object, { req, res }: {
|
|
1029
|
+
req: object;
|
|
1030
|
+
res: any;
|
|
1031
|
+
}, { getRowQuery }: {
|
|
1032
|
+
getRowQuery: any;
|
|
1033
|
+
}) => Promise<object>;
|
|
1034
|
+
};
|
|
1035
|
+
display_state_form: (opts: object) => boolean;
|
|
1036
|
+
default_state_form: ({ default_state }: object) => boolean;
|
|
1037
|
+
getStringsForI18n({ columns, create_view_label }: {
|
|
1038
|
+
columns: any;
|
|
1039
|
+
create_view_label: any;
|
|
1040
|
+
}): string[];
|
|
1041
|
+
queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
|
|
1042
|
+
table_id: any;
|
|
1043
|
+
exttable_name: any;
|
|
1044
|
+
name: any;
|
|
1045
|
+
configuration: {
|
|
1046
|
+
columns: any;
|
|
1047
|
+
default_state: any;
|
|
1048
|
+
};
|
|
1049
|
+
req: any;
|
|
1050
|
+
}) => {
|
|
1051
|
+
listQuery(state: any, stateHash: any): Promise<{
|
|
1052
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1053
|
+
rowCount: number;
|
|
1054
|
+
}>;
|
|
1055
|
+
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1056
|
+
};
|
|
1057
|
+
configCheck: (view: any) => Promise<{
|
|
1058
|
+
errors: string[];
|
|
1059
|
+
warnings: string[];
|
|
1060
|
+
}>;
|
|
1061
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
920
1062
|
} | {
|
|
921
1063
|
name: string;
|
|
922
1064
|
description: string;
|
|
@@ -953,148 +1095,6 @@ export const viewtemplates: ({
|
|
|
953
1095
|
}) => Promise<{
|
|
954
1096
|
embeddedViews: import("../models/view")[];
|
|
955
1097
|
}>;
|
|
956
|
-
} | {
|
|
957
|
-
name: string;
|
|
958
|
-
description: string;
|
|
959
|
-
get_state_fields: () => object[];
|
|
960
|
-
configuration_workflow: () => import("../models/workflow");
|
|
961
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
962
|
-
columns: object[];
|
|
963
|
-
layout: object;
|
|
964
|
-
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
965
|
-
distinctValuesQuery: any;
|
|
966
|
-
}) => Promise<Layout>;
|
|
967
|
-
initial_config: () => Promise<object>;
|
|
968
|
-
display_state_form: boolean;
|
|
969
|
-
getStringsForI18n({ layout }: {
|
|
970
|
-
layout: any;
|
|
971
|
-
}): string[];
|
|
972
|
-
routes: {
|
|
973
|
-
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
974
|
-
req: any;
|
|
975
|
-
res: any;
|
|
976
|
-
}, { actionQuery }: {
|
|
977
|
-
actionQuery: any;
|
|
978
|
-
}) => Promise<any>;
|
|
979
|
-
};
|
|
980
|
-
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
981
|
-
table_id: any;
|
|
982
|
-
viewname: any;
|
|
983
|
-
configuration: {
|
|
984
|
-
columns: any;
|
|
985
|
-
};
|
|
986
|
-
req: any;
|
|
987
|
-
res: any;
|
|
988
|
-
exttable_name: any;
|
|
989
|
-
}) => {
|
|
990
|
-
actionQuery(state: any, rndid: any): Promise<{
|
|
991
|
-
json: any;
|
|
992
|
-
}>;
|
|
993
|
-
distinctValuesQuery(state: any): Promise<{
|
|
994
|
-
distinct_values: {};
|
|
995
|
-
role: any;
|
|
996
|
-
}>;
|
|
997
|
-
};
|
|
998
|
-
} | {
|
|
999
|
-
name: string;
|
|
1000
|
-
description: string;
|
|
1001
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1002
|
-
run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1003
|
-
participant_field: string;
|
|
1004
|
-
msg_relation: string;
|
|
1005
|
-
msgsender_field: any;
|
|
1006
|
-
msgview: string;
|
|
1007
|
-
msgform: string;
|
|
1008
|
-
participant_maxread_field: string;
|
|
1009
|
-
}, state: object, { req, res }: {
|
|
1010
|
-
req: object;
|
|
1011
|
-
res: object;
|
|
1012
|
-
}, { getRowQuery, updateQuery, optionsQuery }: {
|
|
1013
|
-
getRowQuery: any;
|
|
1014
|
-
updateQuery: any;
|
|
1015
|
-
optionsQuery: any;
|
|
1016
|
-
}) => Promise<div>;
|
|
1017
|
-
get_state_fields: () => object[];
|
|
1018
|
-
display_state_form: boolean;
|
|
1019
|
-
routes: {
|
|
1020
|
-
submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1021
|
-
participant_field: string;
|
|
1022
|
-
msg_relation: string;
|
|
1023
|
-
msgsender_field: any;
|
|
1024
|
-
msgview: string;
|
|
1025
|
-
msgform: string;
|
|
1026
|
-
participant_maxread_field: string;
|
|
1027
|
-
}, body: any, { req, res }: {
|
|
1028
|
-
req: object;
|
|
1029
|
-
res: object;
|
|
1030
|
-
}, { submitAjaxQuery }: {
|
|
1031
|
-
submitAjaxQuery: any;
|
|
1032
|
-
}) => Promise<object>;
|
|
1033
|
-
ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
|
|
1034
|
-
participant_field: string;
|
|
1035
|
-
participant_maxread_field: string;
|
|
1036
|
-
}, body: any, { req, res }: {
|
|
1037
|
-
req: object;
|
|
1038
|
-
res: object;
|
|
1039
|
-
}, { ackReadQuery }: {
|
|
1040
|
-
ackReadQuery: any;
|
|
1041
|
-
}) => Promise<void>;
|
|
1042
|
-
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>;
|
|
1043
|
-
};
|
|
1044
|
-
noAutoTest: boolean;
|
|
1045
|
-
authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
|
|
1046
|
-
participant_field: object;
|
|
1047
|
-
}, room_id: string, user: object) => Promise<object>;
|
|
1048
|
-
virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1049
|
-
participant_field: any;
|
|
1050
|
-
msg_relation: string;
|
|
1051
|
-
msgsender_field: string;
|
|
1052
|
-
msgview: string;
|
|
1053
|
-
msgform: any;
|
|
1054
|
-
participant_maxread_field: any;
|
|
1055
|
-
}) => object[];
|
|
1056
|
-
getStringsForI18n(): object[];
|
|
1057
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1058
|
-
table_id: any;
|
|
1059
|
-
viewname: any;
|
|
1060
|
-
configuration: {
|
|
1061
|
-
columns: any;
|
|
1062
|
-
default_state: any;
|
|
1063
|
-
};
|
|
1064
|
-
req: any;
|
|
1065
|
-
}) => {
|
|
1066
|
-
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>;
|
|
1067
|
-
updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
|
|
1068
|
-
submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
|
|
1069
|
-
json: {
|
|
1070
|
-
msgid: {
|
|
1071
|
-
error: string;
|
|
1072
|
-
} | {
|
|
1073
|
-
success: any;
|
|
1074
|
-
};
|
|
1075
|
-
error?: undefined;
|
|
1076
|
-
};
|
|
1077
|
-
} | {
|
|
1078
|
-
json: {
|
|
1079
|
-
error: any;
|
|
1080
|
-
msgid?: undefined;
|
|
1081
|
-
};
|
|
1082
|
-
}>;
|
|
1083
|
-
ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
|
|
1084
|
-
json: {
|
|
1085
|
-
error: string;
|
|
1086
|
-
success?: undefined;
|
|
1087
|
-
};
|
|
1088
|
-
} | {
|
|
1089
|
-
json: {
|
|
1090
|
-
success: string;
|
|
1091
|
-
error?: undefined;
|
|
1092
|
-
};
|
|
1093
|
-
}>;
|
|
1094
|
-
fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1095
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
1096
|
-
};
|
|
1097
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1098
1098
|
})[];
|
|
1099
1099
|
import fileviews = require("./fileviews");
|
|
1100
1100
|
import actions = require("./actions");
|