@aws-sdk/client-elementalinference 3.997.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +271 -0
  3. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  4. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  5. package/dist-cjs/endpoint/ruleset.js +7 -0
  6. package/dist-cjs/index.js +362 -0
  7. package/dist-cjs/models/ElementalInferenceServiceException.js +12 -0
  8. package/dist-cjs/models/errors.js +98 -0
  9. package/dist-cjs/runtimeConfig.browser.js +38 -0
  10. package/dist-cjs/runtimeConfig.js +53 -0
  11. package/dist-cjs/runtimeConfig.native.js +15 -0
  12. package/dist-cjs/runtimeConfig.shared.js +43 -0
  13. package/dist-cjs/schemas/schemas_0.js +309 -0
  14. package/dist-es/ElementalInference.js +35 -0
  15. package/dist-es/ElementalInferenceClient.js +50 -0
  16. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  17. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  18. package/dist-es/commands/AssociateFeedCommand.js +16 -0
  19. package/dist-es/commands/CreateFeedCommand.js +16 -0
  20. package/dist-es/commands/DeleteFeedCommand.js +16 -0
  21. package/dist-es/commands/DisassociateFeedCommand.js +16 -0
  22. package/dist-es/commands/GetFeedCommand.js +16 -0
  23. package/dist-es/commands/ListFeedsCommand.js +16 -0
  24. package/dist-es/commands/ListTagsForResourceCommand.js +16 -0
  25. package/dist-es/commands/TagResourceCommand.js +16 -0
  26. package/dist-es/commands/UntagResourceCommand.js +16 -0
  27. package/dist-es/commands/UpdateFeedCommand.js +16 -0
  28. package/dist-es/commands/index.js +10 -0
  29. package/dist-es/endpoint/EndpointParameters.js +13 -0
  30. package/dist-es/endpoint/endpointResolver.js +14 -0
  31. package/dist-es/endpoint/ruleset.js +4 -0
  32. package/dist-es/extensionConfiguration.js +1 -0
  33. package/dist-es/index.js +10 -0
  34. package/dist-es/models/ElementalInferenceServiceException.js +8 -0
  35. package/dist-es/models/enums.js +13 -0
  36. package/dist-es/models/errors.js +88 -0
  37. package/dist-es/models/models_0.js +1 -0
  38. package/dist-es/pagination/Interfaces.js +1 -0
  39. package/dist-es/pagination/ListFeedsPaginator.js +4 -0
  40. package/dist-es/pagination/index.js +2 -0
  41. package/dist-es/runtimeConfig.browser.js +33 -0
  42. package/dist-es/runtimeConfig.js +48 -0
  43. package/dist-es/runtimeConfig.native.js +11 -0
  44. package/dist-es/runtimeConfig.shared.js +39 -0
  45. package/dist-es/runtimeExtensions.js +9 -0
  46. package/dist-es/schemas/schemas_0.js +306 -0
  47. package/dist-es/waiters/index.js +1 -0
  48. package/dist-es/waiters/waitForFeedDeleted.js +49 -0
  49. package/dist-types/ElementalInference.d.ts +95 -0
  50. package/dist-types/ElementalInferenceClient.d.ts +197 -0
  51. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  52. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  53. package/dist-types/commands/AssociateFeedCommand.d.ts +111 -0
  54. package/dist-types/commands/CreateFeedCommand.d.ts +134 -0
  55. package/dist-types/commands/DeleteFeedCommand.d.ts +94 -0
  56. package/dist-types/commands/DisassociateFeedCommand.d.ts +95 -0
  57. package/dist-types/commands/GetFeedCommand.d.ts +112 -0
  58. package/dist-types/commands/ListFeedsCommand.d.ts +101 -0
  59. package/dist-types/commands/ListTagsForResourceCommand.d.ts +91 -0
  60. package/dist-types/commands/TagResourceCommand.d.ts +93 -0
  61. package/dist-types/commands/UntagResourceCommand.d.ts +93 -0
  62. package/dist-types/commands/UpdateFeedCommand.d.ts +136 -0
  63. package/dist-types/commands/index.d.ts +10 -0
  64. package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
  65. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  66. package/dist-types/endpoint/ruleset.d.ts +2 -0
  67. package/dist-types/extensionConfiguration.d.ts +9 -0
  68. package/dist-types/index.d.ts +18 -0
  69. package/dist-types/models/ElementalInferenceServiceException.d.ts +14 -0
  70. package/dist-types/models/enums.d.ts +29 -0
  71. package/dist-types/models/errors.d.ts +89 -0
  72. package/dist-types/models/models_0.d.ts +563 -0
  73. package/dist-types/pagination/Interfaces.d.ts +8 -0
  74. package/dist-types/pagination/ListFeedsPaginator.d.ts +7 -0
  75. package/dist-types/pagination/index.d.ts +2 -0
  76. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  77. package/dist-types/runtimeConfig.d.ts +55 -0
  78. package/dist-types/runtimeConfig.native.d.ts +54 -0
  79. package/dist-types/runtimeConfig.shared.d.ts +27 -0
  80. package/dist-types/runtimeExtensions.d.ts +17 -0
  81. package/dist-types/schemas/schemas_0.d.ts +52 -0
  82. package/dist-types/ts3.4/ElementalInference.d.ts +200 -0
  83. package/dist-types/ts3.4/ElementalInferenceClient.d.ts +182 -0
  84. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  85. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  86. package/dist-types/ts3.4/commands/AssociateFeedCommand.d.ts +50 -0
  87. package/dist-types/ts3.4/commands/CreateFeedCommand.d.ts +47 -0
  88. package/dist-types/ts3.4/commands/DeleteFeedCommand.d.ts +47 -0
  89. package/dist-types/ts3.4/commands/DisassociateFeedCommand.d.ts +50 -0
  90. package/dist-types/ts3.4/commands/GetFeedCommand.d.ts +43 -0
  91. package/dist-types/ts3.4/commands/ListFeedsCommand.d.ts +47 -0
  92. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  93. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
  94. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
  95. package/dist-types/ts3.4/commands/UpdateFeedCommand.d.ts +47 -0
  96. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  97. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  98. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  99. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  100. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  101. package/dist-types/ts3.4/index.d.ts +13 -0
  102. package/dist-types/ts3.4/models/ElementalInferenceServiceException.d.ts +9 -0
  103. package/dist-types/ts3.4/models/enums.d.ts +15 -0
  104. package/dist-types/ts3.4/models/errors.d.ts +52 -0
  105. package/dist-types/ts3.4/models/models_0.d.ts +153 -0
  106. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  107. package/dist-types/ts3.4/pagination/ListFeedsPaginator.d.ts +11 -0
  108. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  109. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +102 -0
  110. package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
  111. package/dist-types/ts3.4/runtimeConfig.native.d.ts +106 -0
  112. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +32 -0
  113. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  114. package/dist-types/ts3.4/schemas/schemas_0.d.ts +52 -0
  115. package/dist-types/ts3.4/waiters/index.d.ts +1 -0
  116. package/dist-types/ts3.4/waiters/waitForFeedDeleted.d.ts +11 -0
  117. package/dist-types/waiters/index.d.ts +1 -0
  118. package/dist-types/waiters/waitForFeedDeleted.d.ts +14 -0
  119. package/package.json +101 -0
