@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.
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MarketplaceAgreementServiceException = exports.__ServiceException = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
- class MarketplaceAgreementServiceException extends smithy_client_1.ServiceException {
7
- constructor(options) {
8
- super(options);
9
- Object.setPrototypeOf(this, MarketplaceAgreementServiceException.prototype);
10
- }
11
- }
12
- exports.MarketplaceAgreementServiceException = MarketplaceAgreementServiceException;
1
+ module.exports = require("../index.js");
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./models_0"), exports);
1
+ module.exports = require("../index.js");
@@ -1,137 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SortOrder = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ResourceNotFoundException = exports.ResourceType = exports.InternalServerException = exports.AgreementStatus = exports.AccessDeniedException = exports.AcceptedTerm = void 0;
4
- const MarketplaceAgreementServiceException_1 = require("./MarketplaceAgreementServiceException");
5
- var AcceptedTerm;
6
- (function (AcceptedTerm) {
7
- AcceptedTerm.visit = (value, visitor) => {
8
- if (value.legalTerm !== undefined)
9
- return visitor.legalTerm(value.legalTerm);
10
- if (value.supportTerm !== undefined)
11
- return visitor.supportTerm(value.supportTerm);
12
- if (value.renewalTerm !== undefined)
13
- return visitor.renewalTerm(value.renewalTerm);
14
- if (value.usageBasedPricingTerm !== undefined)
15
- return visitor.usageBasedPricingTerm(value.usageBasedPricingTerm);
16
- if (value.configurableUpfrontPricingTerm !== undefined)
17
- return visitor.configurableUpfrontPricingTerm(value.configurableUpfrontPricingTerm);
18
- if (value.byolPricingTerm !== undefined)
19
- return visitor.byolPricingTerm(value.byolPricingTerm);
20
- if (value.recurringPaymentTerm !== undefined)
21
- return visitor.recurringPaymentTerm(value.recurringPaymentTerm);
22
- if (value.validityTerm !== undefined)
23
- return visitor.validityTerm(value.validityTerm);
24
- if (value.paymentScheduleTerm !== undefined)
25
- return visitor.paymentScheduleTerm(value.paymentScheduleTerm);
26
- if (value.freeTrialPricingTerm !== undefined)
27
- return visitor.freeTrialPricingTerm(value.freeTrialPricingTerm);
28
- if (value.fixedUpfrontPricingTerm !== undefined)
29
- return visitor.fixedUpfrontPricingTerm(value.fixedUpfrontPricingTerm);
30
- return visitor._(value.$unknown[0], value.$unknown[1]);
31
- };
32
- })(AcceptedTerm = exports.AcceptedTerm || (exports.AcceptedTerm = {}));
33
- class AccessDeniedException extends MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException {
34
- constructor(opts) {
35
- super({
36
- name: "AccessDeniedException",
37
- $fault: "client",
38
- ...opts,
39
- });
40
- this.name = "AccessDeniedException";
41
- this.$fault = "client";
42
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
43
- this.requestId = opts.requestId;
44
- }
45
- }
46
- exports.AccessDeniedException = AccessDeniedException;
47
- exports.AgreementStatus = {
48
- ACTIVE: "ACTIVE",
49
- ARCHIVED: "ARCHIVED",
50
- CANCELLED: "CANCELLED",
51
- EXPIRED: "EXPIRED",
52
- RENEWED: "RENEWED",
53
- REPLACED: "REPLACED",
54
- ROLLED_BACK: "ROLLED_BACK",
55
- SUPERSEDED: "SUPERSEDED",
56
- TERMINATED: "TERMINATED",
57
- };
58
- class InternalServerException extends MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException {
59
- constructor(opts) {
60
- super({
61
- name: "InternalServerException",
62
- $fault: "server",
63
- ...opts,
64
- });
65
- this.name = "InternalServerException";
66
- this.$fault = "server";
67
- Object.setPrototypeOf(this, InternalServerException.prototype);
68
- this.requestId = opts.requestId;
69
- }
70
- }
71
- exports.InternalServerException = InternalServerException;
72
- exports.ResourceType = {
73
- AGREEMENT: "Agreement",
74
- };
75
- class ResourceNotFoundException extends MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException {
76
- constructor(opts) {
77
- super({
78
- name: "ResourceNotFoundException",
79
- $fault: "client",
80
- ...opts,
81
- });
82
- this.name = "ResourceNotFoundException";
83
- this.$fault = "client";
84
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
85
- this.requestId = opts.requestId;
86
- this.resourceId = opts.resourceId;
87
- this.resourceType = opts.resourceType;
88
- }
89
- }
90
- exports.ResourceNotFoundException = ResourceNotFoundException;
91
- class ThrottlingException extends MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException {
92
- constructor(opts) {
93
- super({
94
- name: "ThrottlingException",
95
- $fault: "client",
96
- ...opts,
97
- });
98
- this.name = "ThrottlingException";
99
- this.$fault = "client";
100
- Object.setPrototypeOf(this, ThrottlingException.prototype);
101
- this.requestId = opts.requestId;
102
- }
103
- }
104
- exports.ThrottlingException = ThrottlingException;
105
- exports.ValidationExceptionReason = {
106
- INVALID_AGREEMENT_ID: "INVALID_AGREEMENT_ID",
107
- INVALID_CATALOG: "INVALID_CATALOG",
108
- INVALID_FILTER_NAME: "INVALID_FILTER_NAME",
109
- INVALID_FILTER_VALUES: "INVALID_FILTER_VALUES",
110
- INVALID_MAX_RESULTS: "INVALID_MAX_RESULTS",
111
- INVALID_NEXT_TOKEN: "INVALID_NEXT_TOKEN",
112
- INVALID_SORT_BY: "INVALID_SORT_BY",
113
- INVALID_SORT_ORDER: "INVALID_SORT_ORDER",
114
- MISSING_AGREEMENT_ID: "MISSING_AGREEMENT_ID",
115
- OTHER: "OTHER",
116
- UNSUPPORTED_FILTERS: "UNSUPPORTED_FILTERS",
117
- };
118
- class ValidationException extends MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException {
119
- constructor(opts) {
120
- super({
121
- name: "ValidationException",
122
- $fault: "client",
123
- ...opts,
124
- });
125
- this.name = "ValidationException";
126
- this.$fault = "client";
127
- Object.setPrototypeOf(this, ValidationException.prototype);
128
- this.requestId = opts.requestId;
129
- this.reason = opts.reason;
130
- this.fields = opts.fields;
131
- }
132
- }
133
- exports.ValidationException = ValidationException;
134
- exports.SortOrder = {
135
- ASCENDING: "ASCENDING",
136
- DESCENDING: "DESCENDING",
137
- };
1
+ module.exports = require("../index.js");
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.paginateGetAgreementTerms = void 0;
4
- const core_1 = require("@smithy/core");
5
- const GetAgreementTermsCommand_1 = require("../commands/GetAgreementTermsCommand");
6
- const MarketplaceAgreementClient_1 = require("../MarketplaceAgreementClient");
7
- exports.paginateGetAgreementTerms = (0, core_1.createPaginator)(MarketplaceAgreementClient_1.MarketplaceAgreementClient, GetAgreementTermsCommand_1.GetAgreementTermsCommand, "nextToken", "nextToken", "maxResults");
1
+ module.exports = require("../index.js");
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ module.exports = require("../index.js");
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.paginateSearchAgreements = void 0;
4
- const core_1 = require("@smithy/core");
5
- const SearchAgreementsCommand_1 = require("../commands/SearchAgreementsCommand");
6
- const MarketplaceAgreementClient_1 = require("../MarketplaceAgreementClient");
7
- exports.paginateSearchAgreements = (0, core_1.createPaginator)(MarketplaceAgreementClient_1.MarketplaceAgreementClient, SearchAgreementsCommand_1.SearchAgreementsCommand, "nextToken", "nextToken", "maxResults");
1
+ module.exports = require("../index.js");
@@ -1,6 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./GetAgreementTermsPaginator"), exports);
5
- tslib_1.__exportStar(require("./Interfaces"), exports);
6
- tslib_1.__exportStar(require("./SearchAgreementsPaginator"), exports);
1
+ module.exports = require("../index.js");
@@ -1,420 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_SearchAgreementsCommand = exports.de_GetAgreementTermsCommand = exports.de_DescribeAgreementCommand = exports.se_SearchAgreementsCommand = exports.se_GetAgreementTermsCommand = exports.se_DescribeAgreementCommand = void 0;
4
- const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const MarketplaceAgreementServiceException_1 = require("../models/MarketplaceAgreementServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_DescribeAgreementCommand = async (input, context) => {
10
- const headers = sharedHeaders("DescribeAgreement");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_DescribeAgreementCommand = se_DescribeAgreementCommand;
16
- const se_GetAgreementTermsCommand = async (input, context) => {
17
- const headers = sharedHeaders("GetAgreementTerms");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_GetAgreementTermsCommand = se_GetAgreementTermsCommand;
23
- const se_SearchAgreementsCommand = async (input, context) => {
24
- const headers = sharedHeaders("SearchAgreements");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_SearchAgreementsCommand = se_SearchAgreementsCommand;
30
- const de_DescribeAgreementCommand = async (output, context) => {
31
- if (output.statusCode >= 300) {
32
- return de_DescribeAgreementCommandError(output, context);
33
- }
34
- const data = await parseBody(output.body, context);
35
- let contents = {};
36
- contents = de_DescribeAgreementOutput(data, context);
37
- const response = {
38
- $metadata: deserializeMetadata(output),
39
- ...contents,
40
- };
41
- return response;
42
- };
43
- exports.de_DescribeAgreementCommand = de_DescribeAgreementCommand;
44
- const de_DescribeAgreementCommandError = async (output, context) => {
45
- const parsedOutput = {
46
- ...output,
47
- body: await parseErrorBody(output.body, context),
48
- };
49
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
50
- switch (errorCode) {
51
- case "AccessDeniedException":
52
- case "com.amazonaws.marketplaceagreement#AccessDeniedException":
53
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
54
- case "InternalServerException":
55
- case "com.amazonaws.marketplaceagreement#InternalServerException":
56
- throw await de_InternalServerExceptionRes(parsedOutput, context);
57
- case "ResourceNotFoundException":
58
- case "com.amazonaws.marketplaceagreement#ResourceNotFoundException":
59
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
60
- case "ThrottlingException":
61
- case "com.amazonaws.marketplaceagreement#ThrottlingException":
62
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
63
- case "ValidationException":
64
- case "com.amazonaws.marketplaceagreement#ValidationException":
65
- throw await de_ValidationExceptionRes(parsedOutput, context);
66
- default:
67
- const parsedBody = parsedOutput.body;
68
- return throwDefaultError({
69
- output,
70
- parsedBody,
71
- errorCode,
72
- });
73
- }
74
- };
75
- const de_GetAgreementTermsCommand = async (output, context) => {
76
- if (output.statusCode >= 300) {
77
- return de_GetAgreementTermsCommandError(output, context);
78
- }
79
- const data = await parseBody(output.body, context);
80
- let contents = {};
81
- contents = de_GetAgreementTermsOutput(data, context);
82
- const response = {
83
- $metadata: deserializeMetadata(output),
84
- ...contents,
85
- };
86
- return response;
87
- };
88
- exports.de_GetAgreementTermsCommand = de_GetAgreementTermsCommand;
89
- const de_GetAgreementTermsCommandError = async (output, context) => {
90
- const parsedOutput = {
91
- ...output,
92
- body: await parseErrorBody(output.body, context),
93
- };
94
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
95
- switch (errorCode) {
96
- case "AccessDeniedException":
97
- case "com.amazonaws.marketplaceagreement#AccessDeniedException":
98
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
99
- case "InternalServerException":
100
- case "com.amazonaws.marketplaceagreement#InternalServerException":
101
- throw await de_InternalServerExceptionRes(parsedOutput, context);
102
- case "ResourceNotFoundException":
103
- case "com.amazonaws.marketplaceagreement#ResourceNotFoundException":
104
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
105
- case "ThrottlingException":
106
- case "com.amazonaws.marketplaceagreement#ThrottlingException":
107
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
108
- case "ValidationException":
109
- case "com.amazonaws.marketplaceagreement#ValidationException":
110
- throw await de_ValidationExceptionRes(parsedOutput, context);
111
- default:
112
- const parsedBody = parsedOutput.body;
113
- return throwDefaultError({
114
- output,
115
- parsedBody,
116
- errorCode,
117
- });
118
- }
119
- };
120
- const de_SearchAgreementsCommand = async (output, context) => {
121
- if (output.statusCode >= 300) {
122
- return de_SearchAgreementsCommandError(output, context);
123
- }
124
- const data = await parseBody(output.body, context);
125
- let contents = {};
126
- contents = de_SearchAgreementsOutput(data, context);
127
- const response = {
128
- $metadata: deserializeMetadata(output),
129
- ...contents,
130
- };
131
- return response;
132
- };
133
- exports.de_SearchAgreementsCommand = de_SearchAgreementsCommand;
134
- const de_SearchAgreementsCommandError = async (output, context) => {
135
- const parsedOutput = {
136
- ...output,
137
- body: await parseErrorBody(output.body, context),
138
- };
139
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
140
- switch (errorCode) {
141
- case "AccessDeniedException":
142
- case "com.amazonaws.marketplaceagreement#AccessDeniedException":
143
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
144
- case "InternalServerException":
145
- case "com.amazonaws.marketplaceagreement#InternalServerException":
146
- throw await de_InternalServerExceptionRes(parsedOutput, context);
147
- case "ThrottlingException":
148
- case "com.amazonaws.marketplaceagreement#ThrottlingException":
149
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
150
- case "ValidationException":
151
- case "com.amazonaws.marketplaceagreement#ValidationException":
152
- throw await de_ValidationExceptionRes(parsedOutput, context);
153
- default:
154
- const parsedBody = parsedOutput.body;
155
- return throwDefaultError({
156
- output,
157
- parsedBody,
158
- errorCode,
159
- });
160
- }
161
- };
162
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
163
- const body = parsedOutput.body;
164
- const deserialized = (0, smithy_client_1._json)(body);
165
- const exception = new models_0_1.AccessDeniedException({
166
- $metadata: deserializeMetadata(parsedOutput),
167
- ...deserialized,
168
- });
169
- return (0, smithy_client_1.decorateServiceException)(exception, body);
170
- };
171
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
172
- const body = parsedOutput.body;
173
- const deserialized = (0, smithy_client_1._json)(body);
174
- const exception = new models_0_1.InternalServerException({
175
- $metadata: deserializeMetadata(parsedOutput),
176
- ...deserialized,
177
- });
178
- return (0, smithy_client_1.decorateServiceException)(exception, body);
179
- };
180
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
181
- const body = parsedOutput.body;
182
- const deserialized = (0, smithy_client_1._json)(body);
183
- const exception = new models_0_1.ResourceNotFoundException({
184
- $metadata: deserializeMetadata(parsedOutput),
185
- ...deserialized,
186
- });
187
- return (0, smithy_client_1.decorateServiceException)(exception, body);
188
- };
189
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
190
- const body = parsedOutput.body;
191
- const deserialized = (0, smithy_client_1._json)(body);
192
- const exception = new models_0_1.ThrottlingException({
193
- $metadata: deserializeMetadata(parsedOutput),
194
- ...deserialized,
195
- });
196
- return (0, smithy_client_1.decorateServiceException)(exception, body);
197
- };
198
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
199
- const body = parsedOutput.body;
200
- const deserialized = (0, smithy_client_1._json)(body);
201
- const exception = new models_0_1.ValidationException({
202
- $metadata: deserializeMetadata(parsedOutput),
203
- ...deserialized,
204
- });
205
- return (0, smithy_client_1.decorateServiceException)(exception, body);
206
- };
207
- const de_AcceptedTerm = (output, context) => {
208
- if (output.byolPricingTerm != null) {
209
- return {
210
- byolPricingTerm: (0, smithy_client_1._json)(output.byolPricingTerm),
211
- };
212
- }
213
- if (output.configurableUpfrontPricingTerm != null) {
214
- return {
215
- configurableUpfrontPricingTerm: (0, smithy_client_1._json)(output.configurableUpfrontPricingTerm),
216
- };
217
- }
218
- if (output.fixedUpfrontPricingTerm != null) {
219
- return {
220
- fixedUpfrontPricingTerm: (0, smithy_client_1._json)(output.fixedUpfrontPricingTerm),
221
- };
222
- }
223
- if (output.freeTrialPricingTerm != null) {
224
- return {
225
- freeTrialPricingTerm: (0, smithy_client_1._json)(output.freeTrialPricingTerm),
226
- };
227
- }
228
- if (output.legalTerm != null) {
229
- return {
230
- legalTerm: (0, smithy_client_1._json)(output.legalTerm),
231
- };
232
- }
233
- if (output.paymentScheduleTerm != null) {
234
- return {
235
- paymentScheduleTerm: de_PaymentScheduleTerm(output.paymentScheduleTerm, context),
236
- };
237
- }
238
- if (output.recurringPaymentTerm != null) {
239
- return {
240
- recurringPaymentTerm: (0, smithy_client_1._json)(output.recurringPaymentTerm),
241
- };
242
- }
243
- if (output.renewalTerm != null) {
244
- return {
245
- renewalTerm: (0, smithy_client_1._json)(output.renewalTerm),
246
- };
247
- }
248
- if (output.supportTerm != null) {
249
- return {
250
- supportTerm: (0, smithy_client_1._json)(output.supportTerm),
251
- };
252
- }
253
- if (output.usageBasedPricingTerm != null) {
254
- return {
255
- usageBasedPricingTerm: (0, smithy_client_1._json)(output.usageBasedPricingTerm),
256
- };
257
- }
258
- if (output.validityTerm != null) {
259
- return {
260
- validityTerm: de_ValidityTerm(output.validityTerm, context),
261
- };
262
- }
263
- return { $unknown: Object.entries(output)[0] };
264
- };
265
- const de_AcceptedTermList = (output, context) => {
266
- const retVal = (output || [])
267
- .filter((e) => e != null)
268
- .map((entry) => {
269
- return de_AcceptedTerm((0, core_1.awsExpectUnion)(entry), context);
270
- });
271
- return retVal;
272
- };
273
- const de_AgreementViewSummary = (output, context) => {
274
- return (0, smithy_client_1.take)(output, {
275
- acceptanceTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
276
- acceptor: smithy_client_1._json,
277
- agreementId: smithy_client_1.expectString,
278
- agreementType: smithy_client_1.expectString,
279
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
280
- proposalSummary: smithy_client_1._json,
281
- proposer: smithy_client_1._json,
282
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
283
- status: smithy_client_1.expectString,
284
- });
285
- };
286
- const de_AgreementViewSummaryList = (output, context) => {
287
- const retVal = (output || [])
288
- .filter((e) => e != null)
289
- .map((entry) => {
290
- return de_AgreementViewSummary(entry, context);
291
- });
292
- return retVal;
293
- };
294
- const de_DescribeAgreementOutput = (output, context) => {
295
- return (0, smithy_client_1.take)(output, {
296
- acceptanceTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
297
- acceptor: smithy_client_1._json,
298
- agreementId: smithy_client_1.expectString,
299
- agreementType: smithy_client_1.expectString,
300
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
301
- estimatedCharges: smithy_client_1._json,
302
- proposalSummary: smithy_client_1._json,
303
- proposer: smithy_client_1._json,
304
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
305
- status: smithy_client_1.expectString,
306
- });
307
- };
308
- const de_GetAgreementTermsOutput = (output, context) => {
309
- return (0, smithy_client_1.take)(output, {
310
- acceptedTerms: (_) => de_AcceptedTermList(_, context),
311
- nextToken: smithy_client_1.expectString,
312
- });
313
- };
314
- const de_PaymentScheduleTerm = (output, context) => {
315
- return (0, smithy_client_1.take)(output, {
316
- currencyCode: smithy_client_1.expectString,
317
- schedule: (_) => de_ScheduleList(_, context),
318
- type: smithy_client_1.expectString,
319
- });
320
- };
321
- const de_ScheduleItem = (output, context) => {
322
- return (0, smithy_client_1.take)(output, {
323
- chargeAmount: smithy_client_1.expectString,
324
- chargeDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
325
- });
326
- };
327
- const de_ScheduleList = (output, context) => {
328
- const retVal = (output || [])
329
- .filter((e) => e != null)
330
- .map((entry) => {
331
- return de_ScheduleItem(entry, context);
332
- });
333
- return retVal;
334
- };
335
- const de_SearchAgreementsOutput = (output, context) => {
336
- return (0, smithy_client_1.take)(output, {
337
- agreementViewSummaries: (_) => de_AgreementViewSummaryList(_, context),
338
- nextToken: smithy_client_1.expectString,
339
- });
340
- };
341
- const de_ValidityTerm = (output, context) => {
342
- return (0, smithy_client_1.take)(output, {
343
- agreementDuration: smithy_client_1.expectString,
344
- agreementEndDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
345
- agreementStartDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
346
- type: smithy_client_1.expectString,
347
- });
348
- };
349
- const deserializeMetadata = (output) => ({
350
- httpStatusCode: output.statusCode,
351
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
352
- extendedRequestId: output.headers["x-amz-id-2"],
353
- cfId: output.headers["x-amz-cf-id"],
354
- });
355
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
356
- const throwDefaultError = (0, smithy_client_1.withBaseException)(MarketplaceAgreementServiceException_1.MarketplaceAgreementServiceException);
357
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
358
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
- const contents = {
360
- protocol,
361
- hostname,
362
- port,
363
- method: "POST",
364
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
365
- headers,
366
- };
367
- if (resolvedHostname !== undefined) {
368
- contents.hostname = resolvedHostname;
369
- }
370
- if (body !== undefined) {
371
- contents.body = body;
372
- }
373
- return new protocol_http_1.HttpRequest(contents);
374
- };
375
- function sharedHeaders(operation) {
376
- return {
377
- "content-type": "application/x-amz-json-1.0",
378
- "x-amz-target": `AWSMPCommerceService_v20200301.${operation}`,
379
- };
380
- }
381
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
382
- if (encoded.length) {
383
- return JSON.parse(encoded);
384
- }
385
- return {};
386
- });
387
- const parseErrorBody = async (errorBody, context) => {
388
- const value = await parseBody(errorBody, context);
389
- value.message = value.message ?? value.Message;
390
- return value;
391
- };
392
- const loadRestJsonErrorCode = (output, data) => {
393
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
394
- const sanitizeErrorCode = (rawValue) => {
395
- let cleanValue = rawValue;
396
- if (typeof cleanValue === "number") {
397
- cleanValue = cleanValue.toString();
398
- }
399
- if (cleanValue.indexOf(",") >= 0) {
400
- cleanValue = cleanValue.split(",")[0];
401
- }
402
- if (cleanValue.indexOf(":") >= 0) {
403
- cleanValue = cleanValue.split(":")[0];
404
- }
405
- if (cleanValue.indexOf("#") >= 0) {
406
- cleanValue = cleanValue.split("#")[1];
407
- }
408
- return cleanValue;
409
- };
410
- const headerKey = findKey(output.headers, "x-amzn-errortype");
411
- if (headerKey !== undefined) {
412
- return sanitizeErrorCode(output.headers[headerKey]);
413
- }
414
- if (data.code !== undefined) {
415
- return sanitizeErrorCode(data.code);
416
- }
417
- if (data["__type"] !== undefined) {
418
- return sanitizeErrorCode(data["__type"]);
419
- }
420
- };
1
+ module.exports = require("../index.js");
@@ -1,22 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRuntimeExtensions = void 0;
4
- const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const asPartial = (t) => t;
8
- const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
- const extensionConfiguration = {
10
- ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
13
- };
14
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
- return {
16
- ...runtimeConfig,
17
- ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
20
- };
21
- };
22
- exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
1
+ module.exports = require("./index.js");