@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
@@ -7,24 +7,24 @@ import type { ClickEvent } from './clickEvent';
7
7
  */
8
8
  export type ClickedObjectIDsAfterSearch = {
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
- * Position of the clicked objects in the search results. The first search result has a position of 1 (not 0). You must provide 1 `position` for each `objectID`.
27
+ * 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`.
28
28
  */
29
29
  positions: number[];
30
30
 
@@ -34,17 +34,17 @@ export type ClickedObjectIDsAfterSearch = {
34
34
  queryID: string;
35
35
 
36
36
  /**
37
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
37
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
38
38
  */
39
39
  userToken: string;
40
40
 
41
41
  /**
42
- * 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.
42
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
43
43
  */
44
- timestamp?: number;
44
+ authenticatedUserToken?: string;
45
45
 
46
46
  /**
47
- * User token for authenticated users.
47
+ * 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.
48
48
  */
49
- authenticatedUserToken?: string;
49
+ timestamp?: number;
50
50
  };
@@ -1,9 +1,9 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Properties for the `del` method.
4
+ * Properties for the `customDelete` method.
5
5
  */
6
- export type DelProps = {
6
+ export type CustomDeleteProps = {
7
7
  /**
8
8
  * Path of the endpoint, anything after \"/1\" must be specified.
9
9
  */
@@ -15,9 +15,9 @@ export type DelProps = {
15
15
  };
16
16
 
17
17
  /**
18
- * Properties for the `get` method.
18
+ * Properties for the `customGet` method.
19
19
  */
20
- export type GetProps = {
20
+ export type CustomGetProps = {
21
21
  /**
22
22
  * Path of the endpoint, anything after \"/1\" must be specified.
23
23
  */
@@ -29,9 +29,9 @@ export type GetProps = {
29
29
  };
30
30
 
31
31
  /**
32
- * Properties for the `post` method.
32
+ * Properties for the `customPost` method.
33
33
  */
34
- export type PostProps = {
34
+ export type CustomPostProps = {
35
35
  /**
36
36
  * Path of the endpoint, anything after \"/1\" must be specified.
37
37
  */
@@ -47,9 +47,9 @@ export type PostProps = {
47
47
  };
48
48
 
49
49
  /**
50
- * Properties for the `put` method.
50
+ * Properties for the `customPut` method.
51
51
  */
52
- export type PutProps = {
52
+ export type CustomPutProps = {
53
53
  /**
54
54
  * Path of the endpoint, anything after \"/1\" must be specified.
55
55
  */
@@ -63,3 +63,13 @@ export type PutProps = {
63
63
  */
64
64
  body?: Record<string, any>;
65
65
  };
66
+
67
+ /**
68
+ * Properties for the `deleteUserToken` method.
69
+ */
70
+ export type DeleteUserTokenProps = {
71
+ /**
72
+ * The user token for which to delete all associated events.
73
+ */
74
+ userToken: string;
75
+ };
@@ -4,14 +4,14 @@ import type { ConversionEvent } from './conversionEvent';
4
4
 
5
5
  export type ConvertedFilters = {
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
 
11
11
  eventType: ConversionEvent;
12
12
 
13
13
  /**
14
- * Name of the Algolia index.
14
+ * The name of an Algolia index.
15
15
  */
16
16
  index: string;
17
17
 
@@ -21,17 +21,17 @@ export type ConvertedFilters = {
21
21
  filters: string[];
22
22
 
23
23
  /**
24
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
24
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
25
25
  */
26
26
  userToken: string;
27
27
 
28
28
  /**
29
- * 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.
29
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
30
30
  */
31
- timestamp?: number;
31
+ authenticatedUserToken?: string;
32
32
 
33
33
  /**
34
- * User token for authenticated users.
34
+ * 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.
35
35
  */
36
- authenticatedUserToken?: string;
36
+ timestamp?: number;
37
37
  };
@@ -7,34 +7,34 @@ import type { ConversionEvent } from './conversionEvent';
7
7
  */
8
8
  export type ConvertedObjectIDs = {
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: ConversionEvent;
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
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,19 +7,19 @@ import type { ConversionEvent } from './conversionEvent';
7
7
  */
8
8
  export type ConvertedObjectIDsAfterSearch = {
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: ConversionEvent;
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
 
@@ -29,17 +29,17 @@ export type ConvertedObjectIDsAfterSearch = {
29
29
  queryID: string;
30
30
 
31
31
  /**
32
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
32
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
33
33
  */
34
34
  userToken: string;
35
35
 
36
36
  /**
37
- * 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.
37
+ * An identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
38
38
  */
39
- timestamp?: number;
39
+ authenticatedUserToken?: string;
40
40
 
41
41
  /**
42
- * User token for authenticated users.
42
+ * 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.
43
43
  */
44
- authenticatedUserToken?: string;
44
+ timestamp?: number;
45
45
  };
package/model/discount.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Absolute value of the discount in effect for this object, measured in `currency`.
4
+ * The absolute value of the discount for this product, in units of `currency`.
5
5
  */
6
6
  export type Discount = number | string;
package/model/index.ts CHANGED
@@ -22,6 +22,7 @@ export * from './price';
22
22
  export * from './purchaseEvent';
23
23
  export * from './purchasedObjectIDs';
24
24
  export * from './purchasedObjectIDsAfterSearch';
25
+ export * from './value';
25
26
  export * from './viewEvent';
26
27
  export * from './viewedFilters';
27
28
  export * from './viewedObjectIDs';
@@ -4,7 +4,7 @@ import type { EventsItems } from './eventsItems';
4
4
 
5
5
  export type InsightsEvents = {
6
6
  /**
7
- * 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. Some attributes require other attributes to be declared, and some attributes can\'t be declared at the same time. **All** events must be valid, otherwise the API returns an error.
7
+ * 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.
8
8
  */
9
9
  events: EventsItems[];
10
10
  };
@@ -7,7 +7,7 @@ export type ObjectData = {
7
7
  price?: Price;
8
8
 
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
 
@@ -5,14 +5,14 @@ import type { Price } from './price';
5
5
 
6
6
  export type ObjectDataAfterSearch = {
7
7
  /**
8
- * ID of the query that this specific record is attributable to. Used to track purchase events with multiple items originating from different searches.
8
+ * Unique identifier for a search query, used to track purchase events with multiple records that originate from different searches.
9
9
  */
10
10
  queryID?: string;
11
11
 
12
12
  price?: Price;
13
13
 
14
14
  /**
15
- * 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.
15
+ * 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.
16
16
  */
17
17
  quantity?: number;
18
18
 
package/model/price.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * The price of the item. This should be the final price, inclusive of any discounts in effect.
4
+ * The total price of a product, including any discounts, in units of `currency`.
5
5
  */
6
6
  export type Price = number | string;
@@ -3,13 +3,14 @@
3
3
  import type { ConversionEvent } from './conversionEvent';
4
4
  import type { ObjectData } from './objectData';
5
5
  import type { PurchaseEvent } from './purchaseEvent';
6
+ import type { Value } from './value';
6
7
 
7
8
  /**
8
9
  * 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.
9
10
  */
10
11
  export type PurchasedObjectIDs = {
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 PurchasedObjectIDs = {
18
19
  eventSubtype: PurchaseEvent;
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 { ConversionEvent } from './conversionEvent';
4
4
  import type { ObjectDataAfterSearch } from './objectDataAfterSearch';
5
5
  import type { PurchaseEvent } from './purchaseEvent';
6
+ import type { Value } from './value';
6
7
 
7
8
  /**
8
9
  * 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.
9
10
  */
10
11
  export type PurchasedObjectIDsAfterSearch = {
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,42 +19,39 @@ export type PurchasedObjectIDsAfterSearch = {
18
19
  eventSubtype: PurchaseEvent;
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
- * 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.
27
+ * The object IDs of the records that are part of the event.
27
28
  */
28
- queryID: string;
29
+ objectIDs: string[];
29
30
 
30
31
  /**
31
- * List of object identifiers for items of an Algolia index.
32
+ * An anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
32
33
  */
33
- objectIDs: string[];
34
+ userToken: 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 identifier for authenticated users. > **Note**: Never include personally identifiable information in user tokens.
37
38
  */
38
- objectData?: ObjectDataAfterSearch[];
39
+ authenticatedUserToken?: 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
+ * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
42
43
  */
43
44
  currency?: string;
44
45
 
45
46
  /**
46
- * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
47
+ * Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
47
48
  */
48
- userToken: string;
49
+ objectData?: ObjectDataAfterSearch[];
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
+ * 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
54
  timestamp?: number;
54
55
 
55
- /**
56
- * User token for authenticated users.
57
- */
58
- authenticatedUserToken?: string;
56
+ value?: Value;
59
57
  };
package/model/value.ts ADDED
@@ -0,0 +1,6 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ /**
4
+ * Total monetary value of this event in units of `currency`.
5
+ */
6
+ export type Value = number | string;
@@ -7,14 +7,14 @@ import type { ViewEvent } from './viewEvent';
7
7
  */
8
8
  export type ViewedFilters = {
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: ViewEvent;
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 ViewedFilters = {
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,34 +7,34 @@ import type { ViewEvent } from './viewEvent';
7
7
  */
8
8
  export type ViewedObjectIDs = {
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: ViewEvent;
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
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-insights",
3
- "version": "5.0.0-alpha.91",
3
+ "version": "5.0.0-alpha.97",
4
4
  "description": "JavaScript client for client-insights",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,14 +39,14 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.92",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.92",
44
- "@algolia/requester-node-http": "5.0.0-alpha.92"
42
+ "@algolia/client-common": "5.0.0-alpha.98",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.98",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.98"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.9.0",
48
- "rollup": "4.3.0",
49
- "typescript": "5.2.2"
47
+ "@types/node": "20.11.1",
48
+ "rollup": "4.9.5",
49
+ "typescript": "5.3.3"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">= 14.0.0"