@or-sdk/idw 2.2.0-beta.1693.0 → 3.0.0

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/api/channelApi.js +62 -0
  3. package/dist/cjs/api/channelApi.js.map +1 -0
  4. package/dist/cjs/api/flowApi.js +7 -7
  5. package/dist/cjs/api/idwDbApi.js +3 -3
  6. package/dist/cjs/api/idwInfoApi.js +4 -4
  7. package/dist/cjs/api/idwRwcApi.js +6 -6
  8. package/dist/cjs/api/index.js +3 -3
  9. package/dist/cjs/api/index.js.map +1 -1
  10. package/dist/cjs/api/migrationApi.js +4 -4
  11. package/dist/cjs/api/skillApi.js +7 -7
  12. package/dist/cjs/{helpers.js → helpres.js} +1 -1
  13. package/dist/cjs/helpres.js.map +1 -0
  14. package/dist/cjs/idwApi.js +1 -1
  15. package/dist/cjs/idwApi.js.map +1 -1
  16. package/dist/cjs/types/{memory.js → channel.js} +1 -1
  17. package/dist/cjs/types/channel.js.map +1 -0
  18. package/dist/cjs/types/index.js +1 -1
  19. package/dist/cjs/types/index.js.map +1 -1
  20. package/dist/esm/api/{memoryApi.js → channelApi.js} +20 -15
  21. package/dist/esm/api/channelApi.js.map +1 -0
  22. package/dist/esm/api/flowApi.js +1 -1
  23. package/dist/esm/api/idwDbApi.js +1 -1
  24. package/dist/esm/api/idwInfoApi.js +1 -1
  25. package/dist/esm/api/idwRwcApi.js +1 -1
  26. package/dist/esm/api/index.js +1 -1
  27. package/dist/esm/api/index.js.map +1 -1
  28. package/dist/esm/api/migrationApi.js +1 -1
  29. package/dist/esm/api/skillApi.js +1 -1
  30. package/dist/esm/{helpers.js → helpres.js} +1 -1
  31. package/dist/esm/helpres.js.map +1 -0
  32. package/dist/esm/idwApi.js +2 -2
  33. package/dist/esm/idwApi.js.map +1 -1
  34. package/dist/esm/types/channel.js +2 -0
  35. package/dist/esm/types/channel.js.map +1 -0
  36. package/dist/esm/types/index.js +1 -1
  37. package/dist/esm/types/index.js.map +1 -1
  38. package/dist/types/api/channelApi.d.ts +14 -0
  39. package/dist/types/api/channelApi.d.ts.map +1 -0
  40. package/dist/types/api/index.d.ts +1 -1
  41. package/dist/types/api/index.d.ts.map +1 -1
  42. package/dist/types/{helpers.d.ts → helpres.d.ts} +1 -1
  43. package/dist/types/helpres.d.ts.map +1 -0
  44. package/dist/types/idwApi.d.ts +2 -2
  45. package/dist/types/idwApi.d.ts.map +1 -1
  46. package/dist/types/types/channel.d.ts +19 -0
  47. package/dist/types/types/channel.d.ts.map +1 -0
  48. package/dist/types/types/index.d.ts +1 -1
  49. package/dist/types/types/index.d.ts.map +1 -1
  50. package/package.json +5 -4
  51. package/src/api/channelApi.ts +93 -0
  52. package/src/api/flowApi.ts +1 -1
  53. package/src/api/idwDbApi.ts +1 -1
  54. package/src/api/idwInfoApi.ts +1 -1
  55. package/src/api/idwRwcApi.ts +1 -1
  56. package/src/api/index.ts +1 -1
  57. package/src/api/migrationApi.ts +1 -1
  58. package/src/api/skillApi.ts +1 -1
  59. package/src/idwApi.ts +3 -5
  60. package/src/types/channel.ts +9 -0
  61. package/src/types/index.ts +1 -1
  62. package/dist/cjs/api/memoryApi.js +0 -57
  63. package/dist/cjs/api/memoryApi.js.map +0 -1
  64. package/dist/cjs/helpers.js.map +0 -1
  65. package/dist/cjs/types/memory.js.map +0 -1
  66. package/dist/esm/api/memoryApi.js.map +0 -1
  67. package/dist/esm/helpers.js.map +0 -1
  68. package/dist/esm/types/memory.js +0 -2
  69. package/dist/esm/types/memory.js.map +0 -1
  70. package/dist/types/api/memoryApi.d.ts +0 -13
  71. package/dist/types/api/memoryApi.d.ts.map +0 -1
  72. package/dist/types/helpers.d.ts.map +0 -1
  73. package/dist/types/types/memory.d.ts +0 -6
  74. package/dist/types/types/memory.d.ts.map +0 -1
  75. package/src/api/memoryApi.ts +0 -83
  76. package/src/types/memory.ts +0 -6
  77. /package/src/{helpers.ts → helpres.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/idw@2.1.0...@or-sdk/idw@3.0.0) (2023-08-01)
7
+
8
+
9
+ ### ⚠ BREAKING CHANGES
10
+
11
+ * **@or-sdk/idw:** implement-channels-api
12
+
13
+ ### Features
14
+
15
+ * **@or-sdk/idw:** implement-channels-api ([73c7129](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/73c71298cd0bac62f318a49bfaa14f6593a66991))
16
+
17
+
18
+
6
19
  ## [2.1.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/idw@2.0.12...@or-sdk/idw@2.1.0) (2023-08-01)
7
20
 
