Skip to content

Commit 89b45ab

Browse files
author
awstools
committed
feat(client-connectcases): This feature supports the release of Files related items
1 parent c4eb11d commit 89b45ab

File tree

5 files changed

+186
-28
lines changed

5 files changed

+186
-28
lines changed

clients/client-connectcases/src/commands/CreateRelatedItemCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ export interface CreateRelatedItemCommandOutput extends CreateRelatedItemRespons
6363
* body: "STRING_VALUE", // required
6464
* contentType: "STRING_VALUE", // required
6565
* },
66+
* file: { // FileContent
67+
* fileArn: "STRING_VALUE", // required
68+
* },
6669
* },
6770
* performedBy: { // UserUnion Union: only one key present
6871
* userArn: "STRING_VALUE",

clients/client-connectcases/src/commands/SearchRelatedItemsCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export interface SearchRelatedItemsCommandOutput extends SearchRelatedItemsRespo
5252
* contactArn: "STRING_VALUE",
5353
* },
5454
* comment: {},
55+
* file: { // FileFilter
56+
* fileArn: "STRING_VALUE",
57+
* },
5558
* },
5659
* ],
5760
* };
@@ -74,6 +77,9 @@ export interface SearchRelatedItemsCommandOutput extends SearchRelatedItemsRespo
7477
* // body: "STRING_VALUE", // required
7578
* // contentType: "STRING_VALUE", // required
7679
* // },
80+
* // file: { // FileContent
81+
* // fileArn: "STRING_VALUE", // required
82+
* // },
7783
* // },
7884
* // tags: { // Tags
7985
* // "<keys>": "STRING_VALUE",

clients/client-connectcases/src/models/models_0.ts

