From 89b45abecb2e527705fd89dc92366f643400cc92 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 3 May 2024 18:19:47 +0000 Subject: [PATCH] feat(client-connectcases): This feature supports the release of Files related items --- .../src/commands/CreateRelatedItemCommand.ts | 3 + .../src/commands/SearchRelatedItemsCommand.ts | 6 ++ .../src/models/models_0.ts | 102 +++++++++++++++--- .../src/protocols/Aws_restJson1.ts | 13 +++ .../sdk-codegen/aws-models/connectcases.json | 90 +++++++++++++--- 5 files changed, 186 insertions(+), 28 deletions(-) diff --git a/clients/client-connectcases/src/commands/CreateRelatedItemCommand.ts b/clients/client-connectcases/src/commands/CreateRelatedItemCommand.ts index 7309e148e2efc..e5a8c1f47feed 100644 --- a/clients/client-connectcases/src/commands/CreateRelatedItemCommand.ts +++ b/clients/client-connectcases/src/commands/CreateRelatedItemCommand.ts @@ -63,6 +63,9 @@ export interface CreateRelatedItemCommandOutput extends CreateRelatedItemRespons * body: "STRING_VALUE", // required * contentType: "STRING_VALUE", // required * }, + * file: { // FileContent + * fileArn: "STRING_VALUE", // required + * }, * }, * performedBy: { // UserUnion Union: only one key present * userArn: "STRING_VALUE", diff --git a/clients/client-connectcases/src/commands/SearchRelatedItemsCommand.ts b/clients/client-connectcases/src/commands/SearchRelatedItemsCommand.ts index 955f76edea148..34b3568e0f782 100644 --- a/clients/client-connectcases/src/commands/SearchRelatedItemsCommand.ts +++ b/clients/client-connectcases/src/commands/SearchRelatedItemsCommand.ts @@ -52,6 +52,9 @@ export interface SearchRelatedItemsCommandOutput extends SearchRelatedItemsRespo * contactArn: "STRING_VALUE", * }, * comment: {}, + * file: { // FileFilter + * fileArn: "STRING_VALUE", + * }, * }, * ], * }; @@ -74,6 +77,9 @@ export interface SearchRelatedItemsCommandOutput extends SearchRelatedItemsRespo * // body: "STRING_VALUE", // required * // contentType: "STRING_VALUE", // required * // }, + * // file: { // FileContent + * // fileArn: "STRING_VALUE", // required + * // }, * // }, * // tags: { // Tags * // "": "STRING_VALUE", diff --git a/clients/client-connectcases/src/models/models_0.ts b/clients/client-connectcases/src/models/models_0.ts index b845a59167986..9c9ad1c03a161 100644 --- a/clients/client-connectcases/src/models/models_0.ts +++ b/clients/client-connectcases/src/models/models_0.ts @@ -655,6 +655,7 @@ export interface AuditEventPerformedBy { export const RelatedItemType = { COMMENT: "Comment", CONTACT: "Contact", + FILE: "File", } as const; /** @@ -845,6 +846,18 @@ export interface Contact { contactArn: string | undefined; } +/** + *

An object that represents a content of an Amazon Connect file object.

