@kontent-ai/management-sdk
Version:
Official Kontent.ai management SDK
17 lines • 794 B
JavaScript
import { BaseMapper } from './base-mapper';
import { WebSpotlightResponses } from '../responses';
import { WebSpotlightModels } from '../models';
export class WebSpotlightMapper extends BaseMapper {
mapWebSpotlightStatusResponse(response) {
return new WebSpotlightResponses.WebSpotlightStatusResponse(super.mapResponseDebug(response), response.data, this.mapWebSpotlightStatus(response.data));
}
mapWebSpotlightStatus(rawData) {
return new WebSpotlightModels.WebSpotlightStatus({
_raw: rawData,
enabled: rawData.enabled,
rootType: rawData.root_type ? this.mapIdReference(rawData.root_type) : undefined
});
}
}
export const webSpotlightMapper = new WebSpotlightMapper();
//# sourceMappingURL=web-spotlight-mapper.js.map