@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.
- package/LICENSE +201 -0
- package/README.md +271 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +362 -0
- package/dist-cjs/models/ElementalInferenceServiceException.js +12 -0
- package/dist-cjs/models/errors.js +98 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +53 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +43 -0
- package/dist-cjs/schemas/schemas_0.js +309 -0
- package/dist-es/ElementalInference.js +35 -0
- package/dist-es/ElementalInferenceClient.js +50 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/AssociateFeedCommand.js +16 -0
- package/dist-es/commands/CreateFeedCommand.js +16 -0
- package/dist-es/commands/DeleteFeedCommand.js +16 -0
- package/dist-es/commands/DisassociateFeedCommand.js +16 -0
- package/dist-es/commands/GetFeedCommand.js +16 -0
- package/dist-es/commands/ListFeedsCommand.js +16 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +16 -0
- package/dist-es/commands/TagResourceCommand.js +16 -0
- package/dist-es/commands/UntagResourceCommand.js +16 -0
- package/dist-es/commands/UpdateFeedCommand.js +16 -0
- package/dist-es/commands/index.js +10 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +10 -0
- package/dist-es/models/ElementalInferenceServiceException.js +8 -0
- package/dist-es/models/enums.js +13 -0
- package/dist-es/models/errors.js +88 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListFeedsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +39 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +306 -0
- package/dist-es/waiters/index.js +1 -0
- package/dist-es/waiters/waitForFeedDeleted.js +49 -0
- package/dist-types/ElementalInference.d.ts +95 -0
- package/dist-types/ElementalInferenceClient.d.ts +197 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/AssociateFeedCommand.d.ts +111 -0
- package/dist-types/commands/CreateFeedCommand.d.ts +134 -0
- package/dist-types/commands/DeleteFeedCommand.d.ts +94 -0
- package/dist-types/commands/DisassociateFeedCommand.d.ts +95 -0
- package/dist-types/commands/GetFeedCommand.d.ts +112 -0
- package/dist-types/commands/ListFeedsCommand.d.ts +101 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +91 -0
- package/dist-types/commands/TagResourceCommand.d.ts +93 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +93 -0
- package/dist-types/commands/UpdateFeedCommand.d.ts +136 -0
- package/dist-types/commands/index.d.ts +10 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +18 -0
- package/dist-types/models/ElementalInferenceServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +29 -0
- package/dist-types/models/errors.d.ts +89 -0
- package/dist-types/models/models_0.d.ts +563 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListFeedsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -0
- package/dist-types/runtimeConfig.shared.d.ts +27 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +52 -0
- package/dist-types/ts3.4/ElementalInference.d.ts +200 -0
- package/dist-types/ts3.4/ElementalInferenceClient.d.ts +182 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/AssociateFeedCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateFeedCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/DeleteFeedCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/DisassociateFeedCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetFeedCommand.d.ts +43 -0
- package/dist-types/ts3.4/commands/ListFeedsCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
- package/dist-types/ts3.4/commands/UpdateFeedCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/index.d.ts +10 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +13 -0
- package/dist-types/ts3.4/models/ElementalInferenceServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +15 -0
- package/dist-types/ts3.4/models/errors.d.ts +52 -0
- package/dist-types/ts3.4/models/models_0.d.ts +153 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListFeedsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +102 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +106 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +32 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +52 -0
- package/dist-types/ts3.4/waiters/index.d.ts +1 -0
- package/dist-types/ts3.4/waiters/waitForFeedDeleted.d.ts +11 -0
- package/dist-types/waiters/index.d.ts +1 -0
- package/dist-types/waiters/waitForFeedDeleted.d.ts +14 -0
- package/package.json +101 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
|
|
2
|
+
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
|
|
3
|
+
import { ruleSet } from "./ruleset";
|
|
4
|
+
const cache = new EndpointCache({
|
|
5
|
+
size: 50,
|
|
6
|
+
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
+
});
|
|
8
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
|
|
10
|
+
endpointParams: endpointParams,
|
|
11
|
+
logger: context.logger,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const s = "required", t = "fn", u = "argv", v = "ref";
|
|
2
|
+
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "string" }, i = { [s]: true, "default": false, "type": "boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://elemental-inference-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://elemental-inference-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://elemental-inference.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://elemental-inference.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
4
|
+
export const ruleSet = _data;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./ElementalInferenceClient";
|
|
2
|
+
export * from "./ElementalInference";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./pagination";
|
|
6
|
+
export * from "./waiters";
|
|
7
|
+
export * from "./models/enums";
|
|
8
|
+
export * from "./models/errors";
|
|
9
|
+
export * from "./models/models_0";
|
|
10
|
+
export { ElementalInferenceServiceException } from "./models/ElementalInferenceServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class ElementalInferenceServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, ElementalInferenceServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const OutputStatus = {
|
|
2
|
+
DISABLED: "DISABLED",
|
|
3
|
+
ENABLED: "ENABLED",
|
|
4
|
+
};
|
|
5
|
+
export const FeedStatus = {
|
|
6
|
+
ACTIVE: "ACTIVE",
|
|
7
|
+
ARCHIVED: "ARCHIVED",
|
|
8
|
+
AVAILABLE: "AVAILABLE",
|
|
9
|
+
CREATING: "CREATING",
|
|
10
|
+
DELETED: "DELETED",
|
|
11
|
+
DELETING: "DELETING",
|
|
12
|
+
UPDATING: "UPDATING",
|
|
13
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ElementalInferenceServiceException as __BaseException } from "./ElementalInferenceServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ConflictException extends __BaseException {
|
|
15
|
+
name = "ConflictException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
$retryable = {};
|
|
18
|
+
constructor(opts) {
|
|
19
|
+
super({
|
|
20
|
+
name: "ConflictException",
|
|
21
|
+
$fault: "client",
|
|
22
|
+
...opts,
|
|
23
|
+
});
|
|
24
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class InternalServerErrorException extends __BaseException {
|
|
28
|
+
name = "InternalServerErrorException";
|
|
29
|
+
$fault = "server";
|
|
30
|
+
$retryable = {};
|
|
31
|
+
constructor(opts) {
|
|
32
|
+
super({
|
|
33
|
+
name: "InternalServerErrorException",
|
|
34
|
+
$fault: "server",
|
|
35
|
+
...opts,
|
|
36
|
+
});
|
|
37
|
+
Object.setPrototypeOf(this, InternalServerErrorException.prototype);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
41
|
+
name = "ResourceNotFoundException";
|
|
42
|
+
$fault = "client";
|
|
43
|
+
constructor(opts) {
|
|
44
|
+
super({
|
|
45
|
+
name: "ResourceNotFoundException",
|
|
46
|
+
$fault: "client",
|
|
47
|
+
...opts,
|
|
48
|
+
});
|
|
49
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
53
|
+
name = "ServiceQuotaExceededException";
|
|
54
|
+
$fault = "client";
|
|
55
|
+
constructor(opts) {
|
|
56
|
+
super({
|
|
57
|
+
name: "ServiceQuotaExceededException",
|
|
58
|
+
$fault: "client",
|
|
59
|
+
...opts,
|
|
60
|
+
});
|
|
61
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class TooManyRequestException extends __BaseException {
|
|
65
|
+
name = "TooManyRequestException";
|
|
66
|
+
$fault = "client";
|
|
67
|
+
$retryable = {};
|
|
68
|
+
constructor(opts) {
|
|
69
|
+
super({
|
|
70
|
+
name: "TooManyRequestException",
|
|
71
|
+
$fault: "client",
|
|
72
|
+
...opts,
|
|
73
|
+
});
|
|
74
|
+
Object.setPrototypeOf(this, TooManyRequestException.prototype);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export class ValidationException extends __BaseException {
|
|
78
|
+
name = "ValidationException";
|
|
79
|
+
$fault = "client";
|
|
80
|
+
constructor(opts) {
|
|
81
|
+
super({
|
|
82
|
+
name: "ValidationException",
|
|
83
|
+
$fault: "client",
|
|
84
|
+
...opts,
|
|
85
|
+
});
|
|
86
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListFeedsCommand } from "../commands/ListFeedsCommand";
|
|
3
|
+
import { ElementalInferenceClient } from "../ElementalInferenceClient";
|
|
4
|
+
export const paginateListFeeds = createPaginator(ElementalInferenceClient, ListFeedsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
9
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
10
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
11
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
24
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
28
|
+
sha256: config?.sha256 ?? Sha256,
|
|
29
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
31
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
6
|
+
import { Hash } from "@smithy/hash-node";
|
|
7
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
12
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
13
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
14
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
+
export const getRuntimeConfig = (config) => {
|
|
16
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
17
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
+
awsCheckVersion(process.version);
|
|
21
|
+
const loaderConfig = {
|
|
22
|
+
profile: config?.profile,
|
|
23
|
+
logger: clientSharedValues.logger,
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
...clientSharedValues,
|
|
27
|
+
...config,
|
|
28
|
+
runtime: "node",
|
|
29
|
+
defaultsMode,
|
|
30
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
34
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
35
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
36
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
37
|
+
retryMode: config?.retryMode ??
|
|
38
|
+
loadNodeConfig({
|
|
39
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
41
|
+
}, config),
|
|
42
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
43
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
44
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
45
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
46
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export 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
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
4
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
5
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
6
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
7
|
+
import { defaultElementalInferenceHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
apiVersion: "2018-11-14",
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
+
extensions: config?.extensions ?? [],
|
|
18
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultElementalInferenceHttpAuthSchemeProvider,
|
|
19
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
20
|
+
{
|
|
21
|
+
schemeId: "aws.auth#sigv4",
|
|
22
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
23
|
+
signer: new AwsSdkSigV4Signer(),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
27
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
28
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
29
|
+
defaultNamespace: "com.amazonaws.elementalinference",
|
|
30
|
+
errorTypeRegistries,
|
|
31
|
+
version: "2018-11-14",
|
|
32
|
+
serviceTarget: "ElementalInference",
|
|
33
|
+
},
|
|
34
|
+
serviceId: config?.serviceId ?? "ElementalInference",
|
|
35
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
36
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
37
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
const _ADE = "AccessDeniedException";
|
|
2
|
+
const _AF = "AssociateFeed";
|
|
3
|
+
const _AFR = "AssociateFeedRequest";
|
|
4
|
+
const _AFRs = "AssociateFeedResponse";
|
|
5
|
+
const _CC = "ClippingConfig";
|
|
6
|
+
const _CCr = "CroppingConfig";
|
|
7
|
+
const _CE = "ConflictException";
|
|
8
|
+
const _CF = "CreateFeed";
|
|
9
|
+
const _CFR = "CreateFeedRequest";
|
|
10
|
+
const _CFRr = "CreateFeedResponse";
|
|
11
|
+
const _CO = "CreateOutput";
|
|
12
|
+
const _COL = "CreateOutputList";
|
|
13
|
+
const _DF = "DeleteFeed";
|
|
14
|
+
const _DFR = "DeleteFeedRequest";
|
|
15
|
+
const _DFRe = "DeleteFeedResponse";
|
|
16
|
+
const _DFRi = "DisassociateFeedRequest";
|
|
17
|
+
const _DFRis = "DisassociateFeedResponse";
|
|
18
|
+
const _DFi = "DisassociateFeed";
|
|
19
|
+
const _FA = "FeedAssociation";
|
|
20
|
+
const _FS = "FeedSummary";
|
|
21
|
+
const _FSL = "FeedSummaryList";
|
|
22
|
+
const _GF = "GetFeed";
|
|
23
|
+
const _GFR = "GetFeedRequest";
|
|
24
|
+
const _GFRe = "GetFeedResponse";
|
|
25
|
+
const _GO = "GetOutput";
|
|
26
|
+
const _GOL = "GetOutputList";
|
|
27
|
+
const _ISEE = "InternalServerErrorException";
|
|
28
|
+
const _LF = "ListFeeds";
|
|
29
|
+
const _LFR = "ListFeedsRequest";
|
|
30
|
+
const _LFRi = "ListFeedsResponse";
|
|
31
|
+
const _LTFR = "ListTagsForResource";
|
|
32
|
+
const _LTFRR = "ListTagsForResourceRequest";
|
|
33
|
+
const _LTFRRi = "ListTagsForResourceResponse";
|
|
34
|
+
const _OC = "OutputConfig";
|
|
35
|
+
const _RNFE = "ResourceNotFoundException";
|
|
36
|
+
const _SQEE = "ServiceQuotaExceededException";
|
|
37
|
+
const _TMRE = "TooManyRequestException";
|
|
38
|
+
const _TR = "TagResource";
|
|
39
|
+
const _TRR = "TagResourceRequest";
|
|
40
|
+
const _UF = "UpdateFeed";
|
|
41
|
+
const _UFR = "UpdateFeedRequest";
|
|
42
|
+
const _UFRp = "UpdateFeedResponse";
|
|
43
|
+
const _UO = "UpdateOutput";
|
|
44
|
+
const _UOL = "UpdateOutputList";
|
|
45
|
+
const _UR = "UntagResource";
|
|
46
|
+
const _URR = "UntagResourceRequest";
|
|
47
|
+
const _VE = "ValidationException";
|
|
48
|
+
const _a = "arn";
|
|
49
|
+
const _aRN = "associatedResourceName";
|
|
50
|
+
const _as = "association";
|
|
51
|
+
const _c = "client";
|
|
52
|
+
const _cM = "callbackMetadata";
|
|
53
|
+
const _cl = "clipping";
|
|
54
|
+
const _cr = "cropping";
|
|
55
|
+
const _d = "description";
|
|
56
|
+
const _dE = "dataEndpoints";
|
|
57
|
+
const _dR = "dryRun";
|
|
58
|
+
const _e = "error";
|
|
59
|
+
const _f = "feeds";
|
|
60
|
+
const _fA = "fromAssociation";
|
|
61
|
+
const _h = "http";
|
|
62
|
+
const _hE = "httpError";
|
|
63
|
+
const _hQ = "httpQuery";
|
|
64
|
+
const _i = "id";
|
|
65
|
+
const _m = "message";
|
|
66
|
+
const _mR = "maxResults";
|
|
67
|
+
const _n = "name";
|
|
68
|
+
const _nT = "nextToken";
|
|
69
|
+
const _o = "outputs";
|
|
70
|
+
const _oC = "outputConfig";
|
|
71
|
+
const _rA = "resourceArn";
|
|
72
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.elementalinference";
|
|
73
|
+
const _se = "server";
|
|
74
|
+
const _st = "status";
|
|
75
|
+
const _t = "tags";
|
|
76
|
+
const _tK = "tagKeys";
|
|
77
|
+
const n0 = "com.amazonaws.elementalinference";
|
|
78
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
79
|
+
import { ElementalInferenceServiceException } from "../models/ElementalInferenceServiceException";
|
|
80
|
+
import { AccessDeniedException, ConflictException, InternalServerErrorException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyRequestException, ValidationException, } from "../models/errors";
|
|
81
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
82
|
+
export var ElementalInferenceServiceException$ = [-3, _s, "ElementalInferenceServiceException", 0, [], []];
|
|
83
|
+
_s_registry.registerError(ElementalInferenceServiceException$, ElementalInferenceServiceException);
|
|
84
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
85
|
+
export var AccessDeniedException$ = [-3, n0, _ADE,
|
|
86
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
87
|
+
[_m],
|
|
88
|
+
[0], 1
|
|
89
|
+
];
|
|
90
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
91
|
+
export var ConflictException$ = [-3, n0, _CE,
|
|
92
|
+
{ [_e]: _c, [_hE]: 409 },
|
|
93
|
+
[_m],
|
|
94
|
+
[0], 1
|
|
95
|
+
];
|
|
96
|
+
n0_registry.registerError(ConflictException$, ConflictException);
|
|
97
|
+
export var InternalServerErrorException$ = [-3, n0, _ISEE,
|
|
98
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
99
|
+
[_m],
|
|
100
|
+
[0], 1
|
|
101
|
+
];
|
|
102
|
+
n0_registry.registerError(InternalServerErrorException$, InternalServerErrorException);
|
|
103
|
+
export var ResourceNotFoundException$ = [-3, n0, _RNFE,
|
|
104
|
+
{ [_e]: _c, [_hE]: 404 },
|
|
105
|
+
[_m],
|
|
106
|
+
[0], 1
|
|
107
|
+
];
|
|
108
|
+
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
109
|
+
export var ServiceQuotaExceededException$ = [-3, n0, _SQEE,
|
|
110
|
+
{ [_e]: _c, [_hE]: 402 },
|
|
111
|
+
[_m],
|
|
112
|
+
[0], 1
|
|
113
|
+
];
|
|
114
|
+
n0_registry.registerError(ServiceQuotaExceededException$, ServiceQuotaExceededException);
|
|
115
|
+
export var TooManyRequestException$ = [-3, n0, _TMRE,
|
|
116
|
+
{ [_e]: _c, [_hE]: 429 },
|
|
117
|
+
[_m],
|
|
118
|
+
[0], 1
|
|
119
|
+
];
|
|
120
|
+
n0_registry.registerError(TooManyRequestException$, TooManyRequestException);
|
|
121
|
+
export var ValidationException$ = [-3, n0, _VE,
|
|
122
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
123
|
+
[_m],
|
|
124
|
+
[0], 1
|
|
125
|
+
];
|
|
126
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
127
|
+
export const errorTypeRegistries = [
|
|
128
|
+
_s_registry,
|
|
129
|
+
n0_registry,
|
|
130
|
+
];
|
|
131
|
+
export var AssociateFeedRequest$ = [3, n0, _AFR,
|
|
132
|
+
0,
|
|
133
|
+
[_i, _o, _aRN, _dR],
|
|
134
|
+
[[0, 1], () => CreateOutputList, [0, 4], 2], 2
|
|
135
|
+
];
|
|
136
|
+
export var AssociateFeedResponse$ = [3, n0, _AFRs,
|
|
137
|
+
0,
|
|
138
|
+
[_a, _i],
|
|
139
|
+
[0, 0], 2
|
|
140
|
+
];
|
|
141
|
+
export var ClippingConfig$ = [3, n0, _CC,
|
|
142
|
+
0,
|
|
143
|
+
[_cM],
|
|
144
|
+
[0]
|
|
145
|
+
];
|
|
146
|
+
export var CreateFeedRequest$ = [3, n0, _CFR,
|
|
147
|
+
0,
|
|
148
|
+
[_n, _o, _t],
|
|
149
|
+
[0, () => CreateOutputList, 128 | 0], 2
|
|
150
|
+
];
|
|
151
|
+
export var CreateFeedResponse$ = [3, n0, _CFRr,
|
|
152
|
+
0,
|
|
153
|
+
[_a, _n, _i, _dE, _o, _st, _as, _t],
|
|
154
|
+
[0, 0, 0, 64 | 0, () => GetOutputList, 0, () => FeedAssociation$, 128 | 0], 6
|
|
155
|
+
];
|
|
156
|
+
export var CreateOutput$ = [3, n0, _CO,
|
|
157
|
+
0,
|
|
158
|
+
[_n, _oC, _st, _d],
|
|
159
|
+
[0, () => OutputConfig$, 0, 0], 3
|
|
160
|
+
];
|
|
161
|
+
export var CroppingConfig$ = [3, n0, _CCr,
|
|
162
|
+
0,
|
|
163
|
+
[],
|
|
164
|
+
[]
|
|
165
|
+
];
|
|
166
|
+
export var DeleteFeedRequest$ = [3, n0, _DFR,
|
|
167
|
+
0,
|
|
168
|
+
[_i],
|
|
169
|
+
[[0, 1]], 1
|
|
170
|
+
];
|
|
171
|
+
export var DeleteFeedResponse$ = [3, n0, _DFRe,
|
|
172
|
+
0,
|
|
173
|
+
[_a, _i, _st],
|
|
174
|
+
[0, 0, 0], 3
|
|
175
|
+
];
|
|
176
|
+
export var DisassociateFeedRequest$ = [3, n0, _DFRi,
|
|
177
|
+
0,
|
|
178
|
+
[_i, _aRN, _dR],
|
|
179
|
+
[[0, 1], [0, 4], 2], 1
|
|
180
|
+
];
|
|
181
|
+
export var DisassociateFeedResponse$ = [3, n0, _DFRis,
|
|
182
|
+
0,
|
|
183
|
+
[_a, _i],
|
|
184
|
+
[0, 0], 2
|
|
185
|
+
];
|
|
186
|
+
export var FeedAssociation$ = [3, n0, _FA,
|
|
187
|
+
0,
|
|
188
|
+
[_aRN],
|
|
189
|
+
[0], 1
|
|
190
|
+
];
|
|
191
|
+
export var FeedSummary$ = [3, n0, _FS,
|
|
192
|
+
0,
|
|
193
|
+
[_a, _i, _n, _st, _as],
|
|
194
|
+
[0, 0, 0, 0, () => FeedAssociation$], 4
|
|
195
|
+
];
|
|
196
|
+
export var GetFeedRequest$ = [3, n0, _GFR,
|
|
197
|
+
0,
|
|
198
|
+
[_i],
|
|
199
|
+
[[0, 1]], 1
|
|
200
|
+
];
|
|
201
|
+
export var GetFeedResponse$ = [3, n0, _GFRe,
|
|
202
|
+
0,
|
|
203
|
+
[_a, _n, _i, _dE, _o, _st, _as, _t],
|
|
204
|
+
[0, 0, 0, 64 | 0, () => GetOutputList, 0, () => FeedAssociation$, 128 | 0], 6
|
|
205
|
+
];
|
|
206
|
+
export var GetOutput$ = [3, n0, _GO,
|
|
207
|
+
0,
|
|
208
|
+
[_n, _oC, _st, _d, _fA],
|
|
209
|
+
[0, () => OutputConfig$, 0, 0, 2], 3
|
|
210
|
+
];
|
|
211
|
+
export var ListFeedsRequest$ = [3, n0, _LFR,
|
|
212
|
+
0,
|
|
213
|
+
[_mR, _nT],
|
|
214
|
+
[[1, { [_hQ]: _mR }], [0, { [_hQ]: _nT }]]
|
|
215
|
+
];
|
|
216
|
+
export var ListFeedsResponse$ = [3, n0, _LFRi,
|
|
217
|
+
0,
|
|
218
|
+
[_f, _nT],
|
|
219
|
+
[() => FeedSummaryList, 0], 1
|
|
220
|
+
];
|
|
221
|
+
export var ListTagsForResourceRequest$ = [3, n0, _LTFRR,
|
|
222
|
+
0,
|
|
223
|
+
[_rA],
|
|
224
|
+
[[0, 1]], 1
|
|
225
|
+
];
|
|
226
|
+
export var ListTagsForResourceResponse$ = [3, n0, _LTFRRi,
|
|
227
|
+
0,
|
|
228
|
+
[_t],
|
|
229
|
+
[128 | 0]
|
|
230
|
+
];
|
|
231
|
+
export var TagResourceRequest$ = [3, n0, _TRR,
|
|
232
|
+
0,
|
|
233
|
+
[_rA, _t],
|
|
234
|
+
[[0, 1], 128 | 0], 2
|
|
235
|
+
];
|
|
236
|
+
export var UntagResourceRequest$ = [3, n0, _URR,
|
|
237
|
+
0,
|
|
238
|
+
[_rA, _tK],
|
|
239
|
+
[[0, 1], [64 | 0, { [_hQ]: _tK }]], 2
|
|
240
|
+
];
|
|
241
|
+
export var UpdateFeedRequest$ = [3, n0, _UFR,
|
|
242
|
+
0,
|
|
243
|
+
[_n, _i, _o],
|
|
244
|
+
[0, [0, 1], () => UpdateOutputList], 3
|
|
245
|
+
];
|
|
246
|
+
export var UpdateFeedResponse$ = [3, n0, _UFRp,
|
|
247
|
+
0,
|
|
248
|
+
[_a, _n, _i, _dE, _o, _st, _as, _t],
|
|
249
|
+
[0, 0, 0, 64 | 0, () => GetOutputList, 0, () => FeedAssociation$, 128 | 0], 6
|
|
250
|
+
];
|
|
251
|
+
export var UpdateOutput$ = [3, n0, _UO,
|
|
252
|
+
0,
|
|
253
|
+
[_n, _oC, _st, _d, _fA],
|
|
254
|
+
[0, () => OutputConfig$, 0, 0, 2], 3
|
|
255
|
+
];
|
|
256
|
+
var __Unit = "unit";
|
|
257
|
+
var CreateOutputList = [1, n0, _COL,
|
|
258
|
+
0, () => CreateOutput$
|
|
259
|
+
];
|
|
260
|
+
var FeedSummaryList = [1, n0, _FSL,
|
|
261
|
+
0, () => FeedSummary$
|
|
262
|
+
];
|
|
263
|
+
var GetOutputList = [1, n0, _GOL,
|
|
264
|
+
0, () => GetOutput$
|
|
265
|
+
];
|
|
266
|
+
var StringList = 64 | 0;
|
|
267
|
+
var TagKeyList = 64 | 0;
|
|
268
|
+
var UpdateOutputList = [1, n0, _UOL,
|
|
269
|
+
0, () => UpdateOutput$
|
|
270
|
+
];
|
|
271
|
+
var TagMap = 128 | 0;
|
|
272
|
+
export var OutputConfig$ = [4, n0, _OC,
|
|
273
|
+
0,
|
|
274
|
+
[_cr, _cl],
|
|
275
|
+
[() => CroppingConfig$, () => ClippingConfig$]
|
|
276
|
+
];
|
|
277
|
+
export var AssociateFeed$ = [9, n0, _AF,
|
|
278
|
+
{ [_h]: ["POST", "/v1/feed/{id}/associate", 200] }, () => AssociateFeedRequest$, () => AssociateFeedResponse$
|
|
279
|
+
];
|
|
280
|
+
export var CreateFeed$ = [9, n0, _CF,
|
|
281
|
+
{ [_h]: ["POST", "/v1/feed", 202] }, () => CreateFeedRequest$, () => CreateFeedResponse$
|
|
282
|
+
];
|
|
283
|
+
export var DeleteFeed$ = [9, n0, _DF,
|
|
284
|
+
{ [_h]: ["DELETE", "/v1/feed/{id}", 202] }, () => DeleteFeedRequest$, () => DeleteFeedResponse$
|
|
285
|
+
];
|
|
286
|
+
export var DisassociateFeed$ = [9, n0, _DFi,
|
|
287
|
+
{ [_h]: ["POST", "/v1/feed/{id}/disassociate", 200] }, () => DisassociateFeedRequest$, () => DisassociateFeedResponse$
|
|
288
|
+
];
|
|
289
|
+
export var GetFeed$ = [9, n0, _GF,
|
|
290
|
+
{ [_h]: ["GET", "/v1/feed/{id}", 200] }, () => GetFeedRequest$, () => GetFeedResponse$
|
|
291
|
+
];
|
|
292
|
+
export var ListFeeds$ = [9, n0, _LF,
|
|
293
|
+
{ [_h]: ["GET", "/v1/feeds", 200] }, () => ListFeedsRequest$, () => ListFeedsResponse$
|
|
294
|
+
];
|
|
295
|
+
export var ListTagsForResource$ = [9, n0, _LTFR,
|
|
296
|
+
{ [_h]: ["GET", "/v1/tags/{resourceArn}", 200] }, () => ListTagsForResourceRequest$, () => ListTagsForResourceResponse$
|
|
297
|
+
];
|
|
298
|
+
export var TagResource$ = [9, n0, _TR,
|
|
299
|
+
{ [_h]: ["POST", "/v1/tags/{resourceArn}", 204] }, () => TagResourceRequest$, () => __Unit
|
|
300
|
+
];
|
|
301
|
+
export var UntagResource$ = [9, n0, _UR,
|
|
302
|
+
{ [_h]: ["DELETE", "/v1/tags/{resourceArn}", 204] }, () => UntagResourceRequest$, () => __Unit
|
|
303
|
+
];
|
|
304
|
+
export var UpdateFeed$ = [9, n0, _UF,
|
|
305
|
+
{ [_h]: ["PUT", "/v1/feed/{id}", 200] }, () => UpdateFeedRequest$, () => UpdateFeedResponse$
|
|
306
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./waitForFeedDeleted";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
|
2
|
+
import { GetFeedCommand } from "../commands/GetFeedCommand";
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
let result = await client.send(new GetFeedCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.status;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "DELETED") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.status;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "DELETING") {
|
|
22
|
+
return { state: WaiterState.RETRY, reason };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (e) { }
|
|
26
|
+
}
|
|
27
|
+
catch (exception) {
|
|
28
|
+
reason = exception;
|
|
29
|
+
if (exception.name && exception.name == "ResourceNotFoundException") {
|
|
30
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
31
|
+
}
|
|
32
|
+
if (exception.name && exception.name == "InternalServerErrorException") {
|
|
33
|
+
return { state: WaiterState.RETRY, reason };
|
|
34
|
+
}
|
|
35
|
+
if (exception.name && exception.name == "TooManyRequestException") {
|
|
36
|
+
return { state: WaiterState.RETRY, reason };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return { state: WaiterState.RETRY, reason };
|
|
40
|
+
};
|
|
41
|
+
export const waitForFeedDeleted = async (params, input) => {
|
|
42
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
43
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
44
|
+
};
|
|
45
|
+
export const waitUntilFeedDeleted = async (params, input) => {
|
|
46
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
47
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
48
|
+
return checkExceptions(result);
|
|
49
|
+
};
|