@algolia/client-insights 5.0.0-alpha.99 → 5.0.0-beta.2

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.
Files changed (48) hide show
  1. package/dist/builds/browser.d.ts +19 -3
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +19 -3
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-insights.cjs +27 -30
  6. package/dist/client-insights.esm.browser.js +14 -22
  7. package/dist/client-insights.esm.node.js +27 -30
  8. package/dist/client-insights.umd.js +2 -2
  9. package/dist/model/addedToCartObjectIDs.d.ts +6 -6
  10. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts +6 -6
  11. package/dist/model/clickedFilters.d.ts +6 -6
  12. package/dist/model/clickedObjectIDs.d.ts +6 -6
  13. package/dist/model/clickedObjectIDsAfterSearch.d.ts +7 -7
  14. package/dist/model/clientMethodProps.d.ts +1 -1
  15. package/dist/model/convertedFilters.d.ts +6 -6
  16. package/dist/model/convertedObjectIDs.d.ts +6 -6
  17. package/dist/model/convertedObjectIDsAfterSearch.d.ts +6 -6
  18. package/dist/model/discount.d.ts +1 -1
  19. package/dist/model/insightsEvents.d.ts +1 -1
  20. package/dist/model/objectData.d.ts +1 -1
  21. package/dist/model/objectDataAfterSearch.d.ts +1 -1
  22. package/dist/model/price.d.ts +1 -1
  23. package/dist/model/purchasedObjectIDs.d.ts +6 -6
  24. package/dist/model/purchasedObjectIDsAfterSearch.d.ts +7 -7
  25. package/dist/model/purchasedObjectIDsAfterSearch.d.ts.map +1 -1
  26. package/dist/model/viewedFilters.d.ts +6 -6
  27. package/dist/model/viewedObjectIDs.d.ts +6 -6
  28. package/dist/src/insightsClient.d.ts +4 -14
  29. package/dist/src/insightsClient.d.ts.map +1 -1
  30. package/model/addedToCartObjectIDs.ts +6 -6
  31. package/model/addedToCartObjectIDsAfterSearch.ts +6 -6
  32. package/model/clickedFilters.ts +6 -6
  33. package/model/clickedObjectIDs.ts +6 -6
  34. package/model/clickedObjectIDsAfterSearch.ts +7 -7
  35. package/model/clientMethodProps.ts +1 -1
  36. package/model/convertedFilters.ts +6 -6
  37. package/model/convertedObjectIDs.ts +6 -6
  38. package/model/convertedObjectIDsAfterSearch.ts +6 -6
  39. package/model/discount.ts +1 -1
  40. package/model/insightsEvents.ts +1 -1
  41. package/model/objectData.ts +1 -1
  42. package/model/objectDataAfterSearch.ts +1 -1
  43. package/model/price.ts +1 -1
  44. package/model/purchasedObjectIDs.ts +6 -6
  45. package/model/purchasedObjectIDsAfterSearch.ts +7 -7
  46. package/model/viewedFilters.ts +6 -6
  47. package/model/viewedObjectIDs.ts +6 -6
  48. package/package.json +7 -7
@@ -7,13 +7,13 @@ import type { Value } from './value';
7
7
  */
