From 8dd309f6a52f123aa50767c49ab7e945716672ab Mon Sep 17 00:00:00 2001 From: Pedro Silva Date: Tue, 4 Oct 2022 17:12:38 +0100 Subject: [PATCH] Add missing applications endpoints --- .../TestConfiguration/applications.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/qa-core/src/config/internal-api/TestConfiguration/applications.ts b/qa-core/src/config/internal-api/TestConfiguration/applications.ts index 26375154e9..82b85372c6 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/applications.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/applications.ts @@ -53,4 +53,29 @@ export default class AppApi { return [response, json] } + async update(appId: string, body: any): Promise<[Response, Application]> { + const response = await this.api.put(`/applications/${appId}/client/update`, { body }) + const json = await response.json() + return [response, json] + } + + async revert(appId: string): Promise<[Response, Application]> { + const response = await this.api.post(`/applications/${appId}/client/revert`) + const json = await response.json() + return [response, json] + } + + async delete(appId: string): Promise<[Response, any]> { + const response = await this.api.del(`/applications/${appId}`) + const json = await response.json() + return [response, json] + } + + async getAppDefinition(appId: string): Promise<[Response, any]> { + const response = await this.api.get(`/applications/${appId}/definition`) + const json = await response.json() + return [response, json] + } + + }