@aws-sdk/client-marketplace-agreement 3.489.0 → 3.495.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/dist-cjs/index.js CHANGED
@@ -1,12 +1,807 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MarketplaceAgreementServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./MarketplaceAgreementClient"), exports);
6
- tslib_1.__exportStar(require("./MarketplaceAgreement"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./models"), exports);
10
- require("@aws-sdk/util-endpoints");
11
- var MarketplaceAgreementServiceException_1 = require("./models/MarketplaceAgreementServiceException");
12
- Object.defineProperty(exports, "MarketplaceAgreementServiceException", { enumerable: true, get: function () { return MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException; } });
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 });
10
+ };
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;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var src_exports = {};
23
+ __export(src_exports, {
24
+ AcceptedTerm: () => AcceptedTerm,
25
+ AccessDeniedException: () => AccessDeniedException,
26
+ AgreementStatus: () => AgreementStatus,
27
+ DescribeAgreementCommand: () => DescribeAgreementCommand,
28
+ GetAgreementTermsCommand: () => GetAgreementTermsCommand,
29
+ InternalServerException: () => InternalServerException,
30
+ MarketplaceAgreement: () => MarketplaceAgreement,
31
+ MarketplaceAgreementClient: () => MarketplaceAgreementClient,
32
+ MarketplaceAgreementServiceException: () => MarketplaceAgreementServiceException,
33
+ ResourceNotFoundException: () => ResourceNotFoundException,
34
+ ResourceType: () => ResourceType,
35
+ SearchAgreementsCommand: () => SearchAgreementsCommand,
36
+ SortOrder: () => SortOrder,
37
+ ThrottlingException: () => ThrottlingException,
38
+ ValidationException: () => ValidationException,
39
+ ValidationExceptionReason: () => ValidationExceptionReason,
40
+ __Client: () => import_smithy_client.Client,
41
+ paginateGetAgreementTerms: () => paginateGetAgreementTerms,
42
+ paginateSearchAgreements: () => paginateSearchAgreements
43
+ });
44
+ module.exports = __toCommonJS(src_exports);
45
+
46
+ // src/MarketplaceAgreementClient.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_signing = require("@aws-sdk/middleware-signing");
51
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
52
+ var import_config_resolver = require("@smithy/config-resolver");
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
+
58
+ // src/endpoint/EndpointParameters.ts
59
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
60
+ return {
61
+ ...options,
62
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
63
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
64
+ defaultSigningName: "aws-marketplace"
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" }
72
+ };
73
+
74
+ // src/MarketplaceAgreementClient.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");
81
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
82
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
83
+ const extensionConfiguration = {
84
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
85
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
86
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
87
+ };
88
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
89
+ return {
90
+ ...runtimeConfig,
91
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
92
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
93
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
94
+ };
95
+ }, "resolveRuntimeExtensions");
96
+
97
+ // src/MarketplaceAgreementClient.ts
98
+ var _MarketplaceAgreementClient = class _MarketplaceAgreementClient extends import_smithy_client.Client {
99
+ constructor(...[configuration]) {
100
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
101
+ const _config_1 = resolveClientEndpointParameters(_config_0);
102
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
103
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
104
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
105
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
106
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
107
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
108
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
109
+ super(_config_8);
110
+ this.config = _config_8;
111
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
113
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
114
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
115
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
116
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
117
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
118
+ }
119
+ /**
120
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
121
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
122
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
123
+ */
124
+ destroy() {
125
+ super.destroy();
126
+ }
127
+ };
128
+ __name(_MarketplaceAgreementClient, "MarketplaceAgreementClient");
129
+ var MarketplaceAgreementClient = _MarketplaceAgreementClient;
130
+
131
+ // src/MarketplaceAgreement.ts
132
+
133
+
134
+ // src/commands/DescribeAgreementCommand.ts
135
+
136
+ var import_middleware_serde = require("@smithy/middleware-serde");
137
+
138
+ var import_types = require("@smithy/types");
139
+
140
+ // src/protocols/Aws_json1_0.ts
141
+ var import_core = require("@aws-sdk/core");
142
+
143
+
144
+
145
+ // src/models/MarketplaceAgreementServiceException.ts
146
+
147
+ var _MarketplaceAgreementServiceException = class _MarketplaceAgreementServiceException extends import_smithy_client.ServiceException {
148
+ /**
149
+ * @internal
150
+ */
151
+ constructor(options) {
152
+ super(options);
153
+ Object.setPrototypeOf(this, _MarketplaceAgreementServiceException.prototype);
154
+ }
155
+ };
156
+ __name(_MarketplaceAgreementServiceException, "MarketplaceAgreementServiceException");
157
+ var MarketplaceAgreementServiceException = _MarketplaceAgreementServiceException;
158
+
159
+ // src/models/models_0.ts
160
+ var AcceptedTerm;
161
+ ((AcceptedTerm3) => {
162
+ AcceptedTerm3.visit = /* @__PURE__ */ __name((value, visitor) => {
163
+ if (value.legalTerm !== void 0)
164
+ return visitor.legalTerm(value.legalTerm);
165
+ if (value.supportTerm !== void 0)
166
+ return visitor.supportTerm(value.supportTerm);
167
+ if (value.renewalTerm !== void 0)
168
+ return visitor.renewalTerm(value.renewalTerm);
169
+ if (value.usageBasedPricingTerm !== void 0)
170
+ return visitor.usageBasedPricingTerm(value.usageBasedPricingTerm);
171
+ if (value.configurableUpfrontPricingTerm !== void 0)
172
+ return visitor.configurableUpfrontPricingTerm(value.configurableUpfrontPricingTerm);
173
+ if (value.byolPricingTerm !== void 0)
174
+ return visitor.byolPricingTerm(value.byolPricingTerm);
175
+ if (value.recurringPaymentTerm !== void 0)
176
+ return visitor.recurringPaymentTerm(value.recurringPaymentTerm);
177
+ if (value.validityTerm !== void 0)
178
+ return visitor.validityTerm(value.validityTerm);
179
+ if (value.paymentScheduleTerm !== void 0)
180
+ return visitor.paymentScheduleTerm(value.paymentScheduleTerm);
181
+ if (value.freeTrialPricingTerm !== void 0)
182
+ return visitor.freeTrialPricingTerm(value.freeTrialPricingTerm);
183
+ if (value.fixedUpfrontPricingTerm !== void 0)
184
+ return visitor.fixedUpfrontPricingTerm(value.fixedUpfrontPricingTerm);
185
+ return visitor._(value.$unknown[0], value.$unknown[1]);
186
+ }, "visit");
187
+ })(AcceptedTerm || (AcceptedTerm = {}));
188
+ var _AccessDeniedException = class _AccessDeniedException extends MarketplaceAgreementServiceException {
189
+ /**
190
+ * @internal
191
+ */
192
+ constructor(opts) {
193
+ super({
194
+ name: "AccessDeniedException",
195
+ $fault: "client",
196
+ ...opts
197
+ });
198
+ this.name = "AccessDeniedException";
199
+ this.$fault = "client";
200
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
201
+ this.requestId = opts.requestId;
202
+ }
203
+ };
204
+ __name(_AccessDeniedException, "AccessDeniedException");
205
+ var AccessDeniedException = _AccessDeniedException;
206
+ var AgreementStatus = {
207
+ ACTIVE: "ACTIVE",
208
+ ARCHIVED: "ARCHIVED",
209
+ CANCELLED: "CANCELLED",
210
+ EXPIRED: "EXPIRED",
211
+ RENEWED: "RENEWED",
212
+ REPLACED: "REPLACED",
213
+ ROLLED_BACK: "ROLLED_BACK",
214
+ SUPERSEDED: "SUPERSEDED",
215
+ TERMINATED: "TERMINATED"
216
+ };
217
+ var _InternalServerException = class _InternalServerException extends MarketplaceAgreementServiceException {
218
+ /**
219
+ * @internal
220
+ */
221
+ constructor(opts) {
222
+ super({
223
+ name: "InternalServerException",
224
+ $fault: "server",
225
+ ...opts
226
+ });
227
+ this.name = "InternalServerException";
228
+ this.$fault = "server";
229
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
230
+ this.requestId = opts.requestId;
231
+ }
232
+ };
233
+ __name(_InternalServerException, "InternalServerException");
234
+ var InternalServerException = _InternalServerException;
235
+ var ResourceType = {
236
+ AGREEMENT: "Agreement"
237
+ };
238
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends MarketplaceAgreementServiceException {
239
+ /**
240
+ * @internal
241
+ */
242
+ constructor(opts) {
243
+ super({
244
+ name: "ResourceNotFoundException",
245
+ $fault: "client",
246
+ ...opts
247
+ });
248
+ this.name = "ResourceNotFoundException";
249
+ this.$fault = "client";
250
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
251
+ this.requestId = opts.requestId;
252
+ this.resourceId = opts.resourceId;
253
+ this.resourceType = opts.resourceType;
254
+ }
255
+ };
256
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
257
+ var ResourceNotFoundException = _ResourceNotFoundException;
258
+ var _ThrottlingException = class _ThrottlingException extends MarketplaceAgreementServiceException {
259
+ /**
260
+ * @internal
261
+ */
262
+ constructor(opts) {
263
+ super({
264
+ name: "ThrottlingException",
265
+ $fault: "client",
266
+ ...opts
267
+ });
268
+ this.name = "ThrottlingException";
269
+ this.$fault = "client";
270
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
271
+ this.requestId = opts.requestId;
272
+ }
273
+ };
274
+ __name(_ThrottlingException, "ThrottlingException");
275
+ var ThrottlingException = _ThrottlingException;
276
+ var ValidationExceptionReason = {
277
+ INVALID_AGREEMENT_ID: "INVALID_AGREEMENT_ID",
278
+ INVALID_CATALOG: "INVALID_CATALOG",
279
+ INVALID_FILTER_NAME: "INVALID_FILTER_NAME",
280
+ INVALID_FILTER_VALUES: "INVALID_FILTER_VALUES",
281
+ INVALID_MAX_RESULTS: "INVALID_MAX_RESULTS",
282
+ INVALID_NEXT_TOKEN: "INVALID_NEXT_TOKEN",
283
+ INVALID_SORT_BY: "INVALID_SORT_BY",
284
+ INVALID_SORT_ORDER: "INVALID_SORT_ORDER",
285
+ MISSING_AGREEMENT_ID: "MISSING_AGREEMENT_ID",
286
+ OTHER: "OTHER",
287
+ UNSUPPORTED_FILTERS: "UNSUPPORTED_FILTERS"
288
+ };
289
+ var _ValidationException = class _ValidationException extends MarketplaceAgreementServiceException {
290
+ /**
291
+ * @internal
292
+ */
293
+ constructor(opts) {
294
+ super({
295
+ name: "ValidationException",
296
+ $fault: "client",
297
+ ...opts
298
+ });
299
+ this.name = "ValidationException";
300
+ this.$fault = "client";
301
+ Object.setPrototypeOf(this, _ValidationException.prototype);
302
+ this.requestId = opts.requestId;
303
+ this.reason = opts.reason;
304
+ this.fields = opts.fields;
305
+ }
306
+ };
307
+ __name(_ValidationException, "ValidationException");
308
+ var ValidationException = _ValidationException;
309
+ var SortOrder = {
310
+ ASCENDING: "ASCENDING",
311
+ DESCENDING: "DESCENDING"
312
+ };
313
+
314
+ // src/protocols/Aws_json1_0.ts
315
+ var se_DescribeAgreementCommand = /* @__PURE__ */ __name(async (input, context) => {
316
+ const headers = sharedHeaders("DescribeAgreement");
317
+ let body;
318
+ body = JSON.stringify((0, import_smithy_client._json)(input));
319
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
320
+ }, "se_DescribeAgreementCommand");
321
+ var se_GetAgreementTermsCommand = /* @__PURE__ */ __name(async (input, context) => {
322
+ const headers = sharedHeaders("GetAgreementTerms");
323
+ let body;
324
+ body = JSON.stringify((0, import_smithy_client._json)(input));
325
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
326
+ }, "se_GetAgreementTermsCommand");
327
+ var se_SearchAgreementsCommand = /* @__PURE__ */ __name(async (input, context) => {
328
+ const headers = sharedHeaders("SearchAgreements");
329
+ let body;
330
+ body = JSON.stringify((0, import_smithy_client._json)(input));
331
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
332
+ }, "se_SearchAgreementsCommand");
333
+ var de_DescribeAgreementCommand = /* @__PURE__ */ __name(async (output, context) => {
334
+ if (output.statusCode >= 300) {
335
+ return de_DescribeAgreementCommandError(output, context);
336
+ }
337
+ const data = await parseBody(output.body, context);
338
+ let contents = {};
339
+ contents = de_DescribeAgreementOutput(data, context);
340
+ const response = {
341
+ $metadata: deserializeMetadata(output),
342
+ ...contents
343
+ };
344
+ return response;
345
+ }, "de_DescribeAgreementCommand");
346
+ var de_DescribeAgreementCommandError = /* @__PURE__ */ __name(async (output, context) => {
347
+ const parsedOutput = {
348
+ ...output,
349
+ body: await parseErrorBody(output.body, context)
350
+ };
351
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
352
+ switch (errorCode) {
353
+ case "AccessDeniedException":
354
+ case "com.amazonaws.marketplaceagreement#AccessDeniedException":
355
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
356
+ case "InternalServerException":
357
+ case "com.amazonaws.marketplaceagreement#InternalServerException":
358
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
359
+ case "ResourceNotFoundException":
360
+ case "com.amazonaws.marketplaceagreement#ResourceNotFoundException":
361
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
362
+ case "ThrottlingException":
363
+ case "com.amazonaws.marketplaceagreement#ThrottlingException":
364
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
365
+ case "ValidationException":
366
+ case "com.amazonaws.marketplaceagreement#ValidationException":
367
+ throw await de_ValidationExceptionRes(parsedOutput, context);
368
+ default:
369
+ const parsedBody = parsedOutput.body;
370
+ return throwDefaultError({
371
+ output,
372
+ parsedBody,
373
+ errorCode
374
+ });
375
+ }
376
+ }, "de_DescribeAgreementCommandError");
377
+ var de_GetAgreementTermsCommand = /* @__PURE__ */ __name(async (output, context) => {
378
+ if (output.statusCode >= 300) {
379
+ return de_GetAgreementTermsCommandError(output, context);
380
+ }
381
+ const data = await parseBody(output.body, context);
382
+ let contents = {};
383
+ contents = de_GetAgreementTermsOutput(data, context);
384
+ const response = {
385
+ $metadata: deserializeMetadata(output),
386
+ ...contents
387
+ };
388
+ return response;
389
+ }, "de_GetAgreementTermsCommand");
390
+ var de_GetAgreementTermsCommandError = /* @__PURE__ */ __name(async (output, context) => {
391
+ const parsedOutput = {
392
+ ...output,
393
+ body: await parseErrorBody(output.body, context)
394
+ };
395
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
396
+ switch (errorCode) {
397
+ case "AccessDeniedException":
398
+ case "com.amazonaws.marketplaceagreement#AccessDeniedException":
399
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
400
+ case "InternalServerException":
401
+ case "com.amazonaws.marketplaceagreement#InternalServerException":
402
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
403
+ case "ResourceNotFoundException":
404
+ case "com.amazonaws.marketplaceagreement#ResourceNotFoundException":
405
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
406
+ case "ThrottlingException":
407
+ case "com.amazonaws.marketplaceagreement#ThrottlingException":
408
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
409
+ case "ValidationException":
410
+ case "com.amazonaws.marketplaceagreement#ValidationException":
411
+ throw await de_ValidationExceptionRes(parsedOutput, context);
412
+ default:
413
+ const parsedBody = parsedOutput.body;
414
+ return throwDefaultError({
415
+ output,
416
+ parsedBody,
417
+ errorCode
418
+ });
419
+ }
420
+ }, "de_GetAgreementTermsCommandError");
421
+ var de_SearchAgreementsCommand = /* @__PURE__ */ __name(async (output, context) => {
422
+ if (output.statusCode >= 300) {
423
+ return de_SearchAgreementsCommandError(output, context);
424
+ }
425
+ const data = await parseBody(output.body, context);
426
+ let contents = {};
427
+ contents = de_SearchAgreementsOutput(data, context);
428
+ const response = {
429
+ $metadata: deserializeMetadata(output),
430
+ ...contents
431
+ };
432
+ return response;
433
+ }, "de_SearchAgreementsCommand");
434
+ var de_SearchAgreementsCommandError = /* @__PURE__ */ __name(async (output, context) => {
435
+ const parsedOutput = {
436
+ ...output,
437
+ body: await parseErrorBody(output.body, context)
438
+ };
439
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
440
+ switch (errorCode) {
441
+ case "AccessDeniedException":
442
+ case "com.amazonaws.marketplaceagreement#AccessDeniedException":
443
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
444
+ case "InternalServerException":
445
+ case "com.amazonaws.marketplaceagreement#InternalServerException":
446
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
447
+ case "ThrottlingException":
448
+ case "com.amazonaws.marketplaceagreement#ThrottlingException":
449
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
450
+ case "ValidationException":
451
+ case "com.amazonaws.marketplaceagreement#ValidationException":
452
+ throw await de_ValidationExceptionRes(parsedOutput, context);
453
+ default:
454
+ const parsedBody = parsedOutput.body;
455
+ return throwDefaultError({
456
+ output,
457
+ parsedBody,
458
+ errorCode
459
+ });
460
+ }
461
+ }, "de_SearchAgreementsCommandError");
462
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
463
+ const body = parsedOutput.body;
464
+ const deserialized = (0, import_smithy_client._json)(body);
465
+ const exception = new AccessDeniedException({
466
+ $metadata: deserializeMetadata(parsedOutput),
467
+ ...deserialized
468
+ });
469
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
470
+ }, "de_AccessDeniedExceptionRes");
471
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
472
+ const body = parsedOutput.body;
473
+ const deserialized = (0, import_smithy_client._json)(body);
474
+ const exception = new InternalServerException({
475
+ $metadata: deserializeMetadata(parsedOutput),
476
+ ...deserialized
477
+ });
478
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
479
+ }, "de_InternalServerExceptionRes");
480
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
481
+ const body = parsedOutput.body;
482
+ const deserialized = (0, import_smithy_client._json)(body);
483
+ const exception = new ResourceNotFoundException({
484
+ $metadata: deserializeMetadata(parsedOutput),
485
+ ...deserialized
486
+ });
487
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
488
+ }, "de_ResourceNotFoundExceptionRes");
489
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
490
+ const body = parsedOutput.body;
491
+ const deserialized = (0, import_smithy_client._json)(body);
492
+ const exception = new ThrottlingException({
493
+ $metadata: deserializeMetadata(parsedOutput),
494
+ ...deserialized
495
+ });
496
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
497
+ }, "de_ThrottlingExceptionRes");
498
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
499
+ const body = parsedOutput.body;
500
+ const deserialized = (0, import_smithy_client._json)(body);
501
+ const exception = new ValidationException({
502
+ $metadata: deserializeMetadata(parsedOutput),
503
+ ...deserialized
504
+ });
505
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
506
+ }, "de_ValidationExceptionRes");
507
+ var de_AcceptedTerm = /* @__PURE__ */ __name((output, context) => {
508
+ if (output.byolPricingTerm != null) {
509
+ return {
510
+ byolPricingTerm: (0, import_smithy_client._json)(output.byolPricingTerm)
511
+ };
512
+ }
513
+ if (output.configurableUpfrontPricingTerm != null) {
514
+ return {
515
+ configurableUpfrontPricingTerm: (0, import_smithy_client._json)(output.configurableUpfrontPricingTerm)
516
+ };
517
+ }
518
+ if (output.fixedUpfrontPricingTerm != null) {
519
+ return {
520
+ fixedUpfrontPricingTerm: (0, import_smithy_client._json)(output.fixedUpfrontPricingTerm)
521
+ };
522
+ }
523
+ if (output.freeTrialPricingTerm != null) {
524
+ return {
525
+ freeTrialPricingTerm: (0, import_smithy_client._json)(output.freeTrialPricingTerm)
526
+ };
527
+ }
528
+ if (output.legalTerm != null) {
529
+ return {
530
+ legalTerm: (0, import_smithy_client._json)(output.legalTerm)
531
+ };
532
+ }
533
+ if (output.paymentScheduleTerm != null) {
534
+ return {
535
+ paymentScheduleTerm: de_PaymentScheduleTerm(output.paymentScheduleTerm, context)
536
+ };
537
+ }
538
+ if (output.recurringPaymentTerm != null) {
539
+ return {
540
+ recurringPaymentTerm: (0, import_smithy_client._json)(output.recurringPaymentTerm)
541
+ };
542
+ }
543
+ if (output.renewalTerm != null) {
544
+ return {
545
+ renewalTerm: (0, import_smithy_client._json)(output.renewalTerm)
546
+ };
547
+ }
548
+ if (output.supportTerm != null) {
549
+ return {
550
+ supportTerm: (0, import_smithy_client._json)(output.supportTerm)
551
+ };
552
+ }
553
+ if (output.usageBasedPricingTerm != null) {
554
+ return {
555
+ usageBasedPricingTerm: (0, import_smithy_client._json)(output.usageBasedPricingTerm)
556
+ };
557
+ }
558
+ if (output.validityTerm != null) {
559
+ return {
560
+ validityTerm: de_ValidityTerm(output.validityTerm, context)
561
+ };
562
+ }
563
+ return { $unknown: Object.entries(output)[0] };
564
+ }, "de_AcceptedTerm");
565
+ var de_AcceptedTermList = /* @__PURE__ */ __name((output, context) => {
566
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
567
+ return de_AcceptedTerm((0, import_core.awsExpectUnion)(entry), context);
568
+ });
569
+ return retVal;
570
+ }, "de_AcceptedTermList");
571
+ var de_AgreementViewSummary = /* @__PURE__ */ __name((output, context) => {
572
+ return (0, import_smithy_client.take)(output, {
573
+ acceptanceTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
574
+ acceptor: import_smithy_client._json,
575
+ agreementId: import_smithy_client.expectString,
576
+ agreementType: import_smithy_client.expectString,
577
+ endTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
578
+ proposalSummary: import_smithy_client._json,
579
+ proposer: import_smithy_client._json,
580
+ startTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
581
+ status: import_smithy_client.expectString
582
+ });
583
+ }, "de_AgreementViewSummary");
584
+ var de_AgreementViewSummaryList = /* @__PURE__ */ __name((output, context) => {
585
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
586
+ return de_AgreementViewSummary(entry, context);
587
+ });
588
+ return retVal;
589
+ }, "de_AgreementViewSummaryList");
590
+ var de_DescribeAgreementOutput = /* @__PURE__ */ __name((output, context) => {
591
+ return (0, import_smithy_client.take)(output, {
592
+ acceptanceTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
593
+ acceptor: import_smithy_client._json,
594
+ agreementId: import_smithy_client.expectString,
595
+ agreementType: import_smithy_client.expectString,
596
+ endTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
597
+ estimatedCharges: import_smithy_client._json,
598
+ proposalSummary: import_smithy_client._json,
599
+ proposer: import_smithy_client._json,
600
+ startTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
601
+ status: import_smithy_client.expectString
602
+ });
603
+ }, "de_DescribeAgreementOutput");
604
+ var de_GetAgreementTermsOutput = /* @__PURE__ */ __name((output, context) => {
605
+ return (0, import_smithy_client.take)(output, {
606
+ acceptedTerms: (_) => de_AcceptedTermList(_, context),
607
+ nextToken: import_smithy_client.expectString
608
+ });
609
+ }, "de_GetAgreementTermsOutput");
610
+ var de_PaymentScheduleTerm = /* @__PURE__ */ __name((output, context) => {
611
+ return (0, import_smithy_client.take)(output, {
612
+ currencyCode: import_smithy_client.expectString,
613
+ schedule: (_) => de_ScheduleList(_, context),
614
+ type: import_smithy_client.expectString
615
+ });
616
+ }, "de_PaymentScheduleTerm");
617
+ var de_ScheduleItem = /* @__PURE__ */ __name((output, context) => {
618
+ return (0, import_smithy_client.take)(output, {
619
+ chargeAmount: import_smithy_client.expectString,
620
+ chargeDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_)))
621
+ });
622
+ }, "de_ScheduleItem");
623
+ var de_ScheduleList = /* @__PURE__ */ __name((output, context) => {
624
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
625
+ return de_ScheduleItem(entry, context);
626
+ });
627
+ return retVal;
628
+ }, "de_ScheduleList");
629
+ var de_SearchAgreementsOutput = /* @__PURE__ */ __name((output, context) => {
630
+ return (0, import_smithy_client.take)(output, {
631
+ agreementViewSummaries: (_) => de_AgreementViewSummaryList(_, context),
632
+ nextToken: import_smithy_client.expectString
633
+ });
634
+ }, "de_SearchAgreementsOutput");
635
+ var de_ValidityTerm = /* @__PURE__ */ __name((output, context) => {
636
+ return (0, import_smithy_client.take)(output, {
637
+ agreementDuration: import_smithy_client.expectString,
638
+ agreementEndDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
639
+ agreementStartDate: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))),
640
+ type: import_smithy_client.expectString
641
+ });
642
+ }, "de_ValidityTerm");
643
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
644
+ httpStatusCode: output.statusCode,
645
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
646
+ extendedRequestId: output.headers["x-amz-id-2"],
647
+ cfId: output.headers["x-amz-cf-id"]
648
+ }), "deserializeMetadata");
649
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
650
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(MarketplaceAgreementServiceException);
651
+ var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
652
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
653
+ const contents = {
654
+ protocol,
655
+ hostname,
656
+ port,
657
+ method: "POST",
658
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
659
+ headers
660
+ };
661
+ if (resolvedHostname !== void 0) {
662
+ contents.hostname = resolvedHostname;
663
+ }
664
+ if (body !== void 0) {
665
+ contents.body = body;
666
+ }
667
+ return new import_protocol_http.HttpRequest(contents);
668
+ }, "buildHttpRpcRequest");
669
+ function sharedHeaders(operation) {
670
+ return {
671
+ "content-type": "application/x-amz-json-1.0",
672
+ "x-amz-target": `AWSMPCommerceService_v20200301.${operation}`
673
+ };
674
+ }
675
+ __name(sharedHeaders, "sharedHeaders");
676
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
677
+ if (encoded.length) {
678
+ return JSON.parse(encoded);
679
+ }
680
+ return {};
681
+ }), "parseBody");
682
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
683
+ const value = await parseBody(errorBody, context);
684
+ value.message = value.message ?? value.Message;
685
+ return value;
686
+ }, "parseErrorBody");
687
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
688
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
689
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
690
+ let cleanValue = rawValue;
691
+ if (typeof cleanValue === "number") {
692
+ cleanValue = cleanValue.toString();
693
+ }
694
+ if (cleanValue.indexOf(",") >= 0) {
695
+ cleanValue = cleanValue.split(",")[0];
696
+ }
697
+ if (cleanValue.indexOf(":") >= 0) {
698
+ cleanValue = cleanValue.split(":")[0];
699
+ }
700
+ if (cleanValue.indexOf("#") >= 0) {
701
+ cleanValue = cleanValue.split("#")[1];
702
+ }
703
+ return cleanValue;
704
+ }, "sanitizeErrorCode");
705
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
706
+ if (headerKey !== void 0) {
707
+ return sanitizeErrorCode(output.headers[headerKey]);
708
+ }
709
+ if (data.code !== void 0) {
710
+ return sanitizeErrorCode(data.code);
711
+ }
712
+ if (data["__type"] !== void 0) {
713
+ return sanitizeErrorCode(data["__type"]);
714
+ }
715
+ }, "loadRestJsonErrorCode");
716
+
717
+ // src/commands/DescribeAgreementCommand.ts
718
+ var _DescribeAgreementCommand = class _DescribeAgreementCommand extends import_smithy_client.Command.classBuilder().ep({
719
+ ...commonParams
720
+ }).m(function(Command, cs, config, o) {
721
+ return [
722
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
723
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
724
+ ];
725
+ }).s("AWSMPCommerceService_v20200301", "DescribeAgreement", {}).n("MarketplaceAgreementClient", "DescribeAgreementCommand").f(void 0, void 0).ser(se_DescribeAgreementCommand).de(de_DescribeAgreementCommand).build() {
726
+ };
727
+ __name(_DescribeAgreementCommand, "DescribeAgreementCommand");
728
+ var DescribeAgreementCommand = _DescribeAgreementCommand;
729
+
730
+ // src/commands/GetAgreementTermsCommand.ts
731
+
732
+
733
+
734
+
735
+ var _GetAgreementTermsCommand = class _GetAgreementTermsCommand extends import_smithy_client.Command.classBuilder().ep({
736
+ ...commonParams
737
+ }).m(function(Command, cs, config, o) {
738
+ return [
739
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
740
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
741
+ ];
742
+ }).s("AWSMPCommerceService_v20200301", "GetAgreementTerms", {}).n("MarketplaceAgreementClient", "GetAgreementTermsCommand").f(void 0, void 0).ser(se_GetAgreementTermsCommand).de(de_GetAgreementTermsCommand).build() {
743
+ };
744
+ __name(_GetAgreementTermsCommand, "GetAgreementTermsCommand");
745
+ var GetAgreementTermsCommand = _GetAgreementTermsCommand;
746
+
747
+ // src/commands/SearchAgreementsCommand.ts
748
+
749
+
750
+
751
+
752
+ var _SearchAgreementsCommand = class _SearchAgreementsCommand extends import_smithy_client.Command.classBuilder().ep({
753
+ ...commonParams
754
+ }).m(function(Command, cs, config, o) {
755
+ return [
756
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
757
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
758
+ ];
759
+ }).s("AWSMPCommerceService_v20200301", "SearchAgreements", {}).n("MarketplaceAgreementClient", "SearchAgreementsCommand").f(void 0, void 0).ser(se_SearchAgreementsCommand).de(de_SearchAgreementsCommand).build() {
760
+ };
761
+ __name(_SearchAgreementsCommand, "SearchAgreementsCommand");
762
+ var SearchAgreementsCommand = _SearchAgreementsCommand;
763
+
764
+ // src/MarketplaceAgreement.ts
765
+ var commands = {
766
+ DescribeAgreementCommand,
767
+ GetAgreementTermsCommand,
768
+ SearchAgreementsCommand
769
+ };
770
+ var _MarketplaceAgreement = class _MarketplaceAgreement extends MarketplaceAgreementClient {
771
+ };
772
+ __name(_MarketplaceAgreement, "MarketplaceAgreement");
773
+ var MarketplaceAgreement = _MarketplaceAgreement;
774
+ (0, import_smithy_client.createAggregatedClient)(commands, MarketplaceAgreement);
775
+
776
+ // src/pagination/GetAgreementTermsPaginator.ts
777
+ var import_core2 = require("@smithy/core");
778
+ var paginateGetAgreementTerms = (0, import_core2.createPaginator)(MarketplaceAgreementClient, GetAgreementTermsCommand, "nextToken", "nextToken", "maxResults");
779
+
780
+ // src/pagination/SearchAgreementsPaginator.ts
781
+ var import_core3 = require("@smithy/core");
782
+ var paginateSearchAgreements = (0, import_core3.createPaginator)(MarketplaceAgreementClient, SearchAgreementsCommand, "nextToken", "nextToken", "maxResults");
783
+
784
+ // src/index.ts
785
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
786
+ // Annotate the CommonJS export names for ESM import in node:
787
+ 0 && (module.exports = {
788
+ AcceptedTerm,
789
+ AccessDeniedException,
790
+ AgreementStatus,
791
+ DescribeAgreementCommand,
792
+ GetAgreementTermsCommand,
793
+ InternalServerException,
794
+ MarketplaceAgreement,
795
+ MarketplaceAgreementClient,
796
+ MarketplaceAgreementServiceException,
797
+ ResourceNotFoundException,
798
+ ResourceType,
799
+ SearchAgreementsCommand,
800
+ SortOrder,
801
+ ThrottlingException,
802
+ ValidationException,
803
+ ValidationExceptionReason,
804
+ __Client,
805
+ paginateGetAgreementTerms,
806
+ paginateSearchAgreements
807
+ });