@aws-sdk/client-timestream-write 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,5 +1,4 @@
1
1
  import packageInfo from "../package.json";
2
- import { Sha256 } from "@aws-crypto/sha256-browser";
3
2
  import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
4
3
  import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
5
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
@@ -24,7 +23,6 @@ export const getRuntimeConfig = (config) => {
24
23
  region: config?.region ?? invalidProvider("Region is missing"),
25
24
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
26
25
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
27
- sha256: config?.sha256 ?? Sha256,
28
26
  streamCollector: config?.streamCollector ?? streamCollector,
29
27
  useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
30
28
  useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
@@ -6,7 +6,7 @@ import { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } from "@aws-sdk/middleware-endp
6
6
  import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
7
7
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
8
8
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
9
- import { calculateBodyLength, Hash } from "@smithy/core/serde";
9
+ import { calculateBodyLength } from "@smithy/core/serde";
10
10
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
11
11
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
12
  export const getRuntimeConfig = (config) => {
@@ -37,7 +37,6 @@ export const getRuntimeConfig = (config) => {
37
37
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
38
38
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
39
39
  }, config),
40
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
41
40
  streamCollector: config?.streamCollector ?? streamCollector,
42
41
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
43
42
  useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -1,4 +1,3 @@
1
- import { Sha256 } from "@aws-crypto/sha256-js";
2
1
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
2
  export const getRuntimeConfig = (config) => {
4
3
  const browserDefaults = getBrowserRuntimeConfig(config);
@@ -6,6 +5,5 @@ export const getRuntimeConfig = (config) => {
6
5
  ...browserDefaults,
7
6
  ...config,
8
7
  runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
8
  };
11
9
  };
@@ -1,5 +1,6 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
2
  import { AwsJson1_0Protocol } from "@aws-sdk/core/protocols";
3
+ import { Sha256 } from "@smithy/core/checksum";
3
4
  import { NoOpLogger } from "@smithy/core/client";
4
5
  import { parseUrl } from "@smithy/core/protocols";
5
6
  import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
@@ -31,6 +32,7 @@ export const getRuntimeConfig = (config) => {
31
32
  serviceTarget: "Timestream_20181101",
32
33
  },
33
34
  serviceId: config?.serviceId ?? "Timestream Write",
35
+ sha256: config?.sha256 ?? Sha256,
34
36
  urlParser: config?.urlParser ?? parseUrl,
35
37
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
38
  utf8Encoder: config?.utf8Encoder ?? toUtf8,
@@ -14,8 +14,7 @@ export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) =>
14
14
  region: string | import("@smithy/types").Provider<any>;
15
15
  requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
16
16
  retryMode: string | import("@smithy/types").Provider<string>;
17
- sha256: import("@smithy/types").HashConstructor;
18
- streamCollector: import("@smithy/types").StreamCollector;
17
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
18
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
20
19
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
21
20
  cacheMiddleware?: boolean | undefined;
@@ -25,6 +24,7 @@ export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) =>
25
24
  [setting: string]: unknown;
26
25
  };
27
26
  apiVersion: string;
27
+ sha256: import("@smithy/types").HashConstructor;
28
28
  urlParser: import("@smithy/types").UrlParser;
29
29
  base64Decoder: import("@smithy/types").Decoder;
30
30
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -15,8 +15,7 @@ export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) =>
15
15
  region: string | import("@smithy/types").Provider<string>;
16
16
  requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
17
17
  retryMode: string | import("@smithy/types").Provider<string>;
18
- sha256: import("@smithy/types").HashConstructor;
19
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
20
19
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
20
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
22
21
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -27,6 +26,7 @@ export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) =>
27
26
  [setting: string]: unknown;
28
27
  };
29
28
  apiVersion: string;
29
+ sha256: import("@smithy/types").HashConstructor;
30
30
  urlParser: import("@smithy/types").UrlParser;
31
31
  base64Decoder: import("@smithy/types").Decoder;
32
32
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -4,7 +4,6 @@ import type { TimestreamWriteClientConfig } from "./TimestreamWriteClient";
4
4
  */
5
5
  export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) => {
6
6
  runtime: string;
7
- sha256: import("@smithy/types").HashConstructor;
8
7
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/core/protocols").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
9
8
  cacheMiddleware?: boolean;
10
9
  protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core/protocols").AwsJson1_0Protocol;
@@ -13,9 +12,10 @@ export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) =>
13
12
  [setting: string]: unknown;
