@breign/db-schemas 0.1.40 → 0.1.42

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.
@@ -8,11 +8,15 @@ export type AppLipsync = {
8
8
  endpoint?: string;
9
9
  [key: string]: unknown;
10
10
  };
11
+ export type InstanceContext = {
12
+ custom?: Record<string, string>;
13
+ };
11
14
  export type AppInstance = {
12
15
  name: string;
13
16
  id: string;
14
17
  createdAt: string;
15
18
  status: AppStatus;
19
+ context?: InstanceContext;
16
20
  };
17
21
  export type AppAnimation = {
18
22
  category?: string;
@@ -0,0 +1,85 @@
1
+ import { ChatMessageRoleUio } from '@breign/client';
2
+ export type ConversationMessageReaction = 'positive' | 'negative';
3
+ export type ConversationAttachment = {
4
+ id: string;
5
+ type: string;
6
+ name: string;
7
+ mimeType: string;
8
+ ext: string;
9
+ size: number;
10
+ key: string;
11
+ status: 'TO_UPLOAD' | 'PROCESSING' | 'PROCESSED' | 'ERROR';
12
+ url?: string;
13
+ inlineDataUrl?: string;
14
+ processed?: Record<string, unknown>;
15
+ };
16
+ export type ConversationMessage = {
17
+ id: string;
18
+ role: ChatMessageRoleUio;
19
+ content: string;
20
+ reaction?: ConversationMessageReaction | null;
21
+ reasoning?: string;
22
+ askConfirmation?: boolean;
23
+ confirmationLink?: string;
24
+ toolResults?: {
25
+ tool: {
26
+ tool: string;
27
+ toolName?: string;
28
+ params?: string;
29
+ };
30
+ result?: Record<string, unknown>;
31
+ }[];
32
+ suggestions?: {
33
+ id: string;
34
+ text: string;
35
+ }[];
36
+ flowNode?: string;
37
+ flowNodeRequirementsChecked?: boolean;
38
+ flowNodeRequirementsMet?: boolean;
39
+ flowNodeRequirementsCheckReason?: string;
40
+ flowNodeIterations?: number;
41
+ timestamp: string;
42
+ actions?: Record<string, unknown>[];
43
+ attachments?: ConversationAttachment[];
44
+ status?: 'generating' | 'completed' | 'error' | 'tool_calling' | 'moderated';
45
+ toolCall?: {
46
+ name: string;
47
+ stepIndex: number;
48
+ };
49
+ error?: {
50
+ code: string;
51
+ message: string;
52
+ details?: Record<string, unknown>;
53
+ };
54
+ };
55
+ export type ConversationContext = {
56
+ attachments: ConversationAttachment[];
57
+ openaiThreadId?: string;
58
+ openaiPreviousResponseId?: string;
59
+ location?: {
60
+ latitude: string;
61
+ longitude: string;
62
+ };
63
+ custom?: Record<string, string>;
64
+ lastActivityAt?: string;
65
+ };
66
+ export type Conversation = {
67
+ id: string;
68
+ type?: 'chat' | 'task';
69
+ lang: string;
70
+ agentId: string;
71
+ appId?: string;
72
+ moderationTriggered?: boolean;
73
+ instanceId?: string;
74
+ userId?: string;
75
+ customUserId?: string;
76
+ summary?: string;
77
+ init?: string;
78
+ messages: ConversationMessage[];
79
+ createdAt: string;
80
+ updatedAt: string;
81
+ context: ConversationContext;
82
+ isAsync?: boolean;
83
+ ephemeral?: boolean;
84
+ title?: string;
85
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,7 @@ export * from './app';
3
3
  export * from './flow';
4
4
  export * from './flow-editor';
5
5
  export * from './advanced-flow-editor';
6
+ export * from './conversation';
6
7
  export * from './file';
7
8
  export * from './engine';
8
9
  export * from './knowledge';
@@ -19,6 +19,7 @@ __exportStar(require("./app"), exports);
19
19
  __exportStar(require("./flow"), exports);
20
20
  __exportStar(require("./flow-editor"), exports);
21
21
  __exportStar(require("./advanced-flow-editor"), exports);
22
+ __exportStar(require("./conversation"), exports);
22
23
  __exportStar(require("./file"), exports);
23
24
  __exportStar(require("./engine"), exports);
24
25
  __exportStar(require("./knowledge"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/db-schemas",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
package/src/types/app.ts CHANGED
@@ -9,11 +9,16 @@ export type AppLipsync = {
9
9
  [key: string]: unknown;
10
10
  };
11
11
 
12
+ export type InstanceContext = {
13
+ custom?: Record<string, string>;
14
+ };
15
+
12
16
  export type AppInstance = {
13
17
  name: string;
14
18
  id: string;
15
19
  createdAt: string;
16
20
  status: AppStatus;
21
+ context?: InstanceContext;
17
22
  };
18
23
 
19
24
  export type AppAnimation = {
@@ -0,0 +1,83 @@
1
+ import { ChatMessageRoleUio } from '@breign/client';
2
+
3
+ export type ConversationMessageReaction = 'positive' | 'negative';
4
+
5
+ export type ConversationAttachment = {
6
+ id: string;
7
+ type: string;
8
+ name: string;
9
+ mimeType: string;
10
+ ext: string;
11
+ size: number;
12
+ key: string;
13
+ status: 'TO_UPLOAD' | 'PROCESSING' | 'PROCESSED' | 'ERROR';
14
+ url?: string;
15
+ inlineDataUrl?: string;
16
+ processed?: Record<string, unknown>;
17
+ };
18
+
19
+ export type ConversationMessage = {
20
+ id: string;
21
+ role: ChatMessageRoleUio;
22
+ content: string;
23
+ reaction?: ConversationMessageReaction | null;
24
+ reasoning?: string;
25
+ askConfirmation?: boolean;
26
+ confirmationLink?: string;
27
+ toolResults?: {
28
+ tool: { tool: string; toolName?: string; params?: string };
29
+ result?: Record<string, unknown>;
30
+ }[];
31
+ suggestions?: {
32
+ id: string;
33
+ text: string;
34
+ }[];
35
+ flowNode?: string;
36
+ flowNodeRequirementsChecked?: boolean;
37
+ flowNodeRequirementsMet?: boolean;
38
+ flowNodeRequirementsCheckReason?: string;
39
+ flowNodeIterations?: number;
40
+ timestamp: string;
41
+ actions?: Record<string, unknown>[];
42
+ attachments?: ConversationAttachment[];
43
+ status?: 'generating' | 'completed' | 'error' | 'tool_calling' | 'moderated';
44
+ toolCall?: { name: string; stepIndex: number };
45
+ error?: {
46
+ code: string;
47
+ message: string;
48
+ details?: Record<string, unknown>;
49
+ };
50
+ };
51
+
52
+ export type ConversationContext = {
53
+ attachments: ConversationAttachment[];
54
+ openaiThreadId?: string;
55
+ openaiPreviousResponseId?: string;
56
+ location?: {
57
+ latitude: string;
58
+ longitude: string;
59
+ };
60
+ custom?: Record<string, string>;
61
+ lastActivityAt?: string;
62
+ };
63
+
64
+ export type Conversation = {
65
+ id: string;
66
+ type?: 'chat' | 'task';
67
+ lang: string;
68
+ agentId: string;
69
+ appId?: string;
70
+ moderationTriggered?: boolean;
71
+ instanceId?: string;
72
+ userId?: string;
73
+ customUserId?: string;
74
+ summary?: string;
75
+ init?: string;
76
+ messages: ConversationMessage[];
77
+ createdAt: string;
78
+ updatedAt: string;
79
+ context: ConversationContext;
80
+ isAsync?: boolean;
81
+ ephemeral?: boolean;
82
+ title?: string;
83
+ };
@@ -3,6 +3,7 @@ export * from './app';
3
3
  export * from './flow';
4
4
  export * from './flow-editor';
5
5
  export * from './advanced-flow-editor';
6
+ export * from './conversation';
6
7
  export * from './file';
7
8
  export * from './engine';
8
9
  export * from './knowledge';