@algolia/client-insights 5.0.0-alpha.8 → 5.0.0-alpha.81

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 (75) 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 +397 -445
  7. package/dist/client-insights.esm.node.js +214 -214
  8. package/dist/client-insights.umd.js +2 -2
  9. package/dist/model/clickEvent.d.ts +2 -0
  10. package/dist/model/clickEvent.d.ts.map +1 -0
  11. package/dist/model/clickedFilters.d.ts +28 -0
  12. package/dist/model/clickedFilters.d.ts.map +1 -0
  13. package/dist/model/clickedObjectIDs.d.ts +28 -0
  14. package/dist/model/clickedObjectIDs.d.ts.map +1 -0
  15. package/dist/model/clickedObjectIDsAfterSearch.d.ts +36 -0
  16. package/dist/model/clickedObjectIDsAfterSearch.d.ts.map +1 -0
  17. package/dist/model/clientMethodProps.d.ts +60 -60
  18. package/dist/model/clientMethodProps.d.ts.map +1 -1
  19. package/dist/model/conversionEvent.d.ts +2 -0
  20. package/dist/model/conversionEvent.d.ts.map +1 -0
  21. package/dist/model/convertedFilters.d.ts +25 -0
  22. package/dist/model/convertedFilters.d.ts.map +1 -0
  23. package/dist/model/convertedObjectIDs.d.ts +28 -0
  24. package/dist/model/convertedObjectIDs.d.ts.map +1 -0
  25. package/dist/model/convertedObjectIDsAfterSearch.d.ts +32 -0
  26. package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +1 -0
  27. package/dist/model/errorBase.d.ts +6 -6
  28. package/dist/model/errorBase.d.ts.map +1 -1
  29. package/dist/model/eventsItems.d.ts +10 -0
  30. package/dist/model/eventsItems.d.ts.map +1 -0
  31. package/dist/model/eventsResponse.d.ts +14 -0
  32. package/dist/model/eventsResponse.d.ts.map +1 -0
  33. package/dist/model/index.d.ts +16 -6
  34. package/dist/model/index.d.ts.map +1 -1
  35. package/dist/model/insightsEvents.d.ts +8 -0
  36. package/dist/model/insightsEvents.d.ts.map +1 -0
  37. package/dist/model/viewEvent.d.ts +2 -0
  38. package/dist/model/viewEvent.d.ts.map +1 -0
  39. package/dist/model/viewedFilters.d.ts +28 -0
  40. package/dist/model/viewedFilters.d.ts.map +1 -0
  41. package/dist/model/viewedObjectIDs.d.ts +28 -0
  42. package/dist/model/viewedObjectIDs.d.ts.map +1 -0
  43. package/dist/src/insightsClient.d.ts +85 -85
  44. package/dist/src/insightsClient.d.ts.map +1 -1
  45. package/index.js +1 -1
  46. package/model/clickEvent.ts +3 -0
  47. package/model/clickedFilters.ts +35 -0
  48. package/model/clickedObjectIDs.ts +35 -0
  49. package/model/clickedObjectIDsAfterSearch.ts +45 -0
  50. package/model/clientMethodProps.ts +11 -11
  51. package/model/conversionEvent.ts +3 -0
  52. package/model/convertedFilters.ts +32 -0
  53. package/model/convertedObjectIDs.ts +35 -0
  54. package/model/convertedObjectIDsAfterSearch.ts +40 -0
  55. package/model/errorBase.ts +1 -1
  56. package/model/eventsItems.ts +20 -0
  57. package/model/eventsResponse.ts +16 -0
  58. package/model/index.ts +15 -5
  59. package/model/insightsEvents.ts +10 -0
  60. package/model/viewEvent.ts +3 -0
  61. package/model/viewedFilters.ts +35 -0
  62. package/model/viewedObjectIDs.ts +35 -0
  63. package/package.json +30 -13
  64. package/dist/model/eventType.d.ts +0 -2
  65. package/dist/model/eventType.d.ts.map +0 -1
  66. package/dist/model/insightEvent.d.ts +0 -40
  67. package/dist/model/insightEvent.d.ts.map +0 -1
  68. package/dist/model/insightEvents.d.ts +0 -11
  69. package/dist/model/insightEvents.d.ts.map +0 -1
  70. package/dist/model/pushEventsResponse.d.ts +0 -7
  71. package/dist/model/pushEventsResponse.d.ts.map +0 -1
  72. package/model/eventType.ts +0 -3
  73. package/model/insightEvent.ts +0 -50
  74. package/model/insightEvents.ts +0 -13
  75. package/model/pushEventsResponse.ts +0 -8
