@or-sdk/idw 4.0.1 → 4.1.0-beta.1725.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 (61) hide show
  1. package/CHANGELOG.md +0 -9
  2. package/dist/cjs/api/domainApi.js +144 -0
  3. package/dist/cjs/api/domainApi.js.map +1 -0
  4. package/dist/cjs/api/flowApi.js +4 -11
  5. package/dist/cjs/api/flowApi.js.map +1 -1
  6. package/dist/cjs/api/index.js +3 -1
  7. package/dist/cjs/api/index.js.map +1 -1
  8. package/dist/cjs/idwApi.js +1 -0
  9. package/dist/cjs/idwApi.js.map +1 -1
  10. package/dist/cjs/types/domain.js +3 -0
  11. package/dist/cjs/types/domain.js.map +1 -0
  12. package/dist/cjs/types/index.js +1 -0
  13. package/dist/cjs/types/index.js.map +1 -1
  14. package/dist/esm/api/domainApi.js +139 -0
  15. package/dist/esm/api/domainApi.js.map +1 -0
  16. package/dist/esm/api/flowApi.js +4 -11
  17. package/dist/esm/api/flowApi.js.map +1 -1
  18. package/dist/esm/api/index.js +1 -0
  19. package/dist/esm/api/index.js.map +1 -1
  20. package/dist/esm/idwApi.js +2 -1
  21. package/dist/esm/idwApi.js.map +1 -1
  22. package/dist/esm/types/domain.js +2 -0
  23. package/dist/esm/types/domain.js.map +1 -0
  24. package/dist/esm/types/index.js +1 -0
  25. package/dist/esm/types/index.js.map +1 -1
  26. package/dist/types/api/domainApi.d.ts +22 -0
  27. package/dist/types/api/domainApi.d.ts.map +1 -0
  28. package/dist/types/api/flowApi.d.ts +3 -4
  29. package/dist/types/api/flowApi.d.ts.map +1 -1
  30. package/dist/types/api/index.d.ts +1 -0
  31. package/dist/types/api/index.d.ts.map +1 -1
  32. package/dist/types/idwApi.d.ts +2 -1
  33. package/dist/types/idwApi.d.ts.map +1 -1
  34. package/dist/types/types/domain.d.ts +16 -0
  35. package/dist/types/types/domain.d.ts.map +1 -0
  36. package/dist/types/types/flow.d.ts +2 -5
  37. package/dist/types/types/flow.d.ts.map +1 -1
  38. package/dist/types/types/index.d.ts +1 -0
  39. package/dist/types/types/index.d.ts.map +1 -1
  40. package/package.json +2 -3
  41. package/src/api/domainApi.ts +222 -0
  42. package/src/api/flowApi.ts +7 -23
  43. package/src/api/index.ts +1 -0
  44. package/src/idwApi.ts +12 -1
  45. package/src/types/domain.ts +8 -0
  46. package/src/types/flow.ts +2 -3
  47. package/src/types/index.ts +1 -0
  48. package/dist/cjs/dto/flowUpsert.dto.js +0 -36
  49. package/dist/cjs/dto/flowUpsert.dto.js.map +0 -1
  50. package/dist/cjs/dto/index.js +0 -18
  51. package/dist/cjs/dto/index.js.map +0 -1
  52. package/dist/esm/dto/flowUpsert.dto.js +0 -20
  53. package/dist/esm/dto/flowUpsert.dto.js.map +0 -1
  54. package/dist/esm/dto/index.js +0 -2
  55. package/dist/esm/dto/index.js.map +0 -1
  56. package/dist/types/dto/flowUpsert.dto.d.ts +0 -22
  57. package/dist/types/dto/flowUpsert.dto.d.ts.map +0 -1
  58. package/dist/types/dto/index.d.ts +0 -2
  59. package/dist/types/dto/index.d.ts.map +0 -1
  60. package/src/dto/flowUpsert.dto.ts +0 -24
  61. package/src/dto/index.ts +0 -1
