@wix/analytics-session 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +28 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +46 -0
- package/type-bundles/context.bundle.d.ts +48 -0
- package/type-bundles/index.bundle.d.ts +398 -0
- package/type-bundles/meta.bundle.d.ts +399 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as analyticsSession from '@wix/analytics-session_analytics-session/context';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.analyticsSession = void 0;
|
|
27
|
+
exports.analyticsSession = __importStar(require("@wix/analytics-session_analytics-session/context"));
|
|
28
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qGAAqF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as analyticsSession from '@wix/analytics-session_analytics-session';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.analyticsSession = void 0;
|
|
27
|
+
exports.analyticsSession = __importStar(require("@wix/analytics-session_analytics-session"));
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6FAA6E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as analyticsSession from '@wix/analytics-session_analytics-session/meta';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.analyticsSession = void 0;
|
|
27
|
+
exports.analyticsSession = __importStar(require("@wix/analytics-session_analytics-session/meta"));
|
|
28
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kGAAkF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as analyticsSession from '@wix/analytics-session_analytics-session/context';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,kDAAkD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as analyticsSession from '@wix/analytics-session_analytics-session';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,0CAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as analyticsSession from '@wix/analytics-session_analytics-session/meta';
|
package/build/es/meta.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,+CAA+C,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wix/analytics-session",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"registry": "https://registry.npmjs.org/",
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"module": "build/es/index.js",
|
|
10
|
+
"main": "build/cjs/index.js",
|
|
11
|
+
"typings": "./build/cjs/index.d.ts",
|
|
12
|
+
"typesBundle": "./type-bundles/index.bundle.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"build",
|
|
15
|
+
"frontend/package.json",
|
|
16
|
+
"meta",
|
|
17
|
+
"context",
|
|
18
|
+
"type-bundles"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@wix/analytics-session_analytics-session": "1.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"glob": "^10.4.1",
|
|
25
|
+
"rollup": "^4.18.0",
|
|
26
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
27
|
+
"typescript": "^5.3.2"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
|
31
|
+
"build:dts-bundles": "test -f config/rollup-config.js && rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
|
32
|
+
"test": ":"
|
|
33
|
+
},
|
|
34
|
+
"wix": {
|
|
35
|
+
"artifact": {
|
|
36
|
+
"groupId": "com.wixpress.public-sdk-autogen",
|
|
37
|
+
"artifactId": "analytics-session-public-sdk-autogen",
|
|
38
|
+
"isRootPublicSdk": true
|
|
39
|
+
},
|
|
40
|
+
"sdkDependency": {
|
|
41
|
+
"fqdnNamespace": "",
|
|
42
|
+
"fqdn": ""
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"falconPackageHash": "351b4443c73026d478a2095a0cfe685829faf9a8ed7d47c69885410b"
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2
|
+
interface HttpClient {
|
|
3
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
+
type HttpResponse<T = any> = {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: any;
|
|
13
|
+
request?: any;
|
|
14
|
+
};
|
|
15
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
|
+
url: string;
|
|
18
|
+
data?: Data;
|
|
19
|
+
params?: URLSearchParams;
|
|
20
|
+
} & APIMetadata;
|
|
21
|
+
type APIMetadata = {
|
|
22
|
+
methodFqn?: string;
|
|
23
|
+
entityFqdn?: string;
|
|
24
|
+
packageName?: string;
|
|
25
|
+
};
|
|
26
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
+
|
|
28
|
+
declare global {
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
30
|
+
interface SymbolConstructor {
|
|
31
|
+
readonly observable: symbol;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
36
|
+
|
|
37
|
+
declare const listSessionsAsync: ReturnType<typeof createRESTModule<typeof publicListSessionsAsync>>;
|
|
38
|
+
declare const getListSessionsJobResult: ReturnType<typeof createRESTModule<typeof publicGetListSessionsJobResult>>;
|
|
39
|
+
declare const markSessionAsRecorded: ReturnType<typeof createRESTModule<typeof publicMarkSessionAsRecorded>>;
|
|
40
|
+
|
|
41
|
+
declare const context_getListSessionsJobResult: typeof getListSessionsJobResult;
|
|
42
|
+
declare const context_listSessionsAsync: typeof listSessionsAsync;
|
|
43
|
+
declare const context_markSessionAsRecorded: typeof markSessionAsRecorded;
|
|
44
|
+
declare namespace context {
|
|
45
|
+
export { context_getListSessionsJobResult as getListSessionsJobResult, context_listSessionsAsync as listSessionsAsync, context_markSessionAsRecorded as markSessionAsRecorded };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { context as analyticsSession };
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
interface Session {
|
|
2
|
+
/** Session ID. */
|
|
3
|
+
_id?: string;
|
|
4
|
+
}
|
|
5
|
+
/** List sessions async request. */
|
|
6
|
+
interface ListSessionsAsyncRequest extends ListSessionsAsyncRequestPeriodOneOf, ListSessionsAsyncRequestParamsOneOf {
|
|
7
|
+
/** Custom time period with start & end dates. */
|
|
8
|
+
customTimePeriod?: CustomTimePeriod;
|
|
9
|
+
/** Predefined time period. */
|
|
10
|
+
predefinedTimePeriod?: PredefinedTimePeriod;
|
|
11
|
+
/** Navigation flow details. */
|
|
12
|
+
navigationFlow?: NavigationFlowSessionsParams;
|
|
13
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
14
|
+
conversionFunnel?: ConversionFunnelSessionsParams;
|
|
15
|
+
/** Device type. */
|
|
16
|
+
deviceType?: SessionsByDeviceParams;
|
|
17
|
+
/** User's timezone. Defaults to timezone as set in the [Site Properties API](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object). */
|
|
18
|
+
timezone?: string | null;
|
|
19
|
+
}
|
|
20
|
+
/** @oneof */
|
|
21
|
+
interface ListSessionsAsyncRequestPeriodOneOf {
|
|
22
|
+
/** Custom time period with start & end dates. */
|
|
23
|
+
customTimePeriod?: CustomTimePeriod;
|
|
24
|
+
/** Predefined time period. */
|
|
25
|
+
predefinedTimePeriod?: PredefinedTimePeriod;
|
|
26
|
+
}
|
|
27
|
+
/** @oneof */
|
|
28
|
+
interface ListSessionsAsyncRequestParamsOneOf {
|
|
29
|
+
/** Navigation flow details. */
|
|
30
|
+
navigationFlow?: NavigationFlowSessionsParams;
|
|
31
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
32
|
+
conversionFunnel?: ConversionFunnelSessionsParams;
|
|
33
|
+
/** Device type. */
|
|
34
|
+
deviceType?: SessionsByDeviceParams;
|
|
35
|
+
}
|
|
36
|
+
/** Custom time period. */
|
|
37
|
+
interface CustomTimePeriod {
|
|
38
|
+
/** Custom period start date in provided timezone. */
|
|
39
|
+
startDate?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Custom period end date in provided timezone. Returned data will include all dates until the requested end date.
|
|
42
|
+
* For example, { startDate: '2024-01-01', endDate: '2024-01-03' } will return data for '2024-01-01' and '2024-01-02'
|
|
43
|
+
*/
|
|
44
|
+
endDate?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Predefined time period.
|
|
48
|
+
* `THIS_WEEK`begins with Monday.
|
|
49
|
+
*/
|
|
50
|
+
declare enum PredefinedTimePeriod {
|
|
51
|
+
/** Today. */
|
|
52
|
+
TODAY = "TODAY",
|
|
53
|
+
/** Yesterday. */
|
|
54
|
+
YESTERDAY = "YESTERDAY",
|
|
55
|
+
/** Last 7 days. */
|
|
56
|
+
LAST_7_DAYS = "LAST_7_DAYS",
|
|
57
|
+
/** Last 14 days. */
|
|
58
|
+
LAST_14_DAYS = "LAST_14_DAYS",
|
|
59
|
+
/** Last 30 days. */
|
|
60
|
+
LAST_30_DAYS = "LAST_30_DAYS",
|
|
61
|
+
/** Last 90 days. */
|
|
62
|
+
LAST_90_DAYS = "LAST_90_DAYS",
|
|
63
|
+
/** Last 28 days. */
|
|
64
|
+
LAST_28_DAYS = "LAST_28_DAYS",
|
|
65
|
+
/** Last 180 days. */
|
|
66
|
+
LAST_180_DAYS = "LAST_180_DAYS",
|
|
67
|
+
/** Last 365 days. */
|
|
68
|
+
LAST_365_DAYS = "LAST_365_DAYS",
|
|
69
|
+
/** Current week, starting on Monday. */
|
|
70
|
+
THIS_WEEK = "THIS_WEEK",
|
|
71
|
+
/** Current month. */
|
|
72
|
+
THIS_MONTH = "THIS_MONTH",
|
|
73
|
+
/** Current quarter. */
|
|
74
|
+
THIS_QUARTER = "THIS_QUARTER",
|
|
75
|
+
/** This year. */
|
|
76
|
+
THIS_YEAR = "THIS_YEAR",
|
|
77
|
+
/** Last week (previous week). */
|
|
78
|
+
LAST_WEEK = "LAST_WEEK",
|
|
79
|
+
/** Last month. */
|
|
80
|
+
LAST_MONTH = "LAST_MONTH",
|
|
81
|
+
/** Last quarter. */
|
|
82
|
+
LAST_QUARTER = "LAST_QUARTER",
|
|
83
|
+
/** Last year. */
|
|
84
|
+
LAST_YEAR = "LAST_YEAR",
|
|
85
|
+
/** Last 12 months. */
|
|
86
|
+
LAST_12_MONTHS = "LAST_12_MONTHS"
|
|
87
|
+
}
|
|
88
|
+
/** Navigation flow details. */
|
|
89
|
+
interface NavigationFlowSessionsParams {
|
|
90
|
+
/**
|
|
91
|
+
* Page interactions, including where the user dropped off. For example:
|
|
92
|
+
* - ["/{Homepage}", "__DROP__"]: Sessions where a user visited the site's homepage and then dropped off.
|
|
93
|
+
* - ["", "__DROP__"]: Sessions where a user visited (any page) and then dropped off.
|
|
94
|
+
* - ["", "", "__DROP__"]: Session where a user visited any page, then navigated to any page, and then dropped off.
|
|
95
|
+
*/
|
|
96
|
+
pageInteractions?: string[] | null;
|
|
97
|
+
}
|
|
98
|
+
/** Conversion funnel details, meaning the steps in the journey the visitor has taken on the site. */
|
|
99
|
+
interface ConversionFunnelSessionsParams {
|
|
100
|
+
/** Funnel step to include. */
|
|
101
|
+
include?: FunnelStep;
|
|
102
|
+
/** Funnel step to exclude. */
|
|
103
|
+
exclude?: FunnelStep;
|
|
104
|
+
}
|
|
105
|
+
/** Funnel step. */
|
|
106
|
+
declare enum FunnelStep {
|
|
107
|
+
/** Not selected. */
|
|
108
|
+
NOT_SELECTED_FUNNEL_STEP = "NOT_SELECTED_FUNNEL_STEP",
|
|
109
|
+
/** Site sessions. */
|
|
110
|
+
SITE_SESSIONS = "SITE_SESSIONS",
|
|
111
|
+
/** Viewed product. */
|
|
112
|
+
VIEWED_PRODUCT = "VIEWED_PRODUCT",
|
|
113
|
+
/** Added to cart. */
|
|
114
|
+
ADDED_TO_CART = "ADDED_TO_CART",
|
|
115
|
+
/** Reached checkout. */
|
|
116
|
+
REACHED_CHECKOUT = "REACHED_CHECKOUT",
|
|
117
|
+
/** Sessions converted. */
|
|
118
|
+
SESSIONS_CONVERTED = "SESSIONS_CONVERTED"
|
|
119
|
+
}
|
|
120
|
+
/** Device details. */
|
|
121
|
+
interface SessionsByDeviceParams {
|
|
122
|
+
/** Device type. */
|
|
123
|
+
type?: DeviceType;
|
|
124
|
+
}
|
|
125
|
+
/** Device type. */
|
|
126
|
+
declare enum DeviceType {
|
|
127
|
+
/** Not selected. */
|
|
128
|
+
NOT_SELECTED_DEVICE_TYPE = "NOT_SELECTED_DEVICE_TYPE",
|
|
129
|
+
/** Desktop. */
|
|
130
|
+
DESKTOP = "DESKTOP",
|
|
131
|
+
/** Mobile. */
|
|
132
|
+
MOBILE = "MOBILE",
|
|
133
|
+
/** Tablet. */
|
|
134
|
+
TABLET = "TABLET"
|
|
135
|
+
}
|
|
136
|
+
/** List sessions async response. */
|
|
137
|
+
interface ListSessionsAsyncResponse {
|
|
138
|
+
/** List sessions job ID. */
|
|
139
|
+
jobId?: string;
|
|
140
|
+
}
|
|
141
|
+
/** Get list sessions job result request. */
|
|
142
|
+
interface GetListSessionsJobResultRequest {
|
|
143
|
+
/** List sessions job ID. */
|
|
144
|
+
jobId?: string;
|
|
145
|
+
/** Number of items to load. */
|
|
146
|
+
limit?: number;
|
|
147
|
+
/** Number of items to skip in the current sort order. */
|
|
148
|
+
offset?: number;
|
|
149
|
+
}
|
|
150
|
+
/** Get list sessions job result response. */
|
|
151
|
+
interface GetListSessionsJobResultResponse {
|
|
152
|
+
/** List sessions job result data. */
|
|
153
|
+
result?: JobResult;
|
|
154
|
+
}
|
|
155
|
+
/** List sessions job result. */
|
|
156
|
+
interface JobResult {
|
|
157
|
+
/** Job status. */
|
|
158
|
+
jobStatus?: JobStatus;
|
|
159
|
+
/** Total number of sessions. */
|
|
160
|
+
total?: number | null;
|
|
161
|
+
/** Session IDs. */
|
|
162
|
+
sessionIds?: string[];
|
|
163
|
+
}
|
|
164
|
+
/** Job status. */
|
|
165
|
+
declare enum JobStatus {
|
|
166
|
+
/** Unknown. */
|
|
167
|
+
UNKNOWN_JOB_STATUS = "UNKNOWN_JOB_STATUS",
|
|
168
|
+
/** In progress. */
|
|
169
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
170
|
+
/** Finished. */
|
|
171
|
+
FINISHED = "FINISHED",
|
|
172
|
+
/** Error. */
|
|
173
|
+
ERROR = "ERROR"
|
|
174
|
+
}
|
|
175
|
+
/** Request for getting store conversion sessions. */
|
|
176
|
+
interface CountFunnelSessionsRequest extends CountFunnelSessionsRequestPeriodOneOf {
|
|
177
|
+
/** Custom time period with start & end dates. */
|
|
178
|
+
customPeriod?: CustomPeriod;
|
|
179
|
+
/** Predefined time period. */
|
|
180
|
+
predefinedPeriod?: PredefinedPeriod;
|
|
181
|
+
/** User timezone. If not provided it will be taken from site properties. */
|
|
182
|
+
timezone?: string | null;
|
|
183
|
+
}
|
|
184
|
+
/** @oneof */
|
|
185
|
+
interface CountFunnelSessionsRequestPeriodOneOf {
|
|
186
|
+
/** Custom time period with start & end dates. */
|
|
187
|
+
customPeriod?: CustomPeriod;
|
|
188
|
+
/** Predefined time period. */
|
|
189
|
+
predefinedPeriod?: PredefinedPeriod;
|
|
190
|
+
}
|
|
191
|
+
/** Custom period. Doesn't have comparison period, so use with SELECTED_PERIOD. */
|
|
192
|
+
interface CustomPeriod {
|
|
193
|
+
/** Custom period start date in provided timezone. By default in UTC. */
|
|
194
|
+
start?: string;
|
|
195
|
+
/** Custom period end date in provided timezone. By default in UTC. */
|
|
196
|
+
end?: string;
|
|
197
|
+
}
|
|
198
|
+
/** Predefined period. Could be used with comparison period. */
|
|
199
|
+
interface PredefinedPeriod {
|
|
200
|
+
/** Predefined period type. */
|
|
201
|
+
period?: PredefinedPeriodEnum;
|
|
202
|
+
}
|
|
203
|
+
/** Query period. */
|
|
204
|
+
declare enum PredefinedPeriodEnum {
|
|
205
|
+
/** Today. */
|
|
206
|
+
TODAY = "TODAY",
|
|
207
|
+
/** Yesterday. */
|
|
208
|
+
YESTERDAY = "YESTERDAY",
|
|
209
|
+
/** Last 7 days. */
|
|
210
|
+
LAST_7_DAYS = "LAST_7_DAYS",
|
|
211
|
+
/** Lat 14 days. */
|
|
212
|
+
LAST_14_DAYS = "LAST_14_DAYS",
|
|
213
|
+
/** Last 30 days. */
|
|
214
|
+
LAST_30_DAYS = "LAST_30_DAYS",
|
|
215
|
+
/** Last 90 days. */
|
|
216
|
+
LAST_90_DAYS = "LAST_90_DAYS",
|
|
217
|
+
/** Last 28 days. */
|
|
218
|
+
LAST_28_DAYS = "LAST_28_DAYS",
|
|
219
|
+
/** Last 180 days. */
|
|
220
|
+
LAST_180_DAYS = "LAST_180_DAYS",
|
|
221
|
+
/** Last 365 days. */
|
|
222
|
+
LAST_365_DAYS = "LAST_365_DAYS",
|
|
223
|
+
/** Current week. Week start is Monday. */
|
|
224
|
+
THIS_WEEK = "THIS_WEEK",
|
|
225
|
+
/** Current month. */
|
|
226
|
+
THIS_MONTH = "THIS_MONTH",
|
|
227
|
+
/** Current quater. */
|
|
228
|
+
THIS_QUATER = "THIS_QUATER",
|
|
229
|
+
/** This year. */
|
|
230
|
+
THIS_YEAR = "THIS_YEAR",
|
|
231
|
+
/** Last week (previous week). */
|
|
232
|
+
LAST_WEEK = "LAST_WEEK",
|
|
233
|
+
/** Last month. */
|
|
234
|
+
LAST_MONTH = "LAST_MONTH",
|
|
235
|
+
/** Last quater. */
|
|
236
|
+
LAST_QUATER = "LAST_QUATER",
|
|
237
|
+
/** Last year. */
|
|
238
|
+
LAST_YEAR = "LAST_YEAR",
|
|
239
|
+
/** Last 7 days up until yesterday. */
|
|
240
|
+
LAST_7_DAYS_BEFORE_TODAY = "LAST_7_DAYS_BEFORE_TODAY",
|
|
241
|
+
/** Lat 14 days up until yesterday. */
|
|
242
|
+
LAST_14_DAYS_BEFORE_TODAY = "LAST_14_DAYS_BEFORE_TODAY",
|
|
243
|
+
/** Last 30 days up until yesterday. */
|
|
244
|
+
LAST_30_DAYS_BEFORE_TODAY = "LAST_30_DAYS_BEFORE_TODAY",
|
|
245
|
+
/** Last 90 days up until yesterday. */
|
|
246
|
+
LAST_90_DAYS_BEFORE_TODAY = "LAST_90_DAYS_BEFORE_TODAY",
|
|
247
|
+
/** Last 28 days up until yesterday. */
|
|
248
|
+
LAST_28_DAYS_BEFORE_TODAY = "LAST_28_DAYS_BEFORE_TODAY",
|
|
249
|
+
/** Last 180 days up until yesterday. */
|
|
250
|
+
LAST_180_DAYS_BEFORE_TODAY = "LAST_180_DAYS_BEFORE_TODAY",
|
|
251
|
+
/** Last 365 days up until yesterday. */
|
|
252
|
+
LAST_365_DAYS_BEFORE_TODAY = "LAST_365_DAYS_BEFORE_TODAY",
|
|
253
|
+
/** Last 12 months. */
|
|
254
|
+
LAST_12_MONTHS = "LAST_12_MONTHS"
|
|
255
|
+
}
|
|
256
|
+
/** Response for getting store conversion sessions. */
|
|
257
|
+
interface CountFunnelSessionsResponse {
|
|
258
|
+
recordings?: Recordings;
|
|
259
|
+
}
|
|
260
|
+
interface Recordings {
|
|
261
|
+
/** Saved Session count. */
|
|
262
|
+
siteSessions?: number | null;
|
|
263
|
+
/** Saved Sessions with Product Views */
|
|
264
|
+
productViewSessions?: number | null;
|
|
265
|
+
/** Saved Sessions with Cart Views */
|
|
266
|
+
cartViewSessions?: number | null;
|
|
267
|
+
/** Saved Sessions with Checkouts */
|
|
268
|
+
checkoutSessions?: number | null;
|
|
269
|
+
/** Saved Converted Sessions */
|
|
270
|
+
convertedSessions?: number | null;
|
|
271
|
+
}
|
|
272
|
+
/** Mark a browser session as recorded. */
|
|
273
|
+
interface MarkSessionAsRecordedRequest {
|
|
274
|
+
/** Browser session ID. */
|
|
275
|
+
sessionId?: string;
|
|
276
|
+
}
|
|
277
|
+
/** Mark a browser session as recorded. */
|
|
278
|
+
interface MarkSessionAsRecordedResponse {
|
|
279
|
+
}
|
|
280
|
+
interface ListSessionsAsyncResponseNonNullableFields {
|
|
281
|
+
jobId: string;
|
|
282
|
+
}
|
|
283
|
+
interface GetListSessionsJobResultResponseNonNullableFields {
|
|
284
|
+
result?: {
|
|
285
|
+
jobStatus: JobStatus;
|
|
286
|
+
sessionIds: string[];
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
interface ListSessionsAsyncOptions extends ListSessionsAsyncRequestPeriodOneOf, ListSessionsAsyncRequestParamsOneOf {
|
|
290
|
+
/** Custom time period with start & end dates. */
|
|
291
|
+
customTimePeriod?: CustomTimePeriod;
|
|
292
|
+
/** Predefined time period. */
|
|
293
|
+
predefinedTimePeriod?: PredefinedTimePeriod;
|
|
294
|
+
/** User's timezone. Defaults to timezone as set in the [Site Properties API](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object). */
|
|
295
|
+
timezone?: string | null;
|
|
296
|
+
/** Navigation flow details. */
|
|
297
|
+
navigationFlow?: NavigationFlowSessionsParams;
|
|
298
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
299
|
+
conversionFunnel?: ConversionFunnelSessionsParams;
|
|
300
|
+
/** Device type. */
|
|
301
|
+
deviceType?: SessionsByDeviceParams;
|
|
302
|
+
}
|
|
303
|
+
interface GetListSessionsJobResultOptions {
|
|
304
|
+
/** List sessions job ID. */
|
|
305
|
+
jobId?: string;
|
|
306
|
+
/** Number of items to load. */
|
|
307
|
+
limit?: number;
|
|
308
|
+
/** Number of items to skip in the current sort order. */
|
|
309
|
+
offset?: number;
|
|
310
|
+
}
|
|
311
|
+
interface MarkSessionAsRecordedOptions {
|
|
312
|
+
/** Browser session ID. */
|
|
313
|
+
sessionId?: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
interface HttpClient {
|
|
317
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
318
|
+
fetchWithAuth: typeof fetch;
|
|
319
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
320
|
+
}
|
|
321
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
322
|
+
type HttpResponse<T = any> = {
|
|
323
|
+
data: T;
|
|
324
|
+
status: number;
|
|
325
|
+
statusText: string;
|
|
326
|
+
headers: any;
|
|
327
|
+
request?: any;
|
|
328
|
+
};
|
|
329
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
330
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
331
|
+
url: string;
|
|
332
|
+
data?: Data;
|
|
333
|
+
params?: URLSearchParams;
|
|
334
|
+
} & APIMetadata;
|
|
335
|
+
type APIMetadata = {
|
|
336
|
+
methodFqn?: string;
|
|
337
|
+
entityFqdn?: string;
|
|
338
|
+
packageName?: string;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
declare global {
|
|
342
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
343
|
+
interface SymbolConstructor {
|
|
344
|
+
readonly observable: symbol;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
declare const __metadata: {
|
|
349
|
+
PACKAGE_NAME: string;
|
|
350
|
+
};
|
|
351
|
+
declare function listSessionsAsync(httpClient: HttpClient): (options?: ListSessionsAsyncOptions) => Promise<ListSessionsAsyncResponse & ListSessionsAsyncResponseNonNullableFields>;
|
|
352
|
+
declare function getListSessionsJobResult(httpClient: HttpClient): (options?: GetListSessionsJobResultOptions) => Promise<GetListSessionsJobResultResponse & GetListSessionsJobResultResponseNonNullableFields>;
|
|
353
|
+
declare function markSessionAsRecorded(httpClient: HttpClient): (options?: MarkSessionAsRecordedOptions) => Promise<void>;
|
|
354
|
+
|
|
355
|
+
type index_d_ConversionFunnelSessionsParams = ConversionFunnelSessionsParams;
|
|
356
|
+
type index_d_CountFunnelSessionsRequest = CountFunnelSessionsRequest;
|
|
357
|
+
type index_d_CountFunnelSessionsRequestPeriodOneOf = CountFunnelSessionsRequestPeriodOneOf;
|
|
358
|
+
type index_d_CountFunnelSessionsResponse = CountFunnelSessionsResponse;
|
|
359
|
+
type index_d_CustomPeriod = CustomPeriod;
|
|
360
|
+
type index_d_CustomTimePeriod = CustomTimePeriod;
|
|
361
|
+
type index_d_DeviceType = DeviceType;
|
|
362
|
+
declare const index_d_DeviceType: typeof DeviceType;
|
|
363
|
+
type index_d_FunnelStep = FunnelStep;
|
|
364
|
+
declare const index_d_FunnelStep: typeof FunnelStep;
|
|
365
|
+
type index_d_GetListSessionsJobResultOptions = GetListSessionsJobResultOptions;
|
|
366
|
+
type index_d_GetListSessionsJobResultRequest = GetListSessionsJobResultRequest;
|
|
367
|
+
type index_d_GetListSessionsJobResultResponse = GetListSessionsJobResultResponse;
|
|
368
|
+
type index_d_GetListSessionsJobResultResponseNonNullableFields = GetListSessionsJobResultResponseNonNullableFields;
|
|
369
|
+
type index_d_JobResult = JobResult;
|
|
370
|
+
type index_d_JobStatus = JobStatus;
|
|
371
|
+
declare const index_d_JobStatus: typeof JobStatus;
|
|
372
|
+
type index_d_ListSessionsAsyncOptions = ListSessionsAsyncOptions;
|
|
373
|
+
type index_d_ListSessionsAsyncRequest = ListSessionsAsyncRequest;
|
|
374
|
+
type index_d_ListSessionsAsyncRequestParamsOneOf = ListSessionsAsyncRequestParamsOneOf;
|
|
375
|
+
type index_d_ListSessionsAsyncRequestPeriodOneOf = ListSessionsAsyncRequestPeriodOneOf;
|
|
376
|
+
type index_d_ListSessionsAsyncResponse = ListSessionsAsyncResponse;
|
|
377
|
+
type index_d_ListSessionsAsyncResponseNonNullableFields = ListSessionsAsyncResponseNonNullableFields;
|
|
378
|
+
type index_d_MarkSessionAsRecordedOptions = MarkSessionAsRecordedOptions;
|
|
379
|
+
type index_d_MarkSessionAsRecordedRequest = MarkSessionAsRecordedRequest;
|
|
380
|
+
type index_d_MarkSessionAsRecordedResponse = MarkSessionAsRecordedResponse;
|
|
381
|
+
type index_d_NavigationFlowSessionsParams = NavigationFlowSessionsParams;
|
|
382
|
+
type index_d_PredefinedPeriod = PredefinedPeriod;
|
|
383
|
+
type index_d_PredefinedPeriodEnum = PredefinedPeriodEnum;
|
|
384
|
+
declare const index_d_PredefinedPeriodEnum: typeof PredefinedPeriodEnum;
|
|
385
|
+
type index_d_PredefinedTimePeriod = PredefinedTimePeriod;
|
|
386
|
+
declare const index_d_PredefinedTimePeriod: typeof PredefinedTimePeriod;
|
|
387
|
+
type index_d_Recordings = Recordings;
|
|
388
|
+
type index_d_Session = Session;
|
|
389
|
+
type index_d_SessionsByDeviceParams = SessionsByDeviceParams;
|
|
390
|
+
declare const index_d___metadata: typeof __metadata;
|
|
391
|
+
declare const index_d_getListSessionsJobResult: typeof getListSessionsJobResult;
|
|
392
|
+
declare const index_d_listSessionsAsync: typeof listSessionsAsync;
|
|
393
|
+
declare const index_d_markSessionAsRecorded: typeof markSessionAsRecorded;
|
|
394
|
+
declare namespace index_d {
|
|
395
|
+
export { type index_d_ConversionFunnelSessionsParams as ConversionFunnelSessionsParams, type index_d_CountFunnelSessionsRequest as CountFunnelSessionsRequest, type index_d_CountFunnelSessionsRequestPeriodOneOf as CountFunnelSessionsRequestPeriodOneOf, type index_d_CountFunnelSessionsResponse as CountFunnelSessionsResponse, type index_d_CustomPeriod as CustomPeriod, type index_d_CustomTimePeriod as CustomTimePeriod, index_d_DeviceType as DeviceType, index_d_FunnelStep as FunnelStep, type index_d_GetListSessionsJobResultOptions as GetListSessionsJobResultOptions, type index_d_GetListSessionsJobResultRequest as GetListSessionsJobResultRequest, type index_d_GetListSessionsJobResultResponse as GetListSessionsJobResultResponse, type index_d_GetListSessionsJobResultResponseNonNullableFields as GetListSessionsJobResultResponseNonNullableFields, type index_d_JobResult as JobResult, index_d_JobStatus as JobStatus, type index_d_ListSessionsAsyncOptions as ListSessionsAsyncOptions, type index_d_ListSessionsAsyncRequest as ListSessionsAsyncRequest, type index_d_ListSessionsAsyncRequestParamsOneOf as ListSessionsAsyncRequestParamsOneOf, type index_d_ListSessionsAsyncRequestPeriodOneOf as ListSessionsAsyncRequestPeriodOneOf, type index_d_ListSessionsAsyncResponse as ListSessionsAsyncResponse, type index_d_ListSessionsAsyncResponseNonNullableFields as ListSessionsAsyncResponseNonNullableFields, type index_d_MarkSessionAsRecordedOptions as MarkSessionAsRecordedOptions, type index_d_MarkSessionAsRecordedRequest as MarkSessionAsRecordedRequest, type index_d_MarkSessionAsRecordedResponse as MarkSessionAsRecordedResponse, type index_d_NavigationFlowSessionsParams as NavigationFlowSessionsParams, type index_d_PredefinedPeriod as PredefinedPeriod, index_d_PredefinedPeriodEnum as PredefinedPeriodEnum, index_d_PredefinedTimePeriod as PredefinedTimePeriod, type index_d_Recordings as Recordings, type index_d_Session as Session, type index_d_SessionsByDeviceParams as SessionsByDeviceParams, index_d___metadata as __metadata, index_d_getListSessionsJobResult as getListSessionsJobResult, index_d_listSessionsAsync as listSessionsAsync, index_d_markSessionAsRecorded as markSessionAsRecorded };
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export { index_d as analyticsSession };
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/** List sessions async request. */
|
|
2
|
+
interface ListSessionsAsyncRequest$1 extends ListSessionsAsyncRequestPeriodOneOf$1, ListSessionsAsyncRequestParamsOneOf$1 {
|
|
3
|
+
/** Custom time period with start & end dates. */
|
|
4
|
+
customTimePeriod?: CustomTimePeriod$1;
|
|
5
|
+
/** Predefined time period. */
|
|
6
|
+
predefinedTimePeriod?: PredefinedTimePeriod$1;
|
|
7
|
+
/** Navigation flow details. */
|
|
8
|
+
navigationFlow?: NavigationFlowSessionsParams$1;
|
|
9
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
10
|
+
conversionFunnel?: ConversionFunnelSessionsParams$1;
|
|
11
|
+
/** Device type. */
|
|
12
|
+
deviceType?: SessionsByDeviceParams$1;
|
|
13
|
+
/** User's timezone. Defaults to timezone as set in the [Site Properties API](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object). */
|
|
14
|
+
timezone?: string | null;
|
|
15
|
+
}
|
|
16
|
+
/** @oneof */
|
|
17
|
+
interface ListSessionsAsyncRequestPeriodOneOf$1 {
|
|
18
|
+
/** Custom time period with start & end dates. */
|
|
19
|
+
customTimePeriod?: CustomTimePeriod$1;
|
|
20
|
+
/** Predefined time period. */
|
|
21
|
+
predefinedTimePeriod?: PredefinedTimePeriod$1;
|
|
22
|
+
}
|
|
23
|
+
/** @oneof */
|
|
24
|
+
interface ListSessionsAsyncRequestParamsOneOf$1 {
|
|
25
|
+
/** Navigation flow details. */
|
|
26
|
+
navigationFlow?: NavigationFlowSessionsParams$1;
|
|
27
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
28
|
+
conversionFunnel?: ConversionFunnelSessionsParams$1;
|
|
29
|
+
/** Device type. */
|
|
30
|
+
deviceType?: SessionsByDeviceParams$1;
|
|
31
|
+
}
|
|
32
|
+
/** Custom time period. */
|
|
33
|
+
interface CustomTimePeriod$1 {
|
|
34
|
+
/** Custom period start date in provided timezone. */
|
|
35
|
+
startDate?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Custom period end date in provided timezone. Returned data will include all dates until the requested end date.
|
|
38
|
+
* For example, { startDate: '2024-01-01', endDate: '2024-01-03' } will return data for '2024-01-01' and '2024-01-02'
|
|
39
|
+
*/
|
|
40
|
+
endDate?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Predefined time period.
|
|
44
|
+
* `THIS_WEEK`begins with Monday.
|
|
45
|
+
*/
|
|
46
|
+
declare enum PredefinedTimePeriod$1 {
|
|
47
|
+
/** Today. */
|
|
48
|
+
TODAY = "TODAY",
|
|
49
|
+
/** Yesterday. */
|
|
50
|
+
YESTERDAY = "YESTERDAY",
|
|
51
|
+
/** Last 7 days. */
|
|
52
|
+
LAST_7_DAYS = "LAST_7_DAYS",
|
|
53
|
+
/** Last 14 days. */
|
|
54
|
+
LAST_14_DAYS = "LAST_14_DAYS",
|
|
55
|
+
/** Last 30 days. */
|
|
56
|
+
LAST_30_DAYS = "LAST_30_DAYS",
|
|
57
|
+
/** Last 90 days. */
|
|
58
|
+
LAST_90_DAYS = "LAST_90_DAYS",
|
|
59
|
+
/** Last 28 days. */
|
|
60
|
+
LAST_28_DAYS = "LAST_28_DAYS",
|
|
61
|
+
/** Last 180 days. */
|
|
62
|
+
LAST_180_DAYS = "LAST_180_DAYS",
|
|
63
|
+
/** Last 365 days. */
|
|
64
|
+
LAST_365_DAYS = "LAST_365_DAYS",
|
|
65
|
+
/** Current week, starting on Monday. */
|
|
66
|
+
THIS_WEEK = "THIS_WEEK",
|
|
67
|
+
/** Current month. */
|
|
68
|
+
THIS_MONTH = "THIS_MONTH",
|
|
69
|
+
/** Current quarter. */
|
|
70
|
+
THIS_QUARTER = "THIS_QUARTER",
|
|
71
|
+
/** This year. */
|
|
72
|
+
THIS_YEAR = "THIS_YEAR",
|
|
73
|
+
/** Last week (previous week). */
|
|
74
|
+
LAST_WEEK = "LAST_WEEK",
|
|
75
|
+
/** Last month. */
|
|
76
|
+
LAST_MONTH = "LAST_MONTH",
|
|
77
|
+
/** Last quarter. */
|
|
78
|
+
LAST_QUARTER = "LAST_QUARTER",
|
|
79
|
+
/** Last year. */
|
|
80
|
+
LAST_YEAR = "LAST_YEAR",
|
|
81
|
+
/** Last 12 months. */
|
|
82
|
+
LAST_12_MONTHS = "LAST_12_MONTHS"
|
|
83
|
+
}
|
|
84
|
+
/** Navigation flow details. */
|
|
85
|
+
interface NavigationFlowSessionsParams$1 {
|
|
86
|
+
/**
|
|
87
|
+
* Page interactions, including where the user dropped off. For example:
|
|
88
|
+
* - ["/{Homepage}", "__DROP__"]: Sessions where a user visited the site's homepage and then dropped off.
|
|
89
|
+
* - ["", "__DROP__"]: Sessions where a user visited (any page) and then dropped off.
|
|
90
|
+
* - ["", "", "__DROP__"]: Session where a user visited any page, then navigated to any page, and then dropped off.
|
|
91
|
+
*/
|
|
92
|
+
pageInteractions?: string[] | null;
|
|
93
|
+
}
|
|
94
|
+
/** Conversion funnel details, meaning the steps in the journey the visitor has taken on the site. */
|
|
95
|
+
interface ConversionFunnelSessionsParams$1 {
|
|
96
|
+
/** Funnel step to include. */
|
|
97
|
+
include?: FunnelStep$1;
|
|
98
|
+
/** Funnel step to exclude. */
|
|
99
|
+
exclude?: FunnelStep$1;
|
|
100
|
+
}
|
|
101
|
+
/** Funnel step. */
|
|
102
|
+
declare enum FunnelStep$1 {
|
|
103
|
+
/** Not selected. */
|
|
104
|
+
NOT_SELECTED_FUNNEL_STEP = "NOT_SELECTED_FUNNEL_STEP",
|
|
105
|
+
/** Site sessions. */
|
|
106
|
+
SITE_SESSIONS = "SITE_SESSIONS",
|
|
107
|
+
/** Viewed product. */
|
|
108
|
+
VIEWED_PRODUCT = "VIEWED_PRODUCT",
|
|
109
|
+
/** Added to cart. */
|
|
110
|
+
ADDED_TO_CART = "ADDED_TO_CART",
|
|
111
|
+
/** Reached checkout. */
|
|
112
|
+
REACHED_CHECKOUT = "REACHED_CHECKOUT",
|
|
113
|
+
/** Sessions converted. */
|
|
114
|
+
SESSIONS_CONVERTED = "SESSIONS_CONVERTED"
|
|
115
|
+
}
|
|
116
|
+
/** Device details. */
|
|
117
|
+
interface SessionsByDeviceParams$1 {
|
|
118
|
+
/** Device type. */
|
|
119
|
+
type?: DeviceType$1;
|
|
120
|
+
}
|
|
121
|
+
/** Device type. */
|
|
122
|
+
declare enum DeviceType$1 {
|
|
123
|
+
/** Not selected. */
|
|
124
|
+
NOT_SELECTED_DEVICE_TYPE = "NOT_SELECTED_DEVICE_TYPE",
|
|
125
|
+
/** Desktop. */
|
|
126
|
+
DESKTOP = "DESKTOP",
|
|
127
|
+
/** Mobile. */
|
|
128
|
+
MOBILE = "MOBILE",
|
|
129
|
+
/** Tablet. */
|
|
130
|
+
TABLET = "TABLET"
|
|
131
|
+
}
|
|
132
|
+
/** List sessions async response. */
|
|
133
|
+
interface ListSessionsAsyncResponse$1 {
|
|
134
|
+
/** List sessions job ID. */
|
|
135
|
+
jobId?: string;
|
|
136
|
+
}
|
|
137
|
+
/** Get list sessions job result request. */
|
|
138
|
+
interface GetListSessionsJobResultRequest$1 {
|
|
139
|
+
/** List sessions job ID. */
|
|
140
|
+
jobId?: string;
|
|
141
|
+
/** Number of items to load. */
|
|
142
|
+
limit?: number;
|
|
143
|
+
/** Number of items to skip in the current sort order. */
|
|
144
|
+
offset?: number;
|
|
145
|
+
}
|
|
146
|
+
/** Get list sessions job result response. */
|
|
147
|
+
interface GetListSessionsJobResultResponse$1 {
|
|
148
|
+
/** List sessions job result data. */
|
|
149
|
+
result?: JobResult$1;
|
|
150
|
+
}
|
|
151
|
+
/** List sessions job result. */
|
|
152
|
+
interface JobResult$1 {
|
|
153
|
+
/** Job status. */
|
|
154
|
+
jobStatus?: JobStatus$1;
|
|
155
|
+
/** Total number of sessions. */
|
|
156
|
+
total?: number | null;
|
|
157
|
+
/** Session IDs. */
|
|
158
|
+
sessionIds?: string[];
|
|
159
|
+
}
|
|
160
|
+
/** Job status. */
|
|
161
|
+
declare enum JobStatus$1 {
|
|
162
|
+
/** Unknown. */
|
|
163
|
+
UNKNOWN_JOB_STATUS = "UNKNOWN_JOB_STATUS",
|
|
164
|
+
/** In progress. */
|
|
165
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
166
|
+
/** Finished. */
|
|
167
|
+
FINISHED = "FINISHED",
|
|
168
|
+
/** Error. */
|
|
169
|
+
ERROR = "ERROR"
|
|
170
|
+
}
|
|
171
|
+
/** Mark a browser session as recorded. */
|
|
172
|
+
interface MarkSessionAsRecordedRequest$1 {
|
|
173
|
+
/** Browser session ID. */
|
|
174
|
+
sessionId?: string;
|
|
175
|
+
}
|
|
176
|
+
/** Mark a browser session as recorded. */
|
|
177
|
+
interface MarkSessionAsRecordedResponse$1 {
|
|
178
|
+
}
|
|
179
|
+
interface ListSessionsAsyncResponseNonNullableFields$1 {
|
|
180
|
+
jobId: string;
|
|
181
|
+
}
|
|
182
|
+
interface GetListSessionsJobResultResponseNonNullableFields$1 {
|
|
183
|
+
result?: {
|
|
184
|
+
jobStatus: JobStatus$1;
|
|
185
|
+
sessionIds: string[];
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** List sessions async request. */
|
|
190
|
+
interface ListSessionsAsyncRequest extends ListSessionsAsyncRequestPeriodOneOf, ListSessionsAsyncRequestParamsOneOf {
|
|
191
|
+
/** Custom time period with start & end dates. */
|
|
192
|
+
customTimePeriod?: CustomTimePeriod;
|
|
193
|
+
/** Predefined time period. */
|
|
194
|
+
predefinedTimePeriod?: PredefinedTimePeriod;
|
|
195
|
+
/** Navigation flow details. */
|
|
196
|
+
navigationFlow?: NavigationFlowSessionsParams;
|
|
197
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
198
|
+
conversionFunnel?: ConversionFunnelSessionsParams;
|
|
199
|
+
/** Device type. */
|
|
200
|
+
deviceType?: SessionsByDeviceParams;
|
|
201
|
+
/** User's timezone. Defaults to timezone as set in the [Site Properties API](https://dev.wix.com/docs/rest/business-management/site-properties/properties/properties-object). */
|
|
202
|
+
timezone?: string | null;
|
|
203
|
+
}
|
|
204
|
+
/** @oneof */
|
|
205
|
+
interface ListSessionsAsyncRequestPeriodOneOf {
|
|
206
|
+
/** Custom time period with start & end dates. */
|
|
207
|
+
customTimePeriod?: CustomTimePeriod;
|
|
208
|
+
/** Predefined time period. */
|
|
209
|
+
predefinedTimePeriod?: PredefinedTimePeriod;
|
|
210
|
+
}
|
|
211
|
+
/** @oneof */
|
|
212
|
+
interface ListSessionsAsyncRequestParamsOneOf {
|
|
213
|
+
/** Navigation flow details. */
|
|
214
|
+
navigationFlow?: NavigationFlowSessionsParams;
|
|
215
|
+
/** Conversion funnel details. The steps in the journey the visitor has taken on the site. */
|
|
216
|
+
conversionFunnel?: ConversionFunnelSessionsParams;
|
|
217
|
+
/** Device type. */
|
|
218
|
+
deviceType?: SessionsByDeviceParams;
|
|
219
|
+
}
|
|
220
|
+
/** Custom time period. */
|
|
221
|
+
interface CustomTimePeriod {
|
|
222
|
+
/** Custom period start date in provided timezone. */
|
|
223
|
+
startDate?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Custom period end date in provided timezone. Returned data will include all dates until the requested end date.
|
|
226
|
+
* For example, { startDate: '2024-01-01', endDate: '2024-01-03' } will return data for '2024-01-01' and '2024-01-02'
|
|
227
|
+
*/
|
|
228
|
+
endDate?: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Predefined time period.
|
|
232
|
+
* `THIS_WEEK`begins with Monday.
|
|
233
|
+
*/
|
|
234
|
+
declare enum PredefinedTimePeriod {
|
|
235
|
+
/** Today. */
|
|
236
|
+
TODAY = "TODAY",
|
|
237
|
+
/** Yesterday. */
|
|
238
|
+
YESTERDAY = "YESTERDAY",
|
|
239
|
+
/** Last 7 days. */
|
|
240
|
+
LAST_7_DAYS = "LAST_7_DAYS",
|
|
241
|
+
/** Last 14 days. */
|
|
242
|
+
LAST_14_DAYS = "LAST_14_DAYS",
|
|
243
|
+
/** Last 30 days. */
|
|
244
|
+
LAST_30_DAYS = "LAST_30_DAYS",
|
|
245
|
+
/** Last 90 days. */
|
|
246
|
+
LAST_90_DAYS = "LAST_90_DAYS",
|
|
247
|
+
/** Last 28 days. */
|
|
248
|
+
LAST_28_DAYS = "LAST_28_DAYS",
|
|
249
|
+
/** Last 180 days. */
|
|
250
|
+
LAST_180_DAYS = "LAST_180_DAYS",
|
|
251
|
+
/** Last 365 days. */
|
|
252
|
+
LAST_365_DAYS = "LAST_365_DAYS",
|
|
253
|
+
/** Current week, starting on Monday. */
|
|
254
|
+
THIS_WEEK = "THIS_WEEK",
|
|
255
|
+
/** Current month. */
|
|
256
|
+
THIS_MONTH = "THIS_MONTH",
|
|
257
|
+
/** Current quarter. */
|
|
258
|
+
THIS_QUARTER = "THIS_QUARTER",
|
|
259
|
+
/** This year. */
|
|
260
|
+
THIS_YEAR = "THIS_YEAR",
|
|
261
|
+
/** Last week (previous week). */
|
|
262
|
+
LAST_WEEK = "LAST_WEEK",
|
|
263
|
+
/** Last month. */
|
|
264
|
+
LAST_MONTH = "LAST_MONTH",
|
|
265
|
+
/** Last quarter. */
|
|
266
|
+
LAST_QUARTER = "LAST_QUARTER",
|
|
267
|
+
/** Last year. */
|
|
268
|
+
LAST_YEAR = "LAST_YEAR",
|
|
269
|
+
/** Last 12 months. */
|
|
270
|
+
LAST_12_MONTHS = "LAST_12_MONTHS"
|
|
271
|
+
}
|
|
272
|
+
/** Navigation flow details. */
|
|
273
|
+
interface NavigationFlowSessionsParams {
|
|
274
|
+
/**
|
|
275
|
+
* Page interactions, including where the user dropped off. For example:
|
|
276
|
+
* - ["/{Homepage}", "__DROP__"]: Sessions where a user visited the site's homepage and then dropped off.
|
|
277
|
+
* - ["", "__DROP__"]: Sessions where a user visited (any page) and then dropped off.
|
|
278
|
+
* - ["", "", "__DROP__"]: Session where a user visited any page, then navigated to any page, and then dropped off.
|
|
279
|
+
*/
|
|
280
|
+
pageInteractions?: string[] | null;
|
|
281
|
+
}
|
|
282
|
+
/** Conversion funnel details, meaning the steps in the journey the visitor has taken on the site. */
|
|
283
|
+
interface ConversionFunnelSessionsParams {
|
|
284
|
+
/** Funnel step to include. */
|
|
285
|
+
include?: FunnelStep;
|
|
286
|
+
/** Funnel step to exclude. */
|
|
287
|
+
exclude?: FunnelStep;
|
|
288
|
+
}
|
|
289
|
+
/** Funnel step. */
|
|
290
|
+
declare enum FunnelStep {
|
|
291
|
+
/** Not selected. */
|
|
292
|
+
NOT_SELECTED_FUNNEL_STEP = "NOT_SELECTED_FUNNEL_STEP",
|
|
293
|
+
/** Site sessions. */
|
|
294
|
+
SITE_SESSIONS = "SITE_SESSIONS",
|
|
295
|
+
/** Viewed product. */
|
|
296
|
+
VIEWED_PRODUCT = "VIEWED_PRODUCT",
|
|
297
|
+
/** Added to cart. */
|
|
298
|
+
ADDED_TO_CART = "ADDED_TO_CART",
|
|
299
|
+
/** Reached checkout. */
|
|
300
|
+
REACHED_CHECKOUT = "REACHED_CHECKOUT",
|
|
301
|
+
/** Sessions converted. */
|
|
302
|
+
SESSIONS_CONVERTED = "SESSIONS_CONVERTED"
|
|
303
|
+
}
|
|
304
|
+
/** Device details. */
|
|
305
|
+
interface SessionsByDeviceParams {
|
|
306
|
+
/** Device type. */
|
|
307
|
+
type?: DeviceType;
|
|
308
|
+
}
|
|
309
|
+
/** Device type. */
|
|
310
|
+
declare enum DeviceType {
|
|
311
|
+
/** Not selected. */
|
|
312
|
+
NOT_SELECTED_DEVICE_TYPE = "NOT_SELECTED_DEVICE_TYPE",
|
|
313
|
+
/** Desktop. */
|
|
314
|
+
DESKTOP = "DESKTOP",
|
|
315
|
+
/** Mobile. */
|
|
316
|
+
MOBILE = "MOBILE",
|
|
317
|
+
/** Tablet. */
|
|
318
|
+
TABLET = "TABLET"
|
|
319
|
+
}
|
|
320
|
+
/** List sessions async response. */
|
|
321
|
+
interface ListSessionsAsyncResponse {
|
|
322
|
+
/** List sessions job ID. */
|
|
323
|
+
jobId?: string;
|
|
324
|
+
}
|
|
325
|
+
/** Get list sessions job result request. */
|
|
326
|
+
interface GetListSessionsJobResultRequest {
|
|
327
|
+
/** List sessions job ID. */
|
|
328
|
+
jobId?: string;
|
|
329
|
+
/** Number of items to load. */
|
|
330
|
+
limit?: number;
|
|
331
|
+
/** Number of items to skip in the current sort order. */
|
|
332
|
+
offset?: number;
|
|
333
|
+
}
|
|
334
|
+
/** Get list sessions job result response. */
|
|
335
|
+
interface GetListSessionsJobResultResponse {
|
|
336
|
+
/** List sessions job result data. */
|
|
337
|
+
result?: JobResult;
|
|
338
|
+
}
|
|
339
|
+
/** List sessions job result. */
|
|
340
|
+
interface JobResult {
|
|
341
|
+
/** Job status. */
|
|
342
|
+
jobStatus?: JobStatus;
|
|
343
|
+
/** Total number of sessions. */
|
|
344
|
+
total?: number | null;
|
|
345
|
+
/** Session IDs. */
|
|
346
|
+
sessionIds?: string[];
|
|
347
|
+
}
|
|
348
|
+
/** Job status. */
|
|
349
|
+
declare enum JobStatus {
|
|
350
|
+
/** Unknown. */
|
|
351
|
+
UNKNOWN_JOB_STATUS = "UNKNOWN_JOB_STATUS",
|
|
352
|
+
/** In progress. */
|
|
353
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
354
|
+
/** Finished. */
|
|
355
|
+
FINISHED = "FINISHED",
|
|
356
|
+
/** Error. */
|
|
357
|
+
ERROR = "ERROR"
|
|
358
|
+
}
|
|
359
|
+
/** Mark a browser session as recorded. */
|
|
360
|
+
interface MarkSessionAsRecordedRequest {
|
|
361
|
+
/** Browser session ID. */
|
|
362
|
+
sessionId?: string;
|
|
363
|
+
}
|
|
364
|
+
/** Mark a browser session as recorded. */
|
|
365
|
+
interface MarkSessionAsRecordedResponse {
|
|
366
|
+
}
|
|
367
|
+
interface ListSessionsAsyncResponseNonNullableFields {
|
|
368
|
+
jobId: string;
|
|
369
|
+
}
|
|
370
|
+
interface GetListSessionsJobResultResponseNonNullableFields {
|
|
371
|
+
result?: {
|
|
372
|
+
jobStatus: JobStatus;
|
|
373
|
+
sessionIds: string[];
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
378
|
+
getUrl: (context: any) => string;
|
|
379
|
+
httpMethod: K;
|
|
380
|
+
path: string;
|
|
381
|
+
pathParams: M;
|
|
382
|
+
__requestType: T;
|
|
383
|
+
__originalRequestType: S;
|
|
384
|
+
__responseType: Q;
|
|
385
|
+
__originalResponseType: R;
|
|
386
|
+
};
|
|
387
|
+
declare function listSessionsAsync(): __PublicMethodMetaInfo<'POST', {}, ListSessionsAsyncRequest, ListSessionsAsyncRequest$1, ListSessionsAsyncResponse & ListSessionsAsyncResponseNonNullableFields, ListSessionsAsyncResponse$1 & ListSessionsAsyncResponseNonNullableFields$1>;
|
|
388
|
+
declare function getListSessionsJobResult(): __PublicMethodMetaInfo<'GET', {}, GetListSessionsJobResultRequest, GetListSessionsJobResultRequest$1, GetListSessionsJobResultResponse & GetListSessionsJobResultResponseNonNullableFields, GetListSessionsJobResultResponse$1 & GetListSessionsJobResultResponseNonNullableFields$1>;
|
|
389
|
+
declare function markSessionAsRecorded(): __PublicMethodMetaInfo<'POST', {}, MarkSessionAsRecordedRequest, MarkSessionAsRecordedRequest$1, MarkSessionAsRecordedResponse, MarkSessionAsRecordedResponse$1>;
|
|
390
|
+
|
|
391
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
392
|
+
declare const meta_getListSessionsJobResult: typeof getListSessionsJobResult;
|
|
393
|
+
declare const meta_listSessionsAsync: typeof listSessionsAsync;
|
|
394
|
+
declare const meta_markSessionAsRecorded: typeof markSessionAsRecorded;
|
|
395
|
+
declare namespace meta {
|
|
396
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_getListSessionsJobResult as getListSessionsJobResult, meta_listSessionsAsync as listSessionsAsync, meta_markSessionAsRecorded as markSessionAsRecorded };
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export { meta as analyticsSession };
|