@happyvertical/smrt-chat 0.37.5 → 0.37.6
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/dist/index.js +1 -1
- package/dist/manifest.json +1833 -1833
- package/dist/smrt-knowledge.json +143 -143
- package/package.json +8 -8
package/dist/manifest.json
CHANGED
|
@@ -1,135 +1,295 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"timestamp":
|
|
3
|
+
"timestamp": 1782960045835,
|
|
4
4
|
"packageName": "@happyvertical/smrt-chat",
|
|
5
|
-
"packageVersion": "0.37.
|
|
5
|
+
"packageVersion": "0.37.6",
|
|
6
6
|
"objects": {
|
|
7
|
-
"@happyvertical/smrt-chat:
|
|
8
|
-
"name": "
|
|
9
|
-
"className": "
|
|
10
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
7
|
+
"@happyvertical/smrt-chat:AgentSession": {
|
|
8
|
+
"name": "agentsession",
|
|
9
|
+
"className": "AgentSession",
|
|
10
|
+
"qualifiedName": "@happyvertical/smrt-chat:AgentSession",
|
|
11
11
|
"collection": "agentsessions",
|
|
12
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
12
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/AgentSession.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-chat",
|
|
14
|
-
"fields": {
|
|
14
|
+
"fields": {
|
|
15
|
+
"tenantId": {
|
|
16
|
+
"type": "text",
|
|
17
|
+
"required": false,
|
|
18
|
+
"_meta": {
|
|
19
|
+
"sqlType": "UUID",
|
|
20
|
+
"nullable": true,
|
|
21
|
+
"__tenancy": {
|
|
22
|
+
"isTenantIdField": true,
|
|
23
|
+
"autoFilter": true,
|
|
24
|
+
"required": false,
|
|
25
|
+
"autoPopulate": true,
|
|
26
|
+
"nullable": true,
|
|
27
|
+
"mode": "optional",
|
|
28
|
+
"field": "tenantId",
|
|
29
|
+
"allowSuperAdminBypass": false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"agentId": {
|
|
34
|
+
"type": "text",
|
|
35
|
+
"required": true,
|
|
36
|
+
"default": "",
|
|
37
|
+
"_meta": {
|
|
38
|
+
"required": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"participantProfileId": {
|
|
42
|
+
"type": "crossPackageRef",
|
|
43
|
+
"required": true,
|
|
44
|
+
"related": "@happyvertical/smrt-profiles:Profile"
|
|
45
|
+
},
|
|
46
|
+
"chatRoomId": {
|
|
47
|
+
"type": "foreignKey",
|
|
48
|
+
"required": false,
|
|
49
|
+
"related": "ChatRoom"
|
|
50
|
+
},
|
|
51
|
+
"status": {
|
|
52
|
+
"type": "text",
|
|
53
|
+
"required": true,
|
|
54
|
+
"default": "active",
|
|
55
|
+
"_meta": {
|
|
56
|
+
"required": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"allowedTools": {
|
|
60
|
+
"type": "text",
|
|
61
|
+
"required": false,
|
|
62
|
+
"default": "[]"
|
|
63
|
+
},
|
|
64
|
+
"sessionContext": {
|
|
65
|
+
"type": "text",
|
|
66
|
+
"required": false,
|
|
67
|
+
"default": "{}"
|
|
68
|
+
},
|
|
69
|
+
"systemPrompt": {
|
|
70
|
+
"type": "text",
|
|
71
|
+
"required": false,
|
|
72
|
+
"default": ""
|
|
73
|
+
},
|
|
74
|
+
"messageCount": {
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"required": false,
|
|
77
|
+
"default": 0
|
|
78
|
+
},
|
|
79
|
+
"totalTokensUsed": {
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"required": false,
|
|
82
|
+
"default": 0
|
|
83
|
+
},
|
|
84
|
+
"maxTokens": {
|
|
85
|
+
"type": "integer",
|
|
86
|
+
"required": false,
|
|
87
|
+
"default": 0
|
|
88
|
+
},
|
|
89
|
+
"maxMessages": {
|
|
90
|
+
"type": "integer",
|
|
91
|
+
"required": false,
|
|
92
|
+
"default": 0
|
|
93
|
+
},
|
|
94
|
+
"lastMessageAt": {
|
|
95
|
+
"type": "datetime",
|
|
96
|
+
"required": false
|
|
97
|
+
},
|
|
98
|
+
"expiresAt": {
|
|
99
|
+
"type": "datetime",
|
|
100
|
+
"required": false
|
|
101
|
+
},
|
|
102
|
+
"closedAt": {
|
|
103
|
+
"type": "datetime",
|
|
104
|
+
"required": false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
15
107
|
"methods": {
|
|
16
|
-
"
|
|
17
|
-
"name": "
|
|
18
|
-
"async":
|
|
108
|
+
"getAllowedTools": {
|
|
109
|
+
"name": "getAllowedTools",
|
|
110
|
+
"async": false,
|
|
111
|
+
"parameters": [],
|
|
112
|
+
"returnType": "string[]",
|
|
113
|
+
"isStatic": false,
|
|
114
|
+
"isPublic": true
|
|
115
|
+
},
|
|
116
|
+
"setAllowedTools": {
|
|
117
|
+
"name": "setAllowedTools",
|
|
118
|
+
"async": false,
|
|
19
119
|
"parameters": [
|
|
20
120
|
{
|
|
21
|
-
"name": "
|
|
22
|
-
"type": "string",
|
|
121
|
+
"name": "tools",
|
|
122
|
+
"type": "string[]",
|
|
23
123
|
"optional": false
|
|
24
124
|
}
|
|
25
125
|
],
|
|
26
|
-
"returnType": "
|
|
126
|
+
"returnType": "void",
|
|
27
127
|
"isStatic": false,
|
|
28
128
|
"isPublic": true
|
|
29
129
|
},
|
|
30
|
-
"
|
|
31
|
-
"name": "
|
|
32
|
-
"async":
|
|
130
|
+
"isToolAllowed": {
|
|
131
|
+
"name": "isToolAllowed",
|
|
132
|
+
"async": false,
|
|
33
133
|
"parameters": [
|
|
34
134
|
{
|
|
35
|
-
"name": "
|
|
36
|
-
"type": "string",
|
|
37
|
-
"optional": false
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "participantProfileId",
|
|
135
|
+
"name": "toolName",
|
|
41
136
|
"type": "string",
|
|
42
137
|
"optional": false
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "tenantId",
|
|
46
|
-
"type": "string | null",
|
|
47
|
-
"optional": false
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "sessionKey",
|
|
51
|
-
"type": "string | null",
|
|
52
|
-
"optional": true
|
|
53
138
|
}
|
|
54
139
|
],
|
|
55
|
-
"returnType": "
|
|
140
|
+
"returnType": "boolean",
|
|
56
141
|
"isStatic": false,
|
|
57
142
|
"isPublic": true
|
|
58
143
|
},
|
|
59
|
-
"
|
|
60
|
-
"name": "
|
|
144
|
+
"isActive": {
|
|
145
|
+
"name": "isActive",
|
|
146
|
+
"async": false,
|
|
147
|
+
"parameters": [],
|
|
148
|
+
"returnType": "boolean",
|
|
149
|
+
"isStatic": false,
|
|
150
|
+
"isPublic": true
|
|
151
|
+
},
|
|
152
|
+
"isExpired": {
|
|
153
|
+
"name": "isExpired",
|
|
154
|
+
"async": false,
|
|
155
|
+
"parameters": [],
|
|
156
|
+
"returnType": "boolean",
|
|
157
|
+
"isStatic": false,
|
|
158
|
+
"isPublic": true
|
|
159
|
+
},
|
|
160
|
+
"close": {
|
|
161
|
+
"name": "close",
|
|
162
|
+
"async": true,
|
|
163
|
+
"parameters": [],
|
|
164
|
+
"returnType": "Promise<void>",
|
|
165
|
+
"isStatic": false,
|
|
166
|
+
"isPublic": true
|
|
167
|
+
},
|
|
168
|
+
"expire": {
|
|
169
|
+
"name": "expire",
|
|
61
170
|
"async": true,
|
|
171
|
+
"parameters": [],
|
|
172
|
+
"returnType": "Promise<void>",
|
|
173
|
+
"isStatic": false,
|
|
174
|
+
"isPublic": true
|
|
175
|
+
},
|
|
176
|
+
"getSessionContext": {
|
|
177
|
+
"name": "getSessionContext",
|
|
178
|
+
"async": false,
|
|
179
|
+
"parameters": [],
|
|
180
|
+
"returnType": "Record<string>",
|
|
181
|
+
"isStatic": false,
|
|
182
|
+
"isPublic": true
|
|
183
|
+
},
|
|
184
|
+
"setSessionContext": {
|
|
185
|
+
"name": "setSessionContext",
|
|
186
|
+
"async": false,
|
|
62
187
|
"parameters": [
|
|
63
188
|
{
|
|
64
|
-
"name": "
|
|
65
|
-
"type": "
|
|
189
|
+
"name": "ctx",
|
|
190
|
+
"type": "Record<string>",
|
|
66
191
|
"optional": false
|
|
67
192
|
}
|
|
68
193
|
],
|
|
69
|
-
"returnType": "
|
|
194
|
+
"returnType": "void",
|
|
70
195
|
"isStatic": false,
|
|
71
196
|
"isPublic": true
|
|
72
197
|
},
|
|
73
|
-
"
|
|
74
|
-
"name": "
|
|
198
|
+
"getSessionKey": {
|
|
199
|
+
"name": "getSessionKey",
|
|
200
|
+
"async": false,
|
|
201
|
+
"parameters": [],
|
|
202
|
+
"returnType": "string | null",
|
|
203
|
+
"isStatic": false,
|
|
204
|
+
"isPublic": true
|
|
205
|
+
},
|
|
206
|
+
"updateSessionContext": {
|
|
207
|
+
"name": "updateSessionContext",
|
|
75
208
|
"async": true,
|
|
76
209
|
"parameters": [
|
|
77
210
|
{
|
|
78
|
-
"name": "
|
|
79
|
-
"type": "string",
|
|
211
|
+
"name": "updates",
|
|
212
|
+
"type": "Record<string>",
|
|
80
213
|
"optional": false
|
|
81
214
|
}
|
|
82
215
|
],
|
|
83
|
-
"returnType": "Promise<
|
|
216
|
+
"returnType": "Promise<void>",
|
|
84
217
|
"isStatic": false,
|
|
85
218
|
"isPublic": true
|
|
86
219
|
},
|
|
87
|
-
"
|
|
88
|
-
"name": "
|
|
220
|
+
"recordMessage": {
|
|
221
|
+
"name": "recordMessage",
|
|
89
222
|
"async": true,
|
|
90
223
|
"parameters": [
|
|
91
224
|
{
|
|
92
|
-
"name": "
|
|
93
|
-
"type": "
|
|
94
|
-
"optional": false
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"name": "scope",
|
|
98
|
-
"type": "object",
|
|
225
|
+
"name": "tokensUsed",
|
|
226
|
+
"type": "number",
|
|
99
227
|
"optional": true
|
|
100
228
|
}
|
|
101
229
|
],
|
|
102
|
-
"returnType": "Promise<
|
|
230
|
+
"returnType": "Promise<void>",
|
|
103
231
|
"isStatic": false,
|
|
104
232
|
"isPublic": true
|
|
105
233
|
}
|
|
106
234
|
},
|
|
107
235
|
"decoratorConfig": {
|
|
108
|
-
"tableName": "agent_sessions"
|
|
109
|
-
},
|
|
110
|
-
"extends": "SmrtCollection",
|
|
111
|
-
"extendsTypeArg": "AgentSession",
|
|
112
|
-
"exportName": "AgentSessionCollection",
|
|
113
|
-
"collectionExportName": "AgentSessionCollectionCollection",
|
|
114
|
-
"schema": {
|
|
115
236
|
"tableName": "agent_sessions",
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
237
|
+
"api": {
|
|
238
|
+
"include": [
|
|
239
|
+
"list",
|
|
240
|
+
"get"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"mcp": {
|
|
244
|
+
"include": [
|
|
245
|
+
"list",
|
|
246
|
+
"get"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"cli": true,
|
|
250
|
+
"tenantScoped": {
|
|
251
|
+
"mode": "optional"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"extends": "SmrtObject",
|
|
255
|
+
"exportName": "AgentSession",
|
|
256
|
+
"collectionExportName": "AgentSessionCollection",
|
|
257
|
+
"validationRules": [
|
|
258
|
+
{
|
|
259
|
+
"field": "agentId",
|
|
260
|
+
"rule": "required",
|
|
261
|
+
"fieldType": "text"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"field": "participantProfileId",
|
|
265
|
+
"rule": "required",
|
|
266
|
+
"fieldType": "crossPackageRef"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"field": "status",
|
|
270
|
+
"rule": "required",
|
|
271
|
+
"fieldType": "text"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"schema": {
|
|
275
|
+
"tableName": "agent_sessions",
|
|
276
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"agent_sessions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"agent_id\" TEXT NOT NULL DEFAULT '',\n \"participant_profile_id\" UUID NOT NULL,\n \"chat_room_id\" UUID,\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"allowed_tools\" TEXT DEFAULT '[]',\n \"session_context\" TEXT DEFAULT '{}',\n \"system_prompt\" TEXT DEFAULT '',\n \"message_count\" INTEGER DEFAULT 0,\n \"total_tokens_used\" INTEGER DEFAULT 0,\n \"max_tokens\" INTEGER DEFAULT 0,\n \"max_messages\" INTEGER DEFAULT 0,\n \"last_message_at\" TIMESTAMP,\n \"expires_at\" TIMESTAMP,\n \"closed_at\" TIMESTAMP\n);",
|
|
277
|
+
"columns": {
|
|
278
|
+
"id": {
|
|
279
|
+
"type": "UUID",
|
|
280
|
+
"primaryKey": true,
|
|
281
|
+
"referenceKind": "id",
|
|
282
|
+
"notNull": true
|
|
283
|
+
},
|
|
284
|
+
"slug": {
|
|
285
|
+
"type": "TEXT",
|
|
286
|
+
"notNull": true
|
|
287
|
+
},
|
|
288
|
+
"context": {
|
|
289
|
+
"type": "TEXT",
|
|
290
|
+
"notNull": true,
|
|
291
|
+
"default": ""
|
|
292
|
+
},
|
|
133
293
|
"created_at": {
|
|
134
294
|
"type": "TIMESTAMP",
|
|
135
295
|
"notNull": true,
|
|
@@ -139,6 +299,93 @@
|
|
|
139
299
|
"type": "TIMESTAMP",
|
|
140
300
|
"notNull": true,
|
|
141
301
|
"default": "current_timestamp"
|
|
302
|
+
},
|
|
303
|
+
"tenant_id": {
|
|
304
|
+
"type": "UUID",
|
|
305
|
+
"referenceKind": "tenantId",
|
|
306
|
+
"notNull": false,
|
|
307
|
+
"unique": false
|
|
308
|
+
},
|
|
309
|
+
"agent_id": {
|
|
310
|
+
"type": "TEXT",
|
|
311
|
+
"notNull": true,
|
|
312
|
+
"unique": false,
|
|
313
|
+
"default": ""
|
|
314
|
+
},
|
|
315
|
+
"participant_profile_id": {
|
|
316
|
+
"type": "UUID",
|
|
317
|
+
"referenceKind": "crossPackageRef",
|
|
318
|
+
"notNull": true,
|
|
319
|
+
"unique": false
|
|
320
|
+
},
|
|
321
|
+
"chat_room_id": {
|
|
322
|
+
"type": "UUID",
|
|
323
|
+
"referenceKind": "foreignKey",
|
|
324
|
+
"notNull": false,
|
|
325
|
+
"unique": false
|
|
326
|
+
},
|
|
327
|
+
"status": {
|
|
328
|
+
"type": "TEXT",
|
|
329
|
+
"notNull": true,
|
|
330
|
+
"unique": false,
|
|
331
|
+
"default": "active"
|
|
332
|
+
},
|
|
333
|
+
"allowed_tools": {
|
|
334
|
+
"type": "TEXT",
|
|
335
|
+
"notNull": false,
|
|
336
|
+
"unique": false,
|
|
337
|
+
"default": "[]"
|
|
338
|
+
},
|
|
339
|
+
"session_context": {
|
|
340
|
+
"type": "TEXT",
|
|
341
|
+
"notNull": false,
|
|
342
|
+
"unique": false,
|
|
343
|
+
"default": "{}"
|
|
344
|
+
},
|
|
345
|
+
"system_prompt": {
|
|
346
|
+
"type": "TEXT",
|
|
347
|
+
"notNull": false,
|
|
348
|
+
"unique": false,
|
|
349
|
+
"default": ""
|
|
350
|
+
},
|
|
351
|
+
"message_count": {
|
|
352
|
+
"type": "INTEGER",
|
|
353
|
+
"notNull": false,
|
|
354
|
+
"unique": false,
|
|
355
|
+
"default": 0
|
|
356
|
+
},
|
|
357
|
+
"total_tokens_used": {
|
|
358
|
+
"type": "INTEGER",
|
|
359
|
+
"notNull": false,
|
|
360
|
+
"unique": false,
|
|
361
|
+
"default": 0
|
|
362
|
+
},
|
|
363
|
+
"max_tokens": {
|
|
364
|
+
"type": "INTEGER",
|
|
365
|
+
"notNull": false,
|
|
366
|
+
"unique": false,
|
|
367
|
+
"default": 0
|
|
368
|
+
},
|
|
369
|
+
"max_messages": {
|
|
370
|
+
"type": "INTEGER",
|
|
371
|
+
"notNull": false,
|
|
372
|
+
"unique": false,
|
|
373
|
+
"default": 0
|
|
374
|
+
},
|
|
375
|
+
"last_message_at": {
|
|
376
|
+
"type": "TIMESTAMP",
|
|
377
|
+
"notNull": false,
|
|
378
|
+
"unique": false
|
|
379
|
+
},
|
|
380
|
+
"expires_at": {
|
|
381
|
+
"type": "TIMESTAMP",
|
|
382
|
+
"notNull": false,
|
|
383
|
+
"unique": false
|
|
384
|
+
},
|
|
385
|
+
"closed_at": {
|
|
386
|
+
"type": "TIMESTAMP",
|
|
387
|
+
"notNull": false,
|
|
388
|
+
"unique": false
|
|
142
389
|
}
|
|
143
390
|
},
|
|
144
391
|
"indexes": [
|
|
@@ -157,356 +404,308 @@
|
|
|
157
404
|
"unique": true
|
|
158
405
|
}
|
|
159
406
|
],
|
|
160
|
-
"version": "
|
|
407
|
+
"version": "9de59339"
|
|
161
408
|
}
|
|
162
409
|
},
|
|
163
|
-
"@happyvertical/smrt-chat:
|
|
164
|
-
"name": "
|
|
165
|
-
"className": "
|
|
166
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
410
|
+
"@happyvertical/smrt-chat:ChatMessage": {
|
|
411
|
+
"name": "chatmessage",
|
|
412
|
+
"className": "ChatMessage",
|
|
413
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatMessage",
|
|
167
414
|
"collection": "chatmessages",
|
|
168
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
415
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/ChatMessage.ts",
|
|
169
416
|
"packageName": "@happyvertical/smrt-chat",
|
|
170
|
-
"fields": {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
{
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"name": "options",
|
|
188
|
-
"type": "object",
|
|
189
|
-
"optional": true
|
|
190
|
-
}
|
|
191
|
-
],
|
|
192
|
-
"returnType": "Promise<ChatMessage[]>",
|
|
193
|
-
"isStatic": false,
|
|
194
|
-
"isPublic": true
|
|
195
|
-
},
|
|
196
|
-
"getByThread": {
|
|
197
|
-
"name": "getByThread",
|
|
198
|
-
"async": true,
|
|
199
|
-
"parameters": [
|
|
200
|
-
{
|
|
201
|
-
"name": "threadId",
|
|
202
|
-
"type": "string",
|
|
203
|
-
"optional": false
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"name": "tenantId",
|
|
207
|
-
"type": "string",
|
|
208
|
-
"optional": false
|
|
417
|
+
"fields": {
|
|
418
|
+
"tenantId": {
|
|
419
|
+
"type": "text",
|
|
420
|
+
"required": true,
|
|
421
|
+
"_meta": {
|
|
422
|
+
"sqlType": "UUID",
|
|
423
|
+
"__tenancy": {
|
|
424
|
+
"isTenantIdField": true,
|
|
425
|
+
"autoFilter": true,
|
|
426
|
+
"required": true,
|
|
427
|
+
"autoPopulate": true,
|
|
428
|
+
"nullable": false,
|
|
429
|
+
"mode": "required",
|
|
430
|
+
"field": "tenantId",
|
|
431
|
+
"allowSuperAdminBypass": false
|
|
209
432
|
}
|
|
210
|
-
|
|
211
|
-
"returnType": "Promise<ChatMessage[]>",
|
|
212
|
-
"isStatic": false,
|
|
213
|
-
"isPublic": true
|
|
433
|
+
}
|
|
214
434
|
},
|
|
215
|
-
"
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
"optional": false
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "tenantId",
|
|
226
|
-
"type": "string",
|
|
227
|
-
"optional": false
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"returnType": "Promise<ChatMessage[]>",
|
|
231
|
-
"isStatic": false,
|
|
232
|
-
"isPublic": true
|
|
435
|
+
"roomId": {
|
|
436
|
+
"type": "foreignKey",
|
|
437
|
+
"required": true,
|
|
438
|
+
"related": "ChatRoom",
|
|
439
|
+
"_meta": {
|
|
440
|
+
"required": true
|
|
441
|
+
}
|
|
233
442
|
},
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
"
|
|
237
|
-
"
|
|
238
|
-
{
|
|
239
|
-
"name": "filters",
|
|
240
|
-
"type": "any",
|
|
241
|
-
"optional": false
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"returnType": "Promise<ChatMessage[]>",
|
|
245
|
-
"isStatic": false,
|
|
246
|
-
"isPublic": true
|
|
443
|
+
"threadId": {
|
|
444
|
+
"type": "foreignKey",
|
|
445
|
+
"required": false,
|
|
446
|
+
"related": "ChatThread"
|
|
247
447
|
},
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
"
|
|
448
|
+
"senderProfileId": {
|
|
449
|
+
"type": "crossPackageRef",
|
|
450
|
+
"required": true,
|
|
451
|
+
"related": "@happyvertical/smrt-profiles:Profile"
|
|
452
|
+
},
|
|
453
|
+
"agentSessionId": {
|
|
454
|
+
"type": "foreignKey",
|
|
455
|
+
"required": false,
|
|
456
|
+
"related": "AgentSession"
|
|
457
|
+
},
|
|
458
|
+
"content": {
|
|
459
|
+
"type": "text",
|
|
460
|
+
"required": false,
|
|
461
|
+
"default": ""
|
|
462
|
+
},
|
|
463
|
+
"messageType": {
|
|
464
|
+
"type": "text",
|
|
465
|
+
"required": true,
|
|
466
|
+
"default": "text",
|
|
467
|
+
"_meta": {
|
|
468
|
+
"required": true
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"role": {
|
|
472
|
+
"type": "text",
|
|
473
|
+
"required": true,
|
|
474
|
+
"default": "user",
|
|
475
|
+
"_meta": {
|
|
476
|
+
"required": true
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"isEdited": {
|
|
480
|
+
"type": "boolean",
|
|
481
|
+
"required": false,
|
|
482
|
+
"default": false
|
|
483
|
+
},
|
|
484
|
+
"editedAt": {
|
|
485
|
+
"type": "datetime",
|
|
486
|
+
"required": false
|
|
487
|
+
},
|
|
488
|
+
"isDeleted": {
|
|
489
|
+
"type": "boolean",
|
|
490
|
+
"required": false,
|
|
491
|
+
"default": false
|
|
492
|
+
},
|
|
493
|
+
"replyToMessageId": {
|
|
494
|
+
"type": "foreignKey",
|
|
495
|
+
"required": false,
|
|
496
|
+
"related": "ChatMessage"
|
|
497
|
+
},
|
|
498
|
+
"metadata": {
|
|
499
|
+
"type": "text",
|
|
500
|
+
"required": false,
|
|
501
|
+
"default": "{}"
|
|
502
|
+
},
|
|
503
|
+
"toolCallData": {
|
|
504
|
+
"type": "text",
|
|
505
|
+
"required": false
|
|
506
|
+
},
|
|
507
|
+
"attachments": {
|
|
508
|
+
"type": "text",
|
|
509
|
+
"required": false,
|
|
510
|
+
"default": "[]"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"methods": {
|
|
514
|
+
"getAttachments": {
|
|
515
|
+
"name": "getAttachments",
|
|
516
|
+
"async": false,
|
|
517
|
+
"parameters": [],
|
|
518
|
+
"returnType": "Array<object>",
|
|
519
|
+
"isStatic": false,
|
|
520
|
+
"isPublic": true
|
|
521
|
+
},
|
|
522
|
+
"setAttachments": {
|
|
523
|
+
"name": "setAttachments",
|
|
524
|
+
"async": false,
|
|
251
525
|
"parameters": [
|
|
252
526
|
{
|
|
253
|
-
"name": "
|
|
254
|
-
"type": "
|
|
255
|
-
"optional": false
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"name": "tenantId",
|
|
259
|
-
"type": "string",
|
|
260
|
-
"optional": false
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"name": "lastReadMessageId",
|
|
264
|
-
"type": "string | null",
|
|
527
|
+
"name": "items",
|
|
528
|
+
"type": "Array<object>",
|
|
265
529
|
"optional": false
|
|
266
530
|
}
|
|
267
531
|
],
|
|
268
|
-
"returnType": "
|
|
532
|
+
"returnType": "void",
|
|
269
533
|
"isStatic": false,
|
|
270
534
|
"isPublic": true
|
|
271
535
|
},
|
|
272
|
-
"
|
|
273
|
-
"name": "
|
|
274
|
-
"async":
|
|
536
|
+
"getMetadata": {
|
|
537
|
+
"name": "getMetadata",
|
|
538
|
+
"async": false,
|
|
539
|
+
"parameters": [],
|
|
540
|
+
"returnType": "Record<string>",
|
|
541
|
+
"isStatic": false,
|
|
542
|
+
"isPublic": true
|
|
543
|
+
},
|
|
544
|
+
"setMetadata": {
|
|
545
|
+
"name": "setMetadata",
|
|
546
|
+
"async": false,
|
|
275
547
|
"parameters": [
|
|
276
548
|
{
|
|
277
|
-
"name": "
|
|
278
|
-
"type": "string
|
|
279
|
-
"optional": false
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"name": "tenantId",
|
|
283
|
-
"type": "string",
|
|
549
|
+
"name": "data",
|
|
550
|
+
"type": "Record<string>",
|
|
284
551
|
"optional": false
|
|
285
552
|
}
|
|
286
553
|
],
|
|
287
|
-
"returnType": "
|
|
554
|
+
"returnType": "void",
|
|
288
555
|
"isStatic": false,
|
|
289
556
|
"isPublic": true
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
"decoratorConfig": {
|
|
293
|
-
"tableName": "chat_messages"
|
|
294
|
-
},
|
|
295
|
-
"extends": "SmrtCollection",
|
|
296
|
-
"extendsTypeArg": "ChatMessage",
|
|
297
|
-
"exportName": "ChatMessageCollection",
|
|
298
|
-
"collectionExportName": "ChatMessageCollectionCollection",
|
|
299
|
-
"schema": {
|
|
300
|
-
"tableName": "chat_messages",
|
|
301
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_messages\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
302
|
-
"columns": {
|
|
303
|
-
"id": {
|
|
304
|
-
"type": "UUID",
|
|
305
|
-
"primaryKey": true,
|
|
306
|
-
"referenceKind": "id",
|
|
307
|
-
"notNull": true
|
|
308
|
-
},
|
|
309
|
-
"slug": {
|
|
310
|
-
"type": "TEXT",
|
|
311
|
-
"notNull": true
|
|
312
|
-
},
|
|
313
|
-
"context": {
|
|
314
|
-
"type": "TEXT",
|
|
315
|
-
"notNull": true,
|
|
316
|
-
"default": ""
|
|
317
|
-
},
|
|
318
|
-
"created_at": {
|
|
319
|
-
"type": "TIMESTAMP",
|
|
320
|
-
"notNull": true,
|
|
321
|
-
"default": "current_timestamp"
|
|
322
|
-
},
|
|
323
|
-
"updated_at": {
|
|
324
|
-
"type": "TIMESTAMP",
|
|
325
|
-
"notNull": true,
|
|
326
|
-
"default": "current_timestamp"
|
|
327
|
-
}
|
|
328
557
|
},
|
|
329
|
-
"
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
"context"
|
|
341
|
-
],
|
|
342
|
-
"unique": true
|
|
343
|
-
}
|
|
344
|
-
],
|
|
345
|
-
"version": "13b2dccb"
|
|
346
|
-
}
|
|
347
|
-
},
|
|
348
|
-
"@happyvertical/smrt-chat:ChatParticipantCollection": {
|
|
349
|
-
"name": "chatparticipantcollection",
|
|
350
|
-
"className": "ChatParticipantCollection",
|
|
351
|
-
"qualifiedName": "@happyvertical/smrt-chat:ChatParticipantCollection",
|
|
352
|
-
"collection": "chatparticipants",
|
|
353
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatParticipantCollection.ts",
|
|
354
|
-
"packageName": "@happyvertical/smrt-chat",
|
|
355
|
-
"fields": {},
|
|
356
|
-
"methods": {
|
|
357
|
-
"getByRoom": {
|
|
358
|
-
"name": "getByRoom",
|
|
359
|
-
"async": true,
|
|
558
|
+
"getToolCallData": {
|
|
559
|
+
"name": "getToolCallData",
|
|
560
|
+
"async": false,
|
|
561
|
+
"parameters": [],
|
|
562
|
+
"returnType": "Record<string> | null",
|
|
563
|
+
"isStatic": false,
|
|
564
|
+
"isPublic": true
|
|
565
|
+
},
|
|
566
|
+
"setToolCallData": {
|
|
567
|
+
"name": "setToolCallData",
|
|
568
|
+
"async": false,
|
|
360
569
|
"parameters": [
|
|
361
570
|
{
|
|
362
|
-
"name": "
|
|
363
|
-
"type": "string",
|
|
571
|
+
"name": "data",
|
|
572
|
+
"type": "Record<string> | null",
|
|
364
573
|
"optional": false
|
|
365
574
|
}
|
|
366
575
|
],
|
|
367
|
-
"returnType": "
|
|
576
|
+
"returnType": "void",
|
|
368
577
|
"isStatic": false,
|
|
369
578
|
"isPublic": true
|
|
370
579
|
},
|
|
371
|
-
"
|
|
372
|
-
"name": "
|
|
580
|
+
"hasAttachments": {
|
|
581
|
+
"name": "hasAttachments",
|
|
582
|
+
"async": false,
|
|
583
|
+
"parameters": [],
|
|
584
|
+
"returnType": "boolean",
|
|
585
|
+
"isStatic": false,
|
|
586
|
+
"isPublic": true
|
|
587
|
+
},
|
|
588
|
+
"isToolCall": {
|
|
589
|
+
"name": "isToolCall",
|
|
590
|
+
"async": false,
|
|
591
|
+
"parameters": [],
|
|
592
|
+
"returnType": "boolean",
|
|
593
|
+
"isStatic": false,
|
|
594
|
+
"isPublic": true
|
|
595
|
+
},
|
|
596
|
+
"isToolResult": {
|
|
597
|
+
"name": "isToolResult",
|
|
598
|
+
"async": false,
|
|
599
|
+
"parameters": [],
|
|
600
|
+
"returnType": "boolean",
|
|
601
|
+
"isStatic": false,
|
|
602
|
+
"isPublic": true
|
|
603
|
+
},
|
|
604
|
+
"isFromAgent": {
|
|
605
|
+
"name": "isFromAgent",
|
|
606
|
+
"async": false,
|
|
607
|
+
"parameters": [],
|
|
608
|
+
"returnType": "boolean",
|
|
609
|
+
"isStatic": false,
|
|
610
|
+
"isPublic": true
|
|
611
|
+
},
|
|
612
|
+
"isSystemMessage": {
|
|
613
|
+
"name": "isSystemMessage",
|
|
614
|
+
"async": false,
|
|
615
|
+
"parameters": [],
|
|
616
|
+
"returnType": "boolean",
|
|
617
|
+
"isStatic": false,
|
|
618
|
+
"isPublic": true
|
|
619
|
+
},
|
|
620
|
+
"edit": {
|
|
621
|
+
"name": "edit",
|
|
373
622
|
"async": true,
|
|
374
623
|
"parameters": [
|
|
375
624
|
{
|
|
376
|
-
"name": "
|
|
625
|
+
"name": "newContent",
|
|
377
626
|
"type": "string",
|
|
378
627
|
"optional": false
|
|
379
628
|
}
|
|
380
629
|
],
|
|
381
|
-
"returnType": "Promise<
|
|
630
|
+
"returnType": "Promise<void>",
|
|
382
631
|
"isStatic": false,
|
|
383
632
|
"isPublic": true
|
|
384
633
|
},
|
|
385
|
-
"
|
|
386
|
-
"name": "
|
|
634
|
+
"softDelete": {
|
|
635
|
+
"name": "softDelete",
|
|
387
636
|
"async": true,
|
|
388
|
-
"parameters": [
|
|
389
|
-
|
|
390
|
-
"name": "roomId",
|
|
391
|
-
"type": "string",
|
|
392
|
-
"optional": false
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"name": "profileId",
|
|
396
|
-
"type": "string",
|
|
397
|
-
"optional": false
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
"name": "tenantId",
|
|
401
|
-
"type": "string",
|
|
402
|
-
"optional": true
|
|
403
|
-
}
|
|
404
|
-
],
|
|
405
|
-
"returnType": "Promise<ChatParticipant | null>",
|
|
637
|
+
"parameters": [],
|
|
638
|
+
"returnType": "Promise<void>",
|
|
406
639
|
"isStatic": false,
|
|
407
640
|
"isPublic": true
|
|
408
641
|
},
|
|
409
|
-
"
|
|
410
|
-
"name": "
|
|
411
|
-
"async":
|
|
642
|
+
"getPreview": {
|
|
643
|
+
"name": "getPreview",
|
|
644
|
+
"async": false,
|
|
412
645
|
"parameters": [
|
|
413
646
|
{
|
|
414
|
-
"name": "
|
|
415
|
-
"type": "
|
|
416
|
-
"optional":
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
"name": "profileId",
|
|
420
|
-
"type": "string",
|
|
421
|
-
"optional": false
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
"name": "tenantId",
|
|
425
|
-
"type": "string",
|
|
426
|
-
"optional": false
|
|
647
|
+
"name": "maxLength",
|
|
648
|
+
"type": "any",
|
|
649
|
+
"optional": true
|
|
427
650
|
}
|
|
428
651
|
],
|
|
429
|
-
"returnType": "
|
|
652
|
+
"returnType": "string",
|
|
430
653
|
"isStatic": false,
|
|
431
654
|
"isPublic": true
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"decoratorConfig": {
|
|
658
|
+
"tableName": "chat_messages",
|
|
659
|
+
"api": {
|
|
660
|
+
"include": [
|
|
661
|
+
"list",
|
|
662
|
+
"get"
|
|
663
|
+
]
|
|
432
664
|
},
|
|
433
|
-
"
|
|
434
|
-
"
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
"name": "roomId",
|
|
439
|
-
"type": "string",
|
|
440
|
-
"optional": false
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"name": "profileId",
|
|
444
|
-
"type": "string",
|
|
445
|
-
"optional": false
|
|
446
|
-
},
|
|
447
|
-
{
|
|
448
|
-
"name": "tenantId",
|
|
449
|
-
"type": "string",
|
|
450
|
-
"optional": false
|
|
451
|
-
}
|
|
452
|
-
],
|
|
453
|
-
"returnType": "Promise<boolean>",
|
|
454
|
-
"isStatic": false,
|
|
455
|
-
"isPublic": true
|
|
665
|
+
"mcp": {
|
|
666
|
+
"include": [
|
|
667
|
+
"list",
|
|
668
|
+
"get"
|
|
669
|
+
]
|
|
456
670
|
},
|
|
457
|
-
"
|
|
458
|
-
|
|
459
|
-
"
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
"
|
|
468
|
-
"
|
|
469
|
-
"
|
|
671
|
+
"cli": true,
|
|
672
|
+
"tenantScoped": {
|
|
673
|
+
"mode": "required"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
"extends": "SmrtObject",
|
|
677
|
+
"exportName": "ChatMessage",
|
|
678
|
+
"collectionExportName": "ChatMessageCollection",
|
|
679
|
+
"validationRules": [
|
|
680
|
+
{
|
|
681
|
+
"field": "tenantId",
|
|
682
|
+
"rule": "required",
|
|
683
|
+
"fieldType": "text"
|
|
470
684
|
},
|
|
471
|
-
|
|
472
|
-
"
|
|
473
|
-
"
|
|
474
|
-
"
|
|
475
|
-
{
|
|
476
|
-
"name": "roomId",
|
|
477
|
-
"type": "string",
|
|
478
|
-
"optional": false
|
|
479
|
-
}
|
|
480
|
-
],
|
|
481
|
-
"returnType": "Promise<ChatParticipant[]>",
|
|
482
|
-
"isStatic": false,
|
|
483
|
-
"isPublic": true
|
|
685
|
+
{
|
|
686
|
+
"field": "roomId",
|
|
687
|
+
"rule": "required",
|
|
688
|
+
"fieldType": "foreignKey"
|
|
484
689
|
},
|
|
485
|
-
|
|
486
|
-
"
|
|
487
|
-
"
|
|
488
|
-
"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
"
|
|
497
|
-
"
|
|
690
|
+
{
|
|
691
|
+
"field": "senderProfileId",
|
|
692
|
+
"rule": "required",
|
|
693
|
+
"fieldType": "crossPackageRef"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"field": "messageType",
|
|
697
|
+
"rule": "required",
|
|
698
|
+
"fieldType": "text"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"field": "role",
|
|
702
|
+
"rule": "required",
|
|
703
|
+
"fieldType": "text"
|
|
498
704
|
}
|
|
499
|
-
|
|
500
|
-
"decoratorConfig": {
|
|
501
|
-
"tableName": "chat_participants"
|
|
502
|
-
},
|
|
503
|
-
"extends": "SmrtCollection",
|
|
504
|
-
"extendsTypeArg": "ChatParticipant",
|
|
505
|
-
"exportName": "ChatParticipantCollection",
|
|
506
|
-
"collectionExportName": "ChatParticipantCollectionCollection",
|
|
705
|
+
],
|
|
507
706
|
"schema": {
|
|
508
|
-
"tableName": "
|
|
509
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
707
|
+
"tableName": "chat_messages",
|
|
708
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_messages\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"room_id\" UUID NOT NULL,\n \"thread_id\" UUID,\n \"sender_profile_id\" UUID NOT NULL,\n \"agent_session_id\" UUID,\n \"content\" TEXT DEFAULT '',\n \"message_type\" TEXT NOT NULL DEFAULT 'text',\n \"role\" TEXT NOT NULL DEFAULT 'user',\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"edited_at\" TIMESTAMP,\n \"is_deleted\" BOOLEAN DEFAULT FALSE,\n \"reply_to_message_id\" UUID,\n \"metadata\" TEXT DEFAULT '{}',\n \"tool_call_data\" TEXT,\n \"attachments\" TEXT DEFAULT '[]'\n);",
|
|
510
709
|
"columns": {
|
|
511
710
|
"id": {
|
|
512
711
|
"type": "UUID",
|
|
@@ -532,17 +731,105 @@
|
|
|
532
731
|
"type": "TIMESTAMP",
|
|
533
732
|
"notNull": true,
|
|
534
733
|
"default": "current_timestamp"
|
|
734
|
+
},
|
|
735
|
+
"tenant_id": {
|
|
736
|
+
"type": "UUID",
|
|
737
|
+
"referenceKind": "tenantId",
|
|
738
|
+
"notNull": true,
|
|
739
|
+
"unique": false
|
|
740
|
+
},
|
|
741
|
+
"room_id": {
|
|
742
|
+
"type": "UUID",
|
|
743
|
+
"referenceKind": "foreignKey",
|
|
744
|
+
"notNull": true,
|
|
745
|
+
"unique": false
|
|
746
|
+
},
|
|
747
|
+
"thread_id": {
|
|
748
|
+
"type": "UUID",
|
|
749
|
+
"referenceKind": "foreignKey",
|
|
750
|
+
"notNull": false,
|
|
751
|
+
"unique": false
|
|
752
|
+
},
|
|
753
|
+
"sender_profile_id": {
|
|
754
|
+
"type": "UUID",
|
|
755
|
+
"referenceKind": "crossPackageRef",
|
|
756
|
+
"notNull": true,
|
|
757
|
+
"unique": false
|
|
758
|
+
},
|
|
759
|
+
"agent_session_id": {
|
|
760
|
+
"type": "UUID",
|
|
761
|
+
"referenceKind": "foreignKey",
|
|
762
|
+
"notNull": false,
|
|
763
|
+
"unique": false
|
|
764
|
+
},
|
|
765
|
+
"content": {
|
|
766
|
+
"type": "TEXT",
|
|
767
|
+
"notNull": false,
|
|
768
|
+
"unique": false,
|
|
769
|
+
"default": ""
|
|
770
|
+
},
|
|
771
|
+
"message_type": {
|
|
772
|
+
"type": "TEXT",
|
|
773
|
+
"notNull": true,
|
|
774
|
+
"unique": false,
|
|
775
|
+
"default": "text"
|
|
776
|
+
},
|
|
777
|
+
"role": {
|
|
778
|
+
"type": "TEXT",
|
|
779
|
+
"notNull": true,
|
|
780
|
+
"unique": false,
|
|
781
|
+
"default": "user"
|
|
782
|
+
},
|
|
783
|
+
"is_edited": {
|
|
784
|
+
"type": "BOOLEAN",
|
|
785
|
+
"notNull": false,
|
|
786
|
+
"unique": false,
|
|
787
|
+
"default": false
|
|
788
|
+
},
|
|
789
|
+
"edited_at": {
|
|
790
|
+
"type": "TIMESTAMP",
|
|
791
|
+
"notNull": false,
|
|
792
|
+
"unique": false
|
|
793
|
+
},
|
|
794
|
+
"is_deleted": {
|
|
795
|
+
"type": "BOOLEAN",
|
|
796
|
+
"notNull": false,
|
|
797
|
+
"unique": false,
|
|
798
|
+
"default": false
|
|
799
|
+
},
|
|
800
|
+
"reply_to_message_id": {
|
|
801
|
+
"type": "UUID",
|
|
802
|
+
"referenceKind": "foreignKey",
|
|
803
|
+
"notNull": false,
|
|
804
|
+
"unique": false
|
|
805
|
+
},
|
|
806
|
+
"metadata": {
|
|
807
|
+
"type": "TEXT",
|
|
808
|
+
"notNull": false,
|
|
809
|
+
"unique": false,
|
|
810
|
+
"default": "{}"
|
|
811
|
+
},
|
|
812
|
+
"tool_call_data": {
|
|
813
|
+
"type": "TEXT",
|
|
814
|
+
"notNull": false,
|
|
815
|
+
"unique": false
|
|
816
|
+
},
|
|
817
|
+
"attachments": {
|
|
818
|
+
"type": "TEXT",
|
|
819
|
+
"notNull": false,
|
|
820
|
+
"unique": false,
|
|
821
|
+
"default": "[]"
|
|
535
822
|
}
|
|
536
823
|
},
|
|
537
824
|
"indexes": [
|
|
538
825
|
{
|
|
539
|
-
"name": "
|
|
826
|
+
"name": "chat_messages_id_idx",
|
|
540
827
|
"columns": [
|
|
541
828
|
"id"
|
|
542
829
|
]
|
|
543
830
|
},
|
|
544
831
|
{
|
|
545
|
-
"name": "
|
|
832
|
+
"name": "chat_messages_slug_context_idx",
|
|
546
833
|
"columns": [
|
|
547
834
|
"slug",
|
|
548
835
|
"context"
|
|
@@ -550,20 +837,127 @@
|
|
|
550
837
|
"unique": true
|
|
551
838
|
}
|
|
552
839
|
],
|
|
553
|
-
"version": "
|
|
840
|
+
"version": "7469514e"
|
|
554
841
|
}
|
|
555
842
|
},
|
|
556
|
-
"@happyvertical/smrt-chat:
|
|
557
|
-
"name": "
|
|
558
|
-
"className": "
|
|
559
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
560
|
-
"collection": "
|
|
561
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
843
|
+
"@happyvertical/smrt-chat:ChatParticipant": {
|
|
844
|
+
"name": "chatparticipant",
|
|
845
|
+
"className": "ChatParticipant",
|
|
846
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatParticipant",
|
|
847
|
+
"collection": "chatparticipants",
|
|
848
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/ChatParticipant.ts",
|
|
562
849
|
"packageName": "@happyvertical/smrt-chat",
|
|
563
|
-
"fields": {
|
|
850
|
+
"fields": {
|
|
851
|
+
"tenantId": {
|
|
852
|
+
"type": "text",
|
|
853
|
+
"required": true,
|
|
854
|
+
"_meta": {
|
|
855
|
+
"sqlType": "UUID",
|
|
856
|
+
"__tenancy": {
|
|
857
|
+
"isTenantIdField": true,
|
|
858
|
+
"autoFilter": true,
|
|
859
|
+
"required": true,
|
|
860
|
+
"autoPopulate": true,
|
|
861
|
+
"nullable": false,
|
|
862
|
+
"mode": "required",
|
|
863
|
+
"field": "tenantId",
|
|
864
|
+
"allowSuperAdminBypass": false
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
"roomId": {
|
|
869
|
+
"type": "foreignKey",
|
|
870
|
+
"required": true,
|
|
871
|
+
"related": "ChatRoom",
|
|
872
|
+
"_meta": {
|
|
873
|
+
"required": true
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
"profileId": {
|
|
877
|
+
"type": "crossPackageRef",
|
|
878
|
+
"required": true,
|
|
879
|
+
"related": "@happyvertical/smrt-profiles:Profile"
|
|
880
|
+
},
|
|
881
|
+
"role": {
|
|
882
|
+
"type": "text",
|
|
883
|
+
"required": true,
|
|
884
|
+
"default": "member",
|
|
885
|
+
"_meta": {
|
|
886
|
+
"required": true
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"status": {
|
|
890
|
+
"type": "text",
|
|
891
|
+
"required": true,
|
|
892
|
+
"default": "active",
|
|
893
|
+
"_meta": {
|
|
894
|
+
"required": true
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"onlineStatus": {
|
|
898
|
+
"type": "text",
|
|
899
|
+
"required": true,
|
|
900
|
+
"default": "offline",
|
|
901
|
+
"_meta": {
|
|
902
|
+
"required": true
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
"lastReadMessageId": {
|
|
906
|
+
"type": "foreignKey",
|
|
907
|
+
"required": false,
|
|
908
|
+
"related": "ChatMessage"
|
|
909
|
+
},
|
|
910
|
+
"lastSeenAt": {
|
|
911
|
+
"type": "datetime",
|
|
912
|
+
"required": false
|
|
913
|
+
},
|
|
914
|
+
"joinedAt": {
|
|
915
|
+
"type": "datetime",
|
|
916
|
+
"required": false
|
|
917
|
+
},
|
|
918
|
+
"nickname": {
|
|
919
|
+
"type": "text",
|
|
920
|
+
"required": false,
|
|
921
|
+
"default": ""
|
|
922
|
+
},
|
|
923
|
+
"isMuted": {
|
|
924
|
+
"type": "boolean",
|
|
925
|
+
"required": false,
|
|
926
|
+
"default": false
|
|
927
|
+
},
|
|
928
|
+
"isPinned": {
|
|
929
|
+
"type": "boolean",
|
|
930
|
+
"required": false,
|
|
931
|
+
"default": false
|
|
932
|
+
}
|
|
933
|
+
},
|
|
564
934
|
"methods": {
|
|
565
|
-
"
|
|
566
|
-
"name": "
|
|
935
|
+
"isActive": {
|
|
936
|
+
"name": "isActive",
|
|
937
|
+
"async": false,
|
|
938
|
+
"parameters": [],
|
|
939
|
+
"returnType": "boolean",
|
|
940
|
+
"isStatic": false,
|
|
941
|
+
"isPublic": true
|
|
942
|
+
},
|
|
943
|
+
"isOwner": {
|
|
944
|
+
"name": "isOwner",
|
|
945
|
+
"async": false,
|
|
946
|
+
"parameters": [],
|
|
947
|
+
"returnType": "boolean",
|
|
948
|
+
"isStatic": false,
|
|
949
|
+
"isPublic": true
|
|
950
|
+
},
|
|
951
|
+
"isAdmin": {
|
|
952
|
+
"name": "isAdmin",
|
|
953
|
+
"async": false,
|
|
954
|
+
"parameters": [],
|
|
955
|
+
"returnType": "boolean",
|
|
956
|
+
"isStatic": false,
|
|
957
|
+
"isPublic": true
|
|
958
|
+
},
|
|
959
|
+
"markRead": {
|
|
960
|
+
"name": "markRead",
|
|
567
961
|
"async": true,
|
|
568
962
|
"parameters": [
|
|
569
963
|
{
|
|
@@ -572,64 +966,90 @@
|
|
|
572
966
|
"optional": false
|
|
573
967
|
}
|
|
574
968
|
],
|
|
575
|
-
"returnType": "Promise<
|
|
969
|
+
"returnType": "Promise<void>",
|
|
576
970
|
"isStatic": false,
|
|
577
971
|
"isPublic": true
|
|
578
972
|
},
|
|
579
|
-
"
|
|
580
|
-
"name": "
|
|
973
|
+
"leave": {
|
|
974
|
+
"name": "leave",
|
|
581
975
|
"async": true,
|
|
582
|
-
"parameters": [
|
|
583
|
-
|
|
584
|
-
"name": "messageId",
|
|
585
|
-
"type": "string",
|
|
586
|
-
"optional": false
|
|
587
|
-
}
|
|
588
|
-
],
|
|
589
|
-
"returnType": "Promise<Map<string, object>>",
|
|
976
|
+
"parameters": [],
|
|
977
|
+
"returnType": "Promise<void>",
|
|
590
978
|
"isStatic": false,
|
|
591
979
|
"isPublic": true
|
|
592
980
|
},
|
|
593
|
-
"
|
|
594
|
-
"name": "
|
|
981
|
+
"setOnline": {
|
|
982
|
+
"name": "setOnline",
|
|
595
983
|
"async": true,
|
|
596
984
|
"parameters": [
|
|
597
985
|
{
|
|
598
|
-
"name": "
|
|
599
|
-
"type": "
|
|
600
|
-
"optional": false
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"name": "profileId",
|
|
604
|
-
"type": "string",
|
|
605
|
-
"optional": false
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"name": "emoji",
|
|
609
|
-
"type": "string",
|
|
610
|
-
"optional": false
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
"name": "tenantId",
|
|
614
|
-
"type": "string",
|
|
986
|
+
"name": "status",
|
|
987
|
+
"type": "OnlineStatus",
|
|
615
988
|
"optional": false
|
|
616
989
|
}
|
|
617
990
|
],
|
|
618
|
-
"returnType": "Promise<
|
|
991
|
+
"returnType": "Promise<void>",
|
|
619
992
|
"isStatic": false,
|
|
620
993
|
"isPublic": true
|
|
621
994
|
}
|
|
622
995
|
},
|
|
623
996
|
"decoratorConfig": {
|
|
624
|
-
"tableName": "
|
|
997
|
+
"tableName": "chat_participants",
|
|
998
|
+
"api": {
|
|
999
|
+
"include": [
|
|
1000
|
+
"list",
|
|
1001
|
+
"get"
|
|
1002
|
+
]
|
|
1003
|
+
},
|
|
1004
|
+
"mcp": {
|
|
1005
|
+
"include": [
|
|
1006
|
+
"list",
|
|
1007
|
+
"get"
|
|
1008
|
+
]
|
|
1009
|
+
},
|
|
1010
|
+
"cli": true,
|
|
1011
|
+
"tenantScoped": {
|
|
1012
|
+
"mode": "required"
|
|
1013
|
+
}
|
|
625
1014
|
},
|
|
626
|
-
"extends": "
|
|
627
|
-
"
|
|
628
|
-
"
|
|
629
|
-
"
|
|
1015
|
+
"extends": "SmrtObject",
|
|
1016
|
+
"exportName": "ChatParticipant",
|
|
1017
|
+
"collectionExportName": "ChatParticipantCollection",
|
|
1018
|
+
"validationRules": [
|
|
1019
|
+
{
|
|
1020
|
+
"field": "tenantId",
|
|
1021
|
+
"rule": "required",
|
|
1022
|
+
"fieldType": "text"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"field": "roomId",
|
|
1026
|
+
"rule": "required",
|
|
1027
|
+
"fieldType": "foreignKey"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"field": "profileId",
|
|
1031
|
+
"rule": "required",
|
|
1032
|
+
"fieldType": "crossPackageRef"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"field": "role",
|
|
1036
|
+
"rule": "required",
|
|
1037
|
+
"fieldType": "text"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"field": "status",
|
|
1041
|
+
"rule": "required",
|
|
1042
|
+
"fieldType": "text"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"field": "onlineStatus",
|
|
1046
|
+
"rule": "required",
|
|
1047
|
+
"fieldType": "text"
|
|
1048
|
+
}
|
|
1049
|
+
],
|
|
630
1050
|
"schema": {
|
|
631
|
-
"tableName": "
|
|
632
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1051
|
+
"tableName": "chat_participants",
|
|
1052
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_participants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"room_id\" UUID NOT NULL,\n \"profile_id\" UUID NOT NULL,\n \"role\" TEXT NOT NULL DEFAULT 'member',\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"online_status\" TEXT NOT NULL DEFAULT 'offline',\n \"last_read_message_id\" UUID,\n \"last_seen_at\" TIMESTAMP,\n \"joined_at\" TIMESTAMP,\n \"nickname\" TEXT DEFAULT '',\n \"is_muted\" BOOLEAN DEFAULT FALSE,\n \"is_pinned\" BOOLEAN DEFAULT FALSE\n);",
|
|
633
1053
|
"columns": {
|
|
634
1054
|
"id": {
|
|
635
1055
|
"type": "UUID",
|
|
@@ -655,169 +1075,87 @@
|
|
|
655
1075
|
"type": "TIMESTAMP",
|
|
656
1076
|
"notNull": true,
|
|
657
1077
|
"default": "current_timestamp"
|
|
658
|
-
}
|
|
659
|
-
},
|
|
660
|
-
"indexes": [
|
|
661
|
-
{
|
|
662
|
-
"name": "chat_reactions_id_idx",
|
|
663
|
-
"columns": [
|
|
664
|
-
"id"
|
|
665
|
-
]
|
|
666
1078
|
},
|
|
667
|
-
{
|
|
668
|
-
"name": "chat_reactions_slug_context_idx",
|
|
669
|
-
"columns": [
|
|
670
|
-
"slug",
|
|
671
|
-
"context"
|
|
672
|
-
],
|
|
673
|
-
"unique": true
|
|
674
|
-
}
|
|
675
|
-
],
|
|
676
|
-
"version": "0ea62683"
|
|
677
|
-
}
|
|
678
|
-
},
|
|
679
|
-
"@happyvertical/smrt-chat:ChatRoomCollection": {
|
|
680
|
-
"name": "chatroomcollection",
|
|
681
|
-
"className": "ChatRoomCollection",
|
|
682
|
-
"qualifiedName": "@happyvertical/smrt-chat:ChatRoomCollection",
|
|
683
|
-
"collection": "chatrooms",
|
|
684
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatRoomCollection.ts",
|
|
685
|
-
"packageName": "@happyvertical/smrt-chat",
|
|
686
|
-
"fields": {},
|
|
687
|
-
"methods": {
|
|
688
|
-
"findByType": {
|
|
689
|
-
"name": "findByType",
|
|
690
|
-
"async": true,
|
|
691
|
-
"parameters": [
|
|
692
|
-
{
|
|
693
|
-
"name": "roomType",
|
|
694
|
-
"type": "ChatRoomType",
|
|
695
|
-
"optional": false
|
|
696
|
-
}
|
|
697
|
-
],
|
|
698
|
-
"returnType": "Promise<ChatRoom[]>",
|
|
699
|
-
"isStatic": false,
|
|
700
|
-
"isPublic": true
|
|
701
|
-
},
|
|
702
|
-
"findPublic": {
|
|
703
|
-
"name": "findPublic",
|
|
704
|
-
"async": true,
|
|
705
|
-
"parameters": [],
|
|
706
|
-
"returnType": "Promise<ChatRoom[]>",
|
|
707
|
-
"isStatic": false,
|
|
708
|
-
"isPublic": true
|
|
709
|
-
},
|
|
710
|
-
"findDMs": {
|
|
711
|
-
"name": "findDMs",
|
|
712
|
-
"async": true,
|
|
713
|
-
"parameters": [],
|
|
714
|
-
"returnType": "Promise<ChatRoom[]>",
|
|
715
|
-
"isStatic": false,
|
|
716
|
-
"isPublic": true
|
|
717
|
-
},
|
|
718
|
-
"findAgentRooms": {
|
|
719
|
-
"name": "findAgentRooms",
|
|
720
|
-
"async": true,
|
|
721
|
-
"parameters": [],
|
|
722
|
-
"returnType": "Promise<ChatRoom[]>",
|
|
723
|
-
"isStatic": false,
|
|
724
|
-
"isPublic": true
|
|
725
|
-
},
|
|
726
|
-
"search": {
|
|
727
|
-
"name": "search",
|
|
728
|
-
"async": true,
|
|
729
|
-
"parameters": [
|
|
730
|
-
{
|
|
731
|
-
"name": "query",
|
|
732
|
-
"type": "string",
|
|
733
|
-
"optional": false
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
"name": "options",
|
|
737
|
-
"type": "object",
|
|
738
|
-
"optional": true
|
|
739
|
-
}
|
|
740
|
-
],
|
|
741
|
-
"returnType": "Promise<ChatRoom[]>",
|
|
742
|
-
"isStatic": false,
|
|
743
|
-
"isPublic": true
|
|
744
|
-
},
|
|
745
|
-
"findOrCreateDM": {
|
|
746
|
-
"name": "findOrCreateDM",
|
|
747
|
-
"async": true,
|
|
748
|
-
"parameters": [
|
|
749
|
-
{
|
|
750
|
-
"name": "profileId1",
|
|
751
|
-
"type": "string",
|
|
752
|
-
"optional": false
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
"name": "profileId2",
|
|
756
|
-
"type": "string",
|
|
757
|
-
"optional": false
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
"name": "tenantId",
|
|
761
|
-
"type": "string",
|
|
762
|
-
"optional": false
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
"name": "participants",
|
|
766
|
-
"type": "ChatParticipantCollection",
|
|
767
|
-
"optional": false
|
|
768
|
-
}
|
|
769
|
-
],
|
|
770
|
-
"returnType": "Promise<ChatRoom>",
|
|
771
|
-
"isStatic": false,
|
|
772
|
-
"isPublic": true
|
|
773
|
-
}
|
|
774
|
-
},
|
|
775
|
-
"decoratorConfig": {
|
|
776
|
-
"tableName": "chat_rooms"
|
|
777
|
-
},
|
|
778
|
-
"extends": "SmrtCollection",
|
|
779
|
-
"extendsTypeArg": "ChatRoom",
|
|
780
|
-
"exportName": "ChatRoomCollection",
|
|
781
|
-
"collectionExportName": "ChatRoomCollectionCollection",
|
|
782
|
-
"schema": {
|
|
783
|
-
"tableName": "chat_rooms",
|
|
784
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_rooms\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
785
|
-
"columns": {
|
|
786
|
-
"id": {
|
|
1079
|
+
"tenant_id": {
|
|
787
1080
|
"type": "UUID",
|
|
788
|
-
"
|
|
789
|
-
"
|
|
790
|
-
"
|
|
1081
|
+
"referenceKind": "tenantId",
|
|
1082
|
+
"notNull": true,
|
|
1083
|
+
"unique": false
|
|
791
1084
|
},
|
|
792
|
-
"
|
|
1085
|
+
"room_id": {
|
|
1086
|
+
"type": "UUID",
|
|
1087
|
+
"referenceKind": "foreignKey",
|
|
1088
|
+
"notNull": true,
|
|
1089
|
+
"unique": false
|
|
1090
|
+
},
|
|
1091
|
+
"profile_id": {
|
|
1092
|
+
"type": "UUID",
|
|
1093
|
+
"referenceKind": "crossPackageRef",
|
|
1094
|
+
"notNull": true,
|
|
1095
|
+
"unique": false
|
|
1096
|
+
},
|
|
1097
|
+
"role": {
|
|
793
1098
|
"type": "TEXT",
|
|
794
|
-
"notNull": true
|
|
1099
|
+
"notNull": true,
|
|
1100
|
+
"unique": false,
|
|
1101
|
+
"default": "member"
|
|
795
1102
|
},
|
|
796
|
-
"
|
|
1103
|
+
"status": {
|
|
797
1104
|
"type": "TEXT",
|
|
798
1105
|
"notNull": true,
|
|
799
|
-
"
|
|
1106
|
+
"unique": false,
|
|
1107
|
+
"default": "active"
|
|
800
1108
|
},
|
|
801
|
-
"
|
|
802
|
-
"type": "
|
|
1109
|
+
"online_status": {
|
|
1110
|
+
"type": "TEXT",
|
|
803
1111
|
"notNull": true,
|
|
804
|
-
"
|
|
1112
|
+
"unique": false,
|
|
1113
|
+
"default": "offline"
|
|
805
1114
|
},
|
|
806
|
-
"
|
|
1115
|
+
"last_read_message_id": {
|
|
1116
|
+
"type": "UUID",
|
|
1117
|
+
"referenceKind": "foreignKey",
|
|
1118
|
+
"notNull": false,
|
|
1119
|
+
"unique": false
|
|
1120
|
+
},
|
|
1121
|
+
"last_seen_at": {
|
|
807
1122
|
"type": "TIMESTAMP",
|
|
808
|
-
"notNull":
|
|
809
|
-
"
|
|
1123
|
+
"notNull": false,
|
|
1124
|
+
"unique": false
|
|
1125
|
+
},
|
|
1126
|
+
"joined_at": {
|
|
1127
|
+
"type": "TIMESTAMP",
|
|
1128
|
+
"notNull": false,
|
|
1129
|
+
"unique": false
|
|
1130
|
+
},
|
|
1131
|
+
"nickname": {
|
|
1132
|
+
"type": "TEXT",
|
|
1133
|
+
"notNull": false,
|
|
1134
|
+
"unique": false,
|
|
1135
|
+
"default": ""
|
|
1136
|
+
},
|
|
1137
|
+
"is_muted": {
|
|
1138
|
+
"type": "BOOLEAN",
|
|
1139
|
+
"notNull": false,
|
|
1140
|
+
"unique": false,
|
|
1141
|
+
"default": false
|
|
1142
|
+
},
|
|
1143
|
+
"is_pinned": {
|
|
1144
|
+
"type": "BOOLEAN",
|
|
1145
|
+
"notNull": false,
|
|
1146
|
+
"unique": false,
|
|
1147
|
+
"default": false
|
|
810
1148
|
}
|
|
811
1149
|
},
|
|
812
1150
|
"indexes": [
|
|
813
1151
|
{
|
|
814
|
-
"name": "
|
|
1152
|
+
"name": "chat_participants_id_idx",
|
|
815
1153
|
"columns": [
|
|
816
1154
|
"id"
|
|
817
1155
|
]
|
|
818
1156
|
},
|
|
819
1157
|
{
|
|
820
|
-
"name": "
|
|
1158
|
+
"name": "chat_participants_slug_context_idx",
|
|
821
1159
|
"columns": [
|
|
822
1160
|
"slug",
|
|
823
1161
|
"context"
|
|
@@ -825,65 +1163,102 @@
|
|
|
825
1163
|
"unique": true
|
|
826
1164
|
}
|
|
827
1165
|
],
|
|
828
|
-
"version": "
|
|
1166
|
+
"version": "50824444"
|
|
829
1167
|
}
|
|
830
1168
|
},
|
|
831
|
-
"@happyvertical/smrt-chat:
|
|
832
|
-
"name": "
|
|
833
|
-
"className": "
|
|
834
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
835
|
-
"collection": "
|
|
836
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
1169
|
+
"@happyvertical/smrt-chat:ChatReaction": {
|
|
1170
|
+
"name": "chatreaction",
|
|
1171
|
+
"className": "ChatReaction",
|
|
1172
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatReaction",
|
|
1173
|
+
"collection": "chatreactions",
|
|
1174
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/ChatReaction.ts",
|
|
837
1175
|
"packageName": "@happyvertical/smrt-chat",
|
|
838
|
-
"fields": {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
"
|
|
842
|
-
"
|
|
843
|
-
|
|
844
|
-
{
|
|
845
|
-
"
|
|
846
|
-
"
|
|
847
|
-
"
|
|
1176
|
+
"fields": {
|
|
1177
|
+
"tenantId": {
|
|
1178
|
+
"type": "text",
|
|
1179
|
+
"required": true,
|
|
1180
|
+
"_meta": {
|
|
1181
|
+
"sqlType": "UUID",
|
|
1182
|
+
"__tenancy": {
|
|
1183
|
+
"isTenantIdField": true,
|
|
1184
|
+
"autoFilter": true,
|
|
1185
|
+
"required": true,
|
|
1186
|
+
"autoPopulate": true,
|
|
1187
|
+
"nullable": false,
|
|
1188
|
+
"mode": "required",
|
|
1189
|
+
"field": "tenantId",
|
|
1190
|
+
"allowSuperAdminBypass": false
|
|
848
1191
|
}
|
|
849
|
-
|
|
850
|
-
"returnType": "Promise<ChatThread[]>",
|
|
851
|
-
"isStatic": false,
|
|
852
|
-
"isPublic": true
|
|
1192
|
+
}
|
|
853
1193
|
},
|
|
854
|
-
"
|
|
855
|
-
"
|
|
856
|
-
"
|
|
857
|
-
"
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
"optional": false
|
|
862
|
-
}
|
|
863
|
-
],
|
|
864
|
-
"returnType": "Promise<ChatThread[]>",
|
|
865
|
-
"isStatic": false,
|
|
866
|
-
"isPublic": true
|
|
1194
|
+
"messageId": {
|
|
1195
|
+
"type": "foreignKey",
|
|
1196
|
+
"required": true,
|
|
1197
|
+
"related": "ChatMessage",
|
|
1198
|
+
"_meta": {
|
|
1199
|
+
"required": true
|
|
1200
|
+
}
|
|
867
1201
|
},
|
|
868
|
-
"
|
|
869
|
-
"
|
|
870
|
-
"
|
|
871
|
-
"
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
"
|
|
1202
|
+
"profileId": {
|
|
1203
|
+
"type": "crossPackageRef",
|
|
1204
|
+
"required": true,
|
|
1205
|
+
"related": "@happyvertical/smrt-profiles:Profile"
|
|
1206
|
+
},
|
|
1207
|
+
"emoji": {
|
|
1208
|
+
"type": "text",
|
|
1209
|
+
"required": true,
|
|
1210
|
+
"default": "",
|
|
1211
|
+
"_meta": {
|
|
1212
|
+
"required": true
|
|
1213
|
+
}
|
|
875
1214
|
}
|
|
876
1215
|
},
|
|
1216
|
+
"methods": {},
|
|
877
1217
|
"decoratorConfig": {
|
|
878
|
-
"tableName": "
|
|
1218
|
+
"tableName": "chat_reactions",
|
|
1219
|
+
"api": {
|
|
1220
|
+
"include": [
|
|
1221
|
+
"list"
|
|
1222
|
+
]
|
|
1223
|
+
},
|
|
1224
|
+
"mcp": {
|
|
1225
|
+
"include": [
|
|
1226
|
+
"list"
|
|
1227
|
+
]
|
|
1228
|
+
},
|
|
1229
|
+
"cli": false,
|
|
1230
|
+
"tenantScoped": {
|
|
1231
|
+
"mode": "required"
|
|
1232
|
+
}
|
|
879
1233
|
},
|
|
880
|
-
"extends": "
|
|
881
|
-
"
|
|
882
|
-
"
|
|
883
|
-
"
|
|
1234
|
+
"extends": "SmrtObject",
|
|
1235
|
+
"exportName": "ChatReaction",
|
|
1236
|
+
"collectionExportName": "ChatReactionCollection",
|
|
1237
|
+
"validationRules": [
|
|
1238
|
+
{
|
|
1239
|
+
"field": "tenantId",
|
|
1240
|
+
"rule": "required",
|
|
1241
|
+
"fieldType": "text"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"field": "messageId",
|
|
1245
|
+
"rule": "required",
|
|
1246
|
+
"fieldType": "foreignKey"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"field": "profileId",
|
|
1250
|
+
"rule": "required",
|
|
1251
|
+
"fieldType": "crossPackageRef"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
"field": "emoji",
|
|
1255
|
+
"rule": "required",
|
|
1256
|
+
"fieldType": "text"
|
|
1257
|
+
}
|
|
1258
|
+
],
|
|
884
1259
|
"schema": {
|
|
885
|
-
"tableName": "
|
|
886
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1260
|
+
"tableName": "chat_reactions",
|
|
1261
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_reactions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"message_id\" UUID NOT NULL,\n \"profile_id\" UUID NOT NULL,\n \"emoji\" TEXT NOT NULL DEFAULT ''\n);",
|
|
887
1262
|
"columns": {
|
|
888
1263
|
"id": {
|
|
889
1264
|
"type": "UUID",
|
|
@@ -900,26 +1275,50 @@
|
|
|
900
1275
|
"notNull": true,
|
|
901
1276
|
"default": ""
|
|
902
1277
|
},
|
|
903
|
-
"created_at": {
|
|
904
|
-
"type": "TIMESTAMP",
|
|
1278
|
+
"created_at": {
|
|
1279
|
+
"type": "TIMESTAMP",
|
|
1280
|
+
"notNull": true,
|
|
1281
|
+
"default": "current_timestamp"
|
|
1282
|
+
},
|
|
1283
|
+
"updated_at": {
|
|
1284
|
+
"type": "TIMESTAMP",
|
|
1285
|
+
"notNull": true,
|
|
1286
|
+
"default": "current_timestamp"
|
|
1287
|
+
},
|
|
1288
|
+
"tenant_id": {
|
|
1289
|
+
"type": "UUID",
|
|
1290
|
+
"referenceKind": "tenantId",
|
|
1291
|
+
"notNull": true,
|
|
1292
|
+
"unique": false
|
|
1293
|
+
},
|
|
1294
|
+
"message_id": {
|
|
1295
|
+
"type": "UUID",
|
|
1296
|
+
"referenceKind": "foreignKey",
|
|
1297
|
+
"notNull": true,
|
|
1298
|
+
"unique": false
|
|
1299
|
+
},
|
|
1300
|
+
"profile_id": {
|
|
1301
|
+
"type": "UUID",
|
|
1302
|
+
"referenceKind": "crossPackageRef",
|
|
905
1303
|
"notNull": true,
|
|
906
|
-
"
|
|
1304
|
+
"unique": false
|
|
907
1305
|
},
|
|
908
|
-
"
|
|
909
|
-
"type": "
|
|
1306
|
+
"emoji": {
|
|
1307
|
+
"type": "TEXT",
|
|
910
1308
|
"notNull": true,
|
|
911
|
-
"
|
|
1309
|
+
"unique": false,
|
|
1310
|
+
"default": ""
|
|
912
1311
|
}
|
|
913
1312
|
},
|
|
914
1313
|
"indexes": [
|
|
915
1314
|
{
|
|
916
|
-
"name": "
|
|
1315
|
+
"name": "chat_reactions_id_idx",
|
|
917
1316
|
"columns": [
|
|
918
1317
|
"id"
|
|
919
1318
|
]
|
|
920
1319
|
},
|
|
921
1320
|
{
|
|
922
|
-
"name": "
|
|
1321
|
+
"name": "chat_reactions_slug_context_idx",
|
|
923
1322
|
"columns": [
|
|
924
1323
|
"slug",
|
|
925
1324
|
"context"
|
|
@@ -927,53 +1326,52 @@
|
|
|
927
1326
|
"unique": true
|
|
928
1327
|
}
|
|
929
1328
|
],
|
|
930
|
-
"version": "
|
|
1329
|
+
"version": "8378c874"
|
|
931
1330
|
}
|
|
932
1331
|
},
|
|
933
|
-
"@happyvertical/smrt-chat:
|
|
934
|
-
"name": "
|
|
935
|
-
"className": "
|
|
936
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
937
|
-
"collection": "
|
|
938
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/
|
|
1332
|
+
"@happyvertical/smrt-chat:ChatRoom": {
|
|
1333
|
+
"name": "chatroom",
|
|
1334
|
+
"className": "ChatRoom",
|
|
1335
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatRoom",
|
|
1336
|
+
"collection": "chatrooms",
|
|
1337
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/ChatRoom.ts",
|
|
939
1338
|
"packageName": "@happyvertical/smrt-chat",
|
|
940
1339
|
"fields": {
|
|
941
1340
|
"tenantId": {
|
|
942
1341
|
"type": "text",
|
|
943
|
-
"required":
|
|
1342
|
+
"required": true,
|
|
944
1343
|
"_meta": {
|
|
945
1344
|
"sqlType": "UUID",
|
|
946
|
-
"nullable": true,
|
|
947
1345
|
"__tenancy": {
|
|
948
1346
|
"isTenantIdField": true,
|
|
949
1347
|
"autoFilter": true,
|
|
950
|
-
"required":
|
|
1348
|
+
"required": true,
|
|
951
1349
|
"autoPopulate": true,
|
|
952
|
-
"nullable":
|
|
953
|
-
"mode": "
|
|
1350
|
+
"nullable": false,
|
|
1351
|
+
"mode": "required",
|
|
954
1352
|
"field": "tenantId",
|
|
955
1353
|
"allowSuperAdminBypass": false
|
|
956
1354
|
}
|
|
957
1355
|
}
|
|
958
1356
|
},
|
|
959
|
-
"
|
|
1357
|
+
"name": {
|
|
1358
|
+
"type": "text",
|
|
1359
|
+
"required": false,
|
|
1360
|
+
"default": ""
|
|
1361
|
+
},
|
|
1362
|
+
"description": {
|
|
1363
|
+
"type": "text",
|
|
1364
|
+
"required": false,
|
|
1365
|
+
"default": ""
|
|
1366
|
+
},
|
|
1367
|
+
"roomType": {
|
|
960
1368
|
"type": "text",
|
|
961
1369
|
"required": true,
|
|
962
|
-
"default": "",
|
|
1370
|
+
"default": "public",
|
|
963
1371
|
"_meta": {
|
|
964
1372
|
"required": true
|
|
965
1373
|
}
|
|
966
1374
|
},
|
|
967
|
-
"participantProfileId": {
|
|
968
|
-
"type": "crossPackageRef",
|
|
969
|
-
"required": true,
|
|
970
|
-
"related": "@happyvertical/smrt-profiles:Profile"
|
|
971
|
-
},
|
|
972
|
-
"chatRoomId": {
|
|
973
|
-
"type": "foreignKey",
|
|
974
|
-
"required": false,
|
|
975
|
-
"related": "ChatRoom"
|
|
976
|
-
},
|
|
977
1375
|
"status": {
|
|
978
1376
|
"type": "text",
|
|
979
1377
|
"required": true,
|
|
@@ -982,70 +1380,57 @@
|
|
|
982
1380
|
"required": true
|
|
983
1381
|
}
|
|
984
1382
|
},
|
|
985
|
-
"
|
|
986
|
-
"type": "text",
|
|
987
|
-
"required": false,
|
|
988
|
-
"default": "[]"
|
|
989
|
-
},
|
|
990
|
-
"sessionContext": {
|
|
1383
|
+
"topic": {
|
|
991
1384
|
"type": "text",
|
|
992
1385
|
"required": false,
|
|
993
|
-
"default": "
|
|
1386
|
+
"default": ""
|
|
994
1387
|
},
|
|
995
|
-
"
|
|
1388
|
+
"avatarUrl": {
|
|
996
1389
|
"type": "text",
|
|
997
1390
|
"required": false,
|
|
998
1391
|
"default": ""
|
|
999
1392
|
},
|
|
1000
|
-
"
|
|
1001
|
-
"type": "
|
|
1393
|
+
"isArchived": {
|
|
1394
|
+
"type": "boolean",
|
|
1002
1395
|
"required": false,
|
|
1003
|
-
"default":
|
|
1396
|
+
"default": false
|
|
1004
1397
|
},
|
|
1005
|
-
"
|
|
1398
|
+
"maxParticipants": {
|
|
1006
1399
|
"type": "integer",
|
|
1007
1400
|
"required": false,
|
|
1008
1401
|
"default": 0
|
|
1009
1402
|
},
|
|
1010
|
-
"
|
|
1011
|
-
"type": "
|
|
1403
|
+
"metadata": {
|
|
1404
|
+
"type": "text",
|
|
1012
1405
|
"required": false,
|
|
1013
|
-
"default":
|
|
1406
|
+
"default": "{}"
|
|
1014
1407
|
},
|
|
1015
|
-
"
|
|
1016
|
-
"type": "
|
|
1408
|
+
"createdByProfileId": {
|
|
1409
|
+
"type": "crossPackageRef",
|
|
1017
1410
|
"required": false,
|
|
1018
|
-
"
|
|
1411
|
+
"related": "@happyvertical/smrt-profiles:Profile"
|
|
1019
1412
|
},
|
|
1020
1413
|
"lastMessageAt": {
|
|
1021
1414
|
"type": "datetime",
|
|
1022
1415
|
"required": false
|
|
1023
|
-
},
|
|
1024
|
-
"expiresAt": {
|
|
1025
|
-
"type": "datetime",
|
|
1026
|
-
"required": false
|
|
1027
|
-
},
|
|
1028
|
-
"closedAt": {
|
|
1029
|
-
"type": "datetime",
|
|
1030
|
-
"required": false
|
|
1031
1416
|
}
|
|
1032
1417
|
},
|
|
1033
1418
|
"methods": {
|
|
1034
|
-
"
|
|
1035
|
-
"name": "
|
|
1419
|
+
"getMetadata": {
|
|
1420
|
+
"name": "getMetadata",
|
|
1036
1421
|
"async": false,
|
|
1037
1422
|
"parameters": [],
|
|
1038
|
-
"returnType": "
|
|
1423
|
+
"returnType": "ChatRoomMetadata",
|
|
1039
1424
|
"isStatic": false,
|
|
1040
1425
|
"isPublic": true
|
|
1041
1426
|
},
|
|
1042
|
-
"
|
|
1043
|
-
"name": "
|
|
1427
|
+
"setMetadata": {
|
|
1428
|
+
"name": "setMetadata",
|
|
1044
1429
|
"async": false,
|
|
1045
1430
|
"parameters": [
|
|
1046
1431
|
{
|
|
1047
|
-
"name": "
|
|
1048
|
-
"type": "
|
|
1432
|
+
"name": "data",
|
|
1433
|
+
"type": "ChatRoomMetadata",
|
|
1049
1434
|
"optional": false
|
|
1050
1435
|
}
|
|
1051
1436
|
],
|
|
@@ -1053,113 +1438,71 @@
|
|
|
1053
1438
|
"isStatic": false,
|
|
1054
1439
|
"isPublic": true
|
|
1055
1440
|
},
|
|
1056
|
-
"
|
|
1057
|
-
"name": "
|
|
1441
|
+
"updateMetadata": {
|
|
1442
|
+
"name": "updateMetadata",
|
|
1058
1443
|
"async": false,
|
|
1059
1444
|
"parameters": [
|
|
1060
1445
|
{
|
|
1061
|
-
"name": "
|
|
1062
|
-
"type": "
|
|
1446
|
+
"name": "updates",
|
|
1447
|
+
"type": "ChatRoomMetadata",
|
|
1063
1448
|
"optional": false
|
|
1064
1449
|
}
|
|
1065
1450
|
],
|
|
1066
|
-
"returnType": "
|
|
1451
|
+
"returnType": "void",
|
|
1067
1452
|
"isStatic": false,
|
|
1068
1453
|
"isPublic": true
|
|
1069
1454
|
},
|
|
1070
|
-
"
|
|
1071
|
-
"name": "
|
|
1455
|
+
"isDM": {
|
|
1456
|
+
"name": "isDM",
|
|
1072
1457
|
"async": false,
|
|
1073
1458
|
"parameters": [],
|
|
1074
1459
|
"returnType": "boolean",
|
|
1075
1460
|
"isStatic": false,
|
|
1076
1461
|
"isPublic": true
|
|
1077
1462
|
},
|
|
1078
|
-
"
|
|
1079
|
-
"name": "
|
|
1463
|
+
"isAgentRoom": {
|
|
1464
|
+
"name": "isAgentRoom",
|
|
1080
1465
|
"async": false,
|
|
1081
1466
|
"parameters": [],
|
|
1082
1467
|
"returnType": "boolean",
|
|
1083
1468
|
"isStatic": false,
|
|
1084
1469
|
"isPublic": true
|
|
1085
1470
|
},
|
|
1086
|
-
"
|
|
1087
|
-
"name": "
|
|
1088
|
-
"async": true,
|
|
1089
|
-
"parameters": [],
|
|
1090
|
-
"returnType": "Promise<void>",
|
|
1091
|
-
"isStatic": false,
|
|
1092
|
-
"isPublic": true
|
|
1093
|
-
},
|
|
1094
|
-
"expire": {
|
|
1095
|
-
"name": "expire",
|
|
1096
|
-
"async": true,
|
|
1097
|
-
"parameters": [],
|
|
1098
|
-
"returnType": "Promise<void>",
|
|
1099
|
-
"isStatic": false,
|
|
1100
|
-
"isPublic": true
|
|
1101
|
-
},
|
|
1102
|
-
"getSessionContext": {
|
|
1103
|
-
"name": "getSessionContext",
|
|
1471
|
+
"isPublic": {
|
|
1472
|
+
"name": "isPublic",
|
|
1104
1473
|
"async": false,
|
|
1105
1474
|
"parameters": [],
|
|
1106
|
-
"returnType": "
|
|
1107
|
-
"isStatic": false,
|
|
1108
|
-
"isPublic": true
|
|
1109
|
-
},
|
|
1110
|
-
"setSessionContext": {
|
|
1111
|
-
"name": "setSessionContext",
|
|
1112
|
-
"async": false,
|
|
1113
|
-
"parameters": [
|
|
1114
|
-
{
|
|
1115
|
-
"name": "ctx",
|
|
1116
|
-
"type": "Record<string>",
|
|
1117
|
-
"optional": false
|
|
1118
|
-
}
|
|
1119
|
-
],
|
|
1120
|
-
"returnType": "void",
|
|
1475
|
+
"returnType": "boolean",
|
|
1121
1476
|
"isStatic": false,
|
|
1122
1477
|
"isPublic": true
|
|
1123
1478
|
},
|
|
1124
|
-
"
|
|
1125
|
-
"name": "
|
|
1479
|
+
"isActive": {
|
|
1480
|
+
"name": "isActive",
|
|
1126
1481
|
"async": false,
|
|
1127
1482
|
"parameters": [],
|
|
1128
|
-
"returnType": "
|
|
1483
|
+
"returnType": "boolean",
|
|
1129
1484
|
"isStatic": false,
|
|
1130
1485
|
"isPublic": true
|
|
1131
1486
|
},
|
|
1132
|
-
"
|
|
1133
|
-
"name": "
|
|
1487
|
+
"archive": {
|
|
1488
|
+
"name": "archive",
|
|
1134
1489
|
"async": true,
|
|
1135
|
-
"parameters": [
|
|
1136
|
-
{
|
|
1137
|
-
"name": "updates",
|
|
1138
|
-
"type": "Record<string>",
|
|
1139
|
-
"optional": false
|
|
1140
|
-
}
|
|
1141
|
-
],
|
|
1490
|
+
"parameters": [],
|
|
1142
1491
|
"returnType": "Promise<void>",
|
|
1143
1492
|
"isStatic": false,
|
|
1144
1493
|
"isPublic": true
|
|
1145
1494
|
},
|
|
1146
|
-
"
|
|
1147
|
-
"name": "
|
|
1495
|
+
"unarchive": {
|
|
1496
|
+
"name": "unarchive",
|
|
1148
1497
|
"async": true,
|
|
1149
|
-
"parameters": [
|
|
1150
|
-
{
|
|
1151
|
-
"name": "tokensUsed",
|
|
1152
|
-
"type": "number",
|
|
1153
|
-
"optional": true
|
|
1154
|
-
}
|
|
1155
|
-
],
|
|
1498
|
+
"parameters": [],
|
|
1156
1499
|
"returnType": "Promise<void>",
|
|
1157
1500
|
"isStatic": false,
|
|
1158
1501
|
"isPublic": true
|
|
1159
1502
|
}
|
|
1160
1503
|
},
|
|
1161
1504
|
"decoratorConfig": {
|
|
1162
|
-
"tableName": "
|
|
1505
|
+
"tableName": "chat_rooms",
|
|
1163
1506
|
"api": {
|
|
1164
1507
|
"include": [
|
|
1165
1508
|
"list",
|
|
@@ -1174,22 +1517,22 @@
|
|
|
1174
1517
|
},
|
|
1175
1518
|
"cli": true,
|
|
1176
1519
|
"tenantScoped": {
|
|
1177
|
-
"mode": "
|
|
1520
|
+
"mode": "required"
|
|
1178
1521
|
}
|
|
1179
1522
|
},
|
|
1180
1523
|
"extends": "SmrtObject",
|
|
1181
|
-
"exportName": "
|
|
1182
|
-
"collectionExportName": "
|
|
1524
|
+
"exportName": "ChatRoom",
|
|
1525
|
+
"collectionExportName": "ChatRoomCollection",
|
|
1183
1526
|
"validationRules": [
|
|
1184
1527
|
{
|
|
1185
|
-
"field": "
|
|
1528
|
+
"field": "tenantId",
|
|
1186
1529
|
"rule": "required",
|
|
1187
1530
|
"fieldType": "text"
|
|
1188
1531
|
},
|
|
1189
1532
|
{
|
|
1190
|
-
"field": "
|
|
1533
|
+
"field": "roomType",
|
|
1191
1534
|
"rule": "required",
|
|
1192
|
-
"fieldType": "
|
|
1535
|
+
"fieldType": "text"
|
|
1193
1536
|
},
|
|
1194
1537
|
{
|
|
1195
1538
|
"field": "status",
|
|
@@ -1198,8 +1541,8 @@
|
|
|
1198
1541
|
}
|
|
1199
1542
|
],
|
|
1200
1543
|
"schema": {
|
|
1201
|
-
"tableName": "
|
|
1202
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1544
|
+
"tableName": "chat_rooms",
|
|
1545
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_rooms\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"room_type\" TEXT NOT NULL DEFAULT 'public',\n \"status\" TEXT NOT NULL DEFAULT 'active',\n \"topic\" TEXT DEFAULT '',\n \"avatar_url\" TEXT DEFAULT '',\n \"is_archived\" BOOLEAN DEFAULT FALSE,\n \"max_participants\" INTEGER DEFAULT 0,\n \"metadata\" TEXT DEFAULT '{}',\n \"created_by_profile_id\" UUID,\n \"last_message_at\" TIMESTAMP\n);",
|
|
1203
1546
|
"columns": {
|
|
1204
1547
|
"id": {
|
|
1205
1548
|
"type": "UUID",
|
|
@@ -1229,86 +1572,70 @@
|
|
|
1229
1572
|
"tenant_id": {
|
|
1230
1573
|
"type": "UUID",
|
|
1231
1574
|
"referenceKind": "tenantId",
|
|
1232
|
-
"notNull":
|
|
1575
|
+
"notNull": true,
|
|
1233
1576
|
"unique": false
|
|
1234
1577
|
},
|
|
1235
|
-
"
|
|
1578
|
+
"name": {
|
|
1236
1579
|
"type": "TEXT",
|
|
1237
|
-
"notNull":
|
|
1580
|
+
"notNull": false,
|
|
1238
1581
|
"unique": false,
|
|
1239
1582
|
"default": ""
|
|
1240
1583
|
},
|
|
1241
|
-
"
|
|
1242
|
-
"type": "UUID",
|
|
1243
|
-
"referenceKind": "crossPackageRef",
|
|
1244
|
-
"notNull": true,
|
|
1245
|
-
"unique": false
|
|
1246
|
-
},
|
|
1247
|
-
"chat_room_id": {
|
|
1248
|
-
"type": "UUID",
|
|
1249
|
-
"referenceKind": "foreignKey",
|
|
1250
|
-
"notNull": false,
|
|
1251
|
-
"unique": false
|
|
1252
|
-
},
|
|
1253
|
-
"status": {
|
|
1584
|
+
"description": {
|
|
1254
1585
|
"type": "TEXT",
|
|
1255
|
-
"notNull":
|
|
1586
|
+
"notNull": false,
|
|
1256
1587
|
"unique": false,
|
|
1257
|
-
"default": "
|
|
1588
|
+
"default": ""
|
|
1258
1589
|
},
|
|
1259
|
-
"
|
|
1590
|
+
"room_type": {
|
|
1260
1591
|
"type": "TEXT",
|
|
1261
|
-
"notNull":
|
|
1592
|
+
"notNull": true,
|
|
1262
1593
|
"unique": false,
|
|
1263
|
-
"default": "
|
|
1594
|
+
"default": "public"
|
|
1264
1595
|
},
|
|
1265
|
-
"
|
|
1596
|
+
"status": {
|
|
1266
1597
|
"type": "TEXT",
|
|
1267
|
-
"notNull":
|
|
1598
|
+
"notNull": true,
|
|
1268
1599
|
"unique": false,
|
|
1269
|
-
"default": "
|
|
1600
|
+
"default": "active"
|
|
1270
1601
|
},
|
|
1271
|
-
"
|
|
1602
|
+
"topic": {
|
|
1272
1603
|
"type": "TEXT",
|
|
1273
1604
|
"notNull": false,
|
|
1274
1605
|
"unique": false,
|
|
1275
1606
|
"default": ""
|
|
1276
1607
|
},
|
|
1277
|
-
"
|
|
1278
|
-
"type": "
|
|
1608
|
+
"avatar_url": {
|
|
1609
|
+
"type": "TEXT",
|
|
1279
1610
|
"notNull": false,
|
|
1280
1611
|
"unique": false,
|
|
1281
|
-
"default":
|
|
1612
|
+
"default": ""
|
|
1282
1613
|
},
|
|
1283
|
-
"
|
|
1284
|
-
"type": "
|
|
1614
|
+
"is_archived": {
|
|
1615
|
+
"type": "BOOLEAN",
|
|
1285
1616
|
"notNull": false,
|
|
1286
1617
|
"unique": false,
|
|
1287
|
-
"default":
|
|
1618
|
+
"default": false
|
|
1288
1619
|
},
|
|
1289
|
-
"
|
|
1620
|
+
"max_participants": {
|
|
1290
1621
|
"type": "INTEGER",
|
|
1291
1622
|
"notNull": false,
|
|
1292
1623
|
"unique": false,
|
|
1293
1624
|
"default": 0
|
|
1294
1625
|
},
|
|
1295
|
-
"
|
|
1296
|
-
"type": "
|
|
1626
|
+
"metadata": {
|
|
1627
|
+
"type": "TEXT",
|
|
1297
1628
|
"notNull": false,
|
|
1298
1629
|
"unique": false,
|
|
1299
|
-
"default":
|
|
1300
|
-
},
|
|
1301
|
-
"last_message_at": {
|
|
1302
|
-
"type": "TIMESTAMP",
|
|
1303
|
-
"notNull": false,
|
|
1304
|
-
"unique": false
|
|
1630
|
+
"default": "{}"
|
|
1305
1631
|
},
|
|
1306
|
-
"
|
|
1307
|
-
"type": "
|
|
1632
|
+
"created_by_profile_id": {
|
|
1633
|
+
"type": "UUID",
|
|
1634
|
+
"referenceKind": "crossPackageRef",
|
|
1308
1635
|
"notNull": false,
|
|
1309
1636
|
"unique": false
|
|
1310
1637
|
},
|
|
1311
|
-
"
|
|
1638
|
+
"last_message_at": {
|
|
1312
1639
|
"type": "TIMESTAMP",
|
|
1313
1640
|
"notNull": false,
|
|
1314
1641
|
"unique": false
|
|
@@ -1316,13 +1643,13 @@
|
|
|
1316
1643
|
},
|
|
1317
1644
|
"indexes": [
|
|
1318
1645
|
{
|
|
1319
|
-
"name": "
|
|
1646
|
+
"name": "chat_rooms_id_idx",
|
|
1320
1647
|
"columns": [
|
|
1321
1648
|
"id"
|
|
1322
1649
|
]
|
|
1323
1650
|
},
|
|
1324
1651
|
{
|
|
1325
|
-
"name": "
|
|
1652
|
+
"name": "chat_rooms_slug_context_idx",
|
|
1326
1653
|
"columns": [
|
|
1327
1654
|
"slug",
|
|
1328
1655
|
"context"
|
|
@@ -1330,15 +1657,15 @@
|
|
|
1330
1657
|
"unique": true
|
|
1331
1658
|
}
|
|
1332
1659
|
],
|
|
1333
|
-
"version": "
|
|
1660
|
+
"version": "3665d881"
|
|
1334
1661
|
}
|
|
1335
1662
|
},
|
|
1336
|
-
"@happyvertical/smrt-chat:
|
|
1337
|
-
"name": "
|
|
1338
|
-
"className": "
|
|
1339
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
1340
|
-
"collection": "
|
|
1341
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/
|
|
1663
|
+
"@happyvertical/smrt-chat:ChatThread": {
|
|
1664
|
+
"name": "chatthread",
|
|
1665
|
+
"className": "ChatThread",
|
|
1666
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatThread",
|
|
1667
|
+
"collection": "chatthreads",
|
|
1668
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/models/ChatThread.ts",
|
|
1342
1669
|
"packageName": "@happyvertical/smrt-chat",
|
|
1343
1670
|
"fields": {
|
|
1344
1671
|
"tenantId": {
|
|
@@ -1366,222 +1693,59 @@
|
|
|
1366
1693
|
"required": true
|
|
1367
1694
|
}
|
|
1368
1695
|
},
|
|
1369
|
-
"
|
|
1370
|
-
"type": "foreignKey",
|
|
1371
|
-
"required": false,
|
|
1372
|
-
"related": "ChatThread"
|
|
1373
|
-
},
|
|
1374
|
-
"senderProfileId": {
|
|
1375
|
-
"type": "crossPackageRef",
|
|
1376
|
-
"required": true,
|
|
1377
|
-
"related": "@happyvertical/smrt-profiles:Profile"
|
|
1378
|
-
},
|
|
1379
|
-
"agentSessionId": {
|
|
1696
|
+
"rootMessageId": {
|
|
1380
1697
|
"type": "foreignKey",
|
|
1381
1698
|
"required": false,
|
|
1382
|
-
"related": "
|
|
1383
|
-
},
|
|
1384
|
-
"content": {
|
|
1385
|
-
"type": "text",
|
|
1386
|
-
"required": false,
|
|
1387
|
-
"default": ""
|
|
1388
|
-
},
|
|
1389
|
-
"messageType": {
|
|
1390
|
-
"type": "text",
|
|
1391
|
-
"required": true,
|
|
1392
|
-
"default": "text",
|
|
1699
|
+
"related": "ChatMessage",
|
|
1393
1700
|
"_meta": {
|
|
1394
|
-
"
|
|
1701
|
+
"nullable": true
|
|
1395
1702
|
}
|
|
1396
1703
|
},
|
|
1397
|
-
"
|
|
1704
|
+
"title": {
|
|
1398
1705
|
"type": "text",
|
|
1399
|
-
"required": true,
|
|
1400
|
-
"default": "user",
|
|
1401
|
-
"_meta": {
|
|
1402
|
-
"required": true
|
|
1403
|
-
}
|
|
1404
|
-
},
|
|
1405
|
-
"isEdited": {
|
|
1406
|
-
"type": "boolean",
|
|
1407
1706
|
"required": false,
|
|
1408
|
-
"default":
|
|
1409
|
-
},
|
|
1410
|
-
"editedAt": {
|
|
1411
|
-
"type": "datetime",
|
|
1412
|
-
"required": false
|
|
1707
|
+
"default": ""
|
|
1413
1708
|
},
|
|
1414
|
-
"
|
|
1709
|
+
"isResolved": {
|
|
1415
1710
|
"type": "boolean",
|
|
1416
1711
|
"required": false,
|
|
1417
1712
|
"default": false
|
|
1418
1713
|
},
|
|
1419
|
-
"
|
|
1420
|
-
"type": "
|
|
1421
|
-
"required": false,
|
|
1422
|
-
"related": "ChatMessage"
|
|
1423
|
-
},
|
|
1424
|
-
"metadata": {
|
|
1425
|
-
"type": "text",
|
|
1714
|
+
"messageCount": {
|
|
1715
|
+
"type": "integer",
|
|
1426
1716
|
"required": false,
|
|
1427
|
-
"default":
|
|
1717
|
+
"default": 0
|
|
1428
1718
|
},
|
|
1429
|
-
"
|
|
1430
|
-
"type": "
|
|
1719
|
+
"lastMessageAt": {
|
|
1720
|
+
"type": "datetime",
|
|
1431
1721
|
"required": false
|
|
1432
1722
|
},
|
|
1433
|
-
"
|
|
1434
|
-
"type": "
|
|
1723
|
+
"participantCount": {
|
|
1724
|
+
"type": "integer",
|
|
1435
1725
|
"required": false,
|
|
1436
|
-
"default":
|
|
1726
|
+
"default": 0
|
|
1437
1727
|
}
|
|
1438
1728
|
},
|
|
1439
1729
|
"methods": {
|
|
1440
|
-
"
|
|
1441
|
-
"name": "
|
|
1442
|
-
"async":
|
|
1443
|
-
"parameters": [],
|
|
1444
|
-
"returnType": "
|
|
1445
|
-
"isStatic": false,
|
|
1446
|
-
"isPublic": true
|
|
1447
|
-
},
|
|
1448
|
-
"
|
|
1449
|
-
"name": "
|
|
1450
|
-
"async": false,
|
|
1451
|
-
"parameters": [
|
|
1452
|
-
{
|
|
1453
|
-
"name": "items",
|
|
1454
|
-
"type": "Array<object>",
|
|
1455
|
-
"optional": false
|
|
1456
|
-
}
|
|
1457
|
-
],
|
|
1458
|
-
"returnType": "void",
|
|
1459
|
-
"isStatic": false,
|
|
1460
|
-
"isPublic": true
|
|
1461
|
-
},
|
|
1462
|
-
"getMetadata": {
|
|
1463
|
-
"name": "getMetadata",
|
|
1464
|
-
"async": false,
|
|
1465
|
-
"parameters": [],
|
|
1466
|
-
"returnType": "Record<string>",
|
|
1467
|
-
"isStatic": false,
|
|
1468
|
-
"isPublic": true
|
|
1469
|
-
},
|
|
1470
|
-
"setMetadata": {
|
|
1471
|
-
"name": "setMetadata",
|
|
1472
|
-
"async": false,
|
|
1473
|
-
"parameters": [
|
|
1474
|
-
{
|
|
1475
|
-
"name": "data",
|
|
1476
|
-
"type": "Record<string>",
|
|
1477
|
-
"optional": false
|
|
1478
|
-
}
|
|
1479
|
-
],
|
|
1480
|
-
"returnType": "void",
|
|
1481
|
-
"isStatic": false,
|
|
1482
|
-
"isPublic": true
|
|
1483
|
-
},
|
|
1484
|
-
"getToolCallData": {
|
|
1485
|
-
"name": "getToolCallData",
|
|
1486
|
-
"async": false,
|
|
1487
|
-
"parameters": [],
|
|
1488
|
-
"returnType": "Record<string> | null",
|
|
1489
|
-
"isStatic": false,
|
|
1490
|
-
"isPublic": true
|
|
1491
|
-
},
|
|
1492
|
-
"setToolCallData": {
|
|
1493
|
-
"name": "setToolCallData",
|
|
1494
|
-
"async": false,
|
|
1495
|
-
"parameters": [
|
|
1496
|
-
{
|
|
1497
|
-
"name": "data",
|
|
1498
|
-
"type": "Record<string> | null",
|
|
1499
|
-
"optional": false
|
|
1500
|
-
}
|
|
1501
|
-
],
|
|
1502
|
-
"returnType": "void",
|
|
1503
|
-
"isStatic": false,
|
|
1504
|
-
"isPublic": true
|
|
1505
|
-
},
|
|
1506
|
-
"hasAttachments": {
|
|
1507
|
-
"name": "hasAttachments",
|
|
1508
|
-
"async": false,
|
|
1509
|
-
"parameters": [],
|
|
1510
|
-
"returnType": "boolean",
|
|
1511
|
-
"isStatic": false,
|
|
1512
|
-
"isPublic": true
|
|
1513
|
-
},
|
|
1514
|
-
"isToolCall": {
|
|
1515
|
-
"name": "isToolCall",
|
|
1516
|
-
"async": false,
|
|
1517
|
-
"parameters": [],
|
|
1518
|
-
"returnType": "boolean",
|
|
1519
|
-
"isStatic": false,
|
|
1520
|
-
"isPublic": true
|
|
1521
|
-
},
|
|
1522
|
-
"isToolResult": {
|
|
1523
|
-
"name": "isToolResult",
|
|
1524
|
-
"async": false,
|
|
1525
|
-
"parameters": [],
|
|
1526
|
-
"returnType": "boolean",
|
|
1527
|
-
"isStatic": false,
|
|
1528
|
-
"isPublic": true
|
|
1529
|
-
},
|
|
1530
|
-
"isFromAgent": {
|
|
1531
|
-
"name": "isFromAgent",
|
|
1532
|
-
"async": false,
|
|
1533
|
-
"parameters": [],
|
|
1534
|
-
"returnType": "boolean",
|
|
1535
|
-
"isStatic": false,
|
|
1536
|
-
"isPublic": true
|
|
1537
|
-
},
|
|
1538
|
-
"isSystemMessage": {
|
|
1539
|
-
"name": "isSystemMessage",
|
|
1540
|
-
"async": false,
|
|
1541
|
-
"parameters": [],
|
|
1542
|
-
"returnType": "boolean",
|
|
1543
|
-
"isStatic": false,
|
|
1544
|
-
"isPublic": true
|
|
1545
|
-
},
|
|
1546
|
-
"edit": {
|
|
1547
|
-
"name": "edit",
|
|
1548
|
-
"async": true,
|
|
1549
|
-
"parameters": [
|
|
1550
|
-
{
|
|
1551
|
-
"name": "newContent",
|
|
1552
|
-
"type": "string",
|
|
1553
|
-
"optional": false
|
|
1554
|
-
}
|
|
1555
|
-
],
|
|
1556
|
-
"returnType": "Promise<void>",
|
|
1557
|
-
"isStatic": false,
|
|
1558
|
-
"isPublic": true
|
|
1559
|
-
},
|
|
1560
|
-
"softDelete": {
|
|
1561
|
-
"name": "softDelete",
|
|
1730
|
+
"resolve": {
|
|
1731
|
+
"name": "resolve",
|
|
1732
|
+
"async": true,
|
|
1733
|
+
"parameters": [],
|
|
1734
|
+
"returnType": "Promise<void>",
|
|
1735
|
+
"isStatic": false,
|
|
1736
|
+
"isPublic": true
|
|
1737
|
+
},
|
|
1738
|
+
"reopen": {
|
|
1739
|
+
"name": "reopen",
|
|
1562
1740
|
"async": true,
|
|
1563
1741
|
"parameters": [],
|
|
1564
1742
|
"returnType": "Promise<void>",
|
|
1565
1743
|
"isStatic": false,
|
|
1566
1744
|
"isPublic": true
|
|
1567
|
-
},
|
|
1568
|
-
"getPreview": {
|
|
1569
|
-
"name": "getPreview",
|
|
1570
|
-
"async": false,
|
|
1571
|
-
"parameters": [
|
|
1572
|
-
{
|
|
1573
|
-
"name": "maxLength",
|
|
1574
|
-
"type": "any",
|
|
1575
|
-
"optional": true
|
|
1576
|
-
}
|
|
1577
|
-
],
|
|
1578
|
-
"returnType": "string",
|
|
1579
|
-
"isStatic": false,
|
|
1580
|
-
"isPublic": true
|
|
1581
1745
|
}
|
|
1582
1746
|
},
|
|
1583
1747
|
"decoratorConfig": {
|
|
1584
|
-
"tableName": "
|
|
1748
|
+
"tableName": "chat_threads",
|
|
1585
1749
|
"api": {
|
|
1586
1750
|
"include": [
|
|
1587
1751
|
"list",
|
|
@@ -1600,8 +1764,8 @@
|
|
|
1600
1764
|
}
|
|
1601
1765
|
},
|
|
1602
1766
|
"extends": "SmrtObject",
|
|
1603
|
-
"exportName": "
|
|
1604
|
-
"collectionExportName": "
|
|
1767
|
+
"exportName": "ChatThread",
|
|
1768
|
+
"collectionExportName": "ChatThreadCollection",
|
|
1605
1769
|
"validationRules": [
|
|
1606
1770
|
{
|
|
1607
1771
|
"field": "tenantId",
|
|
@@ -1612,26 +1776,11 @@
|
|
|
1612
1776
|
"field": "roomId",
|
|
1613
1777
|
"rule": "required",
|
|
1614
1778
|
"fieldType": "foreignKey"
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
"field": "senderProfileId",
|
|
1618
|
-
"rule": "required",
|
|
1619
|
-
"fieldType": "crossPackageRef"
|
|
1620
|
-
},
|
|
1621
|
-
{
|
|
1622
|
-
"field": "messageType",
|
|
1623
|
-
"rule": "required",
|
|
1624
|
-
"fieldType": "text"
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
"field": "role",
|
|
1628
|
-
"rule": "required",
|
|
1629
|
-
"fieldType": "text"
|
|
1630
1779
|
}
|
|
1631
1780
|
],
|
|
1632
1781
|
"schema": {
|
|
1633
|
-
"tableName": "
|
|
1634
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1782
|
+
"tableName": "chat_threads",
|
|
1783
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_threads\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"room_id\" UUID NOT NULL,\n \"root_message_id\" UUID,\n \"title\" TEXT DEFAULT '',\n \"is_resolved\" BOOLEAN DEFAULT FALSE,\n \"message_count\" INTEGER DEFAULT 0,\n \"last_message_at\" TIMESTAMP,\n \"participant_count\" INTEGER DEFAULT 0\n);",
|
|
1635
1784
|
"columns": {
|
|
1636
1785
|
"id": {
|
|
1637
1786
|
"type": "UUID",
|
|
@@ -1670,92 +1819,51 @@
|
|
|
1670
1819
|
"notNull": true,
|
|
1671
1820
|
"unique": false
|
|
1672
1821
|
},
|
|
1673
|
-
"
|
|
1674
|
-
"type": "UUID",
|
|
1675
|
-
"referenceKind": "foreignKey",
|
|
1676
|
-
"notNull": false,
|
|
1677
|
-
"unique": false
|
|
1678
|
-
},
|
|
1679
|
-
"sender_profile_id": {
|
|
1680
|
-
"type": "UUID",
|
|
1681
|
-
"referenceKind": "crossPackageRef",
|
|
1682
|
-
"notNull": true,
|
|
1683
|
-
"unique": false
|
|
1684
|
-
},
|
|
1685
|
-
"agent_session_id": {
|
|
1822
|
+
"root_message_id": {
|
|
1686
1823
|
"type": "UUID",
|
|
1687
1824
|
"referenceKind": "foreignKey",
|
|
1688
1825
|
"notNull": false,
|
|
1689
1826
|
"unique": false
|
|
1690
1827
|
},
|
|
1691
|
-
"
|
|
1828
|
+
"title": {
|
|
1692
1829
|
"type": "TEXT",
|
|
1693
1830
|
"notNull": false,
|
|
1694
1831
|
"unique": false,
|
|
1695
1832
|
"default": ""
|
|
1696
1833
|
},
|
|
1697
|
-
"
|
|
1698
|
-
"type": "TEXT",
|
|
1699
|
-
"notNull": true,
|
|
1700
|
-
"unique": false,
|
|
1701
|
-
"default": "text"
|
|
1702
|
-
},
|
|
1703
|
-
"role": {
|
|
1704
|
-
"type": "TEXT",
|
|
1705
|
-
"notNull": true,
|
|
1706
|
-
"unique": false,
|
|
1707
|
-
"default": "user"
|
|
1708
|
-
},
|
|
1709
|
-
"is_edited": {
|
|
1710
|
-
"type": "BOOLEAN",
|
|
1711
|
-
"notNull": false,
|
|
1712
|
-
"unique": false,
|
|
1713
|
-
"default": false
|
|
1714
|
-
},
|
|
1715
|
-
"edited_at": {
|
|
1716
|
-
"type": "TIMESTAMP",
|
|
1717
|
-
"notNull": false,
|
|
1718
|
-
"unique": false
|
|
1719
|
-
},
|
|
1720
|
-
"is_deleted": {
|
|
1834
|
+
"is_resolved": {
|
|
1721
1835
|
"type": "BOOLEAN",
|
|
1722
1836
|
"notNull": false,
|
|
1723
1837
|
"unique": false,
|
|
1724
1838
|
"default": false
|
|
1725
1839
|
},
|
|
1726
|
-
"
|
|
1727
|
-
"type": "
|
|
1728
|
-
"referenceKind": "foreignKey",
|
|
1729
|
-
"notNull": false,
|
|
1730
|
-
"unique": false
|
|
1731
|
-
},
|
|
1732
|
-
"metadata": {
|
|
1733
|
-
"type": "TEXT",
|
|
1840
|
+
"message_count": {
|
|
1841
|
+
"type": "INTEGER",
|
|
1734
1842
|
"notNull": false,
|
|
1735
1843
|
"unique": false,
|
|
1736
|
-
"default":
|
|
1844
|
+
"default": 0
|
|
1737
1845
|
},
|
|
1738
|
-
"
|
|
1739
|
-
"type": "
|
|
1846
|
+
"last_message_at": {
|
|
1847
|
+
"type": "TIMESTAMP",
|
|
1740
1848
|
"notNull": false,
|
|
1741
1849
|
"unique": false
|
|
1742
1850
|
},
|
|
1743
|
-
"
|
|
1744
|
-
"type": "
|
|
1851
|
+
"participant_count": {
|
|
1852
|
+
"type": "INTEGER",
|
|
1745
1853
|
"notNull": false,
|
|
1746
1854
|
"unique": false,
|
|
1747
|
-
"default":
|
|
1855
|
+
"default": 0
|
|
1748
1856
|
}
|
|
1749
1857
|
},
|
|
1750
1858
|
"indexes": [
|
|
1751
1859
|
{
|
|
1752
|
-
"name": "
|
|
1860
|
+
"name": "chat_threads_id_idx",
|
|
1753
1861
|
"columns": [
|
|
1754
1862
|
"id"
|
|
1755
1863
|
]
|
|
1756
1864
|
},
|
|
1757
1865
|
{
|
|
1758
|
-
"name": "
|
|
1866
|
+
"name": "chat_threads_slug_context_idx",
|
|
1759
1867
|
"columns": [
|
|
1760
1868
|
"slug",
|
|
1761
1869
|
"context"
|
|
@@ -1763,219 +1871,304 @@
|
|
|
1763
1871
|
"unique": true
|
|
1764
1872
|
}
|
|
1765
1873
|
],
|
|
1766
|
-
"version": "
|
|
1874
|
+
"version": "6fd35191"
|
|
1767
1875
|
}
|
|
1768
1876
|
},
|
|
1769
|
-
"@happyvertical/smrt-chat:
|
|
1770
|
-
"name": "
|
|
1771
|
-
"className": "
|
|
1772
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
1773
|
-
"collection": "
|
|
1774
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
1877
|
+
"@happyvertical/smrt-chat:AgentSessionCollection": {
|
|
1878
|
+
"name": "agentsessioncollection",
|
|
1879
|
+
"className": "AgentSessionCollection",
|
|
1880
|
+
"qualifiedName": "@happyvertical/smrt-chat:AgentSessionCollection",
|
|
1881
|
+
"collection": "agentsessions",
|
|
1882
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/AgentSessionCollection.ts",
|
|
1775
1883
|
"packageName": "@happyvertical/smrt-chat",
|
|
1776
|
-
"fields": {
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
"
|
|
1780
|
-
"
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
"
|
|
1784
|
-
"
|
|
1785
|
-
"
|
|
1786
|
-
"autoPopulate": true,
|
|
1787
|
-
"nullable": false,
|
|
1788
|
-
"mode": "required",
|
|
1789
|
-
"field": "tenantId",
|
|
1790
|
-
"allowSuperAdminBypass": false
|
|
1884
|
+
"fields": {},
|
|
1885
|
+
"methods": {
|
|
1886
|
+
"findActiveByParticipant": {
|
|
1887
|
+
"name": "findActiveByParticipant",
|
|
1888
|
+
"async": true,
|
|
1889
|
+
"parameters": [
|
|
1890
|
+
{
|
|
1891
|
+
"name": "participantProfileId",
|
|
1892
|
+
"type": "string",
|
|
1893
|
+
"optional": false
|
|
1791
1894
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
"
|
|
1796
|
-
"required": true,
|
|
1797
|
-
"related": "ChatRoom",
|
|
1798
|
-
"_meta": {
|
|
1799
|
-
"required": true
|
|
1800
|
-
}
|
|
1801
|
-
},
|
|
1802
|
-
"profileId": {
|
|
1803
|
-
"type": "crossPackageRef",
|
|
1804
|
-
"required": true,
|
|
1805
|
-
"related": "@happyvertical/smrt-profiles:Profile"
|
|
1806
|
-
},
|
|
1807
|
-
"role": {
|
|
1808
|
-
"type": "text",
|
|
1809
|
-
"required": true,
|
|
1810
|
-
"default": "member",
|
|
1811
|
-
"_meta": {
|
|
1812
|
-
"required": true
|
|
1813
|
-
}
|
|
1814
|
-
},
|
|
1815
|
-
"status": {
|
|
1816
|
-
"type": "text",
|
|
1817
|
-
"required": true,
|
|
1818
|
-
"default": "active",
|
|
1819
|
-
"_meta": {
|
|
1820
|
-
"required": true
|
|
1821
|
-
}
|
|
1822
|
-
},
|
|
1823
|
-
"onlineStatus": {
|
|
1824
|
-
"type": "text",
|
|
1825
|
-
"required": true,
|
|
1826
|
-
"default": "offline",
|
|
1827
|
-
"_meta": {
|
|
1828
|
-
"required": true
|
|
1829
|
-
}
|
|
1830
|
-
},
|
|
1831
|
-
"lastReadMessageId": {
|
|
1832
|
-
"type": "foreignKey",
|
|
1833
|
-
"required": false,
|
|
1834
|
-
"related": "ChatMessage"
|
|
1835
|
-
},
|
|
1836
|
-
"lastSeenAt": {
|
|
1837
|
-
"type": "datetime",
|
|
1838
|
-
"required": false
|
|
1839
|
-
},
|
|
1840
|
-
"joinedAt": {
|
|
1841
|
-
"type": "datetime",
|
|
1842
|
-
"required": false
|
|
1895
|
+
],
|
|
1896
|
+
"returnType": "Promise<AgentSession[]>",
|
|
1897
|
+
"isStatic": false,
|
|
1898
|
+
"isPublic": true
|
|
1843
1899
|
},
|
|
1844
|
-
"
|
|
1845
|
-
"
|
|
1846
|
-
"
|
|
1847
|
-
"
|
|
1900
|
+
"findActiveSession": {
|
|
1901
|
+
"name": "findActiveSession",
|
|
1902
|
+
"async": true,
|
|
1903
|
+
"parameters": [
|
|
1904
|
+
{
|
|
1905
|
+
"name": "agentId",
|
|
1906
|
+
"type": "string",
|
|
1907
|
+
"optional": false
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
"name": "participantProfileId",
|
|
1911
|
+
"type": "string",
|
|
1912
|
+
"optional": false
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"name": "tenantId",
|
|
1916
|
+
"type": "string | null",
|
|
1917
|
+
"optional": false
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
"name": "sessionKey",
|
|
1921
|
+
"type": "string | null",
|
|
1922
|
+
"optional": true
|
|
1923
|
+
}
|
|
1924
|
+
],
|
|
1925
|
+
"returnType": "Promise<AgentSession | null>",
|
|
1926
|
+
"isStatic": false,
|
|
1927
|
+
"isPublic": true
|
|
1848
1928
|
},
|
|
1849
|
-
"
|
|
1850
|
-
"
|
|
1851
|
-
"
|
|
1852
|
-
"
|
|
1929
|
+
"findOrCreate": {
|
|
1930
|
+
"name": "findOrCreate",
|
|
1931
|
+
"async": true,
|
|
1932
|
+
"parameters": [
|
|
1933
|
+
{
|
|
1934
|
+
"name": "params",
|
|
1935
|
+
"type": "object",
|
|
1936
|
+
"optional": false
|
|
1937
|
+
}
|
|
1938
|
+
],
|
|
1939
|
+
"returnType": "Promise<AgentSession>",
|
|
1940
|
+
"isStatic": false,
|
|
1941
|
+
"isPublic": true
|
|
1853
1942
|
},
|
|
1854
|
-
"
|
|
1855
|
-
"
|
|
1856
|
-
"
|
|
1857
|
-
"
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
"
|
|
1865
|
-
"returnType": "boolean",
|
|
1943
|
+
"findByAgent": {
|
|
1944
|
+
"name": "findByAgent",
|
|
1945
|
+
"async": true,
|
|
1946
|
+
"parameters": [
|
|
1947
|
+
{
|
|
1948
|
+
"name": "agentId",
|
|
1949
|
+
"type": "string",
|
|
1950
|
+
"optional": false
|
|
1951
|
+
}
|
|
1952
|
+
],
|
|
1953
|
+
"returnType": "Promise<AgentSession[]>",
|
|
1866
1954
|
"isStatic": false,
|
|
1867
1955
|
"isPublic": true
|
|
1868
1956
|
},
|
|
1869
|
-
"
|
|
1870
|
-
"name": "
|
|
1871
|
-
"async":
|
|
1872
|
-
"parameters": [
|
|
1873
|
-
|
|
1957
|
+
"expireStale": {
|
|
1958
|
+
"name": "expireStale",
|
|
1959
|
+
"async": true,
|
|
1960
|
+
"parameters": [
|
|
1961
|
+
{
|
|
1962
|
+
"name": "olderThan",
|
|
1963
|
+
"type": "Date",
|
|
1964
|
+
"optional": false
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"name": "scope",
|
|
1968
|
+
"type": "object",
|
|
1969
|
+
"optional": true
|
|
1970
|
+
}
|
|
1971
|
+
],
|
|
1972
|
+
"returnType": "Promise<number>",
|
|
1874
1973
|
"isStatic": false,
|
|
1875
1974
|
"isPublic": true
|
|
1975
|
+
}
|
|
1976
|
+
},
|
|
1977
|
+
"decoratorConfig": {
|
|
1978
|
+
"tableName": "agent_sessions"
|
|
1979
|
+
},
|
|
1980
|
+
"extends": "SmrtCollection",
|
|
1981
|
+
"extendsTypeArg": "AgentSession",
|
|
1982
|
+
"exportName": "AgentSessionCollection",
|
|
1983
|
+
"collectionExportName": "AgentSessionCollectionCollection",
|
|
1984
|
+
"schema": {
|
|
1985
|
+
"tableName": "agent_sessions",
|
|
1986
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"agent_sessions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
1987
|
+
"columns": {
|
|
1988
|
+
"id": {
|
|
1989
|
+
"type": "UUID",
|
|
1990
|
+
"primaryKey": true,
|
|
1991
|
+
"referenceKind": "id",
|
|
1992
|
+
"notNull": true
|
|
1993
|
+
},
|
|
1994
|
+
"slug": {
|
|
1995
|
+
"type": "TEXT",
|
|
1996
|
+
"notNull": true
|
|
1997
|
+
},
|
|
1998
|
+
"context": {
|
|
1999
|
+
"type": "TEXT",
|
|
2000
|
+
"notNull": true,
|
|
2001
|
+
"default": ""
|
|
2002
|
+
},
|
|
2003
|
+
"created_at": {
|
|
2004
|
+
"type": "TIMESTAMP",
|
|
2005
|
+
"notNull": true,
|
|
2006
|
+
"default": "current_timestamp"
|
|
2007
|
+
},
|
|
2008
|
+
"updated_at": {
|
|
2009
|
+
"type": "TIMESTAMP",
|
|
2010
|
+
"notNull": true,
|
|
2011
|
+
"default": "current_timestamp"
|
|
2012
|
+
}
|
|
1876
2013
|
},
|
|
1877
|
-
"
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
2014
|
+
"indexes": [
|
|
2015
|
+
{
|
|
2016
|
+
"name": "agent_sessions_id_idx",
|
|
2017
|
+
"columns": [
|
|
2018
|
+
"id"
|
|
2019
|
+
]
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
"name": "agent_sessions_slug_context_idx",
|
|
2023
|
+
"columns": [
|
|
2024
|
+
"slug",
|
|
2025
|
+
"context"
|
|
2026
|
+
],
|
|
2027
|
+
"unique": true
|
|
2028
|
+
}
|
|
2029
|
+
],
|
|
2030
|
+
"version": "e5de0db6"
|
|
2031
|
+
}
|
|
2032
|
+
},
|
|
2033
|
+
"@happyvertical/smrt-chat:ChatMessageCollection": {
|
|
2034
|
+
"name": "chatmessagecollection",
|
|
2035
|
+
"className": "ChatMessageCollection",
|
|
2036
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatMessageCollection",
|
|
2037
|
+
"collection": "chatmessages",
|
|
2038
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatMessageCollection.ts",
|
|
2039
|
+
"packageName": "@happyvertical/smrt-chat",
|
|
2040
|
+
"fields": {},
|
|
2041
|
+
"methods": {
|
|
2042
|
+
"getByRoom": {
|
|
2043
|
+
"name": "getByRoom",
|
|
2044
|
+
"async": true,
|
|
2045
|
+
"parameters": [
|
|
2046
|
+
{
|
|
2047
|
+
"name": "roomId",
|
|
2048
|
+
"type": "string",
|
|
2049
|
+
"optional": false
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"name": "tenantId",
|
|
2053
|
+
"type": "string",
|
|
2054
|
+
"optional": false
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
"name": "options",
|
|
2058
|
+
"type": "object",
|
|
2059
|
+
"optional": true
|
|
2060
|
+
}
|
|
2061
|
+
],
|
|
2062
|
+
"returnType": "Promise<ChatMessage[]>",
|
|
1882
2063
|
"isStatic": false,
|
|
1883
2064
|
"isPublic": true
|
|
1884
2065
|
},
|
|
1885
|
-
"
|
|
1886
|
-
"name": "
|
|
2066
|
+
"getByThread": {
|
|
2067
|
+
"name": "getByThread",
|
|
1887
2068
|
"async": true,
|
|
1888
2069
|
"parameters": [
|
|
1889
2070
|
{
|
|
1890
|
-
"name": "
|
|
2071
|
+
"name": "threadId",
|
|
2072
|
+
"type": "string",
|
|
2073
|
+
"optional": false
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
"name": "tenantId",
|
|
1891
2077
|
"type": "string",
|
|
1892
2078
|
"optional": false
|
|
1893
2079
|
}
|
|
1894
2080
|
],
|
|
1895
|
-
"returnType": "Promise<
|
|
2081
|
+
"returnType": "Promise<ChatMessage[]>",
|
|
1896
2082
|
"isStatic": false,
|
|
1897
2083
|
"isPublic": true
|
|
1898
2084
|
},
|
|
1899
|
-
"
|
|
1900
|
-
"name": "
|
|
2085
|
+
"getByAgentSession": {
|
|
2086
|
+
"name": "getByAgentSession",
|
|
1901
2087
|
"async": true,
|
|
1902
|
-
"parameters": [
|
|
1903
|
-
|
|
2088
|
+
"parameters": [
|
|
2089
|
+
{
|
|
2090
|
+
"name": "agentSessionId",
|
|
2091
|
+
"type": "string",
|
|
2092
|
+
"optional": false
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
"name": "tenantId",
|
|
2096
|
+
"type": "string",
|
|
2097
|
+
"optional": false
|
|
2098
|
+
}
|
|
2099
|
+
],
|
|
2100
|
+
"returnType": "Promise<ChatMessage[]>",
|
|
1904
2101
|
"isStatic": false,
|
|
1905
2102
|
"isPublic": true
|
|
1906
2103
|
},
|
|
1907
|
-
"
|
|
1908
|
-
"name": "
|
|
2104
|
+
"search": {
|
|
2105
|
+
"name": "search",
|
|
1909
2106
|
"async": true,
|
|
1910
2107
|
"parameters": [
|
|
1911
2108
|
{
|
|
1912
|
-
"name": "
|
|
1913
|
-
"type": "
|
|
2109
|
+
"name": "filters",
|
|
2110
|
+
"type": "any",
|
|
1914
2111
|
"optional": false
|
|
1915
2112
|
}
|
|
1916
2113
|
],
|
|
1917
|
-
"returnType": "Promise<
|
|
2114
|
+
"returnType": "Promise<ChatMessage[]>",
|
|
1918
2115
|
"isStatic": false,
|
|
1919
2116
|
"isPublic": true
|
|
1920
|
-
}
|
|
1921
|
-
},
|
|
1922
|
-
"decoratorConfig": {
|
|
1923
|
-
"tableName": "chat_participants",
|
|
1924
|
-
"api": {
|
|
1925
|
-
"include": [
|
|
1926
|
-
"list",
|
|
1927
|
-
"get"
|
|
1928
|
-
]
|
|
1929
|
-
},
|
|
1930
|
-
"mcp": {
|
|
1931
|
-
"include": [
|
|
1932
|
-
"list",
|
|
1933
|
-
"get"
|
|
1934
|
-
]
|
|
1935
|
-
},
|
|
1936
|
-
"cli": true,
|
|
1937
|
-
"tenantScoped": {
|
|
1938
|
-
"mode": "required"
|
|
1939
|
-
}
|
|
1940
|
-
},
|
|
1941
|
-
"extends": "SmrtObject",
|
|
1942
|
-
"exportName": "ChatParticipant",
|
|
1943
|
-
"collectionExportName": "ChatParticipantCollection",
|
|
1944
|
-
"validationRules": [
|
|
1945
|
-
{
|
|
1946
|
-
"field": "tenantId",
|
|
1947
|
-
"rule": "required",
|
|
1948
|
-
"fieldType": "text"
|
|
1949
|
-
},
|
|
1950
|
-
{
|
|
1951
|
-
"field": "roomId",
|
|
1952
|
-
"rule": "required",
|
|
1953
|
-
"fieldType": "foreignKey"
|
|
1954
|
-
},
|
|
1955
|
-
{
|
|
1956
|
-
"field": "profileId",
|
|
1957
|
-
"rule": "required",
|
|
1958
|
-
"fieldType": "crossPackageRef"
|
|
1959
|
-
},
|
|
1960
|
-
{
|
|
1961
|
-
"field": "role",
|
|
1962
|
-
"rule": "required",
|
|
1963
|
-
"fieldType": "text"
|
|
1964
2117
|
},
|
|
1965
|
-
{
|
|
1966
|
-
"
|
|
1967
|
-
"
|
|
1968
|
-
"
|
|
2118
|
+
"getUnreadCount": {
|
|
2119
|
+
"name": "getUnreadCount",
|
|
2120
|
+
"async": true,
|
|
2121
|
+
"parameters": [
|
|
2122
|
+
{
|
|
2123
|
+
"name": "roomId",
|
|
2124
|
+
"type": "string",
|
|
2125
|
+
"optional": false
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"name": "tenantId",
|
|
2129
|
+
"type": "string",
|
|
2130
|
+
"optional": false
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"name": "lastReadMessageId",
|
|
2134
|
+
"type": "string | null",
|
|
2135
|
+
"optional": false
|
|
2136
|
+
}
|
|
2137
|
+
],
|
|
2138
|
+
"returnType": "Promise<number>",
|
|
2139
|
+
"isStatic": false,
|
|
2140
|
+
"isPublic": true
|
|
1969
2141
|
},
|
|
1970
|
-
{
|
|
1971
|
-
"
|
|
1972
|
-
"
|
|
1973
|
-
"
|
|
2142
|
+
"getLatestPerRoom": {
|
|
2143
|
+
"name": "getLatestPerRoom",
|
|
2144
|
+
"async": true,
|
|
2145
|
+
"parameters": [
|
|
2146
|
+
{
|
|
2147
|
+
"name": "roomIds",
|
|
2148
|
+
"type": "string[]",
|
|
2149
|
+
"optional": false
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
"name": "tenantId",
|
|
2153
|
+
"type": "string",
|
|
2154
|
+
"optional": false
|
|
2155
|
+
}
|
|
2156
|
+
],
|
|
2157
|
+
"returnType": "Promise<Map<string, ChatMessage>>",
|
|
2158
|
+
"isStatic": false,
|
|
2159
|
+
"isPublic": true
|
|
1974
2160
|
}
|
|
1975
|
-
|
|
2161
|
+
},
|
|
2162
|
+
"decoratorConfig": {
|
|
2163
|
+
"tableName": "chat_messages"
|
|
2164
|
+
},
|
|
2165
|
+
"extends": "SmrtCollection",
|
|
2166
|
+
"extendsTypeArg": "ChatMessage",
|
|
2167
|
+
"exportName": "ChatMessageCollection",
|
|
2168
|
+
"collectionExportName": "ChatMessageCollectionCollection",
|
|
1976
2169
|
"schema": {
|
|
1977
|
-
"tableName": "
|
|
1978
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
2170
|
+
"tableName": "chat_messages",
|
|
2171
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_messages\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
1979
2172
|
"columns": {
|
|
1980
2173
|
"id": {
|
|
1981
2174
|
"type": "UUID",
|
|
@@ -2001,87 +2194,17 @@
|
|
|
2001
2194
|
"type": "TIMESTAMP",
|
|
2002
2195
|
"notNull": true,
|
|
2003
2196
|
"default": "current_timestamp"
|
|
2004
|
-
},
|
|
2005
|
-
"tenant_id": {
|
|
2006
|
-
"type": "UUID",
|
|
2007
|
-
"referenceKind": "tenantId",
|
|
2008
|
-
"notNull": true,
|
|
2009
|
-
"unique": false
|
|
2010
|
-
},
|
|
2011
|
-
"room_id": {
|
|
2012
|
-
"type": "UUID",
|
|
2013
|
-
"referenceKind": "foreignKey",
|
|
2014
|
-
"notNull": true,
|
|
2015
|
-
"unique": false
|
|
2016
|
-
},
|
|
2017
|
-
"profile_id": {
|
|
2018
|
-
"type": "UUID",
|
|
2019
|
-
"referenceKind": "crossPackageRef",
|
|
2020
|
-
"notNull": true,
|
|
2021
|
-
"unique": false
|
|
2022
|
-
},
|
|
2023
|
-
"role": {
|
|
2024
|
-
"type": "TEXT",
|
|
2025
|
-
"notNull": true,
|
|
2026
|
-
"unique": false,
|
|
2027
|
-
"default": "member"
|
|
2028
|
-
},
|
|
2029
|
-
"status": {
|
|
2030
|
-
"type": "TEXT",
|
|
2031
|
-
"notNull": true,
|
|
2032
|
-
"unique": false,
|
|
2033
|
-
"default": "active"
|
|
2034
|
-
},
|
|
2035
|
-
"online_status": {
|
|
2036
|
-
"type": "TEXT",
|
|
2037
|
-
"notNull": true,
|
|
2038
|
-
"unique": false,
|
|
2039
|
-
"default": "offline"
|
|
2040
|
-
},
|
|
2041
|
-
"last_read_message_id": {
|
|
2042
|
-
"type": "UUID",
|
|
2043
|
-
"referenceKind": "foreignKey",
|
|
2044
|
-
"notNull": false,
|
|
2045
|
-
"unique": false
|
|
2046
|
-
},
|
|
2047
|
-
"last_seen_at": {
|
|
2048
|
-
"type": "TIMESTAMP",
|
|
2049
|
-
"notNull": false,
|
|
2050
|
-
"unique": false
|
|
2051
|
-
},
|
|
2052
|
-
"joined_at": {
|
|
2053
|
-
"type": "TIMESTAMP",
|
|
2054
|
-
"notNull": false,
|
|
2055
|
-
"unique": false
|
|
2056
|
-
},
|
|
2057
|
-
"nickname": {
|
|
2058
|
-
"type": "TEXT",
|
|
2059
|
-
"notNull": false,
|
|
2060
|
-
"unique": false,
|
|
2061
|
-
"default": ""
|
|
2062
|
-
},
|
|
2063
|
-
"is_muted": {
|
|
2064
|
-
"type": "BOOLEAN",
|
|
2065
|
-
"notNull": false,
|
|
2066
|
-
"unique": false,
|
|
2067
|
-
"default": false
|
|
2068
|
-
},
|
|
2069
|
-
"is_pinned": {
|
|
2070
|
-
"type": "BOOLEAN",
|
|
2071
|
-
"notNull": false,
|
|
2072
|
-
"unique": false,
|
|
2073
|
-
"default": false
|
|
2074
2197
|
}
|
|
2075
2198
|
},
|
|
2076
2199
|
"indexes": [
|
|
2077
2200
|
{
|
|
2078
|
-
"name": "
|
|
2201
|
+
"name": "chat_messages_id_idx",
|
|
2079
2202
|
"columns": [
|
|
2080
2203
|
"id"
|
|
2081
2204
|
]
|
|
2082
2205
|
},
|
|
2083
2206
|
{
|
|
2084
|
-
"name": "
|
|
2207
|
+
"name": "chat_messages_slug_context_idx",
|
|
2085
2208
|
"columns": [
|
|
2086
2209
|
"slug",
|
|
2087
2210
|
"context"
|
|
@@ -2089,102 +2212,171 @@
|
|
|
2089
2212
|
"unique": true
|
|
2090
2213
|
}
|
|
2091
2214
|
],
|
|
2092
|
-
"version": "
|
|
2215
|
+
"version": "13b2dccb"
|
|
2093
2216
|
}
|
|
2094
2217
|
},
|
|
2095
|
-
"@happyvertical/smrt-chat:
|
|
2096
|
-
"name": "
|
|
2097
|
-
"className": "
|
|
2098
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
2099
|
-
"collection": "
|
|
2100
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
2218
|
+
"@happyvertical/smrt-chat:ChatParticipantCollection": {
|
|
2219
|
+
"name": "chatparticipantcollection",
|
|
2220
|
+
"className": "ChatParticipantCollection",
|
|
2221
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatParticipantCollection",
|
|
2222
|
+
"collection": "chatparticipants",
|
|
2223
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatParticipantCollection.ts",
|
|
2101
2224
|
"packageName": "@happyvertical/smrt-chat",
|
|
2102
|
-
"fields": {
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
"
|
|
2106
|
-
"
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
"
|
|
2110
|
-
"
|
|
2111
|
-
"
|
|
2112
|
-
"autoPopulate": true,
|
|
2113
|
-
"nullable": false,
|
|
2114
|
-
"mode": "required",
|
|
2115
|
-
"field": "tenantId",
|
|
2116
|
-
"allowSuperAdminBypass": false
|
|
2225
|
+
"fields": {},
|
|
2226
|
+
"methods": {
|
|
2227
|
+
"getByRoom": {
|
|
2228
|
+
"name": "getByRoom",
|
|
2229
|
+
"async": true,
|
|
2230
|
+
"parameters": [
|
|
2231
|
+
{
|
|
2232
|
+
"name": "roomId",
|
|
2233
|
+
"type": "string",
|
|
2234
|
+
"optional": false
|
|
2117
2235
|
}
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
"
|
|
2122
|
-
"required": true,
|
|
2123
|
-
"related": "ChatMessage",
|
|
2124
|
-
"_meta": {
|
|
2125
|
-
"required": true
|
|
2126
|
-
}
|
|
2236
|
+
],
|
|
2237
|
+
"returnType": "Promise<ChatParticipant[]>",
|
|
2238
|
+
"isStatic": false,
|
|
2239
|
+
"isPublic": true
|
|
2127
2240
|
},
|
|
2128
|
-
"
|
|
2129
|
-
"
|
|
2130
|
-
"
|
|
2131
|
-
"
|
|
2241
|
+
"getByProfile": {
|
|
2242
|
+
"name": "getByProfile",
|
|
2243
|
+
"async": true,
|
|
2244
|
+
"parameters": [
|
|
2245
|
+
{
|
|
2246
|
+
"name": "profileId",
|
|
2247
|
+
"type": "string",
|
|
2248
|
+
"optional": false
|
|
2249
|
+
}
|
|
2250
|
+
],
|
|
2251
|
+
"returnType": "Promise<ChatParticipant[]>",
|
|
2252
|
+
"isStatic": false,
|
|
2253
|
+
"isPublic": true
|
|
2132
2254
|
},
|
|
2133
|
-
"
|
|
2134
|
-
"
|
|
2135
|
-
"
|
|
2136
|
-
"
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2255
|
+
"findMembership": {
|
|
2256
|
+
"name": "findMembership",
|
|
2257
|
+
"async": true,
|
|
2258
|
+
"parameters": [
|
|
2259
|
+
{
|
|
2260
|
+
"name": "roomId",
|
|
2261
|
+
"type": "string",
|
|
2262
|
+
"optional": false
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
"name": "profileId",
|
|
2266
|
+
"type": "string",
|
|
2267
|
+
"optional": false
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
"name": "tenantId",
|
|
2271
|
+
"type": "string",
|
|
2272
|
+
"optional": true
|
|
2273
|
+
}
|
|
2274
|
+
],
|
|
2275
|
+
"returnType": "Promise<ChatParticipant | null>",
|
|
2276
|
+
"isStatic": false,
|
|
2277
|
+
"isPublic": true
|
|
2149
2278
|
},
|
|
2150
|
-
"
|
|
2151
|
-
"
|
|
2152
|
-
|
|
2153
|
-
|
|
2279
|
+
"findActiveMembership": {
|
|
2280
|
+
"name": "findActiveMembership",
|
|
2281
|
+
"async": true,
|
|
2282
|
+
"parameters": [
|
|
2283
|
+
{
|
|
2284
|
+
"name": "roomId",
|
|
2285
|
+
"type": "string",
|
|
2286
|
+
"optional": false
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
"name": "profileId",
|
|
2290
|
+
"type": "string",
|
|
2291
|
+
"optional": false
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
"name": "tenantId",
|
|
2295
|
+
"type": "string",
|
|
2296
|
+
"optional": false
|
|
2297
|
+
}
|
|
2298
|
+
],
|
|
2299
|
+
"returnType": "Promise<ChatParticipant | null>",
|
|
2300
|
+
"isStatic": false,
|
|
2301
|
+
"isPublic": true
|
|
2154
2302
|
},
|
|
2155
|
-
"
|
|
2156
|
-
|
|
2157
|
-
"
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2303
|
+
"isActiveMember": {
|
|
2304
|
+
"name": "isActiveMember",
|
|
2305
|
+
"async": true,
|
|
2306
|
+
"parameters": [
|
|
2307
|
+
{
|
|
2308
|
+
"name": "roomId",
|
|
2309
|
+
"type": "string",
|
|
2310
|
+
"optional": false
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"name": "profileId",
|
|
2314
|
+
"type": "string",
|
|
2315
|
+
"optional": false
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
"name": "tenantId",
|
|
2319
|
+
"type": "string",
|
|
2320
|
+
"optional": false
|
|
2321
|
+
}
|
|
2322
|
+
],
|
|
2323
|
+
"returnType": "Promise<boolean>",
|
|
2324
|
+
"isStatic": false,
|
|
2325
|
+
"isPublic": true
|
|
2168
2326
|
},
|
|
2169
|
-
{
|
|
2170
|
-
"
|
|
2171
|
-
"
|
|
2172
|
-
"
|
|
2327
|
+
"getOnlineInRoom": {
|
|
2328
|
+
"name": "getOnlineInRoom",
|
|
2329
|
+
"async": true,
|
|
2330
|
+
"parameters": [
|
|
2331
|
+
{
|
|
2332
|
+
"name": "roomId",
|
|
2333
|
+
"type": "string",
|
|
2334
|
+
"optional": false
|
|
2335
|
+
}
|
|
2336
|
+
],
|
|
2337
|
+
"returnType": "Promise<ChatParticipant[]>",
|
|
2338
|
+
"isStatic": false,
|
|
2339
|
+
"isPublic": true
|
|
2173
2340
|
},
|
|
2174
|
-
{
|
|
2175
|
-
"
|
|
2176
|
-
"
|
|
2177
|
-
"
|
|
2341
|
+
"getAdminsInRoom": {
|
|
2342
|
+
"name": "getAdminsInRoom",
|
|
2343
|
+
"async": true,
|
|
2344
|
+
"parameters": [
|
|
2345
|
+
{
|
|
2346
|
+
"name": "roomId",
|
|
2347
|
+
"type": "string",
|
|
2348
|
+
"optional": false
|
|
2349
|
+
}
|
|
2350
|
+
],
|
|
2351
|
+
"returnType": "Promise<ChatParticipant[]>",
|
|
2352
|
+
"isStatic": false,
|
|
2353
|
+
"isPublic": true
|
|
2178
2354
|
},
|
|
2179
|
-
{
|
|
2180
|
-
"
|
|
2181
|
-
"
|
|
2182
|
-
"
|
|
2355
|
+
"countInRoom": {
|
|
2356
|
+
"name": "countInRoom",
|
|
2357
|
+
"async": true,
|
|
2358
|
+
"parameters": [
|
|
2359
|
+
{
|
|
2360
|
+
"name": "roomId",
|
|
2361
|
+
"type": "string",
|
|
2362
|
+
"optional": false
|
|
2363
|
+
}
|
|
2364
|
+
],
|
|
2365
|
+
"returnType": "Promise<number>",
|
|
2366
|
+
"isStatic": false,
|
|
2367
|
+
"isPublic": true
|
|
2183
2368
|
}
|
|
2184
|
-
|
|
2369
|
+
},
|
|
2370
|
+
"decoratorConfig": {
|
|
2371
|
+
"tableName": "chat_participants"
|
|
2372
|
+
},
|
|
2373
|
+
"extends": "SmrtCollection",
|
|
2374
|
+
"extendsTypeArg": "ChatParticipant",
|
|
2375
|
+
"exportName": "ChatParticipantCollection",
|
|
2376
|
+
"collectionExportName": "ChatParticipantCollectionCollection",
|
|
2185
2377
|
"schema": {
|
|
2186
|
-
"tableName": "
|
|
2187
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
2378
|
+
"tableName": "chat_participants",
|
|
2379
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_participants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2188
2380
|
"columns": {
|
|
2189
2381
|
"id": {
|
|
2190
2382
|
"type": "UUID",
|
|
@@ -2210,265 +2402,104 @@
|
|
|
2210
2402
|
"type": "TIMESTAMP",
|
|
2211
2403
|
"notNull": true,
|
|
2212
2404
|
"default": "current_timestamp"
|
|
2213
|
-
},
|
|
2214
|
-
"tenant_id": {
|
|
2215
|
-
"type": "UUID",
|
|
2216
|
-
"referenceKind": "tenantId",
|
|
2217
|
-
"notNull": true,
|
|
2218
|
-
"unique": false
|
|
2219
|
-
},
|
|
2220
|
-
"message_id": {
|
|
2221
|
-
"type": "UUID",
|
|
2222
|
-
"referenceKind": "foreignKey",
|
|
2223
|
-
"notNull": true,
|
|
2224
|
-
"unique": false
|
|
2225
|
-
},
|
|
2226
|
-
"profile_id": {
|
|
2227
|
-
"type": "UUID",
|
|
2228
|
-
"referenceKind": "crossPackageRef",
|
|
2229
|
-
"notNull": true,
|
|
2230
|
-
"unique": false
|
|
2231
|
-
},
|
|
2232
|
-
"emoji": {
|
|
2233
|
-
"type": "TEXT",
|
|
2234
|
-
"notNull": true,
|
|
2235
|
-
"unique": false,
|
|
2236
|
-
"default": ""
|
|
2237
2405
|
}
|
|
2238
2406
|
},
|
|
2239
2407
|
"indexes": [
|
|
2240
2408
|
{
|
|
2241
|
-
"name": "
|
|
2409
|
+
"name": "chat_participants_id_idx",
|
|
2242
2410
|
"columns": [
|
|
2243
2411
|
"id"
|
|
2244
2412
|
]
|
|
2245
2413
|
},
|
|
2246
2414
|
{
|
|
2247
|
-
"name": "
|
|
2415
|
+
"name": "chat_participants_slug_context_idx",
|
|
2248
2416
|
"columns": [
|
|
2249
2417
|
"slug",
|
|
2250
|
-
"context"
|
|
2251
|
-
],
|
|
2252
|
-
"unique": true
|
|
2253
|
-
}
|
|
2254
|
-
],
|
|
2255
|
-
"version": "
|
|
2256
|
-
}
|
|
2257
|
-
},
|
|
2258
|
-
"@happyvertical/smrt-chat:
|
|
2259
|
-
"name": "
|
|
2260
|
-
"className": "
|
|
2261
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
2262
|
-
"collection": "
|
|
2263
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
2264
|
-
"packageName": "@happyvertical/smrt-chat",
|
|
2265
|
-
"fields": {
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
"
|
|
2269
|
-
"
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
"
|
|
2273
|
-
"
|
|
2274
|
-
"
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
"field": "tenantId",
|
|
2279
|
-
"allowSuperAdminBypass": false
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
},
|
|
2283
|
-
"name": {
|
|
2284
|
-
"type": "text",
|
|
2285
|
-
"required": false,
|
|
2286
|
-
"default": ""
|
|
2287
|
-
},
|
|
2288
|
-
"description": {
|
|
2289
|
-
"type": "text",
|
|
2290
|
-
"required": false,
|
|
2291
|
-
"default": ""
|
|
2292
|
-
},
|
|
2293
|
-
"roomType": {
|
|
2294
|
-
"type": "text",
|
|
2295
|
-
"required": true,
|
|
2296
|
-
"default": "public",
|
|
2297
|
-
"_meta": {
|
|
2298
|
-
"required": true
|
|
2299
|
-
}
|
|
2300
|
-
},
|
|
2301
|
-
"status": {
|
|
2302
|
-
"type": "text",
|
|
2303
|
-
"required": true,
|
|
2304
|
-
"default": "active",
|
|
2305
|
-
"_meta": {
|
|
2306
|
-
"required": true
|
|
2307
|
-
}
|
|
2308
|
-
},
|
|
2309
|
-
"topic": {
|
|
2310
|
-
"type": "text",
|
|
2311
|
-
"required": false,
|
|
2312
|
-
"default": ""
|
|
2313
|
-
},
|
|
2314
|
-
"avatarUrl": {
|
|
2315
|
-
"type": "text",
|
|
2316
|
-
"required": false,
|
|
2317
|
-
"default": ""
|
|
2318
|
-
},
|
|
2319
|
-
"isArchived": {
|
|
2320
|
-
"type": "boolean",
|
|
2321
|
-
"required": false,
|
|
2322
|
-
"default": false
|
|
2323
|
-
},
|
|
2324
|
-
"maxParticipants": {
|
|
2325
|
-
"type": "integer",
|
|
2326
|
-
"required": false,
|
|
2327
|
-
"default": 0
|
|
2328
|
-
},
|
|
2329
|
-
"metadata": {
|
|
2330
|
-
"type": "text",
|
|
2331
|
-
"required": false,
|
|
2332
|
-
"default": "{}"
|
|
2333
|
-
},
|
|
2334
|
-
"createdByProfileId": {
|
|
2335
|
-
"type": "crossPackageRef",
|
|
2336
|
-
"required": false,
|
|
2337
|
-
"related": "@happyvertical/smrt-profiles:Profile"
|
|
2338
|
-
},
|
|
2339
|
-
"lastMessageAt": {
|
|
2340
|
-
"type": "datetime",
|
|
2341
|
-
"required": false
|
|
2342
|
-
}
|
|
2343
|
-
},
|
|
2344
|
-
"methods": {
|
|
2345
|
-
"getMetadata": {
|
|
2346
|
-
"name": "getMetadata",
|
|
2347
|
-
"async": false,
|
|
2348
|
-
"parameters": [],
|
|
2349
|
-
"returnType": "ChatRoomMetadata",
|
|
2350
|
-
"isStatic": false,
|
|
2351
|
-
"isPublic": true
|
|
2352
|
-
},
|
|
2353
|
-
"setMetadata": {
|
|
2354
|
-
"name": "setMetadata",
|
|
2355
|
-
"async": false,
|
|
2356
|
-
"parameters": [
|
|
2357
|
-
{
|
|
2358
|
-
"name": "data",
|
|
2359
|
-
"type": "ChatRoomMetadata",
|
|
2360
|
-
"optional": false
|
|
2361
|
-
}
|
|
2362
|
-
],
|
|
2363
|
-
"returnType": "void",
|
|
2364
|
-
"isStatic": false,
|
|
2365
|
-
"isPublic": true
|
|
2366
|
-
},
|
|
2367
|
-
"updateMetadata": {
|
|
2368
|
-
"name": "updateMetadata",
|
|
2369
|
-
"async": false,
|
|
2370
|
-
"parameters": [
|
|
2371
|
-
{
|
|
2372
|
-
"name": "updates",
|
|
2373
|
-
"type": "ChatRoomMetadata",
|
|
2374
|
-
"optional": false
|
|
2375
|
-
}
|
|
2376
|
-
],
|
|
2377
|
-
"returnType": "void",
|
|
2378
|
-
"isStatic": false,
|
|
2379
|
-
"isPublic": true
|
|
2380
|
-
},
|
|
2381
|
-
"isDM": {
|
|
2382
|
-
"name": "isDM",
|
|
2383
|
-
"async": false,
|
|
2384
|
-
"parameters": [],
|
|
2385
|
-
"returnType": "boolean",
|
|
2386
|
-
"isStatic": false,
|
|
2387
|
-
"isPublic": true
|
|
2388
|
-
},
|
|
2389
|
-
"isAgentRoom": {
|
|
2390
|
-
"name": "isAgentRoom",
|
|
2391
|
-
"async": false,
|
|
2392
|
-
"parameters": [],
|
|
2393
|
-
"returnType": "boolean",
|
|
2394
|
-
"isStatic": false,
|
|
2395
|
-
"isPublic": true
|
|
2396
|
-
},
|
|
2397
|
-
"isPublic": {
|
|
2398
|
-
"name": "isPublic",
|
|
2399
|
-
"async": false,
|
|
2400
|
-
"parameters": [],
|
|
2401
|
-
"returnType": "boolean",
|
|
2402
|
-
"isStatic": false,
|
|
2403
|
-
"isPublic": true
|
|
2404
|
-
},
|
|
2405
|
-
"isActive": {
|
|
2406
|
-
"name": "isActive",
|
|
2407
|
-
"async": false,
|
|
2408
|
-
"parameters": [],
|
|
2409
|
-
"returnType": "boolean",
|
|
2418
|
+
"context"
|
|
2419
|
+
],
|
|
2420
|
+
"unique": true
|
|
2421
|
+
}
|
|
2422
|
+
],
|
|
2423
|
+
"version": "f70abec0"
|
|
2424
|
+
}
|
|
2425
|
+
},
|
|
2426
|
+
"@happyvertical/smrt-chat:ChatReactionCollection": {
|
|
2427
|
+
"name": "chatreactioncollection",
|
|
2428
|
+
"className": "ChatReactionCollection",
|
|
2429
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatReactionCollection",
|
|
2430
|
+
"collection": "chatreactions",
|
|
2431
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatReactionCollection.ts",
|
|
2432
|
+
"packageName": "@happyvertical/smrt-chat",
|
|
2433
|
+
"fields": {},
|
|
2434
|
+
"methods": {
|
|
2435
|
+
"getByMessage": {
|
|
2436
|
+
"name": "getByMessage",
|
|
2437
|
+
"async": true,
|
|
2438
|
+
"parameters": [
|
|
2439
|
+
{
|
|
2440
|
+
"name": "messageId",
|
|
2441
|
+
"type": "string",
|
|
2442
|
+
"optional": false
|
|
2443
|
+
}
|
|
2444
|
+
],
|
|
2445
|
+
"returnType": "Promise<ChatReaction[]>",
|
|
2410
2446
|
"isStatic": false,
|
|
2411
2447
|
"isPublic": true
|
|
2412
2448
|
},
|
|
2413
|
-
"
|
|
2414
|
-
"name": "
|
|
2449
|
+
"getReactionCounts": {
|
|
2450
|
+
"name": "getReactionCounts",
|
|
2415
2451
|
"async": true,
|
|
2416
|
-
"parameters": [
|
|
2417
|
-
|
|
2452
|
+
"parameters": [
|
|
2453
|
+
{
|
|
2454
|
+
"name": "messageId",
|
|
2455
|
+
"type": "string",
|
|
2456
|
+
"optional": false
|
|
2457
|
+
}
|
|
2458
|
+
],
|
|
2459
|
+
"returnType": "Promise<Map<string, object>>",
|
|
2418
2460
|
"isStatic": false,
|
|
2419
2461
|
"isPublic": true
|
|
2420
2462
|
},
|
|
2421
|
-
"
|
|
2422
|
-
"name": "
|
|
2463
|
+
"toggle": {
|
|
2464
|
+
"name": "toggle",
|
|
2423
2465
|
"async": true,
|
|
2424
|
-
"parameters": [
|
|
2425
|
-
|
|
2466
|
+
"parameters": [
|
|
2467
|
+
{
|
|
2468
|
+
"name": "messageId",
|
|
2469
|
+
"type": "string",
|
|
2470
|
+
"optional": false
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
"name": "profileId",
|
|
2474
|
+
"type": "string",
|
|
2475
|
+
"optional": false
|
|
2476
|
+
},
|
|
2477
|
+
{
|
|
2478
|
+
"name": "emoji",
|
|
2479
|
+
"type": "string",
|
|
2480
|
+
"optional": false
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
"name": "tenantId",
|
|
2484
|
+
"type": "string",
|
|
2485
|
+
"optional": false
|
|
2486
|
+
}
|
|
2487
|
+
],
|
|
2488
|
+
"returnType": "Promise<object>",
|
|
2426
2489
|
"isStatic": false,
|
|
2427
2490
|
"isPublic": true
|
|
2428
2491
|
}
|
|
2429
2492
|
},
|
|
2430
2493
|
"decoratorConfig": {
|
|
2431
|
-
"tableName": "
|
|
2432
|
-
"api": {
|
|
2433
|
-
"include": [
|
|
2434
|
-
"list",
|
|
2435
|
-
"get"
|
|
2436
|
-
]
|
|
2437
|
-
},
|
|
2438
|
-
"mcp": {
|
|
2439
|
-
"include": [
|
|
2440
|
-
"list",
|
|
2441
|
-
"get"
|
|
2442
|
-
]
|
|
2443
|
-
},
|
|
2444
|
-
"cli": true,
|
|
2445
|
-
"tenantScoped": {
|
|
2446
|
-
"mode": "required"
|
|
2447
|
-
}
|
|
2494
|
+
"tableName": "chat_reactions"
|
|
2448
2495
|
},
|
|
2449
|
-
"extends": "
|
|
2450
|
-
"
|
|
2451
|
-
"
|
|
2452
|
-
"
|
|
2453
|
-
{
|
|
2454
|
-
"field": "tenantId",
|
|
2455
|
-
"rule": "required",
|
|
2456
|
-
"fieldType": "text"
|
|
2457
|
-
},
|
|
2458
|
-
{
|
|
2459
|
-
"field": "roomType",
|
|
2460
|
-
"rule": "required",
|
|
2461
|
-
"fieldType": "text"
|
|
2462
|
-
},
|
|
2463
|
-
{
|
|
2464
|
-
"field": "status",
|
|
2465
|
-
"rule": "required",
|
|
2466
|
-
"fieldType": "text"
|
|
2467
|
-
}
|
|
2468
|
-
],
|
|
2496
|
+
"extends": "SmrtCollection",
|
|
2497
|
+
"extendsTypeArg": "ChatReaction",
|
|
2498
|
+
"exportName": "ChatReactionCollection",
|
|
2499
|
+
"collectionExportName": "ChatReactionCollectionCollection",
|
|
2469
2500
|
"schema": {
|
|
2470
|
-
"tableName": "
|
|
2471
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
2501
|
+
"tableName": "chat_reactions",
|
|
2502
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_reactions\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2472
2503
|
"columns": {
|
|
2473
2504
|
"id": {
|
|
2474
2505
|
"type": "UUID",
|
|
@@ -2494,77 +2525,158 @@
|
|
|
2494
2525
|
"type": "TIMESTAMP",
|
|
2495
2526
|
"notNull": true,
|
|
2496
2527
|
"default": "current_timestamp"
|
|
2528
|
+
}
|
|
2529
|
+
},
|
|
2530
|
+
"indexes": [
|
|
2531
|
+
{
|
|
2532
|
+
"name": "chat_reactions_id_idx",
|
|
2533
|
+
"columns": [
|
|
2534
|
+
"id"
|
|
2535
|
+
]
|
|
2497
2536
|
},
|
|
2498
|
-
|
|
2499
|
-
"
|
|
2500
|
-
"
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2537
|
+
{
|
|
2538
|
+
"name": "chat_reactions_slug_context_idx",
|
|
2539
|
+
"columns": [
|
|
2540
|
+
"slug",
|
|
2541
|
+
"context"
|
|
2542
|
+
],
|
|
2543
|
+
"unique": true
|
|
2544
|
+
}
|
|
2545
|
+
],
|
|
2546
|
+
"version": "0ea62683"
|
|
2547
|
+
}
|
|
2548
|
+
},
|
|
2549
|
+
"@happyvertical/smrt-chat:ChatRoomCollection": {
|
|
2550
|
+
"name": "chatroomcollection",
|
|
2551
|
+
"className": "ChatRoomCollection",
|
|
2552
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatRoomCollection",
|
|
2553
|
+
"collection": "chatrooms",
|
|
2554
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatRoomCollection.ts",
|
|
2555
|
+
"packageName": "@happyvertical/smrt-chat",
|
|
2556
|
+
"fields": {},
|
|
2557
|
+
"methods": {
|
|
2558
|
+
"findByType": {
|
|
2559
|
+
"name": "findByType",
|
|
2560
|
+
"async": true,
|
|
2561
|
+
"parameters": [
|
|
2562
|
+
{
|
|
2563
|
+
"name": "roomType",
|
|
2564
|
+
"type": "ChatRoomType",
|
|
2565
|
+
"optional": false
|
|
2566
|
+
}
|
|
2567
|
+
],
|
|
2568
|
+
"returnType": "Promise<ChatRoom[]>",
|
|
2569
|
+
"isStatic": false,
|
|
2570
|
+
"isPublic": true
|
|
2571
|
+
},
|
|
2572
|
+
"findPublic": {
|
|
2573
|
+
"name": "findPublic",
|
|
2574
|
+
"async": true,
|
|
2575
|
+
"parameters": [],
|
|
2576
|
+
"returnType": "Promise<ChatRoom[]>",
|
|
2577
|
+
"isStatic": false,
|
|
2578
|
+
"isPublic": true
|
|
2579
|
+
},
|
|
2580
|
+
"findDMs": {
|
|
2581
|
+
"name": "findDMs",
|
|
2582
|
+
"async": true,
|
|
2583
|
+
"parameters": [],
|
|
2584
|
+
"returnType": "Promise<ChatRoom[]>",
|
|
2585
|
+
"isStatic": false,
|
|
2586
|
+
"isPublic": true
|
|
2587
|
+
},
|
|
2588
|
+
"findAgentRooms": {
|
|
2589
|
+
"name": "findAgentRooms",
|
|
2590
|
+
"async": true,
|
|
2591
|
+
"parameters": [],
|
|
2592
|
+
"returnType": "Promise<ChatRoom[]>",
|
|
2593
|
+
"isStatic": false,
|
|
2594
|
+
"isPublic": true
|
|
2595
|
+
},
|
|
2596
|
+
"search": {
|
|
2597
|
+
"name": "search",
|
|
2598
|
+
"async": true,
|
|
2599
|
+
"parameters": [
|
|
2600
|
+
{
|
|
2601
|
+
"name": "query",
|
|
2602
|
+
"type": "string",
|
|
2603
|
+
"optional": false
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"name": "options",
|
|
2607
|
+
"type": "object",
|
|
2608
|
+
"optional": true
|
|
2609
|
+
}
|
|
2610
|
+
],
|
|
2611
|
+
"returnType": "Promise<ChatRoom[]>",
|
|
2612
|
+
"isStatic": false,
|
|
2613
|
+
"isPublic": true
|
|
2614
|
+
},
|
|
2615
|
+
"findOrCreateDM": {
|
|
2616
|
+
"name": "findOrCreateDM",
|
|
2617
|
+
"async": true,
|
|
2618
|
+
"parameters": [
|
|
2619
|
+
{
|
|
2620
|
+
"name": "profileId1",
|
|
2621
|
+
"type": "string",
|
|
2622
|
+
"optional": false
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
"name": "profileId2",
|
|
2626
|
+
"type": "string",
|
|
2627
|
+
"optional": false
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
"name": "tenantId",
|
|
2631
|
+
"type": "string",
|
|
2632
|
+
"optional": false
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
"name": "participants",
|
|
2636
|
+
"type": "ChatParticipantCollection",
|
|
2637
|
+
"optional": false
|
|
2638
|
+
}
|
|
2639
|
+
],
|
|
2640
|
+
"returnType": "Promise<ChatRoom>",
|
|
2641
|
+
"isStatic": false,
|
|
2642
|
+
"isPublic": true
|
|
2643
|
+
}
|
|
2644
|
+
},
|
|
2645
|
+
"decoratorConfig": {
|
|
2646
|
+
"tableName": "chat_rooms"
|
|
2647
|
+
},
|
|
2648
|
+
"extends": "SmrtCollection",
|
|
2649
|
+
"extendsTypeArg": "ChatRoom",
|
|
2650
|
+
"exportName": "ChatRoomCollection",
|
|
2651
|
+
"collectionExportName": "ChatRoomCollectionCollection",
|
|
2652
|
+
"schema": {
|
|
2653
|
+
"tableName": "chat_rooms",
|
|
2654
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_rooms\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2655
|
+
"columns": {
|
|
2656
|
+
"id": {
|
|
2657
|
+
"type": "UUID",
|
|
2658
|
+
"primaryKey": true,
|
|
2659
|
+
"referenceKind": "id",
|
|
2660
|
+
"notNull": true
|
|
2515
2661
|
},
|
|
2516
|
-
"
|
|
2662
|
+
"slug": {
|
|
2517
2663
|
"type": "TEXT",
|
|
2518
|
-
"notNull": true
|
|
2519
|
-
"unique": false,
|
|
2520
|
-
"default": "public"
|
|
2664
|
+
"notNull": true
|
|
2521
2665
|
},
|
|
2522
|
-
"
|
|
2666
|
+
"context": {
|
|
2523
2667
|
"type": "TEXT",
|
|
2524
2668
|
"notNull": true,
|
|
2525
|
-
"unique": false,
|
|
2526
|
-
"default": "active"
|
|
2527
|
-
},
|
|
2528
|
-
"topic": {
|
|
2529
|
-
"type": "TEXT",
|
|
2530
|
-
"notNull": false,
|
|
2531
|
-
"unique": false,
|
|
2532
|
-
"default": ""
|
|
2533
|
-
},
|
|
2534
|
-
"avatar_url": {
|
|
2535
|
-
"type": "TEXT",
|
|
2536
|
-
"notNull": false,
|
|
2537
|
-
"unique": false,
|
|
2538
2669
|
"default": ""
|
|
2539
2670
|
},
|
|
2540
|
-
"
|
|
2541
|
-
"type": "
|
|
2542
|
-
"notNull":
|
|
2543
|
-
"
|
|
2544
|
-
"default": false
|
|
2545
|
-
},
|
|
2546
|
-
"max_participants": {
|
|
2547
|
-
"type": "INTEGER",
|
|
2548
|
-
"notNull": false,
|
|
2549
|
-
"unique": false,
|
|
2550
|
-
"default": 0
|
|
2551
|
-
},
|
|
2552
|
-
"metadata": {
|
|
2553
|
-
"type": "TEXT",
|
|
2554
|
-
"notNull": false,
|
|
2555
|
-
"unique": false,
|
|
2556
|
-
"default": "{}"
|
|
2557
|
-
},
|
|
2558
|
-
"created_by_profile_id": {
|
|
2559
|
-
"type": "UUID",
|
|
2560
|
-
"referenceKind": "crossPackageRef",
|
|
2561
|
-
"notNull": false,
|
|
2562
|
-
"unique": false
|
|
2671
|
+
"created_at": {
|
|
2672
|
+
"type": "TIMESTAMP",
|
|
2673
|
+
"notNull": true,
|
|
2674
|
+
"default": "current_timestamp"
|
|
2563
2675
|
},
|
|
2564
|
-
"
|
|
2676
|
+
"updated_at": {
|
|
2565
2677
|
"type": "TIMESTAMP",
|
|
2566
|
-
"notNull":
|
|
2567
|
-
"
|
|
2678
|
+
"notNull": true,
|
|
2679
|
+
"default": "current_timestamp"
|
|
2568
2680
|
}
|
|
2569
2681
|
},
|
|
2570
2682
|
"indexes": [
|
|
@@ -2583,130 +2695,65 @@
|
|
|
2583
2695
|
"unique": true
|
|
2584
2696
|
}
|
|
2585
2697
|
],
|
|
2586
|
-
"version": "
|
|
2698
|
+
"version": "40be4b86"
|
|
2587
2699
|
}
|
|
2588
2700
|
},
|
|
2589
|
-
"@happyvertical/smrt-chat:
|
|
2590
|
-
"name": "
|
|
2591
|
-
"className": "
|
|
2592
|
-
"qualifiedName": "@happyvertical/smrt-chat:
|
|
2701
|
+
"@happyvertical/smrt-chat:ChatThreadCollection": {
|
|
2702
|
+
"name": "chatthreadcollection",
|
|
2703
|
+
"className": "ChatThreadCollection",
|
|
2704
|
+
"qualifiedName": "@happyvertical/smrt-chat:ChatThreadCollection",
|
|
2593
2705
|
"collection": "chatthreads",
|
|
2594
|
-
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/
|
|
2706
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/chat/src/collections/ChatThreadCollection.ts",
|
|
2595
2707
|
"packageName": "@happyvertical/smrt-chat",
|
|
2596
|
-
"fields": {
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
"
|
|
2600
|
-
"
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
"
|
|
2604
|
-
"
|
|
2605
|
-
"
|
|
2606
|
-
"autoPopulate": true,
|
|
2607
|
-
"nullable": false,
|
|
2608
|
-
"mode": "required",
|
|
2609
|
-
"field": "tenantId",
|
|
2610
|
-
"allowSuperAdminBypass": false
|
|
2708
|
+
"fields": {},
|
|
2709
|
+
"methods": {
|
|
2710
|
+
"getByRoom": {
|
|
2711
|
+
"name": "getByRoom",
|
|
2712
|
+
"async": true,
|
|
2713
|
+
"parameters": [
|
|
2714
|
+
{
|
|
2715
|
+
"name": "roomId",
|
|
2716
|
+
"type": "string",
|
|
2717
|
+
"optional": false
|
|
2611
2718
|
}
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
"
|
|
2616
|
-
"required": true,
|
|
2617
|
-
"related": "ChatRoom",
|
|
2618
|
-
"_meta": {
|
|
2619
|
-
"required": true
|
|
2620
|
-
}
|
|
2621
|
-
},
|
|
2622
|
-
"rootMessageId": {
|
|
2623
|
-
"type": "foreignKey",
|
|
2624
|
-
"required": false,
|
|
2625
|
-
"related": "ChatMessage",
|
|
2626
|
-
"_meta": {
|
|
2627
|
-
"nullable": true
|
|
2628
|
-
}
|
|
2629
|
-
},
|
|
2630
|
-
"title": {
|
|
2631
|
-
"type": "text",
|
|
2632
|
-
"required": false,
|
|
2633
|
-
"default": ""
|
|
2634
|
-
},
|
|
2635
|
-
"isResolved": {
|
|
2636
|
-
"type": "boolean",
|
|
2637
|
-
"required": false,
|
|
2638
|
-
"default": false
|
|
2639
|
-
},
|
|
2640
|
-
"messageCount": {
|
|
2641
|
-
"type": "integer",
|
|
2642
|
-
"required": false,
|
|
2643
|
-
"default": 0
|
|
2644
|
-
},
|
|
2645
|
-
"lastMessageAt": {
|
|
2646
|
-
"type": "datetime",
|
|
2647
|
-
"required": false
|
|
2719
|
+
],
|
|
2720
|
+
"returnType": "Promise<ChatThread[]>",
|
|
2721
|
+
"isStatic": false,
|
|
2722
|
+
"isPublic": true
|
|
2648
2723
|
},
|
|
2649
|
-
"
|
|
2650
|
-
"
|
|
2651
|
-
"required": false,
|
|
2652
|
-
"default": 0
|
|
2653
|
-
}
|
|
2654
|
-
},
|
|
2655
|
-
"methods": {
|
|
2656
|
-
"resolve": {
|
|
2657
|
-
"name": "resolve",
|
|
2724
|
+
"getActive": {
|
|
2725
|
+
"name": "getActive",
|
|
2658
2726
|
"async": true,
|
|
2659
|
-
"parameters": [
|
|
2660
|
-
|
|
2727
|
+
"parameters": [
|
|
2728
|
+
{
|
|
2729
|
+
"name": "roomId",
|
|
2730
|
+
"type": "string",
|
|
2731
|
+
"optional": false
|
|
2732
|
+
}
|
|
2733
|
+
],
|
|
2734
|
+
"returnType": "Promise<ChatThread[]>",
|
|
2661
2735
|
"isStatic": false,
|
|
2662
2736
|
"isPublic": true
|
|
2663
2737
|
},
|
|
2664
|
-
"
|
|
2665
|
-
"name": "
|
|
2738
|
+
"getUnresolved": {
|
|
2739
|
+
"name": "getUnresolved",
|
|
2666
2740
|
"async": true,
|
|
2667
2741
|
"parameters": [],
|
|
2668
|
-
"returnType": "Promise<
|
|
2742
|
+
"returnType": "Promise<ChatThread[]>",
|
|
2669
2743
|
"isStatic": false,
|
|
2670
2744
|
"isPublic": true
|
|
2671
2745
|
}
|
|
2672
2746
|
},
|
|
2673
2747
|
"decoratorConfig": {
|
|
2674
|
-
"tableName": "chat_threads"
|
|
2675
|
-
"api": {
|
|
2676
|
-
"include": [
|
|
2677
|
-
"list",
|
|
2678
|
-
"get"
|
|
2679
|
-
]
|
|
2680
|
-
},
|
|
2681
|
-
"mcp": {
|
|
2682
|
-
"include": [
|
|
2683
|
-
"list",
|
|
2684
|
-
"get"
|
|
2685
|
-
]
|
|
2686
|
-
},
|
|
2687
|
-
"cli": true,
|
|
2688
|
-
"tenantScoped": {
|
|
2689
|
-
"mode": "required"
|
|
2690
|
-
}
|
|
2748
|
+
"tableName": "chat_threads"
|
|
2691
2749
|
},
|
|
2692
|
-
"extends": "
|
|
2693
|
-
"
|
|
2694
|
-
"
|
|
2695
|
-
"
|
|
2696
|
-
{
|
|
2697
|
-
"field": "tenantId",
|
|
2698
|
-
"rule": "required",
|
|
2699
|
-
"fieldType": "text"
|
|
2700
|
-
},
|
|
2701
|
-
{
|
|
2702
|
-
"field": "roomId",
|
|
2703
|
-
"rule": "required",
|
|
2704
|
-
"fieldType": "foreignKey"
|
|
2705
|
-
}
|
|
2706
|
-
],
|
|
2750
|
+
"extends": "SmrtCollection",
|
|
2751
|
+
"extendsTypeArg": "ChatThread",
|
|
2752
|
+
"exportName": "ChatThreadCollection",
|
|
2753
|
+
"collectionExportName": "ChatThreadCollectionCollection",
|
|
2707
2754
|
"schema": {
|
|
2708
2755
|
"tableName": "chat_threads",
|
|
2709
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_threads\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp
|
|
2756
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"chat_threads\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2710
2757
|
"columns": {
|
|
2711
2758
|
"id": {
|
|
2712
2759
|
"type": "UUID",
|
|
@@ -2732,53 +2779,6 @@
|
|
|
2732
2779
|
"type": "TIMESTAMP",
|
|
2733
2780
|
"notNull": true,
|
|
2734
2781
|
"default": "current_timestamp"
|
|
2735
|
-
},
|
|
2736
|
-
"tenant_id": {
|
|
2737
|
-
"type": "UUID",
|
|
2738
|
-
"referenceKind": "tenantId",
|
|
2739
|
-
"notNull": true,
|
|
2740
|
-
"unique": false
|
|
2741
|
-
},
|
|
2742
|
-
"room_id": {
|
|
2743
|
-
"type": "UUID",
|
|
2744
|
-
"referenceKind": "foreignKey",
|
|
2745
|
-
"notNull": true,
|
|
2746
|
-
"unique": false
|
|
2747
|
-
},
|
|
2748
|
-
"root_message_id": {
|
|
2749
|
-
"type": "UUID",
|
|
2750
|
-
"referenceKind": "foreignKey",
|
|
2751
|
-
"notNull": false,
|
|
2752
|
-
"unique": false
|
|
2753
|
-
},
|
|
2754
|
-
"title": {
|
|
2755
|
-
"type": "TEXT",
|
|
2756
|
-
"notNull": false,
|
|
2757
|
-
"unique": false,
|
|
2758
|
-
"default": ""
|
|
2759
|
-
},
|
|
2760
|
-
"is_resolved": {
|
|
2761
|
-
"type": "BOOLEAN",
|
|
2762
|
-
"notNull": false,
|
|
2763
|
-
"unique": false,
|
|
2764
|
-
"default": false
|
|
2765
|
-
},
|
|
2766
|
-
"message_count": {
|
|
2767
|
-
"type": "INTEGER",
|
|
2768
|
-
"notNull": false,
|
|
2769
|
-
"unique": false,
|
|
2770
|
-
"default": 0
|
|
2771
|
-
},
|
|
2772
|
-
"last_message_at": {
|
|
2773
|
-
"type": "TIMESTAMP",
|
|
2774
|
-
"notNull": false,
|
|
2775
|
-
"unique": false
|
|
2776
|
-
},
|
|
2777
|
-
"participant_count": {
|
|
2778
|
-
"type": "INTEGER",
|
|
2779
|
-
"notNull": false,
|
|
2780
|
-
"unique": false,
|
|
2781
|
-
"default": 0
|
|
2782
2782
|
}
|
|
2783
2783
|
},
|
|
2784
2784
|
"indexes": [
|
|
@@ -2797,7 +2797,7 @@
|
|
|
2797
2797
|
"unique": true
|
|
2798
2798
|
}
|
|
2799
2799
|
],
|
|
2800
|
-
"version": "
|
|
2800
|
+
"version": "760b62bd"
|
|
2801
2801
|
}
|
|
2802
2802
|
}
|
|
2803
2803
|
},
|