@@ -0,0 +1,16 @@
1
+ import { EntityWithStatistic, SimpleNode } from './common';
2
+ import { FlowWithRelationshipStatus } from './flow';
3
+ export type ListDomains = EntityWithStatistic<{
4
+ domains: {
5
+ stepCount: number;
6
+ domain: Domain;
7
+ }[];
8
+ }>;
9
+ export type DomainCreateData = Pick<SimpleNode, 'id' | 'name' | 'icon'>;
10
+ export type DomainUpdateData = Partial<DomainCreateData>;
11
+ export type Domain = Omit<SimpleNode, 'description' | '__createdAt'>;
12
+ export type DomainWithFlows = {
13
+ domain: Domain;
14
+ flows: FlowWithRelationshipStatus[];
15
+ };
16
+ //# sourceMappingURL=domain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../src/types/domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAEpD,MAAM,MAAM,WAAW,GAAG,mBAAmB,CAAC;IAAC,OAAO,EAAE;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;KAAC,EAAE,CAAC;CAAC,CAAC,CAAC;AAClG,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACzD,MAAM,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;AACrE,MAAM,MAAM,eAAe,GAAG;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,0BAA0B,EAAE,CAAC;CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { flowActivateDataDto, flowUpsertDataDto } from '../dto';
1
+ import { Flow as FlowType } from '@or-sdk/deployer';
2
2
  export interface Flow {
3
3
  id: string;
4
4
  createdAt: number;
@@ -15,8 +15,5 @@ export interface Flow {
15
15
  export interface FlowWithRelationshipStatus extends Flow {
16
16
  isRelationshipActive: boolean;
17
17
  }
18
- export type FlowUpsertData = ReturnType<typeof flowUpsertDataDto> & {
19
- id: string;
20
- };
21
- export type FlowActivateData = ReturnType<typeof flowActivateDataDto>;
18
+ export type FlowUpdateData = FlowType;
22
19
  //# sourceMappingURL=flow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../src/types/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEhE,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI;IACtD,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,GAAG;IAAC,EAAE,EAAE,MAAM,CAAC;CAAC,CAAC;AAClF,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../src/types/flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI;IACtD,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './skill';
2
2
  export * from './channel';
3
+ export * from './domain';
3
4
  export * from './config';
4
5
  export * from './common';
5
6
  export * from './flow';
@@ -1 +1 @@
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,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,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.0.1",
2
+ "version": "4.1.0-beta.1725.0",
3
3
  "name": "@or-sdk/idw",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
@@ -27,6 +27,5 @@
27
27
  "@or-sdk/base": "^0.28.3",
28
28
  "@or-sdk/deployer": "^1.1.5",
29
29
  "@or-sdk/providers": "^0.2.4"
30
- },
31
- "gitHead": "74e4d5e5f16f44c94fc16e7b864a2b45ab668376"
30
+ }
32
31
  }
