Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sayt

Package Overview
Dependencies
Maintainers
15
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sayt - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

README.md

47

dist/src/core/sayt.d.ts

@@ -5,5 +5,5 @@ export declare class Sayt {

configure(config?: SaytConfig): void;
autocomplete(query?: string, config?: QueryTimeAutocompleteConfig, cb?: SearchCallback): Promise<any>;
productSearch(query?: string, config?: QueryTimeProductSearchConfig, cb?: SearchCallback): Promise<any>;
private callbackOrPromise(promise, cb);
autocomplete(query?: string, config?: QueryTimeAutocompleteConfig, cb?: SearchCallback): Promise<AutocompleteResponse>;
productSearch(query?: string, config?: QueryTimeProductSearchConfig, cb?: SearchCallback): Promise<AutocompleteResponse>;
private callbackOrPromise;
private readonly url;

@@ -31,2 +31,43 @@ }

}
export interface AutocompleteResponse {
status: {
code: number;
internalCode: number;
message: string;
additionalInfo: any;
serverTimeStamp: number;
};
result: {
stats: {
navigationCount: number;
searchCount: number;
productCount: number;
autocompleteResponse: number;
productSearchResponse: number;
};
searchTerms: AutocompleteSearchTerm[] | null;
navigations: AutocompleteNavigation[] | null;
products: AutocompleteProduct[] | null;
};
}
export interface AutocompleteSearchTerm {
additionalInfo: {
[key: string]: any;
};
distanceToDepluralized: number;
distanceToSearch: number;
value: string;
}
export interface AutocompleteNavigation {
name: string;
values: string[];
}
export interface AutocompleteProduct {
id: string;
url: string;
title: string;
allMeta: any;
collection: string;
snippet?: any;
}
export declare type QueryTimeAutocompleteConfig = AutocompleteConfig & {

@@ -33,0 +74,0 @@ collection?: string;

2

dist/src/core/sayt.js

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

var SAYT_URL = '.groupbycloud.com/api/v1/sayt/search';
var Sayt = (function () {
var Sayt = /** @class */ (function () {
function Sayt(config) {

@@ -9,0 +9,0 @@ this.config = {

@@ -7,5 +7,5 @@ "use strict";

return new Promise(function (resolve, reject) {
rawJsonp(url + "?" + qs.stringify(body), function (err, data) { return err ? reject(err) : resolve(data); });
rawJsonp(url + "?" + qs.stringify(body), {}, function (err, data) { return err ? reject(err) : resolve(data); });
});
}
exports.jsonp = jsonp;
{
"name": "sayt",
"version": "0.1.8",
"version": "0.1.9",
"description": "Client for the SAYT API.",

@@ -16,3 +16,3 @@ "typings": "dist/src/index.d.ts",

"test": "NODE_ENV=test karma start",
"test+coverage": "NODE_ENV=test karma start && npm run coverage && npm run coverage:codacy",
"test+coverage": "NODE_ENV=test karma start && npm run coverage",
"posttest": "npm run coverage",

@@ -22,3 +22,2 @@ "coverage": "npm run coverage:remap && npm run coverage:report",

"coverage:report": "istanbul report",
"coverage:codacy": "cat ./coverage/lcov.info | codacy-coverage",
"build": "rimraf dist && tsc",

@@ -44,13 +43,12 @@ "ci": "NODE_ENV=ci karma start --singleRun=false",

"devDependencies": {
"@types/chai": "^3.5.1",
"@types/mocha": "^2.2.41",
"@types/chai": "^4.0",
"@types/mocha": "^5.0",
"@types/qs": "^6.2.31",
"@types/webpack-env": "^1.13.0",
"awesome-typescript-loader": "^3.1.2",
"chai": "^3.2.0",
"codacy-coverage": "^2.0.0",
"awesome-typescript-loader": "^5.2.1",
"chai": "^4.2.0",
"gb-license-check": "^1.0.1",
"husky": "^0.13.3",
"husky": "^3.0.0",
"istanbul": "^0.4.5",
"karma": "^1.6.0",
"karma": "^4.1.0",
"karma-chai": "^0.1.0",

@@ -62,22 +60,21 @@ "karma-coverage": "^1.1.1",

"karma-source-map-support": "^1.2.0",
"karma-webpack": "^2.0.3",
"mocha": "^3.3.0",
"karma-webpack": "^4.0.2",
"mocha": "^6.1.4",
"object-assign": "^4.1.0",
"phantomjs-prebuilt": "^2.1.7",
"pre-commit": "^1.1.3",
"remap-istanbul": "^0.9.5",
"remap-istanbul": "^0.13.0",
"rimraf": "^2.5.4",
"sourcemap-istanbul-instrumenter-loader": "^0.2.0",
"ts-loader": "^2.0.3",
"ts-loader": "^6.0.4",
"tslint": "^5.1.0",
"tslint-eslint-rules": "^4.0.0",
"tslint-eslint-rules": "^5.4.0",
"tslint-loader": "^3.5.3",
"typedoc": "^0.6.0",
"typescript": "^2.2.2",
"typedoc": "^0.14.2",
"typescript": "^3.5.2",
"typings": "^2.1.1",
"webpack": "^2.4.1"
"webpack": "^4.35.2"
},
"dependencies": {
"@types/es6-shim": "^0.31.33",
"@types/node": "^7.0.14",
"@types/node": "^12.6.1",
"es6-object-assign": "^1.0.3",

@@ -89,2 +86,2 @@ "es6-promise": "^4.1.0",

}
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc