whio-api-sdk 1.1.14 → 1.1.16

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.
@@ -0,0 +1,57 @@
1
+ import { BaseClient } from './base-client';
2
+ import { SummaryRating, CreateSummaryRatingDto, FilterSummaryRatingsDto, SummaryRatingsResponse } from '../types';
3
+ export declare class RatingModule extends BaseClient {
4
+ /**
5
+ * Create a new summary rating
6
+ * @param ratingData - The rating data including datetime, rating (0-5), and optional fields: notes, transcriptionSummaryId, sessionId, templateId, templateName
7
+ * @returns The created SummaryRating with user, transcriptionSummary, session, and template relations
8
+ */
9
+ createRating(ratingData: CreateSummaryRatingDto): Promise<SummaryRating>;
10
+ /**
11
+ * Get all ratings with optional filters (Superuser only)
12
+ * @param filters - Optional filters including userId, transcriptionSummaryId, sessionId, templateId, date range, and pagination
13
+ * @returns Paginated response with ratings array, total count, limit, and offset
14
+ */
15
+ getRatings(filters?: FilterSummaryRatingsDto): Promise<SummaryRatingsResponse>;
16
+ /**
17
+ * Get ratings by user ID (Superuser only)
18
+ * @param userId - The user ID to filter ratings by
19
+ * @param limit - Maximum number of ratings to return
20
+ * @param offset - Number of ratings to skip
21
+ * @returns Paginated response with ratings for the specified user
22
+ */
23
+ getRatingsByUser(userId: string, limit?: number, offset?: number): Promise<SummaryRatingsResponse>;
24
+ /**
25
+ * Get ratings by transcription summary ID (Superuser only)
26
+ * @param transcriptionSummaryId - The transcription summary ID to filter ratings by
27
+ * @param limit - Maximum number of ratings to return
28
+ * @param offset - Number of ratings to skip
29
+ * @returns Paginated response with ratings for the specified transcription summary
30
+ */
31
+ getRatingsByTranscriptionSummary(transcriptionSummaryId: string, limit?: number, offset?: number): Promise<SummaryRatingsResponse>;
32
+ /**
33
+ * Get ratings within a date range (Superuser only)
34
+ * @param startDate - ISO date string for the start of the range
35
+ * @param endDate - ISO date string for the end of the range
36
+ * @param limit - Maximum number of ratings to return
37
+ * @param offset - Number of ratings to skip
38
+ * @returns Paginated response with ratings within the specified date range
39
+ */
40
+ getRatingsByDateRange(startDate: string, endDate: string, limit?: number, offset?: number): Promise<SummaryRatingsResponse>;
41
+ /**
42
+ * Get ratings by session ID (Superuser only)
43
+ * @param sessionId - The session ID to filter ratings by
44
+ * @param limit - Maximum number of ratings to return
45
+ * @param offset - Number of ratings to skip
46
+ * @returns Paginated response with ratings for the specified session
47
+ */
48
+ getRatingsBySession(sessionId: string, limit?: number, offset?: number): Promise<SummaryRatingsResponse>;
49
+ /**
50
+ * Get ratings by template ID (Superuser only)
51
+ * @param templateId - The template ID to filter ratings by
52
+ * @param limit - Maximum number of ratings to return
53
+ * @param offset - Number of ratings to skip
54
+ * @returns Paginated response with ratings for the specified template
55
+ */
56
+ getRatingsByTemplate(templateId: string, limit?: number, offset?: number): Promise<SummaryRatingsResponse>;
57
+ }
@@ -0,0 +1,124 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { BaseClient } from './base-client';
11
+ import urls from '../urls';
12
+ export class RatingModule extends BaseClient {
13
+ /**
14
+ * Create a new summary rating
15
+ * @param ratingData - The rating data including datetime, rating (0-5), and optional fields: notes, transcriptionSummaryId, sessionId, templateId, templateName
16
+ * @returns The created SummaryRating with user, transcriptionSummary, session, and template relations
17
+ */
18
+ createRating(ratingData) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ return this.request(urls.ratings, 'POST', ratingData);
21
+ });
22
+ }
23
+ /**
24
+ * Get all ratings with optional filters (Superuser only)
25
+ * @param filters - Optional filters including userId, transcriptionSummaryId, sessionId, templateId, date range, and pagination
26
+ * @returns Paginated response with ratings array, total count, limit, and offset
27
+ */
28
+ getRatings(filters) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ if (!filters || Object.keys(filters).length === 0) {
31
+ return this.request(urls.ratings, 'GET');
32
+ }
33
+ const params = new URLSearchParams();
34
+ if (filters.userId) {
35
+ params.append('userId', filters.userId);
36
+ }
37
+ if (filters.transcriptionSummaryId) {
38
+ params.append('transcriptionSummaryId', filters.transcriptionSummaryId);
39
+ }
40
+ if (filters.sessionId) {
41
+ params.append('sessionId', filters.sessionId);
42
+ }
43
+ if (filters.templateId) {
44
+ params.append('templateId', filters.templateId);
45
+ }
46
+ if (filters.startDate) {
47
+ params.append('startDate', filters.startDate);
48
+ }
49
+ if (filters.endDate) {
50
+ params.append('endDate', filters.endDate);
51
+ }
52
+ if (filters.limit !== undefined) {
53
+ params.append('limit', filters.limit.toString());
54
+ }
55
+ if (filters.offset !== undefined) {
56
+ params.append('offset', filters.offset.toString());
57
+ }
58
+ const queryString = params.toString();
59
+ const endpoint = `${urls.ratings}?${queryString}`;
60
+ return this.request(endpoint, 'GET');
61
+ });
62
+ }
63
+ /**
64
+ * Get ratings by user ID (Superuser only)
65
+ * @param userId - The user ID to filter ratings by
66
+ * @param limit - Maximum number of ratings to return
67
+ * @param offset - Number of ratings to skip
68
+ * @returns Paginated response with ratings for the specified user
69
+ */
70
+ getRatingsByUser(userId, limit, offset) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ return this.getRatings({ userId, limit, offset });
73
+ });
74
+ }
75
+ /**
76
+ * Get ratings by transcription summary ID (Superuser only)
77
+ * @param transcriptionSummaryId - The transcription summary ID to filter ratings by
78
+ * @param limit - Maximum number of ratings to return
79
+ * @param offset - Number of ratings to skip
80
+ * @returns Paginated response with ratings for the specified transcription summary
81
+ */
82
+ getRatingsByTranscriptionSummary(transcriptionSummaryId, limit, offset) {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ return this.getRatings({ transcriptionSummaryId, limit, offset });
85
+ });
86
+ }
87
+ /**
88
+ * Get ratings within a date range (Superuser only)
89
+ * @param startDate - ISO date string for the start of the range
90
+ * @param endDate - ISO date string for the end of the range
91
+ * @param limit - Maximum number of ratings to return
92
+ * @param offset - Number of ratings to skip
93
+ * @returns Paginated response with ratings within the specified date range
94
+ */
95
+ getRatingsByDateRange(startDate, endDate, limit, offset) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ return this.getRatings({ startDate, endDate, limit, offset });
98
+ });
99
+ }
100
+ /**
101
+ * Get ratings by session ID (Superuser only)
102
+ * @param sessionId - The session ID to filter ratings by
103
+ * @param limit - Maximum number of ratings to return
104
+ * @param offset - Number of ratings to skip
105
+ * @returns Paginated response with ratings for the specified session
106
+ */
107
+ getRatingsBySession(sessionId, limit, offset) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ return this.getRatings({ sessionId, limit, offset });
110
+ });
111
+ }
112
+ /**
113
+ * Get ratings by template ID (Superuser only)
114
+ * @param templateId - The template ID to filter ratings by
115
+ * @param limit - Maximum number of ratings to return
116
+ * @param offset - Number of ratings to skip
117
+ * @returns Paginated response with ratings for the specified template
118
+ */
119
+ getRatingsByTemplate(templateId, limit, offset) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ return this.getRatings({ templateId, limit, offset });
122
+ });
123
+ }
124
+ }
@@ -19,6 +19,7 @@ import { ReportsModule } from './modules/reports.module';
19
19
  import { PatientModule } from './modules/patient.module';
