@homeflow/next
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.configure = void 0; | ||
exports.configure = configure; | ||
require("server-only"); | ||
@@ -78,3 +78,2 @@ const hestia_client_1 = __importDefault(require("./hestia-client")); | ||
} | ||
exports.configure = configure; | ||
//# sourceMappingURL=api.js.map |
@@ -18,5 +18,5 @@ "use strict"; | ||
class DBAPIArticleHelper extends dbapi_helper_1.default { | ||
findOne({ slug, siteId, }) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug, siteId, }) { | ||
var _b; | ||
const json = yield this.dbapi.request({ | ||
@@ -29,3 +29,3 @@ path: '/articles', | ||
}); | ||
const result = ((_a = json === null || json === void 0 ? void 0 : json.elements) === null || _a === void 0 ? void 0 : _a[0]) || null; | ||
const result = ((_b = json === null || json === void 0 ? void 0 : json.elements) === null || _b === void 0 ? void 0 : _b[0]) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: json.error }] : null; | ||
@@ -32,0 +32,0 @@ return { result, errors }; |
@@ -17,4 +17,4 @@ "use strict"; | ||
class DBAPIBranchHelper extends dbapi_helper_1.default { | ||
findOne({ name }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name }) { | ||
const json = yield this.dbapi.request({ | ||
@@ -21,0 +21,0 @@ path: '/branches', |
@@ -17,4 +17,4 @@ "use strict"; | ||
class DBAPIMediaHelper extends dbapi_helper_1.default { | ||
findAll({ page = 1, siteId, pageSize = 12, type = 'SiteAsset', image, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findAll(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ page = 1, siteId, pageSize = 12, type = 'SiteAsset', image, }) { | ||
const json = yield this.dbapi.request({ | ||
@@ -21,0 +21,0 @@ path: '/media', |
@@ -52,4 +52,4 @@ "use strict"; | ||
} | ||
request({ path, query }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
request(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ path, query }) { | ||
yield this.usersApi.authenticate(); | ||
@@ -82,6 +82,5 @@ const queryString = qs_1.default.stringify(query, { arrayFormat: 'brackets' }); | ||
} | ||
exports.default = DBAPIClient; | ||
_DBAPIClient_dbapiURL = new WeakMap(), _DBAPIClient_siteHost = new WeakMap(), _DBAPIClient_log = new WeakMap(), _DBAPIClient_instances = new WeakSet(), _DBAPIClient_fetchSite = function _DBAPIClient_fetchSite() { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b; | ||
// TODO: endpoint search update required | ||
@@ -108,2 +107,3 @@ // DBAPI `/sites` endpoint can be searched by domain but unlike the hestia sites request | ||
}; | ||
exports.default = DBAPIClient; | ||
//# sourceMappingURL=index.js.map |
@@ -24,4 +24,4 @@ "use strict"; | ||
findAll(params) { | ||
var _a, _b, _c, _d, _e, _f; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b, _c, _d, _e, _f; | ||
yield this.hestia.site(); | ||
@@ -28,0 +28,0 @@ const query = { |
@@ -21,5 +21,5 @@ "use strict"; | ||
} | ||
find({ slug }, settings = {}) { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
find(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug }, settings = {}) { | ||
var _b, _c; | ||
yield this.hestia.site(); | ||
@@ -29,6 +29,6 @@ const query = { | ||
page_size: 25, | ||
site_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.site_id, | ||
site_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.site_id, | ||
}; | ||
const json = yield this.hestia.request({ path: `${this.basePath}/${slug}`, query }, settings); | ||
const article = (_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.article; | ||
const article = (_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.article; | ||
if (!article) | ||
@@ -40,4 +40,4 @@ return null; | ||
findAll() { | ||
var _a, _b, _c; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b, _c; | ||
yield this.hestia.site(); | ||
@@ -44,0 +44,0 @@ const query = { |
@@ -22,5 +22,5 @@ "use strict"; | ||
} | ||
findOne({ slug, }) { | ||
var _a, _b, _c, _d, _e; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug, }) { | ||
var _b, _c, _d, _e, _f; | ||
yield this.hestia.site(); | ||
@@ -30,3 +30,3 @@ const path = this.basePath; | ||
search: { | ||
agency_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.agency_id, | ||
agency_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.agency_id, | ||
branch_url_label: slug, | ||
@@ -36,4 +36,4 @@ }, | ||
const json = yield this.hestia.request({ path, query }, { cache: 'no-store' }); | ||
const result = ((_d = (_c = (_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.branches) === null || _c === void 0 ? void 0 : _c.elements) === null || _d === void 0 ? void 0 : _d[0]) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_e = json.error) === null || _e === void 0 ? void 0 : _e.message }] : null; | ||
const result = ((_e = (_d = (_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.branches) === null || _d === void 0 ? void 0 : _d.elements) === null || _e === void 0 ? void 0 : _e[0]) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_f = json.error) === null || _f === void 0 ? void 0 : _f.message }] : null; | ||
return { result, errors }; | ||
@@ -43,4 +43,4 @@ }); | ||
findAll(params) { | ||
var _a, _b, _c, _d, _e, _f; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b, _c, _d, _e, _f; | ||
yield this.hestia.site(); | ||
@@ -47,0 +47,0 @@ const path = '/branches'; |
@@ -21,9 +21,9 @@ "use strict"; | ||
} | ||
findOne({ name, }) { | ||
var _a, _b, _c, _d, _e; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name, }) { | ||
var _b, _c, _d, _e, _f; | ||
yield this.hestia.site(); | ||
const query = { | ||
search: { | ||
agency_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.agency_id, | ||
agency_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.agency_id, | ||
name, | ||
@@ -36,4 +36,4 @@ }, | ||
}); | ||
const result = ((_d = (_c = (_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.site_content_chunks) === null || _c === void 0 ? void 0 : _c.elements) === null || _d === void 0 ? void 0 : _d[0]) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_e = json.error) === null || _e === void 0 ? void 0 : _e.message }] : null; | ||
const result = ((_e = (_d = (_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.site_content_chunks) === null || _d === void 0 ? void 0 : _d.elements) === null || _e === void 0 ? void 0 : _e[0]) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_f = json.error) === null || _f === void 0 ? void 0 : _f.message }] : null; | ||
return { result, errors }; | ||
@@ -40,0 +40,0 @@ }); |
@@ -27,5 +27,5 @@ "use strict"; | ||
} | ||
findOne({ urlLabel }, settings = {}) { | ||
var _a, _b, _c; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ urlLabel }, settings = {}) { | ||
var _b, _c, _d; | ||
yield this.hestia.site(); | ||
@@ -36,8 +36,8 @@ const path = `${__classPrivateFieldGet(this, _HestiaCountyHelper_basePath, "f")}/${urlLabel}`; | ||
search: { | ||
agency_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.agency_id, | ||
agency_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.agency_id, | ||
}, | ||
}; | ||
const json = yield this.hestia.request({ path, query }, settings); | ||
const result = ((_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.county) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_c = json.error) === null || _c === void 0 ? void 0 : _c.message }] : null; | ||
const result = ((_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.county) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_d = json.error) === null || _d === void 0 ? void 0 : _d.message }] : null; | ||
return { result, errors }; | ||
@@ -47,4 +47,4 @@ }); | ||
} | ||
_HestiaCountyHelper_basePath = new WeakMap(); | ||
exports.default = HestiaCountyHelper; | ||
_HestiaCountyHelper_basePath = new WeakMap(); | ||
//# sourceMappingURL=hestia-county-helper.js.map |
@@ -18,4 +18,4 @@ "use strict"; | ||
findById(id) { | ||
var _a, _b, _c; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b, _c; | ||
yield this.hestia.site(); | ||
@@ -22,0 +22,0 @@ if (!this.basePath || !this.resourceName) |
@@ -17,5 +17,5 @@ "use strict"; | ||
class HestiaLocationHelper extends hestia_helper_1.default { | ||
findAll(params, settings = {}) { | ||
var _a, _b, _c, _d, _e; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findAll(params_1) { | ||
return __awaiter(this, arguments, void 0, function* (params, settings = {}) { | ||
var _a, _b, _c, _d, _e; | ||
const path = `/locations`; | ||
@@ -42,5 +42,5 @@ const query = { | ||
} | ||
findOne({ countySlug, locationSlug }, settings = {}) { | ||
var _a, _b, _c; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ countySlug, locationSlug }, settings = {}) { | ||
var _b, _c, _d; | ||
yield this.hestia.site(); | ||
@@ -51,8 +51,8 @@ const path = `/counties/${countySlug}/locations/${locationSlug}`; | ||
search: { | ||
agency_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.agency_id, | ||
agency_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.agency_id, | ||
}, | ||
}; | ||
const json = yield this.hestia.request({ path, query }, settings); | ||
const result = ((_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.location) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_c = json.error) === null || _c === void 0 ? void 0 : _c.message }] : null; | ||
const result = ((_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.location) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_d = json.error) === null || _d === void 0 ? void 0 : _d.message }] : null; | ||
return { result, errors }; | ||
@@ -59,0 +59,0 @@ }); |
@@ -17,5 +17,5 @@ "use strict"; | ||
class HestiaPageHelper extends hestia_helper_1.default { | ||
findOne(slug, settings = {}) { | ||
var _a, _b, _c, _d; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(slug_1) { | ||
return __awaiter(this, arguments, void 0, function* (slug, settings = {}) { | ||
var _a, _b, _c, _d; | ||
yield this.hestia.site(); | ||
@@ -22,0 +22,0 @@ const path = `/sites/${(_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.site_id}/pages/${slug}`; |
@@ -27,5 +27,5 @@ "use strict"; | ||
} | ||
findById(id, settings = {}) { | ||
var _a, _b, _c, _d; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findById(id_1) { | ||
return __awaiter(this, arguments, void 0, function* (id, settings = {}) { | ||
var _a, _b, _c, _d; | ||
yield this.hestia.site(); | ||
@@ -48,5 +48,5 @@ const path = `${__classPrivateFieldGet(this, _HestiaPlaceHelper_basePath, "f")}/${id}`; | ||
} | ||
findAll({ name, }) { | ||
var _a, _b, _c, _d, _e, _f; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findAll(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name, }) { | ||
var _b, _c, _d, _e, _f, _g; | ||
yield this.hestia.site(); | ||
@@ -57,3 +57,3 @@ const query = { | ||
search: { | ||
site_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.site_id, | ||
site_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.site_id, | ||
name, | ||
@@ -66,5 +66,5 @@ }, | ||
}); | ||
const counties = ((_c = (_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.counties) === null || _c === void 0 ? void 0 : _c.elements) || []; | ||
const locations = ((_e = (_d = json === null || json === void 0 ? void 0 : json.result) === null || _d === void 0 ? void 0 : _d.locations) === null || _e === void 0 ? void 0 : _e.elements) || []; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_f = json.error) === null || _f === void 0 ? void 0 : _f.message }] : null; | ||
const counties = ((_d = (_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.counties) === null || _d === void 0 ? void 0 : _d.elements) || []; | ||
const locations = ((_f = (_e = json === null || json === void 0 ? void 0 : json.result) === null || _e === void 0 ? void 0 : _e.locations) === null || _f === void 0 ? void 0 : _f.elements) || []; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_g = json.error) === null || _g === void 0 ? void 0 : _g.message }] : null; | ||
let places = []; | ||
@@ -79,4 +79,4 @@ if (counties) | ||
} | ||
_HestiaPlaceHelper_basePath = new WeakMap(); | ||
exports.default = HestiaPlaceHelper; | ||
_HestiaPlaceHelper_basePath = new WeakMap(); | ||
//# sourceMappingURL=hestia-place-helper.js.map |
@@ -17,5 +17,5 @@ "use strict"; | ||
class HestiaPostcodeHelper extends hestia_helper_1.default { | ||
findOne({ postcode }, settings = {}) { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ postcode }, settings = {}) { | ||
var _b, _c; | ||
yield this.hestia.site(); | ||
@@ -25,4 +25,4 @@ const path = `/postcodes/${postcode}`; | ||
const json = yield this.hestia.request({ path }, settings); | ||
const result = ((_a = json === null || json === void 0 ? void 0 : json.result) === null || _a === void 0 ? void 0 : _a.postcode) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_b = json.error) === null || _b === void 0 ? void 0 : _b.message }] : null; | ||
const result = ((_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.postcode) || null; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_c = json.error) === null || _c === void 0 ? void 0 : _c.message }] : null; | ||
return { result, errors }; | ||
@@ -29,0 +29,0 @@ }); |
@@ -25,4 +25,4 @@ "use strict"; | ||
findAll(params) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j; | ||
yield this.hestia.site(); | ||
@@ -29,0 +29,0 @@ const path = '/properties'; |
@@ -21,5 +21,5 @@ "use strict"; | ||
} | ||
findAll({ page, pageSize, branchId, }) { | ||
var _a, _b, _c, _d, _e, _f; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
findAll(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ page, pageSize, branchId, }) { | ||
var _b, _c, _d, _e, _f, _g; | ||
yield this.hestia.site(); | ||
@@ -30,3 +30,3 @@ const query = { | ||
search: { | ||
agency_id: (_a = this.hestia.siteData) === null || _a === void 0 ? void 0 : _a.agency.agency_id, | ||
agency_id: (_b = this.hestia.siteData) === null || _b === void 0 ? void 0 : _b.agency.agency_id, | ||
branch_id: branchId, | ||
@@ -39,5 +39,5 @@ }, | ||
}, { cache: 'no-store' }); | ||
const results = ((_c = (_b = json === null || json === void 0 ? void 0 : json.result) === null || _b === void 0 ? void 0 : _b.testimonials) === null || _c === void 0 ? void 0 : _c.elements) || []; | ||
const totalCount = ((_e = (_d = json === null || json === void 0 ? void 0 : json.result) === null || _d === void 0 ? void 0 : _d.testimonials) === null || _e === void 0 ? void 0 : _e.total) || 0; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_f = json.error) === null || _f === void 0 ? void 0 : _f.message }] : null; | ||
const results = ((_d = (_c = json === null || json === void 0 ? void 0 : json.result) === null || _c === void 0 ? void 0 : _c.testimonials) === null || _d === void 0 ? void 0 : _d.elements) || []; | ||
const totalCount = ((_f = (_e = json === null || json === void 0 ? void 0 : json.result) === null || _e === void 0 ? void 0 : _e.testimonials) === null || _f === void 0 ? void 0 : _f.total) || 0; | ||
const errors = (json === null || json === void 0 ? void 0 : json.error) ? [{ message: (_g = json.error) === null || _g === void 0 ? void 0 : _g.message }] : null; | ||
return { results, totalCount, errors }; | ||
@@ -44,0 +44,0 @@ }); |
@@ -67,9 +67,9 @@ "use strict"; | ||
} | ||
request({ path, query }, settings = {}) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
request(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ path, query }, settings = {}) { | ||
var _b; | ||
const cleanedQuery = (0, utils_1.removeEmpties)(query); | ||
const queryString = qs_1.default.stringify(Object.assign({ api_key: __classPrivateFieldGet(this, _HestiaClient_apiKey, "f"), request_key: __classPrivateFieldGet(this, _HestiaClient_siteHost, "f") }, cleanedQuery), { arrayFormat: 'brackets' }); | ||
const url = `${__classPrivateFieldGet(this, _HestiaClient_baseURL, "f")}${path}?${queryString}`; | ||
const resourceName = (_a = path.match(/^\/([a-z_-]*)/)) === null || _a === void 0 ? void 0 : _a[1]; | ||
const resourceName = (_b = path.match(/^\/([a-z_-]*)/)) === null || _b === void 0 ? void 0 : _b[1]; | ||
// const beforeTime: number = performance.now(); | ||
@@ -104,3 +104,2 @@ const res = yield fetch(url, settings); | ||
} | ||
exports.default = HestiaClient; | ||
_HestiaClient_baseURL = new WeakMap(), _HestiaClient_apiKey = new WeakMap(), _HestiaClient_siteHost = new WeakMap(), _HestiaClient_log = new WeakMap(), _HestiaClient_instances = new WeakSet(), _HestiaClient_fetchSite = function _HestiaClient_fetchSite() { | ||
@@ -112,2 +111,3 @@ return __awaiter(this, void 0, void 0, function* () { | ||
}; | ||
exports.default = HestiaClient; | ||
//# sourceMappingURL=index.js.map |
@@ -38,4 +38,4 @@ "use strict"; | ||
} | ||
request({ path, method = 'GET', query, body, headers, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
request(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ path, method = 'GET', query, body, headers, }) { | ||
// TODO: fix return type | ||
@@ -61,4 +61,4 @@ yield this.usersApi.authenticate(); | ||
} | ||
create({ siteId, imageData }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
create(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ siteId, imageData }) { | ||
const { image: { filename, data, description }, } = imageData; | ||
@@ -84,4 +84,4 @@ const res = yield this.request({ | ||
} | ||
_ImagesAPIClient_imagesApiUrl = new WeakMap(), _ImagesAPIClient_log = new WeakMap(); | ||
exports.default = ImagesAPIClient; | ||
_ImagesAPIClient_imagesApiUrl = new WeakMap(), _ImagesAPIClient_log = new WeakMap(); | ||
//# sourceMappingURL=index.js.map |
@@ -106,4 +106,4 @@ "use strict"; | ||
} | ||
_LeadsAPIClient_leadsApiUrl = new WeakMap(), _LeadsAPIClient_log = new WeakMap(); | ||
exports.default = LeadsAPIClient; | ||
_LeadsAPIClient_leadsApiUrl = new WeakMap(), _LeadsAPIClient_log = new WeakMap(); | ||
//# sourceMappingURL=index.js.map |
@@ -33,4 +33,4 @@ "use strict"; | ||
// so that getters don't need to be replicated | ||
static signIn({ email, password, domain, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static signIn(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ email, password, domain, }) { | ||
const authResponse = yield AdminUser.adminUsersApi.session.bearerTokenCreate({ | ||
@@ -137,6 +137,6 @@ email, | ||
} | ||
exports.default = AdminUser; | ||
AdminUser.sessionCookieName = `${process.env.HOMEFLOW_AUTHENTICATION_COOKIE_NAME || 'attis_session_unified'}${process.env.NEXT_PUBLIC_ENVIRONMENT !== 'production' | ||
? `-${process.env.NEXT_PUBLIC_ENVIRONMENT}` | ||
: ''}`; | ||
exports.default = AdminUser; | ||
//# sourceMappingURL=admin-user.js.map |
@@ -35,4 +35,4 @@ "use strict"; | ||
class AgencyEmployee extends model_1.default { | ||
static findAll(params = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findAll() { | ||
return __awaiter(this, arguments, void 0, function* (params = {}) { | ||
const { results, totalCount, errors } = yield model_1.default.hestia.agencyEmployee.findAll(params); | ||
@@ -39,0 +39,0 @@ if (errors || !results.length) { |
@@ -33,2 +33,5 @@ import 'server-only'; | ||
get contentSecurityPolicyHeaders(): string | null; | ||
get defaultSalesSortOrder(): string; | ||
get defaultLettingsSortOrder(): string; | ||
defaultSortOrder(channel: string): string; | ||
/** | ||
@@ -35,0 +38,0 @@ * Returns a menu by name from the agency data. Menus are configured in the CMS. |
@@ -160,2 +160,35 @@ "use strict"; | ||
} | ||
get defaultSalesSortOrder() { | ||
var _a; | ||
var _b; | ||
return ((_a = (_b = this.memo).defaultSalesSortOrder) !== null && _a !== void 0 ? _a : (_b.defaultSalesSortOrder = this.defaultSortOrder('sales'))); | ||
} | ||
get defaultLettingsSortOrder() { | ||
var _a; | ||
var _b; | ||
return ((_a = (_b = this.memo).defaultLettingsSortOrder) !== null && _a !== void 0 ? _a : (_b.defaultLettingsSortOrder = this.defaultSortOrder('lettings'))); | ||
} | ||
defaultSortOrder(channel) { | ||
if (!this.hestiaData) | ||
throw Error('Site not found'); | ||
const orderBy = channel === 'sales' | ||
? this.hestiaData.sales_search_order_by | ||
: this.hestiaData.lettings_search_order_by; | ||
if ((orderBy === null || orderBy === void 0 ? void 0 : orderBy[0]) === 'price' && (orderBy === null || orderBy === void 0 ? void 0 : orderBy[1]) === 'desc') { | ||
return 'most-expensive-first'; | ||
} | ||
if ((orderBy === null || orderBy === void 0 ? void 0 : orderBy[0]) === 'price' && (orderBy === null || orderBy === void 0 ? void 0 : orderBy[1]) === 'asc') { | ||
return 'least-expensive-first'; | ||
} | ||
if ((orderBy === null || orderBy === void 0 ? void 0 : orderBy[0]) === 'create_date' && (orderBy === null || orderBy === void 0 ? void 0 : orderBy[1]) === 'desc') { | ||
return 'most-recent-first'; | ||
} | ||
if ((orderBy === null || orderBy === void 0 ? void 0 : orderBy[0]) === 'launched_date' && (orderBy === null || orderBy === void 0 ? void 0 : orderBy[1]) === 'desc') { | ||
return 'most-recently-launched-first'; | ||
} | ||
if ((orderBy === null || orderBy === void 0 ? void 0 : orderBy[0]) === 'updated_at' && (orderBy === null || orderBy === void 0 ? void 0 : orderBy[1]) === 'desc') { | ||
return 'most-recently-updated-first'; | ||
} | ||
return 'most-expensive-first'; | ||
} | ||
/** | ||
@@ -162,0 +195,0 @@ * Returns a menu by name from the agency data. Menus are configured in the CMS. |
@@ -128,2 +128,5 @@ import { CamelCaseKeys } from '../../utils/util.types'; | ||
activated_domain: string; | ||
/** e.g. ["price", "desc"] */ | ||
sales_search_order_by: string[]; | ||
lettings_search_order_by: string[]; | ||
}; | ||
@@ -130,0 +133,0 @@ export type CSPHeaders = { |
@@ -37,4 +37,4 @@ "use strict"; | ||
class Article extends model_1.default { | ||
static findOne({ slug, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug, }) { | ||
const agency = yield agency_1.default.current(); | ||
@@ -51,4 +51,4 @@ if (!agency.siteId) | ||
// TODO: How do I set default page size on here? | ||
static findAll(searchParams = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findAll() { | ||
return __awaiter(this, arguments, void 0, function* (searchParams = {}) { | ||
const agency = yield agency_1.default.current(); | ||
@@ -55,0 +55,0 @@ if (!agency.siteId) |
@@ -39,4 +39,4 @@ "use strict"; | ||
class Branch extends model_1.default { | ||
static findOne({ slug, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug, }) { | ||
const { result, errors } = yield Branch.hestia.branch.findOne({ slug }); | ||
@@ -184,4 +184,4 @@ if (errors || !result) | ||
getTestimonials() { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
if ((_a = this.memo) === null || _a === void 0 ? void 0 : _a.testimonials) | ||
@@ -197,4 +197,4 @@ return this.memo.testimonials; | ||
getArticles() { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
if ((_a = this.memo) === null || _a === void 0 ? void 0 : _a.articles) | ||
@@ -211,4 +211,4 @@ return this.memo.articles; | ||
} | ||
getRecentSalesProperties(pageSize = 5) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
getRecentSalesProperties() { | ||
return __awaiter(this, arguments, void 0, function* (pageSize = 5) { | ||
if (this.memo.recentSalesProperties) | ||
@@ -226,4 +226,4 @@ return this.memo.recentSalesProperties; | ||
} | ||
getRecentLettingsProperties(pageSize = 5) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
getRecentLettingsProperties() { | ||
return __awaiter(this, arguments, void 0, function* (pageSize = 5) { | ||
if (this.memo.recentLettingsProperties) | ||
@@ -242,3 +242,2 @@ return this.memo.recentLettingsProperties; | ||
} | ||
exports.default = Branch; | ||
Branch.recentPropertiesSearchParams = { | ||
@@ -248,3 +247,4 @@ sort: ['created_at', 'desc'], | ||
}; | ||
exports.default = Branch; | ||
Branch; | ||
//# sourceMappingURL=branch.js.map |
@@ -35,4 +35,4 @@ "use strict"; | ||
class ContentChunk extends model_1.default { | ||
static findOne({ name, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name, }) { | ||
const { result, errors } = yield ContentChunk.hestia.contentChunk.findOne({ | ||
@@ -39,0 +39,0 @@ name, |
@@ -18,4 +18,4 @@ "use strict"; | ||
class County extends model_1.default { | ||
static findOne({ urlLabel, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ urlLabel, }) { | ||
const { result, errors } = yield County.hestia.county.findOne({ urlLabel }); | ||
@@ -22,0 +22,0 @@ if (errors || !result) |
@@ -47,4 +47,4 @@ "use strict"; | ||
*/ | ||
static create({ imageData, siteId, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static create(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ imageData, siteId, }) { | ||
if (!siteId || !imageData) | ||
@@ -64,4 +64,4 @@ return null; | ||
*/ | ||
static findAll({ page, pageSize, type, name, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findAll(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ page, pageSize, type, name, }) { | ||
const agency = yield agency_1.default.current(); | ||
@@ -68,0 +68,0 @@ if (!(agency === null || agency === void 0 ? void 0 : agency.siteId)) |
@@ -47,3 +47,3 @@ "use strict"; | ||
LeadType["AgencyRegistrationLead"] = "agency_registration_lead"; | ||
})(LeadType = exports.LeadType || (exports.LeadType = {})); | ||
})(LeadType || (exports.LeadType = LeadType = {})); | ||
class Lead extends model_1.default { | ||
@@ -120,8 +120,8 @@ static create(leadType, leadParams) { | ||
} | ||
static verifyCaptchaToken({ token, subdomain, }) { | ||
var _a, _b, _c, _d; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static verifyCaptchaToken(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ token, subdomain, }) { | ||
var _b, _c, _d, _e; | ||
const captchaRes = yield (0, verify_captcha_token_1.default)(token); | ||
// Unsuccessful verification | ||
if (!captchaRes.success || ((_a = captchaRes['error-codes']) === null || _a === void 0 ? void 0 : _a.length)) { | ||
if (!captchaRes.success || ((_b = captchaRes['error-codes']) === null || _b === void 0 ? void 0 : _b.length)) { | ||
return { | ||
@@ -140,5 +140,5 @@ errors: captchaRes['error-codes'] | ||
// Unsafe host | ||
if (!(((_b = captchaRes.hostname) === null || _b === void 0 ? void 0 : _b.includes(subdomain)) || | ||
((_c = captchaRes.hostname) === null || _c === void 0 ? void 0 : _c.includes('localhost')) || | ||
((_d = captchaRes.hostname) === null || _d === void 0 ? void 0 : _d.includes('homeflow.co.uk')))) { | ||
if (!(((_c = captchaRes.hostname) === null || _c === void 0 ? void 0 : _c.includes(subdomain)) || | ||
((_d = captchaRes.hostname) === null || _d === void 0 ? void 0 : _d.includes('localhost')) || | ||
((_e = captchaRes.hostname) === null || _e === void 0 ? void 0 : _e.includes('homeflow.co.uk')))) { | ||
return { errors: [{ message: 'Unable to verify host' }] }; | ||
@@ -145,0 +145,0 @@ } |
@@ -19,4 +19,4 @@ "use strict"; | ||
class Location extends model_1.default { | ||
static findOne({ countySlug, locationSlug, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ countySlug, locationSlug, }) { | ||
const { result, errors } = yield Location.hestia.location.findOne({ | ||
@@ -23,0 +23,0 @@ countySlug, |
@@ -40,5 +40,5 @@ "use strict"; | ||
} | ||
exports.default = Model; | ||
/** @hidden */ | ||
Model.isInitialized = false; | ||
exports.default = Model; | ||
//# sourceMappingURL=model.js.map |
@@ -35,4 +35,4 @@ "use strict"; | ||
class Page extends model_1.default { | ||
static findOne({ slug, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ slug, }) { | ||
const { result, errors } = yield Page.hestia.page.findOne(slug); | ||
@@ -39,0 +39,0 @@ if (errors || !result) |
@@ -33,4 +33,4 @@ "use strict"; | ||
class Place extends model_1.default { | ||
static findAll({ name, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findAll(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name, }) { | ||
const { results, errors } = yield Place.hestia.place.findAll({ name }); | ||
@@ -52,4 +52,4 @@ if (errors || !results.length) | ||
} | ||
static findOne({ name, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name, }) { | ||
const { results, errors } = yield Place.hestia.place.findAll({ name }); | ||
@@ -71,4 +71,4 @@ if (errors || !results.length) | ||
/** Returns suggestions as a 2d array to be used by autosuggest on frontend */ | ||
static suggest({ name }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static suggest(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ name }) { | ||
const { results, errors } = yield Place.findAll({ name }); | ||
@@ -75,0 +75,0 @@ if (errors || !(results === null || results === void 0 ? void 0 : results.length)) |
@@ -32,4 +32,4 @@ "use strict"; | ||
class Postcode extends model_1.default { | ||
static findOne({ postcode, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findOne(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ postcode, }) { | ||
const { result, errors } = yield Postcode.hestia.postcode.findOne({ | ||
@@ -36,0 +36,0 @@ postcode, |
@@ -94,4 +94,4 @@ "use strict"; | ||
*/ | ||
static findAll(params = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static findAll() { | ||
return __awaiter(this, arguments, void 0, function* (params = {}) { | ||
const { results, errors, totalCount } = yield model_1.default.hestia.property.findAll(params); | ||
@@ -124,5 +124,6 @@ if (errors || !results.length) { | ||
*/ | ||
static search({ search, location, county, postcode, branch, page, pageSize, }) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static search(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ search, location, county, postcode, branch, page, pageSize, }) { | ||
var _b; | ||
const agency = yield agency_1.default.current(); | ||
let place; | ||
@@ -152,4 +153,3 @@ if (branch) { | ||
if (place) { | ||
const agency = yield agency_1.default.current(); | ||
const defaultSearchRadius = (_a = agency === null || agency === void 0 ? void 0 : agency.hestiaData) === null || _a === void 0 ? void 0 : _a.preferences.default_search_radius; | ||
const defaultSearchRadius = (_b = agency === null || agency === void 0 ? void 0 : agency.hestiaData) === null || _b === void 0 ? void 0 : _b.preferences.default_search_radius; | ||
searchParams = Object.assign(Object.assign({}, searchParams), { place: { | ||
@@ -165,2 +165,3 @@ id: place === null || place === void 0 ? void 0 : place.id, | ||
delete searchParams.within; | ||
searchParams.sort = searchParams.sort || agency.defaultSortOrder(searchParams.channel); | ||
return this.findAll({ | ||
@@ -173,4 +174,4 @@ page, | ||
} | ||
static branchProperties({ search, branchSlug, page = 1, pageSize = 12, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static branchProperties(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ search, branchSlug, page = 1, pageSize = 12, }) { | ||
const { result: branch, errors } = yield this.hestia.branch.findOne({ slug: branchSlug }); | ||
@@ -204,4 +205,4 @@ if (!branch || errors) | ||
*/ | ||
similarProperties({ params, limit = 12, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
similarProperties(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ params, limit = 12, }) { | ||
if (!this.priceValue || !this.primaryChannel || !this.lng || !this.lat) | ||
@@ -510,4 +511,4 @@ return { errors: [{ message: 'Missing required fields' }], results: [], pagination: null }; | ||
getBranch() { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
if (!((_a = this.hestiaData) === null || _a === void 0 ? void 0 : _a.branch_id)) | ||
@@ -522,4 +523,4 @@ return null; | ||
getStaffProfiles() { | ||
var _a, _b, _c, _d; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b, _c, _d; | ||
if ((_b = (_a = this.hestiaData) === null || _a === void 0 ? void 0 : _a.associated_profiles) === null || _b === void 0 ? void 0 : _b.length) { | ||
@@ -526,0 +527,0 @@ const staffProfile = yield agency_employee_1.default.findById(this.hestiaData.associated_profiles[0].user_id); |
@@ -97,30 +97,30 @@ import 'server-only'; | ||
}): Promise<{ | ||
message?: string | undefined; | ||
message?: string; | ||
search?: { | ||
sales_search?: SavedSearch | undefined; | ||
lettings_search?: SavedSearch | undefined; | ||
} | undefined; | ||
sales_search?: SavedSearch; | ||
lettings_search?: SavedSearch; | ||
}; | ||
error?: { | ||
status: number; | ||
} | undefined; | ||
}; | ||
}>; | ||
removeSavedSearch(id: number): Promise<{ | ||
message?: string | undefined; | ||
message?: string; | ||
search?: { | ||
sales_search?: SavedSearch | undefined; | ||
lettings_search?: SavedSearch | undefined; | ||
} | undefined; | ||
sales_search?: SavedSearch; | ||
lettings_search?: SavedSearch; | ||
}; | ||
error?: { | ||
status: number; | ||
} | undefined; | ||
}; | ||
}>; | ||
updateSavedSearch(id: number, updatedSearch: SavedSearch): Promise<{ | ||
message?: string | undefined; | ||
message?: string; | ||
search?: { | ||
sales_search?: SavedSearch | undefined; | ||
lettings_search?: SavedSearch | undefined; | ||
} | undefined; | ||
sales_search?: SavedSearch; | ||
lettings_search?: SavedSearch; | ||
}; | ||
error?: { | ||
status: number; | ||
} | undefined; | ||
}; | ||
}>; | ||
@@ -127,0 +127,0 @@ constructor({ sessionData }: { |
@@ -70,4 +70,4 @@ "use strict"; | ||
static current(session) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
if (!(session === null || session === void 0 ? void 0 : session.encryptedCookieToken)) | ||
@@ -92,4 +92,4 @@ return null; | ||
*/ | ||
static signIn({ email, password, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static signIn(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ email, password, }) { | ||
const authResponse = yield User.usersApi.session.bearerTokenCreate({ email, password }); | ||
@@ -128,4 +128,4 @@ // At the moment we're just returning null if login was unsuccessful | ||
*/ | ||
static register({ email, password, passwordConfirmation, firstName, lastName, optInMarketing, optInTerms, optInUrl, telHome, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
static register(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ email, password, passwordConfirmation, firstName, lastName, optInMarketing, optInTerms, optInUrl, telHome, }) { | ||
if (password !== passwordConfirmation) | ||
@@ -227,4 +227,4 @@ throw Error('Password and password confirmation do not match'); | ||
} | ||
addSavedSearch({ channel, searchFragment, placeId, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
addSavedSearch(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ channel, searchFragment, placeId, }) { | ||
if (!User.usersApi.token) | ||
@@ -347,4 +347,4 @@ throw Error('No app auth token'); | ||
} | ||
_User_token = new WeakMap(); | ||
exports.default = User; | ||
_User_token = new WeakMap(); | ||
//# sourceMappingURL=user.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = index; | ||
const server_1 = require("next/server"); | ||
@@ -69,3 +70,2 @@ const article_1 = __importDefault(require("../../models/article")); | ||
} | ||
exports.default = index; | ||
//# sourceMappingURL=articles-index.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = index; | ||
const server_1 = require("next/server"); | ||
@@ -70,3 +71,2 @@ const branch_1 = __importDefault(require("../../models/branch")); | ||
} | ||
exports.default = index; | ||
//# sourceMappingURL=branches-index.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = index; | ||
const server_1 = require("next/server"); | ||
@@ -34,3 +35,2 @@ const location_1 = __importDefault(require("../../models/location")); | ||
} | ||
exports.default = index; | ||
//# sourceMappingURL=locations-index.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = index; | ||
const server_1 = require("next/server"); | ||
@@ -60,3 +61,2 @@ const place_1 = __importDefault(require("../../models/place")); | ||
} | ||
exports.default = index; | ||
//# sourceMappingURL=places-index.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = show; | ||
const server_1 = require("next/server"); | ||
@@ -51,4 +52,4 @@ const place_1 = __importDefault(require("../../models/place")); | ||
*/ | ||
function show(_request, { params, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
function show(_request_1, _a) { | ||
return __awaiter(this, arguments, void 0, function* (_request, { params, }) { | ||
const { id } = params; | ||
@@ -61,3 +62,2 @@ const { result: place, errors } = yield place_1.default.findById(id); | ||
} | ||
exports.default = show; | ||
//# sourceMappingURL=places-show.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = show; | ||
const server_1 = require("next/server"); | ||
@@ -54,4 +55,4 @@ const postcode_1 = __importDefault(require("../../models/postcode")); | ||
*/ | ||
function show(request, { params, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
function show(request_1, _a) { | ||
return __awaiter(this, arguments, void 0, function* (request, { params, }) { | ||
const { urlLabel } = params; | ||
@@ -64,3 +65,2 @@ const { result: postcode, errors } = yield postcode_1.default.findOne({ postcode: urlLabel }); | ||
} | ||
exports.default = show; | ||
//# sourceMappingURL=postcodes-show.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = index; | ||
const server_1 = require("next/server"); | ||
@@ -79,3 +80,2 @@ const property_1 = __importDefault(require("../../models/property")); | ||
} | ||
exports.default = index; | ||
//# sourceMappingURL=properties-index.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = index; | ||
const server_1 = require("next/server"); | ||
@@ -69,3 +70,2 @@ const testimonial_1 = __importDefault(require("../../models/testimonial")); | ||
} | ||
exports.default = index; | ||
//# sourceMappingURL=testimonials-index.js.map |
@@ -10,10 +10,10 @@ import { SavedSearch } from 'src/state'; | ||
}): Promise<{ | ||
message?: string | undefined; | ||
message?: string; | ||
search?: { | ||
sales_search?: SavedSearch | undefined; | ||
lettings_search?: SavedSearch | undefined; | ||
} | undefined; | ||
sales_search?: SavedSearch; | ||
lettings_search?: SavedSearch; | ||
}; | ||
error?: { | ||
status: number; | ||
} | undefined; | ||
}; | ||
}>; | ||
@@ -24,10 +24,10 @@ removeSavedSearch({ searchId, userId }: { | ||
}): Promise<{ | ||
message?: string | undefined; | ||
message?: string; | ||
search?: { | ||
sales_search?: SavedSearch | undefined; | ||
lettings_search?: SavedSearch | undefined; | ||
} | undefined; | ||
sales_search?: SavedSearch; | ||
lettings_search?: SavedSearch; | ||
}; | ||
error?: { | ||
status: number; | ||
} | undefined; | ||
}; | ||
}>; | ||
@@ -39,11 +39,11 @@ updateSavedSearch({ searchId, userId, updatedSearch, }: { | ||
}): Promise<{ | ||
message?: string | undefined; | ||
message?: string; | ||
search?: { | ||
sales_search?: SavedSearch | undefined; | ||
lettings_search?: SavedSearch | undefined; | ||
} | undefined; | ||
sales_search?: SavedSearch; | ||
lettings_search?: SavedSearch; | ||
}; | ||
error?: { | ||
status: number; | ||
} | undefined; | ||
}; | ||
}>; | ||
} |
@@ -17,4 +17,4 @@ "use strict"; | ||
class SearchesAPISavedSearchesHelper extends searches_api_helper_1.default { | ||
addSavedSearch({ channel, searchFragment, userId, placeId, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
addSavedSearch(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ channel, searchFragment, userId, placeId, }) { | ||
const json = yield this.searchesApi.request({ | ||
@@ -33,4 +33,4 @@ method: 'POST', | ||
} | ||
removeSavedSearch({ searchId, userId }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
removeSavedSearch(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ searchId, userId }) { | ||
const json = yield this.searchesApi.request({ | ||
@@ -46,4 +46,4 @@ method: 'DELETE', | ||
} | ||
updateSavedSearch({ searchId, userId, updatedSearch, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
updateSavedSearch(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ searchId, userId, updatedSearch, }) { | ||
const json = yield this.searchesApi.request({ | ||
@@ -50,0 +50,0 @@ method: 'PUT', |
@@ -40,4 +40,4 @@ "use strict"; | ||
} | ||
request({ path, method = 'GET', query, body, headers, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
request(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ path, method = 'GET', query, body, headers, }) { | ||
yield this.usersApi.authenticate(); | ||
@@ -63,4 +63,4 @@ let queryString = ''; | ||
} | ||
_SearchesAPIClient_searchesApiUrl = new WeakMap(), _SearchesAPIClient_log = new WeakMap(); | ||
exports.default = SearchesAPIClient; | ||
_SearchesAPIClient_searchesApiUrl = new WeakMap(), _SearchesAPIClient_log = new WeakMap(); | ||
//# sourceMappingURL=index.js.map |
@@ -17,4 +17,4 @@ "use strict"; | ||
class UsersAPISessionHelper extends users_api_helper_1.default { | ||
bearerTokenCreate({ email, password, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
bearerTokenCreate(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ email, password, }) { | ||
const json = yield this.usersApi.request({ | ||
@@ -54,4 +54,4 @@ method: 'POST', | ||
verify(encryptedCookieToken) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
const verificationEnv = ((_a = process.env.USERS_API_URL) === null || _a === void 0 ? void 0 : _a.includes('staging')) | ||
@@ -58,0 +58,0 @@ ? 'staging' |
@@ -17,4 +17,4 @@ "use strict"; | ||
class UsersAPIUserHelper extends users_api_helper_1.default { | ||
create({ email, password, passwordConfirmation, firstName, lastName, agencyId, domain, }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
create(_a) { | ||
return __awaiter(this, arguments, void 0, function* ({ email, password, passwordConfirmation, firstName, lastName, agencyId, domain, }) { | ||
const response = yield this.usersApi.request({ | ||
@@ -21,0 +21,0 @@ method: 'POST', |
@@ -49,4 +49,4 @@ "use strict"; | ||
} | ||
request({ path, query, method = 'GET', body, headers = {}, }, verificationEnv) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
request(_a, verificationEnv_1) { | ||
return __awaiter(this, arguments, void 0, function* ({ path, query, method = 'GET', body, headers = {}, }, verificationEnv) { | ||
const queryString = qs_1.default.stringify(query, { arrayFormat: 'brackets' }); | ||
@@ -106,4 +106,4 @@ const url = `${__classPrivateFieldGet(this, _UsersAPIClient_usersApiUrl, "f")}${path}?${queryString}`; | ||
} | ||
_UsersAPIClient_usersApiUrl = new WeakMap(), _UsersAPIClient_log = new WeakMap(); | ||
exports.default = UsersAPIClient; | ||
_UsersAPIClient_usersApiUrl = new WeakMap(), _UsersAPIClient_log = new WeakMap(); | ||
//# sourceMappingURL=index.js.map |
@@ -29,2 +29,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = ResponsiveImage; | ||
const react_1 = __importDefault(require("react")); | ||
@@ -103,3 +104,2 @@ const image_1 = __importStar(require("next/image")); | ||
} | ||
exports.default = ResponsiveImage; | ||
//# sourceMappingURL=responsive-image.js.map |
@@ -39,2 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = BackToSearchLink; | ||
const link_1 = __importDefault(require("next/link")); | ||
@@ -80,3 +81,2 @@ const react_1 = __importStar(require("react")); | ||
} | ||
exports.default = BackToSearchLink; | ||
//# sourceMappingURL=back-to-search-link.component.js.map |
@@ -26,2 +26,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = ClientSideOnly; | ||
const react_1 = __importStar(require("react")); | ||
@@ -45,3 +46,2 @@ /** | ||
} | ||
exports.default = ClientSideOnly; | ||
//# sourceMappingURL=client-side-only.component.js.map |
@@ -15,7 +15,7 @@ import mongoose from 'mongoose'; | ||
export type GlobalConfig = IGlobalConfig & mongoose.Document; | ||
declare const GlobalConfigSchema: mongoose.Schema<GlobalConfig, mongoose.Model<GlobalConfig, any, any, any, mongoose.Document<unknown, any, GlobalConfig> & IGlobalConfig & mongoose.Document<unknown, any, any> & Required<{ | ||
_id: string | null; | ||
}>, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, GlobalConfig, mongoose.Document<unknown, {}, mongoose.FlatRecord<GlobalConfig>> & mongoose.FlatRecord<GlobalConfig> & Required<{ | ||
_id: string | null; | ||
}>>; | ||
declare const GlobalConfigSchema: mongoose.Schema<GlobalConfig, mongoose.Model<GlobalConfig, any, any, any, mongoose.Document<unknown, any, GlobalConfig> & IGlobalConfig & mongoose.Document<any, any, any> & { | ||
_id: mongoose.Types.ObjectId; | ||
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, GlobalConfig, mongoose.Document<unknown, {}, mongoose.FlatRecord<GlobalConfig>> & mongoose.FlatRecord<GlobalConfig> & { | ||
_id: mongoose.Types.ObjectId; | ||
}>; | ||
export default GlobalConfigSchema; |
@@ -50,10 +50,10 @@ import { ObjectId } from 'mongodb'; | ||
}>; | ||
declare const PageConfigSchema: mongoose.Schema<PageConfig, mongoose.Model<PageConfig, any, any, any, mongoose.Document<unknown, any, PageConfig> & IPageConfig & mongoose.Document<unknown, any, any> & { | ||
declare const PageConfigSchema: mongoose.Schema<PageConfig, mongoose.Model<PageConfig, any, any, any, mongoose.Document<unknown, any, PageConfig> & IPageConfig & mongoose.Document<any, any, any> & { | ||
populateSharedSections: () => Promise<void>; | ||
renderLiquid: () => Promise<void>; | ||
} & Required<{ | ||
_id: string | null; | ||
}>, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, PageConfig, mongoose.Document<unknown, {}, mongoose.FlatRecord<PageConfig>> & mongoose.FlatRecord<PageConfig> & Required<{ | ||
_id: string | null; | ||
}>>; | ||
} & { | ||
_id: mongoose.Types.ObjectId; | ||
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, PageConfig, mongoose.Document<unknown, {}, mongoose.FlatRecord<PageConfig>> & mongoose.FlatRecord<PageConfig> & { | ||
_id: mongoose.Types.ObjectId; | ||
}>; | ||
export default PageConfigSchema; |
@@ -29,3 +29,3 @@ "use strict"; | ||
exports.SectionSchema = new mongoose_1.default.Schema({ | ||
agencyId: Number, | ||
agencyId: Number, // only required for shared sections | ||
name: String, | ||
@@ -32,0 +32,0 @@ sharedSection: { type: mongoose_1.default.Schema.Types.ObjectId, ref: 'SharedSection' }, |
@@ -10,7 +10,7 @@ import mongoose from 'mongoose'; | ||
} | ||
declare const SecretConfigSchema: mongoose.Schema<SecretConfig, mongoose.Model<SecretConfig, any, any, any, mongoose.Document<unknown, any, SecretConfig> & SecretConfig & Required<{ | ||
_id: unknown; | ||
}>, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SecretConfig, mongoose.Document<unknown, {}, mongoose.FlatRecord<SecretConfig>> & mongoose.FlatRecord<SecretConfig> & Required<{ | ||
_id: unknown; | ||
}>>; | ||
declare const SecretConfigSchema: mongoose.Schema<SecretConfig, mongoose.Model<SecretConfig, any, any, any, mongoose.Document<unknown, any, SecretConfig> & SecretConfig & { | ||
_id: mongoose.Types.ObjectId; | ||
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SecretConfig, mongoose.Document<unknown, {}, mongoose.FlatRecord<SecretConfig>> & mongoose.FlatRecord<SecretConfig> & { | ||
_id: mongoose.Types.ObjectId; | ||
}>; | ||
export default SecretConfigSchema; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useArticlesSortOrder; | ||
const navigation_1 = require("next/navigation"); | ||
@@ -27,3 +28,2 @@ const react_1 = require("react"); | ||
} | ||
exports.default = useArticlesSortOrder; | ||
//# sourceMappingURL=use-articles-sort-order.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useLoadProperties; | ||
const react_1 = require("react"); | ||
@@ -175,3 +176,2 @@ const react_redux_1 = require("react-redux"); | ||
} | ||
exports.default = useLoadProperties; | ||
//# sourceMappingURL=use-load-properties.js.map |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = usePropertiesMapEvents; | ||
const react_1 = require("react"); | ||
@@ -85,3 +86,2 @@ const react_redux_1 = require("react-redux"); | ||
} | ||
exports.default = usePropertiesMapEvents; | ||
//# sourceMappingURL=use-properties-map-events.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = usePropertiesView; | ||
const react_1 = require("react"); | ||
@@ -61,3 +62,2 @@ const navigation_1 = require("next/navigation"); | ||
} | ||
exports.default = usePropertiesView; | ||
//# sourceMappingURL=use-properties-view.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = usePropertyLinks; | ||
const react_1 = require("react"); | ||
@@ -31,3 +32,2 @@ const get_property_links_1 = __importDefault(require("../../search/get-property-links")); | ||
} | ||
exports.default = usePropertyLinks; | ||
//# sourceMappingURL=use-property-links.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useSortOrder; | ||
const react_1 = require("react"); | ||
@@ -77,3 +78,2 @@ const navigation_1 = require("next/navigation"); | ||
} | ||
exports.default = useSortOrder; | ||
//# sourceMappingURL=use-sort-order.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useStampDutyCalculator; | ||
const react_1 = require("react"); | ||
@@ -153,3 +154,2 @@ const englishNonResidentialMovingRates = [ | ||
} | ||
exports.default = useStampDutyCalculator; | ||
//# sourceMappingURL=use-stamp-duty-calculator.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useGenerateSearchFromProperty; | ||
const react_1 = require("react"); | ||
@@ -78,3 +79,2 @@ const react_redux_1 = require("react-redux"); | ||
} | ||
exports.default = useGenerateSearchFromProperty; | ||
//# sourceMappingURL=use-generate-search-from-property.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useSearchForm; | ||
const react_1 = require("react"); | ||
@@ -299,3 +300,2 @@ const navigation_1 = require("next/navigation"); | ||
} | ||
exports.default = useSearchForm; | ||
//# sourceMappingURL=use-search-form.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useSubmitSearch; | ||
const react_1 = require("react"); | ||
@@ -71,3 +72,2 @@ const react_redux_1 = require("react-redux"); | ||
} | ||
exports.default = useSubmitSearch; | ||
//# sourceMappingURL=use-submit-search.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = useScrolledDown; | ||
const react_1 = require("react"); | ||
@@ -19,3 +20,2 @@ function useScrolledDown(threshold = 100) { | ||
} | ||
exports.default = useScrolledDown; | ||
//# sourceMappingURL=use-scrolled-down.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = cmsImage; | ||
/** | ||
@@ -61,3 +62,2 @@ * Takes an image path and generates a valid Homeflow CDN URL. | ||
} | ||
exports.default = cmsImage; | ||
//# sourceMappingURL=cms-image.js.map |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = verifyCaptchaToken; | ||
function verifyCaptchaToken(token) { | ||
@@ -34,3 +35,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.default = verifyCaptchaToken; | ||
//# sourceMappingURL=verify-captcha-token.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = buildSearchUrl; | ||
const constants_1 = require("./constants"); | ||
@@ -61,3 +62,2 @@ function fragmentize(key, value) { | ||
} | ||
exports.default = buildSearchUrl; | ||
//# sourceMappingURL=build-search-url.js.map |
@@ -10,3 +10,3 @@ "use strict"; | ||
FragmentType["Base64"] = "Base64"; | ||
})(FragmentType = exports.FragmentType || (exports.FragmentType = {})); | ||
})(FragmentType || (exports.FragmentType = FragmentType = {})); | ||
exports.FRAGMENT_DEFINITIONS = { | ||
@@ -13,0 +13,0 @@ text: { start: 'text-', type: FragmentType.String }, |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = getPlaceFromCurrentSearch; | ||
const get_place_from_id_1 = __importDefault(require("./get-place-from-id")); | ||
@@ -33,3 +34,2 @@ function getPlaceFromCurrentSearch(currentSearch) { | ||
} | ||
exports.default = getPlaceFromCurrentSearch; | ||
//# sourceMappingURL=get-place-from-current-search.js.map |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = getPlaceFromId; | ||
function getPlaceFromId(placeId) { | ||
@@ -22,3 +23,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.default = getPlaceFromId; | ||
//# sourceMappingURL=get-place-from-id.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = getPlaceFromQ; | ||
const get_place_from_id_1 = __importDefault(require("./get-place-from-id")); | ||
@@ -28,3 +29,2 @@ function getPlaceFromQ(q) { | ||
} | ||
exports.default = getPlaceFromQ; | ||
//# sourceMappingURL=get-place-from-q.js.map |
@@ -12,5 +12,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = getPostcodeUrlLabelFromCurrentSearch; | ||
function getPostcodeUrlLabelFromCurrentSearch(currentSearch) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
let postcodeUrlLabel = ''; | ||
@@ -28,3 +29,2 @@ if (currentSearch.postcodeUrlLabel) { | ||
} | ||
exports.default = getPostcodeUrlLabelFromCurrentSearch; | ||
//# sourceMappingURL=get-postcode-url-label-from-current-search.js.map |
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = getPropertyLinks; | ||
const search_history_1 = require("./search-history"); | ||
@@ -79,3 +80,2 @@ function runSearch(params) { | ||
} | ||
exports.default = getPropertyLinks; | ||
//# sourceMappingURL=get-property-links.js.map |
@@ -15,2 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = searchFromParamsWithLocation; | ||
const location_1 = __importDefault(require("../api/models/location")); | ||
@@ -93,3 +94,2 @@ const county_1 = __importDefault(require("../api/models/county")); | ||
} | ||
exports.default = searchFromParamsWithLocation; | ||
//# sourceMappingURL=search-from-params-with-location.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = searchFromParams; | ||
const constants_1 = require("./constants"); | ||
@@ -51,3 +52,2 @@ /** Takes a fragment as an array of strings and returns a search object */ | ||
} | ||
exports.default = searchFromParams; | ||
//# sourceMappingURL=search-from-params.js.map |
@@ -15,3 +15,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSearchParamsFromHistory = exports.getCountyOrLocationFromPlace = exports.addSearchToIndexedDb = exports.lastSearchIsEqual = exports.sanitizeSearch = void 0; | ||
exports.sanitizeSearch = sanitizeSearch; | ||
exports.lastSearchIsEqual = lastSearchIsEqual; | ||
exports.addSearchToIndexedDb = addSearchToIndexedDb; | ||
exports.getCountyOrLocationFromPlace = getCountyOrLocationFromPlace; | ||
exports.getSearchParamsFromHistory = getSearchParamsFromHistory; | ||
const lodash_isequal_1 = __importDefault(require("lodash.isequal")); | ||
@@ -37,3 +41,2 @@ const add_to_store_1 = __importDefault(require("../indexeddb/add-to-store")); | ||
} | ||
exports.sanitizeSearch = sanitizeSearch; | ||
function lastSearchIsEqual(search, searchHistory) { | ||
@@ -47,3 +50,2 @@ const sanitizedSearch = sanitizeSearch(search); | ||
} | ||
exports.lastSearchIsEqual = lastSearchIsEqual; | ||
function addSearchToIndexedDb(search) { | ||
@@ -66,3 +68,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.addSearchToIndexedDb = addSearchToIndexedDb; | ||
function getCountyOrLocationFromPlace(place) { | ||
@@ -76,3 +77,2 @@ if (!place) | ||
} | ||
exports.getCountyOrLocationFromPlace = getCountyOrLocationFromPlace; | ||
function getSearchParamsFromHistory() { | ||
@@ -101,3 +101,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
exports.getSearchParamsFromHistory = getSearchParamsFromHistory; | ||
/* Deprecated but keeping in case of future use */ | ||
@@ -104,0 +103,0 @@ // export const addSearchToLocalStorage = (search: Search) => { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { StaticImageData } from 'next/image'; | ||
@@ -3,0 +2,0 @@ import { MixedSection, Section, SectionElement } from '../state'; |
@@ -21,3 +21,3 @@ "use strict"; | ||
ConfigSettingType["Number"] = "number"; | ||
})(ConfigSettingType = exports.ConfigSettingType || (exports.ConfigSettingType = {})); | ||
})(ConfigSettingType || (exports.ConfigSettingType = ConfigSettingType = {})); | ||
//# sourceMappingURL=sections.types.js.map |
@@ -31,3 +31,3 @@ import type { AgencyMenu, AgencyPreferencesCamel } from '../../api/models/agency'; | ||
}) => import("../../utils/util.types").CamelCaseKeys<import("../../api/models/agency.types").AgencyPreferences>; | ||
declare const _default: import("redux").Reducer<InitialState, import("redux").AnyAction>; | ||
declare const _default: import("redux").Reducer<InitialState>; | ||
export default _default; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
import { ConfigState } from './config.types'; | ||
@@ -138,4 +137,4 @@ import { MixedSection, PageConfig, Section } from './page-config.types'; | ||
}) => { | ||
title?: string | undefined; | ||
description?: string | undefined; | ||
title?: string; | ||
description?: string; | ||
}; | ||
@@ -154,3 +153,3 @@ export declare const selectTheme: (state: { | ||
}) => { | ||
[key: string]: import("../../sections").SectionSchema<MixedSection, (props: import("../../sections").SectionWrapperProps<MixedSection>) => JSX.Element>; | ||
[key: string]: import("../../sections").SectionSchema; | ||
}; | ||
@@ -160,3 +159,3 @@ export declare const selectFooterSections: (state: { | ||
}) => import("./global-config.types").FooterSection[]; | ||
declare const _default: import("redux").Reducer<ConfigState, import("redux").AnyAction>; | ||
declare const _default: import("redux").Reducer<ConfigState>; | ||
export default _default; |
@@ -12,3 +12,3 @@ "use strict"; | ||
FooterElementType["Image"] = "image"; | ||
})(FooterElementType = exports.FooterElementType || (exports.FooterElementType = {})); | ||
})(FooterElementType || (exports.FooterElementType = FooterElementType = {})); | ||
var FooterItemType; | ||
@@ -22,3 +22,3 @@ (function (FooterItemType) { | ||
FooterItemType["Text"] = "text"; | ||
})(FooterItemType = exports.FooterItemType || (exports.FooterItemType = {})); | ||
})(FooterItemType || (exports.FooterItemType = FooterItemType = {})); | ||
var SocialType; | ||
@@ -31,3 +31,3 @@ (function (SocialType) { | ||
SocialType["LinkedIn"] = "linkedIn"; | ||
})(SocialType = exports.SocialType || (exports.SocialType = {})); | ||
})(SocialType || (exports.SocialType = SocialType = {})); | ||
var Justify; | ||
@@ -40,3 +40,3 @@ (function (Justify) { | ||
Justify["SpaceAround"] = "around"; | ||
})(Justify = exports.Justify || (exports.Justify = {})); | ||
})(Justify || (exports.Justify = Justify = {})); | ||
var TypographyCase; | ||
@@ -47,3 +47,3 @@ (function (TypographyCase) { | ||
TypographyCase["Lower"] = "lower"; | ||
})(TypographyCase = exports.TypographyCase || (exports.TypographyCase = {})); | ||
})(TypographyCase || (exports.TypographyCase = TypographyCase = {})); | ||
var Overlap; | ||
@@ -54,3 +54,3 @@ (function (Overlap) { | ||
Overlap["Large"] = "large"; | ||
})(Overlap = exports.Overlap || (exports.Overlap = {})); | ||
})(Overlap || (exports.Overlap = Overlap = {})); | ||
var ChannelOption; | ||
@@ -63,3 +63,3 @@ (function (ChannelOption) { | ||
ChannelOption["Hidden"] = "hidden"; | ||
})(ChannelOption = exports.ChannelOption || (exports.ChannelOption = {})); | ||
})(ChannelOption || (exports.ChannelOption = ChannelOption = {})); | ||
var FontSource; | ||
@@ -69,3 +69,3 @@ (function (FontSource) { | ||
FontSource["Link"] = "link"; | ||
})(FontSource = exports.FontSource || (exports.FontSource = {})); | ||
})(FontSource || (exports.FontSource = FontSource = {})); | ||
//# sourceMappingURL=global-config.types.js.map |
@@ -10,3 +10,3 @@ "use strict"; | ||
ContainerWidth["Small"] = "small"; | ||
})(ContainerWidth = exports.ContainerWidth || (exports.ContainerWidth = {})); | ||
})(ContainerWidth || (exports.ContainerWidth = ContainerWidth = {})); | ||
/** | ||
@@ -24,3 +24,3 @@ * enum representing the core page types/routes. If you add or update this list you must | ||
PageName["Custom"] = "custom"; | ||
})(PageName = exports.PageName || (exports.PageName = {})); | ||
})(PageName || (exports.PageName = PageName = {})); | ||
/** Reverse mapping for the PageName enum. Required for getting enum value from string. */ | ||
@@ -41,3 +41,3 @@ exports.pageNameReverseMapping = { | ||
ElementType["SearchForm"] = "searchForm"; | ||
})(ElementType = exports.ElementType || (exports.ElementType = {})); | ||
})(ElementType || (exports.ElementType = ElementType = {})); | ||
var ButtonStyle; | ||
@@ -51,3 +51,3 @@ (function (ButtonStyle) { | ||
ButtonStyle["WhiteBorder"] = "whiteBorder"; | ||
})(ButtonStyle = exports.ButtonStyle || (exports.ButtonStyle = {})); | ||
})(ButtonStyle || (exports.ButtonStyle = ButtonStyle = {})); | ||
//# sourceMappingURL=page-config.types.js.map |
@@ -14,6 +14,6 @@ import Property from '../../api/models/property'; | ||
propertyId: number; | ||
local?: boolean | undefined; | ||
local?: boolean; | ||
}, { | ||
state?: unknown; | ||
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; | ||
dispatch?: import("redux").Dispatch; | ||
extra?: unknown; | ||
@@ -28,6 +28,6 @@ rejectValue?: unknown; | ||
propertyId: number; | ||
local?: boolean | undefined; | ||
local?: boolean; | ||
}, { | ||
state?: unknown; | ||
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; | ||
dispatch?: import("redux").Dispatch; | ||
extra?: unknown; | ||
@@ -61,6 +61,6 @@ rejectValue?: unknown; | ||
}) => { | ||
totalCount?: number | undefined; | ||
currentPage?: number | undefined; | ||
pageSize?: number | undefined; | ||
hasNextPage?: boolean | undefined; | ||
totalCount?: number; | ||
currentPage?: number; | ||
pageSize?: number; | ||
hasNextPage?: boolean; | ||
}; | ||
@@ -70,3 +70,3 @@ export declare const selectSavedProperties: (state: { | ||
}) => number[]; | ||
declare const _default: import("redux").Reducer<PropertiesState, import("redux").AnyAction>; | ||
declare const _default: import("redux").Reducer<PropertiesState>; | ||
export default _default; |
@@ -26,3 +26,3 @@ "use strict"; | ||
}; | ||
exports.addSavedProperty = (0, toolkit_1.createAsyncThunk)('properties/addSavedProperty', ({ propertyId, local = true }) => __awaiter(void 0, void 0, void 0, function* () { | ||
exports.addSavedProperty = (0, toolkit_1.createAsyncThunk)('properties/addSavedProperty', (_a) => __awaiter(void 0, [_a], void 0, function* ({ propertyId, local = true }) { | ||
if (local) { | ||
@@ -33,3 +33,3 @@ yield (0, add_to_store_1.default)('saved_properties', propertyId, propertyId); | ||
})); | ||
exports.removeSavedProperty = (0, toolkit_1.createAsyncThunk)('properties/removeSavedProperty', ({ propertyId, local = true }) => __awaiter(void 0, void 0, void 0, function* () { | ||
exports.removeSavedProperty = (0, toolkit_1.createAsyncThunk)('properties/removeSavedProperty', (_a) => __awaiter(void 0, [_a], void 0, function* ({ propertyId, local = true }) { | ||
if (local && propertyId) { | ||
@@ -36,0 +36,0 @@ yield (0, remove_from_store_1.default)('saved_properties', propertyId); |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.searchesAreSame = void 0; | ||
exports.searchesAreSame = searchesAreSame; | ||
exports.default = findSavedSearchIndex; | ||
const camelcase_keys_1 = __importDefault(require("camelcase-keys")); | ||
@@ -38,7 +39,5 @@ const utils_1 = require("../../utils"); | ||
} | ||
exports.searchesAreSame = searchesAreSame; | ||
function findSavedSearchIndex(savedSearches, search) { | ||
return savedSearches.findIndex((savedSearch) => searchesAreSame(Object.assign({}, savedSearch), search)); | ||
} | ||
exports.default = findSavedSearchIndex; | ||
//# sourceMappingURL=find-saved-search-index.js.map |
@@ -14,26 +14,26 @@ import { Search } from '../../search'; | ||
key: string; | ||
alert_frequency?: string | undefined; | ||
alert_frequency?: string; | ||
channel: string; | ||
county_id?: number | null | undefined; | ||
id?: number | undefined; | ||
is_implied?: boolean | undefined; | ||
location_id?: number | null | undefined; | ||
max_bedrooms?: number | null | undefined; | ||
min_bedrooms?: number | null | undefined; | ||
max_price?: number | null | undefined; | ||
min_price?: number | null | undefined; | ||
min_square_feet?: number | null | undefined; | ||
name?: string | undefined; | ||
county_id?: number | null; | ||
id?: number; | ||
is_implied?: boolean; | ||
location_id?: number | null; | ||
max_bedrooms?: number | null; | ||
min_bedrooms?: number | null; | ||
max_price?: number | null; | ||
min_price?: number | null; | ||
min_square_feet?: number | null; | ||
name?: string; | ||
place?: any; | ||
query?: string | null | undefined; | ||
saved?: boolean | undefined; | ||
status?: string | null | undefined; | ||
tags?: string[] | undefined; | ||
place_id?: string | null | undefined; | ||
query?: string | null; | ||
saved?: boolean; | ||
status?: string | null; | ||
tags?: string[]; | ||
place_id?: string | null; | ||
}, { | ||
search: SavedSearch; | ||
local?: boolean | undefined; | ||
local?: boolean; | ||
}, { | ||
state?: unknown; | ||
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; | ||
dispatch?: import("redux").Dispatch; | ||
extra?: unknown; | ||
@@ -48,6 +48,6 @@ rejectValue?: unknown; | ||
search: SavedSearch; | ||
local?: boolean | undefined; | ||
local?: boolean; | ||
}, { | ||
state?: unknown; | ||
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined; | ||
dispatch?: import("redux").Dispatch; | ||
extra?: unknown; | ||
@@ -89,3 +89,3 @@ rejectValue?: unknown; | ||
}) => SavedSearch[]; | ||
declare const _default: import("redux").Reducer<SearchState, import("redux").AnyAction>; | ||
declare const _default: import("redux").Reducer<SearchState>; | ||
export default _default; |
@@ -40,3 +40,3 @@ "use strict"; | ||
}; | ||
exports.addSavedSearch = (0, toolkit_1.createAsyncThunk)('search/addSavedSearch', ({ search, local = true }) => __awaiter(void 0, void 0, void 0, function* () { | ||
exports.addSavedSearch = (0, toolkit_1.createAsyncThunk)('search/addSavedSearch', (_a) => __awaiter(void 0, [_a], void 0, function* ({ search, local = true }) { | ||
const key = (0, uuid_1.v4)(); | ||
@@ -48,3 +48,3 @@ if (local) { | ||
})); | ||
exports.removeSavedSearch = (0, toolkit_1.createAsyncThunk)('search/removeSavedSearch', ({ search, local = true }) => __awaiter(void 0, void 0, void 0, function* () { | ||
exports.removeSavedSearch = (0, toolkit_1.createAsyncThunk)('search/removeSavedSearch', (_a) => __awaiter(void 0, [_a], void 0, function* ({ search, local = true }) { | ||
if (search.key && local) | ||
@@ -51,0 +51,0 @@ yield (0, remove_from_store_1.default)('saved_searches', search.key); |
@@ -36,3 +36,3 @@ import { User } from 'src/models'; | ||
}) => User | null; | ||
declare const _default: import("redux").Reducer<UserState, import("redux").AnyAction>; | ||
declare const _default: import("redux").Reducer<UserState>; | ||
export default _default; |
@@ -6,11 +6,10 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.convertKmToMiles = exports.convertMilesToKm = void 0; | ||
exports.convertMilesToKm = convertMilesToKm; | ||
exports.convertKmToMiles = convertKmToMiles; | ||
function convertMilesToKm(distanceInMiles) { | ||
return distanceInMiles * 1.609; | ||
} | ||
exports.convertMilesToKm = convertMilesToKm; | ||
function convertKmToMiles(distanceInKm) { | ||
return distanceInKm / 1.609; | ||
} | ||
exports.convertKmToMiles = convertKmToMiles; | ||
//# sourceMappingURL=convert-distance.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = formatDate; | ||
/** | ||
@@ -14,3 +15,2 @@ * @description Formats the date | ||
} | ||
exports.default = formatDate; | ||
//# sourceMappingURL=format-date.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = formatErrors; | ||
/** | ||
@@ -57,3 +58,2 @@ * Takes errors in the format they are returned by ActiveRecord validation from | ||
} | ||
exports.default = formatErrors; | ||
//# sourceMappingURL=format-errors.js.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = snakifyKeys; | ||
const snakify_1 = __importDefault(require("./snakify")); | ||
@@ -15,3 +16,2 @@ function snakifyKeys(original) { | ||
} | ||
exports.default = snakifyKeys; | ||
//# sourceMappingURL=snakify-keys.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = snakify; | ||
function snakify(key) { | ||
return key.replace(/([A-Z])/g, '_$1').toLowerCase(); | ||
} | ||
exports.default = snakify; | ||
//# sourceMappingURL=snakify.js.map |
@@ -5,8 +5,8 @@ import { PropsWithChildren } from 'react'; | ||
properties: { | ||
results: import("../models").Property[]; | ||
results: InstanceType<typeof import("../models").Property>[]; | ||
pagination: { | ||
totalCount?: number | undefined; | ||
currentPage?: number | undefined; | ||
pageSize?: number | undefined; | ||
hasNextPage?: boolean | undefined; | ||
totalCount?: number; | ||
currentPage?: number; | ||
pageSize?: number; | ||
hasNextPage?: boolean; | ||
}; | ||
@@ -16,7 +16,7 @@ savedProperties: number[]; | ||
company: { | ||
agency: (import("../models").Agency & { | ||
agency: (InstanceType<typeof import("../models").Agency> & { | ||
primaryMenu: import("../models").AgencyMenu; | ||
footerMenu: import("../models").AgencyMenu; | ||
}) | null; | ||
themePreferences: import("./util.types").CamelCaseKeys<import("../models").AgencyPreferences>; | ||
themePreferences: import("../models").AgencyPreferencesCamel; | ||
}; | ||
@@ -27,8 +27,8 @@ config: import("../state").ConfigState; | ||
properties: { | ||
results: import("../models").Property[]; | ||
results: InstanceType<typeof import("../models").Property>[]; | ||
pagination: { | ||
totalCount?: number | undefined; | ||
currentPage?: number | undefined; | ||
pageSize?: number | undefined; | ||
hasNextPage?: boolean | undefined; | ||
totalCount?: number; | ||
currentPage?: number; | ||
pageSize?: number; | ||
hasNextPage?: boolean; | ||
}; | ||
@@ -38,10 +38,10 @@ savedProperties: number[]; | ||
company: { | ||
agency: (import("../models").Agency & { | ||
agency: (InstanceType<typeof import("../models").Agency> & { | ||
primaryMenu: import("../models").AgencyMenu; | ||
footerMenu: import("../models").AgencyMenu; | ||
}) | null; | ||
themePreferences: import("./util.types").CamelCaseKeys<import("../models").AgencyPreferences>; | ||
themePreferences: import("../models").AgencyPreferencesCamel; | ||
}; | ||
config: import("../state").ConfigState; | ||
}, import("redux").AnyAction, undefined>]>; | ||
}, import("redux").AnyAction>]>; | ||
export declare function TestProviders({ children }: PropsWithChildren<{}>): JSX.Element; |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TestProviders = exports.store = void 0; | ||
exports.store = void 0; | ||
exports.TestProviders = TestProviders; | ||
const react_1 = __importDefault(require("react")); | ||
@@ -23,3 +24,2 @@ const toolkit_1 = require("@reduxjs/toolkit"); | ||
} | ||
exports.TestProviders = TestProviders; | ||
//# sourceMappingURL=test-utils.js.map |
{ | ||
"name": "@homeflow/next", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"main": "./dist/main.js", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9504767
16052