///
import { ApiResponse } from "./ApiResponse";
import { IEntityReference } from "../types/IEntityReference";
import { WebApiExecuteRequest } from "../types/WebApiExecuteRequest";
import { WebApiExecuteRequestMetadata } from "../metadata/WebApiExecuteRequestMetadata";
import { Dictionary } from "../types/Dictionary";
export declare class WebApiStatic {
isAvailableOffline(_entityLogicalName: string): boolean;
online: Xrm.WebApiOnline;
offline: Xrm.WebApiOffline;
server: string;
apiPath: string;
apiVersion: string;
accessToken: string;
entitySetNames: Dictionary;
constructor(accessToken?: string);
getClientUrl(): string;
private getEntitySetName;
authoriseWithCdsAuthToken(server: string, apiVersion: string): Promise;
authoriseUserNamePassword(server: string, apiVersion: string, username: string, password: string, clientId: string): Promise;
createException(message: string, ex: unknown): Error;
/**
* Creates an entity record
* @param entityLogicalName Logical name of the entity you want to create. For example: "account".
* @param record A JSON object defining the attributes and values for the new entity record.
* @returns On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.
* @see {@link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/createrecord External Link: createRecord (Client API reference)}
*/
createRecord(entityLogicalName: string, record: unknown): Promise;
/**
* Updates an entity record.
* @param entityLogicalName The entity logical name of the record you want to update. For example: "account".
* @param id GUID of the entity record you want to update.
* @param Data A JSON object containing key: value pairs, where key is the property of the entity and value is the value of the property you want update.
* @returns On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.
* @see {@link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/updaterecord External Link: updateRecord (Client API reference)}
*/
updateRecord(entityLogicalName: string, id: string, data: unknown): Promise;
/**
* Retrieves an entity record.
* @param entityLogicalName The entity logical name of the record you want to retrieve. For example: "account".
* @param id GUID of the entity record you want to retrieve.
* @param options (Optional) OData system query options, $select and $expand, to retrieve your data.
* - Use the $select system query option to limit the properties returned by including a comma-separated
* list of property names. This is an important performance best practice. If properties aren’t
* specified using $select, all properties will be returned.
* - Use the $expand system query option to control what data from related entities is returned. If you
* just include the name of the navigation property, you’ll receive all the properties for related
* records. You can limit the properties returned for related records using the $select system query
* option in parentheses after the navigation property name. Use this for both single-valued and
* collection-valued navigation properties.
* - You can also specify multiple query options by using & to separate the query options.
* @example options example:
* options: $select=name&$expand=primarycontactid($select=contactid,fullname)
* @returns On success, returns a promise containing a JSON object with the retrieved attributes and their values.
* @see {@link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrieverecord External Link: retrieveRecord (Client API reference)}
*/
retrieveRecord(entityLogicalName: string, id: string, options?: string): Promise;
/**
* Deletes an entity record.
* @param entityLogicalName The entity logical name of the record you want to delete. For example: "account".
* @param id GUID of the entity record you want to delete.
* @returns On success, returns a promise object containing the attributes specified earlier in the description of the successCallback parameter.
* @see {@link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/deleterecord External Link: deleteRecord (Client API reference)}
*/
deleteRecord(entityLogicalName: string, id: string): Promise;
retrieveMultipleRecords(entityType: string, options?: string, maxPageSize?: number): Promise;
execute(request: WebApiExecuteRequest): Promise;
executeMultiple(_request: unknown[]): void;
executeCRUD(metadata: WebApiExecuteRequestMetadata, request: unknown): Promise;
getEntityMetadata(entityName: string, attributes?: string[]): Promise;
private dateReviver;
private toPathGuid;
private batchWebApiRequest;
private trimOptions;
private getStandardHeaders;
private webApiRequest;
private getResponse;
request(action: "POST" | "PATCH" | "PUT" | "GET" | "DELETE", path: string, payload?: unknown, _includeFormattedValues?: boolean, _maxPageSize?: number): Promise;
}