Skip to content

Commit 40ac3d8

Browse files
author
awstools
committed
feat(client-connectparticipant): Amazon Connect now supports message processing that intercepts and processes chat messages before they reach any participant.
1 parent 1ccd14b commit 40ac3d8

File tree

6 files changed

+104
-2
lines changed

6 files changed

+104
-2
lines changed

clients/client-connectparticipant/src/commands/GetTranscriptCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export interface GetTranscriptCommandOutput extends GetTranscriptResponse, __Met
129129
* // RecipientParticipantId: "STRING_VALUE",
130130
* // },
131131
* // ],
132+
* // MessageProcessingStatus: "PROCESSING" || "FAILED" || "REJECTED",
132133
* // },
133134
* // RelatedContactId: "STRING_VALUE",
134135
* // ContactId: "STRING_VALUE",

clients/client-connectparticipant/src/commands/SendMessageCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export interface SendMessageCommandOutput extends SendMessageResponse, __Metadat
5959
* // { // SendMessageResponse
6060
* // Id: "STRING_VALUE",
6161
* // AbsoluteTime: "STRING_VALUE",
62+
* // MessageMetadata: { // MessageProcessingMetadata
63+
* // MessageProcessingStatus: "PROCESSING" || "FAILED" || "REJECTED",
64+
* // },
6265
* // };
6366
*
6467
* ```

clients/client-connectparticipant/src/models/enums.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ export const ArtifactStatus = {
8585
*/
8686
export type ArtifactStatus = (typeof ArtifactStatus)[keyof typeof ArtifactStatus];
8787

88+
/**
89+
* @public
90+
* @enum
91+
*/
92+
export const MessageProcessingStatus = {
93+
FAILED: "FAILED",
94+
PROCESSING: "PROCESSING",
95+
REJECTED: "REJECTED",
96+
} as const;
97+
/**
98+
* @public
99+
*/
100+
export type MessageProcessingStatus = (typeof MessageProcessingStatus)[keyof typeof MessageProcessingStatus];
101+
88102
/**
89103
* @public
90104
* @enum

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
ChatItemType,
55
ConnectionType,
66
MeetingFeatureStatus,
7+
MessageProcessingStatus,
78
ParticipantRole,
89
ScanDirection,
910
SortKey,
@@ -623,6 +624,12 @@ export interface MessageMetadata {
623624
* @public
624625
*/
625626
Receipts?: Receipt[] | undefined;
627+
628+
/**
629+
* <p>The status of Message Processing for the message.</p>
630+
* @public
631+
*/
632+
MessageProcessingStatus?: MessageProcessingStatus | undefined;
626633
}
627634

628635
/**
@@ -857,6 +864,18 @@ export interface SendMessageRequest {
857864
ConnectionToken: string | undefined;
858865
}
859866

867+
/**
868+
* <p>Contains metadata for chat messages.</p>
869+
* @public
870+
*/
871+
export interface MessageProcessingMetadata {
872+
/**
873+
* <p>The status of Message Processing for the message.</p>
874+
* @public
875+
*/
876+
MessageProcessingStatus?: MessageProcessingStatus | undefined;
877+
}
878+
860879
/**
861880
* @public
862881
*/
@@ -874,6 +893,12 @@ export interface SendMessageResponse {
874893
* @public
875894
*/
876895
AbsoluteTime?: string | undefined;
896+
897+
/**
898+
* <p>Contains metadata for the message.</p>
899+
* @public
900+
*/
901+
MessageMetadata?: MessageProcessingMetadata | undefined;
877902
}
878903

879904
/**

clients/client-connectparticipant/src/schemas/schemas_0.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const _MI = "MessageId";
6767
const _MIe = "MeetingId";
6868
const _MM = "MessageMetadata";
6969
const _MP = "MediaPlacement";
70+
const _MPM = "MessageProcessingMetadata";
71+
const _MPS = "MessageProcessingStatus";
7072
const _MR = "MaxResults";
7173
const _MRo = "MostRecent";
7274
const _Me = "Meeting";
@@ -365,7 +367,8 @@ export var Item: StaticStructureSchema = [
365367
[0, 0, 0, 0, 0, 0, 0, 0, () => Attachments, () => MessageMetadata, 0, 0],
366368
];
367369
export var MeetingFeaturesConfiguration: StaticStructureSchema = [3, n0, _MFC, 0, [_Au], [() => AudioFeatures]];
368-
export var MessageMetadata: StaticStructureSchema = [3, n0, _MM, 0, [_MI, _R], [0, () => Receipts]];
370+
export var MessageMetadata: StaticStructureSchema = [3, n0, _MM, 0, [_MI, _R, _MPS], [0, () => Receipts, 0]];
371+
export var MessageProcessingMetadata: StaticStructureSchema = [3, n0, _MPM, 0, [_MPS], [0]];
369372
export var Receipt: StaticStructureSchema = [3, n0, _Re, 0, [_DT, _RT, _RPI], [0, 0, 0]];
370373
export var ResourceNotFoundException: StaticErrorSchema = [
371374
-3,
@@ -417,7 +420,14 @@ export var SendMessageRequest: StaticStructureSchema = [
417420
],
418421
],
419422
];
420-
export var SendMessageResponse: StaticStructureSchema = [3, n0, _SMRe, 0, [_Id, _AT], [0, 0]];
423+
export var SendMessageResponse: StaticStructureSchema = [
424+
3,
425+
n0,
426+
_SMRe,
427+
0,
428+
[_Id, _AT, _MM],
429+
[0, 0, () => MessageProcessingMetadata],
430+
];
421431
export var ServiceQuotaExceededException: StaticErrorSchema = [
422432
-3,
423433
n0,

codegen/sdk-codegen/aws-models/connectparticipant.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,12 +1906,55 @@
19061906
"traits": {
19071907
"smithy.api#documentation": "<p>The list of receipt information for a message for different recipients.</p>"
19081908
}
1909+
},
1910+
"MessageProcessingStatus": {
1911+
"target": "com.amazonaws.connectparticipant#MessageProcessingStatus",
1912+
"traits": {
1913+
"smithy.api#documentation": "<p>The status of Message Processing for the message.</p>"
1914+
}
19091915
}
19101916
},
19111917
"traits": {
19121918
"smithy.api#documentation": "<p>Contains metadata related to a message.</p>"
19131919
}
19141920
},
1921+
"com.amazonaws.connectparticipant#MessageProcessingMetadata": {
1922+
"type": "structure",
1923+
"members": {
1924+
"MessageProcessingStatus": {
1925+
"target": "com.amazonaws.connectparticipant#MessageProcessingStatus",
1926+
"traits": {
1927+
"smithy.api#documentation": "<p>The status of Message Processing for the message.</p>"
1928+
}
1929+
}
1930+
},
1931+
"traits": {
1932+
"smithy.api#documentation": "<p>Contains metadata for chat messages.</p>"
1933+
}
1934+
},
1935+
"com.amazonaws.connectparticipant#MessageProcessingStatus": {
1936+
"type": "enum",
1937+
"members": {
1938+
"PROCESSING": {
1939+
"target": "smithy.api#Unit",
1940+
"traits": {
1941+
"smithy.api#enumValue": "PROCESSING"
1942+
}
1943+
},
1944+
"FAILED": {
1945+
"target": "smithy.api#Unit",
1946+
"traits": {
1947+
"smithy.api#enumValue": "FAILED"
1948+
}
1949+
},
1950+
"REJECTED": {
1951+
"target": "smithy.api#Unit",
1952+
"traits": {
1953+
"smithy.api#enumValue": "REJECTED"
1954+
}
1955+
}
1956+
}
1957+
},
19151958
"com.amazonaws.connectparticipant#MostRecent": {
19161959
"type": "integer",
19171960
"traits": {
@@ -2331,6 +2374,12 @@
23312374
"traits": {
23322375
"smithy.api#documentation": "<p>The time when the message was sent.</p>\n <p>It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,\n 2019-11-08T02:41:28.172Z.</p>"
23332376
}
2377+
},
2378+
"MessageMetadata": {
2379+
"target": "com.amazonaws.connectparticipant#MessageProcessingMetadata",
2380+
"traits": {
2381+
"smithy.api#documentation": "<p>Contains metadata for the message.</p>"
2382+
}
23342383
}
23352384
},
23362385
"traits": {

0 commit comments

Comments
 (0)