whio-api-sdk 1.1.28 → 1.1.29

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.
Files changed (102) hide show
  1. package/dist/src/sdk/modules/agent.module.d.ts +90 -5
  2. package/dist/src/sdk/modules/agent.module.js +87 -2
  3. package/dist/src/sdk/modules/audio.module.d.ts +143 -2
  4. package/dist/src/sdk/modules/audio.module.js +144 -5
  5. package/dist/src/sdk/modules/auth.module.d.ts +43 -0
  6. package/dist/src/sdk/modules/auth.module.js +43 -0
  7. package/dist/src/sdk/modules/data-strategy.module.d.ts +45 -7
  8. package/dist/src/sdk/modules/data-strategy.module.js +39 -1
  9. package/dist/src/sdk/modules/external-integration.module.d.ts +30 -0
  10. package/dist/src/sdk/modules/external-integration.module.js +30 -0
  11. package/dist/src/sdk/modules/integration-action.module.d.ts +39 -0
  12. package/dist/src/sdk/modules/integration-action.module.js +39 -0
  13. package/dist/src/sdk/modules/log.module.d.ts +4 -4
  14. package/dist/src/sdk/modules/organization.module.d.ts +62 -3
  15. package/dist/src/sdk/modules/organization.module.js +61 -2
  16. package/dist/src/sdk/modules/patient.module.d.ts +5 -2
  17. package/dist/src/sdk/modules/patient.module.js +5 -2
  18. package/dist/src/sdk/modules/reports.module.d.ts +4 -4
  19. package/dist/src/sdk/modules/reports.module.js +6 -6
  20. package/dist/src/sdk/modules/session/orgadmin-session.module.d.ts +46 -1
  21. package/dist/src/sdk/modules/session/orgadmin-session.module.js +53 -6
  22. package/dist/src/sdk/modules/session/session.module.d.ts +62 -1
  23. package/dist/src/sdk/modules/session/session.module.js +64 -1
  24. package/dist/src/sdk/modules/session/superuser-session.module.d.ts +46 -1
  25. package/dist/src/sdk/modules/session/superuser-session.module.js +52 -5
  26. package/dist/src/sdk/modules/session.module.d.ts +142 -3
  27. package/dist/src/sdk/modules/session.module.js +153 -12
  28. package/dist/src/sdk/modules/team.module.d.ts +56 -4
  29. package/dist/src/sdk/modules/team.module.js +54 -6
  30. package/dist/src/sdk/modules/template.module.d.ts +96 -4
  31. package/dist/src/sdk/modules/template.module.js +95 -24
  32. package/dist/src/sdk/modules/transcription-summary.module.d.ts +60 -3
  33. package/dist/src/sdk/modules/transcription-summary.module.js +60 -7
  34. package/dist/src/sdk/modules/user.module.d.ts +106 -0
  35. package/dist/src/sdk/modules/user.module.js +107 -1
  36. package/dist/src/sdk/modules/websocket.module.d.ts +25 -8
  37. package/dist/src/sdk/modules/websocket.module.js +23 -6
  38. package/dist/src/sdk/modules/workflow.module.d.ts +39 -0
  39. package/dist/src/sdk/modules/workflow.module.js +39 -0
  40. package/dist/src/sdk/sdk.d.ts +19 -29
  41. package/dist/src/sdk/sdk.js +1 -44
  42. package/dist/src/sdk/types/agent.types.d.ts +3 -0
  43. package/dist/src/sdk/types/audio.types.d.ts +8 -9
  44. package/dist/src/sdk/types/data-strategy.types.d.ts +3 -0
  45. package/dist/src/sdk/types/external-integration.types.d.ts +6 -0
  46. package/dist/src/sdk/types/log.types.d.ts +2 -21
  47. package/dist/src/sdk/types/patient.types.d.ts +2 -3
  48. package/dist/src/sdk/types/reports.types.d.ts +1 -1
  49. package/dist/src/sdk/types/session.types.d.ts +8 -8
  50. package/dist/src/sdk/types/team.types.d.ts +4 -3
  51. package/dist/src/sdk/types/template.types.d.ts +15 -7
  52. package/dist/src/sdk/types/user.types.d.ts +6 -0
  53. package/dist/src/sdk/types/websocket.types.d.ts +4 -10
  54. package/dist/src/sdk/urls.d.ts +0 -4
  55. package/dist/src/sdk/urls.js +0 -5
  56. package/dist/src/sdk/whio-orgadmin-sdk.d.ts +7 -7
  57. package/dist/src/sdk/whio-sdk.d.ts +11 -8
  58. package/dist/src/sdk/whio-sdk.js +34 -18
  59. package/dist/src/sdk/whio-superuser-sdk.d.ts +12 -16
  60. package/dist/src/sdk/whio-superuser-sdk.js +1 -16
  61. package/dist/src/sdk/whio-teamadmin-sdk.d.ts +4 -8
  62. package/dist/src/sdk/whio-teamadmin-sdk.js +1 -18
  63. package/package.json +1 -1
  64. package/src/sdk/modules/agent.module.ts +94 -9
  65. package/src/sdk/modules/audio.module.ts +146 -8
  66. package/src/sdk/modules/auth.module.ts +43 -0
  67. package/src/sdk/modules/data-strategy.module.ts +51 -13
  68. package/src/sdk/modules/external-integration.module.ts +30 -0
  69. package/src/sdk/modules/integration-action.module.ts +39 -0
  70. package/src/sdk/modules/log.module.ts +4 -4
  71. package/src/sdk/modules/organization.module.ts +64 -5
  72. package/src/sdk/modules/patient.module.ts +5 -2
  73. package/src/sdk/modules/reports.module.ts +6 -6
  74. package/src/sdk/modules/session/orgadmin-session.module.ts +53 -7
  75. package/src/sdk/modules/session/session.module.ts +64 -2
  76. package/src/sdk/modules/session/superuser-session.module.ts +52 -6
  77. package/src/sdk/modules/session.module.ts +155 -15
  78. package/src/sdk/modules/team.module.ts +58 -9
  79. package/src/sdk/modules/template.module.ts +95 -32
  80. package/src/sdk/modules/transcription-summary.module.ts +62 -8
  81. package/src/sdk/modules/user.module.ts +108 -2
  82. package/src/sdk/modules/websocket.module.ts +26 -8
  83. package/src/sdk/modules/workflow.module.ts +39 -0
  84. package/src/sdk/sdk.ts +1 -37
  85. package/src/sdk/types/agent.types.ts +5 -0
  86. package/src/sdk/types/audio.types.ts +8 -10
  87. package/src/sdk/types/data-strategy.types.ts +3 -0
  88. package/src/sdk/types/external-integration.types.ts +6 -0
  89. package/src/sdk/types/log.types.ts +4 -23
  90. package/src/sdk/types/patient.types.ts +2 -3
  91. package/src/sdk/types/reports.types.ts +1 -1
  92. package/src/sdk/types/session.types.ts +8 -8
  93. package/src/sdk/types/team.types.ts +5 -3
  94. package/src/sdk/types/template.types.ts +18 -7
  95. package/src/sdk/types/user.types.ts +6 -0
  96. package/src/sdk/types/websocket.types.ts +8 -7
  97. package/src/sdk/urls.ts +0 -7
  98. package/src/sdk/whio-sdk.ts +29 -16
  99. package/src/sdk/whio-superuser-sdk.ts +1 -16
  100. package/src/sdk/whio-teamadmin-sdk.ts +1 -16
  101. package/tsconfig.json +1 -1
  102. package/src/sdk/modules/debug.module.ts +0 -44
