@syrtis-ai/syrtis-javascript-client 9.0.0 → 11.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/Common/MessageCollection.ts +30 -14
- package/src/Common/generatedEntitySchemas.ts +6 -6
- package/src/Common/generatedRepositories.ts +6 -6
- package/src/Entity/Message.ts +43 -56
- package/src/Entity/ScenarioMessage.ts +10 -0
- package/src/Entity/{Card.ts → Step.ts} +3 -3
- package/src/Entity/StepMessage.ts +10 -0
- package/src/Repository/ScenarioMessageRepository.ts +8 -0
- package/src/Repository/SessionRepository.ts +1 -6
- package/src/Repository/StepMessageRepository.ts +8 -0
- package/src/Repository/StepRepository.ts +8 -0
- package/src/Vue/Mixin/Entity/{card_relation.vue → scenario_message.vue} +2 -2
- package/src/Vue/Mixin/Entity/{card.vue → step.vue} +2 -2
- package/src/Vue/Mixin/Entity/{card_message.vue → step_message.vue} +2 -2
- package/src/Vue/Mixin/EntityManipulator/ScenarioMessageEntityManipulatorVueMixin.ts +9 -0
- package/src/Vue/Mixin/EntityManipulator/{CardEntityManipulatorVueMixin.ts → StepEntityManipulatorVueMixin.ts} +2 -2
- package/src/Vue/Mixin/EntityManipulator/StepMessageEntityManipulatorVueMixin.ts +9 -0
- package/src/data/entity/chunk.json +9 -9
- package/src/data/entity/document.json +9 -33
- package/src/data/entity/environment.json +8 -32
- package/src/data/entity/job.json +9 -33
- package/src/data/entity/message.json +20 -70
- package/src/data/entity/message_stamp.json +8 -32
- package/src/data/entity/node.json +9 -33
- package/src/data/entity/request.json +20 -93
- package/src/data/entity/scenario.json +253 -74
- package/src/data/entity/{card_relation.json → scenario_message.json} +30 -55
- package/src/data/entity/session.json +203 -25
- package/src/data/entity/slot.json +190 -20
- package/src/data/entity/slot_config.json +9 -9
- package/src/data/entity/slot_message.json +11 -37
- package/src/data/entity/slot_message_stamp.json +9 -9
- package/src/data/entity/slot_relation.json +9 -9
- package/src/data/entity/{card.json → step.json} +22 -189
- package/src/data/entity/{card_message.json → step_message.json} +13 -14
- package/src/data/entity/template.json +9 -33
- package/src/data/entity/timezone.json +9 -9
- package/src/data/entity/user.json +38 -31
- package/src/Entity/CardMessage.ts +0 -10
- package/src/Entity/CardRelation.ts +0 -10
- package/src/Repository/CardMessageRepository.ts +0 -8
- package/src/Repository/CardRelationRepository.ts +0 -8
- package/src/Repository/CardRepository.ts +0 -8
- package/src/Vue/Mixin/EntityManipulator/CardMessageEntityManipulatorVueMixin.ts +0 -9
- package/src/Vue/Mixin/EntityManipulator/CardRelationEntityManipulatorVueMixin.ts +0 -9
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -281,8 +281,16 @@ export default class MessageCollection {
|
|
|
281
281
|
return typeof value === 'number' ? value : null;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
// What a message is known by: its uuid, the one id the api gives since
|
|
285
|
+
// secure ids left it; a legacy payload's `secureId` otherwise.
|
|
284
286
|
private static getSecureId(message: Message): string | null {
|
|
285
|
-
const
|
|
287
|
+
const record = MessageCollection.getRecord(message);
|
|
288
|
+
return (
|
|
289
|
+
MessageCollection.readString(record?.id) ?? MessageCollection.readString(record?.secureId)
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
private static readString(value: unknown): string | null {
|
|
286
294
|
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
287
295
|
}
|
|
288
296
|
|
|
@@ -292,26 +300,34 @@ export default class MessageCollection {
|
|
|
292
300
|
return null;
|
|
293
301
|
}
|
|
294
302
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
// The request's uuid, however the payload carries it: the 2025 fields, the
|
|
304
|
+
// 2026 relation (an id, or a record of one).
|
|
305
|
+
const requestRelation = messageRecord.request;
|
|
306
|
+
const relationRecord = MessageCollection.getRecord(requestRelation);
|
|
307
|
+
|
|
308
|
+
return (
|
|
309
|
+
MessageCollection.readString(messageRecord.requestSecureId) ??
|
|
310
|
+
MessageCollection.readString(messageRecord.requestId) ??
|
|
311
|
+
MessageCollection.readString(requestRelation) ??
|
|
312
|
+
MessageCollection.readString(relationRecord?.id) ??
|
|
313
|
+
MessageCollection.readString(relationRecord?.secureId)
|
|
314
|
+
);
|
|
305
315
|
}
|
|
306
316
|
|
|
307
317
|
private static getPreviousRequestSecureId(message: Message): string | null {
|
|
308
|
-
const
|
|
309
|
-
|
|
318
|
+
const record = MessageCollection.getRecord(message);
|
|
319
|
+
const metadata = MessageCollection.getRecord(record?.metadata);
|
|
320
|
+
|
|
321
|
+
return (
|
|
322
|
+
MessageCollection.readString(record?._previousRequestSecureId) ??
|
|
323
|
+
MessageCollection.readString(metadata?.previousRequestSecureId)
|
|
324
|
+
);
|
|
310
325
|
}
|
|
311
326
|
|
|
312
327
|
private static getNextRequestSecureIds(message: Message): string[] {
|
|
313
328
|
const record = MessageCollection.getRecord(message);
|
|
314
|
-
const rawValue =
|
|
329
|
+
const rawValue =
|
|
330
|
+
record?._nextRequests ?? MessageCollection.getRecord(record?.metadata)?.nextRequests;
|
|
315
331
|
if (Array.isArray(rawValue)) {
|
|
316
332
|
if (rawValue.every((item) => typeof item === 'string' && item.length > 0)) {
|
|
317
333
|
return rawValue as string[];
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import card from '../data/entity/card.json';
|
|
2
|
-
import cardMessage from '../data/entity/card_message.json';
|
|
3
|
-
import cardRelation from '../data/entity/card_relation.json';
|
|
4
1
|
import chunk from '../data/entity/chunk.json';
|
|
5
2
|
import document from '../data/entity/document.json';
|
|
6
3
|
import environment from '../data/entity/environment.json';
|
|
@@ -10,12 +7,15 @@ import messageStamp from '../data/entity/message_stamp.json';
|
|
|
10
7
|
import node from '../data/entity/node.json';
|
|
11
8
|
import request from '../data/entity/request.json';
|
|
12
9
|
import scenario from '../data/entity/scenario.json';
|
|
10
|
+
import scenarioMessage from '../data/entity/scenario_message.json';
|
|
13
11
|
import session from '../data/entity/session.json';
|
|
14
12
|
import slot from '../data/entity/slot.json';
|
|
15
13
|
import slotConfig from '../data/entity/slot_config.json';
|
|
16
14
|
import slotMessage from '../data/entity/slot_message.json';
|
|
17
15
|
import slotMessageStamp from '../data/entity/slot_message_stamp.json';
|
|
18
16
|
import slotRelation from '../data/entity/slot_relation.json';
|
|
17
|
+
import step from '../data/entity/step.json';
|
|
18
|
+
import stepMessage from '../data/entity/step_message.json';
|
|
19
19
|
import template from '../data/entity/template.json';
|
|
20
20
|
import timezone from '../data/entity/timezone.json';
|
|
21
21
|
import user from '../data/entity/user.json';
|
|
@@ -24,9 +24,6 @@ type EntitySchema = { name: string };
|
|
|
24
24
|
|
|
25
25
|
export default function getGeneratedEntitySchemas(): Record<string, EntitySchema> {
|
|
26
26
|
return {
|
|
27
|
-
[card.name]: card,
|
|
28
|
-
[cardMessage.name]: cardMessage,
|
|
29
|
-
[cardRelation.name]: cardRelation,
|
|
30
27
|
[chunk.name]: chunk,
|
|
31
28
|
[document.name]: document,
|
|
32
29
|
[environment.name]: environment,
|
|
@@ -36,12 +33,15 @@ export default function getGeneratedEntitySchemas(): Record<string, EntitySchema
|
|
|
36
33
|
[node.name]: node,
|
|
37
34
|
[request.name]: request,
|
|
38
35
|
[scenario.name]: scenario,
|
|
36
|
+
[scenarioMessage.name]: scenarioMessage,
|
|
39
37
|
[session.name]: session,
|
|
40
38
|
[slot.name]: slot,
|
|
41
39
|
[slotConfig.name]: slotConfig,
|
|
42
40
|
[slotMessage.name]: slotMessage,
|
|
43
41
|
[slotMessageStamp.name]: slotMessageStamp,
|
|
44
42
|
[slotRelation.name]: slotRelation,
|
|
43
|
+
[step.name]: step,
|
|
44
|
+
[stepMessage.name]: stepMessage,
|
|
45
45
|
[template.name]: template,
|
|
46
46
|
[timezone.name]: timezone,
|
|
47
47
|
[user.name]: user,
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import CardMessageRepository from '../Repository/CardMessageRepository.js';
|
|
2
|
-
import CardRelationRepository from '../Repository/CardRelationRepository.js';
|
|
3
|
-
import CardRepository from '../Repository/CardRepository.js';
|
|
4
1
|
import ChunkRepository from '../Repository/ChunkRepository.js';
|
|
5
2
|
import DocumentRepository from '../Repository/DocumentRepository.js';
|
|
6
3
|
import EnvironmentRepository from '../Repository/EnvironmentRepository.js';
|
|
@@ -9,6 +6,7 @@ import MessageRepository from '../Repository/MessageRepository.js';
|
|
|
9
6
|
import MessageStampRepository from '../Repository/MessageStampRepository.js';
|
|
10
7
|
import NodeRepository from '../Repository/NodeRepository.js';
|
|
11
8
|
import RequestRepository from '../Repository/RequestRepository.js';
|
|
9
|
+
import ScenarioMessageRepository from '../Repository/ScenarioMessageRepository.js';
|
|
12
10
|
import ScenarioRepository from '../Repository/ScenarioRepository.js';
|
|
13
11
|
import SessionRepository from '../Repository/SessionRepository.js';
|
|
14
12
|
import SlotConfigRepository from '../Repository/SlotConfigRepository.js';
|
|
@@ -16,14 +14,13 @@ import SlotMessageRepository from '../Repository/SlotMessageRepository.js';
|
|
|
16
14
|
import SlotMessageStampRepository from '../Repository/SlotMessageStampRepository.js';
|
|
17
15
|
import SlotRelationRepository from '../Repository/SlotRelationRepository.js';
|
|
18
16
|
import SlotRepository from '../Repository/SlotRepository.js';
|
|
17
|
+
import StepMessageRepository from '../Repository/StepMessageRepository.js';
|
|
18
|
+
import StepRepository from '../Repository/StepRepository.js';
|
|
19
19
|
import TemplateRepository from '../Repository/TemplateRepository.js';
|
|
20
20
|
import TimezoneRepository from '../Repository/TimezoneRepository.js';
|
|
21
21
|
import UserRepository from '../Repository/UserRepository.js';
|
|
22
22
|
|
|
23
23
|
const generatedRepositories = [
|
|
24
|
-
CardMessageRepository,
|
|
25
|
-
CardRelationRepository,
|
|
26
|
-
CardRepository,
|
|
27
24
|
ChunkRepository,
|
|
28
25
|
DocumentRepository,
|
|
29
26
|
EnvironmentRepository,
|
|
@@ -32,6 +29,7 @@ const generatedRepositories = [
|
|
|
32
29
|
MessageStampRepository,
|
|
33
30
|
NodeRepository,
|
|
34
31
|
RequestRepository,
|
|
32
|
+
ScenarioMessageRepository,
|
|
35
33
|
ScenarioRepository,
|
|
36
34
|
SessionRepository,
|
|
37
35
|
SlotConfigRepository,
|
|
@@ -39,6 +37,8 @@ const generatedRepositories = [
|
|
|
39
37
|
SlotMessageStampRepository,
|
|
40
38
|
SlotRelationRepository,
|
|
41
39
|
SlotRepository,
|
|
40
|
+
StepMessageRepository,
|
|
41
|
+
StepRepository,
|
|
42
42
|
TemplateRepository,
|
|
43
43
|
TimezoneRepository,
|
|
44
44
|
UserRepository,
|
package/src/Entity/Message.ts
CHANGED
|
@@ -8,7 +8,6 @@ export default class Message extends AbstractApiEntity {
|
|
|
8
8
|
declare readonly content?: string | null;
|
|
9
9
|
declare readonly contentType?: string | null;
|
|
10
10
|
declare readonly dateCreated?: Date | null;
|
|
11
|
-
declare readonly format?: string | null;
|
|
12
11
|
declare readonly name?: string | null;
|
|
13
12
|
declare readonly origin?: string | null;
|
|
14
13
|
declare readonly versionMajor?: number | null;
|
|
@@ -19,41 +18,36 @@ export default class Message extends AbstractApiEntity {
|
|
|
19
18
|
static readonly ORIGIN_NODE = 'node';
|
|
20
19
|
static readonly ORIGIN_USER = 'user';
|
|
21
20
|
|
|
22
|
-
static readonly CONTENT_TYPE_ACTIONS = 'actions';
|
|
23
|
-
static readonly
|
|
24
|
-
static readonly
|
|
25
|
-
static readonly
|
|
26
|
-
static readonly
|
|
27
|
-
static readonly
|
|
28
|
-
static readonly
|
|
29
|
-
static readonly
|
|
30
|
-
static readonly
|
|
31
|
-
static readonly
|
|
32
|
-
static readonly
|
|
33
|
-
static readonly
|
|
34
|
-
static readonly
|
|
35
|
-
static readonly
|
|
36
|
-
static readonly
|
|
37
|
-
static readonly
|
|
38
|
-
static readonly
|
|
39
|
-
static readonly
|
|
40
|
-
static readonly
|
|
41
|
-
static readonly
|
|
42
|
-
static readonly
|
|
43
|
-
static readonly
|
|
44
|
-
static readonly
|
|
45
|
-
|
|
46
|
-
static readonly
|
|
47
|
-
|
|
48
|
-
static readonly
|
|
49
|
-
static readonly
|
|
50
|
-
static readonly
|
|
51
|
-
static readonly
|
|
52
|
-
static readonly FORMAT_JSON = 'json';
|
|
53
|
-
static readonly FORMAT_MARKDOWN = 'markdown';
|
|
54
|
-
static readonly FORMAT_NULL = 'null';
|
|
55
|
-
static readonly FORMAT_TEXT = 'text';
|
|
56
|
-
static readonly FORMAT_YAML = 'yaml';
|
|
21
|
+
static readonly CONTENT_TYPE_ACTIONS = 'conversation/actions';
|
|
22
|
+
static readonly CONTENT_TYPE_CONVERSATION_MESSAGE = 'conversation/message';
|
|
23
|
+
static readonly CONTENT_TYPE_DEBUG = 'core/debug';
|
|
24
|
+
static readonly CONTENT_TYPE_DOWNLOAD = 'core/download';
|
|
25
|
+
static readonly CONTENT_TYPE_ERROR = 'core/error';
|
|
26
|
+
static readonly CONTENT_TYPE_FORM = 'core/form';
|
|
27
|
+
static readonly CONTENT_TYPE_HTTP_RESPONSE = 'core/http_response';
|
|
28
|
+
static readonly CONTENT_TYPE_IMAGE = 'core/image';
|
|
29
|
+
static readonly CONTENT_TYPE_INFO = 'web/info';
|
|
30
|
+
static readonly CONTENT_TYPE_LIST = 'core/list';
|
|
31
|
+
static readonly CONTENT_TYPE_NAVIGATE = 'core/navigate';
|
|
32
|
+
static readonly CONTENT_TYPE_NAVIGATED = 'core/navigated';
|
|
33
|
+
static readonly CONTENT_TYPE_PROGRESS = 'core/progress';
|
|
34
|
+
static readonly CONTENT_TYPE_REFERENCE = 'core/reference';
|
|
35
|
+
static readonly CONTENT_TYPE_SESSION_EXPIRE = 'core/session_expire';
|
|
36
|
+
static readonly CONTENT_TYPE_SESSION_STATUS = 'core/session_status';
|
|
37
|
+
static readonly CONTENT_TYPE_SUCCESS = 'web/success';
|
|
38
|
+
static readonly CONTENT_TYPE_THOUGHT = 'conversation/thought';
|
|
39
|
+
static readonly CONTENT_TYPE_TOOL_CALL = 'core/tool_call';
|
|
40
|
+
static readonly CONTENT_TYPE_UPLOAD = 'core/upload';
|
|
41
|
+
static readonly CONTENT_TYPE_URL = 'core/url';
|
|
42
|
+
static readonly CONTENT_TYPE_VIDEO = 'core/video';
|
|
43
|
+
static readonly CONTENT_TYPE_WARNING = 'core/warning';
|
|
44
|
+
// The types of a message's shape alone: a text, a value as JSON.
|
|
45
|
+
static readonly CONTENT_TYPE_TEXT = 'content/text';
|
|
46
|
+
static readonly CONTENT_TYPE_MARKDOWN = 'content/markdown';
|
|
47
|
+
static readonly CONTENT_TYPE_HTML = 'content/html';
|
|
48
|
+
static readonly CONTENT_TYPE_YAML = 'content/yaml';
|
|
49
|
+
static readonly CONTENT_TYPE_JSON = 'content/json';
|
|
50
|
+
static readonly CONTENT_TYPE_OBJECT = 'content/object';
|
|
57
51
|
|
|
58
52
|
static retrieveEntitySchema() {
|
|
59
53
|
return schema;
|
|
@@ -64,41 +58,34 @@ export default class Message extends AbstractApiEntity {
|
|
|
64
58
|
static isReply(message: Message): boolean {
|
|
65
59
|
return (
|
|
66
60
|
message.origin === Message.ORIGIN_NODE &&
|
|
67
|
-
message.contentType === Message.
|
|
61
|
+
message.contentType === Message.CONTENT_TYPE_CONVERSATION_MESSAGE
|
|
68
62
|
);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
65
|
// A conversational message from any origin (user input included) —
|
|
72
66
|
// what a chat history typically displays.
|
|
73
67
|
static isConversation(message: Message): boolean {
|
|
74
|
-
return message.contentType === Message.
|
|
68
|
+
return message.contentType === Message.CONTENT_TYPE_CONVERSATION_MESSAGE;
|
|
75
69
|
}
|
|
76
70
|
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
// Note: schema fields are read through getDataValue()
|
|
80
|
-
// entity Proxy binds methods to the raw target
|
|
81
|
-
// and friends are not resolved.
|
|
71
|
+
// The content as its type reads it: the server read it already
|
|
72
|
+
// (`formattedContent`, a value for a type holding one); without it, the
|
|
73
|
+
// content as written. Note: schema fields are read through getDataValue()
|
|
74
|
+
// because the entity Proxy binds methods to the raw target.
|
|
82
75
|
getParsedContent(): unknown {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (format !== Message.FORMAT_JSON) {
|
|
87
|
-
return content;
|
|
76
|
+
const formatted = this.getDataValue('formattedContent');
|
|
77
|
+
if (formatted !== undefined) {
|
|
78
|
+
return formatted;
|
|
88
79
|
}
|
|
89
80
|
|
|
90
81
|
const metadata = this.metadata;
|
|
91
82
|
if (metadata && !Array.isArray(metadata)) {
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
return
|
|
83
|
+
const inMetadata = (metadata as Record<string, unknown>).formattedContent;
|
|
84
|
+
if (inMetadata !== undefined && inMetadata !== null) {
|
|
85
|
+
return inMetadata;
|
|
95
86
|
}
|
|
96
87
|
}
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
return JSON.parse(content);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return null;
|
|
89
|
+
return this.getDataValue('content');
|
|
103
90
|
}
|
|
104
91
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import AbstractApiEntity from '@wexample/js-api-entity/Common/AbstractApiEntity';
|
|
2
|
+
import schema from '../data/entity/scenario_message.json';
|
|
3
|
+
|
|
4
|
+
export default class ScenarioMessage extends AbstractApiEntity {
|
|
5
|
+
static readonly entityName = 'scenarioMessage';
|
|
6
|
+
|
|
7
|
+
static retrieveEntitySchema() {
|
|
8
|
+
return schema;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import AbstractApiEntity from '@wexample/js-api-entity/Common/AbstractApiEntity';
|
|
2
|
-
import schema from '../data/entity/
|
|
2
|
+
import schema from '../data/entity/step.json';
|
|
3
3
|
|
|
4
|
-
export default class
|
|
5
|
-
static readonly entityName = '
|
|
4
|
+
export default class Step extends AbstractApiEntity {
|
|
5
|
+
static readonly entityName = 'step';
|
|
6
6
|
|
|
7
7
|
static retrieveEntitySchema() {
|
|
8
8
|
return schema;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import AbstractApiEntity from '@wexample/js-api-entity/Common/AbstractApiEntity';
|
|
2
|
+
import schema from '../data/entity/step_message.json';
|
|
3
|
+
|
|
4
|
+
export default class StepMessage extends AbstractApiEntity {
|
|
5
|
+
static readonly entityName = 'stepMessage';
|
|
6
|
+
|
|
7
|
+
static retrieveEntitySchema() {
|
|
8
|
+
return schema;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import AbstractApiRepository from '@wexample/js-api-entity/Common/AbstractApiRepository';
|
|
2
|
+
import ScenarioMessage from '../Entity/ScenarioMessage.js';
|
|
3
|
+
|
|
4
|
+
export default class ScenarioMessageRepository extends AbstractApiRepository<ScenarioMessage> {
|
|
5
|
+
static getEntityType() {
|
|
6
|
+
return ScenarioMessage;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -16,7 +16,6 @@ export type SessionMessagePayload = {
|
|
|
16
16
|
content: string;
|
|
17
17
|
name?: string | null;
|
|
18
18
|
contentType?: string;
|
|
19
|
-
format?: string;
|
|
20
19
|
stamps?: string[];
|
|
21
20
|
metadata?: Record<string, unknown> | unknown[] | null;
|
|
22
21
|
};
|
|
@@ -26,7 +25,6 @@ export type SessionSendMessageOptions = {
|
|
|
26
25
|
// Single-message shortcut; content/name/contentType/... describe one message.
|
|
27
26
|
content?: string | null;
|
|
28
27
|
contentType?: string;
|
|
29
|
-
format?: string;
|
|
30
28
|
stamps?: string[];
|
|
31
29
|
name?: string | null;
|
|
32
30
|
metadata?: Record<string, unknown> | unknown[] | null;
|
|
@@ -130,7 +128,6 @@ export default class SessionRepository extends AbstractApiRepository<Session> {
|
|
|
130
128
|
content = null,
|
|
131
129
|
files = [],
|
|
132
130
|
contentType,
|
|
133
|
-
format,
|
|
134
131
|
stamps,
|
|
135
132
|
name,
|
|
136
133
|
metadata,
|
|
@@ -149,7 +146,6 @@ export default class SessionRepository extends AbstractApiRepository<Session> {
|
|
|
149
146
|
this.buildMessagePayload({
|
|
150
147
|
content: trimmedContent,
|
|
151
148
|
contentType,
|
|
152
|
-
format,
|
|
153
149
|
stamps,
|
|
154
150
|
name,
|
|
155
151
|
metadata,
|
|
@@ -182,8 +178,7 @@ export default class SessionRepository extends AbstractApiRepository<Session> {
|
|
|
182
178
|
protected buildMessagePayload(message: SessionMessagePayload) {
|
|
183
179
|
return {
|
|
184
180
|
content: message.content,
|
|
185
|
-
contentType: message.contentType ?? Message.
|
|
186
|
-
format: message.format ?? Message.FORMAT_TEXT,
|
|
181
|
+
contentType: message.contentType ?? Message.CONTENT_TYPE_CONVERSATION_MESSAGE,
|
|
187
182
|
stamps: message.stamps ?? [],
|
|
188
183
|
metadata: message.metadata ?? null,
|
|
189
184
|
name: message.name ?? null,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import AbstractApiRepository from '@wexample/js-api-entity/Common/AbstractApiRepository';
|
|
2
|
+
import StepMessage from '../Entity/StepMessage.js';
|
|
3
|
+
|
|
4
|
+
export default class StepMessageRepository extends AbstractApiRepository<StepMessage> {
|
|
5
|
+
static getEntityType() {
|
|
6
|
+
return StepMessage;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import AbstractEntitySingleMixin from "@wexample/js-api-entity/Vue/AbstractEntitySingleMixin";
|
|
3
|
-
import
|
|
3
|
+
import ScenarioMessageEntityManipulatorVueMixin from '../EntityManipulator/ScenarioMessageEntityManipulatorVueMixin';
|
|
4
4
|
import Entity from '@wexample/symfony-design-system/components/_abstract/entity/entity.vue';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
extends: Entity,
|
|
8
|
-
mixins: [AbstractEntitySingleMixin,
|
|
8
|
+
mixins: [AbstractEntitySingleMixin, ScenarioMessageEntityManipulatorVueMixin],
|
|
9
9
|
};
|
|
10
10
|
</script>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import AbstractEntitySingleMixin from "@wexample/js-api-entity/Vue/AbstractEntitySingleMixin";
|
|
3
|
-
import
|
|
3
|
+
import StepEntityManipulatorVueMixin from '../EntityManipulator/StepEntityManipulatorVueMixin';
|
|
4
4
|
import Entity from '@wexample/symfony-design-system/components/_abstract/entity/entity.vue';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
extends: Entity,
|
|
8
|
-
mixins: [AbstractEntitySingleMixin,
|
|
8
|
+
mixins: [AbstractEntitySingleMixin, StepEntityManipulatorVueMixin],
|
|
9
9
|
};
|
|
10
10
|
</script>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import AbstractEntitySingleMixin from "@wexample/js-api-entity/Vue/AbstractEntitySingleMixin";
|
|
3
|
-
import
|
|
3
|
+
import StepMessageEntityManipulatorVueMixin from '../EntityManipulator/StepMessageEntityManipulatorVueMixin';
|
|
4
4
|
import Entity from '@wexample/symfony-design-system/components/_abstract/entity/entity.vue';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
extends: Entity,
|
|
8
|
-
mixins: [AbstractEntitySingleMixin,
|
|
8
|
+
mixins: [AbstractEntitySingleMixin, StepMessageEntityManipulatorVueMixin],
|
|
9
9
|
};
|
|
10
10
|
</script>
|
|
@@ -129,6 +129,15 @@
|
|
|
129
129
|
"indexes": {},
|
|
130
130
|
"unique_constraints": {},
|
|
131
131
|
"fields": {
|
|
132
|
+
"id": {
|
|
133
|
+
"kind": "field",
|
|
134
|
+
"column": "id",
|
|
135
|
+
"type": "uuid",
|
|
136
|
+
"nullable": false,
|
|
137
|
+
"unique": true,
|
|
138
|
+
"id": true,
|
|
139
|
+
"generated": false
|
|
140
|
+
},
|
|
132
141
|
"content": {
|
|
133
142
|
"kind": "field",
|
|
134
143
|
"column": "content",
|
|
@@ -146,15 +155,6 @@
|
|
|
146
155
|
"unique": false,
|
|
147
156
|
"id": false,
|
|
148
157
|
"generated": false
|
|
149
|
-
},
|
|
150
|
-
"id": {
|
|
151
|
-
"kind": "field",
|
|
152
|
-
"column": "id",
|
|
153
|
-
"type": "uuid",
|
|
154
|
-
"nullable": false,
|
|
155
|
-
"unique": true,
|
|
156
|
-
"id": true,
|
|
157
|
-
"generated": false
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
160
|
"associations": {
|
|
@@ -60,20 +60,6 @@
|
|
|
60
60
|
},
|
|
61
61
|
"target": "user"
|
|
62
62
|
},
|
|
63
|
-
{
|
|
64
|
-
"name": "secureId",
|
|
65
|
-
"type": "string",
|
|
66
|
-
"orm": {
|
|
67
|
-
"kind": "field",
|
|
68
|
-
"column": "secure_id",
|
|
69
|
-
"type": "string",
|
|
70
|
-
"nullable": false,
|
|
71
|
-
"unique": false,
|
|
72
|
-
"id": false,
|
|
73
|
-
"generated": false,
|
|
74
|
-
"length": 255
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
63
|
{
|
|
78
64
|
"name": "mimeType",
|
|
79
65
|
"type": "string",
|
|
@@ -191,6 +177,15 @@
|
|
|
191
177
|
"indexes": {},
|
|
192
178
|
"unique_constraints": {},
|
|
193
179
|
"fields": {
|
|
180
|
+
"id": {
|
|
181
|
+
"kind": "field",
|
|
182
|
+
"column": "id",
|
|
183
|
+
"type": "uuid",
|
|
184
|
+
"nullable": false,
|
|
185
|
+
"unique": true,
|
|
186
|
+
"id": true,
|
|
187
|
+
"generated": false
|
|
188
|
+
},
|
|
194
189
|
"dateCreated": {
|
|
195
190
|
"kind": "field",
|
|
196
191
|
"column": "date_created",
|
|
@@ -210,16 +205,6 @@
|
|
|
210
205
|
"generated": false,
|
|
211
206
|
"length": 255
|
|
212
207
|
},
|
|
213
|
-
"secureId": {
|
|
214
|
-
"kind": "field",
|
|
215
|
-
"column": "secure_id",
|
|
216
|
-
"type": "string",
|
|
217
|
-
"nullable": false,
|
|
218
|
-
"unique": false,
|
|
219
|
-
"id": false,
|
|
220
|
-
"generated": false,
|
|
221
|
-
"length": 255
|
|
222
|
-
},
|
|
223
208
|
"mimeType": {
|
|
224
209
|
"kind": "field",
|
|
225
210
|
"column": "mime_type",
|
|
@@ -248,15 +233,6 @@
|
|
|
248
233
|
"unique": false,
|
|
249
234
|
"id": false,
|
|
250
235
|
"generated": false
|
|
251
|
-
},
|
|
252
|
-
"id": {
|
|
253
|
-
"kind": "field",
|
|
254
|
-
"column": "id",
|
|
255
|
-
"type": "uuid",
|
|
256
|
-
"nullable": false,
|
|
257
|
-
"unique": true,
|
|
258
|
-
"id": true,
|
|
259
|
-
"generated": false
|
|
260
236
|
}
|
|
261
237
|
},
|
|
262
238
|
"associations": {
|