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

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 (105) hide show
  1. package/dist/builds/browser.d.ts +5 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +5 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/{client-insights.cjs.js → client-insights.cjs} +214 -216
  6. package/dist/client-insights.esm.browser.js +396 -446
  7. package/dist/client-insights.esm.node.js +214 -214
  8. package/dist/client-insights.umd.js +2 -2
  9. package/dist/model/addToCartEvent.d.ts +2 -0
  10. package/dist/model/addToCartEvent.d.ts.map +1 -0
  11. package/dist/model/addedToCartObjectIDs.d.ts +43 -0
  12. package/dist/model/addedToCartObjectIDs.d.ts.map +1 -0
  13. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts +47 -0
  14. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts.map +1 -0
  15. package/dist/model/clickEvent.d.ts +2 -0
  16. package/dist/model/clickEvent.d.ts.map +1 -0
  17. package/dist/model/clickedFilters.d.ts +32 -0
  18. package/dist/model/clickedFilters.d.ts.map +1 -0
  19. package/dist/model/clickedObjectIDs.d.ts +28 -0
  20. package/dist/model/clickedObjectIDs.d.ts.map +1 -0
  21. package/dist/model/clickedObjectIDsAfterSearch.d.ts +40 -0
  22. package/dist/model/clickedObjectIDsAfterSearch.d.ts.map +1 -0
  23. package/dist/model/clientMethodProps.d.ts +60 -60
  24. package/dist/model/clientMethodProps.d.ts.map +1 -1
  25. package/dist/model/conversionEvent.d.ts +2 -0
  26. package/dist/model/conversionEvent.d.ts.map +1 -0
  27. package/dist/model/convertedFilters.d.ts +29 -0
  28. package/dist/model/convertedFilters.d.ts.map +1 -0
  29. package/dist/model/convertedObjectIDs.d.ts +32 -0
  30. package/dist/model/convertedObjectIDs.d.ts.map +1 -0
  31. package/dist/model/convertedObjectIDsAfterSearch.d.ts +36 -0
  32. package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +1 -0
  33. package/dist/model/discount.d.ts +5 -0
  34. package/dist/model/discount.d.ts.map +1 -0
  35. package/dist/model/errorBase.d.ts +6 -6
  36. package/dist/model/errorBase.d.ts.map +1 -1
  37. package/dist/model/eventsItems.d.ts +14 -0
  38. package/dist/model/eventsItems.d.ts.map +1 -0
  39. package/dist/model/eventsResponse.d.ts +14 -0
  40. package/dist/model/eventsResponse.d.ts.map +1 -0
  41. package/dist/model/index.d.ts +26 -6
  42. package/dist/model/index.d.ts.map +1 -1
  43. package/dist/model/insightsEvents.d.ts +8 -0
  44. package/dist/model/insightsEvents.d.ts.map +1 -0
  45. package/dist/model/objectData.d.ts +11 -0
  46. package/dist/model/objectData.d.ts.map +1 -0
  47. package/dist/model/objectDataAfterSearch.d.ts +15 -0
  48. package/dist/model/objectDataAfterSearch.d.ts.map +1 -0
  49. package/dist/model/price.d.ts +5 -0
  50. package/dist/model/price.d.ts.map +1 -0
  51. package/dist/model/purchaseEvent.d.ts +2 -0
  52. package/dist/model/purchaseEvent.d.ts.map +1 -0
  53. package/dist/model/purchasedObjectIDs.d.ts +43 -0
  54. package/dist/model/purchasedObjectIDs.d.ts.map +1 -0
  55. package/dist/model/purchasedObjectIDsAfterSearch.d.ts +47 -0
  56. package/dist/model/purchasedObjectIDsAfterSearch.d.ts.map +1 -0
  57. package/dist/model/viewEvent.d.ts +2 -0
  58. package/dist/model/viewEvent.d.ts.map +1 -0
  59. package/dist/model/viewedFilters.d.ts +32 -0
  60. package/dist/model/viewedFilters.d.ts.map +1 -0
  61. package/dist/model/viewedObjectIDs.d.ts +32 -0
  62. package/dist/model/viewedObjectIDs.d.ts.map +1 -0
  63. package/dist/src/insightsClient.d.ts +85 -85
  64. package/dist/src/insightsClient.d.ts.map +1 -1
  65. package/index.js +1 -1
  66. package/model/addToCartEvent.ts +3 -0
  67. package/model/addedToCartObjectIDs.ts +54 -0
  68. package/model/addedToCartObjectIDsAfterSearch.ts +59 -0
  69. package/model/clickEvent.ts +3 -0
  70. package/model/clickedFilters.ts +40 -0
  71. package/model/clickedObjectIDs.ts +35 -0
  72. package/model/clickedObjectIDsAfterSearch.ts +50 -0
  73. package/model/clientMethodProps.ts +11 -11
  74. package/model/conversionEvent.ts +3 -0
  75. package/model/convertedFilters.ts +37 -0
  76. package/model/convertedObjectIDs.ts +40 -0
  77. package/model/convertedObjectIDsAfterSearch.ts +45 -0
  78. package/model/discount.ts +6 -0
  79. package/model/errorBase.ts +1 -1
  80. package/model/eventsItems.ts +28 -0
  81. package/model/eventsResponse.ts +16 -0
  82. package/model/index.ts +25 -5
  83. package/model/insightsEvents.ts +10 -0
  84. package/model/objectData.ts +15 -0
  85. package/model/objectDataAfterSearch.ts +20 -0
  86. package/model/price.ts +6 -0
  87. package/model/purchaseEvent.ts +3 -0
  88. package/model/purchasedObjectIDs.ts +54 -0
  89. package/model/purchasedObjectIDsAfterSearch.ts +59 -0
  90. package/model/viewEvent.ts +3 -0
  91. package/model/viewedFilters.ts +40 -0
  92. package/model/viewedObjectIDs.ts +40 -0
  93. package/package.json +30 -13
  94. package/dist/model/eventType.d.ts +0 -2
  95. package/dist/model/eventType.d.ts.map +0 -1
  96. package/dist/model/insightEvent.d.ts +0 -40
  97. package/dist/model/insightEvent.d.ts.map +0 -1
  98. package/dist/model/insightEvents.d.ts +0 -11
  99. package/dist/model/insightEvents.d.ts.map +0 -1
  100. package/dist/model/pushEventsResponse.d.ts +0 -7
  101. package/dist/model/pushEventsResponse.d.ts.map +0 -1
  102. package/model/eventType.ts +0 -3
  103. package/model/insightEvent.ts +0 -50
  104. package/model/insightEvents.ts +0 -13
  105. package/model/pushEventsResponse.ts +0 -8
