@rtd/use-suggestions
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -25,2 +25,5 @@ "use strict"; | ||
} | ||
if (options.sessionId) { | ||
params.append('sessionId', options.sessionId); | ||
} | ||
const fetchUrl = `${baseUrl}/suggestions?${params.toString()}`; | ||
@@ -27,0 +30,0 @@ const response = await fetch(fetchUrl); |
export { default as useSuggestions } from './useSuggestions'; | ||
export { SessionIdProvider, useSessionId } from './sessionContext'; | ||
export * from './types'; | ||
export * from './constants'; |
@@ -20,6 +20,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useSuggestions = void 0; | ||
exports.useSessionId = exports.SessionIdProvider = exports.useSuggestions = void 0; | ||
var useSuggestions_1 = require("./useSuggestions"); | ||
Object.defineProperty(exports, "useSuggestions", { enumerable: true, get: function () { return __importDefault(useSuggestions_1).default; } }); | ||
var sessionContext_1 = require("./sessionContext"); | ||
Object.defineProperty(exports, "SessionIdProvider", { enumerable: true, get: function () { return sessionContext_1.SessionIdProvider; } }); | ||
Object.defineProperty(exports, "useSessionId", { enumerable: true, get: function () { return sessionContext_1.useSessionId; } }); | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./constants"), exports); |
@@ -15,2 +15,3 @@ /** | ||
debounceTime?: number; | ||
sessionId?: string; | ||
} | ||
@@ -17,0 +18,0 @@ /** |
{ | ||
"name": "@rtd/use-suggestions", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"main": "dist/index.js", | ||
@@ -27,3 +27,4 @@ "types": "dist/index.d.ts", | ||
"react": "^17.0.2", | ||
"swr": "^1.1.2" | ||
"swr": "^1.1.2", | ||
"uuid": "^11.0.3" | ||
}, | ||
@@ -33,3 +34,7 @@ "devDependencies": { | ||
"typescript": "^4.8.2" | ||
}, | ||
"engines": { | ||
"node": ">=18.x", | ||
"npm": ">=9.x" | ||
} | ||
} |
@@ -31,2 +31,6 @@ import { ApiSuggestionExcludes, SuggestionsOptions } from './types' | ||
if (options.sessionId) { | ||
params.append('sessionId', options.sessionId) | ||
} | ||
const fetchUrl = `${baseUrl}/suggestions?${params.toString()}` | ||
@@ -33,0 +37,0 @@ const response = await fetch(fetchUrl) |
export { default as useSuggestions } from './useSuggestions' | ||
export { SessionIdProvider, useSessionId } from './sessionContext' | ||
export * from './types' | ||
export * from './constants' |
@@ -15,2 +15,3 @@ /** | ||
debounceTime?: number | ||
sessionId?: string | ||
} | ||
@@ -17,0 +18,0 @@ |
{ | ||
"compilerOptions": { | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
"target": "ES2017", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
@@ -6,0 +9,0 @@ "outDir": "./dist", |
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
35888
24
944
4
+ Addeduuid@^11.0.3
+ Addeduuid@11.0.3(transitive)