import { Contracts } from '../../contracts' ; import { IDeliveryClientConfig } from '../../config' ; import { IContentTypeQueryConfig , IDeliveryNetworkResponse , Responses } from '../../models' ; import { QueryService } from '../../services' ; import { BaseListingQuery } from '../common/base-listing-query.class' ; export class MultipleTypeQuery extends BaseListingQuery < Responses . IListContentTypesResponse , Responses . IListContentTypesAllResponse , IContentTypeQueryConfig , Contracts . IListContentTypeContract > { constructor ( protected config , protected queryService ) { super ( config , queryService ) ; } toPromise ( ) { return this . queryService . getMultipleTypes ( this . getUrl ( ) , this . _queryConfig ?? { } ) ; } getUrl ( ) { const action = '/types' ; return super . resolveUrlInternal ( action ) ; } map ( json ) { return this . queryService . mappingService . listContentTypesResponse ( json ) ; } protected allResponseFactory ( items , responses ) { return { items : items , responses : responses } ; } }