whio-api-sdk 1.0.161 → 1.0.164

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 } from './types';
1
+ import { LoginResponse, LoginCredentials, SDKConfig, User, UpdateUserDto, Organization, TemplateCategory, Template, Team, UserTemplate, TranscriptionSummary, TranscriptionAudioUploadResponse, PasswordChangeResponse, Session, CreateSessionDto, UpdateSessionDto } from './types';
2
2
  export declare class ApiSDK {
3
3
  private baseUrl;
4
4
  private storage;
@@ -79,4 +79,12 @@ export declare class ApiSDK {
79
79
  getTranscriptionSummariesByUser(userId: string): Promise<TranscriptionSummary[]>;
80
80
  deleteTranscriptionSummary(id: string): Promise<void>;
81
81
  removeUserFromTeamFixed(teamId: string, userId: string): Promise<void>;
82
+ createSession(sessionData: CreateSessionDto): Promise<Session>;
83
+ getSessions(): Promise<Session[]>;
84
+ getSession(id: string): Promise<Session>;
85
+ getSessionsByUser(userId: string): Promise<Session[]>;
86
+ getSessionsByOrganization(): Promise<Session[]>;
87
+ updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session>;
88
+ deleteSession(id: string): Promise<void>;
89
+ setPrimaryTranscriptionSummary(sessionId: string, summaryId: string): Promise<Session>;
82
90
  }
@@ -592,4 +592,47 @@ export class ApiSDK {
592
592
  yield this.request(`${urls.teamRoles}/user/${userId}/team/${teamId}`, 'DELETE');
593
593
  });
594
594
  }
595
+ // ======================
596
+ // SESSION METHODS
597
+ // ======================
598
+ createSession(sessionData) {
599
+ return __awaiter(this, void 0, void 0, function* () {
600
+ return this.request(urls.sessions, 'POST', sessionData);
601
+ });
602
+ }
603
+ getSessions() {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ return this.request(`${urls.sessions}/my-sessions`, 'GET');
606
+ });
607
+ }
608
+ getSession(id) {
609
+ return __awaiter(this, void 0, void 0, function* () {
610
+ return this.request(`${urls.sessions}/${id}`, 'GET');
611
+ });
612
+ }
613
+ getSessionsByUser(userId) {
614
+ return __awaiter(this, void 0, void 0, function* () {
615
+ return this.request(`${urls.sessions}/user/${userId}`, 'GET');
616
+ });
617
+ }
618
+ getSessionsByOrganization() {
619
+ return __awaiter(this, void 0, void 0, function* () {
620
+ return this.request(`${urls.sessions}/organization`, 'GET');
621
+ });
622
+ }
623
+ updateSession(id, sessionData) {
624
+ return __awaiter(this, void 0, void 0, function* () {
625
+ return this.request(`${urls.sessions}/${id}`, 'PATCH', sessionData);
626
+ });
627
+ }
628
+ deleteSession(id) {
629
+ return __awaiter(this, void 0, void 0, function* () {
630
+ yield this.request(`${urls.sessions}/${id}`, 'DELETE');
631
+ });
632
+ }
633
+ setPrimaryTranscriptionSummary(sessionId, summaryId) {
634
+ return __awaiter(this, void 0, void 0, function* () {
635
+ return this.request(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
636
+ });
637
+ }
595
638
  }