20
20
  import { DataStrategyModule } from './modules/data-strategy.module';
21
21
  import { SystemSnapshotModule } from './modules/system-snapshot.module';
22
+ import { RatingModule } from './modules/rating.module';
22
23
  /**
23
24
  * Main SDK class that provides access to all domain-specific modules
24
25
  */
@@ -42,6 +43,7 @@ export declare class ApiSDK extends BaseClient {
42
43
  readonly patients: PatientModule;
43
44
  readonly dataStrategies: DataStrategyModule;
44
45
  readonly systemSnapshots: SystemSnapshotModule;
46
+ readonly ratings: RatingModule;
45
47
  private modules;
46
48
  private sdkInitialized;
47
49
  constructor(config?: SDKConfig);
@@ -235,4 +237,11 @@ export declare class ApiSDK extends BaseClient {
235
237
  getSystemSnapshots(...args: Parameters<SystemSnapshotModule['getSnapshots']>): Promise<import("./types").SystemSnapshotsResponse>;
236
238
  getLatestSystemSnapshot(...args: Parameters<SystemSnapshotModule['getLatestSnapshot']>): Promise<import("./types").SystemSnapshot | null>;
237
239
  getCurrentSystemMetrics(...args: Parameters<SystemSnapshotModule['getCurrentMetrics']>): Promise<import("./types").CurrentMetrics>;
240
+ createRating(...args: Parameters<RatingModule['createRating']>): Promise<import("./types").SummaryRating>;
241
+ getRatings(...args: Parameters<RatingModule['getRatings']>): Promise<import("./types").SummaryRatingsResponse>;
242
+ getRatingsByUser(...args: Parameters<RatingModule['getRatingsByUser']>): Promise<import("./types").SummaryRatingsResponse>;
243
+ getRatingsByTranscriptionSummary(...args: Parameters<RatingModule['getRatingsByTranscriptionSummary']>): Promise<import("./types").SummaryRatingsResponse>;
244
+ getRatingsByDateRange(...args: Parameters<RatingModule['getRatingsByDateRange']>): Promise<import("./types").SummaryRatingsResponse>;
245
+ getRatingsBySession(...args: Parameters<RatingModule['getRatingsBySession']>): Promise<import("./types").SummaryRatingsResponse>;
246
+ getRatingsByTemplate(...args: Parameters<RatingModule['getRatingsByTemplate']>): Promise<import("./types").SummaryRatingsResponse>;
238
247
  }
@@ -27,6 +27,7 @@ import { ReportsModule } from './modules/reports.module';
27
27
  import { PatientModule } from './modules/patient.module';
28
28
  import { DataStrategyModule } from './modules/data-strategy.module';
29
29
  import { SystemSnapshotModule } from './modules/system-snapshot.module';
30
+ import { RatingModule } from './modules/rating.module';
30
31
  /**
31
32
  * Main SDK class that provides access to all domain-specific modules
32
33
  */
@@ -54,12 +55,13 @@ export class ApiSDK extends BaseClient {
54
55
  this.patients = new PatientModule(config);
55
56
  this.dataStrategies = new DataStrategyModule(config);
56
57
  this.systemSnapshots = new SystemSnapshotModule(config);
58
+ this.ratings = new RatingModule(config);
57
59
  // Store all modules for batch operations
58
60
  this.modules = [
59
61
  this.auth, this.users, this.organizations, this.teams, this.templates,
60
62
  this.transcriptionSummaries, this.sessions, this.agents, this.audio,
61
63
  this.workflows, this.integrationActions, this.logs, this.debug, this.externalIntegrations,
62
- this.reports, this.patients, this.dataStrategies, this.systemSnapshots,
64
+ this.reports, this.patients, this.dataStrategies, this.systemSnapshots, this.ratings,
63
65
  ...(this.websocket ? [this.websocket] : [])
64
66
  ];
65
67
  // Auto-initialize the SDK
@@ -974,4 +976,40 @@ export class ApiSDK extends BaseClient {
974
976
  return this.systemSnapshots.getCurrentMetrics(...args);
975
977
  });
976
978
  }
