@oystehr/sdk
Version:
Oystehr SDK
50 lines (47 loc) • 3.85 kB
text/typescript
// AUTOGENERATED -- DO NOT EDIT
import { OystehrClientRequest, ProjectGetResponse, ProjectUpdateParams, ProjectUpdateResponse } from '../..';
import { SDKResource } from '../../client/client';
import { OystehrConfig } from '../../config';
export class Project extends SDKResource {
constructor(config: OystehrConfig) {
super(config);
}
#baseUrlThunk(): string {
return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
}
/**
* Get the Project settings for a Project. Developers must specify a [project ID](https://docs.oystehr.com/oystehr/core-documentation/authenticating-api-requests/#x-oystehr-project-id-header) in the header. A Project is the logically-isolated instance of Oystehr that segments your data from other Projects. [Projects](https://docs.oystehr.com/oystehr/services/project/) are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/oystehr/services/fhir/basics/), [Applications](https://docs.oystehr.com/oystehr/services/app/applications/), [Users](https://docs.oystehr.com/oystehr/services/app/users/), etc .
*
* Access Policy Action: `Project:GetProjectInfo`
* Access Policy Resource: `Project:Settings`
*/
get(request?: OystehrClientRequest): Promise<ProjectGetResponse> {
return this.request('/project', 'get', this.#baseUrlThunk.bind(this))(request);
}
/**
* Update the Project settings for the Project that corresponds to the project-id in the request header. A [Project](https://docs.oystehr.com/oystehr/services/project/) is the logically-isolated instance of Oystehr that segments your data from other Projects. Projects are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/oystehr/services/fhir/basics/), [Applications](https://docs.oystehr.com/oystehr/services/app/applications/), [Users](https://docs.oystehr.com/oystehr/services/app/users/), etc .
*
* Access Policy Action: `Project:UpdateProjectInfo`
* Access Policy Resource: `Project:Settings`
*/
update(params: ProjectUpdateParams, request?: OystehrClientRequest): Promise<ProjectUpdateResponse>;
/**
* Update the Project settings for the Project that corresponds to the project-id in the request header. A [Project](https://docs.oystehr.com/oystehr/services/project/) is the logically-isolated instance of Oystehr that segments your data from other Projects. Projects are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/oystehr/services/fhir/basics/), [Applications](https://docs.oystehr.com/oystehr/services/app/applications/), [Users](https://docs.oystehr.com/oystehr/services/app/users/), etc .
*
* Access Policy Action: `Project:UpdateProjectInfo`
* Access Policy Resource: `Project:Settings`
*/
update(request?: OystehrClientRequest): Promise<ProjectUpdateResponse>;
/**
* Update the Project settings for the Project that corresponds to the project-id in the request header. A [Project](https://docs.oystehr.com/oystehr/services/project/) is the logically-isolated instance of Oystehr that segments your data from other Projects. Projects are completely independent from each other, having their own separate [FHIR store](https://docs.oystehr.com/oystehr/services/fhir/basics/), [Applications](https://docs.oystehr.com/oystehr/services/app/applications/), [Users](https://docs.oystehr.com/oystehr/services/app/users/), etc .
*
* Access Policy Action: `Project:UpdateProjectInfo`
* Access Policy Resource: `Project:Settings`
*/
update(
params?: ProjectUpdateParams | OystehrClientRequest,
request?: OystehrClientRequest
): Promise<ProjectUpdateResponse> {
return this.request('/project', 'patch', this.#baseUrlThunk.bind(this))(params, request);
}
}