@wildix/wim-tools-client 0.0.29 → 0.0.30

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.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;
3
+ exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolStringValue = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
4
4
  const ToolsServiceException_1 = require("./ToolsServiceException");
5
5
  class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
6
6
  name = "AlreadyExistException";
@@ -15,6 +15,19 @@ class AlreadyExistException extends ToolsServiceException_1.ToolsServiceExceptio
15
15
  }
16
16
  }
17
17
  exports.AlreadyExistException = AlreadyExistException;
18
+ class ForbiddenException extends ToolsServiceException_1.ToolsServiceException {
19
+ name = "ForbiddenException";
20
+ $fault = "client";
21
+ constructor(opts) {
22
+ super({
23
+ name: "ForbiddenException",
24
+ $fault: "client",
25
+ ...opts
26
+ });
27
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
28
+ }
29
+ }
30
+ exports.ForbiddenException = ForbiddenException;
18
31
  class NotFoundException extends ToolsServiceException_1.ToolsServiceException {
19
32
  name = "NotFoundException";
20
33
  $fault = "client";
@@ -63,14 +76,6 @@ var ToolChatRecipient;
63
76
  return visitor._(value.$unknown[0], value.$unknown[1]);
64
77
  };
65
78
  })(ToolChatRecipient || (exports.ToolChatRecipient = ToolChatRecipient = {}));
66
- var ToolChatHandler;
67
- (function (ToolChatHandler) {
68
- ToolChatHandler.visit = (value, visitor) => {
69
- if (value.config !== undefined)
70
- return visitor.config(value.config);
71
- return visitor._(value.$unknown[0], value.$unknown[1]);
72
- };
73
- })(ToolChatHandler || (exports.ToolChatHandler = ToolChatHandler = {}));
74
79
  var ToolEmailHandler;
75
80
  (function (ToolEmailHandler) {
76
81
  ToolEmailHandler.visit = (value, visitor) => {
@@ -151,18 +156,3 @@ class ToolExecutionServerException extends ToolsServiceException_1.ToolsServiceE
151
156
  }
152
157
  }
153
158
  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;
@@ -269,7 +269,7 @@ const de_CommandError = async (output, context) => {
269
269
  case "smithy.framework#ValidationException":
270
270
  throw await de_ValidationExceptionRes(parsedOutput, context);
271
271
  case "ForbiddenException":
272
- case "wildix.wim.tools#ForbiddenException":
272
+ case "smithy.framework#ForbiddenException":
273
273
  throw await de_ForbiddenExceptionRes(parsedOutput, context);
274
274
  default:
275
275
  const parsedBody = parsedOutput.body;
@@ -294,41 +294,40 @@ const de_AlreadyExistExceptionRes = async (parsedOutput, context) => {
294
294
  });
295
295
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
296
296
  };
297
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
297
+ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
298
298
  const contents = (0, smithy_client_1.map)({});
299
299
  const data = parsedOutput.body;
300
300
  const doc = (0, smithy_client_1.take)(data, {
301
301
  'message': smithy_client_1.expectString,
302
302
  });
303
303
  Object.assign(contents, doc);