@@ -1,17 +1,102 @@
1
1
  import { BaseClient } from './base-client';
2
- import { Agent, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto } from '../types';
2
+ import { Agent, AgentWithOrganizations, AgentOrganization, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto } from '../types';
3
3
  export declare class AgentModule extends BaseClient {
4
+ /**
5
+ * Create a new agent.
6
+ *
7
+ * @param name - Display name of the agent.
8
+ * @param templateTextReplacement - Optional template text-replacement string for the agent.
9
+ * @returns The created agent.
10
+ */
4
11
  createAgent(name: string, templateTextReplacement?: string): Promise<Agent>;
5
- getAgents(): Promise<Agent[]>;
6
- getAgent(id: string): Promise<Agent>;
12
+ /**
13
+ * List all agents, each including its linked organizations.
14
+ *
15
+ * @returns An array of agents with their organizations relation populated.
16
+ */
17
+ getAgents(): Promise<AgentWithOrganizations[]>;
18
+ /**
19
+ * Get a single agent by id, including its linked organizations.
20
+ *
21
+ * @param id - UUID of the agent.
22
+ * @returns The agent with its organizations relation populated.
23
+ */
24
+ getAgent(id: string): Promise<AgentWithOrganizations>;
25
+ /**
26
+ * Update an agent.
27
+ *
28
+ * @param id - UUID of the agent to update.
29
+ * @param name - New display name of the agent.
30
+ * @param templateTextReplacement - Optional template text-replacement string for the agent.
31
+ * @returns The updated agent.
32
+ */
7
33
  updateAgent(id: string, name: string, templateTextReplacement?: string): Promise<Agent>;
34
+ /**
35
+ * Delete an agent.
36
+ *
37
+ * @param id - UUID of the agent to delete.
38
+ * @returns A promise that resolves when the agent has been deleted.
39
+ */
8
40
  deleteAgent(id: string): Promise<void>;
9
- addAgentToOrganization(agentId: string, organizationId: string): Promise<void>;
10
- removeAgentFromOrganization(agentId: string, organizationId: string): Promise<void>;
41
+ /**
42
+ * Link an agent to an organization.
43
+ *
44
+ * @param agentId - UUID of the agent.
45
+ * @param organizationId - UUID of the organization to link.
46
+ * @returns The created agent-organization association.
47
+ */
48
+ addAgentToOrganization(agentId: string, organizationId: string): Promise<AgentOrganization>;
49
+ /**
50
+ * Unlink an agent from an organization.
51
+ *
52
+ * @param agentId - UUID of the agent.
53
+ * @param organizationId - UUID of the organization to unlink.
54
+ * @returns The removed agent-organization association.
55
+ */
56
+ removeAgentFromOrganization(agentId: string, organizationId: string): Promise<AgentOrganization>;
57
+ /**
58
+ * Create agent settings for an agent within an organization.
59
+ *
60
+ * @param settingsData - The agent-settings payload (agentId, organizationId and tuning params).
61
+ * @returns The created agent settings.
62
+ */
11
63
  createAgentSettings(settingsData: CreateAgentSettingsDto): Promise<AgentSettings>;
64
+ /**
65
+ * List agent settings, optionally filtered by organization and/or agent.
66
+ *
67
+ * @param organizationId - Optional organization UUID to filter by.
68
+ * @param agentId - Optional agent UUID to filter by.
69
+ * @returns An array of matching agent settings.
70
+ */
12
71
  getAgentSettings(organizationId?: string, agentId?: string): Promise<AgentSettings[]>;
72
+ /**
73
+ * Get a single agent settings record by id.
74
+ *
75
+ * @param id - UUID of the agent settings record.
76
+ * @returns The agent settings record.
77
+ */
13
78
  getAgentSettingsById(id: string): Promise<AgentSettings>;
79
+ /**
80
+ * Get the agent settings for a specific agent within a specific organization.
81
+ *
82
+ * @param agentId - UUID of the agent.
83
+ * @param organizationId - UUID of the organization.
84
+ * @returns The agent settings record for the agent/organization pair.
85
+ */
14
86
  getAgentSettingsByAgentAndOrganization(agentId: string, organizationId: string): Promise<AgentSettings>;
87
+ /**
88
+ * Update an agent settings record.
89
+ *
90
+ * @param id - UUID of the agent settings record to update.
91
+ * @param settingsData - The fields to update.
92
+ * @returns The updated agent settings record.
93
+ */
15
94
  updateAgentSettings(id: string, settingsData: UpdateAgentSettingsDto): Promise<AgentSettings>;
95
+ /**
96
+ * Delete an agent settings record.
97
+ *
98
+ * @param id - UUID of the agent settings record to delete.
99
+ * @returns A promise that resolves when the record has been deleted.
100
+ */
16
101
  deleteAgentSettings(id: string): Promise<void>;
17
102
  }
