@algolia/client-insights 5.0.0-alpha.91 → 5.0.0-alpha.97

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 (62) hide show
  1. package/dist/client-insights.cjs +64 -41
  2. package/dist/client-insights.esm.browser.js +107 -60
  3. package/dist/client-insights.esm.node.js +64 -41
  4. package/dist/client-insights.umd.js +2 -2
  5. package/dist/model/addedToCartObjectIDs.d.ts +15 -13
  6. package/dist/model/addedToCartObjectIDs.d.ts.map +1 -1
  7. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts +15 -13
  8. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts.map +1 -1
  9. package/dist/model/clickedFilters.d.ts +7 -7
  10. package/dist/model/clickedFilters.d.ts.map +1 -1
  11. package/dist/model/clickedObjectIDs.d.ts +9 -5
  12. package/dist/model/clickedObjectIDs.d.ts.map +1 -1
  13. package/dist/model/clickedObjectIDsAfterSearch.d.ts +9 -9
  14. package/dist/model/clickedObjectIDsAfterSearch.d.ts.map +1 -1
  15. package/dist/model/clientMethodProps.d.ts +17 -8
  16. package/dist/model/clientMethodProps.d.ts.map +1 -1
  17. package/dist/model/convertedFilters.d.ts +7 -7
  18. package/dist/model/convertedFilters.d.ts.map +1 -1
  19. package/dist/model/convertedObjectIDs.d.ts +8 -8
  20. package/dist/model/convertedObjectIDs.d.ts.map +1 -1
  21. package/dist/model/convertedObjectIDsAfterSearch.d.ts +8 -8
  22. package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +1 -1
  23. package/dist/model/discount.d.ts +1 -1
  24. package/dist/model/index.d.ts +1 -0
  25. package/dist/model/index.d.ts.map +1 -1
  26. package/dist/model/insightsEvents.d.ts +1 -1
  27. package/dist/model/objectData.d.ts +1 -1
  28. package/dist/model/objectDataAfterSearch.d.ts +2 -2
  29. package/dist/model/price.d.ts +1 -1
  30. package/dist/model/purchasedObjectIDs.d.ts +15 -13
  31. package/dist/model/purchasedObjectIDs.d.ts.map +1 -1
  32. package/dist/model/purchasedObjectIDsAfterSearch.d.ts +14 -16
  33. package/dist/model/purchasedObjectIDsAfterSearch.d.ts.map +1 -1
  34. package/dist/model/value.d.ts +5 -0
  35. package/dist/model/value.d.ts.map +1 -0
  36. package/dist/model/viewedFilters.d.ts +7 -7
  37. package/dist/model/viewedFilters.d.ts.map +1 -1
  38. package/dist/model/viewedObjectIDs.d.ts +8 -8
  39. package/dist/model/viewedObjectIDs.d.ts.map +1 -1
  40. package/dist/src/insightsClient.d.ts +35 -26
  41. package/dist/src/insightsClient.d.ts.map +1 -1
  42. package/model/addedToCartObjectIDs.ts +16 -13
  43. package/model/addedToCartObjectIDsAfterSearch.ts +16 -13
  44. package/model/clickedFilters.ts +7 -7
  45. package/model/clickedObjectIDs.ts +10 -5
  46. package/model/clickedObjectIDsAfterSearch.ts +9 -9
  47. package/model/clientMethodProps.ts +18 -8
  48. package/model/convertedFilters.ts +7 -7
  49. package/model/convertedObjectIDs.ts +8 -8
  50. package/model/convertedObjectIDsAfterSearch.ts +8 -8
  51. package/model/discount.ts +1 -1
  52. package/model/index.ts +1 -0
  53. package/model/insightsEvents.ts +1 -1
  54. package/model/objectData.ts +1 -1
  55. package/model/objectDataAfterSearch.ts +2 -2
  56. package/model/price.ts +1 -1
  57. package/model/purchasedObjectIDs.ts +16 -13
  58. package/model/purchasedObjectIDsAfterSearch.ts +14 -16
  59. package/model/value.ts +6 -0
  60. package/model/viewedFilters.ts +7 -7
  61. package/model/viewedObjectIDs.ts +8 -8
  62. package/package.json +7 -7
@@ -2,12 +2,12 @@ import type { Discount } from './discount';
2
2
  import type { Price } from './price';
