@aws-sdk/client-mediastore-data 3.901.0 → 3.907.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 (2) hide show
  1. package/dist-cjs/index.js +549 -659
  2. package/package.json +6 -6
package/dist-cjs/index.js CHANGED
@@ -1,691 +1,581 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "mediastore",
25
+ });
10
26
  };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
32
  };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- ContainerNotFoundException: () => ContainerNotFoundException,
25
- DeleteObjectCommand: () => DeleteObjectCommand,
26
- DescribeObjectCommand: () => DescribeObjectCommand,
27
- GetObjectCommand: () => GetObjectCommand,
28
- GetObjectResponseFilterSensitiveLog: () => GetObjectResponseFilterSensitiveLog,
29
- InternalServerError: () => InternalServerError,
30
- ItemType: () => ItemType,
31
- ListItemsCommand: () => ListItemsCommand,
32
- MediaStoreData: () => MediaStoreData,
33
- MediaStoreDataClient: () => MediaStoreDataClient,
34
- MediaStoreDataServiceException: () => MediaStoreDataServiceException,
35
- ObjectNotFoundException: () => ObjectNotFoundException,
36
- PutObjectCommand: () => PutObjectCommand,
37
- PutObjectRequestFilterSensitiveLog: () => PutObjectRequestFilterSensitiveLog,
38
- RequestedRangeNotSatisfiableException: () => RequestedRangeNotSatisfiableException,
39
- StorageClass: () => StorageClass,
40
- UploadAvailability: () => UploadAvailability,
41
- __Client: () => import_smithy_client.Client,
42
- paginateListItems: () => paginateListItems
43
- });
44
- module.exports = __toCommonJS(index_exports);
45
-
46
- // src/MediaStoreDataClient.ts
47
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
48
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
49
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
50
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
51
- var import_config_resolver = require("@smithy/config-resolver");
52
- var import_core = require("@smithy/core");
53
- var import_middleware_content_length = require("@smithy/middleware-content-length");
54
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
55
- var import_middleware_retry = require("@smithy/middleware-retry");
56
-
57
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
58
33
 
59
- // src/endpoint/EndpointParameters.ts
60
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
61
- return Object.assign(options, {
62
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
63
- useFipsEndpoint: options.useFipsEndpoint ?? false,
64
- defaultSigningName: "mediastore"
65
- });
66
- }, "resolveClientEndpointParameters");
67
- var commonParams = {
68
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
69
- Endpoint: { type: "builtInParams", name: "endpoint" },
70
- Region: { type: "builtInParams", name: "region" },
71
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
72
71
  };
73
72
 
74
- // src/MediaStoreDataClient.ts
75
- var import_runtimeConfig = require("././runtimeConfig");
76
-
77
- // src/runtimeExtensions.ts
78
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
79
- var import_protocol_http = require("@smithy/protocol-http");
80
- var import_smithy_client = require("@smithy/smithy-client");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
81
78
 
82
- // src/auth/httpAuthExtensionConfiguration.ts
83
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
84
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
85
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
86
- let _credentials = runtimeConfig.credentials;
87
- return {
88
- setHttpAuthScheme(httpAuthScheme) {
89
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
90
- if (index === -1) {
91
- _httpAuthSchemes.push(httpAuthScheme);
92
- } else {
93
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
94
- }
95
- },
96
- httpAuthSchemes() {
97
- return _httpAuthSchemes;
98
- },
99
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
100
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
101
- },
102
- httpAuthSchemeProvider() {
103
- return _httpAuthSchemeProvider;
104
- },
105
- setCredentials(credentials) {
106
- _credentials = credentials;
107
- },
108
- credentials() {
109
- return _credentials;
79
+ class MediaStoreDataClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultMediaStoreDataHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
110
107
  }
111
- };
112
- }, "getHttpAuthExtensionConfiguration");
113
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
114
- return {
115
- httpAuthSchemes: config.httpAuthSchemes(),
116
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
117
- credentials: config.credentials()
118
- };
119
- }, "resolveHttpAuthRuntimeConfig");
120
-
121
- // src/runtimeExtensions.ts
122
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
123
- const extensionConfiguration = Object.assign(
124
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
125
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
126
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
127
- getHttpAuthExtensionConfiguration(runtimeConfig)
128
- );
129
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
130
- return Object.assign(
131
- runtimeConfig,
132
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
133
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
134
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
135
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
136
- );
137
- }, "resolveRuntimeExtensions");
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
138
112
 
