Interface: RelativityHttpClient

ConvenienceApi.RelativityHttpClient

Description

Allows developers to send requests to internal Relativity APIs or external non-Relativity APIs

Properties

Properties

delete

delete: (input: string | Request, requestOptions: RequestInit) => Promise<Response>

Type declaration

▸ (input, requestOptions): Promise<Response>

Description

Calls fetch with request method set to DELETE

See

Aurelia HTTP Services

Parameters
Name Type Description
input string | Request The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource.
requestOptions RequestInit -
Returns

Promise<Response>

A Promise for the Response from the fetch request


get

get: (input: string | Request, requestOptions?: RequestInit) => Promise<Response>

Type declaration

▸ (input, requestOptions?): Promise<Response>

Description

Calls fetch as a GET request

See

Aurelia HTTP Services

Parameters
Name Type Description
input string | Request The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource.
requestOptions? RequestInit -
Returns

Promise<Response>

A Promise for the Response from the fetch request


getCancellationToken

getCancellationToken: () => CancellationToken

Type declaration

▸ (): CancellationToken

Description

get a new instance of a keplerjs.CancellationToken. For use when calling the keplerCallLRP function.

See

CancellationToken

Returns

CancellationToken

instance of keplerjs.CancellationToken


keplerCallLRP

keplerCallLRP: <T>(hub: string, operation: string, payload: any, progressCallback: any, cancellationToken: any, requestOptions?: AxiosRequestConfig<any>, httpMethod?: string, signalRHub?: string, metricKey?: string) => Promise<void | T>

Type declaration

▸ <T>(hub, operation, payload, progressCallback, cancellationToken, requestOptions?, httpMethod?, signalRHub?, metricKey?): Promise<void | T>

Description

Call to a kepler service to perform a long running operation

See

Type parameters
Name
T
Parameters
Name Type Description
hub string Url for the Kepler service
operation string Name of the method on the Kepler service to call
payload any Yhe body of the request
progressCallback any Function called when the long running operation posts a status update. It's called with an object with the type of the IProgress parameter defined in the Kepler endpoint
cancellationToken any Instance of keplerjs.CancellationToken - returned from the getCancellationToken() function - to cancel the long running operation
requestOptions? AxiosRequestConfig<any> Object with request options to keplerjs
httpMethod? string HTTP method for the call. Defaults to "POST", if omitted
signalRHub? string The path to the SignalR hub to use (for progress and cancel). If not specified, the default Object Manager hub is used
metricKey? string The key to identify the api call in metrics
Returns

Promise<void | T>

Promise resolves to the result of the long running operation


keplerDelete

keplerDelete: <T>(url: string, metricKey?: string) => Promise<void | T>

Type declaration

▸ <T>(url, metricKey?): Promise<void | T>

Description

Invoke a DELETE request to a kepler service. The request cannot be cancelled and does not report progress

Type parameters
Name
T
Parameters
Name Type Description
url string URL to request
metricKey? string The key to identify the api call in metrics
Returns

Promise<void | T>

On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body


keplerGet

keplerGet: <T>(url: string, requestOptions?: AxiosRequestConfig<any>, metricKey?: string) => Promise<void | T>

Type declaration

▸ <T>(url, requestOptions?, metricKey?): Promise<void | T>

Description

Invoke a GET request to a kepler service

See

AxiosRequestConfig

Type parameters
Name
T
Parameters
Name Type Description
url string URL to request
requestOptions? AxiosRequestConfig<any> Object with request options to keplerjs
metricKey? string The key to identify the api call in metrics
Returns

Promise<void | T>

On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body.


keplerPatch

keplerPatch: <T>(url: string, payload: any, requestOptions?: AxiosRequestConfig<any>, metricKey?: string) => Promise<void | T>

Type declaration

▸ <T>(url, payload, requestOptions?, metricKey?): Promise<void | T>

Description

Invoke a PATCH request to a kepler service

See

AxiosRequestConfig

Type parameters
Name
T
Parameters
Name Type Description
url string URL to request
payload any JSON serializable object to send in the request body
requestOptions? AxiosRequestConfig<any> Object with request options to keplerjs
metricKey? string The key to identify the api call in metrics
Returns

