whio-api-sdk 1.0.178-beta → 1.0.180-beta

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.
@@ -39,9 +39,9 @@ export declare class ApiSDK {
39
39
  getTemplates(): Promise<Template[]>;
40
40
  getTemplatesByOrganization(): Promise<Template[]>;
41
41
  getUserTemplates(): Promise<UserTemplate[]>;
42
- generateTranscriptionSummary(transcript: string, templateId: string, sessionId: string): Promise<TranscriptionSummary>;
42
+ generateTranscriptionSummary(templateId: string, sessionId: string): Promise<TranscriptionSummary>;
43
43
  getByOrganizationTranscriptionSummaries(organizationId: string): Promise<TranscriptionSummary[]>;
44
- generateTranscriptionSummaryFromUserTemplate(transcript: string, userTemplateId: string): Promise<TranscriptionSummary>;
44
+ generateTranscriptionSummaryFromUserTemplate(userTemplateId: string, sessionId: string): Promise<TranscriptionSummary>;
45
45
  updateTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary>;
46
46
  uploadLargeAudioFile(formData: FormData): Promise<string>;
47
47
  uploadAudioFile(formData: FormData): Promise<TranscriptionAudioUploadResponse | null>;
@@ -89,6 +89,10 @@ export declare class ApiSDK {
89
89
  updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session>;
90
90
  deleteSession(id: string): Promise<void>;
91
91
  setPrimaryTranscriptionSummary(sessionId: string, summaryId: string): Promise<Session>;
92
+ rerunTranscription(sessionId: string): Promise<{
93
+ message: string;
94
+ sessionId: string;
95
+ }>;
92
96
  createAgent(name: string): Promise<Agent>;
93
97
  getAgents(): Promise<Agent[]>;
94
98
  getAgent(id: string): Promise<Agent>;
@@ -365,10 +365,9 @@ export class ApiSDK {
365
365
  // ======================
366
366
  // trANSCRIPTION SUMMARY METHODS
367
367
  // ======================
368
- generateTranscriptionSummary(transcript, templateId, sessionId) {
368
+ generateTranscriptionSummary(templateId, sessionId) {
369
369
  return __awaiter(this, void 0, void 0, function* () {
370
370
  const generateSummaryDto = {
371
- transcript,
372
371
  templateId,
373
372
  userId: this.user.id,
374
373
  fromUserTemplate: false,
@@ -383,13 +382,13 @@ export class ApiSDK {
383
382
  return this.request(`${urls.transcriptionSummaries}/organization/${organizationId}`, 'GET');
384
383
  });
385
384
  }
386
- generateTranscriptionSummaryFromUserTemplate(transcript, userTemplateId) {
385
+ generateTranscriptionSummaryFromUserTemplate(userTemplateId, sessionId) {
387
386
  return __awaiter(this, void 0, void 0, function* () {
388
387
  const generateSummaryDto = {
389
- transcript,
390
388
  templateId: userTemplateId,
391
389
  userId: this.user.id,
392
390
  fromUserTemplate: true,
391
+ sessionId: sessionId,
393
392
  };
394
393
  const transcriptionSummary = yield this.request(urls.transcriptionSummary, 'POST', generateSummaryDto);
395
394
  return transcriptionSummary;
@@ -683,6 +682,11 @@ export class ApiSDK {
683
682
  return this.request(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
684
683
  });
685
684
  }
685
+ rerunTranscription(sessionId) {
686
+ return __awaiter(this, void 0, void 0, function* () {
687
+ return this.request(`${urls.sessions}/${sessionId}/rerun-transcription`, 'POST');
688
+ });
689
+ }
686
690
  // ======================
687
691
  // AGENT METHODS
688
692
  // ======================
@@ -93,11 +93,10 @@ export interface UpdateTemplateDto {
93
93
  categoryId?: string;
94
94
  }
95
95
  export interface GenerateTranscriptionSummaryDto {
96
- transcript?: string;
97
96
  templateId: string;
98
97
  userId?: string;
99
98
  fromUserTemplate?: boolean;
100
- sessionId?: string;
99
+ sessionId: string;
101
100
  }
102
101
  export interface UpdateTranscriptionSummaryDto {
103
102
  anonymisedTranscript?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.178-beta",
3
+ "version": "1.0.180-beta",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
package/src/sdk/sdk.ts CHANGED
@@ -455,9 +455,8 @@ export class ApiSDK {
455
455
  // ======================
456
456
 
457
457
  public async generateTranscriptionSummary(
458
- transcript: string, templateId: string, sessionId: string): Promise<TranscriptionSummary> {
458
+ templateId: string, sessionId: string): Promise<TranscriptionSummary> {
459
459
  const generateSummaryDto: GenerateTranscriptionSummaryDto = {
460
- transcript,
461
460
  templateId,
462
461
  userId: this.user!.id,
463
462
  fromUserTemplate: false,
@@ -480,12 +479,12 @@ export class ApiSDK {
480
479
  }
481
480
 
482
481
  public async generateTranscriptionSummaryFromUserTemplate(
483
- transcript: string, userTemplateId: string): Promise<TranscriptionSummary> {
482
+ userTemplateId: string, sessionId: string): Promise<TranscriptionSummary> {
484
483
  const generateSummaryDto: GenerateTranscriptionSummaryDto = {
485
- transcript,
486
484
  templateId: userTemplateId,
487
485
  userId: this.user!.id,
488
486
  fromUserTemplate: true,
487
+ sessionId: sessionId,
489
488
  };
490
489
  const transcriptionSummary: TranscriptionSummary = await this.request(
491
490
  urls.transcriptionSummary,
@@ -760,6 +759,10 @@ export class ApiSDK {
760
759
  return this.request<Session>(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
761
760
  }
762
761
 
762
+ public async rerunTranscription(sessionId: string): Promise<{ message: string; sessionId: string }> {
763
+ return this.request<{ message: string; sessionId: string }>(`${urls.sessions}/${sessionId}/rerun-transcription`, 'POST');
764
+ }
765
+
763
766
  // ======================
764
767
  // AGENT METHODS
765
768
  // ======================
package/src/sdk/types.ts CHANGED
@@ -125,11 +125,10 @@ export interface UpdateTemplateDto {
125
125
 
126
126
  // Transcription summary generation DTO
127
127
  export interface GenerateTranscriptionSummaryDto {
128
- transcript?: string;
129
128
  templateId: string;
130
129
  userId?: string;
131
130
  fromUserTemplate?: boolean;
132
- sessionId?: string; // Optional session ID for linking to a session
131
+ sessionId: string; // Required session ID for linking to a session
133
132
  }
134
133
 
135
134
  // Transcription summary update DTO