-
Notifications
You must be signed in to change notification settings - Fork 2
/
DialogApi.ts
143 lines (110 loc) · 4.48 KB
/
DialogApi.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import {ClientListener} from "../client/ClientListener";
import { StreamProducer } from '../io/StreamProducer';
import {
ActionParameters,
Attachment, AvailableValuesParameters,
Dialog,
EditorDialog,
LargeProperty,
Login,
Menu,
QueryParameters,
ReadLargePropertyParameters,
Record,
RecordSet,
Redirection,
Session, SideEffectsParameters, SideEffectsResponse,
View,
ViewDescriptor,
ViewMode,
Workbench,
WorkbenchAction,
WriteLargePropertyParameters
} from '../models';
import {CvLocale} from "../util";
export interface DialogApi {
lastServiceActivity: Date;
addAttachment(tenantId: string, sessionId: string, dialogId: string, attachment: Attachment): Promise<void>;
addClientListener(clientListener:ClientListener, locale:CvLocale);
removeClientListener(clientListener:ClientListener);
createSession(tenantId: string, login: Login): Promise<Session | Redirection>;
getSession(tenantId: string, sessionId: string): Promise<Session>;
deleteSession(tenantId: string, sessionId: string): Promise<{ sessionId: string }>;
getContent(
tenantId: string,
sessionId: string,
contentId: string,
readLargePropertyParams: ReadLargePropertyParameters
): Promise<LargeProperty>;
getWorkbenches(tenantId: string, sessionId: string): Promise<Array<Workbench>>;
getWorkbench(tenantId: string, sessionId: string, workbenchId: string): Promise<Workbench>;
getDialog(tenantId: string, sessionId: string, dialogId: string): Promise<Dialog>;
deleteDialog(tenantId: string, sessionId: string, dialogId: string): Promise<{ dialogId: string }>;
getActions(tenantId: string, sessionId: string, dialogId: string): Promise<Array<Menu>>;
isAnyUserInBriefcaseMode(tenantId: string): Promise<boolean>;
isUserInBriefcaseMode(userInfo:{}): Promise<boolean>;
performAction(
tenantId: string,
sessionId: string,
dialogId: string,
actionId: string,
actionParameters: ActionParameters
): Promise<Redirection>;
getWorkbenchActions(tenantId: string, sessionId: string, workbenchId: string): Promise<Array<WorkbenchAction>>;
performWorkbenchAction(
tenantId: string,
sessionId: string,
workbenchId: string,
actionId: string
): Promise<Redirection>;
getRedirection(tenantId: string, sessionId: string, redirectionId: string): Promise<Redirection>;
getRecord(tenantId: string, sessionId: string, dialogId: string): Promise<Record>;
getEditorProperty(
tenantId: string,
sessionId: string,
dialogId: string,
propertyName: string,
readLargePropertyParams: ReadLargePropertyParameters
): Promise<LargeProperty>;
getQueryProperty(
tenantId: string,
sessionId: string,
dialogId: string,
propertyName: string,
readLargePropertyParams: ReadLargePropertyParameters
): Promise<LargeProperty>;
writeProperty(
tenantId: string,
sessionId: string,
dialogId: string,
propertyName: string,
writeLargePropertyParams: WriteLargePropertyParameters
): Promise<{ propertyName: string }>;
propertyChange(
tenantId: string,
sessionId: string,
dialogId: string,
propertyName: string,
sideEffectsParams: SideEffectsParameters
): Promise<SideEffectsResponse>;
putRecord(tenantId: string, sessionId: string, dialogId: string, record: Record): Promise<EditorDialog | Redirection>;
getRecords(tenantId: string, sessionId: string, dialogId: string, queryParams: QueryParameters): Promise<RecordSet>;
getAvailableValues(
tenantId: string,
sessionId: string,
dialogId: string,
propertyName: string,
availableValuesParams: AvailableValuesParameters,
): Promise<Array<any>>;
getMode(tenantId: string, sessionId: string, dialogId: string): Promise<ViewMode>;
changeMode(
tenantId: string,
sessionId: string,
dialogId: string,
mode: ViewMode
): Promise<EditorDialog | Redirection>;
getView(tenantId: string, sessionId: string, dialogId: string): Promise<View>;
changeView(tenantId: string, sessionId: string, dialogId: string, viewId: string): Promise<Dialog>;
getViews(tenantId: string, sessionId: string, dialogId: string): Promise<Array<ViewDescriptor>>;
streamUrl(tentantId: string, sessionId: string, url: string): Promise<StreamProducer>;
}