@@ -13,51 +13,110 @@ export class AgentModule extends BaseClient {
13
13
  // ======================
14
14
  // AGENT METHODS
15
15
  // ======================
16
+ /**
17
+ * Create a new agent.
18
+ *
19
+ * @param name - Display name of the agent.
20
+ * @param templateTextReplacement - Optional template text-replacement string for the agent.
21
+ * @returns The created agent.
22
+ */
16
23
  createAgent(name, templateTextReplacement) {
17
24
  return __awaiter(this, void 0, void 0, function* () {
18
25
  const dto = { name, templateTextReplacement };
19
26
  return this.request(urls.agents, 'POST', dto);
20
27
  });
21
28
  }
29
+ /**
30
+ * List all agents, each including its linked organizations.
31
+ *
32
+ * @returns An array of agents with their organizations relation populated.
33
+ */
22
34
  getAgents() {
23
35
  return __awaiter(this, void 0, void 0, function* () {
24
36
  return this.request(urls.agents, 'GET');
25
37
  });
26
38
  }
39
+ /**
40
+ * Get a single agent by id, including its linked organizations.
41
+ *
42
+ * @param id - UUID of the agent.
43
+ * @returns The agent with its organizations relation populated.
44
+ */
27
45
  getAgent(id) {
28
46
  return __awaiter(this, void 0, void 0, function* () {
29
47
  return this.request(`${urls.agents}/${id}`, 'GET');
30
48
  });
31
49
  }
50
+ /**
51
+ * Update an agent.
52
+ *
53
+ * @param id - UUID of the agent to update.
54
+ * @param name - New display name of the agent.
55
+ * @param templateTextReplacement - Optional template text-replacement string for the agent.
56
+ * @returns The updated agent.
57
+ */
32
58
  updateAgent(id, name, templateTextReplacement) {
33
59
  return __awaiter(this, void 0, void 0, function* () {
34
60
  const dto = { name, templateTextReplacement };
35
61
  return this.request(`${urls.agents}/${id}`, 'PATCH', dto);
36
62
  });
37
63
  }
64
+ /**
65
+ * Delete an agent.
66
+ *
67
+ * @param id - UUID of the agent to delete.
68
+ * @returns A promise that resolves when the agent has been deleted.
69
+ */
38
70
  deleteAgent(id) {
39
71
  return __awaiter(this, void 0, void 0, function* () {
40
72
  yield this.request(`${urls.agents}/${id}`, 'DELETE');
41
73
  });
42
74
  }
75
+ /**
76
+ * Link an agent to an organization.
77
+ *
78
+ * @param agentId - UUID of the agent.
79
+ * @param organizationId - UUID of the organization to link.
80
+ * @returns The created agent-organization association.
81
+ */
43
82
  addAgentToOrganization(agentId, organizationId) {
44
83
  return __awaiter(this, void 0, void 0, function* () {
45
- yield this.request(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'POST');
84
+ return this.request(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'POST');
46
85
  });
47
86
  }
87
+ /**
88
+ * Unlink an agent from an organization.
89
+ *
90
+ * @param agentId - UUID of the agent.
91
+ * @param organizationId - UUID of the organization to unlink.
92
+ * @returns The removed agent-organization association.
93
+ */
48
94
  removeAgentFromOrganization(agentId, organizationId) {
49
95
  return __awaiter(this, void 0, void 0, function* () {
50
- yield this.request(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'DELETE');
96
+ return this.request(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'DELETE');
51
97
  });
52
98
  }
53
99
  // ======================
54
100
  // AGENT SETTINGS METHODS
55
101
  // ======================
102
+ /**
103
+ * Create agent settings for an agent within an organization.
104
+ *
105
+ * @param settingsData - The agent-settings payload (agentId, organizationId and tuning params).
106
+ * @returns The created agent settings.
107
+ */
56
108
  createAgentSettings(settingsData) {
57
109
  return __awaiter(this, void 0, void 0, function* () {
58
110
  return this.request(urls.agentSettings, 'POST', settingsData);
59
111
  });
60
112
  }
113
+ /**
114
+ * List agent settings, optionally filtered by organization and/or agent.
115
+ *
116
+ * @param organizationId - Optional organization UUID to filter by.
117
+ * @param agentId - Optional agent UUID to filter by.
118
+ * @returns An array of matching agent settings.
119
+ */
61
120
  getAgentSettings(organizationId, agentId) {
62
121
  return __awaiter(this, void 0, void 0, function* () {
63
122
  const params = new URLSearchParams();
@@ -70,21 +129,47 @@ export class AgentModule extends BaseClient {
70
129
  return this.request(endpoint, 'GET');
71
130
  });
72
131
  }
132
+ /**
133
+ * Get a single agent settings record by id.
134
+ *
135
+ * @param id - UUID of the agent settings record.
136
+ * @returns The agent settings record.
137
+ */
73
138
  getAgentSettingsById(id) {
74
139
  return __awaiter(this, void 0, void 0, function* () {
75
140
  return this.request(`${urls.agentSettings}/${id}`, 'GET');
76
141
  });
77
142
  }
143
+ /**
144
+ * Get the agent settings for a specific agent within a specific organization.
145
+ *
146
+ * @param agentId - UUID of the agent.
147
+ * @param organizationId - UUID of the organization.
148
+ * @returns The agent settings record for the agent/organization pair.
149
+ */
78
150
  getAgentSettingsByAgentAndOrganization(agentId, organizationId) {
79
151
  return __awaiter(this, void 0, void 0, function* () {
80
152
  return this.request(`${urls.agentSettings}/agent/${agentId}/organization/${organizationId}`, 'GET');
81
153
  });
82
154
  }
155
+ /**
156
+ * Update an agent settings record.
157
+ *
158
+ * @param id - UUID of the agent settings record to update.
159
+ * @param settingsData - The fields to update.
160
+ * @returns The updated agent settings record.
161
+ */
83
162
  updateAgentSettings(id, settingsData) {
84
163
  return __awaiter(this, void 0, void 0, function* () {
85
164
  return this.request(`${urls.agentSettings}/${id}`, 'PATCH', settingsData);
86
165
  });
87
166
  }
167
+ /**
168
+ * Delete an agent settings record.
169
+ *
170
+ * @param id - UUID of the agent settings record to delete.
171
+ * @returns A promise that resolves when the record has been deleted.
172
+ */
88
173
  deleteAgentSettings(id) {
89
174
  return __awaiter(this, void 0, void 0, function* () {
90
175
  yield this.request(`${urls.agentSettings}/${id}`, 'DELETE');
@@ -1,34 +1,175 @@
1
1
  import { BaseClient } from './base-client';
2
2
  import { AudioFile, UpdateAudioFileDto, Base64AudioFile, CreateBase64AudioFileDto, UpdateBase64AudioFileDto, AddBase64ChunkResponse } from '../types';
3
3
  export declare class AudioModule extends BaseClient {
4
+ /**
5
+ * Upload an audio file to a session via multipart form data.
6
+ *
7
+ * @param sessionId - UUID of the session to attach the audio file to.
8
+ * @param file - The audio file or blob to upload.
9
+ * @param fileName - Optional file name to send with the upload.
10
+ * @param onProgress - Optional callback invoked with the upload percentage (0-100).
11
+ * @returns The created audio file record.
12
+ */
4
13
  uploadAudioFileToSession(sessionId: string, file: File | Blob, fileName?: string, onProgress?: (percentage: number) => void): Promise<AudioFile>;
14
+ /**
15
+ * Upload an audio file to a session and queue it for transcription.
16
+ *
17
+ * @param sessionId - UUID of the session to attach the audio file to.
18
+ * @param file - The audio file or blob to upload.
19
+ * @param options - Optional settings: `fileName` and an `onProgress` callback (0-100).
20
+ * @returns The created audio file record.
21
+ */
5
22
  uploadAudioFileWithTranscriptionQueue(sessionId: string, file: File | Blob, options?: {
6
23
  fileName?: string;
7
- culturalTranscription?: string;
8
24
  onProgress?: (percentage: number) => void;
9
25
  }): Promise<AudioFile>;
26
+ /**
27
+ * Retrieve the current user's audio files.
28
+ *
29
+ * @returns An array of audio files belonging to the current user.
30
+ */
10
31
  getMyAudioFiles(): Promise<AudioFile[]>;
32
+ /**
33
+ * Retrieve all audio files accessible to the current user.
34
+ *
35
+ * @returns An array of audio files.
36
+ */
11
37
  getAllAudioFiles(): Promise<AudioFile[]>;
38
+ /**
39
+ * Retrieve all audio files belonging to the current user's organization.
40
+ *
41
+ * @returns An array of audio files.
42
+ */
12
43
  getOrganizationAudioFiles(): Promise<AudioFile[]>;
44
+ /**
45
+ * Retrieve all audio files for a given session.
46
+ *
47
+ * @param sessionId - UUID of the session.
48
+ * @returns An array of audio files for the session.
49
+ */
13
50
  getAudioFilesBySession(sessionId: string): Promise<AudioFile[]>;
51
+ /**
52
+ * Retrieve a single audio file by id.
53
+ *
54
+ * @param id - UUID of the audio file.
55
+ * @returns The requested audio file.
56
+ */
14
57
  getAudioFile(id: string): Promise<AudioFile>;
58
+ /**
59
+ * Update an audio file's metadata.
60
+ *
61
+ * @param id - UUID of the audio file to update.
62
+ * @param updates - Fields to update (transcription URL and/or status).
63
+ * @returns The updated audio file.
64
+ */
15
65
  updateAudioFile(id: string, updates: UpdateAudioFileDto): Promise<AudioFile>;
16
- deleteAudioFile(id: string): Promise<void>;
66
+ /**
67
+ * Delete an audio file by id.
68
+ *
69
+ * @param id - UUID of the audio file to delete.
70
+ * @returns The deleted audio file record.
71
+ */
72
+ deleteAudioFile(id: string): Promise<AudioFile>;
73
+ /**
74
+ * Download an audio file as a blob.
75
+ *
76
+ * @param id - UUID of the audio file to download.
77
+ * @returns The audio file contents as a Blob.
78
+ */
17
79
  downloadAudioFile(id: string): Promise<Blob>;
80
+ /**
81
+ * Download an audio file and return an object URL pointing to it.
82
+ *
83
+ * @param id - UUID of the audio file to download.
84
+ * @returns An object URL referencing the downloaded blob.
85
+ */
18
86
  downloadAudioFileAsUrl(id: string): Promise<string>;
87
+ /**
88
+ * Retrieve the current user's audio files that have finished transcription.
89
+ *
90
+ * @returns An array of transcribed audio files.
91
+ */
19
92
  getTranscribedAudioFiles(): Promise<AudioFile[]>;
93
+ /**
94
+ * Retrieve the current user's audio files that are currently processing.
95
+ *
96
+ * @returns An array of processing audio files.
97
+ */
20
98
  getProcessingAudioFiles(): Promise<AudioFile[]>;
99
+ /**
100
+ * Retrieve the current user's audio files that failed processing.
101
+ *
102
+ * @returns An array of failed audio files.
103
+ */
21
104
  getFailedAudioFiles(): Promise<AudioFile[]>;
105
+ /**
106
+ * Create a base64 audio file record.
107
+ *
108
+ * @param dto - The session id and initial base64 audio chunks.
109
+ * @returns The created base64 audio file.
110
+ */
22
111
  createBase64AudioFile(dto: CreateBase64AudioFileDto): Promise<Base64AudioFile>;
112
+ /**
113
+ * Retrieve all base64 audio files accessible to the current user.
114
+ *
115
+ * @returns An array of base64 audio files.
116
+ */
23
117
  getAllBase64AudioFiles(): Promise<Base64AudioFile[]>;
118
+ /**
119
+ * Retrieve base64 audio files for a given session.
120
+ *
121
+ * @param sessionId - UUID of the session.
122
+ * @returns An array of base64 audio files for the session.
123
+ */
24
124
  getBase64AudioFilesBySession(sessionId: string): Promise<Base64AudioFile[]>;
125
+ /**
126
+ * Retrieve a single base64 audio file by id.
127
+ *
128
+ * @param id - UUID of the base64 audio file.
129
+ * @returns The requested base64 audio file.
130
+ */
25
131
  getBase64AudioFile(id: string): Promise<Base64AudioFile>;
132
+ /**
133
+ * Update a base64 audio file record.
134
+ *
135
+ * @param id - UUID of the base64 audio file to update.
136
+ * @param updates - Fields to update (session id and/or audio chunks).
137
+ * @returns The updated base64 audio file.
138
+ */
26
139
  updateBase64AudioFile(id: string, updates: UpdateBase64AudioFileDto): Promise<Base64AudioFile>;
140
+ /**
141
+ * Delete a base64 audio file by id.
142
+ *
143
+ * @param id - UUID of the base64 audio file to delete.
144
+ * @returns A promise that resolves once the record is deleted.
145
+ */
27
146
  deleteBase64AudioFile(id: string): Promise<void>;
147
+ /**
148
+ * Append base64 audio chunks to a session's base64 audio file.
149
+ *
150
+ * @param sessionId - UUID of the session.
151
+ * @param base64Chunks - The base64-encoded audio chunks to append.
152
+ * @returns The count of chunks now stored.
153
+ */
28
154
  addBase64Chunk(sessionId: string, base64Chunks: string[]): Promise<AddBase64ChunkResponse>;
155
+ /**
156
+ * Queue a session's accumulated base64 audio for transcription.
157
+ *
158
+ * @param sessionId - UUID of the session to transcribe.
159
+ * @returns An object indicating whether queuing succeeded.
160
+ */
29
161
  queueSessionBase64AudioForTranscription(sessionId: string): Promise<{
30
162
  success: boolean;
31
163
  }>;
164
+ /**
165
+ * Transcribe an audio file directly without persisting it to a session.
166
+ *
167
+ * @param file - The audio file or blob to transcribe.
168
+ * @param fileName - Optional file name to send with the upload.
169
+ * @param useFineTuned - Optional flag to use the fine-tuned transcription model.
170
+ * @param onProgress - Optional callback invoked with the upload percentage (0-100).
171
+ * @returns An object containing the resulting transcription text.
172
+ */
32
173
  transcribeAudioFileDirect(file: File | Blob, fileName?: string, useFineTuned?: boolean, onProgress?: (percentage: number) => void): Promise<{
33
174
  transcription?: string;
34
175
  }>;