Skip to content

Commit

Permalink
feat(client-connect): Added DeleteContactFlowVersion API and the CAMP…
Browse files Browse the repository at this point in the history
…AIGN flow type
  • Loading branch information
awstools committed Jan 21, 2025
1 parent 757843c commit c6e07aa
Show file tree
Hide file tree
Showing 23 changed files with 464 additions and 147 deletions.
8 changes: 8 additions & 0 deletions clients/client-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,14 @@ DeleteContactFlowModule

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/DeleteContactFlowModuleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/DeleteContactFlowModuleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/DeleteContactFlowModuleCommandOutput/)

</details>
<details>
<summary>
DeleteContactFlowVersion
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/DeleteContactFlowVersionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/DeleteContactFlowVersionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/DeleteContactFlowVersionCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-connect/src/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ import {
DeleteContactFlowModuleCommandInput,
DeleteContactFlowModuleCommandOutput,
} from "./commands/DeleteContactFlowModuleCommand";
import {
DeleteContactFlowVersionCommand,
DeleteContactFlowVersionCommandInput,
DeleteContactFlowVersionCommandOutput,
} from "./commands/DeleteContactFlowVersionCommand";
import {
DeleteEmailAddressCommand,
DeleteEmailAddressCommandInput,
Expand Down Expand Up @@ -1381,6 +1386,7 @@ const commands = {
DeleteContactEvaluationCommand,
DeleteContactFlowCommand,
DeleteContactFlowModuleCommand,
DeleteContactFlowVersionCommand,
DeleteEmailAddressCommand,
DeleteEvaluationFormCommand,
DeleteHoursOfOperationCommand,
Expand Down Expand Up @@ -2497,6 +2503,23 @@ export interface Connect {
cb: (err: any, data?: DeleteContactFlowModuleCommandOutput) => void
): void;

/**
* @see {@link DeleteContactFlowVersionCommand}
*/
deleteContactFlowVersion(
args: DeleteContactFlowVersionCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteContactFlowVersionCommandOutput>;
deleteContactFlowVersion(
args: DeleteContactFlowVersionCommandInput,
cb: (err: any, data?: DeleteContactFlowVersionCommandOutput) => void
): void;
deleteContactFlowVersion(
args: DeleteContactFlowVersionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteContactFlowVersionCommandOutput) => void
): void;

/**
* @see {@link DeleteEmailAddressCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-connect/src/ConnectClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ import {
DeleteContactFlowModuleCommandInput,
DeleteContactFlowModuleCommandOutput,
} from "./commands/DeleteContactFlowModuleCommand";
import {
DeleteContactFlowVersionCommandInput,
DeleteContactFlowVersionCommandOutput,
} from "./commands/DeleteContactFlowVersionCommand";
import { DeleteEmailAddressCommandInput, DeleteEmailAddressCommandOutput } from "./commands/DeleteEmailAddressCommand";
import {
DeleteEvaluationFormCommandInput,
Expand Down Expand Up @@ -920,6 +924,7 @@ export type ServiceInputTypes =
| DeleteContactEvaluationCommandInput
| DeleteContactFlowCommandInput
| DeleteContactFlowModuleCommandInput
| DeleteContactFlowVersionCommandInput
| DeleteEmailAddressCommandInput
| DeleteEvaluationFormCommandInput
| DeleteHoursOfOperationCommandInput
Expand Down Expand Up @@ -1205,6 +1210,7 @@ export type ServiceOutputTypes =
| DeleteContactEvaluationCommandOutput
| DeleteContactFlowCommandOutput
| DeleteContactFlowModuleCommandOutput
| DeleteContactFlowVersionCommandOutput
| DeleteEmailAddressCommandOutput
| DeleteEvaluationFormCommandOutput
| DeleteHoursOfOperationCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface AssociateUserProficienciesCommandInput extends AssociateUserPro
export interface AssociateUserProficienciesCommandOutput extends __MetadataBearer {}

/**
* <p>>Associates a set of proficiencies with a user.</p>
* <p>Associates a set of proficiencies with a user.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface CreateContactFlowCommandOutput extends CreateContactFlowRespons
* const input = { // CreateContactFlowRequest
* InstanceId: "STRING_VALUE", // required
* Name: "STRING_VALUE", // required
* Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER", // required
* Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN", // required
* Description: "STRING_VALUE",
* Content: "STRING_VALUE", // required
* Status: "PUBLISHED" || "SAVED",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ export interface CreateContactFlowVersionCommandOutput extends CreateContactFlow

/**
* <p>Publishes a new version of the flow provided. Versions are immutable and monotonically
* increasing. If a version of the same flow content already exists, no new version is created and
* instead the existing version number is returned. If the <code>FlowContentSha256</code> provided
* is different from the <code>FlowContentSha256</code> of the <code>$LATEST</code> published flow
* content, then an error is returned. This API only supports creating versions for flows of type
* <code>Campaign</code>.</p>
* increasing. If the <code>FlowContentSha256</code> provided is different from the
* <code>FlowContentSha256</code> of the <code>$LATEST</code> published flow content, then an error
* is returned. This API only supports creating versions for flows of type
* <code>Campaign</code>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -45,6 +44,7 @@ export interface CreateContactFlowVersionCommandOutput extends CreateContactFlow
* Description: "STRING_VALUE",
* ContactFlowId: "STRING_VALUE", // required
* FlowContentSha256: "STRING_VALUE",
* ContactFlowVersion: Number("long"),
* LastModifiedTime: new Date("TIMESTAMP"),
* LastModifiedRegion: "STRING_VALUE",
* };
Expand Down
110 changes: 110 additions & 0 deletions clients/client-connect/src/commands/DeleteContactFlowVersionCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteContactFlowVersionRequest, DeleteContactFlowVersionResponse } from "../models/models_0";
import { de_DeleteContactFlowVersionCommand, se_DeleteContactFlowVersionCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DeleteContactFlowVersionCommand}.
*/
export interface DeleteContactFlowVersionCommandInput extends DeleteContactFlowVersionRequest {}
/**
* @public
*
* The output of {@link DeleteContactFlowVersionCommand}.
*/
export interface DeleteContactFlowVersionCommandOutput extends DeleteContactFlowVersionResponse, __MetadataBearer {}

/**
* <p>Deletes the particular version specified in flow version identifier.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ConnectClient, DeleteContactFlowVersionCommand } from "@aws-sdk/client-connect"; // ES Modules import
* // const { ConnectClient, DeleteContactFlowVersionCommand } = require("@aws-sdk/client-connect"); // CommonJS import
* const client = new ConnectClient(config);
* const input = { // DeleteContactFlowVersionRequest
* InstanceId: "STRING_VALUE", // required
* ContactFlowId: "STRING_VALUE", // required
* ContactFlowVersion: Number("long"), // required
* };
* const command = new DeleteContactFlowVersionCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param DeleteContactFlowVersionCommandInput - {@link DeleteContactFlowVersionCommandInput}
* @returns {@link DeleteContactFlowVersionCommandOutput}
* @see {@link DeleteContactFlowVersionCommandInput} for command's `input` shape.
* @see {@link DeleteContactFlowVersionCommandOutput} for command's `response` shape.
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient permissions to perform this action.</p>
*
* @throws {@link InternalServiceException} (server fault)
* <p>Request processing failed because of an error or failure with the service.</p>
*
* @throws {@link InvalidParameterException} (client fault)
* <p>One or more of the specified parameters are not valid.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is not valid.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The throttling limit has been exceeded.</p>
*
* @throws {@link ConnectServiceException}
* <p>Base exception class for all service exceptions from Connect service.</p>
*
* @public
*/
export class DeleteContactFlowVersionCommand extends $Command
.classBuilder<
DeleteContactFlowVersionCommandInput,
DeleteContactFlowVersionCommandOutput,
ConnectClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectService", "DeleteContactFlowVersion", {})
.n("ConnectClient", "DeleteContactFlowVersionCommand")
.f(void 0, void 0)
.ser(se_DeleteContactFlowVersionCommand)
.de(de_DeleteContactFlowVersionCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: DeleteContactFlowVersionRequest;
output: {};
};
sdk: {
input: DeleteContactFlowVersionCommandInput;
output: DeleteContactFlowVersionCommandOutput;
};
};
}
2 changes: 1 addition & 1 deletion clients/client-connect/src/commands/DeleteQueueCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface DeleteQueueCommandInput extends DeleteQueueRequest {}
export interface DeleteQueueCommandOutput extends __MetadataBearer {}