139
- // src/MediaStoreDataClient.ts
140
- var MediaStoreDataClient = class extends import_smithy_client.Client {
141
- static {
142
- __name(this, "MediaStoreDataClient");
143
- }
144
- /**
145
- * The resolved configuration of MediaStoreDataClient class. This is resolved and normalized from the {@link MediaStoreDataClientConfig | constructor configuration interface}.
146
- */
147
- config;
148
- constructor(...[configuration]) {
149
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
150
- super(_config_0);
151
- this.initConfig = _config_0;
152
- const _config_1 = resolveClientEndpointParameters(_config_0);
153
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
154
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
155
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
156
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
157
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
158
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
159
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
160
- this.config = _config_8;
161
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
162
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
163
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
164
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
165
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
166
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
167
- this.middlewareStack.use(
168
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
169
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultMediaStoreDataHttpAuthSchemeParametersProvider,
170
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
171
- "aws.auth#sigv4": config.credentials
172
- }), "identityProviderConfigProvider")
173
- })
174
- );
175
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
176
- }
177
- /**
178
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
179
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
180
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
181
- */
182
- destroy() {
183
- super.destroy();
184
- }
113
+ class MediaStoreDataServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, MediaStoreDataServiceException.prototype);
117
+ }
118
+ }
119
+
120
+ class ContainerNotFoundException extends MediaStoreDataServiceException {
121
+ name = "ContainerNotFoundException";
122
+ $fault = "client";
123
+ Message;
124
+ constructor(opts) {
125
+ super({
126
+ name: "ContainerNotFoundException",
127
+ $fault: "client",
128
+ ...opts,
129
+ });
130
+ Object.setPrototypeOf(this, ContainerNotFoundException.prototype);
131
+ this.Message = opts.Message;
132
+ }
133
+ }
134
+ class InternalServerError extends MediaStoreDataServiceException {
135
+ name = "InternalServerError";
136
+ $fault = "server";
137
+ Message;
138
+ constructor(opts) {
139
+ super({
140
+ name: "InternalServerError",
141
+ $fault: "server",
142
+ ...opts,
143
+ });
144
+ Object.setPrototypeOf(this, InternalServerError.prototype);
145
+ this.Message = opts.Message;
146
+ }
147
+ }
148
+ class ObjectNotFoundException extends MediaStoreDataServiceException {
149
+ name = "ObjectNotFoundException";
150
+ $fault = "client";
151
+ Message;
152
+ constructor(opts) {
153
+ super({
154
+ name: "ObjectNotFoundException",
155
+ $fault: "client",
156
+ ...opts,
157
+ });
158
+ Object.setPrototypeOf(this, ObjectNotFoundException.prototype);
159
+ this.Message = opts.Message;
160
+ }
161
+ }
162
+ class RequestedRangeNotSatisfiableException extends MediaStoreDataServiceException {
163
+ name = "RequestedRangeNotSatisfiableException";
164
+ $fault = "client";
165
+ Message;
166
+ constructor(opts) {
167
+ super({
168
+ name: "RequestedRangeNotSatisfiableException",
169
+ $fault: "client",
170
+ ...opts,
171
+ });
172
+ Object.setPrototypeOf(this, RequestedRangeNotSatisfiableException.prototype);
173
+ this.Message = opts.Message;
174
+ }
175
+ }
176
+ const ItemType = {
177
+ FOLDER: "FOLDER",
178
+ OBJECT: "OBJECT",
185
179
  };