@@ -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,25 @@
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
+ //# 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;CACpB,CAAC"}
@@ -0,0 +1,28 @@
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
+ //# 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;CACpB,CAAC"}
@@ -0,0 +1,32 @@
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
+ //# 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;CACpB,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,10 @@
1
+ import type { ClickedFilters } from './clickedFilters';
2
+ import type { ClickedObjectIDs } from './clickedObjectIDs';
3
+ import type { ClickedObjectIDsAfterSearch } from './clickedObjectIDsAfterSearch';
4
+ import type { ConvertedFilters } from './convertedFilters';
5
+ import type { ConvertedObjectIDs } from './convertedObjectIDs';
6
+ import type { ConvertedObjectIDsAfterSearch } from './convertedObjectIDsAfterSearch';
7
+ import type { ViewedFilters } from './viewedFilters';
8
+ import type { ViewedObjectIDs } from './viewedObjectIDs';
9
+ export type EventsItems = ClickedFilters | ClickedObjectIDs | ClickedObjectIDsAfterSearch | ConvertedFilters | ConvertedObjectIDs | ConvertedObjectIDsAfterSearch | ViewedFilters | ViewedObjectIDs;
10
+ //# 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,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,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,gBAAgB,GAChB,2BAA2B,GAC3B,gBAAgB,GAChB,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,17 @@
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 './clickEvent';
2
+ export * from './clickedFilters';
3
+ export * from './clickedObjectIDs';
4
+ export * from './clickedObjectIDsAfterSearch';
5
+ export * from './conversionEvent';
6
+ export * from './convertedFilters';
7
+ export * from './convertedObjectIDs';
8
+ export * from './convertedObjectIDsAfterSearch';
9
+ export * from './errorBase';
10
+ export * from './eventsItems';
11
+ export * from './eventsResponse';
12
+ export * from './insightsEvents';
13
+ export * from './viewEvent';
14
+ export * from './viewedFilters';
15
+ export * from './viewedObjectIDs';
16
+ export * from './clientMethodProps';
7
17
  //# 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,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,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,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,2 @@