+ * @public + */ +export interface FileContent { + /** + *

The Amazon Resource Name (ARN) of a File in Amazon Connect.

+ * @public + */ + fileArn: string | undefined; +} + /** *

Represents the content of a related item to be created.

* @public @@ -852,6 +865,7 @@ export interface Contact { export type RelatedItemInputContent = | RelatedItemInputContent.CommentMember | RelatedItemInputContent.ContactMember + | RelatedItemInputContent.FileMember | RelatedItemInputContent.$UnknownMember; /** @@ -865,6 +879,7 @@ export namespace RelatedItemInputContent { export interface ContactMember { contact: Contact; comment?: never; + file?: never; $unknown?: never; } @@ -875,6 +890,18 @@ export namespace RelatedItemInputContent { export interface CommentMember { contact?: never; comment: CommentContent; + file?: never; + $unknown?: never; + } + + /** + *

A file of related items.

+ * @public + */ + export interface FileMember { + contact?: never; + comment?: never; + file: FileContent; $unknown?: never; } @@ -884,18 +911,21 @@ export namespace RelatedItemInputContent { export interface $UnknownMember { contact?: never; comment?: never; + file?: never; $unknown: [string, any]; } export interface Visitor { contact: (value: Contact) => T; comment: (value: CommentContent) => T; + file: (value: FileContent) => T; _: (name: string, value: any) => T; } export const visit = (value: RelatedItemInputContent, visitor: Visitor): T => { if (value.contact !== undefined) return visitor.contact(value.contact); if (value.comment !== undefined) return visitor.comment(value.comment); + if (value.file !== undefined) return visitor.file(value.file); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -997,6 +1027,18 @@ export interface ContactFilter { contactArn?: string; } +/** + *

A filter for related items of type File.

+ * @public + */ +export interface FileFilter { + /** + *

The Amazon Resource Name (ARN) of the file.

+ * @public + */ + fileArn?: string; +} + /** *

The list of types of related items and their parameters to use for filtering.

* @public @@ -1004,6 +1046,7 @@ export interface ContactFilter { export type RelatedItemTypeFilter = | RelatedItemTypeFilter.CommentMember | RelatedItemTypeFilter.ContactMember + | RelatedItemTypeFilter.FileMember | RelatedItemTypeFilter.$UnknownMember; /** @@ -1017,6 +1060,7 @@ export namespace RelatedItemTypeFilter { export interface ContactMember { contact: ContactFilter; comment?: never; + file?: never; $unknown?: never; } @@ -1027,6 +1071,18 @@ export namespace RelatedItemTypeFilter { export interface CommentMember { contact?: never; comment: CommentFilter; + file?: never; + $unknown?: never; + } + + /** + *

A filter for related items of this type of File.

+ * @public + */ + export interface FileMember { + contact?: never; + comment?: never; + file: FileFilter; $unknown?: never; } @@ -1036,18 +1092,21 @@ export namespace RelatedItemTypeFilter { export interface $UnknownMember { contact?: never; comment?: never; + file?: never; $unknown: [string, any]; } export interface Visitor { contact: (value: ContactFilter) => T; comment: (value: CommentFilter) => T; + file: (value: FileFilter) => T; _: (name: string, value: any) => T; } export const visit = (value: RelatedItemTypeFilter, visitor: Visitor): T => { if (value.contact !== undefined) return visitor.contact(value.contact); if (value.comment !== undefined) return visitor.comment(value.comment); + if (value.file !== undefined) return visitor.file(value.file); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -1120,6 +1179,7 @@ export interface ContactContent { export type RelatedItemContent = | RelatedItemContent.CommentMember | RelatedItemContent.ContactMember + | RelatedItemContent.FileMember | RelatedItemContent.$UnknownMember; /** @@ -1133,6 +1193,7 @@ export namespace RelatedItemContent { export interface ContactMember { contact: ContactContent; comment?: never; + file?: never; $unknown?: never; } @@ -1143,6 +1204,18 @@ export namespace RelatedItemContent { export interface CommentMember { contact?: never; comment: CommentContent; + file?: never; + $unknown?: never; + } + + /** + *

Represents the content of a File to be returned to agents.

+ * @public + */ + export interface FileMember { + contact?: never; + comment?: never; + file: FileContent; $unknown?: never; } @@ -1152,18 +1225,21 @@ export namespace RelatedItemContent { export interface $UnknownMember { contact?: never; comment?: never; + file?: never; $unknown: [string, any]; } export interface Visitor { contact: (value: ContactContent) => T; comment: (value: CommentContent) => T; + file: (value: FileContent) => T; _: (name: string, value: any) => T; } export const visit = (value: RelatedItemContent, visitor: Visitor): T => { if (value.contact !== undefined) return visitor.contact(value.contact); if (value.comment !== undefined) return visitor.comment(value.comment); + if (value.file !== undefined) return visitor.file(value.file); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -1885,19 +1961,19 @@ export interface GetFieldResponse { tags?: Record; /** - *

Indicates whether the resource has been deleted.

+ *

Denotes whether or not the resource has been deleted.

* @public */ deleted?: boolean; /** - *

The timestamp for when the resource was created.

+ *

Timestamp at which the resource was created.

* @public */ createdTime?: Date; /** - *

The timestamp for when the resource was created or last modified.

+ *

Timestamp at which the resource was created or last modified.

* @public */ lastModifiedTime?: Date; @@ -2056,13 +2132,13 @@ export interface CreateFieldResponse { */ export interface DeleteFieldRequest { /** - *

The unique identifier of the Cases domain.

+ *

The unique identifier of the Cases domain.

* @public */ domainId: string | undefined; /** - *

The unique identifier of a field.

+ *

Unique identifier of the field.

* @public */ fieldId: string | undefined; @@ -2423,7 +2499,7 @@ export interface CreateLayoutResponse { */ export interface DeleteLayoutRequest { /** - *

The unique identifier of the Cases domain.

+ *

The unique identifier of the Cases domain.

* @public */ domainId: string | undefined; @@ -2493,19 +2569,19 @@ export interface GetLayoutResponse { tags?: Record; /** - *

Indicates whether the resource has been deleted.

+ *

Denotes whether or not the resource has been deleted.

* @public */ deleted?: boolean; /** - *

The timestamp for when the resource was created.

+ *

Timestamp at which the resource was created.

* @public */ createdTime?: Date; /** - *

The timestamp for when the resource was created or last modified.

+ *

Timestamp at which the resource was created or last modified.

* @public */ lastModifiedTime?: Date; @@ -2752,7 +2828,7 @@ export interface CreateTemplateResponse { */ export interface DeleteTemplateRequest { /** - *

The unique identifier of the Cases domain.

+ *

The unique identifier of the Cases domain.

* @public */ domainId: string | undefined; @@ -2840,19 +2916,19 @@ export interface GetTemplateResponse { status: TemplateStatus | undefined; /** - *

Indicates whether the resource has been deleted.

+ *

Denotes whether or not the resource has been deleted.

* @public */ deleted?: boolean; /** - *

The timestamp for when the resource was created.

+ *

Timestamp at which the resource was created.

* @public */ createdTime?: Date; /** - *

The timestamp for when the resource was created or last modified.

+ *

Timestamp at which the resource was created or last modified.

* @public */ lastModifiedTime?: Date; diff --git a/clients/client-connectcases/src/protocols/Aws_restJson1.ts b/clients/client-connectcases/src/protocols/Aws_restJson1.ts index a18e0e1eb6dc6..15d3a039030de 100644 --- a/clients/client-connectcases/src/protocols/Aws_restJson1.ts +++ b/clients/client-connectcases/src/protocols/Aws_restJson1.ts @@ -106,6 +106,8 @@ import { FieldOption, FieldValue, FieldValueUnion, + FileContent, + FileFilter, GetFieldResponse, InternalServerException, LayoutConfiguration, @@ -1874,6 +1876,10 @@ const se_FieldValueUnion = (input: FieldValueUnion, context: __SerdeContext): an }); }; +// se_FileContent omitted. + +// se_FileFilter omitted. + // se_LayoutConfiguration omitted. // se_LayoutContent omitted. @@ -2108,6 +2114,8 @@ const de_FieldValueUnion = (output: any, context: __SerdeContext): FieldValueUni return { $unknown: Object.entries(output)[0] }; }; +// de_FileContent omitted. + /** * deserializeAws_restJson1GetFieldResponse */ @@ -2150,6 +2158,11 @@ const de_RelatedItemContent = (output: any, context: __SerdeContext): RelatedIte contact: de_ContactContent(output.contact, context), }; } + if (output.file != null) { + return { + file: _json(output.file), + }; + } return { $unknown: Object.entries(output)[0] }; }; diff --git a/codegen/sdk-codegen/aws-models/connectcases.json b/codegen/sdk-codegen/aws-models/connectcases.json index 5c34bd663dcdd..46b7d95bce329 100644 --- a/codegen/sdk-codegen/aws-models/connectcases.json +++ b/codegen/sdk-codegen/aws-models/connectcases.json @@ -2122,7 +2122,7 @@ "domainId": { "target": "com.amazonaws.connectcases#DomainId", "traits": { - "smithy.api#documentation": "

The unique identifier of the Cases domain.

", + "smithy.api#documentation": "

The unique identifier of the Cases domain.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2130,7 +2130,7 @@ "fieldId": { "target": "com.amazonaws.connectcases#FieldId", "traits": { - "smithy.api#documentation": "

The unique identifier of a field.

", + "smithy.api#documentation": "

Unique identifier of the field.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2176,7 +2176,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a layout from a cases template. You can delete up to 100 layouts per domain.

\n\n

After a layout is deleted:

\n
    \n
  • \n

    You can still retrieve the layout by calling GetLayout.

    \n
  • \n
  • \n

    You cannot update a deleted layout by calling UpdateLayout; it throws a\n ValidationException.

    \n
  • \n
  • \n

    Deleted layouts are not included in the ListLayouts response.

    \n
  • \n
", + "smithy.api#documentation": "

Deletes a layout from a cases template. You can delete up to 100 layouts per domain.

\n \n

After a layout is deleted:

\n
    \n
  • \n

    You can still retrieve the layout by calling GetLayout.

    \n
  • \n
  • \n

    You cannot update a deleted layout by calling UpdateLayout; it throws a\n ValidationException.

    \n
  • \n
  • \n

    Deleted layouts are not included in the ListLayouts response.

    \n
  • \n
", "smithy.api#http": { "uri": "/domains/{domainId}/layouts/{layoutId}", "method": "DELETE" @@ -2190,7 +2190,7 @@ "domainId": { "target": "com.amazonaws.connectcases#DomainId", "traits": { - "smithy.api#documentation": "

The unique identifier of the Cases domain.

", + "smithy.api#documentation": "

The unique identifier of the Cases domain.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2244,7 +2244,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a cases template. You can delete up to 100 templates per domain.

\n\n

After a cases template is deleted:

\n
    \n
  • \n

    You can still retrieve the template by calling GetTemplate.

    \n
  • \n
  • \n

    You cannot update the template.

    \n
  • \n
  • \n

    You cannot create a case by using the deleted template.

    \n
  • \n
  • \n

    Deleted templates are not included in the ListTemplates response.

    \n
  • \n
", + "smithy.api#documentation": "

Deletes a cases template. You can delete up to 100 templates per domain.

\n \n

After a cases template is deleted:

\n
    \n
  • \n

    You can still retrieve the template by calling GetTemplate.

    \n
  • \n
  • \n

    You cannot update the template.

    \n
  • \n
  • \n

    You cannot create a case by using the deleted template.

    \n
  • \n
  • \n

    Deleted templates are not included in the ListTemplates response.

    \n
  • \n
", "smithy.api#http": { "uri": "/domains/{domainId}/templates/{templateId}", "method": "DELETE" @@ -2258,7 +2258,7 @@ "domainId": { "target": "com.amazonaws.connectcases#DomainId", "traits": { - "smithy.api#documentation": "

The unique identifier of the Cases domain.

", + "smithy.api#documentation": "

The unique identifier of the Cases domain.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2928,6 +2928,44 @@ "smithy.api#documentation": "

Object to store union of Field values.

\n \n

The Summary system field accepts 1500 characters while all other fields\n accept 500 characters.

\n
" } }, + "com.amazonaws.connectcases#FileArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 500 + } + } + }, + "com.amazonaws.connectcases#FileContent": { + "type": "structure", + "members": { + "fileArn": { + "target": "com.amazonaws.connectcases#FileArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a File in Amazon Connect.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

An object that represents a content of an Amazon Connect file object.

" + } + }, + "com.amazonaws.connectcases#FileFilter": { + "type": "structure", + "members": { + "fileArn": { + "target": "com.amazonaws.connectcases#FileArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the file.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A filter for related items of type File.

" + } + }, "com.amazonaws.connectcases#GetCase": { "type": "operation", "input": { @@ -3348,19 +3386,19 @@ "target": "com.amazonaws.connectcases#Deleted", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether the resource has been deleted.

" + "smithy.api#documentation": "

Denotes whether or not the resource has been deleted.

" } }, "createdTime": { "target": "com.amazonaws.connectcases#CreatedTime", "traits": { - "smithy.api#documentation": "

The timestamp for when the resource was created.

" + "smithy.api#documentation": "

Timestamp at which the resource was created.

" } }, "lastModifiedTime": { "target": "com.amazonaws.connectcases#LastModifiedTime", "traits": { - "smithy.api#documentation": "

The timestamp for when the resource was created or last modified.

" + "smithy.api#documentation": "

Timestamp at which the resource was created or last modified.

" } } }, @@ -3464,19 +3502,19 @@ "target": "com.amazonaws.connectcases#Deleted", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether the resource has been deleted.

" + "smithy.api#documentation": "

Denotes whether or not the resource has been deleted.

" } }, "createdTime": { "target": "com.amazonaws.connectcases#CreatedTime", "traits": { - "smithy.api#documentation": "

The timestamp for when the resource was created.

" + "smithy.api#documentation": "

Timestamp at which the resource was created.

" } }, "lastModifiedTime": { "target": "com.amazonaws.connectcases#LastModifiedTime", "traits": { - "smithy.api#documentation": "

The timestamp for when the resource was created or last modified.

" + "smithy.api#documentation": "

Timestamp at which the resource was created or last modified.

" } } } @@ -3595,19 +3633,19 @@ "target": "com.amazonaws.connectcases#Deleted", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether the resource has been deleted.

" + "smithy.api#documentation": "

Denotes whether or not the resource has been deleted.

" } }, "createdTime": { "target": "com.amazonaws.connectcases#CreatedTime", "traits": { - "smithy.api#documentation": "

The timestamp for when the resource was created.

" + "smithy.api#documentation": "

Timestamp at which the resource was created.

" } }, "lastModifiedTime": { "target": "com.amazonaws.connectcases#LastModifiedTime", "traits": { - "smithy.api#documentation": "

The timestamp for when the resource was created or last modified.

" + "smithy.api#documentation": "

Timestamp at which the resource was created or last modified.

" } } } @@ -4518,6 +4556,12 @@ "traits": { "smithy.api#documentation": "

Represents the content of a comment to be returned to agents.

" } + }, + "file": { + "target": "com.amazonaws.connectcases#FileContent", + "traits": { + "smithy.api#documentation": "

Represents the content of a File to be returned to agents.

" + } } }, "traits": { @@ -4568,6 +4612,12 @@ "traits": { "smithy.api#documentation": "

Represents the content of a comment to be returned to agents.

" } + }, + "file": { + "target": "com.amazonaws.connectcases#FileContent", + "traits": { + "smithy.api#documentation": "

A file of related items.

" + } } }, "traits": { @@ -4585,6 +4635,10 @@ { "value": "Comment", "name": "COMMENT" + }, + { + "value": "File", + "name": "FILE" } ] } @@ -4603,6 +4657,12 @@ "traits": { "smithy.api#documentation": "

A filter for related items of type Comment.

" } + }, + "file": { + "target": "com.amazonaws.connectcases#FileFilter", + "traits": { + "smithy.api#documentation": "

A filter for related items of this type of File.

" + } } }, "traits": {