UNPKG

@oystehr/sdk

Version:

Oystehr SDK

87 lines (84 loc) 3.76 kB
import { SDKResource } from '../../client/client.js'; // AUTOGENERATED -- DO NOT EDIT class Application extends SDKResource { constructor(config) { super(config); } #baseUrlThunk() { return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1'; } /** * Get a list of Applications. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr. * * Access Policy Action: `App:ListAllApplications` * Access Policy Resource: `App:Application` */ list(request) { return this.request('/application', 'get', this.#baseUrlThunk.bind(this))(request); } /** * Create a new Application. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr. * * Access Policy Action: `App:CreateApplication` * Access Policy Resource: `App:Application` */ create(params, request) { return this.request('/application', 'post', this.#baseUrlThunk.bind(this))(params, request); } /** * Get the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr. * * Access Policy Action: `App:GetApplication` * Access Policy Resource: `App:Application` */ get(params, request) { return this.request('/application/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request); } /** * Update the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr. * * Access Policy Action: `App:UpdateApplication` * Access Policy Resource: `App:Application` */ update(params, request) { return this.request('/application/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request); } /** * Delete the Application with the provided ID. [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) provide authentication in front of the web and mobile apps you build on Oystehr. * * Access Policy Action: `App:DeleteApplication` * Access Policy Resource: `App:Application` */ delete(params, request) { return this.request('/application/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request); } /** * Rotate client's secrete associated with an application. * * Access Policy Action: `App:RotateApplicationSecret` * Access Policy Resource: `App:Application` */ rotateSecret(params, request) { return this.request('/application/{id}/rotate-secret', 'post', this.#baseUrlThunk.bind(this))(params, request); } /** * Revokes user's refresh token issued for the application. * * Access Policy Action: `App:RevokeRefreshToken` * Access Policy Resource: `App:Application` */ revokeRefreshToken(params, request) { return this.request('/application/{id}/revoke-refresh-token', 'post', this.#baseUrlThunk.bind(this))(params, request); } /** * Revokes user's access token issued for the application. * * Access Policy Action: `App:RevokeAccessToken` * Access Policy Resource: `App:Application` */ revokeAccessToken(params, request) { return this.request('/application/{id}/revoke-access-token', 'post', this.#baseUrlThunk.bind(this))(params, request); } } export { Application }; //# sourceMappingURL=application.js.map