1
+ export type ViewEvent = 'view';
2
+ //# sourceMappingURL=viewEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewEvent.d.ts","sourceRoot":"","sources":["../../model/viewEvent.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { ViewEvent } from './viewEvent';
2
+ /**
3
+ * Use this method to capture active filters. For example, when browsing a category page, users see content filtered on that specific category.
4
+ */
5
+ export type ViewedFilters = {
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: ViewEvent;
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
+ //# sourceMappingURL=viewedFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewedFilters.d.ts","sourceRoot":"","sources":["../../model/viewedFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { ViewEvent } from './viewEvent';
2
+ /**
3
+ * Use this event to track when users viewed items in the search results.
4
+ */
5
+ export type ViewedObjectIDs = {
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: ViewEvent;
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=viewedObjectIDs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewedObjectIDs.d.ts","sourceRoot":"","sources":["../../model/viewedObjectIDs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,86 +1,86 @@
1
- import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { DelProps, GetProps, PostProps, PutProps } from '../model/clientMethodProps';
3
- import type { InsightEvents } from '../model/insightEvents';
4
- import type { PushEventsResponse } from '../model/pushEventsResponse';
5
- export declare const apiClientVersion = "5.0.0-alpha.8";
6
- export declare const REGIONS: readonly ["de", "us"];
7
- export declare type Region = typeof REGIONS[number];
8
- export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
9
- region?: Region;
10
- }): {
11
- transporter: import("@algolia/client-common").Transporter;
12
- /**
13
- * The `appId` currently in use.
14
- */
15
- appId: string;
16
- /**
17
- * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
18
- */
19
- clearCache(): Promise<void>;
20
- /**
21
- * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
22
- */
23
- readonly _ua: string;
24
- /**
25
- * Adds a `segment` to the `x-algolia-agent` sent with every requests.
26
- *
27
- * @param segment - The algolia agent (user-agent) segment to add.
28
- * @param version - The version of the agent.
29
- */
30
- addAlgoliaAgent(segment: string, version?: string): void;
31
- /**
32
- * This method allow you to send requests to the Algolia REST API.
33
- *
34
- * @summary Send requests to the Algolia REST API.
35
- * @param del - The del object.
36
- * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
37
- * @param del.parameters - Query parameters to be applied to the current query.
38
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
39
- */
40
- del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
41
- /**
42
- * This method allow you to send requests to the Algolia REST API.
43
- *
44
- * @summary Send requests to the Algolia REST API.
45
- * @param get - The get object.
46
- * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
47
- * @param get.parameters - Query parameters to be applied to the current query.
48
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
49
- */
50
- get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
51
- /**
52
- * This method allow you to send requests to the Algolia REST API.
53
- *
54
- * @summary Send requests to the Algolia REST API.
55
- * @param post - The post object.
56
- * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
57
- * @param post.parameters - Query parameters to be applied to the current query.
58
- * @param post.body - The parameters to send with the custom request.
59
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
- */
61
- post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
- /**
63
- * This command pushes an array of events. An event is - an action: `eventName` - performed in a context: `eventType` - at some point in time provided: `timestamp` - by an end user: `userToken` - on something: `index` Notes: - To be accepted, all events sent must be valid. - The size of the body must be *less than 2 MB*. - When an event is tied to an Algolia search, it must also provide a `queryID`. If that event is a `click`, their absolute `positions` should also be passed. - We consider that an `index` provides access to 2 resources: objects and filters. An event can only interact with a single resource type, but not necessarily on a single item. As such an event will accept an array of `objectIDs` or `filters`.
64
- *
65
- * @summary Push events.
66
- * @param insightEvents - The insightEvents object.
67
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
68
- */
69
- pushEvents(insightEvents: InsightEvents, requestOptions?: RequestOptions): Promise<PushEventsResponse>;
70
- /**
71
- * This method allow you to send requests to the Algolia REST API.
72
- *
73
- * @summary Send requests to the Algolia REST API.
74
- * @param put - The put object.
75
- * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
76
- * @param put.parameters - Query parameters to be applied to the current query.
77
- * @param put.body - The parameters to send with the custom request.
78
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
79
- */
80
- put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
81
- };
82
- /**
83
- * The client type.
84
- */
85
- export declare type InsightsClient = ReturnType<typeof createInsightsClient>;
1
+ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
+ import type { DelProps, GetProps, PostProps, PutProps } from '../model/clientMethodProps';
3
+ import type { EventsResponse } from '../model/eventsResponse';
4
+ import type { InsightsEvents } from '../model/insightsEvents';
5
+ export declare const apiClientVersion = "5.0.0-alpha.81";
6
+ export declare const REGIONS: readonly ["de", "us"];
7
+ export type Region = (typeof REGIONS)[number];
8
+ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
9
+ region?: Region;
10
+ }): {
11
+ transporter: import("@algolia/client-common").Transporter;
12
+ /**
13
+ * The `appId` currently in use.
14
+ */
15
+ appId: string;
16
+ /**
17
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
18
+ */
19
+ clearCache(): Promise<void>;
20
+ /**
21
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
22
+ */
23
+ readonly _ua: string;
24
+ /**
25
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
26
+ *
27
+ * @param segment - The algolia agent (user-agent) segment to add.
28
+ * @param version - The version of the agent.
29
+ */
30
+ addAlgoliaAgent(segment: string, version?: string): void;
31
+ /**
32
+ * This method allow you to send requests to the Algolia REST API.
33
+ *
34
+ * @summary Send requests to the Algolia REST API.
35
+ * @param del - The del object.
36
+ * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
37
+ * @param del.parameters - Query parameters to apply to the current query.
38
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
39
+ */
40
+ del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
41
+ /**
42
+ * This method allow you to send requests to the Algolia REST API.
43
+ *
44
+ * @summary Send requests to the Algolia REST API.
45
+ * @param get - The get object.
46
+ * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
47
+ * @param get.parameters - Query parameters to apply to the current query.
48
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
49
+ */
50
+ get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
51
+ /**
52
+ * This method allow you to send requests to the Algolia REST API.
53
+ *
54
+ * @summary Send requests to the Algolia REST API.
55
+ * @param post - The post object.
56
+ * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
57
+ * @param post.parameters - Query parameters to apply to the current query.
58
+ * @param post.body - Parameters to send with the custom request.
59
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
+ */
61
+ post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
+ /**
63
+ * Send a list of events to the Insights API. You can include up to 1,000 events in a single request, but the request body must be smaller than 2&nbsp;MB.
64
+ *
65
+ * @summary Send events.
66
+ * @param insightsEvents - The insightsEvents object.
67
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
68
+ */
69
+ pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise<EventsResponse>;
70
+ /**
71
+ * This method allow you to send requests to the Algolia REST API.
72
+ *
73
+ * @summary Send requests to the Algolia REST API.
74
+ * @param put - The put object.
75
+ * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
76
+ * @param put.parameters - Query parameters to apply to the current query.
77
+ * @param put.body - Parameters to send with the custom request.
78
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
79
+ */
80
+ put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
81
+ };
82
+ /**
83
+ * The client type.
84
+ */
85
+ export type InsightsClient = ReturnType<typeof createInsightsClient>;
86
86
  //# sourceMappingURL=insightsClient.d.ts.map
@@ -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;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,oBAAY,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAW5C,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;OAMG;8BAEc,aAAa,mBACX,cAAc,GAC9B,QAAQ,kBAAkB,CAAC;IA4B9B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;EAoBlC;AAED;;GAEG;AACH,oBAAY,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"insightsClient.d.ts","sourceRoot":"","sources":["../../src/insightsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAW9C,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;OAMG;+BAEe,cAAc,mBACb,cAAc,GAC9B,QAAQ,cAAc,CAAC;IA4B1B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;EAoBlC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // eslint-disable-next-line import/no-commonjs,import/extensions
2
- module.exports = require('./dist/client-insights.cjs.js');
2
+ module.exports = require('./dist/client-insights.cjs');
@@ -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 ClickEvent = 'click';