@algolia/client-insights 5.2.3 → 5.2.4-beta.2

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 (85) hide show
  1. package/dist/browser.d.ts +598 -0
  2. package/dist/builds/browser.js +255 -0
  3. package/dist/builds/browser.js.map +1 -0
  4. package/dist/builds/browser.min.js +2 -0
  5. package/dist/builds/browser.min.js.map +1 -0
  6. package/dist/builds/browser.umd.js +12 -0
  7. package/dist/builds/node.cjs +273 -0
  8. package/dist/builds/node.cjs.map +1 -0
  9. package/dist/builds/node.js +253 -0
  10. package/dist/builds/node.js.map +1 -0
  11. package/dist/node.d.cts +598 -0
  12. package/dist/node.d.ts +598 -0
  13. package/dist/src/insightsClient.cjs +240 -0
  14. package/dist/src/insightsClient.cjs.map +1 -0
  15. package/dist/src/insightsClient.js +213 -0
  16. package/dist/src/insightsClient.js.map +1 -0
  17. package/index.d.ts +1 -1
  18. package/index.js +1 -1
  19. package/package.json +27 -27
  20. package/dist/builds/browser.d.ts +0 -22
  21. package/dist/builds/browser.d.ts.map +0 -1
  22. package/dist/builds/node.d.ts +0 -22
  23. package/dist/builds/node.d.ts.map +0 -1
  24. package/dist/client-insights.cjs +0 -240
  25. package/dist/client-insights.esm.browser.js +0 -914
  26. package/dist/client-insights.esm.node.js +0 -237
  27. package/dist/client-insights.umd.js +0 -2
  28. package/dist/model/addToCartEvent.d.ts +0 -2
  29. package/dist/model/addToCartEvent.d.ts.map +0 -1
  30. package/dist/model/addedToCartObjectIDs.d.ts +0 -45
  31. package/dist/model/addedToCartObjectIDs.d.ts.map +0 -1
  32. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts +0 -49
  33. package/dist/model/addedToCartObjectIDsAfterSearch.d.ts.map +0 -1
  34. package/dist/model/clickEvent.d.ts +0 -2
  35. package/dist/model/clickEvent.d.ts.map +0 -1
  36. package/dist/model/clickedFilters.d.ts +0 -32
  37. package/dist/model/clickedFilters.d.ts.map +0 -1
  38. package/dist/model/clickedObjectIDs.d.ts +0 -32
  39. package/dist/model/clickedObjectIDs.d.ts.map +0 -1
  40. package/dist/model/clickedObjectIDsAfterSearch.d.ts +0 -40
  41. package/dist/model/clickedObjectIDsAfterSearch.d.ts.map +0 -1
  42. package/dist/model/clientMethodProps.d.ts +0 -70
  43. package/dist/model/clientMethodProps.d.ts.map +0 -1
  44. package/dist/model/conversionEvent.d.ts +0 -2
  45. package/dist/model/conversionEvent.d.ts.map +0 -1
  46. package/dist/model/convertedFilters.d.ts +0 -29
  47. package/dist/model/convertedFilters.d.ts.map +0 -1
  48. package/dist/model/convertedObjectIDs.d.ts +0 -32
  49. package/dist/model/convertedObjectIDs.d.ts.map +0 -1
  50. package/dist/model/convertedObjectIDsAfterSearch.d.ts +0 -36
  51. package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +0 -1
  52. package/dist/model/discount.d.ts +0 -5
  53. package/dist/model/discount.d.ts.map +0 -1
  54. package/dist/model/errorBase.d.ts +0 -7
  55. package/dist/model/errorBase.d.ts.map +0 -1
  56. package/dist/model/eventsItems.d.ts +0 -14
  57. package/dist/model/eventsItems.d.ts.map +0 -1
  58. package/dist/model/eventsResponse.d.ts +0 -14
  59. package/dist/model/eventsResponse.d.ts.map +0 -1
  60. package/dist/model/index.d.ts +0 -28
  61. package/dist/model/index.d.ts.map +0 -1
  62. package/dist/model/insightsEvents.d.ts +0 -8
  63. package/dist/model/insightsEvents.d.ts.map +0 -1
  64. package/dist/model/objectData.d.ts +0 -11
  65. package/dist/model/objectData.d.ts.map +0 -1
  66. package/dist/model/objectDataAfterSearch.d.ts +0 -15
  67. package/dist/model/objectDataAfterSearch.d.ts.map +0 -1
  68. package/dist/model/price.d.ts +0 -5
  69. package/dist/model/price.d.ts.map +0 -1
  70. package/dist/model/purchaseEvent.d.ts +0 -2
  71. package/dist/model/purchaseEvent.d.ts.map +0 -1
  72. package/dist/model/purchasedObjectIDs.d.ts +0 -45
  73. package/dist/model/purchasedObjectIDs.d.ts.map +0 -1
  74. package/dist/model/purchasedObjectIDsAfterSearch.d.ts +0 -45
  75. package/dist/model/purchasedObjectIDsAfterSearch.d.ts.map +0 -1
  76. package/dist/model/value.d.ts +0 -5
  77. package/dist/model/value.d.ts.map +0 -1
  78. package/dist/model/viewEvent.d.ts +0 -2
  79. package/dist/model/viewEvent.d.ts.map +0 -1
  80. package/dist/model/viewedFilters.d.ts +0 -32
  81. package/dist/model/viewedFilters.d.ts.map +0 -1
  82. package/dist/model/viewedObjectIDs.d.ts +0 -32
  83. package/dist/model/viewedObjectIDs.d.ts.map +0 -1
  84. package/dist/src/insightsClient.d.ts +0 -85
  85. package/dist/src/insightsClient.d.ts.map +0 -1