8
21
 
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChannelApi = void 0;
4
+ var helpres_1 = require("../helpres");
5
+ var ChannelApi = (function () {
6
+ function ChannelApi(providers) {
7
+ this.providers = providers;
8
+ }
9
+ ChannelApi.prototype.getChannel = function (id) {
10
+ return this.providers.makeRequest({
11
+ route: (0, helpres_1.buildRoute)('channel'),
12
+ params: {
13
+ id: id,
14
+ },
15
+ });
16
+ };
17
+ ChannelApi.prototype.getAllChannels = function () {
18
+ return this.providers.makeRequest({
19
+ route: (0, helpres_1.buildRoute)('channels'),
20
+ });
21
+ };
22
+ ChannelApi.prototype.deleteChannel = function (id) {
23
+ return this.providers.makeRequest({
24
+ route: (0, helpres_1.buildRoute)('channel'),
25
+ method: 'DELETE',
26
+ params: {
27
+ id: id,
28
+ },
29
+ });
30
+ };
31
+ ChannelApi.prototype.deleteAllChannels = function () {
32
+ return this.providers.makeRequest({
33
+ route: (0, helpres_1.buildRoute)('channels'),
34
+ method: 'DELETE',
35
+ });
36
+ };
37
+ ChannelApi.prototype.updateChannel = function (id, data) {
38
+ return this.providers.makeRequest({
39
+ route: (0, helpres_1.buildRoute)('channel'),
40
+ method: 'PATCH',
41
+ data: data,
42
+ params: {
43
+ id: id,
44
+ },
45
+ });
46
+ };
47
+ ChannelApi.prototype.createChannel = function (data) {
48
+ return this.providers.makeRequest({
49
+ route: (0, helpres_1.buildRoute)('channel'),
50
+ method: 'POST',
51
+ data: data,
52
+ });
53
+ };
54
+ ChannelApi.prototype.getSuggestedChannels = function () {
55
+ return this.providers.makeRequest({
56
+ route: (0, helpres_1.buildRoute)('channels/suggested'),
57
+ });
58
+ };
59
+ return ChannelApi;
60
+ }());
61
+ exports.ChannelApi = ChannelApi;
62
+ //# sourceMappingURL=channelApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channelApi.js","sourceRoot":"","sources":["../../../src/api/channelApi.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AAIxC;IACE,oBACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAMJ,+BAAU,GAAV,UAAW,EAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,SAAS,CAAC;YAC5B,MAAM,EAAE;gBACN,EAAE,IAAA;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAMD,mCAAc,GAAd;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;IAMD,kCAAa,GAAb,UAAc,EAAU;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,SAAS,CAAC;YAC5B,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,EAAE,IAAA;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAKD,sCAAiB,GAAjB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,UAAU,CAAC;YAC7B,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAOD,kCAAa,GAAb,UAAc,EAAU,EAAE,IAAuB;QAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,SAAS,CAAC;YAC5B,MAAM,EAAE,OAAO;YACf,IAAI,MAAA;YACJ,MAAM,EAAE;gBACN,EAAE,IAAA;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAMD,kCAAa,GAAb,UAAc,IAAuB;QACnC,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,SAAS,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI,MAAA;SACL,CAAC,CAAC;IACL,CAAC;IAKD,yCAAoB,GAApB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,oBAAoB,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IACH,iBAAC;AAAD,CAAC,AAxFD,IAwFC;AAxFY,gCAAU"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlowApi = void 0;
4
- var helpers_1 = require("../helpers");
4
+ var helpres_1 = require("../helpres");
5
5
  var FlowApi = (function () {
6
6
  function FlowApi(providers) {
7
7
  this.providers = providers;
8
8
  }
9
9
  FlowApi.prototype.getFlow = function (id) {
10
10
  return this.providers.makeRequest({
11
- route: (0, helpers_1.buildRoute)('flow'),
11
+ route: (0, helpres_1.buildRoute)('flow'),
12
12
  params: {
13
13
  id: id,
14
14
  },
@@ -16,7 +16,7 @@ var FlowApi = (function () {
16
16
  };
17
17
  FlowApi.prototype.deleteFlow = function (id) {
18
18
  return this.providers.makeRequest({
19
- route: (0, helpers_1.buildRoute)('flow'),
19
+ route: (0, helpres_1.buildRoute)('flow'),
20
20
  method: 'DELETE',
21
21
  params: {
22
22
  id: id,
@@ -25,7 +25,7 @@ var FlowApi = (function () {
25
25
  };
26
26
  FlowApi.prototype.deleteFlows = function (ids) {
27
27
  return this.providers.makeRequest({
28
- route: (0, helpers_1.buildRoute)('flows'),
28
+ route: (0, helpres_1.buildRoute)('flows'),
29
29
  method: 'DELETE',
30
30
  params: {
31
31
  ids: ids.join(),
@@ -34,21 +34,21 @@ var FlowApi = (function () {
34
34
  };
35
35
  FlowApi.prototype.upsert = function (data) {
36
36
  return this.providers.makeRequest({
37
- route: (0, helpers_1.buildRoute)('flow'),
37
+ route: (0, helpres_1.buildRoute)('flow'),
38
38
  method: 'POST',
39
39
  data: data,
40
40
  });
41
41
  };
42
42
  FlowApi.prototype.activateFlow = function (data) {
43
43
  return this.providers.makeRequest({
44
- route: (0, helpers_1.buildRoute)('flow/activate'),
44
+ route: (0, helpres_1.buildRoute)('flow/activate'),
45
45
  method: 'PUT',
46
46
  data: data,
47
47
  });
48
48
  };
49
49
  FlowApi.prototype.deactivateFlow = function (id) {
50
50
  return this.providers.makeRequest({
51
- route: (0, helpers_1.buildRoute)('flow/deactivate'),
51
+ route: (0, helpres_1.buildRoute)('flow/deactivate'),
52
52
  method: 'PUT',
53
53
  params: {
54
54
  id: id,
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IdwDbApi = void 0;
4
- var helpers_1 = require("../helpers");
4
+ var helpres_1 = require("../helpres");
5
5
  var IdwDbApi = (function () {
6
6
  function IdwDbApi(providers) {
7
7
  this.providers = providers;
8
8
  }
9
9
  IdwDbApi.prototype.isDbExist = function () {
10
10
  return this.providers.makeRequest({
11
- route: (0, helpers_1.buildRoute)('db'),
11
+ route: (0, helpres_1.buildRoute)('db'),
12
12
  method: 'GET',
13
13
  });
14
14
  };
15
15
  IdwDbApi.prototype.prepareDb = function () {
16
16
  return this.providers.makeRequest({
17
- route: (0, helpers_1.buildRoute)('db'),
17
+ route: (0, helpres_1.buildRoute)('db'),
18
18
  method: 'POST',
19
19
  });
20
20
  };
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IdwInfoApi = void 0;
4
- var helpers_1 = require("../helpers");
4
+ var helpres_1 = require("../helpres");
5
5
  var IdwInfoApi = (function () {
6
6
  function IdwInfoApi(providers) {
7
7
  this.providers = providers;
8
8
  }
9
9
  IdwInfoApi.prototype.getBaseInfo = function () {
10
10
  return this.providers.makeRequest({
11
- route: (0, helpers_1.buildRoute)('idw-info'),
11
+ route: (0, helpres_1.buildRoute)('idw-info'),
12
12
  method: 'GET',
13
13
  });
14
14
  };
15
15
  IdwInfoApi.prototype.getIdwInfoWithStatistic = function () {
16
16
  return this.providers.makeRequest({
17
- route: (0, helpers_1.buildRoute)('idw-info/statistic'),
17
+ route: (0, helpres_1.buildRoute)('idw-info/statistic'),
18
18
  method: 'GET',
19
19
  });
20
20
  };
21
21
  IdwInfoApi.prototype.updateIdwInfo = function (data) {
22
22
  return this.providers.makeRequest({
23
- route: (0, helpers_1.buildRoute)('idw-info'),
23
+ route: (0, helpres_1.buildRoute)('idw-info'),
24
24
  method: 'POST',
25
25
  data: data,
26
26
  });
@@ -37,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.IdwRwcApi = void 0;
40
- var helpers_1 = require("../helpers");
40
+ var helpres_1 = require("../helpres");
41
41
  var noop = function () { };
42
42
  var IdwRwcApi = (function () {
43
43
  function IdwRwcApi(providers) {
@@ -45,32 +45,32 @@ var IdwRwcApi = (function () {
45
45
  }
46
46
  IdwRwcApi.prototype.getIdwRwcData = function () {
47
47
  return this.providers.makeRequest({
48
- route: (0, helpers_1.buildRoute)('idw-rwc'),
48
+ route: (0, helpres_1.buildRoute)('idw-rwc'),
49
49
  method: 'GET',
50
50
  });
51
51
  };
52
52
  IdwRwcApi.prototype.upsertIdwRwcData = function (data) {
53
53
  return this.providers.makeRequest({
54
- route: (0, helpers_1.buildRoute)('idw-rwc'),
54
+ route: (0, helpres_1.buildRoute)('idw-rwc'),
55
55
  method: 'GET',
56
56
  data: data,
57
57
  });
58
58
  };
59
59
  IdwRwcApi.prototype.deleteIdwRwcData = function () {
60
60
  return this.providers.makeRequest({
61
- route: (0, helpers_1.buildRoute)('idw-rwc'),
61
+ route: (0, helpres_1.buildRoute)('idw-rwc'),
62
62
  method: 'DELETE',
63
63
  });
64
64
  };
65
65
  IdwRwcApi.prototype.installRwcChat = function () {
66
66
  return this.providers.makeRequest({
67
- route: (0, helpers_1.buildRoute)('idw-rwc/install'),
67
+ route: (0, helpres_1.buildRoute)('idw-rwc/install'),
68
68
  method: 'POST',
69
69
  });
70
70
  };
71
71
  IdwRwcApi.prototype.getChatStatus = function () {
72
72
  return this.providers.makeRequest({
73
- route: (0, helpers_1.buildRoute)('idw-rwc/install'),
73
+ route: (0, helpres_1.buildRoute)('idw-rwc/install'),
74
74
  method: 'GET',
75
75
  });
76
76
  };
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FlowApi = exports.IdwRwcApi = exports.IdwDbApi = exports.IdwInfoApi = exports.MigrationApi = exports.MemoryApi = exports.SkillApi = void 0;
3
+ exports.FlowApi = exports.IdwRwcApi = exports.IdwDbApi = exports.IdwInfoApi = exports.MigrationApi = exports.ChannelApi = exports.SkillApi = void 0;
4
4
  var skillApi_1 = require("./skillApi");
5
5
  Object.defineProperty(exports, "SkillApi", { enumerable: true, get: function () { return skillApi_1.SkillApi; } });
6
- var memoryApi_1 = require("./memoryApi");
7
- Object.defineProperty(exports, "MemoryApi", { enumerable: true, get: function () { return memoryApi_1.MemoryApi; } });
6
+ var channelApi_1 = require("./channelApi");
7
+ Object.defineProperty(exports, "ChannelApi", { enumerable: true, get: function () { return channelApi_1.ChannelApi; } });
8
8
  var migrationApi_1 = require("./migrationApi");
9
9
  Object.defineProperty(exports, "MigrationApi", { enumerable: true, get: function () { return migrationApi_1.MigrationApi; } });
10
10
  var idwInfoApi_1 = require("./idwInfoApi");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
@@ -1,26 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MigrationApi = void 0;
4
- var helpers_1 = require("../helpers");
4
+ var helpres_1 = require("../helpres");
5
5
  var MigrationApi = (function () {
6
6
  function MigrationApi(providers) {
7
7
  this.providers = providers;
8
8
  }
9
9
  MigrationApi.prototype.migrationsStatus = function () {
10
10
  return this.providers.makeRequest({
11
- route: (0, helpers_1.buildRoute)('migration'),
11
+ route: (0, helpres_1.buildRoute)('migration'),
12
12
  method: 'GET',
13
13
  });
14
14
  };
15
15
  MigrationApi.prototype.migrationsRun = function () {
16
16
  return this.providers.makeRequest({
17
- route: (0, helpers_1.buildRoute)('migration'),
17
+ route: (0, helpres_1.buildRoute)('migration'),
18
18
  method: 'POST',
19
19
  });
20
20
  };
21
21
  MigrationApi.prototype.revertLatest = function () {
22
22
  return this.providers.makeRequest({
23
- route: (0, helpers_1.buildRoute)('migration'),
23
+ route: (0, helpres_1.buildRoute)('migration'),
24
24
  method: 'DELETE',
25
25
  });
26
26
  };
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SkillApi = void 0;
4
- var helpers_1 = require("../helpers");
4
+ var helpres_1 = require("../helpres");
5
5
  var SkillApi = (function () {
6
6
  function SkillApi(providers) {
7
7
  this.providers = providers;
8
8
  }
9
9
  SkillApi.prototype.getSkill = function (id) {
10
10
  return this.providers.makeRequest({
11
- route: (0, helpers_1.buildRoute)('skill'),
11
+ route: (0, helpres_1.buildRoute)('skill'),
12
12
  params: {
13
13
  id: id,
14
14
  },
@@ -16,12 +16,12 @@ var SkillApi = (function () {
16
16
  };
17
17
  SkillApi.prototype.getAllSkills = function () {
18
18
  return this.providers.makeRequest({
19
- route: (0, helpers_1.buildRoute)('skills'),
19
+ route: (0, helpres_1.buildRoute)('skills'),
20
20
  });
21
21
  };
22
22
  SkillApi.prototype.deleteSkill = function (id) {
23
23
  return this.providers.makeRequest({
24
- route: (0, helpers_1.buildRoute)('skill'),
24
+ route: (0, helpres_1.buildRoute)('skill'),
25
25
  method: 'DELETE',
26
26
  params: {
27
27
  id: id,
@@ -30,13 +30,13 @@ var SkillApi = (function () {
30
30
  };
31
31
  SkillApi.prototype.deleteAllSkills = function () {
32
32
  return this.providers.makeRequest({
33
- route: (0, helpers_1.buildRoute)('skills'),
33
+ route: (0, helpres_1.buildRoute)('skills'),
34
34
  method: 'DELETE',
35
35
  });
36
36
  };
37
37
  SkillApi.prototype.updateSkill = function (id, data) {
38
38
  return this.providers.makeRequest({
39
- route: (0, helpers_1.buildRoute)('skill'),
39
+ route: (0, helpres_1.buildRoute)('skill'),
40
40
  method: 'PATCH',
41
41
  data: data,
42
42
  params: {
@@ -46,7 +46,7 @@ var SkillApi = (function () {
46
46
  };
47
47
  SkillApi.prototype.createSkill = function (data) {
48
48
  return this.providers.makeRequest({
49
- route: (0, helpers_1.buildRoute)('skill'),
49
+ route: (0, helpres_1.buildRoute)('skill'),
50
50
  method: 'POST',
51
51
  data: data,
52
52
  });
@@ -4,4 +4,4 @@ exports.buildRoute = void 0;
4
4
  var constants_1 = require("./constants");
5
5
  var buildRoute = function (route) { return "".concat(constants_1.IDW_PROVIDER_NAME_SPACE, "/").concat(route); };
6
6
  exports.buildRoute = buildRoute;
7
- //# sourceMappingURL=helpers.js.map
7
+ //# sourceMappingURL=helpres.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpres.js","sourceRoot":"","sources":["../../src/helpres.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AAE/C,IAAM,UAAU,GAAG,UAAC,KAAa,IAAa,OAAA,UAAG,mCAAuB,cAAI,KAAK,CAAE,EAArC,CAAqC,CAAC;AAA9E,QAAA,UAAU,cAAoE"}
@@ -13,7 +13,7 @@ var IdwApi = (function () {
13
13
  providersAccountId: providerAccountId,
14
14
  });
15
15
  this.skillApi = new api_1.SkillApi(provider);
16
- this.memoryApi = new api_1.MemoryApi(provider);
16
+ this.channelApi = new api_1.ChannelApi(provider);
17
17
  this.migrationApi = new api_1.MigrationApi(provider);
18
18
  this.idwInfoApi = new api_1.IdwInfoApi(provider);
19
19
  this.idwDbApi = new api_1.IdwDbApi(provider);
@@ -1 +1 @@
1
- {"version":3,"file":"idwApi.js","sourceRoot":"","sources":["../../src/idwApi.ts"],"names":[],"mappings":";;;AAEA,6BAA2F;AAE3F,+CAA8C;AAC9C,yCAAwC;AAExC;IAQE,gBAAY,EAAkD;YAAhD,iBAAiB,uBAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAA;QAC3C,IAAM,QAAQ,GAAG,IAAI,qBAAS,CAAC;YAC7B,KAAK,OAAA;YACL,eAAe,EAAE,KAAK;YACtB,kBAAkB,EAAE,iBAAiB;SACtC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,eAAS,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,kBAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,eAAS,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IACH,aAAC;AAAD,CAAC,AAvBD,IAuBC;AAvBY,wBAAM"}
1
+ {"version":3,"file":"idwApi.js","sourceRoot":"","sources":["../../src/idwApi.ts"],"names":[],"mappings":";;;AACA,6BAA4F;AAC5F,+CAA8C;AAC9C,yCAAwC;AAExC;IAQE,gBAAY,EAAkD;YAAhD,iBAAiB,uBAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAA;QAC3C,IAAM,QAAQ,GAAG,IAAI,qBAAS,CAAC;YAC7B,KAAK,OAAA;YACL,eAAe,EAAE,KAAK;YACtB,kBAAkB,EAAE,iBAAiB;SACtC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,IAAI,kBAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,eAAS,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;IACH,aAAC;AAAD,CAAC,AAvBD,IAuBC;AAvBY,wBAAM"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=memory.js.map
3
+ //# sourceMappingURL=channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/types/channel.ts"],"names":[],"mappings":""}
@@ -15,10 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./skill"), exports);
18
+ __exportStar(require("./channel"), exports);
18
19
  __exportStar(require("./config"), exports);
19
20
  __exportStar(require("./common"), exports);
20
21
  __exportStar(require("./flow"), exports);
21
- __exportStar(require("./memory"), exports);
22
22
  __exportStar(require("./idwInfo"), exports);
23
23
  __exportStar(require("./idwRwc"), exports);
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB"}
@@ -1,39 +1,39 @@
1
- import { buildRoute } from '../helpers';
2
- export class MemoryApi {
1
+ import { buildRoute } from '../helpres';
2
+ export class ChannelApi {
3
3
  constructor(providers) {
4
4
  this.providers = providers;
5
5
  }
6
- getMemory(id) {
6
+ getChannel(id) {
7
7
  return this.providers.makeRequest({
8
- route: buildRoute('memory'),
8
+ route: buildRoute('channel'),
9
9
  params: {
10
10
  id,
11
11
  },
12
12
  });
13
13
  }
14
- getAllMemories() {
14
+ getAllChannels() {
15
15
  return this.providers.makeRequest({
16
- route: buildRoute('memories'),
16
+ route: buildRoute('channels'),
17
17
  });
18
18
  }
19
- deleteMemory(id) {
19
+ deleteChannel(id) {
20
20
  return this.providers.makeRequest({
21
- route: buildRoute('memory'),
21
+ route: buildRoute('channel'),
22
22
  method: 'DELETE',
23
23
  params: {
24
24
  id,
25
25
  },
26
26
  });
27
27
  }
28
- deleteAllMemories() {
28
+ deleteAllChannels() {
29
29
  return this.providers.makeRequest({
30
- route: buildRoute('memories'),
30
+ route: buildRoute('channels'),
31
31
  method: 'DELETE',
32
32
  });
33
33
  }
34
- updateMemory(id, data) {
34
+ updateChannel(id, data) {
35
35
  return this.providers.makeRequest({
36
- route: buildRoute('memory'),
36
+ route: buildRoute('channel'),
37
37
  method: 'PATCH',
38
38
  data,
39
39
  params: {
@@ -41,12 +41,17 @@ export class MemoryApi {
41
41
  },
42
42
  });
43
43
  }
44
- createMemory(data) {
44
+ createChannel(data) {
45
45
  return this.providers.makeRequest({
46
- route: buildRoute('memory'),
46
+ route: buildRoute('channel'),
47
47
  method: 'POST',
48
48
  data,
49
49
  });
50
50
  }
51
+ getSuggestedChannels() {
52
+ return this.providers.makeRequest({
53
+ route: buildRoute('channels/suggested'),
54
+ });
55
+ }
51
56
  }
52
- //# sourceMappingURL=memoryApi.js.map
57
+ //# sourceMappingURL=channelApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channelApi.js","sourceRoot":"","sources":["../../../src/api/channelApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,OAAO,UAAU;IACrB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAMJ,UAAU,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;YAC5B,MAAM,EAAE;gBACN,EAAE;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAMD,cAAc;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;IAMD,aAAa,CAAC,EAAU;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;YAC5B,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,EAAE;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAKD,iBAAiB;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;YAC7B,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAOD,aAAa,CAAC,EAAU,EAAE,IAAuB;QAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;YAC5B,MAAM,EAAE,OAAO;YACf,IAAI;YACJ,MAAM,EAAE;gBACN,EAAE;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAMD,aAAa,CAAC,IAAuB;QACnC,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAKD,oBAAoB;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,oBAAoB,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import { buildRoute } from '../helpers';
1
+ import { buildRoute } from '../helpres';
2
2
  export class FlowApi {
3
3
  constructor(providers) {
4
4
  this.providers = providers;
@@ -1,4 +1,4 @@
1
- import { buildRoute } from '../helpers';
1
+ import { buildRoute } from '../helpres';
2
2
  export class IdwDbApi {
3
3
  constructor(providers) {
4
4
  this.providers = providers;
@@ -1,4 +1,4 @@
1
- import { buildRoute } from '../helpers';
1
+ import { buildRoute } from '../helpres';
2
2
  export class IdwInfoApi {
3
3
  constructor(providers) {
4
4
  this.providers = providers;
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { buildRoute } from '../helpers';
10
+ import { buildRoute } from '../helpres';
11
11
  const noop = () => { };
12
12
  export class IdwRwcApi {
13
13
  constructor(providers) {
@@ -1,5 +1,5 @@
1
1
  export { SkillApi } from './skillApi';
2
- export { MemoryApi } from './memoryApi';
2
+ export { ChannelApi } from './channelApi';
3
3
  export { MigrationApi } from './migrationApi';
4
4
  export { IdwInfoApi } from './idwInfoApi';
5
5
  export { IdwDbApi } from './idwDbApi';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
- import { buildRoute } from '../helpers';
1
+ import { buildRoute } from '../helpres';
2
2
  export class MigrationApi {
3
3
  constructor(providers) {
4
4
  this.providers = providers;
@@ -1,4 +1,4 @@
1
- import { buildRoute } from '../helpers';
1
+ import { buildRoute } from '../helpres';
2
2
  export class SkillApi {
3
3
  constructor(providers) {
4
4
  this.providers = providers;
@@ -1,3 +1,3 @@
1
1
  import { IDW_PROVIDER_NAME_SPACE } from './constants';
2
2
  export const buildRoute = (route) => `${IDW_PROVIDER_NAME_SPACE}/${route}`;
3
- //# sourceMappingURL=helpers.js.map
3
+ //# sourceMappingURL=helpres.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpres.js","sourceRoot":"","sources":["../../src/helpres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,GAAG,uBAAuB,IAAI,KAAK,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, MemoryApi } from './api';
1
+ import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, ChannelApi } from './api';
2
2
  import { Providers } from '@or-sdk/providers';
3
3
  import { FlowApi } from './api/flowApi';
4
4
  export class IdwApi {
@@ -9,7 +9,7 @@ export class IdwApi {
9
9
  providersAccountId: providerAccountId,
10
10
  });
11
11
  this.skillApi = new SkillApi(provider);
12
- this.memoryApi = new MemoryApi(provider);
12
+ this.channelApi = new ChannelApi(provider);
13
13
  this.migrationApi = new MigrationApi(provider);
14
14
  this.idwInfoApi = new IdwInfoApi(provider);
15
15
  this.idwDbApi = new IdwDbApi(provider);
@@ -1 +1 @@
1
- {"version":3,"file":"idwApi.js","sourceRoot":"","sources":["../../src/idwApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,OAAO,MAAM;IAQjB,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAiB;QAC5D,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC;YAC7B,KAAK;YACL,eAAe,EAAE,KAAK;YACtB,kBAAkB,EAAE,iBAAiB;SACtC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACF"}
1
+ {"version":3,"file":"idwApi.js","sourceRoot":"","sources":["../../src/idwApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,OAAO,MAAM;IAQjB,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAiB;QAC5D,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC;YAC7B,KAAK;YACL,eAAe,EAAE,KAAK;YACtB,kBAAkB,EAAE,iBAAiB;SACtC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/types/channel.ts"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  export * from './skill';
2
+ export * from './channel';
2
3
  export * from './config';
3
4
  export * from './common';
4
5
  export * from './flow';
5
- export * from './memory';
6
6
  export * from './idwInfo';
7
7
  export * from './idwRwc';
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Channel, ListChannels, ChannelWithFlow, ChannelUpdateData, ChannelCreateData } from '../types';
2
+ import { Providers } from '@or-sdk/providers';
3
+ export declare class ChannelApi {
4
+ private readonly providers;
5
+ constructor(providers: Providers);
6
+ getChannel(id: string): Promise<ChannelWithFlow>;
7
+ getAllChannels(): Promise<ListChannels>;
8
+ deleteChannel(id: string): Promise<void>;
9
+ deleteAllChannels(): Promise<void>;
10
+ updateChannel(id: string, data: ChannelUpdateData): Promise<Channel>;
11
+ createChannel(data: ChannelCreateData): Promise<Channel>;
12
+ getSuggestedChannels(): Promise<ListChannels>;
13
+ }
14
+ //# sourceMappingURL=channelApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channelApi.d.ts","sourceRoot":"","sources":["../../../src/api/channelApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAOvC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAahD,cAAc,IAAI,OAAO,CAAC,YAAY,CAAC;IAUvC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAaxC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYlC,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAepE,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAWxD,oBAAoB,IAAI,OAAO,CAAC,YAAY,CAAC;CAK9C"}
@@ -1,5 +1,5 @@
1
1
  export { SkillApi } from './skillApi';
2
- export { MemoryApi } from './memoryApi';
2
+ export { ChannelApi } from './channelApi';
3
3
  export { MigrationApi } from './migrationApi';
4
4
  export { IdwInfoApi } from './idwInfoApi';
5
5
  export { IdwDbApi } from './idwDbApi';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export declare const buildRoute: (route: string) => string;
2
- //# sourceMappingURL=helpers.d.ts.map
2
+ //# sourceMappingURL=helpres.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpres.d.ts","sourceRoot":"","sources":["../../src/helpres.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,MAA+C,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { IDWBaseConfig } from './types';
2
- import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, MemoryApi } from './api';
2
+ import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, ChannelApi } from './api';
3
3
  import { FlowApi } from './api/flowApi';
4
4
  export declare class IdwApi {
5
5
  readonly skillApi: SkillApi;
6
- readonly memoryApi: MemoryApi;
6
+ readonly channelApi: ChannelApi;
7
7
  readonly migrationApi: MigrationApi;
8
8
  readonly idwInfoApi: IdwInfoApi;
9
9
  readonly idwDbApi: IdwDbApi;
@@ -1 +1 @@
1
- {"version":3,"file":"idwApi.d.ts","sourceRoot":"","sources":["../../src/idwApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3F,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBAAa,MAAM;IACjB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;gBACd,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,aAAa;CAe/D"}
1
+ {"version":3,"file":"idwApi.d.ts","sourceRoot":"","sources":["../../src/idwApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBAAa,MAAM;IACjB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;gBACd,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,aAAa;CAe/D"}
@@ -0,0 +1,19 @@
1
+ import { EntityWithStatistic, SimpleNode } from './common';
2
+ import { FlowWithRelationshipStatus } from './flow';
3
+ export type ListChannels = EntityWithStatistic<{
4
+ channels: {
5
+ stepCount: number;
6
+ channel: Channel;
7
+ }[];
8
+ }>;
9
+ export type ChannelCreateData = Pick<SimpleNode, 'id' | 'name' | 'icon'>;
10
+ export type ChannelUpdateData = Partial<ChannelCreateData>;
11
+ export type Channel = Omit<SimpleNode, 'description' | '__createdAt'>;
12
+ export type ChannelWithFlow = {
13
+ channel: Channel;
14
+ flows: FlowWithRelationshipStatus[];
15
+ };
16
+ export type SuggestedChannels = {
17
+ channels: Channel[];
18
+ };
19
+ //# sourceMappingURL=channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/types/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG,mBAAmB,CAAC;IAAC,QAAQ,EAAE;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;KAAC,EAAE,CAAC;CAAC,CAAC,CAAC;AACtG,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC3D,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,0BAA0B,EAAE,CAAC;CAAC,CAAC;AACvF,MAAM,MAAM,iBAAiB,GAAG;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  export * from './skill';
2
+ export * from './channel';
2
3
  export * from './config';
3
4
  export * from './common';
4
5
  export * from './flow';
5
- export * from './memory';
6
6
  export * from './idwInfo';
7
7
  export * from './idwRwc';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0-beta.1693.0",
2
+ "version": "3.0.0",
3
3
  "name": "@or-sdk/idw",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
@@ -27,11 +27,12 @@
27
27
  "@or-sdk/accounts": "^1.2.13",
28
28
  "@or-sdk/base": "^0.28.3",
29
29
  "@or-sdk/deployer": "^1.1.5",
30
- "@or-sdk/flows": "^2.1.4-beta.1693.0",
31
- "@or-sdk/graph": "^1.6.1-beta.1693.0",
30
+ "@or-sdk/flows": "^2.1.3",
31
+ "@or-sdk/graph": "^1.6.0",
32
32
  "@or-sdk/providers": "^0.2.4",
33
33
  "@or-sdk/settings": "^0.24.11",
34
34
  "@or-sdk/users": "^0.30.2",
35
35
  "axios": "^0.24.0"
36
- }
36
+ },
37
+ "gitHead": "1c0b07c05ca3cc2c2d926a9b8ae28449859ce1f4"
37
38
  }
@@ -0,0 +1,93 @@
1
+ import { buildRoute } from '../helpres';
2
+ import { Channel, ListChannels, ChannelWithFlow, ChannelUpdateData, ChannelCreateData } from '../types';
3
+ import { Providers } from '@or-sdk/providers';
4
+
5
+ export class ChannelApi {
6
+ constructor(
7
+ private readonly providers: Providers
8
+ ) {}
9
+
10
+ /**
11
+ * @description Get specific channel
12
+ * @param id
13
+ */
14
+ getChannel(id: string): Promise<ChannelWithFlow> {
15
+ return this.providers.makeRequest({
16
+ route: buildRoute('channel'),
17
+ params: {
18
+ id,
19
+ },
20
+ });
21
+ }
22
+
23
+
24
+ /**
25
+ * @description Get all channels
26
+ */
27
+ getAllChannels(): Promise<ListChannels> {
28
+ return this.providers.makeRequest({
29
+ route: buildRoute('channels'),
30
+ });
31
+ }
32
+
33
+ /**
34
+ * @description Delete specific channel
35
+ * @param id
36
+ */
37
+ deleteChannel(id: string): Promise<void> {
38
+ return this.providers.makeRequest({
39
+ route: buildRoute('channel'),
40
+ method: 'DELETE',
41
+ params: {
42
+ id,
43
+ },
44
+ });
45
+ }
46
+
47
+ /**
48
+ * @description Delete all channels
49
+ */
50
+ deleteAllChannels(): Promise<void> {
51
+ return this.providers.makeRequest({
52
+ route: buildRoute('channels'),
53
+ method: 'DELETE',
54
+ });
55
+ }
56
+
57
+ /**
58
+ * @description update specific channel
59
+ * @param id
60
+ * @param data
61
+ */
62
+ updateChannel(id: string, data: ChannelUpdateData): Promise<Channel> {
63
+ return this.providers.makeRequest({
64
+ route: buildRoute('channel'),
65
+ method: 'PATCH',
66
+ data,
67
+ params: {
68
+ id,
69
+ },
70
+ });
71
+ }
72
+
73
+ /**
74
+ * @description create channel
75
+ * @param data
76
+ */
77
+ createChannel(data: ChannelCreateData): Promise<Channel> {
78
+ return this.providers.makeRequest({
79
+ route: buildRoute('channel'),
80
+ method: 'POST',
81
+ data,
82
+ });
83
+ }
84
+
85
+ /**
86
+ * @description Get all suggested (unlinked) channels
87
+ */
88
+ getSuggestedChannels(): Promise<ListChannels> {
89
+ return this.providers.makeRequest({
90
+ route: buildRoute('channels/suggested'),
91
+ });
92
+ }
93
+ }
@@ -1,6 +1,6 @@
1
1
  import { Flow, FlowUpdateData } from '../types';
2
2
  import { Providers } from '@or-sdk/providers';
3
- import { buildRoute } from '../helpers';
3
+ import { buildRoute } from '../helpres';
4
4
 
5
5
  export class FlowApi {
6
6
  constructor(
@@ -1,5 +1,5 @@
1
1
  import { Providers } from '@or-sdk/providers';
2
- import { buildRoute } from '../helpers';
2
+ import { buildRoute } from '../helpres';
3
3
 
4
4
  export class IdwDbApi {
5
5
  constructor(
@@ -1,6 +1,6 @@
1
1
  import { Providers } from '@or-sdk/providers';
2
2
  import { IdwBaseInfo, IdwInfoWithStatistic } from '../types';
3
- import { buildRoute } from '../helpers';
3
+ import { buildRoute } from '../helpres';
4
4
 
5
5
  export class IdwInfoApi {
6
6
  constructor(
@@ -1,6 +1,6 @@
1
1
  import { Providers } from '@or-sdk/providers';
2
2
  import { ChatCheckResponse, IdwRwcData, UpsertIdwRwcData } from '../types';
3
- import { buildRoute } from '../helpers';
3
+ import { buildRoute } from '../helpres';
4
4
 
5
5
  const noop: (...args: []) => void = () => {};
6
6
 
package/src/api/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { SkillApi } from './skillApi';
2
- export { MemoryApi } from './memoryApi';
2
+ export { ChannelApi } from './channelApi';
3
3
  export { MigrationApi } from './migrationApi';
4
4
  export { IdwInfoApi } from './idwInfoApi';
5
5
  export { IdwDbApi } from './idwDbApi';
@@ -1,5 +1,5 @@
1
1
  import { Providers } from '@or-sdk/providers';
2
- import { buildRoute } from '../helpers';
2
+ import { buildRoute } from '../helpres';
3
3
 
4
4
  export class MigrationApi {
5
5
  constructor(
@@ -1,6 +1,6 @@
1
1
  import { Skill, ListSkills, SkillWithFlow, SkillUpdateData, SkillCreateData } from '../types';
2
2
  import { Providers } from '@or-sdk/providers';
3
- import { buildRoute } from '../helpers';
3
+ import { buildRoute } from '../helpres';
4
4
 
5
5
  export class SkillApi {
6
6
  constructor(
package/src/idwApi.ts CHANGED
@@ -1,13 +1,11 @@
1
1
  import { IDWBaseConfig } from './types';
2
-
3
- import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, MemoryApi } from './api';
4
-
2
+ import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, ChannelApi } from './api';
5
3
  import { Providers } from '@or-sdk/providers';
6
4
  import { FlowApi } from './api/flowApi';
7
5
 
8
6
  export class IdwApi {
9
7
  readonly skillApi: SkillApi;
10
- readonly memoryApi: MemoryApi;
8
+ readonly channelApi: ChannelApi;
11
9
  readonly migrationApi: MigrationApi;
12
10
  readonly idwInfoApi: IdwInfoApi;
13
11
  readonly idwDbApi: IdwDbApi;
@@ -21,7 +19,7 @@ export class IdwApi {
21
19
  });
22
20
 
23
21
  this.skillApi = new SkillApi(provider);
24
- this.memoryApi = new MemoryApi(provider);
22
+ this.channelApi = new ChannelApi(provider);
25
23
  this.migrationApi = new MigrationApi(provider);
26
24
  this.idwInfoApi = new IdwInfoApi(provider);
27
25
  this.idwDbApi = new IdwDbApi(provider);
@@ -0,0 +1,9 @@
1
+ import { EntityWithStatistic, SimpleNode } from './common';
2
+ import { FlowWithRelationshipStatus } from './flow';
3
+
4
+ export type ListChannels = EntityWithStatistic<{channels: {stepCount: number; channel: Channel;}[];}>;
5
+ export type ChannelCreateData = Pick<SimpleNode, 'id' | 'name' | 'icon'>;
6
+ export type ChannelUpdateData = Partial<ChannelCreateData>;
7
+ export type Channel = Omit<SimpleNode, 'description' | '__createdAt'>;
8
+ export type ChannelWithFlow = {channel: Channel; flows: FlowWithRelationshipStatus[];};
9
+ export type SuggestedChannels = {channels: Channel[];};
@@ -1,8 +1,8 @@
1
1
  export * from './skill';
2
+ export * from './channel';
2
3
  export * from './config';
3
4
  export * from './common';
4
5
  export * from './flow';
5
- export * from './memory';
6
6
  export * from './idwInfo';
7
7
  export * from './idwRwc';
8
8
 
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MemoryApi = void 0;
4
- var helpers_1 = require("../helpers");
5
- var MemoryApi = (function () {
6
- function MemoryApi(providers) {
7
- this.providers = providers;
8
- }
9
- MemoryApi.prototype.getMemory = function (id) {
10
- return this.providers.makeRequest({
11
- route: (0, helpers_1.buildRoute)('memory'),
12
- params: {
13
- id: id,
14
- },
15
- });
16
- };
17
- MemoryApi.prototype.getAllMemories = function () {
18
- return this.providers.makeRequest({
19
- route: (0, helpers_1.buildRoute)('memories'),
20
- });
21
- };
22
- MemoryApi.prototype.deleteMemory = function (id) {
23
- return this.providers.makeRequest({
24
- route: (0, helpers_1.buildRoute)('memory'),
25
- method: 'DELETE',
26
- params: {
27
- id: id,
28
- },
29
- });
30
- };
31
- MemoryApi.prototype.deleteAllMemories = function () {
32
- return this.providers.makeRequest({
33
- route: (0, helpers_1.buildRoute)('memories'),
34
- method: 'DELETE',
35
- });
36
- };
37
- MemoryApi.prototype.updateMemory = function (id, data) {
38
- return this.providers.makeRequest({
39
- route: (0, helpers_1.buildRoute)('memory'),
40
- method: 'PATCH',
41
- data: data,
42
- params: {
43
- id: id,
44
- },
45
- });
46
- };
47
- MemoryApi.prototype.createMemory = function (data) {
48
- return this.providers.makeRequest({
49
- route: (0, helpers_1.buildRoute)('memory'),
50
- method: 'POST',
51
- data: data,
52
- });
53
- };
54
- return MemoryApi;
55
- }());
56
- exports.MemoryApi = MemoryApi;
57
- //# sourceMappingURL=memoryApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memoryApi.js","sourceRoot":"","sources":["../../../src/api/memoryApi.ts"],"names":[],"mappings":";;;AAEA,sCAAwC;AAExC;IACE,mBACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAMJ,6BAAS,GAAT,UAAU,EAAU;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE;gBACN,EAAE,IAAA;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAKD,kCAAc,GAAd;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;IAMD,gCAAY,GAAZ,UAAa,EAAU;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,EAAE,IAAA;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAKD,qCAAiB,GAAjB;QACE,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,UAAU,CAAC;YAC7B,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAOD,gCAAY,GAAZ,UAAa,EAAU,EAAE,IAAsB;QAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE,OAAO;YACf,IAAI,MAAA;YACJ,MAAM,EAAE;gBACN,EAAE,IAAA;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAMD,gCAAY,GAAZ,UAAa,IAAsB;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,IAAA,oBAAU,EAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE,MAAM;YACd,IAAI,MAAA;SACL,CAAC,CAAC;IACL,CAAC;IACH,gBAAC;AAAD,CAAC,AA9ED,IA8EC;AA9EY,8BAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;;AAAA,yCAAsD;AAE/C,IAAM,UAAU,GAAG,UAAC,KAAa,IAAa,OAAA,UAAG,mCAAuB,cAAI,KAAK,CAAE,EAArC,CAAqC,CAAC;AAA9E,QAAA,UAAU,cAAoE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/types/memory.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"memoryApi.js","sourceRoot":"","sources":["../../../src/api/memoryApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,OAAO,SAAS;IACpB,YACmB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAMJ,SAAS,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE;gBACN,EAAE;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAKD,cAAc;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;IAMD,YAAY,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE;gBACN,EAAE;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAKD,iBAAiB;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;YAC7B,MAAM,EAAE,QAAQ;SACjB,CAAC,CAAC;IACL,CAAC;IAOD,YAAY,CAAC,EAAU,EAAE,IAAsB;QAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE,OAAO;YACf,IAAI;YACJ,MAAM,EAAE;gBACN,EAAE;aACH;SACF,CAAC,CAAC;IACL,CAAC;IAMD,YAAY,CAAC,IAAsB;QACjC,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;YAChC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;YAC3B,MAAM,EAAE,MAAM;YACd,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,GAAG,uBAAuB,IAAI,KAAK,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=memory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../src/types/memory.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import { Providers } from '@or-sdk/providers';
2
- import { ListMemories, Memory, MemoryCreateData, MemoryUpdateData } from '../types/memory';
3
- export declare class MemoryApi {
4
- private readonly providers;
5
- constructor(providers: Providers);
6
- getMemory(id: string): Promise<Memory>;
7
- getAllMemories(): Promise<ListMemories>;
8
- deleteMemory(id: string): Promise<void>;
9
- deleteAllMemories(): Promise<void>;
10
- updateMemory(id: string, data: MemoryUpdateData): Promise<Memory>;
11
- createMemory(data: MemoryCreateData): Promise<Memory>;
12
- }
13
- //# sourceMappingURL=memoryApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memoryApi.d.ts","sourceRoot":"","sources":["../../../src/api/memoryApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG3F,qBAAa,SAAS;IAElB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAOvC,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYtC,cAAc,IAAI,OAAO,CAAC,YAAY,CAAC;IAUvC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAavC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAYlC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAejE,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;CAOtD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,MAA+C,CAAC"}
@@ -1,6 +0,0 @@
1
- import { SimpleNode } from './common';
2
- export type Memory = Omit<SimpleNode, 'icon'>;
3
- export type ListMemories = Memory[];
4
- export type MemoryCreateData = Pick<Memory, 'id' | 'name'>;
5
- export type MemoryUpdateData = Partial<MemoryCreateData>;
6
- //# sourceMappingURL=memory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../src/types/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAC9C,MAAM,MAAM,YAAY,GAAG,MAAM,EAAE,CAAC;AACpC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1,83 +0,0 @@
1
- import { Providers } from '@or-sdk/providers';
2
- import { ListMemories, Memory, MemoryCreateData, MemoryUpdateData } from '../types/memory';
3
- import { buildRoute } from '../helpers';
4
-
5
- export class MemoryApi {
6
- constructor(
7
- private readonly providers: Providers
8
- ) {}
9
-
10
- /**
11
- * @description Get specific memory by id
12
- * @param id
13
- */
14
- getMemory(id: string): Promise<Memory> {
15
- return this.providers.makeRequest({
16
- route: buildRoute('memory'),
17
- params: {
18
- id,
19
- },
20
- });
21
- }
22
-
23
- /**
24
- * @description Get all memories
25
- */
26
- getAllMemories(): Promise<ListMemories> {
27
- return this.providers.makeRequest({
28
- route: buildRoute('memories'),
29
- });
30
- }
31
-
32
- /**
33
- * @description Delete specific memory by id
34
- * @param id
35
- */
36
- deleteMemory(id: string): Promise<void> {
37
- return this.providers.makeRequest({
38
- route: buildRoute('memory'),
39
- method: 'DELETE',
40
- params: {
41
- id,
42
- },
43
- });
44
- }
45
-
46
- /**
47
- * @description Delete all memories
48
- */
49
- deleteAllMemories(): Promise<void> {
50
- return this.providers.makeRequest({
51
- route: buildRoute('memories'),
52
- method: 'DELETE',
53
- });
54
- }
55
-
56
- /**
57
- * @description update specific memory by id
58
- * @param id
59
- * @param data
60
- */
61
- updateMemory(id: string, data: MemoryUpdateData): Promise<Memory> {
62
- return this.providers.makeRequest({
63
- route: buildRoute('memory'),
64
- method: 'PATCH',
65
- data,
66
- params: {
67
- id,
68
- },
69
- });
70
- }
71
-
72
- /**
73
- * @description create memory
74
- * @param data
75
- */
76
- createMemory(data: MemoryCreateData): Promise<Memory> {
77
- return this.providers.makeRequest({
78
- route: buildRoute('memory'),
79
- method: 'POST',
80
- data,
81
- });
82
- }
83
- }
@@ -1,6 +0,0 @@
1
- import { SimpleNode } from './common';
2
-
3
- export type Memory = Omit<SimpleNode, 'icon'>;
4
- export type ListMemories = Memory[];
5
- export type MemoryCreateData = Pick<Memory, 'id' | 'name'>;
6
- export type MemoryUpdateData = Partial<MemoryCreateData>;
File without changes