@@ -0,0 +1,222 @@
1
+ import { buildRoute } from '../helpers';
2
+ import { Domain, ListDomains, DomainWithFlows, DomainUpdateData, DomainCreateData } from '../types';
3
+ import { Providers } from '@or-sdk/providers';
4
+
5
+ export class DomainApi {
6
+ constructor(
7
+ private readonly providers: Providers
8
+ ) {}
9
+
10
+ /**
11
+ * @description Get specific domain
12
+ * @param id
13
+ */
14
+ getDomain(id: string): Promise<DomainWithFlows> {
15
+ return this.providers.makeRequest({
16
+ route: buildRoute('domain'),
17
+ params: {
18
+ id,
19
+ },
20
+ });
21
+ }
22
+
23
+
24
+ /**
25
+ * @description Get all domains
26
+ */
27
+ getAllDomains(): Promise<ListDomains> {
28
+ return this.providers.makeRequest({
29
+ route: buildRoute('domains'),
30
+ });
31
+ }
32
+
33
+ /**
34
+ * @description Delete specific domain
35
+ * @param id
36
+ */
37
+ deleteDomain(id: string): Promise<void> {
38
+ return this.providers.makeRequest({
39
+ route: buildRoute('domain'),
40
+ method: 'DELETE',
41
+ params: {
42
+ id,
43
+ },
44
+ });
45
+ }
46
+
47
+ /**
48
+ * @description Delete all domains
49
+ */
50
+ deleteAllDomains(): Promise<void> {
51
+ return this.providers.makeRequest({
52
+ route: buildRoute('domains'),
53
+ method: 'DELETE',
54
+ });
55
+ }
56
+
57
+ /**
58
+ * @description update specific domain
59
+ * @param id
60
+ * @param data
61
+ */
62
+ updateDomain(id: string, data: DomainUpdateData): Promise<Domain> {
63
+ return this.providers.makeRequest({
64
+ route: buildRoute('domain'),
65
+ method: 'PATCH',
66
+ data,
67
+ params: {
68
+ id,
69
+ },
70
+ });
71
+ }
72
+
73
+ /**
74
+ * @description create domain
75
+ * @param data
76
+ */
77
+ createDomain(data: DomainCreateData): Promise<Domain> {
78
+ return this.providers.makeRequest({
79
+ route: buildRoute('domain'),
80
+ method: 'POST',
81
+ data,
82
+ });
83
+ }
84
+
85
+ /**
86
+ * @description Get domain's channel list
87
+ * @param id Domain's id
88
+ */
89
+ getDomainChannelList(id: string) {
90
+ return this.providers.makeRequest({
91
+ route: buildRoute('domain/channels'),
92
+ method: 'GET',
93
+ params: {
94
+ id,
95
+ },
96
+ });
97
+ }
98
+
99
+ /**
100
+ * @description Get domain's skill list
101
+ * @param id Domain's id
102
+ */
103
+ getDomainSkillList(id: string) {
104
+ return this.providers.makeRequest({
105
+ route: buildRoute('domain/skills'),
106
+ method: 'GET',
107
+ params: {
108
+ id,
109
+ },
110
+ });
111
+ }
112
+
113
+ /**
114
+ * @description Get domain's memory list
115
+ * @param id Domain's id
116
+ */
117
+ getDomainMemoryList(id: string) {
118
+ return this.providers.makeRequest({
119
+ route: buildRoute('domain/memories'),
120
+ method: 'GET',
121
+ params: {
122
+ id,
123
+ },
124
+ });
125
+ }
126
+
127
+ /**
128
+ * @description Create relationship from domain to the entity
129
+ * @param id The domain's id
130
+ * @param data The list of id props of channels
131
+ */
132
+ attachChannels(id: string, data: string[]) {
133
+ return this.providers.makeRequest({
134
+ route: buildRoute('domain/channel'),
135
+ method: 'POST',
136
+ data,
137
+ params: {
138
+ domainId: id,
139
+ },
140
+ });
141
+ }
142
+
143
+ /**
144
+ * @description Create relationship from domain to the entity
145
+ * @param id The domain's id
146
+ * @param data The list of id props of skills
147
+ */
148
+ attachSkills(id: string, data: string[]) {
149
+ return this.providers.makeRequest({
150
+ route: buildRoute('domain/skill'),
151
+ method: 'POST',
152
+ data,
153
+ params: {
154
+ domainId: id,
155
+ },
156
+ });
157
+ }
158
+
159
+ /**
160
+ * @description Create relationship from domain to the entity
161
+ * @param id The domain's id
162
+ * @param data The list of id props of memories
163
+ */
164
+ attachMemories(id: string, data: string[]) {
165
+ return this.providers.makeRequest({
166
+ route: buildRoute('domain/memory'),
167
+ method: 'POST',
168
+ data,
169
+ params: {
170
+ domainId: id,
171
+ },
172
+ });
173
+ }
174
+
175
+ /**
176
+ * @description Remove relationship from domain to the entity
177
+ * @param id The domain's id
178
+ * @param data The list of id props of channels
179
+ */
180
+ detachChannels(id: string, data: string[]) {
181
+ return this.providers.makeRequest({
182
+ route: buildRoute('domain/channel'),
183
+ method: 'DELETE',
184
+ data,
185
+ params: {
186
+ domainId: id,
187
+ },
188
+ });
189
+ }
190
+
191
+ /**
192
+ * @description Remove relationship from domain to the entity
193
+ * @param id The domain's id
194
+ * @param data The list of id props of skills
195
+ */
196
+ detachSkills(id: string, data: string[]) {
197
+ return this.providers.makeRequest({
198
+ route: buildRoute('domain/skill'),
199
+ method: 'DELETE',
200
+ data,
201
+ params: {
202
+ domainId: id,
203
+ },
204
+ });
205
+ }
206
+
207
+ /**
208
+ * @description Remove relationship from domain to the entity
209
+ * @param id The domain's id
210
+ * @param data The list of id props of memories
211
+ */
212
+ detachMemories(id: string, data: string[]) {
213
+ return this.providers.makeRequest({
214
+ route: buildRoute('domain/memory'),
215
+ method: 'DELETE',
216
+ data,
217
+ params: {
218
+ domainId: id,
219
+ },
220
+ });
221
+ }
222
+ }
@@ -1,8 +1,6 @@
1
- import { Flow as FlowType } from '@or-sdk/deployer';
2
- import { Flow } from '../types';
1
+ import { Flow, FlowUpdateData } from '../types';
3
2
  import { Providers } from '@or-sdk/providers';
