@kaaiot/services
Version:
Type definitions for KaaIoT platform REST API service communication
26 lines (25 loc) • 2.79 kB
TypeScript
import { CreateEndpointBody, CreateEndpointResponse, EndpointsListResponse, EndpointsQuery, ApplicationMetadataKeysResponse, FiltersQuery, FiltersListResponse, CreateFilterBody, Filter, FilterQuery, UpdateMetadataParams, EndpointBatchRegistrationRequest, EndpointBatchRegistrationResponse, EndpointBatchStatusResponse, CreateEndpointOptions, GetMetadataParams, GetMetadataResponse, UpdateMetadataValuesParams, Endpoint, SingleEndpointOptions, EndpointRelationsResponse, EndpointRelationsOptions, EndpointRelationPayload, LinkRelationsResponse, EndpointSearchBody } from "./EPRClient.types";
import { ServiceRequester, FetchResponse } from "../service-requester";
export declare class EPRClient {
private http;
constructor(urlPrefix: any, serviceRequester?: ServiceRequester);
getEndpoints(endpointsQuery?: EndpointsQuery, signal?: AbortSignal): Promise<FetchResponse<EndpointsListResponse>>;
getEndpointMetadata(endpointId: string, endpointsQuery?: GetMetadataParams): Promise<FetchResponse<GetMetadataResponse>>;
getEndpointMetadataKeys(endpointId: string): Promise<FetchResponse<string[]>>;
getEndpoint(endpointId: string, options?: SingleEndpointOptions, signal?: AbortSignal): Promise<FetchResponse<Endpoint>>;
getEndpointRelations(endpointId: string, options: EndpointRelationsOptions): Promise<FetchResponse<EndpointRelationsResponse>>;
getApplicationMetadataKeys(applicationName: string): Promise<FetchResponse<ApplicationMetadataKeysResponse>>;
createEndpoint(endpointBody: CreateEndpointBody, options?: CreateEndpointOptions): Promise<FetchResponse<CreateEndpointResponse>>;
getFilters(filtersQuery: FiltersQuery): Promise<FetchResponse<FiltersListResponse>>;
getFilter(filterQuery: FilterQuery): Promise<FetchResponse<Filter>>;
createFilter(filterBody: CreateFilterBody): Promise<FetchResponse<Filter>>;
deleteEndpoint(endpointId: string): Promise<FetchResponse<void>>;
deleteEndpointFilter(filterId: string, applicationName: string): Promise<FetchResponse<void>>;
updateMetadataValue({ endpointId, metadataKey, value }: UpdateMetadataParams): Promise<FetchResponse<string>>;
updateMetadataValues(endpointId: string, requestParams: UpdateMetadataValuesParams): Promise<FetchResponse<string>>;
batchCreate(body: EndpointBatchRegistrationRequest): Promise<FetchResponse<EndpointBatchRegistrationResponse>>;
batchStatus(taskId: string, appName: string): Promise<FetchResponse<EndpointBatchStatusResponse>>;
relationsLink(relations: EndpointRelationPayload): Promise<FetchResponse<LinkRelationsResponse>>;
relationsUnlink(relations: EndpointRelationPayload): Promise<FetchResponse<LinkRelationsResponse>>;
searchEndpoints(body: EndpointSearchBody): Promise<FetchResponse<EndpointsListResponse>>;
}