@algolia/client-insights 5.6.1 → 5.8.0

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 (38) hide show
  1. package/README.md +5 -7
  2. package/dist/browser.d.ts +99 -98
  3. package/dist/builds/browser.js +5 -11
  4. package/dist/builds/browser.js.map +1 -1
  5. package/dist/builds/browser.min.js +1 -1
  6. package/dist/builds/browser.min.js.map +1 -1
  7. package/dist/builds/browser.umd.js +2 -2
  8. package/dist/builds/fetch.js +2 -8
  9. package/dist/builds/fetch.js.map +1 -1
  10. package/dist/builds/node.cjs +2 -8
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +3 -9
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +98 -96
  15. package/dist/node.d.cts +98 -96
  16. package/dist/node.d.ts +98 -96
  17. package/dist/src/insightsClient.cjs +1 -7
  18. package/dist/src/insightsClient.cjs.map +1 -1
  19. package/dist/src/insightsClient.js +1 -7
  20. package/dist/src/insightsClient.js.map +1 -1
  21. package/index.js +1 -1
  22. package/model/addedToCartObjectIDs.ts +2 -2
  23. package/model/addedToCartObjectIDsAfterSearch.ts +2 -2
  24. package/model/clickedFilters.ts +1 -1
  25. package/model/clickedObjectIDs.ts +1 -1
  26. package/model/clickedObjectIDsAfterSearch.ts +2 -2
  27. package/model/clientMethodProps.ts +4 -4
  28. package/model/convertedFilters.ts +1 -1
  29. package/model/convertedObjectIDs.ts +1 -1
  30. package/model/convertedObjectIDsAfterSearch.ts +1 -1
  31. package/model/eventsItems.ts +11 -9
  32. package/model/index.ts +5 -5
  33. package/model/insightsEvents.ts +1 -1
  34. package/model/purchasedObjectIDs.ts +2 -2
  35. package/model/purchasedObjectIDsAfterSearch.ts +2 -2
  36. package/model/viewedFilters.ts +1 -1
  37. package/model/viewedObjectIDs.ts +1 -1
  38. package/package.json +7 -7
@@ -31,7 +31,7 @@ export type AddedToCartObjectIDsAfterSearch = {
31
31
  /**
32
32
  * Object IDs of the records that are part of the event.
33
33
  */
34
- objectIDs: string[];
34
+ objectIDs: Array<string>;
35
35
 
36
36
  /**
37
37
  * 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/).
@@ -51,7 +51,7 @@ export type AddedToCartObjectIDsAfterSearch = {
51
51
  /**
52
52
  * Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
53
53
  */
54
- objectData?: ObjectDataAfterSearch[];
54
+ objectData?: Array<ObjectDataAfterSearch>;
55
55
 
56
56
  /**
57
57
  * 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.
@@ -21,7 +21,7 @@ export type ClickedFilters = {
21
21
  /**
22
22
  * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
23
23
  */
24
- filters: string[];
24
+ filters: Array<string>;
25
25
 
26
26
  /**
27
27
  * 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,7 +21,7 @@ export type ClickedObjectIDs = {
21
21
  /**
22
22
  * Object IDs of the records that are part of the event.
23
23
  */
24
- objectIDs: string[];
24
+ objectIDs: Array<string>;
25
25
 
26
26
  /**
27
27
  * 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,12 +21,12 @@ export type ClickedObjectIDsAfterSearch = {
21
21
  /**
22
22
  * Object IDs of the records that are part of the event.
23
23
  */
24
- objectIDs: string[];
24
+ objectIDs: Array<string>;
25
25
 
26
26
  /**
27
27
  * Position of the clicked item the search results. You must provide 1 `position` for each `objectID`.
28
28
  */
29
- positions: number[];
29
+ positions: Array<number>;
30
30
 
31
31
  /**
32
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.
@@ -11,7 +11,7 @@ export type CustomDeleteProps = {
11
11
  /**
12
12
  * Query parameters to apply to the current query.
13
13
  */
14
- parameters?: Record<string, any>;
14
+ parameters?: { [key: string]: any };
15
15
  };
16
16
 
