@aws-sdk/client-marketplace-metering 3.1075.0 → 3.1077.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,45 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- emitWarningIfUnsupportedVersion(process.version);
13
- const defaultsMode = resolveDefaultsModeConfig(config);
14
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
- const clientSharedValues = getSharedRuntimeConfig(config);
16
- awsCheckVersion(process.version);
17
- const loaderConfig = {
18
- profile: config?.profile,
19
- logger: clientSharedValues.logger,
20
- };
21
- return {
22
- ...clientSharedValues,
23
- ...config,
24
- runtime: "node",
25
- defaultsMode,
26
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
33
- retryMode: config?.retryMode ??
34
- loadNodeConfig({
35
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
- }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
- streamCollector: config?.streamCollector ?? streamCollector,
40
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
43
- };
44
- };
45
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
11
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,38 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsJson1_1Protocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultMarketplaceMeteringHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2016-01-14",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultMarketplaceMeteringHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsJson1_1Protocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.marketplacemetering",
29
- errorTypeRegistries,
30
- version: "2016-01-14",
31
- serviceTarget: "AWSMPMeteringService",
32
- },
33
- serviceId: config?.serviceId ?? "Marketplace Metering",
34
- urlParser: config?.urlParser ?? parseUrl,
35
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
37
- };
38
- };
@@ -1,312 +0,0 @@
1
- const _AUQ = "AllocatedUsageQuantity";
2
- const _BMU = "BatchMeterUsage";
3
- const _BMUR = "BatchMeterUsageRequest";
4
- const _BMURa = "BatchMeterUsageResult";
5
- const _CAWSAI = "CustomerAWSAccountId";
6
- const _CI = "CustomerIdentifier";
7
- const _CNEE = "CustomerNotEntitledException";
8
- const _CT = "ClientToken";
9
- const _D = "Dimension";
10
- const _DAE = "DisabledApiException";
11
- const _DR = "DryRun";
12
- const _DRE = "DuplicateRequestException";
13
- const _ETE = "ExpiredTokenException";
14
- const _ICE = "IdempotencyConflictException";
15
- const _ICIE = "InvalidCustomerIdentifierException";
16
- const _IERE = "InvalidEndpointRegionException";
17
- const _ILE = "InvalidLicenseException";
18
- const _IPCE = "InvalidProductCodeException";
19
- const _IPKVE = "InvalidPublicKeyVersionException";
20
- const _IRE = "InvalidRegionException";
21
- const _ISEE = "InternalServiceErrorException";
22
- const _ITE = "InvalidTagException";
23
- const _ITEn = "InvalidTokenException";
24
- const _IUAE = "InvalidUsageAllocationsException";
25
- const _IUDE = "InvalidUsageDimensionException";
26
- const _K = "Key";
27
- const _LA = "LicenseArn";
28
- const _MRI = "MeteringRecordId";
29
- const _MU = "MeterUsage";
30
- const _MUR = "MeterUsageRequest";
31
- const _MURe = "MeterUsageResult";
32
- const _N = "Nonce";
33
- const _PC = "ProductCode";
34
- const _PKRT = "PublicKeyRotationTimestamp";
35
- const _PKV = "PublicKeyVersion";
36
- const _PNSE = "PlatformNotSupportedException";
37
- const _Q = "Quantity";
38
- const _R = "Results";
39
- const _RC = "ResolveCustomer";
40
- const _RCR = "ResolveCustomerRequest";
41
- const _RCRe = "ResolveCustomerResult";
42
- const _RT = "RegistrationToken";
43
- const _RU = "RegisterUsage";
44
- const _RUR = "RegisterUsageRequest";
45
- const _RURe = "RegisterUsageResult";
46
- const _S = "Signature";
47
- const _St = "Status";
48
- const _T = "Timestamp";
49
- const _TE = "ThrottlingException";
50
- const _TL = "TagList";
51
- const _TOOBE = "TimestampOutOfBoundsException";
52
- const _Ta = "Tag";
53
- const _Tag = "Tags";
54
- const _UA = "UsageAllocations";
55
- const _UAs = "UsageAllocation";
56
- const _UD = "UsageDimension";
57
- const _UQ = "UsageQuantity";
58
- const _UR = "UsageRecords";
59
- const _URL = "UsageRecordList";
60
- const _URR = "UsageRecordResult";
61
- const _URRL = "UsageRecordResultList";
62
- const _URn = "UnprocessedRecords";
63
- const _URs = "UsageRecord";
64
- const _V = "Value";
65
- const _c = "client";
66
- const _e = "error";
67
- const _hE = "httpError";
68
- const _m = "message";
69
- const _s = "smithy.ts.sdk.synthetic.com.amazonaws.marketplacemetering";
70
- const _se = "server";
71
- const n0 = "com.amazonaws.marketplacemetering";
72
- const { TypeRegistry } = require("@smithy/core/schema");
73
- const { CustomerNotEntitledException, DisabledApiException, DuplicateRequestException, ExpiredTokenException, IdempotencyConflictException, InternalServiceErrorException, InvalidCustomerIdentifierException, InvalidEndpointRegionException, InvalidLicenseException, InvalidProductCodeException, InvalidPublicKeyVersionException, InvalidRegionException, InvalidTagException, InvalidTokenException, InvalidUsageAllocationsException, InvalidUsageDimensionException, PlatformNotSupportedException, ThrottlingException, TimestampOutOfBoundsException } = require("../models/errors");
74
- const { MarketplaceMeteringServiceException } = require("../models/MarketplaceMeteringServiceException");
75
- const _s_registry = TypeRegistry.for(_s);
76
- const MarketplaceMeteringServiceException$ = [-3, _s, "MarketplaceMeteringServiceException", 0, [], []];
77
- exports.MarketplaceMeteringServiceException$ = MarketplaceMeteringServiceException$;
78
- _s_registry.registerError(MarketplaceMeteringServiceException$, MarketplaceMeteringServiceException);
79
- const n0_registry = TypeRegistry.for(n0);
80
- const CustomerNotEntitledException$ = [-3, n0, _CNEE,
81
- { [_e]: _c },
82
- [_m],
83
- [0]
84
- ];
85
- exports.CustomerNotEntitledException$ = CustomerNotEntitledException$;
86
- n0_registry.registerError(CustomerNotEntitledException$, CustomerNotEntitledException);
87
- const DisabledApiException$ = [-3, n0, _DAE,
88
- { [_e]: _c },
89
- [_m],
90
- [0]
91
- ];
92
- exports.DisabledApiException$ = DisabledApiException$;
93
- n0_registry.registerError(DisabledApiException$, DisabledApiException);
94
- const DuplicateRequestException$ = [-3, n0, _DRE,
95
- { [_e]: _c },
96
- [_m],
97
- [0]
98
- ];
99
- exports.DuplicateRequestException$ = DuplicateRequestException$;
100
- n0_registry.registerError(DuplicateRequestException$, DuplicateRequestException);
101
- const ExpiredTokenException$ = [-3, n0, _ETE,
102
- { [_e]: _c },
103
- [_m],
104
- [0]
105
- ];
106
- exports.ExpiredTokenException$ = ExpiredTokenException$;
107
- n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
108
- const IdempotencyConflictException$ = [-3, n0, _ICE,
109
- { [_e]: _c, [_hE]: 409 },
110
- [_m],
111
- [0]
112
- ];
113
- exports.IdempotencyConflictException$ = IdempotencyConflictException$;
114
- n0_registry.registerError(IdempotencyConflictException$, IdempotencyConflictException);
115
- const InternalServiceErrorException$ = [-3, n0, _ISEE,
116
- { [_e]: _se },
117
- [_m],
118
- [0]
119
- ];
120
- exports.InternalServiceErrorException$ = InternalServiceErrorException$;
121
- n0_registry.registerError(InternalServiceErrorException$, InternalServiceErrorException);
122
- const InvalidCustomerIdentifierException$ = [-3, n0, _ICIE,
123
- { [_e]: _c },
124
- [_m],
125
- [0]
126
- ];
127
- exports.InvalidCustomerIdentifierException$ = InvalidCustomerIdentifierException$;
128
- n0_registry.registerError(InvalidCustomerIdentifierException$, InvalidCustomerIdentifierException);
129
- const InvalidEndpointRegionException$ = [-3, n0, _IERE,
130
- { [_e]: _c },
131
- [_m],
132
- [0]
133
- ];
134
- exports.InvalidEndpointRegionException$ = InvalidEndpointRegionException$;
135
- n0_registry.registerError(InvalidEndpointRegionException$, InvalidEndpointRegionException);
136
- const InvalidLicenseException$ = [-3, n0, _ILE,
137
- { [_e]: _c },
138
- [_m],
139
- [0]
140
- ];
141
- exports.InvalidLicenseException$ = InvalidLicenseException$;
142
- n0_registry.registerError(InvalidLicenseException$, InvalidLicenseException);
143
- const InvalidProductCodeException$ = [-3, n0, _IPCE,
144
- { [_e]: _c },
145
- [_m],
146
- [0]
147
- ];
148
- exports.InvalidProductCodeException$ = InvalidProductCodeException$;
149
- n0_registry.registerError(InvalidProductCodeException$, InvalidProductCodeException);
150
- const InvalidPublicKeyVersionException$ = [-3, n0, _IPKVE,
151
- { [_e]: _c },
152
- [_m],
153
- [0]
154
- ];
155
- exports.InvalidPublicKeyVersionException$ = InvalidPublicKeyVersionException$;
156
- n0_registry.registerError(InvalidPublicKeyVersionException$, InvalidPublicKeyVersionException);
157
- const InvalidRegionException$ = [-3, n0, _IRE,
158
- { [_e]: _c },
159
- [_m],
160
- [0]
161
- ];
162
- exports.InvalidRegionException$ = InvalidRegionException$;
163
- n0_registry.registerError(InvalidRegionException$, InvalidRegionException);
164
- const InvalidTagException$ = [-3, n0, _ITE,
165
- { [_e]: _c },
166
- [_m],
167
- [0]
168
- ];
169
- exports.InvalidTagException$ = InvalidTagException$;
170
- n0_registry.registerError(InvalidTagException$, InvalidTagException);
171
- const InvalidTokenException$ = [-3, n0, _ITEn,
172
- { [_e]: _c },
173
- [_m],
174
- [0]
175
- ];
176
- exports.InvalidTokenException$ = InvalidTokenException$;
177
- n0_registry.registerError(InvalidTokenException$, InvalidTokenException);
178
- const InvalidUsageAllocationsException$ = [-3, n0, _IUAE,
179
- { [_e]: _c },
180
- [_m],
181
- [0]
182
- ];
183
- exports.InvalidUsageAllocationsException$ = InvalidUsageAllocationsException$;
184
- n0_registry.registerError(InvalidUsageAllocationsException$, InvalidUsageAllocationsException);
185
- const InvalidUsageDimensionException$ = [-3, n0, _IUDE,
186
- { [_e]: _c },
187
- [_m],
188
- [0]
189
- ];
190
- exports.InvalidUsageDimensionException$ = InvalidUsageDimensionException$;
191
- n0_registry.registerError(InvalidUsageDimensionException$, InvalidUsageDimensionException);
192
- const PlatformNotSupportedException$ = [-3, n0, _PNSE,
193
- { [_e]: _c },
194
- [_m],
195
- [0]
196
- ];
197
- exports.PlatformNotSupportedException$ = PlatformNotSupportedException$;
198
- n0_registry.registerError(PlatformNotSupportedException$, PlatformNotSupportedException);
199
- const ThrottlingException$ = [-3, n0, _TE,
200
- { [_e]: _c },
201
- [_m],
202
- [0]
203
- ];
204
- exports.ThrottlingException$ = ThrottlingException$;
205
- n0_registry.registerError(ThrottlingException$, ThrottlingException);
206
- const TimestampOutOfBoundsException$ = [-3, n0, _TOOBE,
207
- { [_e]: _c },
208
- [_m],
209
- [0]
210
- ];
211
- exports.TimestampOutOfBoundsException$ = TimestampOutOfBoundsException$;
212
- n0_registry.registerError(TimestampOutOfBoundsException$, TimestampOutOfBoundsException);
213
- exports.errorTypeRegistries = [
214
- _s_registry,
215
- n0_registry,
216
- ];
217
- const BatchMeterUsageRequest$ = [3, n0, _BMUR,
218
- 0,
219
- [_UR, _PC],
220
- [() => UsageRecordList, 0], 1
221
- ];
222
- exports.BatchMeterUsageRequest$ = BatchMeterUsageRequest$;
223
- const BatchMeterUsageResult$ = [3, n0, _BMURa,
224
- 0,
225
- [_R, _URn],
226
- [() => UsageRecordResultList, () => UsageRecordList]
227
- ];
228
- exports.BatchMeterUsageResult$ = BatchMeterUsageResult$;
229
- const MeterUsageRequest$ = [3, n0, _MUR,
230
- 0,
231
- [_PC, _T, _UD, _UQ, _DR, _UA, _CT],
232
- [0, 4, 0, 1, 2, () => UsageAllocations, [0, 4]], 3
233
- ];
234
- exports.MeterUsageRequest$ = MeterUsageRequest$;
235
- const MeterUsageResult$ = [3, n0, _MURe,
236
- 0,
237
- [_MRI],
238
- [0]
239
- ];
240
- exports.MeterUsageResult$ = MeterUsageResult$;
241
- const RegisterUsageRequest$ = [3, n0, _RUR,
242
- 0,
243
- [_PC, _PKV, _N],
244
- [0, 1, 0], 2
245
- ];
246
- exports.RegisterUsageRequest$ = RegisterUsageRequest$;
247
- const RegisterUsageResult$ = [3, n0, _RURe,
248
- 0,
249
- [_PKRT, _S],
250
- [4, 0]
251
- ];
252
- exports.RegisterUsageResult$ = RegisterUsageResult$;
253
- const ResolveCustomerRequest$ = [3, n0, _RCR,
254
- 0,
255
- [_RT],
256
- [0], 1
257
- ];
258
- exports.ResolveCustomerRequest$ = ResolveCustomerRequest$;
259
- const ResolveCustomerResult$ = [3, n0, _RCRe,
260
- 0,
261
- [_CI, _PC, _CAWSAI, _LA],
262
- [0, 0, 0, 0]
263
- ];
264
- exports.ResolveCustomerResult$ = ResolveCustomerResult$;
265
- const Tag$ = [3, n0, _Ta,
266
- 0,
267
- [_K, _V],
268
- [0, 0], 2
269
- ];
270
- exports.Tag$ = Tag$;
271
- const UsageAllocation$ = [3, n0, _UAs,
272
- 0,
273
- [_AUQ, _Tag],
274
- [1, () => TagList], 1
275
- ];
276
- exports.UsageAllocation$ = UsageAllocation$;
277
- const UsageRecord$ = [3, n0, _URs,
278
- 0,
279
- [_T, _D, _CI, _Q, _UA, _CAWSAI, _LA],
280
- [4, 0, 0, 1, () => UsageAllocations, 0, 0], 2
281
- ];
282
- exports.UsageRecord$ = UsageRecord$;
283
- const UsageRecordResult$ = [3, n0, _URR,
284
- 0,
285
- [_URs, _MRI, _St],
286
- [() => UsageRecord$, 0, 0]
287
- ];
288
- exports.UsageRecordResult$ = UsageRecordResult$;
289
- var TagList = [1, n0, _TL,
290
- 0, () => Tag$
291
- ];
292
- var UsageAllocations = [1, n0, _UA,
293
- 0, () => UsageAllocation$
294
- ];
295
- var UsageRecordList = [1, n0, _URL,
296
- 0, () => UsageRecord$
297
- ];
298
- var UsageRecordResultList = [1, n0, _URRL,
299
- 0, () => UsageRecordResult$
300
- ];
301
- exports.BatchMeterUsage$ = [9, n0, _BMU,
302
- 0, () => BatchMeterUsageRequest$, () => BatchMeterUsageResult$
303
- ];
304
- exports.MeterUsage$ = [9, n0, _MU,
305
- 0, () => MeterUsageRequest$, () => MeterUsageResult$
306
- ];
307
- exports.RegisterUsage$ = [9, n0, _RU,
308
- 0, () => RegisterUsageRequest$, () => RegisterUsageResult$
309
- ];
310
- exports.ResolveCustomer$ = [9, n0, _RC,
311
- 0, () => ResolveCustomerRequest$, () => ResolveCustomerResult$
312
- ];