186
-
187
- // src/MediaStoreData.ts
188
-
189
-
190
- // src/commands/DeleteObjectCommand.ts
191
-
192
- var import_middleware_serde = require("@smithy/middleware-serde");
193
-
194
-
195
- // src/protocols/Aws_restJson1.ts
196
- var import_core2 = require("@aws-sdk/core");
197
-
198
-
199
-
200
- // src/models/MediaStoreDataServiceException.ts
201
-
202
- var MediaStoreDataServiceException = class _MediaStoreDataServiceException extends import_smithy_client.ServiceException {
203
- static {
204
- __name(this, "MediaStoreDataServiceException");
205
- }
206
- /**
207
- * @internal
208
- */
209
- constructor(options) {
210
- super(options);
211
- Object.setPrototypeOf(this, _MediaStoreDataServiceException.prototype);
212
- }
180
+ const StorageClass = {
181
+ TEMPORAL: "TEMPORAL",
213
182
  };
183
+ const UploadAvailability = {
184
+ STANDARD: "STANDARD",
185
+ STREAMING: "STREAMING",
186
+ };
187
+ const GetObjectResponseFilterSensitiveLog = (obj) => ({
188
+ ...obj,
189
+ });
190
+ const PutObjectRequestFilterSensitiveLog = (obj) => ({
191
+ ...obj,
192
+ });
214
193
 
215
- // src/models/models_0.ts
216
- var ContainerNotFoundException = class _ContainerNotFoundException extends MediaStoreDataServiceException {
217
- static {
218
- __name(this, "ContainerNotFoundException");
219
- }
220
- name = "ContainerNotFoundException";
221
- $fault = "client";
222
- Message;
223
- /**
224
- * @internal
225
- */
226
- constructor(opts) {
227
- super({
228
- name: "ContainerNotFoundException",
229
- $fault: "client",
230
- ...opts
194
+ const se_DeleteObjectCommand = async (input, context) => {
195
+ const b = core.requestBuilder(input, context);
196
+ const headers = {};
197
+ b.bp("/{Path+}");
198
+ b.p("Path", () => input.Path, "{Path+}", true);
199
+ let body;
200
+ b.m("DELETE").h(headers).b(body);
201
+ return b.build();
202
+ };
203
+ const se_DescribeObjectCommand = async (input, context) => {
204
+ const b = core.requestBuilder(input, context);
205
+ const headers = {};
206
+ b.bp("/{Path+}");
207
+ b.p("Path", () => input.Path, "{Path+}", true);
208
+ let body;
209
+ b.m("HEAD").h(headers).b(body);
210
+ return b.build();
211
+ };
212
+ const se_GetObjectCommand = async (input, context) => {
213
+ const b = core.requestBuilder(input, context);
214
+ const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
215
+ [_r]: input[_R],
231
216
  });
232
- Object.setPrototypeOf(this, _ContainerNotFoundException.prototype);
233
- this.Message = opts.Message;
234
- }
217
+ b.bp("/{Path+}");
218
+ b.p("Path", () => input.Path, "{Path+}", true);
219
+ let body;
220
+ b.m("GET").h(headers).b(body);
221
+ return b.build();
235
222
  };
236
- var InternalServerError = class _InternalServerError extends MediaStoreDataServiceException {
237
- static {
238
- __name(this, "InternalServerError");
239
- }
240
- name = "InternalServerError";
241
- $fault = "server";
242
- Message;
243
- /**
244
- * @internal
245
- */
246
- constructor(opts) {
247
- super({
248
- name: "InternalServerError",
249
- $fault: "server",
250
- ...opts
223
+ const se_ListItemsCommand = async (input, context) => {
224
+ const b = core.requestBuilder(input, context);
225
+ const headers = {};
226
+ b.bp("/");
227
+ const query = smithyClient.map({
228
+ [_P]: [, input[_P]],
229
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
230
+ [_NT]: [, input[_NT]],
251
231
  });
252
- Object.setPrototypeOf(this, _InternalServerError.prototype);
253
- this.Message = opts.Message;
254
- }
232
+ let body;
233
+ b.m("GET").h(headers).q(query).b(body);
234
+ return b.build();
255
235
  };
256
- var ObjectNotFoundException = class _ObjectNotFoundException extends MediaStoreDataServiceException {
257
- static {
258
- __name(this, "ObjectNotFoundException");
259
- }
260
- name = "ObjectNotFoundException";
261
- $fault = "client";
262
- Message;
263
- /**
264
- * @internal
265
- */
266
- constructor(opts) {
267
- super({
268
- name: "ObjectNotFoundException",
269
- $fault: "client",
270
- ...opts
236
+ const se_PutObjectCommand = async (input, context) => {
237
+ const b = core.requestBuilder(input, context);
238
+ const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
239
+ "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
240
+ [_ct]: input[_CT] || "application/octet-stream",
241
+ [_cc]: input[_CC],
242
+ [_xasc]: input[_SC],
243
+ [_xaua]: input[_UA],
271
244
  });
272
- Object.setPrototypeOf(this, _ObjectNotFoundException.prototype);
273
- this.Message = opts.Message;
274
- }
245
+ b.bp("/{Path+}");
246
+ b.p("Path", () => input.Path, "{Path+}", true);
247
+ let body;
248
+ if (input.Body !== undefined) {
249
+ body = input.Body;
250
+ }
251
+ b.m("PUT").h(headers).b(body);
252
+ return b.build();
275
253
  };
276
- var RequestedRangeNotSatisfiableException = class _RequestedRangeNotSatisfiableException extends MediaStoreDataServiceException {
277
- static {
278
- __name(this, "RequestedRangeNotSatisfiableException");
279
- }
280
- name = "RequestedRangeNotSatisfiableException";
281
- $fault = "client";
282
- Message;
283
- /**
284
- * @internal
285
- */
286
- constructor(opts) {
287
- super({
288
- name: "RequestedRangeNotSatisfiableException",
289
- $fault: "client",
290
- ...opts
254
+ const de_DeleteObjectCommand = async (output, context) => {
255
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
256
+ return de_CommandError(output, context);
257
+ }
258
+ const contents = smithyClient.map({
259
+ $metadata: deserializeMetadata(output),
291
260
  });
292
- Object.setPrototypeOf(this, _RequestedRangeNotSatisfiableException.prototype);
293
- this.Message = opts.Message;
294
- }
261
+ await smithyClient.collectBody(output.body, context);
262
+ return contents;
295
263
  };
296
- var ItemType = {
297
- FOLDER: "FOLDER",
298
- OBJECT: "OBJECT"
264
+ const de_DescribeObjectCommand = async (output, context) => {
265
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
266
+ return de_CommandError(output, context);
267
+ }
268
+ const contents = smithyClient.map({
269
+ $metadata: deserializeMetadata(output),
270
+ [_ET]: [, output.headers[_e]],
271
+ [_CT]: [, output.headers[_ct]],
272
+ [_CL]: [() => void 0 !== output.headers[_cl], () => smithyClient.strictParseLong(output.headers[_cl])],
273
+ [_CC]: [, output.headers[_cc]],
274
+ [_LM]: [() => void 0 !== output.headers[_lm], () => smithyClient.expectNonNull(smithyClient.parseRfc7231DateTime(output.headers[_lm]))],
275
+ });
276
+ await smithyClient.collectBody(output.body, context);
277
+ return contents;
299
278
  };
300
- var StorageClass = {
301
- TEMPORAL: "TEMPORAL"
279
+ const de_GetObjectCommand = async (output, context) => {
280
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
281
+ return de_CommandError(output, context);
282
+ }
283
+ const contents = smithyClient.map({
284
+ $metadata: deserializeMetadata(output),
285
+ [_CC]: [, output.headers[_cc]],
286
+ [_CR]: [, output.headers[_cr]],
287
+ [_CL]: [() => void 0 !== output.headers[_cl], () => smithyClient.strictParseLong(output.headers[_cl])],
288
+ [_CT]: [, output.headers[_ct]],
289
+ [_ET]: [, output.headers[_e]],
290
+ [_LM]: [() => void 0 !== output.headers[_lm], () => smithyClient.expectNonNull(smithyClient.parseRfc7231DateTime(output.headers[_lm]))],
291
+ });
292
+ const data = output.body;
293
+ context.sdkStreamMixin(data);
294
+ contents.Body = data;
295
+ smithyClient.map(contents, {
296
+ StatusCode: [, output.statusCode],
297
+ });
298
+ return contents;
302
299
  };
303
- var UploadAvailability = {
304
- STANDARD: "STANDARD",
305
- STREAMING: "STREAMING"
300
+ const de_ListItemsCommand = async (output, context) => {
301
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
302
+ return de_CommandError(output, context);
303
+ }
304
+ const contents = smithyClient.map({
305
+ $metadata: deserializeMetadata(output),
306
+ });
307
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
308
+ const doc = smithyClient.take(data, {
309
+ Items: (_) => de_ItemList(_),
310
+ NextToken: smithyClient.expectString,
311
+ });
312
+ Object.assign(contents, doc);
313
+ return contents;
306
314
  };
307
- var GetObjectResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
308
- ...obj
309
- }), "GetObjectResponseFilterSensitiveLog");
310
- var PutObjectRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
311
- ...obj
312
- }), "PutObjectRequestFilterSensitiveLog");
313
-
314
- // src/protocols/Aws_restJson1.ts
315
- var se_DeleteObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
316
- const b = (0, import_core.requestBuilder)(input, context);
317
- const headers = {};
318
- b.bp("/{Path+}");
319
- b.p("Path", () => input.Path, "{Path+}", true);
320
- let body;
321
- b.m("DELETE").h(headers).b(body);
322
- return b.build();
323
- }, "se_DeleteObjectCommand");
324
- var se_DescribeObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
325
- const b = (0, import_core.requestBuilder)(input, context);
326
- const headers = {};
327
- b.bp("/{Path+}");
328
- b.p("Path", () => input.Path, "{Path+}", true);
329
- let body;
330
- b.m("HEAD").h(headers).b(body);
331
- return b.build();
332
- }, "se_DescribeObjectCommand");
333
- var se_GetObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
334
- const b = (0, import_core.requestBuilder)(input, context);
335
- const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
336
- [_r]: input[_R]
337
- });
338
- b.bp("/{Path+}");
339
- b.p("Path", () => input.Path, "{Path+}", true);
340
- let body;
341
- b.m("GET").h(headers).b(body);
342
- return b.build();
343
- }, "se_GetObjectCommand");
344
- var se_ListItemsCommand = /* @__PURE__ */ __name(async (input, context) => {
345
- const b = (0, import_core.requestBuilder)(input, context);
346
- const headers = {};
347
- b.bp("/");
348
- const query = (0, import_smithy_client.map)({
349
- [_P]: [, input[_P]],
350
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
351
- [_NT]: [, input[_NT]]
352
- });
353
- let body;
354
- b.m("GET").h(headers).q(query).b(body);
355
- return b.build();
356
- }, "se_ListItemsCommand");
357
- var se_PutObjectCommand = /* @__PURE__ */ __name(async (input, context) => {
358
- const b = (0, import_core.requestBuilder)(input, context);
359
- const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
360
- "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
361
- [_ct]: input[_CT] || "application/octet-stream",
362
- [_cc]: input[_CC],
363
- [_xasc]: input[_SC],
364
- [_xaua]: input[_UA]
365
- });
366
- b.bp("/{Path+}");
367
- b.p("Path", () => input.Path, "{Path+}", true);
368
- let body;
369
- if (input.Body !== void 0) {
370
- body = input.Body;
371
- }
372
- b.m("PUT").h(headers).b(body);
373
- return b.build();
374
- }, "se_PutObjectCommand");
375
- var de_DeleteObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
376
- if (output.statusCode !== 200 && output.statusCode >= 300) {
377
- return de_CommandError(output, context);
378
- }
379
- const contents = (0, import_smithy_client.map)({
380
- $metadata: deserializeMetadata(output)
381
- });
382
- await (0, import_smithy_client.collectBody)(output.body, context);
383
- return contents;
384
- }, "de_DeleteObjectCommand");
385
- var de_DescribeObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
386
- if (output.statusCode !== 200 && output.statusCode >= 300) {
387
- return de_CommandError(output, context);
388
- }
389
- const contents = (0, import_smithy_client.map)({
390
- $metadata: deserializeMetadata(output),
391
- [_ET]: [, output.headers[_e]],
392
- [_CT]: [, output.headers[_ct]],
393
- [_CL]: [() => void 0 !== output.headers[_cl], () => (0, import_smithy_client.strictParseLong)(output.headers[_cl])],
394
- [_CC]: [, output.headers[_cc]],
395
- [_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))]
396
- });
397
- await (0, import_smithy_client.collectBody)(output.body, context);
398
- return contents;
399
- }, "de_DescribeObjectCommand");
400
- var de_GetObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
401
- if (output.statusCode !== 200 && output.statusCode >= 300) {
402
- return de_CommandError(output, context);
403
- }
404
- const contents = (0, import_smithy_client.map)({
405
- $metadata: deserializeMetadata(output),
406
- [_CC]: [, output.headers[_cc]],
407
- [_CR]: [, output.headers[_cr]],
408
- [_CL]: [() => void 0 !== output.headers[_cl], () => (0, import_smithy_client.strictParseLong)(output.headers[_cl])],
409
- [_CT]: [, output.headers[_ct]],
410
- [_ET]: [, output.headers[_e]],
411
- [_LM]: [() => void 0 !== output.headers[_lm], () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_lm]))]
412
- });
413
- const data = output.body;
414
- context.sdkStreamMixin(data);
415
- contents.Body = data;
416
- (0, import_smithy_client.map)(contents, {
417
- StatusCode: [, output.statusCode]
418
- });
419
- return contents;
420
- }, "de_GetObjectCommand");
421
- var de_ListItemsCommand = /* @__PURE__ */ __name(async (output, context) => {
422
- if (output.statusCode !== 200 && output.statusCode >= 300) {
423
- return de_CommandError(output, context);
424
- }
425
- const contents = (0, import_smithy_client.map)({
426
- $metadata: deserializeMetadata(output)
427
- });
428
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
429
- const doc = (0, import_smithy_client.take)(data, {
430
- Items: /* @__PURE__ */ __name((_) => de_ItemList(_, context), "Items"),
431
- NextToken: import_smithy_client.expectString
432
- });
433
- Object.assign(contents, doc);
434
- return contents;
435
- }, "de_ListItemsCommand");
436
- var de_PutObjectCommand = /* @__PURE__ */ __name(async (output, context) => {
437
- if (output.statusCode !== 200 && output.statusCode >= 300) {
438
- return de_CommandError(output, context);
439
- }
440
- const contents = (0, import_smithy_client.map)({
441
- $metadata: deserializeMetadata(output)
442
- });
443
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
444
- const doc = (0, import_smithy_client.take)(data, {
445
- ContentSHA256: import_smithy_client.expectString,
446
- ETag: import_smithy_client.expectString,
447
- StorageClass: import_smithy_client.expectString
448
- });
449
- Object.assign(contents, doc);
450
- return contents;
451
- }, "de_PutObjectCommand");
452
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
453
- const parsedOutput = {
454
- ...output,
455
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
456
- };
457
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
458
- switch (errorCode) {
459
- case "ContainerNotFoundException":
460
- case "com.amazonaws.mediastoredata#ContainerNotFoundException":
461
- throw await de_ContainerNotFoundExceptionRes(parsedOutput, context);
462
- case "InternalServerError":
463
- case "com.amazonaws.mediastoredata#InternalServerError":
464
- throw await de_InternalServerErrorRes(parsedOutput, context);
465
- case "ObjectNotFoundException":
466
- case "com.amazonaws.mediastoredata#ObjectNotFoundException":
467
- throw await de_ObjectNotFoundExceptionRes(parsedOutput, context);
468
- case "RequestedRangeNotSatisfiableException":
469
- case "com.amazonaws.mediastoredata#RequestedRangeNotSatisfiableException":
470
- throw await de_RequestedRangeNotSatisfiableExceptionRes(parsedOutput, context);
471
- default:
472
- const parsedBody = parsedOutput.body;
473
- return throwDefaultError({
474
- output,
475
- parsedBody,
476
- errorCode
477
- });
478
- }
479
- }, "de_CommandError");
480
- var throwDefaultError = (0, import_smithy_client.withBaseException)(MediaStoreDataServiceException);
481
- var de_ContainerNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
482
- const contents = (0, import_smithy_client.map)({});
483
- const data = parsedOutput.body;
484
- const doc = (0, import_smithy_client.take)(data, {
485
- Message: import_smithy_client.expectString
486
- });
487
- Object.assign(contents, doc);
488
- const exception = new ContainerNotFoundException({
489
- $metadata: deserializeMetadata(parsedOutput),
490
- ...contents
491
- });
492
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
493
- }, "de_ContainerNotFoundExceptionRes");
494
- var de_InternalServerErrorRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
495
- const contents = (0, import_smithy_client.map)({});
496
- const data = parsedOutput.body;
497
- const doc = (0, import_smithy_client.take)(data, {
498
- Message: import_smithy_client.expectString
499
- });
500
- Object.assign(contents, doc);
501
- const exception = new InternalServerError({
502
- $metadata: deserializeMetadata(parsedOutput),
503
- ...contents
504
- });
505
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
506
- }, "de_InternalServerErrorRes");
507
- var de_ObjectNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
508
- const contents = (0, import_smithy_client.map)({});
509
- const data = parsedOutput.body;
510
- const doc = (0, import_smithy_client.take)(data, {
511
- Message: import_smithy_client.expectString
512
- });
513
- Object.assign(contents, doc);
514
- const exception = new ObjectNotFoundException({
515
- $metadata: deserializeMetadata(parsedOutput),
516
- ...contents
517
- });
518
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
519
- }, "de_ObjectNotFoundExceptionRes");
520
- var de_RequestedRangeNotSatisfiableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
521
- const contents = (0, import_smithy_client.map)({});
522
- const data = parsedOutput.body;
523
- const doc = (0, import_smithy_client.take)(data, {
524
- Message: import_smithy_client.expectString
525
- });
526
- Object.assign(contents, doc);
527
- const exception = new RequestedRangeNotSatisfiableException({
528
- $metadata: deserializeMetadata(parsedOutput),
529
- ...contents
530
- });
531
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
532
- }, "de_RequestedRangeNotSatisfiableExceptionRes");
533
- var de_Item = /* @__PURE__ */ __name((output, context) => {
534
- return (0, import_smithy_client.take)(output, {
535
- ContentLength: import_smithy_client.expectLong,
536
- ContentType: import_smithy_client.expectString,
537
- ETag: import_smithy_client.expectString,
538
- LastModified: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastModified"),
539
- Name: import_smithy_client.expectString,
540
- Type: import_smithy_client.expectString
541
- });
542
- }, "de_Item");
543
- var de_ItemList = /* @__PURE__ */ __name((output, context) => {
544
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
545
- return de_Item(entry, context);
546
- });
547
- return retVal;
548
- }, "de_ItemList");
549
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
550
- httpStatusCode: output.statusCode,
551
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
552
- extendedRequestId: output.headers["x-amz-id-2"],
553
- cfId: output.headers["x-amz-cf-id"]
554
- }), "deserializeMetadata");
555
- var _CC = "CacheControl";
556
- var _CL = "ContentLength";
557
- var _CR = "ContentRange";
558
- var _CT = "ContentType";
559
- var _ET = "ETag";
560
- var _LM = "LastModified";
561
- var _MR = "MaxResults";
562
- var _NT = "NextToken";
563
- var _P = "Path";
564
- var _R = "Range";
565
- var _SC = "StorageClass";
566
- var _UA = "UploadAvailability";
567
- var _cc = "cache-control";
568
- var _cl = "content-length";
569
- var _cr = "content-range";
570
- var _ct = "content-type";
571
- var _e = "etag";
572
- var _lm = "last-modified";
573
- var _r = "range";
574
- var _xasc = "x-amz-storage-class";
575
- var _xaua = "x-amz-upload-availability";
576
-
577
- // src/commands/DeleteObjectCommand.ts
578
- var DeleteObjectCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
579
- return [
580
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
581
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
582
- ];
583
- }).s("MediaStoreObject_20170901", "DeleteObject", {}).n("MediaStoreDataClient", "DeleteObjectCommand").f(void 0, void 0).ser(se_DeleteObjectCommand).de(de_DeleteObjectCommand).build() {
584
- static {
585
- __name(this, "DeleteObjectCommand");
586
- }
315
+ const de_PutObjectCommand = async (output, context) => {
316
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
317
+ return de_CommandError(output, context);
318
+ }
319
+ const contents = smithyClient.map({
320
+ $metadata: deserializeMetadata(output),
321
+ });
322
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
323
+ const doc = smithyClient.take(data, {
324
+ ContentSHA256: smithyClient.expectString,
325
+ ETag: smithyClient.expectString,
326
+ StorageClass: smithyClient.expectString,
327
+ });
328
+ Object.assign(contents, doc);
329
+ return contents;
587
330
  };
