UNPKG

14.7 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class PinpointSMSVoice extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: PinpointSMSVoice.Types.ClientConfiguration)
13 config: Config & PinpointSMSVoice.Types.ClientConfiguration;
14 /**
15 * Create a new configuration set. After you create the configuration set, you can add one or more event destinations to it.
16 */
17 createConfigurationSet(params: PinpointSMSVoice.Types.CreateConfigurationSetRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.CreateConfigurationSetResponse) => void): Request<PinpointSMSVoice.Types.CreateConfigurationSetResponse, AWSError>;
18 /**
19 * Create a new configuration set. After you create the configuration set, you can add one or more event destinations to it.
20 */
21 createConfigurationSet(callback?: (err: AWSError, data: PinpointSMSVoice.Types.CreateConfigurationSetResponse) => void): Request<PinpointSMSVoice.Types.CreateConfigurationSetResponse, AWSError>;
22 /**
23 * Create a new event destination in a configuration set.
24 */
25 createConfigurationSetEventDestination(params: PinpointSMSVoice.Types.CreateConfigurationSetEventDestinationRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.CreateConfigurationSetEventDestinationResponse) => void): Request<PinpointSMSVoice.Types.CreateConfigurationSetEventDestinationResponse, AWSError>;
26 /**
27 * Create a new event destination in a configuration set.
28 */
29 createConfigurationSetEventDestination(callback?: (err: AWSError, data: PinpointSMSVoice.Types.CreateConfigurationSetEventDestinationResponse) => void): Request<PinpointSMSVoice.Types.CreateConfigurationSetEventDestinationResponse, AWSError>;
30 /**
31 * Deletes an existing configuration set.
32 */
33 deleteConfigurationSet(params: PinpointSMSVoice.Types.DeleteConfigurationSetRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.DeleteConfigurationSetResponse) => void): Request<PinpointSMSVoice.Types.DeleteConfigurationSetResponse, AWSError>;
34 /**
35 * Deletes an existing configuration set.
36 */
37 deleteConfigurationSet(callback?: (err: AWSError, data: PinpointSMSVoice.Types.DeleteConfigurationSetResponse) => void): Request<PinpointSMSVoice.Types.DeleteConfigurationSetResponse, AWSError>;
38 /**
39 * Deletes an event destination in a configuration set.
40 */
41 deleteConfigurationSetEventDestination(params: PinpointSMSVoice.Types.DeleteConfigurationSetEventDestinationRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.DeleteConfigurationSetEventDestinationResponse) => void): Request<PinpointSMSVoice.Types.DeleteConfigurationSetEventDestinationResponse, AWSError>;
42 /**
43 * Deletes an event destination in a configuration set.
44 */
45 deleteConfigurationSetEventDestination(callback?: (err: AWSError, data: PinpointSMSVoice.Types.DeleteConfigurationSetEventDestinationResponse) => void): Request<PinpointSMSVoice.Types.DeleteConfigurationSetEventDestinationResponse, AWSError>;
46 /**
47 * Obtain information about an event destination, including the types of events it reports, the Amazon Resource Name (ARN) of the destination, and the name of the event destination.
48 */
49 getConfigurationSetEventDestinations(params: PinpointSMSVoice.Types.GetConfigurationSetEventDestinationsRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.GetConfigurationSetEventDestinationsResponse) => void): Request<PinpointSMSVoice.Types.GetConfigurationSetEventDestinationsResponse, AWSError>;
50 /**
51 * Obtain information about an event destination, including the types of events it reports, the Amazon Resource Name (ARN) of the destination, and the name of the event destination.
52 */
53 getConfigurationSetEventDestinations(callback?: (err: AWSError, data: PinpointSMSVoice.Types.GetConfigurationSetEventDestinationsResponse) => void): Request<PinpointSMSVoice.Types.GetConfigurationSetEventDestinationsResponse, AWSError>;
54 /**
55 * List all of the configuration sets associated with your Amazon Pinpoint account in the current region.
56 */
57 listConfigurationSets(params: PinpointSMSVoice.Types.ListConfigurationSetsRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.ListConfigurationSetsResponse) => void): Request<PinpointSMSVoice.Types.ListConfigurationSetsResponse, AWSError>;
58 /**
59 * List all of the configuration sets associated with your Amazon Pinpoint account in the current region.
60 */
61 listConfigurationSets(callback?: (err: AWSError, data: PinpointSMSVoice.Types.ListConfigurationSetsResponse) => void): Request<PinpointSMSVoice.Types.ListConfigurationSetsResponse, AWSError>;
62 /**
63 * Create a new voice message and send it to a recipient's phone number.
64 */
65 sendVoiceMessage(params: PinpointSMSVoice.Types.SendVoiceMessageRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.SendVoiceMessageResponse) => void): Request<PinpointSMSVoice.Types.SendVoiceMessageResponse, AWSError>;
66 /**
67 * Create a new voice message and send it to a recipient's phone number.
68 */
69 sendVoiceMessage(callback?: (err: AWSError, data: PinpointSMSVoice.Types.SendVoiceMessageResponse) => void): Request<PinpointSMSVoice.Types.SendVoiceMessageResponse, AWSError>;
70 /**
71 * Update an event destination in a configuration set. An event destination is a location that you publish information about your voice calls to. For example, you can log an event to an Amazon CloudWatch destination when a call fails.
72 */
73 updateConfigurationSetEventDestination(params: PinpointSMSVoice.Types.UpdateConfigurationSetEventDestinationRequest, callback?: (err: AWSError, data: PinpointSMSVoice.Types.UpdateConfigurationSetEventDestinationResponse) => void): Request<PinpointSMSVoice.Types.UpdateConfigurationSetEventDestinationResponse, AWSError>;
74 /**
75 * Update an event destination in a configuration set. An event destination is a location that you publish information about your voice calls to. For example, you can log an event to an Amazon CloudWatch destination when a call fails.
76 */
77 updateConfigurationSetEventDestination(callback?: (err: AWSError, data: PinpointSMSVoice.Types.UpdateConfigurationSetEventDestinationResponse) => void): Request<PinpointSMSVoice.Types.UpdateConfigurationSetEventDestinationResponse, AWSError>;
78}
79declare namespace PinpointSMSVoice {
80 export type Boolean = boolean;
81 export interface CallInstructionsMessageType {
82 /**
83 * The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
84 */
85 Text?: NonEmptyString;
86 }
87 export interface CloudWatchLogsDestination {
88 /**
89 * The Amazon Resource Name (ARN) of an Amazon Identity and Access Management (IAM) role that is able to write event data to an Amazon CloudWatch destination.
90 */
91 IamRoleArn?: String;
92 /**
93 * The name of the Amazon CloudWatch Log Group that you want to record events in.
94 */
95 LogGroupArn?: String;
96 }
97 export type ConfigurationSets = WordCharactersWithDelimiters[];
98 export interface CreateConfigurationSetEventDestinationRequest {
99 /**
100 * ConfigurationSetName
101 */
102 ConfigurationSetName: __string;
103 EventDestination?: EventDestinationDefinition;
104 /**
105 * A name that identifies the event destination.
106 */
107 EventDestinationName?: NonEmptyString;
108 }
109 export interface CreateConfigurationSetEventDestinationResponse {
110 }
111 export interface CreateConfigurationSetRequest {
112 /**
113 * The name that you want to give the configuration set.
114 */
115 ConfigurationSetName?: WordCharactersWithDelimiters;
116 }
117 export interface CreateConfigurationSetResponse {
118 }
119 export interface DeleteConfigurationSetEventDestinationRequest {
120 /**
121 * ConfigurationSetName
122 */
123 ConfigurationSetName: __string;
124 /**
125 * EventDestinationName
126 */
127 EventDestinationName: __string;
128 }
129 export interface DeleteConfigurationSetEventDestinationResponse {
130 }
131 export interface DeleteConfigurationSetRequest {
132 /**
133 * ConfigurationSetName
134 */
135 ConfigurationSetName: __string;
136 }
137 export interface DeleteConfigurationSetResponse {
138 }
139 export interface EventDestination {
140 CloudWatchLogsDestination?: CloudWatchLogsDestination;
141 /**
142 * Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
143 */
144 Enabled?: Boolean;
145 KinesisFirehoseDestination?: KinesisFirehoseDestination;
146 MatchingEventTypes?: EventTypes;
147 /**
148 * A name that identifies the event destination configuration.
149 */
150 Name?: String;
151 SnsDestination?: SnsDestination;
152 }
153 export interface EventDestinationDefinition {
154 CloudWatchLogsDestination?: CloudWatchLogsDestination;
155 /**
156 * Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
157 */
158 Enabled?: Boolean;
159 KinesisFirehoseDestination?: KinesisFirehoseDestination;
160 MatchingEventTypes?: EventTypes;
161 SnsDestination?: SnsDestination;
162 }
163 export type EventDestinations = EventDestination[];
164 export type EventType = "INITIATED_CALL"|"RINGING"|"ANSWERED"|"COMPLETED_CALL"|"BUSY"|"FAILED"|"NO_ANSWER"|string;
165 export type EventTypes = EventType[];
166 export interface GetConfigurationSetEventDestinationsRequest {
167 /**
168 * ConfigurationSetName
169 */
170 ConfigurationSetName: __string;
171 }
172 export interface GetConfigurationSetEventDestinationsResponse {
173 EventDestinations?: EventDestinations;
174 }
175 export interface KinesisFirehoseDestination {
176 /**
177 * The Amazon Resource Name (ARN) of an IAM role that can write data to an Amazon Kinesis Data Firehose stream.
178 */
179 DeliveryStreamArn?: String;
180 /**
181 * The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose destination that you want to use in the event destination.
182 */
183 IamRoleArn?: String;
184 }
185 export interface ListConfigurationSetsRequest {
186 /**
187 * A token returned from a previous call to the API that indicates the position in the list of results.
188 */
189 NextToken?: __string;
190 /**
191 * Used to specify the number of items that should be returned in the response.
192 */
193 PageSize?: __string;
194 }
195 export interface ListConfigurationSetsResponse {
196 /**
197 * An object that contains a list of configuration sets for your account in the current region.
198 */
199 ConfigurationSets?: ConfigurationSets;
200 /**
201 * A token returned from a previous call to ListConfigurationSets to indicate the position in the list of configuration sets.
202 */
203 NextToken?: NextTokenString;
204 }
205 export type NextTokenString = string;
206 export type NonEmptyString = string;
207 export interface PlainTextMessageType {
208 /**
209 * The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
210 */
211 LanguageCode?: String;
212 /**
213 * The plain (not SSML-formatted) text to deliver to the recipient.
214 */
215 Text?: NonEmptyString;
216 /**
217 * The name of the voice that you want to use to deliver the message. For a complete list of supported voices, see the Amazon Polly Developer Guide.
218 */
219 VoiceId?: String;
220 }
221 export interface SSMLMessageType {
222 /**
223 * The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
224 */
225 LanguageCode?: String;
226 /**
227 * The SSML-formatted text to deliver to the recipient.
228 */
229 Text?: NonEmptyString;
230 /**
231 * The name of the voice that you want to use to deliver the message. For a complete list of supported voices, see the Amazon Polly Developer Guide.
232 */
233 VoiceId?: String;
234 }
235 export interface SendVoiceMessageRequest {
236 /**
237 * The phone number that appears on recipients' devices when they receive the message.
238 */
239 CallerId?: String;
240 /**
241 * The name of the configuration set that you want to use to send the message.
242 */
243 ConfigurationSetName?: WordCharactersWithDelimiters;
244 Content?: VoiceMessageContent;
245 /**
246 * The phone number that you want to send the voice message to.
247 */
248 DestinationPhoneNumber?: NonEmptyString;
249 /**
250 * The phone number that Amazon Pinpoint should use to send the voice message. This isn't necessarily the phone number that appears on recipients' devices when they receive the message, because you can specify a CallerId parameter in the request.
251 */
252 OriginationPhoneNumber?: NonEmptyString;
253 }
254 export interface SendVoiceMessageResponse {
255 /**
256 * A unique identifier for the voice message.
257 */
258 MessageId?: String;
259 }
260 export interface SnsDestination {
261 /**
262 * The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
263 */
264 TopicArn?: String;
265 }
266 export type String = string;
267 export interface UpdateConfigurationSetEventDestinationRequest {
268 /**
269 * ConfigurationSetName
270 */
271 ConfigurationSetName: __string;
272 EventDestination?: EventDestinationDefinition;
273 /**
274 * EventDestinationName
275 */
276 EventDestinationName: __string;
277 }
278 export interface UpdateConfigurationSetEventDestinationResponse {
279 }
280 export interface VoiceMessageContent {
281 CallInstructionsMessage?: CallInstructionsMessageType;
282 PlainTextMessage?: PlainTextMessageType;
283 SSMLMessage?: SSMLMessageType;
284 }
285 export type WordCharactersWithDelimiters = string;
286 export type __string = string;
287 /**
288 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
289 */
290 export type apiVersion = "2018-09-05"|"latest"|string;
291 export interface ClientApiVersions {
292 /**
293 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
294 */
295 apiVersion?: apiVersion;
296 }
297 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
298 /**
299 * Contains interfaces for use with the PinpointSMSVoice client.
300 */
301 export import Types = PinpointSMSVoice;
302}
303export = PinpointSMSVoice;