4
3
  import { buildRoute } from '../helpers';
5
- import { flowActivateDataDto, flowUpsertDataDto } from '../dto';
6
4
 
7
5
  export class FlowApi {
8
6
  constructor(
@@ -38,7 +36,7 @@ export class FlowApi {
38
36
 
39
37
  /**
40
38
  * @description Delete specific flow
41
- * @param ids
39
+ * @param id
42
40
  */
43
41
  deleteFlows(ids: string[]): Promise<void> {
44
42
  return this.providers.makeRequest({
@@ -52,10 +50,9 @@ export class FlowApi {
52
50
 
53
51
  /**
54
52
  * @description create flow connected with existing node
55
- * @param flow
53
+ * @param data
56
54
  */
57
- upsert(flow: FlowType): Promise<Flow> {
58
- const data = flowUpsertDataDto(flow);
55
+ upsert(data: FlowUpdateData): Promise<Flow> {
59
56
  return this.providers.makeRequest({
60
57
  route: buildRoute('flow'),
61
58
  method: 'POST',
@@ -63,31 +60,18 @@ export class FlowApi {
63
60
  });
64
61
  }
65
62
 
66
- /**
67
- * activate flow
68
- * @param flow
69
- */
70
- activateFlow(flow: FlowType): Promise<void> {
71
- const id = flow.id;
72
- const data = flowActivateDataDto(flow);
63
+ activateFlow(data: FlowUpdateData): Promise<void> {
73
64
  return this.providers.makeRequest({
74
65
  route: buildRoute('flow/activate'),
75
- method: 'PATCH',
66
+ method: 'PUT',
76
67
  data,
77
- params: {
78
- id,
79
- },
80
68
  });
81
69
  }
82
70
 
83
- /**
84
- * deactivate flow
85
- * @param id
86
- */
87
71
  deactivateFlow(id: string): Promise<void> {
88
72
  return this.providers.makeRequest({
89
73
  route: buildRoute('flow/deactivate'),
90
- method: 'PATCH',
74
+ method: 'PUT',
91
75
  params: {
92
76
  id,
93
77
  },
package/src/api/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { SkillApi } from './skillApi';
2
2
  export { MemoryApi } from './memoryApi';
3
3
  export { ChannelApi } from './channelApi';
4
+ export { DomainApi } from './domainApi';
4
5
  export { MigrationApi } from './migrationApi';
5
6
  export { IdwInfoApi } from './idwInfoApi';
6
7
  export { IdwDbApi } from './idwDbApi';
package/src/idwApi.ts CHANGED
@@ -1,6 +1,15 @@
1
1
  import { IDWBaseConfig } from './types';
2
2
 
3
- import { IdwDbApi, IdwInfoApi, IdwRwcApi, MigrationApi, SkillApi, MemoryApi, ChannelApi } from './api';
3
+ import {
4
+ IdwDbApi,
5
+ IdwInfoApi,
6
+ IdwRwcApi,
7
+ MigrationApi,
8
+ SkillApi,
9
+ MemoryApi,
10
+ ChannelApi,
11
+ DomainApi,
12
+ } from './api';
4
13
  import { Providers } from '@or-sdk/providers';
5
14
  import { FlowApi } from './api/flowApi';
6
15
 
@@ -8,6 +17,7 @@ export class IdwApi {
8
17
  readonly skillApi: SkillApi;
9
18
  readonly memoryApi: MemoryApi;
10
19
  readonly channelApi: ChannelApi;
20
+ readonly domainApi: DomainApi;
11
21
  readonly migrationApi: MigrationApi;
12
22
  readonly idwInfoApi: IdwInfoApi;
13
23
  readonly idwDbApi: IdwDbApi;
@@ -23,6 +33,7 @@ export class IdwApi {
23
33
  this.skillApi = new SkillApi(provider);
24
34
  this.memoryApi = new MemoryApi(provider);
25
35
  this.channelApi = new ChannelApi(provider);
36
+ this.domainApi = new DomainApi(provider);
26
37
  this.migrationApi = new MigrationApi(provider);
27
38
  this.idwInfoApi = new IdwInfoApi(provider);
28
39
  this.idwDbApi = new IdwDbApi(provider);
@@ -0,0 +1,8 @@
1
+ import { EntityWithStatistic, SimpleNode } from './common';
2
+ import { FlowWithRelationshipStatus } from './flow';
3
+
4
+ export type ListDomains = EntityWithStatistic<{domains: {stepCount: number; domain: Domain;}[];}>;
5
+ export type DomainCreateData = Pick<SimpleNode, 'id' | 'name' | 'icon'>;
6
+ export type DomainUpdateData = Partial<DomainCreateData>;
7
+ export type Domain = Omit<SimpleNode, 'description' | '__createdAt'>;
8
+ export type DomainWithFlows = {domain: Domain; flows: FlowWithRelationshipStatus[];};
package/src/types/flow.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { flowActivateDataDto, flowUpsertDataDto } from '../dto';
1
+ import { Flow as FlowType } from '@or-sdk/deployer';
2
2
 
3
3
  export interface Flow {
4
4
  id: string;
@@ -18,5 +18,4 @@ export interface FlowWithRelationshipStatus extends Flow {
18
18
  isRelationshipActive: boolean;
19
19
  }
20
20
 
21
- export type FlowUpsertData = ReturnType<typeof flowUpsertDataDto> & {id: string;};
22
- export type FlowActivateData = ReturnType<typeof flowActivateDataDto>;
21
+ export type FlowUpdateData = FlowType;
@@ -1,5 +1,6 @@
1
1
  export * from './skill';
2
2
  export * from './channel';
3
+ export * from './domain';
3
4
  export * from './config';
4
5
  export * from './common';
5
6
  export * from './flow';
@@ -1,36 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.flowActivateDataDto = exports.flowUpsertDataDto = void 0;
15
- function flowUpsertDataDto(flow) {
16
- var _a = flow.data, description = _a.description, label = _a.label, trees = _a.trees, meta = _a.meta;
17
- var id = flow.id, botId = flow.botId, dateCreated = flow.dateCreated, dateModified = flow.dateModified, isDeleted = flow.isDeleted;
18
- return {
19
- id: id,
20
- botId: botId,
21
- dateCreated: dateCreated,
22
- dateModified: dateModified,
23
- isDeleted: isDeleted,
24
- description: description,
25
- label: label,
26
- trees: trees,
27
- meta: meta,
28
- };
29
- }
30
- exports.flowUpsertDataDto = flowUpsertDataDto;
31
- function flowActivateDataDto(flow) {
32
- var _a = flow.data.meta.idw, idw = _a === void 0 ? {} : _a;
33
- return __assign({}, idw);
34
- }
35
- exports.flowActivateDataDto = flowActivateDataDto;
36
- //# sourceMappingURL=flowUpsert.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowUpsert.dto.js","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,SAAgB,iBAAiB,CAAC,IAAc;IACxC,IAAA,KAAsC,IAAI,CAAC,IAAI,EAA7C,WAAW,iBAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,IAAI,UAAc,CAAC;IAC9C,IAAA,EAAE,GAAkD,IAAI,GAAtD,EAAE,KAAK,GAA2C,IAAI,MAA/C,EAAE,WAAW,GAA8B,IAAI,YAAlC,EAAE,YAAY,GAAgB,IAAI,aAApB,EAAE,SAAS,GAAK,IAAI,UAAT,CAAU;IACjE,OAAO;QACL,EAAE,IAAA;QACF,KAAK,OAAA;QACL,WAAW,aAAA;QACX,YAAY,cAAA;QACZ,SAAS,WAAA;QACT,WAAW,aAAA;QACX,KAAK,OAAA;QACL,KAAK,OAAA;QACL,IAAI,MAAA;KACL,CAAC;AACJ,CAAC;AAdD,8CAcC;AAED,SAAgB,mBAAmB,CAAC,IAAc;IAChC,IAAA,KAAe,IAAI,CAAC,IAAI,SAAhB,EAAR,GAAG,mBAAG,EAAE,KAAA,CAAiB;IACzC,oBACK,GAAG,EACN;AACJ,CAAC;AALD,kDAKC"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./flowUpsert.dto"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
@@ -1,20 +0,0 @@
1
- export function flowUpsertDataDto(flow) {
2
- const { description, label, trees, meta } = flow.data;
3
- const { id, botId, dateCreated, dateModified, isDeleted } = flow;
4
- return {
5
- id,
6
- botId,
7
- dateCreated,
8
- dateModified,
9
- isDeleted,
10
- description,
11
- label,
12
- trees,
13
- meta,
14
- };
15
- }
16
- export function flowActivateDataDto(flow) {
17
- const { meta: { idw = {} } } = flow.data;
18
- return Object.assign({}, idw);
19
- }
20
- //# sourceMappingURL=flowUpsert.dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowUpsert.dto.js","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC9C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;IACtD,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACjE,OAAO;QACL,EAAE;QACF,KAAK;QACL,WAAW;QACX,YAAY;QACZ,SAAS;QACT,WAAW;QACX,KAAK;QACL,KAAK;QACL,IAAI;KACL,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAc;IAChD,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;IACzC,yBACK,GAAG,EACN;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './flowUpsert.dto';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1,22 +0,0 @@
1
- import { Flow as FlowType } from '@or-sdk/deployer';
2
- export declare function flowUpsertDataDto(flow: FlowType): {
3
- id: string | undefined;
4
- botId: string;
5
- dateCreated: number;
6
- dateModified: number;
7
- isDeleted: boolean;
8
- description: string;
9
- label: string;
10
- trees: {
11
- [key: string]: import("@or-sdk/deployer").Tree;
12
- };
13
- meta: {
14
- [key: string]: unknown;
15
- idw?: import("@or-sdk/deployer").IDWFlowMeta | undefined;
16
- };
17
- };
18
- export declare function flowActivateDataDto(flow: FlowType): {
19
- channel?: string | undefined;
20
- skills?: string[] | undefined;
21
- };
22
- //# sourceMappingURL=flowUpsert.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowUpsert.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/flowUpsert.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ;;;;;;;;;;;;;;;EAc/C;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ;;;EAKjD"}
@@ -1,2 +0,0 @@
1
- export * from './flowUpsert.dto';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1,24 +0,0 @@
1
- import { Flow as FlowType } from '@or-sdk/deployer';
2
-
3
- export function flowUpsertDataDto(flow: FlowType) {
4
- const { description, label, trees, meta } = flow.data;
5
- const { id, botId, dateCreated, dateModified, isDeleted } = flow;
6
- return {
7
- id,
8
- botId,
9
- dateCreated,
10
- dateModified,
11
- isDeleted,
12
- description,
13
- label,
14
- trees,
15
- meta,
16
- };
17
- }
18
-
19
- export function flowActivateDataDto(flow: FlowType) {
20
- const { meta: { idw = {} } } = flow.data;
21
- return {
22
- ...idw,
23
- };
24
- }
package/src/dto/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './flowUpsert.dto';