@wildix/wim-tools-client 0.0.25 → 0.0.27
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/models/models_0.js +16 -1
- package/dist-cjs/protocols/Aws_restJson1.js +17 -0
- package/dist-es/models/models_0.js +14 -0
- package/dist-es/protocols/Aws_restJson1.js +18 -1
- package/dist-types/commands/CreateToolCommand.d.ts +2 -2
- package/dist-types/commands/ExecuteToolCommand.d.ts +2 -0
- package/dist-types/commands/GetToolCommand.d.ts +1 -1
- package/dist-types/commands/ListToolsCommand.d.ts +1 -1
- package/dist-types/commands/UpdateToolCommand.d.ts +2 -2
- package/dist-types/models/models_0.d.ts +18 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatHandler = exports.ToolChatRecipient = exports.ToolStringValue = exports.ValidationException = exports.NotFoundException = exports.AlreadyExistException = void 0;
|
|
3
|
+
exports.ForbiddenException = exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatHandler = exports.ToolChatRecipient = exports.ToolStringValue = exports.ValidationException = exports.NotFoundException = exports.AlreadyExistException = void 0;
|
|
4
4
|
const ToolsServiceException_1 = require("./ToolsServiceException");
|
|
5
5
|
class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
|
|
6
6
|
name = "AlreadyExistException";
|
|
@@ -151,3 +151,18 @@ class ToolExecutionServerException extends ToolsServiceException_1.ToolsServiceE
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
exports.ToolExecutionServerException = ToolExecutionServerException;
|
|
154
|
+
class ForbiddenException extends ToolsServiceException_1.ToolsServiceException {
|
|
155
|
+
name = "ForbiddenException";
|
|
156
|
+
$fault = "client";
|
|
157
|
+
details;
|
|
158
|
+
constructor(opts) {
|
|
159
|
+
super({
|
|
160
|
+
name: "ForbiddenException",
|
|
161
|
+
$fault: "client",
|
|
162
|
+
...opts
|
|
163
|
+
});
|
|
164
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
165
|
+
this.details = opts.details;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.ForbiddenException = ForbiddenException;
|
|
@@ -268,6 +268,9 @@ const de_CommandError = async (output, context) => {
|
|
|
268
268
|
case "ValidationException":
|
|
269
269
|
case "smithy.framework#ValidationException":
|
|
270
270
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
271
|
+
case "ForbiddenException":
|
|
272
|
+
case "wildix.wim.tools#ForbiddenException":
|
|
273
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
271
274
|
default:
|
|
272
275
|
const parsedBody = parsedOutput.body;
|
|
273
276
|
return throwDefaultError({
|
|
@@ -317,6 +320,20 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
317
320
|
});
|
|
318
321
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
319
322
|
};
|
|
323
|
+
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
324
|
+
const contents = (0, smithy_client_1.map)({});
|
|
325
|
+
const data = parsedOutput.body;
|
|
326
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
327
|
+
'details': _ => de_Document(_, context),
|
|
328
|
+
'message': smithy_client_1.expectString,
|
|
329
|
+
});
|
|
330
|
+
Object.assign(contents, doc);
|
|
331
|
+
const exception = new models_0_1.ForbiddenException({
|
|
332
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
333
|
+
...contents
|
|
334
|
+
});
|
|
335
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
336
|
+
};
|
|
320
337
|
const de_ToolExecutionExceptionRes = async (parsedOutput, context) => {
|
|
321
338
|
const contents = (0, smithy_client_1.map)({});
|
|
322
339
|
const data = parsedOutput.body;
|
|
@@ -143,3 +143,17 @@ export class ToolExecutionServerException extends __BaseException {
|
|
|
143
143
|
this.details = opts.details;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
+
export class ForbiddenException extends __BaseException {
|
|
147
|
+
name = "ForbiddenException";
|
|
148
|
+
$fault = "client";
|
|
149
|
+
details;
|
|
150
|
+
constructor(opts) {
|
|
151
|
+
super({
|
|
152
|
+
name: "ForbiddenException",
|
|
153
|
+
$fault: "client",
|
|
154
|
+
...opts
|
|
155
|
+
});
|
|
156
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
157
|
+
this.details = opts.details;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToolsServiceException as __BaseException } from "../models/ToolsServiceException";
|
|
2
|
-
import { AlreadyExistException, NotFoundException, ToolExecutionException, ToolExecutionServerException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { AlreadyExistException, ForbiddenException, NotFoundException, ToolExecutionException, ToolExecutionServerException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
5
|
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
@@ -251,6 +251,9 @@ const de_CommandError = async (output, context) => {
|
|
|
251
251
|
case "ValidationException":
|
|
252
252
|
case "smithy.framework#ValidationException":
|
|
253
253
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
254
|
+
case "ForbiddenException":
|
|
255
|
+
case "wildix.wim.tools#ForbiddenException":
|
|
256
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
254
257
|
default:
|
|
255
258
|
const parsedBody = parsedOutput.body;
|
|
256
259
|
return throwDefaultError({
|
|
@@ -300,6 +303,20 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
300
303
|
});
|
|
301
304
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
302
305
|
};
|
|
306
|
+
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
307
|
+
const contents = map({});
|
|
308
|
+
const data = parsedOutput.body;
|
|
309
|
+
const doc = take(data, {
|
|
310
|
+
'details': _ => de_Document(_, context),
|
|
311
|
+
'message': __expectString,
|
|
312
|
+
});
|
|
313
|
+
Object.assign(contents, doc);
|
|
314
|
+
const exception = new ForbiddenException({
|
|
315
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
316
|
+
...contents
|
|
317
|
+
});
|
|
318
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
319
|
+
};
|
|
303
320
|
const de_ToolExecutionExceptionRes = async (parsedOutput, context) => {
|
|
304
321
|
const contents = map({});
|
|
305
322
|
const data = parsedOutput.body;
|
|
@@ -127,7 +127,7 @@ declare const CreateToolCommand_base: {
|
|
|
127
127
|
* userId: "<ToolStringValue>",
|
|
128
128
|
* },
|
|
129
129
|
* text: "<ToolStringValue>", // required
|
|
130
|
-
*
|
|
130
|
+
* botName: "<ToolStringValue>", // required
|
|
131
131
|
* },
|
|
132
132
|
* },
|
|
133
133
|
* },
|
|
@@ -229,7 +229,7 @@ declare const CreateToolCommand_base: {
|
|
|
229
229
|
* // userId: "<ToolStringValue>",
|
|
230
230
|
* // },
|
|
231
231
|
* // text: "<ToolStringValue>", // required
|
|
232
|
-
* //
|
|
232
|
+
* // botName: "<ToolStringValue>", // required
|
|
233
233
|
* // },
|
|
234
234
|
* // },
|
|
235
235
|
* // },
|
|
@@ -65,6 +65,8 @@ declare const ExecuteToolCommand_base: {
|
|
|
65
65
|
*
|
|
66
66
|
* @throws {@link NotFoundException} (client fault)
|
|
67
67
|
*
|
|
68
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
69
|
+
*
|
|
68
70
|
* @throws {@link ToolExecutionException} (client fault)
|
|
69
71
|
*
|
|
70
72
|
* @throws {@link ToolExecutionServerException} (server fault)
|
|
@@ -135,7 +135,7 @@ declare const GetToolCommand_base: {
|
|
|
135
135
|
* // userId: "<ToolStringValue>",
|
|
136
136
|
* // },
|
|
137
137
|
* // text: "<ToolStringValue>", // required
|
|
138
|
-
* //
|
|
138
|
+
* // botName: "<ToolStringValue>", // required
|
|
139
139
|
* // },
|
|
140
140
|
* // },
|
|
141
141
|
* // },
|
|
@@ -135,7 +135,7 @@ declare const ListToolsCommand_base: {
|
|
|
135
135
|
* // userId: "<ToolStringValue>",
|
|
136
136
|
* // },
|
|
137
137
|
* // text: "<ToolStringValue>", // required
|
|
138
|
-
* //
|
|
138
|
+
* // botName: "<ToolStringValue>", // required
|
|
139
139
|
* // },
|
|
140
140
|
* // },
|
|
141
141
|
* // },
|
|
@@ -128,7 +128,7 @@ declare const UpdateToolCommand_base: {
|
|
|
128
128
|
* userId: "<ToolStringValue>",
|
|
129
129
|
* },
|
|
130
130
|
* text: "<ToolStringValue>", // required
|
|
131
|
-
*
|
|
131
|
+
* botName: "<ToolStringValue>", // required
|
|
132
132
|
* },
|
|
133
133
|
* },
|
|
134
134
|
* },
|
|
@@ -230,7 +230,7 @@ declare const UpdateToolCommand_base: {
|
|
|
230
230
|
* // userId: "<ToolStringValue>",
|
|
231
231
|
* // },
|
|
232
232
|
* // text: "<ToolStringValue>", // required
|
|
233
|
-
* //
|
|
233
|
+
* // botName: "<ToolStringValue>", // required
|
|
234
234
|
* // },
|
|
235
235
|
* // },
|
|
236
236
|
* // },
|
|
@@ -145,10 +145,10 @@ export interface ToolChatConfig {
|
|
|
145
145
|
*/
|
|
146
146
|
text: ToolStringValue;
|
|
147
147
|
/**
|
|
148
|
-
*
|
|
148
|
+
* Name of the system bot that will send the message. If not provided, defaults to 'WIM Tools'.
|
|
149
149
|
* @public
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
botName: ToolStringValue;
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* @public
|
|
@@ -860,6 +860,22 @@ export interface ExecuteToolOutput {
|
|
|
860
860
|
*/
|
|
861
861
|
result: ToolExecutionResult;
|
|
862
862
|
}
|
|
863
|
+
/**
|
|
864
|
+
* @public
|
|
865
|
+
*/
|
|
866
|
+
export declare class ForbiddenException extends __BaseException {
|
|
867
|
+
readonly name: "ForbiddenException";
|
|
868
|
+
readonly $fault: "client";
|
|
869
|
+
/**
|
|
870
|
+
* Indicates that the request is forbidden, typically due to insufficient permissions or access restrictions
|
|
871
|
+
* @public
|
|
872
|
+
*/
|
|
873
|
+
details?: __DocumentType | undefined;
|
|
874
|
+
/**
|
|
875
|
+
* @internal
|
|
876
|
+
*/
|
|
877
|
+
constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
|
|
878
|
+
}
|
|
863
879
|
/**
|
|
864
880
|
* @public
|
|
865
881
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-tools-client",
|
|
3
3
|
"description": "@wildix/wim-tools-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.27",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|