UNPKG

@oystehr/sdk

Version:

Oystehr SDK

100 lines (97 loc) 6.14 kB
// AUTOGENERATED -- DO NOT EDIT import { DeveloperDeleteParams, DeveloperGetParams, DeveloperGetResponse, DeveloperInviteParams, DeveloperInviteResponse, DeveloperListResponse, DeveloperListV2Params, DeveloperListV2Response, DeveloperUpdateParams, DeveloperUpdateResponse, OystehrClientRequest, } from '../..'; import { SDKResource } from '../../client/client'; import { OystehrConfig } from '../../config'; export class Developer extends SDKResource { constructor(config: OystehrConfig) { super(config); } #baseUrlThunk(): string { return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1'; } /** * Get the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level. * * Access Policy Action: `IAM:GetDeveloper` * Access Policy Resource: `IAM:Developer` */ get(params: DeveloperGetParams, request?: OystehrClientRequest): Promise<DeveloperGetResponse> { return this.request('/developer/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request); } /** * Update the Developer with the provided ID. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level. * * Access Policy Action: `IAM:UpdateDeveloper` * Access Policy Resource: `IAM:Developer` */ update(params: DeveloperUpdateParams, request?: OystehrClientRequest): Promise<DeveloperUpdateResponse> { return this.request('/developer/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request); } /** * Remove the Developer with the provided ID from the project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level. * * Access Policy Action: `IAM:RemoveDeveloper` * Access Policy Resource: `IAM:Developer` */ delete(params: DeveloperDeleteParams, request?: OystehrClientRequest): Promise<void> { return this.request('/developer/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request); } /** * Invite a new Developer to the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level. * * Access Policy Action: `IAM:InviteDeveloper` * Access Policy Resource: `IAM:Developer` */ invite(params: DeveloperInviteParams, request?: OystehrClientRequest): Promise<DeveloperInviteResponse> { return this.request('/developer/invite', 'post', this.#baseUrlThunk.bind(this))(params, request); } /** * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_developer-v2-list) instead. * * Get a list of all Developers who are part of the Project. Developer accounts are used to log into the [Developer Console](https://console.oystehr.com/) and administrate [Projects](https://docs.oystehr.com/oystehr/services/project/). [Developers](https://docs.oystehr.com/oystehr/services/iam/developers/) are the only people who can belong to and act across multiple Projects, because they exist above the Project level. * * Access Policy Action: `IAM:ListAllDevelopers` * Access Policy Resource: `IAM:Developer` */ list(request?: OystehrClientRequest): Promise<DeveloperListResponse> { return this.request('/developer', 'get', this.#baseUrlThunk.bind(this))(request); } /** * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr. * * Access Policy Action: `Project:ListAllUsers` * Access Policy Resource: `Project:Settings` */ listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response>; /** * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr. * * Access Policy Action: `Project:ListAllUsers` * Access Policy Resource: `Project:Settings` */ listV2(request?: OystehrClientRequest): Promise<DeveloperListV2Response>; /** * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr. * * Access Policy Action: `Project:ListAllUsers` * Access Policy Resource: `Project:Settings` */ listV2( params?: DeveloperListV2Params | OystehrClientRequest, request?: OystehrClientRequest ): Promise<DeveloperListV2Response> { return this.request('/developer/v2/list', 'get', this.#baseUrlThunk.bind(this))(params, request); } }