diff --git a/README.md b/README.md index ed3370a..b5f3a69 100644 --- a/README.md +++ b/README.md @@ -300,7 +300,9 @@ The list possible event types are: | `clientDetected` | 1.0.0 | | `pageOpened` | 1.0.0 | | `pageLoaded` | 1.0.0 | +| `productAbandoned` | 1.0.0 | | `productViewed` | 1.0.0 | +| `cartAbandoned` | 1.0.0 | | `cartViewed` | 1.0.0 | | `cartModified` | 1.0.0 | | `checkoutStarted` | 1.0.0 | diff --git a/api.ts b/api.ts index 099848c..8136343 100644 --- a/api.ts +++ b/api.ts @@ -24,7 +24,7 @@ import type { RequestArgs } from './base'; import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** - * + * * @export * @interface ApiProblem */ @@ -32,19 +32,19 @@ export interface ApiProblem { [key: string]: any; /** - * + * * @type {string} * @memberof ApiProblem */ 'title': string; /** - * + * * @type {string} * @memberof ApiProblem */ 'type': string; /** - * + * * @type {string} * @memberof ApiProblem */ @@ -69,7 +69,7 @@ export interface Browser { */ 'version': string | null; /** - * + * * @type {BrowserType} * @memberof Browser */ @@ -95,7 +95,7 @@ export type BrowserType = typeof BrowserType[keyof typeof BrowserType]; /** - * + * * @export * @interface Campaign */ @@ -211,7 +211,7 @@ export interface CartItem { */ 'index': number; /** - * + * * @type {ProductDetails} * @memberof CartItem */ @@ -248,12 +248,25 @@ export interface CartItem { */ export interface CartModified extends EventPayload { /** - * + * * @type {Cart} * @memberof CartModified */ 'cart': Cart; } +/** + * An event recording that a shopping cart was abandoned. + * @export + * @interface CartAbandoned + */ +export interface CartAbandoned extends EventPayload { + /** + * + * @type {Cart} + * @memberof CartAbanoned + */ + 'cart': Cart; +} /** * An event recording that a shopping cart was viewed. * @export @@ -261,7 +274,7 @@ export interface CartModified extends EventPayload { */ export interface CartViewed extends EventPayload { /** - * + * * @type {Cart} * @memberof CartViewed */ @@ -274,7 +287,7 @@ export interface CartViewed extends EventPayload { */ export interface CheckoutStarted extends EventPayload { /** - * + * * @type {Cart} * @memberof CheckoutStarted */ @@ -293,7 +306,7 @@ export interface CheckoutStarted extends EventPayload { */ export interface ClientDetected extends EventPayload { /** - * + * * @type {WebClient} * @memberof ClientDetected */ @@ -318,13 +331,13 @@ export interface Device { */ 'vendor': string | null; /** - * + * * @type {DeviceCategory} * @memberof Device */ 'category': DeviceCategory; /** - * + * * @type {OperatingSystem} * @memberof Device */ @@ -351,7 +364,7 @@ export type DeviceCategory = typeof DeviceCategory[keyof typeof DeviceCategory]; /** - * + * * @export * @interface Event */ @@ -375,13 +388,13 @@ export interface Event { */ 'timestamp': number; /** - * + * * @type {EventContext} * @memberof Event */ 'context': EventContext | null; /** - * + * * @type {EventPayload} * @memberof Event */ @@ -394,13 +407,13 @@ export interface Event { */ export interface EventContext { /** - * + * * @type {string} * @memberof EventContext */ 'type': string; /** - * + * * @type {{ [key: string]: string | undefined; }} * @memberof EventContext */ @@ -419,34 +432,23 @@ export interface EventOccurred extends EventPayload { */ 'name': string; /** - * The ID of the personalization associated with the event. + * The label of the event. For example, "upsell-cta-button" or "hero-banner" * @type {string} - * @memberof EventOccurred + * @memberOf EventOccurred */ - 'personalizationId': string | null; + 'label': string | null; /** - * The name of the audience associated with the event. + * The action of the event. For example, "click" or "view" * @type {string} - * @memberof EventOccurred - */ - 'audience': string | null; - /** - * The ID of the test associated with the event. - * @type {string} - * @memberof EventOccurred + * @memberOf EventOccurred */ - 'testId': string | null; + 'action': string | null; /** - * The ID of the test group associated with the event, also known as \"variant\". + * The category of the event. For example, "user-interaction" or "content" * @type {string} - * @memberof EventOccurred - */ - 'groupId': string | null; - /** - * The details about the event. - * @type {object} - * @memberof EventOccurred + * @memberOf EventOccurred */ + 'category': string | null; 'details': object; } /** @@ -456,82 +458,82 @@ export interface EventOccurred extends EventPayload { */ export interface EventPayload { /** - * + * * @type {string} * @memberof EventPayload */ '@type': string; } /** - * + * * @export * @interface EventResponse */ export interface EventResponse { /** - * + * * @type {Array} * @memberof EventResponse */ 'items': Array; /** - * + * * @type {EventResponseMetadata} * @memberof EventResponse */ 'metadata': EventResponseMetadata; /** - * + * * @type {string} * @memberof EventResponse */ 'nextCursor': string; } /** - * + * * @export * @interface EventResponseMetadata */ export interface EventResponseMetadata { /** - * + * * @type {string} * @memberof EventResponseMetadata */ 'organizationName': string; /** - * + * * @type {string} * @memberof EventResponseMetadata */ 'organizationSlug': string; /** - * + * * @type {string} * @memberof EventResponseMetadata */ 'workspaceName': string; /** - * + * * @type {string} * @memberof EventResponseMetadata */ 'workspaceSlug': string; /** - * + * * @type {string} * @memberof EventResponseMetadata */ 'applicationName': string; /** - * + * * @type {string} * @memberof EventResponseMetadata */ 'applicationSlug': string; } /** - * + * * @export * @enum {string} */ @@ -547,7 +549,9 @@ export const EventType = { CLIENT_DETECTED: 'clientDetected', PAGE_OPENED: 'pageOpened', PAGE_LOADED: 'pageLoaded', + PRODUCT_ABANDONED: 'productAbandoned', PRODUCT_VIEWED: 'productViewed', + CART_ABANDONED: 'cartAbandoned', CART_VIEWED: 'cartViewed', CART_MODIFIED: 'cartModified', CHECKOUT_STARTED: 'checkoutStarted', @@ -613,7 +617,7 @@ export interface GoalCompleted extends EventPayload { */ export interface Location { /** - * + * * @type {LocationContinent} * @memberof Location */ @@ -625,7 +629,7 @@ export interface Location { */ 'country': string | null; /** - * + * * @type {Region} * @memberof Location */ @@ -649,13 +653,13 @@ export interface Location { */ 'timezone': string | null; /** - * + * * @type {GeoPoint} * @memberof Location */ 'coordinates': GeoPoint | null; /** - * + * * @type {LocationSource} * @memberof Location */ @@ -689,7 +693,7 @@ export type LocationContinent = typeof LocationContinent[keyof typeof LocationCo */ export interface LocationDetected extends EventPayload { /** - * + * * @type {Location} * @memberof LocationDetected */ @@ -823,7 +827,7 @@ export interface Order { */ 'installments': number | null; /** - * + * * @type {OrderStatus} * @memberof Order */ @@ -844,7 +848,7 @@ export interface OrderItem { */ 'index': number; /** - * + * * @type {ProductDetails} * @memberof OrderItem */ @@ -881,7 +885,7 @@ export interface OrderItem { */ export interface OrderPlaced extends EventPayload { /** - * + * * @type {Order} * @memberof OrderPlaced */ @@ -1025,6 +1029,25 @@ export interface ProductDetails { */ 'imageUrl': string | null; } +/** + * An event recording that a shopping cart item was abandoned. + * @export + * @interface ProductAbandoned + */ +export interface ProductAbandoned extends EventPayload { + /** + * + * @type {Cart} + * @memberof ProductAbandoned + */ + 'cart': Cart; + /** + * + * @type {CartItem} + * @memberof ProductAbandoned + */ + 'cartItem': CartItem; +} /** * An event recording that a shopping cart was modified. * @export @@ -1032,7 +1055,7 @@ export interface ProductDetails { */ export interface ProductViewed extends EventPayload { /** - * + * * @type {ProductDetails} * @memberof ProductViewed */ @@ -1058,7 +1081,7 @@ export interface Region { 'code': string | null; } /** - * + * * @export * @interface Session */ @@ -1088,7 +1111,7 @@ export interface Session { */ 'isAnonymous'?: boolean; /** - * + * * @type {SessionWindow} * @memberof Session */ @@ -1112,19 +1135,19 @@ export interface Session { */ 'landingPageUrl'?: string | null; /** - * + * * @type {Campaign} * @memberof Session */ 'campaign'?: Campaign; /** - * + * * @type {Location} * @memberof Session */ 'location'?: Location; /** - * + * * @type {WebClient} * @memberof Session */ @@ -1136,26 +1159,26 @@ export interface Session { */ 'attributes'?: { [key: string]: any | undefined | null; }; /** - * + * * @type {SessionStatistics} * @memberof Session */ 'statistics'?: SessionStatistics; } /** - * + * * @export * @interface SessionResponse */ export interface SessionResponse { /** - * + * * @type {Array} * @memberof SessionResponse */ 'items': Array; /** - * + * * @type {string} * @memberof SessionResponse */ @@ -1193,13 +1216,13 @@ export interface SessionStatistics { */ export interface SessionWindow { /** - * + * * @type {number} * @memberof SessionWindow */ 'start'?: number; /** - * + * * @type {number} * @memberof SessionWindow */ @@ -1218,13 +1241,13 @@ export interface SlotPersonalized { */ '@type': string; /** - * + * * @type {SlotPersonalizedPersonalization} * @memberof SlotPersonalized */ 'personalization': SlotPersonalizedPersonalization; /** - * + * * @type {SlotPersonalizedMetadata} * @memberof SlotPersonalized */ @@ -1280,7 +1303,7 @@ export interface SlotPersonalizedMetadata { 'variantName': string | null; } /** - * + * * @export * @interface SlotPersonalizedPersonalization */ @@ -1310,14 +1333,14 @@ export interface SlotPersonalizedPersonalization { */ 'contentId': string; /** - * + * * @type {SlotPersonalizedPersonalizationAssignedVariant} * @memberof SlotPersonalizedPersonalization */ 'assignedVariant': SlotPersonalizedPersonalizationAssignedVariant | null; } /** - * + * * @export * @interface SlotPersonalizedPersonalizationAssignedVariant */ @@ -1394,7 +1417,7 @@ export interface TabVisibilityChanged extends EventPayload { */ 'tabId': string; /** - * + * * @type {TabVisibility} * @memberof TabVisibilityChanged */ @@ -1420,7 +1443,7 @@ export interface TestGroupAssigned extends EventPayload { 'groupId': string; } /** - * + * * @export * @interface User */ @@ -1486,7 +1509,7 @@ export interface User { */ 'alternatePhone'?: string | null; /** - * + * * @type {UserAddress} * @memberof User */ @@ -1540,7 +1563,7 @@ export interface User { */ 'lastModifiedTime'?: number; /** - * + * * @type {UserStatistics} * @memberof User */ @@ -1553,56 +1576,56 @@ export interface User { */ export interface UserAddress { /** - * + * * @type {string} * @memberof UserAddress */ 'street'?: string | null; /** - * + * * @type {string} * @memberof UserAddress */ 'district'?: string | null; /** - * + * * @type {string} * @memberof UserAddress */ 'city'?: string | null; /** - * + * * @type {string} * @memberof UserAddress */ 'region'?: string | null; /** - * + * * @type {string} * @memberof UserAddress */ 'country'?: string | null; /** - * + * * @type {string} * @memberof UserAddress */ 'postalCode'?: string | null; } /** - * + * * @export * @interface UserResponse */ export interface UserResponse { /** - * + * * @type {Array} * @memberof UserResponse */ 'items': Array; /** - * + * * @type {string} * @memberof UserResponse */ @@ -1673,13 +1696,13 @@ export interface UserStatistics { */ export interface WebClient { /** - * + * * @type {Browser} * @memberof WebClient */ 'browser': Browser; /** - * + * * @type {Device} * @memberof WebClient */ @@ -1712,12 +1735,12 @@ export interface WebContext extends EventContext { export const ExportApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * - * @param {number} [start] - * @param {number} [end] - * @param {number} [pageSize] - * @param {string} [cursor] - * @param {Array} [events] + * + * @param {number} [start] + * @param {number} [end] + * @param {number} [pageSize] + * @param {string} [cursor] + * @param {Array} [events] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1758,7 +1781,7 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio } - + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1769,11 +1792,11 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * - * @param {number} [start] - * @param {number} [end] - * @param {number} [pageSize] - * @param {string} [cursor] + * + * @param {number} [start] + * @param {number} [end] + * @param {number} [pageSize] + * @param {string} [cursor] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1810,7 +1833,7 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio } - + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1821,11 +1844,11 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * - * @param {number} [start] - * @param {number} [end] - * @param {number} [pageSize] - * @param {string} [cursor] + * + * @param {number} [start] + * @param {number} [end] + * @param {number} [pageSize] + * @param {string} [cursor] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1862,7 +1885,7 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio } - + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -1883,12 +1906,12 @@ export const ExportApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ExportApiAxiosParamCreator(configuration) return { /** - * - * @param {number} [start] - * @param {number} [end] - * @param {number} [pageSize] - * @param {string} [cursor] - * @param {Array} [events] + * + * @param {number} [start] + * @param {number} [end] + * @param {number} [pageSize] + * @param {string} [cursor] + * @param {Array} [events] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1899,11 +1922,11 @@ export const ExportApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @param {number} [start] - * @param {number} [end] - * @param {number} [pageSize] - * @param {string} [cursor] + * + * @param {number} [start] + * @param {number} [end] + * @param {number} [pageSize] + * @param {string} [cursor] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1914,11 +1937,11 @@ export const ExportApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @param {number} [start] - * @param {number} [end] - * @param {number} [pageSize] - * @param {string} [cursor] + * + * @param {number} [start] + * @param {number} [end] + * @param {number} [pageSize] + * @param {string} [cursor] * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1939,7 +1962,7 @@ export const ExportApiFactory = function (configuration?: Configuration, basePat const localVarFp = ExportApiFp(configuration) return { /** - * + * * @param {ExportApiExportEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1948,7 +1971,7 @@ export const ExportApiFactory = function (configuration?: Configuration, basePat return localVarFp.exportEvents(requestParameters.start, requestParameters.end, requestParameters.pageSize, requestParameters.cursor, requestParameters.events, options).then((request) => request(axios, basePath)); }, /** - * + * * @param {ExportApiExportSessionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1957,7 +1980,7 @@ export const ExportApiFactory = function (configuration?: Configuration, basePat return localVarFp.exportSessions(requestParameters.start, requestParameters.end, requestParameters.pageSize, requestParameters.cursor, options).then((request) => request(axios, basePath)); }, /** - * + * * @param {ExportApiExportUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1975,35 +1998,35 @@ export const ExportApiFactory = function (configuration?: Configuration, basePat */ export interface ExportApiExportEventsRequest { /** - * + * * @type {number} * @memberof ExportApiExportEvents */ readonly start?: number /** - * + * * @type {number} * @memberof ExportApiExportEvents */ readonly end?: number /** - * + * * @type {number} * @memberof ExportApiExportEvents */ readonly pageSize?: number /** - * + * * @type {string} * @memberof ExportApiExportEvents */ readonly cursor?: string /** - * + * * @type {Array} * @memberof ExportApiExportEvents */ @@ -2017,28 +2040,28 @@ export interface ExportApiExportEventsRequest { */ export interface ExportApiExportSessionsRequest { /** - * + * * @type {number} * @memberof ExportApiExportSessions */ readonly start?: number /** - * + * * @type {number} * @memberof ExportApiExportSessions */ readonly end?: number /** - * + * * @type {number} * @memberof ExportApiExportSessions */ readonly pageSize?: number /** - * + * * @type {string} * @memberof ExportApiExportSessions */ @@ -2052,28 +2075,28 @@ export interface ExportApiExportSessionsRequest { */ export interface ExportApiExportUsersRequest { /** - * + * * @type {number} * @memberof ExportApiExportUsers */ readonly start?: number /** - * + * * @type {number} * @memberof ExportApiExportUsers */ readonly end?: number /** - * + * * @type {number} * @memberof ExportApiExportUsers */ readonly pageSize?: number /** - * + * * @type {string} * @memberof ExportApiExportUsers */ @@ -2088,7 +2111,7 @@ export interface ExportApiExportUsersRequest { */ export class ExportApi extends BaseAPI { /** - * + * * @param {ExportApiExportEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -2099,7 +2122,7 @@ export class ExportApi extends BaseAPI { } /** - * + * * @param {ExportApiExportSessionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -2110,7 +2133,7 @@ export class ExportApi extends BaseAPI { } /** - * + * * @param {ExportApiExportUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError}