@algolia/client-personalization 5.55.2 → 5.56.0

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/worker.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
- import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
2
+ import { CreateClientOptions, RequestOptions, AlgoliaHttpResponse, ClientOptions } from '@algolia/client-common';
3
3
 
4
4
  type DeleteUserProfileResponse = {
5
5
  /**
@@ -164,14 +164,14 @@ type GetUserTokenProfileProps = {
164
164
  userToken: string;
165
165
  };
166
166
 
167
- declare const apiClientVersion = "5.55.2";
167
+ declare const apiClientVersion = "5.56.0";
168
168
  declare const REGIONS: readonly ["eu", "us"];
169
169
  type Region = (typeof REGIONS)[number];
170
170
  type RegionOptions = {
171
171
  region: Region;
172
172
  };
173
173
  declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & RegionOptions): {
174
- transporter: _algolia_client_common.Transporter;
174
+ transporter: _algolia_client_common.TransporterWithHttpInfo;
175
175
  /**
176
176
  * The `appId` currently in use.
177
177
  */
@@ -212,6 +212,17 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
212
212
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
213
213
  */
214
214
  customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
215
+ /**
216
+ * This method lets you send requests to the Algolia REST API.
217
+ *
218
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
219
+ * @param customDelete - The customDelete object.
220
+ * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
221
+ * @param customDelete.parameters - Query parameters to apply to the current query.
222
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
223
+ * @see customDelete for the plain version.
224
+ */
225
+ customDeleteWithHTTPInfo({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
215
226
  /**
216
227
  * This method lets you send requests to the Algolia REST API.
217
228
  * @param customGet - The customGet object.
@@ -220,6 +231,17 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
220
231
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
221
232
  */
222
233
  customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
234
+ /**
235
+ * This method lets you send requests to the Algolia REST API.
236
+ *
237
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
238
+ * @param customGet - The customGet object.
239
+ * @param customGet.path - Path of the endpoint, for example `1/newFeature`.
240
+ * @param customGet.parameters - Query parameters to apply to the current query.
241
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
242
+ * @see customGet for the plain version.
243
+ */
244
+ customGetWithHTTPInfo({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
223
245
  /**
224
246
  * This method lets you send requests to the Algolia REST API.
225
247
  * @param customPost - The customPost object.
@@ -229,6 +251,18 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
229
251
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
230
252
  */
231
253
  customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
254
+ /**
255
+ * This method lets you send requests to the Algolia REST API.
256
+ *
257
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
258
+ * @param customPost - The customPost object.
259
+ * @param customPost.path - Path of the endpoint, for example `1/newFeature`.
260
+ * @param customPost.parameters - Query parameters to apply to the current query.
261
+ * @param customPost.body - Parameters to send with the custom request.
262
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
263
+ * @see customPost for the plain version.
264
+ */
265
+ customPostWithHTTPInfo({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
232
266
  /**
233
267
  * This method lets you send requests to the Algolia REST API.
234
268
  * @param customPut - The customPut object.
@@ -238,6 +272,18 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
238
272
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
239
273
  */
240
274
  customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
275
+ /**
276
+ * This method lets you send requests to the Algolia REST API.
277
+ *
278
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
279
+ * @param customPut - The customPut object.
280
+ * @param customPut.path - Path of the endpoint, for example `1/newFeature`.
281
+ * @param customPut.parameters - Query parameters to apply to the current query.
282
+ * @param customPut.body - Parameters to send with the custom request.
283
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
284
+ * @see customPut for the plain version.
285
+ */
286
+ customPutWithHTTPInfo({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
241
287
  /**
242
288
  * Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
243
289
  *
@@ -248,6 +294,19 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
248
294
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
249
295
  */
250
296
  deleteUserProfile({ userToken }: DeleteUserProfileProps, requestOptions?: RequestOptions): Promise<DeleteUserProfileResponse>;
297
+ /**
298
+ * Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
299
+ *
300
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
301
+ *
302
+ * Required API Key ACLs:
303
+ * - recommendation
304
+ * @param deleteUserProfile - The deleteUserProfile object.
305
+ * @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
306
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
307
+ * @see deleteUserProfile for the plain version.
308
+ */
309
+ deleteUserProfileWithHTTPInfo({ userToken }: DeleteUserProfileProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<DeleteUserProfileResponse>>;
251
310
  /**
252
311
  * Retrieves the current personalization strategy.
253
312
  *
@@ -256,6 +315,17 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
256
315
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
257
316
  */
258
317
  getPersonalizationStrategy(requestOptions?: RequestOptions | undefined): Promise<PersonalizationStrategyParams>;
318
+ /**
319
+ * Retrieves the current personalization strategy.
320
+ *
321
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
322
+ *
323
+ * Required API Key ACLs:
324
+ * - recommendation
325
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
326
+ * @see getPersonalizationStrategy for the plain version.
327
+ */
328
+ getPersonalizationStrategyWithHTTPInfo(requestOptions?: RequestOptions | undefined): Promise<AlgoliaHttpResponse<PersonalizationStrategyParams>>;
259
329
  /**
260
330
  * Retrieves a user profile and their affinities for different facets.
261
331
  *
@@ -266,6 +336,19 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
266
336
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
267
337
  */
268
338
  getUserTokenProfile({ userToken }: GetUserTokenProfileProps, requestOptions?: RequestOptions): Promise<GetUserTokenResponse>;
339
+ /**
340
+ * Retrieves a user profile and their affinities for different facets.
341
+ *
342
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
343
+ *
344
+ * Required API Key ACLs:
345
+ * - recommendation
346
+ * @param getUserTokenProfile - The getUserTokenProfile object.
347
+ * @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
348
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
349
+ * @see getUserTokenProfile for the plain version.
350
+ */
351
+ getUserTokenProfileWithHTTPInfo({ userToken }: GetUserTokenProfileProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<GetUserTokenResponse>>;
269
352
  /**
270
353
  * Creates a new personalization strategy.
271
354
  *
@@ -275,6 +358,18 @@ declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKe
275
358
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
276
359
  */
277
360
  setPersonalizationStrategy(personalizationStrategyParams: PersonalizationStrategyParams, requestOptions?: RequestOptions): Promise<SetPersonalizationStrategyResponse>;
361
+ /**
362
+ * Creates a new personalization strategy.
363
+ *
364
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
365
+ *
366
+ * Required API Key ACLs:
367
+ * - recommendation
368
+ * @param personalizationStrategyParams - The personalizationStrategyParams object.
369
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
370
+ * @see setPersonalizationStrategy for the plain version.
371
+ */
372
+ setPersonalizationStrategyWithHTTPInfo(personalizationStrategyParams: PersonalizationStrategyParams, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<SetPersonalizationStrategyResponse>>;
278
373
  };
279
374
 
280
375
  /**
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.55.2",
2
+ "version": "5.56.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -54,14 +54,14 @@
54
54
  "index.d.ts"
55
55
  ],
56
56
  "dependencies": {
57
- "@algolia/client-common": "5.55.2",
58
- "@algolia/requester-browser-xhr": "5.55.2",
59
- "@algolia/requester-fetch": "5.55.2",
60
- "@algolia/requester-node-http": "5.55.2"
57
+ "@algolia/client-common": "5.56.0",
58
+ "@algolia/requester-browser-xhr": "5.56.0",
59
+ "@algolia/requester-fetch": "5.56.0",
60
+ "@algolia/requester-node-http": "5.56.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@arethetypeswrong/cli": "0.18.4",
64
- "@types/node": "26.0.1",
63
+ "@arethetypeswrong/cli": "0.18.5",
64
+ "@types/node": "26.1.1",
65
65
  "publint": "0.3.21",
66
66
  "rollup": "4.62.2",
67
67
  "tsup": "8.5.1",
@@ -70,5 +70,5 @@
70
70
  "engines": {
71
71
  "node": ">= 14.0.0"
72
72
  },
73
- "gitHead": "ceb55d8881b51af583ed83a183fbfc000aea213a"
73
+ "gitHead": "d6430d45e71470a1099ccb7aaeacc4a858420f56"
74
74
  }