17
17
  /**
@@ -25,7 +25,7 @@ export type CustomGetProps = {
25
25
  /**
26
26
  * Query parameters to apply to the current query.
27
27
  */
28
- parameters?: Record<string, any>;
28
+ parameters?: { [key: string]: any };
29
29
  };
30
30
 
31
31
  /**
@@ -39,7 +39,7 @@ export type CustomPostProps = {
39
39
  /**
40
40
  * Query parameters to apply to the current query.
41
41
  */
42
- parameters?: Record<string, any>;
42
+ parameters?: { [key: string]: any };
43
43
  /**
44
44
  * Parameters to send with the custom request.
45
45
  */
@@ -57,7 +57,7 @@ export type CustomPutProps = {
57
57
  /**
58
58
  * Query parameters to apply to the current query.
59
59
  */
60
- parameters?: Record<string, any>;
60
+ parameters?: { [key: string]: any };
61
61
  /**
62
62
  * Parameters to send with the custom request.
63
63
  */
@@ -18,7 +18,7 @@ export type ConvertedFilters = {
18
18
  /**
19
19
  * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
20
20
  */
21
- filters: string[];
21
+ filters: Array<string>;
22
22
 
23
23
  /**
24
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/).
@@ -21,7 +21,7 @@ export type ConvertedObjectIDs = {
21
21
  /**
22
22
  * Object IDs of the records that are part of the event.
23
23
  */
24
- objectIDs: string[];
24
+ objectIDs: Array<string>;
25
25
 
26
26
  /**
27
27
  * 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,7 +21,7 @@ export type ConvertedObjectIDsAfterSearch = {
21
21
  /**
22
22
  * Object IDs of the records that are part of the event.
23
23
  */
24
- objectIDs: string[];
24
+ objectIDs: Array<string>;
25
25
 
26
26
  /**
27
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.
@@ -8,21 +8,23 @@ import type { ClickedObjectIDsAfterSearch } from './clickedObjectIDsAfterSearch'
8
8
  import type { ConvertedFilters } from './convertedFilters';
9
9
  import type { ConvertedObjectIDs } from './convertedObjectIDs';
10
10
  import type { ConvertedObjectIDsAfterSearch } from './convertedObjectIDsAfterSearch';
11
+
11
12
  import type { PurchasedObjectIDs } from './purchasedObjectIDs';
12
13
  import type { PurchasedObjectIDsAfterSearch } from './purchasedObjectIDsAfterSearch';
14
+
13
15
  import type { ViewedFilters } from './viewedFilters';
14
16
  import type { ViewedObjectIDs } from './viewedObjectIDs';
15
17
 
16
18
  export type EventsItems =
17
- | AddedToCartObjectIDs
18
- | AddedToCartObjectIDsAfterSearch
19
- | ClickedFilters
20
- | ClickedObjectIDs
21
19
  | ClickedObjectIDsAfterSearch
22
- | ConvertedFilters
23
- | ConvertedObjectIDs
20
+ | AddedToCartObjectIDsAfterSearch
21
+ | PurchasedObjectIDsAfterSearch
24
22
  | ConvertedObjectIDsAfterSearch
23
+ | ClickedObjectIDs
25
24
  | PurchasedObjectIDs
26
- | PurchasedObjectIDsAfterSearch
27
- | ViewedFilters
28
- | ViewedObjectIDs;
25
+ | AddedToCartObjectIDs
26
+ | ConvertedObjectIDs
27
+ | ClickedFilters
28
+ | ConvertedFilters
29
+ | ViewedObjectIDs
30
+ | ViewedFilters;
package/model/index.ts CHANGED
@@ -1,12 +1,13 @@
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 './addToCartEvent';
4
3
  export * from './addedToCartObjectIDs';
5
4
  export * from './addedToCartObjectIDsAfterSearch';
6
- export * from './clickEvent';
5
+ export * from './addToCartEvent';
7
6
  export * from './clickedFilters';
8
7
  export * from './clickedObjectIDs';
9
8
  export * from './clickedObjectIDsAfterSearch';
9
+ export * from './clickEvent';
10
+ export * from './clientMethodProps';
10
11
  export * from './conversionEvent';
11
12
  export * from './convertedFilters';
12
13
  export * from './convertedObjectIDs';
@@ -19,11 +20,10 @@ export * from './insightsEvents';
19
20
  export * from './objectData';
20
21
  export * from './objectDataAfterSearch';
21
22
  export * from './price';
22
- export * from './purchaseEvent';
23
23
  export * from './purchasedObjectIDs';
24
24
  export * from './purchasedObjectIDsAfterSearch';
25
+ export * from './purchaseEvent';
25
26
  export * from './value';
26
- export * from './viewEvent';
27
27
  export * from './viewedFilters';
28
28
  export * from './viewedObjectIDs';
29
- export * from './clientMethodProps';
29
+ export * from './viewEvent';
@@ -6,5 +6,5 @@ export type InsightsEvents = {
6
6
  /**
7
7
  * Click and conversion events. **All** events must be valid, otherwise the API returns an error.
8
8
  */
9
- events: EventsItems[];
9
+ events: Array<EventsItems>;
10
10
  };
@@ -26,7 +26,7 @@ export type PurchasedObjectIDs = {
26
26
  /**
27
27
  * Object IDs of the records that are part of the event.
28
28
  */
29
- objectIDs: string[];
29
+ objectIDs: Array<string>;
30
30
 
31
31
  /**
32
32
  * 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/).
@@ -46,7 +46,7 @@ export type PurchasedObjectIDs = {
46
46
  /**
47
47
  * Extra information about the records involved in a purchase or add-to-cart event. If specified, it must have the same length as `objectIDs`.
48
48
  */
49
- objectData?: ObjectData[];
49
+ objectData?: Array<ObjectData>;
50
50
 
51
51
  /**
52
52
  * 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.
@@ -26,7 +26,7 @@ export type PurchasedObjectIDsAfterSearch = {
26
26
  /**
27
27
  * Object IDs of the records that are part of the event.
28
28
  */
29
- objectIDs: string[];
29
+ objectIDs: Array<string>;
30
30
 
31
31
  /**
32
32
  * 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/).
@@ -46,7 +46,7 @@ export type PurchasedObjectIDsAfterSearch = {
46
46
  /**
47
47
  * Extra information about the records involved in a purchase or add-to-cart events. If provided, it must be the same length as `objectIDs`.
48
48
  */
49
- objectData: ObjectDataAfterSearch[];
49
+ objectData: Array<ObjectDataAfterSearch>;
50
50
 
51
51
  /**
52
52
  * 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.
@@ -21,7 +21,7 @@ export type ViewedFilters = {
21
21
  /**
22
22
  * Applied facet filters. Facet filters are `facet:value` pairs. Facet values must be URL-encoded, such as, `discount:10%25`.
23
23
  */
24
- filters: string[];
24
+ filters: Array<string>;
25
25
 
26
26
  /**
27
27
  * 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,7 +21,7 @@ export type ViewedObjectIDs = {
21
21
  /**
22
22
  * Object IDs of the records that are part of the event.
23
23
  */
24
- objectIDs: string[];
24
+ objectIDs: Array<string>;
25
25
 
26
26
  /**
27
27
  * 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/).
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.6.1",
2
+ "version": "5.8.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -49,16 +49,16 @@
49
49
  "index.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@algolia/client-common": "5.6.1",
53
- "@algolia/requester-browser-xhr": "5.6.1",
54
- "@algolia/requester-fetch": "5.6.1",
55
- "@algolia/requester-node-http": "5.6.1"
52
+ "@algolia/client-common": "5.8.0",
53
+ "@algolia/requester-browser-xhr": "5.8.0",
54
+ "@algolia/requester-fetch": "5.8.0",
55
+ "@algolia/requester-node-http": "5.8.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@arethetypeswrong/cli": "0.16.4",
59
- "@types/node": "22.5.5",
59
+ "@types/node": "22.7.4",
60
60
  "publint": "0.2.11",
61
- "rollup": "4.22.4",
61
+ "rollup": "4.24.0",
62
62
  "tsup": "8.3.0",
63
63
  "typescript": "5.6.2"
64
64
  },