8
8
  export type AddedToCartObjectIDsAfterSearch = {
9
9
  /**
10
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
10
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
11
11
  */
12
12
  eventName: string;
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: AddToCartEvent;
15
15
  /**
16
- * The name of an Algolia index.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
@@ -21,15 +21,15 @@ export type AddedToCartObjectIDsAfterSearch = {
21
21
  */
22
22
  queryID: string;
23
23
  /**
24
- * The object IDs of the records that are part of the event.
24
+ * Object IDs of the records that are part of the event.
25
25
  */
26
26
  objectIDs: string[];
27
27
  /**
28
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
29
  */
30
30
  userToken: string;
31
31
  /**
32
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
32
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
33
33
  */
34
34
  authenticatedUserToken?: string;
35
35
  /**
@@ -41,7 +41,7 @@ export type AddedToCartObjectIDsAfterSearch = {
41
41
  */
42
42
  objectData?: ObjectDataAfterSearch[];
43
43
  /**
44
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
44
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
45
45
  */
46
46
  timestamp?: number;
47
47
  value?: Value;
@@ -4,28 +4,28 @@ import type { ClickEvent } from './clickEvent';
4
4
  */
5
5
  export type ClickedFilters = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ClickEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
16
+ * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
17
17
  */
18
18
  filters: string[];
19
19
  /**
20
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -4,28 +4,28 @@ import type { ClickEvent } from './clickEvent';
4
4
  */
5
5
  export type ClickedObjectIDs = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ClickEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * The object IDs of the records that are part of the event.
16
+ * Object IDs of the records that are part of the event.
17
17
  */
18
18
  objectIDs: string[];
19
19
  /**
20
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -4,20 +4,20 @@ import type { ClickEvent } from './clickEvent';
4
4
  */
5
5
  export type ClickedObjectIDsAfterSearch = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ClickEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * The object IDs of the records that are part of the event.
16
+ * Object IDs of the records that are part of the event.
17
17
  */
18
18
  objectIDs: string[];
19
19
  /**
20
- * The position of the clicked item the search results. The first search result has a position of 1 (not 0). You must provide 1 `position` for each `objectID`.
20
+ * Position of the clicked item the search results. You must provide 1 `position` for each `objectID`.
21
21
  */
22
22
  positions: number[];
23
23
  /**
@@ -25,15 +25,15 @@ export type ClickedObjectIDsAfterSearch = {
25
25
  */
26
26
  queryID: string;
27
27
  /**
28
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
29
  */
30
30
  userToken: string;
31
31
  /**
32
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
32
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
33
33
  */
34
34
  authenticatedUserToken?: string;
35
35
  /**
36
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
36
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
37
37
  */
38
38
  timestamp?: number;
39
39
  };
