@algolia/client-insights 5.0.0-alpha.71 → 5.0.0-alpha.73

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.js +10 -10
  2. package/dist/client-insights.esm.browser.js +10 -10
  3. package/dist/client-insights.esm.node.js +10 -10
  4. package/dist/client-insights.umd.js +2 -2
  5. package/dist/model/clickEvent.d.ts +2 -0
  6. package/dist/model/clickEvent.d.ts.map +1 -0
  7. package/dist/model/clickedFilters.d.ts +28 -0
  8. package/dist/model/clickedFilters.d.ts.map +1 -0
  9. package/dist/model/clickedObjectIDs.d.ts +28 -0
  10. package/dist/model/clickedObjectIDs.d.ts.map +1 -0
  11. package/dist/model/clickedObjectIDsAfterSearch.d.ts +36 -0
  12. package/dist/model/clickedObjectIDsAfterSearch.d.ts.map +1 -0
  13. package/dist/model/conversionEvent.d.ts +2 -0
  14. package/dist/model/conversionEvent.d.ts.map +1 -0
  15. package/dist/model/convertedFilters.d.ts +25 -0
  16. package/dist/model/convertedFilters.d.ts.map +1 -0
  17. package/dist/model/convertedObjectIDs.d.ts +28 -0
  18. package/dist/model/convertedObjectIDs.d.ts.map +1 -0
  19. package/dist/model/convertedObjectIDsAfterSearch.d.ts +32 -0
  20. package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +1 -0
  21. package/dist/model/eventsItems.d.ts +10 -0
  22. package/dist/model/eventsItems.d.ts.map +1 -0
  23. package/dist/model/eventsResponse.d.ts +14 -0
  24. package/dist/model/eventsResponse.d.ts.map +1 -0
  25. package/dist/model/index.d.ts +14 -4
  26. package/dist/model/index.d.ts.map +1 -1
  27. package/dist/model/insightsEvents.d.ts +8 -0
  28. package/dist/model/insightsEvents.d.ts.map +1 -0
  29. package/dist/model/viewEvent.d.ts +2 -0
  30. package/dist/model/viewEvent.d.ts.map +1 -0
  31. package/dist/model/viewedFilters.d.ts +28 -0
  32. package/dist/model/viewedFilters.d.ts.map +1 -0
  33. package/dist/model/viewedObjectIDs.d.ts +28 -0
  34. package/dist/model/viewedObjectIDs.d.ts.map +1 -0
  35. package/dist/src/insightsClient.d.ts +7 -7
  36. package/dist/src/insightsClient.d.ts.map +1 -1
  37. package/model/{eventType.ts → clickEvent.ts} +1 -1
  38. package/model/clickedFilters.ts +35 -0
  39. package/model/clickedObjectIDs.ts +35 -0
  40. package/model/clickedObjectIDsAfterSearch.ts +45 -0
  41. package/model/{pushEventsResponse.ts → conversionEvent.ts} +1 -6
  42. package/model/convertedFilters.ts +32 -0
  43. package/model/convertedObjectIDs.ts +35 -0
  44. package/model/convertedObjectIDsAfterSearch.ts +40 -0
  45. package/model/eventsItems.ts +20 -0
  46. package/model/eventsResponse.ts +16 -0
  47. package/model/index.ts +14 -4
  48. package/model/insightsEvents.ts +10 -0
  49. package/model/viewEvent.ts +3 -0
  50. package/model/viewedFilters.ts +35 -0
  51. package/model/viewedObjectIDs.ts +35 -0
  52. package/package.json +4 -4
  53. package/dist/model/eventType.d.ts +0 -2
  54. package/dist/model/eventType.d.ts.map +0 -1
  55. package/dist/model/insightEvent.d.ts +0 -40
  56. package/dist/model/insightEvent.d.ts.map +0 -1
  57. package/dist/model/insightEvents.d.ts +0 -11
  58. package/dist/model/insightEvents.d.ts.map +0 -1
  59. package/dist/model/pushEventsResponse.d.ts +0 -7
  60. package/dist/model/pushEventsResponse.d.ts.map +0 -1
  61. package/model/insightEvent.ts +0 -50
  62. package/model/insightEvents.ts +0 -13
