whio-api-sdk 1.0.184-bet-staging → 1.0.185-bet-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.
@@ -1,4 +1,4 @@
1
- import { LoginResponse, LoginCredentials, SDKConfig, User, UpdateUserDto, Organization, TemplateCategory, Template, Team, UserTemplate, TranscriptionSummary, TranscriptionAudioUploadResponse, PasswordChangeResponse, Session, CreateSessionDto, UpdateSessionDto, Agent, AudioFile, UpdateAudioFileDto, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto, Workflow } from './types';
1
+ import { LoginResponse, LoginCredentials, SDKConfig, User, UpdateUserDto, Organization, TemplateCategory, Template, Team, UserTemplate, TranscriptionSummary, TranscriptionAudioUploadResponse, PasswordChangeResponse, Session, CreateSessionDto, UpdateSessionDto, Agent, AudioFile, UpdateAudioFileDto, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto, Workflow, Base64AudioFile, CreateBase64AudioFileDto, UpdateBase64AudioFileDto, AddBase64ChunkResponse } from './types';
2
2
  export declare class ApiSDK {
3
3
  private baseUrl;
4
4
  private storage;
@@ -123,6 +123,13 @@ export declare class ApiSDK {
123
123
  getTranscribedAudioFiles(): Promise<AudioFile[]>;
124
124
  getProcessingAudioFiles(): Promise<AudioFile[]>;
125
125
  getFailedAudioFiles(): Promise<AudioFile[]>;
126
+ createBase64AudioFile(dto: CreateBase64AudioFileDto): Promise<Base64AudioFile>;
127
+ getAllBase64AudioFiles(): Promise<Base64AudioFile[]>;
128
+ getBase64AudioFilesBySession(sessionId: string): Promise<Base64AudioFile[]>;
129
+ getBase64AudioFile(id: string): Promise<Base64AudioFile>;
130
+ updateBase64AudioFile(id: string, updates: UpdateBase64AudioFileDto): Promise<Base64AudioFile>;
131
+ deleteBase64AudioFile(id: string): Promise<void>;
132
+ addBase64Chunk(sessionId: string, base64Chunk: string): Promise<AddBase64ChunkResponse>;
126
133
  createWorkflow(name: string, organizationId?: string): Promise<Workflow>;
127
134
  getWorkflows(organizationId?: string): Promise<Workflow[]>;
128
135
  getWorkflow(id: string): Promise<Workflow>;
@@ -881,6 +881,44 @@ export class ApiSDK {
881
881
  });
882
882
  }
883
883
  // ======================
884
+ // BASE64 AUDIO FILE METHODS
885
+ // ======================
886
+ createBase64AudioFile(dto) {
887
+ return __awaiter(this, void 0, void 0, function* () {
888
+ return this.request(`${urls.audioFiles}/base64`, 'POST', dto);
889
+ });
890
+ }
891
+ getAllBase64AudioFiles() {
892
+ return __awaiter(this, void 0, void 0, function* () {
893
+ return this.request(`${urls.audioFiles}/base64/all`, 'GET');
894
+ });
895
+ }
896
+ getBase64AudioFilesBySession(sessionId) {
897
+ return __awaiter(this, void 0, void 0, function* () {
898
+ return this.request(`${urls.audioFiles}/base64/session/${sessionId}`, 'GET');
899
+ });
900
+ }
901
+ getBase64AudioFile(id) {
902
+ return __awaiter(this, void 0, void 0, function* () {
903
+ return this.request(`${urls.audioFiles}/base64/${id}`, 'GET');
904
+ });
905
+ }
906
+ updateBase64AudioFile(id, updates) {
907
+ return __awaiter(this, void 0, void 0, function* () {
908
+ return this.request(`${urls.audioFiles}/base64/${id}`, 'PATCH', updates);
909
+ });
910
+ }
911
+ deleteBase64AudioFile(id) {
912
+ return __awaiter(this, void 0, void 0, function* () {
913
+ yield this.request(`${urls.audioFiles}/base64/${id}`, 'DELETE');
914
+ });
915
+ }
916
+ addBase64Chunk(sessionId, base64Chunk) {
917
+ return __awaiter(this, void 0, void 0, function* () {
918
+ return this.request(`${urls.audioFiles}/base64/add-chunk/${sessionId}`, 'POST', { base64Chunk });
919
+ });
920
+ }
921
+ // ======================
884
922
  // WORKFLOW METHODS
885
923
  // ======================
