maximo-rest-client
Version:
A simple REST API client for the IBM Maximo platform written in TypeScript.
49 lines (48 loc) • 2.1 kB
TypeScript
import { MaximoOptions } from "./MaximoOptions";
export declare class MaximoClient {
private maximoOptions;
private baseUrl;
private session;
constructor(options: MaximoOptions);
/**
* Retrieves one or more Maximo resources
* @param resourceName Name of the Maximo resource to retrieve
* @param whereClause A where clause to filter retrieved resources
*/
getResources(resourceName: string, whereClause?: string): Promise<any[]>;
/**
* Retrieves one or more Maximo resources
* @param resourceName Name of the Maximo resource to retrieve
* @param fields An array of field names which to get from the resource
* @param whereClause A where clause to filter retrieved resources
*/
getResources(resourceName: string, fields?: string[], whereClause?: string): Promise<any[]>;
/**
* Retrieves a single resource by its URI
* @param resourceUri URI of the resource which to retrieve.
* Can be created by using the {@link #getResources | getResources() method}
* @param fields Select fields to return in the resource. Equivalent to oslc.select.
*/
getResource(resourceUri: string, fields?: string[]): Promise<any>;
/**
* Creates a new resource with the specified contents
* @param resourceName Name of the resource to create
* @param resourceBody Content and fields of the new resource
*/
createResource(resourceName: string, resourceBody: any): Promise<import("axios").AxiosResponse<any>>;
/**
* Updates a resource
* @param resourceUri URI of the resource on which to perform updates.
* @param resourceBody Content and fields to be updated
* @param merge True if you want to set patchtype to MERGE
*/
updateResource(resourceUri: string, resourceBody: any, merge?: boolean): Promise<import("axios").AxiosResponse<any>>;
/**
* Initializes a reusable session
*/
initializeReusableSession(): Promise<void>;
/**
* Authorizes the user and returns an `AxiosInstance` with JSESSIONID
*/
private authorize;
}