@wildix/wim-tools-client 0.0.3

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 (46) hide show
  1. package/dist-cjs/Tools.js +13 -0
  2. package/dist-cjs/ToolsClient.js +41 -0
  3. package/dist-cjs/commands/TestEndpointCommand.js +21 -0
  4. package/dist-cjs/commands/index.js +4 -0
  5. package/dist-cjs/extensionConfiguration.js +2 -0
  6. package/dist-cjs/index.js +10 -0
  7. package/dist-cjs/models/ToolsServiceException.js +12 -0
  8. package/dist-cjs/models/index.js +4 -0
  9. package/dist-cjs/models/models_0.js +17 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +80 -0
  11. package/dist-cjs/runtimeConfig.browser.js +32 -0
  12. package/dist-cjs/runtimeConfig.js +37 -0
  13. package/dist-cjs/runtimeConfig.native.js +15 -0
  14. package/dist-cjs/runtimeConfig.shared.js +21 -0
  15. package/dist-cjs/runtimeExtensions.js +11 -0
  16. package/dist-es/Tools.js +9 -0
  17. package/dist-es/ToolsClient.js +37 -0
  18. package/dist-es/commands/TestEndpointCommand.js +17 -0
  19. package/dist-es/commands/index.js +1 -0
  20. package/dist-es/extensionConfiguration.js +1 -0
  21. package/dist-es/index.js +5 -0
  22. package/dist-es/models/ToolsServiceException.js +8 -0
  23. package/dist-es/models/index.js +1 -0
  24. package/dist-es/models/models_0.js +13 -0
  25. package/dist-es/protocols/Aws_restJson1.js +75 -0
  26. package/dist-es/runtimeConfig.browser.js +27 -0
  27. package/dist-es/runtimeConfig.js +32 -0
  28. package/dist-es/runtimeConfig.native.js +11 -0
  29. package/dist-es/runtimeConfig.shared.js +17 -0
  30. package/dist-es/runtimeExtensions.js +7 -0
  31. package/dist-types/Tools.d.ts +17 -0
  32. package/dist-types/ToolsClient.d.ts +144 -0
  33. package/dist-types/commands/TestEndpointCommand.d.ts +75 -0
  34. package/dist-types/commands/index.d.ts +1 -0
  35. package/dist-types/extensionConfiguration.d.ts +7 -0
  36. package/dist-types/index.d.ts +7 -0
  37. package/dist-types/models/ToolsServiceException.d.ts +14 -0
  38. package/dist-types/models/index.d.ts +1 -0
  39. package/dist-types/models/models_0.d.ts +38 -0
  40. package/dist-types/protocols/Aws_restJson1.d.ts +11 -0
  41. package/dist-types/runtimeConfig.browser.d.ts +31 -0
  42. package/dist-types/runtimeConfig.d.ts +31 -0
  43. package/dist-types/runtimeConfig.native.d.ts +30 -0
  44. package/dist-types/runtimeConfig.shared.d.ts +15 -0
  45. package/dist-types/runtimeExtensions.d.ts +17 -0
  46. package/package.json +83 -0
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tools = void 0;
4
+ const ToolsClient_1 = require("./ToolsClient");
5
+ const TestEndpointCommand_1 = require("./commands/TestEndpointCommand");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ const commands = {
8
+ TestEndpointCommand: TestEndpointCommand_1.TestEndpointCommand,
9
+ };
10
+ class Tools extends ToolsClient_1.ToolsClient {
11
+ }
12
+ exports.Tools = Tools;
13
+ (0, smithy_client_1.createAggregatedClient)(commands, Tools);
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolsClient = exports.__Client = void 0;
4
+ const runtimeConfig_1 = require("./runtimeConfig");
5
+ const runtimeExtensions_1 = require("./runtimeExtensions");
6
+ const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
7
+ const middleware_content_length_1 = require("@smithy/middleware-content-length");
8
+ const middleware_retry_1 = require("@smithy/middleware-retry");
9
+ const smithy_client_1 = require("@smithy/smithy-client");
10
+ Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
11
+ const smithy_utils_1 = require("@wildix/smithy-utils");
12
+ class ToolsClient extends smithy_client_1.Client {
13
+ config;
14
+ constructor(...[configuration]) {
15
+ let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
16
+ super(_config_0);
17
+ this.initConfig = _config_0;
18
+ let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
19
+ let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
20
+ let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
21
+ const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `tools.wim-${configuration.env}.wildix.com` : 'tools.wim.wildix.com';
22
+ const endpoint = () => {
23
+ return {
24
+ hostname,
25
+ protocol: "https",
26
+ port: '443',
27
+ path: ''
28
+ };
29
+ };
30
+ const config = { ..._config_3, endpoint };
31
+ this.config = config;
32
+ this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
33
+ this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
34
+ this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
36
+ }
37
+ destroy() {
38
+ super.destroy();
39
+ }
40
+ }
41
+ exports.ToolsClient = ToolsClient;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestEndpointCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class TestEndpointCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Tools", "TestEndpoint", {})
15
+ .n("ToolsClient", "TestEndpointCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_TestEndpointCommand)
18
+ .de(Aws_restJson1_1.de_TestEndpointCommand)
19
+ .build() {
20
+ }
21
+ exports.TestEndpointCommand = TestEndpointCommand;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./TestEndpointCommand"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolsServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./ToolsClient"), exports);
6
+ tslib_1.__exportStar(require("./Tools"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./models"), exports);
9
+ var ToolsServiceException_1 = require("./models/ToolsServiceException");
10
+ Object.defineProperty(exports, "ToolsServiceException", { enumerable: true, get: function () { return ToolsServiceException_1.ToolsServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolsServiceException = 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 ToolsServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, ToolsServiceException.prototype);
10
+ }
11
+ }
12
+ exports.ToolsServiceException = ToolsServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationException = void 0;
4
+ const ToolsServiceException_1 = require("./ToolsServiceException");
5
+ class ValidationException extends ToolsServiceException_1.ToolsServiceException {
6
+ name = "ValidationException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "ValidationException",
11
+ $fault: "client",
12
+ ...opts
13
+ });
14
+ Object.setPrototypeOf(this, ValidationException.prototype);
15
+ }
16
+ }
17
+ exports.ValidationException = ValidationException;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_TestEndpointCommand = exports.se_TestEndpointCommand = void 0;
4
+ const ToolsServiceException_1 = require("../models/ToolsServiceException");
5
+ const models_0_1 = require("../models/models_0");
6
+ const core_1 = require("@aws-sdk/core");
7
+ const core_2 = require("@smithy/core");
8
+ const smithy_client_1 = require("@smithy/smithy-client");
9
+ const se_TestEndpointCommand = async (input, context) => {
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
+ const headers = {};
12
+ b.bp("/v1/test");
13
+ const query = (0, smithy_client_1.map)({
14
+ [_c]: [, input[_c]],
15
+ });
16
+ let body;
17
+ b.m("GET")
18
+ .h(headers)
19
+ .q(query)
20
+ .b(body);
21
+ return b.build();
22
+ };
23
+ exports.se_TestEndpointCommand = se_TestEndpointCommand;
24
+ const de_TestEndpointCommand = async (output, context) => {
25
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
26
+ return de_CommandError(output, context);
27
+ }
28
+ const contents = (0, smithy_client_1.map)({
29
+ $metadata: deserializeMetadata(output),
30
+ });
31
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
32
+ const doc = (0, smithy_client_1.take)(data, {
33
+ 'status': smithy_client_1.expectString,
34
+ 'timestamp': _ => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
35
+ });
36
+ Object.assign(contents, doc);
37
+ return contents;
38
+ };
39
+ exports.de_TestEndpointCommand = de_TestEndpointCommand;
40
+ const de_CommandError = async (output, context) => {
41
+ const parsedOutput = {
42
+ ...output,
43
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context)
44
+ };
45
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
46
+ switch (errorCode) {
47
+ case "ValidationException":
48
+ case "smithy.framework#ValidationException":
49
+ throw await de_ValidationExceptionRes(parsedOutput, context);
50
+ default:
51
+ const parsedBody = parsedOutput.body;
52
+ return throwDefaultError({
53
+ output,
54
+ parsedBody,
55
+ errorCode
56
+ });
57
+ }
58
+ };
59
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ToolsServiceException_1.ToolsServiceException);
60
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
61
+ const contents = (0, smithy_client_1.map)({});
62
+ const data = parsedOutput.body;
63
+ const doc = (0, smithy_client_1.take)(data, {
64
+ 'message': smithy_client_1.expectString,
65
+ });
66
+ Object.assign(contents, doc);
67
+ const exception = new models_0_1.ValidationException({
68
+ $metadata: deserializeMetadata(parsedOutput),
69
+ ...contents
70
+ });
71
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
72
+ };
73
+ const deserializeMetadata = (output) => ({
74
+ httpStatusCode: output.statusCode,
75
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
76
+ extendedRequestId: output.headers["x-amz-id-2"],
77
+ cfId: output.headers["x-amz-cf-id"],
78
+ });
79
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
80
+ const _c = "company";
@@ -0,0 +1,32 @@
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 fetch_http_handler_1 = require("@smithy/fetch-http-handler");
9
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
10
+ const util_retry_1 = require("@smithy/util-retry");
11
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
12
+ const smithy_client_1 = require("@smithy/smithy-client");
13
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
14
+ const getRuntimeConfig = (config) => {
15
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
17
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
18
+ return {
19
+ ...clientSharedValues,
20
+ ...config,
21
+ runtime: "browser",
22
+ defaultsMode,
23
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
25
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
26
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
28
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
29
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
30
+ };
31
+ };
32
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,37 @@
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 util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
7
+ const hash_node_1 = require("@smithy/hash-node");
8
+ const middleware_retry_1 = require("@smithy/middleware-retry");
9
+ const node_config_provider_1 = require("@smithy/node-config-provider");
10
+ const node_http_handler_1 = require("@smithy/node-http-handler");
11
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
12
+ const util_retry_1 = require("@smithy/util-retry");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
16
+ const smithy_client_2 = require("@smithy/smithy-client");
17
+ const getRuntimeConfig = (config) => {
18
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
19
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
20
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
21
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
30
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }, config),
32
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
33
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
34
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
35
+ };
36
+ };
37
+ 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,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ const url_parser_1 = require("@smithy/url-parser");
6
+ const util_base64_1 = require("@smithy/util-base64");
7
+ const util_utf8_1 = require("@smithy/util-utf8");
8
+ const getRuntimeConfig = (config) => {
9
+ return {
10
+ apiVersion: "v1",
11
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
12
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
13
+ disableHostPrefix: config?.disableHostPrefix ?? false,
14
+ extensions: config?.extensions ?? [],
15
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
16
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
17
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
18
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
19
+ };
20
+ };
21
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const protocol_http_1 = require("@smithy/protocol-http");
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
7
+ const extensionConfiguration = Object.assign((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig));
8
+ extensions.forEach(extension => extension.configure(extensionConfiguration));
9
+ return Object.assign(runtimeConfig, (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration));
10
+ };
11
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -0,0 +1,9 @@
1
+ import { ToolsClient, } from "./ToolsClient";
2
+ import { TestEndpointCommand, } from "./commands/TestEndpointCommand";
3
+ import { createAggregatedClient } from "@smithy/smithy-client";
4
+ const commands = {
5
+ TestEndpointCommand,
6
+ };
7
+ export class Tools extends ToolsClient {
8
+ }
9
+ createAggregatedClient(commands, Tools);
@@ -0,0 +1,37 @@
1
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2
+ import { resolveRuntimeExtensions, } from "./runtimeExtensions";
3
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
4
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
5
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
6
+ import { Client as __Client, } from "@smithy/smithy-client";
7
+ import { authorizationMiddleware } from '@wildix/smithy-utils';
8
+ export { __Client };
9
+ export class ToolsClient extends __Client {
10
+ config;
11
+ constructor(...[configuration]) {
12
+ let _config_0 = __getRuntimeConfig(configuration || {});
13
+ super(_config_0);
14
+ this.initConfig = _config_0;
15
+ let _config_1 = resolveUserAgentConfig(_config_0);
16
+ let _config_2 = resolveRetryConfig(_config_1);
17
+ let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
18
+ const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `tools.wim-${configuration.env}.wildix.com` : 'tools.wim.wildix.com';
19
+ const endpoint = () => {
20
+ return {
21
+ hostname,
22
+ protocol: "https",
23
+ port: '443',
24
+ path: ''
25
+ };
26
+ };
27
+ const config = { ..._config_3, endpoint };
28
+ this.config = config;
29
+ this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
30
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
31
+ this.middlewareStack.use(getRetryPlugin(this.config));
32
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
33
+ }
34
+ destroy() {
35
+ super.destroy();
36
+ }
37
+ }
@@ -0,0 +1,17 @@
1
+ import { de_TestEndpointCommand, se_TestEndpointCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class TestEndpointCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Tools", "TestEndpoint", {})
12
+ .n("ToolsClient", "TestEndpointCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_TestEndpointCommand)
15
+ .de(de_TestEndpointCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1 @@
1
+ export * from "./TestEndpointCommand";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./ToolsClient";
2
+ export * from "./Tools";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export { ToolsServiceException } from "./models/ToolsServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class ToolsServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, ToolsServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,13 @@
1
+ import { ToolsServiceException as __BaseException } from "./ToolsServiceException";
2
+ export class ValidationException extends __BaseException {
3
+ name = "ValidationException";
4
+ $fault = "client";
5
+ constructor(opts) {
6
+ super({
7
+ name: "ValidationException",
8
+ $fault: "client",
9
+ ...opts
10
+ });
11
+ Object.setPrototypeOf(this, ValidationException.prototype);
12
+ }
13
+ }
@@ -0,0 +1,75 @@
1
+ import { ToolsServiceException as __BaseException } from "../models/ToolsServiceException";
2
+ import { ValidationException } from "../models/models_0";
3
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
+ import { requestBuilder as rb } from "@smithy/core";
5
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
6
+ export const se_TestEndpointCommand = async (input, context) => {
7
+ const b = rb(input, context);
8
+ const headers = {};
9
+ b.bp("/v1/test");
10
+ const query = map({
11
+ [_c]: [, input[_c]],
12
+ });
13
+ let body;
14
+ b.m("GET")
15
+ .h(headers)
16
+ .q(query)
17
+ .b(body);
18
+ return b.build();
19
+ };
20
+ export const de_TestEndpointCommand = async (output, context) => {
21
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
22
+ return de_CommandError(output, context);
23
+ }
24
+ const contents = map({
25
+ $metadata: deserializeMetadata(output),
26
+ });
27
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
28
+ const doc = take(data, {
29
+ 'status': __expectString,
30
+ 'timestamp': _ => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
31
+ });
32
+ Object.assign(contents, doc);
33
+ return contents;
34
+ };
35
+ const de_CommandError = async (output, context) => {
36
+ const parsedOutput = {
37
+ ...output,
38
+ body: await parseErrorBody(output.body, context)
39
+ };
40
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
41
+ switch (errorCode) {
42
+ case "ValidationException":
43
+ case "smithy.framework#ValidationException":
44
+ throw await de_ValidationExceptionRes(parsedOutput, context);
45
+ default:
46
+ const parsedBody = parsedOutput.body;
47
+ return throwDefaultError({
48
+ output,
49
+ parsedBody,
50
+ errorCode
51
+ });
52
+ }
53
+ };
54
+ const throwDefaultError = withBaseException(__BaseException);
55
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
56
+ const contents = map({});
57
+ const data = parsedOutput.body;
58
+ const doc = take(data, {
59
+ 'message': __expectString,
60
+ });
61
+ Object.assign(contents, doc);
62
+ const exception = new ValidationException({
63
+ $metadata: deserializeMetadata(parsedOutput),
64
+ ...contents
65
+ });
66
+ return __decorateServiceException(exception, parsedOutput.body);
67
+ };
68
+ const deserializeMetadata = (output) => ({
69
+ httpStatusCode: output.statusCode,
70
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
71
+ extendedRequestId: output.headers["x-amz-id-2"],
72
+ cfId: output.headers["x-amz-cf-id"],
73
+ });
74
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
75
+ const _c = "company";
@@ -0,0 +1,27 @@
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 { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
5
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
6
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
7
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
8
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
9
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
10
+ export 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
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
21
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
22
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
23
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
24
+ sha256: config?.sha256 ?? Sha256,
25
+ streamCollector: config?.streamCollector ?? streamCollector,
26
+ };
27
+ };
@@ -0,0 +1,32 @@
1
+ import packageInfo from "../package.json";
2
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
3
+ import { Hash } from "@smithy/hash-node";
4
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
5
+ import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
6
+ import { NodeHttpHandler as RequestHandler, streamCollector, } from "@smithy/node-http-handler";
7
+ import { calculateBodyLength } from "@smithy/util-body-length-node";
8
+ import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
9
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
10
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
11
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
12
+ import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
13
+ export const getRuntimeConfig = (config) => {
14
+ emitWarningIfUnsupportedVersion(process.version);
15
+ const defaultsMode = resolveDefaultsModeConfig(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
+ const clientSharedValues = getSharedRuntimeConfig(config);
18
+ return {
19
+ ...clientSharedValues,
20
+ ...config,
21
+ runtime: "node",
22
+ defaultsMode,
23
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
26
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
+ retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
28
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
29
+ streamCollector: config?.streamCollector ?? streamCollector,
30
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
31
+ };
32
+ };
@@ -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,17 @@
1
+ import { NoOpLogger } from "@smithy/smithy-client";
2
+ import { parseUrl } from "@smithy/url-parser";
3
+ import { fromBase64, toBase64, } from "@smithy/util-base64";
4
+ import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
5
+ export const getRuntimeConfig = (config) => {
6
+ return {
7
+ apiVersion: "v1",
8
+ base64Decoder: config?.base64Decoder ?? fromBase64,
9
+ base64Encoder: config?.base64Encoder ?? toBase64,
10
+ disableHostPrefix: config?.disableHostPrefix ?? false,
11
+ extensions: config?.extensions ?? [],
12
+ logger: config?.logger ?? new NoOpLogger(),
13
+ urlParser: config?.urlParser ?? parseUrl,
14
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
15
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
16
+ };
17
+ };
@@ -0,0 +1,7 @@
1
+ import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
2
+ import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
3
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
4
+ const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig));
5
+ extensions.forEach(extension => extension.configure(extensionConfiguration));
6
+ return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration));
7
+ };
@@ -0,0 +1,17 @@
1
+ import { ToolsClient } from "./ToolsClient";
2
+ import { TestEndpointCommandInput, TestEndpointCommandOutput } from "./commands/TestEndpointCommand";
3
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
4
+ export interface Tools {
5
+ /**
6
+ * @see {@link TestEndpointCommand}
7
+ */
8
+ testEndpoint(): Promise<TestEndpointCommandOutput>;
9
+ testEndpoint(args: TestEndpointCommandInput, options?: __HttpHandlerOptions): Promise<TestEndpointCommandOutput>;
10
+ testEndpoint(args: TestEndpointCommandInput, cb: (err: any, data?: TestEndpointCommandOutput) => void): void;
11
+ testEndpoint(args: TestEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TestEndpointCommandOutput) => void): void;
12
+ }
13
+ /**
14
+ * @public
15
+ */
16
+ export declare class Tools extends ToolsClient implements Tools {
17
+ }
@@ -0,0 +1,144 @@
1
+ import { TestEndpointCommandInput, TestEndpointCommandOutput } from "./commands/TestEndpointCommand";
2
+ import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
3
+ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
4
+ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
5
+ import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
6
+ import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
7
+ import { Provider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
8
+ import { TokenProvider } from '@wildix/smithy-utils';
9
+ export { __Client };
10
+ /**
11
+ * @public
12
+ */
13
+ export type ServiceInputTypes = TestEndpointCommandInput;
14
+ /**
15
+ * @public
16
+ */
17
+ export type ServiceOutputTypes = TestEndpointCommandOutput;
18
+ /**
19
+ * @public
20
+ */
21
+ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
22
+ /**
23
+ * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
24
+ */
25
+ requestHandler?: __HttpHandlerUserInput;
26
+ /**
27
+ * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
28
+ * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
29
+ * @internal
30
+ */
31
+ sha256?: __ChecksumConstructor | __HashConstructor;
32
+ /**
33
+ * The function that will be used to convert strings into HTTP endpoints.
34
+ * @internal
35
+ */
36
+ urlParser?: __UrlParser;
37
+ /**
38
+ * A function that can calculate the length of a request body.
39
+ * @internal
40
+ */
41
+ bodyLengthChecker?: __BodyLengthCalculator;
42
+ /**
43
+ * A function that converts a stream into an array of bytes.
44
+ * @internal
45
+ */
46
+ streamCollector?: __StreamCollector;
47
+ /**
48
+ * The function that will be used to convert a base64-encoded string to a byte array.
49
+ * @internal
50
+ */
51
+ base64Decoder?: __Decoder;
52
+ /**
53
+ * The function that will be used to convert binary data to a base64-encoded string.
54
+ * @internal
55
+ */
56
+ base64Encoder?: __Encoder;
57
+ /**
58
+ * The function that will be used to convert a UTF8-encoded string to a byte array.
59
+ * @internal
60
+ */
61
+ utf8Decoder?: __Decoder;
62
+ /**
63
+ * The function that will be used to convert binary data to a UTF-8 encoded string.
64
+ * @internal
65
+ */
66
+ utf8Encoder?: __Encoder;
67
+ /**
68
+ * The runtime environment.
69
+ * @internal
70
+ */
71
+ runtime?: string;
72
+ /**
73
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
74
+ * trait of an operation.
75
+ */
76
+ disableHostPrefix?: boolean;
77
+ /**
78
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
79
+ * @internal
80
+ */
81
+ defaultUserAgentProvider?: Provider<__UserAgent>;
82
+ /**
83
+ * Value for how many times a request will be made at most in case of retry.
84
+ */
85
+ maxAttempts?: number | __Provider<number>;
86
+ /**
87
+ * Specifies which retry algorithm to use.
88
+ * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
89
+ *
90
+ */
91
+ retryMode?: string | __Provider<string>;
92
+ /**
93
+ * Optional logger for logging debug/info/warn/error.
94
+ */
95
+ logger?: __Logger;
96
+ /**
97
+ * Optional extensions
98
+ */
99
+ extensions?: RuntimeExtension[];
100
+ /**
101
+ * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
102
+ */
103
+ defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
104
+ }
105
+ /**
106
+ * @public
107
+ */
108
+ export type ToolsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig;
109
+ /**
110
+ * @public
111
+ *
112
+ * The configuration interface of ToolsClient class constructor that set the region, credentials and other options.
113
+ */
114
+ export interface ToolsClientConfig extends ToolsClientConfigType {
115
+ env?: 'stage' | 'stable' | 'prod';
116
+ token: TokenProvider;
117
+ }
118
+ /**
119
+ * @public
120
+ */
121
+ export type ToolsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig;
122
+ /**
123
+ * @public
124
+ *
125
+ * The resolved configuration interface of ToolsClient class. This is resolved and normalized from the {@link ToolsClientConfig | constructor configuration interface}.
126
+ */
127
+ export interface ToolsClientResolvedConfig extends ToolsClientResolvedConfigType {
128
+ }
129
+ /**
130
+ * @public
131
+ */
132
+ export declare class ToolsClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, ToolsClientResolvedConfig> {
133
+ /**
134
+ * The resolved configuration of ToolsClient class. This is resolved and normalized from the {@link ToolsClientConfig | constructor configuration interface}.
135
+ */
136
+ readonly config: ToolsClientResolvedConfig;
137
+ constructor(...[configuration]: __CheckOptionalClientConfig<ToolsClientConfig>);
138
+ /**
139
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
140
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
141
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
142
+ */
143
+ destroy(): void;
144
+ }
@@ -0,0 +1,75 @@
1
+ import { ToolsClientResolvedConfig } from "../ToolsClient";
2
+ import { TestEndpointInput, TestEndpointOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link TestEndpointCommand}.
14
+ */
15
+ export interface TestEndpointCommandInput extends TestEndpointInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link TestEndpointCommand}.
21
+ */
22
+ export interface TestEndpointCommandOutput extends TestEndpointOutput, __MetadataBearer {
23
+ }
24
+ declare const TestEndpointCommand_base: {
25
+ new (input: TestEndpointCommandInput): import("@smithy/smithy-client").CommandImpl<TestEndpointCommandInput, TestEndpointCommandOutput, ToolsClientResolvedConfig, TestEndpointCommandInput, TestEndpointCommandOutput>;
26
+ new (...[input]: [TestEndpointCommandInput] | []): import("@smithy/smithy-client").CommandImpl<TestEndpointCommandInput, TestEndpointCommandOutput, ToolsClientResolvedConfig, TestEndpointCommandInput, TestEndpointCommandOutput>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * @public
31
+ *
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { ToolsClient, TestEndpointCommand } from "@wildix/wim-tools-client"; // ES Modules import
36
+ * // const { ToolsClient, TestEndpointCommand } = require("@wildix/wim-tools-client"); // CommonJS import
37
+ * const client = new ToolsClient(config);
38
+ * const input = { // TestEndpointInput
39
+ * company: "STRING_VALUE",
40
+ * };
41
+ * const command = new TestEndpointCommand(input);
42
+ * const response = await client.send(command);
43
+ * // { // TestEndpointOutput
44
+ * // status: "STRING_VALUE", // required
45
+ * // timestamp: new Date("TIMESTAMP"), // required
46
+ * // };
47
+ *
48
+ * ```
49
+ *
50
+ * @param TestEndpointCommandInput - {@link TestEndpointCommandInput}
51
+ * @returns {@link TestEndpointCommandOutput}
52
+ * @see {@link TestEndpointCommandInput} for command's `input` shape.
53
+ * @see {@link TestEndpointCommandOutput} for command's `response` shape.
54
+ * @see {@link ToolsClientResolvedConfig | config} for ToolsClient's `config` shape.
55
+ *
56
+ * @throws {@link ValidationException} (client fault)
57
+ *
58
+ * @throws {@link ToolsServiceException}
59
+ * <p>Base exception class for all service exceptions from Tools service.</p>
60
+ *
61
+ *
62
+ */
63
+ export declare class TestEndpointCommand extends TestEndpointCommand_base {
64
+ /** @internal type navigation helper, not in runtime. */
65
+ protected static __types: {
66
+ api: {
67
+ input: TestEndpointInput;
68
+ output: TestEndpointOutput;
69
+ };
70
+ sdk: {
71
+ input: TestEndpointCommandInput;
72
+ output: TestEndpointCommandOutput;
73
+ };
74
+ };
75
+ }
@@ -0,0 +1 @@
1
+ export * from "./TestEndpointCommand";
@@ -0,0 +1,7 @@
1
+ import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
2
+ import { DefaultExtensionConfiguration } from "@smithy/types";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface ToolsExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration {
7
+ }
@@ -0,0 +1,7 @@
1
+ export * from "./ToolsClient";
2
+ export * from "./Tools";
3
+ export type { RuntimeExtension } from "./runtimeExtensions";
4
+ export type { ToolsExtensionConfiguration } from "./extensionConfiguration";
5
+ export * from "./commands";
6
+ export * from "./models";
7
+ export { ToolsServiceException } from "./models/ToolsServiceException";
@@ -0,0 +1,14 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
2
+ export type { __ServiceExceptionOptions };
3
+ export { __ServiceException };
4
+ /**
5
+ * @public
6
+ *
7
+ * Base exception class for all service exceptions from Tools service.
8
+ */
9
+ export declare class ToolsServiceException extends __ServiceException {
10
+ /**
11
+ * @internal
12
+ */
13
+ constructor(options: __ServiceExceptionOptions);
14
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,38 @@
1
+ import { ToolsServiceException as __BaseException } from "./ToolsServiceException";
2
+ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
3
+ /**
4
+ * @public
5
+ */
6
+ export declare class ValidationException extends __BaseException {
7
+ readonly name: "ValidationException";
8
+ readonly $fault: "client";
9
+ /**
10
+ * @internal
11
+ */
12
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
13
+ }
14
+ /**
15
+ * @public
16
+ */
17
+ export interface TestEndpointInput {
18
+ /**
19
+ * Company identifier for authorization
20
+ * @public
21
+ */
22
+ company?: string | undefined;
23
+ }
24
+ /**
25
+ * @public
26
+ */
27
+ export interface TestEndpointOutput {
28
+ /**
29
+ * Status message
30
+ * @public
31
+ */
32
+ status: string;
33
+ /**
34
+ * Timestamp of the response
35
+ * @public
36
+ */
37
+ timestamp: Date;
38
+ }
@@ -0,0 +1,11 @@
1
+ import { TestEndpointCommandInput, TestEndpointCommandOutput } from "../commands/TestEndpointCommand";
2
+ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
3
+ import { SerdeContext as __SerdeContext } from "@smithy/types";
4
+ /**
5
+ * serializeAws_restJson1TestEndpointCommand
6
+ */
7
+ export declare const se_TestEndpointCommand: (input: TestEndpointCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
8
+ /**
9
+ * deserializeAws_restJson1TestEndpointCommand
10
+ */
11
+ export declare const de_TestEndpointCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TestEndpointCommandOutput>;
@@ -0,0 +1,31 @@
1
+ import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
2
+ import { ToolsClientConfig } from "./ToolsClient";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
7
+ runtime: string;
8
+ defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
9
+ bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
10
+ defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved | undefined) => Promise<import("@smithy/types").UserAgent>;
11
+ maxAttempts: number | import("@smithy/types").Provider<number>;
12
+ requestHandler: import("@smithy/protocol-http").HttpHandler<any> | RequestHandler;
13
+ retryMode: string | import("@smithy/types").Provider<string>;
14
+ sha256: import("@smithy/types").HashConstructor;
15
+ streamCollector: import("@smithy/types").StreamCollector;
16
+ env?: "stage" | "stable" | "prod" | undefined;
17
+ token: import("@wildix/smithy-utils").TokenProvider;
18
+ apiVersion: string;
19
+ cacheMiddleware?: boolean | undefined;
20
+ urlParser: import("@smithy/types").UrlParser;
21
+ base64Decoder: import("@smithy/types").Decoder;
22
+ base64Encoder: (_input: string | Uint8Array) => string;
23
+ utf8Decoder: import("@smithy/types").Decoder;
24
+ utf8Encoder: (input: string | Uint8Array) => string;
25
+ disableHostPrefix: boolean;
26
+ logger: import("@smithy/types").Logger;
27
+ extensions: import("./runtimeExtensions").RuntimeExtension[];
28
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
29
+ userAgentAppId?: string | import("@smithy/types").Provider<string | undefined> | undefined;
30
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
31
+ };
@@ -0,0 +1,31 @@
1
+ import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
2
+ import { ToolsClientConfig } from "./ToolsClient";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
7
+ runtime: string;
8
+ defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
9
+ bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
10
+ defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved | undefined) => Promise<import("@smithy/types").UserAgent>;
11
+ maxAttempts: number | import("@smithy/types").Provider<number>;
12
+ requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler<any>;
13
+ retryMode: string | import("@smithy/types").Provider<string>;
14
+ sha256: import("@smithy/types").HashConstructor;
15
+ streamCollector: import("@smithy/types").StreamCollector;
16
+ userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
17
+ env?: "stage" | "stable" | "prod" | undefined;
18
+ token: import("@wildix/smithy-utils").TokenProvider;
19
+ apiVersion: string;
20
+ cacheMiddleware?: boolean | undefined;
21
+ urlParser: import("@smithy/types").UrlParser;
22
+ base64Decoder: import("@smithy/types").Decoder;
23
+ base64Encoder: (_input: string | Uint8Array) => string;
24
+ utf8Decoder: import("@smithy/types").Decoder;
25
+ utf8Encoder: (input: string | Uint8Array) => string;
26
+ disableHostPrefix: boolean;
27
+ logger: import("@smithy/types").Logger;
28
+ extensions: import("./runtimeExtensions").RuntimeExtension[];
29
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
30
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
31
+ };
@@ -0,0 +1,30 @@
1
+ import { ToolsClientConfig } from "./ToolsClient";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
6
+ runtime: string;
7
+ sha256: import("@smithy/types").HashConstructor;
8
+ env?: "stage" | "stable" | "prod" | undefined;
9
+ token: import("@wildix/smithy-utils").TokenProvider;
10
+ requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
11
+ apiVersion: string;
12
+ cacheMiddleware?: boolean | undefined;
13
+ urlParser: import("@smithy/types").UrlParser;
14
+ bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
15
+ streamCollector: import("@smithy/types").StreamCollector;
16
+ base64Decoder: import("@smithy/types").Decoder;
17
+ base64Encoder: (_input: string | Uint8Array) => string;
18
+ utf8Decoder: import("@smithy/types").Decoder;
19
+ utf8Encoder: (input: string | Uint8Array) => string;
20
+ disableHostPrefix: boolean;
21
+ defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved | undefined) => Promise<import("@smithy/types").UserAgent>;
22
+ maxAttempts: number | import("@smithy/types").Provider<number>;
23
+ retryMode: string | import("@smithy/types").Provider<string>;
24
+ logger: import("@smithy/types").Logger;
25
+ extensions: import("./runtimeExtensions").RuntimeExtension[];
26
+ defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
27
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
+ userAgentAppId?: string | import("@smithy/types").Provider<string | undefined> | undefined;
29
+ retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
30
+ };
@@ -0,0 +1,15 @@
1
+ import { ToolsClientConfig } from "./ToolsClient";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
6
+ apiVersion: string;
7
+ base64Decoder: import("@smithy/types").Decoder;
8
+ base64Encoder: (_input: string | Uint8Array) => string;
9
+ disableHostPrefix: boolean;
10
+ extensions: import("./runtimeExtensions").RuntimeExtension[];
11
+ logger: import("@smithy/types").Logger;
12
+ urlParser: import("@smithy/types").UrlParser;
13
+ utf8Decoder: import("@smithy/types").Decoder;
14
+ utf8Encoder: (input: string | Uint8Array) => string;
15
+ };
@@ -0,0 +1,17 @@
1
+ import { ToolsExtensionConfiguration } from "./extensionConfiguration";
2
+ /**
3
+ * @public
4
+ */
5
+ export interface RuntimeExtension {
6
+ configure(extensionConfiguration: ToolsExtensionConfiguration): void;
7
+ }
8
+ /**
9
+ * @public
10
+ */
11
+ export interface RuntimeExtensionsConfig {
12
+ extensions: RuntimeExtension[];
13
+ }
14
+ /**
15
+ * @internal
16
+ */
17
+ export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any;
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@wildix/wim-tools-client",
3
+ "description": "@wildix/wim-tools-client client",
4
+ "version": "0.0.3",
5
+ "scripts": {
6
+ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
+ "build:cjs": "tsc -p tsconfig.cjs.json",
8
+ "build:es": "tsc -p tsconfig.es.json",
9
+ "build:types": "tsc -p tsconfig.types.json",
10
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
11
+ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
+ "prepack": "yarn run clean && yarn run build",
13
+ "postpublish": "node ../../scripts/postpublish.js"
14
+ },
15
+ "main": "./dist-cjs/index.js",
16
+ "types": "./dist-types/index.d.ts",
17
+ "module": "./dist-es/index.js",
18
+ "sideEffects": false,
19
+ "dependencies": {
20
+ "tslib": "^2.6.2",
21
+ "@aws-crypto/sha256-browser": "5.2.0",
22
+ "@aws-crypto/sha256-js": "5.2.0",
23
+ "@aws-sdk/core": "3.775.0",
24
+ "@aws-sdk/middleware-host-header": "3.775.0",
25
+ "@aws-sdk/middleware-logger": "3.775.0",
26
+ "@aws-sdk/middleware-recursion-detection": "3.775.0",
27
+ "@aws-sdk/middleware-user-agent": "3.775.0",
28
+ "@aws-sdk/types": "latest",
29
+ "@aws-sdk/util-user-agent-browser": "3.775.0",
30
+ "@aws-sdk/util-user-agent-node": "3.775.0",
31
+ "@smithy/config-resolver": "^4.1.0",
32
+ "@smithy/core": "^3.2.0",
33
+ "@smithy/fetch-http-handler": "^5.0.2",
34
+ "@smithy/hash-node": "^4.0.2",
35
+ "@smithy/invalid-dependency": "^4.0.2",
36
+ "@smithy/middleware-content-length": "^4.0.2",
37
+ "@smithy/middleware-retry": "^4.1.0",
38
+ "@smithy/middleware-serde": "^4.0.3",
39
+ "@smithy/middleware-stack": "^4.0.2",
40
+ "@smithy/node-config-provider": "^4.0.2",
41
+ "@smithy/node-http-handler": "^4.0.4",
42
+ "@smithy/protocol-http": "^5.1.0",
43
+ "@smithy/smithy-client": "^4.2.0",
44
+ "@smithy/types": "^4.2.0",
45
+ "@smithy/url-parser": "^4.0.2",
46
+ "@smithy/util-base64": "^4.0.0",
47
+ "@smithy/util-body-length-browser": "^4.0.0",
48
+ "@smithy/util-body-length-node": "^4.0.0",
49
+ "@smithy/util-defaults-mode-browser": "^4.0.8",
50
+ "@smithy/util-defaults-mode-node": "^4.0.8",
51
+ "@smithy/util-retry": "^4.0.2",
52
+ "@smithy/util-utf8": "^4.0.0",
53
+ "@wildix/smithy-utils": "^1.0.3"
54
+ },
55
+ "devDependencies": {
56
+ "@tsconfig/node18": "18.2.4",
57
+ "concurrently": "7.0.0",
58
+ "downlevel-dts": "0.10.1",
59
+ "rimraf": "^3.0.0",
60
+ "typescript": "~5.2.2",
61
+ "@types/node": "^18.19.69"
62
+ },
63
+ "engines": {
64
+ "node": ">=18.0.0"
65
+ },
66
+ "typesVersions": {
67
+ "<4.0": {
68
+ "dist-types/*": [
69
+ "dist-types/ts3.4/*"
70
+ ]
71
+ }
72
+ },
73
+ "files": [
74
+ "dist-*/**"
75
+ ],
76
+ "license": "Apache-2.0",
77
+ "browser": {
78
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
79
+ },
80
+ "react-native": {
81
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
82
+ }
83
+ }