304
- const exception = new models_0_1.NotFoundException({
304
+ const exception = new models_0_1.ForbiddenException({
305
305
  $metadata: deserializeMetadata(parsedOutput),
306
306
  ...contents
307
307
  });
308
308
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
309
309
  };
310
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
310
+ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
311
311
  const contents = (0, smithy_client_1.map)({});
312
312
  const data = parsedOutput.body;
313
313
  const doc = (0, smithy_client_1.take)(data, {
314
314
  'message': smithy_client_1.expectString,
315
315
  });
316
316
  Object.assign(contents, doc);
317
- const exception = new models_0_1.ValidationException({
317
+ const exception = new models_0_1.NotFoundException({
318
318
  $metadata: deserializeMetadata(parsedOutput),
319
319
  ...contents
320
320
  });
321
321
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
322
322
  };
323
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
323
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
324
324
  const contents = (0, smithy_client_1.map)({});
325
325
  const data = parsedOutput.body;
326
326
  const doc = (0, smithy_client_1.take)(data, {
327
- 'details': _ => de_Document(_, context),
328
327
  'message': smithy_client_1.expectString,
329
328
  });
330
329
  Object.assign(contents, doc);
331
- const exception = new models_0_1.ForbiddenException({
330
+ const exception = new models_0_1.ValidationException({
332
331
  $metadata: deserializeMetadata(parsedOutput),
333
332
  ...contents
334
333
  });
@@ -11,6 +11,18 @@ export class AlreadyExistException extends __BaseException {
11
11
  Object.setPrototypeOf(this, AlreadyExistException.prototype);
12
12
  }
13
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
+ }
14
26
  export class NotFoundException extends __BaseException {
15
27
  name = "NotFoundException";
16
28
  $fault = "client";
@@ -57,14 +69,6 @@ export var ToolChatRecipient;
57
69
  return visitor._(value.$unknown[0], value.$unknown[1]);
58
70
  };
59
71
  })(ToolChatRecipient || (ToolChatRecipient = {}));
60
- export var ToolChatHandler;
61
- (function (ToolChatHandler) {
62
- ToolChatHandler.visit = (value, visitor) => {
63
- if (value.config !== undefined)
64
- return visitor.config(value.config);
65
- return visitor._(value.$unknown[0], value.$unknown[1]);
66
- };
67
- })(ToolChatHandler || (ToolChatHandler = {}));
68
72
  export var ToolEmailHandler;
69
73
  (function (ToolEmailHandler) {
70
74
  ToolEmailHandler.visit = (value, visitor) => {
@@ -143,17 +147,3 @@ export class ToolExecutionServerException extends __BaseException {
143
147
  this.details = opts.details;
144
148
  }
145
149
  }
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
- }
@@ -252,7 +252,7 @@ const de_CommandError = async (output, context) => {
252
252
  case "smithy.framework#ValidationException":
253
253
  throw await de_ValidationExceptionRes(parsedOutput, context);
254
254
  case "ForbiddenException":
255
- case "wildix.wim.tools#ForbiddenException":
255
+ case "smithy.framework#ForbiddenException":
256
256
  throw await de_ForbiddenExceptionRes(parsedOutput, context);
257
257
  default:
258
258
  const parsedBody = parsedOutput.body;
@@ -277,41 +277,40 @@ const de_AlreadyExistExceptionRes = async (parsedOutput, context) => {
277
277
  });
278
278
  return __decorateServiceException(exception, parsedOutput.body);
279
279
  };
280
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
280
+ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
281
281
  const contents = map({});
282
282
  const data = parsedOutput.body;
283
283
  const doc = take(data, {
284
284
  'message': __expectString,
285
285
  });
286
286
  Object.assign(contents, doc);
287
- const exception = new NotFoundException({
287
+ const exception = new ForbiddenException({
288
288
  $metadata: deserializeMetadata(parsedOutput),
289
289
  ...contents
290
290
  });
291
291
  return __decorateServiceException(exception, parsedOutput.body);
292
292
  };
293
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
293
+ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
294
294
  const contents = map({});
295
295
  const data = parsedOutput.body;
296
296
  const doc = take(data, {
297
297
  'message': __expectString,
298
298
  });
299
299
  Object.assign(contents, doc);
300
- const exception = new ValidationException({
300
+ const exception = new NotFoundException({
301
301
  $metadata: deserializeMetadata(parsedOutput),
302
302
  ...contents
303
303
  });
304
304
  return __decorateServiceException(exception, parsedOutput.body);
305
305
  };
306
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
306
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
307
307
  const contents = map({});
308
308
  const data = parsedOutput.body;
309
309
  const doc = take(data, {
310
- 'details': _ => de_Document(_, context),
311
310
  'message': __expectString,
312
311
  });
313
312
  Object.assign(contents, doc);
314
- const exception = new ForbiddenException({
313
+ const exception = new ValidationException({
315
314
  $metadata: deserializeMetadata(parsedOutput),
316
315
  ...contents
317
316
  });
@@ -120,7 +120,7 @@ declare const CreateToolCommand_base: {
120
120
  * },
121
121
  * },
122
122
  * search: {},
123
- * chat: { // ToolChatHandler Union: only one key present
123
+ * chat: { // ToolChatHandler
124
124
  * config: { // ToolChatConfig
125
125
  * recipient: { // ToolChatRecipient Union: only one key present
126
126
  * channelId: "<ToolStringValue>",
@@ -128,7 +128,6 @@ declare const CreateToolCommand_base: {
128
128
  * },
129
129
  * text: "<ToolStringValue>", // required
130
130
  * botName: "<ToolStringValue>", // required
131
- * botId: "STRING_VALUE",
132
131
  * },
133
132
  * },
134
133
  * },
@@ -223,7 +222,7 @@ declare const CreateToolCommand_base: {
223
222
  * // },
224
223
  * // },
225
224
  * // search: {},
226
- * // chat: { // ToolChatHandler Union: only one key present
225
+ * // chat: { // ToolChatHandler
227
226
  * // config: { // ToolChatConfig
228
227
  * // recipient: { // ToolChatRecipient Union: only one key present
229
228
  * // channelId: "<ToolStringValue>",
@@ -231,7 +230,6 @@ declare const CreateToolCommand_base: {
231
230
  * // },
232
231
  * // text: "<ToolStringValue>", // required
233
232
  * // botName: "<ToolStringValue>", // required
234
- * // botId: "STRING_VALUE",
235
233
  * // },
236
234
  * // },
237
235
  * // },
@@ -128,7 +128,7 @@ declare const GetToolCommand_base: {
128
128
  * // },
129
129
  * // },
130
130
  * // search: {},
131
- * // chat: { // ToolChatHandler Union: only one key present
131
+ * // chat: { // ToolChatHandler
132
132
  * // config: { // ToolChatConfig
133
133
  * // recipient: { // ToolChatRecipient Union: only one key present
134
134
  * // channelId: "<ToolStringValue>",
@@ -136,7 +136,6 @@ declare const GetToolCommand_base: {
136
136
  * // },
137
137
  * // text: "<ToolStringValue>", // required
138
138
  * // botName: "<ToolStringValue>", // required
139
- * // botId: "STRING_VALUE",
140
139
  * // },
141
140
  * // },
142
141
  * // },
@@ -128,7 +128,7 @@ declare const ListToolsCommand_base: {
128
128
  * // },
129
129
  * // },
130
130
  * // search: {},
131
- * // chat: { // ToolChatHandler Union: only one key present
131
+ * // chat: { // ToolChatHandler
132
132
  * // config: { // ToolChatConfig
133
133
  * // recipient: { // ToolChatRecipient Union: only one key present
134
134
  * // channelId: "<ToolStringValue>",
@@ -136,7 +136,6 @@ declare const ListToolsCommand_base: {
136
136
  * // },
137
137
  * // text: "<ToolStringValue>", // required
138
138
  * // botName: "<ToolStringValue>", // required
139
- * // botId: "STRING_VALUE",
140
139
  * // },
141
140
  * // },
142
141
  * // },
@@ -121,7 +121,7 @@ declare const UpdateToolCommand_base: {
121
121
  * },
122
122
  * },
123
123
  * search: {},
124
- * chat: { // ToolChatHandler Union: only one key present
124
+ * chat: { // ToolChatHandler
125
125
  * config: { // ToolChatConfig
126
126
  * recipient: { // ToolChatRecipient Union: only one key present
127
127
  * channelId: "<ToolStringValue>",
@@ -129,7 +129,6 @@ declare const UpdateToolCommand_base: {
129
129
  * },
130
130
  * text: "<ToolStringValue>", // required
131
131
  * botName: "<ToolStringValue>", // required
132
- * botId: "STRING_VALUE",
133
132
  * },
134
133
  * },
135
134
  * },
@@ -224,7 +223,7 @@ declare const UpdateToolCommand_base: {
224
223
  * // },
225
224
  * // },
226
225
  * // search: {},
227
- * // chat: { // ToolChatHandler Union: only one key present
226
+ * // chat: { // ToolChatHandler
228
227
  * // config: { // ToolChatConfig
229
228
  * // recipient: { // ToolChatRecipient Union: only one key present
230
229
  * // channelId: "<ToolStringValue>",
@@ -232,7 +231,6 @@ declare const UpdateToolCommand_base: {
232
231
  * // },
233
232
  * // text: "<ToolStringValue>", // required
234
233
  * // botName: "<ToolStringValue>", // required
235
- * // botId: "STRING_VALUE",
236
234
  * // },
237
235
  * // },
238
236
  * // },
@@ -12,6 +12,17 @@ export declare class AlreadyExistException extends __BaseException {
12
12
  */
13
13
  constructor(opts: __ExceptionOptionType<AlreadyExistException, __BaseException>);
14
14
  }
15
+ /**
16
+ * @public
17
+ */
18
+ export declare class ForbiddenException extends __BaseException {
19
+ readonly name: "ForbiddenException";
20
+ readonly $fault: "client";
21
+ /**
22
+ * @internal
23
+ */
24
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
25
+ }
15
26
  /**
16
27
  * @public
17
28
  */
@@ -149,40 +160,16 @@ export interface ToolChatConfig {
149
160
  * @public
150
161
  */
151
162
  botName: ToolStringValue;
152
- /**
153
- * ID of the system bot. Created automatically on first execution and stored in the tool configuration.
154
- * @public
155
- */
156
- botId?: string | undefined;
157
163
  }
158
164
  /**
159
165
  * @public
160
166
  */
161
- export type ToolChatHandler = ToolChatHandler.ConfigMember | ToolChatHandler.$UnknownMember;
162
- /**
163
- * @public
164
- */
165
- export declare namespace ToolChatHandler {
167
+ export interface ToolChatHandler {
166
168
  /**
167
169
  * Chat handler configuration for sending messages via xbees-conversations.
168
170
  * @public
169
171
  */
170
- interface ConfigMember {
171
- config: ToolChatConfig;
172
- $unknown?: never;
173
- }
174
- /**
175
- * @public
176
- */
177
- interface $UnknownMember {
178
- config?: never;
179
- $unknown: [string, any];
180
- }
181
- interface Visitor<T> {
182
- config: (value: ToolChatConfig) => T;
183
- _: (name: string, value: any) => T;
184
- }
185
- const visit: <T>(value: ToolChatHandler, visitor: Visitor<T>) => T;
172
+ config: ToolChatConfig;
186
173
  }
187
174
  /**
188
175
  * @public
@@ -865,22 +852,6 @@ export interface ExecuteToolOutput {
865
852
  */
866
853
  result: ToolExecutionResult;
867
854
  }
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
- }
884
855
  /**
885
856
  * @public
886
857
  */
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.29",
4
+ "version": "0.0.30",
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",