Skip to content

Commit

Permalink
chore: generated code for commit d3861910. [skip ci]
Browse files Browse the repository at this point in the history
algolia/api-clients-automation@d386191

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
Co-authored-by: Jessica <[email protected]>
  • Loading branch information
3 people committed Oct 4, 2023
1 parent 72d915a commit 748c53c
Show file tree
Hide file tree
Showing 12 changed files with 277 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/client-insights/model/addToCartEvent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// 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.

export type AddToCartEvent = 'addToCart';
49 changes: 49 additions & 0 deletions packages/client-insights/model/addedToCartObjectIDs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// 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.

import type { AddToCartEvent } from './addToCartEvent';
import type { ConversionEvent } from './conversionEvent';
import type { ObjectData } from './objectData';

/**
* Use this event to track when users add items to their shopping cart unrelated to a previous Algolia request. For example, if you don\'t use Algolia to build your category pages, use this event. To track add-to-cart events related to Algolia requests, use the \"Added to cart object IDs after search\" event.
*/
export type AddedToCartObjectIDs = {
/**
* 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.
*/
eventName: string;

eventType: ConversionEvent;

eventSubtype: AddToCartEvent;

/**
* Name of the Algolia index.
*/
index: string;

/**
* List of object identifiers for items of an Algolia index.
*/
objectIDs: string[];

/**
* Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
*/
objectData?: ObjectData[];

/**
* If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
*/
currency?: string;

/**
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
*/
userToken: string;

/**
* 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.
*/
timestamp?: number;
};
54 changes: 54 additions & 0 deletions packages/client-insights/model/addedToCartObjectIDsAfterSearch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// 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.

import type { AddToCartEvent } from './addToCartEvent';
import type { ConversionEvent } from './conversionEvent';
import type { ObjectDataAfterSearch } from './objectDataAfterSearch';

/**
* Use this event to track when users add items to their shopping cart after a previous Algolia request. If you\'re building your category pages with Algolia, you\'ll also use this event.
*/
export type AddedToCartObjectIDsAfterSearch = {
/**
* 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.
*/
eventName: string;

eventType: ConversionEvent;

eventSubtype: AddToCartEvent;

/**
* Name of the Algolia index.
*/
index: string;

/**
* 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.
*/
queryID: string;

/**
* List of object identifiers for items of an Algolia index.
*/
objectIDs: string[];

/**
* Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
*/
objectData?: ObjectDataAfterSearch[];

/**
* If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
*/
currency?: string;

/**
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
*/
userToken: string;

/**
* 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.
*/
timestamp?: number;
};
6 changes: 6 additions & 0 deletions packages/client-insights/model/discount.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// 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.

/**
* Absolute value of the discount in effect for this object, measured in `currency`.
*/
export type Discount = number | string;
8 changes: 8 additions & 0 deletions packages/client-insights/model/eventsItems.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
// 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.

import type { AddedToCartObjectIDs } from './addedToCartObjectIDs';
import type { AddedToCartObjectIDsAfterSearch } from './addedToCartObjectIDsAfterSearch';
import type { ClickedFilters } from './clickedFilters';
import type { ClickedObjectIDs } from './clickedObjectIDs';
import type { ClickedObjectIDsAfterSearch } from './clickedObjectIDsAfterSearch';
import type { ConvertedFilters } from './convertedFilters';
import type { ConvertedObjectIDs } from './convertedObjectIDs';
import type { ConvertedObjectIDsAfterSearch } from './convertedObjectIDsAfterSearch';
import type { PurchasedObjectIDs } from './purchasedObjectIDs';
import type { PurchasedObjectIDsAfterSearch } from './purchasedObjectIDsAfterSearch';
import type { ViewedFilters } from './viewedFilters';
import type { ViewedObjectIDs } from './viewedObjectIDs';

export type EventsItems =
| AddedToCartObjectIDs
| AddedToCartObjectIDsAfterSearch
| ClickedFilters
| ClickedObjectIDs
| ClickedObjectIDsAfterSearch
| ConvertedFilters
| ConvertedObjectIDs
| ConvertedObjectIDsAfterSearch
| PurchasedObjectIDs
| PurchasedObjectIDsAfterSearch
| ViewedFilters
| ViewedObjectIDs;
10 changes: 10 additions & 0 deletions packages/client-insights/model/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// 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.

