@aws-sdk/client-mediastore-data 3.50.0 → 3.53.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/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/MediaStoreDataServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +58 -1
- package/dist-cjs/protocols/Aws_restJson1.js +62 -163
- package/dist-es/index.js +1 -0
- package/dist-es/models/MediaStoreDataServiceException.js +12 -0
- package/dist-es/models/models_0.js +54 -1
- package/dist-es/protocols/Aws_restJson1.js +109 -188
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/MediaStoreDataServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +30 -13
- package/dist-types/ts3.4/MediaStoreData.d.ts +30 -0
- package/dist-types/ts3.4/MediaStoreDataClient.d.ts +78 -0
- package/dist-types/ts3.4/commands/DeleteObjectCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeObjectCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetObjectCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListItemsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutObjectCommand.d.ts +24 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/MediaStoreDataServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +188 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListItemsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +17 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, parseRfc7231DateTime as __parseRfc7231DateTime, strictParseLong as __strictParseLong, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, parseRfc7231DateTime as __parseRfc7231DateTime, strictParseLong as __strictParseLong, } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { MediaStoreDataServiceException as __BaseException } from "../models/MediaStoreDataServiceException";
|
|
5
|
+
import { ContainerNotFoundException, InternalServerError, ObjectNotFoundException, RequestedRangeNotSatisfiableException, } from "../models/models_0";
|
|
4
6
|
export var serializeAws_restJson1DeleteObjectCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
7
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
6
8
|
return __generator(this, function (_c) {
|
|
@@ -184,16 +186,16 @@ export var deserializeAws_restJson1DeleteObjectCommand = function (output, conte
|
|
|
184
186
|
});
|
|
185
187
|
}); };
|
|
186
188
|
var deserializeAws_restJson1DeleteObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
188
|
-
var
|
|
189
|
-
return __generator(this, function (
|
|
190
|
-
switch (
|
|
189
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
190
|
+
var _c;
|
|
191
|
+
return __generator(this, function (_d) {
|
|
192
|
+
switch (_d.label) {
|
|
191
193
|
case 0:
|
|
192
194
|
_a = [__assign({}, output)];
|
|
193
|
-
|
|
195
|
+
_c = {};
|
|
194
196
|
return [4, parseBody(output.body, context)];
|
|
195
197
|
case 1:
|
|
196
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
198
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
197
199
|
errorCode = "UnknownError";
|
|
198
200
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
199
201
|
_b = errorCode;
|
|
@@ -206,34 +208,20 @@ var deserializeAws_restJson1DeleteObjectCommandError = function (output, context
|
|
|
206
208
|
case "com.amazonaws.mediastoredata#ObjectNotFoundException": return [3, 6];
|
|
207
209
|
}
|
|
208
210
|
return [3, 8];
|
|
209
|
-
case 2:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
case
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
case 4:
|
|
216
|
-
_d = [{}];
|
|
217
|
-
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
218
|
-
case 5:
|
|
219
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
220
|
-
return [3, 9];
|
|
221
|
-
case 6:
|
|
222
|
-
_e = [{}];
|
|
223
|
-
return [4, deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
224
|
-
case 7:
|
|
225
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
226
|
-
return [3, 9];
|
|
211
|
+
case 2: return [4, deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)];
|
|
212
|
+
case 3: throw _d.sent();
|
|
213
|
+
case 4: return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
214
|
+
case 5: throw _d.sent();
|
|
215
|
+
case 6: return [4, deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
216
|
+
case 7: throw _d.sent();
|
|
227
217
|
case 8:
|
|
228
218
|
parsedBody = parsedOutput.body;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
response
|
|
235
|
-
delete response.Message;
|
|
236
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
219
|
+
response = new __BaseException({
|
|
220
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
221
|
+
$fault: "client",
|
|
222
|
+
$metadata: deserializeMetadata(output),
|
|
223
|
+
});
|
|
224
|
+
throw __decorateServiceException(response, parsedBody);
|
|
237
225
|
}
|
|
238
226
|
});
|
|
239
227
|
}); };
|
|
@@ -276,16 +264,16 @@ export var deserializeAws_restJson1DescribeObjectCommand = function (output, con
|
|
|
276
264
|
});
|
|
277
265
|
}); };
|
|
278
266
|
var deserializeAws_restJson1DescribeObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
279
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
280
|
-
var
|
|
281
|
-
return __generator(this, function (
|
|
282
|
-
switch (
|
|
267
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
268
|
+
var _c;
|
|
269
|
+
return __generator(this, function (_d) {
|
|
270
|
+
switch (_d.label) {
|
|
283
271
|
case 0:
|
|
284
272
|
_a = [__assign({}, output)];
|
|
285
|
-
|
|
273
|
+
_c = {};
|
|
286
274
|
return [4, parseBody(output.body, context)];
|
|
287
275
|
case 1:
|
|
288
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
276
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
289
277
|
errorCode = "UnknownError";
|
|
290
278
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
291
279
|
_b = errorCode;
|
|
@@ -298,34 +286,20 @@ var deserializeAws_restJson1DescribeObjectCommandError = function (output, conte
|
|
|
298
286
|
case "com.amazonaws.mediastoredata#ObjectNotFoundException": return [3, 6];
|
|
299
287
|
}
|
|
300
288
|
return [3, 8];
|
|
301
|
-
case 2:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
case
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
case 4:
|
|
308
|
-
_d = [{}];
|
|
309
|
-
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
310
|
-
case 5:
|
|
311
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
312
|
-
return [3, 9];
|
|
313
|
-
case 6:
|
|
314
|
-
_e = [{}];
|
|
315
|
-
return [4, deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
316
|
-
case 7:
|
|
317
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
318
|
-
return [3, 9];
|
|
289
|
+
case 2: return [4, deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)];
|
|
290
|
+
case 3: throw _d.sent();
|
|
291
|
+
case 4: return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
292
|
+
case 5: throw _d.sent();
|
|
293
|
+
case 6: return [4, deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
294
|
+
case 7: throw _d.sent();
|
|
319
295
|
case 8:
|
|
320
296
|
parsedBody = parsedOutput.body;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
response
|
|
327
|
-
delete response.Message;
|
|
328
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
297
|
+
response = new __BaseException({
|
|
298
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
299
|
+
$fault: "client",
|
|
300
|
+
$metadata: deserializeMetadata(output),
|
|
301
|
+
});
|
|
302
|
+
throw __decorateServiceException(response, parsedBody);
|
|
329
303
|
}
|
|
330
304
|
});
|
|
331
305
|
}); };
|
|
@@ -373,16 +347,16 @@ export var deserializeAws_restJson1GetObjectCommand = function (output, context)
|
|
|
373
347
|
});
|
|
374
348
|
}); };
|
|
375
349
|
var deserializeAws_restJson1GetObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
376
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
377
|
-
var
|
|
378
|
-
return __generator(this, function (
|
|
379
|
-
switch (
|
|
350
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
351
|
+
var _c;
|
|
352
|
+
return __generator(this, function (_d) {
|
|
353
|
+
switch (_d.label) {
|
|
380
354
|
case 0:
|
|
381
355
|
_a = [__assign({}, output)];
|
|
382
|
-
|
|
356
|
+
_c = {};
|
|
383
357
|
return [4, parseBody(output.body, context)];
|
|
384
358
|
case 1:
|
|
385
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
359
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
386
360
|
errorCode = "UnknownError";
|
|
387
361
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
388
362
|
_b = errorCode;
|
|
@@ -397,40 +371,22 @@ var deserializeAws_restJson1GetObjectCommandError = function (output, context) {
|
|
|
397
371
|
case "com.amazonaws.mediastoredata#RequestedRangeNotSatisfiableException": return [3, 8];
|
|
398
372
|
}
|
|
399
373
|
return [3, 10];
|
|
400
|
-
case 2:
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
case
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
case 4
|
|
407
|
-
|
|
408
|
-
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
409
|
-
case 5:
|
|
410
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
411
|
-
return [3, 11];
|
|
412
|
-
case 6:
|
|
413
|
-
_e = [{}];
|
|
414
|
-
return [4, deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
415
|
-
case 7:
|
|
416
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
417
|
-
return [3, 11];
|
|
418
|
-
case 8:
|
|
419
|
-
_f = [{}];
|
|
420
|
-
return [4, deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse(parsedOutput, context)];
|
|
421
|
-
case 9:
|
|
422
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
423
|
-
return [3, 11];
|
|
374
|
+
case 2: return [4, deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)];
|
|
375
|
+
case 3: throw _d.sent();
|
|
376
|
+
case 4: return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
377
|
+
case 5: throw _d.sent();
|
|
378
|
+
case 6: return [4, deserializeAws_restJson1ObjectNotFoundExceptionResponse(parsedOutput, context)];
|
|
379
|
+
case 7: throw _d.sent();
|
|
380
|
+
case 8: return [4, deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse(parsedOutput, context)];
|
|
381
|
+
case 9: throw _d.sent();
|
|
424
382
|
case 10:
|
|
425
383
|
parsedBody = parsedOutput.body;
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
response
|
|
432
|
-
delete response.Message;
|
|
433
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
384
|
+
response = new __BaseException({
|
|
385
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
386
|
+
$fault: "client",
|
|
387
|
+
$metadata: deserializeMetadata(output),
|
|
388
|
+
});
|
|
389
|
+
throw __decorateServiceException(response, parsedBody);
|
|
434
390
|
}
|
|
435
391
|
});
|
|
436
392
|
}); };
|
|
@@ -463,16 +419,16 @@ export var deserializeAws_restJson1ListItemsCommand = function (output, context)
|
|
|
463
419
|
});
|
|
464
420
|
}); };
|
|
465
421
|
var deserializeAws_restJson1ListItemsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
466
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
467
|
-
var
|
|
468
|
-
return __generator(this, function (
|
|
469
|
-
switch (
|
|
422
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
423
|
+
var _c;
|
|
424
|
+
return __generator(this, function (_d) {
|
|
425
|
+
switch (_d.label) {
|
|
470
426
|
case 0:
|
|
471
427
|
_a = [__assign({}, output)];
|
|
472
|
-
|
|
428
|
+
_c = {};
|
|
473
429
|
return [4, parseBody(output.body, context)];
|
|
474
430
|
case 1:
|
|
475
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
431
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
476
432
|
errorCode = "UnknownError";
|
|
477
433
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
478
434
|
_b = errorCode;
|
|
@@ -483,28 +439,18 @@ var deserializeAws_restJson1ListItemsCommandError = function (output, context) {
|
|
|
483
439
|
case "com.amazonaws.mediastoredata#InternalServerError": return [3, 4];
|
|
484
440
|
}
|
|
485
441
|
return [3, 6];
|
|
486
|
-
case 2:
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
case
|
|
490
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
491
|
-
return [3, 7];
|
|
492
|
-
case 4:
|
|
493
|
-
_d = [{}];
|
|
494
|
-
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
495
|
-
case 5:
|
|
496
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
497
|
-
return [3, 7];
|
|
442
|
+
case 2: return [4, deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)];
|
|
443
|
+
case 3: throw _d.sent();
|
|
444
|
+
case 4: return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
445
|
+
case 5: throw _d.sent();
|
|
498
446
|
case 6:
|
|
499
447
|
parsedBody = parsedOutput.body;
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
response
|
|
506
|
-
delete response.Message;
|
|
507
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
448
|
+
response = new __BaseException({
|
|
449
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
450
|
+
$fault: "client",
|
|
451
|
+
$metadata: deserializeMetadata(output),
|
|
452
|
+
});
|
|
453
|
+
throw __decorateServiceException(response, parsedBody);
|
|
508
454
|
}
|
|
509
455
|
});
|
|
510
456
|
}); };
|
|
@@ -541,16 +487,16 @@ export var deserializeAws_restJson1PutObjectCommand = function (output, context)
|
|
|
541
487
|
});
|
|
542
488
|
}); };
|
|
543
489
|
var deserializeAws_restJson1PutObjectCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
544
|
-
var parsedOutput, _a, response, errorCode, _b,
|
|
545
|
-
var
|
|
546
|
-
return __generator(this, function (
|
|
547
|
-
switch (
|
|
490
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
491
|
+
var _c;
|
|
492
|
+
return __generator(this, function (_d) {
|
|
493
|
+
switch (_d.label) {
|
|
548
494
|
case 0:
|
|
549
495
|
_a = [__assign({}, output)];
|
|
550
|
-
|
|
496
|
+
_c = {};
|
|
551
497
|
return [4, parseBody(output.body, context)];
|
|
552
498
|
case 1:
|
|
553
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
499
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
554
500
|
errorCode = "UnknownError";
|
|
555
501
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
556
502
|
_b = errorCode;
|
|
@@ -561,93 +507,67 @@ var deserializeAws_restJson1PutObjectCommandError = function (output, context) {
|
|
|
561
507
|
case "com.amazonaws.mediastoredata#InternalServerError": return [3, 4];
|
|
562
508
|
}
|
|
563
509
|
return [3, 6];
|
|
564
|
-
case 2:
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
case
|
|
568
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
569
|
-
return [3, 7];
|
|
570
|
-
case 4:
|
|
571
|
-
_d = [{}];
|
|
572
|
-
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
573
|
-
case 5:
|
|
574
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_f.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
575
|
-
return [3, 7];
|
|
510
|
+
case 2: return [4, deserializeAws_restJson1ContainerNotFoundExceptionResponse(parsedOutput, context)];
|
|
511
|
+
case 3: throw _d.sent();
|
|
512
|
+
case 4: return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
513
|
+
case 5: throw _d.sent();
|
|
576
514
|
case 6:
|
|
577
515
|
parsedBody = parsedOutput.body;
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
response
|
|
584
|
-
delete response.Message;
|
|
585
|
-
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
516
|
+
response = new __BaseException({
|
|
517
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
518
|
+
$fault: "client",
|
|
519
|
+
$metadata: deserializeMetadata(output),
|
|
520
|
+
});
|
|
521
|
+
throw __decorateServiceException(response, parsedBody);
|
|
586
522
|
}
|
|
587
523
|
});
|
|
588
524
|
}); };
|
|
589
525
|
var deserializeAws_restJson1ContainerNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
590
|
-
var contents, data;
|
|
526
|
+
var contents, data, exception;
|
|
591
527
|
return __generator(this, function (_a) {
|
|
592
|
-
contents = {
|
|
593
|
-
name: "ContainerNotFoundException",
|
|
594
|
-
$fault: "client",
|
|
595
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
596
|
-
Message: undefined,
|
|
597
|
-
};
|
|
528
|
+
contents = {};
|
|
598
529
|
data = parsedOutput.body;
|
|
599
530
|
if (data.Message !== undefined && data.Message !== null) {
|
|
600
531
|
contents.Message = __expectString(data.Message);
|
|
601
532
|
}
|
|
602
|
-
|
|
533
|
+
exception = new ContainerNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
534
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
603
535
|
});
|
|
604
536
|
}); };
|
|
605
537
|
var deserializeAws_restJson1InternalServerErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
606
|
-
var contents, data;
|
|
538
|
+
var contents, data, exception;
|
|
607
539
|
return __generator(this, function (_a) {
|
|
608
|
-
contents = {
|
|
609
|
-
name: "InternalServerError",
|
|
610
|
-
$fault: "server",
|
|
611
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
612
|
-
Message: undefined,
|
|
613
|
-
};
|
|
540
|
+
contents = {};
|
|
614
541
|
data = parsedOutput.body;
|
|
615
542
|
if (data.Message !== undefined && data.Message !== null) {
|
|
616
543
|
contents.Message = __expectString(data.Message);
|
|
617
544
|
}
|
|
618
|
-
|
|
545
|
+
exception = new InternalServerError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
546
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
619
547
|
});
|
|
620
548
|
}); };
|
|
621
549
|
var deserializeAws_restJson1ObjectNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
622
|
-
var contents, data;
|
|
550
|
+
var contents, data, exception;
|
|
623
551
|
return __generator(this, function (_a) {
|
|
624
|
-
contents = {
|
|
625
|
-
name: "ObjectNotFoundException",
|
|
626
|
-
$fault: "client",
|
|
627
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
628
|
-
Message: undefined,
|
|
629
|
-
};
|
|
552
|
+
contents = {};
|
|
630
553
|
data = parsedOutput.body;
|
|
631
554
|
if (data.Message !== undefined && data.Message !== null) {
|
|
632
555
|
contents.Message = __expectString(data.Message);
|
|
633
556
|
}
|
|
634
|
-
|
|
557
|
+
exception = new ObjectNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
558
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
635
559
|
});
|
|
636
560
|
}); };
|
|
637
561
|
var deserializeAws_restJson1RequestedRangeNotSatisfiableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
638
|
-
var contents, data;
|
|
562
|
+
var contents, data, exception;
|
|
639
563
|
return __generator(this, function (_a) {
|
|
640
|
-
contents = {
|
|
641
|
-
name: "RequestedRangeNotSatisfiableException",
|
|
642
|
-
$fault: "client",
|
|
643
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
644
|
-
Message: undefined,
|
|
645
|
-
};
|
|
564
|
+
contents = {};
|
|
646
565
|
data = parsedOutput.body;
|
|
647
566
|
if (data.Message !== undefined && data.Message !== null) {
|
|
648
567
|
contents.Message = __expectString(data.Message);
|
|
649
568
|
}
|
|
650
|
-
|
|
569
|
+
exception = new RequestedRangeNotSatisfiableException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
570
|
+
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
651
571
|
});
|
|
652
572
|
}); };
|
|
653
573
|
var deserializeAws_restJson1Item = function (output, context) {
|
|
@@ -663,7 +583,7 @@ var deserializeAws_restJson1Item = function (output, context) {
|
|
|
663
583
|
};
|
|
664
584
|
};
|
|
665
585
|
var deserializeAws_restJson1ItemList = function (output, context) {
|
|
666
|
-
|
|
586
|
+
var retVal = (output || [])
|
|
667
587
|
.filter(function (e) { return e != null; })
|
|
668
588
|
.map(function (entry) {
|
|
669
589
|
if (entry === null) {
|
|
@@ -671,6 +591,7 @@ var deserializeAws_restJson1ItemList = function (output, context) {
|
|
|
671
591
|
}
|
|
672
592
|
return deserializeAws_restJson1Item(entry, context);
|
|
673
593
|
});
|
|
594
|
+
return retVal;
|
|
674
595
|
};
|
|
675
596
|
var deserializeMetadata = function (output) {
|
|
676
597
|
var _a;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
|
|
2
|
+
/**
|
|
3
|
+
* Base exception class for all service exceptions from MediaStoreData service.
|
|
4
|
+
*/
|
|
5
|
+
export declare class MediaStoreDataServiceException extends __ServiceException {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
constructor(options: __ServiceExceptionOptions);
|
|
10
|
+
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { Readable } from "stream";
|
|
4
|
+
import { MediaStoreDataServiceException as __BaseException } from "./MediaStoreDataServiceException";
|
|
4
5
|
/**
|
|
5
6
|
* <p>The specified container was not found for the specified account.</p>
|
|
6
7
|
*/
|
|
7
|
-
export
|
|
8
|
-
name: "ContainerNotFoundException";
|
|
9
|
-
$fault: "client";
|
|
8
|
+
export declare class ContainerNotFoundException extends __BaseException {
|
|
9
|
+
readonly name: "ContainerNotFoundException";
|
|
10
|
+
readonly $fault: "client";
|
|
10
11
|
Message?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
constructor(opts: __ExceptionOptionType<ContainerNotFoundException, __BaseException>);
|
|
11
16
|
}
|
|
12
17
|
export interface DeleteObjectRequest {
|
|
13
18
|
/**
|
|
@@ -33,18 +38,26 @@ export declare namespace DeleteObjectResponse {
|
|
|
33
38
|
/**
|
|
34
39
|
* <p>The service is temporarily unavailable.</p>
|
|
35
40
|
*/
|
|
36
|
-
export
|
|
37
|
-
name: "InternalServerError";
|
|
38
|
-
$fault: "server";
|
|
41
|
+
export declare class InternalServerError extends __BaseException {
|
|
42
|
+
readonly name: "InternalServerError";
|
|
43
|
+
readonly $fault: "server";
|
|
39
44
|
Message?: string;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
|
|
40
49
|
}
|
|
41
50
|
/**
|
|
42
51
|
* <p>Could not perform an operation on an object that does not exist.</p>
|
|
43
52
|
*/
|
|
44
|
-
export
|
|
45
|
-
name: "ObjectNotFoundException";
|
|
46
|
-
$fault: "client";
|
|
53
|
+
export declare class ObjectNotFoundException extends __BaseException {
|
|
54
|
+
readonly name: "ObjectNotFoundException";
|
|
55
|
+
readonly $fault: "client";
|
|
47
56
|
Message?: string;
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
constructor(opts: __ExceptionOptionType<ObjectNotFoundException, __BaseException>);
|
|
48
61
|
}
|
|
49
62
|
export interface DescribeObjectRequest {
|
|
50
63
|
/**
|
|
@@ -169,10 +182,14 @@ export declare namespace GetObjectResponse {
|
|
|
169
182
|
/**
|
|
170
183
|
* <p>The requested content range is not valid.</p>
|
|
171
184
|
*/
|
|
172
|
-
export
|
|
173
|
-
name: "RequestedRangeNotSatisfiableException";
|
|
174
|
-
$fault: "client";
|
|
185
|
+
export declare class RequestedRangeNotSatisfiableException extends __BaseException {
|
|
186
|
+
readonly name: "RequestedRangeNotSatisfiableException";
|
|
187
|
+
readonly $fault: "client";
|
|
175
188
|
Message?: string;
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
constructor(opts: __ExceptionOptionType<RequestedRangeNotSatisfiableException, __BaseException>);
|
|
176
193
|
}
|
|
177
194
|
export declare enum ItemType {
|
|
178
195
|
FOLDER = "FOLDER",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
|
+
import { DeleteObjectCommandInput, DeleteObjectCommandOutput } from "./commands/DeleteObjectCommand";
|
|
3
|
+
import { DescribeObjectCommandInput, DescribeObjectCommandOutput } from "./commands/DescribeObjectCommand";
|
|
4
|
+
import { GetObjectCommandInput, GetObjectCommandOutput } from "./commands/GetObjectCommand";
|
|
5
|
+
import { ListItemsCommandInput, ListItemsCommandOutput } from "./commands/ListItemsCommand";
|
|
6
|
+
import { PutObjectCommandInput, PutObjectCommandOutput } from "./commands/PutObjectCommand";
|
|
7
|
+
import { MediaStoreDataClient } from "./MediaStoreDataClient";
|
|
8
|
+
|
|
9
|
+
export declare class MediaStoreData extends MediaStoreDataClient {
|
|
10
|
+
|
|
11
|
+
deleteObject(args: DeleteObjectCommandInput, options?: __HttpHandlerOptions): Promise<DeleteObjectCommandOutput>;
|
|
12
|
+
deleteObject(args: DeleteObjectCommandInput, cb: (err: any, data?: DeleteObjectCommandOutput) => void): void;
|
|
13
|
+
deleteObject(args: DeleteObjectCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteObjectCommandOutput) => void): void;
|
|
14
|
+
|
|
15
|
+
describeObject(args: DescribeObjectCommandInput, options?: __HttpHandlerOptions): Promise<DescribeObjectCommandOutput>;
|
|
16
|
+
describeObject(args: DescribeObjectCommandInput, cb: (err: any, data?: DescribeObjectCommandOutput) => void): void;
|
|
17
|
+
describeObject(args: DescribeObjectCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeObjectCommandOutput) => void): void;
|
|
18
|
+
|
|
19
|
+
getObject(args: GetObjectCommandInput, options?: __HttpHandlerOptions): Promise<GetObjectCommandOutput>;
|
|
20
|
+
getObject(args: GetObjectCommandInput, cb: (err: any, data?: GetObjectCommandOutput) => void): void;
|
|
21
|
+
getObject(args: GetObjectCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetObjectCommandOutput) => void): void;
|
|
22
|
+
|
|
23
|
+
listItems(args: ListItemsCommandInput, options?: __HttpHandlerOptions): Promise<ListItemsCommandOutput>;
|
|
24
|
+
listItems(args: ListItemsCommandInput, cb: (err: any, data?: ListItemsCommandOutput) => void): void;
|
|
25
|
+
listItems(args: ListItemsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListItemsCommandOutput) => void): void;
|
|
26
|
+
|
|
27
|
+
putObject(args: PutObjectCommandInput, options?: __HttpHandlerOptions): Promise<PutObjectCommandOutput>;
|
|
28
|
+
putObject(args: PutObjectCommandInput, cb: (err: any, data?: PutObjectCommandOutput) => void): void;
|
|
29
|
+
putObject(args: PutObjectCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutObjectCommandOutput) => void): void;
|
|
30
|
+
}
|