1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-11 06:10:05 +00:00

chore: change 'SASBase' to 'SASjs'

This commit is contained in:
Yury Shkoda
2021-10-20 15:00:52 +03:00
parent 8dce9f3e48
commit 397bc4524f
3 changed files with 17 additions and 14 deletions

35
src/SASjsApiClient.ts Normal file
View File

@@ -0,0 +1,35 @@
import { FolderMember, ServiceMember, ExecutionQuery } from './types'
import { RequestClient } from './request/RequestClient'
export class SASjsApiClient {
constructor(
private serverUrl: string,
private requestClient: RequestClient
) {}
public setConfig(serverUrl: string) {
if (serverUrl) this.serverUrl = serverUrl
}
public async deploy(members: [FolderMember, ServiceMember], appLoc: string) {
const { result } = await this.requestClient.post<{
status: string
message: string
example?: {}
}>('/deploy', { members: members, appLoc: appLoc }, undefined)
return Promise.resolve(result)
}
public async executeJob(query: ExecutionQuery) {
const { result } = await this.requestClient.post<{
status: string
message: string
log?: string
logPath?: string
error?: {}
}>('/execute', query, undefined)
return Promise.resolve(result)
}
}