979
+ // Rating methods
980
+ createRating(...args) {
981
+ return __awaiter(this, void 0, void 0, function* () {
982
+ return this.ratings.createRating(...args);
983
+ });
984
+ }
985
+ getRatings(...args) {
986
+ return __awaiter(this, void 0, void 0, function* () {
987
+ return this.ratings.getRatings(...args);
988
+ });
989
+ }
990
+ getRatingsByUser(...args) {
991
+ return __awaiter(this, void 0, void 0, function* () {
992
+ return this.ratings.getRatingsByUser(...args);
993
+ });
994
+ }
995
+ getRatingsByTranscriptionSummary(...args) {
996
+ return __awaiter(this, void 0, void 0, function* () {
997
+ return this.ratings.getRatingsByTranscriptionSummary(...args);
998
+ });
999
+ }
1000
+ getRatingsByDateRange(...args) {
1001
+ return __awaiter(this, void 0, void 0, function* () {
1002
+ return this.ratings.getRatingsByDateRange(...args);
1003
+ });
1004
+ }
1005
+ getRatingsBySession(...args) {
1006
+ return __awaiter(this, void 0, void 0, function* () {
1007
+ return this.ratings.getRatingsBySession(...args);
1008
+ });
1009
+ }
1010
+ getRatingsByTemplate(...args) {
1011
+ return __awaiter(this, void 0, void 0, function* () {
1012
+ return this.ratings.getRatingsByTemplate(...args);
1013
+ });
1014
+ }
977
1015
  }
