@aws-sdk/client-marketplace-entitlement-service 3.927.0 → 3.928.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 +115 -152
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/MarketplaceEntitlementServiceClient.js +2 -0
- package/dist-es/commands/GetEntitlementsCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +105 -0
- package/dist-types/MarketplaceEntitlementServiceClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +14 -0
- package/dist-types/ts3.4/MarketplaceEntitlementServiceClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +20 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_json1_1.js +0 -140
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -11
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -17
package/dist-cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
|
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
7
|
var configResolver = require('@smithy/config-resolver');
|
|
8
8
|
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
9
10
|
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
11
|
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
12
|
var middlewareRetry = require('@smithy/middleware-retry');
|
|
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
14
15
|
var runtimeConfig = require('./runtimeConfig');
|
|
15
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
17
|
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
-
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
-
var core$1 = require('@aws-sdk/core');
|
|
19
18
|
|
|
20
19
|
const resolveClientEndpointParameters = (options) => {
|
|
21
20
|
return Object.assign(options, {
|
|
@@ -91,6 +90,7 @@ class MarketplaceEntitlementServiceClient extends smithyClient.Client {
|
|
|
91
90
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
91
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
92
|
this.config = _config_8;
|
|
93
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
94
94
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
95
|
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
96
|
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
@@ -110,19 +110,19 @@ class MarketplaceEntitlementServiceClient extends smithyClient.Client {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
class MarketplaceEntitlementServiceServiceException extends smithyClient.ServiceException {
|
|
113
|
+
let MarketplaceEntitlementServiceServiceException$1 = class MarketplaceEntitlementServiceServiceException extends smithyClient.ServiceException {
|
|
114
114
|
constructor(options) {
|
|
115
115
|
super(options);
|
|
116
116
|
Object.setPrototypeOf(this, MarketplaceEntitlementServiceServiceException.prototype);
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
|
|
120
120
|
const GetEntitlementFilterName = {
|
|
121
121
|
CUSTOMER_AWS_ACCOUNT_ID: "CUSTOMER_AWS_ACCOUNT_ID",
|
|
122
122
|
CUSTOMER_IDENTIFIER: "CUSTOMER_IDENTIFIER",
|
|
123
123
|
DIMENSION: "DIMENSION",
|
|
124
124
|
};
|
|
125
|
-
class InternalServiceErrorException extends MarketplaceEntitlementServiceServiceException {
|
|
125
|
+
let InternalServiceErrorException$1 = class InternalServiceErrorException extends MarketplaceEntitlementServiceServiceException$1 {
|
|
126
126
|
name = "InternalServiceErrorException";
|
|
127
127
|
$fault = "server";
|
|
128
128
|
constructor(opts) {
|
|
@@ -133,8 +133,8 @@ class InternalServiceErrorException extends MarketplaceEntitlementServiceService
|
|
|
133
133
|
});
|
|
134
134
|
Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
|
|
135
135
|
}
|
|
136
|
-
}
|
|
137
|
-
class InvalidParameterException extends MarketplaceEntitlementServiceServiceException {
|
|
136
|
+
};
|
|
137
|
+
let InvalidParameterException$1 = class InvalidParameterException extends MarketplaceEntitlementServiceServiceException$1 {
|
|
138
138
|
name = "InvalidParameterException";
|
|
139
139
|
$fault = "client";
|
|
140
140
|
constructor(opts) {
|
|
@@ -145,8 +145,8 @@ class InvalidParameterException extends MarketplaceEntitlementServiceServiceExce
|
|
|
145
145
|
});
|
|
146
146
|
Object.setPrototypeOf(this, InvalidParameterException.prototype);
|
|
147
147
|
}
|
|
148
|
-
}
|
|
149
|
-
class ThrottlingException extends MarketplaceEntitlementServiceServiceException {
|
|
148
|
+
};
|
|
149
|
+
let ThrottlingException$1 = class ThrottlingException extends MarketplaceEntitlementServiceServiceException$1 {
|
|
150
150
|
name = "ThrottlingException";
|
|
151
151
|
$fault = "client";
|
|
152
152
|
constructor(opts) {
|
|
@@ -157,154 +157,117 @@ class ThrottlingException extends MarketplaceEntitlementServiceServiceException
|
|
|
157
157
|
});
|
|
158
158
|
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
159
159
|
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
const se_GetEntitlementsCommand = async (input, context) => {
|
|
163
|
-
const headers = sharedHeaders("GetEntitlements");
|
|
164
|
-
let body;
|
|
165
|
-
body = JSON.stringify(smithyClient._json(input));
|
|
166
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
167
|
-
};
|
|
168
|
-
const de_GetEntitlementsCommand = async (output, context) => {
|
|
169
|
-
if (output.statusCode >= 300) {
|
|
170
|
-
return de_CommandError(output, context);
|
|
171
|
-
}
|
|
172
|
-
const data = await core$1.parseJsonBody(output.body, context);
|
|
173
|
-
let contents = {};
|
|
174
|
-
contents = de_GetEntitlementsResult(data);
|
|
175
|
-
const response = {
|
|
176
|
-
$metadata: deserializeMetadata(output),
|
|
177
|
-
...contents,
|
|
178
|
-
};
|
|
179
|
-
return response;
|
|
180
|
-
};
|
|
181
|
-
const de_CommandError = async (output, context) => {
|
|
182
|
-
const parsedOutput = {
|
|
183
|
-
...output,
|
|
184
|
-
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
185
|
-
};
|
|
186
|
-
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
187
|
-
switch (errorCode) {
|
|
188
|
-
case "InternalServiceErrorException":
|
|
189
|
-
case "com.amazonaws.marketplaceentitlementservice#InternalServiceErrorException":
|
|
190
|
-
throw await de_InternalServiceErrorExceptionRes(parsedOutput);
|
|
191
|
-
case "InvalidParameterException":
|
|
192
|
-
case "com.amazonaws.marketplaceentitlementservice#InvalidParameterException":
|
|
193
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput);
|
|
194
|
-
case "ThrottlingException":
|
|
195
|
-
case "com.amazonaws.marketplaceentitlementservice#ThrottlingException":
|
|
196
|
-
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
197
|
-
default:
|
|
198
|
-
const parsedBody = parsedOutput.body;
|
|
199
|
-
return throwDefaultError({
|
|
200
|
-
output,
|
|
201
|
-
parsedBody,
|
|
202
|
-
errorCode,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
|
|
207
|
-
const body = parsedOutput.body;
|
|
208
|
-
const deserialized = smithyClient._json(body);
|
|
209
|
-
const exception = new InternalServiceErrorException({
|
|
210
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
211
|
-
...deserialized,
|
|
212
|
-
});
|
|
213
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
214
|
-
};
|
|
215
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
216
|
-
const body = parsedOutput.body;
|
|
217
|
-
const deserialized = smithyClient._json(body);
|
|
218
|
-
const exception = new InvalidParameterException({
|
|
219
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
220
|
-
...deserialized,
|
|
221
|
-
});
|
|
222
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
223
|
-
};
|
|
224
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
225
|
-
const body = parsedOutput.body;
|
|
226
|
-
const deserialized = smithyClient._json(body);
|
|
227
|
-
const exception = new ThrottlingException({
|
|
228
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
229
|
-
...deserialized,
|
|
230
|
-
});
|
|
231
|
-
return smithyClient.decorateServiceException(exception, body);
|
|
232
|
-
};
|
|
233
|
-
const de_Entitlement = (output, context) => {
|
|
234
|
-
return smithyClient.take(output, {
|
|
235
|
-
CustomerAWSAccountId: smithyClient.expectString,
|
|
236
|
-
CustomerIdentifier: smithyClient.expectString,
|
|
237
|
-
Dimension: smithyClient.expectString,
|
|
238
|
-
ExpirationDate: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
|
|
239
|
-
ProductCode: smithyClient.expectString,
|
|
240
|
-
Value: (_) => de_EntitlementValue(_),
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
const de_EntitlementList = (output, context) => {
|
|
244
|
-
const retVal = (output || [])
|
|
245
|
-
.filter((e) => e != null)
|
|
246
|
-
.map((entry) => {
|
|
247
|
-
return de_Entitlement(entry);
|
|
248
|
-
});
|
|
249
|
-
return retVal;
|
|
250
|
-
};
|
|
251
|
-
const de_EntitlementValue = (output, context) => {
|
|
252
|
-
return smithyClient.take(output, {
|
|
253
|
-
BooleanValue: smithyClient.expectBoolean,
|
|
254
|
-
DoubleValue: smithyClient.limitedParseDouble,
|
|
255
|
-
IntegerValue: smithyClient.expectInt32,
|
|
256
|
-
StringValue: smithyClient.expectString,
|
|
257
|
-
});
|
|
258
|
-
};
|
|
259
|
-
const de_GetEntitlementsResult = (output, context) => {
|
|
260
|
-
return smithyClient.take(output, {
|
|
261
|
-
Entitlements: (_) => de_EntitlementList(_),
|
|
262
|
-
NextToken: smithyClient.expectString,
|
|
263
|
-
});
|
|
264
|
-
};
|
|
265
|
-
const deserializeMetadata = (output) => ({
|
|
266
|
-
httpStatusCode: output.statusCode,
|
|
267
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
268
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
269
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
270
|
-
});
|
|
271
|
-
const throwDefaultError = smithyClient.withBaseException(MarketplaceEntitlementServiceServiceException);
|
|
272
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
273
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
274
|
-
const contents = {
|
|
275
|
-
protocol,
|
|
276
|
-
hostname,
|
|
277
|
-
port,
|
|
278
|
-
method: "POST",
|
|
279
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
280
|
-
headers,
|
|
281
|
-
};
|
|
282
|
-
if (body !== undefined) {
|
|
283
|
-
contents.body = body;
|
|
284
|
-
}
|
|
285
|
-
return new protocolHttp.HttpRequest(contents);
|
|
286
160
|
};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
161
|
+
|
|
162
|
+
const _BV = "BooleanValue";
|
|
163
|
+
const _CAWSAI = "CustomerAWSAccountId";
|
|
164
|
+
const _CI = "CustomerIdentifier";
|
|
165
|
+
const _D = "Dimension";
|
|
166
|
+
const _DV = "DoubleValue";
|
|
167
|
+
const _E = "Entitlement";
|
|
168
|
+
const _ED = "ExpirationDate";
|
|
169
|
+
const _EL = "EntitlementList";
|
|
170
|
+
const _EV = "EntitlementValue";
|
|
171
|
+
const _En = "Entitlements";
|
|
172
|
+
const _F = "Filter";
|
|
173
|
+
const _GE = "GetEntitlements";
|
|
174
|
+
const _GEF = "GetEntitlementFilters";
|
|
175
|
+
const _GER = "GetEntitlementsRequest";
|
|
176
|
+
const _GERe = "GetEntitlementsResult";
|
|
177
|
+
const _IPE = "InvalidParameterException";
|
|
178
|
+
const _ISEE = "InternalServiceErrorException";
|
|
179
|
+
const _IV = "IntegerValue";
|
|
180
|
+
const _MR = "MaxResults";
|
|
181
|
+
const _NT = "NextToken";
|
|
182
|
+
const _PC = "ProductCode";
|
|
183
|
+
const _SV = "StringValue";
|
|
184
|
+
const _TE = "ThrottlingException";
|
|
185
|
+
const _V = "Value";
|
|
186
|
+
const _c = "client";
|
|
187
|
+
const _e = "error";
|
|
188
|
+
const _m = "message";
|
|
189
|
+
const _s = "server";
|
|
190
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.marketplaceentitlementservice";
|
|
191
|
+
const n0 = "com.amazonaws.marketplaceentitlementservice";
|
|
192
|
+
var Entitlement = [
|
|
193
|
+
3,
|
|
194
|
+
n0,
|
|
195
|
+
_E,
|
|
196
|
+
0,
|
|
197
|
+
[_PC, _D, _CI, _CAWSAI, _V, _ED],
|
|
198
|
+
[0, 0, 0, 0, () => EntitlementValue, 4],
|
|
199
|
+
];
|
|
200
|
+
var EntitlementValue = [3, n0, _EV, 0, [_IV, _DV, _BV, _SV], [1, 1, 2, 0]];
|
|
201
|
+
var GetEntitlementsRequest = [
|
|
202
|
+
3,
|
|
203
|
+
n0,
|
|
204
|
+
_GER,
|
|
205
|
+
0,
|
|
206
|
+
[_PC, _F, _NT, _MR],
|
|
207
|
+
[0, [2, n0, _GEF, 0, 0, 64 | 0], 0, 1],
|
|
208
|
+
];
|
|
209
|
+
var GetEntitlementsResult = [3, n0, _GERe, 0, [_En, _NT], [() => EntitlementList, 0]];
|
|
210
|
+
var InternalServiceErrorException = [
|
|
211
|
+
-3,
|
|
212
|
+
n0,
|
|
213
|
+
_ISEE,
|
|
214
|
+
{
|
|
215
|
+
[_e]: _s,
|
|
216
|
+
},
|
|
217
|
+
[_m],
|
|
218
|
+
[0],
|
|
219
|
+
];
|
|
220
|
+
schema.TypeRegistry.for(n0).registerError(InternalServiceErrorException, InternalServiceErrorException$1);
|
|
221
|
+
var InvalidParameterException = [
|
|
222
|
+
-3,
|
|
223
|
+
n0,
|
|
224
|
+
_IPE,
|
|
225
|
+
{
|
|
226
|
+
[_e]: _c,
|
|
227
|
+
},
|
|
228
|
+
[_m],
|
|
229
|
+
[0],
|
|
230
|
+
];
|
|
231
|
+
schema.TypeRegistry.for(n0).registerError(InvalidParameterException, InvalidParameterException$1);
|
|
232
|
+
var ThrottlingException = [
|
|
233
|
+
-3,
|
|
234
|
+
n0,
|
|
235
|
+
_TE,
|
|
236
|
+
{
|
|
237
|
+
[_e]: _c,
|
|
238
|
+
},
|
|
239
|
+
[_m],
|
|
240
|
+
[0],
|
|
241
|
+
];
|
|
242
|
+
schema.TypeRegistry.for(n0).registerError(ThrottlingException, ThrottlingException$1);
|
|
243
|
+
var MarketplaceEntitlementServiceServiceException = [
|
|
244
|
+
-3,
|
|
245
|
+
_sm,
|
|
246
|
+
"MarketplaceEntitlementServiceServiceException",
|
|
247
|
+
0,
|
|
248
|
+
[],
|
|
249
|
+
[],
|
|
250
|
+
];
|
|
251
|
+
schema.TypeRegistry.for(_sm).registerError(MarketplaceEntitlementServiceServiceException, MarketplaceEntitlementServiceServiceException$1);
|
|
252
|
+
var EntitlementList = [1, n0, _EL, 0, () => Entitlement];
|
|
253
|
+
var GetEntitlements = [
|
|
254
|
+
9,
|
|
255
|
+
n0,
|
|
256
|
+
_GE,
|
|
257
|
+
0,
|
|
258
|
+
() => GetEntitlementsRequest,
|
|
259
|
+
() => GetEntitlementsResult,
|
|
260
|
+
];
|
|
293
261
|
|
|
294
262
|
class GetEntitlementsCommand extends smithyClient.Command
|
|
295
263
|
.classBuilder()
|
|
296
264
|
.ep(commonParams)
|
|
297
265
|
.m(function (Command, cs, config, o) {
|
|
298
|
-
return [
|
|
299
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
300
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
301
|
-
];
|
|
266
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
302
267
|
})
|
|
303
268
|
.s("AWSMPEntitlementService", "GetEntitlements", {})
|
|
304
269
|
.n("MarketplaceEntitlementServiceClient", "GetEntitlementsCommand")
|
|
305
|
-
.
|
|
306
|
-
.ser(se_GetEntitlementsCommand)
|
|
307
|
-
.de(de_GetEntitlementsCommand)
|
|
270
|
+
.sc(GetEntitlements)
|
|
308
271
|
.build() {
|
|
309
272
|
}
|
|
310
273
|
|
|
@@ -327,10 +290,10 @@ Object.defineProperty(exports, "__Client", {
|
|
|
327
290
|
});
|
|
328
291
|
exports.GetEntitlementFilterName = GetEntitlementFilterName;
|
|
329
292
|
exports.GetEntitlementsCommand = GetEntitlementsCommand;
|
|
330
|
-
exports.InternalServiceErrorException = InternalServiceErrorException;
|
|
331
|
-
exports.InvalidParameterException = InvalidParameterException;
|
|
293
|
+
exports.InternalServiceErrorException = InternalServiceErrorException$1;
|
|
294
|
+
exports.InvalidParameterException = InvalidParameterException$1;
|
|
332
295
|
exports.MarketplaceEntitlementService = MarketplaceEntitlementService;
|
|
333
296
|
exports.MarketplaceEntitlementServiceClient = MarketplaceEntitlementServiceClient;
|
|
334
|
-
exports.MarketplaceEntitlementServiceServiceException = MarketplaceEntitlementServiceServiceException;
|
|
335
|
-
exports.ThrottlingException = ThrottlingException;
|
|
297
|
+
exports.MarketplaceEntitlementServiceServiceException = MarketplaceEntitlementServiceServiceException$1;
|
|
298
|
+
exports.ThrottlingException = ThrottlingException$1;
|
|
336
299
|
exports.paginateGetEntitlements = paginateGetEntitlements;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const protocols_1 = require("@aws-sdk/core/protocols");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const url_parser_1 = require("@smithy/url-parser");
|
|
7
8
|
const util_base64_1 = require("@smithy/util-base64");
|
|
@@ -25,6 +26,12 @@ const getRuntimeConfig = (config) => {
|
|
|
25
26
|
},
|
|
26
27
|
],
|
|
27
28
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
29
|
+
protocol: config?.protocol ??
|
|
30
|
+
new protocols_1.AwsJson1_1Protocol({
|
|
31
|
+
defaultNamespace: "com.amazonaws.marketplaceentitlementservice",
|
|
32
|
+
serviceTarget: "AWSMPEntitlementService",
|
|
33
|
+
awsQueryCompatible: false,
|
|
34
|
+
}),
|
|
28
35
|
serviceId: config?.serviceId ?? "Marketplace Entitlement Service",
|
|
29
36
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
30
37
|
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
|
|
|
4
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
5
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
6
|
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
7
8
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
9
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
10
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
@@ -28,6 +29,7 @@ export class MarketplaceEntitlementServiceClient extends __Client {
|
|
|
28
29
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
29
30
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
30
31
|
this.config = _config_8;
|
|
32
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
31
33
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
34
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
35
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
4
|
+
import { GetEntitlements } from "../schemas/schemas_0";
|
|
6
5
|
export { $Command };
|
|
7
6
|
export class GetEntitlementsCommand extends $Command
|
|
8
7
|
.classBuilder()
|
|
9
8
|
.ep(commonParams)
|
|
10
9
|
.m(function (Command, cs, config, o) {
|
|
11
|
-
return [
|
|
12
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
15
11
|
})
|
|
16
12
|
.s("AWSMPEntitlementService", "GetEntitlements", {})
|
|
17
13
|
.n("MarketplaceEntitlementServiceClient", "GetEntitlementsCommand")
|
|
18
|
-
.
|
|
19
|
-
.ser(se_GetEntitlementsCommand)
|
|
20
|
-
.de(de_GetEntitlementsCommand)
|
|
14
|
+
.sc(GetEntitlements)
|
|
21
15
|
.build() {
|
|
22
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsJson1_1Protocol } from "@aws-sdk/core/protocols";
|
|
2
3
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
4
|
import { parseUrl } from "@smithy/url-parser";
|
|
4
5
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
@@ -22,6 +23,12 @@ export const getRuntimeConfig = (config) => {
|
|
|
22
23
|
},
|
|
23
24
|
],
|
|
24
25
|
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ??
|
|
27
|
+
new AwsJson1_1Protocol({
|
|
28
|
+
defaultNamespace: "com.amazonaws.marketplaceentitlementservice",
|
|
29
|
+
serviceTarget: "AWSMPEntitlementService",
|
|
30
|
+
awsQueryCompatible: false,
|
|
31
|
+
}),
|
|
25
32
|
serviceId: config?.serviceId ?? "Marketplace Entitlement Service",
|
|
26
33
|
urlParser: config?.urlParser ?? parseUrl,
|
|
27
34
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const _BV = "BooleanValue";
|
|
2
|
+
const _CAWSAI = "CustomerAWSAccountId";
|
|
3
|
+
const _CI = "CustomerIdentifier";
|
|
4
|
+
const _D = "Dimension";
|
|
5
|
+
const _DV = "DoubleValue";
|
|
6
|
+
const _E = "Entitlement";
|
|
7
|
+
const _ED = "ExpirationDate";
|
|
8
|
+
const _EL = "EntitlementList";
|
|
9
|
+
const _EV = "EntitlementValue";
|
|
10
|
+
const _En = "Entitlements";
|
|
11
|
+
const _F = "Filter";
|
|
12
|
+
const _GE = "GetEntitlements";
|
|
13
|
+
const _GEF = "GetEntitlementFilters";
|
|
14
|
+
const _GER = "GetEntitlementsRequest";
|
|
15
|
+
const _GERe = "GetEntitlementsResult";
|
|
16
|
+
const _IPE = "InvalidParameterException";
|
|
17
|
+
const _ISEE = "InternalServiceErrorException";
|
|
18
|
+
const _IV = "IntegerValue";
|
|
19
|
+
const _MR = "MaxResults";
|
|
20
|
+
const _NT = "NextToken";
|
|
21
|
+
const _PC = "ProductCode";
|
|
22
|
+
const _SV = "StringValue";
|
|
23
|
+
const _TE = "ThrottlingException";
|
|
24
|
+
const _V = "Value";
|
|
25
|
+
const _c = "client";
|
|
26
|
+
const _e = "error";
|
|
27
|
+
const _m = "message";
|
|
28
|
+
const _s = "server";
|
|
29
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.marketplaceentitlementservice";
|
|
30
|
+
const n0 = "com.amazonaws.marketplaceentitlementservice";
|
|
31
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
32
|
+
import { InternalServiceErrorException as __InternalServiceErrorException, InvalidParameterException as __InvalidParameterException, ThrottlingException as __ThrottlingException, } from "../models/index";
|
|
33
|
+
import { MarketplaceEntitlementServiceServiceException as __MarketplaceEntitlementServiceServiceException } from "../models/MarketplaceEntitlementServiceServiceException";
|
|
34
|
+
export var Entitlement = [
|
|
35
|
+
3,
|
|
36
|
+
n0,
|
|
37
|
+
_E,
|
|
38
|
+
0,
|
|
39
|
+
[_PC, _D, _CI, _CAWSAI, _V, _ED],
|
|
40
|
+
[0, 0, 0, 0, () => EntitlementValue, 4],
|
|
41
|
+
];
|
|
42
|
+
export var EntitlementValue = [3, n0, _EV, 0, [_IV, _DV, _BV, _SV], [1, 1, 2, 0]];
|
|
43
|
+
export var GetEntitlementsRequest = [
|
|
44
|
+
3,
|
|
45
|
+
n0,
|
|
46
|
+
_GER,
|
|
47
|
+
0,
|
|
48
|
+
[_PC, _F, _NT, _MR],
|
|
49
|
+
[0, [2, n0, _GEF, 0, 0, 64 | 0], 0, 1],
|
|
50
|
+
];
|
|
51
|
+
export var GetEntitlementsResult = [3, n0, _GERe, 0, [_En, _NT], [() => EntitlementList, 0]];
|
|
52
|
+
export var InternalServiceErrorException = [
|
|
53
|
+
-3,
|
|
54
|
+
n0,
|
|
55
|
+
_ISEE,
|
|
56
|
+
{
|
|
57
|
+
[_e]: _s,
|
|
58
|
+
},
|
|
59
|
+
[_m],
|
|
60
|
+
[0],
|
|
61
|
+
];
|
|
62
|
+
TypeRegistry.for(n0).registerError(InternalServiceErrorException, __InternalServiceErrorException);
|
|
63
|
+
export var InvalidParameterException = [
|
|
64
|
+
-3,
|
|
65
|
+
n0,
|
|
66
|
+
_IPE,
|
|
67
|
+
{
|
|
68
|
+
[_e]: _c,
|
|
69
|
+
},
|
|
70
|
+
[_m],
|
|
71
|
+
[0],
|
|
72
|
+
];
|
|
73
|
+
TypeRegistry.for(n0).registerError(InvalidParameterException, __InvalidParameterException);
|
|
74
|
+
export var ThrottlingException = [
|
|
75
|
+
-3,
|
|
76
|
+
n0,
|
|
77
|
+
_TE,
|
|
78
|
+
{
|
|
79
|
+
[_e]: _c,
|
|
80
|
+
},
|
|
81
|
+
[_m],
|
|
82
|
+
[0],
|
|
83
|
+
];
|
|
84
|
+
TypeRegistry.for(n0).registerError(ThrottlingException, __ThrottlingException);
|
|
85
|
+
export var __Unit = "unit";
|
|
86
|
+
export var MarketplaceEntitlementServiceServiceException = [
|
|
87
|
+
-3,
|
|
88
|
+
_sm,
|
|
89
|
+
"MarketplaceEntitlementServiceServiceException",
|
|
90
|
+
0,
|
|
91
|
+
[],
|
|
92
|
+
[],
|
|
93
|
+
];
|
|
94
|
+
TypeRegistry.for(_sm).registerError(MarketplaceEntitlementServiceServiceException, __MarketplaceEntitlementServiceServiceException);
|
|
95
|
+
export var EntitlementList = [1, n0, _EL, 0, () => Entitlement];
|
|
96
|
+
export var FilterValueList = 64 | 0;
|
|
97
|
+
export var GetEntitlementFilters = [2, n0, _GEF, 0, 0, 64 | 0];
|
|
98
|
+
export var GetEntitlements = [
|
|
99
|
+
9,
|
|
100
|
+
n0,
|
|
101
|
+
_GE,
|
|
102
|
+
0,
|
|
103
|
+
() => GetEntitlementsRequest,
|
|
104
|
+
() => GetEntitlementsResult,
|
|
105
|
+
];
|
|
@@ -5,7 +5,7 @@ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-
|
|
|
5
5
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
6
|
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
7
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
|
-
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
8
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, ClientProtocol, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, HttpRequest, HttpResponse, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
9
|
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
10
|
import { GetEntitlementsCommandInput, GetEntitlementsCommandOutput } from "./commands/GetEntitlementsCommand";
|
|
11
11
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
@@ -142,6 +142,15 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
142
142
|
* Optional extensions
|
|
143
143
|
*/
|
|
144
144
|
extensions?: RuntimeExtension[];
|
|
145
|
+
/**
|
|
146
|
+
* The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
|
|
147
|
+
* may be overridden. A default will always be set by the client.
|
|
148
|
+
* Available options depend on the service's supported protocols and will not be validated by
|
|
149
|
+
* the client.
|
|
150
|
+
* @alpha
|
|
151
|
+
*
|
|
152
|
+
*/
|
|
153
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
145
154
|
/**
|
|
146
155
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
147
156
|
*/
|
|
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: MarketplaceEntitlementServiceCli
|
|
|
29
29
|
profile?: string;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
32
33
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
33
34
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
34
35
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
@@ -31,6 +31,7 @@ export declare const getRuntimeConfig: (config: MarketplaceEntitlementServiceCli
|
|
|
31
31
|
profile?: string;
|
|
32
32
|
logger: import("@smithy/types").Logger;
|
|
33
33
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
34
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
34
35
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
35
36
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
36
37
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: MarketplaceEntitlementServiceCli
|
|
|
27
27
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
28
28
|
logger: import("@smithy/types").Logger;
|
|
29
29
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
30
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
30
31
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
31
32
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
32
33
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -14,6 +14,7 @@ export declare const getRuntimeConfig: (config: MarketplaceEntitlementServiceCli
|
|
|
14
14
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").MarketplaceEntitlementServiceHttpAuthSchemeProvider;
|
|
15
15
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
16
16
|
logger: import("@smithy/types").Logger;
|
|
17
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
17
18
|
serviceId: string;
|
|
18
19
|
urlParser: import("@smithy/types").UrlParser;
|
|
19
20
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StaticErrorSchema, StaticListSchema, StaticMapSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
|
|
2
|
+
export declare var Entitlement: StaticStructureSchema;
|
|
3
|
+
export declare var EntitlementValue: StaticStructureSchema;
|
|
4
|
+
export declare var GetEntitlementsRequest: StaticStructureSchema;
|
|
5
|
+
export declare var GetEntitlementsResult: StaticStructureSchema;
|
|
6
|
+
export declare var InternalServiceErrorException: StaticErrorSchema;
|
|
7
|
+
export declare var InvalidParameterException: StaticErrorSchema;
|
|
8
|
+
export declare var ThrottlingException: StaticErrorSchema;
|
|
9
|
+
export declare var __Unit: "unit";
|
|
10
|
+
export declare var MarketplaceEntitlementServiceServiceException: StaticErrorSchema;
|
|
11
|
+
export declare var EntitlementList: StaticListSchema;
|
|
12
|
+
export declare var FilterValueList: number;
|
|
13
|
+
export declare var GetEntitlementFilters: StaticMapSchema;
|
|
14
|
+
export declare var GetEntitlements: StaticOperationSchema;
|
|
@@ -30,10 +30,13 @@ import {
|
|
|
30
30
|
BodyLengthCalculator as __BodyLengthCalculator,
|
|
31
31
|
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
32
32
|
ChecksumConstructor as __ChecksumConstructor,
|
|
33
|
+
ClientProtocol,
|
|
33
34
|
Decoder as __Decoder,
|
|
34
35
|
Encoder as __Encoder,
|
|
35
36
|
HashConstructor as __HashConstructor,
|
|
36
37
|
HttpHandlerOptions as __HttpHandlerOptions,
|
|
38
|
+
HttpRequest,
|
|
39
|
+
HttpResponse,
|
|
37
40
|
Logger as __Logger,
|
|
38
41
|
Provider as __Provider,
|
|
39
42
|
Provider,
|
|
@@ -82,6 +85,7 @@ export interface ClientDefaults
|
|
|
82
85
|
retryMode?: string | __Provider<string>;
|
|
83
86
|
logger?: __Logger;
|
|
84
87
|
extensions?: RuntimeExtension[];
|
|
88
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
85
89
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
86
90
|
}
|
|
87
91
|
export type MarketplaceEntitlementServiceClientConfigType = Partial<
|
|
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
|
|
|
40
40
|
profile?: string;
|
|
41
41
|
logger: import("@smithy/types").Logger;
|
|
42
42
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
43
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
44
|
+
import("@smithy/types").HttpRequest,
|
|
45
|
+
import("@smithy/types").HttpResponse
|
|
46
|
+
>;
|
|
43
47
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
44
48
|
userAgentAppId?:
|
|
45
49
|
| string
|
|
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
|
|
|
40
40
|
profile?: string;
|
|
41
41
|
logger: import("@smithy/types").Logger;
|
|
42
42
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
43
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
44
|
+
import("@smithy/types").HttpRequest,
|
|
45
|
+
import("@smithy/types").HttpResponse
|
|
46
|
+
>;
|
|
43
47
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
44
48
|
retryStrategy?:
|
|
45
49
|
| import("@smithy/types").RetryStrategy
|
|
@@ -39,6 +39,10 @@ export declare const getRuntimeConfig: (
|
|
|
39
39
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
40
40
|
logger: import("@smithy/types").Logger;
|
|
41
41
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
42
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
43
|
+
import("@smithy/types").HttpRequest,
|
|
44
|
+
import("@smithy/types").HttpResponse
|
|
45
|
+
>;
|
|
42
46
|
defaultsMode:
|
|
43
47
|
| import("@smithy/smithy-client").DefaultsMode
|
|
44
48
|
| import("@smithy/types").Provider<
|
|
@@ -16,6 +16,10 @@ export declare const getRuntimeConfig: (
|
|
|
16
16
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").MarketplaceEntitlementServiceHttpAuthSchemeProvider;
|
|
17
17
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
18
18
|
logger: import("@smithy/types").Logger;
|
|
19
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
20
|
+
import("@smithy/types").HttpRequest,
|
|
21
|
+
import("@smithy/types").HttpResponse
|
|
22
|
+
>;
|
|
19
23
|
serviceId: string;
|
|
20
24
|
urlParser: import("@smithy/types").UrlParser;
|
|
21
25
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticErrorSchema,
|
|
3
|
+
StaticListSchema,
|
|
4
|
+
StaticMapSchema,
|
|
5
|
+
StaticOperationSchema,
|
|
6
|
+
StaticStructureSchema,
|
|
7
|
+
} from "@smithy/types";
|
|
8
|
+
export declare var Entitlement: StaticStructureSchema;
|
|
9
|
+
export declare var EntitlementValue: StaticStructureSchema;
|
|
10
|
+
export declare var GetEntitlementsRequest: StaticStructureSchema;
|
|
11
|
+
export declare var GetEntitlementsResult: StaticStructureSchema;
|
|
12
|
+
export declare var InternalServiceErrorException: StaticErrorSchema;
|
|
13
|
+
export declare var InvalidParameterException: StaticErrorSchema;
|
|
14
|
+
export declare var ThrottlingException: StaticErrorSchema;
|
|
15
|
+
export declare var __Unit: "unit";
|
|
16
|
+
export declare var MarketplaceEntitlementServiceServiceException: StaticErrorSchema;
|
|
17
|
+
export declare var EntitlementList: StaticListSchema;
|
|
18
|
+
export declare var FilterValueList: number;
|
|
19
|
+
export declare var GetEntitlementFilters: StaticMapSchema;
|
|
20
|
+
export declare var GetEntitlements: StaticOperationSchema;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-marketplace-entitlement-service",
|
|
3
3
|
"description": "AWS SDK for JavaScript Marketplace Entitlement Service Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.928.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-marketplace-entitlement-service",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.928.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.928.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.922.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.922.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.922.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.928.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.925.0",
|
|
30
30
|
"@aws-sdk/types": "3.922.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.922.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.922.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.928.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.4.2",
|
|
35
35
|
"@smithy/core": "^3.17.2",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.5",
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { MarketplaceEntitlementServiceServiceException as __BaseException } from "../models/MarketplaceEntitlementServiceServiceException";
|
|
5
|
-
import { InternalServiceErrorException, InvalidParameterException, ThrottlingException, } from "../models/models_0";
|
|
6
|
-
export const se_GetEntitlementsCommand = async (input, context) => {
|
|
7
|
-
const headers = sharedHeaders("GetEntitlements");
|
|
8
|
-
let body;
|
|
9
|
-
body = JSON.stringify(_json(input));
|
|
10
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
-
};
|
|
12
|
-
export const de_GetEntitlementsCommand = async (output, context) => {
|
|
13
|
-
if (output.statusCode >= 300) {
|
|
14
|
-
return de_CommandError(output, context);
|
|
15
|
-
}
|
|
16
|
-
const data = await parseBody(output.body, context);
|
|
17
|
-
let contents = {};
|
|
18
|
-
contents = de_GetEntitlementsResult(data, context);
|
|
19
|
-
const response = {
|
|
20
|
-
$metadata: deserializeMetadata(output),
|
|
21
|
-
...contents,
|
|
22
|
-
};
|
|
23
|
-
return response;
|
|
24
|
-
};
|
|
25
|
-
const de_CommandError = async (output, context) => {
|
|
26
|
-
const parsedOutput = {
|
|
27
|
-
...output,
|
|
28
|
-
body: await parseErrorBody(output.body, context),
|
|
29
|
-
};
|
|
30
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
31
|
-
switch (errorCode) {
|
|
32
|
-
case "InternalServiceErrorException":
|
|
33
|
-
case "com.amazonaws.marketplaceentitlementservice#InternalServiceErrorException":
|
|
34
|
-
throw await de_InternalServiceErrorExceptionRes(parsedOutput, context);
|
|
35
|
-
case "InvalidParameterException":
|
|
36
|
-
case "com.amazonaws.marketplaceentitlementservice#InvalidParameterException":
|
|
37
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
38
|
-
case "ThrottlingException":
|
|
39
|
-
case "com.amazonaws.marketplaceentitlementservice#ThrottlingException":
|
|
40
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
41
|
-
default:
|
|
42
|
-
const parsedBody = parsedOutput.body;
|
|
43
|
-
return throwDefaultError({
|
|
44
|
-
output,
|
|
45
|
-
parsedBody,
|
|
46
|
-
errorCode,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
const de_InternalServiceErrorExceptionRes = async (parsedOutput, context) => {
|
|
51
|
-
const body = parsedOutput.body;
|
|
52
|
-
const deserialized = _json(body);
|
|
53
|
-
const exception = new InternalServiceErrorException({
|
|
54
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
55
|
-
...deserialized,
|
|
56
|
-
});
|
|
57
|
-
return __decorateServiceException(exception, body);
|
|
58
|
-
};
|
|
59
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
60
|
-
const body = parsedOutput.body;
|
|
61
|
-
const deserialized = _json(body);
|
|
62
|
-
const exception = new InvalidParameterException({
|
|
63
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
64
|
-
...deserialized,
|
|
65
|
-
});
|
|
66
|
-
return __decorateServiceException(exception, body);
|
|
67
|
-
};
|
|
68
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
69
|
-
const body = parsedOutput.body;
|
|
70
|
-
const deserialized = _json(body);
|
|
71
|
-
const exception = new ThrottlingException({
|
|
72
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
73
|
-
...deserialized,
|
|
74
|
-
});
|
|
75
|
-
return __decorateServiceException(exception, body);
|
|
76
|
-
};
|
|
77
|
-
const de_Entitlement = (output, context) => {
|
|
78
|
-
return take(output, {
|
|
79
|
-
CustomerAWSAccountId: __expectString,
|
|
80
|
-
CustomerIdentifier: __expectString,
|
|
81
|
-
Dimension: __expectString,
|
|
82
|
-
ExpirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
83
|
-
ProductCode: __expectString,
|
|
84
|
-
Value: (_) => de_EntitlementValue(_, context),
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
const de_EntitlementList = (output, context) => {
|
|
88
|
-
const retVal = (output || [])
|
|
89
|
-
.filter((e) => e != null)
|
|
90
|
-
.map((entry) => {
|
|
91
|
-
return de_Entitlement(entry, context);
|
|
92
|
-
});
|
|
93
|
-
return retVal;
|
|
94
|
-
};
|
|
95
|
-
const de_EntitlementValue = (output, context) => {
|
|
96
|
-
return take(output, {
|
|
97
|
-
BooleanValue: __expectBoolean,
|
|
98
|
-
DoubleValue: __limitedParseDouble,
|
|
99
|
-
IntegerValue: __expectInt32,
|
|
100
|
-
StringValue: __expectString,
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
const de_GetEntitlementsResult = (output, context) => {
|
|
104
|
-
return take(output, {
|
|
105
|
-
Entitlements: (_) => de_EntitlementList(_, context),
|
|
106
|
-
NextToken: __expectString,
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
const deserializeMetadata = (output) => ({
|
|
110
|
-
httpStatusCode: output.statusCode,
|
|
111
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
112
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
113
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
114
|
-
});
|
|
115
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
116
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
117
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
118
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
119
|
-
const contents = {
|
|
120
|
-
protocol,
|
|
121
|
-
hostname,
|
|
122
|
-
port,
|
|
123
|
-
method: "POST",
|
|
124
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
125
|
-
headers,
|
|
126
|
-
};
|
|
127
|
-
if (resolvedHostname !== undefined) {
|
|
128
|
-
contents.hostname = resolvedHostname;
|
|
129
|
-
}
|
|
130
|
-
if (body !== undefined) {
|
|
131
|
-
contents.body = body;
|
|
132
|
-
}
|
|
133
|
-
return new __HttpRequest(contents);
|
|
134
|
-
};
|
|
135
|
-
function sharedHeaders(operation) {
|
|
136
|
-
return {
|
|
137
|
-
"content-type": "application/x-amz-json-1.1",
|
|
138
|
-
"x-amz-target": `AWSMPEntitlementService.${operation}`,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { GetEntitlementsCommandInput, GetEntitlementsCommandOutput } from "../commands/GetEntitlementsCommand";
|
|
4
|
-
/**
|
|
5
|
-
* serializeAws_json1_1GetEntitlementsCommand
|
|
6
|
-
*/
|
|
7
|
-
export declare const se_GetEntitlementsCommand: (input: GetEntitlementsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
8
|
-
/**
|
|
9
|
-
* deserializeAws_json1_1GetEntitlementsCommand
|
|
10
|
-
*/
|
|
11
|
-
export declare const de_GetEntitlementsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetEntitlementsCommandOutput>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpRequest as __HttpRequest,
|
|
3
|
-
HttpResponse as __HttpResponse,
|
|
4
|
-
} from "@smithy/protocol-http";
|
|
5
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
6
|
-
import {
|
|
7
|
-
GetEntitlementsCommandInput,
|
|
8
|
-
GetEntitlementsCommandOutput,
|
|
9
|
-
} from "../commands/GetEntitlementsCommand";
|
|
10
|
-
export declare const se_GetEntitlementsCommand: (
|
|
11
|
-
input: GetEntitlementsCommandInput,
|
|
12
|
-
context: __SerdeContext
|
|
13
|
-
) => Promise<__HttpRequest>;
|
|
14
|
-
export declare const de_GetEntitlementsCommand: (
|
|
15
|
-
output: __HttpResponse,
|
|
16
|
-
context: __SerdeContext
|
|
17
|
-
) => Promise<GetEntitlementsCommandOutput>;
|