wingbot 3.64.0 → 3.64.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot",
3
- "version": "3.64.0",
3
+ "version": "3.64.1",
4
4
  "description": "Enterprise Messaging Bot Conversation Engine",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -278,7 +278,10 @@ type Query {
278
278
 
279
279
  type Mutation {
280
280
  "validate conversation data"
281
- validateBot(bot:Any!): ValidationResult
281
+ validateBot(
282
+ bot:Any!,
283
+ compressed: Boolean = false
284
+ ): ValidationResult
282
285
 
283
286
  "invalidate a conversation cache in the chatbot"
284
287
  updateBot: Boolean
@@ -3,6 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
+ const { decompress } = require('compress-json');
6
7
  const Tester = require('../Tester');
7
8
  const apiAuthorizer = require('./apiAuthorizer');
8
9
 
@@ -95,7 +96,11 @@ function validateBotApi (botFactory, postBackTest = null, textTest = null, acl =
95
96
  return null;
96
97
  }
97
98
 
98
- const validationRequestBody = args.bot;
99
+ let validationRequestBody = args.bot;
100
+
101
+ if (args.compressed) {
102
+ validationRequestBody = decompress(validationRequestBody);
103
+ }
99
104
 
100
105
  const bot = botFactory();
101
106