@algolia/client-insights 5.0.0-alpha.72 → 5.0.0-alpha.75

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 (64) hide show
  1. package/dist/client-insights.cjs.js +20 -22
  2. package/dist/client-insights.esm.browser.js +20 -20
  3. package/dist/client-insights.esm.node.js +20 -20
  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/clientMethodProps.d.ts +10 -10
  14. package/dist/model/conversionEvent.d.ts +2 -0
  15. package/dist/model/conversionEvent.d.ts.map +1 -0
  16. package/dist/model/convertedFilters.d.ts +25 -0
  17. package/dist/model/convertedFilters.d.ts.map +1 -0
  18. package/dist/model/convertedObjectIDs.d.ts +28 -0
  19. package/dist/model/convertedObjectIDs.d.ts.map +1 -0
  20. package/dist/model/convertedObjectIDsAfterSearch.d.ts +32 -0
  21. package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +1 -0
  22. package/dist/model/eventsItems.d.ts +10 -0
  23. package/dist/model/eventsItems.d.ts.map +1 -0
  24. package/dist/model/eventsResponse.d.ts +14 -0
  25. package/dist/model/eventsResponse.d.ts.map +1 -0
  26. package/dist/model/index.d.ts +14 -4
  27. package/dist/model/index.d.ts.map +1 -1
  28. package/dist/model/insightsEvents.d.ts +8 -0
  29. package/dist/model/insightsEvents.d.ts.map +1 -0
  30. package/dist/model/viewEvent.d.ts +2 -0
  31. package/dist/model/viewEvent.d.ts.map +1 -0
  32. package/dist/model/viewedFilters.d.ts +28 -0
  33. package/dist/model/viewedFilters.d.ts.map +1 -0
  34. package/dist/model/viewedObjectIDs.d.ts +28 -0
  35. package/dist/model/viewedObjectIDs.d.ts.map +1 -0
  36. package/dist/src/insightsClient.d.ts +17 -17
  37. package/dist/src/insightsClient.d.ts.map +1 -1
  38. package/model/{eventType.ts → clickEvent.ts} +1 -1
  39. package/model/clickedFilters.ts +35 -0
  40. package/model/clickedObjectIDs.ts +35 -0
  41. package/model/clickedObjectIDsAfterSearch.ts +45 -0
  42. package/model/clientMethodProps.ts +10 -10
  43. package/model/{pushEventsResponse.ts → conversionEvent.ts} +1 -6
  44. package/model/convertedFilters.ts +32 -0
  45. package/model/convertedObjectIDs.ts +35 -0
  46. package/model/convertedObjectIDsAfterSearch.ts +40 -0
  47. package/model/eventsItems.ts +20 -0
  48. package/model/eventsResponse.ts +16 -0
  49. package/model/index.ts +14 -4
  50. package/model/insightsEvents.ts +10 -0
  51. package/model/viewEvent.ts +3 -0
  52. package/model/viewedFilters.ts +35 -0
  53. package/model/viewedObjectIDs.ts +35 -0
  54. package/package.json +8 -7
  55. package/dist/model/eventType.d.ts +0 -2
  56. package/dist/model/eventType.d.ts.map +0 -1
  57. package/dist/model/insightEvent.d.ts +0 -40
  58. package/dist/model/insightEvent.d.ts.map +0 -1
  59. package/dist/model/insightEvents.d.ts +0 -11
  60. package/dist/model/insightEvents.d.ts.map +0 -1
  61. package/dist/model/pushEventsResponse.d.ts +0 -7
  62. package/dist/model/pushEventsResponse.d.ts.map +0 -1
  63. package/model/insightEvent.ts +0 -50
  64. package/model/insightEvents.ts +0 -13
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,10 +1,11 @@
1
1
  {
2
2
  "name": "@algolia/client-insights",
3
- "version": "5.0.0-alpha.72",
3
+ "version": "5.0.0-alpha.75",
4
4
  "description": "JavaScript client for client-insights",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
7
7
  "author": "Algolia",
8
+ "type": "module",
8
9
  "exports": {
9
10
  ".": {
10
11
  "node": {
@@ -38,14 +39,14 @@
38
39
  "clean": "rm -rf ./dist || true"
39
40
  },
40
41
  "dependencies": {
41
- "@algolia/client-common": "5.0.0-alpha.72",
42
- "@algolia/requester-browser-xhr": "5.0.0-alpha.72",
43
- "@algolia/requester-node-http": "5.0.0-alpha.72"
42
+ "@algolia/client-common": "5.0.0-alpha.75",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.75",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.75"
44
45
  },
45
46
  "devDependencies": {
46
- "@types/node": "18.16.18",
47
- "rollup": "2.79.1",
48
- "typescript": "5.0.4"
47
+ "@types/node": "18.17.0",
48
+ "rollup": "3.26.3",
49
+ "typescript": "5.1.6"
49
50
  },
50
51
  "engines": {
51
52
  "node": ">= 14.0.0"
@@ -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
- };