@@ -0,0 +1,362 @@
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var schema = require('@smithy/core/schema');
10
+ var middlewareContentLength = require('@smithy/middleware-content-length');
11
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
12
+ var middlewareRetry = require('@smithy/middleware-retry');
13
+ var smithyClient = require('@smithy/smithy-client');
14
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
15
+ var runtimeConfig = require('./runtimeConfig');
16
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
17
+ var protocolHttp = require('@smithy/protocol-http');
18
+ var schemas_0 = require('./schemas/schemas_0');
19
+ var utilWaiter = require('@smithy/util-waiter');
20
+ var errors = require('./models/errors');
21
+ var ElementalInferenceServiceException = require('./models/ElementalInferenceServiceException');
22
+
23
+ const resolveClientEndpointParameters = (options) => {
24
+ return Object.assign(options, {
25
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
26
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
27
+ defaultSigningName: "elemental-inference",
28
+ });
29
+ };
30
+ const commonParams = {
31
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
32
+ Endpoint: { type: "builtInParams", name: "endpoint" },
33
+ Region: { type: "builtInParams", name: "region" },
34
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
35
+ };
36
+
37
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
38
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
39
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
40
+ let _credentials = runtimeConfig.credentials;
41
+ return {
42
+ setHttpAuthScheme(httpAuthScheme) {
43
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
44
+ if (index === -1) {
45
+ _httpAuthSchemes.push(httpAuthScheme);
46
+ }
47
+ else {
48
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
49
+ }
50
+ },
51
+ httpAuthSchemes() {
52
+ return _httpAuthSchemes;
53
+ },
54
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
55
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
56
+ },
57
+ httpAuthSchemeProvider() {
58
+ return _httpAuthSchemeProvider;
59
+ },
60
+ setCredentials(credentials) {
61
+ _credentials = credentials;
62
+ },
63
+ credentials() {
64
+ return _credentials;
65
+ },
66
+ };
67
+ };
68
+ const resolveHttpAuthRuntimeConfig = (config) => {
69
+ return {
70
+ httpAuthSchemes: config.httpAuthSchemes(),
71
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
72
+ credentials: config.credentials(),
73
+ };
74
+ };
75
+
76
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
77
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
78
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
79
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
80
+ };
81
+
82
+ class ElementalInferenceClient extends smithyClient.Client {
83
+ config;
84
+ constructor(...[configuration]) {
85
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
86
+ super(_config_0);
87
+ this.initConfig = _config_0;
88
+ const _config_1 = resolveClientEndpointParameters(_config_0);
89
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
90
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
91
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
92
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
93
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
94
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
95
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
96
+ this.config = _config_8;
97
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
98
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
100
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
101
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
102
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
103
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
104
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
105
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultElementalInferenceHttpAuthSchemeParametersProvider,
106
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
107
+ "aws.auth#sigv4": config.credentials,
108
+ }),
109
+ }));
110
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
111
+ }
112
+ destroy() {
113
+ super.destroy();
114
+ }
115
+ }
116
+
117
+ class AssociateFeedCommand extends smithyClient.Command
118
+ .classBuilder()
119
+ .ep(commonParams)
120
+ .m(function (Command, cs, config, o) {
121
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
122
+ })
123
+ .s("ElementalInference", "AssociateFeed", {})
124
+ .n("ElementalInferenceClient", "AssociateFeedCommand")
125
+ .sc(schemas_0.AssociateFeed$)
126
+ .build() {
127
+ }
128
+
129
+ class CreateFeedCommand extends smithyClient.Command
130
+ .classBuilder()
131
+ .ep(commonParams)
132
+ .m(function (Command, cs, config, o) {
133
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
134
+ })
135
+ .s("ElementalInference", "CreateFeed", {})
136
+ .n("ElementalInferenceClient", "CreateFeedCommand")
137
+ .sc(schemas_0.CreateFeed$)
138
+ .build() {
139
+ }
140
+
141
+ class DeleteFeedCommand extends smithyClient.Command
142
+ .classBuilder()
143
+ .ep(commonParams)
144
+ .m(function (Command, cs, config, o) {
145
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
146
+ })
147
+ .s("ElementalInference", "DeleteFeed", {})
148
+ .n("ElementalInferenceClient", "DeleteFeedCommand")
149
+ .sc(schemas_0.DeleteFeed$)
150
+ .build() {
151
+ }
152
+
153
+ class DisassociateFeedCommand extends smithyClient.Command
154
+ .classBuilder()
155
+ .ep(commonParams)
156
+ .m(function (Command, cs, config, o) {
157
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
158
+ })
159
+ .s("ElementalInference", "DisassociateFeed", {})
160
+ .n("ElementalInferenceClient", "DisassociateFeedCommand")
161
+ .sc(schemas_0.DisassociateFeed$)
162
+ .build() {
163
+ }
164
+
165
+ class GetFeedCommand extends smithyClient.Command
166
+ .classBuilder()
167
+ .ep(commonParams)
168
+ .m(function (Command, cs, config, o) {
169
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
170
+ })
171
+ .s("ElementalInference", "GetFeed", {})
172
+ .n("ElementalInferenceClient", "GetFeedCommand")
173
+ .sc(schemas_0.GetFeed$)
174
+ .build() {
175
+ }
176
+
177
+ class ListFeedsCommand extends smithyClient.Command
178
+ .classBuilder()
179
+ .ep(commonParams)
180
+ .m(function (Command, cs, config, o) {
181
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
182
+ })
183
+ .s("ElementalInference", "ListFeeds", {})
184
+ .n("ElementalInferenceClient", "ListFeedsCommand")
185
+ .sc(schemas_0.ListFeeds$)
186
+ .build() {
187
+ }
188
+
189
+ class ListTagsForResourceCommand extends smithyClient.Command
190
+ .classBuilder()
191
+ .ep(commonParams)
192
+ .m(function (Command, cs, config, o) {
193
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
194
+ })
195
+ .s("ElementalInference", "ListTagsForResource", {})
196
+ .n("ElementalInferenceClient", "ListTagsForResourceCommand")
197
+ .sc(schemas_0.ListTagsForResource$)
198
+ .build() {
199
+ }
200
+
201
+ class TagResourceCommand extends smithyClient.Command
202
+ .classBuilder()
203
+ .ep(commonParams)
204
+ .m(function (Command, cs, config, o) {
205
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
206
+ })
207
+ .s("ElementalInference", "TagResource", {})
208
+ .n("ElementalInferenceClient", "TagResourceCommand")
209
+ .sc(schemas_0.TagResource$)
210
+ .build() {
211
+ }
212
+
213
+ class UntagResourceCommand extends smithyClient.Command
214
+ .classBuilder()
215
+ .ep(commonParams)
216
+ .m(function (Command, cs, config, o) {
217
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
218
+ })
219
+ .s("ElementalInference", "UntagResource", {})
220
+ .n("ElementalInferenceClient", "UntagResourceCommand")
221
+ .sc(schemas_0.UntagResource$)
222
+ .build() {
223
+ }
224
+
225
+ class UpdateFeedCommand extends smithyClient.Command
226
+ .classBuilder()
227
+ .ep(commonParams)
228
+ .m(function (Command, cs, config, o) {
229
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
230
+ })
231
+ .s("ElementalInference", "UpdateFeed", {})
232
+ .n("ElementalInferenceClient", "UpdateFeedCommand")
233
+ .sc(schemas_0.UpdateFeed$)
234
+ .build() {
235
+ }
236
+
237
+ const paginateListFeeds = core.createPaginator(ElementalInferenceClient, ListFeedsCommand, "nextToken", "nextToken", "maxResults");
238
+
239
+ const checkState = async (client, input) => {
240
+ let reason;
241
+ try {
242
+ let result = await client.send(new GetFeedCommand(input));
243
+ reason = result;
244
+ try {
245
+ const returnComparator = () => {
246
+ return result.status;
247
+ };
248
+ if (returnComparator() === "DELETED") {
249
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
250
+ }
251
+ }
252
+ catch (e) { }
253
+ try {
254
+ const returnComparator = () => {
255
+ return result.status;
256
+ };
257
+ if (returnComparator() === "DELETING") {
258
+ return { state: utilWaiter.WaiterState.RETRY, reason };
259
+ }
260
+ }
261
+ catch (e) { }
262
+ }
263
+ catch (exception) {
264
+ reason = exception;
265
+ if (exception.name && exception.name == "ResourceNotFoundException") {
266
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
267
+ }
268
+ if (exception.name && exception.name == "InternalServerErrorException") {
269
+ return { state: utilWaiter.WaiterState.RETRY, reason };
270
+ }
271
+ if (exception.name && exception.name == "TooManyRequestException") {
272
+ return { state: utilWaiter.WaiterState.RETRY, reason };
273
+ }
274
+ }
275
+ return { state: utilWaiter.WaiterState.RETRY, reason };
276
+ };
277
+ const waitForFeedDeleted = async (params, input) => {
278
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
279
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
280
+ };
281
+ const waitUntilFeedDeleted = async (params, input) => {
282
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
283
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
284
+ return utilWaiter.checkExceptions(result);
285
+ };
286
+
287
+ const commands = {
288
+ AssociateFeedCommand,
289
+ CreateFeedCommand,
290
+ DeleteFeedCommand,
291
+ DisassociateFeedCommand,
292
+ GetFeedCommand,
293
+ ListFeedsCommand,
294
+ ListTagsForResourceCommand,
295
+ TagResourceCommand,
296
+ UntagResourceCommand,
297
+ UpdateFeedCommand,
298
+ };
299
+ const paginators = {
300
+ paginateListFeeds,
301
+ };
302
+ const waiters = {
303
+ waitUntilFeedDeleted,
304
+ };
305
+ class ElementalInference extends ElementalInferenceClient {
306
+ }
307
+ smithyClient.createAggregatedClient(commands, ElementalInference, { paginators, waiters });
308
+
309
+ const OutputStatus = {
310
+ DISABLED: "DISABLED",
311
+ ENABLED: "ENABLED",
312
+ };
313
+ const FeedStatus = {
314
+ ACTIVE: "ACTIVE",
315
+ ARCHIVED: "ARCHIVED",
316
+ AVAILABLE: "AVAILABLE",
317
+ CREATING: "CREATING",
318
+ DELETED: "DELETED",
319
+ DELETING: "DELETING",
320
+ UPDATING: "UPDATING",
321
+ };
322
+
323
+ exports.$Command = smithyClient.Command;
324
+ exports.__Client = smithyClient.Client;
325
+ exports.ElementalInferenceServiceException = ElementalInferenceServiceException.ElementalInferenceServiceException;
326
+ exports.AssociateFeedCommand = AssociateFeedCommand;
327
+ exports.CreateFeedCommand = CreateFeedCommand;
328
+ exports.DeleteFeedCommand = DeleteFeedCommand;
329
+ exports.DisassociateFeedCommand = DisassociateFeedCommand;
330
+ exports.ElementalInference = ElementalInference;
331
+ exports.ElementalInferenceClient = ElementalInferenceClient;
332
+ exports.FeedStatus = FeedStatus;
333
+ exports.GetFeedCommand = GetFeedCommand;
334
+ exports.ListFeedsCommand = ListFeedsCommand;
335
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
336
+ exports.OutputStatus = OutputStatus;
337
+ exports.TagResourceCommand = TagResourceCommand;
338
+ exports.UntagResourceCommand = UntagResourceCommand;
339
+ exports.UpdateFeedCommand = UpdateFeedCommand;
340
+ exports.paginateListFeeds = paginateListFeeds;
341
+ exports.waitForFeedDeleted = waitForFeedDeleted;
342
+ exports.waitUntilFeedDeleted = waitUntilFeedDeleted;
343
+ Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
344
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
345
+ Object.defineProperty(exports, '__proto__', {
346
+ enumerable: true,
347
+ value: schemas_0['__proto__']
348
+ });
349
+
350
+ Object.keys(schemas_0).forEach(function (k) {
351
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
352
+ });
353
+ Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
354
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
355
+ Object.defineProperty(exports, '__proto__', {
356
+ enumerable: true,
357
+ value: errors['__proto__']
358
+ });
359
+
360
+ Object.keys(errors).forEach(function (k) {
361
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
362
+ });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ElementalInferenceServiceException = 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 ElementalInferenceServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, ElementalInferenceServiceException.prototype);
10
+ }
11
+ }
12
+ exports.ElementalInferenceServiceException = ElementalInferenceServiceException;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationException = exports.TooManyRequestException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerErrorException = exports.ConflictException = exports.AccessDeniedException = void 0;
4
+ const ElementalInferenceServiceException_1 = require("./ElementalInferenceServiceException");
5
+ class AccessDeniedException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
6
+ name = "AccessDeniedException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "AccessDeniedException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
+ }
16
+ }
17
+ exports.AccessDeniedException = AccessDeniedException;
18
+ class ConflictException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
19
+ name = "ConflictException";
20
+ $fault = "client";
21
+ $retryable = {};
22
+ constructor(opts) {
23
+ super({
24
+ name: "ConflictException",
25
+ $fault: "client",
26
+ ...opts,
27
+ });
28
+ Object.setPrototypeOf(this, ConflictException.prototype);
29
+ }
30
+ }
31
+ exports.ConflictException = ConflictException;
32
+ class InternalServerErrorException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
33
+ name = "InternalServerErrorException";
34
+ $fault = "server";
35
+ $retryable = {};
36
+ constructor(opts) {
37
+ super({
38
+ name: "InternalServerErrorException",
39
+ $fault: "server",
40
+ ...opts,
41
+ });
42
+ Object.setPrototypeOf(this, InternalServerErrorException.prototype);
43
+ }
44
+ }
45
+ exports.InternalServerErrorException = InternalServerErrorException;
46
+ class ResourceNotFoundException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
47
+ name = "ResourceNotFoundException";
48
+ $fault = "client";
49
+ constructor(opts) {
50
+ super({
51
+ name: "ResourceNotFoundException",
52
+ $fault: "client",
53
+ ...opts,
54
+ });
55
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
56
+ }
57
+ }
58
+ exports.ResourceNotFoundException = ResourceNotFoundException;
59
+ class ServiceQuotaExceededException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
60
+ name = "ServiceQuotaExceededException";
61
+ $fault = "client";
62
+ constructor(opts) {
63
+ super({
64
+ name: "ServiceQuotaExceededException",
65
+ $fault: "client",
66
+ ...opts,
67
+ });
68
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
69
+ }
70
+ }
71
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
72
+ class TooManyRequestException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
73
+ name = "TooManyRequestException";
74
+ $fault = "client";
75
+ $retryable = {};
76
+ constructor(opts) {
77
+ super({
78
+ name: "TooManyRequestException",
79
+ $fault: "client",
80
+ ...opts,
81
+ });
82
+ Object.setPrototypeOf(this, TooManyRequestException.prototype);
83
+ }
84
+ }
85
+ exports.TooManyRequestException = TooManyRequestException;
86
+ class ValidationException extends ElementalInferenceServiceException_1.ElementalInferenceServiceException {
87
+ name = "ValidationException";
88
+ $fault = "client";
89
+ constructor(opts) {
90
+ super({
91
+ name: "ValidationException",
92
+ $fault: "client",
93
+ ...opts,
94
+ });
95
+ Object.setPrototypeOf(this, ValidationException.prototype);
96
+ }
97
+ }
98
+ exports.ValidationException = ValidationException;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const smithy_client_1 = require("@smithy/smithy-client");
12
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
13
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
14
+ const util_retry_1 = require("@smithy/util-retry");
15
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
29
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
30
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
32
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
33
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
34
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
35
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
36
+ };
37
+ };
38
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const core_1 = require("@aws-sdk/core");
7
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
8
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
9
+ const config_resolver_1 = require("@smithy/config-resolver");
10
+ const hash_node_1 = require("@smithy/hash-node");
11
+ const middleware_retry_1 = require("@smithy/middleware-retry");
12
+ const node_config_provider_1 = require("@smithy/node-config-provider");
13
+ const node_http_handler_1 = require("@smithy/node-http-handler");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
16
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
17
+ const util_retry_1 = require("@smithy/util-retry");
18
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
19
+ const getRuntimeConfig = (config) => {
20
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
21
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
22
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
23
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
24
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
25
+ const loaderConfig = {
26
+ profile: config?.profile,
27
+ logger: clientSharedValues.logger,
28
+ };
29
+ return {
30
+ ...clientSharedValues,
31
+ ...config,
32
+ runtime: "node",
33
+ defaultsMode,
34
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
35
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
36
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
37
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
38
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
39
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
40
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
41
+ retryMode: config?.retryMode ??
42
+ (0, node_config_provider_1.loadConfig)({
43
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
44
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
45
+ }, config),
46
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
47
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
48
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
49
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
50
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
51
+ };
52
+ };
53
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const url_parser_1 = require("@smithy/url-parser");
8
+ const util_base64_1 = require("@smithy/util-base64");
9
+ const util_utf8_1 = require("@smithy/util-utf8");
10
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
11
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
12
+ const schemas_0_1 = require("./schemas/schemas_0");
13
+ const getRuntimeConfig = (config) => {
14
+ return {
15
+ apiVersion: "2018-11-14",
16
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
17
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
18
+ disableHostPrefix: config?.disableHostPrefix ?? false,
19
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
20
+ extensions: config?.extensions ?? [],
21
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultElementalInferenceHttpAuthSchemeProvider,
22
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
23
+ {
24
+ schemeId: "aws.auth#sigv4",
25
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
26
+ signer: new core_1.AwsSdkSigV4Signer(),
27
+ },
28
+ ],
29
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
30
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
31
+ protocolSettings: config?.protocolSettings ?? {
32
+ defaultNamespace: "com.amazonaws.elementalinference",
33
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
34
+ version: "2018-11-14",
35
+ serviceTarget: "ElementalInference",
36
+ },
37
+ serviceId: config?.serviceId ?? "ElementalInference",
38
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
39
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
40
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
41
+ };
42
+ };
43
+ exports.getRuntimeConfig = getRuntimeConfig;