export * from './addToCartEvent';
export * from './addedToCartObjectIDs';
export * from './addedToCartObjectIDsAfterSearch';
export * from './clickEvent';
export * from './clickedFilters';
export * from './clickedObjectIDs';
Expand All @@ -8,10 +11,17 @@ export * from './conversionEvent';
export * from './convertedFilters';
export * from './convertedObjectIDs';
export * from './convertedObjectIDsAfterSearch';
export * from './discount';
export * from './errorBase';
export * from './eventsItems';
export * from './eventsResponse';
export * from './insightsEvents';
export * from './objectData';
export * from './objectDataAfterSearch';
export * from './price';
export * from './purchaseEvent';
export * from './purchasedObjectIDs';
export * from './purchasedObjectIDsAfterSearch';
export * from './viewEvent';
export * from './viewedFilters';
export * from './viewedObjectIDs';
Expand Down
15 changes: 15 additions & 0 deletions packages/client-insights/model/objectData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 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.

import type { Discount } from './discount';
import type { Price } from './price';

export type ObjectData = {
price?: Price;

/**
* The quantity of the purchased or added-to-cart item. The total value of a purchase is the sum of `quantity` multiplied with the `price` for each purchased item.
*/
quantity?: number;

discount?: Discount;
};
20 changes: 20 additions & 0 deletions packages/client-insights/model/objectDataAfterSearch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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.

import type { Discount } from './discount';
import type { Price } from './price';

export type ObjectDataAfterSearch = {
/**
* ID of the query that this specific record is attributable to. Used to track purchase events with multiple items originating from different searches.
*/
queryID?: string;

price?: Price;

/**
* The quantity of the purchased or added-to-cart item. The total value of a purchase is the sum of `quantity` multiplied with the `price` for each purchased item.
*/
quantity?: number;

discount?: Discount;
};
6 changes: 6 additions & 0 deletions packages/client-insights/model/price.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// 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.

/**
* The price of the item. This should be the final price, inclusive of any discounts in effect.
*/
export type Price = number | string;
3 changes: 3 additions & 0 deletions packages/client-insights/model/purchaseEvent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// 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.

export type PurchaseEvent = 'purchase';
49 changes: 49 additions & 0 deletions packages/client-insights/model/purchasedObjectIDs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// 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.

import type { ConversionEvent } from './conversionEvent';
import type { ObjectData } from './objectData';
import type { PurchaseEvent } from './purchaseEvent';

/**
* 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.
*/
export type PurchasedObjectIDs = {
/**
* 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.
*/
eventName: string;

eventType: ConversionEvent;

eventSubtype: PurchaseEvent;

/**
* Name of the Algolia index.
*/
index: string;

/**
* List of object identifiers for items of an Algolia index.
*/
objectIDs: string[];

/**
* Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
*/
objectData?: ObjectData[];

/**
* If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
*/
currency?: string;

/**
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
*/
userToken: string;

/**
* 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.
*/
timestamp?: number;
};
54 changes: 54 additions & 0 deletions packages/client-insights/model/purchasedObjectIDsAfterSearch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// 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.

import type { ConversionEvent } from './conversionEvent';
import type { ObjectDataAfterSearch } from './objectDataAfterSearch';
import type { PurchaseEvent } from './purchaseEvent';

/**
* 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.
*/
export type PurchasedObjectIDsAfterSearch = {
/**
* 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.
*/
eventName: string;

eventType: ConversionEvent;

eventSubtype: PurchaseEvent;

/**
* Name of the Algolia index.
*/
index: string;

/**
* 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.
*/
queryID: string;

/**
* List of object identifiers for items of an Algolia index.
*/
objectIDs: string[];

/**
* Extra information about the records involved in the event—for example, to add price and quantities of purchased products. If provided, must be the same length as `objectIDs`.
*/
objectData?: ObjectDataAfterSearch[];

/**
* If you include pricing information in the `objectData` parameter, you must also specify the currency as ISO-4217 currency code, such as USD or EUR.
*/
currency?: string;

/**
* Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
*/
userToken: string;

/**
* 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.
*/
timestamp?: number;
};

0 comments on commit 748c53c

Please sign in to comment.