@aws-sdk/client-ivs-realtime 3.329.0 → 3.332.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -1
- package/dist-cjs/IVSRealTime.js +10 -0
- package/dist-cjs/commands/GetParticipantCommand.js +45 -0
- package/dist-cjs/commands/GetStageSessionCommand.js +45 -0
- package/dist-cjs/commands/ListParticipantEventsCommand.js +45 -0
- package/dist-cjs/commands/ListParticipantsCommand.js +45 -0
- package/dist-cjs/commands/ListStageSessionsCommand.js +45 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +19 -1
- package/dist-cjs/pagination/ListParticipantEventsPaginator.js +29 -0
- package/dist-cjs/pagination/ListParticipantsPaginator.js +29 -0
- package/dist-cjs/pagination/ListStageSessionsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +3 -0
- package/dist-cjs/protocols/Aws_restJson1.js +381 -1
- package/dist-es/IVSRealTime.js +10 -0
- package/dist-es/commands/GetParticipantCommand.js +41 -0
- package/dist-es/commands/GetStageSessionCommand.js +41 -0
- package/dist-es/commands/ListParticipantEventsCommand.js +41 -0
- package/dist-es/commands/ListParticipantsCommand.js +41 -0
- package/dist-es/commands/ListStageSessionsCommand.js +41 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +18 -0
- package/dist-es/pagination/ListParticipantEventsPaginator.js +25 -0
- package/dist-es/pagination/ListParticipantsPaginator.js +25 -0
- package/dist-es/pagination/ListStageSessionsPaginator.js +25 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +371 -1
- package/dist-types/IVSRealTime.d.ts +77 -1
- package/dist-types/IVSRealTimeClient.d.ts +49 -3
- package/dist-types/commands/CreateParticipantTokenCommand.d.ts +5 -3
- package/dist-types/commands/DisconnectParticipantCommand.d.ts +2 -1
- package/dist-types/commands/GetParticipantCommand.d.ts +89 -0
- package/dist-types/commands/GetStageSessionCommand.d.ts +83 -0
- package/dist-types/commands/ListParticipantEventsCommand.d.ts +89 -0
- package/dist-types/commands/ListParticipantsCommand.d.ts +90 -0
- package/dist-types/commands/ListStageSessionsCommand.d.ts +84 -0
- package/dist-types/commands/ListStagesCommand.d.ts +2 -1
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +405 -33
- package/dist-types/pagination/ListParticipantEventsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListParticipantsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListStageSessionsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/IVSRealTime.d.ts +85 -0
- package/dist-types/ts3.4/IVSRealTimeClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/GetParticipantCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/GetStageSessionCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/ListParticipantEventsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListParticipantsCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/ListStageSessionsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +103 -0
- package/dist-types/ts3.4/pagination/ListParticipantEventsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListParticipantsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListStageSessionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +5 -5
|
@@ -2,7 +2,12 @@ export * from "./CreateParticipantTokenCommand";
|
|
|
2
2
|
export * from "./CreateStageCommand";
|
|
3
3
|
export * from "./DeleteStageCommand";
|
|
4
4
|
export * from "./DisconnectParticipantCommand";
|
|
5
|
+
export * from "./GetParticipantCommand";
|
|
5
6
|
export * from "./GetStageCommand";
|
|
7
|
+
export * from "./GetStageSessionCommand";
|
|
8
|
+
export * from "./ListParticipantEventsCommand";
|
|
9
|
+
export * from "./ListParticipantsCommand";
|
|
10
|
+
export * from "./ListStageSessionsCommand";
|
|
6
11
|
export * from "./ListStagesCommand";
|
|
7
12
|
export * from "./ListTagsForResourceCommand";
|
|
8
13
|
export * from "./TagResourceCommand";
|
|
@@ -82,6 +82,24 @@ export class ConflictException extends __BaseException {
|
|
|
82
82
|
this.exceptionMessage = opts.exceptionMessage;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
export const ParticipantState = {
|
|
86
|
+
CONNECTED: "CONNECTED",
|
|
87
|
+
DISCONNECTED: "DISCONNECTED",
|
|
88
|
+
};
|
|
89
|
+
export const EventErrorCode = {
|
|
90
|
+
INSUFFICIENT_CAPABILITIES: "INSUFFICIENT_CAPABILITIES",
|
|
91
|
+
};
|
|
92
|
+
export const EventName = {
|
|
93
|
+
JOINED: "JOINED",
|
|
94
|
+
JOIN_ERROR: "JOIN_ERROR",
|
|
95
|
+
LEFT: "LEFT",
|
|
96
|
+
PUBLISH_ERROR: "PUBLISH_ERROR",
|
|
97
|
+
PUBLISH_STARTED: "PUBLISH_STARTED",
|
|
98
|
+
PUBLISH_STOPPED: "PUBLISH_STOPPED",
|
|
99
|
+
SUBSCRIBE_ERROR: "SUBSCRIBE_ERROR",
|
|
100
|
+
SUBSCRIBE_STARTED: "SUBSCRIBE_STARTED",
|
|
101
|
+
SUBSCRIBE_STOPPED: "SUBSCRIBE_STOPPED",
|
|
102
|
+
};
|
|
85
103
|
export class InternalServerException extends __BaseException {
|
|
86
104
|
constructor(opts) {
|
|
87
105
|
super({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListParticipantEventsCommand, } from "../commands/ListParticipantEventsCommand";
|
|
2
|
+
import { IVSRealTimeClient } from "../IVSRealTimeClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListParticipantEventsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListParticipantEvents(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof IVSRealTimeClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected IVSRealTime | IVSRealTimeClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListParticipantsCommand, } from "../commands/ListParticipantsCommand";
|
|
2
|
+
import { IVSRealTimeClient } from "../IVSRealTimeClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListParticipantsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListParticipants(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof IVSRealTimeClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected IVSRealTime | IVSRealTimeClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListStageSessionsCommand, } from "../commands/ListStageSessionsCommand";
|
|
2
|
+
import { IVSRealTimeClient } from "../IVSRealTimeClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListStageSessionsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListStageSessions(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof IVSRealTimeClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected IVSRealTime | IVSRealTimeClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { IVSRealTimeServiceException as __BaseException } from "../models/IVSRealTimeServiceException";
|
|
4
4
|
import { AccessDeniedException, ConflictException, InternalServerException, PendingVerification, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
5
5
|
export const se_CreateParticipantTokenCommand = async (input, context) => {
|
|
@@ -90,6 +90,28 @@ export const se_DisconnectParticipantCommand = async (input, context) => {
|
|
|
90
90
|
body,
|
|
91
91
|
});
|
|
92
92
|
};
|
|
93
|
+
export const se_GetParticipantCommand = async (input, context) => {
|
|
94
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
95
|
+
const headers = {
|
|
96
|
+
"content-type": "application/json",
|
|
97
|
+
};
|
|
98
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetParticipant";
|
|
99
|
+
let body;
|
|
100
|
+
body = JSON.stringify(take(input, {
|
|
101
|
+
participantId: [],
|
|
102
|
+
sessionId: [],
|
|
103
|
+
stageArn: [],
|
|
104
|
+
}));
|
|
105
|
+
return new __HttpRequest({
|
|
106
|
+
protocol,
|
|
107
|
+
hostname,
|
|
108
|
+
port,
|
|
109
|
+
method: "POST",
|
|
110
|
+
headers,
|
|
111
|
+
path: resolvedPath,
|
|
112
|
+
body,
|
|
113
|
+
});
|
|
114
|
+
};
|
|
93
115
|
export const se_GetStageCommand = async (input, context) => {
|
|
94
116
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
95
117
|
const headers = {
|
|
@@ -110,6 +132,77 @@ export const se_GetStageCommand = async (input, context) => {
|
|
|
110
132
|
body,
|
|
111
133
|
});
|
|
112
134
|
};
|
|
135
|
+
export const se_GetStageSessionCommand = async (input, context) => {
|
|
136
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
137
|
+
const headers = {
|
|
138
|
+
"content-type": "application/json",
|
|
139
|
+
};
|
|
140
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStageSession";
|
|
141
|
+
let body;
|
|
142
|
+
body = JSON.stringify(take(input, {
|
|
143
|
+
sessionId: [],
|
|
144
|
+
stageArn: [],
|
|
145
|
+
}));
|
|
146
|
+
return new __HttpRequest({
|
|
147
|
+
protocol,
|
|
148
|
+
hostname,
|
|
149
|
+
port,
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers,
|
|
152
|
+
path: resolvedPath,
|
|
153
|
+
body,
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
export const se_ListParticipantEventsCommand = async (input, context) => {
|
|
157
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
158
|
+
const headers = {
|
|
159
|
+
"content-type": "application/json",
|
|
160
|
+
};
|
|
161
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListParticipantEvents";
|
|
162
|
+
let body;
|
|
163
|
+
body = JSON.stringify(take(input, {
|
|
164
|
+
maxResults: [],
|
|
165
|
+
nextToken: [],
|
|
166
|
+
participantId: [],
|
|
167
|
+
sessionId: [],
|
|
168
|
+
stageArn: [],
|
|
169
|
+
}));
|
|
170
|
+
return new __HttpRequest({
|
|
171
|
+
protocol,
|
|
172
|
+
hostname,
|
|
173
|
+
port,
|
|
174
|
+
method: "POST",
|
|
175
|
+
headers,
|
|
176
|
+
path: resolvedPath,
|
|
177
|
+
body,
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
export const se_ListParticipantsCommand = async (input, context) => {
|
|
181
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
182
|
+
const headers = {
|
|
183
|
+
"content-type": "application/json",
|
|
184
|
+
};
|
|
185
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListParticipants";
|
|
186
|
+
let body;
|
|
187
|
+
body = JSON.stringify(take(input, {
|
|
188
|
+
filterByPublished: [],
|
|
189
|
+
filterByState: [],
|
|
190
|
+
filterByUserId: [],
|
|
191
|
+
maxResults: [],
|
|
192
|
+
nextToken: [],
|
|
193
|
+
sessionId: [],
|
|
194
|
+
stageArn: [],
|
|
195
|
+
}));
|
|
196
|
+
return new __HttpRequest({
|
|
197
|
+
protocol,
|
|
198
|
+
hostname,
|
|
199
|
+
port,
|
|
200
|
+
method: "POST",
|
|
201
|
+
headers,
|
|
202
|
+
path: resolvedPath,
|
|
203
|
+
body,
|
|
204
|
+
});
|
|
205
|
+
};
|
|
113
206
|
export const se_ListStagesCommand = async (input, context) => {
|
|
114
207
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
115
208
|
const headers = {
|
|
@@ -131,6 +224,28 @@ export const se_ListStagesCommand = async (input, context) => {
|
|
|
131
224
|
body,
|
|
132
225
|
});
|
|
133
226
|
};
|
|
227
|
+
export const se_ListStageSessionsCommand = async (input, context) => {
|
|
228
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
229
|
+
const headers = {
|
|
230
|
+
"content-type": "application/json",
|
|
231
|
+
};
|
|
232
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStageSessions";
|
|
233
|
+
let body;
|
|
234
|
+
body = JSON.stringify(take(input, {
|
|
235
|
+
maxResults: [],
|
|
236
|
+
nextToken: [],
|
|
237
|
+
stageArn: [],
|
|
238
|
+
}));
|
|
239
|
+
return new __HttpRequest({
|
|
240
|
+
protocol,
|
|
241
|
+
hostname,
|
|
242
|
+
port,
|
|
243
|
+
method: "POST",
|
|
244
|
+
headers,
|
|
245
|
+
path: resolvedPath,
|
|
246
|
+
body,
|
|
247
|
+
});
|
|
248
|
+
};
|
|
134
249
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
135
250
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
136
251
|
const headers = {};
|
|
@@ -379,6 +494,45 @@ const de_DisconnectParticipantCommandError = async (output, context) => {
|
|
|
379
494
|
});
|
|
380
495
|
}
|
|
381
496
|
};
|
|
497
|
+
export const de_GetParticipantCommand = async (output, context) => {
|
|
498
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
499
|
+
return de_GetParticipantCommandError(output, context);
|
|
500
|
+
}
|
|
501
|
+
const contents = map({
|
|
502
|
+
$metadata: deserializeMetadata(output),
|
|
503
|
+
});
|
|
504
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
505
|
+
const doc = take(data, {
|
|
506
|
+
participant: (_) => de_Participant(_, context),
|
|
507
|
+
});
|
|
508
|
+
Object.assign(contents, doc);
|
|
509
|
+
return contents;
|
|
510
|
+
};
|
|
511
|
+
const de_GetParticipantCommandError = async (output, context) => {
|
|
512
|
+
const parsedOutput = {
|
|
513
|
+
...output,
|
|
514
|
+
body: await parseErrorBody(output.body, context),
|
|
515
|
+
};
|
|
516
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
+
switch (errorCode) {
|
|
518
|
+
case "AccessDeniedException":
|
|
519
|
+
case "com.amazonaws.ivsrealtime#AccessDeniedException":
|
|
520
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
521
|
+
case "ResourceNotFoundException":
|
|
522
|
+
case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
|
|
523
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
524
|
+
case "ValidationException":
|
|
525
|
+
case "com.amazonaws.ivsrealtime#ValidationException":
|
|
526
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
527
|
+
default:
|
|
528
|
+
const parsedBody = parsedOutput.body;
|
|
529
|
+
return throwDefaultError({
|
|
530
|
+
output,
|
|
531
|
+
parsedBody,
|
|
532
|
+
errorCode,
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
};
|
|
382
536
|
export const de_GetStageCommand = async (output, context) => {
|
|
383
537
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
384
538
|
return de_GetStageCommandError(output, context);
|
|
@@ -418,6 +572,119 @@ const de_GetStageCommandError = async (output, context) => {
|
|
|
418
572
|
});
|
|
419
573
|
}
|
|
420
574
|
};
|
|
575
|
+
export const de_GetStageSessionCommand = async (output, context) => {
|
|
576
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
577
|
+
return de_GetStageSessionCommandError(output, context);
|
|
578
|
+
}
|
|
579
|
+
const contents = map({
|
|
580
|
+
$metadata: deserializeMetadata(output),
|
|
581
|
+
});
|
|
582
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
583
|
+
const doc = take(data, {
|
|
584
|
+
stageSession: (_) => de_StageSession(_, context),
|
|
585
|
+
});
|
|
586
|
+
Object.assign(contents, doc);
|
|
587
|
+
return contents;
|
|
588
|
+
};
|
|
589
|
+
const de_GetStageSessionCommandError = async (output, context) => {
|
|
590
|
+
const parsedOutput = {
|
|
591
|
+
...output,
|
|
592
|
+
body: await parseErrorBody(output.body, context),
|
|
593
|
+
};
|
|
594
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
595
|
+
switch (errorCode) {
|
|
596
|
+
case "AccessDeniedException":
|
|
597
|
+
case "com.amazonaws.ivsrealtime#AccessDeniedException":
|
|
598
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
599
|
+
case "ResourceNotFoundException":
|
|
600
|
+
case "com.amazonaws.ivsrealtime#ResourceNotFoundException":
|
|
601
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
602
|
+
case "ValidationException":
|
|
603
|
+
case "com.amazonaws.ivsrealtime#ValidationException":
|
|
604
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
605
|
+
default:
|
|
606
|
+
const parsedBody = parsedOutput.body;
|
|
607
|
+
return throwDefaultError({
|
|
608
|
+
output,
|
|
609
|
+
parsedBody,
|
|
610
|
+
errorCode,
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
};
|
|
614
|
+
export const de_ListParticipantEventsCommand = async (output, context) => {
|
|
615
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
616
|
+
return de_ListParticipantEventsCommandError(output, context);
|
|
617
|
+
}
|
|
618
|
+
const contents = map({
|
|
619
|
+
$metadata: deserializeMetadata(output),
|
|
620
|
+
});
|
|
621
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
622
|
+
const doc = take(data, {
|
|
623
|
+
events: (_) => de_EventList(_, context),
|
|
624
|
+
nextToken: __expectString,
|
|
625
|
+
});
|
|
626
|
+
Object.assign(contents, doc);
|
|
627
|
+
return contents;
|
|
628
|
+
};
|
|
629
|
+
const de_ListParticipantEventsCommandError = async (output, context) => {
|
|
630
|
+
const parsedOutput = {
|
|
631
|
+
...output,
|
|
632
|
+
body: await parseErrorBody(output.body, context),
|
|
633
|
+
};
|
|
634
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
635
|
+
switch (errorCode) {
|
|
636
|
+
case "AccessDeniedException":
|
|
637
|
+
case "com.amazonaws.ivsrealtime#AccessDeniedException":
|
|
638
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
639
|
+
case "ValidationException":
|
|
640
|
+
case "com.amazonaws.ivsrealtime#ValidationException":
|
|
641
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
642
|
+
default:
|
|
643
|
+
const parsedBody = parsedOutput.body;
|
|
644
|
+
return throwDefaultError({
|
|
645
|
+
output,
|
|
646
|
+
parsedBody,
|
|
647
|
+
errorCode,
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
export const de_ListParticipantsCommand = async (output, context) => {
|
|
652
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
653
|
+
return de_ListParticipantsCommandError(output, context);
|
|
654
|
+
}
|
|
655
|
+
const contents = map({
|
|
656
|
+
$metadata: deserializeMetadata(output),
|
|
657
|
+
});
|
|
658
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
659
|
+
const doc = take(data, {
|
|
660
|
+
nextToken: __expectString,
|
|
661
|
+
participants: (_) => de_ParticipantList(_, context),
|
|
662
|
+
});
|
|
663
|
+
Object.assign(contents, doc);
|
|
664
|
+
return contents;
|
|
665
|
+
};
|
|
666
|
+
const de_ListParticipantsCommandError = async (output, context) => {
|
|
667
|
+
const parsedOutput = {
|
|
668
|
+
...output,
|
|
669
|
+
body: await parseErrorBody(output.body, context),
|
|
670
|
+
};
|
|
671
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
+
switch (errorCode) {
|
|
673
|
+
case "AccessDeniedException":
|
|
674
|
+
case "com.amazonaws.ivsrealtime#AccessDeniedException":
|
|
675
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
676
|
+
case "ValidationException":
|
|
677
|
+
case "com.amazonaws.ivsrealtime#ValidationException":
|
|
678
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
679
|
+
default:
|
|
680
|
+
const parsedBody = parsedOutput.body;
|
|
681
|
+
return throwDefaultError({
|
|
682
|
+
output,
|
|
683
|
+
parsedBody,
|
|
684
|
+
errorCode,
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
};
|
|
421
688
|
export const de_ListStagesCommand = async (output, context) => {
|
|
422
689
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
423
690
|
return de_ListStagesCommandError(output, context);
|
|
@@ -458,6 +725,43 @@ const de_ListStagesCommandError = async (output, context) => {
|
|
|
458
725
|
});
|
|
459
726
|
}
|
|
460
727
|
};
|
|
728
|
+
export const de_ListStageSessionsCommand = async (output, context) => {
|
|
729
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
730
|
+
return de_ListStageSessionsCommandError(output, context);
|
|
731
|
+
}
|
|
732
|
+
const contents = map({
|
|
733
|
+
$metadata: deserializeMetadata(output),
|
|
734
|
+
});
|
|
735
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
736
|
+
const doc = take(data, {
|
|
737
|
+
nextToken: __expectString,
|
|
738
|
+
stageSessions: (_) => de_StageSessionList(_, context),
|
|
739
|
+
});
|
|
740
|
+
Object.assign(contents, doc);
|
|
741
|
+
return contents;
|
|
742
|
+
};
|
|
743
|
+
const de_ListStageSessionsCommandError = async (output, context) => {
|
|
744
|
+
const parsedOutput = {
|
|
745
|
+
...output,
|
|
746
|
+
body: await parseErrorBody(output.body, context),
|
|
747
|
+
};
|
|
748
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
749
|
+
switch (errorCode) {
|
|
750
|
+
case "AccessDeniedException":
|
|
751
|
+
case "com.amazonaws.ivsrealtime#AccessDeniedException":
|
|
752
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
753
|
+
case "ValidationException":
|
|
754
|
+
case "com.amazonaws.ivsrealtime#ValidationException":
|
|
755
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
756
|
+
default:
|
|
757
|
+
const parsedBody = parsedOutput.body;
|
|
758
|
+
return throwDefaultError({
|
|
759
|
+
output,
|
|
760
|
+
parsedBody,
|
|
761
|
+
errorCode,
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
};
|
|
461
765
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
462
766
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
463
767
|
return de_ListTagsForResourceCommandError(output, context);
|
|
@@ -704,6 +1008,50 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
704
1008
|
});
|
|
705
1009
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
706
1010
|
};
|
|
1011
|
+
const de_Event = (output, context) => {
|
|
1012
|
+
return take(output, {
|
|
1013
|
+
errorCode: __expectString,
|
|
1014
|
+
eventTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1015
|
+
name: __expectString,
|
|
1016
|
+
participantId: __expectString,
|
|
1017
|
+
remoteParticipantId: __expectString,
|
|
1018
|
+
});
|
|
1019
|
+
};
|
|
1020
|
+
const de_EventList = (output, context) => {
|
|
1021
|
+
const retVal = (output || [])
|
|
1022
|
+
.filter((e) => e != null)
|
|
1023
|
+
.map((entry) => {
|
|
1024
|
+
return de_Event(entry, context);
|
|
1025
|
+
});
|
|
1026
|
+
return retVal;
|
|
1027
|
+
};
|
|
1028
|
+
const de_Participant = (output, context) => {
|
|
1029
|
+
return take(output, {
|
|
1030
|
+
attributes: _json,
|
|
1031
|
+
firstJoinTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1032
|
+
participantId: __expectString,
|
|
1033
|
+
published: __expectBoolean,
|
|
1034
|
+
state: __expectString,
|
|
1035
|
+
userId: __expectString,
|
|
1036
|
+
});
|
|
1037
|
+
};
|
|
1038
|
+
const de_ParticipantList = (output, context) => {
|
|
1039
|
+
const retVal = (output || [])
|
|
1040
|
+
.filter((e) => e != null)
|
|
1041
|
+
.map((entry) => {
|
|
1042
|
+
return de_ParticipantSummary(entry, context);
|
|
1043
|
+
});
|
|
1044
|
+
return retVal;
|
|
1045
|
+
};
|
|
1046
|
+
const de_ParticipantSummary = (output, context) => {
|
|
1047
|
+
return take(output, {
|
|
1048
|
+
firstJoinTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1049
|
+
participantId: __expectString,
|
|
1050
|
+
published: __expectBoolean,
|
|
1051
|
+
state: __expectString,
|
|
1052
|
+
userId: __expectString,
|
|
1053
|
+
});
|
|
1054
|
+
};
|
|
707
1055
|
const de_ParticipantToken = (output, context) => {
|
|
708
1056
|
return take(output, {
|
|
709
1057
|
attributes: _json,
|
|
@@ -723,6 +1071,28 @@ const de_ParticipantTokenList = (output, context) => {
|
|
|
723
1071
|
});
|
|
724
1072
|
return retVal;
|
|
725
1073
|
};
|
|
1074
|
+
const de_StageSession = (output, context) => {
|
|
1075
|
+
return take(output, {
|
|
1076
|
+
endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1077
|
+
sessionId: __expectString,
|
|
1078
|
+
startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1079
|
+
});
|
|
1080
|
+
};
|
|
1081
|
+
const de_StageSessionList = (output, context) => {
|
|
1082
|
+
const retVal = (output || [])
|
|
1083
|
+
.filter((e) => e != null)
|
|
1084
|
+
.map((entry) => {
|
|
1085
|
+
return de_StageSessionSummary(entry, context);
|
|
1086
|
+
});
|
|
1087
|
+
return retVal;
|
|
1088
|
+
};
|
|
1089
|
+
const de_StageSessionSummary = (output, context) => {
|
|
1090
|
+
return take(output, {
|
|
1091
|
+
endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1092
|
+
sessionId: __expectString,
|
|
1093
|
+
startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1094
|
+
});
|
|
1095
|
+
};
|
|
726
1096
|
const deserializeMetadata = (output) => ({
|
|
727
1097
|
httpStatusCode: output.statusCode,
|
|
728
1098
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -3,8 +3,13 @@ import { CreateParticipantTokenCommandInput, CreateParticipantTokenCommandOutput
|
|
|
3
3
|
import { CreateStageCommandInput, CreateStageCommandOutput } from "./commands/CreateStageCommand";
|
|
4
4
|
import { DeleteStageCommandInput, DeleteStageCommandOutput } from "./commands/DeleteStageCommand";
|
|
5
5
|
import { DisconnectParticipantCommandInput, DisconnectParticipantCommandOutput } from "./commands/DisconnectParticipantCommand";
|
|
6
|
+
import { GetParticipantCommandInput, GetParticipantCommandOutput } from "./commands/GetParticipantCommand";
|
|
6
7
|
import { GetStageCommandInput, GetStageCommandOutput } from "./commands/GetStageCommand";
|
|
8
|
+
import { GetStageSessionCommandInput, GetStageSessionCommandOutput } from "./commands/GetStageSessionCommand";
|
|
9
|
+
import { ListParticipantEventsCommandInput, ListParticipantEventsCommandOutput } from "./commands/ListParticipantEventsCommand";
|
|
10
|
+
import { ListParticipantsCommandInput, ListParticipantsCommandOutput } from "./commands/ListParticipantsCommand";
|
|
7
11
|
import { ListStagesCommandInput, ListStagesCommandOutput } from "./commands/ListStagesCommand";
|
|
12
|
+
import { ListStageSessionsCommandInput, ListStageSessionsCommandOutput } from "./commands/ListStageSessionsCommand";
|
|
8
13
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
9
14
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
10
15
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
@@ -35,18 +40,48 @@ export interface IVSRealTime {
|
|
|
35
40
|
disconnectParticipant(args: DisconnectParticipantCommandInput, options?: __HttpHandlerOptions): Promise<DisconnectParticipantCommandOutput>;
|
|
36
41
|
disconnectParticipant(args: DisconnectParticipantCommandInput, cb: (err: any, data?: DisconnectParticipantCommandOutput) => void): void;
|
|
37
42
|
disconnectParticipant(args: DisconnectParticipantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DisconnectParticipantCommandOutput) => void): void;
|
|
43
|
+
/**
|
|
44
|
+
* @see {@link GetParticipantCommand}
|
|
45
|
+
*/
|
|
46
|
+
getParticipant(args: GetParticipantCommandInput, options?: __HttpHandlerOptions): Promise<GetParticipantCommandOutput>;
|
|
47
|
+
getParticipant(args: GetParticipantCommandInput, cb: (err: any, data?: GetParticipantCommandOutput) => void): void;
|
|
48
|
+
getParticipant(args: GetParticipantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetParticipantCommandOutput) => void): void;
|
|
38
49
|
/**
|
|
39
50
|
* @see {@link GetStageCommand}
|
|
40
51
|
*/
|
|
41
52
|
getStage(args: GetStageCommandInput, options?: __HttpHandlerOptions): Promise<GetStageCommandOutput>;
|
|
42
53
|
getStage(args: GetStageCommandInput, cb: (err: any, data?: GetStageCommandOutput) => void): void;
|
|
43
54
|
getStage(args: GetStageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStageCommandOutput) => void): void;
|
|
55
|
+
/**
|
|
56
|
+
* @see {@link GetStageSessionCommand}
|
|
57
|
+
*/
|
|
58
|
+
getStageSession(args: GetStageSessionCommandInput, options?: __HttpHandlerOptions): Promise<GetStageSessionCommandOutput>;
|
|
59
|
+
getStageSession(args: GetStageSessionCommandInput, cb: (err: any, data?: GetStageSessionCommandOutput) => void): void;
|
|
60
|
+
getStageSession(args: GetStageSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStageSessionCommandOutput) => void): void;
|
|
61
|
+
/**
|
|
62
|
+
* @see {@link ListParticipantEventsCommand}
|
|
63
|
+
*/
|
|
64
|
+
listParticipantEvents(args: ListParticipantEventsCommandInput, options?: __HttpHandlerOptions): Promise<ListParticipantEventsCommandOutput>;
|
|
65
|
+
listParticipantEvents(args: ListParticipantEventsCommandInput, cb: (err: any, data?: ListParticipantEventsCommandOutput) => void): void;
|
|
66
|
+
listParticipantEvents(args: ListParticipantEventsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListParticipantEventsCommandOutput) => void): void;
|
|
67
|
+
/**
|
|
68
|
+
* @see {@link ListParticipantsCommand}
|
|
69
|
+
*/
|
|
70
|
+
listParticipants(args: ListParticipantsCommandInput, options?: __HttpHandlerOptions): Promise<ListParticipantsCommandOutput>;
|
|
71
|
+
listParticipants(args: ListParticipantsCommandInput, cb: (err: any, data?: ListParticipantsCommandOutput) => void): void;
|
|
72
|
+
listParticipants(args: ListParticipantsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListParticipantsCommandOutput) => void): void;
|
|
44
73
|
/**
|
|
45
74
|
* @see {@link ListStagesCommand}
|
|
46
75
|
*/
|
|
47
76
|
listStages(args: ListStagesCommandInput, options?: __HttpHandlerOptions): Promise<ListStagesCommandOutput>;
|
|
48
77
|
listStages(args: ListStagesCommandInput, cb: (err: any, data?: ListStagesCommandOutput) => void): void;
|
|
49
78
|
listStages(args: ListStagesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStagesCommandOutput) => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* @see {@link ListStageSessionsCommand}
|
|
81
|
+
*/
|
|
82
|
+
listStageSessions(args: ListStageSessionsCommandInput, options?: __HttpHandlerOptions): Promise<ListStageSessionsCommandOutput>;
|
|
83
|
+
listStageSessions(args: ListStageSessionsCommandInput, cb: (err: any, data?: ListStageSessionsCommandOutput) => void): void;
|
|
84
|
+
listStageSessions(args: ListStageSessionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStageSessionsCommandOutput) => void): void;
|
|
50
85
|
/**
|
|
51
86
|
* @see {@link ListTagsForResourceCommand}
|
|
52
87
|
*/
|
|
@@ -81,7 +116,24 @@ export interface IVSRealTime {
|
|
|
81
116
|
* API and an AWS EventBridge event stream for responses. JSON is used for both requests and responses,
|
|
82
117
|
* including errors.
|
|
83
118
|
* </p>
|
|
84
|
-
* <p>Terminology
|
|
119
|
+
* <p>Terminology:</p>
|
|
120
|
+
* <ul>
|
|
121
|
+
* <li>
|
|
122
|
+
* <p>The IVS stage API sometimes is referred to as the IVS <i>RealTime</i>
|
|
123
|
+
* API.</p>
|
|
124
|
+
* </li>
|
|
125
|
+
* <li>
|
|
126
|
+
* <p>A <i>participant token</i> is an authorization token used to publish/subscribe
|
|
127
|
+
* to a stage.</p>
|
|
128
|
+
* </li>
|
|
129
|
+
* <li>
|
|
130
|
+
* <p>A <i>participant object</i> represents participants
|
|
131
|
+
* (people) in the stage and contains information about them. When a token is created, it
|
|
132
|
+
* includes a participant ID; when a participant uses that token to join a stage, the
|
|
133
|
+
* participant is associated with that participant ID There is a 1:1 mapping between
|
|
134
|
+
* participant tokens and participants.</p>
|
|
135
|
+
* </li>
|
|
136
|
+
* </ul>
|
|
85
137
|
* <p>
|
|
86
138
|
* <b>Resources</b>
|
|
87
139
|
* </p>
|
|
@@ -129,14 +181,38 @@ export interface IVSRealTime {
|
|
|
129
181
|
* </li>
|
|
130
182
|
* <li>
|
|
131
183
|
* <p>
|
|
184
|
+
* <a>GetParticipant</a> — Gets information about the specified
|
|
185
|
+
* participant token.</p>
|
|
186
|
+
* </li>
|
|
187
|
+
* <li>
|
|
188
|
+
* <p>
|
|
132
189
|
* <a>GetStage</a> — Gets information for the specified stage.</p>
|
|
133
190
|
* </li>
|
|
134
191
|
* <li>
|
|
135
192
|
* <p>
|
|
193
|
+
* <a>GetStageSession</a> — Gets information for the specified stage
|
|
194
|
+
* session.</p>
|
|
195
|
+
* </li>
|
|
196
|
+
* <li>
|
|
197
|
+
* <p>
|
|
198
|
+
* <a>ListParticipantEvents</a> — Lists events for a specified
|
|
199
|
+
* participant that occurred during a specified stage session.</p>
|
|
200
|
+
* </li>
|
|
201
|
+
* <li>
|
|
202
|
+
* <p>
|
|
203
|
+
* <a>ListParticipants</a> — Lists all participants in a specified stage
|
|
204
|
+
* session.</p>
|
|
205
|
+
* </li>
|
|
206
|
+
* <li>
|
|
207
|
+
* <p>
|
|
136
208
|
* <a>ListStages</a> — Gets summary information about all stages in your account, in the AWS region where the API request is processed.</p>
|
|
137
209
|
* </li>
|
|
138
210
|
* <li>
|
|
139
211
|
* <p>
|
|
212
|
+
* <a>ListStageSessions</a> — Gets all sessions for a specified stage.</p>
|
|
213
|
+
* </li>
|
|
214
|
+
* <li>
|
|
215
|
+
* <p>
|
|
140
216
|
* <a>UpdateStage</a> — Updates a stage’s configuration.</p>
|
|
141
217
|
* </li>
|
|
142
218
|
* </ul>
|