@@ -0,0 +1,32 @@
1
+ import type { ClickEvent } from './clickEvent';
2
+ /**
3
+ * Use this event to track when users click facet filters in your user interface.
4
+ */
5
+ export type ClickedFilters = {
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.
8
+ */
9
+ eventName: string;
10
+ eventType: ClickEvent;
11
+ /**
12
+ * Name of the Algolia index.
13
+ */
14
+ index: string;
15
+ /**
16
+ * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
17
+ */
18
+ filters: string[];
19
+ /**
20
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
21
+ */
22
+ userToken: string;
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.
25
+ */
26
+ timestamp?: number;
27
+ /**
28
+ * User token for authenticated users.
29
+ */
30
+ authenticatedUserToken?: string;
31
+ };
32
+ //# sourceMappingURL=clickedFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickedFilters.d.ts","sourceRoot":"","sources":["../../model/clickedFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,UAAU,CAAC;IAEtB;;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"}
@@ -0,0 +1,28 @@
1
+ import type { ClickEvent } from './clickEvent';
2
+ /**
3
+ * Use this event to track when users click items unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track click events related to Algolia requests, use the \"Clicked object IDs after search\" event.
4
+ */
5
+ export type ClickedObjectIDs = {
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.
8
+ */
9
+ eventName: string;
10
+ eventType: ClickEvent;
11
+ /**
12
+ * Name of the Algolia index.
13
+ */
14
+ index: string;
15
+ /**
16
+ * List of object identifiers for items of an Algolia index.
17
+ */
18
+ objectIDs: string[];
19
+ /**
20
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
21
+ */
22
+ userToken: string;
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.
25
+ */
26
+ timestamp?: number;
27
+ };
28
+ //# sourceMappingURL=clickedObjectIDs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/clickedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,UAAU,CAAC;IAEtB;;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;CACpB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { ClickEvent } from './clickEvent';
2
+ /**
3
+ * Click event after an Algolia request. Use this event to track when users click items in the search results. If you\'re building your category pages with Algolia, you\'ll also use this event.
4
+ */
5
+ export type ClickedObjectIDsAfterSearch = {
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.
8
+ */
9
+ eventName: string;
10
+ eventType: ClickEvent;
11
+ /**
12
+ * Name of the Algolia index.
13
+ */
14
+ index: string;
15
+ /**
16
+ * List of object identifiers for items of an Algolia index.
17
+ */
18
+ objectIDs: string[];
19
+ /**
20
+ * 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`.
21
+ */
22
+ positions: number[];
23
+ /**
24
+ * 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.
25
+ */
26
+ queryID: string;
27
+ /**
28
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
29
+ */
30
+ userToken: string;
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.
33
+ */
34
+ timestamp?: number;
35
+ /**
36
+ * User token for authenticated users.
37
+ */
38
+ authenticatedUserToken?: string;
39
+ };
40
+ //# sourceMappingURL=clickedObjectIDsAfterSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickedObjectIDsAfterSearch.d.ts","sourceRoot":"","sources":["../../model/clickedObjectIDsAfterSearch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,UAAU,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;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,61 +1,61 @@
1
- /**
2
- * Properties for the `del` method.
3
- */
4
- export declare type DelProps = {
5
- /**
6
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
7
- */
8
- path: string;
9
- /**
10
- * Query parameters to be applied to the current query.
11
- */
12
- parameters?: Record<string, any>;
13
- };
14
- /**
15
- * Properties for the `get` method.
16
- */
17
- export declare type GetProps = {
18
- /**
19
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
20
- */
21
- path: string;
22
- /**
23
- * Query parameters to be applied to the current query.
24
- */
25
- parameters?: Record<string, any>;
26
- };
27
- /**
28
- * Properties for the `post` method.
29
- */
30
- export declare type PostProps = {
31
- /**
32
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
33
- */
34
- path: string;
35
- /**
36
- * Query parameters to be applied to the current query.
37
- */
38
- parameters?: Record<string, any>;
39
- /**
40
- * The parameters to send with the custom request.
41
- */
42
- body?: Record<string, any>;
43
- };
44
- /**
45
- * Properties for the `put` method.
46
- */
47
- export declare type PutProps = {
48
- /**
49
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
50
- */
51
- path: string;
52
- /**
53
- * Query parameters to be applied to the current query.
54
- */
55
- parameters?: Record<string, any>;
56
- /**
57
- * The parameters to send with the custom request.
58
- */
59
- body?: Record<string, any>;
60
- };
1
+ /**
2
+ * Properties for the `del` method.
3
+ */
4
+ export type DelProps = {
5
+ /**
6
+ * Path of the endpoint, anything after \"/1\" must be specified.
7
+ */
8
+ path: string;
9
+ /**
10
+ * Query parameters to apply to the current query.
11
+ */
12
+ parameters?: Record<string, any>;
13
+ };
14
+ /**
15
+ * Properties for the `get` method.
16
+ */
17
+ export type GetProps = {
18
+ /**
19
+ * Path of the endpoint, anything after \"/1\" must be specified.
20
+ */
21
+ path: string;
22
+ /**
23
+ * Query parameters to apply to the current query.
24
+ */
25
+ parameters?: Record<string, any>;
26
+ };
27
+ /**
28
+ * Properties for the `post` method.
29
+ */
30
+ export type PostProps = {
31
+ /**
32
+ * Path of the endpoint, anything after \"/1\" must be specified.
33
+ */
34
+ path: string;
35
+ /**
36
+ * Query parameters to apply to the current query.
37
+ */
38
+ parameters?: Record<string, any>;
39
+ /**
40
+ * Parameters to send with the custom request.
41
+ */
42
+ body?: Record<string, any>;
43
+ };
44
+ /**
45
+ * Properties for the `put` method.
46
+ */
47
+ export type PutProps = {
48
+ /**
49
+ * Path of the endpoint, anything after \"/1\" must be specified.
50
+ */
51
+ path: string;
52
+ /**
53
+ * Query parameters to apply to the current query.
54
+ */
55
+ parameters?: Record<string, any>;
56
+ /**
57
+ * Parameters to send with the custom request.
58
+ */
59
+ body?: Record<string, any>;
60
+ };
61
61
  //# sourceMappingURL=clientMethodProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