@@ -63,7 +63,7 @@ export type CustomPutProps = {
63
63
  */
64
64
  export type DeleteUserTokenProps = {
65
65
  /**
66
- * The user token for which to delete all associated events.
66
+ * User token for which to delete all associated events.
67
67
  */
68
68
  userToken: string;
69
69
  };
@@ -1,28 +1,28 @@
1
1
  import type { ConversionEvent } from './conversionEvent';
2
2
  export type ConvertedFilters = {
3
3
  /**
4
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
4
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
5
5
  */
6
6
  eventName: string;
7
7
  eventType: ConversionEvent;
8
8
  /**
9
- * The name of an Algolia index.
9
+ * Index name (case-sensitive) to which the event\'s items belong.
10
10
  */
11
11
  index: string;
12
12
  /**
13
- * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
13
+ * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
14
14
  */
15
15
  filters: string[];
16
16
  /**
17
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
17
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
18
18
  */
19
19
  userToken: string;
20
20
  /**
21
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
21
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
22
22
  */
23
23
  authenticatedUserToken?: string;
24
24
  /**
25
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
25
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
26
26
  */
27
27
  timestamp?: number;
28
28
  };
@@ -4,28 +4,28 @@ import type { ConversionEvent } from './conversionEvent';
4
4
  */
5
5
  export type ConvertedObjectIDs = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ConversionEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * The object IDs of the records that are part of the event.
16
+ * Object IDs of the records that are part of the event.
17
17
  */
18
18
  objectIDs: string[];
19
19
  /**
20
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -4,16 +4,16 @@ import type { ConversionEvent } from './conversionEvent';
4
4
  */
5
5
  export type ConvertedObjectIDsAfterSearch = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ConversionEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * The object IDs of the records that are part of the event.
16
+ * Object IDs of the records that are part of the event.
17
17
  */
18
18
  objectIDs: string[];
19
19
  /**
@@ -21,15 +21,15 @@ export type ConvertedObjectIDsAfterSearch = {
21
21
  */
22
22
  queryID: string;
23
23
  /**
24
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  userToken: string;
27
27
  /**
28
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
28
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
29
  */
30
30
  authenticatedUserToken?: string;
31
31
  /**
32
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
32
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
33
33
  */
34
34
  timestamp?: number;
35
35
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The absolute value of the discount for this product, in units of `currency`.
2
+ * Absolute value of the discount for this product, in units of `currency`.
3
3
  */
4
4
  export type Discount = number | string;
5
5
  //# sourceMappingURL=discount.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { EventsItems } from './eventsItems';
2
2
  export type InsightsEvents = {
3
3
  /**
4
- * List of click and conversion events. An event is an object representing a user interaction. Events have attributes that describe the interaction, such as an event name, a type, or a user token. **All** events must be valid, otherwise the API returns an error.
4
+ * Click and conversion events. **All** events must be valid, otherwise the API returns an error.
5
5
  */
6
6
  events: EventsItems[];
7
7
  };
@@ -3,7 +3,7 @@ import type { Price } from './price';
3
3
  export type ObjectData = {
4
4
  price?: Price;
5
5
  /**
6
- * The quantity of a product that has been purchased or added to the cart. The total value of a purchase is the sum of `quantity` multiplied with the `price` for each purchased item.
6
+ * Quantity of a product that has been purchased or added to the cart. The total purchase value is the sum of `quantity` multiplied with the `price` for each purchased item.
7
7
  */
8
8
  quantity?: number;
9
9
  discount?: Discount;
@@ -7,7 +7,7 @@ export type ObjectDataAfterSearch = {
7
7
  queryID?: string;
8
8
  price?: Price;
9
9
  /**
10
- * The quantity of a product that has been purchased or added to the cart. The total value of a purchase is the sum of `quantity` multiplied with the `price` for each purchased item.
10
+ * Quantity of a product that has been purchased or added to the cart. The total purchase value is the sum of `quantity` multiplied with the `price` for each purchased item.
11
11
  */
12
12
  quantity?: number;
13
13
  discount?: Discount;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The total price of a product, including any discounts, in units of `currency`.
2
+ * Total price of a product, including any discounts, in units of `currency`.
3
3
  */
4
4
  export type Price = number | string;
5
5
  //# sourceMappingURL=price.d.ts.map
@@ -7,25 +7,25 @@ import type { Value } from './value';
7
7
  */
8
8
  export type PurchasedObjectIDs = {
9
9
  /**
10
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
10
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
11
11
  */
12
12
  eventName: string;
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: PurchaseEvent;
15
15
  /**
16
- * The name of an Algolia index.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
20
- * The object IDs of the records that are part of the event.
20
+ * Object IDs of the records that are part of the event.
21
21
  */
22
22
  objectIDs: string[];
23
23
  /**
24
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  userToken: string;
27
27
  /**
28
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
28
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
29
  */
30
30
  authenticatedUserToken?: string;
31
31
  /**
@@ -37,7 +37,7 @@ export type PurchasedObjectIDs = {
37
37
  */
38
38
  objectData?: ObjectData[];
39
39
  /**
40
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
40
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
41
  */
42
42
  timestamp?: number;
43
43
  value?: Value;
@@ -7,25 +7,25 @@ import type { Value } from './value';
7
7
  */
8
8
  export type PurchasedObjectIDsAfterSearch = {
9
9
  /**
10
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
10
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
11
11
  */
12
12
  eventName: string;
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: PurchaseEvent;
15
15
  /**
16
- * The name of an Algolia index.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
20
- * The object IDs of the records that are part of the event.
20
+ * Object IDs of the records that are part of the event.
21
21
  */
22
22
  objectIDs: string[];
23
23
  /**
24
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  userToken: string;
27
27
  /**
28
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
28
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
29
  */
30
30
  authenticatedUserToken?: string;
31
31
  /**
@@ -35,9 +35,9 @@ export type PurchasedObjectIDsAfterSearch = {
35
35
  /**
36
36
  * Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
37
37
  */
38
- objectData?: ObjectDataAfterSearch[];
38
+ objectData: ObjectDataAfterSearch[];
39
39
  /**
40
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
40
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
41
  */
42
42
  timestamp?: number;
43
43
  value?: Value;
@@ -1 +1 @@
1
- {"version":3,"file":"purchasedObjectIDsAfterSearch.d.ts","sourceRoot":"","sources":["../../model/purchasedObjectIDsAfterSearch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAEl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SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC"}
@@ -4,28 +4,28 @@ import type { ViewEvent } from './viewEvent';
4
4
  */
5
5
  export type ViewedFilters = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ViewEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
16
+ * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
17
17
  */
18
18
  filters: string[];
19
19
  /**
20
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -4,28 +4,28 @@ import type { ViewEvent } from './viewEvent';
4
4
  */
5
5
  export type ViewedObjectIDs = {
6
6
  /**
7
- * The name of the event, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
7
+ * Event name, up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ViewEvent;
11
11
  /**
12
- * The name of an Algolia index.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * The object IDs of the records that are part of the event.
16
+ * Object IDs of the records that are part of the event.
17
17
  */
18
18
  objectIDs: string[];
19
19
  /**
20
- * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
24
+ * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * The timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -2,7 +2,7 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common
2
2
  import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteUserTokenProps } from '../model/clientMethodProps';
3
3
  import type { EventsResponse } from '../model/eventsResponse';
4
4
  import type { InsightsEvents } from '../model/insightsEvents';
5
- export declare const apiClientVersion = "5.0.0-alpha.99";
5
+ export declare const apiClientVersion = "5.0.0-beta.2";
6
6
  export declare const REGIONS: readonly ["de", "us"];
7
7
  export type Region = (typeof REGIONS)[number];
8
8
  export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
@@ -31,7 +31,6 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
31
31
  /**
32
32
  * This method allow you to send requests to the Algolia REST API.
33
33
  *
34
- * @summary Send requests to the Algolia REST API.
35
34
  * @param customDelete - The customDelete object.
36
35
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
37
36
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -41,7 +40,6 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
41
40
  /**
42
41
  * This method allow you to send requests to the Algolia REST API.
43
42
  *
44
- * @summary Send requests to the Algolia REST API.
45
43
  * @param customGet - The customGet object.
46
44
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
47
45
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -51,7 +49,6 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
51
49
  /**
52
50
  * This method allow you to send requests to the Algolia REST API.
53
51
  *
54
- * @summary Send requests to the Algolia REST API.
55
52
  * @param customPost - The customPost object.
56
53
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
57
54
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -62,7 +59,6 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
62
59
  /**
63
60
  * This method allow you to send requests to the Algolia REST API.
64
61
  *
65
- * @summary Send requests to the Algolia REST API.
66
62
  * @param customPut - The customPut object.
67
63
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
68
64
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -71,25 +67,19 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
71
67
  */
72
68
  customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
73
69
  /**
74
- * Delete all events related to a certain user token from events metrics and analytics. To delete a personalization user profile, see [Delete a user profile](https://www.algolia.com/doc/rest-api/personalization/#delete-a-user-profile).
70
+ * Deletes all events related to the specified user token from events metrics and analytics. To delete a personalization user profile, see [Delete a user profile](/specs/personalization#tag/profiles/operation/deleteUserProfile).
75
71
  *
76
- * @summary Delete user token.
77
72
  * @param deleteUserToken - The deleteUserToken object.
78
- * @param deleteUserToken.userToken - The user token for which to delete all associated events.
73
+ * @param deleteUserToken.userToken - User token for which to delete all associated events.
79
74
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
80
75
  */
81
76
  deleteUserToken({ userToken }: DeleteUserTokenProps, requestOptions?: RequestOptions): Promise<void>;
82
77
  /**
83
- * Send a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
78
+ * Sends a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
84
79
  *
85
- * @summary Send events.
86
80
  * @param insightsEvents - The insightsEvents object.
87
81
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
88
82
  */
89
83
  pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise<EventsResponse>;
90
84
  };
91
- /**
92
- * The client type.
93
- */
94
- export type InsightsClient = ReturnType<typeof createInsightsClient>;
95
85
  //# sourceMappingURL=insightsClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"insightsClient.d.ts","sourceRoot":"","s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