2022-09-15 16:17:19 +02:00
|
|
|
import * as BudibaseApi from "../sdk"
|
|
|
|
|
2022-09-21 20:12:25 +02:00
|
|
|
export default class SDK {
|
|
|
|
applications = new BudibaseApi.ApplicationsApi()
|
|
|
|
queries = new BudibaseApi.QueriesApi()
|
|
|
|
rows = new BudibaseApi.RowsApi()
|
|
|
|
tables = new BudibaseApi.TablesApi()
|
|
|
|
users = new BudibaseApi.UsersApi()
|
2022-09-15 16:17:19 +02:00
|
|
|
|
2022-09-21 20:12:25 +02:00
|
|
|
constructor({ apiKey, host }) {
|
|
|
|
let ApiClient = new BudibaseApi.ApiClient()
|
2022-09-15 16:17:19 +02:00
|
|
|
|
2022-09-21 20:12:25 +02:00
|
|
|
// Default to current host
|
|
|
|
ApiClient.basePath = `${host || ""}/api/public/v1`
|
|
|
|
ApiClient.authentications["ApiKeyAuth"].apiKey = apiKey
|
2022-09-15 16:17:19 +02:00
|
|
|
|
2022-09-21 20:12:25 +02:00
|
|
|
this.applications = new BudibaseApi.ApplicationsApi(ApiClient)
|
|
|
|
this.queries = new BudibaseApi.QueriesApi(ApiClient)
|
|
|
|
this.rows = new BudibaseApi.RowsApi(ApiClient)
|
|
|
|
this.tables = new BudibaseApi.TablesApi(ApiClient)
|
|
|
|
this.users = new BudibaseApi.UsersApi(ApiClient)
|
|
|
|
}
|
|
|
|
}
|