@onereach/idw-init-account-resources 0.17.1 → 0.17.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.
@@ -1,5 +1,5 @@
1
1
   WARN  Issue while reading "/builds/onereach/platform/idw/idw-template/.npmrc". Failed to replace env in config: ${OR_NPM_TOKEN}
2
2
 
3
- > @onereach/idw-init-account-resources@0.17.0 build /builds/onereach/platform/idw/idw-template/packages/level-system/idw-init-account-resources
3
+ > @onereach/idw-init-account-resources@0.17.2 build /builds/onereach/platform/idw/idw-template/packages/level-system/idw-init-account-resources
4
4
  > rimraf dist && tsc -b && mkdir dist/assets/skills/documentation && cp -r src/assets/skills/documentation/* dist/assets/skills/documentation
5
5
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @onereach/idw-init-account-resources
2
2
 
3
+ ## 0.17.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7e4e9d6: add new collect information skill
8
+ - 7e4e9d6: Adding new skill Collect information
9
+
10
+ ## 0.17.2
11
+
12
+ ### Patch Changes
13
+
14
+ - ff0de2f: Add migration to move acc settings from acc data to idw KV
15
+
3
16
  ## 0.17.1
4
17
 
5
18
  ### Patch Changes
@@ -0,0 +1,87 @@
1
+ 'use strict';
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ var account_settings_1 = require("@or-sdk/account-settings");
51
+ var key_value_storage_1 = require("@or-sdk/key-value-storage");
52
+ module.exports = {
53
+ up: function (queryInterface) {
54
+ return __awaiter(this, void 0, void 0, function () {
55
+ var accountSettings, keyValueStorage, result, _a, _b, allowSignup, _c, isPrivate, settings, newSettings;
56
+ return __generator(this, function (_d) {
57
+ switch (_d.label) {
58
+ case 0:
59
+ accountSettings = new account_settings_1.AccountSettings({
60
+ discoveryUrl: queryInterface.context.discoveryUrl,
61
+ token: queryInterface.context._orToken,
62
+ });
63
+ keyValueStorage = new key_value_storage_1.KeyValueStorage({
64
+ discoveryUrl: queryInterface.context.discoveryUrl,
65
+ token: queryInterface.context._orToken,
66
+ });
67
+ return [4, accountSettings.getAllSettings()];
68
+ case 1:
69
+ result = _d.sent();
70
+ _a = result.idw, _b = _a.allowSignup, allowSignup = _b === void 0 ? false : _b, _c = _a.isPrivate, isPrivate = _c === void 0 ? false : _c;
71
+ return [4, keyValueStorage.getValueByKey('idw-settings', 'all')];
72
+ case 2:
73
+ settings = _d.sent();
74
+ if (!settings.value) {
75
+ throw new Error('Settings not found');
76
+ }
77
+ newSettings = __assign(__assign({}, settings.value), { allowSignup: allowSignup, isPrivate: isPrivate });
78
+ return [4, keyValueStorage.setValueByKey('idw-settings', 'all', newSettings)];
79
+ case 3:
80
+ _d.sent();
81
+ return [2];
82
+ }
83
+ });
84
+ });
85
+ },
86
+ };
87
+ //# sourceMappingURL=20251110102751-move-account-settings-to-kv-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20251110102751-move-account-settings-to-kv-settings.js","sourceRoot":"","sources":["../../../src/assets/db_migrations/20251110102751-move-account-settings-to-kv-settings.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,6DAA2D;AAC3D,+DAA4D;AAI5D,MAAM,CAAC,OAAO,GAAG;IACT,EAAE,YAAC,cAAgH;;;;;;wBACjH,eAAe,GAAG,IAAI,kCAAe,CAAC;4BAC1C,YAAY,EAAE,cAAc,CAAC,OAAO,CAAC,YAAY;4BACjD,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,QAAQ;yBACvC,CAAC,CAAC;wBAEG,eAAe,GAAG,IAAI,mCAAe,CAAC;4BAC1C,YAAY,EAAE,cAAc,CAAC,OAAO,CAAC,YAAY;4BACjD,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,QAAQ;yBACvC,CAAC,CAAC;wBAGY,WAAM,eAAe,CAAC,cAAc,EAAE,EAAA;;wBAA/C,MAAM,GAAG,SAAsC;wBAC/C,KAA6C,MAAM,CAAC,GAAG,EAArD,mBAAmB,EAAnB,WAAW,mBAAG,KAAK,KAAA,EAAE,iBAAiB,EAAjB,SAAS,mBAAG,KAAK,KAAA,CAAgB;wBAG7C,WAAM,eAAe,CAAC,aAAa,CAAC,cAAc,EAAE,KAAK,CAAC,EAAA;;wBAArE,QAAQ,GAAG,SAA0D;wBAE3E,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;4BAEpB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;wBACxC,CAAC;wBAGK,WAAW,yBACZ,QAAQ,CAAC,KAAK,KACjB,WAAW,aAAA,EACX,SAAS,WAAA,GACV,CAAC;wBAEF,WAAM,eAAe,CAAC,aAAa,CAAC,cAAc,EAAE,KAAK,EAAE,WAAW,CAAC,EAAA;;wBAAvE,SAAuE,CAAC;;;;;KACzE;CACF,CAAC"}
@@ -0,0 +1,65 @@
1
+ 'use strict';
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ module.exports = {
40
+ up: function (queryInterface) {
41
+ return __awaiter(this, void 0, void 0, function () {
42
+ return __generator(this, function (_a) {
43
+ switch (_a.label) {
44
+ case 0: return [4, queryInterface.context.sequelize.query("\nCREATE SCHEMA if not exists surveys;\n\nCREATE TABLE if not exists surveys.forms (\n form_id uuid NOT NULL, \n form_name character varying(255) NOT NULL, \n created_by character varying(255) NOT NULL, \n form_content jsonb NOT NULL, \n access_level character varying(16), \n privacy character varying(16), \n status character varying(16) NOT NULL, \n created_at timestamp with time zone NOT NULL, \n updated_at timestamp with time zone NOT NULL, \n presentations jsonb,\nPRIMARY KEY (form_id));\n\nCREATE TABLE if not exists surveys.form_responses (\n response_id integer NOT NULL, \n form_id uuid NOT NULL, \n submission_id uuid NOT NULL, \n question_type character varying(64) NOT NULL, \n question_text text, \n answer_value text, \n answered_at timestamp with time zone, \n skipped integer, \n question_id integer, \n options jsonb, \n is_manual integer, \n answer_data jsonb,\nPRIMARY KEY (response_id));\n\nCREATE TABLE if not exists surveys.form_submissions (\n submission_id uuid NOT NULL, \n form_id uuid NOT NULL, \n submitted_by character varying(255) NOT NULL, \n opened_at bigint NOT NULL, \n is_opened smallint NOT NULL, \n is_completed smallint NOT NULL, \n completed_at bigint, \n answers jsonb NOT NULL,\nPRIMARY KEY (submission_id));\n ")];
45
+ case 1:
46
+ _a.sent();
47
+ return [2];
48
+ }
49
+ });
50
+ });
51
+ },
52
+ down: function (queryInterface) {
53
+ return __awaiter(this, void 0, void 0, function () {
54
+ return __generator(this, function (_a) {
55
+ switch (_a.label) {
56
+ case 0: return [4, queryInterface.context.sequelize.query("\n drop table surveys.form_submissions;\n drop table surveys.form_responses;\n drop table surveys.forms;\n drop schema surveys cascade;\n ")];
57
+ case 1:
58
+ _a.sent();
59
+ return [2];
60
+ }
61
+ });
62
+ });
63
+ },
64
+ };
65
+ //# sourceMappingURL=20251124123410-create-collect-information-skill-tables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20251124123410-create-collect-information-skill-tables.js","sourceRoot":"","sources":["../../../src/assets/db_migrations/20251124123410-create-collect-information-skill-tables.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIb,MAAM,CAAC,OAAO,GAAG;IACT,EAAE,YAAC,cAAoE;;;;4BAC3E,WAAM,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,u0CAyC5C,CAAC,EAAA;;wBAzCF,SAyCE,CAAC;;;;;KAOJ;IAEK,IAAI,YAAC,cAAoE;;;;4BAC7E,WAAM,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,qKAK1C,CAAC,EAAA;;wBALJ,SAKI,CAAC;;;;;KAON;CACF,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.collectInformationSkill = void 0;
4
+ exports.collectInformationSkill = {
5
+ uid: 'collect-information',
6
+ forRoles: ['admin', 'user'],
7
+ name: 'Generate an image',
8
+ description: 'The Collect information skill lets you create, edit, and manage forms. It combines an interactive form builder with an inchat AI assistant, enabling real-time customization, previews, and sharing all in one place.',
9
+ abbreviation: 'GI',
10
+ number: 30,
11
+ domain: 'General',
12
+ editable: true,
13
+ meta: {
14
+ chatId: 'collect-information',
15
+ prompt: undefined,
16
+ promptParams: undefined,
17
+ },
18
+ passages: [
19
+ {
20
+ content: 'The Collect information skill lets you create, edit, and manage forms. It combines an interactive form builder with an inchat AI assistant, enabling real-time customization, previews, and sharing all in one place.',
21
+ },
22
+ ],
23
+ };
24
+ //# sourceMappingURL=collect_information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect_information.js","sourceRoot":"","sources":["../../../src/assets/skills/collect_information.ts"],"names":[],"mappings":";;;AAGa,QAAA,uBAAuB,GAAoB;IACtD,GAAG,EAAE,qBAAqB;IAC1B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,uNAAuN;IACpO,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,IAAI;IAEd,IAAI,EAAE;QACJ,MAAM,EAAE,qBAAqB;QAC7B,MAAM,EAAE,SAAS;QACjB,YAAY,EAAE,SAAS;KACxB;IAED,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,uNAAuN;SACjO;KACF;CACF,CAAC"}
@@ -21,6 +21,7 @@ var automatic_meeting_reschedule_1 = require("./automatic_meeting_reschedule");
21
21
  var create_email_1 = require("./create_email");
22
22
  var create_invoice_1 = require("./create_invoice");
23
23
  var customer_sentiment_analysis_1 = require("./customer_sentiment_analysis");
24
+ var collect_information_1 = require("./collect_information");
24
25
  var employee_onboarding_training_1 = require("./employee_onboarding_training");
25
26
  var generate_image_1 = require("./generate_image");
26
27
  var hr_request_pto_1 = require("./hr_request_pto");
@@ -76,5 +77,6 @@ exports.skills = [
76
77
  schedule_appointment_web_1.scheduleAppointmentSkill,
77
78
  social_media_management_1.socialMediaManagementSkill,
78
79
  generate_image_1.generateImageSkill,
80
+ collect_information_1.collectInformationSkill,
79
81
  ];
80
82
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/skills/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAyD;AACzD,yCAA4C;AAC5C,+EAAwE;AACxE,+CAAkD;AAClD,mDAAsD;AACtD,6EAA+E;AAC/E,+EAAyE;AACzE,mDAAsD;AACtD,mDAAkD;AAClD,mDAAsD;AACtD,uDAA0D;AAC1D,yCAA6C;AAC7C,mDAAsD;AACtD,yDAA4D;AAC5D,uEAAsE;AACtE,qEAAuE;AACvE,2DAA8D;AAC9D,uEAAyE;AACzE,2CAA8C;AAC9C,2CAA8C;AAE9C,qDAAmC;AACnC,8CAA4B;AAC5B,mDAAiC;AACjC,+CAA6B;AAC7B,+CAA6B;AAE7B,qDAAmC;AACnC,8CAA4B;AAC5B,iEAA+C;AAC/C,iDAA+B;AAC/B,mDAAiC;AACjC,gEAA8C;AAC9C,uDAAqC;AACrC,iEAA+C;AAC/C,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,6DAA2C;AAC3C,4DAA0C;AAC1C,6DAA2C;AAC3C,mDAAiC;AAEpB,QAAA,MAAM,GAAG;IACpB,uCAAoB;IACpB,0BAAc;IACd,mCAAkB;IAClB,2BAAc;IACd,2BAAc;IACd,2CAAsB;IACtB,sDAA2B;IAG3B,sCAAmB;IACnB,yBAAa;IACb,qDAAsB;IACtB,+BAAgB;IAChB,mCAAkB;IAClB,4DAA8B;IAC9B,sDAAuB;IACvB,+BAAc;IACd,mCAAkB;IAClB,yCAAqB;IACrB,mDAAwB;IACxB,oDAA0B;IAC1B,mCAAkB;CACnB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/skills/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAyD;AACzD,yCAA4C;AAC5C,+EAAwE;AACxE,+CAAkD;AAClD,mDAAsD;AACtD,6EAA+E;AAC/E,6DAAgE;AAChE,+EAAyE;AACzE,mDAAsD;AACtD,mDAAkD;AAClD,mDAAsD;AACtD,uDAA0D;AAC1D,yCAA6C;AAC7C,mDAAsD;AACtD,yDAA4D;AAC5D,uEAAsE;AACtE,qEAAuE;AACvE,2DAA8D;AAC9D,uEAAyE;AACzE,2CAA8C;AAC9C,2CAA8C;AAE9C,qDAAmC;AACnC,8CAA4B;AAC5B,mDAAiC;AACjC,+CAA6B;AAC7B,+CAA6B;AAE7B,qDAAmC;AACnC,8CAA4B;AAC5B,iEAA+C;AAC/C,iDAA+B;AAC/B,mDAAiC;AACjC,gEAA8C;AAC9C,uDAAqC;AACrC,iEAA+C;AAC/C,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,6DAA2C;AAC3C,4DAA0C;AAC1C,6DAA2C;AAC3C,mDAAiC;AAEpB,QAAA,MAAM,GAAG;IACpB,uCAAoB;IACpB,0BAAc;IACd,mCAAkB;IAClB,2BAAc;IACd,2BAAc;IACd,2CAAsB;IACtB,sDAA2B;IAG3B,sCAAmB;IACnB,yBAAa;IACb,qDAAsB;IACtB,+BAAgB;IAChB,mCAAkB;IAClB,4DAA8B;IAC9B,sDAAuB;IACvB,+BAAc;IACd,mCAAkB;IAClB,yCAAqB;IACrB,mDAAwB;IACxB,oDAA0B;IAC1B,mCAAkB;IAClB,6CAAuB;CACxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/idw-init-account-resources",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "description": "Creation of required resources in OneReach account to enable IDW",
5
5
  "license": "UNLICENSED",
6
6
  "contributors": [
@@ -10,11 +10,13 @@
10
10
  ],
11
11
  "main": "dist/index.js",
12
12
  "dependencies": {
13
+ "@or-sdk/account-settings": "^1.2.41",
13
14
  "@or-sdk/contacts": "4.5.6",
14
15
  "@or-sdk/files": "3.4.36",
15
16
  "@or-sdk/graph": "1.7.26",
16
17
  "@or-sdk/hitl": "0.34.35",
17
18
  "@or-sdk/idw": "7.11.1",
19
+ "@or-sdk/key-value-storage": "^0.27.10",
18
20
  "@or-sdk/lookup": "1.14.5",
19
21
  "@or-sdk/pgsql": "1.1.8",
20
22
  "pg": "8.11.5",
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ import { AccountSettings } from '@or-sdk/account-settings';
4
+ import { KeyValueStorage } from '@or-sdk/key-value-storage';
5
+ import { QueryInterface, Sequelize } from 'sequelize';
6
+
7
+ /** @type {import('sequelize-cli').Migration} */
8
+ module.exports = {
9
+ async up(queryInterface: QueryInterface & { context: { sequelize: Sequelize; _orToken: string; discoveryUrl: string; }; }) {
10
+ const accountSettings = new AccountSettings({
11
+ discoveryUrl: queryInterface.context.discoveryUrl,
12
+ token: queryInterface.context._orToken,
13
+ });
14
+
15
+ const keyValueStorage = new KeyValueStorage({
16
+ discoveryUrl: queryInterface.context.discoveryUrl,
17
+ token: queryInterface.context._orToken,
18
+ });
19
+
20
+ // old aacount settings
21
+ const result = await accountSettings.getAllSettings();
22
+ const { allowSignup = false, isPrivate = false } = result.idw;
23
+
24
+ // new key value settings
25
+ const settings = await keyValueStorage.getValueByKey('idw-settings', 'all');
26
+
27
+ if (!settings.value) {
28
+ // prevent ide errors
29
+ throw new Error('Settings not found');
30
+ }
31
+
32
+ // merge old and new settings
33
+ const newSettings = {
34
+ ...settings.value,
35
+ allowSignup,
36
+ isPrivate,
37
+ };
38
+
39
+ await keyValueStorage.setValueByKey('idw-settings', 'all', newSettings);
40
+ },
41
+ };
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+ import { QueryInterface, Sequelize } from 'sequelize';
3
+
4
+ /** @type {import('sequelize-cli').Migration} */
5
+ module.exports = {
6
+ async up(queryInterface: QueryInterface & {context: {sequelize: Sequelize;};}) {
7
+ await queryInterface.context.sequelize.query(`
8
+ CREATE SCHEMA if not exists surveys;
9
+
10
+ CREATE TABLE if not exists surveys.forms (
11
+ form_id uuid NOT NULL,
12
+ form_name character varying(255) NOT NULL,
13
+ created_by character varying(255) NOT NULL,
14
+ form_content jsonb NOT NULL,
15
+ access_level character varying(16),
16
+ privacy character varying(16),
17
+ status character varying(16) NOT NULL,
18
+ created_at timestamp with time zone NOT NULL,
19
+ updated_at timestamp with time zone NOT NULL,
20
+ presentations jsonb,
21
+ PRIMARY KEY (form_id));
22
+
23
+ CREATE TABLE if not exists surveys.form_responses (
24
+ response_id integer NOT NULL,
25
+ form_id uuid NOT NULL,
26
+ submission_id uuid NOT NULL,
27
+ question_type character varying(64) NOT NULL,
28
+ question_text text,
29
+ answer_value text,
30
+ answered_at timestamp with time zone,
31
+ skipped integer,
32
+ question_id integer,
33
+ options jsonb,
34
+ is_manual integer,
35
+ answer_data jsonb,
36
+ PRIMARY KEY (response_id));
37
+
38
+ CREATE TABLE if not exists surveys.form_submissions (
39
+ submission_id uuid NOT NULL,
40
+ form_id uuid NOT NULL,
41
+ submitted_by character varying(255) NOT NULL,
42
+ opened_at bigint NOT NULL,
43
+ is_opened smallint NOT NULL,
44
+ is_completed smallint NOT NULL,
45
+ completed_at bigint,
46
+ answers jsonb NOT NULL,
47
+ PRIMARY KEY (submission_id));
48
+ `);
49
+ /**
50
+ * Add altering commands here.
51
+ *
52
+ * Example:
53
+ * await queryInterface.createTable('users', { id: Sequelize.INTEGER });
54
+ */
55
+ },
56
+
57
+ async down(queryInterface: QueryInterface & {context: {sequelize: Sequelize;};}) {
58
+ await queryInterface.context.sequelize.query(`
59
+ drop table surveys.form_submissions;
60
+ drop table surveys.form_responses;
61
+ drop table surveys.forms;
62
+ drop schema surveys cascade;
63
+ `);
64
+ /**
65
+ * Add reverting commands here.
66
+ *
67
+ * Example:
68
+ * await queryInterface.dropTable('users');
69
+ */
70
+ },
71
+ };
@@ -0,0 +1,25 @@
1
+ /* eslint-disable max-len */
2
+ import type { SkillDefinition } from '../../types';
3
+
4
+ export const collectInformationSkill: SkillDefinition = {
5
+ uid: 'collect-information',
6
+ forRoles: ['admin', 'user'],
7
+ name: 'Generate an image',
8
+ description: 'The Collect information skill lets you create, edit, and manage forms. It combines an interactive form builder with an inchat AI assistant, enabling real-time customization, previews, and sharing all in one place.',
9
+ abbreviation: 'GI',
10
+ number: 30,
11
+ domain: 'General',
12
+ editable: true,
13
+
14
+ meta: {
15
+ chatId: 'collect-information',
16
+ prompt: undefined,
17
+ promptParams: undefined,
18
+ },
19
+
20
+ passages: [
21
+ {
22
+ content: 'The Collect information skill lets you create, edit, and manage forms. It combines an interactive form builder with an inchat AI assistant, enabling real-time customization, previews, and sharing all in one place.',
23
+ },
24
+ ],
25
+ };
@@ -4,6 +4,7 @@ import { meetingRescheduleSkill } from './automatic_meeting_reschedule';
4
4
  import { createEmailSkill } from './create_email';
5
5
  import { createInvoiceSkill } from './create_invoice';
6
6
  import { customerSentimentAnalysisSkill } from './customer_sentiment_analysis';
7
+ import { collectInformationSkill } from './collect_information';
7
8
  import { employeeOnboardingSkill } from './employee_onboarding_training';
8
9
  import { generateImageSkill } from './generate_image';
9
10
  import { hrRequestSkill } from './hr_request_pto';
@@ -64,4 +65,5 @@ export const skills = [
64
65
  scheduleAppointmentSkill,
65
66
  socialMediaManagementSkill,
66
67
  generateImageSkill,
68
+ collectInformationSkill,
67
69
  ];