886
924
  createWorkflow(name, organizationId) {
@@ -432,3 +432,22 @@ export interface UpdateWorkflowDto {
432
432
  name?: string;
433
433
  organizationId: string;
434
434
  }
435
+ export interface Base64AudioFile {
436
+ id: string;
437
+ sessionId: string;
438
+ audioChunks: string[];
439
+ createdAt: string;
440
+ updatedAt: string;
441
+ session?: Session;
442
+ }
443
+ export interface CreateBase64AudioFileDto {
444
+ sessionId: string;
445
+ audioChunks: string[];
446
+ }
447
+ export interface UpdateBase64AudioFileDto {
448
+ sessionId?: string;
449
+ audioChunks?: string[];
450
+ }
451
+ export interface AddBase64ChunkResponse {
452
+ count: number;
453
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.184-bet-staging",
3
+ "version": "1.0.185-bet-staging",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
package/src/sdk/sdk.ts CHANGED
@@ -51,6 +51,10 @@ import {
51
51
  Workflow,
52
52
  CreateWorkflowDto,
53
53
  UpdateWorkflowDto,
54
+ Base64AudioFile,
55
+ CreateBase64AudioFileDto,
56
+ UpdateBase64AudioFileDto,
57
+ AddBase64ChunkResponse,
54
58
  } from './types';
55
59
  import urls from './urls';
56
60
  import { jwtDecode } from 'jwt-decode';
@@ -948,6 +952,38 @@ export class ApiSDK {
948
952
  return audioFiles.filter(file => file.status === AudioFileStatus.FAILED);
949
953
  }
950
954
 
955
+ // ======================
956
+ // BASE64 AUDIO FILE METHODS
957
+ // ======================
958
+
959
+ public async createBase64AudioFile(dto: CreateBase64AudioFileDto): Promise<Base64AudioFile> {
960
+ return this.request<Base64AudioFile>(`${urls.audioFiles}/base64`, 'POST', dto);
961
+ }
962
+
963
+ public async getAllBase64AudioFiles(): Promise<Base64AudioFile[]> {
964
+ return this.request<Base64AudioFile[]>(`${urls.audioFiles}/base64/all`, 'GET');
965
+ }
966
+
967
+ public async getBase64AudioFilesBySession(sessionId: string): Promise<Base64AudioFile[]> {
968
+ return this.request<Base64AudioFile[]>(`${urls.audioFiles}/base64/session/${sessionId}`, 'GET');
969
+ }
970
+
971
+ public async getBase64AudioFile(id: string): Promise<Base64AudioFile> {
972
+ return this.request<Base64AudioFile>(`${urls.audioFiles}/base64/${id}`, 'GET');
973
+ }
974
+
975
+ public async updateBase64AudioFile(id: string, updates: UpdateBase64AudioFileDto): Promise<Base64AudioFile> {
976
+ return this.request<Base64AudioFile>(`${urls.audioFiles}/base64/${id}`, 'PATCH', updates);
977
+ }
978
+
979
+ public async deleteBase64AudioFile(id: string): Promise<void> {
980
+ await this.request(`${urls.audioFiles}/base64/${id}`, 'DELETE');
981
+ }
982
+
983
+ public async addBase64Chunk(sessionId: string, base64Chunk: string): Promise<AddBase64ChunkResponse> {
984
+ return this.request<AddBase64ChunkResponse>(`${urls.audioFiles}/base64/add-chunk/${sessionId}`, 'POST', { base64Chunk });
985
+ }
986
+
951
987
  // ======================
952
988
  // WORKFLOW METHODS
953
989
  // ======================
package/src/sdk/types.ts CHANGED
@@ -547,3 +547,31 @@ export interface UpdateWorkflowDto {
547
547
  name?: string;
548
548
  organizationId: string;
549
549
  }
550
+
551
+ // Base64 Audio File types
552
+ export interface Base64AudioFile {
553
+ id: string;
554
+ sessionId: string;
555
+ audioChunks: string[];
556
+ createdAt: string;
557
+ updatedAt: string;
558
+
559
+ // Relationships (populated by API)
560
+ session?: Session;
561
+ }
562
+
563
+ // Base64 Audio File DTOs
564
+ export interface CreateBase64AudioFileDto {
565
+ sessionId: string;
566
+ audioChunks: string[];
567
+ }
568
+
569
+ export interface UpdateBase64AudioFileDto {
570
+ sessionId?: string;
571
+ audioChunks?: string[];
572
+ }
573
+
574
+ // Add chunk response
575
+ export interface AddBase64ChunkResponse {
576
+ count: number;
577
+ }