@@ -16,3 +16,4 @@ export * from './reports.types';
16
16
  export * from './patient.types';
17
17
  export * from './data-strategy.types';
18
18
  export * from './system-snapshot.types';
19
+ export * from './rating.types';
@@ -17,3 +17,4 @@ export * from './reports.types';
17
17
  export * from './patient.types';
18
18
  export * from './data-strategy.types';
19
19
  export * from './system-snapshot.types';
20
+ export * from './rating.types';
@@ -0,0 +1,45 @@
1
+ import { User } from './user.types';
2
+ import { TranscriptionSummary, Template } from './template.types';
3
+ import { Session } from './session.types';
4
+ export interface SummaryRating {
5
+ id: string;
6
+ userId: string;
7
+ datetime: string;
8
+ transcriptionSummaryId: string | null;
9
+ sessionId: string | null;
10
+ templateId: string | null;
11
+ templateName: string | null;
12
+ notes: string | null;
13
+ rating: number;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ user?: User;
17
+ transcriptionSummary?: TranscriptionSummary;
18
+ session?: Session;
19
+ template?: Template;
20
+ }
21
+ export interface CreateSummaryRatingDto {
22
+ datetime: string;
23
+ transcriptionSummaryId?: string;
24
+ sessionId?: string;
25
+ templateId?: string;
26
+ templateName?: string;
27
+ notes?: string;
28
+ rating: number;
29
+ }
30
+ export interface FilterSummaryRatingsDto {
31
+ userId?: string;
32
+ transcriptionSummaryId?: string;
33
+ sessionId?: string;
34
+ templateId?: string;
35
+ startDate?: string;
36
+ endDate?: string;
37
+ limit?: number;
38
+ offset?: number;
39
+ }
40
+ export interface SummaryRatingsResponse {
41
+ ratings: SummaryRating[];
42
+ total: number;
43
+ limit: number;
44
+ offset: number;
45
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -37,5 +37,6 @@ declare const urls: {
37
37
  patients: string;
38
38
  dataStrategies: string;
39
39
  systemSnapshots: string;
40
+ ratings: string;
40
41
  };
41
42
  export default urls;
@@ -57,5 +57,7 @@ const urls = {
57
57
  dataStrategies: '/data-strategies',
58
58
  // System Snapshots
59
59
  systemSnapshots: '/system-snapshots',
60
+ // Ratings
61
+ ratings: '/ratings',
60
62
  };
61
63
  export default urls;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -0,0 +1,143 @@
1
+ import { BaseClient } from './base-client';
2
+ import {
3
+ SummaryRating,
4
+ CreateSummaryRatingDto,
5
+ FilterSummaryRatingsDto,
6
+ SummaryRatingsResponse,
7
+ } from '../types';
8
+ import urls from '../urls';
9
+
10
+ export class RatingModule extends BaseClient {
11
+ /**
12
+ * Create a new summary rating
13
+ * @param ratingData - The rating data including datetime, rating (0-5), and optional fields: notes, transcriptionSummaryId, sessionId, templateId, templateName
14
+ * @returns The created SummaryRating with user, transcriptionSummary, session, and template relations
15
+ */
16
+ public async createRating(
17
+ ratingData: CreateSummaryRatingDto,
18
+ ): Promise<SummaryRating> {
19
+ return this.request<SummaryRating>(urls.ratings, 'POST', ratingData);
20
+ }
21
+
22
+ /**
23
+ * Get all ratings with optional filters (Superuser only)
24
+ * @param filters - Optional filters including userId, transcriptionSummaryId, sessionId, templateId, date range, and pagination
25
+ * @returns Paginated response with ratings array, total count, limit, and offset
26
+ */
27
+ public async getRatings(
28
+ filters?: FilterSummaryRatingsDto,
29
+ ): Promise<SummaryRatingsResponse> {
30
+ if (!filters || Object.keys(filters).length === 0) {
31
+ return this.request<SummaryRatingsResponse>(urls.ratings, 'GET');
32
+ }
33
+
34
+ const params = new URLSearchParams();
35
+
36
+ if (filters.userId) {
37
+ params.append('userId', filters.userId);
38
+ }
39
+ if (filters.transcriptionSummaryId) {
40
+ params.append('transcriptionSummaryId', filters.transcriptionSummaryId);
41
+ }
42
+ if (filters.sessionId) {
43
+ params.append('sessionId', filters.sessionId);
44
+ }
45
+ if (filters.templateId) {
46
+ params.append('templateId', filters.templateId);
47
+ }
48
+ if (filters.startDate) {
49
+ params.append('startDate', filters.startDate);
50
+ }
51
+ if (filters.endDate) {
52
+ params.append('endDate', filters.endDate);
53
+ }
54
+ if (filters.limit !== undefined) {
55
+ params.append('limit', filters.limit.toString());
56
+ }
57
+ if (filters.offset !== undefined) {
58
+ params.append('offset', filters.offset.toString());
59
+ }
60
+
61
+ const queryString = params.toString();
62
+ const endpoint = `${urls.ratings}?${queryString}`;
63
+
64
+ return this.request<SummaryRatingsResponse>(endpoint, 'GET');
65
+ }
66
+
67
+ /**
68
+ * Get ratings by user ID (Superuser only)
69
+ * @param userId - The user ID to filter ratings by
70
+ * @param limit - Maximum number of ratings to return
71
+ * @param offset - Number of ratings to skip
72
+ * @returns Paginated response with ratings for the specified user
73
+ */
74
+ public async getRatingsByUser(
75
+ userId: string,
76
+ limit?: number,
77
+ offset?: number,
78
+ ): Promise<SummaryRatingsResponse> {
79
+ return this.getRatings({ userId, limit, offset });
80
+ }
81
+
82
+ /**
83
+ * Get ratings by transcription summary ID (Superuser only)
84
+ * @param transcriptionSummaryId - The transcription summary ID to filter ratings by
85
+ * @param limit - Maximum number of ratings to return
86
+ * @param offset - Number of ratings to skip
87
+ * @returns Paginated response with ratings for the specified transcription summary
88
+ */
89
+ public async getRatingsByTranscriptionSummary(
90
+ transcriptionSummaryId: string,
91
+ limit?: number,
92
+ offset?: number,
93
+ ): Promise<SummaryRatingsResponse> {
94
+ return this.getRatings({ transcriptionSummaryId, limit, offset });
95
+ }
96
+
97
+ /**
98
+ * Get ratings within a date range (Superuser only)
99
+ * @param startDate - ISO date string for the start of the range
100
+ * @param endDate - ISO date string for the end of the range
101
+ * @param limit - Maximum number of ratings to return
102
+ * @param offset - Number of ratings to skip
103
+ * @returns Paginated response with ratings within the specified date range
104
+ */
105
+ public async getRatingsByDateRange(
106
+ startDate: string,
107
+ endDate: string,
108
+ limit?: number,
109
+ offset?: number,
110
+ ): Promise<SummaryRatingsResponse> {
111
+ return this.getRatings({ startDate, endDate, limit, offset });
112
+ }
113
+
114
+ /**
115
+ * Get ratings by session ID (Superuser only)
116
+ * @param sessionId - The session ID to filter ratings by
117
+ * @param limit - Maximum number of ratings to return
118
+ * @param offset - Number of ratings to skip
119
+ * @returns Paginated response with ratings for the specified session
120
+ */
121
+ public async getRatingsBySession(
122
+ sessionId: string,
123
+ limit?: number,
124
+ offset?: number,
125
+ ): Promise<SummaryRatingsResponse> {
126
+ return this.getRatings({ sessionId, limit, offset });
127
+ }
128
+
129
+ /**
130
+ * Get ratings by template ID (Superuser only)
131
+ * @param templateId - The template ID to filter ratings by
132
+ * @param limit - Maximum number of ratings to return
133
+ * @param offset - Number of ratings to skip
134
+ * @returns Paginated response with ratings for the specified template
135
+ */
136
+ public async getRatingsByTemplate(
137
+ templateId: string,
138
+ limit?: number,
139
+ offset?: number,
140
+ ): Promise<SummaryRatingsResponse> {
141
+ return this.getRatings({ templateId, limit, offset });
142
+ }
143
+ }
package/src/sdk/sdk.ts CHANGED
@@ -20,6 +20,7 @@ import { ReportsModule } from './modules/reports.module';
20
20
  import { PatientModule } from './modules/patient.module';
21
21
  import { DataStrategyModule } from './modules/data-strategy.module';
22
22
  import { SystemSnapshotModule } from './modules/system-snapshot.module';
23
+ import { RatingModule } from './modules/rating.module';
23
24
 
24
25
  /**
25
26
  * Main SDK class that provides access to all domain-specific modules
@@ -44,6 +45,7 @@ export class ApiSDK extends BaseClient {
44
45
  public readonly patients: PatientModule;
45
46
  public readonly dataStrategies: DataStrategyModule;
46
47
  public readonly systemSnapshots: SystemSnapshotModule;
48
+ public readonly ratings: RatingModule;
47
49
 
48
50
  private modules: BaseClient[];
49
51
  private sdkInitialized: boolean = false;
@@ -71,13 +73,14 @@ export class ApiSDK extends BaseClient {
71
73
  this.patients = new PatientModule(config);
72
74
  this.dataStrategies = new DataStrategyModule(config);
73
75
  this.systemSnapshots = new SystemSnapshotModule(config);
76
+ this.ratings = new RatingModule(config);
74
77
 
75
78
  // Store all modules for batch operations
76
79
  this.modules = [
77
80
  this.auth, this.users, this.organizations, this.teams, this.templates,
78
81
  this.transcriptionSummaries, this.sessions, this.agents, this.audio,
79
82
  this.workflows, this.integrationActions, this.logs, this.debug, this.externalIntegrations,
80
- this.reports, this.patients, this.dataStrategies, this.systemSnapshots,
83
+ this.reports, this.patients, this.dataStrategies, this.systemSnapshots, this.ratings,
81
84
  ...(this.websocket ? [this.websocket] : [])
82
85
  ];
83
86
 
@@ -851,4 +854,33 @@ export class ApiSDK extends BaseClient {
851
854
  return this.systemSnapshots.getCurrentMetrics(...args);
852
855
  }
853
856
 
857
+ // Rating methods
858
+ public async createRating(...args: Parameters<RatingModule['createRating']>) {
859
+ return this.ratings.createRating(...args);
860
+ }
861
+
862
+ public async getRatings(...args: Parameters<RatingModule['getRatings']>) {
863
+ return this.ratings.getRatings(...args);
864
+ }
865
+
866
+ public async getRatingsByUser(...args: Parameters<RatingModule['getRatingsByUser']>) {
867
+ return this.ratings.getRatingsByUser(...args);
868
+ }
869
+
870
+ public async getRatingsByTranscriptionSummary(...args: Parameters<RatingModule['getRatingsByTranscriptionSummary']>) {
871
+ return this.ratings.getRatingsByTranscriptionSummary(...args);
872
+ }
873
+
874
+ public async getRatingsByDateRange(...args: Parameters<RatingModule['getRatingsByDateRange']>) {
875
+ return this.ratings.getRatingsByDateRange(...args);
876
+ }
877
+
878
+ public async getRatingsBySession(...args: Parameters<RatingModule['getRatingsBySession']>) {
879
+ return this.ratings.getRatingsBySession(...args);
880
+ }
881
+
882
+ public async getRatingsByTemplate(...args: Parameters<RatingModule['getRatingsByTemplate']>) {
883
+ return this.ratings.getRatingsByTemplate(...args);
884
+ }
885
+
854
886
  }
@@ -17,3 +17,4 @@ export * from './reports.types';
17
17
  export * from './patient.types';
18
18
  export * from './data-strategy.types';
19
19
  export * from './system-snapshot.types';
20
+ export * from './rating.types';
@@ -0,0 +1,49 @@
1
+ import { User } from './user.types';
2
+ import { TranscriptionSummary, Template } from './template.types';
3
+ import { Session } from './session.types';
4
+
5
+ export interface SummaryRating {
6
+ id: string;
7
+ userId: string;
8
+ datetime: string;
9
+ transcriptionSummaryId: string | null;
10
+ sessionId: string | null;
11
+ templateId: string | null;
12
+ templateName: string | null;
13
+ notes: string | null;
14
+ rating: number;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ user?: User;
18
+ transcriptionSummary?: TranscriptionSummary;
19
+ session?: Session;
20
+ template?: Template;
21
+ }
22
+
23
+ export interface CreateSummaryRatingDto {
24
+ datetime: string;
25
+ transcriptionSummaryId?: string;
26
+ sessionId?: string;
27
+ templateId?: string;
28
+ templateName?: string;
29
+ notes?: string;
30
+ rating: number;
31
+ }
32
+
33
+ export interface FilterSummaryRatingsDto {
34
+ userId?: string;
35
+ transcriptionSummaryId?: string;
36
+ sessionId?: string;
37
+ templateId?: string;
38
+ startDate?: string;
39
+ endDate?: string;
40
+ limit?: number;
41
+ offset?: number;
42
+ }
43
+
44
+ export interface SummaryRatingsResponse {
45
+ ratings: SummaryRating[];
46
+ total: number;
47
+ limit: number;
48
+ offset: number;
49
+ }
package/src/sdk/urls.ts CHANGED
@@ -76,6 +76,9 @@ const urls = {
76
76
 
77
77
  // System Snapshots
78
78
  systemSnapshots: '/system-snapshots',
79
+
80
+ // Ratings
81
+ ratings: '/ratings',
79
82
  }
80
83
 
81
84
  export default urls;