@algolia/client-search 5.0.0-alpha.103 → 5.0.0-alpha.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +86 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +104 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs +50 -47
- package/dist/client-search.esm.browser.js +2 -33
- package/dist/client-search.esm.node.js +51 -48
- package/dist/client-search.umd.js +2 -2
- package/dist/model/apiKeyOperation.d.ts +2 -0
- package/dist/model/apiKeyOperation.d.ts.map +1 -0
- package/dist/model/baseSearchResponse.d.ts +4 -0
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +5 -22
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/index.d.ts +2 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/securedAPIKeyRestrictions.d.ts +25 -0
- package/dist/model/securedAPIKeyRestrictions.d.ts.map +1 -0
- package/dist/src/searchClient.d.ts +2 -23
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/apiKeyOperation.ts +3 -0
- package/model/baseSearchResponse.ts +5 -0
- package/model/clientMethodProps.ts +5 -27
- package/model/index.ts +2 -0
- package/model/securedAPIKeyRestrictions.ts +32 -0
- package/package.json +5 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { SearchParamsObject } from './searchParamsObject';
|
|
4
|
+
|
|
5
|
+
export type SecuredAPIKeyRestrictions = {
|
|
6
|
+
searchParams?: SearchParamsObject;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors).
|
|
10
|
+
*/
|
|
11
|
+
filters?: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Unix timestamp used to set the expiration date of the API key.
|
|
15
|
+
*/
|
|
16
|
+
validUntil?: number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Index names that can be queried.
|
|
20
|
+
*/
|
|
21
|
+
restrictIndices?: string[];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24).
|
|
25
|
+
*/
|
|
26
|
+
restrictSources?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don\'t change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse.
|
|
30
|
+
*/
|
|
31
|
+
userToken?: string;
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.105",
|
|
4
4
|
"description": "JavaScript client for client-search",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"clean": "rm -rf ./dist || true"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
43
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
44
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
42
|
+
"@algolia/client-common": "5.0.0-alpha.106",
|
|
43
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.106",
|
|
44
|
+
"@algolia/requester-node-http": "5.0.0-alpha.106"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "20.11.
|
|
47
|
+
"@types/node": "20.11.24",
|
|
48
48
|
"rollup": "4.12.0",
|
|
49
49
|
"typescript": "5.3.3"
|
|
50
50
|
},
|