@@ -265,3 +265,38 @@ export interface AdminChangePasswordDto {
265
265
  export interface PasswordChangeResponse {
266
266
  message: string;
267
267
  }
268
+ export interface Session {
269
+ id: string;
270
+ transcript: string;
271
+ dateTime: string;
272
+ templateName?: string;
273
+ summary?: string;
274
+ sessionName?: string;
275
+ createdAt: string;
276
+ updatedAt: string;
277
+ templateId: string;
278
+ userId: string;
279
+ primaryTranscriptionSummaryId?: string;
280
+ user?: User;
281
+ template?: Template;
282
+ transcriptionSummaries?: TranscriptionSummary[];
283
+ primaryTranscriptionSummary?: TranscriptionSummary;
284
+ }
285
+ export interface CreateSessionDto {
286
+ transcript: string;
287
+ dateTime: string;
288
+ templateId: string;
289
+ templateName?: string;
290
+ summary?: string;
291
+ sessionName?: string;
292
+ primaryTranscriptionSummaryId?: string;
293
+ }
294
+ export interface UpdateSessionDto {
295
+ transcript?: string;
296
+ dateTime?: string;
297
+ templateId?: string;
298
+ templateName?: string;
299
+ summary?: string;
300
+ sessionName?: string;
301
+ primaryTranscriptionSummaryId?: string;
302
+ }
@@ -24,5 +24,6 @@ declare const urls: {
24
24
  transcribeBase64Audio: string;
25
25
  roles: string;
26
26
  userRoles: string;
27
+ sessions: string;
27
28
  };
28
29
  export default urls;
@@ -31,5 +31,7 @@ const urls = {
31
31
  // Roles
32
32
  roles: '/roles',
33
33
  userRoles: '/user-roles',
34
+ // Sessions
35
+ sessions: '/sessions',
34
36
  };
35
37
  export default urls;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.161",
3
+ "version": "1.0.164",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
package/src/sdk/sdk.ts CHANGED
@@ -34,6 +34,9 @@ import {
34
34
  ChangePasswordDto,
35
35
  AdminChangePasswordDto,
36
36
  PasswordChangeResponse,
37
+ Session,
38
+ CreateSessionDto,
39
+ UpdateSessionDto,
37
40
  } from './types';
38
41
  import urls from './urls';
39
42
  import jwtDecode from 'jwt-decode';
@@ -657,4 +660,40 @@ export class ApiSDK {
657
660
  await this.request(`${urls.teamRoles}/user/${userId}/team/${teamId}`, 'DELETE');
658
661
  }
659
662
 
663
+ // ======================
664
+ // SESSION METHODS
665
+ // ======================
666
+
667
+ public async createSession(sessionData: CreateSessionDto): Promise<Session> {
668
+ return this.request<Session>(urls.sessions, 'POST', sessionData);
669
+ }
670
+
671
+ public async getSessions(): Promise<Session[]> {
672
+ return this.request<Session[]>(`${urls.sessions}/my-sessions`, 'GET');
673
+ }
674
+
675
+ public async getSession(id: string): Promise<Session> {
676
+ return this.request<Session>(`${urls.sessions}/${id}`, 'GET');
677
+ }
678
+
679
+ public async getSessionsByUser(userId: string): Promise<Session[]> {
680
+ return this.request<Session[]>(`${urls.sessions}/user/${userId}`, 'GET');
681
+ }
682
+
683
+ public async getSessionsByOrganization(): Promise<Session[]> {
684
+ return this.request<Session[]>(`${urls.sessions}/organization`, 'GET');
685
+ }
686
+
687
+ public async updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session> {
688
+ return this.request<Session>(`${urls.sessions}/${id}`, 'PATCH', sessionData);
689
+ }
690
+
691
+ public async deleteSession(id: string): Promise<void> {
692
+ await this.request(`${urls.sessions}/${id}`, 'DELETE');
693
+ }
694
+
695
+ public async setPrimaryTranscriptionSummary(sessionId: string, summaryId: string): Promise<Session> {
696
+ return this.request<Session>(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
697
+ }
698
+
660
699
  }
package/src/sdk/types.ts CHANGED
@@ -338,3 +338,46 @@ export interface AdminChangePasswordDto {
338
338
  export interface PasswordChangeResponse {
339
339
  message: string;
340
340
  }
341
+
342
+ // Session types
343
+ export interface Session {
344
+ id: string;
345
+ transcript: string;
346
+ dateTime: string;
347
+ templateName?: string;
348
+ summary?: string;
349
+ sessionName?: string;
350
+ createdAt: string;
351
+ updatedAt: string;
352
+ templateId: string;
353
+ userId: string;
354
+ primaryTranscriptionSummaryId?: string;
355
+
356
+ // Relationships (populated by API)
357
+ user?: User;
358
+ template?: Template;
359
+ transcriptionSummaries?: TranscriptionSummary[];
360
+ primaryTranscriptionSummary?: TranscriptionSummary;
361
+ }
362
+
363
+ // Session DTOs
364
+ export interface CreateSessionDto {
365
+ transcript: string;
366
+ dateTime: string;
367
+ templateId: string;
368
+ templateName?: string;
369
+ summary?: string;
370
+ sessionName?: string;
371
+ primaryTranscriptionSummaryId?: string;
372
+ // userId will be auto-injected by API
373
+ }
374
+
375
+ export interface UpdateSessionDto {
376
+ transcript?: string;
377
+ dateTime?: string;
378
+ templateId?: string;
379
+ templateName?: string;
380
+ summary?: string;
381
+ sessionName?: string;
382
+ primaryTranscriptionSummaryId?: string;
383
+ }
package/src/sdk/urls.ts CHANGED
@@ -37,6 +37,9 @@ const urls = {
37
37
  // Roles
38
38
  roles: '/roles',
39
39
  userRoles: '/user-roles',
40
+
41
+ // Sessions
42
+ sessions: '/sessions',
40
43
  }
41
44
 
42
45
  export default urls;