whio-api-sdk 1.0.193-bet-staging → 1.0.194-beta-staging
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/src/sdk/modules/agent.module.d.ts +17 -0
- package/dist/src/sdk/modules/agent.module.js +93 -0
- package/dist/src/sdk/modules/audio.module.d.ts +31 -0
- package/dist/src/sdk/modules/audio.module.js +147 -0
- package/dist/src/sdk/modules/auth.module.d.ts +9 -0
- package/dist/src/sdk/modules/auth.module.js +59 -0
- package/dist/src/sdk/modules/base-client.d.ts +25 -0
- package/dist/src/sdk/modules/base-client.js +183 -0
- package/dist/src/sdk/modules/debug.module.d.ts +20 -0
- package/dist/src/sdk/modules/debug.module.js +54 -0
- package/dist/src/sdk/modules/external-integration.module.d.ts +9 -0
- package/dist/src/sdk/modules/external-integration.module.js +38 -0
- package/dist/src/sdk/modules/log.module.d.ts +63 -0
- package/dist/src/sdk/modules/log.module.js +222 -0
- package/dist/src/sdk/modules/organization.module.d.ts +11 -0
- package/dist/src/sdk/modules/organization.module.js +50 -0
- package/dist/src/sdk/modules/session.module.d.ts +16 -0
- package/dist/src/sdk/modules/session.module.js +58 -0
- package/dist/src/sdk/modules/team.module.d.ts +13 -0
- package/dist/src/sdk/modules/team.module.js +72 -0
- package/dist/src/sdk/modules/template.module.d.ts +33 -0
- package/dist/src/sdk/modules/template.module.js +240 -0
- package/dist/src/sdk/modules/user.module.d.ts +17 -0
- package/dist/src/sdk/modules/user.module.js +104 -0
- package/dist/src/sdk/modules/workflow.module.d.ts +10 -0
- package/dist/src/sdk/modules/workflow.module.js +53 -0
- package/dist/src/sdk/sdk.d.ts +167 -211
- package/dist/src/sdk/sdk.js +375 -869
- package/dist/src/sdk/sdk.old.d.ts +222 -0
- package/dist/src/sdk/sdk.old.js +1238 -0
- package/dist/src/sdk/types/agent.types.d.ts +51 -0
- package/dist/src/sdk/types/agent.types.js +1 -0
- package/dist/src/sdk/types/audio.types.d.ts +72 -0
- package/dist/src/sdk/types/audio.types.js +8 -0
- package/dist/src/sdk/types/auth.types.d.ts +21 -0
- package/dist/src/sdk/types/auth.types.js +1 -0
- package/dist/src/sdk/types/common.types.d.ts +20 -0
- package/dist/src/sdk/types/common.types.js +9 -0
- package/dist/src/sdk/types/external-integration.types.d.ts +31 -0
- package/dist/src/sdk/types/external-integration.types.js +1 -0
- package/dist/src/sdk/types/index.d.ts +12 -0
- package/dist/src/sdk/types/index.js +13 -0
- package/dist/src/sdk/types/log.types.d.ts +61 -0
- package/dist/src/sdk/types/log.types.js +1 -0
- package/dist/src/sdk/types/organization.types.d.ts +42 -0
- package/dist/src/sdk/types/organization.types.js +6 -0
- package/dist/src/sdk/types/session.types.d.ts +54 -0
- package/dist/src/sdk/types/session.types.js +1 -0
- package/dist/src/sdk/types/team.types.d.ts +39 -0
- package/dist/src/sdk/types/team.types.js +1 -0
- package/dist/src/sdk/types/template.types.d.ts +118 -0
- package/dist/src/sdk/types/template.types.js +1 -0
- package/dist/src/sdk/types/user.types.d.ts +41 -0
- package/dist/src/sdk/types/user.types.js +1 -0
- package/dist/src/sdk/types/workflow.types.d.ts +19 -0
- package/dist/src/sdk/types/workflow.types.js +1 -0
- package/dist/src/sdk/types.d.ts +1 -517
- package/dist/src/sdk/types.js +2 -23
- package/dist/src/sdk/types.old.d.ts +517 -0
- package/dist/src/sdk/types.old.js +23 -0
- package/dist/src/sdk/urls.d.ts +1 -0
- package/dist/src/sdk/urls.js +2 -0
- package/package.json +1 -1
- package/src/sdk/modules/agent.module.ts +74 -0
- package/src/sdk/modules/audio.module.ts +131 -0
- package/src/sdk/modules/auth.module.ts +53 -0
- package/src/sdk/modules/base-client.ts +214 -0
- package/src/sdk/modules/debug.module.ts +44 -0
- package/src/sdk/modules/external-integration.module.ts +50 -0
- package/src/sdk/modules/log.module.ts +213 -0
- package/src/sdk/modules/organization.module.ts +35 -0
- package/src/sdk/modules/session.module.ts +41 -0
- package/src/sdk/modules/team.module.ts +55 -0
- package/src/sdk/modules/template.module.ts +242 -0
- package/src/sdk/modules/user.module.ts +89 -0
- package/src/sdk/modules/workflow.module.ts +39 -0
- package/src/sdk/sdk.old.ts +1312 -0
- package/src/sdk/sdk.ts +393 -1089
- package/src/sdk/types/agent.types.ts +65 -0
- package/src/sdk/types/audio.types.ts +89 -0
- package/src/sdk/types/auth.types.ts +29 -0
- package/src/sdk/types/common.types.ts +26 -0
- package/src/sdk/types/external-integration.types.ts +37 -0
- package/src/sdk/types/index.ts +13 -0
- package/src/sdk/types/log.types.ts +68 -0
- package/src/sdk/types/organization.types.ts +55 -0
- package/src/sdk/types/session.types.ts +63 -0
- package/src/sdk/types/team.types.ts +48 -0
- package/src/sdk/types/template.types.ts +142 -0
- package/src/sdk/types/user.types.ts +50 -0
- package/src/sdk/types/workflow.types.ts +26 -0
- package/src/sdk/types.old.ts +649 -0
- package/src/sdk/types.ts +2 -649
- package/src/sdk/urls.ts +3 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Organization } from './organization.types';
|
|
2
|
+
|
|
3
|
+
// Agent types
|
|
4
|
+
export interface Agent {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
templateTextReplacement?: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
organizations?: AgentOrganization[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Agent Organization association
|
|
14
|
+
export interface AgentOrganization {
|
|
15
|
+
agentId: string;
|
|
16
|
+
organizationId: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
agent?: Agent;
|
|
19
|
+
organization?: Organization;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Agent DTOs
|
|
23
|
+
export interface CreateAgentDto {
|
|
24
|
+
name: string;
|
|
25
|
+
templateTextReplacement?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UpdateAgentDto {
|
|
29
|
+
name?: string;
|
|
30
|
+
templateTextReplacement?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Agent Settings types
|
|
34
|
+
export interface AgentSettings {
|
|
35
|
+
id: string;
|
|
36
|
+
temperature: number;
|
|
37
|
+
topK: number;
|
|
38
|
+
topP: number;
|
|
39
|
+
repetitionPenalty: number;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
agentId: string;
|
|
43
|
+
organizationId: string;
|
|
44
|
+
|
|
45
|
+
// Relationships (populated by API)
|
|
46
|
+
agent?: Agent;
|
|
47
|
+
organization?: Organization;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Agent Settings DTOs
|
|
51
|
+
export interface CreateAgentSettingsDto {
|
|
52
|
+
agentId: string;
|
|
53
|
+
organizationId: string;
|
|
54
|
+
temperature?: number;
|
|
55
|
+
topK?: number;
|
|
56
|
+
topP?: number;
|
|
57
|
+
repetitionPenalty?: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface UpdateAgentSettingsDto {
|
|
61
|
+
temperature?: number;
|
|
62
|
+
topK?: number;
|
|
63
|
+
topP?: number;
|
|
64
|
+
repetitionPenalty?: number;
|
|
65
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Session } from './session.types';
|
|
2
|
+
import { User } from './user.types';
|
|
3
|
+
|
|
4
|
+
// Audio File types
|
|
5
|
+
export enum AudioFileStatus {
|
|
6
|
+
UPLOADED = 'UPLOADED',
|
|
7
|
+
PROCESSING = 'PROCESSING',
|
|
8
|
+
TRANSCRIBED = 'TRANSCRIBED',
|
|
9
|
+
FAILED = 'FAILED',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AudioFile {
|
|
13
|
+
id: string;
|
|
14
|
+
originalName: string;
|
|
15
|
+
fileName: string;
|
|
16
|
+
filePath: string;
|
|
17
|
+
fileSize: number;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
uploadId?: string;
|
|
20
|
+
transcriptionUrl?: string;
|
|
21
|
+
transcription?: string;
|
|
22
|
+
cultural_transcription?: string;
|
|
23
|
+
status: AudioFileStatus;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
sessionId: string;
|
|
27
|
+
userId: string;
|
|
28
|
+
|
|
29
|
+
// Relationships (populated by API)
|
|
30
|
+
session?: Session;
|
|
31
|
+
user?: User;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Audio File DTOs
|
|
35
|
+
export interface CreateAudioFileDto {
|
|
36
|
+
originalName: string;
|
|
37
|
+
fileName: string;
|
|
38
|
+
filePath: string;
|
|
39
|
+
fileSize: number;
|
|
40
|
+
mimeType: string;
|
|
41
|
+
uploadId?: string;
|
|
42
|
+
sessionId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface UpdateAudioFileDto {
|
|
46
|
+
transcriptionUrl?: string;
|
|
47
|
+
transcription?: string;
|
|
48
|
+
cultural_transcription?: string;
|
|
49
|
+
status?: AudioFileStatus;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface UploadAudioFileDto {
|
|
53
|
+
cultural_transcription?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface TranscriptionAudioUploadResponse {
|
|
57
|
+
success: boolean;
|
|
58
|
+
transcription: string;
|
|
59
|
+
model_version: string;
|
|
60
|
+
metadata: any[];
|
|
61
|
+
duration: number;
|
|
62
|
+
log: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Base64 Audio File types
|
|
66
|
+
export interface Base64AudioFile {
|
|
67
|
+
id: string;
|
|
68
|
+
sessionId: string;
|
|
69
|
+
audioChunks: string[];
|
|
70
|
+
createdAt: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
|
|
73
|
+
session?: Session;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Base64 Audio File DTOs
|
|
77
|
+
export interface CreateBase64AudioFileDto {
|
|
78
|
+
sessionId: string;
|
|
79
|
+
audioChunks: string[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface UpdateBase64AudioFileDto {
|
|
83
|
+
sessionId?: string;
|
|
84
|
+
audioChunks?: string[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface AddBase64ChunkResponse {
|
|
88
|
+
count: number;
|
|
89
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { User } from './user.types';
|
|
2
|
+
|
|
3
|
+
// Login response type
|
|
4
|
+
export interface LoginResponse {
|
|
5
|
+
access_token: string;
|
|
6
|
+
refresh_token: string;
|
|
7
|
+
user: User;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Login credentials type
|
|
11
|
+
export interface LoginCredentials {
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Password change DTOs
|
|
17
|
+
export interface ChangePasswordDto {
|
|
18
|
+
currentPassword: string;
|
|
19
|
+
newPassword: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AdminChangePasswordDto {
|
|
23
|
+
userId: string;
|
|
24
|
+
newPassword: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface PasswordChangeResponse {
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Common types used across the SDK
|
|
2
|
+
|
|
3
|
+
export interface SDKConfig {
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
storage?: {
|
|
6
|
+
getItem: (key: string) => string | null | Promise<string | null>;
|
|
7
|
+
setItem: (key: string, value: string) => void | Promise<void>;
|
|
8
|
+
removeItem: (key: string) => void | Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Role type
|
|
13
|
+
export interface Role {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Enum for global role types to match API
|
|
21
|
+
export enum RoleType {
|
|
22
|
+
SUPERUSER = 'SUPERUSER',
|
|
23
|
+
ADMIN = 'ADMIN',
|
|
24
|
+
TRIAL = 'TRIAL',
|
|
25
|
+
PAID = 'PAID',
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Organization } from './organization.types';
|
|
2
|
+
|
|
3
|
+
// ExternalIntegration type
|
|
4
|
+
export interface ExternalIntegration {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
getUserEndpoint: string;
|
|
8
|
+
getPatientDataEndpoint: string;
|
|
9
|
+
saveSummaryEndpoint: string;
|
|
10
|
+
apiKey: string;
|
|
11
|
+
headerName: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
organizations?: Array<{
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// ExternalIntegration DTOs
|
|
21
|
+
export interface CreateExternalIntegrationDto {
|
|
22
|
+
name: string;
|
|
23
|
+
getUserEndpoint: string;
|
|
24
|
+
getPatientDataEndpoint: string;
|
|
25
|
+
saveSummaryEndpoint: string;
|
|
26
|
+
apiKey: string;
|
|
27
|
+
headerName: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface UpdateExternalIntegrationDto {
|
|
31
|
+
name?: string;
|
|
32
|
+
getUserEndpoint?: string;
|
|
33
|
+
getPatientDataEndpoint?: string;
|
|
34
|
+
saveSummaryEndpoint?: string;
|
|
35
|
+
apiKey?: string;
|
|
36
|
+
headerName?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Barrel export for all types
|
|
2
|
+
export * from './common.types';
|
|
3
|
+
export * from './auth.types';
|
|
4
|
+
export * from './user.types';
|
|
5
|
+
export * from './organization.types';
|
|
6
|
+
export * from './team.types';
|
|
7
|
+
export * from './template.types';
|
|
8
|
+
export * from './agent.types';
|
|
9
|
+
export * from './session.types';
|
|
10
|
+
export * from './audio.types';
|
|
11
|
+
export * from './workflow.types';
|
|
12
|
+
export * from './log.types';
|
|
13
|
+
export * from './external-integration.types';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Log types
|
|
2
|
+
export interface Log {
|
|
3
|
+
id: number;
|
|
4
|
+
level: string;
|
|
5
|
+
message: string;
|
|
6
|
+
meta: any;
|
|
7
|
+
timestamp: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface LogsResponse {
|
|
11
|
+
logs: Log[];
|
|
12
|
+
total: number;
|
|
13
|
+
limit: number;
|
|
14
|
+
offset: number;
|
|
15
|
+
hasMore: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface LogStats {
|
|
19
|
+
totalLogs: number;
|
|
20
|
+
errorLogs: number;
|
|
21
|
+
warnLogs: number;
|
|
22
|
+
infoLogs: number;
|
|
23
|
+
recentLogs: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface FilterLogsDto {
|
|
27
|
+
controller?: string;
|
|
28
|
+
userId?: string;
|
|
29
|
+
organizationId?: string;
|
|
30
|
+
level?: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
|
|
31
|
+
role?: string;
|
|
32
|
+
organizationRole?: string;
|
|
33
|
+
teamRole?: string;
|
|
34
|
+
startDate?: string;
|
|
35
|
+
endDate?: string;
|
|
36
|
+
limit?: number;
|
|
37
|
+
offset?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CreateLogDto {
|
|
41
|
+
level: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
|
|
42
|
+
message: string;
|
|
43
|
+
context?: string;
|
|
44
|
+
action?: string;
|
|
45
|
+
data?: any;
|
|
46
|
+
additionalMeta?: Record<string, any>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Debug types
|
|
50
|
+
export interface DebugSessionSummary {
|
|
51
|
+
id: string;
|
|
52
|
+
sessionName?: string;
|
|
53
|
+
dateTime: string;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
user: {
|
|
56
|
+
id: string;
|
|
57
|
+
email: string;
|
|
58
|
+
firstName?: string;
|
|
59
|
+
lastName?: string;
|
|
60
|
+
organizationId?: string;
|
|
61
|
+
};
|
|
62
|
+
template?: {
|
|
63
|
+
id: string;
|
|
64
|
+
title: string;
|
|
65
|
+
};
|
|
66
|
+
hasMedicalTranscription: boolean;
|
|
67
|
+
hasPrimaryTranscriptionSummary: boolean;
|
|
68
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { User } from './user.types';
|
|
2
|
+
import { AgentOrganization } from './agent.types';
|
|
3
|
+
|
|
4
|
+
// Organization Role type
|
|
5
|
+
export interface OrganizationRole {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
organizationId: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum OrganizationRoleType {
|
|
14
|
+
ADMIN = 'ADMIN',
|
|
15
|
+
EDITOR = 'EDITOR',
|
|
16
|
+
DISABLED = 'DISABLED',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// User Organization Role association
|
|
20
|
+
export interface UserOrganizationRole {
|
|
21
|
+
userId: string;
|
|
22
|
+
organizationRoleId: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
organizationRole: OrganizationRole;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Organization type
|
|
28
|
+
export interface Organization {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
|
|
35
|
+
users?: User[];
|
|
36
|
+
roles?: OrganizationRole[];
|
|
37
|
+
agents?: AgentOrganization[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Organization DTOs
|
|
41
|
+
export interface CreateOrganizationDto {
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface UpdateOrganizationDto {
|
|
47
|
+
name?: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Organization role assignment DTO
|
|
52
|
+
export interface AssignOrganizationRoleDto {
|
|
53
|
+
userId: string;
|
|
54
|
+
organizationRoleId: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { User } from './user.types';
|
|
2
|
+
import { Template, TranscriptionSummary } from './template.types';
|
|
3
|
+
import { AudioFile } from './audio.types';
|
|
4
|
+
|
|
5
|
+
// Session types
|
|
6
|
+
export interface Session {
|
|
7
|
+
id: string;
|
|
8
|
+
transcript: string;
|
|
9
|
+
medicalTranscription?: string;
|
|
10
|
+
culturalTranscription?: string;
|
|
11
|
+
dateTime: string;
|
|
12
|
+
startDateTime?: string;
|
|
13
|
+
stopDateTime?: string;
|
|
14
|
+
templateName?: string;
|
|
15
|
+
summary?: string;
|
|
16
|
+
sessionName?: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
templateId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
primaryTranscriptionSummaryId?: string;
|
|
22
|
+
|
|
23
|
+
// Derived fields (computed by API)
|
|
24
|
+
hasSummaryType?: boolean;
|
|
25
|
+
hasServerAudioFile?: boolean;
|
|
26
|
+
hasSummary?: boolean;
|
|
27
|
+
|
|
28
|
+
// Relationships (populated by API)
|
|
29
|
+
user?: User;
|
|
30
|
+
template?: Template;
|
|
31
|
+
transcriptionSummaries?: TranscriptionSummary[];
|
|
32
|
+
primaryTranscriptionSummary?: TranscriptionSummary;
|
|
33
|
+
audioFiles?: AudioFile[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Session DTOs
|
|
37
|
+
export interface CreateSessionDto {
|
|
38
|
+
transcript: string;
|
|
39
|
+
medicalTranscription?: string;
|
|
40
|
+
culturalTranscription?: string;
|
|
41
|
+
dateTime: string;
|
|
42
|
+
startDateTime?: string;
|
|
43
|
+
stopDateTime?: string;
|
|
44
|
+
templateId?: string;
|
|
45
|
+
templateName?: string;
|
|
46
|
+
summary?: string;
|
|
47
|
+
sessionName?: string;
|
|
48
|
+
primaryTranscriptionSummaryId?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface UpdateSessionDto {
|
|
52
|
+
transcript?: string;
|
|
53
|
+
medicalTranscription?: string;
|
|
54
|
+
culturalTranscription?: string;
|
|
55
|
+
dateTime?: string;
|
|
56
|
+
startDateTime?: string;
|
|
57
|
+
stopDateTime?: string;
|
|
58
|
+
templateId?: string;
|
|
59
|
+
templateName?: string;
|
|
60
|
+
summary?: string;
|
|
61
|
+
sessionName?: string;
|
|
62
|
+
primaryTranscriptionSummaryId?: string;
|
|
63
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Organization } from './organization.types';
|
|
2
|
+
import { User } from './user.types';
|
|
3
|
+
import { TeamTemplate } from './template.types';
|
|
4
|
+
|
|
5
|
+
export interface TeamRole {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatesAt: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
teamId: string;
|
|
12
|
+
|
|
13
|
+
user?: User;
|
|
14
|
+
team?: Team;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface Team {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatesAt: string;
|
|
23
|
+
organizationId: string;
|
|
24
|
+
|
|
25
|
+
organization?: Organization;
|
|
26
|
+
teamRoles?: TeamRole[];
|
|
27
|
+
teamTemplates?: TeamTemplate[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Team DTOs
|
|
31
|
+
export interface CreateTeamDto {
|
|
32
|
+
name: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
organizationId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface UpdateTeamDto {
|
|
38
|
+
name?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
organizationId?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Team Role assignment DTO
|
|
44
|
+
export interface AssignTeamRoleDto {
|
|
45
|
+
userId: string;
|
|
46
|
+
teamId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Organization } from './organization.types';
|
|
2
|
+
import { User } from './user.types';
|
|
3
|
+
import { Workflow } from './workflow.types';
|
|
4
|
+
import { Agent } from './agent.types';
|
|
5
|
+
import { Team } from './team.types';
|
|
6
|
+
|
|
7
|
+
export interface TemplateCategory {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface Template {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
content: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatesAt: string;
|
|
18
|
+
isGlobal: boolean;
|
|
19
|
+
organizationId?: string;
|
|
20
|
+
categoryId: string;
|
|
21
|
+
createdById: string;
|
|
22
|
+
workflowId?: string;
|
|
23
|
+
agentId?: string;
|
|
24
|
+
|
|
25
|
+
organization?: Organization;
|
|
26
|
+
category?: TemplateCategory;
|
|
27
|
+
createdBy?: User;
|
|
28
|
+
workflow?: Workflow;
|
|
29
|
+
agent?: Agent;
|
|
30
|
+
userTemplates?: UserTemplate[];
|
|
31
|
+
transcriptionSummaries?: TranscriptionSummary[];
|
|
32
|
+
teamTemplates?: TeamTemplate[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface UserTemplate {
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
content: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
updatesAt: string;
|
|
41
|
+
userId: string;
|
|
42
|
+
originalTemplateId?: string;
|
|
43
|
+
|
|
44
|
+
user?: User;
|
|
45
|
+
originalTemplate?: Template;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface TranscriptionSummary {
|
|
49
|
+
id: string;
|
|
50
|
+
anonymisedTranscript?: string;
|
|
51
|
+
content: string;
|
|
52
|
+
metadata?: any;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
updatesAt: string;
|
|
55
|
+
templateId: string;
|
|
56
|
+
userId: string;
|
|
57
|
+
|
|
58
|
+
template?: Template;
|
|
59
|
+
user?: User;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface TeamTemplate {
|
|
63
|
+
teamId: string;
|
|
64
|
+
templateId: string;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
|
|
67
|
+
team?: Team;
|
|
68
|
+
template?: Template;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Template DTOs
|
|
72
|
+
export interface CreateTemplateDto {
|
|
73
|
+
title: string;
|
|
74
|
+
content: string;
|
|
75
|
+
isGlobal?: boolean;
|
|
76
|
+
organizationId: string;
|
|
77
|
+
categoryId: string;
|
|
78
|
+
createdById: string;
|
|
79
|
+
workflowId?: string;
|
|
80
|
+
agentId?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface UpdateTemplateDto {
|
|
84
|
+
title?: string;
|
|
85
|
+
content?: string;
|
|
86
|
+
isGlobal?: boolean;
|
|
87
|
+
organizationId: string;
|
|
88
|
+
categoryId?: string;
|
|
89
|
+
workflowId?: string;
|
|
90
|
+
agentId?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Template Category DTOs
|
|
94
|
+
export interface CreateTemplateCategoryDto {
|
|
95
|
+
name: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface UpdateTemplateCategoryDto {
|
|
99
|
+
name?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// User Template DTOs
|
|
103
|
+
export interface CreateUserTemplateDto {
|
|
104
|
+
title: string;
|
|
105
|
+
content: string;
|
|
106
|
+
userId: string;
|
|
107
|
+
originalTemplateId?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface UpdateUserTemplateDto {
|
|
111
|
+
title?: string;
|
|
112
|
+
content?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Team Template DTOs
|
|
116
|
+
export interface AssignTeamTemplateDto {
|
|
117
|
+
teamId: string;
|
|
118
|
+
templateId: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Transcription Summary DTOs
|
|
122
|
+
export interface GenerateTranscriptionSummaryDto {
|
|
123
|
+
templateId: string;
|
|
124
|
+
userId?: string;
|
|
125
|
+
fromUserTemplate?: boolean;
|
|
126
|
+
sessionId: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface CreateTranscriptionSummaryDto {
|
|
130
|
+
userId: string;
|
|
131
|
+
templateId: string;
|
|
132
|
+
content: string;
|
|
133
|
+
anonymisedTranscript?: string;
|
|
134
|
+
metadata?: Record<string, any>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface UpdateTranscriptionSummaryDto {
|
|
138
|
+
anonymisedTranscript?: string;
|
|
139
|
+
content?: string;
|
|
140
|
+
metadata?: Record<string, any>;
|
|
141
|
+
templateId?: string;
|
|
142
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Organization, UserOrganizationRole } from './organization.types';
|
|
2
|
+
import { Role } from './common.types';
|
|
3
|
+
|
|
4
|
+
// User Role association
|
|
5
|
+
export interface UserRole {
|
|
6
|
+
userId: string;
|
|
7
|
+
roleId: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
role: Role;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// User type
|
|
13
|
+
export interface User {
|
|
14
|
+
id: string;
|
|
15
|
+
email: string;
|
|
16
|
+
firstName: string;
|
|
17
|
+
lastName: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
organizationId: string;
|
|
21
|
+
organization: Organization;
|
|
22
|
+
roles: UserRole[];
|
|
23
|
+
organizationRoles: UserOrganizationRole[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// User creation DTO
|
|
27
|
+
export interface CreateUserDto {
|
|
28
|
+
email: string;
|
|
29
|
+
password: string;
|
|
30
|
+
firstName?: string;
|
|
31
|
+
lastName?: string;
|
|
32
|
+
organizationId?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// User update DTO
|
|
36
|
+
export interface UpdateUserDto {
|
|
37
|
+
email?: string;
|
|
38
|
+
password?: string;
|
|
39
|
+
firstName?: string;
|
|
40
|
+
lastName?: string;
|
|
41
|
+
organizationId?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface AdminUser {
|
|
45
|
+
id: string;
|
|
46
|
+
email: string;
|
|
47
|
+
password_hash: string;
|
|
48
|
+
role: string;
|
|
49
|
+
created_at: Date;
|
|
50
|
+
}
|