1 | import type { Except } from 'type-fest';
|
2 | import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types';
|
3 | import type { ParameterDefinition } from './widget-parameters';
|
4 | type AppActionSys = Except<BasicMetaSysProps, 'version'> & {
|
5 | appDefinition: SysLink;
|
6 | organization: SysLink;
|
7 | };
|
8 | export type AppActionParameterDefinition = Omit<ParameterDefinition, 'labels'>;
|
9 | export type AppActionCategoryProps = {
|
10 | sys: {
|
11 | id: AppActionCategoryType;
|
12 | type: 'AppActionCategory';
|
13 | version: string;
|
14 | };
|
15 | name: string;
|
16 | description: string;
|
17 | parameters?: AppActionParameterDefinition[];
|
18 | };
|
19 | type BuiltInCategoriesProps = {
|
20 | |
21 |
|
22 |
|
23 | category: 'Entries.v1.0' | 'Notification.v1.0';
|
24 | };
|
25 | type CustomAppActionProps = {
|
26 | |
27 |
|
28 |
|
29 | category: 'Custom';
|
30 | parameters: AppActionParameterDefinition[];
|
31 | };
|
32 | type AppActionCategory = BuiltInCategoriesProps | CustomAppActionProps;
|
33 | export type AppActionCategoryType = AppActionCategory['category'];
|
34 | export type AppActionType = 'endpoint' | 'function' | 'function-invocation';
|
35 | export type CreateAppActionProps = AppActionCategory & {
|
36 | url: string;
|
37 | name: string;
|
38 | description?: string;
|
39 | type?: AppActionType;
|
40 | };
|
41 | export type AppActionProps = AppActionCategory & {
|
42 | |
43 |
|
44 |
|
45 | sys: AppActionSys;
|
46 | |
47 |
|
48 |
|
49 | url: string;
|
50 | |
51 |
|
52 |
|
53 | name: string;
|
54 | |
55 |
|
56 |
|
57 | description?: string;
|
58 | |
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | type?: AppActionType;
|
65 | };
|
66 | export type AppAction = AppActionProps & DefaultElements<AppActionProps> & {
|
67 | |
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | delete(): Promise<void>;
|
85 | };
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 | export declare function wrapAppAction(makeRequest: MakeRequest, data: AppActionProps): AppAction;
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | export declare const wrapAppActionCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<AppActionProps>) => import("../common-types").Collection<AppAction, AppActionProps>;
|
100 | export {};
|