@aws-sdk/client-qapps 3.927.0 → 3.929.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.
Files changed (56) hide show
  1. package/dist-cjs/index.js +1792 -1872
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/QAppsClient.js +2 -0
  4. package/dist-es/commands/AssociateLibraryItemReviewCommand.js +3 -9
  5. package/dist-es/commands/AssociateQAppWithUserCommand.js +3 -9
  6. package/dist-es/commands/BatchCreateCategoryCommand.js +3 -9
  7. package/dist-es/commands/BatchDeleteCategoryCommand.js +3 -9
  8. package/dist-es/commands/BatchUpdateCategoryCommand.js +3 -9
  9. package/dist-es/commands/CreateLibraryItemCommand.js +3 -9
  10. package/dist-es/commands/CreatePresignedUrlCommand.js +3 -9
  11. package/dist-es/commands/CreateQAppCommand.js +3 -9
  12. package/dist-es/commands/DeleteLibraryItemCommand.js +3 -9
  13. package/dist-es/commands/DeleteQAppCommand.js +3 -9
  14. package/dist-es/commands/DescribeQAppPermissionsCommand.js +3 -9
  15. package/dist-es/commands/DisassociateLibraryItemReviewCommand.js +3 -9
  16. package/dist-es/commands/DisassociateQAppFromUserCommand.js +3 -9
  17. package/dist-es/commands/ExportQAppSessionDataCommand.js +3 -9
  18. package/dist-es/commands/GetLibraryItemCommand.js +3 -9
  19. package/dist-es/commands/GetQAppCommand.js +3 -9
  20. package/dist-es/commands/GetQAppSessionCommand.js +3 -9
  21. package/dist-es/commands/GetQAppSessionMetadataCommand.js +3 -9
  22. package/dist-es/commands/ImportDocumentCommand.js +3 -9
  23. package/dist-es/commands/ListCategoriesCommand.js +3 -9
  24. package/dist-es/commands/ListLibraryItemsCommand.js +3 -9
  25. package/dist-es/commands/ListQAppSessionDataCommand.js +3 -9
  26. package/dist-es/commands/ListQAppsCommand.js +3 -9
  27. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  28. package/dist-es/commands/PredictQAppCommand.js +3 -9
  29. package/dist-es/commands/StartQAppSessionCommand.js +3 -9
  30. package/dist-es/commands/StopQAppSessionCommand.js +3 -9
  31. package/dist-es/commands/TagResourceCommand.js +3 -9
  32. package/dist-es/commands/UntagResourceCommand.js +3 -9
  33. package/dist-es/commands/UpdateLibraryItemCommand.js +3 -9
  34. package/dist-es/commands/UpdateLibraryItemMetadataCommand.js +3 -9
  35. package/dist-es/commands/UpdateQAppCommand.js +3 -9
  36. package/dist-es/commands/UpdateQAppPermissionsCommand.js +3 -9
  37. package/dist-es/commands/UpdateQAppSessionCommand.js +3 -9
  38. package/dist-es/commands/UpdateQAppSessionMetadataCommand.js +3 -9
  39. package/dist-es/runtimeConfig.shared.js +2 -0
  40. package/dist-es/schemas/schemas_0.js +1713 -0
  41. package/dist-types/QAppsClient.d.ts +10 -1
  42. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  43. package/dist-types/runtimeConfig.d.ts +1 -0
  44. package/dist-types/runtimeConfig.native.d.ts +1 -0
  45. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  46. package/dist-types/schemas/schemas_0.d.ts +168 -0
  47. package/dist-types/ts3.4/QAppsClient.d.ts +4 -0
  48. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  49. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  50. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  51. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  52. package/dist-types/ts3.4/schemas/schemas_0.d.ts +174 -0
  53. package/package.json +5 -5
  54. package/dist-es/protocols/Aws_restJson1.js +0 -1611
  55. package/dist-types/protocols/Aws_restJson1.d.ts +0 -317
  56. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -425
