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
@@ -11,7 +11,6 @@ import { AgentModule } from './modules/agent.module';
11
11
  import { AudioModule } from './modules/audio.module';
12
12
  import { WorkflowModule } from './modules/workflow.module';
13
13
  import { LogModule } from './modules/log.module';
14
- import { DebugModule } from './modules/debug.module';
15
14
  import { ExternalIntegrationModule } from './modules/external-integration.module';
16
15
  import { ReportsModule } from './modules/reports.module';
17
16
  import { DataStrategyModule } from './modules/data-strategy.module';
@@ -33,7 +32,6 @@ export declare class WhioSuperuserSDK extends BaseClient {
33
32
  private readonly workflowsModule;
34
33
  private readonly integrationActionsModule;
35
34
  private readonly logsModule;
36
- private readonly debugModule;
37
35
  private readonly externalIntegrationsModule;
38
36
  private readonly websocketModule;
39
37
  private readonly reportsModule;
@@ -59,7 +57,7 @@ export declare class WhioSuperuserSDK extends BaseClient {
59
57
  getSessionsByOrganization(...args: Parameters<SuperuserSessionModule['getSessionsByOrganization']>): Promise<import("./types").SessionsResponse>;
60
58
  searchSessions(...args: Parameters<SuperuserSessionModule['searchSessions']>): Promise<import("./types").SearchSessionsResponse>;
61
59
  updateSession(...args: Parameters<SuperuserSessionModule['updateSession']>): Promise<import("./types").Session>;
62
- deleteSession(...args: Parameters<SuperuserSessionModule['deleteSession']>): Promise<void>;
60
+ deleteSession(...args: Parameters<SuperuserSessionModule['deleteSession']>): Promise<import("./types").Session>;
63
61
  setPrimaryTranscriptionSummary(...args: Parameters<SuperuserSessionModule['setPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
64
62
  getSession(...args: Parameters<SuperuserSessionModule['getSession']>): Promise<import("./types").Session>;
65
63
  createUser(...args: Parameters<UserModule['createUser']>): Promise<User>;
@@ -78,16 +76,16 @@ export declare class WhioSuperuserSDK extends BaseClient {
78
76
  getOrganization(...args: Parameters<OrganizationModule['getOrganization']>): Promise<import("./types").Organization>;
79
77
  updateOrganization(...args: Parameters<OrganizationModule['updateOrganization']>): Promise<import("./types").Organization>;
80
78
  deleteOrganization(...args: Parameters<OrganizationModule['deleteOrganization']>): Promise<void>;
81
- addUserToOrganization(...args: Parameters<OrganizationModule['addUserToOrganization']>): Promise<void>;
82
- removeUserFromOrganization(...args: Parameters<OrganizationModule['removeUserFromOrganization']>): Promise<void>;
79
+ addUserToOrganization(...args: Parameters<OrganizationModule['addUserToOrganization']>): Promise<User>;
80
+ removeUserFromOrganization(...args: Parameters<OrganizationModule['removeUserFromOrganization']>): Promise<User>;
83
81
  createTeam(...args: Parameters<TeamModule['createTeam']>): Promise<import("./types").Team>;
84
82
  getTeams(...args: Parameters<TeamModule['getTeams']>): Promise<import("./types").Team[]>;
85
83
  getTeam(...args: Parameters<TeamModule['getTeam']>): Promise<import("./types").Team>;
86
84
  getTeamsByOrganization(...args: Parameters<TeamModule['getTeamsByOrganization']>): Promise<import("./types").Team[]>;
87
85
  updateTeam(...args: Parameters<TeamModule['updateTeam']>): Promise<import("./types").Team>;
88
86
  deleteTeam(...args: Parameters<TeamModule['deleteTeam']>): Promise<void>;
89
- addUserToTeam(...args: Parameters<TeamModule['addUserToTeam']>): Promise<any>;
90
- removeUserFromTeam(...args: Parameters<TeamModule['removeUserFromTeam']>): Promise<void>;
87
+ addUserToTeam(...args: Parameters<TeamModule['addUserToTeam']>): Promise<import("./types").TeamRole>;
88
+ removeUserFromTeam(...args: Parameters<TeamModule['removeUserFromTeam']>): Promise<import("./types").TeamRole>;
91
89
  createTemplate(...args: Parameters<TemplateModule['createTemplate']>): Promise<import("./types").Template>;
92
90
  getTemplates(...args: Parameters<TemplateModule['getTemplates']>): Promise<import("./types").Template[]>;
93
91
  getTemplate(...args: Parameters<TemplateModule['getTemplate']>): Promise<import("./types").Template>;
@@ -102,8 +100,8 @@ export declare class WhioSuperuserSDK extends BaseClient {
102
100
  getTranscriptionSummariesByUser(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummariesByUser']>): Promise<import("./types").TranscriptionSummary[]>;
103
101
  getByOrganizationTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getByOrganizationTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
104
102
  createAgent(...args: Parameters<AgentModule['createAgent']>): Promise<import("./types").Agent>;
105
- getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").Agent[]>;
106
- getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").Agent>;
103
+ getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").AgentWithOrganizations[]>;
104
+ getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").AgentWithOrganizations>;
107
105
  updateAgent(...args: Parameters<AgentModule['updateAgent']>): Promise<import("./types").Agent>;
108
106
  deleteAgent(...args: Parameters<AgentModule['deleteAgent']>): Promise<void>;
109
107
  createWorkflow(...args: Parameters<WorkflowModule['createWorkflow']>): Promise<import("./types").Workflow>;
@@ -116,8 +114,6 @@ export declare class WhioSuperuserSDK extends BaseClient {
116
114
  getLogs(...args: Parameters<LogModule['getLogs']>): Promise<import("./types").LogsResponse>;
117
115
  getLogsByUser(...args: Parameters<LogModule['getLogsByUser']>): Promise<import("./types").LogsResponse>;
118
116
  getLogStats(...args: Parameters<LogModule['getLogStats']>): Promise<import("./types").LogStats>;
119
- getSessionsWithoutMedicalTranscriptions(...args: Parameters<DebugModule['getSessionsWithoutMedicalTranscriptions']>): Promise<import("./types").DebugSessionSummary[]>;
120
- downloadSessionAsZip(...args: Parameters<DebugModule['downloadSessionAsZip']>): Promise<Blob>;
121
117
  getSystemSnapshots(...args: Parameters<SystemSnapshotModule['getSnapshots']>): Promise<import("./types").SystemSnapshotsResponse>;
122
118
  getLatestSystemSnapshot(...args: Parameters<SystemSnapshotModule['getLatestSnapshot']>): Promise<import("./types").SystemSnapshot | null>;
123
119
  getCurrentSystemMetrics(...args: Parameters<SystemSnapshotModule['getCurrentMetrics']>): Promise<import("./types").CurrentMetrics>;
@@ -125,11 +121,11 @@ export declare class WhioSuperuserSDK extends BaseClient {
125
121
  getExternalIntegrations(...args: Parameters<ExternalIntegrationModule['getExternalIntegrations']>): Promise<import("./types").ExternalIntegration[]>;
126
122
  updateExternalIntegration(...args: Parameters<ExternalIntegrationModule['updateExternalIntegration']>): Promise<import("./types").ExternalIntegration>;
127
123
  deleteExternalIntegration(...args: Parameters<ExternalIntegrationModule['deleteExternalIntegration']>): Promise<void>;
128
- createDataStrategy(...args: Parameters<DataStrategyModule['createDataStrategy']>): Promise<import("./types").DataStrategy>;
129
- getDataStrategies(...args: Parameters<DataStrategyModule['getDataStrategies']>): Promise<import("./types").DataStrategy[]>;
130
- getDataStrategy(...args: Parameters<DataStrategyModule['getDataStrategy']>): Promise<import("./types").DataStrategy>;
131
- updateDataStrategy(...args: Parameters<DataStrategyModule['updateDataStrategy']>): Promise<import("./types").DataStrategy>;
132
- deleteDataStrategy(...args: Parameters<DataStrategyModule['deleteDataStrategy']>): Promise<void>;
124
+ createDataStrategy(...args: Parameters<DataStrategyModule['createDataStrategy']>): Promise<import("./types").DataStrategyWithOrganization>;
125
+ getDataStrategies(...args: Parameters<DataStrategyModule['getDataStrategies']>): Promise<import("./types").DataStrategyWithOrganization[]>;
126
+ getDataStrategy(...args: Parameters<DataStrategyModule['getDataStrategy']>): Promise<import("./types").DataStrategyWithOrganization>;
127
+ updateDataStrategy(...args: Parameters<DataStrategyModule['updateDataStrategy']>): Promise<import("./types").DataStrategyWithOrganization>;
128
+ deleteDataStrategy(...args: Parameters<DataStrategyModule['deleteDataStrategy']>): Promise<import("./types").DataStrategy>;
133
129
  getCompanyDailyReportCsv(...args: Parameters<ReportsModule['getCompanyDailyReportCsv']>): Promise<string>;
134
130
  downloadCompanyDailyReport(...args: Parameters<ReportsModule['downloadCompanyDailyReport']>): Promise<Blob>;
135
131
  }
@@ -20,7 +20,6 @@ import { AudioModule } from './modules/audio.module';
20
20
  import { WorkflowModule } from './modules/workflow.module';
21
21
  import { IntegrationActionModule } from './modules/integration-action.module';
22
22
  import { LogModule } from './modules/log.module';
23
- import { DebugModule } from './modules/debug.module';
24
23
  import { ExternalIntegrationModule } from './modules/external-integration.module';
25
24
  import { WebSocketModule } from './modules/websocket.module';
26
25
  import { ReportsModule } from './modules/reports.module';
@@ -49,7 +48,6 @@ export class WhioSuperuserSDK extends BaseClient {
49
48
  this.workflowsModule = new WorkflowModule(config);
50
49
  this.integrationActionsModule = new IntegrationActionModule(config);
51
50
  this.logsModule = new LogModule(config);
52
- this.debugModule = new DebugModule(config);
53
51
  this.externalIntegrationsModule = new ExternalIntegrationModule(config);
54
52
  this.websocketModule = config.skipWebsocket ? null : new WebSocketModule(config);
55
53
  this.reportsModule = new ReportsModule(config);
@@ -61,7 +59,7 @@ export class WhioSuperuserSDK extends BaseClient {
61
59
  this.modules = [
62
60
  this.authModule, this.usersModule, this.organizationsModule, this.teamsModule, this.templatesModule,
63
61
  this.transcriptionSummariesModule, this.sessionsModule, this.agentsModule, this.audioModule,
64
- this.workflowsModule, this.integrationActionsModule, this.logsModule, this.debugModule, this.externalIntegrationsModule,
62
+ this.workflowsModule, this.integrationActionsModule, this.logsModule, this.externalIntegrationsModule,
65
63
  this.reportsModule, this.patientsModule, this.dataStrategiesModule, this.systemSnapshotsModule, this.ratingsModule,
66
64
  this.tiakiModule,
67
65
  ...(this.websocketModule ? [this.websocketModule] : [])
@@ -479,19 +477,6 @@ export class WhioSuperuserSDK extends BaseClient {
479
477
  });
480
478
  }
481
479
  // ======================
482
- // DEBUG METHODS
483
- // ======================
484
- getSessionsWithoutMedicalTranscriptions(...args) {
485
- return __awaiter(this, void 0, void 0, function* () {
486
- return this.debugModule.getSessionsWithoutMedicalTranscriptions(...args);
487
- });
488
- }
489
- downloadSessionAsZip(...args) {
490
- return __awaiter(this, void 0, void 0, function* () {
491
- return this.debugModule.downloadSessionAsZip(...args);
492
- });
493
- }
494
- // ======================
495
480
  // SYSTEM SNAPSHOT METHODS
496
481
  // ======================
497
482
  getSystemSnapshots(...args) {
@@ -30,7 +30,6 @@ export declare class WhioTeamAdminSDK extends BaseClient {
30
30
  private readonly workflowsModule;
31
31
  private readonly integrationActionsModule;
32
32
  private readonly logsModule;
33
- private readonly debugModule;
34
33
  private readonly externalIntegrationsModule;
35
34
  private readonly websocketModule;
36
35
  private readonly reportsModule;
@@ -58,7 +57,7 @@ export declare class WhioTeamAdminSDK extends BaseClient {
58
57
  getSessions(...args: Parameters<SessionModule['getSessions']>): Promise<import("./types").Session[]>;
59
58
  getSession(...args: Parameters<SessionModule['getSession']>): Promise<import("./types").Session>;
60
59
  updateSession(...args: Parameters<SessionModule['updateSession']>): Promise<import("./types").Session>;
61
- deleteSession(...args: Parameters<SessionModule['deleteSession']>): Promise<void>;
60
+ deleteSession(...args: Parameters<SessionModule['deleteSession']>): Promise<import("./types").Session>;
62
61
  searchSessions(...args: Parameters<SessionModule['searchSessions']>): Promise<import("./types").SearchSessionsResponse>;
63
62
  setPrimaryTranscriptionSummary(...args: Parameters<SessionModule['setPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
64
63
  rerunTranscription(...args: Parameters<SessionModule['rerunTranscription']>): Promise<{
@@ -77,15 +76,12 @@ export declare class WhioTeamAdminSDK extends BaseClient {
77
76
  getTemplatesByOrganization(...args: Parameters<TemplateModule['getTemplatesByOrganization']>): Promise<import("./types").Template[]>;
78
77
  getTemplateCategories(...args: Parameters<TemplateModule['getTemplateCategories']>): Promise<import("./types").TemplateCategory[]>;
79
78
  getTemplateCategory(...args: Parameters<TemplateModule['getTemplateCategory']>): Promise<import("./types").TemplateCategory>;
80
- generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
79
+ generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>): Promise<import("./types").GenerateSummaryResponse>;
81
80
  updateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['updateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
82
81
  getTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
83
82
  getTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
84
83
  cloneTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['cloneTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
85
84
  deleteTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['deleteTranscriptionSummary']>): Promise<void>;
86
- uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>): Promise<import("./types").TranscriptionAudioUploadResponse | null>;
87
- uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>): Promise<string>;
88
- transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>): Promise<string>;
89
85
  uploadAudioFileToSession(...args: Parameters<AudioModule['uploadAudioFileToSession']>): Promise<import("./types").AudioFile>;
90
86
  getMyAudioFiles(...args: Parameters<AudioModule['getMyAudioFiles']>): Promise<import("./types").AudioFile[]>;
91
87
  getAudioFilesBySession(...args: Parameters<AudioModule['getAudioFilesBySession']>): Promise<import("./types").AudioFile[]>;
@@ -95,8 +91,8 @@ export declare class WhioTeamAdminSDK extends BaseClient {
95
91
  getWorkflows(...args: Parameters<WorkflowModule['getWorkflows']>): Promise<import("./types").Workflow[]>;
96
92
  getWorkflow(...args: Parameters<WorkflowModule['getWorkflow']>): Promise<import("./types").Workflow>;
97
93
  getWorkflowsByOrganization(...args: Parameters<WorkflowModule['getWorkflowsByOrganization']>): Promise<import("./types").Workflow[]>;
98
- getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").Agent[]>;
99
- getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").Agent>;
94
+ getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").AgentWithOrganizations[]>;
95
+ getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").AgentWithOrganizations>;
100
96
  createRating(...args: Parameters<RatingModule['createRating']>): Promise<import("./types").SummaryRating>;
101
97
  getRatingsBySession(...args: Parameters<RatingModule['getRatingsBySession']>): Promise<import("./types").SummaryRatingsResponse>;
102
98
  createTiakiCalendarEvent(...args: Parameters<TiakiModule['createCalendarEvent']>): Promise<import("./types").TiakiCalendarEventResponse>;
@@ -20,7 +20,6 @@ import { AudioModule } from './modules/audio.module';
20
20
  import { WorkflowModule } from './modules/workflow.module';
21
21
  import { IntegrationActionModule } from './modules/integration-action.module';
22
22
  import { LogModule } from './modules/log.module';
23
- import { DebugModule } from './modules/debug.module';
24
23
  import { ExternalIntegrationModule } from './modules/external-integration.module';
25
24
  import { WebSocketModule } from './modules/websocket.module';
26
25
  import { ReportsModule } from './modules/reports.module';
@@ -51,7 +50,6 @@ export class WhioTeamAdminSDK extends BaseClient {
51
50
  this.workflowsModule = new WorkflowModule(config);
52
51
  this.integrationActionsModule = new IntegrationActionModule(config);
53
52
  this.logsModule = new LogModule(config);
54
- this.debugModule = new DebugModule(config);
55
53
  this.externalIntegrationsModule = new ExternalIntegrationModule(config);
56
54
  this.websocketModule = config.skipWebsocket ? null : new WebSocketModule(config);
57
55
  this.reportsModule = new ReportsModule(config);
@@ -63,7 +61,7 @@ export class WhioTeamAdminSDK extends BaseClient {
63
61
  this.modules = [
64
62
  this.authModule, this.usersModule, this.organizationsModule, this.teamsModule, this.templatesModule,
65
63
  this.transcriptionSummariesModule, this.sessionsModule, this.agentsModule, this.audioModule,
66
- this.workflowsModule, this.integrationActionsModule, this.logsModule, this.debugModule, this.externalIntegrationsModule,
64
+ this.workflowsModule, this.integrationActionsModule, this.logsModule, this.externalIntegrationsModule,
67
65
  this.reportsModule, this.patientsModule, this.dataStrategiesModule, this.systemSnapshotsModule, this.ratingsModule,
68
66
  this.tiakiModule,
69
67
  ...(this.websocketModule ? [this.websocketModule] : [])
@@ -280,21 +278,6 @@ export class WhioTeamAdminSDK extends BaseClient {
280
278
  // ======================
281
279
  // AUDIO METHODS
282
280
  // ======================
283
- uploadAudioFile(...args) {
284
- return __awaiter(this, void 0, void 0, function* () {
285
- return this.templatesModule.uploadAudioFile(...args);
286
- });
287
- }
288
- uploadLargeAudioFile(...args) {
289
- return __awaiter(this, void 0, void 0, function* () {
290
- return this.templatesModule.uploadLargeAudioFile(...args);
291
- });
292
- }
293
- transcribeBase64Audio(...args) {
294
- return __awaiter(this, void 0, void 0, function* () {
295
- return this.templatesModule.transcribeBase64Audio(...args);
296
- });
297
- }
298
281
  uploadAudioFileToSession(...args) {
299
282
  return __awaiter(this, void 0, void 0, function* () {
300
283
  return this.audioModule.uploadAudioFileToSession(...args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base-client';
2
- import { Agent, CreateAgentDto, UpdateAgentDto, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto } from '../types';
2
+ import { Agent, AgentWithOrganizations, AgentOrganization, CreateAgentDto, UpdateAgentDto, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto } from '../types';
3
3
  import urls from '../urls';
4
4
 
5
5
  export class AgentModule extends BaseClient {
@@ -7,44 +7,103 @@ export class AgentModule extends BaseClient {
7
7
  // AGENT METHODS
8
8
  // ======================
9
9
 
10
+ /**
11
+ * Create a new agent.
12
+ *
13
+ * @param name - Display name of the agent.
14
+ * @param templateTextReplacement - Optional template text-replacement string for the agent.
15
+ * @returns The created agent.
16
+ */
10
17
  public async createAgent(name: string, templateTextReplacement?: string): Promise<Agent> {
11
18
  const dto: CreateAgentDto = { name, templateTextReplacement };
12
19
  return this.request<Agent>(urls.agents, 'POST', dto);
13
20
  }
14
21
 
15
- public async getAgents(): Promise<Agent[]> {
16
- return this.request<Agent[]>(urls.agents, 'GET');
22
+ /**
23
+ * List all agents, each including its linked organizations.
24
+ *
25
+ * @returns An array of agents with their organizations relation populated.
26
+ */
27
+ public async getAgents(): Promise<AgentWithOrganizations[]> {
28
+ return this.request<AgentWithOrganizations[]>(urls.agents, 'GET');
17
29
  }
18
30
 
19
- public async getAgent(id: string): Promise<Agent> {
20
- return this.request<Agent>(`${urls.agents}/${id}`, 'GET');
31
+ /**
32
+ * Get a single agent by id, including its linked organizations.
33
+ *
34
+ * @param id - UUID of the agent.
35
+ * @returns The agent with its organizations relation populated.
36
+ */
37
+ public async getAgent(id: string): Promise<AgentWithOrganizations> {
38
+ return this.request<AgentWithOrganizations>(`${urls.agents}/${id}`, 'GET');
21
39
  }
22
40
 
41
+ /**
42
+ * Update an agent.
43
+ *
44
+ * @param id - UUID of the agent to update.
45
+ * @param name - New display name of the agent.
46
+ * @param templateTextReplacement - Optional template text-replacement string for the agent.
47
+ * @returns The updated agent.
48
+ */
23
49
  public async updateAgent(id: string, name: string, templateTextReplacement?: string): Promise<Agent> {
24
50
  const dto: UpdateAgentDto = { name, templateTextReplacement };
25
51
  return this.request<Agent>(`${urls.agents}/${id}`, 'PATCH', dto);
26
52
  }
27
53
 
54
+ /**
55
+ * Delete an agent.
56
+ *
57
+ * @param id - UUID of the agent to delete.
58
+ * @returns A promise that resolves when the agent has been deleted.
59
+ */
28
60
  public async deleteAgent(id: string): Promise<void> {
29
61
  await this.request(`${urls.agents}/${id}`, 'DELETE');
30
62
  }
31
63
 
32
- public async addAgentToOrganization(agentId: string, organizationId: string): Promise<void> {
33
- await this.request(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'POST');
64
+ /**
65
+ * Link an agent to an organization.
66
+ *
67
+ * @param agentId - UUID of the agent.
68
+ * @param organizationId - UUID of the organization to link.
69
+ * @returns The created agent-organization association.
70
+ */
71
+ public async addAgentToOrganization(agentId: string, organizationId: string): Promise<AgentOrganization> {
72
+ return this.request<AgentOrganization>(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'POST');
34
73
  }
35
74
 
36
- public async removeAgentFromOrganization(agentId: string, organizationId: string): Promise<void> {
37
- await this.request(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'DELETE');
75
+ /**
76
+ * Unlink an agent from an organization.
77
+ *
78
+ * @param agentId - UUID of the agent.
79
+ * @param organizationId - UUID of the organization to unlink.
80
+ * @returns The removed agent-organization association.
81
+ */
82
+ public async removeAgentFromOrganization(agentId: string, organizationId: string): Promise<AgentOrganization> {
83
+ return this.request<AgentOrganization>(`${urls.agents}/${agentId}/organizations/${organizationId}`, 'DELETE');
38
84
  }
39
85
 
40
86
  // ======================
41
87
  // AGENT SETTINGS METHODS
42
88
  // ======================
43
89
 
90
+ /**
91
+ * Create agent settings for an agent within an organization.
92
+ *
93
+ * @param settingsData - The agent-settings payload (agentId, organizationId and tuning params).
94
+ * @returns The created agent settings.
95
+ */
44
96
  public async createAgentSettings(settingsData: CreateAgentSettingsDto): Promise<AgentSettings> {
45
97
  return this.request<AgentSettings>(urls.agentSettings, 'POST', settingsData);
46
98
  }
47
99
 
100
+ /**
101
+ * List agent settings, optionally filtered by organization and/or agent.
102
+ *
103
+ * @param organizationId - Optional organization UUID to filter by.
104
+ * @param agentId - Optional agent UUID to filter by.
105
+ * @returns An array of matching agent settings.
106
+ */
48
107
  public async getAgentSettings(organizationId?: string, agentId?: string): Promise<AgentSettings[]> {
49
108
  const params = new URLSearchParams();
50
109
  if (organizationId) params.append('organizationId', organizationId);
@@ -56,18 +115,44 @@ export class AgentModule extends BaseClient {
56
115
  return this.request<AgentSettings[]>(endpoint, 'GET');
57
116
  }
58
117
 
118
+ /**
119
+ * Get a single agent settings record by id.
120
+ *
121
+ * @param id - UUID of the agent settings record.
122
+ * @returns The agent settings record.
123
+ */
59
124
  public async getAgentSettingsById(id: string): Promise<AgentSettings> {
60
125
  return this.request<AgentSettings>(`${urls.agentSettings}/${id}`, 'GET');
61
126
  }
62
127
 
128
+ /**
129
+ * Get the agent settings for a specific agent within a specific organization.
130
+ *
131
+ * @param agentId - UUID of the agent.
132
+ * @param organizationId - UUID of the organization.
133
+ * @returns The agent settings record for the agent/organization pair.
134
+ */
63
135
  public async getAgentSettingsByAgentAndOrganization(agentId: string, organizationId: string): Promise<AgentSettings> {
64
136
  return this.request<AgentSettings>(`${urls.agentSettings}/agent/${agentId}/organization/${organizationId}`, 'GET');
65
137
  }
66
138
 
139
+ /**
140
+ * Update an agent settings record.
141
+ *
142
+ * @param id - UUID of the agent settings record to update.
143
+ * @param settingsData - The fields to update.
144
+ * @returns The updated agent settings record.
145
+ */
67
146
  public async updateAgentSettings(id: string, settingsData: UpdateAgentSettingsDto): Promise<AgentSettings> {
68
147
  return this.request<AgentSettings>(`${urls.agentSettings}/${id}`, 'PATCH', settingsData);
69
148
  }
70
149
 
150
+ /**
151
+ * Delete an agent settings record.
152
+ *
153
+ * @param id - UUID of the agent settings record to delete.
154
+ * @returns A promise that resolves when the record has been deleted.
155
+ */
71
156
  public async deleteAgentSettings(id: string): Promise<void> {
72
157
  await this.request(`${urls.agentSettings}/${id}`, 'DELETE');
73
158
  }
@@ -16,55 +16,120 @@ export class AudioModule extends BaseClient {
16
16
  // AUDIO FILE METHODS
17
17
  // ======================
18
18
 
19
+ /**
20
+ * Upload an audio file to a session via multipart form data.
21
+ *
22
+ * @param sessionId - UUID of the session to attach the audio file to.
23
+ * @param file - The audio file or blob to upload.
24
+ * @param fileName - Optional file name to send with the upload.
25
+ * @param onProgress - Optional callback invoked with the upload percentage (0-100).
26
+ * @returns The created audio file record.
27
+ */
19
28
  public async uploadAudioFileToSession(sessionId: string, file: File | Blob, fileName?: string, onProgress?: (percentage: number) => void): Promise<AudioFile> {
20
29
  const formData = new FormData();
21
30
  formData.append('file', file, fileName);
22
31
  return this.fileUploadRequest<AudioFile>(`${urls.audioFiles}/upload/${sessionId}`, formData, {}, onProgress);
23
32
  }
24
33
 
25
- public async uploadAudioFileWithTranscriptionQueue(sessionId: string, file: File | Blob, options?: { fileName?: string; culturalTranscription?: string; onProgress?: (percentage: number) => void }): Promise<AudioFile> {
34
+ /**
35
+ * Upload an audio file to a session and queue it for transcription.
36
+ *
37
+ * @param sessionId - UUID of the session to attach the audio file to.
38
+ * @param file - The audio file or blob to upload.
39
+ * @param options - Optional settings: `fileName` and an `onProgress` callback (0-100).
40
+ * @returns The created audio file record.
41
+ */
42
+ public async uploadAudioFileWithTranscriptionQueue(sessionId: string, file: File | Blob, options?: { fileName?: string; onProgress?: (percentage: number) => void }): Promise<AudioFile> {
26
43
  const formData = new FormData();
27
44
  formData.append('file', file, options?.fileName);
28
45
 
29
- if (options?.culturalTranscription) {
30
- formData.append('cultural_transcription', options.culturalTranscription);
31
- }
32
-
33
46
  return this.fileUploadRequest<AudioFile>(`${urls.audioFiles}/upload/${sessionId}`, formData, {}, options?.onProgress);
34
47
  }
35
48
 
49
+ /**
50
+ * Retrieve the current user's audio files.
51
+ *
52
+ * @returns An array of audio files belonging to the current user.
53
+ */
36
54
  public async getMyAudioFiles(): Promise<AudioFile[]> {
37
55
  return this.request<AudioFile[]>(`${urls.audioFiles}/my-files`, 'GET');
38
56
  }
39
57
 
58
+ /**
59
+ * Retrieve all audio files accessible to the current user.
60
+ *
61
+ * @returns An array of audio files.
62
+ */
40
63
  public async getAllAudioFiles(): Promise<AudioFile[]> {
41
64
  return this.request<AudioFile[]>(`${urls.audioFiles}/all`, 'GET');
42
65
  }
43
66
 
67
+ /**
68
+ * Retrieve all audio files belonging to the current user's organization.
69
+ *
70
+ * @returns An array of audio files.
71
+ */
44
72
  public async getOrganizationAudioFiles(): Promise<AudioFile[]> {
45
73
  return this.request<AudioFile[]>(`${urls.audioFiles}/organization`, 'GET');
46
74
  }
47
75
 
76
+ /**
77
+ * Retrieve all audio files for a given session.
78
+ *
79
+ * @param sessionId - UUID of the session.
80
+ * @returns An array of audio files for the session.
81
+ */
48
82
  public async getAudioFilesBySession(sessionId: string): Promise<AudioFile[]> {
49
83
  return this.request<AudioFile[]>(`${urls.audioFiles}/session/${sessionId}`, 'GET');
50
84
  }
51
85
 
86
+ /**
87
+ * Retrieve a single audio file by id.
88
+ *
89
+ * @param id - UUID of the audio file.
90
+ * @returns The requested audio file.
91
+ */
52
92
  public async getAudioFile(id: string): Promise<AudioFile> {
53
93
  return this.request<AudioFile>(`${urls.audioFiles}/${id}`, 'GET');
54
94
  }
55
95
 
96
+ /**
97
+ * Update an audio file's metadata.
98
+ *
99
+ * @param id - UUID of the audio file to update.
100
+ * @param updates - Fields to update (transcription URL and/or status).
101
+ * @returns The updated audio file.
102
+ */
56
103
  public async updateAudioFile(id: string, updates: UpdateAudioFileDto): Promise<AudioFile> {
57
104
  return this.request<AudioFile>(`${urls.audioFiles}/${id}`, 'PATCH', updates);
58
105
  }
59
106
 
60
- public async deleteAudioFile(id: string): Promise<void> {
61
- await this.request(`${urls.audioFiles}/${id}`, 'DELETE');
107
+ /**
108
+ * Delete an audio file by id.
109
+ *
110
+ * @param id - UUID of the audio file to delete.
111
+ * @returns The deleted audio file record.
112
+ */
113
+ public async deleteAudioFile(id: string): Promise<AudioFile> {
114
+ return this.request<AudioFile>(`${urls.audioFiles}/${id}`, 'DELETE');
62
115
  }
63
116
 
117
+ /**
118
+ * Download an audio file as a blob.
119
+ *
120
+ * @param id - UUID of the audio file to download.
121
+ * @returns The audio file contents as a Blob.
122
+ */
64
123
  public async downloadAudioFile(id: string): Promise<Blob> {
65
124
  return this.downloadRequest(`${urls.audioFiles}/${id}/download`);
66
125
  }
67
126
 
127
+ /**
128
+ * Download an audio file and return an object URL pointing to it.
129
+ *
130
+ * @param id - UUID of the audio file to download.
131
+ * @returns An object URL referencing the downloaded blob.
132
+ */
68
133
  public async downloadAudioFileAsUrl(id: string): Promise<string> {
69
134
  const blob = await this.downloadAudioFile(id);
70
135
  return URL.createObjectURL(blob);
@@ -74,16 +139,31 @@ export class AudioModule extends BaseClient {
74
139
  // TRANSCRIPTION QUEUE HELPER METHODS
75
140
  // ======================
76
141
 
142
+ /**
143
+ * Retrieve the current user's audio files that have finished transcription.
144
+ *
145
+ * @returns An array of transcribed audio files.
146
+ */
77
147
  public async getTranscribedAudioFiles(): Promise<AudioFile[]> {
78
148
  const audioFiles = await this.getMyAudioFiles();
79
- return audioFiles.filter(file => file.status === AudioFileStatus.TRANSCRIBED && file.transcription);
149
+ return audioFiles.filter(file => file.status === AudioFileStatus.TRANSCRIBED);
80
150
  }
81
151
 
152
+ /**
153
+ * Retrieve the current user's audio files that are currently processing.
154
+ *
155
+ * @returns An array of processing audio files.
156
+ */
82
157
  public async getProcessingAudioFiles(): Promise<AudioFile[]> {
83
158
  const audioFiles = await this.getMyAudioFiles();
84
159
  return audioFiles.filter(file => file.status === AudioFileStatus.PROCESSING);
85
160
  }
86
161
 
162
+ /**
163
+ * Retrieve the current user's audio files that failed processing.
164
+ *
165
+ * @returns An array of failed audio files.
166
+ */
87
167
  public async getFailedAudioFiles(): Promise<AudioFile[]> {
88
168
  const audioFiles = await this.getMyAudioFiles();
89
169
  return audioFiles.filter(file => file.status === AudioFileStatus.FAILED);
@@ -93,34 +173,83 @@ export class AudioModule extends BaseClient {
93
173
  // BASE64 AUDIO FILE METHODS
94
174
  // ======================
95
175
 
176
+ /**
177
+ * Create a base64 audio file record.
178
+ *
179
+ * @param dto - The session id and initial base64 audio chunks.
180
+ * @returns The created base64 audio file.
181
+ */
96
182
  public async createBase64AudioFile(dto: CreateBase64AudioFileDto): Promise<Base64AudioFile> {
97
183
  return this.request<Base64AudioFile>(`${urls.audioFiles}/base64`, 'POST', dto);
98
184
  }
99
185
 
186
+ /**
187
+ * Retrieve all base64 audio files accessible to the current user.
188
+ *
189
+ * @returns An array of base64 audio files.
190
+ */
100
191
  public async getAllBase64AudioFiles(): Promise<Base64AudioFile[]> {
101
192
  return this.request<Base64AudioFile[]>(`${urls.audioFiles}/base64/all`, 'GET');
102
193
  }
103
194
 
195
+ /**
196
+ * Retrieve base64 audio files for a given session.
197
+ *
198
+ * @param sessionId - UUID of the session.
199
+ * @returns An array of base64 audio files for the session.
200
+ */
104
201
  public async getBase64AudioFilesBySession(sessionId: string): Promise<Base64AudioFile[]> {
105
202
  return this.request<Base64AudioFile[]>(`${urls.audioFiles}/base64/session/${sessionId}`, 'GET');
106
203
  }
107
204
 
205
+ /**
206
+ * Retrieve a single base64 audio file by id.
207
+ *
208
+ * @param id - UUID of the base64 audio file.
209
+ * @returns The requested base64 audio file.
210
+ */
108
211
  public async getBase64AudioFile(id: string): Promise<Base64AudioFile> {
109
212
  return this.request<Base64AudioFile>(`${urls.audioFiles}/base64/${id}`, 'GET');
110
213
  }
111
214
 
215
+ /**
216
+ * Update a base64 audio file record.
217
+ *
218
+ * @param id - UUID of the base64 audio file to update.
219
+ * @param updates - Fields to update (session id and/or audio chunks).
220
+ * @returns The updated base64 audio file.
221
+ */
112
222
  public async updateBase64AudioFile(id: string, updates: UpdateBase64AudioFileDto): Promise<Base64AudioFile> {
113
223
  return this.request<Base64AudioFile>(`${urls.audioFiles}/base64/${id}`, 'PATCH', updates);
114
224
  }
115
225
 
226
+ /**
227
+ * Delete a base64 audio file by id.
228
+ *
229
+ * @param id - UUID of the base64 audio file to delete.
230
+ * @returns A promise that resolves once the record is deleted.
231
+ */
116
232
  public async deleteBase64AudioFile(id: string): Promise<void> {
117
233
  await this.request(`${urls.audioFiles}/base64/${id}`, 'DELETE');
118
234
  }
119
235
 
236
+ /**
237
+ * Append base64 audio chunks to a session's base64 audio file.
238
+ *
239
+ * @param sessionId - UUID of the session.
240
+ * @param base64Chunks - The base64-encoded audio chunks to append.
241
+ * @returns The count of chunks now stored.
242
+ */
120
243
  public async addBase64Chunk(sessionId: string, base64Chunks: string[]): Promise<AddBase64ChunkResponse> {
121
244
  return this.request<AddBase64ChunkResponse>(`${urls.audioFiles}/base64/add-chunk/${sessionId}`, 'POST', { base64Chunks });
122
245
  }
123
246
 
247
+ /**
248
+ * Queue a session's accumulated base64 audio for transcription.
249
+ *
250
+ * @param sessionId - UUID of the session to transcribe.
251
+ * @returns An object indicating whether queuing succeeded.
252
+ */
124
253
  public async queueSessionBase64AudioForTranscription(sessionId: string): Promise<{ success: boolean }> {
125
254
  return this.request<{ success: boolean }>(`${urls.audioFiles}/session/${sessionId}/transcribe`, 'POST');
126
255
  }
@@ -129,6 +258,15 @@ export class AudioModule extends BaseClient {
129
258
  // DIRECT TRANSCRIPTION METHODS
130
259
  // ======================
131
260
 
261
+ /**
262
+ * Transcribe an audio file directly without persisting it to a session.
263
+ *
264
+ * @param file - The audio file or blob to transcribe.
265
+ * @param fileName - Optional file name to send with the upload.
266
+ * @param useFineTuned - Optional flag to use the fine-tuned transcription model.
267
+ * @param onProgress - Optional callback invoked with the upload percentage (0-100).
268
+ * @returns An object containing the resulting transcription text.
269
+ */
132
270
  public async transcribeAudioFileDirect(file: File | Blob, fileName?: string, useFineTuned?: boolean, onProgress?: (percentage: number) => void): Promise<{ transcription?: string }> {
133
271
  const formData = new FormData();
134
272
  formData.append('file', file, fileName);