@@ -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,aAAa,EAAE,MAAM,wBAAwB,CAAC;A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;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,3 +1,3 @@
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
- export type EventType = 'click' | 'conversion' | 'view';
3
+ export type ClickEvent = 'click';
@@ -0,0 +1,35 @@
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
+ import type { ClickEvent } from './clickEvent';
4
+
5
+ /**
6
+ * Use this event to track when users click facet filters in your user interface.
7
+ */
8
+ export type ClickedFilters = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ClickEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
23
+ */
24
+ filters: string[];
25
+
26
+ /**
27
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ */
29
+ userToken: string;
30
+
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
+ };
@@ -0,0 +1,35 @@
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
+ import type { ClickEvent } from './clickEvent';
4
+
5
+ /**
6
+ * 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.
7
+ */
8
+ export type ClickedObjectIDs = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ClickEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * List of object identifiers for items of an Algolia index.
23
+ */
24
+ objectIDs: string[];
25
+
26
+ /**
27
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ */
29
+ userToken: string;
30
+
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
+ };
@@ -0,0 +1,45 @@
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
+ import type { ClickEvent } from './clickEvent';
4
+
5
+ /**
6
+ * 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.
7
+ */
8
+ export type ClickedObjectIDsAfterSearch = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ClickEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * List of object identifiers for items of an Algolia index.
23
+ */
24
+ objectIDs: string[];
25
+
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`.
28
+ */
29
+ positions: number[];
30
+
31
+ /**
32
+ * 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.
33
+ */
34
+ queryID: string;
35
+
36
+ /**
37
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
38
+ */
39
+ userToken: string;
40
+
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.
43
+ */
44
+ timestamp?: number;
45
+ };
@@ -1,8 +1,3 @@
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
- export type PushEventsResponse = {
4
- /**
5
- * A message confirming the event push.
6
- */
7
- message: string;
8
- };
3
+ export type ConversionEvent = 'conversion';
@@ -0,0 +1,32 @@
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
+ import type { ConversionEvent } from './conversionEvent';
4
+
5
+ export type ConvertedFilters = {
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
+
11
+ eventType: ConversionEvent;
12
+
13
+ /**
14
+ * Name of the Algolia index.
15
+ */
16
+ index: string;
17
+
18
+ /**
19
+ * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
20
+ */
21
+ filters: string[];
22
+
23
+ /**
24
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
25
+ */
26
+ userToken: string;
27
+
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.
30
+ */
31
+ timestamp?: number;
32
+ };
@@ -0,0 +1,35 @@
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
+ import type { ConversionEvent } from './conversionEvent';
4
+
5
+ /**
6
+ * 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.
7
+ */
8
+ export type ConvertedObjectIDs = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ConversionEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * List of object identifiers for items of an Algolia index.
23
+ */
24
+ objectIDs: string[];
25
+
26
+ /**
27
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ */
29
+ userToken: string;
30
+
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
+ };
@@ -0,0 +1,40 @@
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
+ import type { ConversionEvent } from './conversionEvent';
4
+
5
+ /**
6
+ * 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.
7
+ */
8
+ export type ConvertedObjectIDsAfterSearch = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ConversionEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * List of object identifiers for items of an Algolia index.
23
+ */
24
+ objectIDs: string[];
25
+
26
+ /**
27
+ * 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.
28
+ */
29
+ queryID: string;
30
+
31
+ /**
32
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
33
+ */
34
+ userToken: string;
35
+
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.
38
+ */
39
+ timestamp?: number;
40
+ };
@@ -0,0 +1,20 @@
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
+ 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 { ViewedFilters } from './viewedFilters';
10
+ import type { ViewedObjectIDs } from './viewedObjectIDs';
11
+
12
+ export type EventsItems =
13
+ | ClickedFilters
14
+ | ClickedObjectIDs
15
+ | ClickedObjectIDsAfterSearch
16
+ | ConvertedFilters
17
+ | ConvertedObjectIDs
18
+ | ConvertedObjectIDsAfterSearch
19
+ | ViewedFilters
20
+ | ViewedObjectIDs;
@@ -0,0 +1,16 @@
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
+ * The response of the Insights API.
5
+ */
6
+ export type EventsResponse = {
7
+ /**
8
+ * Details about the response, such as error messages.
9
+ */
10
+ message?: string;
11
+
12
+ /**
13
+ * The HTTP status code of the response.
14
+ */
15
+ status?: number;
16
+ };
package/model/index.ts CHANGED
@@ -1,8 +1,18 @@
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
+ export * from './clickEvent';
4
+ export * from './clickedFilters';
5
+ export * from './clickedObjectIDs';
6
+ export * from './clickedObjectIDsAfterSearch';
7
+ export * from './conversionEvent';
8
+ export * from './convertedFilters';
9
+ export * from './convertedObjectIDs';
10
+ export * from './convertedObjectIDsAfterSearch';
3
11
  export * from './errorBase';
4
- export * from './eventType';
5
- export * from './insightEvent';
6
- export * from './insightEvents';
7
- export * from './pushEventsResponse';
12
+ export * from './eventsItems';
13
+ export * from './eventsResponse';
14
+ export * from './insightsEvents';
15
+ export * from './viewEvent';
16
+ export * from './viewedFilters';
17
+ export * from './viewedObjectIDs';
8
18
  export * from './clientMethodProps';
@@ -0,0 +1,10 @@
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
+ import type { EventsItems } from './eventsItems';
4
+
5
+ export type InsightsEvents = {
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.
8
+ */
9
+ events: EventsItems[];
10
+ };
@@ -0,0 +1,3 @@
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
+ export type ViewEvent = 'view';
@@ -0,0 +1,35 @@
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
+ import type { ViewEvent } from './viewEvent';
4
+
5
+ /**
6
+ * Use this method to capture active filters. For example, when browsing a category page, users see content filtered on that specific category.
7
+ */
8
+ export type ViewedFilters = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ViewEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
23
+ */
24
+ filters: string[];
25
+
26
+ /**
27
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ */
29
+ userToken: string;
30
+
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
+ };
@@ -0,0 +1,35 @@
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
+ import type { ViewEvent } from './viewEvent';
4
+
5
+ /**
6
+ * Use this event to track when users viewed items in the search results.
7
+ */
8
+ export type ViewedObjectIDs = {
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.
11
+ */
12
+ eventName: string;
13
+
14
+ eventType: ViewEvent;
15
+
16
+ /**
17
+ * Name of the Algolia index.
18
+ */
19
+ index: string;
20
+
21
+ /**
22
+ * List of object identifiers for items of an Algolia index.
23
+ */
24
+ objectIDs: string[];
25
+
26
+ /**
27
+ * Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
28
+ */
29
+ userToken: string;
30
+
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-insights",
3
- "version": "5.0.0-alpha.71",
3
+ "version": "5.0.0-alpha.73",
4
4
  "description": "JavaScript client for client-insights",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -38,9 +38,9 @@
38
38
  "clean": "rm -rf ./dist || true"
39
39
  },
40
40
  "dependencies": {
41
- "@algolia/client-common": "5.0.0-alpha.71",
42
- "@algolia/requester-browser-xhr": "5.0.0-alpha.71",
43
- "@algolia/requester-node-http": "5.0.0-alpha.71"
41
+ "@algolia/client-common": "5.0.0-alpha.73",
42
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.73",
43
+ "@algolia/requester-node-http": "5.0.0-alpha.73"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "18.16.18",
@@ -1,2 +0,0 @@
1
- export type EventType = 'click' | 'conversion' | 'view';
2
- //# sourceMappingURL=eventType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventType.d.ts","sourceRoot":"","sources":["../../model/eventType.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC"}
@@ -1,40 +0,0 @@
1
- import type { EventType } from './eventType';
2
- /**
3
- * Insights event.
4
- */
5
- export type InsightEvent = {
6
- eventType: EventType;
7
- /**
8
- * A user-defined string used to categorize events.
9
- */
10
- eventName: string;
11
- /**
12
- * Name of the targeted index.
13
- */
14
- index: string;
15
- /**
16
- * A user identifier. Depending if the user is logged-in or not, several strategies can be used from a sessionId to a technical identifier. You should always send pseudonymous or anonymous userTokens.
17
- */
18
- userToken: string;
19
- /**
20
- * Time of the event expressed in milliseconds since the Unix epoch.
21
- */
22
- timestamp?: number;
23
- /**
24
- * Algolia queryID. This is required when an event is tied to a search.
25
- */
26
- queryID?: string;
27
- /**
28
- * An array of index objectID. Limited to 20 objects. An event can’t have both objectIDs and filters at the same time.
29
- */
30
- objectIDs?: string[];
31
- /**
32
- * An array of filters. Limited to 10 filters. An event can’t have both objectIDs and filters at the same time.
33
- */
34
- filters?: string[];
35
- /**
36
- * Position of the click in the list of Algolia search results. This field is required if a queryID is provided. One position must be provided for each objectID.
37
- */
38
- positions?: number[];
39
- };
40
- //# sourceMappingURL=insightEvent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"insightEvent.d.ts","sourceRoot":"","sources":["../../model/insightEvent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { InsightEvent } from './insightEvent';
2
- /**
3
- * Object containing the events sent.
4
- */
5
- export type InsightEvents = {
6
- /**
7
- * Array of events sent.
8
- */
9
- events: InsightEvent[];
10
- };
11
- //# sourceMappingURL=insightEvents.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"insightEvents.d.ts","sourceRoot":"","sources":["../../model/insightEvents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB,CAAC"}
@@ -1,7 +0,0 @@
1
- export type PushEventsResponse = {
2
- /**
3
- * A message confirming the event push.
4
- */
5
- message: string;
6
- };
7
- //# sourceMappingURL=pushEventsResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pushEventsResponse.d.ts","sourceRoot":"","sources":["../../model/pushEventsResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,50 +0,0 @@
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
- import type { EventType } from './eventType';
4
-
5
- /**
6
- * Insights event.
7
- */
8
- export type InsightEvent = {
9
- eventType: EventType;
10
-
11
- /**
12
- * A user-defined string used to categorize events.
13
- */
14
- eventName: string;
15
-
16
- /**
17
- * Name of the targeted index.
18
- */
19
- index: string;
20
-
21
- /**
22
- * A user identifier. Depending if the user is logged-in or not, several strategies can be used from a sessionId to a technical identifier. You should always send pseudonymous or anonymous userTokens.
23
- */
24
- userToken: string;
25
-
26
- /**
27
- * Time of the event expressed in milliseconds since the Unix epoch.
28
- */
29
- timestamp?: number;
30
-
31
- /**
32
- * Algolia queryID. This is required when an event is tied to a search.
33
- */
34
- queryID?: string;
35
-
36
- /**
37
- * An array of index objectID. Limited to 20 objects. An event can’t have both objectIDs and filters at the same time.
38
- */
39
- objectIDs?: string[];
40
-
41
- /**
42
- * An array of filters. Limited to 10 filters. An event can’t have both objectIDs and filters at the same time.
43
- */
44
- filters?: string[];
45
-
46
- /**
47
- * Position of the click in the list of Algolia search results. This field is required if a queryID is provided. One position must be provided for each objectID.
48
- */
49
- positions?: number[];
50
- };
@@ -1,13 +0,0 @@
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
- import type { InsightEvent } from './insightEvent';
4
-
5
- /**
6
- * Object containing the events sent.
7
- */
8
- export type InsightEvents = {
9
- /**
10
- * Array of events sent.
11
- */
12
- events: InsightEvent[];
13
- };