Promise<void | T>

On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body


keplerPost

keplerPost: <T>(url: string, payload: any, requestOptions?: AxiosRequestConfig<any>, metricKey?: string) => Promise<void | T>

Type declaration

▸ <T>(url, payload, requestOptions?, metricKey?): Promise<void | T>

Description

Invoke a POST request to a kepler service

See

AxiosRequestConfig

Type parameters
Name
T
Parameters
Name Type Description
url string URL to request
payload any JSON serializable object to send in the request body
requestOptions? AxiosRequestConfig<any> Object with request options to keplerjs
metricKey? string The key to identify the api call in metrics
Returns

Promise<void | T>

On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body.


keplerPut

keplerPut: <T>(url: string, payload: any, metricKey?: string) => Promise<void | T>

Type declaration

▸ <T>(url, payload, metricKey?): Promise<void | T>

Description

Invoke a PUT request to a kepler service.

Type parameters
Name
T
Parameters
Name Type Description
url string URL to request.
payload any JSON serializable object to send in the request body.
metricKey? string The key to identify the api call in metrics
Returns

Promise<void | T>

On 200 response the promise resolves to the de-serialized JSON object of the response body. On any other response it rejects to an object containing the response details - status code, headers & body.


makeRelativityBaseRequestOptions

makeRelativityBaseRequestOptions: (extendWith?: RequestInit) => RequestInit

Type declaration

▸ (extendWith?): RequestInit

Description

Generates a base requestOptions object for use in calls against services on Relativity

Parameters
Name Type
extendWith? RequestInit
Returns

RequestInit

Returns a base request options object for use in calls against services on Relativity


makeRelativityRelativeUrl

makeRelativityRelativeUrl: (url: string) => string

Type declaration

▸ (url): string

Description

Prefixes the given url with Relativity's base url

Parameters
Name Type Description
url string url string, relative to Relativity's base url
Returns

string

a Relativity service Url


makeRelativityRestBaseRequestOptions

makeRelativityRestBaseRequestOptions: (extendWith?: RequestInit) => RequestInit

Type declaration

▸ (extendWith?): RequestInit

Description

Generates a base requestOptions object for use in calls against Relativity.Rest services

Parameters
Name Type
extendWith? RequestInit
Returns

RequestInit

Returns a base request options object for use in calls against Relativity.Rest services


makeRelativityRestRelativeUrl

makeRelativityRestRelativeUrl: (url: string) => string

Type declaration

▸ (url): string

Description

Prefixes the given url with Relativity.Rest's base url

Parameters
Name Type Description
url string Url string, relative to Relativity.Rest's base url
Returns

string

A Relativity.Rest service Url


patch

patch: (input: string | Request, payload?: any, requestOptions?: RequestInit) => Promise<Response>

Type declaration

▸ (input, payload?, requestOptions?): Promise<Response>

Description

Calls fetch with request method set to PATCH

See

Aurelia HTTP Services

Parameters
Name Type Description
input string | Request The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource.
payload? any -
requestOptions? RequestInit -
Returns

Promise<Response>

A Promise for the Response from the fetch request


post

post: (input: string | Request, payload?: any, requestOptions?: RequestInit) => Promise<Response>

Type declaration

▸ (input, payload?, requestOptions?): Promise<Response>

Description

Calls fetch with request method set to POST

See

Aurelia HTTP Services

Parameters
Name Type Description
input string | Request The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource.
payload? any -
requestOptions? RequestInit -
Returns

Promise<Response>

A Promise for the response from the fetch request


put

put: (input: string | Request, payload?: any, requestOptions?: RequestInit) => Promise<Response>

Type declaration

▸ (input, payload?, requestOptions?): Promise<Response>

Description

Calls fetch with request method set to PUT

See

Aurelia HTTP Services

Parameters
Name Type Description
input string | Request The resource that you wish to fetch. Either a Request object or a string containing the URL of the resource.
payload? any -
requestOptions? RequestInit -
Returns

Promise<Response>

A Promise for the Response from the fetch request