@@ -1,1611 +0,0 @@
1
- import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, CardInput, ConflictException, ContentTooLargeException, DocumentAttributeValue, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UnauthorizedException, ValidationException, } from "../models/models_0";
5
- import { QAppsServiceException as __BaseException } from "../models/QAppsServiceException";
6
- export const se_AssociateLibraryItemReviewCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = map({}, isSerializableHeaderValue, {
9
- "content-type": "application/json",
10
- [_ii]: input[_iI],
11
- });
12
- b.bp("/catalog.associateItemRating");
13
- let body;
14
- body = JSON.stringify(take(input, {
15
- libraryItemId: [],
16
- }));
17
- b.m("POST").h(headers).b(body);
18
- return b.build();
19
- };
20
- export const se_AssociateQAppWithUserCommand = async (input, context) => {
21
- const b = rb(input, context);
22
- const headers = map({}, isSerializableHeaderValue, {
23
- "content-type": "application/json",
24
- [_ii]: input[_iI],
25
- });
26
- b.bp("/apps.install");
27
- let body;
28
- body = JSON.stringify(take(input, {
29
- appId: [],
30
- }));
31
- b.m("POST").h(headers).b(body);
32
- return b.build();
33
- };
34
- export const se_BatchCreateCategoryCommand = async (input, context) => {
35
- const b = rb(input, context);
36
- const headers = map({}, isSerializableHeaderValue, {
37
- "content-type": "application/json",
38
- [_ii]: input[_iI],
39
- });
40
- b.bp("/catalog.createCategories");
41
- let body;
42
- body = JSON.stringify(take(input, {
43
- categories: (_) => _json(_),
44
- }));
45
- b.m("POST").h(headers).b(body);
46
- return b.build();
47
- };
48
- export const se_BatchDeleteCategoryCommand = async (input, context) => {
49
- const b = rb(input, context);
50
- const headers = map({}, isSerializableHeaderValue, {
51
- "content-type": "application/json",
52
- [_ii]: input[_iI],
53
- });
54
- b.bp("/catalog.deleteCategories");
55
- let body;
56
- body = JSON.stringify(take(input, {
57
- categories: (_) => _json(_),
58
- }));
59
- b.m("POST").h(headers).b(body);
60
- return b.build();
61
- };
62
- export const se_BatchUpdateCategoryCommand = async (input, context) => {
63
- const b = rb(input, context);
64
- const headers = map({}, isSerializableHeaderValue, {
65
- "content-type": "application/json",
66
- [_ii]: input[_iI],
67
- });
68
- b.bp("/catalog.updateCategories");
69
- let body;
70
- body = JSON.stringify(take(input, {
71
- categories: (_) => _json(_),
72
- }));
73
- b.m("POST").h(headers).b(body);
74
- return b.build();
75
- };
76
- export const se_CreateLibraryItemCommand = async (input, context) => {
77
- const b = rb(input, context);
78
- const headers = map({}, isSerializableHeaderValue, {
79
- "content-type": "application/json",
80
- [_ii]: input[_iI],
81
- });
82
- b.bp("/catalog.createItem");
83
- let body;
84
- body = JSON.stringify(take(input, {
85
- appId: [],
86
- appVersion: [],
87
- categories: (_) => _json(_),
88
- }));
89
- b.m("POST").h(headers).b(body);
90
- return b.build();
91
- };
92
- export const se_CreatePresignedUrlCommand = async (input, context) => {
93
- const b = rb(input, context);
94
- const headers = map({}, isSerializableHeaderValue, {
95
- "content-type": "application/json",
96
- [_ii]: input[_iI],
97
- });
98
- b.bp("/apps.createPresignedUrl");
99
- let body;
100
- body = JSON.stringify(take(input, {
101
- appId: [],
102
- cardId: [],
103
- fileContentsSha256: [],
104
- fileName: [],
105
- scope: [],
106
- sessionId: [],
107
- }));
108
- b.m("POST").h(headers).b(body);
109
- return b.build();
110
- };
111
- export const se_CreateQAppCommand = async (input, context) => {
112
- const b = rb(input, context);
113
- const headers = map({}, isSerializableHeaderValue, {
114
- "content-type": "application/json",
115
- [_ii]: input[_iI],
116
- });
117
- b.bp("/apps.create");
118
- let body;
119
- body = JSON.stringify(take(input, {
120
- appDefinition: (_) => se_AppDefinitionInput(_, context),
121
- description: [],
122
- tags: (_) => _json(_),
123
- title: [],
124
- }));
125
- b.m("POST").h(headers).b(body);
126
- return b.build();
127
- };
128
- export const se_DeleteLibraryItemCommand = async (input, context) => {
129
- const b = rb(input, context);
130
- const headers = map({}, isSerializableHeaderValue, {
131
- "content-type": "application/json",
132
- [_ii]: input[_iI],
133
- });
134
- b.bp("/catalog.deleteItem");
135
- let body;
136
- body = JSON.stringify(take(input, {
137
- libraryItemId: [],
138
- }));
139
- b.m("POST").h(headers).b(body);
140
- return b.build();
141
- };
142
- export const se_DeleteQAppCommand = async (input, context) => {
143
- const b = rb(input, context);
144
- const headers = map({}, isSerializableHeaderValue, {
145
- "content-type": "application/json",
146
- [_ii]: input[_iI],
147
- });
148
- b.bp("/apps.delete");
149
- let body;
150
- body = JSON.stringify(take(input, {
151
- appId: [],
152
- }));
153
- b.m("POST").h(headers).b(body);
154
- return b.build();
155
- };
156
- export const se_DescribeQAppPermissionsCommand = async (input, context) => {
157
- const b = rb(input, context);
158
- const headers = map({}, isSerializableHeaderValue, {
159
- [_ii]: input[_iI],
160
- });
161
- b.bp("/apps.describeQAppPermissions");
162
- const query = map({
163
- [_aI]: [, __expectNonNull(input[_aI], `appId`)],
164
- });
165
- let body;
166
- b.m("GET").h(headers).q(query).b(body);
167
- return b.build();
168
- };
169
- export const se_DisassociateLibraryItemReviewCommand = async (input, context) => {
170
- const b = rb(input, context);
171
- const headers = map({}, isSerializableHeaderValue, {
172
- "content-type": "application/json",
173
- [_ii]: input[_iI],
174
- });
175
- b.bp("/catalog.disassociateItemRating");
176
- let body;
177
- body = JSON.stringify(take(input, {
178
- libraryItemId: [],
179
- }));
180
- b.m("POST").h(headers).b(body);
181
- return b.build();
182
- };
183
- export const se_DisassociateQAppFromUserCommand = async (input, context) => {
184
- const b = rb(input, context);
185
- const headers = map({}, isSerializableHeaderValue, {
186
- "content-type": "application/json",
187
- [_ii]: input[_iI],
188
- });
189
- b.bp("/apps.uninstall");
190
- let body;
191
- body = JSON.stringify(take(input, {
192
- appId: [],
193
- }));
194
- b.m("POST").h(headers).b(body);
195
- return b.build();
196
- };
197
- export const se_ExportQAppSessionDataCommand = async (input, context) => {
198
- const b = rb(input, context);
199
- const headers = map({}, isSerializableHeaderValue, {
200
- "content-type": "application/json",
201
- [_ii]: input[_iI],
202
- });
203
- b.bp("/runtime.exportQAppSessionData");
204
- let body;
205
- body = JSON.stringify(take(input, {
206
- sessionId: [],
207
- }));
208
- b.m("POST").h(headers).b(body);
209
- return b.build();
210
- };
211
- export const se_GetLibraryItemCommand = async (input, context) => {
212
- const b = rb(input, context);
213
- const headers = map({}, isSerializableHeaderValue, {
214
- [_ii]: input[_iI],
215
- });
216
- b.bp("/catalog.getItem");
217
- const query = map({
218
- [_lII]: [, __expectNonNull(input[_lII], `libraryItemId`)],
219
- [_aI]: [, input[_aI]],
220
- });
221
- let body;
222
- b.m("GET").h(headers).q(query).b(body);
223
- return b.build();
224
- };
225
- export const se_GetQAppCommand = async (input, context) => {
226
- const b = rb(input, context);
227
- const headers = map({}, isSerializableHeaderValue, {
228
- [_ii]: input[_iI],
229
- });
230
- b.bp("/apps.get");
231
- const query = map({
232
- [_aI]: [, __expectNonNull(input[_aI], `appId`)],
233
- [_aV]: [() => input.appVersion !== void 0, () => input[_aV].toString()],
234
- });
235
- let body;
236
- b.m("GET").h(headers).q(query).b(body);
237
- return b.build();
238
- };
239
- export const se_GetQAppSessionCommand = async (input, context) => {
240
- const b = rb(input, context);
241
- const headers = map({}, isSerializableHeaderValue, {
242
- [_ii]: input[_iI],
243
- });
244
- b.bp("/runtime.getQAppSession");
245
- const query = map({
246
- [_sI]: [, __expectNonNull(input[_sI], `sessionId`)],
247
- });
248
- let body;
249
- b.m("GET").h(headers).q(query).b(body);
250
- return b.build();
251
- };
252
- export const se_GetQAppSessionMetadataCommand = async (input, context) => {
253
- const b = rb(input, context);
254
- const headers = map({}, isSerializableHeaderValue, {
255
- [_ii]: input[_iI],
256
- });
257
- b.bp("/runtime.getQAppSessionMetadata");
258
- const query = map({
259
- [_sI]: [, __expectNonNull(input[_sI], `sessionId`)],
260
- });
261
- let body;
262
- b.m("GET").h(headers).q(query).b(body);
263
- return b.build();
264
- };
265
- export const se_ImportDocumentCommand = async (input, context) => {
266
- const b = rb(input, context);
267
- const headers = map({}, isSerializableHeaderValue, {
268
- "content-type": "application/json",
269
- [_ii]: input[_iI],
270
- });
271
- b.bp("/apps.importDocument");
272
- let body;
273
- body = JSON.stringify(take(input, {
274
- appId: [],
275
- cardId: [],
276
- fileContentsBase64: [],
277
- fileName: [],
278
- scope: [],
279
- sessionId: [],
280
- }));
281
- b.m("POST").h(headers).b(body);
282
- return b.build();
283
- };
284
- export const se_ListCategoriesCommand = async (input, context) => {
285
- const b = rb(input, context);
286
- const headers = map({}, isSerializableHeaderValue, {
287
- [_ii]: input[_iI],
288
- });
289
- b.bp("/catalog.listCategories");
290
- let body;
291
- b.m("GET").h(headers).b(body);
292
- return b.build();
293
- };
294
- export const se_ListLibraryItemsCommand = async (input, context) => {
295
- const b = rb(input, context);
296
- const headers = map({}, isSerializableHeaderValue, {
297
- [_ii]: input[_iI],
298
- });
299
- b.bp("/catalog.list");
300
- const query = map({
301
- [_l]: [() => input.limit !== void 0, () => input[_l].toString()],
302
- [_nT]: [, input[_nT]],
303
- [_cI]: [, input[_cI]],
304
- });
305
- let body;
306
- b.m("GET").h(headers).q(query).b(body);
307
- return b.build();
308
- };
309
- export const se_ListQAppsCommand = async (input, context) => {
310
- const b = rb(input, context);
311
- const headers = map({}, isSerializableHeaderValue, {
312
- [_ii]: input[_iI],
313
- });
314
- b.bp("/apps.list");
315
- const query = map({
316
- [_l]: [() => input.limit !== void 0, () => input[_l].toString()],
317
- [_nT]: [, input[_nT]],
318
- });
319
- let body;
320
- b.m("GET").h(headers).q(query).b(body);
321
- return b.build();
322
- };
323
- export const se_ListQAppSessionDataCommand = async (input, context) => {
324
- const b = rb(input, context);
325
- const headers = map({}, isSerializableHeaderValue, {
326
- [_ii]: input[_iI],
327
- });
328
- b.bp("/runtime.listQAppSessionData");
329
- const query = map({
330
- [_sI]: [, __expectNonNull(input[_sI], `sessionId`)],
331
- });
332
- let body;
333
- b.m("GET").h(headers).q(query).b(body);
334
- return b.build();
335
- };
336
- export const se_ListTagsForResourceCommand = async (input, context) => {
337
- const b = rb(input, context);
338
- const headers = {};
339
- b.bp("/tags/{resourceARN}");
340
- b.p("resourceARN", () => input.resourceARN, "{resourceARN}", false);
341
- let body;
342
- b.m("GET").h(headers).b(body);
343
- return b.build();
344
- };
345
- export const se_PredictQAppCommand = async (input, context) => {
346
- const b = rb(input, context);
347
- const headers = map({}, isSerializableHeaderValue, {
348
- "content-type": "application/json",
349
- [_ii]: input[_iI],
350
- });
351
- b.bp("/apps.predictQApp");
352
- let body;
353
- body = JSON.stringify(take(input, {
354
- options: (_) => _json(_),
355
- }));
356
- b.m("POST").h(headers).b(body);
357
- return b.build();
358
- };
359
- export const se_StartQAppSessionCommand = async (input, context) => {
360
- const b = rb(input, context);
361
- const headers = map({}, isSerializableHeaderValue, {
362
- "content-type": "application/json",
363
- [_ii]: input[_iI],
364
- });
365
- b.bp("/runtime.startQAppSession");
366
- let body;
367
- body = JSON.stringify(take(input, {
368
- appId: [],
369
- appVersion: [],
370
- initialValues: (_) => _json(_),
371
- sessionId: [],
372
- tags: (_) => _json(_),
373
- }));
374
- b.m("POST").h(headers).b(body);
375
- return b.build();
376
- };
377
- export const se_StopQAppSessionCommand = async (input, context) => {
378
- const b = rb(input, context);
379
- const headers = map({}, isSerializableHeaderValue, {
380
- "content-type": "application/json",
381
- [_ii]: input[_iI],
382
- });
383
- b.bp("/runtime.deleteMiniAppRun");
384
- let body;
385
- body = JSON.stringify(take(input, {
386
- sessionId: [],
387
- }));
388
- b.m("POST").h(headers).b(body);
389
- return b.build();
390
- };
391
- export const se_TagResourceCommand = async (input, context) => {
392
- const b = rb(input, context);
393
- const headers = {
394
- "content-type": "application/json",
395
- };
396
- b.bp("/tags/{resourceARN}");
397
- b.p("resourceARN", () => input.resourceARN, "{resourceARN}", false);
398
- let body;
399
- body = JSON.stringify(take(input, {
400
- tags: (_) => _json(_),
401
- }));
402
- b.m("POST").h(headers).b(body);
403
- return b.build();
404
- };
405
- export const se_UntagResourceCommand = async (input, context) => {
406
- const b = rb(input, context);
407
- const headers = {};
408
- b.bp("/tags/{resourceARN}");
409
- b.p("resourceARN", () => input.resourceARN, "{resourceARN}", false);
410
- const query = map({
411
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
412
- });
413
- let body;
414
- b.m("DELETE").h(headers).q(query).b(body);
415
- return b.build();
416
- };
417
- export const se_UpdateLibraryItemCommand = async (input, context) => {
418
- const b = rb(input, context);
419
- const headers = map({}, isSerializableHeaderValue, {
420
- "content-type": "application/json",
421
- [_ii]: input[_iI],
422
- });
423
- b.bp("/catalog.updateItem");
424
- let body;
425
- body = JSON.stringify(take(input, {
426
- categories: (_) => _json(_),
427
- libraryItemId: [],
428
- status: [],
429
- }));
430
- b.m("POST").h(headers).b(body);
431
- return b.build();
432
- };
433
- export const se_UpdateLibraryItemMetadataCommand = async (input, context) => {
434
- const b = rb(input, context);
435
- const headers = map({}, isSerializableHeaderValue, {
436
- "content-type": "application/json",
437
- [_ii]: input[_iI],
438
- });
439
- b.bp("/catalog.updateItemMetadata");
440
- let body;
441
- body = JSON.stringify(take(input, {
442
- isVerified: [],
443
- libraryItemId: [],
444
- }));
445
- b.m("POST").h(headers).b(body);
446
- return b.build();
447
- };
448
- export const se_UpdateQAppCommand = async (input, context) => {
449
- const b = rb(input, context);
450
- const headers = map({}, isSerializableHeaderValue, {
451
- "content-type": "application/json",
452
- [_ii]: input[_iI],
453
- });
454
- b.bp("/apps.update");
455
- let body;
456
- body = JSON.stringify(take(input, {
457
- appDefinition: (_) => se_AppDefinitionInput(_, context),
458
- appId: [],
459
- description: [],
460
- title: [],
461
- }));
462
- b.m("POST").h(headers).b(body);
463
- return b.build();
464
- };
465
- export const se_UpdateQAppPermissionsCommand = async (input, context) => {
466
- const b = rb(input, context);
467
- const headers = map({}, isSerializableHeaderValue, {
468
- "content-type": "application/json",
469
- [_ii]: input[_iI],
470
- });
471
- b.bp("/apps.updateQAppPermissions");
472
- let body;
473
- body = JSON.stringify(take(input, {
474
- appId: [],
475
- grantPermissions: (_) => _json(_),
476
- revokePermissions: (_) => _json(_),
477
- }));
478
- b.m("POST").h(headers).b(body);
479
- return b.build();
480
- };
481
- export const se_UpdateQAppSessionCommand = async (input, context) => {
482
- const b = rb(input, context);
483
- const headers = map({}, isSerializableHeaderValue, {
484
- "content-type": "application/json",
485
- [_ii]: input[_iI],
486
- });
487
- b.bp("/runtime.updateQAppSession");
488
- let body;
489
- body = JSON.stringify(take(input, {
490
- sessionId: [],
491
- values: (_) => _json(_),
492
- }));
493
- b.m("POST").h(headers).b(body);
494
- return b.build();
495
- };
496
- export const se_UpdateQAppSessionMetadataCommand = async (input, context) => {
497
- const b = rb(input, context);
498
- const headers = map({}, isSerializableHeaderValue, {
499
- "content-type": "application/json",
500
- [_ii]: input[_iI],
501
- });
502
- b.bp("/runtime.updateQAppSessionMetadata");
503
- let body;
504
- body = JSON.stringify(take(input, {
505
- sessionId: [],
506
- sessionName: [],
507
- sharingConfiguration: (_) => _json(_),
508
- }));
509
- b.m("POST").h(headers).b(body);
510
- return b.build();
511
- };
512
- export const de_AssociateLibraryItemReviewCommand = async (output, context) => {
513
- if (output.statusCode !== 200 && output.statusCode >= 300) {
514
- return de_CommandError(output, context);
515
- }
516
- const contents = map({
517
- $metadata: deserializeMetadata(output),
518
- });
519
- await collectBody(output.body, context);
520
- return contents;
521
- };
522
- export const de_AssociateQAppWithUserCommand = async (output, context) => {
523
- if (output.statusCode !== 200 && output.statusCode >= 300) {
524
- return de_CommandError(output, context);
525
- }
526
- const contents = map({
527
- $metadata: deserializeMetadata(output),
528
- });
529
- await collectBody(output.body, context);
530
- return contents;
531
- };
532
- export const de_BatchCreateCategoryCommand = async (output, context) => {
533
- if (output.statusCode !== 200 && output.statusCode >= 300) {
534
- return de_CommandError(output, context);
535
- }
536
- const contents = map({
537
- $metadata: deserializeMetadata(output),
538
- });
539
- await collectBody(output.body, context);
540
- return contents;
541
- };
542
- export const de_BatchDeleteCategoryCommand = async (output, context) => {
543
- if (output.statusCode !== 200 && output.statusCode >= 300) {
544
- return de_CommandError(output, context);
545
- }
546
- const contents = map({
547
- $metadata: deserializeMetadata(output),
548
- });
549
- await collectBody(output.body, context);
550
- return contents;
551
- };
552
- export const de_BatchUpdateCategoryCommand = async (output, context) => {
553
- if (output.statusCode !== 200 && output.statusCode >= 300) {
554
- return de_CommandError(output, context);
555
- }
556
- const contents = map({
557
- $metadata: deserializeMetadata(output),
558
- });
559
- await collectBody(output.body, context);
560
- return contents;
561
- };
562
- export const de_CreateLibraryItemCommand = async (output, context) => {
563
- if (output.statusCode !== 200 && output.statusCode >= 300) {
564
- return de_CommandError(output, context);
565
- }
566
- const contents = map({
567
- $metadata: deserializeMetadata(output),
568
- });
569
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
570
- const doc = take(data, {
571
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
572
- createdBy: __expectString,
573
- isVerified: __expectBoolean,
574
- libraryItemId: __expectString,
575
- ratingCount: __expectInt32,
576
- status: __expectString,
577
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
578
- updatedBy: __expectString,
579
- });
580
- Object.assign(contents, doc);
581
- return contents;
582
- };
583
- export const de_CreatePresignedUrlCommand = async (output, context) => {
584
- if (output.statusCode !== 200 && output.statusCode >= 300) {
585
- return de_CommandError(output, context);
586
- }
587
- const contents = map({
588
- $metadata: deserializeMetadata(output),
589
- });
590
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
591
- const doc = take(data, {
592
- fileId: __expectString,
593
- presignedUrl: __expectString,
594
- presignedUrlExpiration: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
595
- presignedUrlFields: _json,
596
- });
597
- Object.assign(contents, doc);
598
- return contents;
599
- };
600
- export const de_CreateQAppCommand = async (output, context) => {
601
- if (output.statusCode !== 200 && output.statusCode >= 300) {
602
- return de_CommandError(output, context);
603
- }
604
- const contents = map({
605
- $metadata: deserializeMetadata(output),
606
- });
607
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
608
- const doc = take(data, {
609
- appArn: __expectString,
610
- appId: __expectString,
611
- appVersion: __expectInt32,
612
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
613
- createdBy: __expectString,
614
- description: __expectString,
615
- initialPrompt: __expectString,
616
- requiredCapabilities: _json,
617
- status: __expectString,
618
- title: __expectString,
619
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
620
- updatedBy: __expectString,
621
- });
622
- Object.assign(contents, doc);
623
- return contents;
624
- };
625
- export const de_DeleteLibraryItemCommand = async (output, context) => {
626
- if (output.statusCode !== 200 && output.statusCode >= 300) {
627
- return de_CommandError(output, context);
628
- }
629
- const contents = map({
630
- $metadata: deserializeMetadata(output),
631
- });
632
- await collectBody(output.body, context);
633
- return contents;
634
- };
635
- export const de_DeleteQAppCommand = async (output, context) => {
636
- if (output.statusCode !== 200 && output.statusCode >= 300) {
637
- return de_CommandError(output, context);
638
- }
639
- const contents = map({
640
- $metadata: deserializeMetadata(output),
641
- });
642
- await collectBody(output.body, context);
643
- return contents;
644
- };
645
- export const de_DescribeQAppPermissionsCommand = async (output, context) => {
646
- if (output.statusCode !== 200 && output.statusCode >= 300) {
647
- return de_CommandError(output, context);
648
- }
649
- const contents = map({
650
- $metadata: deserializeMetadata(output),
651
- });
652
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
653
- const doc = take(data, {
654
- appId: __expectString,
655
- permissions: _json,
656
- resourceArn: __expectString,
657
- });
658
- Object.assign(contents, doc);
659
- return contents;
660
- };
661
- export const de_DisassociateLibraryItemReviewCommand = async (output, context) => {
662
- if (output.statusCode !== 200 && output.statusCode >= 300) {
663
- return de_CommandError(output, context);
664
- }
665
- const contents = map({
666
- $metadata: deserializeMetadata(output),
667
- });
668
- await collectBody(output.body, context);
669
- return contents;
670
- };
671
- export const de_DisassociateQAppFromUserCommand = async (output, context) => {
672
- if (output.statusCode !== 200 && output.statusCode >= 300) {
673
- return de_CommandError(output, context);
674
- }
675
- const contents = map({
676
- $metadata: deserializeMetadata(output),
677
- });
678
- await collectBody(output.body, context);
679
- return contents;
680
- };
681
- export const de_ExportQAppSessionDataCommand = async (output, context) => {
682
- if (output.statusCode !== 200 && output.statusCode >= 300) {
683
- return de_CommandError(output, context);
684
- }
685
- const contents = map({
686
- $metadata: deserializeMetadata(output),
687
- });
688
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
689
- const doc = take(data, {
690
- csvFileLink: __expectString,
691
- expiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
692
- sessionArn: __expectString,
693
- });
694
- Object.assign(contents, doc);
695
- return contents;
696
- };
697
- export const de_GetLibraryItemCommand = async (output, context) => {
698
- if (output.statusCode !== 200 && output.statusCode >= 300) {
699
- return de_CommandError(output, context);
700
- }
701
- const contents = map({
702
- $metadata: deserializeMetadata(output),
703
- });
704
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
705
- const doc = take(data, {
706
- appId: __expectString,
707
- appVersion: __expectInt32,
708
- categories: _json,
709
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
710
- createdBy: __expectString,
711
- isRatedByUser: __expectBoolean,
712
- isVerified: __expectBoolean,
713
- libraryItemId: __expectString,
714
- ratingCount: __expectInt32,
715
- status: __expectString,
716
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
717
- updatedBy: __expectString,
718
- userCount: __expectInt32,
719
- });
720
- Object.assign(contents, doc);
721
- return contents;
722
- };
723
- export const de_GetQAppCommand = async (output, context) => {
724
- if (output.statusCode !== 200 && output.statusCode >= 300) {
725
- return de_CommandError(output, context);
726
- }
727
- const contents = map({
728
- $metadata: deserializeMetadata(output),
729
- });
730
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
731
- const doc = take(data, {
732
- appArn: __expectString,
733
- appDefinition: (_) => de_AppDefinition(_, context),
734
- appId: __expectString,
735
- appVersion: __expectInt32,
736
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
737
- createdBy: __expectString,
738
- description: __expectString,
739
- initialPrompt: __expectString,
740
- requiredCapabilities: _json,
741
- status: __expectString,
742
- title: __expectString,
743
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
744
- updatedBy: __expectString,
745
- });
746
- Object.assign(contents, doc);
747
- return contents;
748
- };
749
- export const de_GetQAppSessionCommand = async (output, context) => {
750
- if (output.statusCode !== 200 && output.statusCode >= 300) {
751
- return de_CommandError(output, context);
752
- }
753
- const contents = map({
754
- $metadata: deserializeMetadata(output),
755
- });
756
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
757
- const doc = take(data, {
758
- appVersion: __expectInt32,
759
- cardStatus: (_) => de_CardStatusMap(_, context),
760
- latestPublishedAppVersion: __expectInt32,
761
- sessionArn: __expectString,
762
- sessionId: __expectString,
763
- sessionName: __expectString,
764
- status: __expectString,
765
- userIsHost: __expectBoolean,
766
- });
767
- Object.assign(contents, doc);
768
- return contents;
769
- };
770
- export const de_GetQAppSessionMetadataCommand = async (output, context) => {
771
- if (output.statusCode !== 200 && output.statusCode >= 300) {
772
- return de_CommandError(output, context);
773
- }
774
- const contents = map({
775
- $metadata: deserializeMetadata(output),
776
- });
777
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
778
- const doc = take(data, {
779
- sessionArn: __expectString,
780
- sessionId: __expectString,
781
- sessionName: __expectString,
782
- sessionOwner: __expectBoolean,
783
- sharingConfiguration: _json,
784
- });
785
- Object.assign(contents, doc);
786
- return contents;
787
- };
788
- export const de_ImportDocumentCommand = async (output, context) => {
789
- if (output.statusCode !== 200 && output.statusCode >= 300) {
790
- return de_CommandError(output, context);
791
- }
792
- const contents = map({
793
- $metadata: deserializeMetadata(output),
794
- });
795
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
796
- const doc = take(data, {
797
- fileId: __expectString,
798
- });
799
- Object.assign(contents, doc);
800
- return contents;
801
- };
802
- export const de_ListCategoriesCommand = async (output, context) => {
803
- if (output.statusCode !== 200 && output.statusCode >= 300) {
804
- return de_CommandError(output, context);
805
- }
806
- const contents = map({
807
- $metadata: deserializeMetadata(output),
808
- });
809
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
810
- const doc = take(data, {
811
- categories: _json,
812
- });
813
- Object.assign(contents, doc);
814
- return contents;
815
- };
816
- export const de_ListLibraryItemsCommand = async (output, context) => {
817
- if (output.statusCode !== 200 && output.statusCode >= 300) {
818
- return de_CommandError(output, context);
819
- }
820
- const contents = map({
821
- $metadata: deserializeMetadata(output),
822
- });
823
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
824
- const doc = take(data, {
825
- libraryItems: (_) => de_LibraryItemList(_, context),
826
- nextToken: __expectString,
827
- });
828
- Object.assign(contents, doc);
829
- return contents;
830
- };
831
- export const de_ListQAppsCommand = async (output, context) => {
832
- if (output.statusCode !== 200 && output.statusCode >= 300) {
833
- return de_CommandError(output, context);
834
- }
835
- const contents = map({
836
- $metadata: deserializeMetadata(output),
837
- });
838
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
839
- const doc = take(data, {
840
- apps: (_) => de_UserAppsList(_, context),
841
- nextToken: __expectString,
842
- });
843
- Object.assign(contents, doc);
844
- return contents;
845
- };
846
- export const de_ListQAppSessionDataCommand = async (output, context) => {
847
- if (output.statusCode !== 200 && output.statusCode >= 300) {
848
- return de_CommandError(output, context);
849
- }
850
- const contents = map({
851
- $metadata: deserializeMetadata(output),
852
- });
853
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
854
- const doc = take(data, {
855
- nextToken: __expectString,
856
- sessionArn: __expectString,
857
- sessionData: (_) => de_QAppSessionDataList(_, context),
858
- sessionId: __expectString,
859
- });
860
- Object.assign(contents, doc);
861
- return contents;
862
- };
863
- export const de_ListTagsForResourceCommand = async (output, context) => {
864
- if (output.statusCode !== 200 && output.statusCode >= 300) {
865
- return de_CommandError(output, context);
866
- }
867
- const contents = map({
868
- $metadata: deserializeMetadata(output),
869
- });
870
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
871
- const doc = take(data, {
872
- tags: _json,
873
- });
874
- Object.assign(contents, doc);
875
- return contents;
876
- };
877
- export const de_PredictQAppCommand = async (output, context) => {
878
- if (output.statusCode !== 200 && output.statusCode >= 300) {
879
- return de_CommandError(output, context);
880
- }
881
- const contents = map({
882
- $metadata: deserializeMetadata(output),
883
- });
884
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
885
- const doc = take(data, {
886
- app: (_) => de_PredictAppDefinition(_, context),
887
- problemStatement: __expectString,
888
- });
889
- Object.assign(contents, doc);
890
- return contents;
891
- };
892
- export const de_StartQAppSessionCommand = async (output, context) => {
893
- if (output.statusCode !== 200 && output.statusCode >= 300) {
894
- return de_CommandError(output, context);
895
- }
896
- const contents = map({
897
- $metadata: deserializeMetadata(output),
898
- });
899
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
900
- const doc = take(data, {
901
- sessionArn: __expectString,
902
- sessionId: __expectString,
903
- });
904
- Object.assign(contents, doc);
905
- return contents;
906
- };
907
- export const de_StopQAppSessionCommand = async (output, context) => {
908
- if (output.statusCode !== 200 && output.statusCode >= 300) {
909
- return de_CommandError(output, context);
910
- }
911
- const contents = map({
912
- $metadata: deserializeMetadata(output),
913
- });
914
- await collectBody(output.body, context);
915
- return contents;
916
- };
917
- export const de_TagResourceCommand = async (output, context) => {
918
- if (output.statusCode !== 200 && output.statusCode >= 300) {
919
- return de_CommandError(output, context);
920
- }
921
- const contents = map({
922
- $metadata: deserializeMetadata(output),
923
- });
924
- await collectBody(output.body, context);
925
- return contents;
926
- };
927
- export const de_UntagResourceCommand = async (output, context) => {
928
- if (output.statusCode !== 200 && output.statusCode >= 300) {
929
- return de_CommandError(output, context);
930
- }
931
- const contents = map({
932
- $metadata: deserializeMetadata(output),
933
- });
934
- await collectBody(output.body, context);
935
- return contents;
936
- };
937
- export const de_UpdateLibraryItemCommand = async (output, context) => {
938
- if (output.statusCode !== 200 && output.statusCode >= 300) {
939
- return de_CommandError(output, context);
940
- }
941
- const contents = map({
942
- $metadata: deserializeMetadata(output),
943
- });
944
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
945
- const doc = take(data, {
946
- appId: __expectString,
947
- appVersion: __expectInt32,
948
- categories: _json,
949
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
950
- createdBy: __expectString,
951
- isRatedByUser: __expectBoolean,
952
- isVerified: __expectBoolean,
953
- libraryItemId: __expectString,
954
- ratingCount: __expectInt32,
955
- status: __expectString,
956
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
957
- updatedBy: __expectString,
958
- userCount: __expectInt32,
959
- });
960
- Object.assign(contents, doc);
961
- return contents;
962
- };
963
- export const de_UpdateLibraryItemMetadataCommand = async (output, context) => {
964
- if (output.statusCode !== 200 && output.statusCode >= 300) {
965
- return de_CommandError(output, context);
966
- }
967
- const contents = map({
968
- $metadata: deserializeMetadata(output),
969
- });
970
- await collectBody(output.body, context);
971
- return contents;
972
- };
973
- export const de_UpdateQAppCommand = async (output, context) => {
974
- if (output.statusCode !== 200 && output.statusCode >= 300) {
975
- return de_CommandError(output, context);
976
- }
977
- const contents = map({
978
- $metadata: deserializeMetadata(output),
979
- });
980
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
981
- const doc = take(data, {
982
- appArn: __expectString,
983
- appId: __expectString,
984
- appVersion: __expectInt32,
985
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
986
- createdBy: __expectString,
987
- description: __expectString,
988
- initialPrompt: __expectString,
989
- requiredCapabilities: _json,
990
- status: __expectString,
991
- title: __expectString,
992
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
993
- updatedBy: __expectString,
994
- });
995
- Object.assign(contents, doc);
996
- return contents;
997
- };
998
- export const de_UpdateQAppPermissionsCommand = async (output, context) => {
999
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1000
- return de_CommandError(output, context);
1001
- }
1002
- const contents = map({
1003
- $metadata: deserializeMetadata(output),
1004
- });
1005
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1006
- const doc = take(data, {
1007
- appId: __expectString,
1008
- permissions: _json,
1009
- resourceArn: __expectString,
1010
- });
1011
- Object.assign(contents, doc);
1012
- return contents;
1013
- };
1014
- export const de_UpdateQAppSessionCommand = async (output, context) => {
1015
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1016
- return de_CommandError(output, context);
1017
- }
1018
- const contents = map({
1019
- $metadata: deserializeMetadata(output),
1020
- });
1021
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1022
- const doc = take(data, {
1023
- sessionArn: __expectString,
1024
- sessionId: __expectString,
1025
- });
1026
- Object.assign(contents, doc);
1027
- return contents;
1028
- };
1029
- export const de_UpdateQAppSessionMetadataCommand = async (output, context) => {
1030
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1031
- return de_CommandError(output, context);
1032
- }
1033
- const contents = map({
1034
- $metadata: deserializeMetadata(output),
1035
- });
1036
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1037
- const doc = take(data, {
1038
- sessionArn: __expectString,
1039
- sessionId: __expectString,
1040
- sessionName: __expectString,
1041
- sharingConfiguration: _json,
1042
- });
1043
- Object.assign(contents, doc);
1044
- return contents;
1045
- };
1046
- const de_CommandError = async (output, context) => {
1047
- const parsedOutput = {
1048
- ...output,
1049
- body: await parseErrorBody(output.body, context),
1050
- };
1051
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1052
- switch (errorCode) {
1053
- case "AccessDeniedException":
1054
- case "com.amazonaws.qapps#AccessDeniedException":
1055
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1056
- case "ConflictException":
1057
- case "com.amazonaws.qapps#ConflictException":
1058
- throw await de_ConflictExceptionRes(parsedOutput, context);
1059
- case "InternalServerException":
1060
- case "com.amazonaws.qapps#InternalServerException":
1061
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1062
- case "ResourceNotFoundException":
1063
- case "com.amazonaws.qapps#ResourceNotFoundException":
1064
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1065
- case "ServiceQuotaExceededException":
1066
- case "com.amazonaws.qapps#ServiceQuotaExceededException":
1067
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1068
- case "ThrottlingException":
1069
- case "com.amazonaws.qapps#ThrottlingException":
1070
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1071
- case "UnauthorizedException":
1072
- case "com.amazonaws.qapps#UnauthorizedException":
1073
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1074
- case "ValidationException":
1075
- case "com.amazonaws.qapps#ValidationException":
1076
- throw await de_ValidationExceptionRes(parsedOutput, context);
1077
- case "ContentTooLargeException":
1078
- case "com.amazonaws.qapps#ContentTooLargeException":
1079
- throw await de_ContentTooLargeExceptionRes(parsedOutput, context);
1080
- default:
1081
- const parsedBody = parsedOutput.body;
1082
- return throwDefaultError({
1083
- output,
1084
- parsedBody,
1085
- errorCode,
1086
- });
1087
- }
1088
- };
1089
- const throwDefaultError = withBaseException(__BaseException);
1090
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1091
- const contents = map({});
1092
- const data = parsedOutput.body;
1093
- const doc = take(data, {
1094
- message: __expectString,
1095
- });
1096
- Object.assign(contents, doc);
1097
- const exception = new AccessDeniedException({
1098
- $metadata: deserializeMetadata(parsedOutput),
1099
- ...contents,
1100
- });
1101
- return __decorateServiceException(exception, parsedOutput.body);
1102
- };
1103
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1104
- const contents = map({});
1105
- const data = parsedOutput.body;
1106
- const doc = take(data, {
1107
- message: __expectString,
1108
- resourceId: __expectString,
1109
- resourceType: __expectString,
1110
- });
1111
- Object.assign(contents, doc);
1112
- const exception = new ConflictException({
1113
- $metadata: deserializeMetadata(parsedOutput),
1114
- ...contents,
1115
- });
1116
- return __decorateServiceException(exception, parsedOutput.body);
1117
- };
1118
- const de_ContentTooLargeExceptionRes = async (parsedOutput, context) => {
1119
- const contents = map({});
1120
- const data = parsedOutput.body;
1121
- const doc = take(data, {
1122
- message: __expectString,
1123
- resourceId: __expectString,
1124
- resourceType: __expectString,
1125
- });
1126
- Object.assign(contents, doc);
1127
- const exception = new ContentTooLargeException({
1128
- $metadata: deserializeMetadata(parsedOutput),
1129
- ...contents,
1130
- });
1131
- return __decorateServiceException(exception, parsedOutput.body);
1132
- };
1133
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1134
- const contents = map({
1135
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1136
- });
1137
- const data = parsedOutput.body;
1138
- const doc = take(data, {
1139
- message: __expectString,
1140
- });
1141
- Object.assign(contents, doc);
1142
- const exception = new InternalServerException({
1143
- $metadata: deserializeMetadata(parsedOutput),
1144
- ...contents,
1145
- });
1146
- return __decorateServiceException(exception, parsedOutput.body);
1147
- };
1148
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1149
- const contents = map({});
1150
- const data = parsedOutput.body;
1151
- const doc = take(data, {
1152
- message: __expectString,
1153
- resourceId: __expectString,
1154
- resourceType: __expectString,
1155
- });
1156
- Object.assign(contents, doc);
1157
- const exception = new ResourceNotFoundException({
1158
- $metadata: deserializeMetadata(parsedOutput),
1159
- ...contents,
1160
- });
1161
- return __decorateServiceException(exception, parsedOutput.body);
1162
- };
1163
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1164
- const contents = map({});
1165
- const data = parsedOutput.body;
1166
- const doc = take(data, {
1167
- message: __expectString,
1168
- quotaCode: __expectString,
1169
- resourceId: __expectString,
1170
- resourceType: __expectString,
1171
- serviceCode: __expectString,
1172
- });
1173
- Object.assign(contents, doc);
1174
- const exception = new ServiceQuotaExceededException({
1175
- $metadata: deserializeMetadata(parsedOutput),
1176
- ...contents,
1177
- });
1178
- return __decorateServiceException(exception, parsedOutput.body);
1179
- };
1180
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1181
- const contents = map({
1182
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1183
- });
1184
- const data = parsedOutput.body;
1185
- const doc = take(data, {
1186
- message: __expectString,
1187
- quotaCode: __expectString,
1188
- serviceCode: __expectString,
1189
- });
1190
- Object.assign(contents, doc);
1191
- const exception = new ThrottlingException({
1192
- $metadata: deserializeMetadata(parsedOutput),
1193
- ...contents,
1194
- });
1195
- return __decorateServiceException(exception, parsedOutput.body);
1196
- };
1197
- const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
1198
- const contents = map({});
1199
- const data = parsedOutput.body;
1200
- const doc = take(data, {
1201
- message: __expectString,
1202
- });
1203
- Object.assign(contents, doc);
1204
- const exception = new UnauthorizedException({
1205
- $metadata: deserializeMetadata(parsedOutput),
1206
- ...contents,
1207
- });
1208
- return __decorateServiceException(exception, parsedOutput.body);
1209
- };
1210
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1211
- const contents = map({});
1212
- const data = parsedOutput.body;
1213
- const doc = take(data, {
1214
- message: __expectString,
1215
- });
1216
- Object.assign(contents, doc);
1217
- const exception = new ValidationException({
1218
- $metadata: deserializeMetadata(parsedOutput),
1219
- ...contents,
1220
- });
1221
- return __decorateServiceException(exception, parsedOutput.body);
1222
- };
1223
- const se_AppDefinitionInput = (input, context) => {
1224
- return take(input, {
1225
- cards: (_) => se_CardList(_, context),
1226
- initialPrompt: [],
1227
- });
1228
- };
1229
- const se_AttributeFilter = (input, context) => {
1230
- return take(input, {
1231
- andAllFilters: (_) => se_AttributeFilters(_, context),
1232
- containsAll: (_) => se_DocumentAttribute(_, context),
1233
- containsAny: (_) => se_DocumentAttribute(_, context),
1234
- equalsTo: (_) => se_DocumentAttribute(_, context),
1235
- greaterThan: (_) => se_DocumentAttribute(_, context),
1236
- greaterThanOrEquals: (_) => se_DocumentAttribute(_, context),
1237
- lessThan: (_) => se_DocumentAttribute(_, context),
1238
- lessThanOrEquals: (_) => se_DocumentAttribute(_, context),
1239
- notFilter: (_) => se_AttributeFilter(_, context),
1240
- orAllFilters: (_) => se_AttributeFilters(_, context),
1241
- });
1242
- };
1243
- const se_AttributeFilters = (input, context) => {
1244
- return input
1245
- .filter((e) => e != null)
1246
- .map((entry) => {
1247
- return se_AttributeFilter(entry, context);
1248
- });
1249
- };
1250
- const se_CardInput = (input, context) => {
1251
- return CardInput.visit(input, {
1252
- fileUpload: (value) => ({ fileUpload: _json(value) }),
1253
- formInput: (value) => ({ formInput: se_FormInputCardInput(value, context) }),
1254
- qPlugin: (value) => ({ qPlugin: _json(value) }),
1255
- qQuery: (value) => ({ qQuery: se_QQueryCardInput(value, context) }),
1256
- textInput: (value) => ({ textInput: _json(value) }),
1257
- _: (name, value) => ({ [name]: value }),
1258
- });
1259
- };
1260
- const se_CardList = (input, context) => {
1261
- return input
1262
- .filter((e) => e != null)
1263
- .map((entry) => {
1264
- return se_CardInput(entry, context);
1265
- });
1266
- };
1267
- const se_DocumentAttribute = (input, context) => {
1268
- return take(input, {
1269
- name: [],
1270
- value: (_) => se_DocumentAttributeValue(_, context),
1271
- });
1272
- };
1273
- const se_DocumentAttributeValue = (input, context) => {
1274
- return DocumentAttributeValue.visit(input, {
1275
- dateValue: (value) => ({ dateValue: value.getTime() / 1_000 }),
1276
- longValue: (value) => ({ longValue: value }),
1277
- stringListValue: (value) => ({ stringListValue: _json(value) }),
1278
- stringValue: (value) => ({ stringValue: value }),
1279
- _: (name, value) => ({ [name]: value }),
1280
- });
1281
- };
1282
- const se_FormInputCardInput = (input, context) => {
1283
- return take(input, {
1284
- computeMode: [],
1285
- id: [],
1286
- metadata: (_) => se_FormInputCardMetadata(_, context),
1287
- title: [],
1288
- type: [],
1289
- });
1290
- };
1291
- const se_FormInputCardMetadata = (input, context) => {
1292
- return take(input, {
1293
- schema: (_) => se_FormInputCardMetadataSchema(_, context),
1294
- });
1295
- };
1296
- const se_FormInputCardMetadataSchema = (input, context) => {
1297
- return input;
1298
- };
1299
- const se_QQueryCardInput = (input, context) => {
1300
- return take(input, {
1301
- attributeFilter: (_) => se_AttributeFilter(_, context),
1302
- id: [],
1303
- outputSource: [],
1304
- prompt: [],
1305
- title: [],
1306
- type: [],
1307
- });
1308
- };
1309
- const de_AppDefinition = (output, context) => {
1310
- return take(output, {
1311
- appDefinitionVersion: __expectString,
1312
- canEdit: __expectBoolean,
1313
- cards: (_) => de_CardModelList(_, context),
1314
- });
1315
- };
1316
- const de_AppDefinitionInput = (output, context) => {
1317
- return take(output, {
1318
- cards: (_) => de_CardList(_, context),
1319
- initialPrompt: __expectString,
1320
- });
1321
- };
1322
- const de_AttributeFilter = (output, context) => {
1323
- return take(output, {
1324
- andAllFilters: (_) => de_AttributeFilters(_, context),
1325
- containsAll: (_) => de_DocumentAttribute(_, context),
1326
- containsAny: (_) => de_DocumentAttribute(_, context),
1327
- equalsTo: (_) => de_DocumentAttribute(_, context),
1328
- greaterThan: (_) => de_DocumentAttribute(_, context),
1329
- greaterThanOrEquals: (_) => de_DocumentAttribute(_, context),
1330
- lessThan: (_) => de_DocumentAttribute(_, context),
1331
- lessThanOrEquals: (_) => de_DocumentAttribute(_, context),
1332
- notFilter: (_) => de_AttributeFilter(_, context),
1333
- orAllFilters: (_) => de_AttributeFilters(_, context),
1334
- });
1335
- };
1336
- const de_AttributeFilters = (output, context) => {
1337
- const retVal = (output || [])
1338
- .filter((e) => e != null)
1339
- .map((entry) => {
1340
- return de_AttributeFilter(entry, context);
1341
- });
1342
- return retVal;
1343
- };
1344
- const de_Card = (output, context) => {
1345
- if (output.fileUpload != null) {
1346
- return {
1347
- fileUpload: _json(output.fileUpload),
1348
- };
1349
- }
1350
- if (output.formInput != null) {
1351
- return {
1352
- formInput: de_FormInputCard(output.formInput, context),
1353
- };
1354
- }
1355
- if (output.qPlugin != null) {
1356
- return {
1357
- qPlugin: _json(output.qPlugin),
1358
- };
1359
- }
1360
- if (output.qQuery != null) {
1361
- return {
1362
- qQuery: de_QQueryCard(output.qQuery, context),
1363
- };
1364
- }
1365
- if (output.textInput != null) {
1366
- return {
1367
- textInput: _json(output.textInput),
1368
- };
1369
- }
1370
- return { $unknown: Object.entries(output)[0] };
1371
- };
1372
- const de_CardInput = (output, context) => {
1373
- if (output.fileUpload != null) {
1374
- return {
1375
- fileUpload: _json(output.fileUpload),
1376
- };
1377
- }
1378
- if (output.formInput != null) {
1379
- return {
1380
- formInput: de_FormInputCardInput(output.formInput, context),
1381
- };
1382
- }
1383
- if (output.qPlugin != null) {
1384
- return {
1385
- qPlugin: _json(output.qPlugin),
1386
- };
1387
- }
1388
- if (output.qQuery != null) {
1389
- return {
1390
- qQuery: de_QQueryCardInput(output.qQuery, context),
1391
- };
1392
- }
1393
- if (output.textInput != null) {
1394
- return {
1395
- textInput: _json(output.textInput),
1396
- };
1397
- }
1398
- return { $unknown: Object.entries(output)[0] };
1399
- };
1400
- const de_CardList = (output, context) => {
1401
- const retVal = (output || [])
1402
- .filter((e) => e != null)
1403
- .map((entry) => {
1404
- return de_CardInput(__expectUnion(entry), context);
1405
- });
1406
- return retVal;
1407
- };
1408
- const de_CardModelList = (output, context) => {
1409
- const retVal = (output || [])
1410
- .filter((e) => e != null)
1411
- .map((entry) => {
1412
- return de_Card(__expectUnion(entry), context);
1413
- });
1414
- return retVal;
1415
- };
1416
- const de_CardStatus = (output, context) => {
1417
- return take(output, {
1418
- currentState: __expectString,
1419
- currentValue: __expectString,
1420
- submissions: (_) => de_SubmissionList(_, context),
1421
- });
1422
- };
1423
- const de_CardStatusMap = (output, context) => {
1424
- return Object.entries(output).reduce((acc, [key, value]) => {
1425
- if (value === null) {
1426
- return acc;
1427
- }
1428
- acc[key] = de_CardStatus(value, context);
1429
- return acc;
1430
- }, {});
1431
- };
1432
- const de_DocumentAttribute = (output, context) => {
1433
- return take(output, {
1434
- name: __expectString,
1435
- value: (_) => de_DocumentAttributeValue(__expectUnion(_), context),
1436
- });
1437
- };
1438
- const de_DocumentAttributeValue = (output, context) => {
1439
- if (output.dateValue != null) {
1440
- return {
1441
- dateValue: __expectNonNull(__parseEpochTimestamp(__expectNumber(output.dateValue))),
1442
- };
1443
- }
1444
- if (__expectLong(output.longValue) !== undefined) {
1445
- return { longValue: __expectLong(output.longValue) };
1446
- }
1447
- if (output.stringListValue != null) {
1448
- return {
1449
- stringListValue: _json(output.stringListValue),
1450
- };
1451
- }
1452
- if (__expectString(output.stringValue) !== undefined) {
1453
- return { stringValue: __expectString(output.stringValue) };
1454
- }
1455
- return { $unknown: Object.entries(output)[0] };
1456
- };
1457
- const de_FormInputCard = (output, context) => {
1458
- return take(output, {
1459
- computeMode: __expectString,
1460
- dependencies: _json,
1461
- id: __expectString,
1462
- metadata: (_) => de_FormInputCardMetadata(_, context),
1463
- title: __expectString,
1464
- type: __expectString,
1465
- });
1466
- };
1467
- const de_FormInputCardInput = (output, context) => {
1468
- return take(output, {
1469
- computeMode: __expectString,
1470
- id: __expectString,
1471
- metadata: (_) => de_FormInputCardMetadata(_, context),
1472
- title: __expectString,
1473
- type: __expectString,
1474
- });
1475
- };
1476
- const de_FormInputCardMetadata = (output, context) => {
1477
- return take(output, {
1478
- schema: (_) => de_FormInputCardMetadataSchema(_, context),
1479
- });
1480
- };
1481
- const de_FormInputCardMetadataSchema = (output, context) => {
1482
- return output;
1483
- };
1484
- const de_LibraryItemList = (output, context) => {
1485
- const retVal = (output || [])
1486
- .filter((e) => e != null)
1487
- .map((entry) => {
1488
- return de_LibraryItemMember(entry, context);
1489
- });
1490
- return retVal;
1491
- };
1492
- const de_LibraryItemMember = (output, context) => {
1493
- return take(output, {
1494
- appId: __expectString,
1495
- appVersion: __expectInt32,
1496
- categories: _json,
1497
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1498
- createdBy: __expectString,
1499
- isRatedByUser: __expectBoolean,
1500
- isVerified: __expectBoolean,
1501
- libraryItemId: __expectString,
1502
- ratingCount: __expectInt32,
1503
- status: __expectString,
1504
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1505
- updatedBy: __expectString,
1506
- userCount: __expectInt32,
1507
- });
1508
- };
1509
- const de_PredictAppDefinition = (output, context) => {
1510
- return take(output, {
1511
- appDefinition: (_) => de_AppDefinitionInput(_, context),
1512
- description: __expectString,
1513
- title: __expectString,
1514
- });
1515
- };
1516
- const de_QAppSessionData = (output, context) => {
1517
- return take(output, {
1518
- cardId: __expectString,
1519
- submissionId: __expectString,
1520
- timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1521
- user: _json,
1522
- value: (_) => de_Document(_, context),
1523
- });
1524
- };
1525
- const de_QAppSessionDataList = (output, context) => {
1526
- const retVal = (output || [])
1527
- .filter((e) => e != null)
1528
- .map((entry) => {
1529
- return de_QAppSessionData(entry, context);
1530
- });
1531
- return retVal;
1532
- };
1533
- const de_QQueryCard = (output, context) => {
1534
- return take(output, {
1535
- attributeFilter: (_) => de_AttributeFilter(_, context),
1536
- dependencies: _json,
1537
- id: __expectString,
1538
- memoryReferences: _json,
1539
- outputSource: __expectString,
1540
- prompt: __expectString,
1541
- title: __expectString,
1542
- type: __expectString,
1543
- });
1544
- };
1545
- const de_QQueryCardInput = (output, context) => {
1546
- return take(output, {
1547
- attributeFilter: (_) => de_AttributeFilter(_, context),
1548
- id: __expectString,
1549
- outputSource: __expectString,
1550
- prompt: __expectString,
1551
- title: __expectString,
1552
- type: __expectString,
1553
- });
1554
- };
1555
- const de_Submission = (output, context) => {
1556
- return take(output, {
1557
- submissionId: __expectString,
1558
- timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1559
- value: (_) => de_Document(_, context),
1560
- });
1561
- };
1562
- const de_SubmissionList = (output, context) => {
1563
- const retVal = (output || [])
1564
- .filter((e) => e != null)
1565
- .map((entry) => {
1566
- return de_Submission(entry, context);
1567
- });
1568
- return retVal;
1569
- };
1570
- const de_UserAppItem = (output, context) => {
1571
- return take(output, {
1572
- appArn: __expectString,
1573
- appId: __expectString,
1574
- canEdit: __expectBoolean,
1575
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1576
- description: __expectString,
1577
- isVerified: __expectBoolean,
1578
- status: __expectString,
1579
- title: __expectString,
1580
- });
1581
- };
1582
- const de_UserAppsList = (output, context) => {
1583
- const retVal = (output || [])
1584
- .filter((e) => e != null)
1585
- .map((entry) => {
1586
- return de_UserAppItem(entry, context);
1587
- });
1588
- return retVal;
1589
- };
1590
- const de_Document = (output, context) => {
1591
- return output;
1592
- };
1593
- const deserializeMetadata = (output) => ({
1594
- httpStatusCode: output.statusCode,
1595
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1596
- extendedRequestId: output.headers["x-amz-id-2"],
1597
- cfId: output.headers["x-amz-cf-id"],
1598
- });
1599
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1600
- const _aI = "appId";
1601
- const _aV = "appVersion";
1602
- const _cI = "categoryId";
1603
- const _iI = "instanceId";
1604
- const _ii = "instance-id";
1605
- const _l = "limit";
1606
- const _lII = "libraryItemId";
1607
- const _nT = "nextToken";
1608
- const _rAS = "retryAfterSeconds";
1609
- const _ra = "retry-after";
1610
- const _sI = "sessionId";
1611
- const _tK = "tagKeys";