Lines changed: 89 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ export interface AuditEventPerformedBy {
655655
export const RelatedItemType = {
656656
COMMENT: "Comment",
657657
CONTACT: "Contact",
658+
FILE: "File",
658659
} as const;
659660

660661
/**
@@ -845,13 +846,26 @@ export interface Contact {
845846
contactArn: string | undefined;
846847
}
847848

849+
/**
850+
* <p>An object that represents a content of an Amazon Connect file object.</p>
851+
* @public
852+
*/
853+
export interface FileContent {
854+
/**
855+
* <p>The Amazon Resource Name (ARN) of a File in Amazon Connect.</p>
856+
* @public
857+
*/
858+
fileArn: string | undefined;
859+
}
860+
848861
/**
849862
* <p>Represents the content of a related item to be created.</p>
850863
* @public
851864
*/
852865
export type RelatedItemInputContent =
853866
| RelatedItemInputContent.CommentMember
854867
| RelatedItemInputContent.ContactMember
868+
| RelatedItemInputContent.FileMember
855869
| RelatedItemInputContent.$UnknownMember;
856870

857871
/**
@@ -865,6 +879,7 @@ export namespace RelatedItemInputContent {
865879
export interface ContactMember {
866880
contact: Contact;
867881
comment?: never;
882+
file?: never;
868883
$unknown?: never;
869884
}
870885

@@ -875,6 +890,18 @@ export namespace RelatedItemInputContent {
875890
export interface CommentMember {
876891
contact?: never;
877892
comment: CommentContent;
893+
file?: never;
894+
$unknown?: never;
895+
}
896+
897+
/**
898+
* <p>A file of related items.</p>
899+
* @public
900+
*/
901+
export interface FileMember {
902+
contact?: never;
903+
comment?: never;
904+
file: FileContent;
878905
$unknown?: never;
879906
}
880907

@@ -884,18 +911,21 @@ export namespace RelatedItemInputContent {
884911
export interface $UnknownMember {
885912
contact?: never;
886913
comment?: never;
914+
file?: never;
887915
$unknown: [string, any];
888916
}
889917

890918
export interface Visitor<T> {
891919
contact: (value: Contact) => T;
892920
comment: (value: CommentContent) => T;
921+
file: (value: FileContent) => T;
893922
_: (name: string, value: any) => T;
894923
}
895924

896925
export const visit = <T>(value: RelatedItemInputContent, visitor: Visitor<T>): T => {
897926
if (value.contact !== undefined) return visitor.contact(value.contact);
898927
if (value.comment !== undefined) return visitor.comment(value.comment);
928+
if (value.file !== undefined) return visitor.file(value.file);
899929
return visitor._(value.$unknown[0], value.$unknown[1]);
900930
};
901931
}
@@ -997,13 +1027,26 @@ export interface ContactFilter {
9971027
contactArn?: string;
9981028
}
9991029

1030+
/**
1031+
* <p>A filter for related items of type <code>File</code>.</p>
1032+
* @public
1033+
*/
1034+
export interface FileFilter {
1035+
/**
1036+
* <p>The Amazon Resource Name (ARN) of the file.</p>
1037+
* @public
1038+
*/
1039+
fileArn?: string;
1040+
}
1041+
10001042
/**
10011043
* <p>The list of types of related items and their parameters to use for filtering.</p>
10021044
* @public
10031045
*/
10041046
export type RelatedItemTypeFilter =
10051047
| RelatedItemTypeFilter.CommentMember
10061048
| RelatedItemTypeFilter.ContactMember
1049+
| RelatedItemTypeFilter.FileMember
10071050
| RelatedItemTypeFilter.$UnknownMember;
10081051

10091052
/**
@@ -1017,6 +1060,7 @@ export namespace RelatedItemTypeFilter {
10171060
export interface ContactMember {
10181061
contact: ContactFilter;
10191062
comment?: never;
1063+
file?: never;
10201064
$unknown?: never;
10211065
}
10221066

@@ -1027,6 +1071,18 @@ export namespace RelatedItemTypeFilter {
10271071
export interface CommentMember {
10281072
contact?: never;
10291073
comment: CommentFilter;
1074+
file?: never;
1075+
$unknown?: never;
1076+
}
1077+
1078+
/**
1079+
* <p>A filter for related items of this type of <code>File</code>.</p>
1080+
* @public
1081+
*/
1082+
export interface FileMember {
1083+
contact?: never;
1084+
comment?: never;
1085+
file: FileFilter;
10301086
$unknown?: never;
10311087
}
10321088

@@ -1036,18 +1092,21 @@ export namespace RelatedItemTypeFilter {
10361092
export interface $UnknownMember {
10371093
contact?: never;
10381094
comment?: never;
1095+
file?: never;
10391096
$unknown: [string, any];
10401097
}
10411098

10421099
export interface Visitor<T> {
10431100
contact: (value: ContactFilter) => T;
10441101
comment: (value: CommentFilter) => T;
1102+
file: (value: FileFilter) => T;
10451103
_: (name: string, value: any) => T;
10461104
}
10471105

10481106
export const visit = <T>(value: RelatedItemTypeFilter, visitor: Visitor<T>): T => {
10491107
if (value.contact !== undefined) return visitor.contact(value.contact);
10501108
if (value.comment !== undefined) return visitor.comment(value.comment);
1109+
if (value.file !== undefined) return visitor.file(value.file);
10511110
return visitor._(value.$unknown[0], value.$unknown[1]);
10521111
};
10531112
}
@@ -1120,6 +1179,7 @@ export interface ContactContent {
11201179
export type RelatedItemContent =
11211180
| RelatedItemContent.CommentMember
11221181
| RelatedItemContent.ContactMember
1182+
| RelatedItemContent.FileMember
11231183
| RelatedItemContent.$UnknownMember;
11241184

11251185
/**
@@ -1133,6 +1193,7 @@ export namespace RelatedItemContent {
11331193
export interface ContactMember {
11341194
contact: ContactContent;
11351195
comment?: never;
1196+
file?: never;
11361197
$unknown?: never;
11371198
}
11381199

@@ -1143,6 +1204,18 @@ export namespace RelatedItemContent {
11431204
export interface CommentMember {
11441205
contact?: never;
11451206
comment: CommentContent;
1207+
file?: never;
1208+
$unknown?: never;
1209+
}
1210+
1211+
/**
1212+
* <p>Represents the content of a File to be returned to agents.</p>
1213+
* @public
1214+
*/
1215+
export interface FileMember {
1216+
contact?: never;
1217+
comment?: never;
1218+
file: FileContent;
11461219
$unknown?: never;
11471220
}
11481221

@@ -1152,18 +1225,21 @@ export namespace RelatedItemContent {
11521225
export interface $UnknownMember {
11531226
contact?: never;
11541227
comment?: never;
1228+
file?: never;
11551229
$unknown: [string, any];
11561230
}
11571231

11581232
export interface Visitor<T> {
11591233
contact: (value: ContactContent) => T;
11601234
comment: (value: CommentContent) => T;
1235+
file: (value: FileContent) => T;
11611236
_: (name: string, value: any) => T;
11621237
}
11631238

11641239
export const visit = <T>(value: RelatedItemContent, visitor: Visitor<T>): T => {
11651240
if (value.contact !== undefined) return visitor.contact(value.contact);
11661241
if (value.comment !== undefined) return visitor.comment(value.comment);
1242+
if (value.file !== undefined) return visitor.file(value.file);
11671243
return visitor._(value.$unknown[0], value.$unknown[1]);
11681244
};
11691245
}
@@ -1885,19 +1961,19 @@ export interface GetFieldResponse {
18851961
tags?: Record<string, string>;
18861962

18871963
/**
1888-
* <p>Indicates whether the resource has been deleted.</p>
1964+
* <p>Denotes whether or not the resource has been deleted.</p>
18891965
* @public
18901966
*/
18911967
deleted?: boolean;
18921968

18931969
/**
1894-
* <p>The timestamp for when the resource was created.</p>
1970+
* <p>Timestamp at which the resource was created.</p>
18951971
* @public
18961972
*/
18971973
createdTime?: Date;
18981974

18991975
/**
1900-
* <p>The timestamp for when the resource was created or last modified.</p>
1976+
* <p>Timestamp at which the resource was created or last modified.</p>
19011977
* @public
19021978
*/
19031979
lastModifiedTime?: Date;
@@ -2056,13 +2132,13 @@ export interface CreateFieldResponse {
20562132
*/
20572133
export interface DeleteFieldRequest {
20582134
/**
2059-
* <p>The unique identifier of the Cases domain. </p>
2135+
* <p>The unique identifier of the Cases domain.</p>
20602136
* @public
20612137
*/
20622138
domainId: string | undefined;
20632139

20642140
/**
2065-
* <p>The unique identifier of a field.</p>
2141+
* <p>Unique identifier of the field.</p>
20662142
* @public
20672143
*/
20682144
fieldId: string | undefined;
@@ -2423,7 +2499,7 @@ export interface CreateLayoutResponse {
24232499
*/
24242500
export interface DeleteLayoutRequest {
24252501
/**
2426-
* <p>The unique identifier of the Cases domain. </p>
2502+
* <p>The unique identifier of the Cases domain.</p>
24272503
* @public
24282504
*/
24292505
domainId: string | undefined;
@@ -2493,19 +2569,19 @@ export interface GetLayoutResponse {
24932569
tags?: Record<string, string>;
24942570

24952571
/**
2496-
* <p>Indicates whether the resource has been deleted.</p>
2572+
* <p>Denotes whether or not the resource has been deleted.</p>
24972573
* @public
24982574
*/
24992575
deleted?: boolean;
25002576

25012577
/**
2502-
* <p>The timestamp for when the resource was created.</p>
2578+
* <p>Timestamp at which the resource was created.</p>
25032579
* @public
25042580
*/
25052581
createdTime?: Date;
25062582

25072583
/**
2508-
* <p>The timestamp for when the resource was created or last modified.</p>
2584+
* <p>Timestamp at which the resource was created or last modified.</p>
25092585
* @public
25102586
*/
25112587
lastModifiedTime?: Date;
@@ -2752,7 +2828,7 @@ export interface CreateTemplateResponse {
27522828
*/
27532829
export interface DeleteTemplateRequest {
27542830
/**
2755-
* <p>The unique identifier of the Cases domain. </p>
2831+
* <p>The unique identifier of the Cases domain.</p>
27562832
* @public
27572833
*/
27582834
domainId: string | undefined;
@@ -2840,19 +2916,19 @@ export interface GetTemplateResponse {
28402916
status: TemplateStatus | undefined;
28412917

28422918
/**
2843-
* <p>Indicates whether the resource has been deleted.</p>
2919+
* <p>Denotes whether or not the resource has been deleted.</p>
28442920
* @public
28452921
*/
28462922
deleted?: boolean;
28472923

28482924
/**
2849-
* <p>The timestamp for when the resource was created.</p>
2925+
* <p>Timestamp at which the resource was created.</p>
28502926
* @public
28512927
*/
28522928
createdTime?: Date;
28532929

28542930
/**
2855-
* <p>The timestamp for when the resource was created or last modified.</p>
2931+
* <p>Timestamp at which the resource was created or last modified.</p>
28562932
* @public
28572933
*/
28582934
lastModifiedTime?: Date;

clients/client-connectcases/src/protocols/Aws_restJson1.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ import {
106106
FieldOption,
107107
FieldValue,
108108
FieldValueUnion,
109+
FileContent,
110+
FileFilter,
109111
GetFieldResponse,
110112
InternalServerException,
111113
LayoutConfiguration,
@@ -1874,6 +1876,10 @@ const se_FieldValueUnion = (input: FieldValueUnion, context: __SerdeContext): an
18741876
});
18751877
};
18761878

1879+
// se_FileContent omitted.
1880+
1881+
// se_FileFilter omitted.
1882+
18771883
// se_LayoutConfiguration omitted.
18781884

18791885
// se_LayoutContent omitted.
@@ -2108,6 +2114,8 @@ const de_FieldValueUnion = (output: any, context: __SerdeContext): FieldValueUni
21082114
return { $unknown: Object.entries(output)[0] };
21092115
};
21102116

2117+
// de_FileContent omitted.
2118+
21112119
/**
21122120
* deserializeAws_restJson1GetFieldResponse
21132121
*/
@@ -2150,6 +2158,11 @@ const de_RelatedItemContent = (output: any, context: __SerdeContext): RelatedIte
21502158
contact: de_ContactContent(output.contact, context),
21512159
};
21522160
}
2161+
if (output.file != null) {
2162+
return {
2163+
file: _json(output.file),
2164+
};
2165+
}
21532166
return { $unknown: Object.entries(output)[0] };
21542167
};
21552168

0 commit comments

Comments
 (0)