@wildix/wim-tools-client 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,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;
@@ -128,6 +128,7 @@ declare const CreateToolCommand_base: {
128
128
  * },
129
129
  * text: "<ToolStringValue>", // required
130
130
  * mentions: "<ToolStringValue>",
131
+ * botName: "<ToolStringValue>", // required
131
132
  * },
132
133
  * },
133
134
  * },
@@ -230,6 +231,7 @@ declare const CreateToolCommand_base: {
230
231
  * // },
231
232
  * // text: "<ToolStringValue>", // required
232
233
  * // mentions: "<ToolStringValue>",
234
+ * // botName: "<ToolStringValue>", // required
233
235
  * // },
234
236
  * // },
235
237
  * // },
@@ -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)
@@ -136,6 +136,7 @@ declare const GetToolCommand_base: {
136
136
  * // },
137
137
  * // text: "<ToolStringValue>", // required
138
138
  * // mentions: "<ToolStringValue>",
139
+ * // botName: "<ToolStringValue>", // required
139
140
  * // },
140
141
  * // },
141
142
  * // },
@@ -136,6 +136,7 @@ declare const ListToolsCommand_base: {
136
136
  * // },
137
137
  * // text: "<ToolStringValue>", // required
138
138
  * // mentions: "<ToolStringValue>",
139
+ * // botName: "<ToolStringValue>", // required
139
140
  * // },
140
141
  * // },
141
142
  * // },
@@ -129,6 +129,7 @@ declare const UpdateToolCommand_base: {
129
129
  * },
130
130
  * text: "<ToolStringValue>", // required
131
131
  * mentions: "<ToolStringValue>",
132
+ * botName: "<ToolStringValue>", // required
132
133
  * },
133
134
  * },
134
135
  * },
@@ -231,6 +232,7 @@ declare const UpdateToolCommand_base: {
231
232
  * // },
232
233
  * // text: "<ToolStringValue>", // required
233
234
  * // mentions: "<ToolStringValue>",
235
+ * // botName: "<ToolStringValue>", // required
234
236
  * // },
235
237
  * // },
236
238
  * // },
@@ -149,6 +149,11 @@ export interface ToolChatConfig {
149
149
  * @public
150
150
  */
151
151
  mentions?: ToolStringValue | undefined;
152
+ /**
153
+ * Name of the system bot that will send the message. If not provided, defaults to 'WIM Tools'.
154
+ * @public
155
+ */
156
+ botName: ToolStringValue;
152
157
  }
153
158
  /**
154
159
  * @public
@@ -860,6 +865,22 @@ export interface ExecuteToolOutput {
860
865
  */
861
866
  result: ToolExecutionResult;
862
867
  }
868
+ /**
869
+ * @public
870
+ */
871
+ export declare class ForbiddenException extends __BaseException {
872
+ readonly name: "ForbiddenException";
873
+ readonly $fault: "client";
874
+ /**
875
+ * Indicates that the request is forbidden, typically due to insufficient permissions or access restrictions
876
+ * @public
877
+ */
878
+ details?: __DocumentType | undefined;
879
+ /**
880
+ * @internal
881
+ */
882
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
883
+ }
863
884
  /**
864
885
  * @public
865
886
  */
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.25",
4
+ "version": "0.0.26",
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",