UNPKG

@oystehr/sdk

Version:

Oystehr SDK

1 lines 4.59 kB
{"version":3,"file":"project.cjs","sources":["../../../../src/resources/classes/project.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport { OystehrClientRequest, ProjectGetResponse, ProjectUpdateParams, ProjectUpdateResponse } from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class Project extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * 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 .\n *\n * Access Policy Action: `Project:GetProjectInfo`\n * Access Policy Resource: `Project:Settings`\n */\n get(request?: OystehrClientRequest): Promise<ProjectGetResponse> {\n return this.request('/project', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * 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 .\n *\n * Access Policy Action: `Project:UpdateProjectInfo`\n * Access Policy Resource: `Project:Settings`\n */\n update(params: ProjectUpdateParams, request?: OystehrClientRequest): Promise<ProjectUpdateResponse>;\n /**\n * 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 .\n *\n * Access Policy Action: `Project:UpdateProjectInfo`\n * Access Policy Resource: `Project:Settings`\n */\n update(request?: OystehrClientRequest): Promise<ProjectUpdateResponse>;\n /**\n * 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 .\n *\n * Access Policy Action: `Project:UpdateProjectInfo`\n * Access Policy Resource: `Project:Settings`\n */\n update(\n params?: ProjectUpdateParams | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<ProjectUpdateResponse> {\n return this.request('/project', 'patch', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":["SDKResource"],"mappings":";;;;AAAA;AAMM,MAAO,OAAQ,SAAQA,kBAAW,CAAA;AACtC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC;IACf;IACA,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,mCAAmC;IACvF;AACA;;;;;AAKG;AACH,IAAA,GAAG,CAAC,OAA8B,EAAA;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IAChF;AAeA;;;;;AAKG;IACH,MAAM,CACJ,MAAmD,EACnD,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1F;AACD;;;;"}