From bfe8847d72cd0893230f2e654242658214943e61 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Sat, 2 Oct 2021 09:24:32 +0200 Subject: chore: convert various files from JS to TS (#2010) --- src/api/ServicesApi.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/api/ServicesApi.ts (limited to 'src/api/ServicesApi.ts') diff --git a/src/api/ServicesApi.ts b/src/api/ServicesApi.ts new file mode 100644 index 000000000..5bd8aa60e --- /dev/null +++ b/src/api/ServicesApi.ts @@ -0,0 +1,34 @@ +export default class ServicesApi { + server: any; + + local: any; + + constructor(server: any, local: any) { + this.server = server; + this.local = local; + } + + all() { + return this.server.getServices(); + } + + create(recipeId: string, data: any) { + return this.server.createService(recipeId, data); + } + + delete(serviceId: string) { + return this.server.deleteService(serviceId); + } + + update(serviceId: string, data: any) { + return this.server.updateService(serviceId, data); + } + + reorder(data: any) { + return this.server.reorderService(data); + } + + clearCache(serviceId: string) { + return this.local.clearCache(serviceId); + } +} -- cgit v1.2.3-70-g09d2