@@ -1,32 +0,0 @@
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
- * Event name, 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
- * Index name (case-sensitive) to which the event\'s items belong.
13
- */
14
- index: string;
15
- /**
16
- * Object IDs of the records that are part of the event.
17
- */
18
- objectIDs: string[];
19
- /**
20
- * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
- */
22
- userToken: string;
23
- /**
24
- * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
- */
26
- authenticatedUserToken?: string;
27
- /**
28
- * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
- */
30
- timestamp?: number;
31
- };
32
- //# sourceMappingURL=convertedObjectIDs.d.ts.map
@@ -1 +0,0 @@
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,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,36 +0,0 @@
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
- * Event name, 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
- * Index name (case-sensitive) to which the event\'s items belong.
13
- */
14
- index: string;
15
- /**
16
- * Object IDs of the records that are part of the event.
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. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
- */
26
- userToken: string;
27
- /**
28
- * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
- */
30
- authenticatedUserToken?: string;
31
- /**
32
- * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
33
- */
34
- timestamp?: number;
35
- };
36
- //# sourceMappingURL=convertedObjectIDsAfterSearch.d.ts.map
@@ -1 +0,0 @@
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,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Absolute value of the discount for this product, in units of `currency`.
3
- */
4
- export type Discount = number | string;
5
- //# sourceMappingURL=discount.d.ts.map
@@ -1 +0,0 @@
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 +0,0 @@
1
- /**
2
- * Error.
3
- */
4
- export type ErrorBase = Record<string, any> & {
5
- message?: string;
6
- };
7
- //# sourceMappingURL=errorBase.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
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
@@ -1 +0,0 @@
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,28 +0,0 @@
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 './value';
24
- export * from './viewEvent';
25
- export * from './viewedFilters';
26
- export * from './viewedObjectIDs';
27
- export * from './clientMethodProps';
28
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { EventsItems } from './eventsItems';
2
- export type InsightsEvents = {
3
- /**
4
- * Click and conversion events. **All** events must be valid, otherwise the API returns an error.
5
- */
6
- events: EventsItems[];
7
- };
8
- //# sourceMappingURL=insightsEvents.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,11 +0,0 @@
1
- import type { Discount } from './discount';
2
- import type { Price } from './price';
3
- export type ObjectData = {
4
- price?: Price;
5
- /**
6
- * Quantity of a product that has been purchased or added to the cart. The total purchase value 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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
1
- import type { Discount } from './discount';
2
- import type { Price } from './price';
3
- export type ObjectDataAfterSearch = {
4
- /**
5
- * Unique identifier for a search query, used to track purchase events with multiple records that originate from different searches.
6
- */
7
- queryID?: string;
8
- price?: Price;
9
- /**
10
- * Quantity of a product that has been purchased or added to the cart. The total purchase value 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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Total price of a product, including any discounts, in units of `currency`.
3
- */
4
- export type Price = number | string;
5
- //# sourceMappingURL=price.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export type PurchaseEvent = 'purchase';
2
- //# sourceMappingURL=purchaseEvent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"purchaseEvent.d.ts","sourceRoot":"","sources":["../../model/purchaseEvent.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC"}
@@ -1,45 +0,0 @@
1
- import type { ConversionEvent } from './conversionEvent';
2
- import type { ObjectData } from './objectData';
3
- import type { PurchaseEvent } from './purchaseEvent';
4
- import type { Value } from './value';
5
- /**
6
- * 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.
7
- */
8
- export type PurchasedObjectIDs = {
9
- /**
10
- * Event name, 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
- eventType: ConversionEvent;
14
- eventSubtype: PurchaseEvent;
15
- /**
16
- * Index name (case-sensitive) to which the event\'s items belong.
17
- */
18
- index: string;
19
- /**
20
- * Object IDs of the records that are part of the event.
21
- */
22
- objectIDs: string[];
23
- /**
24
- * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
- */
26
- userToken: string;
27
- /**
28
- * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
- */
30
- authenticatedUserToken?: string;
31
- /**
32
- * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
33
- */
34
- currency?: string;
35
- /**
36
- * Extra information about the records involved in a purchase or add-to-cart event. If specified, it must have the same length as `objectIDs`.
37
- */
38
- objectData?: ObjectData[];
39
- /**
40
- * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
- */
42
- timestamp?: number;
43
- value?: Value;
44
- };
45
- //# sourceMappingURL=purchasedObjectIDs.d.ts.map
@@ -1 +0,0 @@
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;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;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,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC"}
@@ -1,45 +0,0 @@
1
- import type { ConversionEvent } from './conversionEvent';
2
- import type { ObjectDataAfterSearch } from './objectDataAfterSearch';
3
- import type { PurchaseEvent } from './purchaseEvent';
4
- import type { Value } from './value';
5
- /**
6
- * Use this event to track when users make a purchase after a previous Algolia request. If you\'re building your category pages with Algolia, you\'ll also use this event.
7
- */
8
- export type PurchasedObjectIDsAfterSearch = {
9
- /**
10
- * Event name, 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
- eventType: ConversionEvent;
14
- eventSubtype: PurchaseEvent;
15
- /**
16
- * Index name (case-sensitive) to which the event\'s items belong.
17
- */
18
- index: string;
19
- /**
20
- * Object IDs of the records that are part of the event.
21
- */
22
- objectIDs: string[];
23
- /**
24
- * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
- */
26
- userToken: string;
27
- /**
28
- * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
29
- */
30
- authenticatedUserToken?: string;
31
- /**
32
- * Three-letter [currency code](https://www.iso.org/iso-4217-currency-codes.html).
33
- */
34
- currency?: string;
35
- /**
36
- * Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
37
- */
38
- objectData: ObjectDataAfterSearch[];
39
- /**
40
- * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
- */
42
- timestamp?: number;
43
- value?: Value;
44
- };
45
- //# sourceMappingURL=purchasedObjectIDsAfterSearch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"purchasedObjectIDsAfterSearch.d.ts","sourceRoot":"","sources":["../../model/purchasedObjectIDsAfterSearch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;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,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,qBAAqB,EAAE,CAAC;IAEpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Total monetary value of this event in units of `currency`.
3
- */
4
- export type Value = number | string;
5
- //# sourceMappingURL=value.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -1,2 +0,0 @@
1
- export type ViewEvent = 'view';
2
- //# sourceMappingURL=viewEvent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"viewEvent.d.ts","sourceRoot":"","sources":["../../model/viewEvent.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC"}
@@ -1,32 +0,0 @@
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
- * Event name, 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
- * Index name (case-sensitive) to which the event\'s items belong.
13
- */
14
- index: string;
15
- /**
16
- * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
17
- */
18
- filters: string[];
19
- /**
20
- * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
- */
22
- userToken: string;
23
- /**
24
- * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
- */
26
- authenticatedUserToken?: string;
27
- /**
28
- * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
- */
30
- timestamp?: number;
31
- };
32
- //# sourceMappingURL=viewedFilters.d.ts.map
@@ -1 +0,0 @@
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,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,32 +0,0 @@
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
- * Event name, 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
- * Index name (case-sensitive) to which the event\'s items belong.
13
- */
14
- index: string;
15
- /**
16
- * Object IDs of the records that are part of the event.
17
- */
18
- objectIDs: string[];
19
- /**
20
- * Anonymous or pseudonymous user identifier. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
21
- */
22
- userToken: string;
23
- /**
24
- * Identifier for authenticated users. When the user signs in, you can get an identifier from your system and send it as `authenticatedUserToken`. This lets you keep using the `userToken` from before the user signed in, while providing a reliable way to identify users across sessions. Don\'t use personally identifiable information in user tokens. For more information, see [User token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
25
- */
26
- authenticatedUserToken?: string;
27
- /**
28
- * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
- */
30
- timestamp?: number;
31
- };
32
- //# sourceMappingURL=viewedObjectIDs.d.ts.map
@@ -1 +0,0 @@
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,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,85 +0,0 @@
1
- import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteUserTokenProps } from '../model/clientMethodProps';
3
- import type { EventsResponse } from '../model/eventsResponse';
4
- import type { InsightsEvents } from '../model/insightsEvents';
5
- export declare const apiClientVersion = "5.2.3";
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
- * @param customDelete - The customDelete object.
35
- * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
36
- * @param customDelete.parameters - Query parameters to apply to the current query.
37
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
38
- */
39
- customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
40
- /**
41
- * This method allow you to send requests to the Algolia REST API.
42
- *
43
- * @param customGet - The customGet object.
44
- * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
45
- * @param customGet.parameters - Query parameters to apply to the current query.
46
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
47
- */
48
- customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
49
- /**
50
- * This method allow you to send requests to the Algolia REST API.
51
- *
52
- * @param customPost - The customPost object.
53
- * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
54
- * @param customPost.parameters - Query parameters to apply to the current query.
55
- * @param customPost.body - Parameters to send with the custom request.
56
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
57
- */
58
- customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
59
- /**
60
- * This method allow you to send requests to the Algolia REST API.
61
- *
62
- * @param customPut - The customPut object.
63
- * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
64
- * @param customPut.parameters - Query parameters to apply to the current query.
65
- * @param customPut.body - Parameters to send with the custom request.
66
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
67
- */
68
- customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
69
- /**
70
- * Deletes all events related to the specified user token from events metrics and analytics. The deletion is asynchronous, and processed within 48 hours. To delete a personalization user profile, see [Delete a user profile](/specs/personalization#tag/profiles/operation/deleteUserProfile).
71
- *
72
- * @param deleteUserToken - The deleteUserToken object.
73
- * @param deleteUserToken.userToken - User token for which to delete all associated events.
74
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
75
- */
76
- deleteUserToken({ userToken }: DeleteUserTokenProps, requestOptions?: RequestOptions): Promise<void>;
77
- /**
78
- * Sends 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.
79
- *
80
- * @param insightsEvents - The insightsEvents object.
81
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
82
- */
83
- pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise<EventsResponse>;
84
- };
85
- //# sourceMappingURL=insightsClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"insightsClient.d.ts","sourceRoot":"","sources":["../../src/insightsClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,oBAAoB,EACrB,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,UAAU,CAAC;AAExC,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAS9C,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,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmBnC;;;;;;;OAOG;oCAC6B,cAAc,mBAAmB,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmBlH;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAoBnC;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAoBnC;;;;;;OAMG;mCAC4B,oBAAoB,mBAAmB,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBpG;;;;;OAKG;+BACwB,cAAc,mBAAmB,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;EAwBvG"}