whio-api-sdk 1.0.241-beta-staging → 1.0.242-beta-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.
- package/dist/src/sdk/modules/session.module.d.ts +2 -2
- package/dist/src/sdk/modules/session.module.js +5 -2
- package/dist/src/sdk/sdk.d.ts +1 -1
- package/dist/src/sdk/types/session.types.d.ts +7 -0
- package/package.json +1 -1
- package/src/sdk/modules/session.module.ts +6 -3
- package/src/sdk/types/session.types.ts +8 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BaseClient } from './base-client';
|
|
2
|
-
import { Session, CreateSessionDto, UpdateSessionDto, SetAudioStreamStatusDto, ForwardToTiakiResponse } from '../types';
|
|
2
|
+
import { Session, SessionsResponse, CreateSessionDto, UpdateSessionDto, SetAudioStreamStatusDto, ForwardToTiakiResponse } from '../types';
|
|
3
3
|
export declare class SessionModule extends BaseClient {
|
|
4
4
|
createSession(sessionData: CreateSessionDto): Promise<Session>;
|
|
5
5
|
getSessions(): Promise<Session[]>;
|
|
6
6
|
getSession(id: string): Promise<Session>;
|
|
7
7
|
getSessionsByUser(userId: string): Promise<Session[]>;
|
|
8
|
-
getSessionsByOrganization(): Promise<
|
|
8
|
+
getSessionsByOrganization(limit?: number, offset?: number): Promise<SessionsResponse>;
|
|
9
9
|
updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session>;
|
|
10
10
|
deleteSession(id: string): Promise<void>;
|
|
11
11
|
setPrimaryTranscriptionSummary(sessionId: string, summaryId: string): Promise<Session>;
|
|
@@ -30,9 +30,12 @@ export class SessionModule extends BaseClient {
|
|
|
30
30
|
return this.request(`${urls.sessions}/user/${userId}`, 'GET');
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
getSessionsByOrganization() {
|
|
33
|
+
getSessionsByOrganization(limit = 100, offset = 0) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
|
|
35
|
+
const params = new URLSearchParams();
|
|
36
|
+
params.append('limit', limit.toString());
|
|
37
|
+
params.append('offset', offset.toString());
|
|
38
|
+
return this.request(`${urls.sessions}/organization?${params.toString()}`, 'GET');
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
updateSession(id, sessionData) {
|
package/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
124
124
|
getSessions(...args: Parameters<SessionModule['getSessions']>): Promise<import("./types").Session[]>;
|
|
125
125
|
getSession(...args: Parameters<SessionModule['getSession']>): Promise<import("./types").Session>;
|
|
126
126
|
getSessionsByUser(...args: Parameters<SessionModule['getSessionsByUser']>): Promise<import("./types").Session[]>;
|
|
127
|
-
getSessionsByOrganization(...args: Parameters<SessionModule['getSessionsByOrganization']>): Promise<import("./types").
|
|
127
|
+
getSessionsByOrganization(...args: Parameters<SessionModule['getSessionsByOrganization']>): Promise<import("./types").SessionsResponse>;
|
|
128
128
|
updateSession(...args: Parameters<SessionModule['updateSession']>): Promise<import("./types").Session>;
|
|
129
129
|
deleteSession(...args: Parameters<SessionModule['deleteSession']>): Promise<void>;
|
|
130
130
|
setPrimaryTranscriptionSummary(...args: Parameters<SessionModule['setPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base-client';
|
|
2
|
-
import { Session, CreateSessionDto, UpdateSessionDto, SetAudioStreamStatusDto, ForwardToTiakiResponse } from '../types';
|
|
2
|
+
import { Session, SessionsResponse, CreateSessionDto, UpdateSessionDto, SetAudioStreamStatusDto, ForwardToTiakiResponse } from '../types';
|
|
3
3
|
import urls from '../urls';
|
|
4
4
|
|
|
5
5
|
export class SessionModule extends BaseClient {
|
|
@@ -19,8 +19,11 @@ export class SessionModule extends BaseClient {
|
|
|
19
19
|
return this.request<Session[]>(`${urls.sessions}/user/${userId}`, 'GET');
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
public async getSessionsByOrganization(): Promise<
|
|
23
|
-
|
|
22
|
+
public async getSessionsByOrganization(limit = 100, offset = 0): Promise<SessionsResponse> {
|
|
23
|
+
const params = new URLSearchParams();
|
|
24
|
+
params.append('limit', limit.toString());
|
|
25
|
+
params.append('offset', offset.toString());
|
|
26
|
+
return this.request<SessionsResponse>(`${urls.sessions}/organization?${params.toString()}`, 'GET');
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
public async updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session> {
|