@oystehr/sdk
Version:
Oystehr SDK
55 lines (52 loc) • 1.78 kB
text/typescript
// AUTOGENERATED -- DO NOT EDIT
import {
OystehrClientRequest,
TelemedCreateMeetingParams,
TelemedCreateMeetingResponse,
TelemedJoinMeetingParams,
TelemedJoinMeetingResponse,
} from '../..';
import { SDKResource } from '../../client/client';
import { OystehrConfig } from '../../config';
export class Telemed extends SDKResource {
constructor(config: OystehrConfig) {
super(config);
}
#baseUrlThunk(): string {
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
}
/**
* Create a [telemedicine video meeting](https://docs.oystehr.com/oystehr/services/telemed/).
*
* Access Policy Requirements:
* Action: `Telemed:CreateMeeting`
* Access Policy Resource: `Telemed:Meeting`
* Action: `FHIR:Create`
* Access Policy Resource: `FHIR:Encounter`
* Action: `FHIR:Update`
* Access Policy Resource: `FHIR:Encounter`
*/
createMeeting(
params: TelemedCreateMeetingParams,
request?: OystehrClientRequest
): Promise<TelemedCreateMeetingResponse> {
return this.request('/telemed/v2/meeting', 'post', this.#baseUrlThunk.bind(this))(params, request);
}
/**
* Get Meeting and Attendee objects necessary to join a telemedicine video meeting.
*
* Access Policy Requirements:
* Action: `Telemed:JoinMeeting`
* Access Policy Resource: `Telemed:Meeting`
* To use M2M token to join as anonymous user:
* Action: `Telemed:AddAnonymousToMeeting`
* Access Policy Resource: `Telemed:Meeting`
*/
joinMeeting(params: TelemedJoinMeetingParams, request?: OystehrClientRequest): Promise<TelemedJoinMeetingResponse> {
return this.request(
'/telemed/v2/meeting/{encounterId}/join',
'get',
this.#baseUrlThunk.bind(this)
)(params, request);
}
}