3
3
  export type ObjectDataAfterSearch = {
4
4
  /**
5
- * ID of the query that this specific record is attributable to. Used to track purchase events with multiple items originating from different searches.
5
+ * Unique identifier for a search query, used to track purchase events with multiple records that originate from different searches.
6
6
  */
7
7
  queryID?: string;
8
8
  price?: Price;
9
9
  /**
10
- * The quantity of the purchased or added-to-cart item. The total value of a purchase is the sum of `quantity` multiplied with the `price` for each purchased item.
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.
11
11
  */
12
12
  quantity?: number;
13
13
  discount?: Discount;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The price of the item. This should be the final price, inclusive of any discounts in effect.
2
+ * The 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
@@ -1,43 +1,45 @@
1
1
  import type { ConversionEvent } from './conversionEvent';
2
2
  import type { ObjectData } from './objectData';
3
3
  import type { PurchaseEvent } from './purchaseEvent';
4
+ import type { Value } from './value';
4
5
  /**
5
6
  * Use this event to track when users make a purchase unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track purchase events related to Algolia requests, use the \"Purchased object IDs after search\" event.
6
7
  */
7
8
  export type PurchasedObjectIDs = {
8
9
  /**
9
- * Can contain 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
+ * 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
11
  */
11
12
  eventName: string;
12
13
  eventType: ConversionEvent;
13
14
  eventSubtype: PurchaseEvent;
14
15
  /**
15
- * Name of the Algolia index.
16
+ * The name of an Algolia index.
16
17
  */
17
18
  index: string;
18
19
  /**
19
- * List of object identifiers for items of an Algolia index.
20
+ * The object IDs of the records that are part of the event.
20
21
  */
21
22
  objectIDs: string[];
22
23
  /**
23
- * Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
24
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
24
25
  */
25
- objectData?: ObjectData[];
26
+ userToken: string;
26
27
  /**
27
- * If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
28
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
28
29
  */
29
- currency?: string;
30
+ authenticatedUserToken?: string;
30
31
  /**
31
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
32
+ * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
32
33
  */
33
- userToken: string;
34
+ currency?: string;
34
35
  /**
35
- * Time 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
+ * Extra information about the records involved in a purchase or add-to-cart event. If specified, it must have the same length as `objectIDs`.
36
37
  */
37
- timestamp?: number;
38
+ objectData?: ObjectData[];
38
39
  /**
39
- * User token for authenticated users.
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
41
  */
41
- authenticatedUserToken?: string;
42
+ timestamp?: number;
43
+ value?: Value;
42
44
  };
43
45
  //# sourceMappingURL=purchasedObjectIDs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"purchasedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/purchasedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B,YAAY,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"purchasedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/purchasedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B,YAAY,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC"}
@@ -1,47 +1,45 @@
1
1
  import type { ConversionEvent } from './conversionEvent';
2
2
  import type { ObjectDataAfterSearch } from './objectDataAfterSearch';
3
3
  import type { PurchaseEvent } from './purchaseEvent';
4
+ import type { Value } from './value';
4
5
  /**
5
6
  * Use this event to track when users make a purchase after a previous Algolia request. If you\'re building your category pages with Algolia, you\'ll also use this event.
6
7
  */
7
8
  export type PurchasedObjectIDsAfterSearch = {
8
9
  /**
9
- * Can contain 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
+ * 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
11
  */
11
12
  eventName: string;
12
13
  eventType: ConversionEvent;
13
14
  eventSubtype: PurchaseEvent;
14
15
  /**
15
- * Name of the Algolia index.
16
+ * The name of an Algolia index.
16
17
  */
17
18
  index: string;
18
19
  /**
19
- * Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add `clickAnalytics: true` as a search request parameter, the query ID is included in the API response.
20
+ * The object IDs of the records that are part of the event.
20
21
  */
21
- queryID: string;
22
+ objectIDs: string[];
22
23
  /**
23
- * List of object identifiers for items of an Algolia index.
24
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
24
25
  */
25
- objectIDs: string[];
26
+ userToken: string;
26
27
  /**
27
- * Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
28
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
28
29
  */
29
- objectData?: ObjectDataAfterSearch[];
30
+ authenticatedUserToken?: string;
30
31
  /**
31
- * If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
32
+ * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
32
33
  */
33
34
  currency?: string;
34
35
  /**
35
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
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`.
36
37
  */
37
- userToken: string;
38
+ objectData?: ObjectDataAfterSearch[];
38
39
  /**
39
- * Time 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
+ * 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
41
  */
41
42
  timestamp?: number;
42
- /**
43
- * User token for authenticated users.
44
- */
45
- authenticatedUserToken?: string;
43
+ value?: Value;
46
44
  };
47
45
  //# sourceMappingURL=purchasedObjectIDsAfterSearch.d.ts.map
@@ -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;AAErD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B,YAAY,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
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;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B,YAAY,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Total monetary value of this event in units of `currency`.
3
+ */
4
+ export type Value = number | string;
5
+ //# sourceMappingURL=value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -4,12 +4,12 @@ import type { ViewEvent } from './viewEvent';
4
4
  */
5
5
  export type ViewedFilters = {
6
6
  /**
7
- * Can contain 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
+ * 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.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ViewEvent;
11
11
  /**
12
- * Name of the Algolia index.
12
+ * The name of an Algolia index.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -17,16 +17,16 @@ export type ViewedFilters = {
17
17
  */
18
18
  filters: string[];
19
19
  /**
20
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * Time 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.
24
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
25
25
  */
26
- timestamp?: number;
26
+ authenticatedUserToken?: string;
27
27
  /**
28
- * User token for authenticated users.
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.
29
29
  */
30
- authenticatedUserToken?: string;
30
+ timestamp?: number;
31
31
  };
32
32
  //# sourceMappingURL=viewedFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewedFilters.d.ts","sourceRoot":"","sources":["../../model/viewedFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"viewedFilters.d.ts","sourceRoot":"","sources":["../../model/viewedFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -4,29 +4,29 @@ import type { ViewEvent } from './viewEvent';
4
4
  */
5
5
  export type ViewedObjectIDs = {
6
6
  /**
7
- * Can contain 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
+ * 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.
8
8
  */
9
9
  eventName: string;
10
10
  eventType: ViewEvent;
11
11
  /**
12
- * Name of the Algolia index.
12
+ * The name of an Algolia index.
13
13
  */
14
14
  index: string;
15
15
  /**
16
- * List of object identifiers for items of an Algolia index.
16
+ * The object IDs of the records that are part of the event.
17
17
  */
18
18
  objectIDs: string[];
19
19
  /**
20
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
20
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
21
21
  */
22
22
  userToken: string;
23
23
  /**
24
- * Time 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.
24
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
25
25
  */
26
- timestamp?: number;
26
+ authenticatedUserToken?: string;
27
27
  /**
28
- * User token for authenticated users.
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.
29
29
  */
30
- authenticatedUserToken?: string;
30
+ timestamp?: number;
31
31
  };
32
32
  //# sourceMappingURL=viewedObjectIDs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/viewedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
1
+ {"version":3,"file":"viewedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/viewedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { DelProps, GetProps, PostProps, PutProps } from '../model/clientMethodProps';
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.91";
5
+ export declare const apiClientVersion = "5.0.0-alpha.97";
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 & {
@@ -32,52 +32,61 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
32
32
  * This method allow you to send requests to the Algolia REST API.
33
33
  *
34
34
  * @summary Send requests to the Algolia REST API.
35
- * @param del - The del object.
36
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
37
- * @param del.parameters - Query parameters to apply to the current query.
35
+ * @param customDelete - The customDelete object.
36
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
37
+ * @param customDelete.parameters - Query parameters to apply to the current query.
38
38
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
39
39
  */
40
- del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
40
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
41
41
  /**
42
42
  * This method allow you to send requests to the Algolia REST API.
43
43
  *
44
44
  * @summary Send requests to the Algolia REST API.
45
- * @param get - The get object.
46
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
47
- * @param get.parameters - Query parameters to apply to the current query.
45
+ * @param customGet - The customGet object.
46
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
47
+ * @param customGet.parameters - Query parameters to apply to the current query.
48
48
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
49
49
  */
50
- get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
50
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
51
51
  /**
52
52
  * This method allow you to send requests to the Algolia REST API.
53
53
  *
54
54
  * @summary Send requests to the Algolia REST API.
55
- * @param post - The post object.
56
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
57
- * @param post.parameters - Query parameters to apply to the current query.
58
- * @param post.body - Parameters to send with the custom request.
55
+ * @param customPost - The customPost object.
56
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
57
+ * @param customPost.parameters - Query parameters to apply to the current query.
58
+ * @param customPost.body - Parameters to send with the custom request.
59
59
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
60
  */
61
- post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
61
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
62
  /**
63
- * 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.
63
+ * This method allow you to send requests to the Algolia REST API.
64
64
  *
65
- * @summary Send events.
66
- * @param insightsEvents - The insightsEvents object.
65
+ * @summary Send requests to the Algolia REST API.
66
+ * @param customPut - The customPut object.
67
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
68
+ * @param customPut.parameters - Query parameters to apply to the current query.
69
+ * @param customPut.body - Parameters to send with the custom request.
67
70
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
68
71
  */
69
- pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise<EventsResponse>;
72
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
70
73
  /**
71
- * This method allow you to send requests to the Algolia REST API.
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).
72
75
  *
73
- * @summary Send requests to the Algolia REST API.
74
- * @param put - The put object.
75
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
76
- * @param put.parameters - Query parameters to apply to the current query.
77
- * @param put.body - Parameters to send with the custom request.
76
+ * @summary Delete user token.
77
+ * @param deleteUserToken - The deleteUserToken object.
78
+ * @param deleteUserToken.userToken - The user token for which to delete all associated events.
78
79
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
79
80
  */
80
- put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
81
+ deleteUserToken({ userToken }: DeleteUserTokenProps, requestOptions?: RequestOptions): Promise<void>;
82
+ /**
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.
84
+ *
85
+ * @summary Send events.
86
+ * @param insightsEvents - The insightsEvents object.
87
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
88
+ */
89
+ pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise<EventsResponse>;
81
90
  };
82
91
  /**
83
92
  * The client type.
@@ -1 +1 @@
1
- {"version":3,"file":"insightsClient.d.ts","sourceRoot":"","sources":["../../src/insightsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAW9C,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;OAMG;+BAEe,cAAc,mBACb,cAAc,GAC9B,QAAQ,cAAc,CAAC;IA4B1B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;EAoBlC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"insightsClient.d.ts","sourceRoot":"","sources":["../../src/insightsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAW9C,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;;OASG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;OAOG;mCAEc,oBAAoB,mBAClB,cAAc,GAC9B,QAAQ,IAAI,CAAC;IAwBhB;;;;;;OAMG;+BAEe,cAAc,mBACb,cAAc,GAC9B,QAAQ,cAAc,CAAC;EA4B7B;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -3,13 +3,14 @@
3
3
  import type { AddToCartEvent } from './addToCartEvent';
4
4
  import type { ConversionEvent } from './conversionEvent';
5
5
  import type { ObjectData } from './objectData';
6
+ import type { Value } from './value';
6
7
 
7
8
  /**
8
9
  * Use this event to track when users add items to their shopping cart unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track add-to-cart events related to Algolia requests, use the \"Added to cart object IDs after search\" event.
9
10
  */
10
11
  export type AddedToCartObjectIDs = {
11
12
  /**
12
- * Can contain 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.
13
+ * 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.
13
14
  */
14
15
  eventName: string;
15
16
 
@@ -18,37 +19,39 @@ export type AddedToCartObjectIDs = {
18
19
  eventSubtype: AddToCartEvent;
19
20
 
20
21
  /**
21
- * Name of the Algolia index.
22
+ * The name of an Algolia index.
22
23
  */
23
24
  index: string;
24
25
 
25
26
  /**
26
- * List of object identifiers for items of an Algolia index.
27
+ * The object IDs of the records that are part of the event.
27
28
  */
28
29
  objectIDs: string[];
29
30
 
30
31
  /**
31
- * Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
32
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
32
33
  */
33
- objectData?: ObjectData[];
34
+ userToken: string;
34
35
 
35
36
  /**
36
- * If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
37
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
37
38
  */
38
- currency?: string;
39
+ authenticatedUserToken?: string;
39
40
 
40
41
  /**
41
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
42
+ * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
42
43
  */
43
- userToken: string;
44
+ currency?: string;
44
45
 
45
46
  /**
46
- * Time 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.
47
+ * Extra information about the records involved in a purchase or add-to-cart event. If specified, it must have the same length as `objectIDs`.
47
48
  */
48
- timestamp?: number;
49
+ objectData?: ObjectData[];
49
50
 
50
51
  /**
51
- * User token for authenticated users.
52
+ * 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.
52
53
  */
53
- authenticatedUserToken?: string;
54
+ timestamp?: number;
55
+
56
+ value?: Value;
54
57
  };
@@ -3,13 +3,14 @@
3
3
  import type { AddToCartEvent } from './addToCartEvent';
4
4
  import type { ConversionEvent } from './conversionEvent';
5
5
  import type { ObjectDataAfterSearch } from './objectDataAfterSearch';
6
+ import type { Value } from './value';
6
7
 
7
8
  /**
8
9
  * Use this event to track when users add items to their shopping cart after a previous Algolia request. If you\'re building your category pages with Algolia, you\'ll also use this event.
9
10
  */
10
11
  export type AddedToCartObjectIDsAfterSearch = {
11
12
  /**
12
- * Can contain 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.
13
+ * 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.
13
14
  */
14
15
  eventName: string;
15
16
 
@@ -18,7 +19,7 @@ export type AddedToCartObjectIDsAfterSearch = {
18
19
  eventSubtype: AddToCartEvent;
19
20
 
20
21
  /**
21
- * Name of the Algolia index.
22
+ * The name of an Algolia index.
22
23
  */
23
24
  index: string;
24
25
 
@@ -28,32 +29,34 @@ export type AddedToCartObjectIDsAfterSearch = {
28
29
  queryID: string;
29
30
 
30
31
  /**
31
- * List of object identifiers for items of an Algolia index.
32
+ * The object IDs of the records that are part of the event.
32
33
  */
33
34
  objectIDs: string[];
34
35
 
35
36
  /**
36
- * Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
37
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
37
38
  */
38
- objectData?: ObjectDataAfterSearch[];
39
+ userToken: string;
39
40
 
40
41
  /**
41
- * If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
42
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
42
43
  */
43
- currency?: string;
44
+ authenticatedUserToken?: string;
44
45
 
45
46
  /**
46
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
47
+ * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
47
48
  */
48
- userToken: string;
49
+ currency?: string;
49
50
 
50
51
  /**
51
- * Time 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.
52
+ * Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
52
53
  */
53
- timestamp?: number;
54
+ objectData?: ObjectDataAfterSearch[];
54
55
 
55
56
  /**
56
- * User token for authenticated users.
57
+ * 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.
57
58
  */
58
- authenticatedUserToken?: string;
59
+ timestamp?: number;
60
+
61
+ value?: Value;
59
62
  };
@@ -7,14 +7,14 @@ import type { ClickEvent } from './clickEvent';
7
7
  */
8
8
  export type ClickedFilters = {
9
9
  /**
10
- * Can contain 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
+ * 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.
11
11
  */
12
12
  eventName: string;
13
13
 
14
14
  eventType: ClickEvent;
15
15
 
16
16
  /**
17
- * Name of the Algolia index.
17
+ * The name of an Algolia index.
18
18
  */
19
19
  index: string;
20
20
 
@@ -24,17 +24,17 @@ export type ClickedFilters = {
24
24
  filters: string[];
25
25
 
26
26
  /**
27
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
27
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
28
  */
29
29
  userToken: string;
30
30
 
31
31
  /**
32
- * Time 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
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
33
33
  */
34
- timestamp?: number;
34
+ authenticatedUserToken?: string;
35
35
 
36
36
  /**
37
- * User token for authenticated users.
37
+ * 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.
38
38
  */
39
- authenticatedUserToken?: string;
39
+ timestamp?: number;
40
40
  };
@@ -7,29 +7,34 @@ import type { ClickEvent } from './clickEvent';
7
7
  */
8
8
  export type ClickedObjectIDs = {
9
9
  /**
10
- * Can contain 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
+ * 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.
11
11
  */
12
12
  eventName: string;
13
13
 
14
14
  eventType: ClickEvent;
15
15
 
16
16
  /**
17
- * Name of the Algolia index.
17
+ * The name of an Algolia index.
18
18
  */
19
19
  index: string;
20
20
 
21
21
  /**
22
- * List of object identifiers for items of an Algolia index.
22
+ * The object IDs of the records that are part of the event.
23
23
  */
24
24
  objectIDs: string[];
25
25
 
26
26
  /**
27
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
27
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
28
  */
29
29
  userToken: string;
30
30
 
31
31
  /**
32
- * Time 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
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
33
+ */
34
+ authenticatedUserToken?: string;
35
+
36
+ /**
37
+ * 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.
33
38
  */
34
39
  timestamp?: number;
35
40
  };