14
13
  };
15
14
  apiVersion: string;
15
+ sha256: import("@smithy/types").HashConstructor;
16
16
  urlParser: import("@smithy/types").UrlParser;
17
17
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  base64Decoder: import("@smithy/types").Decoder;
20
20
  base64Encoder: (_input: Uint8Array | string) => string;
21
21
  utf8Decoder: import("@smithy/types").Decoder;
@@ -21,6 +21,7 @@ export declare const getRuntimeConfig: (config: TimestreamWriteClientConfig) =>
21
21
  defaultNamespace?: string;
22
22
  };
23
23
  serviceId: string;
24
+ sha256: import("@smithy/types").HashConstructor;
24
25
  urlParser: import("@smithy/types").UrlParser;
25
26
  utf8Decoder: import("@smithy/types").Decoder;
26
27
  utf8Encoder: (input: Uint8Array | string) => string;
@@ -25,8 +25,13 @@ export declare const getRuntimeConfig: (
25
25
  | import("@smithy/core/protocols").HttpHandler<any>
26
26
  | RequestHandler;
27
27
  retryMode: string | import("@smithy/types").Provider<string>;
28
- sha256: import("@smithy/types").HashConstructor;
29
- streamCollector: import("@smithy/types").StreamCollector;
28
+ streamCollector: (
29
+ stream:
30
+ | import("stream").Readable
31
+ | import("stream/web").ReadableStream
32
+ | ReadableStream
33
+ | Blob
34
+ ) => Promise<Uint8Array>;
30
35
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
31
36
  (boolean | import("@smithy/types").Provider<boolean | undefined>);
32
37
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
@@ -41,6 +46,7 @@ export declare const getRuntimeConfig: (
41
46
  [setting: string]: unknown;
42
47
  };
43
48
  apiVersion: string;
49
+ sha256: import("@smithy/types").HashConstructor;
44
50
  urlParser: import("@smithy/types").UrlParser;
45
51
  base64Decoder: import("@smithy/types").Decoder;
46
52
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -26,8 +26,13 @@ export declare const getRuntimeConfig: (
26
26
  | RequestHandler
27
27
  | import("@smithy/core/protocols").HttpHandler<any>;
28
28
  retryMode: string | import("@smithy/types").Provider<string>;
29
- sha256: import("@smithy/types").HashConstructor;
30
- streamCollector: import("@smithy/types").StreamCollector;
29
+ streamCollector: (
30
+ stream:
31
+ | import("stream").Readable
32
+ | import("stream/web").ReadableStream
33
+ | ReadableStream
34
+ | Blob
35
+ ) => Promise<Uint8Array>;
31
36
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
32
37
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
33
38
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -41,6 +46,7 @@ export declare const getRuntimeConfig: (
41
46
  [setting: string]: unknown;
42
47
  };
43
48
  apiVersion: string;
49
+ sha256: import("@smithy/types").HashConstructor;
44
50
  urlParser: import("@smithy/types").UrlParser;
45
51
  base64Decoder: import("@smithy/types").Decoder;
46
52
  base64Encoder: (_input: Uint8Array | string) => string;
@@ -3,7 +3,6 @@ export declare const getRuntimeConfig: (
3
3
  config: TimestreamWriteClientConfig
4
4
  ) => {
5
5
  runtime: string;
6
- sha256: import("@smithy/types").HashConstructor;
7
6
  requestHandler:
8
7
  | import("@smithy/types").NodeHttpHandlerOptions
9
8
  | import("@smithy/types").FetchHttpHandlerOptions
@@ -20,9 +19,16 @@ export declare const getRuntimeConfig: (
20
19
  [setting: string]: unknown;
21
20
  };
22
21
  apiVersion: string;
22
+ sha256: import("@smithy/types").HashConstructor;
23
23
  urlParser: import("@smithy/types").UrlParser;
24
24
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
25
- streamCollector: import("@smithy/types").StreamCollector;
25
+ streamCollector: (
26
+ stream:
27
+ | import("stream").Readable
28
+ | import("stream/web").ReadableStream
29
+ | ReadableStream
30
+ | Blob
31
+ ) => Promise<Uint8Array>;
26
32
  base64Decoder: import("@smithy/types").Decoder;
27
33
  base64Encoder: (_input: Uint8Array | string) => string;
28
34
  utf8Decoder: import("@smithy/types").Decoder;
@@ -26,6 +26,7 @@ export declare const getRuntimeConfig: (
26
26
  defaultNamespace?: string;
27
27
  };
28
28
  serviceId: string;
29
+ sha256: import("@smithy/types").HashConstructor;
29
30
  urlParser: import("@smithy/types").UrlParser;
30
31
  utf8Decoder: import("@smithy/types").Decoder;
31
32
  utf8Encoder: (input: Uint8Array | string) => string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-timestream-write",
3
3
  "description": "AWS SDK for JavaScript Timestream Write Client for Node.js, Browser and React Native",
4
- "version": "3.1075.0",
4
+ "version": "3.1077.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -19,16 +19,14 @@
19
19
  "module": "./dist-es/index.js",
20
20
  "sideEffects": false,
21
21
  "dependencies": {
22
- "@aws-crypto/sha256-browser": "5.2.0",
23
- "@aws-crypto/sha256-js": "5.2.0",
24
- "@aws-sdk/core": "^3.974.23",
25
- "@aws-sdk/credential-provider-node": "^3.972.58",
26
- "@aws-sdk/middleware-endpoint-discovery": "^3.972.19",
27
- "@aws-sdk/types": "^3.973.13",
28
- "@smithy/core": "^3.24.6",
29
- "@smithy/fetch-http-handler": "^5.4.6",
30
- "@smithy/node-http-handler": "^4.7.6",
31
- "@smithy/types": "^4.14.3",
22
+ "@aws-sdk/core": "^3.974.25",
23
+ "@aws-sdk/credential-provider-node": "^3.972.60",
24
+ "@aws-sdk/middleware-endpoint-discovery": "^3.972.21",
25
+ "@aws-sdk/types": "^3.973.14",
26
+ "@smithy/core": "^3.28.0",
27
+ "@smithy/fetch-http-handler": "^5.6.1",
28
+ "@smithy/node-http-handler": "^4.9.1",
29
+ "@smithy/types": "^4.15.0",
32
30
  "tslib": "^2.6.2"
33
31
  },
34
32
  "devDependencies": {
@@ -1,40 +0,0 @@
1
- const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
3
- exports.defaultTimestreamWriteHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
- return {
5
- operation: getSmithyContext(context).operation,
6
- region: await normalizeProvider(config.region)() || (() => {
7
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
- })(),
9
- };
10
- };
11
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
12
- return {
13
- schemeId: "aws.auth#sigv4",
14
- signingProperties: {
15
- name: "timestream",
16
- region: authParameters.region,
17
- },
18
- propertiesExtractor: (config, context) => ({
19
- signingProperties: {
20
- config,
21
- context,
22
- },
23
- }),
24
- };
25
- }
26
- exports.defaultTimestreamWriteHttpAuthSchemeProvider = (authParameters) => {
27
- const options = [];
28
- switch (authParameters.operation) {
29
- default: {
30
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
31
- }
32
- }
33
- return options;
34
- };
35
- exports.resolveHttpAuthSchemeConfig = (config) => {
36
- const config_0 = resolveAwsSdkSigV4Config(config);
37
- return Object.assign(config_0, {
38
- authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
39
- });
40
- };
@@ -1,56 +0,0 @@
1
- const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
2
- const m = "ref";
3
- const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [m]: "Endpoint" }, i = { [m]: d }, j = { "fn": f, "argv": [i, "name"] }, k = {}, l = [{ [m]: "Region" }];
4
- const _data = {
5
- conditions: [
6
- [c, [h]],
7
- [c, l],
8
- ["aws.partition", l, d],
9
- [e, [{ [m]: "UseFIPS" }, b]],
10
- [e, [{ [m]: "UseDualStack" }, b]],
11
- [e, [{ fn: f, argv: [i, "supportsFIPS"] }, b]],
12
- [e, [{ fn: f, argv: [i, "supportsDualStack"] }, b]],
13
- [g, [j, "aws"]],
14
- [g, [j, "aws-us-gov"]]
15
- ],
16
- results: [
17
- [a],
18
- [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
19
- [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
20
- [h, k],
21
- ["https://timestream-ingest-fips.{Region}.api.aws", k],
22
- ["https://timestream-ingest.{Region}.api.aws", k],
23
- ["https://ingest.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
24
- [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
25
- ["https://ingest.timestream.{Region}.amazonaws.com", k],
26
- ["https://ingest.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", k],
27
- [a, "FIPS is enabled but this partition does not support FIPS"],
28
- ["https://ingest.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
29
- [a, "DualStack is enabled but this partition does not support DualStack"],
30
- ["https://ingest.timestream.{Region}.{PartitionResult#dnsSuffix}", k],
31
- [a, "Invalid Configuration: Missing Region"]
32
- ]
33
- };
34
- const root = 2;
35
- const r = 100_000_000;
36
- const nodes = new Int32Array([
37
- -1, 1, -1,
38
- 0, 17, 3,
39
- 1, 4, r + 14,
40
- 2, 5, r + 14,
41
- 3, 10, 6,
42
- 4, 7, r + 13,
43
- 6, 8, r + 12,
44
- 7, r + 5, 9,
45
- 8, r + 5, r + 11,
46
- 4, 13, 11,
47
- 5, 12, r + 10,
48
- 8, r + 8, r + 9,
49
- 5, 14, r + 7,
50
- 6, 15, r + 7,
51
- 7, r + 4, 16,
52
- 8, r + 5, r + 6,
53
- 3, r + 1, 18,
54
- 4, r + 2, r + 3,
55
- ]);
56
- exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,14 +0,0 @@
1
- const { awsEndpointFunctions } = require("@aws-sdk/core/client");
2
- const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
3
- const { bdd } = require("./bdd");
4
- const cache = new EndpointCache({
5
- size: 50,
6
- params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
- });
8
- exports.defaultEndpointResolver = (endpointParams, context = {}) => {
9
- return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
- endpointParams: endpointParams,
11
- logger: context.logger,
12
- }));
13
- };
14
- customEndpointFunctions.aws = awsEndpointFunctions;
@@ -1,8 +0,0 @@
1
- const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
- exports.__ServiceException = __ServiceException;
3
- exports.TimestreamWriteServiceException = class TimestreamWriteServiceException extends __ServiceException {
4
- constructor(options) {
5
- super(options);
6
- Object.setPrototypeOf(this, TimestreamWriteServiceException.prototype);
7
- }
8
- };
@@ -1,129 +0,0 @@
1
- const { TimestreamWriteServiceException: __BaseException } = require("./TimestreamWriteServiceException");
2
- exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
3
- name = "AccessDeniedException";
4
- $fault = "client";
5
- Message;
6
- constructor(opts) {
7
- super({
8
- name: "AccessDeniedException",
9
- $fault: "client",
10
- ...opts,
11
- });
12
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
- this.Message = opts.Message;
14
- }
15
- };
16
- exports.ConflictException = class ConflictException extends __BaseException {
17
- name = "ConflictException";
18
- $fault = "client";
19
- Message;
20
- constructor(opts) {
21
- super({
22
- name: "ConflictException",
23
- $fault: "client",
24
- ...opts,
25
- });
26
- Object.setPrototypeOf(this, ConflictException.prototype);
27
- this.Message = opts.Message;
28
- }
29
- };
30
- exports.InternalServerException = class InternalServerException extends __BaseException {
31
- name = "InternalServerException";
32
- $fault = "server";
33
- Message;
34
- constructor(opts) {
35
- super({
36
- name: "InternalServerException",
37
- $fault: "server",
38
- ...opts,
39
- });
40
- Object.setPrototypeOf(this, InternalServerException.prototype);
41
- this.Message = opts.Message;
42
- }
43
- };
44
- exports.InvalidEndpointException = class InvalidEndpointException extends __BaseException {
45
- name = "InvalidEndpointException";
46
- $fault = "client";
47
- Message;
48
- constructor(opts) {
49
- super({
50
- name: "InvalidEndpointException",
51
- $fault: "client",
52
- ...opts,
53
- });
54
- Object.setPrototypeOf(this, InvalidEndpointException.prototype);
55
- this.Message = opts.Message;
56
- }
57
- };
58
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
59
- name = "ResourceNotFoundException";
60
- $fault = "client";
61
- Message;
62
- constructor(opts) {
63
- super({
64
- name: "ResourceNotFoundException",
65
- $fault: "client",
66
- ...opts,
67
- });
68
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
69
- this.Message = opts.Message;
70
- }
71
- };
72
- exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
73
- name = "ServiceQuotaExceededException";
74
- $fault = "client";
75
- Message;
76
- constructor(opts) {
77
- super({
78
- name: "ServiceQuotaExceededException",
79
- $fault: "client",
80
- ...opts,
81
- });
82
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
83
- this.Message = opts.Message;
84
- }
85
- };
86
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
87
- name = "ThrottlingException";
88
- $fault = "client";
89
- Message;
90
- constructor(opts) {
91
- super({
92
- name: "ThrottlingException",
93
- $fault: "client",
94
- ...opts,
95
- });
96
- Object.setPrototypeOf(this, ThrottlingException.prototype);
97
- this.Message = opts.Message;
98
- }
99
- };
100
- exports.ValidationException = class ValidationException extends __BaseException {
101
- name = "ValidationException";
102
- $fault = "client";
103
- Message;
104
- constructor(opts) {
105
- super({
106
- name: "ValidationException",
107
- $fault: "client",
108
- ...opts,
109
- });
110
- Object.setPrototypeOf(this, ValidationException.prototype);
111
- this.Message = opts.Message;
112
- }
113
- };
114
- exports.RejectedRecordsException = class RejectedRecordsException extends __BaseException {
115
- name = "RejectedRecordsException";
116
- $fault = "client";
117
- Message;
118
- RejectedRecords;
119
- constructor(opts) {
120
- super({
121
- name: "RejectedRecordsException",
122
- $fault: "client",
123
- ...opts,
124
- });
125
- Object.setPrototypeOf(this, RejectedRecordsException.prototype);
126
- this.Message = opts.Message;
127
- this.RejectedRecords = opts.RejectedRecords;
128
- }
129
- };
@@ -1,33 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
- const { calculateBodyLength } = require("@smithy/core/serde");
8
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
10
- const getRuntimeConfig = (config) => {
11
- const defaultsMode = resolveDefaultsModeConfig(config);
12
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
- const clientSharedValues = getSharedRuntimeConfig(config);
14
- return {
15
- ...clientSharedValues,
16
- ...config,
17
- runtime: "browser",
18
- defaultsMode,
19
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
21
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
- endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? (() => Promise.resolve(undefined)),
23
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
24
- region: config?.region ?? invalidProvider("Region is missing"),
25
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
26
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
27
- sha256: config?.sha256 ?? Sha256,
28
- streamCollector: config?.streamCollector ?? streamCollector,
29
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
30
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
31
- };
32
- };
33
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,47 +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 { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } = require("@aws-sdk/middleware-endpoint-discovery");
6
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
7
- 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");
8
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
9
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
10
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
11
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
12
- const getRuntimeConfig = (config) => {
13
- emitWarningIfUnsupportedVersion(process.version);
14
- const defaultsMode = resolveDefaultsModeConfig(config);
15
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
16
- const clientSharedValues = getSharedRuntimeConfig(config);
17
- awsCheckVersion(process.version);
18
- const loaderConfig = {
19
- profile: config?.profile,
20
- logger: clientSharedValues.logger,
21
- };
22
- return {
23
- ...clientSharedValues,
24
- ...config,
25
- runtime: "node",
26
- defaultsMode,
27
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
28
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
29
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
30
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
- endpointDiscoveryEnabledProvider: config?.endpointDiscoveryEnabledProvider ?? loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS, loaderConfig),
32
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
33
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
34
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
35
- retryMode: config?.retryMode ??
36
- loadNodeConfig({
37
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
38
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
39
- }, config),
40
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
41
- streamCollector: config?.streamCollector ?? streamCollector,
42
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
43
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
44
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
45
- };
46
- };
47
- 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_0Protocol } = 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 { defaultTimestreamWriteHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2018-11-01",
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 ?? defaultTimestreamWriteHttpAuthSchemeProvider,
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_0Protocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.timestreamwrite",
29
- errorTypeRegistries,
30
- version: "2018-11-01",
31
- serviceTarget: "Timestream_20181101",
32
- },
33
- serviceId: config?.serviceId ?? "Timestream Write",
34
- urlParser: config?.urlParser ?? parseUrl,
35
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
37
- };
38
- };