1 | import { Callback, Handler } from "../handler";
|
2 |
|
3 | export type ConnectContactFlowHandler = Handler<ConnectContactFlowEvent, ConnectContactFlowResult>;
|
4 | export type ConnectContactFlowCallback = Callback<ConnectContactFlowResult>;
|
5 |
|
6 |
|
7 |
|
8 | export interface ConnectContactFlowEvent {
|
9 | Details: {
|
10 | ContactData: {
|
11 | Attributes: { [key: string]: string };
|
12 | Channel: ConnectContactFlowChannel;
|
13 | ContactId: string;
|
14 | CustomerEndpoint: ConnectContactFlowEndpoint | null;
|
15 | InitialContactId: string;
|
16 | InitiationMethod: ConnectContactFlowInitiationMethod;
|
17 | InstanceARN: string;
|
18 | PreviousContactId: string;
|
19 | Queue: ConnectContactFlowQueue | null;
|
20 | SystemEndpoint: ConnectContactFlowEndpoint | null;
|
21 | MediaStreams: {
|
22 | Customer: {
|
23 | Audio: CustomerAudio;
|
24 | };
|
25 | };
|
26 | };
|
27 | Parameters: { [key: string]: string };
|
28 | };
|
29 | Name: "ContactFlowEvent";
|
30 | }
|
31 |
|
32 | export type ConnectContactFlowChannel = "VOICE" | "CHAT";
|
33 |
|
34 | export type ConnectContactFlowInitiationMethod = "INBOUND" | "OUTBOUND" | "TRANSFER" | "CALLBACK" | "API";
|
35 |
|
36 | export interface ConnectContactFlowEndpoint {
|
37 | Address: string;
|
38 | Type: "TELEPHONE_NUMBER";
|
39 | }
|
40 |
|
41 | export interface ConnectContactFlowQueue {
|
42 | ARN: string;
|
43 | Name: string;
|
44 | }
|
45 |
|
46 | export interface ConnectContactFlowResult {
|
47 | [key: string]: string | null;
|
48 | }
|
49 |
|
50 | export type CustomerAudio =
|
51 | | null
|
52 | | StartedCustomerAudio
|
53 | | (StartedCustomerAudio & StoppedCustomerAudio);
|
54 |
|
55 | export interface StartedCustomerAudio {
|
56 | StartFragmentNumber: string;
|
57 | StartTimestamp: string;
|
58 | StreamARN: string;
|
59 | }
|
60 |
|
61 | export interface StoppedCustomerAudio {
|
62 | StopFragmentNumber: string;
|
63 | StopTimestamp: string;
|
64 | }
|