@trafficgroup/knex-rel 0.0.26 → 0.0.28
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/.claude/settings.local.json +9 -0
- package/CLAUDE.md +63 -0
- package/dist/KnexConnection.d.ts +17 -0
- package/dist/KnexConnection.js +99 -0
- package/dist/KnexConnection.js.map +1 -0
- package/dist/d.types.d.ts +17 -0
- package/dist/d.types.js +3 -0
- package/dist/d.types.js.map +1 -0
- package/dist/dao/auth/auth.dao.d.ts +13 -0
- package/dist/dao/auth/auth.dao.js +82 -0
- package/dist/dao/auth/auth.dao.js.map +1 -0
- package/dist/dao/chat/chat.dao.d.ts +13 -0
- package/dist/dao/chat/chat.dao.js +138 -0
- package/dist/dao/chat/chat.dao.js.map +1 -0
- package/dist/dao/folder/folder.dao.d.ts +11 -0
- package/dist/dao/folder/folder.dao.js +84 -0
- package/dist/dao/folder/folder.dao.js.map +1 -0
- package/dist/dao/message/message.dao.d.ts +13 -0
- package/dist/dao/message/message.dao.js +118 -0
- package/dist/dao/message/message.dao.js.map +1 -0
- package/dist/dao/study/study.dao.d.ts +11 -0
- package/dist/dao/study/study.dao.js +84 -0
- package/dist/dao/study/study.dao.js.map +1 -0
- package/dist/dao/user/user.dao.d.ts +12 -0
- package/dist/dao/user/user.dao.js +76 -0
- package/dist/dao/user/user.dao.js.map +1 -0
- package/dist/dao/user-push-notification-token/user-push-notification-token.dao.d.ts +14 -0
- package/dist/dao/user-push-notification-token/user-push-notification-token.dao.js +87 -0
- package/dist/dao/user-push-notification-token/user-push-notification-token.dao.js.map +1 -0
- package/dist/dao/video/video.dao.d.ts +20 -0
- package/dist/dao/video/video.dao.js +124 -0
- package/dist/dao/video/video.dao.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/auth/auth.interfaces.d.ts +11 -0
- package/dist/interfaces/auth/auth.interfaces.js +3 -0
- package/dist/interfaces/auth/auth.interfaces.js.map +1 -0
- package/dist/interfaces/chat/chat.interfaces.d.ts +18 -0
- package/dist/interfaces/chat/chat.interfaces.js +3 -0
- package/dist/interfaces/chat/chat.interfaces.js.map +1 -0
- package/dist/interfaces/folder/folder.interfaces.d.ts +12 -0
- package/dist/interfaces/folder/folder.interfaces.js +3 -0
- package/dist/interfaces/folder/folder.interfaces.js.map +1 -0
- package/dist/interfaces/message/message.interfaces.d.ts +16 -0
- package/dist/interfaces/message/message.interfaces.js +3 -0
- package/dist/interfaces/message/message.interfaces.js.map +1 -0
- package/dist/interfaces/study/study.interfaces.d.ts +11 -0
- package/dist/interfaces/study/study.interfaces.js +3 -0
- package/dist/interfaces/study/study.interfaces.js.map +1 -0
- package/dist/interfaces/user/user.interfaces.d.ts +11 -0
- package/dist/interfaces/user/user.interfaces.js +3 -0
- package/dist/interfaces/user/user.interfaces.js.map +1 -0
- package/dist/interfaces/user-push-notification-token/user-push-notification-token.interfaces.d.ts +10 -0
- package/dist/interfaces/user-push-notification-token/user-push-notification-token.interfaces.js +3 -0
- package/dist/interfaces/user-push-notification-token/user-push-notification-token.interfaces.js.map +1 -0
- package/dist/interfaces/video/video.interfaces.d.ts +20 -0
- package/dist/interfaces/video/video.interfaces.js +3 -0
- package/dist/interfaces/video/video.interfaces.js.map +1 -0
- package/knexfile.ts +5 -5
- package/migrations/20250717173228_migration.ts +9 -0
- package/migrations/20250717204731_migration.ts +13 -0
- package/migrations/20250722210109_migration.ts +60 -0
- package/migrations/20250722211019_migration.ts +15 -0
- package/migrations/20250723153852_migration.ts +19 -0
- package/migrations/20250723162257_migration.ts +16 -0
- package/migrations/20250723171109_migration.ts +16 -0
- package/migrations/20250723205331_migration.ts +18 -0
- package/migrations/20250724191345_migration.ts +18 -0
- package/migrations/20250730180932_migration.ts +22 -0
- package/migrations/20250730213625_migration.ts +18 -0
- package/migrations/20250804124509_migration.ts +43 -0
- package/migrations/20250804132053_migration.ts +18 -0
- package/migrations/20250804164518_migration.ts +17 -0
- package/package.json +47 -47
- package/src/d.types.ts +7 -7
- package/src/dao/auth/auth.dao.ts +61 -0
- package/src/dao/chat/chat.dao.ts +124 -0
- package/src/dao/folder/folder.dao.ts +66 -0
- package/src/dao/message/message.dao.ts +102 -0
- package/src/dao/study/study.dao.ts +66 -0
- package/src/dao/user/user.dao.ts +14 -10
- package/src/dao/user-push-notification-token/user-push-notification-token.dao.ts +65 -0
- package/src/dao/video/video.dao.ts +120 -0
- package/src/index.ts +23 -8
- package/src/interfaces/auth/auth.interfaces.ts +11 -0
- package/src/interfaces/chat/chat.interfaces.ts +20 -0
- package/src/interfaces/folder/folder.interfaces.ts +3 -0
- package/src/interfaces/message/message.interfaces.ts +18 -0
- package/src/interfaces/study/study.interfaces.ts +3 -0
- package/src/interfaces/user/user.interfaces.ts +2 -0
- package/src/interfaces/user-push-notification-token/user-push-notification-token.interfaces.ts +10 -0
- package/src/interfaces/video/video.interfaces.ts +9 -1
- package/.env +0 -5
package/src/index.ts
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
// DAOs
|
|
2
|
-
export { UserDAO } from "./dao/user/user.dao";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
1
|
+
// DAOs
|
|
2
|
+
export { UserDAO } from "./dao/user/user.dao";
|
|
3
|
+
export { StudyDAO } from "./dao/study/study.dao";
|
|
4
|
+
export { FolderDAO } from "./dao/folder/folder.dao";
|
|
5
|
+
export { VideoDAO } from "./dao/video/video.dao";
|
|
6
|
+
export { AuthDAO } from "./dao/auth/auth.dao";
|
|
7
|
+
export { UserPushNotificationTokenDAO } from "./dao/user-push-notification-token/user-push-notification-token.dao";
|
|
8
|
+
export { ChatDAO } from "./dao/chat/chat.dao";
|
|
9
|
+
export { MessageDAO } from "./dao/message/message.dao";
|
|
10
|
+
|
|
11
|
+
// Interfaces
|
|
12
|
+
export { IDataPaginator } from "./d.types";
|
|
13
|
+
export { IUser } from "./interfaces/user/user.interfaces";
|
|
14
|
+
export { IStudy } from "./interfaces/study/study.interfaces";
|
|
15
|
+
export { IFolder } from "./interfaces/folder/folder.interfaces";
|
|
16
|
+
export { IVideo } from "./interfaces/video/video.interfaces";
|
|
17
|
+
export { IAuth } from "./interfaces/auth/auth.interfaces";
|
|
18
|
+
export { IUserPushNotificationToken } from "./interfaces/user-push-notification-token/user-push-notification-token.interfaces";
|
|
19
|
+
export { IChat, IChatCreate, IChatUpdate } from "./interfaces/chat/chat.interfaces";
|
|
20
|
+
export { IMessage, IMessageCreate, IMessageUpdate } from "./interfaces/message/message.interfaces";
|
|
21
|
+
|
|
22
|
+
import KnexManager from "./KnexConnection";
|
|
23
|
+
export { KnexManager };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface IChat {
|
|
2
|
+
id?: number;
|
|
3
|
+
uuid?: string;
|
|
4
|
+
userId: number;
|
|
5
|
+
title: string;
|
|
6
|
+
status?: 'active' | 'archived';
|
|
7
|
+
created_at?: Date;
|
|
8
|
+
updated_at?: Date;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IChatCreate {
|
|
12
|
+
userId: number;
|
|
13
|
+
title: string;
|
|
14
|
+
status?: 'active' | 'archived';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IChatUpdate {
|
|
18
|
+
title?: string;
|
|
19
|
+
status?: 'active' | 'archived';
|
|
20
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { IStudy } from "../study/study.interfaces";
|
|
2
|
+
|
|
1
3
|
export interface IFolder {
|
|
2
4
|
id: number;
|
|
3
5
|
uuid: string;
|
|
@@ -7,4 +9,5 @@ export interface IFolder {
|
|
|
7
9
|
studyId: number; // study.id
|
|
8
10
|
created_at: string;
|
|
9
11
|
updated_at: string;
|
|
12
|
+
study?: IStudy;
|
|
10
13
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IMessage {
|
|
2
|
+
id?: number;
|
|
3
|
+
chatId: number;
|
|
4
|
+
role: 'user' | 'assistant';
|
|
5
|
+
content: string;
|
|
6
|
+
created_at?: Date;
|
|
7
|
+
updated_at?: Date;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IMessageCreate {
|
|
11
|
+
chatId: number;
|
|
12
|
+
role: 'user' | 'assistant';
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IMessageUpdate {
|
|
17
|
+
content?: string;
|
|
18
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { IUser } from "../user/user.interfaces";
|
|
2
|
+
|
|
1
3
|
export interface IStudy {
|
|
2
4
|
id: number;
|
|
3
5
|
uuid: string;
|
|
@@ -6,4 +8,5 @@ export interface IStudy {
|
|
|
6
8
|
status: 'COMPLETE' | 'IN PROGRESS' | 'FAILED';
|
|
7
9
|
created_at: string;
|
|
8
10
|
updated_at: string;
|
|
11
|
+
user?: IUser;
|
|
9
12
|
}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import type { IFolder } from "../folder/folder.interfaces";
|
|
2
|
+
|
|
1
3
|
export interface IVideo {
|
|
2
4
|
id: number;
|
|
3
5
|
uuid: string;
|
|
4
6
|
folderId: number;
|
|
7
|
+
name: string;
|
|
5
8
|
videoLocation: string;
|
|
9
|
+
videoOutputLocation: string | null;
|
|
10
|
+
generateVideoOutput: boolean;
|
|
6
11
|
videoRate: number;
|
|
7
12
|
videoType: 'TMC' | 'ATR' | 'JUNCTION' | 'ROUNDABOUT' | 'PATHWAY';
|
|
8
13
|
metadata: Record<string, any>;
|
|
9
|
-
status: '
|
|
14
|
+
status: 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'PENDING';
|
|
15
|
+
progress: number;
|
|
16
|
+
remainingTime: string;
|
|
10
17
|
results: Record<string, any>;
|
|
11
18
|
created_at: string;
|
|
12
19
|
updated_at: string;
|
|
20
|
+
folder?: IFolder;
|
|
13
21
|
}
|