@croct/export
Advanced tools
Comparing version 0.2.0 to 0.3.0
730
api.ts
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -17,9 +17,11 @@ * | ||
import { Configuration } from './configuration'; | ||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; | ||
import type { Configuration } from './configuration'; | ||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import globalAxios from 'axios'; | ||
// Some imports not used depending on template conditions | ||
// @ts-ignore | ||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; | ||
import type { RequestArgs } from './base'; | ||
// @ts-ignore | ||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; | ||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; | ||
@@ -32,3 +34,3 @@ /** | ||
export interface ApiProblem { | ||
[key: string]: any | any; | ||
[key: string]: any; | ||
@@ -40,3 +42,3 @@ /** | ||
*/ | ||
title: string; | ||
'title': string; | ||
/** | ||
@@ -47,3 +49,3 @@ * | ||
*/ | ||
type: string; | ||
'type': string; | ||
/** | ||
@@ -54,3 +56,3 @@ * | ||
*/ | ||
details?: string; | ||
'details'?: string; | ||
} | ||
@@ -68,3 +70,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -75,3 +77,3 @@ * The version of the browser, non-empty. For example, \"79.0.3945.130\", \"11\" or \"160.1\". | ||
*/ | ||
version: string | null; | ||
'version': string | null; | ||
/** | ||
@@ -82,4 +84,6 @@ * | ||
*/ | ||
type: BrowserType; | ||
'type': BrowserType; | ||
} | ||
/** | ||
@@ -90,10 +94,14 @@ * The type of the browser. | ||
*/ | ||
export enum BrowserType { | ||
WEB = 'WEB', | ||
IN_APP = 'IN_APP', | ||
CRAWLER = 'CRAWLER', | ||
OTHER = 'OTHER', | ||
UNKNOWN = 'UNKNOWN' | ||
} | ||
export const BrowserType = { | ||
WEB: 'WEB', | ||
IN_APP: 'IN_APP', | ||
CRAWLER: 'CRAWLER', | ||
OTHER: 'OTHER', | ||
UNKNOWN: 'UNKNOWN' | ||
} as const; | ||
export type BrowserType = typeof BrowserType[keyof typeof BrowserType]; | ||
/** | ||
@@ -110,3 +118,3 @@ * | ||
*/ | ||
name?: string | null; | ||
'name'?: string | null; | ||
/** | ||
@@ -117,3 +125,3 @@ * The advertiser that sent traffic to the application. For example, \"newsletter4\". | ||
*/ | ||
source?: string | null; | ||
'source'?: string | null; | ||
/** | ||
@@ -124,3 +132,3 @@ * The advertising or marketing medium. For example, \"email\". | ||
*/ | ||
medium?: string | null; | ||
'medium'?: string | null; | ||
/** | ||
@@ -131,3 +139,3 @@ * The specific content item related the campaign. For example, \"Buy now!\". | ||
*/ | ||
content?: string | null; | ||
'content'?: string | null; | ||
/** | ||
@@ -138,3 +146,3 @@ * The search keywords. Foe example, \"web personalization\" | ||
*/ | ||
term?: string | null; | ||
'term'?: string | null; | ||
} | ||
@@ -152,3 +160,3 @@ /** | ||
*/ | ||
currency: string; | ||
'currency': string; | ||
/** | ||
@@ -159,3 +167,3 @@ * The list of items in the shopping cart. | ||
*/ | ||
items: Array<CartItem>; | ||
'items': Array<CartItem>; | ||
/** | ||
@@ -166,3 +174,3 @@ * The total of all items and quantities in the shopping cart including applied item promotions. Applied order discounts, estimated shipping, and applied shipping discounts should be excluded from the subtotal amount. | ||
*/ | ||
subtotal: number | null; | ||
'subtotal': number | null; | ||
/** | ||
@@ -173,3 +181,3 @@ * The total shipping price for the items in the shopping cart, including any handling charges. | ||
*/ | ||
shippingPrice: number | null; | ||
'shippingPrice': number | null; | ||
/** | ||
@@ -180,3 +188,3 @@ * The taxes associated with the transaction. | ||
*/ | ||
taxes: object | null; | ||
'taxes': object | null; | ||
/** | ||
@@ -187,3 +195,3 @@ * The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs. | ||
*/ | ||
costs: object | null; | ||
'costs': object | null; | ||
/** | ||
@@ -194,3 +202,3 @@ * The amount of the discount applied to the shopping cart. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -201,3 +209,3 @@ * The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -208,3 +216,3 @@ * The coupon applied to the shopping cart. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
/** | ||
@@ -215,3 +223,3 @@ * The timestamp when the shopping cart was last updated, in milliseconds since epoch. | ||
*/ | ||
lastUpdateTime: number; | ||
'lastUpdateTime': number; | ||
} | ||
@@ -229,3 +237,3 @@ /** | ||
*/ | ||
index: number; | ||
'index': number; | ||
/** | ||
@@ -236,3 +244,3 @@ * | ||
*/ | ||
product: ProductDetails; | ||
'product': ProductDetails; | ||
/** | ||
@@ -243,3 +251,3 @@ * The number of units of the item in the shopping cart. | ||
*/ | ||
quantity: number; | ||
'quantity': number; | ||
/** | ||
@@ -250,3 +258,3 @@ * The total for the item. It includes discounts and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -257,3 +265,3 @@ * The amount of the discount applied to the item. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -264,3 +272,3 @@ * The coupon applied to the item. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
} | ||
@@ -278,3 +286,3 @@ /** | ||
*/ | ||
cart: Cart; | ||
'cart': Cart; | ||
} | ||
@@ -292,3 +300,3 @@ /** | ||
*/ | ||
cart: Cart; | ||
'cart': Cart; | ||
} | ||
@@ -306,3 +314,3 @@ /** | ||
*/ | ||
cart: Cart; | ||
'cart': Cart; | ||
/** | ||
@@ -313,3 +321,3 @@ * The ID that uniquely identifies the order across the store. | ||
*/ | ||
orderId: string | null; | ||
'orderId': string | null; | ||
} | ||
@@ -327,3 +335,3 @@ /** | ||
*/ | ||
client: WebClient; | ||
'client': WebClient; | ||
} | ||
@@ -341,3 +349,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -348,3 +356,3 @@ * The vendor of the device, non-empty. For example, \"Apple\", \"Samsung\" or \"LG\". | ||
*/ | ||
vendor: string | null; | ||
'vendor': string | null; | ||
/** | ||
@@ -355,3 +363,3 @@ * | ||
*/ | ||
category: DeviceCategory; | ||
'category': DeviceCategory; | ||
/** | ||
@@ -362,4 +370,6 @@ * | ||
*/ | ||
operatingSystem: OperatingSystem; | ||
'operatingSystem': OperatingSystem; | ||
} | ||
/** | ||
@@ -370,11 +380,15 @@ * The category of the device. | ||
*/ | ||
export enum DeviceCategory { | ||
DESKTOP = 'DESKTOP', | ||
TABLET = 'TABLET', | ||
MOBILE = 'MOBILE', | ||
BOT = 'BOT', | ||
OTHER = 'OTHER', | ||
UNKNOWN = 'UNKNOWN' | ||
} | ||
export const DeviceCategory = { | ||
DESKTOP: 'DESKTOP', | ||
TABLET: 'TABLET', | ||
MOBILE: 'MOBILE', | ||
BOT: 'BOT', | ||
OTHER: 'OTHER', | ||
UNKNOWN: 'UNKNOWN' | ||
} as const; | ||
export type DeviceCategory = typeof DeviceCategory[keyof typeof DeviceCategory]; | ||
/** | ||
@@ -391,3 +405,3 @@ * | ||
*/ | ||
sessionId: string; | ||
'sessionId': string; | ||
/** | ||
@@ -398,3 +412,3 @@ * The internal ID of the user who originated the event. | ||
*/ | ||
userId: string; | ||
'userId': string; | ||
/** | ||
@@ -405,3 +419,3 @@ * The timestamp when the event was tracked, in milliseconds since epoch. | ||
*/ | ||
timestamp: number; | ||
'timestamp': number; | ||
/** | ||
@@ -412,3 +426,3 @@ * | ||
*/ | ||
context: EventContext | null; | ||
'context': EventContext | null; | ||
/** | ||
@@ -419,3 +433,3 @@ * | ||
*/ | ||
payload: EventPayload; | ||
'payload': EventPayload; | ||
} | ||
@@ -433,3 +447,3 @@ /** | ||
*/ | ||
type: string; | ||
'type': string; | ||
/** | ||
@@ -440,3 +454,3 @@ * | ||
*/ | ||
metadata?: { [key: string]: string | undefined; }; | ||
'metadata'?: { [key: string]: string | undefined; }; | ||
} | ||
@@ -454,3 +468,3 @@ /** | ||
*/ | ||
name: string; | ||
'name': string; | ||
/** | ||
@@ -461,3 +475,3 @@ * The ID of the personalization associated with the event. | ||
*/ | ||
personalizationId: string | null; | ||
'personalizationId': string | null; | ||
/** | ||
@@ -468,3 +482,3 @@ * The name of the audience associated with the event. | ||
*/ | ||
audience: string | null; | ||
'audience': string | null; | ||
/** | ||
@@ -475,3 +489,3 @@ * The ID of the test associated with the event. | ||
*/ | ||
testId: string | null; | ||
'testId': string | null; | ||
/** | ||
@@ -482,3 +496,3 @@ * The ID of the test group associated with the event, also known as \"variant\". | ||
*/ | ||
groupId: string | null; | ||
'groupId': string | null; | ||
/** | ||
@@ -489,3 +503,3 @@ * The details about the event. | ||
*/ | ||
details: object; | ||
'details': object; | ||
} | ||
@@ -503,3 +517,3 @@ /** | ||
*/ | ||
type: string; | ||
'@type': string; | ||
} | ||
@@ -517,9 +531,15 @@ /** | ||
*/ | ||
items: Array<Event>; | ||
'items': Array<Event>; | ||
/** | ||
* | ||
* @type {EventResponseMetadata} | ||
* @memberof EventResponse | ||
*/ | ||
'metadata': EventResponseMetadata; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof EventResponse | ||
*/ | ||
nextCursor: string; | ||
'nextCursor': string; | ||
} | ||
@@ -529,26 +549,74 @@ /** | ||
* @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} | ||
*/ | ||
export enum EventType { | ||
USER_SIGNED_UP = 'userSignedUp', | ||
USER_SIGNED_IN = 'userSignedIn', | ||
USER_SIGNED_OUT = 'userSignedOut', | ||
TAB_OPENED = 'tabOpened', | ||
TAB_URL_CHANGED = 'tabUrlChanged', | ||
TAB_VISIBILITY_CHANGED = 'tabVisibilityChanged', | ||
LOCATION_DETECTED = 'locationDetected', | ||
CLIENT_DETECTED = 'clientDetected', | ||
PAGE_OPENED = 'pageOpened', | ||
PAGE_LOADED = 'pageLoaded', | ||
PRODUCT_VIEWED = 'productViewed', | ||
CART_VIEWED = 'cartViewed', | ||
CART_MODIFIED = 'cartModified', | ||
CHECKOUT_STARTED = 'checkoutStarted', | ||
ORDER_PLACED = 'orderPlaced', | ||
TEST_GROUP_ASSIGNED = 'testGroupAssigned', | ||
NOTHING_CHANGED = 'nothingChanged', | ||
GOAL_COMPLETED = 'goalCompleted', | ||
EVENT_OCCURRED = 'eventOccurred' | ||
} | ||
export const EventType = { | ||
USER_SIGNED_UP: 'userSignedUp', | ||
USER_SIGNED_IN: 'userSignedIn', | ||
USER_SIGNED_OUT: 'userSignedOut', | ||
TAB_OPENED: 'tabOpened', | ||
TAB_URL_CHANGED: 'tabUrlChanged', | ||
TAB_VISIBILITY_CHANGED: 'tabVisibilityChanged', | ||
LOCATION_DETECTED: 'locationDetected', | ||
CLIENT_DETECTED: 'clientDetected', | ||
PAGE_OPENED: 'pageOpened', | ||
PAGE_LOADED: 'pageLoaded', | ||
PRODUCT_VIEWED: 'productViewed', | ||
CART_VIEWED: 'cartViewed', | ||
CART_MODIFIED: 'cartModified', | ||
CHECKOUT_STARTED: 'checkoutStarted', | ||
ORDER_PLACED: 'orderPlaced', | ||
TEST_GROUP_ASSIGNED: 'testGroupAssigned', | ||
NOTHING_CHANGED: 'nothingChanged', | ||
GOAL_COMPLETED: 'goalCompleted', | ||
EVENT_OCCURRED: 'eventOccurred', | ||
SLOT_PERSONALIZED: 'slotPersonalized' | ||
} as const; | ||
export type EventType = typeof EventType[keyof typeof EventType]; | ||
/** | ||
@@ -565,3 +633,3 @@ * A geographic location represented by a latitude and longitude coordinates pair. | ||
*/ | ||
latitude: number; | ||
'latitude': number; | ||
/** | ||
@@ -572,3 +640,3 @@ * The longitude of the geo-point, may be either negative or positive. | ||
*/ | ||
longitude: number; | ||
'longitude': number; | ||
} | ||
@@ -586,3 +654,3 @@ /** | ||
*/ | ||
goalId: string; | ||
'goalId': string; | ||
/** | ||
@@ -593,3 +661,3 @@ * The monetary value associated to the completion of the goal. This can represent an estimated value or a symbolic value. For example, if the sales team can close 10% of people who sign up for a newsletter, and the average transaction is $500, then a possible value for newsletter sign-ups can be $50 (i.e., 10% of $500). | ||
*/ | ||
value: string | null; | ||
'value': string | null; | ||
/** | ||
@@ -600,3 +668,3 @@ * The currency in which the monetary value is expressed. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin. | ||
*/ | ||
currency: string | null; | ||
'currency': string | null; | ||
} | ||
@@ -614,3 +682,3 @@ /** | ||
*/ | ||
continent: LocationContinent | null; | ||
'continent': LocationContinent | null; | ||
/** | ||
@@ -621,3 +689,3 @@ * The highest administrative division, also known as a nation. The value is a two-letter country code, as defined in ISO 3166. For example, US for United States, BR for Brazil and DE for Germany. | ||
*/ | ||
country: string | null; | ||
'country': string | null; | ||
/** | ||
@@ -628,3 +696,3 @@ * | ||
*/ | ||
region: Region; | ||
'region': Region; | ||
/** | ||
@@ -635,3 +703,3 @@ * The name of the incorporated city or town political entity. For example, \"Sao Paulo\". | ||
*/ | ||
city: string | null; | ||
'city': string | null; | ||
/** | ||
@@ -642,3 +710,3 @@ * An administrative division smaller than a city and larger than a neighborhood. For example, the district of Manhattan in New York. | ||
*/ | ||
district: string | null; | ||
'district': string | null; | ||
/** | ||
@@ -649,3 +717,3 @@ * The time-zone ID as defined in IANA Time Zone Database. For example, \"America/New_York\". | ||
*/ | ||
timezone: string | null; | ||
'timezone': string | null; | ||
/** | ||
@@ -656,3 +724,3 @@ * | ||
*/ | ||
coordinates: GeoPoint | null; | ||
'coordinates': GeoPoint | null; | ||
/** | ||
@@ -663,4 +731,6 @@ * | ||
*/ | ||
source: LocationSource | null; | ||
'source': LocationSource | null; | ||
} | ||
/** | ||
@@ -671,12 +741,16 @@ * The continent of the location. | ||
*/ | ||
export enum LocationContinent { | ||
AF = 'AF', | ||
AN = 'AN', | ||
AS = 'AS', | ||
EU = 'EU', | ||
NA = 'NA', | ||
OC = 'OC', | ||
SA = 'SA' | ||
} | ||
export const LocationContinent = { | ||
AF: 'AF', | ||
AN: 'AN', | ||
AS: 'AS', | ||
EU: 'EU', | ||
NA: 'NA', | ||
OC: 'OC', | ||
SA: 'SA' | ||
} as const; | ||
export type LocationContinent = typeof LocationContinent[keyof typeof LocationContinent]; | ||
/** | ||
@@ -693,3 +767,3 @@ * An event recording that the location of a user was detected. | ||
*/ | ||
location: Location; | ||
'location': Location; | ||
} | ||
@@ -701,10 +775,14 @@ /** | ||
*/ | ||
export enum LocationSource { | ||
UNKNOWN = 'UNKNOWN', | ||
IP = 'IP', | ||
INPUT = 'INPUT', | ||
BROWSER = 'BROWSER', | ||
GPS = 'GPS' | ||
} | ||
export const LocationSource = { | ||
UNKNOWN: 'UNKNOWN', | ||
IP: 'IP', | ||
INPUT: 'INPUT', | ||
BROWSER: 'BROWSER', | ||
GPS: 'GPS' | ||
} as const; | ||
export type LocationSource = typeof LocationSource[keyof typeof LocationSource]; | ||
/** | ||
@@ -721,3 +799,3 @@ * An event recording a period of inactivity. | ||
*/ | ||
sinceTime: number; | ||
'sinceTime': number; | ||
} | ||
@@ -735,3 +813,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -742,3 +820,3 @@ * The version of operating system, non-empty. For example, \"10.15.1\", \"NT 5.1\" or \"8.4\". | ||
*/ | ||
version: string | null; | ||
'version': string | null; | ||
} | ||
@@ -756,3 +834,3 @@ /** | ||
*/ | ||
orderId: string; | ||
'orderId': string; | ||
/** | ||
@@ -763,3 +841,3 @@ * The currency in which the monetary values are expressed in the order. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin. | ||
*/ | ||
currency: string; | ||
'currency': string; | ||
/** | ||
@@ -770,3 +848,3 @@ * The list of items in the order. | ||
*/ | ||
items: Array<OrderItem>; | ||
'items': Array<OrderItem>; | ||
/** | ||
@@ -777,3 +855,3 @@ * The total of all items and quantities in the order including applied item promotions. Applied order discounts, estimated shipping, and applied shipping discounts should be excluded from the subtotal amount. | ||
*/ | ||
subtotal: number | null; | ||
'subtotal': number | null; | ||
/** | ||
@@ -784,3 +862,3 @@ * The total shipping price for the order, including any handling charges. | ||
*/ | ||
shippingPrice: number | null; | ||
'shippingPrice': number | null; | ||
/** | ||
@@ -791,3 +869,3 @@ * The taxes associated with the transaction. | ||
*/ | ||
taxes: object | null; | ||
'taxes': object | null; | ||
/** | ||
@@ -798,3 +876,3 @@ * The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs. | ||
*/ | ||
costs: object | null; | ||
'costs': object | null; | ||
/** | ||
@@ -805,3 +883,3 @@ * The amount of the discount applied to the order. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -812,3 +890,3 @@ * The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -819,3 +897,3 @@ * The coupon applied to the order. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
/** | ||
@@ -826,3 +904,3 @@ * The payment method used in the payment. For example, \"Credit Card\", \"Paypal\" or \"Wallet\". | ||
*/ | ||
paymentMethod: string | null; | ||
'paymentMethod': string | null; | ||
/** | ||
@@ -833,3 +911,3 @@ * The number of installments of the transaction, non-negative. | ||
*/ | ||
installments: number | null; | ||
'installments': number | null; | ||
/** | ||
@@ -840,4 +918,6 @@ * | ||
*/ | ||
status: OrderStatus | null; | ||
'status': OrderStatus | null; | ||
} | ||
/** | ||
@@ -854,3 +934,3 @@ * An item of an order. | ||
*/ | ||
index: number; | ||
'index': number; | ||
/** | ||
@@ -861,3 +941,3 @@ * | ||
*/ | ||
product: ProductDetails; | ||
'product': ProductDetails; | ||
/** | ||
@@ -868,3 +948,3 @@ * The number of units of the item ordered. | ||
*/ | ||
quantity: number; | ||
'quantity': number; | ||
/** | ||
@@ -875,3 +955,3 @@ * The total for the item. It includes discounts and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -882,3 +962,3 @@ * The amount of the discount applied to the item. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -889,3 +969,3 @@ * The coupon applied to the item. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
} | ||
@@ -903,3 +983,3 @@ /** | ||
*/ | ||
order: Order; | ||
'order': Order; | ||
} | ||
@@ -911,8 +991,12 @@ /** | ||
*/ | ||
export enum OrderStatus { | ||
PLACED = 'PLACED', | ||
PAID = 'PAID', | ||
COMPLETED = 'COMPLETED' | ||
} | ||
export const OrderStatus = { | ||
PLACED: 'PLACED', | ||
PAID: 'PAID', | ||
COMPLETED: 'COMPLETED' | ||
} as const; | ||
export type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus]; | ||
/** | ||
@@ -929,3 +1013,3 @@ * An event recording that a page was loaded. | ||
*/ | ||
url: string; | ||
'url': string; | ||
/** | ||
@@ -936,3 +1020,3 @@ * The title of the page. | ||
*/ | ||
title: string; | ||
'title': string; | ||
/** | ||
@@ -943,3 +1027,3 @@ * The last time the page was modified. | ||
*/ | ||
lastModifiedTime: number; | ||
'lastModifiedTime': number; | ||
} | ||
@@ -957,3 +1041,3 @@ /** | ||
*/ | ||
url: string; | ||
'url': string; | ||
/** | ||
@@ -964,3 +1048,3 @@ * The user-agent of the client. | ||
*/ | ||
userAgent: string | null; | ||
'userAgent': string | null; | ||
/** | ||
@@ -971,3 +1055,3 @@ * An ordered list of the user\'s preferred languages. | ||
*/ | ||
preferredLanguages: string | null; | ||
'preferredLanguages': string | null; | ||
/** | ||
@@ -978,3 +1062,3 @@ * The URI of the page that linked to the page that was opened. The value is null when the user navigated to the page directly (not through a link, but by using a bookmark, for example). | ||
*/ | ||
referrer: string | null; | ||
'referrer': string | null; | ||
} | ||
@@ -992,3 +1076,3 @@ /** | ||
*/ | ||
productId: string; | ||
'productId': string; | ||
/** | ||
@@ -999,3 +1083,3 @@ * The code that uniquely identifies the product variant across the store, non-empty. For example, \"IPH-GRE-64\". | ||
*/ | ||
sku: string | null; | ||
'sku': string | null; | ||
/** | ||
@@ -1006,3 +1090,3 @@ * The name of the product, non-empty. For example \"iPhone\". | ||
*/ | ||
name: string; | ||
'name': string; | ||
/** | ||
@@ -1013,3 +1097,3 @@ * The category of the product, non-empty. For example, \"Phone\". | ||
*/ | ||
category: string | null; | ||
'category': string | null; | ||
/** | ||
@@ -1020,3 +1104,3 @@ * The brand associated with the product. For example, \"Apple\". | ||
*/ | ||
brand: string | null; | ||
'brand': string | null; | ||
/** | ||
@@ -1027,3 +1111,3 @@ * The variant of the product, such as size, color and style. For example, \"64GB Green\". | ||
*/ | ||
variant: string | null; | ||
'variant': string | null; | ||
/** | ||
@@ -1034,3 +1118,3 @@ * The price of the product displayed in the store. For example, 59.90. | ||
*/ | ||
displayPrice: number; | ||
'displayPrice': number; | ||
/** | ||
@@ -1041,3 +1125,3 @@ * The original price of the product. For example, 99.90. | ||
*/ | ||
originalPrice: number | null; | ||
'originalPrice': number | null; | ||
/** | ||
@@ -1048,3 +1132,3 @@ * The URL of the product page. For example, \"https://apple.com/iphone\". | ||
*/ | ||
url: string | null; | ||
'url': string | null; | ||
/** | ||
@@ -1055,3 +1139,3 @@ * The URL of the main product image. For example, \"https://img.apple.com/iphone.png\". | ||
*/ | ||
imageUrl: string | null; | ||
'imageUrl': string | null; | ||
} | ||
@@ -1069,3 +1153,3 @@ /** | ||
*/ | ||
product: ProductDetails; | ||
'product': ProductDetails; | ||
} | ||
@@ -1083,3 +1167,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -1090,3 +1174,3 @@ * The 2-letter code as defined by the ISO 3166-2 standard. For example, \"SP\". | ||
*/ | ||
code: string | null; | ||
'code': string | null; | ||
} | ||
@@ -1104,9 +1188,9 @@ /** | ||
*/ | ||
sessionId?: string; | ||
'sessionId'?: string; | ||
/** | ||
* The ID that uniquely identifies the user across the cluster. | ||
* The ID that uniquely identifies the user across the workspace. | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
userId?: string; | ||
'userId'?: string; | ||
/** | ||
@@ -1117,3 +1201,3 @@ * The ID of the session that superseded this session. Usually, a session receives a parent ID when a user is identified, causing the current anonymous session to end and a new identified session to begin. In this case, the ID of the new session is assigned as the parent ID of the anonymous session. | ||
*/ | ||
parentId?: string | null; | ||
'parentId'?: string | null; | ||
/** | ||
@@ -1124,3 +1208,3 @@ * The flag that indicates whether the user is anonymous. | ||
*/ | ||
isAnonymous?: boolean; | ||
'isAnonymous'?: boolean; | ||
/** | ||
@@ -1131,3 +1215,3 @@ * | ||
*/ | ||
window?: SessionWindow; | ||
'window'?: SessionWindow; | ||
/** | ||
@@ -1138,3 +1222,3 @@ * The time from which the session is closed for new events, but still may accept late-arriving events. The close time may be extended if new events arrive before the session is closed. | ||
*/ | ||
closeTime?: number; | ||
'closeTime'?: number; | ||
/** | ||
@@ -1145,3 +1229,3 @@ * The URI of the content that linked to the page that started the session. | ||
*/ | ||
referrer?: string | null; | ||
'referrer'?: string | null; | ||
/** | ||
@@ -1152,3 +1236,3 @@ * The page that started the session. | ||
*/ | ||
landingPageUrl?: string | null; | ||
'landingPageUrl'?: string | null; | ||
/** | ||
@@ -1159,3 +1243,3 @@ * | ||
*/ | ||
campaign?: Campaign; | ||
'campaign'?: Campaign; | ||
/** | ||
@@ -1166,3 +1250,3 @@ * | ||
*/ | ||
location?: Location; | ||
'location'?: Location; | ||
/** | ||
@@ -1173,3 +1257,3 @@ * | ||
*/ | ||
client?: WebClient; | ||
'client'?: WebClient; | ||
/** | ||
@@ -1180,3 +1264,3 @@ * The custom attributes. | ||
*/ | ||
attributes?: { [key: string]: any | undefined; }; | ||
'attributes'?: { [key: string]: any | undefined; }; | ||
/** | ||
@@ -1187,3 +1271,3 @@ * | ||
*/ | ||
statistics?: SessionStatistics; | ||
'statistics'?: SessionStatistics; | ||
} | ||
@@ -1201,3 +1285,3 @@ /** | ||
*/ | ||
items: Array<Session>; | ||
'items': Array<Session>; | ||
/** | ||
@@ -1208,3 +1292,3 @@ * | ||
*/ | ||
nextCursor: string; | ||
'nextCursor': string; | ||
} | ||
@@ -1222,3 +1306,3 @@ /** | ||
*/ | ||
pageViews?: number; | ||
'pageViews'?: number; | ||
/** | ||
@@ -1229,3 +1313,3 @@ * The total number of tab views. | ||
*/ | ||
tabViews?: number; | ||
'tabViews'?: number; | ||
/** | ||
@@ -1236,3 +1320,3 @@ * The total number of orders placed. | ||
*/ | ||
orders?: number; | ||
'orders'?: number; | ||
} | ||
@@ -1250,3 +1334,3 @@ /** | ||
*/ | ||
start?: number; | ||
'start'?: number; | ||
/** | ||
@@ -1257,5 +1341,135 @@ * | ||
*/ | ||
end?: number; | ||
'end'?: number; | ||
} | ||
/** | ||
* An event recording a slot personalization. | ||
* @export | ||
* @interface SlotPersonalized | ||
*/ | ||
export interface SlotPersonalized { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof SlotPersonalized | ||
*/ | ||
'@type': string; | ||
/** | ||
* | ||
* @type {SlotPersonalizedPersonalization} | ||
* @memberof SlotPersonalized | ||
*/ | ||
'personalization': SlotPersonalizedPersonalization; | ||
/** | ||
* | ||
* @type {SlotPersonalizedMetadata} | ||
* @memberof SlotPersonalized | ||
*/ | ||
'metadata': SlotPersonalizedMetadata; | ||
} | ||
/** | ||
* Additional information about the personalization. | ||
* @export | ||
* @interface SlotPersonalizedMetadata | ||
*/ | ||
export interface SlotPersonalizedMetadata { | ||
/** | ||
* The name of the audience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'audienceName': string | null; | ||
/** | ||
* The custom ID of the audience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'audienceCustomId': string | null; | ||
/** | ||
* The name of the slot. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'slotName': string | null; | ||
/** | ||
* The custom ID of the slot. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'slotCustomId': string | null; | ||
/** | ||
* The name of the experience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'experienceName': string | null; | ||
/** | ||
* The name of the experiment. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'experimentName': string | null; | ||
/** | ||
* The name of the variant. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'variantName': string | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SlotPersonalizedPersonalization | ||
*/ | ||
export interface SlotPersonalizedPersonalization { | ||
/** | ||
* The ID that uniquely identifies the audience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'audienceId': string; | ||
/** | ||
* The ID that uniquely identifies the slot. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'slotId': string; | ||
/** | ||
* The ID that uniquely identifies the experience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'experienceId': string; | ||
/** | ||
* The ID that uniquely identifies the content. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'contentId': string; | ||
/** | ||
* | ||
* @type {SlotPersonalizedPersonalizationAssignedVariant} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'assignedVariant': SlotPersonalizedPersonalizationAssignedVariant | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SlotPersonalizedPersonalizationAssignedVariant | ||
*/ | ||
export interface SlotPersonalizedPersonalizationAssignedVariant { | ||
/** | ||
* The ID that uniquely identifies the experiment. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalizationAssignedVariant | ||
*/ | ||
'experimentId'?: string; | ||
/** | ||
* The ID that uniquely identifies the variant. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalizationAssignedVariant | ||
*/ | ||
'variantId'?: string; | ||
} | ||
/** | ||
* An event recording that a new tab was opened. | ||
@@ -1271,3 +1485,3 @@ * @export | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
} | ||
@@ -1285,3 +1499,3 @@ /** | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
/** | ||
@@ -1292,3 +1506,3 @@ * The URL the page that the tab was on. | ||
*/ | ||
url: string; | ||
'url': string; | ||
} | ||
@@ -1300,7 +1514,11 @@ /** | ||
*/ | ||
export enum TabVisibility { | ||
VISIBLE = 'VISIBLE', | ||
HIDDLE = 'HIDDEN' | ||
} | ||
export const TabVisibility = { | ||
VISIBLE: 'VISIBLE', | ||
HIDDLE: 'HIDDEN' | ||
} as const; | ||
export type TabVisibility = typeof TabVisibility[keyof typeof TabVisibility]; | ||
/** | ||
@@ -1317,3 +1535,3 @@ * An event recording that the visibility of a tab has changed. | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
/** | ||
@@ -1324,3 +1542,3 @@ * | ||
*/ | ||
visibility: TabVisibility; | ||
'visibility': TabVisibility; | ||
} | ||
@@ -1338,3 +1556,3 @@ /** | ||
*/ | ||
testId: string; | ||
'testId': string; | ||
/** | ||
@@ -1345,3 +1563,3 @@ * The ID of the test group, also known as \"variant\". For example, \"black-friday-promo\" or \"black-friday-shipping\". | ||
*/ | ||
groupId: string; | ||
'groupId': string; | ||
} | ||
@@ -1355,13 +1573,13 @@ /** | ||
/** | ||
* The internal ID assigned to the user, unique across the cluster. | ||
* The internal ID assigned to the user, unique across the workspace. | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
userId?: string; | ||
'userId'?: string; | ||
/** | ||
* The external user ID that is used to identify the user on the application side, unique across the cluster. It is always null for anonymous users. | ||
* The external user ID that is used to identify the user on the application side, unique across the workspace. It is always null for anonymous users. | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
externalUserId?: string | null; | ||
'externalUserId'?: string | null; | ||
/** | ||
@@ -1372,3 +1590,3 @@ * The first name attribute. | ||
*/ | ||
firstName?: string | null; | ||
'firstName'?: string | null; | ||
/** | ||
@@ -1379,3 +1597,3 @@ * The last name attribute. | ||
*/ | ||
lastName?: string | null; | ||
'lastName'?: string | null; | ||
/** | ||
@@ -1386,3 +1604,3 @@ * The birth date attribute. | ||
*/ | ||
birthDate?: number | null; | ||
'birthDate'?: number | null; | ||
/** | ||
@@ -1393,3 +1611,3 @@ * The gender attribute. | ||
*/ | ||
gender?: string | null; | ||
'gender'?: string | null; | ||
/** | ||
@@ -1400,3 +1618,3 @@ * The email attribute. | ||
*/ | ||
email?: string | null; | ||
'email'?: string | null; | ||
/** | ||
@@ -1407,3 +1625,3 @@ * The alternate email attribute. | ||
*/ | ||
alternateEmail?: string | null; | ||
'alternateEmail'?: string | null; | ||
/** | ||
@@ -1414,3 +1632,3 @@ * The phone attribute. | ||
*/ | ||
phone?: string | null; | ||
'phone'?: string | null; | ||
/** | ||
@@ -1421,3 +1639,3 @@ * The alternate phone attribute. | ||
*/ | ||
alternatePhone?: string | null; | ||
'alternatePhone'?: string | null; | ||
/** | ||
@@ -1428,3 +1646,3 @@ * | ||
*/ | ||
address?: UserAddress; | ||
'address'?: UserAddress; | ||
/** | ||
@@ -1435,3 +1653,3 @@ * The avatar attribute. | ||
*/ | ||
avatar?: string | null; | ||
'avatar'?: string | null; | ||
/** | ||
@@ -1442,3 +1660,3 @@ * The company attribute. | ||
*/ | ||
company?: string | null; | ||
'company'?: string | null; | ||
/** | ||
@@ -1449,3 +1667,3 @@ * The company URL attribute. | ||
*/ | ||
companyUrl?: string | null; | ||
'companyUrl'?: string | null; | ||
/** | ||
@@ -1456,3 +1674,3 @@ * The job title attribute. | ||
*/ | ||
jobTitle?: string | null; | ||
'jobTitle'?: string | null; | ||
/** | ||
@@ -1463,3 +1681,3 @@ * The activities attribute. | ||
*/ | ||
activities?: string | null; | ||
'activities'?: string | null; | ||
/** | ||
@@ -1470,3 +1688,3 @@ * The interests attribute. | ||
*/ | ||
interests?: string | null; | ||
'interests'?: string | null; | ||
/** | ||
@@ -1477,3 +1695,3 @@ * The custom attributes. | ||
*/ | ||
customAttributes?: { [key: string]: any | undefined; }; | ||
'customAttributes'?: { [key: string]: any | undefined; }; | ||
/** | ||
@@ -1484,3 +1702,3 @@ * The timestamp when the user was last modified, in milliseconds since epoch. It is not updated on sync. | ||
*/ | ||
lastModifiedTime?: number; | ||
'lastModifiedTime'?: number; | ||
/** | ||
@@ -1491,3 +1709,3 @@ * | ||
*/ | ||
statistics?: UserStatistics; | ||
'statistics'?: UserStatistics; | ||
} | ||
@@ -1505,3 +1723,3 @@ /** | ||
*/ | ||
street?: string | null; | ||
'street'?: string | null; | ||
/** | ||
@@ -1512,3 +1730,3 @@ * | ||
*/ | ||
district?: string | null; | ||
'district'?: string | null; | ||
/** | ||
@@ -1519,3 +1737,3 @@ * | ||
*/ | ||
city?: string | null; | ||
'city'?: string | null; | ||
/** | ||
@@ -1526,3 +1744,3 @@ * | ||
*/ | ||
region?: string | null; | ||
'region'?: string | null; | ||
/** | ||
@@ -1533,3 +1751,3 @@ * | ||
*/ | ||
country?: string | null; | ||
'country'?: string | null; | ||
/** | ||
@@ -1540,3 +1758,3 @@ * | ||
*/ | ||
postalCode?: string | null; | ||
'postalCode'?: string | null; | ||
} | ||
@@ -1554,3 +1772,3 @@ /** | ||
*/ | ||
items: Array<User>; | ||
'items': Array<User>; | ||
/** | ||
@@ -1561,3 +1779,3 @@ * | ||
*/ | ||
nextCursor: string; | ||
'nextCursor': string; | ||
} | ||
@@ -1575,3 +1793,3 @@ /** | ||
*/ | ||
externalUserId: string; | ||
'externalUserId': string; | ||
} | ||
@@ -1589,3 +1807,3 @@ /** | ||
*/ | ||
externalUserId: string; | ||
'externalUserId': string; | ||
} | ||
@@ -1603,3 +1821,3 @@ /** | ||
*/ | ||
externalUserId: string; | ||
'externalUserId': string; | ||
} | ||
@@ -1613,13 +1831,13 @@ /** | ||
/** | ||
* The total number of orders placed across all applications in a cluster. | ||
* The total number of orders placed across all applications in a workspace. | ||
* @type {number} | ||
* @memberof UserStatistics | ||
*/ | ||
orders?: number; | ||
'orders'?: number; | ||
/** | ||
* The total number of sessions across all applications in a cluster. | ||
* The total number of sessions across all applications in a workspace. | ||
* @type {number} | ||
* @memberof UserStatistics | ||
*/ | ||
sessions?: number; | ||
'sessions'?: number; | ||
} | ||
@@ -1637,3 +1855,3 @@ /** | ||
*/ | ||
browser: Browser; | ||
'browser': Browser; | ||
/** | ||
@@ -1644,3 +1862,3 @@ * | ||
*/ | ||
device: Device; | ||
'device': Device; | ||
} | ||
@@ -1658,3 +1876,3 @@ /** | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
/** | ||
@@ -1665,3 +1883,3 @@ * The URL of the page that the client was on. | ||
*/ | ||
url: string; | ||
'url': string; | ||
} | ||
@@ -1685,3 +1903,3 @@ | ||
*/ | ||
exportEvents: async (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options: any = {}): Promise<RequestArgs> => { | ||
exportEvents: async (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
const localVarPath = `/events`; | ||
@@ -1724,3 +1942,3 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); | ||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
@@ -1743,3 +1961,3 @@ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
*/ | ||
exportSessions: async (start?: number, end?: number, pageSize?: number, cursor?: string, options: any = {}): Promise<RequestArgs> => { | ||
exportSessions: async (start?: number, end?: number, pageSize?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
const localVarPath = `/session`; | ||
@@ -1778,3 +1996,3 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); | ||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
@@ -1797,3 +2015,3 @@ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
*/ | ||
exportUsers: async (start?: number, end?: number, pageSize?: number, cursor?: string, options: any = {}): Promise<RequestArgs> => { | ||
exportUsers: async (start?: number, end?: number, pageSize?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { | ||
const localVarPath = `/user`; | ||
@@ -1832,3 +2050,3 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); | ||
setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
@@ -1862,3 +2080,3 @@ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; | ||
*/ | ||
async exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>> { | ||
async exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.exportEvents(start, end, pageSize, cursor, events, options); | ||
@@ -1876,3 +2094,3 @@ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
*/ | ||
async exportSessions(start?: number, end?: number, pageSize?: number, cursor?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionResponse>> { | ||
async exportSessions(start?: number, end?: number, pageSize?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionResponse>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.exportSessions(start, end, pageSize, cursor, options); | ||
@@ -1890,3 +2108,3 @@ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
*/ | ||
async exportUsers(start?: number, end?: number, pageSize?: number, cursor?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponse>> { | ||
async exportUsers(start?: number, end?: number, pageSize?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponse>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.exportUsers(start, end, pageSize, cursor, options); | ||
@@ -2071,3 +2289,3 @@ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
*/ | ||
public exportEvents(requestParameters: ExportApiExportEventsRequest = {}, options?: any) { | ||
public exportEvents(requestParameters: ExportApiExportEventsRequest = {}, options?: AxiosRequestConfig) { | ||
return ExportApiFp(this.configuration).exportEvents(requestParameters.start, requestParameters.end, requestParameters.pageSize, requestParameters.cursor, requestParameters.events, options).then((request) => request(this.axios, this.basePath)); | ||
@@ -2083,3 +2301,3 @@ } | ||
*/ | ||
public exportSessions(requestParameters: ExportApiExportSessionsRequest = {}, options?: any) { | ||
public exportSessions(requestParameters: ExportApiExportSessionsRequest = {}, options?: AxiosRequestConfig) { | ||
return ExportApiFp(this.configuration).exportSessions(requestParameters.start, requestParameters.end, requestParameters.pageSize, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); | ||
@@ -2095,3 +2313,3 @@ } | ||
*/ | ||
public exportUsers(requestParameters: ExportApiExportUsersRequest = {}, options?: any) { | ||
public exportUsers(requestParameters: ExportApiExportUsersRequest = {}, options?: AxiosRequestConfig) { | ||
return ExportApiFp(this.configuration).exportUsers(requestParameters.start, requestParameters.end, requestParameters.pageSize, requestParameters.cursor, options).then((request) => request(this.axios, this.basePath)); | ||
@@ -2098,0 +2316,0 @@ } |
11
base.ts
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -17,6 +17,7 @@ * | ||
import { Configuration } from "./configuration"; | ||
import type { Configuration } from './configuration'; | ||
// Some imports not used depending on template conditions | ||
// @ts-ignore | ||
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; | ||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import globalAxios from 'axios'; | ||
@@ -43,3 +44,3 @@ export const BASE_PATH = "https://api.croct.io/export".replace(/\/+$/, ""); | ||
url: string; | ||
options: any; | ||
options: AxiosRequestConfig; | ||
} | ||
@@ -70,6 +71,6 @@ | ||
export class RequiredError extends Error { | ||
name: "RequiredError" = "RequiredError"; | ||
constructor(public field: string, msg?: string) { | ||
super(msg); | ||
this.name = "RequiredError" | ||
} | ||
} |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -17,5 +17,6 @@ * | ||
import { Configuration } from "./configuration"; | ||
import { RequiredError, RequestArgs } from "./base"; | ||
import { AxiosInstance } from 'axios'; | ||
import type { Configuration } from "./configuration"; | ||
import type { RequestArgs } from "./base"; | ||
import type { AxiosInstance, AxiosResponse } from 'axios'; | ||
import { RequiredError } from "./base"; | ||
@@ -88,2 +89,24 @@ /** | ||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { | ||
if (parameter == null) return; | ||
if (typeof parameter === "object") { | ||
if (Array.isArray(parameter)) { | ||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); | ||
} | ||
else { | ||
Object.keys(parameter).forEach(currentKey => | ||
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) | ||
); | ||
} | ||
} | ||
else { | ||
if (urlSearchParams.has(key)) { | ||
urlSearchParams.append(key, parameter); | ||
} | ||
else { | ||
urlSearchParams.set(key, parameter); | ||
} | ||
} | ||
} | ||
/** | ||
@@ -95,14 +118,3 @@ * | ||
const searchParams = new URLSearchParams(url.search); | ||
for (const object of objects) { | ||
for (const key in object) { | ||
if (Array.isArray(object[key])) { | ||
searchParams.delete(key); | ||
for (const item of object[key]) { | ||
searchParams.append(key, item); | ||
} | ||
} else { | ||
searchParams.set(key, object[key]); | ||
} | ||
} | ||
} | ||
setFlattenedQueryParams(searchParams, objects); | ||
url.search = searchParams.toString(); | ||
@@ -138,6 +150,6 @@ } | ||
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { | ||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { | ||
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { | ||
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url}; | ||
return axios.request(axiosRequestArgs); | ||
return axios.request<T, R>(axiosRequestArgs); | ||
}; | ||
} |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -10,0 +10,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -13,5 +13,6 @@ * | ||
*/ | ||
import { Configuration } from './configuration'; | ||
import { AxiosPromise, AxiosInstance } from 'axios'; | ||
import { RequestArgs, BaseAPI } from './base'; | ||
import type { Configuration } from './configuration'; | ||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
import type { RequestArgs } from './base'; | ||
import { BaseAPI } from './base'; | ||
/** | ||
@@ -23,3 +24,3 @@ * | ||
export interface ApiProblem { | ||
[key: string]: any | any; | ||
[key: string]: any; | ||
/** | ||
@@ -30,3 +31,3 @@ * | ||
*/ | ||
title: string; | ||
'title': string; | ||
/** | ||
@@ -37,3 +38,3 @@ * | ||
*/ | ||
type: string; | ||
'type': string; | ||
/** | ||
@@ -44,3 +45,3 @@ * | ||
*/ | ||
details?: string; | ||
'details'?: string; | ||
} | ||
@@ -58,3 +59,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -65,3 +66,3 @@ * The version of the browser, non-empty. For example, \"79.0.3945.130\", \"11\" or \"160.1\". | ||
*/ | ||
version: string | null; | ||
'version': string | null; | ||
/** | ||
@@ -72,3 +73,3 @@ * | ||
*/ | ||
type: BrowserType; | ||
'type': BrowserType; | ||
} | ||
@@ -80,9 +81,10 @@ /** | ||
*/ | ||
export declare enum BrowserType { | ||
WEB = "WEB", | ||
IN_APP = "IN_APP", | ||
CRAWLER = "CRAWLER", | ||
OTHER = "OTHER", | ||
UNKNOWN = "UNKNOWN" | ||
} | ||
export declare const BrowserType: { | ||
readonly WEB: "WEB"; | ||
readonly IN_APP: "IN_APP"; | ||
readonly CRAWLER: "CRAWLER"; | ||
readonly OTHER: "OTHER"; | ||
readonly UNKNOWN: "UNKNOWN"; | ||
}; | ||
export declare type BrowserType = typeof BrowserType[keyof typeof BrowserType]; | ||
/** | ||
@@ -99,3 +101,3 @@ * | ||
*/ | ||
name?: string | null; | ||
'name'?: string | null; | ||
/** | ||
@@ -106,3 +108,3 @@ * The advertiser that sent traffic to the application. For example, \"newsletter4\". | ||
*/ | ||
source?: string | null; | ||
'source'?: string | null; | ||
/** | ||
@@ -113,3 +115,3 @@ * The advertising or marketing medium. For example, \"email\". | ||
*/ | ||
medium?: string | null; | ||
'medium'?: string | null; | ||
/** | ||
@@ -120,3 +122,3 @@ * The specific content item related the campaign. For example, \"Buy now!\". | ||
*/ | ||
content?: string | null; | ||
'content'?: string | null; | ||
/** | ||
@@ -127,3 +129,3 @@ * The search keywords. Foe example, \"web personalization\" | ||
*/ | ||
term?: string | null; | ||
'term'?: string | null; | ||
} | ||
@@ -141,3 +143,3 @@ /** | ||
*/ | ||
currency: string; | ||
'currency': string; | ||
/** | ||
@@ -148,3 +150,3 @@ * The list of items in the shopping cart. | ||
*/ | ||
items: Array<CartItem>; | ||
'items': Array<CartItem>; | ||
/** | ||
@@ -155,3 +157,3 @@ * The total of all items and quantities in the shopping cart including applied item promotions. Applied order discounts, estimated shipping, and applied shipping discounts should be excluded from the subtotal amount. | ||
*/ | ||
subtotal: number | null; | ||
'subtotal': number | null; | ||
/** | ||
@@ -162,3 +164,3 @@ * The total shipping price for the items in the shopping cart, including any handling charges. | ||
*/ | ||
shippingPrice: number | null; | ||
'shippingPrice': number | null; | ||
/** | ||
@@ -169,3 +171,3 @@ * The taxes associated with the transaction. | ||
*/ | ||
taxes: object | null; | ||
'taxes': object | null; | ||
/** | ||
@@ -176,3 +178,3 @@ * The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs. | ||
*/ | ||
costs: object | null; | ||
'costs': object | null; | ||
/** | ||
@@ -183,3 +185,3 @@ * The amount of the discount applied to the shopping cart. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -190,3 +192,3 @@ * The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -197,3 +199,3 @@ * The coupon applied to the shopping cart. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
/** | ||
@@ -204,3 +206,3 @@ * The timestamp when the shopping cart was last updated, in milliseconds since epoch. | ||
*/ | ||
lastUpdateTime: number; | ||
'lastUpdateTime': number; | ||
} | ||
@@ -218,3 +220,3 @@ /** | ||
*/ | ||
index: number; | ||
'index': number; | ||
/** | ||
@@ -225,3 +227,3 @@ * | ||
*/ | ||
product: ProductDetails; | ||
'product': ProductDetails; | ||
/** | ||
@@ -232,3 +234,3 @@ * The number of units of the item in the shopping cart. | ||
*/ | ||
quantity: number; | ||
'quantity': number; | ||
/** | ||
@@ -239,3 +241,3 @@ * The total for the item. It includes discounts and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -246,3 +248,3 @@ * The amount of the discount applied to the item. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -253,3 +255,3 @@ * The coupon applied to the item. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
} | ||
@@ -267,3 +269,3 @@ /** | ||
*/ | ||
cart: Cart; | ||
'cart': Cart; | ||
} | ||
@@ -281,3 +283,3 @@ /** | ||
*/ | ||
cart: Cart; | ||
'cart': Cart; | ||
} | ||
@@ -295,3 +297,3 @@ /** | ||
*/ | ||
cart: Cart; | ||
'cart': Cart; | ||
/** | ||
@@ -302,3 +304,3 @@ * The ID that uniquely identifies the order across the store. | ||
*/ | ||
orderId: string | null; | ||
'orderId': string | null; | ||
} | ||
@@ -316,3 +318,3 @@ /** | ||
*/ | ||
client: WebClient; | ||
'client': WebClient; | ||
} | ||
@@ -330,3 +332,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -337,3 +339,3 @@ * The vendor of the device, non-empty. For example, \"Apple\", \"Samsung\" or \"LG\". | ||
*/ | ||
vendor: string | null; | ||
'vendor': string | null; | ||
/** | ||
@@ -344,3 +346,3 @@ * | ||
*/ | ||
category: DeviceCategory; | ||
'category': DeviceCategory; | ||
/** | ||
@@ -351,3 +353,3 @@ * | ||
*/ | ||
operatingSystem: OperatingSystem; | ||
'operatingSystem': OperatingSystem; | ||
} | ||
@@ -359,10 +361,11 @@ /** | ||
*/ | ||
export declare enum DeviceCategory { | ||
DESKTOP = "DESKTOP", | ||
TABLET = "TABLET", | ||
MOBILE = "MOBILE", | ||
BOT = "BOT", | ||
OTHER = "OTHER", | ||
UNKNOWN = "UNKNOWN" | ||
} | ||
export declare const DeviceCategory: { | ||
readonly DESKTOP: "DESKTOP"; | ||
readonly TABLET: "TABLET"; | ||
readonly MOBILE: "MOBILE"; | ||
readonly BOT: "BOT"; | ||
readonly OTHER: "OTHER"; | ||
readonly UNKNOWN: "UNKNOWN"; | ||
}; | ||
export declare type DeviceCategory = typeof DeviceCategory[keyof typeof DeviceCategory]; | ||
/** | ||
@@ -379,3 +382,3 @@ * | ||
*/ | ||
sessionId: string; | ||
'sessionId': string; | ||
/** | ||
@@ -386,3 +389,3 @@ * The internal ID of the user who originated the event. | ||
*/ | ||
userId: string; | ||
'userId': string; | ||
/** | ||
@@ -393,3 +396,3 @@ * The timestamp when the event was tracked, in milliseconds since epoch. | ||
*/ | ||
timestamp: number; | ||
'timestamp': number; | ||
/** | ||
@@ -400,3 +403,3 @@ * | ||
*/ | ||
context: EventContext | null; | ||
'context': EventContext | null; | ||
/** | ||
@@ -407,3 +410,3 @@ * | ||
*/ | ||
payload: EventPayload; | ||
'payload': EventPayload; | ||
} | ||
@@ -421,3 +424,3 @@ /** | ||
*/ | ||
type: string; | ||
'type': string; | ||
/** | ||
@@ -428,3 +431,3 @@ * | ||
*/ | ||
metadata?: { | ||
'metadata'?: { | ||
[key: string]: string | undefined; | ||
@@ -444,3 +447,3 @@ }; | ||
*/ | ||
name: string; | ||
'name': string; | ||
/** | ||
@@ -451,3 +454,3 @@ * The ID of the personalization associated with the event. | ||
*/ | ||
personalizationId: string | null; | ||
'personalizationId': string | null; | ||
/** | ||
@@ -458,3 +461,3 @@ * The name of the audience associated with the event. | ||
*/ | ||
audience: string | null; | ||
'audience': string | null; | ||
/** | ||
@@ -465,3 +468,3 @@ * The ID of the test associated with the event. | ||
*/ | ||
testId: string | null; | ||
'testId': string | null; | ||
/** | ||
@@ -472,3 +475,3 @@ * The ID of the test group associated with the event, also known as \"variant\". | ||
*/ | ||
groupId: string | null; | ||
'groupId': string | null; | ||
/** | ||
@@ -479,3 +482,3 @@ * The details about the event. | ||
*/ | ||
details: object; | ||
'details': object; | ||
} | ||
@@ -493,3 +496,3 @@ /** | ||
*/ | ||
type: string; | ||
'@type': string; | ||
} | ||
@@ -507,9 +510,15 @@ /** | ||
*/ | ||
items: Array<Event>; | ||
'items': Array<Event>; | ||
/** | ||
* | ||
* @type {EventResponseMetadata} | ||
* @memberof EventResponse | ||
*/ | ||
'metadata': EventResponseMetadata; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof EventResponse | ||
*/ | ||
nextCursor: string; | ||
'nextCursor': string; | ||
} | ||
@@ -519,26 +528,71 @@ /** | ||
* @export | ||
* @enum {string} | ||
* @interface EventResponseMetadata | ||
*/ | ||
export declare enum EventType { | ||
USER_SIGNED_UP = "userSignedUp", | ||
USER_SIGNED_IN = "userSignedIn", | ||
USER_SIGNED_OUT = "userSignedOut", | ||
TAB_OPENED = "tabOpened", | ||
TAB_URL_CHANGED = "tabUrlChanged", | ||
TAB_VISIBILITY_CHANGED = "tabVisibilityChanged", | ||
LOCATION_DETECTED = "locationDetected", | ||
CLIENT_DETECTED = "clientDetected", | ||
PAGE_OPENED = "pageOpened", | ||
PAGE_LOADED = "pageLoaded", | ||
PRODUCT_VIEWED = "productViewed", | ||
CART_VIEWED = "cartViewed", | ||
CART_MODIFIED = "cartModified", | ||
CHECKOUT_STARTED = "checkoutStarted", | ||
ORDER_PLACED = "orderPlaced", | ||
TEST_GROUP_ASSIGNED = "testGroupAssigned", | ||
NOTHING_CHANGED = "nothingChanged", | ||
GOAL_COMPLETED = "goalCompleted", | ||
EVENT_OCCURRED = "eventOccurred" | ||
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} | ||
*/ | ||
export declare const EventType: { | ||
readonly USER_SIGNED_UP: "userSignedUp"; | ||
readonly USER_SIGNED_IN: "userSignedIn"; | ||
readonly USER_SIGNED_OUT: "userSignedOut"; | ||
readonly TAB_OPENED: "tabOpened"; | ||
readonly TAB_URL_CHANGED: "tabUrlChanged"; | ||
readonly TAB_VISIBILITY_CHANGED: "tabVisibilityChanged"; | ||
readonly LOCATION_DETECTED: "locationDetected"; | ||
readonly CLIENT_DETECTED: "clientDetected"; | ||
readonly PAGE_OPENED: "pageOpened"; | ||
readonly PAGE_LOADED: "pageLoaded"; | ||
readonly PRODUCT_VIEWED: "productViewed"; | ||
readonly CART_VIEWED: "cartViewed"; | ||
readonly CART_MODIFIED: "cartModified"; | ||
readonly CHECKOUT_STARTED: "checkoutStarted"; | ||
readonly ORDER_PLACED: "orderPlaced"; | ||
readonly TEST_GROUP_ASSIGNED: "testGroupAssigned"; | ||
readonly NOTHING_CHANGED: "nothingChanged"; | ||
readonly GOAL_COMPLETED: "goalCompleted"; | ||
readonly EVENT_OCCURRED: "eventOccurred"; | ||
readonly SLOT_PERSONALIZED: "slotPersonalized"; | ||
}; | ||
export declare type EventType = typeof EventType[keyof typeof EventType]; | ||
/** | ||
* A geographic location represented by a latitude and longitude coordinates pair. | ||
@@ -554,3 +608,3 @@ * @export | ||
*/ | ||
latitude: number; | ||
'latitude': number; | ||
/** | ||
@@ -561,3 +615,3 @@ * The longitude of the geo-point, may be either negative or positive. | ||
*/ | ||
longitude: number; | ||
'longitude': number; | ||
} | ||
@@ -575,3 +629,3 @@ /** | ||
*/ | ||
goalId: string; | ||
'goalId': string; | ||
/** | ||
@@ -582,3 +636,3 @@ * The monetary value associated to the completion of the goal. This can represent an estimated value or a symbolic value. For example, if the sales team can close 10% of people who sign up for a newsletter, and the average transaction is $500, then a possible value for newsletter sign-ups can be $50 (i.e., 10% of $500). | ||
*/ | ||
value: string | null; | ||
'value': string | null; | ||
/** | ||
@@ -589,3 +643,3 @@ * The currency in which the monetary value is expressed. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin. | ||
*/ | ||
currency: string | null; | ||
'currency': string | null; | ||
} | ||
@@ -603,3 +657,3 @@ /** | ||
*/ | ||
continent: LocationContinent | null; | ||
'continent': LocationContinent | null; | ||
/** | ||
@@ -610,3 +664,3 @@ * The highest administrative division, also known as a nation. The value is a two-letter country code, as defined in ISO 3166. For example, US for United States, BR for Brazil and DE for Germany. | ||
*/ | ||
country: string | null; | ||
'country': string | null; | ||
/** | ||
@@ -617,3 +671,3 @@ * | ||
*/ | ||
region: Region; | ||
'region': Region; | ||
/** | ||
@@ -624,3 +678,3 @@ * The name of the incorporated city or town political entity. For example, \"Sao Paulo\". | ||
*/ | ||
city: string | null; | ||
'city': string | null; | ||
/** | ||
@@ -631,3 +685,3 @@ * An administrative division smaller than a city and larger than a neighborhood. For example, the district of Manhattan in New York. | ||
*/ | ||
district: string | null; | ||
'district': string | null; | ||
/** | ||
@@ -638,3 +692,3 @@ * The time-zone ID as defined in IANA Time Zone Database. For example, \"America/New_York\". | ||
*/ | ||
timezone: string | null; | ||
'timezone': string | null; | ||
/** | ||
@@ -645,3 +699,3 @@ * | ||
*/ | ||
coordinates: GeoPoint | null; | ||
'coordinates': GeoPoint | null; | ||
/** | ||
@@ -652,3 +706,3 @@ * | ||
*/ | ||
source: LocationSource | null; | ||
'source': LocationSource | null; | ||
} | ||
@@ -660,11 +714,12 @@ /** | ||
*/ | ||
export declare enum LocationContinent { | ||
AF = "AF", | ||
AN = "AN", | ||
AS = "AS", | ||
EU = "EU", | ||
NA = "NA", | ||
OC = "OC", | ||
SA = "SA" | ||
} | ||
export declare const LocationContinent: { | ||
readonly AF: "AF"; | ||
readonly AN: "AN"; | ||
readonly AS: "AS"; | ||
readonly EU: "EU"; | ||
readonly NA: "NA"; | ||
readonly OC: "OC"; | ||
readonly SA: "SA"; | ||
}; | ||
export declare type LocationContinent = typeof LocationContinent[keyof typeof LocationContinent]; | ||
/** | ||
@@ -681,3 +736,3 @@ * An event recording that the location of a user was detected. | ||
*/ | ||
location: Location; | ||
'location': Location; | ||
} | ||
@@ -689,9 +744,10 @@ /** | ||
*/ | ||
export declare enum LocationSource { | ||
UNKNOWN = "UNKNOWN", | ||
IP = "IP", | ||
INPUT = "INPUT", | ||
BROWSER = "BROWSER", | ||
GPS = "GPS" | ||
} | ||
export declare const LocationSource: { | ||
readonly UNKNOWN: "UNKNOWN"; | ||
readonly IP: "IP"; | ||
readonly INPUT: "INPUT"; | ||
readonly BROWSER: "BROWSER"; | ||
readonly GPS: "GPS"; | ||
}; | ||
export declare type LocationSource = typeof LocationSource[keyof typeof LocationSource]; | ||
/** | ||
@@ -708,3 +764,3 @@ * An event recording a period of inactivity. | ||
*/ | ||
sinceTime: number; | ||
'sinceTime': number; | ||
} | ||
@@ -722,3 +778,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -729,3 +785,3 @@ * The version of operating system, non-empty. For example, \"10.15.1\", \"NT 5.1\" or \"8.4\". | ||
*/ | ||
version: string | null; | ||
'version': string | null; | ||
} | ||
@@ -743,3 +799,3 @@ /** | ||
*/ | ||
orderId: string; | ||
'orderId': string; | ||
/** | ||
@@ -750,3 +806,3 @@ * The currency in which the monetary values are expressed in the order. The currency should be specified using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in ISO 4217, as is the case with cryptocurrencies, it is allowed the use of non-ISO codes adopted locally or commercially. For example, \"BRL\" for Brazilian real or \"BTC\" for Bitcoin. | ||
*/ | ||
currency: string; | ||
'currency': string; | ||
/** | ||
@@ -757,3 +813,3 @@ * The list of items in the order. | ||
*/ | ||
items: Array<OrderItem>; | ||
'items': Array<OrderItem>; | ||
/** | ||
@@ -764,3 +820,3 @@ * The total of all items and quantities in the order including applied item promotions. Applied order discounts, estimated shipping, and applied shipping discounts should be excluded from the subtotal amount. | ||
*/ | ||
subtotal: number | null; | ||
'subtotal': number | null; | ||
/** | ||
@@ -771,3 +827,3 @@ * The total shipping price for the order, including any handling charges. | ||
*/ | ||
shippingPrice: number | null; | ||
'shippingPrice': number | null; | ||
/** | ||
@@ -778,3 +834,3 @@ * The taxes associated with the transaction. | ||
*/ | ||
taxes: object | null; | ||
'taxes': object | null; | ||
/** | ||
@@ -785,3 +841,3 @@ * The costs associated with the transaction, such as manufacturing costs, shipping expenses not borne by the customer, or any other costs. | ||
*/ | ||
costs: object | null; | ||
'costs': object | null; | ||
/** | ||
@@ -792,3 +848,3 @@ * The amount of the discount applied to the order. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -799,3 +855,3 @@ * The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -806,3 +862,3 @@ * The coupon applied to the order. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
/** | ||
@@ -813,3 +869,3 @@ * The payment method used in the payment. For example, \"Credit Card\", \"Paypal\" or \"Wallet\". | ||
*/ | ||
paymentMethod: string | null; | ||
'paymentMethod': string | null; | ||
/** | ||
@@ -820,3 +876,3 @@ * The number of installments of the transaction, non-negative. | ||
*/ | ||
installments: number | null; | ||
'installments': number | null; | ||
/** | ||
@@ -827,3 +883,3 @@ * | ||
*/ | ||
status: OrderStatus | null; | ||
'status': OrderStatus | null; | ||
} | ||
@@ -841,3 +897,3 @@ /** | ||
*/ | ||
index: number; | ||
'index': number; | ||
/** | ||
@@ -848,3 +904,3 @@ * | ||
*/ | ||
product: ProductDetails; | ||
'product': ProductDetails; | ||
/** | ||
@@ -855,3 +911,3 @@ * The number of units of the item ordered. | ||
*/ | ||
quantity: number; | ||
'quantity': number; | ||
/** | ||
@@ -862,3 +918,3 @@ * The total for the item. It includes discounts and any other adjustment. | ||
*/ | ||
total: number; | ||
'total': number; | ||
/** | ||
@@ -869,3 +925,3 @@ * The amount of the discount applied to the item. | ||
*/ | ||
discount: number | null; | ||
'discount': number | null; | ||
/** | ||
@@ -876,3 +932,3 @@ * The coupon applied to the item. For example, \"SUPER_DEALS\". | ||
*/ | ||
coupon: string | null; | ||
'coupon': string | null; | ||
} | ||
@@ -890,3 +946,3 @@ /** | ||
*/ | ||
order: Order; | ||
'order': Order; | ||
} | ||
@@ -898,7 +954,8 @@ /** | ||
*/ | ||
export declare enum OrderStatus { | ||
PLACED = "PLACED", | ||
PAID = "PAID", | ||
COMPLETED = "COMPLETED" | ||
} | ||
export declare const OrderStatus: { | ||
readonly PLACED: "PLACED"; | ||
readonly PAID: "PAID"; | ||
readonly COMPLETED: "COMPLETED"; | ||
}; | ||
export declare type OrderStatus = typeof OrderStatus[keyof typeof OrderStatus]; | ||
/** | ||
@@ -915,3 +972,3 @@ * An event recording that a page was loaded. | ||
*/ | ||
url: string; | ||
'url': string; | ||
/** | ||
@@ -922,3 +979,3 @@ * The title of the page. | ||
*/ | ||
title: string; | ||
'title': string; | ||
/** | ||
@@ -929,3 +986,3 @@ * The last time the page was modified. | ||
*/ | ||
lastModifiedTime: number; | ||
'lastModifiedTime': number; | ||
} | ||
@@ -943,3 +1000,3 @@ /** | ||
*/ | ||
url: string; | ||
'url': string; | ||
/** | ||
@@ -950,3 +1007,3 @@ * The user-agent of the client. | ||
*/ | ||
userAgent: string | null; | ||
'userAgent': string | null; | ||
/** | ||
@@ -957,3 +1014,3 @@ * An ordered list of the user\'s preferred languages. | ||
*/ | ||
preferredLanguages: string | null; | ||
'preferredLanguages': string | null; | ||
/** | ||
@@ -964,3 +1021,3 @@ * The URI of the page that linked to the page that was opened. The value is null when the user navigated to the page directly (not through a link, but by using a bookmark, for example). | ||
*/ | ||
referrer: string | null; | ||
'referrer': string | null; | ||
} | ||
@@ -978,3 +1035,3 @@ /** | ||
*/ | ||
productId: string; | ||
'productId': string; | ||
/** | ||
@@ -985,3 +1042,3 @@ * The code that uniquely identifies the product variant across the store, non-empty. For example, \"IPH-GRE-64\". | ||
*/ | ||
sku: string | null; | ||
'sku': string | null; | ||
/** | ||
@@ -992,3 +1049,3 @@ * The name of the product, non-empty. For example \"iPhone\". | ||
*/ | ||
name: string; | ||
'name': string; | ||
/** | ||
@@ -999,3 +1056,3 @@ * The category of the product, non-empty. For example, \"Phone\". | ||
*/ | ||
category: string | null; | ||
'category': string | null; | ||
/** | ||
@@ -1006,3 +1063,3 @@ * The brand associated with the product. For example, \"Apple\". | ||
*/ | ||
brand: string | null; | ||
'brand': string | null; | ||
/** | ||
@@ -1013,3 +1070,3 @@ * The variant of the product, such as size, color and style. For example, \"64GB Green\". | ||
*/ | ||
variant: string | null; | ||
'variant': string | null; | ||
/** | ||
@@ -1020,3 +1077,3 @@ * The price of the product displayed in the store. For example, 59.90. | ||
*/ | ||
displayPrice: number; | ||
'displayPrice': number; | ||
/** | ||
@@ -1027,3 +1084,3 @@ * The original price of the product. For example, 99.90. | ||
*/ | ||
originalPrice: number | null; | ||
'originalPrice': number | null; | ||
/** | ||
@@ -1034,3 +1091,3 @@ * The URL of the product page. For example, \"https://apple.com/iphone\". | ||
*/ | ||
url: string | null; | ||
'url': string | null; | ||
/** | ||
@@ -1041,3 +1098,3 @@ * The URL of the main product image. For example, \"https://img.apple.com/iphone.png\". | ||
*/ | ||
imageUrl: string | null; | ||
'imageUrl': string | null; | ||
} | ||
@@ -1055,3 +1112,3 @@ /** | ||
*/ | ||
product: ProductDetails; | ||
'product': ProductDetails; | ||
} | ||
@@ -1069,3 +1126,3 @@ /** | ||
*/ | ||
name: string | null; | ||
'name': string | null; | ||
/** | ||
@@ -1076,3 +1133,3 @@ * The 2-letter code as defined by the ISO 3166-2 standard. For example, \"SP\". | ||
*/ | ||
code: string | null; | ||
'code': string | null; | ||
} | ||
@@ -1090,9 +1147,9 @@ /** | ||
*/ | ||
sessionId?: string; | ||
'sessionId'?: string; | ||
/** | ||
* The ID that uniquely identifies the user across the cluster. | ||
* The ID that uniquely identifies the user across the workspace. | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
userId?: string; | ||
'userId'?: string; | ||
/** | ||
@@ -1103,3 +1160,3 @@ * The ID of the session that superseded this session. Usually, a session receives a parent ID when a user is identified, causing the current anonymous session to end and a new identified session to begin. In this case, the ID of the new session is assigned as the parent ID of the anonymous session. | ||
*/ | ||
parentId?: string | null; | ||
'parentId'?: string | null; | ||
/** | ||
@@ -1110,3 +1167,3 @@ * The flag that indicates whether the user is anonymous. | ||
*/ | ||
isAnonymous?: boolean; | ||
'isAnonymous'?: boolean; | ||
/** | ||
@@ -1117,3 +1174,3 @@ * | ||
*/ | ||
window?: SessionWindow; | ||
'window'?: SessionWindow; | ||
/** | ||
@@ -1124,3 +1181,3 @@ * The time from which the session is closed for new events, but still may accept late-arriving events. The close time may be extended if new events arrive before the session is closed. | ||
*/ | ||
closeTime?: number; | ||
'closeTime'?: number; | ||
/** | ||
@@ -1131,3 +1188,3 @@ * The URI of the content that linked to the page that started the session. | ||
*/ | ||
referrer?: string | null; | ||
'referrer'?: string | null; | ||
/** | ||
@@ -1138,3 +1195,3 @@ * The page that started the session. | ||
*/ | ||
landingPageUrl?: string | null; | ||
'landingPageUrl'?: string | null; | ||
/** | ||
@@ -1145,3 +1202,3 @@ * | ||
*/ | ||
campaign?: Campaign; | ||
'campaign'?: Campaign; | ||
/** | ||
@@ -1152,3 +1209,3 @@ * | ||
*/ | ||
location?: Location; | ||
'location'?: Location; | ||
/** | ||
@@ -1159,3 +1216,3 @@ * | ||
*/ | ||
client?: WebClient; | ||
'client'?: WebClient; | ||
/** | ||
@@ -1166,3 +1223,3 @@ * The custom attributes. | ||
*/ | ||
attributes?: { | ||
'attributes'?: { | ||
[key: string]: any | undefined; | ||
@@ -1175,3 +1232,3 @@ }; | ||
*/ | ||
statistics?: SessionStatistics; | ||
'statistics'?: SessionStatistics; | ||
} | ||
@@ -1189,3 +1246,3 @@ /** | ||
*/ | ||
items: Array<Session>; | ||
'items': Array<Session>; | ||
/** | ||
@@ -1196,3 +1253,3 @@ * | ||
*/ | ||
nextCursor: string; | ||
'nextCursor': string; | ||
} | ||
@@ -1210,3 +1267,3 @@ /** | ||
*/ | ||
pageViews?: number; | ||
'pageViews'?: number; | ||
/** | ||
@@ -1217,3 +1274,3 @@ * The total number of tab views. | ||
*/ | ||
tabViews?: number; | ||
'tabViews'?: number; | ||
/** | ||
@@ -1224,3 +1281,3 @@ * The total number of orders placed. | ||
*/ | ||
orders?: number; | ||
'orders'?: number; | ||
} | ||
@@ -1238,3 +1295,3 @@ /** | ||
*/ | ||
start?: number; | ||
'start'?: number; | ||
/** | ||
@@ -1245,5 +1302,135 @@ * | ||
*/ | ||
end?: number; | ||
'end'?: number; | ||
} | ||
/** | ||
* An event recording a slot personalization. | ||
* @export | ||
* @interface SlotPersonalized | ||
*/ | ||
export interface SlotPersonalized { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof SlotPersonalized | ||
*/ | ||
'@type': string; | ||
/** | ||
* | ||
* @type {SlotPersonalizedPersonalization} | ||
* @memberof SlotPersonalized | ||
*/ | ||
'personalization': SlotPersonalizedPersonalization; | ||
/** | ||
* | ||
* @type {SlotPersonalizedMetadata} | ||
* @memberof SlotPersonalized | ||
*/ | ||
'metadata': SlotPersonalizedMetadata; | ||
} | ||
/** | ||
* Additional information about the personalization. | ||
* @export | ||
* @interface SlotPersonalizedMetadata | ||
*/ | ||
export interface SlotPersonalizedMetadata { | ||
/** | ||
* The name of the audience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'audienceName': string | null; | ||
/** | ||
* The custom ID of the audience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'audienceCustomId': string | null; | ||
/** | ||
* The name of the slot. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'slotName': string | null; | ||
/** | ||
* The custom ID of the slot. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'slotCustomId': string | null; | ||
/** | ||
* The name of the experience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'experienceName': string | null; | ||
/** | ||
* The name of the experiment. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'experimentName': string | null; | ||
/** | ||
* The name of the variant. | ||
* @type {string} | ||
* @memberof SlotPersonalizedMetadata | ||
*/ | ||
'variantName': string | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SlotPersonalizedPersonalization | ||
*/ | ||
export interface SlotPersonalizedPersonalization { | ||
/** | ||
* The ID that uniquely identifies the audience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'audienceId': string; | ||
/** | ||
* The ID that uniquely identifies the slot. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'slotId': string; | ||
/** | ||
* The ID that uniquely identifies the experience. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'experienceId': string; | ||
/** | ||
* The ID that uniquely identifies the content. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'contentId': string; | ||
/** | ||
* | ||
* @type {SlotPersonalizedPersonalizationAssignedVariant} | ||
* @memberof SlotPersonalizedPersonalization | ||
*/ | ||
'assignedVariant': SlotPersonalizedPersonalizationAssignedVariant | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SlotPersonalizedPersonalizationAssignedVariant | ||
*/ | ||
export interface SlotPersonalizedPersonalizationAssignedVariant { | ||
/** | ||
* The ID that uniquely identifies the experiment. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalizationAssignedVariant | ||
*/ | ||
'experimentId'?: string; | ||
/** | ||
* The ID that uniquely identifies the variant. | ||
* @type {string} | ||
* @memberof SlotPersonalizedPersonalizationAssignedVariant | ||
*/ | ||
'variantId'?: string; | ||
} | ||
/** | ||
* An event recording that a new tab was opened. | ||
@@ -1259,3 +1446,3 @@ * @export | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
} | ||
@@ -1273,3 +1460,3 @@ /** | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
/** | ||
@@ -1280,3 +1467,3 @@ * The URL the page that the tab was on. | ||
*/ | ||
url: string; | ||
'url': string; | ||
} | ||
@@ -1288,6 +1475,7 @@ /** | ||
*/ | ||
export declare enum TabVisibility { | ||
VISIBLE = "VISIBLE", | ||
HIDDLE = "HIDDEN" | ||
} | ||
export declare const TabVisibility: { | ||
readonly VISIBLE: "VISIBLE"; | ||
readonly HIDDLE: "HIDDEN"; | ||
}; | ||
export declare type TabVisibility = typeof TabVisibility[keyof typeof TabVisibility]; | ||
/** | ||
@@ -1304,3 +1492,3 @@ * An event recording that the visibility of a tab has changed. | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
/** | ||
@@ -1311,3 +1499,3 @@ * | ||
*/ | ||
visibility: TabVisibility; | ||
'visibility': TabVisibility; | ||
} | ||
@@ -1325,3 +1513,3 @@ /** | ||
*/ | ||
testId: string; | ||
'testId': string; | ||
/** | ||
@@ -1332,3 +1520,3 @@ * The ID of the test group, also known as \"variant\". For example, \"black-friday-promo\" or \"black-friday-shipping\". | ||
*/ | ||
groupId: string; | ||
'groupId': string; | ||
} | ||
@@ -1342,13 +1530,13 @@ /** | ||
/** | ||
* The internal ID assigned to the user, unique across the cluster. | ||
* The internal ID assigned to the user, unique across the workspace. | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
userId?: string; | ||
'userId'?: string; | ||
/** | ||
* The external user ID that is used to identify the user on the application side, unique across the cluster. It is always null for anonymous users. | ||
* The external user ID that is used to identify the user on the application side, unique across the workspace. It is always null for anonymous users. | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
externalUserId?: string | null; | ||
'externalUserId'?: string | null; | ||
/** | ||
@@ -1359,3 +1547,3 @@ * The first name attribute. | ||
*/ | ||
firstName?: string | null; | ||
'firstName'?: string | null; | ||
/** | ||
@@ -1366,3 +1554,3 @@ * The last name attribute. | ||
*/ | ||
lastName?: string | null; | ||
'lastName'?: string | null; | ||
/** | ||
@@ -1373,3 +1561,3 @@ * The birth date attribute. | ||
*/ | ||
birthDate?: number | null; | ||
'birthDate'?: number | null; | ||
/** | ||
@@ -1380,3 +1568,3 @@ * The gender attribute. | ||
*/ | ||
gender?: string | null; | ||
'gender'?: string | null; | ||
/** | ||
@@ -1387,3 +1575,3 @@ * The email attribute. | ||
*/ | ||
email?: string | null; | ||
'email'?: string | null; | ||
/** | ||
@@ -1394,3 +1582,3 @@ * The alternate email attribute. | ||
*/ | ||
alternateEmail?: string | null; | ||
'alternateEmail'?: string | null; | ||
/** | ||
@@ -1401,3 +1589,3 @@ * The phone attribute. | ||
*/ | ||
phone?: string | null; | ||
'phone'?: string | null; | ||
/** | ||
@@ -1408,3 +1596,3 @@ * The alternate phone attribute. | ||
*/ | ||
alternatePhone?: string | null; | ||
'alternatePhone'?: string | null; | ||
/** | ||
@@ -1415,3 +1603,3 @@ * | ||
*/ | ||
address?: UserAddress; | ||
'address'?: UserAddress; | ||
/** | ||
@@ -1422,3 +1610,3 @@ * The avatar attribute. | ||
*/ | ||
avatar?: string | null; | ||
'avatar'?: string | null; | ||
/** | ||
@@ -1429,3 +1617,3 @@ * The company attribute. | ||
*/ | ||
company?: string | null; | ||
'company'?: string | null; | ||
/** | ||
@@ -1436,3 +1624,3 @@ * The company URL attribute. | ||
*/ | ||
companyUrl?: string | null; | ||
'companyUrl'?: string | null; | ||
/** | ||
@@ -1443,3 +1631,3 @@ * The job title attribute. | ||
*/ | ||
jobTitle?: string | null; | ||
'jobTitle'?: string | null; | ||
/** | ||
@@ -1450,3 +1638,3 @@ * The activities attribute. | ||
*/ | ||
activities?: string | null; | ||
'activities'?: string | null; | ||
/** | ||
@@ -1457,3 +1645,3 @@ * The interests attribute. | ||
*/ | ||
interests?: string | null; | ||
'interests'?: string | null; | ||
/** | ||
@@ -1464,3 +1652,3 @@ * The custom attributes. | ||
*/ | ||
customAttributes?: { | ||
'customAttributes'?: { | ||
[key: string]: any | undefined; | ||
@@ -1473,3 +1661,3 @@ }; | ||
*/ | ||
lastModifiedTime?: number; | ||
'lastModifiedTime'?: number; | ||
/** | ||
@@ -1480,3 +1668,3 @@ * | ||
*/ | ||
statistics?: UserStatistics; | ||
'statistics'?: UserStatistics; | ||
} | ||
@@ -1494,3 +1682,3 @@ /** | ||
*/ | ||
street?: string | null; | ||
'street'?: string | null; | ||
/** | ||
@@ -1501,3 +1689,3 @@ * | ||
*/ | ||
district?: string | null; | ||
'district'?: string | null; | ||
/** | ||
@@ -1508,3 +1696,3 @@ * | ||
*/ | ||
city?: string | null; | ||
'city'?: string | null; | ||
/** | ||
@@ -1515,3 +1703,3 @@ * | ||
*/ | ||
region?: string | null; | ||
'region'?: string | null; | ||
/** | ||
@@ -1522,3 +1710,3 @@ * | ||
*/ | ||
country?: string | null; | ||
'country'?: string | null; | ||
/** | ||
@@ -1529,3 +1717,3 @@ * | ||
*/ | ||
postalCode?: string | null; | ||
'postalCode'?: string | null; | ||
} | ||
@@ -1543,3 +1731,3 @@ /** | ||
*/ | ||
items: Array<User>; | ||
'items': Array<User>; | ||
/** | ||
@@ -1550,3 +1738,3 @@ * | ||
*/ | ||
nextCursor: string; | ||
'nextCursor': string; | ||
} | ||
@@ -1564,3 +1752,3 @@ /** | ||
*/ | ||
externalUserId: string; | ||
'externalUserId': string; | ||
} | ||
@@ -1578,3 +1766,3 @@ /** | ||
*/ | ||
externalUserId: string; | ||
'externalUserId': string; | ||
} | ||
@@ -1592,3 +1780,3 @@ /** | ||
*/ | ||
externalUserId: string; | ||
'externalUserId': string; | ||
} | ||
@@ -1602,13 +1790,13 @@ /** | ||
/** | ||
* The total number of orders placed across all applications in a cluster. | ||
* The total number of orders placed across all applications in a workspace. | ||
* @type {number} | ||
* @memberof UserStatistics | ||
*/ | ||
orders?: number; | ||
'orders'?: number; | ||
/** | ||
* The total number of sessions across all applications in a cluster. | ||
* The total number of sessions across all applications in a workspace. | ||
* @type {number} | ||
* @memberof UserStatistics | ||
*/ | ||
sessions?: number; | ||
'sessions'?: number; | ||
} | ||
@@ -1626,3 +1814,3 @@ /** | ||
*/ | ||
browser: Browser; | ||
'browser': Browser; | ||
/** | ||
@@ -1633,3 +1821,3 @@ * | ||
*/ | ||
device: Device; | ||
'device': Device; | ||
} | ||
@@ -1647,3 +1835,3 @@ /** | ||
*/ | ||
tabId: string; | ||
'tabId': string; | ||
/** | ||
@@ -1654,3 +1842,3 @@ * The URL of the page that the client was on. | ||
*/ | ||
url: string; | ||
'url': string; | ||
} | ||
@@ -1672,3 +1860,3 @@ /** | ||
*/ | ||
exportEvents: (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any) => Promise<RequestArgs>; | ||
exportEvents: (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
/** | ||
@@ -1683,3 +1871,3 @@ * | ||
*/ | ||
exportSessions: (start?: number, end?: number, pageSize?: number, cursor?: string, options?: any) => Promise<RequestArgs>; | ||
exportSessions: (start?: number, end?: number, pageSize?: number, cursor?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
/** | ||
@@ -1694,3 +1882,3 @@ * | ||
*/ | ||
exportUsers: (start?: number, end?: number, pageSize?: number, cursor?: string, options?: any) => Promise<RequestArgs>; | ||
exportUsers: (start?: number, end?: number, pageSize?: number, cursor?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; | ||
}; | ||
@@ -1712,3 +1900,3 @@ /** | ||
*/ | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>>; | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>>; | ||
/** | ||
@@ -1723,3 +1911,3 @@ * | ||
*/ | ||
exportSessions(start?: number, end?: number, pageSize?: number, cursor?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionResponse>>; | ||
exportSessions(start?: number, end?: number, pageSize?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionResponse>>; | ||
/** | ||
@@ -1734,3 +1922,3 @@ * | ||
*/ | ||
exportUsers(start?: number, end?: number, pageSize?: number, cursor?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponse>>; | ||
exportUsers(start?: number, end?: number, pageSize?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserResponse>>; | ||
}; | ||
@@ -1887,3 +2075,3 @@ /** | ||
*/ | ||
exportEvents(requestParameters?: ExportApiExportEventsRequest, options?: any): Promise<import("axios").AxiosResponse<EventResponse>>; | ||
exportEvents(requestParameters?: ExportApiExportEventsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<EventResponse>>; | ||
/** | ||
@@ -1896,3 +2084,3 @@ * | ||
*/ | ||
exportSessions(requestParameters?: ExportApiExportSessionsRequest, options?: any): Promise<import("axios").AxiosResponse<SessionResponse>>; | ||
exportSessions(requestParameters?: ExportApiExportSessionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SessionResponse>>; | ||
/** | ||
@@ -1905,3 +2093,3 @@ * | ||
*/ | ||
exportUsers(requestParameters?: ExportApiExportUsersRequest, options?: any): Promise<import("axios").AxiosResponse<UserResponse>>; | ||
exportUsers(requestParameters?: ExportApiExportUsersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UserResponse>>; | ||
} |
138
dist/api.js
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -89,10 +89,9 @@ * | ||
*/ | ||
var BrowserType; | ||
(function (BrowserType) { | ||
BrowserType["WEB"] = "WEB"; | ||
BrowserType["IN_APP"] = "IN_APP"; | ||
BrowserType["CRAWLER"] = "CRAWLER"; | ||
BrowserType["OTHER"] = "OTHER"; | ||
BrowserType["UNKNOWN"] = "UNKNOWN"; | ||
})(BrowserType = exports.BrowserType || (exports.BrowserType = {})); | ||
exports.BrowserType = { | ||
WEB: 'WEB', | ||
IN_APP: 'IN_APP', | ||
CRAWLER: 'CRAWLER', | ||
OTHER: 'OTHER', | ||
UNKNOWN: 'UNKNOWN' | ||
}; | ||
/** | ||
@@ -103,11 +102,10 @@ * The category of the device. | ||
*/ | ||
var DeviceCategory; | ||
(function (DeviceCategory) { | ||
DeviceCategory["DESKTOP"] = "DESKTOP"; | ||
DeviceCategory["TABLET"] = "TABLET"; | ||
DeviceCategory["MOBILE"] = "MOBILE"; | ||
DeviceCategory["BOT"] = "BOT"; | ||
DeviceCategory["OTHER"] = "OTHER"; | ||
DeviceCategory["UNKNOWN"] = "UNKNOWN"; | ||
})(DeviceCategory = exports.DeviceCategory || (exports.DeviceCategory = {})); | ||
exports.DeviceCategory = { | ||
DESKTOP: 'DESKTOP', | ||
TABLET: 'TABLET', | ||
MOBILE: 'MOBILE', | ||
BOT: 'BOT', | ||
OTHER: 'OTHER', | ||
UNKNOWN: 'UNKNOWN' | ||
}; | ||
/** | ||
@@ -118,24 +116,24 @@ * | ||
*/ | ||
var EventType; | ||
(function (EventType) { | ||
EventType["USER_SIGNED_UP"] = "userSignedUp"; | ||
EventType["USER_SIGNED_IN"] = "userSignedIn"; | ||
EventType["USER_SIGNED_OUT"] = "userSignedOut"; | ||
EventType["TAB_OPENED"] = "tabOpened"; | ||
EventType["TAB_URL_CHANGED"] = "tabUrlChanged"; | ||
EventType["TAB_VISIBILITY_CHANGED"] = "tabVisibilityChanged"; | ||
EventType["LOCATION_DETECTED"] = "locationDetected"; | ||
EventType["CLIENT_DETECTED"] = "clientDetected"; | ||
EventType["PAGE_OPENED"] = "pageOpened"; | ||
EventType["PAGE_LOADED"] = "pageLoaded"; | ||
EventType["PRODUCT_VIEWED"] = "productViewed"; | ||
EventType["CART_VIEWED"] = "cartViewed"; | ||
EventType["CART_MODIFIED"] = "cartModified"; | ||
EventType["CHECKOUT_STARTED"] = "checkoutStarted"; | ||
EventType["ORDER_PLACED"] = "orderPlaced"; | ||
EventType["TEST_GROUP_ASSIGNED"] = "testGroupAssigned"; | ||
EventType["NOTHING_CHANGED"] = "nothingChanged"; | ||
EventType["GOAL_COMPLETED"] = "goalCompleted"; | ||
EventType["EVENT_OCCURRED"] = "eventOccurred"; | ||
})(EventType = exports.EventType || (exports.EventType = {})); | ||
exports.EventType = { | ||
USER_SIGNED_UP: 'userSignedUp', | ||
USER_SIGNED_IN: 'userSignedIn', | ||
USER_SIGNED_OUT: 'userSignedOut', | ||
TAB_OPENED: 'tabOpened', | ||
TAB_URL_CHANGED: 'tabUrlChanged', | ||
TAB_VISIBILITY_CHANGED: 'tabVisibilityChanged', | ||
LOCATION_DETECTED: 'locationDetected', | ||
CLIENT_DETECTED: 'clientDetected', | ||
PAGE_OPENED: 'pageOpened', | ||
PAGE_LOADED: 'pageLoaded', | ||
PRODUCT_VIEWED: 'productViewed', | ||
CART_VIEWED: 'cartViewed', | ||
CART_MODIFIED: 'cartModified', | ||
CHECKOUT_STARTED: 'checkoutStarted', | ||
ORDER_PLACED: 'orderPlaced', | ||
TEST_GROUP_ASSIGNED: 'testGroupAssigned', | ||
NOTHING_CHANGED: 'nothingChanged', | ||
GOAL_COMPLETED: 'goalCompleted', | ||
EVENT_OCCURRED: 'eventOccurred', | ||
SLOT_PERSONALIZED: 'slotPersonalized' | ||
}; | ||
/** | ||
@@ -146,12 +144,11 @@ * The continent of the location. | ||
*/ | ||
var LocationContinent; | ||
(function (LocationContinent) { | ||
LocationContinent["AF"] = "AF"; | ||
LocationContinent["AN"] = "AN"; | ||
LocationContinent["AS"] = "AS"; | ||
LocationContinent["EU"] = "EU"; | ||
LocationContinent["NA"] = "NA"; | ||
LocationContinent["OC"] = "OC"; | ||
LocationContinent["SA"] = "SA"; | ||
})(LocationContinent = exports.LocationContinent || (exports.LocationContinent = {})); | ||
exports.LocationContinent = { | ||
AF: 'AF', | ||
AN: 'AN', | ||
AS: 'AS', | ||
EU: 'EU', | ||
NA: 'NA', | ||
OC: 'OC', | ||
SA: 'SA' | ||
}; | ||
/** | ||
@@ -162,10 +159,9 @@ * The source of information used to determine the location. | ||
*/ | ||
var LocationSource; | ||
(function (LocationSource) { | ||
LocationSource["UNKNOWN"] = "UNKNOWN"; | ||
LocationSource["IP"] = "IP"; | ||
LocationSource["INPUT"] = "INPUT"; | ||
LocationSource["BROWSER"] = "BROWSER"; | ||
LocationSource["GPS"] = "GPS"; | ||
})(LocationSource = exports.LocationSource || (exports.LocationSource = {})); | ||
exports.LocationSource = { | ||
UNKNOWN: 'UNKNOWN', | ||
IP: 'IP', | ||
INPUT: 'INPUT', | ||
BROWSER: 'BROWSER', | ||
GPS: 'GPS' | ||
}; | ||
/** | ||
@@ -176,8 +172,7 @@ * The current status of the order. | ||
*/ | ||
var OrderStatus; | ||
(function (OrderStatus) { | ||
OrderStatus["PLACED"] = "PLACED"; | ||
OrderStatus["PAID"] = "PAID"; | ||
OrderStatus["COMPLETED"] = "COMPLETED"; | ||
})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); | ||
exports.OrderStatus = { | ||
PLACED: 'PLACED', | ||
PAID: 'PAID', | ||
COMPLETED: 'COMPLETED' | ||
}; | ||
/** | ||
@@ -188,7 +183,6 @@ * The visibility of the tab. | ||
*/ | ||
var TabVisibility; | ||
(function (TabVisibility) { | ||
TabVisibility["VISIBLE"] = "VISIBLE"; | ||
TabVisibility["HIDDLE"] = "HIDDEN"; | ||
})(TabVisibility = exports.TabVisibility || (exports.TabVisibility = {})); | ||
exports.TabVisibility = { | ||
VISIBLE: 'VISIBLE', | ||
HIDDLE: 'HIDDEN' | ||
}; | ||
/** | ||
@@ -246,3 +240,3 @@ * ExportApi - axios parameter creator | ||
} | ||
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); | ||
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
@@ -299,3 +293,3 @@ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); | ||
} | ||
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); | ||
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
@@ -352,3 +346,3 @@ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); | ||
} | ||
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); | ||
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); | ||
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; | ||
@@ -355,0 +349,0 @@ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -13,4 +13,4 @@ * | ||
*/ | ||
import { Configuration } from "./configuration"; | ||
import { AxiosInstance } from 'axios'; | ||
import type { Configuration } from './configuration'; | ||
import type { AxiosInstance, AxiosRequestConfig } from 'axios'; | ||
export declare const BASE_PATH: string; | ||
@@ -34,3 +34,3 @@ /** | ||
url: string; | ||
options: any; | ||
options: AxiosRequestConfig; | ||
} | ||
@@ -56,4 +56,3 @@ /** | ||
field: string; | ||
name: "RequiredError"; | ||
constructor(field: string, msg?: string); | ||
} |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -31,4 +31,2 @@ * | ||
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0; | ||
// Some imports not used depending on template conditions | ||
// @ts-ignore | ||
var axios_1 = require("axios"); | ||
@@ -35,0 +33,0 @@ exports.BASE_PATH = "https://api.croct.io/export".replace(/\/+$/, ""); |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -13,5 +13,5 @@ * | ||
*/ | ||
import { Configuration } from "./configuration"; | ||
import { RequestArgs } from "./base"; | ||
import { AxiosInstance } from 'axios'; | ||
import type { Configuration } from "./configuration"; | ||
import type { RequestArgs } from "./base"; | ||
import type { AxiosInstance, AxiosResponse } from 'axios'; | ||
/** | ||
@@ -67,2 +67,2 @@ * | ||
*/ | ||
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => (axios?: AxiosInstance, basePath?: string) => Promise<import("axios").AxiosResponse<any>>; | ||
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>; |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -177,2 +177,25 @@ * | ||
}; | ||
function setFlattenedQueryParams(urlSearchParams, parameter, key) { | ||
if (key === void 0) { key = ""; } | ||
if (parameter == null) | ||
return; | ||
if (typeof parameter === "object") { | ||
if (Array.isArray(parameter)) { | ||
parameter.forEach(function (item) { return setFlattenedQueryParams(urlSearchParams, item, key); }); | ||
} | ||
else { | ||
Object.keys(parameter).forEach(function (currentKey) { | ||
return setFlattenedQueryParams(urlSearchParams, parameter[currentKey], "" + key + (key !== '' ? '.' : '') + currentKey); | ||
}); | ||
} | ||
} | ||
else { | ||
if (urlSearchParams.has(key)) { | ||
urlSearchParams.append(key, parameter); | ||
} | ||
else { | ||
urlSearchParams.set(key, parameter); | ||
} | ||
} | ||
} | ||
/** | ||
@@ -188,17 +211,3 @@ * | ||
var searchParams = new URLSearchParams(url.search); | ||
for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) { | ||
var object = objects_1[_a]; | ||
for (var key in object) { | ||
if (Array.isArray(object[key])) { | ||
searchParams.delete(key); | ||
for (var _b = 0, _c = object[key]; _b < _c.length; _b++) { | ||
var item = _c[_b]; | ||
searchParams.append(key, item); | ||
} | ||
} | ||
else { | ||
searchParams.set(key, object[key]); | ||
} | ||
} | ||
} | ||
setFlattenedQueryParams(searchParams, objects); | ||
url.search = searchParams.toString(); | ||
@@ -205,0 +214,0 @@ }; |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -11,0 +11,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.2.0 | ||
* The version of the OpenAPI document: 0.3.0 | ||
* Contact: apis@croct.com | ||
@@ -10,0 +10,0 @@ * |
{ | ||
"name": "@croct/export", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Node.js client for the Croct Export API.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -312,2 +312,3 @@ <p align="center"> | ||
| `eventOccurred` | 1.0.0 | | ||
| `slotPersonalized` | 1.1.0 | | ||
@@ -333,3 +334,3 @@ #### Code Sample | ||
end: 1440990000 + 86_400, | ||
types: [ | ||
events: [ | ||
EventType.PRODUCT_VIEWED, | ||
@@ -336,0 +337,0 @@ EventType.CHECKOUT_STARTED, |
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"target": "es5", | ||
"target": "ES5", | ||
"module": "commonjs", | ||
@@ -6,0 +6,0 @@ "noImplicitAny": true, |
Sorry, the diff of this file is not supported yet
181346
5413
476