UNPKG

fsm-sdk

Version:

Node.JS sdk to interface with SAP Field Service Management APIs.

31 lines (30 loc) 1.47 kB
import { ClientConfig } from '../client-config.model'; import { DataApiResponse } from './data-api.model'; import { DTOModels, DTOName } from '../dto-name.model'; import { HttpService } from '../http/http-service'; import { OAuthService } from '../oauth/oauth.service'; declare type IdOrExternalId = Partial<{ resourceId: string | null | undefined; externalId: string | null | undefined; }>; export declare class DataApiService { private _config; private _http; private _auth; constructor(_config: Readonly<ClientConfig>, _http: Readonly<HttpService>, _auth: Readonly<OAuthService>); private _requestDataApi; getById<T extends DTOModels>(resourceName: DTOName, id: IdOrExternalId, queryParams?: { useExternalIds: true; } | undefined): Promise<DataApiResponse<T>>; deleteById<T extends Partial<DTOModels>>(resourceName: DTOName, id: IdOrExternalId, lastChanged: number): Promise<undefined>; post<T extends DTOModels>(resourceName: DTOName, resource: T, queryParams?: { useExternalIds: true; } | undefined): Promise<DataApiResponse<T>>; put<T extends DTOModels>(resourceName: DTOName, id: IdOrExternalId, resource: T, queryParams?: { useExternalIds: true; } | undefined): Promise<DataApiResponse<T>>; patch<T extends DTOModels>(resourceName: DTOName, id: IdOrExternalId, resource: T, queryParams?: { useExternalIds: true; } | undefined): Promise<DataApiResponse<T>>; } export {};