@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.
- package/dist/client-insights.cjs.js +20 -22
- package/dist/client-insights.esm.browser.js +20 -20
- package/dist/client-insights.esm.node.js +20 -20
- package/dist/client-insights.umd.js +2 -2
- package/dist/model/clickEvent.d.ts +2 -0
- package/dist/model/clickEvent.d.ts.map +1 -0
- package/dist/model/clickedFilters.d.ts +28 -0
- package/dist/model/clickedFilters.d.ts.map +1 -0
- package/dist/model/clickedObjectIDs.d.ts +28 -0
- package/dist/model/clickedObjectIDs.d.ts.map +1 -0
- package/dist/model/clickedObjectIDsAfterSearch.d.ts +36 -0
- package/dist/model/clickedObjectIDsAfterSearch.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +10 -10
- package/dist/model/conversionEvent.d.ts +2 -0
- package/dist/model/conversionEvent.d.ts.map +1 -0
- package/dist/model/convertedFilters.d.ts +25 -0
- package/dist/model/convertedFilters.d.ts.map +1 -0
- package/dist/model/convertedObjectIDs.d.ts +28 -0
- package/dist/model/convertedObjectIDs.d.ts.map +1 -0
- package/dist/model/convertedObjectIDsAfterSearch.d.ts +32 -0
- package/dist/model/convertedObjectIDsAfterSearch.d.ts.map +1 -0
- package/dist/model/eventsItems.d.ts +10 -0
- package/dist/model/eventsItems.d.ts.map +1 -0
- package/dist/model/eventsResponse.d.ts +14 -0
- package/dist/model/eventsResponse.d.ts.map +1 -0
- package/dist/model/index.d.ts +14 -4
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/insightsEvents.d.ts +8 -0
- package/dist/model/insightsEvents.d.ts.map +1 -0
- package/dist/model/viewEvent.d.ts +2 -0
- package/dist/model/viewEvent.d.ts.map +1 -0
- package/dist/model/viewedFilters.d.ts +28 -0
- package/dist/model/viewedFilters.d.ts.map +1 -0
- package/dist/model/viewedObjectIDs.d.ts +28 -0
- package/dist/model/viewedObjectIDs.d.ts.map +1 -0
- package/dist/src/insightsClient.d.ts +17 -17
- package/dist/src/insightsClient.d.ts.map +1 -1
- package/model/{eventType.ts → clickEvent.ts} +1 -1
- package/model/clickedFilters.ts +35 -0
- package/model/clickedObjectIDs.ts +35 -0
- package/model/clickedObjectIDsAfterSearch.ts +45 -0
- package/model/clientMethodProps.ts +10 -10
- package/model/{pushEventsResponse.ts → conversionEvent.ts} +1 -6
- package/model/convertedFilters.ts +32 -0
- package/model/convertedObjectIDs.ts +35 -0
- package/model/convertedObjectIDsAfterSearch.ts +40 -0
- package/model/eventsItems.ts +20 -0
- package/model/eventsResponse.ts +16 -0
- package/model/index.ts +14 -4
- package/model/insightsEvents.ts +10 -0
- package/model/viewEvent.ts +3 -0
- package/model/viewedFilters.ts +35 -0
- package/model/viewedObjectIDs.ts +35 -0
- package/package.json +8 -7
- package/dist/model/eventType.d.ts +0 -2
- package/dist/model/eventType.d.ts.map +0 -1
- package/dist/model/insightEvent.d.ts +0 -40
- package/dist/model/insightEvent.d.ts.map +0 -1
- package/dist/model/insightEvents.d.ts +0 -11
- package/dist/model/insightEvents.d.ts.map +0 -1
- package/dist/model/pushEventsResponse.d.ts +0 -7
- package/dist/model/pushEventsResponse.d.ts.map +0 -1
- package/model/insightEvent.ts +0 -50
- package/model/insightEvents.ts +0 -13
|
@@ -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"}
|
|
@@ -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"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
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';
|
|
1
9
|
export * from './errorBase';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
10
|
+
export * from './eventsItems';
|
|
11
|
+
export * from './eventsResponse';
|
|
12
|
+
export * from './insightsEvents';
|
|
13
|
+
export * from './viewEvent';
|
|
14
|
+
export * from './viewedFilters';
|
|
15
|
+
export * from './viewedObjectIDs';
|
|
6
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,
|
|
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 @@
|
|
|
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,8 +1,8 @@
|
|
|
1
1
|
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
2
|
import type { DelProps, GetProps, PostProps, PutProps } from '../model/clientMethodProps';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
3
|
+
import type { EventsResponse } from '../model/eventsResponse';
|
|
4
|
+
import type { InsightsEvents } from '../model/insightsEvents';
|
|
5
|
+
export declare const apiClientVersion = "5.0.0-alpha.75";
|
|
6
6
|
export declare const REGIONS: readonly ["de", "us"];
|
|
7
7
|
export type Region = (typeof REGIONS)[number];
|
|
8
8
|
export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
@@ -33,8 +33,8 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
|
|
|
33
33
|
*
|
|
34
34
|
* @summary Send requests to the Algolia REST API.
|
|
35
35
|
* @param del - The del object.
|
|
36
|
-
* @param del.path -
|
|
37
|
-
* @param del.parameters - Query parameters to
|
|
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
38
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
39
39
|
*/
|
|
40
40
|
del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
@@ -43,8 +43,8 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
|
|
|
43
43
|
*
|
|
44
44
|
* @summary Send requests to the Algolia REST API.
|
|
45
45
|
* @param get - The get object.
|
|
46
|
-
* @param get.path -
|
|
47
|
-
* @param get.parameters - Query parameters to
|
|
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
48
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
49
49
|
*/
|
|
50
50
|
get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
@@ -53,28 +53,28 @@ export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKe
|
|
|
53
53
|
*
|
|
54
54
|
* @summary Send requests to the Algolia REST API.
|
|
55
55
|
* @param post - The post object.
|
|
56
|
-
* @param post.path -
|
|
57
|
-
* @param post.parameters - Query parameters to
|
|
58
|
-
* @param post.body -
|
|
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
59
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
60
60
|
*/
|
|
61
61
|
post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
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 MB.
|
|
64
64
|
*
|
|
65
|
-
* @summary
|
|
66
|
-
* @param
|
|
65
|
+
* @summary Send events.
|
|
66
|
+
* @param insightsEvents - The insightsEvents object.
|
|
67
67
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
68
68
|
*/
|
|
69
|
-
pushEvents(
|
|
69
|
+
pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise<EventsResponse>;
|
|
70
70
|
/**
|
|
71
71
|
* This method allow you to send requests to the Algolia REST API.
|
|
72
72
|
*
|
|
73
73
|
* @summary Send requests to the Algolia REST API.
|
|
74
74
|
* @param put - The put object.
|
|
75
|
-
* @param put.path -
|
|
76
|
-
* @param put.parameters - Query parameters to
|
|
77
|
-
* @param put.body -
|
|
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
78
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
79
79
|
*/
|
|
80
80
|
put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
@@ -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,
|
|
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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type ClickEvent = 'click';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ClickEvent } from './clickEvent';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use this event to track when users click facet filters in your user interface.
|
|
7
|
+
*/
|
|
8
|
+
export type ClickedFilters = {
|
|
9
|
+
/**
|
|
10
|
+
* Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
|
|
11
|
+
*/
|
|
12
|
+
eventName: string;
|
|
13
|
+
|
|
14
|
+
eventType: ClickEvent;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Name of the Algolia index.
|
|
18
|
+
*/
|
|
19
|
+
index: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
|
|
23
|
+
*/
|
|
24
|
+
filters: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
|
|
28
|
+
*/
|
|
29
|
+
userToken: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
|
|
33
|
+
*/
|
|
34
|
+
timestamp?: number;
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ClickEvent } from './clickEvent';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use this event to track when users click items unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track click events related to Algolia requests, use the \"Clicked object IDs after search\" event.
|
|
7
|
+
*/
|
|
8
|
+
export type ClickedObjectIDs = {
|
|
9
|
+
/**
|
|
10
|
+
* Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
|
|
11
|
+
*/
|
|
12
|
+
eventName: string;
|
|
13
|
+
|
|
14
|
+
eventType: ClickEvent;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Name of the Algolia index.
|
|
18
|
+
*/
|
|
19
|
+
index: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* List of object identifiers for items of an Algolia index.
|
|
23
|
+
*/
|
|
24
|
+
objectIDs: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
|
|
28
|
+
*/
|
|
29
|
+
userToken: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
|
|
33
|
+
*/
|
|
34
|
+
timestamp?: number;
|
|
35
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ClickEvent } from './clickEvent';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Click event after an Algolia request. Use this event to track when users click items in the search results. If you\'re building your category pages with Algolia, you\'ll also use this event.
|
|
7
|
+
*/
|
|
8
|
+
export type ClickedObjectIDsAfterSearch = {
|
|
9
|
+
/**
|
|
10
|
+
* Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
|
|
11
|
+
*/
|
|
12
|
+
eventName: string;
|
|
13
|
+
|
|
14
|
+
eventType: ClickEvent;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Name of the Algolia index.
|
|
18
|
+
*/
|
|
19
|
+
index: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* List of object identifiers for items of an Algolia index.
|
|
23
|
+
*/
|
|
24
|
+
objectIDs: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Position of the clicked objects in the search results. The first search result has a position of 1 (not 0). You must provide 1 `position` for each `objectID`.
|
|
28
|
+
*/
|
|
29
|
+
positions: number[];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add `clickAnalytics: true` as a search request parameter, the query ID is included in the API response.
|
|
33
|
+
*/
|
|
34
|
+
queryID: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
|
|
38
|
+
*/
|
|
39
|
+
userToken: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
|
|
43
|
+
*/
|
|
44
|
+
timestamp?: number;
|
|
45
|
+
};
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type DelProps = {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
9
9
|
*/
|
|
10
10
|
path: string;
|
|
11
11
|
/**
|
|
12
|
-
* Query parameters to
|
|
12
|
+
* Query parameters to apply to the current query.
|
|
13
13
|
*/
|
|
14
14
|
parameters?: Record<string, any>;
|
|
15
15
|
};
|
|
@@ -19,11 +19,11 @@ export type DelProps = {
|
|
|
19
19
|
*/
|
|
20
20
|
export type GetProps = {
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
23
23
|
*/
|
|
24
24
|
path: string;
|
|
25
25
|
/**
|
|
26
|
-
* Query parameters to
|
|
26
|
+
* Query parameters to apply to the current query.
|
|
27
27
|
*/
|
|
28
28
|
parameters?: Record<string, any>;
|
|
29
29
|
};
|
|
@@ -33,15 +33,15 @@ export type GetProps = {
|
|
|
33
33
|
*/
|
|
34
34
|
export type PostProps = {
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
37
37
|
*/
|
|
38
38
|
path: string;
|
|
39
39
|
/**
|
|
40
|
-
* Query parameters to
|
|
40
|
+
* Query parameters to apply to the current query.
|
|
41
41
|
*/
|
|
42
42
|
parameters?: Record<string, any>;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Parameters to send with the custom request.
|
|
45
45
|
*/
|
|
46
46
|
body?: Record<string, any>;
|
|
47
47
|
};
|
|
@@ -51,15 +51,15 @@ export type PostProps = {
|
|
|
51
51
|
*/
|
|
52
52
|
export type PutProps = {
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
55
55
|
*/
|
|
56
56
|
path: string;
|
|
57
57
|
/**
|
|
58
|
-
* Query parameters to
|
|
58
|
+
* Query parameters to apply to the current query.
|
|
59
59
|
*/
|
|
60
60
|
parameters?: Record<string, any>;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Parameters to send with the custom request.
|
|
63
63
|
*/
|
|
64
64
|
body?: Record<string, any>;
|
|
65
65
|
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
export type
|
|
4
|
-
/**
|
|
5
|
-
* A message confirming the event push.
|
|
6
|
-
*/
|
|
7
|
-
message: string;
|
|
8
|
-
};
|
|
3
|
+
export type ConversionEvent = 'conversion';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ConversionEvent } from './conversionEvent';
|
|
4
|
+
|
|
5
|
+
export type ConvertedFilters = {
|
|
6
|
+
/**
|
|
7
|
+
* Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
|
|
8
|
+
*/
|
|
9
|
+
eventName: string;
|
|
10
|
+
|
|
11
|
+
eventType: ConversionEvent;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Name of the Algolia index.
|
|
15
|
+
*/
|
|
16
|
+
index: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Facet filters. Each facet filter string must be URL-encoded, such as, `discount:10%25`.
|
|
20
|
+
*/
|
|
21
|
+
filters: string[];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
|
|
25
|
+
*/
|
|
26
|
+
userToken: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
|
|
30
|
+
*/
|
|
31
|
+
timestamp?: number;
|
|
32
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ConversionEvent } from './conversionEvent';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use this event to track when users convert on items unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track conversion events related to Algolia requests, use the \"Converted object IDs after search\" event.
|
|
7
|
+
*/
|
|
8
|
+
export type ConvertedObjectIDs = {
|
|
9
|
+
/**
|
|
10
|
+
* Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
|
|
11
|
+
*/
|
|
12
|
+
eventName: string;
|
|
13
|
+
|
|
14
|
+
eventType: ConversionEvent;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Name of the Algolia index.
|
|
18
|
+
*/
|
|
19
|
+
index: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* List of object identifiers for items of an Algolia index.
|
|
23
|
+
*/
|
|
24
|
+
objectIDs: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
|
|
28
|
+
*/
|
|
29
|
+
userToken: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
|
|
33
|
+
*/
|
|
34
|
+
timestamp?: number;
|
|
35
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ConversionEvent } from './conversionEvent';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use this event to track when users convert after a previous Algolia request. For example, a user clicks on an item in the search results to view the product detail page. Then, the user adds the item to their shopping cart. If you\'re building your category pages with Algolia, you\'ll also use this event.
|
|
7
|
+
*/
|
|
8
|
+
export type ConvertedObjectIDsAfterSearch = {
|
|
9
|
+
/**
|
|
10
|
+
* Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment\'s [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
|
|
11
|
+
*/
|
|
12
|
+
eventName: string;
|
|
13
|
+
|
|
14
|
+
eventType: ConversionEvent;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Name of the Algolia index.
|
|
18
|
+
*/
|
|
19
|
+
index: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* List of object identifiers for items of an Algolia index.
|
|
23
|
+
*/
|
|
24
|
+
objectIDs: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for a search query. The query ID is required for events related to search or browse requests. If you add `clickAnalytics: true` as a search request parameter, the query ID is included in the API response.
|
|
28
|
+
*/
|
|
29
|
+
queryID: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
|
|
33
|
+
*/
|
|
34
|
+
userToken: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
|
|
38
|
+
*/
|
|
39
|
+
timestamp?: number;
|
|
40
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ClickedFilters } from './clickedFilters';
|
|
4
|
+
import type { ClickedObjectIDs } from './clickedObjectIDs';
|
|
5
|
+
import type { ClickedObjectIDsAfterSearch } from './clickedObjectIDsAfterSearch';
|
|
6
|
+
import type { ConvertedFilters } from './convertedFilters';
|
|
7
|
+
import type { ConvertedObjectIDs } from './convertedObjectIDs';
|
|
8
|
+
import type { ConvertedObjectIDsAfterSearch } from './convertedObjectIDsAfterSearch';
|
|
9
|
+
import type { ViewedFilters } from './viewedFilters';
|
|
10
|
+
import type { ViewedObjectIDs } from './viewedObjectIDs';
|
|
11
|
+
|
|
12
|
+
export type EventsItems =
|
|
13
|
+
| ClickedFilters
|
|
14
|
+
| ClickedObjectIDs
|
|
15
|
+
| ClickedObjectIDsAfterSearch
|
|
16
|
+
| ConvertedFilters
|
|
17
|
+
| ConvertedObjectIDs
|
|
18
|
+
| ConvertedObjectIDsAfterSearch
|
|
19
|
+
| ViewedFilters
|
|
20
|
+
| ViewedObjectIDs;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The response of the Insights API.
|
|
5
|
+
*/
|
|
6
|
+
export type EventsResponse = {
|
|
7
|
+
/**
|
|
8
|
+
* Details about the response, such as error messages.
|
|
9
|
+
*/
|
|
10
|
+
message?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The HTTP status code of the response.
|
|
14
|
+
*/
|
|
15
|
+
status?: number;
|
|
16
|
+
};
|