1
0
Fork 0
mirror of synced 2024-06-17 01:44:53 +12:00
budibase/packages/server/src/definitions/datasource.ts

50 lines
909 B
TypeScript

/********************************************
* This file contains structures which are *
* internal to the server and don't need to *
* be exposed for use by other services. *
********************************************/
export interface QueryOptions {
disableReturning?: boolean
}
export enum AuthType {
BASIC = "basic",
BEARER = "bearer",
}
interface AuthConfig {
_id: string
name: string
type: AuthType
config: BasicAuthConfig | BearerAuthConfig
}
export interface BasicAuthConfig {
username: string
password: string
}
export interface BearerAuthConfig {
token: string
}
export interface RestConfig {
url: string
defaultHeaders: {
[key: string]: any
}
legacyHttpParser: boolean
authConfigs: AuthConfig[]
staticVariables: {
[key: string]: string
}
dynamicVariables: [
{
name: string
queryId: string
value: string
}
]
}