@oystehr/sdk
Version:
Oystehr SDK
33 lines (30 loc) • 2.08 kB
JavaScript
import { SDKResource } from '../../client/client.js';
// AUTOGENERATED -- DO NOT EDIT
class Project extends SDKResource {
constructor(config) {
super(config);
}
#baseUrlThunk() {
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) {
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, request) {
return this.request('/project', 'patch', this.#baseUrlThunk.bind(this))(params, request);
}
}
export { Project };
//# sourceMappingURL=project.js.map