UNPKG

160 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', { value: true });
4
5// To parse this data:
6//
7// import { Convert, AgentErrorResponseMessage, AgentRequestMessage, AgentResponseMessage, BridgeErrorResponseMessage, BridgeRequestMessage, BridgeResponseMessage, BroadcastAgentRequest, BroadcastBridgeRequest, ConnectionStepMessage, ConnectionStep2Hello, ConnectionStep3Handshake, ConnectionStep4AuthenticationFailed, ConnectionStep6ConnectedAgentsUpdate, FindInstancesAgentErrorResponse, FindInstancesAgentRequest, FindInstancesAgentResponse, FindInstancesBridgeErrorResponse, FindInstancesBridgeRequest, FindInstancesBridgeResponse, FindIntentAgentErrorResponse, FindIntentAgentRequest, FindIntentAgentResponse, FindIntentBridgeErrorResponse, FindIntentBridgeRequest, FindIntentBridgeResponse, FindIntentsByContextAgentErrorResponse, FindIntentsByContextAgentRequest, FindIntentsByContextAgentResponse, FindIntentsByContextBridgeErrorResponse, FindIntentsByContextBridgeRequest, FindIntentsByContextBridgeResponse, GetAppMetadataAgentErrorResponse, GetAppMetadataAgentRequest, GetAppMetadataAgentResponse, GetAppMetadataBridgeErrorResponse, GetAppMetadataBridgeRequest, GetAppMetadataBridgeResponse, OpenAgentErrorResponse, OpenAgentRequest, OpenAgentResponse, OpenBridgeErrorResponse, OpenBridgeRequest, OpenBridgeResponse, PrivateChannelBroadcastAgentRequest, PrivateChannelBroadcastBridgeRequest, PrivateChannelEventListenerAddedAgentRequest, PrivateChannelEventListenerAddedBridgeRequest, PrivateChannelEventListenerRemovedAgentRequest, PrivateChannelEventListenerRemovedBridgeRequest, PrivateChannelOnAddContextListenerAgentRequest, PrivateChannelOnAddContextListenerBridgeRequest, PrivateChannelOnDisconnectAgentRequest, PrivateChannelOnDisconnectBridgeRequest, PrivateChannelOnUnsubscribeAgentRequest, PrivateChannelOnUnsubscribeBridgeRequest, RaiseIntentAgentErrorResponse, RaiseIntentAgentRequest, RaiseIntentAgentResponse, RaiseIntentBridgeErrorResponse, RaiseIntentBridgeRequest, RaiseIntentBridgeResponse, RaiseIntentResultAgentErrorResponse, RaiseIntentResultAgentResponse, RaiseIntentResultBridgeErrorResponse, RaiseIntentResultBridgeResponse } from "./file";
8//
9// const agentErrorResponseMessage = Convert.toAgentErrorResponseMessage(json);
10// const agentRequestMessage = Convert.toAgentRequestMessage(json);
11// const agentResponseMessage = Convert.toAgentResponseMessage(json);
12// const bridgeErrorResponseMessage = Convert.toBridgeErrorResponseMessage(json);
13// const bridgeRequestMessage = Convert.toBridgeRequestMessage(json);
14// const bridgeResponseMessage = Convert.toBridgeResponseMessage(json);
15// const broadcastAgentRequest = Convert.toBroadcastAgentRequest(json);
16// const broadcastBridgeRequest = Convert.toBroadcastBridgeRequest(json);
17// const bridgeCommonDefinitions = Convert.toBridgeCommonDefinitions(json);
18// const connectionStepMessage = Convert.toConnectionStepMessage(json);
19// const connectionStep2Hello = Convert.toConnectionStep2Hello(json);
20// const connectionStep3Handshake = Convert.toConnectionStep3Handshake(json);
21// const connectionStep4AuthenticationFailed = Convert.toConnectionStep4AuthenticationFailed(json);
22// const connectionStep6ConnectedAgentsUpdate = Convert.toConnectionStep6ConnectedAgentsUpdate(json);
23// const findInstancesAgentErrorResponse = Convert.toFindInstancesAgentErrorResponse(json);
24// const findInstancesAgentRequest = Convert.toFindInstancesAgentRequest(json);
25// const findInstancesAgentResponse = Convert.toFindInstancesAgentResponse(json);
26// const findInstancesBridgeErrorResponse = Convert.toFindInstancesBridgeErrorResponse(json);
27// const findInstancesBridgeRequest = Convert.toFindInstancesBridgeRequest(json);
28// const findInstancesBridgeResponse = Convert.toFindInstancesBridgeResponse(json);
29// const findIntentAgentErrorResponse = Convert.toFindIntentAgentErrorResponse(json);
30// const findIntentAgentRequest = Convert.toFindIntentAgentRequest(json);
31// const findIntentAgentResponse = Convert.toFindIntentAgentResponse(json);
32// const findIntentBridgeErrorResponse = Convert.toFindIntentBridgeErrorResponse(json);
33// const findIntentBridgeRequest = Convert.toFindIntentBridgeRequest(json);
34// const findIntentBridgeResponse = Convert.toFindIntentBridgeResponse(json);
35// const findIntentsByContextAgentErrorResponse = Convert.toFindIntentsByContextAgentErrorResponse(json);
36// const findIntentsByContextAgentRequest = Convert.toFindIntentsByContextAgentRequest(json);
37// const findIntentsByContextAgentResponse = Convert.toFindIntentsByContextAgentResponse(json);
38// const findIntentsByContextBridgeErrorResponse = Convert.toFindIntentsByContextBridgeErrorResponse(json);
39// const findIntentsByContextBridgeRequest = Convert.toFindIntentsByContextBridgeRequest(json);
40// const findIntentsByContextBridgeResponse = Convert.toFindIntentsByContextBridgeResponse(json);
41// const getAppMetadataAgentErrorResponse = Convert.toGetAppMetadataAgentErrorResponse(json);
42// const getAppMetadataAgentRequest = Convert.toGetAppMetadataAgentRequest(json);
43// const getAppMetadataAgentResponse = Convert.toGetAppMetadataAgentResponse(json);
44// const getAppMetadataBridgeErrorResponse = Convert.toGetAppMetadataBridgeErrorResponse(json);
45// const getAppMetadataBridgeRequest = Convert.toGetAppMetadataBridgeRequest(json);
46// const getAppMetadataBridgeResponse = Convert.toGetAppMetadataBridgeResponse(json);
47// const openAgentErrorResponse = Convert.toOpenAgentErrorResponse(json);
48// const openAgentRequest = Convert.toOpenAgentRequest(json);
49// const openAgentResponse = Convert.toOpenAgentResponse(json);
50// const openBridgeErrorResponse = Convert.toOpenBridgeErrorResponse(json);
51// const openBridgeRequest = Convert.toOpenBridgeRequest(json);
52// const openBridgeResponse = Convert.toOpenBridgeResponse(json);
53// const privateChannelBroadcastAgentRequest = Convert.toPrivateChannelBroadcastAgentRequest(json);
54// const privateChannelBroadcastBridgeRequest = Convert.toPrivateChannelBroadcastBridgeRequest(json);
55// const privateChannelEventListenerAddedAgentRequest = Convert.toPrivateChannelEventListenerAddedAgentRequest(json);
56// const privateChannelEventListenerAddedBridgeRequest = Convert.toPrivateChannelEventListenerAddedBridgeRequest(json);
57// const privateChannelEventListenerRemovedAgentRequest = Convert.toPrivateChannelEventListenerRemovedAgentRequest(json);
58// const privateChannelEventListenerRemovedBridgeRequest = Convert.toPrivateChannelEventListenerRemovedBridgeRequest(json);
59// const privateChannelOnAddContextListenerAgentRequest = Convert.toPrivateChannelOnAddContextListenerAgentRequest(json);
60// const privateChannelOnAddContextListenerBridgeRequest = Convert.toPrivateChannelOnAddContextListenerBridgeRequest(json);
61// const privateChannelOnDisconnectAgentRequest = Convert.toPrivateChannelOnDisconnectAgentRequest(json);
62// const privateChannelOnDisconnectBridgeRequest = Convert.toPrivateChannelOnDisconnectBridgeRequest(json);
63// const privateChannelOnUnsubscribeAgentRequest = Convert.toPrivateChannelOnUnsubscribeAgentRequest(json);
64// const privateChannelOnUnsubscribeBridgeRequest = Convert.toPrivateChannelOnUnsubscribeBridgeRequest(json);
65// const raiseIntentAgentErrorResponse = Convert.toRaiseIntentAgentErrorResponse(json);
66// const raiseIntentAgentRequest = Convert.toRaiseIntentAgentRequest(json);
67// const raiseIntentAgentResponse = Convert.toRaiseIntentAgentResponse(json);
68// const raiseIntentBridgeErrorResponse = Convert.toRaiseIntentBridgeErrorResponse(json);
69// const raiseIntentBridgeRequest = Convert.toRaiseIntentBridgeRequest(json);
70// const raiseIntentBridgeResponse = Convert.toRaiseIntentBridgeResponse(json);
71// const raiseIntentResultAgentErrorResponse = Convert.toRaiseIntentResultAgentErrorResponse(json);
72// const raiseIntentResultAgentResponse = Convert.toRaiseIntentResultAgentResponse(json);
73// const raiseIntentResultBridgeErrorResponse = Convert.toRaiseIntentResultBridgeErrorResponse(json);
74// const raiseIntentResultBridgeResponse = Convert.toRaiseIntentResultBridgeResponse(json);
75//
76// These functions will throw an error if the JSON doesn't
77// match the expected interface, even if the JSON is valid.
78// Converts JSON strings to/from your types
79// and asserts the results of JSON.parse at runtime
80var Convert$1 = /** @class */ (function () {
81 function Convert() {
82 }
83 Convert.toAgentErrorResponseMessage = function (json) {
84 return cast$1(JSON.parse(json), r$1("AgentErrorResponseMessage"));
85 };
86 Convert.agentErrorResponseMessageToJson = function (value) {
87 return JSON.stringify(uncast$1(value, r$1("AgentErrorResponseMessage")), null, 2);
88 };
89 Convert.toAgentRequestMessage = function (json) {
90 return cast$1(JSON.parse(json), r$1("AgentRequestMessage"));
91 };
92 Convert.agentRequestMessageToJson = function (value) {
93 return JSON.stringify(uncast$1(value, r$1("AgentRequestMessage")), null, 2);
94 };
95 Convert.toAgentResponseMessage = function (json) {
96 return cast$1(JSON.parse(json), r$1("AgentResponseMessage"));
97 };
98 Convert.agentResponseMessageToJson = function (value) {
99 return JSON.stringify(uncast$1(value, r$1("AgentResponseMessage")), null, 2);
100 };
101 Convert.toBridgeErrorResponseMessage = function (json) {
102 return cast$1(JSON.parse(json), r$1("BridgeErrorResponseMessage"));
103 };
104 Convert.bridgeErrorResponseMessageToJson = function (value) {
105 return JSON.stringify(uncast$1(value, r$1("BridgeErrorResponseMessage")), null, 2);
106 };
107 Convert.toBridgeRequestMessage = function (json) {
108 return cast$1(JSON.parse(json), r$1("BridgeRequestMessage"));
109 };
110 Convert.bridgeRequestMessageToJson = function (value) {
111 return JSON.stringify(uncast$1(value, r$1("BridgeRequestMessage")), null, 2);
112 };
113 Convert.toBridgeResponseMessage = function (json) {
114 return cast$1(JSON.parse(json), r$1("BridgeResponseMessage"));
115 };
116 Convert.bridgeResponseMessageToJson = function (value) {
117 return JSON.stringify(uncast$1(value, r$1("BridgeResponseMessage")), null, 2);
118 };
119 Convert.toBroadcastAgentRequest = function (json) {
120 return cast$1(JSON.parse(json), r$1("BroadcastAgentRequest"));
121 };
122 Convert.broadcastAgentRequestToJson = function (value) {
123 return JSON.stringify(uncast$1(value, r$1("BroadcastAgentRequest")), null, 2);
124 };
125 Convert.toBroadcastBridgeRequest = function (json) {
126 return cast$1(JSON.parse(json), r$1("BroadcastBridgeRequest"));
127 };
128 Convert.broadcastBridgeRequestToJson = function (value) {
129 return JSON.stringify(uncast$1(value, r$1("BroadcastBridgeRequest")), null, 2);
130 };
131 Convert.toBridgeCommonDefinitions = function (json) {
132 return cast$1(JSON.parse(json), m$1("any"));
133 };
134 Convert.bridgeCommonDefinitionsToJson = function (value) {
135 return JSON.stringify(uncast$1(value, m$1("any")), null, 2);
136 };
137 Convert.toConnectionStepMessage = function (json) {
138 return cast$1(JSON.parse(json), r$1("ConnectionStepMessage"));
139 };
140 Convert.connectionStepMessageToJson = function (value) {
141 return JSON.stringify(uncast$1(value, r$1("ConnectionStepMessage")), null, 2);
142 };
143 Convert.toConnectionStep2Hello = function (json) {
144 return cast$1(JSON.parse(json), r$1("ConnectionStep2Hello"));
145 };
146 Convert.connectionStep2HelloToJson = function (value) {
147 return JSON.stringify(uncast$1(value, r$1("ConnectionStep2Hello")), null, 2);
148 };
149 Convert.toConnectionStep3Handshake = function (json) {
150 return cast$1(JSON.parse(json), r$1("ConnectionStep3Handshake"));
151 };
152 Convert.connectionStep3HandshakeToJson = function (value) {
153 return JSON.stringify(uncast$1(value, r$1("ConnectionStep3Handshake")), null, 2);
154 };
155 Convert.toConnectionStep4AuthenticationFailed = function (json) {
156 return cast$1(JSON.parse(json), r$1("ConnectionStep4AuthenticationFailed"));
157 };
158 Convert.connectionStep4AuthenticationFailedToJson = function (value) {
159 return JSON.stringify(uncast$1(value, r$1("ConnectionStep4AuthenticationFailed")), null, 2);
160 };
161 Convert.toConnectionStep6ConnectedAgentsUpdate = function (json) {
162 return cast$1(JSON.parse(json), r$1("ConnectionStep6ConnectedAgentsUpdate"));
163 };
164 Convert.connectionStep6ConnectedAgentsUpdateToJson = function (value) {
165 return JSON.stringify(uncast$1(value, r$1("ConnectionStep6ConnectedAgentsUpdate")), null, 2);
166 };
167 Convert.toFindInstancesAgentErrorResponse = function (json) {
168 return cast$1(JSON.parse(json), r$1("FindInstancesAgentErrorResponse"));
169 };
170 Convert.findInstancesAgentErrorResponseToJson = function (value) {
171 return JSON.stringify(uncast$1(value, r$1("FindInstancesAgentErrorResponse")), null, 2);
172 };
173 Convert.toFindInstancesAgentRequest = function (json) {
174 return cast$1(JSON.parse(json), r$1("FindInstancesAgentRequest"));
175 };
176 Convert.findInstancesAgentRequestToJson = function (value) {
177 return JSON.stringify(uncast$1(value, r$1("FindInstancesAgentRequest")), null, 2);
178 };
179 Convert.toFindInstancesAgentResponse = function (json) {
180 return cast$1(JSON.parse(json), r$1("FindInstancesAgentResponse"));
181 };
182 Convert.findInstancesAgentResponseToJson = function (value) {
183 return JSON.stringify(uncast$1(value, r$1("FindInstancesAgentResponse")), null, 2);
184 };
185 Convert.toFindInstancesBridgeErrorResponse = function (json) {
186 return cast$1(JSON.parse(json), r$1("FindInstancesBridgeErrorResponse"));
187 };
188 Convert.findInstancesBridgeErrorResponseToJson = function (value) {
189 return JSON.stringify(uncast$1(value, r$1("FindInstancesBridgeErrorResponse")), null, 2);
190 };
191 Convert.toFindInstancesBridgeRequest = function (json) {
192 return cast$1(JSON.parse(json), r$1("FindInstancesBridgeRequest"));
193 };
194 Convert.findInstancesBridgeRequestToJson = function (value) {
195 return JSON.stringify(uncast$1(value, r$1("FindInstancesBridgeRequest")), null, 2);
196 };
197 Convert.toFindInstancesBridgeResponse = function (json) {
198 return cast$1(JSON.parse(json), r$1("FindInstancesBridgeResponse"));
199 };
200 Convert.findInstancesBridgeResponseToJson = function (value) {
201 return JSON.stringify(uncast$1(value, r$1("FindInstancesBridgeResponse")), null, 2);
202 };
203 Convert.toFindIntentAgentErrorResponse = function (json) {
204 return cast$1(JSON.parse(json), r$1("FindIntentAgentErrorResponse"));
205 };
206 Convert.findIntentAgentErrorResponseToJson = function (value) {
207 return JSON.stringify(uncast$1(value, r$1("FindIntentAgentErrorResponse")), null, 2);
208 };
209 Convert.toFindIntentAgentRequest = function (json) {
210 return cast$1(JSON.parse(json), r$1("FindIntentAgentRequest"));
211 };
212 Convert.findIntentAgentRequestToJson = function (value) {
213 return JSON.stringify(uncast$1(value, r$1("FindIntentAgentRequest")), null, 2);
214 };
215 Convert.toFindIntentAgentResponse = function (json) {
216 return cast$1(JSON.parse(json), r$1("FindIntentAgentResponse"));
217 };
218 Convert.findIntentAgentResponseToJson = function (value) {
219 return JSON.stringify(uncast$1(value, r$1("FindIntentAgentResponse")), null, 2);
220 };
221 Convert.toFindIntentBridgeErrorResponse = function (json) {
222 return cast$1(JSON.parse(json), r$1("FindIntentBridgeErrorResponse"));
223 };
224 Convert.findIntentBridgeErrorResponseToJson = function (value) {
225 return JSON.stringify(uncast$1(value, r$1("FindIntentBridgeErrorResponse")), null, 2);
226 };
227 Convert.toFindIntentBridgeRequest = function (json) {
228 return cast$1(JSON.parse(json), r$1("FindIntentBridgeRequest"));
229 };
230 Convert.findIntentBridgeRequestToJson = function (value) {
231 return JSON.stringify(uncast$1(value, r$1("FindIntentBridgeRequest")), null, 2);
232 };
233 Convert.toFindIntentBridgeResponse = function (json) {
234 return cast$1(JSON.parse(json), r$1("FindIntentBridgeResponse"));
235 };
236 Convert.findIntentBridgeResponseToJson = function (value) {
237 return JSON.stringify(uncast$1(value, r$1("FindIntentBridgeResponse")), null, 2);
238 };
239 Convert.toFindIntentsByContextAgentErrorResponse = function (json) {
240 return cast$1(JSON.parse(json), r$1("FindIntentsByContextAgentErrorResponse"));
241 };
242 Convert.findIntentsByContextAgentErrorResponseToJson = function (value) {
243 return JSON.stringify(uncast$1(value, r$1("FindIntentsByContextAgentErrorResponse")), null, 2);
244 };
245 Convert.toFindIntentsByContextAgentRequest = function (json) {
246 return cast$1(JSON.parse(json), r$1("FindIntentsByContextAgentRequest"));
247 };
248 Convert.findIntentsByContextAgentRequestToJson = function (value) {
249 return JSON.stringify(uncast$1(value, r$1("FindIntentsByContextAgentRequest")), null, 2);
250 };
251 Convert.toFindIntentsByContextAgentResponse = function (json) {
252 return cast$1(JSON.parse(json), r$1("FindIntentsByContextAgentResponse"));
253 };
254 Convert.findIntentsByContextAgentResponseToJson = function (value) {
255 return JSON.stringify(uncast$1(value, r$1("FindIntentsByContextAgentResponse")), null, 2);
256 };
257 Convert.toFindIntentsByContextBridgeErrorResponse = function (json) {
258 return cast$1(JSON.parse(json), r$1("FindIntentsByContextBridgeErrorResponse"));
259 };
260 Convert.findIntentsByContextBridgeErrorResponseToJson = function (value) {
261 return JSON.stringify(uncast$1(value, r$1("FindIntentsByContextBridgeErrorResponse")), null, 2);
262 };
263 Convert.toFindIntentsByContextBridgeRequest = function (json) {
264 return cast$1(JSON.parse(json), r$1("FindIntentsByContextBridgeRequest"));
265 };
266 Convert.findIntentsByContextBridgeRequestToJson = function (value) {
267 return JSON.stringify(uncast$1(value, r$1("FindIntentsByContextBridgeRequest")), null, 2);
268 };
269 Convert.toFindIntentsByContextBridgeResponse = function (json) {
270 return cast$1(JSON.parse(json), r$1("FindIntentsByContextBridgeResponse"));
271 };
272 Convert.findIntentsByContextBridgeResponseToJson = function (value) {
273 return JSON.stringify(uncast$1(value, r$1("FindIntentsByContextBridgeResponse")), null, 2);
274 };
275 Convert.toGetAppMetadataAgentErrorResponse = function (json) {
276 return cast$1(JSON.parse(json), r$1("GetAppMetadataAgentErrorResponse"));
277 };
278 Convert.getAppMetadataAgentErrorResponseToJson = function (value) {
279 return JSON.stringify(uncast$1(value, r$1("GetAppMetadataAgentErrorResponse")), null, 2);
280 };
281 Convert.toGetAppMetadataAgentRequest = function (json) {
282 return cast$1(JSON.parse(json), r$1("GetAppMetadataAgentRequest"));
283 };
284 Convert.getAppMetadataAgentRequestToJson = function (value) {
285 return JSON.stringify(uncast$1(value, r$1("GetAppMetadataAgentRequest")), null, 2);
286 };
287 Convert.toGetAppMetadataAgentResponse = function (json) {
288 return cast$1(JSON.parse(json), r$1("GetAppMetadataAgentResponse"));
289 };
290 Convert.getAppMetadataAgentResponseToJson = function (value) {
291 return JSON.stringify(uncast$1(value, r$1("GetAppMetadataAgentResponse")), null, 2);
292 };
293 Convert.toGetAppMetadataBridgeErrorResponse = function (json) {
294 return cast$1(JSON.parse(json), r$1("GetAppMetadataBridgeErrorResponse"));
295 };
296 Convert.getAppMetadataBridgeErrorResponseToJson = function (value) {
297 return JSON.stringify(uncast$1(value, r$1("GetAppMetadataBridgeErrorResponse")), null, 2);
298 };
299 Convert.toGetAppMetadataBridgeRequest = function (json) {
300 return cast$1(JSON.parse(json), r$1("GetAppMetadataBridgeRequest"));
301 };
302 Convert.getAppMetadataBridgeRequestToJson = function (value) {
303 return JSON.stringify(uncast$1(value, r$1("GetAppMetadataBridgeRequest")), null, 2);
304 };
305 Convert.toGetAppMetadataBridgeResponse = function (json) {
306 return cast$1(JSON.parse(json), r$1("GetAppMetadataBridgeResponse"));
307 };
308 Convert.getAppMetadataBridgeResponseToJson = function (value) {
309 return JSON.stringify(uncast$1(value, r$1("GetAppMetadataBridgeResponse")), null, 2);
310 };
311 Convert.toOpenAgentErrorResponse = function (json) {
312 return cast$1(JSON.parse(json), r$1("OpenAgentErrorResponse"));
313 };
314 Convert.openAgentErrorResponseToJson = function (value) {
315 return JSON.stringify(uncast$1(value, r$1("OpenAgentErrorResponse")), null, 2);
316 };
317 Convert.toOpenAgentRequest = function (json) {
318 return cast$1(JSON.parse(json), r$1("OpenAgentRequest"));
319 };
320 Convert.openAgentRequestToJson = function (value) {
321 return JSON.stringify(uncast$1(value, r$1("OpenAgentRequest")), null, 2);
322 };
323 Convert.toOpenAgentResponse = function (json) {
324 return cast$1(JSON.parse(json), r$1("OpenAgentResponse"));
325 };
326 Convert.openAgentResponseToJson = function (value) {
327 return JSON.stringify(uncast$1(value, r$1("OpenAgentResponse")), null, 2);
328 };
329 Convert.toOpenBridgeErrorResponse = function (json) {
330 return cast$1(JSON.parse(json), r$1("OpenBridgeErrorResponse"));
331 };
332 Convert.openBridgeErrorResponseToJson = function (value) {
333 return JSON.stringify(uncast$1(value, r$1("OpenBridgeErrorResponse")), null, 2);
334 };
335 Convert.toOpenBridgeRequest = function (json) {
336 return cast$1(JSON.parse(json), r$1("OpenBridgeRequest"));
337 };
338 Convert.openBridgeRequestToJson = function (value) {
339 return JSON.stringify(uncast$1(value, r$1("OpenBridgeRequest")), null, 2);
340 };
341 Convert.toOpenBridgeResponse = function (json) {
342 return cast$1(JSON.parse(json), r$1("OpenBridgeResponse"));
343 };
344 Convert.openBridgeResponseToJson = function (value) {
345 return JSON.stringify(uncast$1(value, r$1("OpenBridgeResponse")), null, 2);
346 };
347 Convert.toPrivateChannelBroadcastAgentRequest = function (json) {
348 return cast$1(JSON.parse(json), r$1("PrivateChannelBroadcastAgentRequest"));
349 };
350 Convert.privateChannelBroadcastAgentRequestToJson = function (value) {
351 return JSON.stringify(uncast$1(value, r$1("PrivateChannelBroadcastAgentRequest")), null, 2);
352 };
353 Convert.toPrivateChannelBroadcastBridgeRequest = function (json) {
354 return cast$1(JSON.parse(json), r$1("PrivateChannelBroadcastBridgeRequest"));
355 };
356 Convert.privateChannelBroadcastBridgeRequestToJson = function (value) {
357 return JSON.stringify(uncast$1(value, r$1("PrivateChannelBroadcastBridgeRequest")), null, 2);
358 };
359 Convert.toPrivateChannelEventListenerAddedAgentRequest = function (json) {
360 return cast$1(JSON.parse(json), r$1("PrivateChannelEventListenerAddedAgentRequest"));
361 };
362 Convert.privateChannelEventListenerAddedAgentRequestToJson = function (value) {
363 return JSON.stringify(uncast$1(value, r$1("PrivateChannelEventListenerAddedAgentRequest")), null, 2);
364 };
365 Convert.toPrivateChannelEventListenerAddedBridgeRequest = function (json) {
366 return cast$1(JSON.parse(json), r$1("PrivateChannelEventListenerAddedBridgeRequest"));
367 };
368 Convert.privateChannelEventListenerAddedBridgeRequestToJson = function (value) {
369 return JSON.stringify(uncast$1(value, r$1("PrivateChannelEventListenerAddedBridgeRequest")), null, 2);
370 };
371 Convert.toPrivateChannelEventListenerRemovedAgentRequest = function (json) {
372 return cast$1(JSON.parse(json), r$1("PrivateChannelEventListenerRemovedAgentRequest"));
373 };
374 Convert.privateChannelEventListenerRemovedAgentRequestToJson = function (value) {
375 return JSON.stringify(uncast$1(value, r$1("PrivateChannelEventListenerRemovedAgentRequest")), null, 2);
376 };
377 Convert.toPrivateChannelEventListenerRemovedBridgeRequest = function (json) {
378 return cast$1(JSON.parse(json), r$1("PrivateChannelEventListenerRemovedBridgeRequest"));
379 };
380 Convert.privateChannelEventListenerRemovedBridgeRequestToJson = function (value) {
381 return JSON.stringify(uncast$1(value, r$1("PrivateChannelEventListenerRemovedBridgeRequest")), null, 2);
382 };
383 Convert.toPrivateChannelOnAddContextListenerAgentRequest = function (json) {
384 return cast$1(JSON.parse(json), r$1("PrivateChannelOnAddContextListenerAgentRequest"));
385 };
386 Convert.privateChannelOnAddContextListenerAgentRequestToJson = function (value) {
387 return JSON.stringify(uncast$1(value, r$1("PrivateChannelOnAddContextListenerAgentRequest")), null, 2);
388 };
389 Convert.toPrivateChannelOnAddContextListenerBridgeRequest = function (json) {
390 return cast$1(JSON.parse(json), r$1("PrivateChannelOnAddContextListenerBridgeRequest"));
391 };
392 Convert.privateChannelOnAddContextListenerBridgeRequestToJson = function (value) {
393 return JSON.stringify(uncast$1(value, r$1("PrivateChannelOnAddContextListenerBridgeRequest")), null, 2);
394 };
395 Convert.toPrivateChannelOnDisconnectAgentRequest = function (json) {
396 return cast$1(JSON.parse(json), r$1("PrivateChannelOnDisconnectAgentRequest"));
397 };
398 Convert.privateChannelOnDisconnectAgentRequestToJson = function (value) {
399 return JSON.stringify(uncast$1(value, r$1("PrivateChannelOnDisconnectAgentRequest")), null, 2);
400 };
401 Convert.toPrivateChannelOnDisconnectBridgeRequest = function (json) {
402 return cast$1(JSON.parse(json), r$1("PrivateChannelOnDisconnectBridgeRequest"));
403 };
404 Convert.privateChannelOnDisconnectBridgeRequestToJson = function (value) {
405 return JSON.stringify(uncast$1(value, r$1("PrivateChannelOnDisconnectBridgeRequest")), null, 2);
406 };
407 Convert.toPrivateChannelOnUnsubscribeAgentRequest = function (json) {
408 return cast$1(JSON.parse(json), r$1("PrivateChannelOnUnsubscribeAgentRequest"));
409 };
410 Convert.privateChannelOnUnsubscribeAgentRequestToJson = function (value) {
411 return JSON.stringify(uncast$1(value, r$1("PrivateChannelOnUnsubscribeAgentRequest")), null, 2);
412 };
413 Convert.toPrivateChannelOnUnsubscribeBridgeRequest = function (json) {
414 return cast$1(JSON.parse(json), r$1("PrivateChannelOnUnsubscribeBridgeRequest"));
415 };
416 Convert.privateChannelOnUnsubscribeBridgeRequestToJson = function (value) {
417 return JSON.stringify(uncast$1(value, r$1("PrivateChannelOnUnsubscribeBridgeRequest")), null, 2);
418 };
419 Convert.toRaiseIntentAgentErrorResponse = function (json) {
420 return cast$1(JSON.parse(json), r$1("RaiseIntentAgentErrorResponse"));
421 };
422 Convert.raiseIntentAgentErrorResponseToJson = function (value) {
423 return JSON.stringify(uncast$1(value, r$1("RaiseIntentAgentErrorResponse")), null, 2);
424 };
425 Convert.toRaiseIntentAgentRequest = function (json) {
426 return cast$1(JSON.parse(json), r$1("RaiseIntentAgentRequest"));
427 };
428 Convert.raiseIntentAgentRequestToJson = function (value) {
429 return JSON.stringify(uncast$1(value, r$1("RaiseIntentAgentRequest")), null, 2);
430 };
431 Convert.toRaiseIntentAgentResponse = function (json) {
432 return cast$1(JSON.parse(json), r$1("RaiseIntentAgentResponse"));
433 };
434 Convert.raiseIntentAgentResponseToJson = function (value) {
435 return JSON.stringify(uncast$1(value, r$1("RaiseIntentAgentResponse")), null, 2);
436 };
437 Convert.toRaiseIntentBridgeErrorResponse = function (json) {
438 return cast$1(JSON.parse(json), r$1("RaiseIntentBridgeErrorResponse"));
439 };
440 Convert.raiseIntentBridgeErrorResponseToJson = function (value) {
441 return JSON.stringify(uncast$1(value, r$1("RaiseIntentBridgeErrorResponse")), null, 2);
442 };
443 Convert.toRaiseIntentBridgeRequest = function (json) {
444 return cast$1(JSON.parse(json), r$1("RaiseIntentBridgeRequest"));
445 };
446 Convert.raiseIntentBridgeRequestToJson = function (value) {
447 return JSON.stringify(uncast$1(value, r$1("RaiseIntentBridgeRequest")), null, 2);
448 };
449 Convert.toRaiseIntentBridgeResponse = function (json) {
450 return cast$1(JSON.parse(json), r$1("RaiseIntentBridgeResponse"));
451 };
452 Convert.raiseIntentBridgeResponseToJson = function (value) {
453 return JSON.stringify(uncast$1(value, r$1("RaiseIntentBridgeResponse")), null, 2);
454 };
455 Convert.toRaiseIntentResultAgentErrorResponse = function (json) {
456 return cast$1(JSON.parse(json), r$1("RaiseIntentResultAgentErrorResponse"));
457 };
458 Convert.raiseIntentResultAgentErrorResponseToJson = function (value) {
459 return JSON.stringify(uncast$1(value, r$1("RaiseIntentResultAgentErrorResponse")), null, 2);
460 };
461 Convert.toRaiseIntentResultAgentResponse = function (json) {
462 return cast$1(JSON.parse(json), r$1("RaiseIntentResultAgentResponse"));
463 };
464 Convert.raiseIntentResultAgentResponseToJson = function (value) {
465 return JSON.stringify(uncast$1(value, r$1("RaiseIntentResultAgentResponse")), null, 2);
466 };
467 Convert.toRaiseIntentResultBridgeErrorResponse = function (json) {
468 return cast$1(JSON.parse(json), r$1("RaiseIntentResultBridgeErrorResponse"));
469 };
470 Convert.raiseIntentResultBridgeErrorResponseToJson = function (value) {
471 return JSON.stringify(uncast$1(value, r$1("RaiseIntentResultBridgeErrorResponse")), null, 2);
472 };
473 Convert.toRaiseIntentResultBridgeResponse = function (json) {
474 return cast$1(JSON.parse(json), r$1("RaiseIntentResultBridgeResponse"));
475 };
476 Convert.raiseIntentResultBridgeResponseToJson = function (value) {
477 return JSON.stringify(uncast$1(value, r$1("RaiseIntentResultBridgeResponse")), null, 2);
478 };
479 return Convert;
480}());
481function invalidValue$1(typ, val, key, parent) {
482 if (parent === void 0) { parent = ''; }
483 var prettyTyp = prettyTypeName$1(typ);
484 var parentText = parent ? " on ".concat(parent) : '';
485 var keyText = key ? " for key \"".concat(key, "\"") : '';
486 throw Error("Invalid value".concat(keyText).concat(parentText, ". Expected ").concat(prettyTyp, " but got ").concat(JSON.stringify(val)));
487}
488function prettyTypeName$1(typ) {
489 if (Array.isArray(typ)) {
490 if (typ.length === 2 && typ[0] === undefined) {
491 return "an optional ".concat(prettyTypeName$1(typ[1]));
492 }
493 else {
494 return "one of [".concat(typ.map(function (a) { return prettyTypeName$1(a); }).join(", "), "]");
495 }
496 }
497 else if (typeof typ === "object" && typ.literal !== undefined) {
498 return typ.literal;
499 }
500 else {
501 return typeof typ;
502 }
503}
504function jsonToJSProps$1(typ) {
505 if (typ.jsonToJS === undefined) {
506 var map_1 = {};
507 typ.props.forEach(function (p) { return map_1[p.json] = { key: p.js, typ: p.typ }; });
508 typ.jsonToJS = map_1;
509 }
510 return typ.jsonToJS;
511}
512function jsToJSONProps$1(typ) {
513 if (typ.jsToJSON === undefined) {
514 var map_2 = {};
515 typ.props.forEach(function (p) { return map_2[p.js] = { key: p.json, typ: p.typ }; });
516 typ.jsToJSON = map_2;
517 }
518 return typ.jsToJSON;
519}
520function transform$1(val, typ, getProps, key, parent) {
521 if (key === void 0) { key = ''; }
522 if (parent === void 0) { parent = ''; }
523 function transformPrimitive(typ, val) {
524 if (typeof typ === typeof val)
525 return val;
526 return invalidValue$1(typ, val, key, parent);
527 }
528 function transformUnion(typs, val) {
529 // val must validate against one typ in typs
530 var l = typs.length;
531 for (var i = 0; i < l; i++) {
532 var typ_1 = typs[i];
533 try {
534 return transform$1(val, typ_1, getProps);
535 }
536 catch (_) { }
537 }
538 return invalidValue$1(typs, val, key, parent);
539 }
540 function transformEnum(cases, val) {
541 if (cases.indexOf(val) !== -1)
542 return val;
543 return invalidValue$1(cases.map(function (a) { return l$1(a); }), val, key, parent);
544 }
545 function transformArray(typ, val) {
546 // val must be an array with no invalid elements
547 if (!Array.isArray(val))
548 return invalidValue$1(l$1("array"), val, key, parent);
549 return val.map(function (el) { return transform$1(el, typ, getProps); });
550 }
551 function transformDate(val) {
552 if (val === null) {
553 return null;
554 }
555 var d = new Date(val);
556 if (isNaN(d.valueOf())) {
557 return invalidValue$1(l$1("Date"), val, key, parent);
558 }
559 return d;
560 }
561 function transformObject(props, additional, val) {
562 if (val === null || typeof val !== "object" || Array.isArray(val)) {
563 return invalidValue$1(l$1(ref || "object"), val, key, parent);
564 }
565 var result = {};
566 Object.getOwnPropertyNames(props).forEach(function (key) {
567 var prop = props[key];
568 var v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
569 result[prop.key] = transform$1(v, prop.typ, getProps, key, ref);
570 });
571 Object.getOwnPropertyNames(val).forEach(function (key) {
572 if (!Object.prototype.hasOwnProperty.call(props, key)) {
573 result[key] = transform$1(val[key], additional, getProps, key, ref);
574 }
575 });
576 return result;
577 }
578 if (typ === "any")
579 return val;
580 if (typ === null) {
581 if (val === null)
582 return val;
583 return invalidValue$1(typ, val, key, parent);
584 }
585 if (typ === false)
586 return invalidValue$1(typ, val, key, parent);
587 var ref = undefined;
588 while (typeof typ === "object" && typ.ref !== undefined) {
589 ref = typ.ref;
590 typ = typeMap$1[typ.ref];
591 }
592 if (Array.isArray(typ))
593 return transformEnum(typ, val);
594 if (typeof typ === "object") {
595 return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
596 : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
597 : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
598 : invalidValue$1(typ, val, key, parent);
599 }
600 // Numbers can be parsed by Date but shouldn't be.
601 if (typ === Date && typeof val !== "number")
602 return transformDate(val);
603 return transformPrimitive(typ, val);
604}
605function cast$1(val, typ) {
606 return transform$1(val, typ, jsonToJSProps$1);
607}
608function uncast$1(val, typ) {
609 return transform$1(val, typ, jsToJSONProps$1);
610}
611function l$1(typ) {
612 return { literal: typ };
613}
614function a$1(typ) {
615 return { arrayItems: typ };
616}
617function u$1() {
618 var typs = [];
619 for (var _i = 0; _i < arguments.length; _i++) {
620 typs[_i] = arguments[_i];
621 }
622 return { unionMembers: typs };
623}
624function o$1(props, additional) {
625 return { props: props, additional: additional };
626}
627function m$1(additional) {
628 return { props: [], additional: additional };
629}
630function r$1(name) {
631 return { ref: name };
632}
633var typeMap$1 = {
634 "AgentErrorResponseMessage": o$1([
635 { json: "meta", js: "meta", typ: r$1("AgentResponseMetadata") },
636 { json: "payload", js: "payload", typ: r$1("ErrorResponseMessagePayload") },
637 { json: "type", js: "type", typ: r$1("ResponseMessageType") },
638 ], false),
639 "AgentResponseMetadata": o$1([
640 { json: "requestUuid", js: "requestUuid", typ: "" },
641 { json: "responseUuid", js: "responseUuid", typ: "" },
642 { json: "timestamp", js: "timestamp", typ: Date },
643 ], false),
644 "ErrorResponseMessagePayload": o$1([
645 { json: "error", js: "error", typ: r$1("ResponseErrorDetail") },
646 ], "any"),
647 "AgentRequestMessage": o$1([
648 { json: "meta", js: "meta", typ: r$1("AgentRequestMetadata") },
649 { json: "payload", js: "payload", typ: m$1("any") },
650 { json: "type", js: "type", typ: r$1("RequestMessageType") },
651 ], false),
652 "AgentRequestMetadata": o$1([
653 { json: "destination", js: "destination", typ: u$1(undefined, r$1("BridgeParticipantIdentifier")) },
654 { json: "requestUuid", js: "requestUuid", typ: "" },
655 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceIdentifier")) },
656 { json: "timestamp", js: "timestamp", typ: Date },
657 ], false),
658 "BridgeParticipantIdentifier": o$1([
659 { json: "desktopAgent", js: "desktopAgent", typ: "" },
660 { json: "appId", js: "appId", typ: u$1(undefined, "") },
661 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
662 ], "any"),
663 "SourceIdentifier": o$1([
664 { json: "appId", js: "appId", typ: u$1(undefined, "") },
665 { json: "desktopAgent", js: "desktopAgent", typ: u$1(undefined, "") },
666 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
667 ], "any"),
668 "AgentResponseMessage": o$1([
669 { json: "meta", js: "meta", typ: r$1("AgentResponseMetadata") },
670 { json: "payload", js: "payload", typ: m$1("any") },
671 { json: "type", js: "type", typ: r$1("ResponseMessageType") },
672 ], false),
673 "BridgeErrorResponseMessage": o$1([
674 { json: "meta", js: "meta", typ: r$1("BridgeErrorResponseMessageMeta") },
675 { json: "payload", js: "payload", typ: r$1("ResponseErrorMessagePayload") },
676 { json: "type", js: "type", typ: "" },
677 ], false),
678 "BridgeErrorResponseMessageMeta": o$1([
679 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
680 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
681 { json: "requestUuid", js: "requestUuid", typ: "" },
682 { json: "responseUuid", js: "responseUuid", typ: "" },
683 { json: "timestamp", js: "timestamp", typ: Date },
684 ], false),
685 "DesktopAgentIdentifier": o$1([
686 { json: "desktopAgent", js: "desktopAgent", typ: "" },
687 ], "any"),
688 "ResponseErrorMessagePayload": o$1([
689 { json: "error", js: "error", typ: u$1(undefined, r$1("ResponseErrorDetail")) },
690 ], "any"),
691 "BridgeRequestMessage": o$1([
692 { json: "meta", js: "meta", typ: r$1("BridgeRequestMetadata") },
693 { json: "payload", js: "payload", typ: m$1("any") },
694 { json: "type", js: "type", typ: "" },
695 ], false),
696 "BridgeRequestMetadata": o$1([
697 { json: "destination", js: "destination", typ: u$1(undefined, r$1("BridgeParticipantIdentifier")) },
698 { json: "requestUuid", js: "requestUuid", typ: "" },
699 { json: "source", js: "source", typ: r$1("BridgeParticipantIdentifier") },
700 { json: "timestamp", js: "timestamp", typ: Date },
701 ], false),
702 "BridgeResponseMessage": o$1([
703 { json: "meta", js: "meta", typ: r$1("BridgeResponseMessageMeta") },
704 { json: "payload", js: "payload", typ: m$1("any") },
705 { json: "type", js: "type", typ: "" },
706 ], false),
707 "BridgeResponseMessageMeta": o$1([
708 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
709 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
710 { json: "requestUuid", js: "requestUuid", typ: "" },
711 { json: "responseUuid", js: "responseUuid", typ: "" },
712 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
713 { json: "timestamp", js: "timestamp", typ: Date },
714 ], false),
715 "BroadcastAgentRequest": o$1([
716 { json: "meta", js: "meta", typ: r$1("BroadcastAgentRequestMeta") },
717 { json: "payload", js: "payload", typ: r$1("BroadcastAgentRequestPayload") },
718 { json: "type", js: "type", typ: r$1("BroadcastAgentRequestType") },
719 ], false),
720 "BroadcastAgentRequestMeta": o$1([
721 { json: "requestUuid", js: "requestUuid", typ: "" },
722 { json: "source", js: "source", typ: r$1("SourceObject") },
723 { json: "timestamp", js: "timestamp", typ: Date },
724 ], false),
725 "SourceObject": o$1([
726 { json: "appId", js: "appId", typ: "" },
727 { json: "desktopAgent", js: "desktopAgent", typ: u$1(undefined, "") },
728 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
729 ], "any"),
730 "BroadcastAgentRequestPayload": o$1([
731 { json: "channelId", js: "channelId", typ: "" },
732 { json: "context", js: "context", typ: r$1("Context") },
733 ], false),
734 "Context": o$1([
735 { json: "id", js: "id", typ: u$1(undefined, m$1("any")) },
736 { json: "name", js: "name", typ: u$1(undefined, "") },
737 { json: "type", js: "type", typ: "" },
738 ], "any"),
739 "BroadcastBridgeRequest": o$1([
740 { json: "meta", js: "meta", typ: r$1("BroadcastBridgeRequestMeta") },
741 { json: "payload", js: "payload", typ: r$1("BroadcastBridgeRequestPayload") },
742 { json: "type", js: "type", typ: r$1("BroadcastAgentRequestType") },
743 ], false),
744 "BroadcastBridgeRequestMeta": o$1([
745 { json: "requestUuid", js: "requestUuid", typ: "" },
746 { json: "source", js: "source", typ: r$1("MetaSource") },
747 { json: "timestamp", js: "timestamp", typ: Date },
748 ], false),
749 "MetaSource": o$1([
750 { json: "appId", js: "appId", typ: "" },
751 { json: "desktopAgent", js: "desktopAgent", typ: "" },
752 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
753 ], "any"),
754 "BroadcastBridgeRequestPayload": o$1([
755 { json: "channelId", js: "channelId", typ: "" },
756 { json: "context", js: "context", typ: r$1("Context") },
757 ], false),
758 "ConnectionStepMessage": o$1([
759 { json: "meta", js: "meta", typ: r$1("ConnectionStepMetadata") },
760 { json: "payload", js: "payload", typ: m$1("any") },
761 { json: "type", js: "type", typ: r$1("ConnectionStepMessageType") },
762 ], false),
763 "ConnectionStepMetadata": o$1([
764 { json: "requestUuid", js: "requestUuid", typ: u$1(undefined, "") },
765 { json: "responseUuid", js: "responseUuid", typ: u$1(undefined, "") },
766 { json: "timestamp", js: "timestamp", typ: Date },
767 ], false),
768 "ConnectionStep2Hello": o$1([
769 { json: "meta", js: "meta", typ: r$1("ConnectionStep2HelloMeta") },
770 { json: "payload", js: "payload", typ: r$1("ConnectionStep2HelloPayload") },
771 { json: "type", js: "type", typ: r$1("ConnectionStep2HelloType") },
772 ], false),
773 "ConnectionStep2HelloMeta": o$1([
774 { json: "timestamp", js: "timestamp", typ: Date },
775 ], false),
776 "ConnectionStep2HelloPayload": o$1([
777 { json: "authRequired", js: "authRequired", typ: true },
778 { json: "authToken", js: "authToken", typ: u$1(undefined, "") },
779 { json: "desktopAgentBridgeVersion", js: "desktopAgentBridgeVersion", typ: "" },
780 { json: "supportedFDC3Versions", js: "supportedFDC3Versions", typ: a$1("") },
781 ], false),
782 "ConnectionStep3Handshake": o$1([
783 { json: "meta", js: "meta", typ: r$1("ConnectionStep3HandshakeMeta") },
784 { json: "payload", js: "payload", typ: r$1("ConnectionStep3HandshakePayload") },
785 { json: "type", js: "type", typ: r$1("ConnectionStep3HandshakeType") },
786 ], false),
787 "ConnectionStep3HandshakeMeta": o$1([
788 { json: "requestUuid", js: "requestUuid", typ: "" },
789 { json: "timestamp", js: "timestamp", typ: Date },
790 ], false),
791 "ConnectionStep3HandshakePayload": o$1([
792 { json: "authToken", js: "authToken", typ: u$1(undefined, "") },
793 { json: "channelsState", js: "channelsState", typ: m$1(a$1(r$1("Context"))) },
794 { json: "implementationMetadata", js: "implementationMetadata", typ: r$1("ConnectingAgentImplementationMetadata") },
795 { json: "requestedName", js: "requestedName", typ: "" },
796 ], false),
797 "ConnectingAgentImplementationMetadata": o$1([
798 { json: "fdc3Version", js: "fdc3Version", typ: "" },
799 { json: "optionalFeatures", js: "optionalFeatures", typ: r$1("OptionalFeatures") },
800 { json: "provider", js: "provider", typ: "" },
801 { json: "providerVersion", js: "providerVersion", typ: u$1(undefined, "") },
802 ], false),
803 "OptionalFeatures": o$1([
804 { json: "DesktopAgentBridging", js: "DesktopAgentBridging", typ: true },
805 { json: "OriginatingAppMetadata", js: "OriginatingAppMetadata", typ: true },
806 { json: "UserChannelMembershipAPIs", js: "UserChannelMembershipAPIs", typ: true },
807 ], false),
808 "ConnectionStep4AuthenticationFailed": o$1([
809 { json: "meta", js: "meta", typ: r$1("ConnectionStep4AuthenticationFailedMeta") },
810 { json: "payload", js: "payload", typ: r$1("ConnectionStep4AuthenticationFailedPayload") },
811 { json: "type", js: "type", typ: r$1("ConnectionStep4AuthenticationFailedType") },
812 ], false),
813 "ConnectionStep4AuthenticationFailedMeta": o$1([
814 { json: "requestUuid", js: "requestUuid", typ: "" },
815 { json: "responseUuid", js: "responseUuid", typ: "" },
816 { json: "timestamp", js: "timestamp", typ: Date },
817 ], false),
818 "ConnectionStep4AuthenticationFailedPayload": o$1([
819 { json: "message", js: "message", typ: u$1(undefined, "") },
820 ], false),
821 "ConnectionStep6ConnectedAgentsUpdate": o$1([
822 { json: "meta", js: "meta", typ: r$1("ConnectionStep6ConnectedAgentsUpdateMeta") },
823 { json: "payload", js: "payload", typ: r$1("ConnectionStep6ConnectedAgentsUpdatePayload") },
824 { json: "type", js: "type", typ: r$1("ConnectionStep6ConnectedAgentsUpdateType") },
825 ], false),
826 "ConnectionStep6ConnectedAgentsUpdateMeta": o$1([
827 { json: "requestUuid", js: "requestUuid", typ: "" },
828 { json: "responseUuid", js: "responseUuid", typ: "" },
829 { json: "timestamp", js: "timestamp", typ: Date },
830 ], false),
831 "ConnectionStep6ConnectedAgentsUpdatePayload": o$1([
832 { json: "addAgent", js: "addAgent", typ: u$1(undefined, "") },
833 { json: "allAgents", js: "allAgents", typ: a$1(r$1("DesktopAgentImplementationMetadata")) },
834 { json: "channelsState", js: "channelsState", typ: u$1(undefined, m$1(a$1(r$1("Context")))) },
835 { json: "removeAgent", js: "removeAgent", typ: u$1(undefined, "") },
836 ], false),
837 "DesktopAgentImplementationMetadata": o$1([
838 { json: "desktopAgent", js: "desktopAgent", typ: "" },
839 { json: "fdc3Version", js: "fdc3Version", typ: "" },
840 { json: "optionalFeatures", js: "optionalFeatures", typ: r$1("OptionalFeatures") },
841 { json: "provider", js: "provider", typ: "" },
842 { json: "providerVersion", js: "providerVersion", typ: u$1(undefined, "") },
843 ], false),
844 "FindInstancesAgentErrorResponse": o$1([
845 { json: "meta", js: "meta", typ: r$1("FindInstancesAgentErrorResponseMeta") },
846 { json: "payload", js: "payload", typ: r$1("PayloadClass") },
847 { json: "type", js: "type", typ: r$1("FindInstancesAgentErrorResponseType") },
848 ], false),
849 "FindInstancesAgentErrorResponseMeta": o$1([
850 { json: "requestUuid", js: "requestUuid", typ: "" },
851 { json: "responseUuid", js: "responseUuid", typ: "" },
852 { json: "timestamp", js: "timestamp", typ: Date },
853 ], false),
854 "PayloadClass": o$1([
855 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
856 ], false),
857 "FindInstancesAgentRequest": o$1([
858 { json: "meta", js: "meta", typ: r$1("FindInstancesAgentRequestMeta") },
859 { json: "payload", js: "payload", typ: r$1("FindInstancesAgentRequestPayload") },
860 { json: "type", js: "type", typ: r$1("FindInstancesAgentRequestType") },
861 ], false),
862 "FindInstancesAgentRequestMeta": o$1([
863 { json: "destination", js: "destination", typ: u$1(undefined, r$1("DestinationObject")) },
864 { json: "requestUuid", js: "requestUuid", typ: "" },
865 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceIdentifier")) },
866 { json: "timestamp", js: "timestamp", typ: Date },
867 ], false),
868 "DestinationObject": o$1([
869 { json: "desktopAgent", js: "desktopAgent", typ: "" },
870 { json: "appId", js: "appId", typ: u$1(undefined, "") },
871 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
872 ], "any"),
873 "FindInstancesAgentRequestPayload": o$1([
874 { json: "app", js: "app", typ: r$1("AppIdentifier") },
875 ], false),
876 "AppIdentifier": o$1([
877 { json: "appId", js: "appId", typ: "" },
878 { json: "desktopAgent", js: "desktopAgent", typ: u$1(undefined, "") },
879 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
880 ], "any"),
881 "FindInstancesAgentResponse": o$1([
882 { json: "meta", js: "meta", typ: r$1("AgentResponseMetadata") },
883 { json: "payload", js: "payload", typ: r$1("FindInstancesAgentResponsePayload") },
884 { json: "type", js: "type", typ: r$1("FindInstancesAgentErrorResponseType") },
885 ], false),
886 "FindInstancesAgentResponsePayload": o$1([
887 { json: "appIdentifiers", js: "appIdentifiers", typ: a$1(r$1("AppMetadata")) },
888 ], false),
889 "AppMetadata": o$1([
890 { json: "appId", js: "appId", typ: "" },
891 { json: "description", js: "description", typ: u$1(undefined, "") },
892 { json: "desktopAgent", js: "desktopAgent", typ: u$1(undefined, "") },
893 { json: "icons", js: "icons", typ: u$1(undefined, a$1(r$1("Icon"))) },
894 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
895 { json: "instanceMetadata", js: "instanceMetadata", typ: u$1(undefined, m$1("any")) },
896 { json: "name", js: "name", typ: u$1(undefined, "") },
897 { json: "resultType", js: "resultType", typ: u$1(undefined, u$1(null, "")) },
898 { json: "screenshots", js: "screenshots", typ: u$1(undefined, a$1(r$1("Image"))) },
899 { json: "title", js: "title", typ: u$1(undefined, "") },
900 { json: "tooltip", js: "tooltip", typ: u$1(undefined, "") },
901 { json: "version", js: "version", typ: u$1(undefined, "") },
902 ], false),
903 "Icon": o$1([
904 { json: "size", js: "size", typ: u$1(undefined, "") },
905 { json: "src", js: "src", typ: "" },
906 { json: "type", js: "type", typ: u$1(undefined, "") },
907 ], false),
908 "Image": o$1([
909 { json: "label", js: "label", typ: u$1(undefined, "") },
910 { json: "size", js: "size", typ: u$1(undefined, "") },
911 { json: "src", js: "src", typ: "" },
912 { json: "type", js: "type", typ: u$1(undefined, "") },
913 ], false),
914 "FindInstancesBridgeErrorResponse": o$1([
915 { json: "meta", js: "meta", typ: r$1("FindInstancesBridgeErrorResponseMeta") },
916 { json: "payload", js: "payload", typ: r$1("MessagePayload") },
917 { json: "type", js: "type", typ: r$1("FindInstancesAgentErrorResponseType") },
918 ], false),
919 "FindInstancesBridgeErrorResponseMeta": o$1([
920 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
921 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
922 { json: "requestUuid", js: "requestUuid", typ: "" },
923 { json: "responseUuid", js: "responseUuid", typ: "" },
924 { json: "timestamp", js: "timestamp", typ: Date },
925 ], false),
926 "MessagePayload": o$1([
927 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
928 ], false),
929 "FindInstancesBridgeRequest": o$1([
930 { json: "meta", js: "meta", typ: r$1("FindInstancesBridgeRequestMeta") },
931 { json: "payload", js: "payload", typ: r$1("FindInstancesBridgeRequestPayload") },
932 { json: "type", js: "type", typ: r$1("FindInstancesAgentRequestType") },
933 ], false),
934 "FindInstancesBridgeRequestMeta": o$1([
935 { json: "destination", js: "destination", typ: u$1(undefined, r$1("DestinationObject")) },
936 { json: "requestUuid", js: "requestUuid", typ: "" },
937 { json: "source", js: "source", typ: r$1("MetaSourceObject") },
938 { json: "timestamp", js: "timestamp", typ: Date },
939 ], false),
940 "MetaSourceObject": o$1([
941 { json: "appId", js: "appId", typ: u$1(undefined, "") },
942 { json: "desktopAgent", js: "desktopAgent", typ: "" },
943 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
944 ], "any"),
945 "FindInstancesBridgeRequestPayload": o$1([
946 { json: "app", js: "app", typ: r$1("AppIdentifier") },
947 ], false),
948 "FindInstancesBridgeResponse": o$1([
949 { json: "meta", js: "meta", typ: r$1("BridgeResponseMessageMeta") },
950 { json: "payload", js: "payload", typ: r$1("FindInstancesBridgeResponsePayload") },
951 { json: "type", js: "type", typ: r$1("FindInstancesAgentErrorResponseType") },
952 ], false),
953 "FindInstancesBridgeResponsePayload": o$1([
954 { json: "appIdentifiers", js: "appIdentifiers", typ: a$1(r$1("AppMetadata")) },
955 ], false),
956 "FindIntentAgentErrorResponse": o$1([
957 { json: "meta", js: "meta", typ: r$1("FindIntentAgentErrorResponseMeta") },
958 { json: "payload", js: "payload", typ: r$1("FindIntentAgentErrorResponsePayload") },
959 { json: "type", js: "type", typ: r$1("FindIntentAgentErrorResponseType") },
960 ], false),
961 "FindIntentAgentErrorResponseMeta": o$1([
962 { json: "requestUuid", js: "requestUuid", typ: "" },
963 { json: "responseUuid", js: "responseUuid", typ: "" },
964 { json: "timestamp", js: "timestamp", typ: Date },
965 ], false),
966 "FindIntentAgentErrorResponsePayload": o$1([
967 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
968 ], false),
969 "FindIntentAgentRequest": o$1([
970 { json: "meta", js: "meta", typ: r$1("FindIntentAgentRequestMeta") },
971 { json: "payload", js: "payload", typ: r$1("FindIntentAgentRequestPayload") },
972 { json: "type", js: "type", typ: r$1("FindIntentAgentRequestType") },
973 ], false),
974 "FindIntentAgentRequestMeta": o$1([
975 { json: "requestUuid", js: "requestUuid", typ: "" },
976 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceIdentifier")) },
977 { json: "timestamp", js: "timestamp", typ: Date },
978 { json: "destination", js: "destination", typ: u$1(undefined, r$1("BridgeParticipantIdentifier")) },
979 ], false),
980 "FindIntentAgentRequestPayload": o$1([
981 { json: "context", js: "context", typ: u$1(undefined, r$1("Context")) },
982 { json: "intent", js: "intent", typ: "" },
983 { json: "resultType", js: "resultType", typ: u$1(undefined, "") },
984 ], false),
985 "FindIntentAgentResponse": o$1([
986 { json: "meta", js: "meta", typ: r$1("FindIntentAgentResponseMeta") },
987 { json: "payload", js: "payload", typ: r$1("FindIntentAgentResponsePayload") },
988 { json: "type", js: "type", typ: r$1("FindIntentAgentErrorResponseType") },
989 ], false),
990 "FindIntentAgentResponseMeta": o$1([
991 { json: "requestUuid", js: "requestUuid", typ: "" },
992 { json: "responseUuid", js: "responseUuid", typ: "" },
993 { json: "timestamp", js: "timestamp", typ: Date },
994 ], false),
995 "FindIntentAgentResponsePayload": o$1([
996 { json: "appIntent", js: "appIntent", typ: r$1("AppIntent") },
997 ], false),
998 "AppIntent": o$1([
999 { json: "apps", js: "apps", typ: a$1(r$1("AppMetadata")) },
1000 { json: "intent", js: "intent", typ: r$1("IntentMetadata") },
1001 ], false),
1002 "IntentMetadata": o$1([
1003 { json: "displayName", js: "displayName", typ: u$1(undefined, "") },
1004 { json: "name", js: "name", typ: "" },
1005 ], false),
1006 "FindIntentBridgeErrorResponse": o$1([
1007 { json: "meta", js: "meta", typ: r$1("FindIntentBridgeErrorResponseMeta") },
1008 { json: "payload", js: "payload", typ: r$1("FindIntentBridgeErrorResponsePayload") },
1009 { json: "type", js: "type", typ: r$1("FindIntentAgentErrorResponseType") },
1010 ], false),
1011 "FindIntentBridgeErrorResponseMeta": o$1([
1012 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
1013 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
1014 { json: "requestUuid", js: "requestUuid", typ: "" },
1015 { json: "responseUuid", js: "responseUuid", typ: "" },
1016 { json: "timestamp", js: "timestamp", typ: Date },
1017 ], false),
1018 "FindIntentBridgeErrorResponsePayload": o$1([
1019 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1020 ], false),
1021 "FindIntentBridgeRequest": o$1([
1022 { json: "meta", js: "meta", typ: r$1("FindIntentBridgeRequestMeta") },
1023 { json: "payload", js: "payload", typ: r$1("FindIntentBridgeRequestPayload") },
1024 { json: "type", js: "type", typ: r$1("FindIntentAgentRequestType") },
1025 ], false),
1026 "FindIntentBridgeRequestMeta": o$1([
1027 { json: "requestUuid", js: "requestUuid", typ: "" },
1028 { json: "source", js: "source", typ: r$1("BridgeParticipantIdentifier") },
1029 { json: "timestamp", js: "timestamp", typ: Date },
1030 { json: "destination", js: "destination", typ: u$1(undefined, r$1("BridgeParticipantIdentifier")) },
1031 ], false),
1032 "FindIntentBridgeRequestPayload": o$1([
1033 { json: "context", js: "context", typ: u$1(undefined, r$1("Context")) },
1034 { json: "intent", js: "intent", typ: "" },
1035 { json: "resultType", js: "resultType", typ: u$1(undefined, "") },
1036 ], false),
1037 "FindIntentBridgeResponse": o$1([
1038 { json: "meta", js: "meta", typ: r$1("FindIntentBridgeResponseMeta") },
1039 { json: "payload", js: "payload", typ: r$1("FindIntentBridgeResponsePayload") },
1040 { json: "type", js: "type", typ: r$1("FindIntentAgentErrorResponseType") },
1041 ], false),
1042 "FindIntentBridgeResponseMeta": o$1([
1043 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
1044 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1045 { json: "requestUuid", js: "requestUuid", typ: "" },
1046 { json: "responseUuid", js: "responseUuid", typ: "" },
1047 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1048 { json: "timestamp", js: "timestamp", typ: Date },
1049 ], false),
1050 "FindIntentBridgeResponsePayload": o$1([
1051 { json: "appIntent", js: "appIntent", typ: r$1("AppIntent") },
1052 ], false),
1053 "FindIntentsByContextAgentErrorResponse": o$1([
1054 { json: "meta", js: "meta", typ: r$1("FindIntentsByContextAgentErrorResponseMeta") },
1055 { json: "payload", js: "payload", typ: r$1("FindIntentsByContextAgentErrorResponsePayload") },
1056 { json: "type", js: "type", typ: r$1("FindIntentsByContextAgentErrorResponseType") },
1057 ], false),
1058 "FindIntentsByContextAgentErrorResponseMeta": o$1([
1059 { json: "requestUuid", js: "requestUuid", typ: "" },
1060 { json: "responseUuid", js: "responseUuid", typ: "" },
1061 { json: "timestamp", js: "timestamp", typ: Date },
1062 ], false),
1063 "FindIntentsByContextAgentErrorResponsePayload": o$1([
1064 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1065 ], false),
1066 "FindIntentsByContextAgentRequest": o$1([
1067 { json: "meta", js: "meta", typ: r$1("FindIntentsByContextAgentRequestMeta") },
1068 { json: "payload", js: "payload", typ: r$1("FindIntentsByContextAgentRequestPayload") },
1069 { json: "type", js: "type", typ: r$1("FindIntentsByContextAgentRequestType") },
1070 ], false),
1071 "FindIntentsByContextAgentRequestMeta": o$1([
1072 { json: "requestUuid", js: "requestUuid", typ: "" },
1073 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1074 { json: "timestamp", js: "timestamp", typ: Date },
1075 { json: "destination", js: "destination", typ: u$1(undefined, r$1("BridgeParticipantIdentifier")) },
1076 ], false),
1077 "FindIntentsByContextAgentRequestPayload": o$1([
1078 { json: "context", js: "context", typ: r$1("Context") },
1079 { json: "resultType", js: "resultType", typ: u$1(undefined, "") },
1080 ], false),
1081 "FindIntentsByContextAgentResponse": o$1([
1082 { json: "meta", js: "meta", typ: r$1("FindIntentsByContextAgentResponseMeta") },
1083 { json: "payload", js: "payload", typ: r$1("FindIntentsByContextAgentResponsePayload") },
1084 { json: "type", js: "type", typ: r$1("FindIntentsByContextAgentErrorResponseType") },
1085 ], false),
1086 "FindIntentsByContextAgentResponseMeta": o$1([
1087 { json: "requestUuid", js: "requestUuid", typ: "" },
1088 { json: "responseUuid", js: "responseUuid", typ: "" },
1089 { json: "timestamp", js: "timestamp", typ: Date },
1090 ], false),
1091 "FindIntentsByContextAgentResponsePayload": o$1([
1092 { json: "appIntents", js: "appIntents", typ: a$1(r$1("AppIntent")) },
1093 ], false),
1094 "FindIntentsByContextBridgeErrorResponse": o$1([
1095 { json: "meta", js: "meta", typ: r$1("FindIntentsByContextBridgeErrorResponseMeta") },
1096 { json: "payload", js: "payload", typ: r$1("FindIntentsByContextBridgeErrorResponsePayload") },
1097 { json: "type", js: "type", typ: r$1("FindIntentsByContextAgentErrorResponseType") },
1098 ], false),
1099 "FindIntentsByContextBridgeErrorResponseMeta": o$1([
1100 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
1101 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
1102 { json: "requestUuid", js: "requestUuid", typ: "" },
1103 { json: "responseUuid", js: "responseUuid", typ: "" },
1104 { json: "timestamp", js: "timestamp", typ: Date },
1105 ], false),
1106 "FindIntentsByContextBridgeErrorResponsePayload": o$1([
1107 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1108 ], false),
1109 "FindIntentsByContextBridgeRequest": o$1([
1110 { json: "meta", js: "meta", typ: r$1("FindIntentsByContextBridgeRequestMeta") },
1111 { json: "payload", js: "payload", typ: r$1("FindIntentsByContextBridgeRequestPayload") },
1112 { json: "type", js: "type", typ: r$1("FindIntentsByContextAgentRequestType") },
1113 ], false),
1114 "FindIntentsByContextBridgeRequestMeta": o$1([
1115 { json: "requestUuid", js: "requestUuid", typ: "" },
1116 { json: "source", js: "source", typ: r$1("MetaSource") },
1117 { json: "timestamp", js: "timestamp", typ: Date },
1118 { json: "destination", js: "destination", typ: u$1(undefined, r$1("BridgeParticipantIdentifier")) },
1119 ], false),
1120 "FindIntentsByContextBridgeRequestPayload": o$1([
1121 { json: "context", js: "context", typ: r$1("Context") },
1122 { json: "resultType", js: "resultType", typ: u$1(undefined, "") },
1123 ], false),
1124 "FindIntentsByContextBridgeResponse": o$1([
1125 { json: "meta", js: "meta", typ: r$1("FindIntentsByContextBridgeResponseMeta") },
1126 { json: "payload", js: "payload", typ: r$1("FindIntentsByContextBridgeResponsePayload") },
1127 { json: "type", js: "type", typ: r$1("FindIntentsByContextAgentErrorResponseType") },
1128 ], false),
1129 "FindIntentsByContextBridgeResponseMeta": o$1([
1130 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
1131 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1132 { json: "requestUuid", js: "requestUuid", typ: "" },
1133 { json: "responseUuid", js: "responseUuid", typ: "" },
1134 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1135 { json: "timestamp", js: "timestamp", typ: Date },
1136 ], false),
1137 "FindIntentsByContextBridgeResponsePayload": o$1([
1138 { json: "appIntents", js: "appIntents", typ: a$1(r$1("AppIntent")) },
1139 ], false),
1140 "GetAppMetadataAgentErrorResponse": o$1([
1141 { json: "meta", js: "meta", typ: r$1("GetAppMetadataAgentErrorResponseMeta") },
1142 { json: "payload", js: "payload", typ: r$1("GetAppMetadataAgentErrorResponsePayload") },
1143 { json: "type", js: "type", typ: r$1("GetAppMetadataAgentErrorResponseType") },
1144 ], false),
1145 "GetAppMetadataAgentErrorResponseMeta": o$1([
1146 { json: "requestUuid", js: "requestUuid", typ: "" },
1147 { json: "responseUuid", js: "responseUuid", typ: "" },
1148 { json: "timestamp", js: "timestamp", typ: Date },
1149 ], false),
1150 "GetAppMetadataAgentErrorResponsePayload": o$1([
1151 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1152 ], false),
1153 "GetAppMetadataAgentRequest": o$1([
1154 { json: "meta", js: "meta", typ: r$1("GetAppMetadataAgentRequestMeta") },
1155 { json: "payload", js: "payload", typ: r$1("GetAppMetadataAgentRequestPayload") },
1156 { json: "type", js: "type", typ: r$1("GetAppMetadataAgentRequestType") },
1157 ], false),
1158 "GetAppMetadataAgentRequestMeta": o$1([
1159 { json: "destination", js: "destination", typ: u$1(undefined, r$1("DestinationObject")) },
1160 { json: "requestUuid", js: "requestUuid", typ: "" },
1161 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceIdentifier")) },
1162 { json: "timestamp", js: "timestamp", typ: Date },
1163 ], false),
1164 "GetAppMetadataAgentRequestPayload": o$1([
1165 { json: "app", js: "app", typ: r$1("AppObject") },
1166 ], false),
1167 "AppObject": o$1([
1168 { json: "desktopAgent", js: "desktopAgent", typ: "" },
1169 { json: "appId", js: "appId", typ: "" },
1170 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
1171 ], "any"),
1172 "GetAppMetadataAgentResponse": o$1([
1173 { json: "meta", js: "meta", typ: r$1("GetAppMetadataAgentResponseMeta") },
1174 { json: "payload", js: "payload", typ: r$1("GetAppMetadataAgentResponsePayload") },
1175 { json: "type", js: "type", typ: r$1("GetAppMetadataAgentErrorResponseType") },
1176 ], false),
1177 "GetAppMetadataAgentResponseMeta": o$1([
1178 { json: "requestUuid", js: "requestUuid", typ: "" },
1179 { json: "responseUuid", js: "responseUuid", typ: "" },
1180 { json: "timestamp", js: "timestamp", typ: Date },
1181 ], false),
1182 "GetAppMetadataAgentResponsePayload": o$1([
1183 { json: "appMetadata", js: "appMetadata", typ: r$1("AppMetadata") },
1184 ], false),
1185 "GetAppMetadataBridgeErrorResponse": o$1([
1186 { json: "meta", js: "meta", typ: r$1("GetAppMetadataBridgeErrorResponseMeta") },
1187 { json: "payload", js: "payload", typ: r$1("GetAppMetadataBridgeErrorResponsePayload") },
1188 { json: "type", js: "type", typ: r$1("GetAppMetadataAgentErrorResponseType") },
1189 ], false),
1190 "GetAppMetadataBridgeErrorResponseMeta": o$1([
1191 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
1192 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
1193 { json: "requestUuid", js: "requestUuid", typ: "" },
1194 { json: "responseUuid", js: "responseUuid", typ: "" },
1195 { json: "timestamp", js: "timestamp", typ: Date },
1196 ], false),
1197 "GetAppMetadataBridgeErrorResponsePayload": o$1([
1198 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1199 ], false),
1200 "GetAppMetadataBridgeRequest": o$1([
1201 { json: "meta", js: "meta", typ: r$1("GetAppMetadataBridgeRequestMeta") },
1202 { json: "payload", js: "payload", typ: r$1("GetAppMetadataBridgeRequestPayload") },
1203 { json: "type", js: "type", typ: r$1("GetAppMetadataAgentRequestType") },
1204 ], false),
1205 "GetAppMetadataBridgeRequestMeta": o$1([
1206 { json: "destination", js: "destination", typ: u$1(undefined, r$1("DestinationObject")) },
1207 { json: "requestUuid", js: "requestUuid", typ: "" },
1208 { json: "source", js: "source", typ: r$1("MetaSourceObject") },
1209 { json: "timestamp", js: "timestamp", typ: Date },
1210 ], false),
1211 "GetAppMetadataBridgeRequestPayload": o$1([
1212 { json: "app", js: "app", typ: r$1("AppObject") },
1213 ], false),
1214 "GetAppMetadataBridgeResponse": o$1([
1215 { json: "meta", js: "meta", typ: r$1("GetAppMetadataBridgeResponseMeta") },
1216 { json: "payload", js: "payload", typ: r$1("GetAppMetadataBridgeResponsePayload") },
1217 { json: "type", js: "type", typ: r$1("GetAppMetadataAgentErrorResponseType") },
1218 ], false),
1219 "GetAppMetadataBridgeResponseMeta": o$1([
1220 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
1221 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1222 { json: "requestUuid", js: "requestUuid", typ: "" },
1223 { json: "responseUuid", js: "responseUuid", typ: "" },
1224 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1225 { json: "timestamp", js: "timestamp", typ: Date },
1226 ], false),
1227 "GetAppMetadataBridgeResponsePayload": o$1([
1228 { json: "appMetadata", js: "appMetadata", typ: r$1("AppMetadata") },
1229 ], false),
1230 "OpenAgentErrorResponse": o$1([
1231 { json: "meta", js: "meta", typ: r$1("OpenAgentErrorResponseMeta") },
1232 { json: "payload", js: "payload", typ: r$1("OpenAgentErrorResponsePayload") },
1233 { json: "type", js: "type", typ: r$1("OpenAgentErrorResponseType") },
1234 ], false),
1235 "OpenAgentErrorResponseMeta": o$1([
1236 { json: "requestUuid", js: "requestUuid", typ: "" },
1237 { json: "responseUuid", js: "responseUuid", typ: "" },
1238 { json: "timestamp", js: "timestamp", typ: Date },
1239 ], false),
1240 "OpenAgentErrorResponsePayload": o$1([
1241 { json: "error", js: "error", typ: r$1("OpenErrorResponsePayload") },
1242 ], false),
1243 "OpenAgentRequest": o$1([
1244 { json: "meta", js: "meta", typ: r$1("OpenAgentRequestMeta") },
1245 { json: "payload", js: "payload", typ: r$1("OpenAgentRequestPayload") },
1246 { json: "type", js: "type", typ: r$1("OpenAgentRequestType") },
1247 ], false),
1248 "OpenAgentRequestMeta": o$1([
1249 { json: "destination", js: "destination", typ: u$1(undefined, r$1("DestinationObject")) },
1250 { json: "requestUuid", js: "requestUuid", typ: "" },
1251 { json: "source", js: "source", typ: r$1("SourceObject") },
1252 { json: "timestamp", js: "timestamp", typ: Date },
1253 ], false),
1254 "OpenAgentRequestPayload": o$1([
1255 { json: "app", js: "app", typ: r$1("AppToOpen") },
1256 { json: "context", js: "context", typ: u$1(undefined, r$1("Context")) },
1257 ], false),
1258 "AppToOpen": o$1([
1259 { json: "desktopAgent", js: "desktopAgent", typ: "" },
1260 { json: "appId", js: "appId", typ: "" },
1261 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
1262 ], "any"),
1263 "OpenAgentResponse": o$1([
1264 { json: "meta", js: "meta", typ: r$1("OpenAgentResponseMeta") },
1265 { json: "payload", js: "payload", typ: r$1("OpenAgentResponsePayload") },
1266 { json: "type", js: "type", typ: r$1("OpenAgentErrorResponseType") },
1267 ], false),
1268 "OpenAgentResponseMeta": o$1([
1269 { json: "requestUuid", js: "requestUuid", typ: "" },
1270 { json: "responseUuid", js: "responseUuid", typ: "" },
1271 { json: "timestamp", js: "timestamp", typ: Date },
1272 ], false),
1273 "OpenAgentResponsePayload": o$1([
1274 { json: "appIdentifier", js: "appIdentifier", typ: r$1("AppIdentifier") },
1275 ], false),
1276 "OpenBridgeErrorResponse": o$1([
1277 { json: "meta", js: "meta", typ: r$1("OpenBridgeErrorResponseMeta") },
1278 { json: "payload", js: "payload", typ: r$1("OpenBridgeErrorResponsePayload") },
1279 { json: "type", js: "type", typ: r$1("OpenAgentErrorResponseType") },
1280 ], false),
1281 "OpenBridgeErrorResponseMeta": o$1([
1282 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
1283 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
1284 { json: "requestUuid", js: "requestUuid", typ: "" },
1285 { json: "responseUuid", js: "responseUuid", typ: "" },
1286 { json: "timestamp", js: "timestamp", typ: Date },
1287 ], false),
1288 "OpenBridgeErrorResponsePayload": o$1([
1289 { json: "error", js: "error", typ: r$1("OpenErrorResponsePayload") },
1290 ], false),
1291 "OpenBridgeRequest": o$1([
1292 { json: "meta", js: "meta", typ: r$1("OpenBridgeRequestMeta") },
1293 { json: "payload", js: "payload", typ: r$1("OpenBridgeRequestPayload") },
1294 { json: "type", js: "type", typ: r$1("OpenAgentRequestType") },
1295 ], false),
1296 "OpenBridgeRequestMeta": o$1([
1297 { json: "destination", js: "destination", typ: u$1(undefined, r$1("DestinationObject")) },
1298 { json: "requestUuid", js: "requestUuid", typ: "" },
1299 { json: "source", js: "source", typ: r$1("MetaSource") },
1300 { json: "timestamp", js: "timestamp", typ: Date },
1301 ], false),
1302 "OpenBridgeRequestPayload": o$1([
1303 { json: "app", js: "app", typ: r$1("AppToOpen") },
1304 { json: "context", js: "context", typ: u$1(undefined, r$1("Context")) },
1305 ], false),
1306 "OpenBridgeResponse": o$1([
1307 { json: "meta", js: "meta", typ: r$1("OpenBridgeResponseMeta") },
1308 { json: "payload", js: "payload", typ: r$1("OpenBridgeResponsePayload") },
1309 { json: "type", js: "type", typ: r$1("OpenAgentErrorResponseType") },
1310 ], false),
1311 "OpenBridgeResponseMeta": o$1([
1312 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
1313 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1314 { json: "requestUuid", js: "requestUuid", typ: "" },
1315 { json: "responseUuid", js: "responseUuid", typ: "" },
1316 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1317 { json: "timestamp", js: "timestamp", typ: Date },
1318 ], false),
1319 "OpenBridgeResponsePayload": o$1([
1320 { json: "appIdentifier", js: "appIdentifier", typ: r$1("AppIdentifier") },
1321 ], false),
1322 "PrivateChannelBroadcastAgentRequest": o$1([
1323 { json: "meta", js: "meta", typ: r$1("PrivateChannelBroadcastAgentRequestMeta") },
1324 { json: "payload", js: "payload", typ: r$1("PrivateChannelBroadcastAgentRequestPayload") },
1325 { json: "type", js: "type", typ: r$1("PrivateChannelBroadcastAgentRequestType") },
1326 ], false),
1327 "PrivateChannelBroadcastAgentRequestMeta": o$1([
1328 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1329 { json: "requestUuid", js: "requestUuid", typ: "" },
1330 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1331 { json: "timestamp", js: "timestamp", typ: Date },
1332 ], false),
1333 "MetaDestination": o$1([
1334 { json: "desktopAgent", js: "desktopAgent", typ: "" },
1335 { json: "appId", js: "appId", typ: "" },
1336 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
1337 ], "any"),
1338 "PrivateChannelBroadcastAgentRequestPayload": o$1([
1339 { json: "channelId", js: "channelId", typ: "" },
1340 { json: "context", js: "context", typ: r$1("Context") },
1341 ], false),
1342 "PrivateChannelBroadcastBridgeRequest": o$1([
1343 { json: "meta", js: "meta", typ: r$1("PrivateChannelBroadcastBridgeRequestMeta") },
1344 { json: "payload", js: "payload", typ: r$1("PrivateChannelBroadcastBridgeRequestPayload") },
1345 { json: "type", js: "type", typ: r$1("PrivateChannelBroadcastAgentRequestType") },
1346 ], false),
1347 "PrivateChannelBroadcastBridgeRequestMeta": o$1([
1348 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1349 { json: "requestUuid", js: "requestUuid", typ: "" },
1350 { json: "source", js: "source", typ: r$1("MetaSource") },
1351 { json: "timestamp", js: "timestamp", typ: Date },
1352 ], false),
1353 "PrivateChannelBroadcastBridgeRequestPayload": o$1([
1354 { json: "channelId", js: "channelId", typ: "" },
1355 { json: "context", js: "context", typ: r$1("Context") },
1356 ], false),
1357 "PrivateChannelEventListenerAddedAgentRequest": o$1([
1358 { json: "meta", js: "meta", typ: r$1("PrivateChannelEventListenerAddedAgentRequestMeta") },
1359 { json: "payload", js: "payload", typ: r$1("PrivateChannelEventListenerAddedAgentRequestPayload") },
1360 { json: "type", js: "type", typ: r$1("PrivateChannelEventListenerAddedAgentRequestType") },
1361 ], false),
1362 "PrivateChannelEventListenerAddedAgentRequestMeta": o$1([
1363 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1364 { json: "requestUuid", js: "requestUuid", typ: "" },
1365 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1366 { json: "timestamp", js: "timestamp", typ: Date },
1367 ], false),
1368 "PrivateChannelEventListenerAddedAgentRequestPayload": o$1([
1369 { json: "channelId", js: "channelId", typ: "" },
1370 { json: "listenerType", js: "listenerType", typ: r$1("PrivateChannelEventListenerTypes") },
1371 ], false),
1372 "PrivateChannelEventListenerAddedBridgeRequest": o$1([
1373 { json: "meta", js: "meta", typ: r$1("PrivateChannelEventListenerAddedBridgeRequestMeta") },
1374 { json: "payload", js: "payload", typ: r$1("PrivateChannelEventListenerAddedBridgeRequestPayload") },
1375 { json: "type", js: "type", typ: r$1("PrivateChannelEventListenerAddedAgentRequestType") },
1376 ], false),
1377 "PrivateChannelEventListenerAddedBridgeRequestMeta": o$1([
1378 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1379 { json: "requestUuid", js: "requestUuid", typ: "" },
1380 { json: "source", js: "source", typ: r$1("MetaSource") },
1381 { json: "timestamp", js: "timestamp", typ: Date },
1382 ], false),
1383 "PrivateChannelEventListenerAddedBridgeRequestPayload": o$1([
1384 { json: "channelId", js: "channelId", typ: "" },
1385 { json: "listenerType", js: "listenerType", typ: r$1("PrivateChannelEventListenerTypes") },
1386 ], false),
1387 "PrivateChannelEventListenerRemovedAgentRequest": o$1([
1388 { json: "meta", js: "meta", typ: r$1("PrivateChannelEventListenerRemovedAgentRequestMeta") },
1389 { json: "payload", js: "payload", typ: r$1("PrivateChannelEventListenerRemovedAgentRequestPayload") },
1390 { json: "type", js: "type", typ: r$1("PrivateChannelEventListenerRemovedAgentRequestType") },
1391 ], false),
1392 "PrivateChannelEventListenerRemovedAgentRequestMeta": o$1([
1393 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1394 { json: "requestUuid", js: "requestUuid", typ: "" },
1395 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1396 { json: "timestamp", js: "timestamp", typ: Date },
1397 ], false),
1398 "PrivateChannelEventListenerRemovedAgentRequestPayload": o$1([
1399 { json: "channelId", js: "channelId", typ: "" },
1400 { json: "listenerType", js: "listenerType", typ: r$1("PrivateChannelEventListenerTypes") },
1401 ], false),
1402 "PrivateChannelEventListenerRemovedBridgeRequest": o$1([
1403 { json: "meta", js: "meta", typ: r$1("PrivateChannelEventListenerRemovedBridgeRequestMeta") },
1404 { json: "payload", js: "payload", typ: r$1("PrivateChannelEventListenerRemovedBridgeRequestPayload") },
1405 { json: "type", js: "type", typ: r$1("PrivateChannelEventListenerRemovedAgentRequestType") },
1406 ], false),
1407 "PrivateChannelEventListenerRemovedBridgeRequestMeta": o$1([
1408 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1409 { json: "requestUuid", js: "requestUuid", typ: "" },
1410 { json: "source", js: "source", typ: r$1("MetaSource") },
1411 { json: "timestamp", js: "timestamp", typ: Date },
1412 ], false),
1413 "PrivateChannelEventListenerRemovedBridgeRequestPayload": o$1([
1414 { json: "channelId", js: "channelId", typ: "" },
1415 { json: "listenerType", js: "listenerType", typ: r$1("PrivateChannelEventListenerTypes") },
1416 ], false),
1417 "PrivateChannelOnAddContextListenerAgentRequest": o$1([
1418 { json: "meta", js: "meta", typ: r$1("PrivateChannelOnAddContextListenerAgentRequestMeta") },
1419 { json: "payload", js: "payload", typ: r$1("PrivateChannelOnAddContextListenerAgentRequestPayload") },
1420 { json: "type", js: "type", typ: r$1("PrivateChannelOnAddContextListenerAgentRequestType") },
1421 ], false),
1422 "PrivateChannelOnAddContextListenerAgentRequestMeta": o$1([
1423 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1424 { json: "requestUuid", js: "requestUuid", typ: "" },
1425 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1426 { json: "timestamp", js: "timestamp", typ: Date },
1427 ], false),
1428 "PrivateChannelOnAddContextListenerAgentRequestPayload": o$1([
1429 { json: "channelId", js: "channelId", typ: "" },
1430 { json: "contextType", js: "contextType", typ: u$1(null, "") },
1431 ], false),
1432 "PrivateChannelOnAddContextListenerBridgeRequest": o$1([
1433 { json: "meta", js: "meta", typ: r$1("PrivateChannelOnAddContextListenerBridgeRequestMeta") },
1434 { json: "payload", js: "payload", typ: r$1("PrivateChannelOnAddContextListenerBridgeRequestPayload") },
1435 { json: "type", js: "type", typ: r$1("PrivateChannelOnAddContextListenerAgentRequestType") },
1436 ], false),
1437 "PrivateChannelOnAddContextListenerBridgeRequestMeta": o$1([
1438 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1439 { json: "requestUuid", js: "requestUuid", typ: "" },
1440 { json: "source", js: "source", typ: r$1("MetaSource") },
1441 { json: "timestamp", js: "timestamp", typ: Date },
1442 ], false),
1443 "PrivateChannelOnAddContextListenerBridgeRequestPayload": o$1([
1444 { json: "channelId", js: "channelId", typ: "" },
1445 { json: "contextType", js: "contextType", typ: u$1(null, "") },
1446 ], false),
1447 "PrivateChannelOnDisconnectAgentRequest": o$1([
1448 { json: "meta", js: "meta", typ: r$1("PrivateChannelOnDisconnectAgentRequestMeta") },
1449 { json: "payload", js: "payload", typ: r$1("PrivateChannelOnDisconnectAgentRequestPayload") },
1450 { json: "type", js: "type", typ: r$1("PrivateChannelOnDisconnectAgentRequestType") },
1451 ], false),
1452 "PrivateChannelOnDisconnectAgentRequestMeta": o$1([
1453 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1454 { json: "requestUuid", js: "requestUuid", typ: "" },
1455 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1456 { json: "timestamp", js: "timestamp", typ: Date },
1457 ], false),
1458 "PrivateChannelOnDisconnectAgentRequestPayload": o$1([
1459 { json: "channelId", js: "channelId", typ: "" },
1460 ], false),
1461 "PrivateChannelOnDisconnectBridgeRequest": o$1([
1462 { json: "meta", js: "meta", typ: r$1("PrivateChannelOnDisconnectBridgeRequestMeta") },
1463 { json: "payload", js: "payload", typ: r$1("PrivateChannelOnDisconnectBridgeRequestPayload") },
1464 { json: "type", js: "type", typ: r$1("PrivateChannelOnDisconnectAgentRequestType") },
1465 ], false),
1466 "PrivateChannelOnDisconnectBridgeRequestMeta": o$1([
1467 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1468 { json: "requestUuid", js: "requestUuid", typ: "" },
1469 { json: "source", js: "source", typ: r$1("MetaSource") },
1470 { json: "timestamp", js: "timestamp", typ: Date },
1471 ], false),
1472 "PrivateChannelOnDisconnectBridgeRequestPayload": o$1([
1473 { json: "channelId", js: "channelId", typ: "" },
1474 ], false),
1475 "PrivateChannelOnUnsubscribeAgentRequest": o$1([
1476 { json: "meta", js: "meta", typ: r$1("PrivateChannelOnUnsubscribeAgentRequestMeta") },
1477 { json: "payload", js: "payload", typ: r$1("PrivateChannelOnUnsubscribeAgentRequestPayload") },
1478 { json: "type", js: "type", typ: r$1("PrivateChannelOnUnsubscribeAgentRequestType") },
1479 ], false),
1480 "PrivateChannelOnUnsubscribeAgentRequestMeta": o$1([
1481 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1482 { json: "requestUuid", js: "requestUuid", typ: "" },
1483 { json: "source", js: "source", typ: u$1(undefined, r$1("SourceObject")) },
1484 { json: "timestamp", js: "timestamp", typ: Date },
1485 ], false),
1486 "PrivateChannelOnUnsubscribeAgentRequestPayload": o$1([
1487 { json: "channelId", js: "channelId", typ: "" },
1488 { json: "contextType", js: "contextType", typ: u$1(null, "") },
1489 ], false),
1490 "PrivateChannelOnUnsubscribeBridgeRequest": o$1([
1491 { json: "meta", js: "meta", typ: r$1("ERequestMetadata") },
1492 { json: "payload", js: "payload", typ: r$1("PrivateChannelOnUnsubscribeBridgeRequestPayload") },
1493 { json: "type", js: "type", typ: r$1("PrivateChannelOnUnsubscribeAgentRequestType") },
1494 ], false),
1495 "ERequestMetadata": o$1([
1496 { json: "destination", js: "destination", typ: u$1(undefined, r$1("MetaDestination")) },
1497 { json: "requestUuid", js: "requestUuid", typ: "" },
1498 { json: "source", js: "source", typ: r$1("MetaSource") },
1499 { json: "timestamp", js: "timestamp", typ: Date },
1500 ], false),
1501 "PrivateChannelOnUnsubscribeBridgeRequestPayload": o$1([
1502 { json: "channelId", js: "channelId", typ: "" },
1503 { json: "contextType", js: "contextType", typ: u$1(null, "") },
1504 ], false),
1505 "RaiseIntentAgentErrorResponse": o$1([
1506 { json: "meta", js: "meta", typ: r$1("RaiseIntentAgentErrorResponseMeta") },
1507 { json: "payload", js: "payload", typ: r$1("RaiseIntentAgentErrorResponsePayload") },
1508 { json: "type", js: "type", typ: r$1("RaiseIntentAgentErrorResponseType") },
1509 ], false),
1510 "RaiseIntentAgentErrorResponseMeta": o$1([
1511 { json: "requestUuid", js: "requestUuid", typ: "" },
1512 { json: "responseUuid", js: "responseUuid", typ: "" },
1513 { json: "timestamp", js: "timestamp", typ: Date },
1514 ], false),
1515 "RaiseIntentAgentErrorResponsePayload": o$1([
1516 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1517 ], false),
1518 "RaiseIntentAgentRequest": o$1([
1519 { json: "meta", js: "meta", typ: r$1("RaiseIntentAgentRequestMeta") },
1520 { json: "payload", js: "payload", typ: r$1("RaiseIntentAgentRequestPayload") },
1521 { json: "type", js: "type", typ: r$1("RaiseIntentAgentRequestType") },
1522 ], false),
1523 "RaiseIntentAgentRequestMeta": o$1([
1524 { json: "destination", js: "destination", typ: r$1("MetaDestination") },
1525 { json: "requestUuid", js: "requestUuid", typ: "" },
1526 { json: "source", js: "source", typ: r$1("SourceObject") },
1527 { json: "timestamp", js: "timestamp", typ: Date },
1528 ], false),
1529 "RaiseIntentAgentRequestPayload": o$1([
1530 { json: "app", js: "app", typ: r$1("AppDestinationIdentifier") },
1531 { json: "context", js: "context", typ: r$1("Context") },
1532 { json: "intent", js: "intent", typ: "" },
1533 ], false),
1534 "AppDestinationIdentifier": o$1([
1535 { json: "desktopAgent", js: "desktopAgent", typ: "" },
1536 { json: "appId", js: "appId", typ: "" },
1537 { json: "instanceId", js: "instanceId", typ: u$1(undefined, "") },
1538 ], "any"),
1539 "RaiseIntentAgentResponse": o$1([
1540 { json: "meta", js: "meta", typ: r$1("RaiseIntentAgentResponseMeta") },
1541 { json: "payload", js: "payload", typ: r$1("RaiseIntentAgentResponsePayload") },
1542 { json: "type", js: "type", typ: r$1("RaiseIntentAgentErrorResponseType") },
1543 ], false),
1544 "RaiseIntentAgentResponseMeta": o$1([
1545 { json: "requestUuid", js: "requestUuid", typ: "" },
1546 { json: "responseUuid", js: "responseUuid", typ: "" },
1547 { json: "timestamp", js: "timestamp", typ: Date },
1548 ], false),
1549 "RaiseIntentAgentResponsePayload": o$1([
1550 { json: "intentResolution", js: "intentResolution", typ: r$1("IntentResolution") },
1551 ], false),
1552 "IntentResolution": o$1([
1553 { json: "intent", js: "intent", typ: "" },
1554 { json: "source", js: "source", typ: r$1("AppIdentifier") },
1555 ], false),
1556 "RaiseIntentBridgeErrorResponse": o$1([
1557 { json: "meta", js: "meta", typ: r$1("RaiseIntentBridgeErrorResponseMeta") },
1558 { json: "payload", js: "payload", typ: r$1("RaiseIntentBridgeErrorResponsePayload") },
1559 { json: "type", js: "type", typ: r$1("RaiseIntentAgentErrorResponseType") },
1560 ], false),
1561 "RaiseIntentBridgeErrorResponseMeta": o$1([
1562 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
1563 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
1564 { json: "requestUuid", js: "requestUuid", typ: "" },
1565 { json: "responseUuid", js: "responseUuid", typ: "" },
1566 { json: "timestamp", js: "timestamp", typ: Date },
1567 ], false),
1568 "RaiseIntentBridgeErrorResponsePayload": o$1([
1569 { json: "error", js: "error", typ: r$1("FindInstancesErrors") },
1570 ], false),
1571 "RaiseIntentBridgeRequest": o$1([
1572 { json: "meta", js: "meta", typ: r$1("RaiseIntentBridgeRequestMeta") },
1573 { json: "payload", js: "payload", typ: r$1("RaiseIntentBridgeRequestPayload") },
1574 { json: "type", js: "type", typ: r$1("RaiseIntentAgentRequestType") },
1575 ], false),
1576 "RaiseIntentBridgeRequestMeta": o$1([
1577 { json: "destination", js: "destination", typ: r$1("MetaDestination") },
1578 { json: "requestUuid", js: "requestUuid", typ: "" },
1579 { json: "source", js: "source", typ: r$1("MetaSource") },
1580 { json: "timestamp", js: "timestamp", typ: Date },
1581 ], false),
1582 "RaiseIntentBridgeRequestPayload": o$1([
1583 { json: "app", js: "app", typ: r$1("AppDestinationIdentifier") },
1584 { json: "context", js: "context", typ: r$1("Context") },
1585 { json: "intent", js: "intent", typ: "" },
1586 ], false),
1587 "RaiseIntentBridgeResponse": o$1([
1588 { json: "meta", js: "meta", typ: r$1("RaiseIntentBridgeResponseMeta") },
1589 { json: "payload", js: "payload", typ: r$1("RaiseIntentBridgeResponsePayload") },
1590 { json: "type", js: "type", typ: r$1("RaiseIntentAgentErrorResponseType") },
1591 ], false),
1592 "RaiseIntentBridgeResponseMeta": o$1([
1593 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
1594 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1595 { json: "requestUuid", js: "requestUuid", typ: "" },
1596 { json: "responseUuid", js: "responseUuid", typ: "" },
1597 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1598 { json: "timestamp", js: "timestamp", typ: Date },
1599 ], false),
1600 "RaiseIntentBridgeResponsePayload": o$1([
1601 { json: "intentResolution", js: "intentResolution", typ: r$1("IntentResolution") },
1602 ], false),
1603 "RaiseIntentResultAgentErrorResponse": o$1([
1604 { json: "meta", js: "meta", typ: r$1("RaiseIntentResultAgentErrorResponseMeta") },
1605 { json: "payload", js: "payload", typ: r$1("RaiseIntentResultAgentErrorResponsePayload") },
1606 { json: "type", js: "type", typ: r$1("RaiseIntentResultAgentErrorResponseType") },
1607 ], false),
1608 "RaiseIntentResultAgentErrorResponseMeta": o$1([
1609 { json: "requestUuid", js: "requestUuid", typ: "" },
1610 { json: "responseUuid", js: "responseUuid", typ: "" },
1611 { json: "timestamp", js: "timestamp", typ: Date },
1612 ], false),
1613 "RaiseIntentResultAgentErrorResponsePayload": o$1([
1614 { json: "error", js: "error", typ: r$1("RaiseIntentResultErrorMessage") },
1615 ], false),
1616 "RaiseIntentResultAgentResponse": o$1([
1617 { json: "meta", js: "meta", typ: r$1("RaiseIntentResultAgentResponseMeta") },
1618 { json: "payload", js: "payload", typ: r$1("RaiseIntentResultAgentResponsePayload") },
1619 { json: "type", js: "type", typ: r$1("RaiseIntentResultAgentErrorResponseType") },
1620 ], false),
1621 "RaiseIntentResultAgentResponseMeta": o$1([
1622 { json: "requestUuid", js: "requestUuid", typ: "" },
1623 { json: "responseUuid", js: "responseUuid", typ: "" },
1624 { json: "timestamp", js: "timestamp", typ: Date },
1625 ], false),
1626 "RaiseIntentResultAgentResponsePayload": o$1([
1627 { json: "intentResult", js: "intentResult", typ: r$1("IntentResult") },
1628 ], false),
1629 "IntentResult": o$1([
1630 { json: "context", js: "context", typ: u$1(undefined, r$1("Context")) },
1631 { json: "channel", js: "channel", typ: u$1(undefined, r$1("Channel")) },
1632 ], false),
1633 "Channel": o$1([
1634 { json: "displayMetadata", js: "displayMetadata", typ: u$1(undefined, r$1("DisplayMetadata")) },
1635 { json: "id", js: "id", typ: "" },
1636 { json: "type", js: "type", typ: r$1("Type") },
1637 ], false),
1638 "DisplayMetadata": o$1([
1639 { json: "color", js: "color", typ: u$1(undefined, "") },
1640 { json: "glyph", js: "glyph", typ: u$1(undefined, "") },
1641 { json: "name", js: "name", typ: u$1(undefined, "") },
1642 ], false),
1643 "RaiseIntentResultBridgeErrorResponse": o$1([
1644 { json: "meta", js: "meta", typ: r$1("RaiseIntentResultBridgeErrorResponseMeta") },
1645 { json: "payload", js: "payload", typ: r$1("RaiseIntentResultBridgeErrorResponsePayload") },
1646 { json: "type", js: "type", typ: r$1("RaiseIntentResultAgentErrorResponseType") },
1647 ], false),
1648 "RaiseIntentResultBridgeErrorResponseMeta": o$1([
1649 { json: "errorDetails", js: "errorDetails", typ: a$1(r$1("ResponseErrorDetail")) },
1650 { json: "errorSources", js: "errorSources", typ: a$1(r$1("DesktopAgentIdentifier")) },
1651 { json: "requestUuid", js: "requestUuid", typ: "" },
1652 { json: "responseUuid", js: "responseUuid", typ: "" },
1653 { json: "timestamp", js: "timestamp", typ: Date },
1654 ], false),
1655 "RaiseIntentResultBridgeErrorResponsePayload": o$1([
1656 { json: "error", js: "error", typ: r$1("RaiseIntentResultErrorMessage") },
1657 ], false),
1658 "RaiseIntentResultBridgeResponse": o$1([
1659 { json: "meta", js: "meta", typ: r$1("RaiseIntentResultBridgeResponseMeta") },
1660 { json: "payload", js: "payload", typ: r$1("RaiseIntentResultBridgeResponsePayload") },
1661 { json: "type", js: "type", typ: r$1("RaiseIntentResultAgentErrorResponseType") },
1662 ], false),
1663 "RaiseIntentResultBridgeResponseMeta": o$1([
1664 { json: "errorDetails", js: "errorDetails", typ: u$1(undefined, a$1(r$1("ResponseErrorDetail"))) },
1665 { json: "errorSources", js: "errorSources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1666 { json: "requestUuid", js: "requestUuid", typ: "" },
1667 { json: "responseUuid", js: "responseUuid", typ: "" },
1668 { json: "sources", js: "sources", typ: u$1(undefined, a$1(r$1("DesktopAgentIdentifier"))) },
1669 { json: "timestamp", js: "timestamp", typ: Date },
1670 ], false),
1671 "RaiseIntentResultBridgeResponsePayload": o$1([
1672 { json: "intentResult", js: "intentResult", typ: r$1("IntentResult") },
1673 ], false),
1674 "ResponseErrorDetail": [
1675 "AccessDenied",
1676 "AgentDisconnected",
1677 "AppNotFound",
1678 "AppTimeout",
1679 "CreationFailed",
1680 "DesktopAgentNotFound",
1681 "ErrorOnLaunch",
1682 "IntentDeliveryFailed",
1683 "IntentHandlerRejected",
1684 "MalformedContext",
1685 "MalformedMessage",
1686 "NoAppsFound",
1687 "NoChannelFound",
1688 "NoResultReturned",
1689 "NotConnectedToBridge",
1690 "ResolverTimeout",
1691 "ResolverUnavailable",
1692 "ResponseToBridgeTimedOut",
1693 "TargetAppUnavailable",
1694 "TargetInstanceUnavailable",
1695 "UserCancelledResolution",
1696 ],
1697 "ResponseMessageType": [
1698 "findInstancesResponse",
1699 "findIntentResponse",
1700 "findIntentsByContextResponse",
1701 "getAppMetadataResponse",
1702 "openResponse",
1703 "raiseIntentResponse",
1704 "raiseIntentResultResponse",
1705 ],
1706 "RequestMessageType": [
1707 "broadcastRequest",
1708 "findInstancesRequest",
1709 "findIntentRequest",
1710 "findIntentsByContextRequest",
1711 "getAppMetadataRequest",
1712 "openRequest",
1713 "PrivateChannel.broadcast",
1714 "PrivateChannel.eventListenerAdded",
1715 "PrivateChannel.eventListenerRemoved",
1716 "PrivateChannel.onAddContextListener",
1717 "PrivateChannel.onDisconnect",
1718 "PrivateChannel.onUnsubscribe",
1719 "raiseIntentRequest",
1720 ],
1721 "BroadcastAgentRequestType": [
1722 "broadcastRequest",
1723 ],
1724 "ConnectionStepMessageType": [
1725 "authenticationFailed",
1726 "connectedAgentsUpdate",
1727 "handshake",
1728 "hello",
1729 ],
1730 "ConnectionStep2HelloType": [
1731 "hello",
1732 ],
1733 "ConnectionStep3HandshakeType": [
1734 "handshake",
1735 ],
1736 "ConnectionStep4AuthenticationFailedType": [
1737 "authenticationFailed",
1738 ],
1739 "ConnectionStep6ConnectedAgentsUpdateType": [
1740 "connectedAgentsUpdate",
1741 ],
1742 "FindInstancesErrors": [
1743 "AgentDisconnected",
1744 "DesktopAgentNotFound",
1745 "IntentDeliveryFailed",
1746 "MalformedContext",
1747 "MalformedMessage",
1748 "NoAppsFound",
1749 "NotConnectedToBridge",
1750 "ResolverTimeout",
1751 "ResolverUnavailable",
1752 "ResponseToBridgeTimedOut",
1753 "TargetAppUnavailable",
1754 "TargetInstanceUnavailable",
1755 "UserCancelledResolution",
1756 ],
1757 "FindInstancesAgentErrorResponseType": [
1758 "findInstancesResponse",
1759 ],
1760 "FindInstancesAgentRequestType": [
1761 "findInstancesRequest",
1762 ],
1763 "FindIntentAgentErrorResponseType": [
1764 "findIntentResponse",
1765 ],
1766 "FindIntentAgentRequestType": [
1767 "findIntentRequest",
1768 ],
1769 "FindIntentsByContextAgentErrorResponseType": [
1770 "findIntentsByContextResponse",
1771 ],
1772 "FindIntentsByContextAgentRequestType": [
1773 "findIntentsByContextRequest",
1774 ],
1775 "GetAppMetadataAgentErrorResponseType": [
1776 "getAppMetadataResponse",
1777 ],
1778 "GetAppMetadataAgentRequestType": [
1779 "getAppMetadataRequest",
1780 ],
1781 "OpenErrorResponsePayload": [
1782 "AgentDisconnected",
1783 "AppNotFound",
1784 "AppTimeout",
1785 "DesktopAgentNotFound",
1786 "ErrorOnLaunch",
1787 "MalformedContext",
1788 "MalformedMessage",
1789 "NotConnectedToBridge",
1790 "ResolverUnavailable",
1791 "ResponseToBridgeTimedOut",
1792 ],
1793 "OpenAgentErrorResponseType": [
1794 "openResponse",
1795 ],
1796 "OpenAgentRequestType": [
1797 "openRequest",
1798 ],
1799 "PrivateChannelBroadcastAgentRequestType": [
1800 "PrivateChannel.broadcast",
1801 ],
1802 "PrivateChannelEventListenerTypes": [
1803 "onAddContextListener",
1804 "onDisconnect",
1805 "onUnsubscribe",
1806 ],
1807 "PrivateChannelEventListenerAddedAgentRequestType": [
1808 "PrivateChannel.eventListenerAdded",
1809 ],
1810 "PrivateChannelEventListenerRemovedAgentRequestType": [
1811 "PrivateChannel.eventListenerRemoved",
1812 ],
1813 "PrivateChannelOnAddContextListenerAgentRequestType": [
1814 "PrivateChannel.onAddContextListener",
1815 ],
1816 "PrivateChannelOnDisconnectAgentRequestType": [
1817 "PrivateChannel.onDisconnect",
1818 ],
1819 "PrivateChannelOnUnsubscribeAgentRequestType": [
1820 "PrivateChannel.onUnsubscribe",
1821 ],
1822 "RaiseIntentAgentErrorResponseType": [
1823 "raiseIntentResponse",
1824 ],
1825 "RaiseIntentAgentRequestType": [
1826 "raiseIntentRequest",
1827 ],
1828 "RaiseIntentResultErrorMessage": [
1829 "AgentDisconnected",
1830 "IntentHandlerRejected",
1831 "MalformedMessage",
1832 "NoResultReturned",
1833 "NotConnectedToBridge",
1834 "ResponseToBridgeTimedOut",
1835 ],
1836 "RaiseIntentResultAgentErrorResponseType": [
1837 "raiseIntentResultResponse",
1838 ],
1839 "Type": [
1840 "app",
1841 "private",
1842 "user",
1843 ],
1844};
1845
1846var BridgingTypes = {
1847 __proto__: null,
1848 Convert: Convert$1
1849};
1850
1851/**
1852 * SPDX-License-Identifier: Apache-2.0
1853 * Copyright FINOS FDC3 contributors - see NOTICE file
1854 */
1855/** Constants representing the errors that can be encountered when calling the `open` method on the DesktopAgent object (`fdc3`). */
1856exports.OpenError = void 0;
1857(function (OpenError) {
1858 /** Returned if the specified application is not found.*/
1859 OpenError["AppNotFound"] = "AppNotFound";
1860 /** Returned if the specified application fails to launch correctly.*/
1861 OpenError["ErrorOnLaunch"] = "ErrorOnLaunch";
1862 /** Returned if the specified application launches but fails to add a context listener in order to receive the context passed to the `fdc3.open` call.*/
1863 OpenError["AppTimeout"] = "AppTimeout";
1864 /** Returned if the FDC3 desktop agent implementation is not currently able to handle the request.*/
1865 OpenError["ResolverUnavailable"] = "ResolverUnavailable";
1866 /** Returned if a call to the `open` function is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/
1867 OpenError["MalformedContext"] = "MalformedContext";
1868 /** @experimental Returned if the specified Desktop Agent is not found, via a connected Desktop Agent Bridge.*/
1869 OpenError["DesktopAgentNotFound"] = "DesktopAgentNotFound";
1870})(exports.OpenError || (exports.OpenError = {}));
1871/** Constants representing the errors that can be encountered when calling the `findIntent`, `findIntentsByContext`, `raiseIntent` or `raiseIntentForContext` methods on the DesktopAgent (`fdc3`). */
1872exports.ResolveError = void 0;
1873(function (ResolveError) {
1874 /** SHOULD be returned if no apps are available that can resolve the intent and context combination.*/
1875 ResolveError["NoAppsFound"] = "NoAppsFound";
1876 /** Returned if the FDC3 desktop agent implementation is not currently able to handle the request.*/
1877 ResolveError["ResolverUnavailable"] = "ResolverUnavailable";
1878 /** Returned if the user cancelled the resolution request, for example by closing or cancelling a resolver UI.*/
1879 ResolveError["UserCancelled"] = "UserCancelledResolution";
1880 /** SHOULD be returned if a timeout cancels an intent resolution that required user interaction. Please use `ResolverUnavailable` instead for situations where a resolver UI or similar fails.*/
1881 ResolveError["ResolverTimeout"] = "ResolverTimeout";
1882 /** Returned if a specified target application is not available or a new instance of it cannot be opened. */
1883 ResolveError["TargetAppUnavailable"] = "TargetAppUnavailable";
1884 /** Returned if a specified target application instance is not available, for example because it has been closed. */
1885 ResolveError["TargetInstanceUnavailable"] = "TargetInstanceUnavailable";
1886 /** Returned if the intent and context could not be delivered to the selected application or instance, for example because it has not added an intent handler within a timeout.*/
1887 ResolveError["IntentDeliveryFailed"] = "IntentDeliveryFailed";
1888 /** Returned if a call to one of the `raiseIntent` functions is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/
1889 ResolveError["MalformedContext"] = "MalformedContext";
1890 /** @experimental Returned if the specified Desktop Agent is not found, via a connected Desktop Agent Bridge.*/
1891 ResolveError["DesktopAgentNotFound"] = "DesktopAgentNotFound";
1892})(exports.ResolveError || (exports.ResolveError = {}));
1893exports.ResultError = void 0;
1894(function (ResultError) {
1895 /** Returned if the intent handler exited without returning a valid result (a promise resolving to a Context, Channel object or void). */
1896 ResultError["NoResultReturned"] = "NoResultReturned";
1897 /** Returned if the Intent handler function processing the raised intent throws an error or rejects the Promise it returned. */
1898 ResultError["IntentHandlerRejected"] = "IntentHandlerRejected";
1899})(exports.ResultError || (exports.ResultError = {}));
1900exports.ChannelError = void 0;
1901(function (ChannelError) {
1902 /** Returned if the specified channel is not found when attempting to join a channel via the `joinUserChannel` function of the DesktopAgent (`fdc3`).*/
1903 ChannelError["NoChannelFound"] = "NoChannelFound";
1904 /** SHOULD be returned when a request to join a user channel or to a retrieve a Channel object via the `joinUserChannel` or `getOrCreateChannel` methods of the DesktopAgent (`fdc3`) object is denied. */
1905 ChannelError["AccessDenied"] = "AccessDenied";
1906 /** SHOULD be returned when a channel cannot be created or retrieved via the `getOrCreateChannel` method of the DesktopAgent (`fdc3`).*/
1907 ChannelError["CreationFailed"] = "CreationFailed";
1908 /** Returned if a call to the `broadcast` functions is made with an invalid context argument. Contexts should be Objects with at least a `type` field that has a `string` value.*/
1909 ChannelError["MalformedContext"] = "MalformedContext";
1910})(exports.ChannelError || (exports.ChannelError = {}));
1911exports.BridgingError = void 0;
1912(function (BridgingError) {
1913 /** @experimental Returned if a Desktop Agent did not return a response, via Desktop Agent Bridging, within the alloted timeout. */
1914 BridgingError["ResponseTimedOut"] = "ResponseToBridgeTimedOut";
1915 /** @experimental Returned if a Desktop Agent that has been targeted by a particular request has been disconnected from the Bridge before a response has been received from it. */
1916 BridgingError["AgentDisconnected"] = "AgentDisconnected";
1917 /** @experimental Returned for FDC3 API calls that are specified with arguments indicating that a remote Desktop agent should be targeted (e.g. raiseIntent with an app on a remote DesktopAgent targeted), when the local Desktop Agent is not connected to a bridge. */
1918 BridgingError["NotConnectedToBridge"] = "NotConnectedToBridge";
1919 /** @experimental Returned if a message to a Bridge deviates from the schema for that message sufficiently that it could not be processed. */
1920 BridgingError["MalformedMessage"] = "MalformedMessage";
1921})(exports.BridgingError || (exports.BridgingError = {}));
1922
1923/******************************************************************************
1924Copyright (c) Microsoft Corporation.
1925
1926Permission to use, copy, modify, and/or distribute this software for any
1927purpose with or without fee is hereby granted.
1928
1929THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1930REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1931AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1932INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1933LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1934OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1935PERFORMANCE OF THIS SOFTWARE.
1936***************************************************************************** */
1937/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1938
1939
1940function __awaiter(thisArg, _arguments, P, generator) {
1941 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1942 return new (P || (P = Promise))(function (resolve, reject) {
1943 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1944 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1945 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1946 step((generator = generator.apply(thisArg, _arguments || [])).next());
1947 });
1948}
1949
1950function __generator(thisArg, body) {
1951 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
1952 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1953 function verb(n) { return function (v) { return step([n, v]); }; }
1954 function step(op) {
1955 if (f) throw new TypeError("Generator is already executing.");
1956 while (g && (g = 0, op[0] && (_ = 0)), _) try {
1957 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1958 if (y = 0, t) op = [op[0] & 2, t.value];
1959 switch (op[0]) {
1960 case 0: case 1: t = op; break;
1961 case 4: _.label++; return { value: op[1], done: false };
1962 case 5: _.label++; y = op[1]; op = [0]; continue;
1963 case 7: op = _.ops.pop(); _.trys.pop(); continue;
1964 default:
1965 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1966 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1967 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1968 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1969 if (t[2]) _.ops.pop();
1970 _.trys.pop(); continue;
1971 }
1972 op = body.call(thisArg, _);
1973 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1974 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1975 }
1976}
1977
1978function __spreadArray(to, from, pack) {
1979 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1980 if (ar || !(i in from)) {
1981 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1982 ar[i] = from[i];
1983 }
1984 }
1985 return to.concat(ar || Array.prototype.slice.call(from));
1986}
1987
1988typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1989 var e = new Error(message);
1990 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1991};
1992
1993/**
1994 * Ensures at compile time that the given string tuple is exhaustive on a given union type, i.e. contains ALL possible values of the given UNION_TYPE.
1995 */
1996var exhaustiveStringTuple = function () { return function () {
1997 var tuple = [];
1998 for (var _i = 0; _i < arguments.length; _i++) {
1999 tuple[_i] = arguments[_i];
2000 }
2001 return tuple;
2002}; };
2003
2004var STANDARD_CONTEXT_TYPES = exhaustiveStringTuple()('fdc3.action', 'fdc3.chart', 'fdc3.chat.initSettings', 'fdc3.chat.message', 'fdc3.chat.room', 'fdc3.chat.searchCriteria', 'fdc3.contact', 'fdc3.contactList', 'fdc3.country', 'fdc3.currency', 'fdc3.email', 'fdc3.instrument', 'fdc3.instrumentList', 'fdc3.interaction', 'fdc3.message', 'fdc3.organization', 'fdc3.portfolio', 'fdc3.position', 'fdc3.nothing', 'fdc3.timeRange', 'fdc3.transactionResult', 'fdc3.valuation');
2005// used internally to check if a given intent/context is a standard one
2006var StandardContextsSet = new Set(STANDARD_CONTEXT_TYPES);
2007
2008var STANDARD_INTENTS = exhaustiveStringTuple()('CreateInteraction', 'SendChatMessage', 'StartCall', 'StartChat', 'StartEmail', 'ViewAnalysis', 'ViewChat', 'ViewChart', 'ViewContact', 'ViewHoldings', 'ViewInstrument', 'ViewInteractions', 'ViewMessages', 'ViewNews', 'ViewOrders', 'ViewProfile', 'ViewQuote', 'ViewResearch');
2009// used internally to check if a given intent/context is a standard one
2010var StandardIntentsSet = new Set(STANDARD_INTENTS);
2011
2012var DEFAULT_TIMEOUT = 5000;
2013var UnavailableError = new Error('FDC3 DesktopAgent not available at `window.fdc3`.');
2014var TimeoutError = new Error('Timed out waiting for `fdc3Ready` event.');
2015var UnexpectedError = new Error('`fdc3Ready` event fired, but `window.fdc3` not set to DesktopAgent.');
2016function rejectIfNoGlobal(f) {
2017 return window.fdc3 ? f() : Promise.reject(UnavailableError);
2018}
2019/**
2020 * Utility function that returns a promise that will resolve immeadiately
2021 * if the desktop agent API is found at `window.fdc3`. If the API is found,
2022 * the promise will resolve when the `fdc3Ready` event is received or if it
2023 * is found at the end of the specified timeout. If the API is not found, it
2024 * will reject with an error.
2025 *
2026 * ```javascript
2027 * await fdc3Ready();
2028 * const intentListener = await addIntentListener("ViewChart", intentHandlerFn);
2029 * ```
2030 *
2031 * @param waitForMs The number of milliseconds to wait for the FDC3 API to be
2032 * ready. Defaults to 5 seconds.
2033 */
2034var fdc3Ready = function () {
2035 var args_1 = [];
2036 for (var _i = 0; _i < arguments.length; _i++) {
2037 args_1[_i] = arguments[_i];
2038 }
2039 return __awaiter(void 0, __spreadArray([], args_1, true), void 0, function (waitForMs) {
2040 if (waitForMs === void 0) { waitForMs = DEFAULT_TIMEOUT; }
2041 return __generator(this, function (_a) {
2042 return [2 /*return*/, new Promise(function (resolve, reject) {
2043 // if the global is already available resolve immediately
2044 if (window.fdc3) {
2045 resolve();
2046 }
2047 else {
2048 // if its not available setup a timeout to return a rejected promise
2049 var timeout_1 = setTimeout(function () { return (window.fdc3 ? resolve() : reject(TimeoutError)); }, waitForMs);
2050 // listen for the fdc3Ready event
2051 window.addEventListener('fdc3Ready', function () {
2052 clearTimeout(timeout_1);
2053 window.fdc3 ? resolve() : reject(UnexpectedError);
2054 }, { once: true });
2055 }
2056 })];
2057 });
2058 });
2059};
2060function isString(app) {
2061 return !!app && typeof app === 'string';
2062}
2063function open(app, context) {
2064 if (isString(app)) {
2065 return rejectIfNoGlobal(function () { return window.fdc3.open(app, context); });
2066 }
2067 else {
2068 return rejectIfNoGlobal(function () { return window.fdc3.open(app, context); });
2069 }
2070}
2071function findIntent(intent, context, resultType) {
2072 return rejectIfNoGlobal(function () { return window.fdc3.findIntent(intent, context, resultType); });
2073}
2074function findIntentsByContext(context, resultType) {
2075 return rejectIfNoGlobal(function () { return window.fdc3.findIntentsByContext(context, resultType); });
2076}
2077function broadcast(context) {
2078 return rejectIfNoGlobal(function () { return window.fdc3.broadcast(context); });
2079}
2080function raiseIntent(intent, context, app) {
2081 if (isString(app)) {
2082 return rejectIfNoGlobal(function () { return window.fdc3.raiseIntent(intent, context, app); });
2083 }
2084 else {
2085 return rejectIfNoGlobal(function () { return window.fdc3.raiseIntent(intent, context, app); });
2086 }
2087}
2088function raiseIntentForContext(context, app) {
2089 if (isString(app)) {
2090 return rejectIfNoGlobal(function () { return window.fdc3.raiseIntentForContext(context, app); });
2091 }
2092 else {
2093 return rejectIfNoGlobal(function () { return window.fdc3.raiseIntentForContext(context, app); });
2094 }
2095}
2096function addIntentListener(intent, handler) {
2097 return rejectIfNoGlobal(function () { return window.fdc3.addIntentListener(intent, handler); });
2098}
2099function addContextListener(contextTypeOrHandler, handler) {
2100 //Handle (deprecated) function signature that allowed contextType argument to be omitted
2101 if (typeof contextTypeOrHandler !== 'function') {
2102 return rejectIfNoGlobal(function () { return window.fdc3.addContextListener(contextTypeOrHandler, handler); });
2103 }
2104 else {
2105 return rejectIfNoGlobal(function () { return window.fdc3.addContextListener(null, contextTypeOrHandler); });
2106 }
2107}
2108function addEventListener(eventType, handler) {
2109 return rejectIfNoGlobal(function () { return window.fdc3.addEventListener(eventType, handler); });
2110}
2111function getUserChannels() {
2112 return rejectIfNoGlobal(function () {
2113 //fallback to getSystemChannels for FDC3 <2.0 implementations
2114 if (window.fdc3.getUserChannels) {
2115 return window.fdc3.getUserChannels();
2116 }
2117 else {
2118 return window.fdc3.getSystemChannels();
2119 }
2120 });
2121}
2122function getSystemChannels() {
2123 //fallforward to getUserChannels for FDC3 2.0+ implementations
2124 return getUserChannels();
2125}
2126function joinUserChannel(channelId) {
2127 return rejectIfNoGlobal(function () {
2128 //fallback to joinChannel for FDC3 <2.0 implementations
2129 if (window.fdc3.joinUserChannel) {
2130 return window.fdc3.joinUserChannel(channelId);
2131 }
2132 else {
2133 return window.fdc3.joinChannel(channelId);
2134 }
2135 });
2136}
2137function joinChannel(channelId) {
2138 //fallforward to joinUserChannel for FDC3 2.0+ implementations
2139 return joinUserChannel(channelId);
2140}
2141function getOrCreateChannel(channelId) {
2142 return rejectIfNoGlobal(function () { return window.fdc3.getOrCreateChannel(channelId); });
2143}
2144function getCurrentChannel() {
2145 return rejectIfNoGlobal(function () { return window.fdc3.getCurrentChannel(); });
2146}
2147function leaveCurrentChannel() {
2148 return rejectIfNoGlobal(function () { return window.fdc3.leaveCurrentChannel(); });
2149}
2150function createPrivateChannel() {
2151 return rejectIfNoGlobal(function () { return window.fdc3.createPrivateChannel(); });
2152}
2153function getInfo() {
2154 return rejectIfNoGlobal(function () { return window.fdc3.getInfo(); });
2155}
2156function getAppMetadata(app) {
2157 return rejectIfNoGlobal(function () { return window.fdc3.getAppMetadata(app); });
2158}
2159function findInstances(app) {
2160 return rejectIfNoGlobal(function () { return window.fdc3.findInstances(app); });
2161}
2162/**
2163 * Check if the given context is a standard context type.
2164 * @param contextType
2165 */
2166function isStandardContextType(contextType) {
2167 return StandardContextsSet.has(contextType);
2168}
2169/**
2170 * Check if the given intent is a standard intent.
2171 * @param intent
2172 */
2173function isStandardIntent(intent) {
2174 return StandardIntentsSet.has(intent);
2175}
2176/**
2177 * Compare numeric semver version number strings (in the form `1.2.3`).
2178 *
2179 * Returns `-1` if the first argument is a lower version number than the second,
2180 * `1` if the first argument is greater than the second, 0 if the arguments are
2181 * equal and `null` if an error occurred during the comparison.
2182 *
2183 * @param a
2184 * @param b
2185 */
2186var compareVersionNumbers = function (a, b) {
2187 try {
2188 var aVerArr = a.split('.').map(Number);
2189 var bVerArr = b.split('.').map(Number);
2190 for (var index = 0; index < Math.max(aVerArr.length, bVerArr.length); index++) {
2191 /* If one version number has more digits and the other does not, and they are otherwise equal,
2192 assume the longer is greater. E.g. 1.1.1 > 1.1 */
2193 if (index === aVerArr.length || aVerArr[index] < bVerArr[index]) {
2194 return -1;
2195 }
2196 else if (index === bVerArr.length || aVerArr[index] > bVerArr[index]) {
2197 return 1;
2198 }
2199 }
2200 return 0;
2201 }
2202 catch (e) {
2203 console.error('Failed to compare version strings', e);
2204 return null;
2205 }
2206};
2207/**
2208 * Check if the FDC3 version in an ImplementationMetadata object is greater than
2209 * or equal to the supplied numeric semver version number string (in the form `1.2.3`).
2210 *
2211 * Returns a boolean or null if an error occurred while comparing the version numbers.
2212 *
2213 * @param metadata
2214 * @param version
2215 */
2216var versionIsAtLeast = function (metadata, version) {
2217 var comparison = compareVersionNumbers(metadata.fdc3Version, version);
2218 return comparison === null ? null : comparison >= 0 ? true : false;
2219};
2220
2221/**
2222 * SPDX-License-Identifier: Apache-2.0
2223 * Copyright FINOS FDC3 contributors - see NOTICE file
2224 */
2225/**
2226 * @deprecated Use {@link StandardContextType} instead
2227 */
2228exports.ContextTypes = void 0;
2229(function (ContextTypes) {
2230 ContextTypes["Chart"] = "fdc3.chart";
2231 ContextTypes["ChatInitSettings"] = "fdc3.chat.initSettings";
2232 ContextTypes["ChatRoom"] = "fdc3.chat.room";
2233 ContextTypes["Contact"] = "fdc3.contact";
2234 ContextTypes["ContactList"] = "fdc3.contactList";
2235 ContextTypes["Country"] = "fdc3.country";
2236 ContextTypes["Currency"] = "fdc3.currency";
2237 ContextTypes["Email"] = "fdc3.email";
2238 ContextTypes["Instrument"] = "fdc3.instrument";
2239 ContextTypes["InstrumentList"] = "fdc3.instrumentList";
2240 ContextTypes["Interaction"] = "fdc3.interaction";
2241 ContextTypes["Nothing"] = "fdc3.nothing";
2242 ContextTypes["Organization"] = "fdc3.organization";
2243 ContextTypes["Portfolio"] = "fdc3.portfolio";
2244 ContextTypes["Position"] = "fdc3.position";
2245 ContextTypes["ChatSearchCriteria"] = "fdc3.chat.searchCriteria";
2246 ContextTypes["TimeRange"] = "fdc3.timeRange";
2247 ContextTypes["TransactionResult"] = "fdc3.transactionResult";
2248 ContextTypes["Valuation"] = "fdc3.valuation";
2249})(exports.ContextTypes || (exports.ContextTypes = {}));
2250
2251// To parse this data:
2252//
2253// import { Convert, Action, Chart, ChatInitSettings, ChatMessage, ChatRoom, ChatSearchCriteria, Contact, ContactList, Context, Country, Currency, Email, Instrument, InstrumentList, Interaction, Message, Nothing, Order, OrderList, Organization, Portfolio, Position, Product, TimeRange, Trade, TradeList, TransactionResult, Valuation } from "./file";
2254//
2255// const action = Convert.toAction(json);
2256// const chart = Convert.toChart(json);
2257// const chatInitSettings = Convert.toChatInitSettings(json);
2258// const chatMessage = Convert.toChatMessage(json);
2259// const chatRoom = Convert.toChatRoom(json);
2260// const chatSearchCriteria = Convert.toChatSearchCriteria(json);
2261// const contact = Convert.toContact(json);
2262// const contactList = Convert.toContactList(json);
2263// const context = Convert.toContext(json);
2264// const country = Convert.toCountry(json);
2265// const currency = Convert.toCurrency(json);
2266// const email = Convert.toEmail(json);
2267// const instrument = Convert.toInstrument(json);
2268// const instrumentList = Convert.toInstrumentList(json);
2269// const interaction = Convert.toInteraction(json);
2270// const message = Convert.toMessage(json);
2271// const nothing = Convert.toNothing(json);
2272// const order = Convert.toOrder(json);
2273// const orderList = Convert.toOrderList(json);
2274// const organization = Convert.toOrganization(json);
2275// const portfolio = Convert.toPortfolio(json);
2276// const position = Convert.toPosition(json);
2277// const product = Convert.toProduct(json);
2278// const timeRange = Convert.toTimeRange(json);
2279// const trade = Convert.toTrade(json);
2280// const tradeList = Convert.toTradeList(json);
2281// const transactionResult = Convert.toTransactionResult(json);
2282// const valuation = Convert.toValuation(json);
2283//
2284// These functions will throw an error if the JSON doesn't
2285// match the expected interface, even if the JSON is valid.
2286/**
2287 * Free text to be used for a keyword search
2288 *
2289 * `interactionType` SHOULD be one of `'Instant Message'`, `'Email'`, `'Call'`, or
2290 * `'Meeting'` although other string values are permitted.
2291 */
2292// Converts JSON strings to/from your types
2293// and asserts the results of JSON.parse at runtime
2294var Convert = /** @class */ (function () {
2295 function Convert() {
2296 }
2297 Convert.toAction = function (json) {
2298 return cast(JSON.parse(json), r("Action"));
2299 };
2300 Convert.actionToJson = function (value) {
2301 return JSON.stringify(uncast(value, r("Action")), null, 2);
2302 };
2303 Convert.toChart = function (json) {
2304 return cast(JSON.parse(json), r("Chart"));
2305 };
2306 Convert.chartToJson = function (value) {
2307 return JSON.stringify(uncast(value, r("Chart")), null, 2);
2308 };
2309 Convert.toChatInitSettings = function (json) {
2310 return cast(JSON.parse(json), r("ChatInitSettings"));
2311 };
2312 Convert.chatInitSettingsToJson = function (value) {
2313 return JSON.stringify(uncast(value, r("ChatInitSettings")), null, 2);
2314 };
2315 Convert.toChatMessage = function (json) {
2316 return cast(JSON.parse(json), r("ChatMessage"));
2317 };
2318 Convert.chatMessageToJson = function (value) {
2319 return JSON.stringify(uncast(value, r("ChatMessage")), null, 2);
2320 };
2321 Convert.toChatRoom = function (json) {
2322 return cast(JSON.parse(json), r("ChatRoom"));
2323 };
2324 Convert.chatRoomToJson = function (value) {
2325 return JSON.stringify(uncast(value, r("ChatRoom")), null, 2);
2326 };
2327 Convert.toChatSearchCriteria = function (json) {
2328 return cast(JSON.parse(json), r("ChatSearchCriteria"));
2329 };
2330 Convert.chatSearchCriteriaToJson = function (value) {
2331 return JSON.stringify(uncast(value, r("ChatSearchCriteria")), null, 2);
2332 };
2333 Convert.toContact = function (json) {
2334 return cast(JSON.parse(json), r("Contact"));
2335 };
2336 Convert.contactToJson = function (value) {
2337 return JSON.stringify(uncast(value, r("Contact")), null, 2);
2338 };
2339 Convert.toContactList = function (json) {
2340 return cast(JSON.parse(json), r("ContactList"));
2341 };
2342 Convert.contactListToJson = function (value) {
2343 return JSON.stringify(uncast(value, r("ContactList")), null, 2);
2344 };
2345 Convert.toContext = function (json) {
2346 return cast(JSON.parse(json), r("Context"));
2347 };
2348 Convert.contextToJson = function (value) {
2349 return JSON.stringify(uncast(value, r("Context")), null, 2);
2350 };
2351 Convert.toCountry = function (json) {
2352 return cast(JSON.parse(json), r("Country"));
2353 };
2354 Convert.countryToJson = function (value) {
2355 return JSON.stringify(uncast(value, r("Country")), null, 2);
2356 };
2357 Convert.toCurrency = function (json) {
2358 return cast(JSON.parse(json), r("Currency"));
2359 };
2360 Convert.currencyToJson = function (value) {
2361 return JSON.stringify(uncast(value, r("Currency")), null, 2);
2362 };
2363 Convert.toEmail = function (json) {
2364 return cast(JSON.parse(json), r("Email"));
2365 };
2366 Convert.emailToJson = function (value) {
2367 return JSON.stringify(uncast(value, r("Email")), null, 2);
2368 };
2369 Convert.toInstrument = function (json) {
2370 return cast(JSON.parse(json), r("Instrument"));
2371 };
2372 Convert.instrumentToJson = function (value) {
2373 return JSON.stringify(uncast(value, r("Instrument")), null, 2);
2374 };
2375 Convert.toInstrumentList = function (json) {
2376 return cast(JSON.parse(json), r("InstrumentList"));
2377 };
2378 Convert.instrumentListToJson = function (value) {
2379 return JSON.stringify(uncast(value, r("InstrumentList")), null, 2);
2380 };
2381 Convert.toInteraction = function (json) {
2382 return cast(JSON.parse(json), r("Interaction"));
2383 };
2384 Convert.interactionToJson = function (value) {
2385 return JSON.stringify(uncast(value, r("Interaction")), null, 2);
2386 };
2387 Convert.toMessage = function (json) {
2388 return cast(JSON.parse(json), r("Message"));
2389 };
2390 Convert.messageToJson = function (value) {
2391 return JSON.stringify(uncast(value, r("Message")), null, 2);
2392 };
2393 Convert.toNothing = function (json) {
2394 return cast(JSON.parse(json), r("Nothing"));
2395 };
2396 Convert.nothingToJson = function (value) {
2397 return JSON.stringify(uncast(value, r("Nothing")), null, 2);
2398 };
2399 Convert.toOrder = function (json) {
2400 return cast(JSON.parse(json), r("Order"));
2401 };
2402 Convert.orderToJson = function (value) {
2403 return JSON.stringify(uncast(value, r("Order")), null, 2);
2404 };
2405 Convert.toOrderList = function (json) {
2406 return cast(JSON.parse(json), r("OrderList"));
2407 };
2408 Convert.orderListToJson = function (value) {
2409 return JSON.stringify(uncast(value, r("OrderList")), null, 2);
2410 };
2411 Convert.toOrganization = function (json) {
2412 return cast(JSON.parse(json), r("Organization"));
2413 };
2414 Convert.organizationToJson = function (value) {
2415 return JSON.stringify(uncast(value, r("Organization")), null, 2);
2416 };
2417 Convert.toPortfolio = function (json) {
2418 return cast(JSON.parse(json), r("Portfolio"));
2419 };
2420 Convert.portfolioToJson = function (value) {
2421 return JSON.stringify(uncast(value, r("Portfolio")), null, 2);
2422 };
2423 Convert.toPosition = function (json) {
2424 return cast(JSON.parse(json), r("Position"));
2425 };
2426 Convert.positionToJson = function (value) {
2427 return JSON.stringify(uncast(value, r("Position")), null, 2);
2428 };
2429 Convert.toProduct = function (json) {
2430 return cast(JSON.parse(json), r("Product"));
2431 };
2432 Convert.productToJson = function (value) {
2433 return JSON.stringify(uncast(value, r("Product")), null, 2);
2434 };
2435 Convert.toTimeRange = function (json) {
2436 return cast(JSON.parse(json), r("TimeRange"));
2437 };
2438 Convert.timeRangeToJson = function (value) {
2439 return JSON.stringify(uncast(value, r("TimeRange")), null, 2);
2440 };
2441 Convert.toTrade = function (json) {
2442 return cast(JSON.parse(json), r("Trade"));
2443 };
2444 Convert.tradeToJson = function (value) {
2445 return JSON.stringify(uncast(value, r("Trade")), null, 2);
2446 };
2447 Convert.toTradeList = function (json) {
2448 return cast(JSON.parse(json), r("TradeList"));
2449 };
2450 Convert.tradeListToJson = function (value) {
2451 return JSON.stringify(uncast(value, r("TradeList")), null, 2);
2452 };
2453 Convert.toTransactionResult = function (json) {
2454 return cast(JSON.parse(json), r("TransactionResult"));
2455 };
2456 Convert.transactionResultToJson = function (value) {
2457 return JSON.stringify(uncast(value, r("TransactionResult")), null, 2);
2458 };
2459 Convert.toValuation = function (json) {
2460 return cast(JSON.parse(json), r("Valuation"));
2461 };
2462 Convert.valuationToJson = function (value) {
2463 return JSON.stringify(uncast(value, r("Valuation")), null, 2);
2464 };
2465 return Convert;
2466}());
2467function invalidValue(typ, val, key, parent) {
2468 if (parent === void 0) { parent = ''; }
2469 var prettyTyp = prettyTypeName(typ);
2470 var parentText = parent ? " on ".concat(parent) : '';
2471 var keyText = key ? " for key \"".concat(key, "\"") : '';
2472 throw Error("Invalid value".concat(keyText).concat(parentText, ". Expected ").concat(prettyTyp, " but got ").concat(JSON.stringify(val)));
2473}
2474function prettyTypeName(typ) {
2475 if (Array.isArray(typ)) {
2476 if (typ.length === 2 && typ[0] === undefined) {
2477 return "an optional ".concat(prettyTypeName(typ[1]));
2478 }
2479 else {
2480 return "one of [".concat(typ.map(function (a) { return prettyTypeName(a); }).join(", "), "]");
2481 }
2482 }
2483 else if (typeof typ === "object" && typ.literal !== undefined) {
2484 return typ.literal;
2485 }
2486 else {
2487 return typeof typ;
2488 }
2489}
2490function jsonToJSProps(typ) {
2491 if (typ.jsonToJS === undefined) {
2492 var map_1 = {};
2493 typ.props.forEach(function (p) { return map_1[p.json] = { key: p.js, typ: p.typ }; });
2494 typ.jsonToJS = map_1;
2495 }
2496 return typ.jsonToJS;
2497}
2498function jsToJSONProps(typ) {
2499 if (typ.jsToJSON === undefined) {
2500 var map_2 = {};
2501 typ.props.forEach(function (p) { return map_2[p.js] = { key: p.json, typ: p.typ }; });
2502 typ.jsToJSON = map_2;
2503 }
2504 return typ.jsToJSON;
2505}
2506function transform(val, typ, getProps, key, parent) {
2507 if (key === void 0) { key = ''; }
2508 if (parent === void 0) { parent = ''; }
2509 function transformPrimitive(typ, val) {
2510 if (typeof typ === typeof val)
2511 return val;
2512 return invalidValue(typ, val, key, parent);
2513 }
2514 function transformUnion(typs, val) {
2515 // val must validate against one typ in typs
2516 var l = typs.length;
2517 for (var i = 0; i < l; i++) {
2518 var typ_1 = typs[i];
2519 try {
2520 return transform(val, typ_1, getProps);
2521 }
2522 catch (_) { }
2523 }
2524 return invalidValue(typs, val, key, parent);
2525 }
2526 function transformEnum(cases, val) {
2527 if (cases.indexOf(val) !== -1)
2528 return val;
2529 return invalidValue(cases.map(function (a) { return l(a); }), val, key, parent);
2530 }
2531 function transformArray(typ, val) {
2532 // val must be an array with no invalid elements
2533 if (!Array.isArray(val))
2534 return invalidValue(l("array"), val, key, parent);
2535 return val.map(function (el) { return transform(el, typ, getProps); });
2536 }
2537 function transformDate(val) {
2538 if (val === null) {
2539 return null;
2540 }
2541 var d = new Date(val);
2542 if (isNaN(d.valueOf())) {
2543 return invalidValue(l("Date"), val, key, parent);
2544 }
2545 return d;
2546 }
2547 function transformObject(props, additional, val) {
2548 if (val === null || typeof val !== "object" || Array.isArray(val)) {
2549 return invalidValue(l(ref || "object"), val, key, parent);
2550 }
2551 var result = {};
2552 Object.getOwnPropertyNames(props).forEach(function (key) {
2553 var prop = props[key];
2554 var v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
2555 result[prop.key] = transform(v, prop.typ, getProps, key, ref);
2556 });
2557 Object.getOwnPropertyNames(val).forEach(function (key) {
2558 if (!Object.prototype.hasOwnProperty.call(props, key)) {
2559 result[key] = transform(val[key], additional, getProps, key, ref);
2560 }
2561 });
2562 return result;
2563 }
2564 if (typ === "any")
2565 return val;
2566 if (typ === null) {
2567 if (val === null)
2568 return val;
2569 return invalidValue(typ, val, key, parent);
2570 }
2571 if (typ === false)
2572 return invalidValue(typ, val, key, parent);
2573 var ref = undefined;
2574 while (typeof typ === "object" && typ.ref !== undefined) {
2575 ref = typ.ref;
2576 typ = typeMap[typ.ref];
2577 }
2578 if (Array.isArray(typ))
2579 return transformEnum(typ, val);
2580 if (typeof typ === "object") {
2581 return typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
2582 : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
2583 : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
2584 : invalidValue(typ, val, key, parent);
2585 }
2586 // Numbers can be parsed by Date but shouldn't be.
2587 if (typ === Date && typeof val !== "number")
2588 return transformDate(val);
2589 return transformPrimitive(typ, val);
2590}
2591function cast(val, typ) {
2592 return transform(val, typ, jsonToJSProps);
2593}
2594function uncast(val, typ) {
2595 return transform(val, typ, jsToJSONProps);
2596}
2597function l(typ) {
2598 return { literal: typ };
2599}
2600function a(typ) {
2601 return { arrayItems: typ };
2602}
2603function u() {
2604 var typs = [];
2605 for (var _i = 0; _i < arguments.length; _i++) {
2606 typs[_i] = arguments[_i];
2607 }
2608 return { unionMembers: typs };
2609}
2610function o(props, additional) {
2611 return { props: props, additional: additional };
2612}
2613function m(additional) {
2614 return { props: [], additional: additional };
2615}
2616function r(name) {
2617 return { ref: name };
2618}
2619var typeMap = {
2620 "Action": o([
2621 { json: "app", js: "app", typ: u(undefined, r("AppIdentifier")) },
2622 { json: "context", js: "context", typ: r("ContextElement") },
2623 { json: "intent", js: "intent", typ: u(undefined, "") },
2624 { json: "title", js: "title", typ: "" },
2625 { json: "type", js: "type", typ: r("ActionType") },
2626 { json: "id", js: "id", typ: u(undefined, m("any")) },
2627 { json: "name", js: "name", typ: u(undefined, "") },
2628 ], "any"),
2629 "AppIdentifier": o([
2630 { json: "appId", js: "appId", typ: "" },
2631 { json: "desktopAgent", js: "desktopAgent", typ: u(undefined, "") },
2632 { json: "instanceId", js: "instanceId", typ: u(undefined, "") },
2633 ], "any"),
2634 "ContextElement": o([
2635 { json: "id", js: "id", typ: u(undefined, m("any")) },
2636 { json: "name", js: "name", typ: u(undefined, "") },
2637 { json: "type", js: "type", typ: "" },
2638 ], "any"),
2639 "Chart": o([
2640 { json: "instruments", js: "instruments", typ: a(r("InstrumentElement")) },
2641 { json: "otherConfig", js: "otherConfig", typ: u(undefined, a(r("ContextElement"))) },
2642 { json: "range", js: "range", typ: u(undefined, r("TimeRangeObject")) },
2643 { json: "style", js: "style", typ: u(undefined, r("ChartStyle")) },
2644 { json: "type", js: "type", typ: r("ChartType") },
2645 { json: "id", js: "id", typ: u(undefined, m("any")) },
2646 { json: "name", js: "name", typ: u(undefined, "") },
2647 ], "any"),
2648 "InstrumentElement": o([
2649 { json: "id", js: "id", typ: r("PurpleInstrumentIdentifiers") },
2650 { json: "market", js: "market", typ: u(undefined, r("OrganizationMarket")) },
2651 { json: "type", js: "type", typ: r("PurpleInteractionType") },
2652 { json: "name", js: "name", typ: u(undefined, "") },
2653 ], "any"),
2654 "PurpleInstrumentIdentifiers": o([
2655 { json: "BBG", js: "BBG", typ: u(undefined, "") },
2656 { json: "CUSIP", js: "CUSIP", typ: u(undefined, "") },
2657 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2658 { json: "FIGI", js: "FIGI", typ: u(undefined, "") },
2659 { json: "ISIN", js: "ISIN", typ: u(undefined, "") },
2660 { json: "PERMID", js: "PERMID", typ: u(undefined, "") },
2661 { json: "RIC", js: "RIC", typ: u(undefined, "") },
2662 { json: "SEDOL", js: "SEDOL", typ: u(undefined, "") },
2663 { json: "ticker", js: "ticker", typ: u(undefined, "") },
2664 ], "any"),
2665 "OrganizationMarket": o([
2666 { json: "BBG", js: "BBG", typ: u(undefined, "") },
2667 { json: "COUNTRY_ISOALPHA2", js: "COUNTRY_ISOALPHA2", typ: u(undefined, "") },
2668 { json: "MIC", js: "MIC", typ: u(undefined, "") },
2669 { json: "name", js: "name", typ: u(undefined, "") },
2670 ], "any"),
2671 "TimeRangeObject": o([
2672 { json: "endTime", js: "endTime", typ: u(undefined, Date) },
2673 { json: "startTime", js: "startTime", typ: u(undefined, Date) },
2674 { json: "type", js: "type", typ: r("TimeRangeType") },
2675 { json: "id", js: "id", typ: u(undefined, m("any")) },
2676 { json: "name", js: "name", typ: u(undefined, "") },
2677 ], "any"),
2678 "ChatInitSettings": o([
2679 { json: "chatName", js: "chatName", typ: u(undefined, "") },
2680 { json: "members", js: "members", typ: u(undefined, r("ContactListObject")) },
2681 { json: "message", js: "message", typ: u(undefined, u(r("MessageObject"), "")) },
2682 { json: "options", js: "options", typ: u(undefined, r("ChatOptions")) },
2683 { json: "type", js: "type", typ: r("ChatInitSettingsType") },
2684 { json: "id", js: "id", typ: u(undefined, m("any")) },
2685 { json: "name", js: "name", typ: u(undefined, "") },
2686 ], "any"),
2687 "ContactListObject": o([
2688 { json: "contacts", js: "contacts", typ: a(r("ContactElement")) },
2689 { json: "type", js: "type", typ: r("ContactListType") },
2690 { json: "id", js: "id", typ: u(undefined, m("any")) },
2691 { json: "name", js: "name", typ: u(undefined, "") },
2692 ], "any"),
2693 "ContactElement": o([
2694 { json: "id", js: "id", typ: r("PurpleContactIdentifiers") },
2695 { json: "type", js: "type", typ: r("FluffyInteractionType") },
2696 { json: "name", js: "name", typ: u(undefined, "") },
2697 ], "any"),
2698 "PurpleContactIdentifiers": o([
2699 { json: "email", js: "email", typ: u(undefined, "") },
2700 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2701 ], "any"),
2702 "MessageObject": o([
2703 { json: "entities", js: "entities", typ: u(undefined, m(r("PurpleAction"))) },
2704 { json: "text", js: "text", typ: u(undefined, r("PurpleMessageText")) },
2705 { json: "type", js: "type", typ: r("MessageType") },
2706 { json: "id", js: "id", typ: u(undefined, m("any")) },
2707 { json: "name", js: "name", typ: u(undefined, "") },
2708 ], "any"),
2709 "PurpleAction": o([
2710 { json: "app", js: "app", typ: u(undefined, r("AppIdentifier")) },
2711 { json: "context", js: "context", typ: u(undefined, r("ContextElement")) },
2712 { json: "intent", js: "intent", typ: u(undefined, "") },
2713 { json: "title", js: "title", typ: u(undefined, "") },
2714 { json: "type", js: "type", typ: r("EntityType") },
2715 { json: "id", js: "id", typ: u(undefined, m("any")) },
2716 { json: "name", js: "name", typ: u(undefined, "") },
2717 { json: "data", js: "data", typ: u(undefined, r("PurpleData")) },
2718 ], "any"),
2719 "PurpleData": o([
2720 { json: "dataUri", js: "dataUri", typ: "" },
2721 { json: "name", js: "name", typ: "" },
2722 ], "any"),
2723 "PurpleMessageText": o([
2724 { json: "text/markdown", js: "text/markdown", typ: u(undefined, "") },
2725 { json: "text/plain", js: "text/plain", typ: u(undefined, "") },
2726 ], "any"),
2727 "ChatOptions": o([
2728 { json: "allowAddUser", js: "allowAddUser", typ: u(undefined, true) },
2729 { json: "allowHistoryBrowsing", js: "allowHistoryBrowsing", typ: u(undefined, true) },
2730 { json: "allowMessageCopy", js: "allowMessageCopy", typ: u(undefined, true) },
2731 { json: "groupRecipients", js: "groupRecipients", typ: u(undefined, true) },
2732 { json: "isPublic", js: "isPublic", typ: u(undefined, true) },
2733 ], "any"),
2734 "ChatMessage": o([
2735 { json: "chatRoom", js: "chatRoom", typ: r("ChatRoomObject") },
2736 { json: "message", js: "message", typ: r("MessageObject") },
2737 { json: "type", js: "type", typ: r("ChatMessageType") },
2738 { json: "id", js: "id", typ: u(undefined, m("any")) },
2739 { json: "name", js: "name", typ: u(undefined, "") },
2740 ], "any"),
2741 "ChatRoomObject": o([
2742 { json: "id", js: "id", typ: m("any") },
2743 { json: "name", js: "name", typ: u(undefined, "") },
2744 { json: "providerName", js: "providerName", typ: "" },
2745 { json: "type", js: "type", typ: r("ChatRoomType") },
2746 { json: "url", js: "url", typ: u(undefined, "") },
2747 ], "any"),
2748 "ChatRoom": o([
2749 { json: "id", js: "id", typ: m("any") },
2750 { json: "name", js: "name", typ: u(undefined, "") },
2751 { json: "providerName", js: "providerName", typ: "" },
2752 { json: "type", js: "type", typ: r("ChatRoomType") },
2753 { json: "url", js: "url", typ: u(undefined, "") },
2754 ], "any"),
2755 "ChatSearchCriteria": o([
2756 { json: "criteria", js: "criteria", typ: a(u(r("OrganizationObject"), "")) },
2757 { json: "type", js: "type", typ: r("ChatSearchCriteriaType") },
2758 { json: "id", js: "id", typ: u(undefined, m("any")) },
2759 { json: "name", js: "name", typ: u(undefined, "") },
2760 ], "any"),
2761 "OrganizationObject": o([
2762 { json: "id", js: "id", typ: r("Identifiers") },
2763 { json: "market", js: "market", typ: u(undefined, r("OrganizationMarket")) },
2764 { json: "type", js: "type", typ: r("TentacledInteractionType") },
2765 { json: "name", js: "name", typ: u(undefined, "") },
2766 ], "any"),
2767 "Identifiers": o([
2768 { json: "BBG", js: "BBG", typ: u(undefined, "") },
2769 { json: "CUSIP", js: "CUSIP", typ: u(undefined, "") },
2770 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2771 { json: "FIGI", js: "FIGI", typ: u(undefined, "") },
2772 { json: "ISIN", js: "ISIN", typ: u(undefined, "") },
2773 { json: "PERMID", js: "PERMID", typ: u(undefined, "") },
2774 { json: "RIC", js: "RIC", typ: u(undefined, "") },
2775 { json: "SEDOL", js: "SEDOL", typ: u(undefined, "") },
2776 { json: "ticker", js: "ticker", typ: u(undefined, "") },
2777 { json: "LEI", js: "LEI", typ: u(undefined, "") },
2778 { json: "email", js: "email", typ: u(undefined, "") },
2779 ], "any"),
2780 "Contact": o([
2781 { json: "id", js: "id", typ: r("FluffyContactIdentifiers") },
2782 { json: "type", js: "type", typ: r("FluffyInteractionType") },
2783 { json: "name", js: "name", typ: u(undefined, "") },
2784 ], "any"),
2785 "FluffyContactIdentifiers": o([
2786 { json: "email", js: "email", typ: u(undefined, "") },
2787 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2788 ], "any"),
2789 "ContactList": o([
2790 { json: "contacts", js: "contacts", typ: a(r("ContactElement")) },
2791 { json: "type", js: "type", typ: r("ContactListType") },
2792 { json: "id", js: "id", typ: u(undefined, m("any")) },
2793 { json: "name", js: "name", typ: u(undefined, "") },
2794 ], "any"),
2795 "Context": o([
2796 { json: "id", js: "id", typ: u(undefined, m("any")) },
2797 { json: "name", js: "name", typ: u(undefined, "") },
2798 { json: "type", js: "type", typ: "" },
2799 ], "any"),
2800 "Country": o([
2801 { json: "id", js: "id", typ: r("CountryID") },
2802 { json: "type", js: "type", typ: r("CountryType") },
2803 { json: "name", js: "name", typ: u(undefined, "") },
2804 ], "any"),
2805 "CountryID": o([
2806 { json: "COUNTRY_ISOALPHA2", js: "COUNTRY_ISOALPHA2", typ: u(undefined, "") },
2807 { json: "COUNTRY_ISOALPHA3", js: "COUNTRY_ISOALPHA3", typ: u(undefined, "") },
2808 { json: "ISOALPHA2", js: "ISOALPHA2", typ: u(undefined, "") },
2809 { json: "ISOALPHA3", js: "ISOALPHA3", typ: u(undefined, "") },
2810 ], "any"),
2811 "Currency": o([
2812 { json: "id", js: "id", typ: r("CurrencyID") },
2813 { json: "name", js: "name", typ: u(undefined, "") },
2814 { json: "type", js: "type", typ: r("CurrencyType") },
2815 ], "any"),
2816 "CurrencyID": o([
2817 { json: "CURRENCY_ISOCODE", js: "CURRENCY_ISOCODE", typ: u(undefined, "") },
2818 ], "any"),
2819 "Email": o([
2820 { json: "recipients", js: "recipients", typ: r("EmailRecipients") },
2821 { json: "subject", js: "subject", typ: u(undefined, "") },
2822 { json: "textBody", js: "textBody", typ: u(undefined, "") },
2823 { json: "type", js: "type", typ: r("EmailType") },
2824 { json: "id", js: "id", typ: u(undefined, m("any")) },
2825 { json: "name", js: "name", typ: u(undefined, "") },
2826 ], "any"),
2827 "EmailRecipients": o([
2828 { json: "id", js: "id", typ: u(undefined, r("EmailRecipientsID")) },
2829 { json: "type", js: "type", typ: r("EmailRecipientsType") },
2830 { json: "name", js: "name", typ: u(undefined, "") },
2831 { json: "contacts", js: "contacts", typ: u(undefined, a(r("ContactElement"))) },
2832 ], "any"),
2833 "EmailRecipientsID": o([
2834 { json: "email", js: "email", typ: u(undefined, "") },
2835 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2836 ], "any"),
2837 "Instrument": o([
2838 { json: "id", js: "id", typ: r("FluffyInstrumentIdentifiers") },
2839 { json: "market", js: "market", typ: u(undefined, r("PurpleMarket")) },
2840 { json: "type", js: "type", typ: r("PurpleInteractionType") },
2841 { json: "name", js: "name", typ: u(undefined, "") },
2842 ], "any"),
2843 "FluffyInstrumentIdentifiers": o([
2844 { json: "BBG", js: "BBG", typ: u(undefined, "") },
2845 { json: "CUSIP", js: "CUSIP", typ: u(undefined, "") },
2846 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2847 { json: "FIGI", js: "FIGI", typ: u(undefined, "") },
2848 { json: "ISIN", js: "ISIN", typ: u(undefined, "") },
2849 { json: "PERMID", js: "PERMID", typ: u(undefined, "") },
2850 { json: "RIC", js: "RIC", typ: u(undefined, "") },
2851 { json: "SEDOL", js: "SEDOL", typ: u(undefined, "") },
2852 { json: "ticker", js: "ticker", typ: u(undefined, "") },
2853 ], "any"),
2854 "PurpleMarket": o([
2855 { json: "BBG", js: "BBG", typ: u(undefined, "") },
2856 { json: "COUNTRY_ISOALPHA2", js: "COUNTRY_ISOALPHA2", typ: u(undefined, "") },
2857 { json: "MIC", js: "MIC", typ: u(undefined, "") },
2858 { json: "name", js: "name", typ: u(undefined, "") },
2859 ], "any"),
2860 "InstrumentList": o([
2861 { json: "instruments", js: "instruments", typ: a(r("InstrumentElement")) },
2862 { json: "type", js: "type", typ: r("InstrumentListType") },
2863 { json: "id", js: "id", typ: u(undefined, m("any")) },
2864 { json: "name", js: "name", typ: u(undefined, "") },
2865 ], "any"),
2866 "Interaction": o([
2867 { json: "description", js: "description", typ: "" },
2868 { json: "id", js: "id", typ: u(undefined, r("InteractionID")) },
2869 { json: "initiator", js: "initiator", typ: u(undefined, r("ContactElement")) },
2870 { json: "interactionType", js: "interactionType", typ: "" },
2871 { json: "origin", js: "origin", typ: u(undefined, "") },
2872 { json: "participants", js: "participants", typ: r("ContactListObject") },
2873 { json: "timeRange", js: "timeRange", typ: r("TimeRangeObject") },
2874 { json: "type", js: "type", typ: r("InteractionType") },
2875 { json: "name", js: "name", typ: u(undefined, "") },
2876 ], "any"),
2877 "InteractionID": o([
2878 { json: "SALESFORCE", js: "SALESFORCE", typ: u(undefined, "") },
2879 { json: "SINGLETRACK", js: "SINGLETRACK", typ: u(undefined, "") },
2880 { json: "URI", js: "URI", typ: u(undefined, "") },
2881 ], "any"),
2882 "Message": o([
2883 { json: "entities", js: "entities", typ: u(undefined, m(r("FluffyAction"))) },
2884 { json: "text", js: "text", typ: u(undefined, r("FluffyMessageText")) },
2885 { json: "type", js: "type", typ: r("MessageType") },
2886 { json: "id", js: "id", typ: u(undefined, m("any")) },
2887 { json: "name", js: "name", typ: u(undefined, "") },
2888 ], "any"),
2889 "FluffyAction": o([
2890 { json: "app", js: "app", typ: u(undefined, r("AppIdentifier")) },
2891 { json: "context", js: "context", typ: u(undefined, r("ContextElement")) },
2892 { json: "intent", js: "intent", typ: u(undefined, "") },
2893 { json: "title", js: "title", typ: u(undefined, "") },
2894 { json: "type", js: "type", typ: r("EntityType") },
2895 { json: "id", js: "id", typ: u(undefined, m("any")) },
2896 { json: "name", js: "name", typ: u(undefined, "") },
2897 { json: "data", js: "data", typ: u(undefined, r("FluffyData")) },
2898 ], "any"),
2899 "FluffyData": o([
2900 { json: "dataUri", js: "dataUri", typ: "" },
2901 { json: "name", js: "name", typ: "" },
2902 ], "any"),
2903 "FluffyMessageText": o([
2904 { json: "text/markdown", js: "text/markdown", typ: u(undefined, "") },
2905 { json: "text/plain", js: "text/plain", typ: u(undefined, "") },
2906 ], "any"),
2907 "Nothing": o([
2908 { json: "type", js: "type", typ: r("NothingType") },
2909 { json: "id", js: "id", typ: u(undefined, m("any")) },
2910 { json: "name", js: "name", typ: u(undefined, "") },
2911 ], "any"),
2912 "Order": o([
2913 { json: "details", js: "details", typ: u(undefined, r("PurpleOrderDetails")) },
2914 { json: "id", js: "id", typ: m("") },
2915 { json: "name", js: "name", typ: u(undefined, "") },
2916 { json: "type", js: "type", typ: r("OrderType") },
2917 ], "any"),
2918 "PurpleOrderDetails": o([
2919 { json: "product", js: "product", typ: u(undefined, r("ProductObject")) },
2920 ], "any"),
2921 "ProductObject": o([
2922 { json: "id", js: "id", typ: m("") },
2923 { json: "instrument", js: "instrument", typ: u(undefined, r("InstrumentElement")) },
2924 { json: "name", js: "name", typ: u(undefined, "") },
2925 { json: "type", js: "type", typ: r("ProductType") },
2926 ], "any"),
2927 "OrderList": o([
2928 { json: "orders", js: "orders", typ: a(r("OrderElement")) },
2929 { json: "type", js: "type", typ: r("OrderListType") },
2930 { json: "id", js: "id", typ: u(undefined, m("any")) },
2931 { json: "name", js: "name", typ: u(undefined, "") },
2932 ], "any"),
2933 "OrderElement": o([
2934 { json: "details", js: "details", typ: u(undefined, r("FluffyOrderDetails")) },
2935 { json: "id", js: "id", typ: m("") },
2936 { json: "name", js: "name", typ: u(undefined, "") },
2937 { json: "type", js: "type", typ: r("OrderType") },
2938 ], "any"),
2939 "FluffyOrderDetails": o([
2940 { json: "product", js: "product", typ: u(undefined, r("ProductObject")) },
2941 ], "any"),
2942 "Organization": o([
2943 { json: "id", js: "id", typ: r("OrganizationIdentifiers") },
2944 { json: "type", js: "type", typ: r("StickyInteractionType") },
2945 { json: "name", js: "name", typ: u(undefined, "") },
2946 ], "any"),
2947 "OrganizationIdentifiers": o([
2948 { json: "FDS_ID", js: "FDS_ID", typ: u(undefined, "") },
2949 { json: "LEI", js: "LEI", typ: u(undefined, "") },
2950 { json: "PERMID", js: "PERMID", typ: u(undefined, "") },
2951 ], "any"),
2952 "Portfolio": o([
2953 { json: "positions", js: "positions", typ: a(r("PositionElement")) },
2954 { json: "type", js: "type", typ: r("PortfolioType") },
2955 { json: "id", js: "id", typ: u(undefined, m("any")) },
2956 { json: "name", js: "name", typ: u(undefined, "") },
2957 ], "any"),
2958 "PositionElement": o([
2959 { json: "holding", js: "holding", typ: 3.14 },
2960 { json: "instrument", js: "instrument", typ: r("InstrumentElement") },
2961 { json: "type", js: "type", typ: r("PositionType") },
2962 { json: "id", js: "id", typ: u(undefined, m("any")) },
2963 { json: "name", js: "name", typ: u(undefined, "") },
2964 ], "any"),
2965 "Position": o([
2966 { json: "holding", js: "holding", typ: 3.14 },
2967 { json: "instrument", js: "instrument", typ: r("InstrumentElement") },
2968 { json: "type", js: "type", typ: r("PositionType") },
2969 { json: "id", js: "id", typ: u(undefined, m("any")) },
2970 { json: "name", js: "name", typ: u(undefined, "") },
2971 ], "any"),
2972 "Product": o([
2973 { json: "id", js: "id", typ: m("") },
2974 { json: "instrument", js: "instrument", typ: u(undefined, r("InstrumentElement")) },
2975 { json: "name", js: "name", typ: u(undefined, "") },
2976 { json: "type", js: "type", typ: r("ProductType") },
2977 ], "any"),
2978 "TimeRange": o([
2979 { json: "endTime", js: "endTime", typ: u(undefined, Date) },
2980 { json: "startTime", js: "startTime", typ: u(undefined, Date) },
2981 { json: "type", js: "type", typ: r("TimeRangeType") },
2982 { json: "id", js: "id", typ: u(undefined, m("any")) },
2983 { json: "name", js: "name", typ: u(undefined, "") },
2984 ], "any"),
2985 "Trade": o([
2986 { json: "id", js: "id", typ: m("") },
2987 { json: "name", js: "name", typ: u(undefined, "") },
2988 { json: "product", js: "product", typ: r("ProductObject") },
2989 { json: "type", js: "type", typ: r("TradeType") },
2990 ], "any"),
2991 "TradeList": o([
2992 { json: "trades", js: "trades", typ: a(r("TradeElement")) },
2993 { json: "type", js: "type", typ: r("TradeListType") },
2994 { json: "id", js: "id", typ: u(undefined, m("any")) },
2995 { json: "name", js: "name", typ: u(undefined, "") },
2996 ], "any"),
2997 "TradeElement": o([
2998 { json: "id", js: "id", typ: m("") },
2999 { json: "name", js: "name", typ: u(undefined, "") },
3000 { json: "product", js: "product", typ: r("ProductObject") },
3001 { json: "type", js: "type", typ: r("TradeType") },
3002 ], "any"),
3003 "TransactionResult": o([
3004 { json: "context", js: "context", typ: u(undefined, r("ContextElement")) },
3005 { json: "message", js: "message", typ: u(undefined, "") },
3006 { json: "status", js: "status", typ: r("TransactionStatus") },
3007 { json: "type", js: "type", typ: r("TransactionResultType") },
3008 { json: "id", js: "id", typ: u(undefined, m("any")) },
3009 { json: "name", js: "name", typ: u(undefined, "") },
3010 ], "any"),
3011 "Valuation": o([
3012 { json: "CURRENCY_ISOCODE", js: "CURRENCY_ISOCODE", typ: "" },
3013 { json: "expiryTime", js: "expiryTime", typ: u(undefined, Date) },
3014 { json: "price", js: "price", typ: u(undefined, 3.14) },
3015 { json: "type", js: "type", typ: r("ValuationType") },
3016 { json: "valuationTime", js: "valuationTime", typ: u(undefined, Date) },
3017 { json: "value", js: "value", typ: 3.14 },
3018 { json: "id", js: "id", typ: u(undefined, m("any")) },
3019 { json: "name", js: "name", typ: u(undefined, "") },
3020 ], "any"),
3021 "ActionType": [
3022 "fdc3.action",
3023 ],
3024 "PurpleInteractionType": [
3025 "fdc3.instrument",
3026 ],
3027 "TimeRangeType": [
3028 "fdc3.timeRange",
3029 ],
3030 "ChartStyle": [
3031 "bar",
3032 "candle",
3033 "custom",
3034 "heatmap",
3035 "histogram",
3036 "line",
3037 "mountain",
3038 "pie",
3039 "scatter",
3040 "stacked-bar",
3041 ],
3042 "ChartType": [
3043 "fdc3.chart",
3044 ],
3045 "FluffyInteractionType": [
3046 "fdc3.contact",
3047 ],
3048 "ContactListType": [
3049 "fdc3.contactList",
3050 ],
3051 "EntityType": [
3052 "fdc3.action",
3053 "fdc3.entity.fileAttachment",
3054 ],
3055 "MessageType": [
3056 "fdc3.message",
3057 ],
3058 "ChatInitSettingsType": [
3059 "fdc3.chat.initSettings",
3060 ],
3061 "ChatRoomType": [
3062 "fdc3.chat.room",
3063 ],
3064 "ChatMessageType": [
3065 "fdc3.chat.message",
3066 ],
3067 "TentacledInteractionType": [
3068 "fdc3.contact",
3069 "fdc3.instrument",
3070 "fdc3.organization",
3071 ],
3072 "ChatSearchCriteriaType": [
3073 "fdc3.chat.searchCriteria",
3074 ],
3075 "CountryType": [
3076 "fdc3.country",
3077 ],
3078 "CurrencyType": [
3079 "fdc3.currency",
3080 ],
3081 "EmailRecipientsType": [
3082 "fdc3.contact",
3083 "fdc3.contactList",
3084 ],
3085 "EmailType": [
3086 "fdc3.email",
3087 ],
3088 "InstrumentListType": [
3089 "fdc3.instrumentList",
3090 ],
3091 "InteractionType": [
3092 "fdc3.interaction",
3093 ],
3094 "NothingType": [
3095 "fdc3.nothing",
3096 ],
3097 "ProductType": [
3098 "fdc3.product",
3099 ],
3100 "OrderType": [
3101 "fdc3.order",
3102 ],
3103 "OrderListType": [
3104 "fdc3.orderList",
3105 ],
3106 "StickyInteractionType": [
3107 "fdc3.organization",
3108 ],
3109 "PositionType": [
3110 "fdc3.position",
3111 ],
3112 "PortfolioType": [
3113 "fdc3.portfolio",
3114 ],
3115 "TradeType": [
3116 "fdc3.trade",
3117 ],
3118 "TradeListType": [
3119 "fdc3.tradeList",
3120 ],
3121 "TransactionStatus": [
3122 "Created",
3123 "Deleted",
3124 "Failed",
3125 "Updated",
3126 ],
3127 "TransactionResultType": [
3128 "fdc3.transactionResult",
3129 ],
3130 "ValuationType": [
3131 "fdc3.valuation",
3132 ],
3133};
3134
3135/**
3136 * SPDX-License-Identifier: Apache-2.0
3137 * Copyright FINOS FDC3 contributors - see NOTICE file
3138 */
3139/**
3140 * @deprecated Use {@link StandardIntent} instead
3141 */
3142exports.Intents = void 0;
3143(function (Intents) {
3144 Intents["CreateInteraction"] = "CreateInteraction";
3145 Intents["SendChatMessage"] = "SendChatMessage";
3146 Intents["StartCall"] = "StartCall";
3147 Intents["StartChat"] = "StartChat";
3148 Intents["StartEmail"] = "StartEmail";
3149 Intents["ViewAnalysis"] = "ViewAnalysis";
3150 Intents["ViewChat"] = "ViewChat";
3151 Intents["ViewChart"] = "ViewChart";
3152 Intents["ViewContact"] = "ViewContact";
3153 Intents["ViewHoldings"] = "ViewHoldings";
3154 Intents["ViewInstrument"] = "ViewInstrument";
3155 Intents["ViewInteractions"] = "ViewInteractions";
3156 Intents["ViewMessages"] = "ViewMessages";
3157 Intents["ViewNews"] = "ViewNews";
3158 Intents["ViewOrders"] = "ViewOrders";
3159 Intents["ViewProfile"] = "ViewProfile";
3160 Intents["ViewQuote"] = "ViewQuote";
3161 Intents["ViewResearch"] = "ViewResearch";
3162})(exports.Intents || (exports.Intents = {}));
3163
3164/**
3165 * SPDX-License-Identifier: Apache-2.0
3166 * Copyright FINOS FDC3 contributors - see NOTICE file
3167 */
3168/**
3169 * Enumeration defining the types of (non-context and non-intent) events that may be received
3170 via the FDC3 API's `addEventListener` function.
3171 */
3172exports.FDC3EventType = void 0;
3173(function (FDC3EventType) {
3174 FDC3EventType["USER_CHANNEL_CHANGED"] = "USER_CHANNEL_CHANGED";
3175})(exports.FDC3EventType || (exports.FDC3EventType = {}));
3176
3177exports.BridgingTypes = BridgingTypes;
3178exports.Convert = Convert;
3179exports.addContextListener = addContextListener;
3180exports.addEventListener = addEventListener;
3181exports.addIntentListener = addIntentListener;
3182exports.broadcast = broadcast;
3183exports.compareVersionNumbers = compareVersionNumbers;
3184exports.createPrivateChannel = createPrivateChannel;
3185exports.fdc3Ready = fdc3Ready;
3186exports.findInstances = findInstances;
3187exports.findIntent = findIntent;
3188exports.findIntentsByContext = findIntentsByContext;
3189exports.getAppMetadata = getAppMetadata;
3190exports.getCurrentChannel = getCurrentChannel;
3191exports.getInfo = getInfo;
3192exports.getOrCreateChannel = getOrCreateChannel;
3193exports.getSystemChannels = getSystemChannels;
3194exports.getUserChannels = getUserChannels;
3195exports.isStandardContextType = isStandardContextType;
3196exports.isStandardIntent = isStandardIntent;
3197exports.joinChannel = joinChannel;
3198exports.joinUserChannel = joinUserChannel;
3199exports.leaveCurrentChannel = leaveCurrentChannel;
3200exports.open = open;
3201exports.raiseIntent = raiseIntent;
3202exports.raiseIntentForContext = raiseIntentForContext;
3203exports.versionIsAtLeast = versionIsAtLeast;
3204//# sourceMappingURL=fdc3.cjs.development.js.map