Socket
Socket
Sign inDemoInstall

@attraqt/search

Package Overview
Dependencies
317
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.7.1 to 1.8.1

23

dist/buildTargets/browser.js

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,5 +18,21 @@ function __() { this.constructor = d; }

})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.init = exports.search = exports.Search = void 0;
var http_client_browser_1 = require("@attraqt/http-client-browser");
var search_1 = require("../search");
__exportStar(require("../models"), exports);
var SearchBrowser = /** @class */ (function (_super) {

@@ -34,5 +52,6 @@ __extends(SearchBrowser, _super);

exports.search = new SearchBrowser();
exports.init = function (options) {
var init = function (options) {
exports.search.init(options.search);
};
exports.init = init;
//# sourceMappingURL=browser.js.map

20

dist/buildTargets/index.js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("../search"));
__exportStar(require("../models"), exports);
__exportStar(require("../search"), exports);
//# sourceMappingURL=index.js.map

@@ -6,6 +6,8 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -16,5 +18,21 @@ function __() { this.constructor = d; }

})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.init = exports.search = exports.Search = void 0;
var http_client_node_1 = require("@attraqt/http-client-node");
var search_1 = require("../search");
__exportStar(require("../models"), exports);
var SearchNode = /** @class */ (function (_super) {

@@ -34,5 +52,6 @@ __extends(SearchNode, _super);

exports.search = new SearchNode();
exports.init = function (options) {
var init = function (options) {
exports.search.init(options.search);
};
exports.init = init;
//# sourceMappingURL=node.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./autocomplete"), exports);
__exportStar(require("./search"), exports);
__exportStar(require("./suggest"), exports);
//# sourceMappingURL=index.js.map

@@ -13,4 +13,3 @@ {

"variables": {
"additionalProperties": {
},
"additionalProperties": {},
"description": "List of XO context variables attached to the request. The variables will be resolved according\nto your configuration in the XO Console.",

@@ -17,0 +16,0 @@ "type": "object"

@@ -18,2 +18,26 @@ {

},
"FacetRequestOptions": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Selected facet to filter by\nTODO: Should be removed after migration to ids",
"type": "string"
},
"id": {
"description": "Selected facet to filter by",
"type": "string"
},
"values": {
"description": "Values of the facet used for filtering the results",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"values"
],
"type": "object"
},
"SortOptions": {

@@ -56,24 +80,3 @@ "additionalProperties": false,

"items": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Selected facet to filter by\nTODO: Should be removed after migration to ids",
"type": "string"
},
"id": {
"description": "Selected facet to filter by",
"type": "string"
},
"values": {
"description": "Values of the facet used for filtering the results",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"values"
],
"type": "object"
"$ref": "#/definitions/FacetRequestOptions"
},

@@ -80,0 +83,0 @@ "type": "array"

import { FacetRequestOptions as FacetRequestOptionsCommons, SearchItemOptions as SearchItemOptionsCommons, SearchRequest as SearchRequestCommons, SearchContext as SearchContextCommons, SearchGroupOptions as SearchGroupOptionsCommons } from '@attraqt/search-commons';
declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export declare type SearchContext = Partial<SearchContextCommons>;
export declare type FacetRequestOptions = PartialBy<PartialBy<FacetRequestOptionsCommons, 'attribute'>, 'id'>;
export declare type SearchItemOptions = Omit<Partial<SearchItemOptionsCommons>, 'facets'> & {
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export type SearchContext = Partial<SearchContextCommons>;
export type FacetRequestOptions = PartialBy<PartialBy<FacetRequestOptionsCommons, 'attribute'>, 'id'>;
export type SearchItemOptions = Omit<Partial<SearchItemOptionsCommons>, 'facets'> & {
facets?: FacetRequestOptions[];
};
export declare type SearchGroupOptions = Partial<SearchGroupOptionsCommons>;
export type SearchGroupOptions = Partial<SearchGroupOptionsCommons>;
/** @deprecated Use `SearchItemOptions` instead */
export declare type SearchOptions = SearchItemOptions;
export declare type SearchRequest = Omit<SearchRequestCommons, 'options'> & {
export type SearchOptions = SearchItemOptions;
export type SearchRequest = Omit<SearchRequestCommons, 'options'> & {
options?: SearchItemOptions;
};
export { DisableOptions, GroupByOptions, SortOptions, SearchResponseGroup, SearchResponseProduct, SearchResponseRedirectItem, SearchResponseItem, SearchResponseMetadata_Facet_Value, SearchResponseMetadata_Facet, SearchResponseMetadata, SearchResponse } from '@attraqt/search-commons';
import { SearchResponseMetadata as SearchResponseMetadataCommons, SearchResponseGroup, SearchContext, GroupByOptions } from '@attraqt/search-commons';
import { SearchGroupOptions } from './search';
/** @deprecated Use `SearchGroupOptions` instead */
export declare type ProductSuggestOptions = SearchGroupOptions;
export type ProductSuggestOptions = SearchGroupOptions;
/** @deprecated Use `SearchResponseMetadata` instead */
export declare type ProductSuggestMetadata = Omit<SearchResponseMetadataCommons, 'facets'>;
export type ProductSuggestMetadata = Omit<SearchResponseMetadataCommons, 'facets'>;
/** @deprecated Use `GroupByOptions` instead */
export declare type GroupOptions = GroupByOptions;
export type GroupOptions = GroupByOptions;
/** @deprecated Use `SearchResponseGroup` instead */
export declare type ProductSuggestResponse_Group = SearchResponseGroup;
export type ProductSuggestResponse_Group = SearchResponseGroup;
/** @deprecated Use `SearchRequest` instead */

@@ -12,0 +12,0 @@ export interface ProductSuggestRequest {

"use strict";
module.exports = validate20;
module.exports.default = validate20;
var schema22 = { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "DisableOptions": { "additionalProperties": false, "properties": { "name": { "description": "Feature to disable in the query\nExample: \"facet\", \"item\", \"group\", \"redirect\"", "type": "string" } }, "required": ["name"], "type": "object" }, "SortOptions": { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" } }, "properties": { "aiSearch": { "description": "Toggle AI Search \"on\" or \"off\".\nIf true, AI Search is used\nIf false, regular fulltext search is used\nIf not specified, the type of search will be determined by the configuration", "type": "boolean" }, "customResponseMask": { "description": "Response mask to return only specific attributes of items", "type": "string" }, "disable": { "description": "DEPRECATED: top-level `disable` feature should be used instead", "items": { "$ref": "#/definitions/DisableOptions" }, "type": "array" }, "facets": { "items": { "additionalProperties": false, "properties": { "attribute": { "description": "Selected facet to filter by\nTODO: Should be removed after migration to ids", "type": "string" }, "id": { "description": "Selected facet to filter by", "type": "string" }, "values": { "description": "Values of the facet used for filtering the results", "items": { "type": "string" }, "type": "array" } }, "required": ["values"], "type": "object" }, "type": "array" }, "filter": { "description": "Filter string", "type": "string" }, "limit": { "description": "Pagination: size of the page", "type": "number" }, "offset": { "description": "Pagination: index of the first item to return", "type": "number" }, "sortBy": { "description": "List of sorting rules\n(applied in order)", "items": { "$ref": "#/definitions/SortOptions" }, "type": "array" } }, "type": "object" };
var schema22 = { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "definitions": { "DisableOptions": { "additionalProperties": false, "properties": { "name": { "description": "Feature to disable in the query\nExample: \"facet\", \"item\", \"group\", \"redirect\"", "type": "string" } }, "required": ["name"], "type": "object" }, "FacetRequestOptions": { "additionalProperties": false, "properties": { "attribute": { "description": "Selected facet to filter by\nTODO: Should be removed after migration to ids", "type": "string" }, "id": { "description": "Selected facet to filter by", "type": "string" }, "values": { "description": "Values of the facet used for filtering the results", "items": { "type": "string" }, "type": "array" } }, "required": ["values"], "type": "object" }, "SortOptions": { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" } }, "properties": { "aiSearch": { "description": "Toggle AI Search \"on\" or \"off\".\nIf true, AI Search is used\nIf false, regular fulltext search is used\nIf not specified, the type of search will be determined by the configuration", "type": "boolean" }, "customResponseMask": { "description": "Response mask to return only specific attributes of items", "type": "string" }, "disable": { "description": "DEPRECATED: top-level `disable` feature should be used instead", "items": { "$ref": "#/definitions/DisableOptions" }, "type": "array" }, "facets": { "items": { "$ref": "#/definitions/FacetRequestOptions" }, "type": "array" }, "filter": { "description": "Filter string", "type": "string" }, "limit": { "description": "Pagination: size of the page", "type": "number" }, "offset": { "description": "Pagination: index of the first item to return", "type": "number" }, "sortBy": { "description": "List of sorting rules\n(applied in order)", "items": { "$ref": "#/definitions/SortOptions" }, "type": "array" } }, "type": "object" };
var schema23 = { "additionalProperties": false, "properties": { "name": { "description": "Feature to disable in the query\nExample: \"facet\", \"item\", \"group\", \"redirect\"", "type": "string" } }, "required": ["name"], "type": "object" };
var schema24 = { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" };
var schema24 = { "additionalProperties": false, "properties": { "attribute": { "description": "Selected facet to filter by\nTODO: Should be removed after migration to ids", "type": "string" }, "id": { "description": "Selected facet to filter by", "type": "string" }, "values": { "description": "Values of the facet used for filtering the results", "items": { "type": "string" }, "type": "array" } }, "required": ["values"], "type": "object" };
var schema25 = { "additionalProperties": false, "properties": { "attribute": { "description": "Attribute to sort by", "type": "string" }, "order": { "description": "Order of the sort.\nMust be either \"asc\" or \"desc\"", "type": "string" } }, "required": ["attribute", "order"], "type": "object" };
function validate20(data, valCxt) {

@@ -137,3 +138,3 @@ "use strict";

if (data6.values === undefined) {
var err8 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/required", keyword: "required", params: { missingProperty: "values" }, message: "must have required property '" + "values" + "'", schema: schema22.properties.facets.items.required, parentSchema: schema22.properties.facets.items, data: data6 };
var err8 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/definitions/FacetRequestOptions/required", keyword: "required", params: { missingProperty: "values" }, message: "must have required property '" + "values" + "'", schema: schema24.required, parentSchema: schema24, data: data6 };
if (vErrors === null) {

@@ -149,3 +150,3 @@ vErrors = [err8];

if (!(((key2 === "attribute") || (key2 === "id")) || (key2 === "values"))) {
var err9 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties", schema: false, parentSchema: schema22.properties.facets.items, data: data6 };
var err9 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/definitions/FacetRequestOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key2 }, message: "must NOT have additional properties", schema: false, parentSchema: schema24, data: data6 };
if (vErrors === null) {

@@ -163,3 +164,3 @@ vErrors = [err9];

if (typeof data7 !== "string") {
var err10 = { instancePath: instancePath + "/facets/" + i1 + "/attribute", schemaPath: "#/properties/facets/items/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.attribute.type, parentSchema: schema22.properties.facets.items.properties.attribute, data: data7 };
var err10 = { instancePath: instancePath + "/facets/" + i1 + "/attribute", schemaPath: "#/definitions/FacetRequestOptions/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.attribute.type, parentSchema: schema24.properties.attribute, data: data7 };
if (vErrors === null) {

@@ -177,3 +178,3 @@ vErrors = [err10];

if (typeof data8 !== "string") {
var err11 = { instancePath: instancePath + "/facets/" + i1 + "/id", schemaPath: "#/properties/facets/items/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.id.type, parentSchema: schema22.properties.facets.items.properties.id, data: data8 };
var err11 = { instancePath: instancePath + "/facets/" + i1 + "/id", schemaPath: "#/definitions/FacetRequestOptions/properties/id/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.id.type, parentSchema: schema24.properties.id, data: data8 };
if (vErrors === null) {

@@ -195,3 +196,3 @@ vErrors = [err11];

if (typeof data10 !== "string") {
var err12 = { instancePath: instancePath + "/facets/" + i1 + "/values/" + i2, schemaPath: "#/properties/facets/items/properties/values/items/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema22.properties.facets.items.properties.values.items.type, parentSchema: schema22.properties.facets.items.properties.values.items, data: data10 };
var err12 = { instancePath: instancePath + "/facets/" + i1 + "/values/" + i2, schemaPath: "#/definitions/FacetRequestOptions/properties/values/items/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.values.items.type, parentSchema: schema24.properties.values.items, data: data10 };
if (vErrors === null) {

@@ -208,3 +209,3 @@ vErrors = [err12];

else {
var err13 = { instancePath: instancePath + "/facets/" + i1 + "/values", schemaPath: "#/properties/facets/items/properties/values/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema22.properties.facets.items.properties.values.type, parentSchema: schema22.properties.facets.items.properties.values, data: data9 };
var err13 = { instancePath: instancePath + "/facets/" + i1 + "/values", schemaPath: "#/definitions/FacetRequestOptions/properties/values/type", keyword: "type", params: { type: "array" }, message: "must be array", schema: schema24.properties.values.type, parentSchema: schema24.properties.values, data: data9 };
if (vErrors === null) {

@@ -221,3 +222,3 @@ vErrors = [err13];

else {
var err14 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/properties/facets/items/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema22.properties.facets.items.type, parentSchema: schema22.properties.facets.items, data: data6 };
var err14 = { instancePath: instancePath + "/facets/" + i1, schemaPath: "#/definitions/FacetRequestOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema24.type, parentSchema: schema24, data: data6 };
if (vErrors === null) {

@@ -291,3 +292,3 @@ vErrors = [err14];

if (data15.attribute === undefined) {
var err19 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "attribute" }, message: "must have required property '" + "attribute" + "'", schema: schema24.required, parentSchema: schema24, data: data15 };
var err19 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "attribute" }, message: "must have required property '" + "attribute" + "'", schema: schema25.required, parentSchema: schema25, data: data15 };
if (vErrors === null) {

@@ -302,3 +303,3 @@ vErrors = [err19];

if (data15.order === undefined) {
var err20 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "order" }, message: "must have required property '" + "order" + "'", schema: schema24.required, parentSchema: schema24, data: data15 };
var err20 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/required", keyword: "required", params: { missingProperty: "order" }, message: "must have required property '" + "order" + "'", schema: schema25.required, parentSchema: schema25, data: data15 };
if (vErrors === null) {

@@ -314,3 +315,3 @@ vErrors = [err20];

if (!((key3 === "attribute") || (key3 === "order"))) {
var err21 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties", schema: false, parentSchema: schema24, data: data15 };
var err21 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key3 }, message: "must NOT have additional properties", schema: false, parentSchema: schema25, data: data15 };
if (vErrors === null) {

@@ -328,3 +329,3 @@ vErrors = [err21];

if (typeof data16 !== "string") {
var err22 = { instancePath: instancePath + "/sortBy/" + i3 + "/attribute", schemaPath: "#/definitions/SortOptions/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.attribute.type, parentSchema: schema24.properties.attribute, data: data16 };
var err22 = { instancePath: instancePath + "/sortBy/" + i3 + "/attribute", schemaPath: "#/definitions/SortOptions/properties/attribute/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema25.properties.attribute.type, parentSchema: schema25.properties.attribute, data: data16 };
if (vErrors === null) {

@@ -342,3 +343,3 @@ vErrors = [err22];

if (typeof data17 !== "string") {
var err23 = { instancePath: instancePath + "/sortBy/" + i3 + "/order", schemaPath: "#/definitions/SortOptions/properties/order/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema24.properties.order.type, parentSchema: schema24.properties.order, data: data17 };
var err23 = { instancePath: instancePath + "/sortBy/" + i3 + "/order", schemaPath: "#/definitions/SortOptions/properties/order/type", keyword: "type", params: { type: "string" }, message: "must be string", schema: schema25.properties.order.type, parentSchema: schema25.properties.order, data: data17 };
if (vErrors === null) {

@@ -355,3 +356,3 @@ vErrors = [err23];

else {
var err24 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema24.type, parentSchema: schema24, data: data15 };
var err24 = { instancePath: instancePath + "/sortBy/" + i3, schemaPath: "#/definitions/SortOptions/type", keyword: "type", params: { type: "object" }, message: "must be object", schema: schema25.type, parentSchema: schema25, data: data15 };
if (vErrors === null) {

@@ -358,0 +359,0 @@ vErrors = [err24];

@@ -28,3 +28,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -54,2 +54,3 @@ if (y = 0, t) op = [op[0] & 2, t.value];

Object.defineProperty(exports, "__esModule", { value: true });
exports.Region = exports.Search = void 0;
var http_client_common_1 = require("@attraqt/http-client-common");

@@ -82,6 +83,6 @@ var validateSearchItemOptionsSchema_1 = __importDefault(require("./models/validateSearchItemOptionsSchema"));

this.assertIsInit();
if (options && !validateSearchItemOptionsSchema_1.default(options)) {
if (options && !(0, validateSearchItemOptionsSchema_1.default)(options)) {
throw Error("The provided search options doesn't match the required format.");
}
if (context && !validateSearchContextSchema_1.default(context)) {
if (context && !(0, validateSearchContextSchema_1.default)(context)) {
throw Error("The provided search context doesn't match the required format.");

@@ -97,6 +98,6 @@ }

this.assertIsInit();
if (options && !validateSearchGroupOptionsSchema_1.default(options)) {
if (options && !(0, validateSearchGroupOptionsSchema_1.default)(options)) {
throw Error("The provided group options don't match the required format.");
}
if (context && !validateSearchContextSchema_1.default(context)) {
if (context && !(0, validateSearchContextSchema_1.default)(context)) {
throw Error("The provided search context doesn't match the required format.");

@@ -112,3 +113,3 @@ }

this.assertIsInit();
if (options && !validateAutocompleteOptionsSchema_1.default(options)) {
if (options && !(0, validateAutocompleteOptionsSchema_1.default)(options)) {
throw Error("The provided autocomplete options don't match the required format.");

@@ -126,3 +127,3 @@ }

case 0:
request = __assign({ method: http_client_common_1.Method.Post, headers: { 'Content-Type': 'application/json' }, url: "https://api-" + this.region + ".attraqt.io" + path, body: JSON.stringify({
request = __assign({ method: http_client_common_1.Method.Post, headers: { 'Content-Type': 'application/json' }, url: "https://api-".concat(this.region, ".attraqt.io").concat(path), body: JSON.stringify({
query: query,

@@ -140,3 +141,3 @@ token: this.token,

else {
throw new Error("HTTP Error " + response.status + ": " + response.body);
throw new Error("HTTP Error ".concat(response.status, ": ").concat(response.body));
}

@@ -167,3 +168,3 @@ return [2 /*return*/];

Region["US"] = "us";
})(Region = exports.Region || (exports.Region = {}));
})(Region || (exports.Region = Region = {}));
//# sourceMappingURL=search.js.map
{
"name": "@attraqt/search",
"version": "1.7.1",
"version": "1.8.1",
"license": "MIT",

@@ -36,5 +36,5 @@ "repository": "git://github.com:Attraqt/attraqt-js.git",

"dependencies": {
"@attraqt/http-client-browser": "^1.7.1",
"@attraqt/http-client-browser": "^1.8.1",
"@attraqt/http-client-common": "^1.5.1",
"@attraqt/http-client-node": "^1.7.1",
"@attraqt/http-client-node": "^1.8.1",
"@attraqt/search-commons": "2.0.0"

@@ -46,8 +46,8 @@ },

"ajv-cli": "5.0.0",
"jest": "24.9.0",
"jest": "29.7.0",
"jest-fetch-mock": "3.0.3",
"typescript": "3.8.3",
"typescript-json-schema": "0.42.0"
"typescript": "5.2.2",
"typescript-json-schema": "0.62.0"
},
"gitHead": "3d71b7a08b96c5b253a55849381eeda5fd55bca8"
"gitHead": "27f3a15dd3ef0cc38a7d3d27b8348aea3ac887da"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc