@croct/export
Advanced tools
Comparing version 0.1.0 to 0.2.0
703
api.ts
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -26,2 +26,29 @@ * | ||
/** | ||
* | ||
* @export | ||
* @interface ApiProblem | ||
*/ | ||
export interface ApiProblem { | ||
[key: string]: any | any; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof ApiProblem | ||
*/ | ||
title: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof ApiProblem | ||
*/ | ||
type: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof ApiProblem | ||
*/ | ||
details?: string; | ||
} | ||
/** | ||
* The available information about a browser. | ||
@@ -45,14 +72,14 @@ * @export | ||
/** | ||
* The type of the browser. | ||
* @type {string} | ||
* | ||
* @type {BrowserType} | ||
* @memberof Browser | ||
*/ | ||
type: BrowserTypeEnum; | ||
type: BrowserType; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum BrowserTypeEnum { | ||
* The type of the browser. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum BrowserType { | ||
WEB = 'WEB', | ||
@@ -66,2 +93,39 @@ IN_APP = 'IN_APP', | ||
/** | ||
* | ||
* @export | ||
* @interface Campaign | ||
*/ | ||
export interface Campaign { | ||
/** | ||
* The product promotion or strategic campaign. For example, \"super_promo\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
name?: string | null; | ||
/** | ||
* The advertiser that sent traffic to the application. For example, \"newsletter4\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
source?: string | null; | ||
/** | ||
* The advertising or marketing medium. For example, \"email\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
medium?: string | null; | ||
/** | ||
* The specific content item related the campaign. For example, \"Buy now!\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
content?: string | null; | ||
/** | ||
* The search keywords. Foe example, \"web personalization\" | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
term?: string | null; | ||
} | ||
/** | ||
* A shopping cart in an online store. | ||
@@ -146,3 +210,3 @@ * @export | ||
/** | ||
* The details of the product that the item represents. | ||
* | ||
* @type {ProductDetails} | ||
@@ -182,11 +246,5 @@ * @memberof CartItem | ||
*/ | ||
export interface CartModified { | ||
export interface CartModified extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof CartModified | ||
*/ | ||
type: string; | ||
/** | ||
* The shopping cart after modification. | ||
* | ||
* @type {Cart} | ||
@@ -202,11 +260,5 @@ * @memberof CartModified | ||
*/ | ||
export interface CartViewed { | ||
export interface CartViewed extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof CartViewed | ||
*/ | ||
type: string; | ||
/** | ||
* The shopping cart that was viewed. | ||
* | ||
* @type {Cart} | ||
@@ -222,11 +274,5 @@ * @memberof CartViewed | ||
*/ | ||
export interface CheckoutStarted { | ||
export interface CheckoutStarted extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof CheckoutStarted | ||
*/ | ||
type: string; | ||
/** | ||
* The shopping cart that started the checkout process. | ||
* | ||
* @type {Cart} | ||
@@ -248,11 +294,5 @@ * @memberof CheckoutStarted | ||
*/ | ||
export interface ClientDetected { | ||
export interface ClientDetected extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof ClientDetected | ||
*/ | ||
type: string; | ||
/** | ||
* The detected information about the client. | ||
* | ||
* @type {WebClient} | ||
@@ -282,9 +322,9 @@ * @memberof ClientDetected | ||
/** | ||
* The category of the device. | ||
* @type {string} | ||
* | ||
* @type {DeviceCategory} | ||
* @memberof Device | ||
*/ | ||
category: DeviceCategoryEnum; | ||
category: DeviceCategory; | ||
/** | ||
* The operating system of the device. | ||
* | ||
* @type {OperatingSystem} | ||
@@ -295,8 +335,8 @@ * @memberof Device | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum DeviceCategoryEnum { | ||
* The category of the device. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum DeviceCategory { | ||
DESKTOP = 'DESKTOP', | ||
@@ -335,27 +375,40 @@ TABLET = 'TABLET', | ||
/** | ||
* The context of the client when the event was tracked. | ||
* @type {WebContext} | ||
* | ||
* @type {EventContext} | ||
* @memberof Event | ||
*/ | ||
context: WebContext | null; | ||
context: EventContext | null; | ||
/** | ||
* The event details, specific to the type of event. | ||
* @type {UserSignedUp | UserSignedIn | UserSignedOut | TabUrlChanged | TabOpened | TabVisibilityChanged | TestGroupAssigned | EventOccurred | LocationDetected | ClientDetected | GoalCompleted | PageLoaded | PageOpened | NothingChanged | CartModified | CartViewed | CheckoutStarted | OrderPlaced | ProductViewed} | ||
* | ||
* @type {EventPayload} | ||
* @memberof Event | ||
*/ | ||
payload: UserSignedUp | UserSignedIn | UserSignedOut | TabUrlChanged | TabOpened | TabVisibilityChanged | TestGroupAssigned | EventOccurred | LocationDetected | ClientDetected | GoalCompleted | PageLoaded | PageOpened | NothingChanged | CartModified | CartViewed | CheckoutStarted | OrderPlaced | ProductViewed; | ||
payload: EventPayload; | ||
} | ||
/** | ||
* An event recording a domain-specific occurrence. | ||
* The context of the client when the event was tracked. | ||
* @export | ||
* @interface EventOccurred | ||
* @interface EventContext | ||
*/ | ||
export interface EventOccurred { | ||
export interface EventContext { | ||
/** | ||
* The event type identifier. | ||
* | ||
* @type {string} | ||
* @memberof EventOccurred | ||
* @memberof EventContext | ||
*/ | ||
type: string; | ||
/** | ||
* | ||
* @type {{ [key: string]: string | undefined; }} | ||
* @memberof EventContext | ||
*/ | ||
metadata?: { [key: string]: string | undefined; }; | ||
} | ||
/** | ||
* An event recording a domain-specific occurrence. | ||
* @export | ||
* @interface EventOccurred | ||
*/ | ||
export interface EventOccurred extends EventPayload { | ||
/** | ||
* The name of the event. For example, \"pollAnswered\" or \"onboardingStarted\". | ||
@@ -398,2 +451,15 @@ * @type {string} | ||
/** | ||
* The event details, specific to the type of event. | ||
* @export | ||
* @interface EventPayload | ||
*/ | ||
export interface EventPayload { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof EventPayload | ||
*/ | ||
type: string; | ||
} | ||
/** | ||
* | ||
@@ -418,2 +484,29 @@ * @export | ||
/** | ||
* | ||
* @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' | ||
} | ||
/** | ||
* A geographic location represented by a latitude and longitude coordinates pair. | ||
@@ -442,10 +535,4 @@ * @export | ||
*/ | ||
export interface GoalCompleted { | ||
export interface GoalCompleted extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof GoalCompleted | ||
*/ | ||
type: string; | ||
/** | ||
* The ID of the goal. | ||
@@ -476,7 +563,7 @@ * @type {string} | ||
/** | ||
* The continent of the location. | ||
* @type {string} | ||
* | ||
* @type {LocationContinent} | ||
* @memberof Location | ||
*/ | ||
continent: LocationContinentEnum; | ||
continent: LocationContinent | null; | ||
/** | ||
@@ -489,3 +576,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. | ||
/** | ||
* The subsection of the country, typically a state or province. For example, the state of New York in the United States. | ||
* | ||
* @type {Region} | ||
@@ -514,20 +601,20 @@ * @memberof Location | ||
/** | ||
* The approximate geo-coordinates of the location. | ||
* | ||
* @type {GeoPoint} | ||
* @memberof Location | ||
*/ | ||
coordinates: GeoPoint; | ||
coordinates: GeoPoint | null; | ||
/** | ||
* The source of information used to determine the location. | ||
* @type {string} | ||
* | ||
* @type {LocationSource} | ||
* @memberof Location | ||
*/ | ||
source: LocationSourceEnum; | ||
source: LocationSource | null; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum LocationContinentEnum { | ||
* The continent of the location. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum LocationContinent { | ||
AF = 'AF', | ||
@@ -541,13 +628,2 @@ AN = 'AN', | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum LocationSourceEnum { | ||
UNKNOWN = 'UNKNOWN', | ||
IP = 'IP', | ||
INPUT = 'INPUT', | ||
BROWSER = 'BROWSER', | ||
GPS = 'GPS' | ||
} | ||
@@ -559,11 +635,5 @@ /** | ||
*/ | ||
export interface LocationDetected { | ||
export interface LocationDetected extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof LocationDetected | ||
*/ | ||
type: string; | ||
/** | ||
* The detected information about the location. | ||
* | ||
* @type {Location} | ||
@@ -575,2 +645,15 @@ * @memberof LocationDetected | ||
/** | ||
* The source of information used to determine the location. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum LocationSource { | ||
UNKNOWN = 'UNKNOWN', | ||
IP = 'IP', | ||
INPUT = 'INPUT', | ||
BROWSER = 'BROWSER', | ||
GPS = 'GPS' | ||
} | ||
/** | ||
* An event recording a period of inactivity. | ||
@@ -580,10 +663,4 @@ * @export | ||
*/ | ||
export interface NothingChanged { | ||
export interface NothingChanged extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof NothingChanged | ||
*/ | ||
type: string; | ||
/** | ||
* The timestamp when an activity was last observed, in milliseconds since epoch. | ||
@@ -693,20 +770,9 @@ * @type {number} | ||
/** | ||
* The current status of the order. | ||
* @type {string} | ||
* | ||
* @type {OrderStatus} | ||
* @memberof Order | ||
*/ | ||
status: OrderStatusEnum; | ||
status: OrderStatus | null; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum OrderStatusEnum { | ||
PLACED = 'PLACED', | ||
PAID = 'PAID', | ||
COMPLETED = 'COMPLETED' | ||
} | ||
/** | ||
* An item of an order. | ||
@@ -724,3 +790,3 @@ * @export | ||
/** | ||
* The details of the product that the item represents. | ||
* | ||
* @type {ProductDetails} | ||
@@ -760,11 +826,5 @@ * @memberof OrderItem | ||
*/ | ||
export interface OrderPlaced { | ||
export interface OrderPlaced extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof OrderPlaced | ||
*/ | ||
type: string; | ||
/** | ||
* The details of the order placed. | ||
* | ||
* @type {Order} | ||
@@ -776,2 +836,13 @@ * @memberof OrderPlaced | ||
/** | ||
* The current status of the order. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum OrderStatus { | ||
PLACED = 'PLACED', | ||
PAID = 'PAID', | ||
COMPLETED = 'COMPLETED' | ||
} | ||
/** | ||
* An event recording that a page was loaded. | ||
@@ -781,10 +852,4 @@ * @export | ||
*/ | ||
export interface PageLoaded { | ||
export interface PageLoaded extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof PageLoaded | ||
*/ | ||
type: string; | ||
/** | ||
* The URL of the page. | ||
@@ -813,10 +878,4 @@ * @type {string} | ||
*/ | ||
export interface PageOpened { | ||
export interface PageOpened extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof PageOpened | ||
*/ | ||
type: string; | ||
/** | ||
* The URL of the page. | ||
@@ -918,11 +977,5 @@ * @type {string} | ||
*/ | ||
export interface ProductViewed { | ||
export interface ProductViewed extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof ProductViewed | ||
*/ | ||
type: string; | ||
/** | ||
* The details of the product viewed. | ||
* | ||
* @type {ProductDetails} | ||
@@ -959,27 +1012,9 @@ * @memberof ProductViewed | ||
/** | ||
* | ||
* The ID that uniquely identifies the session across the application. | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
organizationId: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
workspaceId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
applicationId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
sessionId?: string; | ||
/** | ||
* | ||
* The ID that uniquely identifies the user across the cluster. | ||
* @type {string} | ||
@@ -990,3 +1025,3 @@ * @memberof Session | ||
/** | ||
* | ||
* 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. | ||
* @type {string} | ||
@@ -997,3 +1032,3 @@ * @memberof Session | ||
/** | ||
* | ||
* The flag that indicates whether the user is anonymous. | ||
* @type {boolean} | ||
@@ -1010,3 +1045,3 @@ * @memberof Session | ||
/** | ||
* | ||
* 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. | ||
* @type {number} | ||
@@ -1017,3 +1052,3 @@ * @memberof Session | ||
/** | ||
* | ||
* The URI of the content that linked to the page that started the session. | ||
* @type {string} | ||
@@ -1024,3 +1059,3 @@ * @memberof Session | ||
/** | ||
* | ||
* The page that started the session. | ||
* @type {string} | ||
@@ -1032,12 +1067,12 @@ * @memberof Session | ||
* | ||
* @type {SessionCampaign} | ||
* @type {Campaign} | ||
* @memberof Session | ||
*/ | ||
campaign?: SessionCampaign; | ||
campaign?: Campaign; | ||
/** | ||
* | ||
* @type {SessionLocation} | ||
* @type {Location} | ||
* @memberof Session | ||
*/ | ||
location?: SessionLocation; | ||
location?: Location; | ||
/** | ||
@@ -1050,3 +1085,3 @@ * | ||
/** | ||
* | ||
* The custom attributes. | ||
* @type {{ [key: string]: any | undefined; }} | ||
@@ -1066,126 +1101,2 @@ * @memberof Session | ||
* @export | ||
* @interface SessionCampaign | ||
*/ | ||
export interface SessionCampaign { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
name?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
source?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
medium?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
content?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
term?: string | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionLocation | ||
*/ | ||
export interface SessionLocation { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
continent?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
country?: string | null; | ||
/** | ||
* | ||
* @type {SessionLocationRegion} | ||
* @memberof SessionLocation | ||
*/ | ||
region?: SessionLocationRegion; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
district?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
city?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
timezone?: string | null; | ||
/** | ||
* | ||
* @type {SessionLocationCoordinates} | ||
* @memberof SessionLocation | ||
*/ | ||
coordinates?: SessionLocationCoordinates; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionLocationCoordinates | ||
*/ | ||
export interface SessionLocationCoordinates { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof SessionLocationCoordinates | ||
*/ | ||
latitude?: number | null; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof SessionLocationCoordinates | ||
*/ | ||
longitude?: number | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionLocationRegion | ||
*/ | ||
export interface SessionLocationRegion { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocationRegion | ||
*/ | ||
code?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocationRegion | ||
*/ | ||
name?: string | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionResponse | ||
@@ -1208,3 +1119,3 @@ */ | ||
/** | ||
* | ||
* The aggregated statistics of the session. | ||
* @export | ||
@@ -1215,3 +1126,3 @@ * @interface SessionStatistics | ||
/** | ||
* | ||
* The total number of page views. | ||
* @type {number} | ||
@@ -1222,3 +1133,3 @@ * @memberof SessionStatistics | ||
/** | ||
* | ||
* The total number of tab views. | ||
* @type {number} | ||
@@ -1229,3 +1140,3 @@ * @memberof SessionStatistics | ||
/** | ||
* | ||
* The total number of orders placed. | ||
* @type {number} | ||
@@ -1237,3 +1148,3 @@ * @memberof SessionStatistics | ||
/** | ||
* | ||
* The time window covering the first and last event of the session. | ||
* @export | ||
@@ -1261,10 +1172,4 @@ * @interface SessionWindow | ||
*/ | ||
export interface TabOpened { | ||
export interface TabOpened extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TabOpened | ||
*/ | ||
type: string; | ||
/** | ||
* The ID that uniquely identifies the tab across the session. | ||
@@ -1281,10 +1186,4 @@ * @type {string} | ||
*/ | ||
export interface TabUrlChanged { | ||
export interface TabUrlChanged extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TabUrlChanged | ||
*/ | ||
type: string; | ||
/** | ||
* The ID that uniquely identifies the tab across the session. | ||
@@ -1303,2 +1202,12 @@ * @type {string} | ||
/** | ||
* The visibility of the tab. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum TabVisibility { | ||
VISIBLE = 'VISIBLE', | ||
HIDDLE = 'HIDDEN' | ||
} | ||
/** | ||
* An event recording that the visibility of a tab has changed. | ||
@@ -1308,10 +1217,4 @@ * @export | ||
*/ | ||
export interface TabVisibilityChanged { | ||
export interface TabVisibilityChanged extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TabVisibilityChanged | ||
*/ | ||
type: string; | ||
/** | ||
* The ID that uniquely identifies the tab across the session. | ||
@@ -1323,19 +1226,9 @@ * @type {string} | ||
/** | ||
* The visibility of the tab. | ||
* @type {string} | ||
* | ||
* @type {TabVisibility} | ||
* @memberof TabVisibilityChanged | ||
*/ | ||
visibility: TabVisibilityChangedVisibilityEnum; | ||
visibility: TabVisibility; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export enum TabVisibilityChangedVisibilityEnum { | ||
VISIBLE = 'visible', | ||
HIDDEN = 'hidden' | ||
} | ||
/** | ||
* An event recording that a test group was assigned to a user. | ||
@@ -1345,10 +1238,4 @@ * @export | ||
*/ | ||
export interface TestGroupAssigned { | ||
export interface TestGroupAssigned extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TestGroupAssigned | ||
*/ | ||
type: string; | ||
/** | ||
* The ID of the test. For example, \"black-friday-banner\" or \"home-banner-cta\". | ||
@@ -1373,21 +1260,9 @@ * @type {string} | ||
/** | ||
* | ||
* The internal ID assigned to the user, unique across the cluster. | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
organizationId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
workspaceId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
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. | ||
* @type {string} | ||
@@ -1398,3 +1273,3 @@ * @memberof User | ||
/** | ||
* | ||
* The first name attribute. | ||
* @type {string} | ||
@@ -1405,3 +1280,3 @@ * @memberof User | ||
/** | ||
* | ||
* The last name attribute. | ||
* @type {string} | ||
@@ -1412,3 +1287,3 @@ * @memberof User | ||
/** | ||
* | ||
* The birth date attribute. | ||
* @type {number} | ||
@@ -1419,3 +1294,3 @@ * @memberof User | ||
/** | ||
* | ||
* The gender attribute. | ||
* @type {string} | ||
@@ -1426,3 +1301,3 @@ * @memberof User | ||
/** | ||
* | ||
* The email attribute. | ||
* @type {string} | ||
@@ -1433,3 +1308,3 @@ * @memberof User | ||
/** | ||
* | ||
* The alternate email attribute. | ||
* @type {string} | ||
@@ -1440,3 +1315,3 @@ * @memberof User | ||
/** | ||
* | ||
* The phone attribute. | ||
* @type {string} | ||
@@ -1447,3 +1322,3 @@ * @memberof User | ||
/** | ||
* | ||
* The alternate phone attribute. | ||
* @type {string} | ||
@@ -1460,3 +1335,3 @@ * @memberof User | ||
/** | ||
* | ||
* The avatar attribute. | ||
* @type {string} | ||
@@ -1467,3 +1342,3 @@ * @memberof User | ||
/** | ||
* | ||
* The company attribute. | ||
* @type {string} | ||
@@ -1474,3 +1349,3 @@ * @memberof User | ||
/** | ||
* | ||
* The company URL attribute. | ||
* @type {string} | ||
@@ -1481,3 +1356,3 @@ * @memberof User | ||
/** | ||
* | ||
* The job title attribute. | ||
* @type {string} | ||
@@ -1488,3 +1363,3 @@ * @memberof User | ||
/** | ||
* | ||
* The activities attribute. | ||
* @type {string} | ||
@@ -1495,3 +1370,3 @@ * @memberof User | ||
/** | ||
* | ||
* The interests attribute. | ||
* @type {string} | ||
@@ -1502,3 +1377,3 @@ * @memberof User | ||
/** | ||
* | ||
* The custom attributes. | ||
* @type {{ [key: string]: any | undefined; }} | ||
@@ -1509,3 +1384,3 @@ * @memberof User | ||
/** | ||
* | ||
* The timestamp when the user was last modified, in milliseconds since epoch. It is not updated on sync. | ||
* @type {number} | ||
@@ -1523,3 +1398,3 @@ * @memberof User | ||
/** | ||
* | ||
* The address attribute. | ||
* @export | ||
@@ -1590,10 +1465,4 @@ * @interface UserAddress | ||
*/ | ||
export interface UserSignedIn { | ||
export interface UserSignedIn extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof UserSignedIn | ||
*/ | ||
type: string; | ||
/** | ||
* The external ID of the user. | ||
@@ -1610,10 +1479,4 @@ * @type {string} | ||
*/ | ||
export interface UserSignedOut { | ||
export interface UserSignedOut extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof UserSignedOut | ||
*/ | ||
type: string; | ||
/** | ||
* The external ID of the user. | ||
@@ -1630,10 +1493,4 @@ * @type {string} | ||
*/ | ||
export interface UserSignedUp { | ||
export interface UserSignedUp extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof UserSignedUp | ||
*/ | ||
type: string; | ||
/** | ||
* The external ID of the user. | ||
@@ -1646,3 +1503,3 @@ * @type {string} | ||
/** | ||
* | ||
* The aggregated statistics of the user. | ||
* @export | ||
@@ -1653,3 +1510,3 @@ * @interface UserStatistics | ||
/** | ||
* | ||
* The total number of orders placed across all applications in a cluster. | ||
* @type {number} | ||
@@ -1660,3 +1517,3 @@ * @memberof UserStatistics | ||
/** | ||
* | ||
* The total number of sessions across all applications in a cluster. | ||
* @type {number} | ||
@@ -1674,3 +1531,3 @@ * @memberof UserStatistics | ||
/** | ||
* The browser used by the client. | ||
* | ||
* @type {Browser} | ||
@@ -1681,3 +1538,3 @@ * @memberof WebClient | ||
/** | ||
* The device used by the client. | ||
* | ||
* @type {Device} | ||
@@ -1693,3 +1550,3 @@ * @memberof WebClient | ||
*/ | ||
export interface WebContext { | ||
export interface WebContext extends EventContext { | ||
/** | ||
@@ -1707,8 +1564,2 @@ * The ID that uniquely identifies the tab across the session. | ||
url: string; | ||
/** | ||
* Additional information about the application that tracked the event. | ||
* @type {object} | ||
* @memberof WebContext | ||
*/ | ||
metadata?: object; | ||
} | ||
@@ -1728,7 +1579,7 @@ | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
exportEvents: async (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>, options: any = {}): Promise<RequestArgs> => { | ||
exportEvents: async (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options: any = {}): Promise<RequestArgs> => { | ||
const localVarPath = `/events`; | ||
@@ -1900,7 +1751,7 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs. | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
async exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>> { | ||
async exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>> { | ||
const localVarAxiosArgs = await localVarAxiosParamCreator.exportEvents(start, end, pageSize, cursor, events, options); | ||
@@ -1951,7 +1802,7 @@ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>, options?: any): AxiosPromise<EventResponse> { | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any): AxiosPromise<EventResponse> { | ||
return localVarFp.exportEvents(start, end, pageSize, cursor, events, options).then((request) => request(axios, basePath)); | ||
@@ -2022,6 +1873,6 @@ }, | ||
* | ||
* @type {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} | ||
* @type {Array<EventType>} | ||
* @memberof ExportApiExportEvents | ||
*/ | ||
readonly events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'> | ||
readonly events?: Array<EventType> | ||
} | ||
@@ -2028,0 +1879,0 @@ |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -10,0 +10,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -10,0 +10,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -10,0 +10,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -17,2 +17,28 @@ * | ||
/** | ||
* | ||
* @export | ||
* @interface ApiProblem | ||
*/ | ||
export interface ApiProblem { | ||
[key: string]: any | any; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof ApiProblem | ||
*/ | ||
title: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof ApiProblem | ||
*/ | ||
type: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof ApiProblem | ||
*/ | ||
details?: string; | ||
} | ||
/** | ||
* The available information about a browser. | ||
@@ -36,13 +62,14 @@ * @export | ||
/** | ||
* The type of the browser. | ||
* @type {string} | ||
* | ||
* @type {BrowserType} | ||
* @memberof Browser | ||
*/ | ||
type: BrowserTypeEnum; | ||
type: BrowserType; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum BrowserTypeEnum { | ||
* The type of the browser. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum BrowserType { | ||
WEB = "WEB", | ||
@@ -55,2 +82,39 @@ IN_APP = "IN_APP", | ||
/** | ||
* | ||
* @export | ||
* @interface Campaign | ||
*/ | ||
export interface Campaign { | ||
/** | ||
* The product promotion or strategic campaign. For example, \"super_promo\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
name?: string | null; | ||
/** | ||
* The advertiser that sent traffic to the application. For example, \"newsletter4\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
source?: string | null; | ||
/** | ||
* The advertising or marketing medium. For example, \"email\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
medium?: string | null; | ||
/** | ||
* The specific content item related the campaign. For example, \"Buy now!\". | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
content?: string | null; | ||
/** | ||
* The search keywords. Foe example, \"web personalization\" | ||
* @type {string} | ||
* @memberof Campaign | ||
*/ | ||
term?: string | null; | ||
} | ||
/** | ||
* A shopping cart in an online store. | ||
@@ -135,3 +199,3 @@ * @export | ||
/** | ||
* The details of the product that the item represents. | ||
* | ||
* @type {ProductDetails} | ||
@@ -171,11 +235,5 @@ * @memberof CartItem | ||
*/ | ||
export interface CartModified { | ||
export interface CartModified extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof CartModified | ||
*/ | ||
type: string; | ||
/** | ||
* The shopping cart after modification. | ||
* | ||
* @type {Cart} | ||
@@ -191,11 +249,5 @@ * @memberof CartModified | ||
*/ | ||
export interface CartViewed { | ||
export interface CartViewed extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof CartViewed | ||
*/ | ||
type: string; | ||
/** | ||
* The shopping cart that was viewed. | ||
* | ||
* @type {Cart} | ||
@@ -211,11 +263,5 @@ * @memberof CartViewed | ||
*/ | ||
export interface CheckoutStarted { | ||
export interface CheckoutStarted extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof CheckoutStarted | ||
*/ | ||
type: string; | ||
/** | ||
* The shopping cart that started the checkout process. | ||
* | ||
* @type {Cart} | ||
@@ -237,11 +283,5 @@ * @memberof CheckoutStarted | ||
*/ | ||
export interface ClientDetected { | ||
export interface ClientDetected extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof ClientDetected | ||
*/ | ||
type: string; | ||
/** | ||
* The detected information about the client. | ||
* | ||
* @type {WebClient} | ||
@@ -271,9 +311,9 @@ * @memberof ClientDetected | ||
/** | ||
* The category of the device. | ||
* @type {string} | ||
* | ||
* @type {DeviceCategory} | ||
* @memberof Device | ||
*/ | ||
category: DeviceCategoryEnum; | ||
category: DeviceCategory; | ||
/** | ||
* The operating system of the device. | ||
* | ||
* @type {OperatingSystem} | ||
@@ -285,6 +325,7 @@ * @memberof Device | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum DeviceCategoryEnum { | ||
* The category of the device. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum DeviceCategory { | ||
DESKTOP = "DESKTOP", | ||
@@ -322,27 +363,42 @@ TABLET = "TABLET", | ||
/** | ||
* The context of the client when the event was tracked. | ||
* @type {WebContext} | ||
* | ||
* @type {EventContext} | ||
* @memberof Event | ||
*/ | ||
context: WebContext | null; | ||
context: EventContext | null; | ||
/** | ||
* The event details, specific to the type of event. | ||
* @type {UserSignedUp | UserSignedIn | UserSignedOut | TabUrlChanged | TabOpened | TabVisibilityChanged | TestGroupAssigned | EventOccurred | LocationDetected | ClientDetected | GoalCompleted | PageLoaded | PageOpened | NothingChanged | CartModified | CartViewed | CheckoutStarted | OrderPlaced | ProductViewed} | ||
* | ||
* @type {EventPayload} | ||
* @memberof Event | ||
*/ | ||
payload: UserSignedUp | UserSignedIn | UserSignedOut | TabUrlChanged | TabOpened | TabVisibilityChanged | TestGroupAssigned | EventOccurred | LocationDetected | ClientDetected | GoalCompleted | PageLoaded | PageOpened | NothingChanged | CartModified | CartViewed | CheckoutStarted | OrderPlaced | ProductViewed; | ||
payload: EventPayload; | ||
} | ||
/** | ||
* An event recording a domain-specific occurrence. | ||
* The context of the client when the event was tracked. | ||
* @export | ||
* @interface EventOccurred | ||
* @interface EventContext | ||
*/ | ||
export interface EventOccurred { | ||
export interface EventContext { | ||
/** | ||
* The event type identifier. | ||
* | ||
* @type {string} | ||
* @memberof EventOccurred | ||
* @memberof EventContext | ||
*/ | ||
type: string; | ||
/** | ||
* | ||
* @type {{ [key: string]: string | undefined; }} | ||
* @memberof EventContext | ||
*/ | ||
metadata?: { | ||
[key: string]: string | undefined; | ||
}; | ||
} | ||
/** | ||
* An event recording a domain-specific occurrence. | ||
* @export | ||
* @interface EventOccurred | ||
*/ | ||
export interface EventOccurred extends EventPayload { | ||
/** | ||
* The name of the event. For example, \"pollAnswered\" or \"onboardingStarted\". | ||
@@ -385,2 +441,15 @@ * @type {string} | ||
/** | ||
* The event details, specific to the type of event. | ||
* @export | ||
* @interface EventPayload | ||
*/ | ||
export interface EventPayload { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof EventPayload | ||
*/ | ||
type: string; | ||
} | ||
/** | ||
* | ||
@@ -405,2 +474,28 @@ * @export | ||
/** | ||
* | ||
* @export | ||
* @enum {string} | ||
*/ | ||
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" | ||
} | ||
/** | ||
* A geographic location represented by a latitude and longitude coordinates pair. | ||
@@ -429,10 +524,4 @@ * @export | ||
*/ | ||
export interface GoalCompleted { | ||
export interface GoalCompleted extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof GoalCompleted | ||
*/ | ||
type: string; | ||
/** | ||
* The ID of the goal. | ||
@@ -463,7 +552,7 @@ * @type {string} | ||
/** | ||
* The continent of the location. | ||
* @type {string} | ||
* | ||
* @type {LocationContinent} | ||
* @memberof Location | ||
*/ | ||
continent: LocationContinentEnum; | ||
continent: LocationContinent | null; | ||
/** | ||
@@ -476,3 +565,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. | ||
/** | ||
* The subsection of the country, typically a state or province. For example, the state of New York in the United States. | ||
* | ||
* @type {Region} | ||
@@ -501,19 +590,20 @@ * @memberof Location | ||
/** | ||
* The approximate geo-coordinates of the location. | ||
* | ||
* @type {GeoPoint} | ||
* @memberof Location | ||
*/ | ||
coordinates: GeoPoint; | ||
coordinates: GeoPoint | null; | ||
/** | ||
* The source of information used to determine the location. | ||
* @type {string} | ||
* | ||
* @type {LocationSource} | ||
* @memberof Location | ||
*/ | ||
source: LocationSourceEnum; | ||
source: LocationSource | null; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum LocationContinentEnum { | ||
* The continent of the location. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum LocationContinent { | ||
AF = "AF", | ||
@@ -528,13 +618,2 @@ AN = "AN", | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum LocationSourceEnum { | ||
UNKNOWN = "UNKNOWN", | ||
IP = "IP", | ||
INPUT = "INPUT", | ||
BROWSER = "BROWSER", | ||
GPS = "GPS" | ||
} | ||
/** | ||
* An event recording that the location of a user was detected. | ||
@@ -544,11 +623,5 @@ * @export | ||
*/ | ||
export interface LocationDetected { | ||
export interface LocationDetected extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof LocationDetected | ||
*/ | ||
type: string; | ||
/** | ||
* The detected information about the location. | ||
* | ||
* @type {Location} | ||
@@ -560,2 +633,14 @@ * @memberof LocationDetected | ||
/** | ||
* The source of information used to determine the location. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum LocationSource { | ||
UNKNOWN = "UNKNOWN", | ||
IP = "IP", | ||
INPUT = "INPUT", | ||
BROWSER = "BROWSER", | ||
GPS = "GPS" | ||
} | ||
/** | ||
* An event recording a period of inactivity. | ||
@@ -565,10 +650,4 @@ * @export | ||
*/ | ||
export interface NothingChanged { | ||
export interface NothingChanged extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof NothingChanged | ||
*/ | ||
type: string; | ||
/** | ||
* The timestamp when an activity was last observed, in milliseconds since epoch. | ||
@@ -678,18 +757,9 @@ * @type {number} | ||
/** | ||
* The current status of the order. | ||
* @type {string} | ||
* | ||
* @type {OrderStatus} | ||
* @memberof Order | ||
*/ | ||
status: OrderStatusEnum; | ||
status: OrderStatus | null; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum OrderStatusEnum { | ||
PLACED = "PLACED", | ||
PAID = "PAID", | ||
COMPLETED = "COMPLETED" | ||
} | ||
/** | ||
* An item of an order. | ||
@@ -707,3 +777,3 @@ * @export | ||
/** | ||
* The details of the product that the item represents. | ||
* | ||
* @type {ProductDetails} | ||
@@ -743,11 +813,5 @@ * @memberof OrderItem | ||
*/ | ||
export interface OrderPlaced { | ||
export interface OrderPlaced extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof OrderPlaced | ||
*/ | ||
type: string; | ||
/** | ||
* The details of the order placed. | ||
* | ||
* @type {Order} | ||
@@ -759,2 +823,12 @@ * @memberof OrderPlaced | ||
/** | ||
* The current status of the order. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum OrderStatus { | ||
PLACED = "PLACED", | ||
PAID = "PAID", | ||
COMPLETED = "COMPLETED" | ||
} | ||
/** | ||
* An event recording that a page was loaded. | ||
@@ -764,10 +838,4 @@ * @export | ||
*/ | ||
export interface PageLoaded { | ||
export interface PageLoaded extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof PageLoaded | ||
*/ | ||
type: string; | ||
/** | ||
* The URL of the page. | ||
@@ -796,10 +864,4 @@ * @type {string} | ||
*/ | ||
export interface PageOpened { | ||
export interface PageOpened extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof PageOpened | ||
*/ | ||
type: string; | ||
/** | ||
* The URL of the page. | ||
@@ -901,11 +963,5 @@ * @type {string} | ||
*/ | ||
export interface ProductViewed { | ||
export interface ProductViewed extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof ProductViewed | ||
*/ | ||
type: string; | ||
/** | ||
* The details of the product viewed. | ||
* | ||
* @type {ProductDetails} | ||
@@ -942,27 +998,9 @@ * @memberof ProductViewed | ||
/** | ||
* | ||
* The ID that uniquely identifies the session across the application. | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
organizationId: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
workspaceId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
applicationId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof Session | ||
*/ | ||
sessionId?: string; | ||
/** | ||
* | ||
* The ID that uniquely identifies the user across the cluster. | ||
* @type {string} | ||
@@ -973,3 +1011,3 @@ * @memberof Session | ||
/** | ||
* | ||
* 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. | ||
* @type {string} | ||
@@ -980,3 +1018,3 @@ * @memberof Session | ||
/** | ||
* | ||
* The flag that indicates whether the user is anonymous. | ||
* @type {boolean} | ||
@@ -993,3 +1031,3 @@ * @memberof Session | ||
/** | ||
* | ||
* 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. | ||
* @type {number} | ||
@@ -1000,3 +1038,3 @@ * @memberof Session | ||
/** | ||
* | ||
* The URI of the content that linked to the page that started the session. | ||
* @type {string} | ||
@@ -1007,3 +1045,3 @@ * @memberof Session | ||
/** | ||
* | ||
* The page that started the session. | ||
* @type {string} | ||
@@ -1015,12 +1053,12 @@ * @memberof Session | ||
* | ||
* @type {SessionCampaign} | ||
* @type {Campaign} | ||
* @memberof Session | ||
*/ | ||
campaign?: SessionCampaign; | ||
campaign?: Campaign; | ||
/** | ||
* | ||
* @type {SessionLocation} | ||
* @type {Location} | ||
* @memberof Session | ||
*/ | ||
location?: SessionLocation; | ||
location?: Location; | ||
/** | ||
@@ -1033,3 +1071,3 @@ * | ||
/** | ||
* | ||
* The custom attributes. | ||
* @type {{ [key: string]: any | undefined; }} | ||
@@ -1051,126 +1089,2 @@ * @memberof Session | ||
* @export | ||
* @interface SessionCampaign | ||
*/ | ||
export interface SessionCampaign { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
name?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
source?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
medium?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
content?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionCampaign | ||
*/ | ||
term?: string | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionLocation | ||
*/ | ||
export interface SessionLocation { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
continent?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
country?: string | null; | ||
/** | ||
* | ||
* @type {SessionLocationRegion} | ||
* @memberof SessionLocation | ||
*/ | ||
region?: SessionLocationRegion; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
district?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
city?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocation | ||
*/ | ||
timezone?: string | null; | ||
/** | ||
* | ||
* @type {SessionLocationCoordinates} | ||
* @memberof SessionLocation | ||
*/ | ||
coordinates?: SessionLocationCoordinates; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionLocationCoordinates | ||
*/ | ||
export interface SessionLocationCoordinates { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof SessionLocationCoordinates | ||
*/ | ||
latitude?: number | null; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof SessionLocationCoordinates | ||
*/ | ||
longitude?: number | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionLocationRegion | ||
*/ | ||
export interface SessionLocationRegion { | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocationRegion | ||
*/ | ||
code?: string | null; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof SessionLocationRegion | ||
*/ | ||
name?: string | null; | ||
} | ||
/** | ||
* | ||
* @export | ||
* @interface SessionResponse | ||
@@ -1193,3 +1107,3 @@ */ | ||
/** | ||
* | ||
* The aggregated statistics of the session. | ||
* @export | ||
@@ -1200,3 +1114,3 @@ * @interface SessionStatistics | ||
/** | ||
* | ||
* The total number of page views. | ||
* @type {number} | ||
@@ -1207,3 +1121,3 @@ * @memberof SessionStatistics | ||
/** | ||
* | ||
* The total number of tab views. | ||
* @type {number} | ||
@@ -1214,3 +1128,3 @@ * @memberof SessionStatistics | ||
/** | ||
* | ||
* The total number of orders placed. | ||
* @type {number} | ||
@@ -1222,3 +1136,3 @@ * @memberof SessionStatistics | ||
/** | ||
* | ||
* The time window covering the first and last event of the session. | ||
* @export | ||
@@ -1246,10 +1160,4 @@ * @interface SessionWindow | ||
*/ | ||
export interface TabOpened { | ||
export interface TabOpened extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TabOpened | ||
*/ | ||
type: string; | ||
/** | ||
* The ID that uniquely identifies the tab across the session. | ||
@@ -1266,10 +1174,4 @@ * @type {string} | ||
*/ | ||
export interface TabUrlChanged { | ||
export interface TabUrlChanged extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TabUrlChanged | ||
*/ | ||
type: string; | ||
/** | ||
* The ID that uniquely identifies the tab across the session. | ||
@@ -1288,2 +1190,11 @@ * @type {string} | ||
/** | ||
* The visibility of the tab. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum TabVisibility { | ||
VISIBLE = "VISIBLE", | ||
HIDDLE = "HIDDEN" | ||
} | ||
/** | ||
* An event recording that the visibility of a tab has changed. | ||
@@ -1293,10 +1204,4 @@ * @export | ||
*/ | ||
export interface TabVisibilityChanged { | ||
export interface TabVisibilityChanged extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TabVisibilityChanged | ||
*/ | ||
type: string; | ||
/** | ||
* The ID that uniquely identifies the tab across the session. | ||
@@ -1308,17 +1213,9 @@ * @type {string} | ||
/** | ||
* The visibility of the tab. | ||
* @type {string} | ||
* | ||
* @type {TabVisibility} | ||
* @memberof TabVisibilityChanged | ||
*/ | ||
visibility: TabVisibilityChangedVisibilityEnum; | ||
visibility: TabVisibility; | ||
} | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
export declare enum TabVisibilityChangedVisibilityEnum { | ||
VISIBLE = "visible", | ||
HIDDEN = "hidden" | ||
} | ||
/** | ||
* An event recording that a test group was assigned to a user. | ||
@@ -1328,10 +1225,4 @@ * @export | ||
*/ | ||
export interface TestGroupAssigned { | ||
export interface TestGroupAssigned extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof TestGroupAssigned | ||
*/ | ||
type: string; | ||
/** | ||
* The ID of the test. For example, \"black-friday-banner\" or \"home-banner-cta\". | ||
@@ -1356,21 +1247,9 @@ * @type {string} | ||
/** | ||
* | ||
* The internal ID assigned to the user, unique across the cluster. | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
organizationId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
workspaceId?: string; | ||
/** | ||
* | ||
* @type {string} | ||
* @memberof User | ||
*/ | ||
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. | ||
* @type {string} | ||
@@ -1381,3 +1260,3 @@ * @memberof User | ||
/** | ||
* | ||
* The first name attribute. | ||
* @type {string} | ||
@@ -1388,3 +1267,3 @@ * @memberof User | ||
/** | ||
* | ||
* The last name attribute. | ||
* @type {string} | ||
@@ -1395,3 +1274,3 @@ * @memberof User | ||
/** | ||
* | ||
* The birth date attribute. | ||
* @type {number} | ||
@@ -1402,3 +1281,3 @@ * @memberof User | ||
/** | ||
* | ||
* The gender attribute. | ||
* @type {string} | ||
@@ -1409,3 +1288,3 @@ * @memberof User | ||
/** | ||
* | ||
* The email attribute. | ||
* @type {string} | ||
@@ -1416,3 +1295,3 @@ * @memberof User | ||
/** | ||
* | ||
* The alternate email attribute. | ||
* @type {string} | ||
@@ -1423,3 +1302,3 @@ * @memberof User | ||
/** | ||
* | ||
* The phone attribute. | ||
* @type {string} | ||
@@ -1430,3 +1309,3 @@ * @memberof User | ||
/** | ||
* | ||
* The alternate phone attribute. | ||
* @type {string} | ||
@@ -1443,3 +1322,3 @@ * @memberof User | ||
/** | ||
* | ||
* The avatar attribute. | ||
* @type {string} | ||
@@ -1450,3 +1329,3 @@ * @memberof User | ||
/** | ||
* | ||
* The company attribute. | ||
* @type {string} | ||
@@ -1457,3 +1336,3 @@ * @memberof User | ||
/** | ||
* | ||
* The company URL attribute. | ||
* @type {string} | ||
@@ -1464,3 +1343,3 @@ * @memberof User | ||
/** | ||
* | ||
* The job title attribute. | ||
* @type {string} | ||
@@ -1471,3 +1350,3 @@ * @memberof User | ||
/** | ||
* | ||
* The activities attribute. | ||
* @type {string} | ||
@@ -1478,3 +1357,3 @@ * @memberof User | ||
/** | ||
* | ||
* The interests attribute. | ||
* @type {string} | ||
@@ -1485,3 +1364,3 @@ * @memberof User | ||
/** | ||
* | ||
* The custom attributes. | ||
* @type {{ [key: string]: any | undefined; }} | ||
@@ -1494,3 +1373,3 @@ * @memberof User | ||
/** | ||
* | ||
* The timestamp when the user was last modified, in milliseconds since epoch. It is not updated on sync. | ||
* @type {number} | ||
@@ -1508,3 +1387,3 @@ * @memberof User | ||
/** | ||
* | ||
* The address attribute. | ||
* @export | ||
@@ -1575,10 +1454,4 @@ * @interface UserAddress | ||
*/ | ||
export interface UserSignedIn { | ||
export interface UserSignedIn extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof UserSignedIn | ||
*/ | ||
type: string; | ||
/** | ||
* The external ID of the user. | ||
@@ -1595,10 +1468,4 @@ * @type {string} | ||
*/ | ||
export interface UserSignedOut { | ||
export interface UserSignedOut extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof UserSignedOut | ||
*/ | ||
type: string; | ||
/** | ||
* The external ID of the user. | ||
@@ -1615,10 +1482,4 @@ * @type {string} | ||
*/ | ||
export interface UserSignedUp { | ||
export interface UserSignedUp extends EventPayload { | ||
/** | ||
* The event type identifier. | ||
* @type {string} | ||
* @memberof UserSignedUp | ||
*/ | ||
type: string; | ||
/** | ||
* The external ID of the user. | ||
@@ -1631,3 +1492,3 @@ * @type {string} | ||
/** | ||
* | ||
* The aggregated statistics of the user. | ||
* @export | ||
@@ -1638,3 +1499,3 @@ * @interface UserStatistics | ||
/** | ||
* | ||
* The total number of orders placed across all applications in a cluster. | ||
* @type {number} | ||
@@ -1645,3 +1506,3 @@ * @memberof UserStatistics | ||
/** | ||
* | ||
* The total number of sessions across all applications in a cluster. | ||
* @type {number} | ||
@@ -1659,3 +1520,3 @@ * @memberof UserStatistics | ||
/** | ||
* The browser used by the client. | ||
* | ||
* @type {Browser} | ||
@@ -1666,3 +1527,3 @@ * @memberof WebClient | ||
/** | ||
* The device used by the client. | ||
* | ||
* @type {Device} | ||
@@ -1678,3 +1539,3 @@ * @memberof WebClient | ||
*/ | ||
export interface WebContext { | ||
export interface WebContext extends EventContext { | ||
/** | ||
@@ -1692,8 +1553,2 @@ * The ID that uniquely identifies the tab across the session. | ||
url: string; | ||
/** | ||
* Additional information about the application that tracked the event. | ||
* @type {object} | ||
* @memberof WebContext | ||
*/ | ||
metadata?: object; | ||
} | ||
@@ -1711,7 +1566,7 @@ /** | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
exportEvents: (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>, options?: any) => Promise<RequestArgs>; | ||
exportEvents: (start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any) => Promise<RequestArgs>; | ||
/** | ||
@@ -1749,7 +1604,7 @@ * | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>>; | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EventResponse>>; | ||
/** | ||
@@ -1787,7 +1642,7 @@ * | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
* @throws {RequiredError} | ||
*/ | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>, options?: any): AxiosPromise<EventResponse>; | ||
exportEvents(start?: number, end?: number, pageSize?: number, cursor?: string, events?: Array<EventType>, options?: any): AxiosPromise<EventResponse>; | ||
/** | ||
@@ -1846,6 +1701,6 @@ * | ||
* | ||
* @type {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} | ||
* @type {Array<EventType>} | ||
* @memberof ExportApiExportEvents | ||
*/ | ||
readonly events?: Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>; | ||
readonly events?: Array<EventType>; | ||
} | ||
@@ -1852,0 +1707,0 @@ /** |
171
dist/api.js
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -77,3 +77,3 @@ * | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExportApi = exports.ExportApiFactory = exports.ExportApiFp = exports.ExportApiAxiosParamCreator = exports.TabVisibilityChangedVisibilityEnum = exports.OrderStatusEnum = exports.LocationSourceEnum = exports.LocationContinentEnum = exports.DeviceCategoryEnum = exports.BrowserTypeEnum = void 0; | ||
exports.ExportApi = exports.ExportApiFactory = exports.ExportApiFp = exports.ExportApiAxiosParamCreator = exports.TabVisibility = exports.OrderStatus = exports.LocationSource = exports.LocationContinent = exports.EventType = exports.DeviceCategory = exports.BrowserType = void 0; | ||
var axios_1 = require("axios"); | ||
@@ -86,72 +86,105 @@ // Some imports not used depending on template conditions | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var BrowserTypeEnum; | ||
(function (BrowserTypeEnum) { | ||
BrowserTypeEnum["WEB"] = "WEB"; | ||
BrowserTypeEnum["IN_APP"] = "IN_APP"; | ||
BrowserTypeEnum["CRAWLER"] = "CRAWLER"; | ||
BrowserTypeEnum["OTHER"] = "OTHER"; | ||
BrowserTypeEnum["UNKNOWN"] = "UNKNOWN"; | ||
})(BrowserTypeEnum = exports.BrowserTypeEnum || (exports.BrowserTypeEnum = {})); | ||
* The type of the browser. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
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 = {})); | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var DeviceCategoryEnum; | ||
(function (DeviceCategoryEnum) { | ||
DeviceCategoryEnum["DESKTOP"] = "DESKTOP"; | ||
DeviceCategoryEnum["TABLET"] = "TABLET"; | ||
DeviceCategoryEnum["MOBILE"] = "MOBILE"; | ||
DeviceCategoryEnum["BOT"] = "BOT"; | ||
DeviceCategoryEnum["OTHER"] = "OTHER"; | ||
DeviceCategoryEnum["UNKNOWN"] = "UNKNOWN"; | ||
})(DeviceCategoryEnum = exports.DeviceCategoryEnum || (exports.DeviceCategoryEnum = {})); | ||
* The category of the device. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
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 = {})); | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var LocationContinentEnum; | ||
(function (LocationContinentEnum) { | ||
LocationContinentEnum["AF"] = "AF"; | ||
LocationContinentEnum["AN"] = "AN"; | ||
LocationContinentEnum["AS"] = "AS"; | ||
LocationContinentEnum["EU"] = "EU"; | ||
LocationContinentEnum["NA"] = "NA"; | ||
LocationContinentEnum["OC"] = "OC"; | ||
LocationContinentEnum["SA"] = "SA"; | ||
})(LocationContinentEnum = exports.LocationContinentEnum || (exports.LocationContinentEnum = {})); | ||
* | ||
* @export | ||
* @enum {string} | ||
*/ | ||
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 = {})); | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var LocationSourceEnum; | ||
(function (LocationSourceEnum) { | ||
LocationSourceEnum["UNKNOWN"] = "UNKNOWN"; | ||
LocationSourceEnum["IP"] = "IP"; | ||
LocationSourceEnum["INPUT"] = "INPUT"; | ||
LocationSourceEnum["BROWSER"] = "BROWSER"; | ||
LocationSourceEnum["GPS"] = "GPS"; | ||
})(LocationSourceEnum = exports.LocationSourceEnum || (exports.LocationSourceEnum = {})); | ||
* The continent of the location. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
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 = {})); | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var OrderStatusEnum; | ||
(function (OrderStatusEnum) { | ||
OrderStatusEnum["PLACED"] = "PLACED"; | ||
OrderStatusEnum["PAID"] = "PAID"; | ||
OrderStatusEnum["COMPLETED"] = "COMPLETED"; | ||
})(OrderStatusEnum = exports.OrderStatusEnum || (exports.OrderStatusEnum = {})); | ||
* The source of information used to determine the location. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var LocationSource; | ||
(function (LocationSource) { | ||
LocationSource["UNKNOWN"] = "UNKNOWN"; | ||
LocationSource["IP"] = "IP"; | ||
LocationSource["INPUT"] = "INPUT"; | ||
LocationSource["BROWSER"] = "BROWSER"; | ||
LocationSource["GPS"] = "GPS"; | ||
})(LocationSource = exports.LocationSource || (exports.LocationSource = {})); | ||
/** | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var TabVisibilityChangedVisibilityEnum; | ||
(function (TabVisibilityChangedVisibilityEnum) { | ||
TabVisibilityChangedVisibilityEnum["VISIBLE"] = "visible"; | ||
TabVisibilityChangedVisibilityEnum["HIDDEN"] = "hidden"; | ||
})(TabVisibilityChangedVisibilityEnum = exports.TabVisibilityChangedVisibilityEnum || (exports.TabVisibilityChangedVisibilityEnum = {})); | ||
* The current status of the order. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var OrderStatus; | ||
(function (OrderStatus) { | ||
OrderStatus["PLACED"] = "PLACED"; | ||
OrderStatus["PAID"] = "PAID"; | ||
OrderStatus["COMPLETED"] = "COMPLETED"; | ||
})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); | ||
/** | ||
* The visibility of the tab. | ||
* @export | ||
* @enum {string} | ||
*/ | ||
var TabVisibility; | ||
(function (TabVisibility) { | ||
TabVisibility["VISIBLE"] = "VISIBLE"; | ||
TabVisibility["HIDDLE"] = "HIDDEN"; | ||
})(TabVisibility = exports.TabVisibility || (exports.TabVisibility = {})); | ||
/** | ||
* ExportApi - axios parameter creator | ||
@@ -169,3 +202,3 @@ * @export | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
@@ -339,3 +372,3 @@ * @throws {RequiredError} | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
@@ -416,3 +449,3 @@ * @throws {RequiredError} | ||
* @param {string} [cursor] | ||
* @param {Array<'userSignedUp' | 'userSignedIn' | 'userSignedOut' | 'tabOpened' | 'tabUrlChanged' | 'tabVisibilityChanged' | 'locationDetected' | 'clientDetected' | 'pageOpened' | 'pageLoaded' | 'productViewed' | 'cartViewed' | 'cartModified' | 'checkoutStarted' | 'orderPlaced' | 'testGroupAssigned' | 'nothingChanged' | 'goalCompleted' | 'eventOccurred'>} [events] | ||
* @param {Array<EventType>} [events] | ||
* @param {*} [options] Override http request option. | ||
@@ -419,0 +452,0 @@ * @throws {RequiredError} |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -11,0 +11,0 @@ * |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -8,0 +8,0 @@ * |
@@ -8,3 +8,3 @@ "use strict"; | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -11,0 +11,0 @@ * |
@@ -7,3 +7,3 @@ /* tslint:disable */ | ||
* | ||
* The version of the OpenAPI document: 0.1.0 | ||
* The version of the OpenAPI document: 0.2.0 | ||
* Contact: apis@croct.com | ||
@@ -10,0 +10,0 @@ * |
{ | ||
"name": "@croct/export", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Node.js client for the Croct Export API.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -12,4 +12,4 @@ <p align="center"> | ||
<p align="center"> | ||
<img alt="Language" src="https://img.shields.io/badge/language-Node-blue" /> | ||
<a href="https://www.npmjs.com/package/@croct/export"><img alt="Version" src="https://img.shields.io/npm/v/@croct/export"/></a> | ||
<a href="https://github.com/croct-tech/export-client-node/actions/workflows/validations.yaml"><img alt="Validations" src="https://github.com/croct-tech/export-client-node/actions/workflows/validations.yaml/badge.svg"/></a> | ||
<br /> | ||
@@ -277,3 +277,3 @@ <br /> | ||
```ts | ||
exportEvents(options: EventExportOptions): Promise<{data: {items: Event[], nextCursor: string}}>; | ||
exportEvents(options: EventExportOptions): Promise<{data: EventResponse}>; | ||
``` | ||
@@ -283,9 +283,9 @@ | ||
| Option | Type | Description | ||
|------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------- | ||
| `pageSize` | number | The maximum number of events to export per request, limited to 1000. By default, 100. | ||
| `cursor` | string | The cursor from the previous request to use as a starting point for export. By default, it points to the initial page. | ||
| `start` | number | The start timestamp in seconds since epoch relative to the event timestamp, inclusive. By default, the start of the time window is unbounded. | ||
| `end` | number | The end timestamp in seconds since epoch relative to the event timestamp, exclusive. By default, the end of the time window is unbounded. | ||
| `events` | string[] | The types of events to export. By default, include all types listed bellow. | ||
| Option | Type | Description | ||
|------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------- | ||
| `pageSize` | int32 | The maximum number of events to export per request, limited to 1000. By default, 100. | ||
| `cursor` | string | The cursor from the previous request to use as a starting point for export. By default, it points to the initial page. | ||
| `start` | int64 | The start timestamp in seconds since epoch relative to the event timestamp, inclusive. By default, the start of the time window is unbounded. | ||
| `end` | int64 | The end timestamp in seconds since epoch relative to the event timestamp, exclusive. By default, the end of the time window is unbounded. | ||
| `events` | EventType[] | The types of events to export. By default, include all types listed bellow. | ||
@@ -321,3 +321,3 @@ The list possible event types are: | ||
```ts | ||
import {Configuration, ExportApi} from '@croct/export'; | ||
import {Configuration, EventType, ExportApi} from '@croct/export'; | ||
@@ -336,3 +336,7 @@ (async function run(): Promise<void> { | ||
end: 1440990000 + 86_400, | ||
types: ['productViewed', 'checkoutStarted', 'orderPlaced'], | ||
types: [ | ||
EventType.PRODUCT_VIEWED, | ||
EventType.CHECKOUT_STARTED, | ||
EventType.ORDER_PLACED, | ||
], | ||
}); | ||
@@ -357,3 +361,3 @@ | ||
```ts | ||
exportEvents(options: SessionExportOptions): Promise<{data: {items: Session[], nextCursor: string}}>; | ||
exportSessions(options: SessionExportOptions): Promise<{data: SessionResponse}>; | ||
``` | ||
@@ -365,6 +369,6 @@ | ||
|------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| `pageSize` | number | The maximum number of sessions to export per request, limited to 1000. By default, 100. | ||
| `pageSize` | int32 | The maximum number of sessions to export per request, limited to 1000. By default, 100. | ||
| `cursor` | string | The cursor from the previous request to use as a starting point for export. By default, it points to the initial page. | ||
| `start` | number | The start timestamp in seconds since epoch relative to the session's close time, inclusive. By default, the start of the time window is unbounded. | ||
| `end` | number | The end timestamp in seconds since epoch relative to the session's close time, exclusive. By default, the end of the time window is unbounded. | ||
| `start` | int64 | The start timestamp in seconds since epoch relative to the session's close time, inclusive. By default, the start of the time window is unbounded. | ||
| `end` | int64 | The end timestamp in seconds since epoch relative to the session's close time, exclusive. By default, the end of the time window is unbounded. | ||
@@ -409,3 +413,3 @@ #### Code Sample | ||
```ts | ||
exportUsers(options: UserExportOptions): Promise<{data: {items: User[], nextCursor: string}}>; | ||
exportUsers(options: UserExportOptions): Promise<{data: UserResponse}>; | ||
``` | ||
@@ -415,8 +419,8 @@ | ||
| Option | Type | Description | ||
|------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| `pageSize` | number | The maximum number of users to export per request, limited to 1000. By default, 100. | ||
| `cursor` | string | The cursor from the previous request to use as a starting point for export. By default, it points to the initial page. | ||
| `start` | number | The start timestamp in seconds since epoch relative to the user's last modified time, inclusive. By default, the start of the time window is unbounded. | ||
| `end` | number | The end timestamp in seconds since epoch relative to the user's last modified time, exclusive. By default, the end of the time window is unbounded. | ||
| Option | Type | Description | ||
|------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
| `pageSize` | int32 | The maximum number of users to export per request, limited to 1000. By default, 100. | ||
| `cursor` | string | The cursor from the previous request to use as a starting point for export. By default, it points to the initial page. | ||
| `start` | int64 | The start timestamp in seconds since epoch relative to the user's last modified time, inclusive. By default, the start of the time window is unbounded. | ||
| `end` | int64 | The end timestamp in seconds since epoch relative to the user's last modified time, exclusive. By default, the end of the time window is unbounded. | ||
@@ -423,0 +427,0 @@ #### Code Sample |
26
475
170698
5024