UNPKG

trade360-nodejs-sdk

Version:
39 lines (38 loc) 2.1 kB
import { BaseHttpClient } from '../../base-http-client'; import { IPackageDistributionHttpClient } from '../interfaces'; import { IHttpServiceConfig } from '../../common'; import { BaseEntity } from '../../../entities/core-entities/index.js'; /** * PackageDistributionHttpClient class is responsible for sending * requests to the distribution API. * It extends the BaseHttpClient class and contains the logic for * sending requests to the distribution API. * @param packageCredentials The package credentials for the API * @param restApiBaseUrl The base URL of the customers API * @param logger The logger instance * @returns PackageDistributionHttpClient instance that is * responsible for sending requests to the distribution API. * @extends BaseHttpClient class for sending requests to the * customers API. * @implements IPackageDistributionHttpClient interface for * sending requests to the distribution API. * @see BaseHttpClient class for sending requests to the customers * API. * @see IPackageDistributionHttpClient interface for sending * requests to the distribution API. * @see IHttpServiceConfig interface for the configuration of the * HTTP service. * @see BaseEntity class for the base entity of the application. * @see DistributionRoutesPrefixUrl for the prefix URLs of the * distribution API. * @see HttpResponsePayloadDto class for the response payload of * the HTTP request. * @see IPackageDistributionHttpClient interface for sending * requests to the distribution API. */ export declare class PackageDistributionHttpClient extends BaseHttpClient implements IPackageDistributionHttpClient { constructor({ packageCredentials, restApiBaseUrl, logger }: IHttpServiceConfig); getDistributionStatus<TResponse extends BaseEntity>(responseBodyType: new () => TResponse): Promise<TResponse | undefined>; startDistribution<TResponse extends BaseEntity>(responseBodyType: new () => TResponse): Promise<TResponse | undefined>; stopDistribution<TResponse extends BaseEntity>(stopResponsePayloadDto: new () => TResponse): Promise<TResponse | undefined>; }