588
-
589
- // src/commands/DescribeObjectCommand.ts
590
-
591
-
592
-
593
- var DescribeObjectCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
594
- return [
595
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
596
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
597
- ];
598
- }).s("MediaStoreObject_20170901", "DescribeObject", {}).n("MediaStoreDataClient", "DescribeObjectCommand").f(void 0, void 0).ser(se_DescribeObjectCommand).de(de_DescribeObjectCommand).build() {
599
- static {
600
- __name(this, "DescribeObjectCommand");
601
- }
331
+ const de_CommandError = async (output, context) => {
332
+ const parsedOutput = {
333
+ ...output,
334
+ body: await core$1.parseJsonErrorBody(output.body, context),
335
+ };
336
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
337
+ switch (errorCode) {
338
+ case "ContainerNotFoundException":
339
+ case "com.amazonaws.mediastoredata#ContainerNotFoundException":
340
+ throw await de_ContainerNotFoundExceptionRes(parsedOutput);
341
+ case "InternalServerError":
342
+ case "com.amazonaws.mediastoredata#InternalServerError":
343
+ throw await de_InternalServerErrorRes(parsedOutput);
344
+ case "ObjectNotFoundException":
345
+ case "com.amazonaws.mediastoredata#ObjectNotFoundException":
346
+ throw await de_ObjectNotFoundExceptionRes(parsedOutput);
347
+ case "RequestedRangeNotSatisfiableException":
348
+ case "com.amazonaws.mediastoredata#RequestedRangeNotSatisfiableException":
349
+ throw await de_RequestedRangeNotSatisfiableExceptionRes(parsedOutput);
350
+ default:
351
+ const parsedBody = parsedOutput.body;
352
+ return throwDefaultError({
353
+ output,
354
+ parsedBody,
355
+ errorCode,
356
+ });
357
+ }
602
358
  };
603
-
604
- // src/commands/GetObjectCommand.ts
605
-
606
-
607
-
608
- var GetObjectCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
609
- return [
610
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
611
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
612
- ];
613
- }).s("MediaStoreObject_20170901", "GetObject", {}).n("MediaStoreDataClient", "GetObjectCommand").f(void 0, GetObjectResponseFilterSensitiveLog).ser(se_GetObjectCommand).de(de_GetObjectCommand).build() {
614
- static {
615
- __name(this, "GetObjectCommand");
616
- }
359
+ const throwDefaultError = smithyClient.withBaseException(MediaStoreDataServiceException);
360
+ const de_ContainerNotFoundExceptionRes = async (parsedOutput, context) => {
361
+ const contents = smithyClient.map({});
362
+ const data = parsedOutput.body;
363
+ const doc = smithyClient.take(data, {
364
+ Message: smithyClient.expectString,
365
+ });
366
+ Object.assign(contents, doc);
367
+ const exception = new ContainerNotFoundException({
368
+ $metadata: deserializeMetadata(parsedOutput),
369
+ ...contents,
370
+ });
371
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
617
372
  };
618
-
619
- // src/commands/ListItemsCommand.ts
620
-
621
-
622
-
623
- var ListItemsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
624
- return [
625
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
626
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
627
- ];
628
- }).s("MediaStoreObject_20170901", "ListItems", {}).n("MediaStoreDataClient", "ListItemsCommand").f(void 0, void 0).ser(se_ListItemsCommand).de(de_ListItemsCommand).build() {
629
- static {
630
- __name(this, "ListItemsCommand");
631
- }
373
+ const de_InternalServerErrorRes = async (parsedOutput, context) => {
374
+ const contents = smithyClient.map({});
375
+ const data = parsedOutput.body;
376
+ const doc = smithyClient.take(data, {
377
+ Message: smithyClient.expectString,
378
+ });
379
+ Object.assign(contents, doc);
380
+ const exception = new InternalServerError({
381
+ $metadata: deserializeMetadata(parsedOutput),
382
+ ...contents,
383
+ });
384
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
632
385
  };
633
-
634
- // src/commands/PutObjectCommand.ts
635
-
636
-
637
-
638
- var PutObjectCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
639
- return [
640
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
641
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
642
- ];
643
- }).s("MediaStoreObject_20170901", "PutObject", {}).n("MediaStoreDataClient", "PutObjectCommand").f(PutObjectRequestFilterSensitiveLog, void 0).ser(se_PutObjectCommand).de(de_PutObjectCommand).build() {
644
- static {
645
- __name(this, "PutObjectCommand");
646
- }
386
+ const de_ObjectNotFoundExceptionRes = async (parsedOutput, context) => {
387
+ const contents = smithyClient.map({});
388
+ const data = parsedOutput.body;
389
+ const doc = smithyClient.take(data, {
390
+ Message: smithyClient.expectString,
391
+ });
392
+ Object.assign(contents, doc);
393
+ const exception = new ObjectNotFoundException({
394
+ $metadata: deserializeMetadata(parsedOutput),
395
+ ...contents,
396
+ });
397
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
647
398
  };
648
-
649
- // src/MediaStoreData.ts
650
- var commands = {
651
- DeleteObjectCommand,
652
- DescribeObjectCommand,
653
- GetObjectCommand,
654
- ListItemsCommand,
655
- PutObjectCommand
399
+ const de_RequestedRangeNotSatisfiableExceptionRes = async (parsedOutput, context) => {
400
+ const contents = smithyClient.map({});
401
+ const data = parsedOutput.body;
402
+ const doc = smithyClient.take(data, {
403
+ Message: smithyClient.expectString,
404
+ });
405
+ Object.assign(contents, doc);
406
+ const exception = new RequestedRangeNotSatisfiableException({
407
+ $metadata: deserializeMetadata(parsedOutput),
408
+ ...contents,
409
+ });
410
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
656
411
  };
657
- var MediaStoreData = class extends MediaStoreDataClient {
658
- static {
659
- __name(this, "MediaStoreData");
660
- }
412
+ const de_Item = (output, context) => {
413
+ return smithyClient.take(output, {
414
+ ContentLength: smithyClient.expectLong,
415
+ ContentType: smithyClient.expectString,
416
+ ETag: smithyClient.expectString,
417
+ LastModified: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
418
+ Name: smithyClient.expectString,
419
+ Type: smithyClient.expectString,
420
+ });
661
421
  };
662
- (0, import_smithy_client.createAggregatedClient)(commands, MediaStoreData);
663
-
664
- // src/pagination/ListItemsPaginator.ts
422
+ const de_ItemList = (output, context) => {
423
+ const retVal = (output || [])
424
+ .filter((e) => e != null)
425
+ .map((entry) => {
426
+ return de_Item(entry);
427
+ });
428
+ return retVal;
429
+ };
430
+ const deserializeMetadata = (output) => ({
431
+ httpStatusCode: output.statusCode,
432
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
433
+ extendedRequestId: output.headers["x-amz-id-2"],
434
+ cfId: output.headers["x-amz-cf-id"],
435
+ });
436
+ const _CC = "CacheControl";
437
+ const _CL = "ContentLength";
438
+ const _CR = "ContentRange";
439
+ const _CT = "ContentType";
440
+ const _ET = "ETag";
441
+ const _LM = "LastModified";
442
+ const _MR = "MaxResults";
443
+ const _NT = "NextToken";
444
+ const _P = "Path";
445
+ const _R = "Range";
446
+ const _SC = "StorageClass";
447
+ const _UA = "UploadAvailability";
448
+ const _cc = "cache-control";
449
+ const _cl = "content-length";
450
+ const _cr = "content-range";
451
+ const _ct = "content-type";
452
+ const _e = "etag";
453
+ const _lm = "last-modified";
454
+ const _r = "range";
455
+ const _xasc = "x-amz-storage-class";
456
+ const _xaua = "x-amz-upload-availability";
457
+
458
+ class DeleteObjectCommand extends smithyClient.Command
459
+ .classBuilder()
460
+ .ep(commonParams)
461
+ .m(function (Command, cs, config, o) {
462
+ return [
463
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
464
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
465
+ ];
466
+ })
467
+ .s("MediaStoreObject_20170901", "DeleteObject", {})
468
+ .n("MediaStoreDataClient", "DeleteObjectCommand")
469
+ .f(void 0, void 0)
470
+ .ser(se_DeleteObjectCommand)
471
+ .de(de_DeleteObjectCommand)
472
+ .build() {
473
+ }
474
+
475
+ class DescribeObjectCommand extends smithyClient.Command
476
+ .classBuilder()
477
+ .ep(commonParams)
478
+ .m(function (Command, cs, config, o) {
479
+ return [
480
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
481
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
482
+ ];
483
+ })
484
+ .s("MediaStoreObject_20170901", "DescribeObject", {})
485
+ .n("MediaStoreDataClient", "DescribeObjectCommand")
486
+ .f(void 0, void 0)
487
+ .ser(se_DescribeObjectCommand)
488
+ .de(de_DescribeObjectCommand)
489
+ .build() {
490
+ }
491
+
492
+ class GetObjectCommand extends smithyClient.Command
493
+ .classBuilder()
494
+ .ep(commonParams)
495
+ .m(function (Command, cs, config, o) {
496
+ return [
497
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
498
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
499
+ ];
500
+ })
501
+ .s("MediaStoreObject_20170901", "GetObject", {})
502
+ .n("MediaStoreDataClient", "GetObjectCommand")
503
+ .f(void 0, GetObjectResponseFilterSensitiveLog)
504
+ .ser(se_GetObjectCommand)
505
+ .de(de_GetObjectCommand)
506
+ .build() {
507
+ }
508
+
509
+ class ListItemsCommand extends smithyClient.Command
510
+ .classBuilder()
511
+ .ep(commonParams)
512
+ .m(function (Command, cs, config, o) {
513
+ return [
514
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
515
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
516
+ ];
517
+ })
518
+ .s("MediaStoreObject_20170901", "ListItems", {})
519
+ .n("MediaStoreDataClient", "ListItemsCommand")
520
+ .f(void 0, void 0)
521
+ .ser(se_ListItemsCommand)
522
+ .de(de_ListItemsCommand)
523
+ .build() {
524
+ }
525
+
526
+ class PutObjectCommand extends smithyClient.Command
527
+ .classBuilder()
528
+ .ep(commonParams)
529
+ .m(function (Command, cs, config, o) {
530
+ return [
531
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
532
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
533
+ ];
534
+ })
535
+ .s("MediaStoreObject_20170901", "PutObject", {})
536
+ .n("MediaStoreDataClient", "PutObjectCommand")
537
+ .f(PutObjectRequestFilterSensitiveLog, void 0)
538
+ .ser(se_PutObjectCommand)
539
+ .de(de_PutObjectCommand)
540
+ .build() {
541
+ }
542
+
543
+ const commands = {
544
+ DeleteObjectCommand,
545
+ DescribeObjectCommand,
546
+ GetObjectCommand,
547
+ ListItemsCommand,
548
+ PutObjectCommand,
549
+ };
550
+ class MediaStoreData extends MediaStoreDataClient {
551
+ }
552
+ smithyClient.createAggregatedClient(commands, MediaStoreData);
665
553
 
666
- var paginateListItems = (0, import_core.createPaginator)(MediaStoreDataClient, ListItemsCommand, "NextToken", "NextToken", "MaxResults");
667
- // Annotate the CommonJS export names for ESM import in node:
554
+ const paginateListItems = core.createPaginator(MediaStoreDataClient, ListItemsCommand, "NextToken", "NextToken", "MaxResults");
668
555
 
669
- 0 && (module.exports = {
670
- MediaStoreDataServiceException,
671
- __Client,
672
- MediaStoreDataClient,
673
- MediaStoreData,
674
- $Command,
675
- DeleteObjectCommand,
676
- DescribeObjectCommand,
677
- GetObjectCommand,
678
- ListItemsCommand,
679
- PutObjectCommand,
680
- paginateListItems,
681
- ContainerNotFoundException,
682
- InternalServerError,
683
- ObjectNotFoundException,
684
- RequestedRangeNotSatisfiableException,
685
- ItemType,
686
- StorageClass,
687
- UploadAvailability,
688
- GetObjectResponseFilterSensitiveLog,
689
- PutObjectRequestFilterSensitiveLog
556
+ Object.defineProperty(exports, "$Command", {
557
+ enumerable: true,
558
+ get: function () { return smithyClient.Command; }
690
559
  });
691
-
560
+ Object.defineProperty(exports, "__Client", {
561
+ enumerable: true,
562
+ get: function () { return smithyClient.Client; }
563
+ });
564
+ exports.ContainerNotFoundException = ContainerNotFoundException;
565
+ exports.DeleteObjectCommand = DeleteObjectCommand;
566
+ exports.DescribeObjectCommand = DescribeObjectCommand;
567
+ exports.GetObjectCommand = GetObjectCommand;
568
+ exports.GetObjectResponseFilterSensitiveLog = GetObjectResponseFilterSensitiveLog;
569
+ exports.InternalServerError = InternalServerError;
570
+ exports.ItemType = ItemType;
571
+ exports.ListItemsCommand = ListItemsCommand;
572
+ exports.MediaStoreData = MediaStoreData;
573
+ exports.MediaStoreDataClient = MediaStoreDataClient;
574
+ exports.MediaStoreDataServiceException = MediaStoreDataServiceException;
575
+ exports.ObjectNotFoundException = ObjectNotFoundException;
576
+ exports.PutObjectCommand = PutObjectCommand;
577
+ exports.PutObjectRequestFilterSensitiveLog = PutObjectRequestFilterSensitiveLog;
578
+ exports.RequestedRangeNotSatisfiableException = RequestedRangeNotSatisfiableException;
579
+ exports.StorageClass = StorageClass;
580
+ exports.UploadAvailability = UploadAvailability;
581
+ exports.paginateListItems = paginateListItems;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mediastore-data",
3
3
  "description": "AWS SDK for JavaScript Mediastore Data Client for Node.js, Browser and React Native",
4
- "version": "3.901.0",
4
+ "version": "3.907.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-mediastore-data",
@@ -22,17 +22,17 @@
22
22
  "dependencies": {
23
23
  "@aws-crypto/sha256-browser": "5.2.0",
24
24
  "@aws-crypto/sha256-js": "5.2.0",
25
- "@aws-sdk/core": "3.901.0",
26
- "@aws-sdk/credential-provider-node": "3.901.0",
25
+ "@aws-sdk/core": "3.907.0",
26
+ "@aws-sdk/credential-provider-node": "3.907.0",
27
27
  "@aws-sdk/middleware-host-header": "3.901.0",
28
28
  "@aws-sdk/middleware-logger": "3.901.0",
29
29
  "@aws-sdk/middleware-recursion-detection": "3.901.0",
30
- "@aws-sdk/middleware-user-agent": "3.901.0",
30
+ "@aws-sdk/middleware-user-agent": "3.907.0",
31
31
  "@aws-sdk/region-config-resolver": "3.901.0",
32
32
  "@aws-sdk/types": "3.901.0",
33
33
  "@aws-sdk/util-endpoints": "3.901.0",
34
- "@aws-sdk/util-user-agent-browser": "3.901.0",
35
- "@aws-sdk/util-user-agent-node": "3.901.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.907.0",
35
+ "@aws-sdk/util-user-agent-node": "3.907.0",
36
36
  "@smithy/config-resolver": "^4.3.0",
37
37
  "@smithy/core": "^3.14.0",
38
38
  "@smithy/fetch-http-handler": "^5.3.0",