|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { StartOutboundChatContactRequest, StartOutboundChatContactResponse } from "../models/models_2"; |
| 10 | +import { de_StartOutboundChatContactCommand, se_StartOutboundChatContactCommand } from "../protocols/Aws_restJson1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link StartOutboundChatContactCommand}. |
| 21 | + */ |
| 22 | +export interface StartOutboundChatContactCommandInput extends StartOutboundChatContactRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link StartOutboundChatContactCommand}. |
| 27 | + */ |
| 28 | +export interface StartOutboundChatContactCommandOutput extends StartOutboundChatContactResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Initiates a new outbound SMS contact to a customer. Response of this API provides the |
| 32 | + * ContactId of the outbound SMS contact created.</p> |
| 33 | + * <p> |
| 34 | + * <b>SourceEndpoint</b> only supports Endpoints with |
| 35 | + * <code>CONNECT_PHONENUMBER_ARN</code> as Type and <b>DestinationEndpoint</b> only supports Endpoints with <code>TELEPHONE_NUMBER</code> as |
| 36 | + * Type. <b>ContactFlowId</b> initiates the flow to manage the new SMS |
| 37 | + * contact created.</p> |
| 38 | + * <p>This API can be used to initiate outbound SMS contacts for an agent or it can also deflect |
| 39 | + * an ongoing contact to an outbound SMS contact by using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundChatContact.html">StartOutboundChatContact</a> Flow Action.</p> |
| 40 | + * <p>For more information about using SMS in Amazon Connect, see the following topics in the |
| 41 | + * <i>Amazon Connect Administrator Guide</i>:</p> |
| 42 | + * <ul> |
| 43 | + * <li> |
| 44 | + * <p> |
| 45 | + * <a href="https://docs.aws.amazon.com/connect/latest/adminguide/setup-sms-messaging.html">Set |
| 46 | + * up SMS messaging</a> |
| 47 | + * </p> |
| 48 | + * </li> |
| 49 | + * <li> |
| 50 | + * <p> |
| 51 | + * <a href="https://docs.aws.amazon.com/connect/latest/adminguide/sms-number.html">Request an |
| 52 | + * SMS-enabled phone number through AWS End User Messaging SMS</a> |
| 53 | + * </p> |
| 54 | + * </li> |
| 55 | + * </ul> |
| 56 | + * @example |
| 57 | + * Use a bare-bones client and the command you need to make an API call. |
| 58 | + * ```javascript |
| 59 | + * import { ConnectClient, StartOutboundChatContactCommand } from "@aws-sdk/client-connect"; // ES Modules import |
| 60 | + * // const { ConnectClient, StartOutboundChatContactCommand } = require("@aws-sdk/client-connect"); // CommonJS import |
| 61 | + * const client = new ConnectClient(config); |
| 62 | + * const input = { // StartOutboundChatContactRequest |
| 63 | + * SourceEndpoint: { // Endpoint |
| 64 | + * Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN", |
| 65 | + * Address: "STRING_VALUE", |
| 66 | + * }, |
| 67 | + * DestinationEndpoint: { |
| 68 | + * Type: "TELEPHONE_NUMBER" || "VOIP" || "CONTACT_FLOW" || "CONNECT_PHONENUMBER_ARN", |
| 69 | + * Address: "STRING_VALUE", |
| 70 | + * }, |
| 71 | + * InstanceId: "STRING_VALUE", // required |
| 72 | + * SegmentAttributes: { // SegmentAttributes // required |
| 73 | + * "<keys>": { // SegmentAttributeValue |
| 74 | + * ValueString: "STRING_VALUE", |
| 75 | + * }, |
| 76 | + * }, |
| 77 | + * Attributes: { // Attributes |
| 78 | + * "<keys>": "STRING_VALUE", |
| 79 | + * }, |
| 80 | + * ContactFlowId: "STRING_VALUE", // required |
| 81 | + * ChatDurationInMinutes: Number("int"), |
| 82 | + * ParticipantDetails: { // ParticipantDetails |
| 83 | + * DisplayName: "STRING_VALUE", // required |
| 84 | + * }, |
| 85 | + * InitialSystemMessage: { // ChatMessage |
| 86 | + * ContentType: "STRING_VALUE", // required |
| 87 | + * Content: "STRING_VALUE", // required |
| 88 | + * }, |
| 89 | + * RelatedContactId: "STRING_VALUE", |
| 90 | + * SupportedMessagingContentTypes: [ // SupportedMessagingContentTypes |
| 91 | + * "STRING_VALUE", |
| 92 | + * ], |
| 93 | + * ClientToken: "STRING_VALUE", |
| 94 | + * }; |
| 95 | + * const command = new StartOutboundChatContactCommand(input); |
| 96 | + * const response = await client.send(command); |
| 97 | + * // { // StartOutboundChatContactResponse |
| 98 | + * // ContactId: "STRING_VALUE", |
| 99 | + * // }; |
| 100 | + * |
| 101 | + * ``` |
| 102 | + * |
| 103 | + * @param StartOutboundChatContactCommandInput - {@link StartOutboundChatContactCommandInput} |
| 104 | + * @returns {@link StartOutboundChatContactCommandOutput} |
| 105 | + * @see {@link StartOutboundChatContactCommandInput} for command's `input` shape. |
| 106 | + * @see {@link StartOutboundChatContactCommandOutput} for command's `response` shape. |
| 107 | + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. |
| 108 | + * |
| 109 | + * @throws {@link AccessDeniedException} (client fault) |
| 110 | + * <p>You do not have sufficient permissions to perform this action.</p> |
| 111 | + * |
| 112 | + * @throws {@link ConflictException} (client fault) |
| 113 | + * <p>Operation cannot be performed at this time as there is a conflict with another operation or |
| 114 | + * contact state.</p> |
| 115 | + * |
| 116 | + * @throws {@link InternalServiceException} (server fault) |
| 117 | + * <p>Request processing failed because of an error or failure with the service.</p> |
| 118 | + * |
| 119 | + * @throws {@link InvalidRequestException} (client fault) |
| 120 | + * <p>The request is not valid.</p> |
| 121 | + * |
| 122 | + * @throws {@link LimitExceededException} (client fault) |
| 123 | + * <p>The allowed limit for the resource has been exceeded.</p> |
| 124 | + * |
| 125 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 126 | + * <p>The specified resource was not found.</p> |
| 127 | + * |
| 128 | + * @throws {@link ThrottlingException} (client fault) |
| 129 | + * <p>The throttling limit has been exceeded.</p> |
| 130 | + * |
| 131 | + * @throws {@link ConnectServiceException} |
| 132 | + * <p>Base exception class for all service exceptions from Connect service.</p> |
| 133 | + * |
| 134 | + * @public |
| 135 | + */ |
| 136 | +export class StartOutboundChatContactCommand extends $Command |
| 137 | + .classBuilder< |
| 138 | + StartOutboundChatContactCommandInput, |
| 139 | + StartOutboundChatContactCommandOutput, |
| 140 | + ConnectClientResolvedConfig, |
| 141 | + ServiceInputTypes, |
| 142 | + ServiceOutputTypes |
| 143 | + >() |
| 144 | + .ep(commonParams) |
| 145 | + .m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) { |
| 146 | + return [ |
| 147 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 148 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 149 | + ]; |
| 150 | + }) |
| 151 | + .s("AmazonConnectService", "StartOutboundChatContact", {}) |
| 152 | + .n("ConnectClient", "StartOutboundChatContactCommand") |
| 153 | + .f(void 0, void 0) |
| 154 | + .ser(se_StartOutboundChatContactCommand) |
| 155 | + .de(de_StartOutboundChatContactCommand) |
| 156 | + .build() { |
| 157 | + /** @internal type navigation helper, not in runtime. */ |
| 158 | + protected declare static __types: { |
| 159 | + api: { |
| 160 | + input: StartOutboundChatContactRequest; |
| 161 | + output: StartOutboundChatContactResponse; |
| 162 | + }; |
| 163 | + sdk: { |
| 164 | + input: StartOutboundChatContactCommandInput; |
| 165 | + output: StartOutboundChatContactCommandOutput; |
| 166 | + }; |
| 167 | + }; |
| 168 | +} |
0 commit comments