1
+ {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type ConversionEvent = 'conversion';
2
+ //# sourceMappingURL=conversionEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversionEvent.d.ts","sourceRoot":"","sources":["../../model/conversionEvent.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { ConversionEvent } from './conversionEvent';
2
+ export type ConvertedFilters = {
3
+ /**
4
+ * 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.
5
+ */
6
+ eventName: string;
7
+ eventType: ConversionEvent;
8
+ /**
9
+ * Name of the Algolia index.
10
+ */
11
+ index: string;
12
+ /**
13
+ * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
14
+ */
15
+ filters: string[];
16
+ /**
17
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
18
+ */
19
+ userToken: string;
20
+ /**
21
+ * 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.
22
+ */
23
+ timestamp?: number;
24
+ /**
25
+ * User token for authenticated users.
26
+ */
27
+ authenticatedUserToken?: string;
28
+ };
29
+ //# sourceMappingURL=convertedFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertedFilters.d.ts","sourceRoot":"","sources":["../../model/convertedFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B;;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"}
@@ -0,0 +1,32 @@
1
+ import type { ConversionEvent } from './conversionEvent';
2
+ /**
3
+ * Use this event to track when users convert on items unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track conversion events related to Algolia requests, use the \"Converted object IDs after search\" event.
4
+ */
5
+ export type ConvertedObjectIDs = {
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.
8
+ */
9
+ eventName: string;
10
+ eventType: ConversionEvent;
11
+ /**
12
+ * Name of the Algolia index.
13
+ */
14
+ index: string;
15
+ /**
16
+ * List of object identifiers for items of an Algolia index.
17
+ */
18
+ objectIDs: string[];
19
+ /**
20
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
21
+ */
22
+ userToken: string;
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.
25
+ */
26
+ timestamp?: number;
27
+ /**
28
+ * User token for authenticated users.
29
+ */
30
+ authenticatedUserToken?: string;
31
+ };
32
+ //# sourceMappingURL=convertedObjectIDs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/convertedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B;;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"}
@@ -0,0 +1,36 @@
1
+ import type { ConversionEvent } from './conversionEvent';
2
+ /**
3
+ * Use this event to track when users convert after a previous Algolia request. For example, a user clicks on an item in the search results to view the product detail page. Then, the user adds the item to their shopping cart. If you\'re building your category pages with Algolia, you\'ll also use this event.
4
+ */
5
+ export type ConvertedObjectIDsAfterSearch = {
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.
8
+ */
9
+ eventName: string;
10
+ eventType: ConversionEvent;
11
+ /**
12
+ * Name of the Algolia index.
13
+ */
14
+ index: string;
15
+ /**
16
+ * List of object identifiers for items of an Algolia index.
17
+ */
18
+ objectIDs: string[];
19
+ /**
20
+ * 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.
21
+ */
22
+ queryID: string;
23
+ /**
24
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
25
+ */
26
+ userToken: string;
27
+ /**
28
+ * 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
+ */
30
+ timestamp?: number;
31
+ /**
32
+ * User token for authenticated users.
33
+ */
34
+ authenticatedUserToken?: string;
35
+ };
36
+ //# sourceMappingURL=convertedObjectIDsAfterSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertedObjectIDsAfterSearch.d.ts","sourceRoot":"","sources":["../../model/convertedObjectIDsAfterSearch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Absolute value of the discount in effect for this object, measured in `currency`.
3
+ */
4
+ export type Discount = number | string;
5
+ //# sourceMappingURL=discount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discount.d.ts","sourceRoot":"","sources":["../../model/discount.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -1,7 +1,7 @@
1
- /**
2
- * Error.
3
- */
4
- export declare type ErrorBase = Record<string, any> & {
5
- message?: string;
6
- };
1
+ /**
2
+ * Error.
3
+ */
4
+ export type ErrorBase = Record<string, any> & {
5
+ message?: string;
6
+ };
7
7
  //# sourceMappingURL=errorBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { AddedToCartObjectIDs } from './addedToCartObjectIDs';
2
+ import type { AddedToCartObjectIDsAfterSearch } from './addedToCartObjectIDsAfterSearch';
3
+ import type { ClickedFilters } from './clickedFilters';
4
+ import type { ClickedObjectIDs } from './clickedObjectIDs';
5
+ import type { ClickedObjectIDsAfterSearch } from './clickedObjectIDsAfterSearch';
6
+ import type { ConvertedFilters } from './convertedFilters';
7
+ import type { ConvertedObjectIDs } from './convertedObjectIDs';
8
+ import type { ConvertedObjectIDsAfterSearch } from './convertedObjectIDsAfterSearch';
9
+ import type { PurchasedObjectIDs } from './purchasedObjectIDs';
10
+ import type { PurchasedObjectIDsAfterSearch } from './purchasedObjectIDsAfterSearch';
11
+ import type { ViewedFilters } from './viewedFilters';
12
+ import type { ViewedObjectIDs } from './viewedObjectIDs';
13
+ export type EventsItems = AddedToCartObjectIDs | AddedToCartObjectIDsAfterSearch | ClickedFilters | ClickedObjectIDs | ClickedObjectIDsAfterSearch | ConvertedFilters | ConvertedObjectIDs | ConvertedObjectIDsAfterSearch | PurchasedObjectIDs | PurchasedObjectIDsAfterSearch | ViewedFilters | ViewedObjectIDs;
14
+ //# sourceMappingURL=eventsItems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventsItems.d.ts","sourceRoot":"","sources":["../../model/eventsItems.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,WAAW,GACnB,oBAAoB,GACpB,+BAA+B,GAC/B,cAAc,GACd,gBAAgB,GAChB,2BAA2B,GAC3B,gBAAgB,GAChB,kBAAkB,GAClB,6BAA6B,GAC7B,kBAAkB,GAClB,6BAA6B,GAC7B,aAAa,GACb,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The response of the Insights API.
3
+ */
4
+ export type EventsResponse = {
5
+ /**
6
+ * Details about the response, such as error messages.
7
+ */
8
+ message?: string;
9
+ /**
10
+ * The HTTP status code of the response.
11
+ */
12
+ status?: number;
13
+ };
14
+ //# sourceMappingURL=eventsResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventsResponse.d.ts","sourceRoot":"","sources":["../../model/eventsResponse.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,7 +1,27 @@
1
- export * from './errorBase';
2
- export * from './eventType';
3
- export * from './insightEvent';
4
- export * from './insightEvents';
5
- export * from './pushEventsResponse';
6
- export * from './clientMethodProps';
1
+ export * from './addToCartEvent';
2
+ export * from './addedToCartObjectIDs';
3
+ export * from './addedToCartObjectIDsAfterSearch';
4
+ export * from './clickEvent';
5
+ export * from './clickedFilters';
6
+ export * from './clickedObjectIDs';
7
+ export * from './clickedObjectIDsAfterSearch';
8
+ export * from './conversionEvent';
9
+ export * from './convertedFilters';
10
+ export * from './convertedObjectIDs';
11
+ export * from './convertedObjectIDsAfterSearch';
12
+ export * from './discount';
13
+ export * from './errorBase';
14
+ export * from './eventsItems';
15
+ export * from './eventsResponse';
16
+ export * from './insightsEvents';
17
+ export * from './objectData';
18
+ export * from './objectDataAfterSearch';
19
+ export * from './price';
20
+ export * from './purchaseEvent';
21
+ export * from './purchasedObjectIDs';
22
+ export * from './purchasedObjectIDsAfterSearch';
23
+ export * from './viewEvent';
24
+ export * from './viewedFilters';
25
+ export * from './viewedObjectIDs';
26
+ export * from './clientMethodProps';
7
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { EventsItems } from './eventsItems';
2
+ export type InsightsEvents = {
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. 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.
5
+ */
6
+ events: EventsItems[];
7
+ };
8
+ //# sourceMappingURL=insightsEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insightsEvents.d.ts","sourceRoot":"","sources":["../../model/insightsEvents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Discount } from './discount';
2
+ import type { Price } from './price';
3
+ export type ObjectData = {
4
+ price?: Price;
5
+ /**
6
+ * 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.
7
+ */
8
+ quantity?: number;
9
+ discount?: Discount;
10
+ };
11
+ //# sourceMappingURL=objectData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectData.d.ts","sourceRoot":"","sources":["../../model/objectData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Discount } from './discount';
2
+ import type { Price } from './price';
3
+ export type ObjectDataAfterSearch = {
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.
6
+ */
7
+ queryID?: string;
8
+ price?: Price;
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.
11
+ */
12
+ quantity?: number;
13
+ discount?: Discount;
14
+ };
15
+ //# sourceMappingURL=objectDataAfterSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectDataAfterSearch.d.ts","sourceRoot":"","sources":["../../model/objectDataAfterSearch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The price of the item. This should be the final price, inclusive of any discounts in effect.
3
+ */
4
+ export type Price = number | string;
5
+ //# sourceMappingURL=price.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../../model/price.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type PurchaseEvent = 'purchase';
2
+ //# sourceMappingURL=purchaseEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purchaseEvent.d.ts","sourceRoot":"","sources":["../../model/purchaseEvent.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { ConversionEvent } from './conversionEvent';
2
+ import type { ObjectData } from './objectData';
3
+ import type { PurchaseEvent } from './purchaseEvent';
4
+ /**
5
+ * 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
+ export type PurchasedObjectIDs = {
8
+ /**
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
+ */
11
+ eventName: string;
12
+ eventType: ConversionEvent;
13
+ eventSubtype: PurchaseEvent;
14
+ /**
15
+ * Name of the Algolia index.
16
+ */
17
+ index: string;
18
+ /**
19
+ * List of object identifiers for items of an Algolia index.
20
+ */
21
+ objectIDs: string[];
22
+ /**
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
+ */
25
+ objectData?: ObjectData[];
26
+ /**
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
+ */
29
+ currency?: string;
30
+ /**
31
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
32
+ */
33
+ userToken: string;
34
+ /**
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
+ */
37
+ timestamp?: number;
38
+ /**
39
+ * User token for authenticated users.
40
+ */
41
+ authenticatedUserToken?: string;
42
+ };
43
+ //# sourceMappingURL=purchasedObjectIDs.d.ts.map
@@ -0,0 +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"}