@wildix/wim-tools-client 1.0.2 → 3.1.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.
- package/dist-cjs/Tools.js +3 -3
- package/dist-cjs/ToolsClient.js +34 -25
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/commands/CreateToolCommand.js +10 -11
- package/dist-cjs/commands/DeleteToolCommand.js +10 -11
- package/dist-cjs/commands/DescribeToolsCommand.js +10 -11
- package/dist-cjs/commands/DiscoverToolsCommand.js +10 -11
- package/dist-cjs/commands/ExecuteToolCommand.js +10 -11
- package/dist-cjs/commands/GetToolCommand.js +10 -11
- package/dist-cjs/commands/ListToolsCommand.js +10 -11
- package/dist-cjs/commands/UpdateToolCommand.js +10 -11
- package/dist-cjs/endpoint/EndpointParameters.js +16 -0
- package/dist-cjs/endpoint/bdd.js +28 -0
- package/dist-cjs/endpoint/endpointResolver.js +16 -0
- package/dist-cjs/index.js +4 -1
- package/dist-cjs/models/ToolsServiceException.js +3 -3
- package/dist-cjs/models/enums.js +18 -0
- package/dist-cjs/models/errors.js +99 -0
- package/dist-cjs/models/models_0.js +0 -174
- package/dist-cjs/runtimeConfig.browser.js +11 -11
- package/dist-cjs/runtimeConfig.js +22 -18
- package/dist-cjs/runtimeConfig.shared.js +30 -10
- package/dist-cjs/runtimeExtensions.js +6 -5
- package/dist-cjs/schemas/schemas_0.js +458 -0
- package/dist-es/Tools.js +4 -4
- package/dist-es/ToolsClient.js +30 -21
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/CreateToolCommand.js +9 -10
- package/dist-es/commands/DeleteToolCommand.js +9 -10
- package/dist-es/commands/DescribeToolsCommand.js +9 -10
- package/dist-es/commands/DiscoverToolsCommand.js +9 -10
- package/dist-es/commands/ExecuteToolCommand.js +9 -10
- package/dist-es/commands/GetToolCommand.js +9 -10
- package/dist-es/commands/ListToolsCommand.js +9 -10
- package/dist-es/commands/UpdateToolCommand.js +9 -10
- package/dist-es/endpoint/EndpointParameters.js +12 -0
- package/dist-es/endpoint/bdd.js +25 -0
- package/dist-es/endpoint/endpointResolver.js +12 -0
- package/dist-es/index.js +4 -1
- package/dist-es/models/ToolsServiceException.js +1 -1
- package/dist-es/models/enums.js +15 -0
- package/dist-es/models/errors.js +89 -0
- package/dist-es/models/models_0.js +1 -166
- package/dist-es/runtimeConfig.browser.js +7 -7
- package/dist-es/runtimeConfig.js +17 -13
- package/dist-es/runtimeConfig.shared.js +24 -4
- package/dist-es/runtimeExtensions.js +6 -5
- package/dist-es/schemas/schemas_0.js +454 -0
- package/dist-types/Tools.d.ts +9 -9
- package/dist-types/ToolsClient.d.ts +38 -21
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/CreateToolCommand.d.ts +11 -7
- package/dist-types/commands/DeleteToolCommand.d.ts +11 -7
- package/dist-types/commands/DescribeToolsCommand.d.ts +11 -7
- package/dist-types/commands/DiscoverToolsCommand.d.ts +11 -7
- package/dist-types/commands/ExecuteToolCommand.d.ts +11 -7
- package/dist-types/commands/GetToolCommand.d.ts +11 -7
- package/dist-types/commands/ListToolsCommand.d.ts +11 -7
- package/dist-types/commands/UpdateToolCommand.d.ts +11 -7
- package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +4 -3
- package/dist-types/index.d.ts +5 -1
- package/dist-types/models/ToolsServiceException.d.ts +1 -1
- package/dist-types/models/enums.d.ts +31 -0
- package/dist-types/models/errors.d.ts +90 -0
- package/dist-types/models/models_0.d.ts +32 -136
- package/dist-types/runtimeConfig.browser.d.ts +35 -17
- package/dist-types/runtimeConfig.d.ts +34 -16
- package/dist-types/runtimeConfig.native.d.ts +36 -18
- package/dist-types/runtimeConfig.shared.d.ts +20 -3
- package/dist-types/runtimeExtensions.d.ts +1 -1
- package/dist-types/schemas/schemas_0.d.ts +66 -0
- package/package.json +13 -38
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/protocols/Aws_restJson1.js +0 -518
- package/dist-es/models/index.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -499
- package/dist-types/models/index.d.ts +0 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -74
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { DescribeTools$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class DescribeToolsCommand extends $Command
|
|
6
|
+
export class DescribeToolsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "DescribeTools", {})
|
|
12
13
|
.n("ToolsClient", "DescribeToolsCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_DescribeToolsCommand)
|
|
15
|
-
.de(de_DescribeToolsCommand)
|
|
14
|
+
.sc(DescribeTools$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { DiscoverTools$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class DiscoverToolsCommand extends $Command
|
|
6
|
+
export class DiscoverToolsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "DiscoverTools", {})
|
|
12
13
|
.n("ToolsClient", "DiscoverToolsCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_DiscoverToolsCommand)
|
|
15
|
-
.de(de_DiscoverToolsCommand)
|
|
14
|
+
.sc(DiscoverTools$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ExecuteTool$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class ExecuteToolCommand extends $Command
|
|
6
|
+
export class ExecuteToolCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "ExecuteTool", {})
|
|
12
13
|
.n("ToolsClient", "ExecuteToolCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_ExecuteToolCommand)
|
|
15
|
-
.de(de_ExecuteToolCommand)
|
|
14
|
+
.sc(ExecuteTool$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { GetTool$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class GetToolCommand extends $Command
|
|
6
|
+
export class GetToolCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "GetTool", {})
|
|
12
13
|
.n("ToolsClient", "GetToolCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_GetToolCommand)
|
|
15
|
-
.de(de_GetToolCommand)
|
|
14
|
+
.sc(GetTool$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { ListTools$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class ListToolsCommand extends $Command
|
|
6
|
+
export class ListToolsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "ListTools", {})
|
|
12
13
|
.n("ToolsClient", "ListToolsCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_ListToolsCommand)
|
|
15
|
-
.de(de_ListToolsCommand)
|
|
14
|
+
.sc(ListTools$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { UpdateTool$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class UpdateToolCommand extends $Command
|
|
6
|
+
export class UpdateToolCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "UpdateTool", {})
|
|
12
13
|
.n("ToolsClient", "UpdateToolCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_UpdateToolCommand)
|
|
15
|
-
.de(de_UpdateToolCommand)
|
|
14
|
+
.sc(UpdateTool$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const clientContextParamDefaults = {};
|
|
2
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
3
|
+
return Object.assign(options, {
|
|
4
|
+
env: options.env ?? "prod",
|
|
5
|
+
defaultSigningName: "",
|
|
6
|
+
clientContextParams: Object.assign(clientContextParamDefaults, options.clientContextParams),
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
export const commonParams = {
|
|
10
|
+
env: { type: "clientContextParams", name: "env" },
|
|
11
|
+
endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/core/endpoints";
|
|
2
|
+
const a = "stringEquals", b = { "ref": "endpoint" }, c = { "ref": "env" };
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
["isSet", [b]],
|
|
6
|
+
[a, [c, "stable"]],
|
|
7
|
+
[a, [c, "stage"]]
|
|
8
|
+
],
|
|
9
|
+
results: [
|
|
10
|
+
[-1],
|
|
11
|
+
[b, {}],
|
|
12
|
+
["https://tools.wim-stable.wildix.com", {}],
|
|
13
|
+
["https://tools.wim-stage.wildix.com", {}],
|
|
14
|
+
["https://tools.wim.wildix.com", {}]
|
|
15
|
+
]
|
|
16
|
+
};
|
|
17
|
+
const root = 2;
|
|
18
|
+
const r = 100_000_000;
|
|
19
|
+
const nodes = new Int32Array([
|
|
20
|
+
-1, 1, -1,
|
|
21
|
+
0, r + 1, 3,
|
|
22
|
+
1, r + 2, 4,
|
|
23
|
+
2, r + 3, r + 4,
|
|
24
|
+
]);
|
|
25
|
+
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { decideEndpoint, EndpointCache } from "@smithy/core/endpoints";
|
|
2
|
+
import { bdd } from "./bdd";
|
|
3
|
+
const cache = new EndpointCache({
|
|
4
|
+
size: 50,
|
|
5
|
+
params: ["endpoint", "env"],
|
|
6
|
+
});
|
|
7
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
8
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
9
|
+
endpointParams: endpointParams,
|
|
10
|
+
logger: context.logger,
|
|
11
|
+
}));
|
|
12
|
+
};
|
package/dist-es/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from "./ToolsClient";
|
|
2
2
|
export * from "./Tools";
|
|
3
3
|
export * from "./commands";
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./models/enums";
|
|
6
|
+
export * from "./models/errors";
|
|
7
|
+
export * from "./models/models_0";
|
|
5
8
|
export { ToolsServiceException } from "./models/ToolsServiceException";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServiceException as __ServiceException, } from "@smithy/
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/core/client";
|
|
2
2
|
export { __ServiceException };
|
|
3
3
|
export class ToolsServiceException extends __ServiceException {
|
|
4
4
|
constructor(options) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const ToolWebhookMethod = {
|
|
2
|
+
DELETE: "DELETE",
|
|
3
|
+
GET: "GET",
|
|
4
|
+
PATCH: "PATCH",
|
|
5
|
+
POST: "POST",
|
|
6
|
+
PUT: "PUT",
|
|
7
|
+
};
|
|
8
|
+
export const ToolVariableType = {
|
|
9
|
+
BOOLEAN: "boolean",
|
|
10
|
+
NUMBER: "number",
|
|
11
|
+
NUMBER_ARRAY: "number_array",
|
|
12
|
+
SCHEMA: "schema",
|
|
13
|
+
STRING: "string",
|
|
14
|
+
STRING_ARRAY: "string_array",
|
|
15
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ToolsServiceException as __BaseException } from "./ToolsServiceException";
|
|
2
|
+
export class AlreadyExistException extends __BaseException {
|
|
3
|
+
name = "AlreadyExistException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AlreadyExistException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AlreadyExistException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class ForbiddenException extends __BaseException {
|
|
15
|
+
name = "ForbiddenException";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "ForbiddenException",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class NotFoundException extends __BaseException {
|
|
27
|
+
name = "NotFoundException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "NotFoundException",
|
|
32
|
+
$fault: "client",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class UnauthorizedException extends __BaseException {
|
|
39
|
+
name = "UnauthorizedException";
|
|
40
|
+
$fault = "client";
|
|
41
|
+
constructor(opts) {
|
|
42
|
+
super({
|
|
43
|
+
name: "UnauthorizedException",
|
|
44
|
+
$fault: "client",
|
|
45
|
+
...opts,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export class ValidationException extends __BaseException {
|
|
51
|
+
name = "ValidationException";
|
|
52
|
+
$fault = "client";
|
|
53
|
+
constructor(opts) {
|
|
54
|
+
super({
|
|
55
|
+
name: "ValidationException",
|
|
56
|
+
$fault: "client",
|
|
57
|
+
...opts,
|
|
58
|
+
});
|
|
59
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export class ToolExecutionException extends __BaseException {
|
|
63
|
+
name = "ToolExecutionException";
|
|
64
|
+
$fault = "client";
|
|
65
|
+
details;
|
|
66
|
+
constructor(opts) {
|
|
67
|
+
super({
|
|
68
|
+
name: "ToolExecutionException",
|
|
69
|
+
$fault: "client",
|
|
70
|
+
...opts,
|
|
71
|
+
});
|
|
72
|
+
Object.setPrototypeOf(this, ToolExecutionException.prototype);
|
|
73
|
+
this.details = opts.details;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export class ToolExecutionServerException extends __BaseException {
|
|
77
|
+
name = "ToolExecutionServerException";
|
|
78
|
+
$fault = "server";
|
|
79
|
+
details;
|
|
80
|
+
constructor(opts) {
|
|
81
|
+
super({
|
|
82
|
+
name: "ToolExecutionServerException",
|
|
83
|
+
$fault: "server",
|
|
84
|
+
...opts,
|
|
85
|
+
});
|
|
86
|
+
Object.setPrototypeOf(this, ToolExecutionServerException.prototype);
|
|
87
|
+
this.details = opts.details;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -1,166 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export class AlreadyExistException extends __BaseException {
|
|
3
|
-
name = "AlreadyExistException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
super({
|
|
7
|
-
name: "AlreadyExistException",
|
|
8
|
-
$fault: "client",
|
|
9
|
-
...opts
|
|
10
|
-
});
|
|
11
|
-
Object.setPrototypeOf(this, AlreadyExistException.prototype);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export class ForbiddenException extends __BaseException {
|
|
15
|
-
name = "ForbiddenException";
|
|
16
|
-
$fault = "client";
|
|
17
|
-
constructor(opts) {
|
|
18
|
-
super({
|
|
19
|
-
name: "ForbiddenException",
|
|
20
|
-
$fault: "client",
|
|
21
|
-
...opts
|
|
22
|
-
});
|
|
23
|
-
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export class NotFoundException extends __BaseException {
|
|
27
|
-
name = "NotFoundException";
|
|
28
|
-
$fault = "client";
|
|
29
|
-
constructor(opts) {
|
|
30
|
-
super({
|
|
31
|
-
name: "NotFoundException",
|
|
32
|
-
$fault: "client",
|
|
33
|
-
...opts
|
|
34
|
-
});
|
|
35
|
-
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export class UnauthorizedException extends __BaseException {
|
|
39
|
-
name = "UnauthorizedException";
|
|
40
|
-
$fault = "client";
|
|
41
|
-
constructor(opts) {
|
|
42
|
-
super({
|
|
43
|
-
name: "UnauthorizedException",
|
|
44
|
-
$fault: "client",
|
|
45
|
-
...opts
|
|
46
|
-
});
|
|
47
|
-
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export class ValidationException extends __BaseException {
|
|
51
|
-
name = "ValidationException";
|
|
52
|
-
$fault = "client";
|
|
53
|
-
constructor(opts) {
|
|
54
|
-
super({
|
|
55
|
-
name: "ValidationException",
|
|
56
|
-
$fault: "client",
|
|
57
|
-
...opts
|
|
58
|
-
});
|
|
59
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
export var ToolChatRecipient;
|
|
63
|
-
(function (ToolChatRecipient) {
|
|
64
|
-
ToolChatRecipient.visit = (value, visitor) => {
|
|
65
|
-
if (value.channelId !== undefined)
|
|
66
|
-
return visitor.channelId(value.channelId);
|
|
67
|
-
if (value.userId !== undefined)
|
|
68
|
-
return visitor.userId(value.userId);
|
|
69
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
70
|
-
};
|
|
71
|
-
})(ToolChatRecipient || (ToolChatRecipient = {}));
|
|
72
|
-
export var ToolEmailHandler;
|
|
73
|
-
(function (ToolEmailHandler) {
|
|
74
|
-
ToolEmailHandler.visit = (value, visitor) => {
|
|
75
|
-
if (value.wns !== undefined)
|
|
76
|
-
return visitor.wns(value.wns);
|
|
77
|
-
if (value.custom !== undefined)
|
|
78
|
-
return visitor.custom(value.custom);
|
|
79
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
80
|
-
};
|
|
81
|
-
})(ToolEmailHandler || (ToolEmailHandler = {}));
|
|
82
|
-
export var ToolMcpAuthorization;
|
|
83
|
-
(function (ToolMcpAuthorization) {
|
|
84
|
-
ToolMcpAuthorization.visit = (value, visitor) => {
|
|
85
|
-
if (value.bearer !== undefined)
|
|
86
|
-
return visitor.bearer(value.bearer);
|
|
87
|
-
if (value.customHeaders !== undefined)
|
|
88
|
-
return visitor.customHeaders(value.customHeaders);
|
|
89
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
90
|
-
};
|
|
91
|
-
})(ToolMcpAuthorization || (ToolMcpAuthorization = {}));
|
|
92
|
-
export var ToolWebhookAuth;
|
|
93
|
-
(function (ToolWebhookAuth) {
|
|
94
|
-
ToolWebhookAuth.visit = (value, visitor) => {
|
|
95
|
-
if (value.basic !== undefined)
|
|
96
|
-
return visitor.basic(value.basic);
|
|
97
|
-
if (value.bearer !== undefined)
|
|
98
|
-
return visitor.bearer(value.bearer);
|
|
99
|
-
if (value.oauth !== undefined)
|
|
100
|
-
return visitor.oauth(value.oauth);
|
|
101
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
102
|
-
};
|
|
103
|
-
})(ToolWebhookAuth || (ToolWebhookAuth = {}));
|
|
104
|
-
export const ToolWebhookMethod = {
|
|
105
|
-
DELETE: "DELETE",
|
|
106
|
-
GET: "GET",
|
|
107
|
-
PATCH: "PATCH",
|
|
108
|
-
POST: "POST",
|
|
109
|
-
PUT: "PUT",
|
|
110
|
-
};
|
|
111
|
-
export var ToolHandler;
|
|
112
|
-
(function (ToolHandler) {
|
|
113
|
-
ToolHandler.visit = (value, visitor) => {
|
|
114
|
-
if (value.email !== undefined)
|
|
115
|
-
return visitor.email(value.email);
|
|
116
|
-
if (value.webhook !== undefined)
|
|
117
|
-
return visitor.webhook(value.webhook);
|
|
118
|
-
if (value.search !== undefined)
|
|
119
|
-
return visitor.search(value.search);
|
|
120
|
-
if (value.chat !== undefined)
|
|
121
|
-
return visitor.chat(value.chat);
|
|
122
|
-
if (value.sms !== undefined)
|
|
123
|
-
return visitor.sms(value.sms);
|
|
124
|
-
if (value.mcp !== undefined)
|
|
125
|
-
return visitor.mcp(value.mcp);
|
|
126
|
-
if (value.mcpTool !== undefined)
|
|
127
|
-
return visitor.mcpTool(value.mcpTool);
|
|
128
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
129
|
-
};
|
|
130
|
-
})(ToolHandler || (ToolHandler = {}));
|
|
131
|
-
export const ToolVariableType = {
|
|
132
|
-
BOOLEAN: "boolean",
|
|
133
|
-
NUMBER: "number",
|
|
134
|
-
NUMBER_ARRAY: "number_array",
|
|
135
|
-
SCHEMA: "schema",
|
|
136
|
-
STRING: "string",
|
|
137
|
-
STRING_ARRAY: "string_array",
|
|
138
|
-
};
|
|
139
|
-
export class ToolExecutionException extends __BaseException {
|
|
140
|
-
name = "ToolExecutionException";
|
|
141
|
-
$fault = "client";
|
|
142
|
-
details;
|
|
143
|
-
constructor(opts) {
|
|
144
|
-
super({
|
|
145
|
-
name: "ToolExecutionException",
|
|
146
|
-
$fault: "client",
|
|
147
|
-
...opts
|
|
148
|
-
});
|
|
149
|
-
Object.setPrototypeOf(this, ToolExecutionException.prototype);
|
|
150
|
-
this.details = opts.details;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
export class ToolExecutionServerException extends __BaseException {
|
|
154
|
-
name = "ToolExecutionServerException";
|
|
155
|
-
$fault = "server";
|
|
156
|
-
details;
|
|
157
|
-
constructor(opts) {
|
|
158
|
-
super({
|
|
159
|
-
name: "ToolExecutionServerException",
|
|
160
|
-
$fault: "server",
|
|
161
|
-
...opts
|
|
162
|
-
});
|
|
163
|
-
Object.setPrototypeOf(this, ToolExecutionServerException.prototype);
|
|
164
|
-
this.details = opts.details;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
-
import { createDefaultUserAgentProvider } from "@aws-sdk/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
4
|
+
import { loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
5
|
+
import { resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
6
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
8
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
7
9
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
8
|
-
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
9
|
-
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
10
10
|
export const getRuntimeConfig = (config) => {
|
|
11
11
|
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
12
|
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
@@ -17,7 +17,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
17
17
|
runtime: "browser",
|
|
18
18
|
defaultsMode,
|
|
19
19
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ clientVersion: packageInfo.version }),
|
|
21
21
|
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
22
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
23
23
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
2
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/core/client";
|
|
3
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { loadConfig as loadNodeConfig, resolveDefaultsModeConfig } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength, Hash } from "@smithy/core/serde";
|
|
7
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
9
8
|
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
9
|
export const getRuntimeConfig = (config) => {
|
|
14
10
|
emitWarningIfUnsupportedVersion(process.version);
|
|
15
11
|
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
12
|
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
13
|
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
+
const loaderConfig = {
|
|
15
|
+
profile: config?.profile,
|
|
16
|
+
logger: clientSharedValues.logger,
|
|
17
|
+
};
|
|
18
18
|
return {
|
|
19
19
|
...clientSharedValues,
|
|
20
20
|
...config,
|
|
21
21
|
runtime: "node",
|
|
22
22
|
defaultsMode,
|
|
23
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({
|
|
24
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ clientVersion: packageInfo.version }),
|
|
25
25
|
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
26
26
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
-
retryMode: config?.retryMode ??
|
|
27
|
+
retryMode: config?.retryMode ??
|
|
28
|
+
loadNodeConfig({
|
|
29
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
30
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
31
|
+
}, config),
|
|
28
32
|
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
29
33
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS,
|
|
34
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
31
35
|
};
|
|
32
36
|
};
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
2
|
+
import { HttpBearerAuthSigner } from "@smithy/core";
|
|
3
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
4
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
5
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
6
|
+
import { defaultToolsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
5
9
|
export const getRuntimeConfig = (config) => {
|
|
6
10
|
return {
|
|
7
11
|
apiVersion: "v1",
|
|
8
12
|
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
9
13
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
14
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
11
16
|
extensions: config?.extensions ?? [],
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultToolsHttpAuthSchemeProvider,
|
|
18
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
+
{
|
|
20
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
21
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
|
|
22
|
+
signer: new HttpBearerAuthSigner(),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
12
25
|
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
27
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
+
defaultNamespace: "wildix.wim.tools",
|
|
29
|
+
errorTypeRegistries,
|
|
30
|
+
version: "v1",
|
|
31
|
+
serviceTarget: "Tools",
|
|
32
|
+
},
|
|
13
33
|
urlParser: config?.urlParser ?? parseUrl,
|
|
14
34
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
15
35
|
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
3
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
3
4
|
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));
|
|
5
|
+
const extensionConfiguration = Object.assign(getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
6
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
7
|
+
return Object.assign(runtimeConfig, resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
7
8
|
};
|