Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/graphql / dist / endpoints / store / transform.js
Size: Mime:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const composition_1 = require("@skava/modules/___dist/composition");
const remapStores = store => {
    const { string, array } = composition_1.getTyped(store);
    return {
        identifier: string('identifier'),
        country: string('country'),
        distance: string('distance'),
        city: string('city'),
        address1: string('address1'),
        latitude: string('latitude'),
        additionalinfo: array('additionalinfo'),
        zipcode: string('zipcode'),
        altidentifier: string('altidentifier'),
        phone: string('phone'),
        name: string('name'),
        state: string('state'),
        distanceunit: string('distanceunit'),
        email: string('email'),
        longitude: string('longitude'),
    };
};
const transformStoreLocator = response => {
    const { string, number, array } = composition_1.getTyped(response);
    const storeLocatorResponse = {
        type: string('type'),
        // @todo
        offset: string('properties.state.offset'),
        limit: string('properties.state.limit'),
        //
        storeinfo: array('properties.storeinfo').map(remapStores),
    };
    return storeLocatorResponse;
};
exports.transformStoreLocator = transformStoreLocator;
exports.default = transformStoreLocator;
//# sourceMappingURL=transform.js.map