/**
* <p>Deletes a queue. It isn't possible to delete a queue by using the Amazon Connect admin website.</p>
* <p>Deletes a queue.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-connect/src/commands/DeleteRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteRuleRequest } from "../models/models_0";
import { DeleteRuleRequest } from "../models/models_1";
import { de_DeleteRuleCommand, se_DeleteRuleCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DeleteSecurityProfileRequest } from "../models/models_0";
import { DeleteSecurityProfileRequest } from "../models/models_1";
import { de_DeleteSecurityProfileCommand, se_DeleteSecurityProfileCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export interface DescribeContactFlowCommandOutput extends DescribeContactFlowRes
* of a Flow. For example, <code>arn:aws:.../contact-flow/\{id\}:$SAVED</code>. After a flow is
* published, <code>$SAVED</code> needs to be supplied to view saved content that has not been
* published.</p>
* <p>Use <code>arn:aws:.../contact-flow/\{id\}:\{version\}</code> to retrieve the content of a
* specific flow version.</p>
* <p>In the response, <b>Status</b> indicates the flow status as either
* <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate
* validation on the content. <code>SAVED</code> does not initiate validation of the content.
Expand All @@ -57,7 +59,7 @@ export interface DescribeContactFlowCommandOutput extends DescribeContactFlowRes
* // Arn: "STRING_VALUE",
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* // Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN",
* // State: "ACTIVE" || "ARCHIVED",
* // Status: "PUBLISHED" || "SAVED",
* // Description: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface ListContactFlowsCommandOutput extends ListContactFlowsResponse,
* const input = { // ListContactFlowsRequest
* InstanceId: "STRING_VALUE", // required
* ContactFlowTypes: [ // ContactFlowTypes
* "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN",
* ],
* NextToken: "STRING_VALUE",
* MaxResults: Number("int"),
Expand All @@ -55,7 +55,7 @@ export interface ListContactFlowsCommandOutput extends ListContactFlowsResponse,
* // Id: "STRING_VALUE",
* // Arn: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // ContactFlowType: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* // ContactFlowType: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN",
* // ContactFlowState: "ACTIVE" || "ARCHIVED",
* // ContactFlowStatus: "PUBLISHED" || "SAVED",
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListQuickConnectsRequest, ListQuickConnectsResponse } from "../models/models_1";
import { ListQuickConnectsRequest } from "../models/models_1";
import { ListQuickConnectsResponse } from "../models/models_2";
import { de_ListQuickConnectsCommand, se_ListQuickConnectsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export interface SearchContactFlowsCommandOutput extends SearchContactFlowsRespo
* Value: "STRING_VALUE",
* ComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
* },
* TypeCondition: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* TypeCondition: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN",
* StateCondition: "ACTIVE" || "ARCHIVED",
* StatusCondition: "PUBLISHED" || "SAVED",
* },
Expand All @@ -86,7 +86,7 @@ export interface SearchContactFlowsCommandOutput extends SearchContactFlowsRespo
* Value: "STRING_VALUE",
* ComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
* },
* TypeCondition: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* TypeCondition: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN",
* StateCondition: "ACTIVE" || "ARCHIVED",
* StatusCondition: "PUBLISHED" || "SAVED",
* },
Expand All @@ -99,7 +99,7 @@ export interface SearchContactFlowsCommandOutput extends SearchContactFlowsRespo
* // Arn: "STRING_VALUE",
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* // Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER" || "CAMPAIGN",
* // State: "ACTIVE" || "ARCHIVED",
* // Status: "PUBLISHED" || "SAVED",
* // Description: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { UpdateRoutingProfileNameRequest } from "../models/models_2";
import { UpdateRoutingProfileNameRequest } from "../models/models_3";
import { de_UpdateRoutingProfileNameCommand, se_UpdateRoutingProfileNameCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { UpdateRoutingProfileQueuesRequest } from "../models/models_2";
import { UpdateRoutingProfileQueuesRequest } from "../models/models_3";
import { de_UpdateRoutingProfileQueuesCommand, se_UpdateRoutingProfileQueuesCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
1 change: 1 addition & 0 deletions clients/client-connect/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export * from "./DeleteAttachedFileCommand";
export * from "./DeleteContactEvaluationCommand";
export * from "./DeleteContactFlowCommand";
export * from "./DeleteContactFlowModuleCommand";
export * from "./DeleteContactFlowVersionCommand";
export * from "./DeleteEmailAddressCommand";
export * from "./DeleteEvaluationFormCommand";
export * from "./DeleteHoursOfOperationCommand";
Expand Down
Loading

0 comments on commit c6e07aa

Please sign in to comment.