Properties
Private host
host: string
Private password
password: string
Private sessionID
sessionID: string
Private username
username: string
Methods
Private appendFormData
- appendFormData(form: FormData, property: string, data: any): FormData
-
Parameters
-
form: FormData
-
property: string
-
data: any
Returns FormData
Private generateFormData
- generateFormData(data: any): FormData
-
Returns FormData
Private generateVeevaAPIOptions
- generateVeevaAPIOptions(options: OptionsOfJSONResponseBody, method: Method, contentType: string, data: any): OptionsOfJSONResponseBody
-
Parameters
-
options: OptionsOfJSONResponseBody
-
method: Method
-
contentType: string
-
data: any
Returns OptionsOfJSONResponseBody
makeVeevaAPIRequest
- makeVeevaAPIRequest<T>(method: Method, endpoint: string, data?: any, contentType?: string): Promise<T>
-
Parameters
-
method: Method
-
endpoint: string
-
Optional data: any
-
contentType: string = 'application/x-www-form-urlencoded'
Returns Promise<T>
Private request
- request<T>(options: OptionsOfJSONResponseBody): Promise<T>
-
Parameters
-
options: OptionsOfJSONResponseBody
Returns Promise<T>
Private throwVeeveaError
- throwVeeveaError(response: IVeevaResponse): void
-
Returns void
The RestAPI class is the main class which is used to communicate with Veeva.
It will manage authentication, as well as parse responses from the Veeva API.