@wix/analytics-session 1.0.11 → 1.0.13
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/index.d.ts +2 -1
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/es/index.d.ts +2 -1
- package/build/es/index.js +2 -1
- package/build/es/index.js.map +1 -1
- package/package.json +5 -4
- package/type-bundles/context.bundle.d.ts +69 -36
- package/type-bundles/index.bundle.d.ts +69 -36
package/build/cjs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as analyticsSession from '@wix/analytics-session_analytics-session';
|
|
2
|
+
export { analyticsSession };
|
package/build/cjs/index.js
CHANGED
|
@@ -24,5 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.analyticsSession = void 0;
|
|
27
|
-
|
|
27
|
+
const analyticsSession = __importStar(require("@wix/analytics-session_analytics-session"));
|
|
28
|
+
exports.analyticsSession = analyticsSession;
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2FAA6E;AAEpE,4CAAgB"}
|
package/build/es/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as analyticsSession from '@wix/analytics-session_analytics-session';
|
|
2
|
+
export { analyticsSession };
|
package/build/es/index.js
CHANGED
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,0CAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/analytics-session",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/analytics-session_analytics-session": "1.0.
|
|
21
|
+
"@wix/analytics-session_analytics-session": "1.0.13"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"glob": "^10.4.1",
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
"typescript": "^5.3.2"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
|
|
30
|
+
"build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
|
|
31
31
|
"build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
|
|
32
|
+
"build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
|
|
32
33
|
"test": ":"
|
|
33
34
|
},
|
|
34
35
|
"wix": {
|
|
@@ -42,5 +43,5 @@
|
|
|
42
43
|
"fqdn": ""
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
|
-
"falconPackageHash": "
|
|
46
|
+
"falconPackageHash": "32ac35d3f0adaa584181c62399ee6ed8ca0eac36d6ac1178195e76cf"
|
|
46
47
|
}
|
|
@@ -1,3 +1,37 @@
|
|
|
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
|
+
|
|
1
35
|
interface Session {
|
|
2
36
|
/** Session ID. */
|
|
3
37
|
_id?: string;
|
|
@@ -268,45 +302,44 @@ interface GetListSessionsJobResultOptions {
|
|
|
268
302
|
offset: number;
|
|
269
303
|
}
|
|
270
304
|
|
|
271
|
-
|
|
272
|
-
interface
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
305
|
+
declare function listSessionsAsync$1(httpClient: HttpClient): ListSessionsAsyncSignature;
|
|
306
|
+
interface ListSessionsAsyncSignature {
|
|
307
|
+
/**
|
|
308
|
+
* Start an async job to retrieve a list of session IDs, given the provided filters. The following filters **must** be passed:
|
|
309
|
+
* - Time period, either predefined or custom.
|
|
310
|
+
* - Session filter, either navigation flow (page interactions), conversion funnel steps, or device type.
|
|
311
|
+
* @param - Filter options. The following filters **must** be passed:
|
|
312
|
+
*
|
|
313
|
+
* - Time period, either predefined or custom.
|
|
314
|
+
*
|
|
315
|
+
* - Session filter, either navigation flow (page interactions), conversion funnel steps, or device type.
|
|
316
|
+
* @returns List sessions async response.
|
|
317
|
+
*/
|
|
318
|
+
(options?: ListSessionsAsyncOptions | undefined): Promise<ListSessionsAsyncResponse & ListSessionsAsyncResponseNonNullableFields>;
|
|
276
319
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
};
|
|
296
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
297
|
-
|
|
298
|
-
declare global {
|
|
299
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
300
|
-
interface SymbolConstructor {
|
|
301
|
-
readonly observable: symbol;
|
|
302
|
-
}
|
|
320
|
+
declare function getListSessionsJobResult$1(httpClient: HttpClient): GetListSessionsJobResultSignature;
|
|
321
|
+
interface GetListSessionsJobResultSignature {
|
|
322
|
+
/**
|
|
323
|
+
* Retrieves the job status and a list of session IDs, if ready.
|
|
324
|
+
* @param - List sessions job ID.
|
|
325
|
+
* @param - Field options. The `limit` and `offset` filters **must** be passed.
|
|
326
|
+
* @returns Get list sessions job result response.
|
|
327
|
+
*/
|
|
328
|
+
(jobId: string, options: GetListSessionsJobResultOptions): Promise<GetListSessionsJobResultResponse & GetListSessionsJobResultResponseNonNullableFields>;
|
|
329
|
+
}
|
|
330
|
+
declare function markSessionAsRecorded$1(httpClient: HttpClient): MarkSessionAsRecordedSignature;
|
|
331
|
+
interface MarkSessionAsRecordedSignature {
|
|
332
|
+
/**
|
|
333
|
+
* Marks a browser session as recorded.
|
|
334
|
+
* @param - Browser session ID.
|
|
335
|
+
* @returns Mark a browser session as recorded.
|
|
336
|
+
*/
|
|
337
|
+
(sessionId: string): Promise<void>;
|
|
303
338
|
}
|
|
304
339
|
|
|
305
|
-
declare
|
|
306
|
-
|
|
307
|
-
declare const
|
|
308
|
-
declare const getListSessionsJobResult: ReturnType<typeof createRESTModule<typeof publicGetListSessionsJobResult>>;
|
|
309
|
-
declare const markSessionAsRecorded: ReturnType<typeof createRESTModule<typeof publicMarkSessionAsRecorded>>;
|
|
340
|
+
declare const listSessionsAsync: BuildRESTFunction<typeof listSessionsAsync$1> & typeof listSessionsAsync$1;
|
|
341
|
+
declare const getListSessionsJobResult: BuildRESTFunction<typeof getListSessionsJobResult$1> & typeof getListSessionsJobResult$1;
|
|
342
|
+
declare const markSessionAsRecorded: BuildRESTFunction<typeof markSessionAsRecorded$1> & typeof markSessionAsRecorded$1;
|
|
310
343
|
|
|
311
344
|
type context_ConversionFunnelSessionsParams = ConversionFunnelSessionsParams;
|
|
312
345
|
type context_CountFunnelSessionsRequest = CountFunnelSessionsRequest;
|
|
@@ -1,3 +1,37 @@
|
|
|
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
|
+
|
|
1
35
|
interface Session {
|
|
2
36
|
/** Session ID. */
|
|
3
37
|
_id?: string;
|
|
@@ -268,45 +302,44 @@ interface GetListSessionsJobResultOptions {
|
|
|
268
302
|
offset: number;
|
|
269
303
|
}
|
|
270
304
|
|
|
271
|
-
|
|
272
|
-
interface
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
305
|
+
declare function listSessionsAsync$1(httpClient: HttpClient): ListSessionsAsyncSignature;
|
|
306
|
+
interface ListSessionsAsyncSignature {
|
|
307
|
+
/**
|
|
308
|
+
* Start an async job to retrieve a list of session IDs, given the provided filters. The following filters **must** be passed:
|
|
309
|
+
* - Time period, either predefined or custom.
|
|
310
|
+
* - Session filter, either navigation flow (page interactions), conversion funnel steps, or device type.
|
|
311
|
+
* @param - Filter options. The following filters **must** be passed:
|
|
312
|
+
*
|
|
313
|
+
* - Time period, either predefined or custom.
|
|
314
|
+
*
|
|
315
|
+
* - Session filter, either navigation flow (page interactions), conversion funnel steps, or device type.
|
|
316
|
+
* @returns List sessions async response.
|
|
317
|
+
*/
|
|
318
|
+
(options?: ListSessionsAsyncOptions | undefined): Promise<ListSessionsAsyncResponse & ListSessionsAsyncResponseNonNullableFields>;
|
|
276
319
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
};
|
|
296
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
297
|
-
|
|
298
|
-
declare global {
|
|
299
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
300
|
-
interface SymbolConstructor {
|
|
301
|
-
readonly observable: symbol;
|
|
302
|
-
}
|
|
320
|
+
declare function getListSessionsJobResult$1(httpClient: HttpClient): GetListSessionsJobResultSignature;
|
|
321
|
+
interface GetListSessionsJobResultSignature {
|
|
322
|
+
/**
|
|
323
|
+
* Retrieves the job status and a list of session IDs, if ready.
|
|
324
|
+
* @param - List sessions job ID.
|
|
325
|
+
* @param - Field options. The `limit` and `offset` filters **must** be passed.
|
|
326
|
+
* @returns Get list sessions job result response.
|
|
327
|
+
*/
|
|
328
|
+
(jobId: string, options: GetListSessionsJobResultOptions): Promise<GetListSessionsJobResultResponse & GetListSessionsJobResultResponseNonNullableFields>;
|
|
329
|
+
}
|
|
330
|
+
declare function markSessionAsRecorded$1(httpClient: HttpClient): MarkSessionAsRecordedSignature;
|
|
331
|
+
interface MarkSessionAsRecordedSignature {
|
|
332
|
+
/**
|
|
333
|
+
* Marks a browser session as recorded.
|
|
334
|
+
* @param - Browser session ID.
|
|
335
|
+
* @returns Mark a browser session as recorded.
|
|
336
|
+
*/
|
|
337
|
+
(sessionId: string): Promise<void>;
|
|
303
338
|
}
|
|
304
339
|
|
|
305
|
-
declare
|
|
306
|
-
|
|
307
|
-
declare const
|
|
308
|
-
declare const getListSessionsJobResult: ReturnType<typeof createRESTModule<typeof publicGetListSessionsJobResult>>;
|
|
309
|
-
declare const markSessionAsRecorded: ReturnType<typeof createRESTModule<typeof publicMarkSessionAsRecorded>>;
|
|
340
|
+
declare const listSessionsAsync: BuildRESTFunction<typeof listSessionsAsync$1> & typeof listSessionsAsync$1;
|
|
341
|
+
declare const getListSessionsJobResult: BuildRESTFunction<typeof getListSessionsJobResult$1> & typeof getListSessionsJobResult$1;
|
|
342
|
+
declare const markSessionAsRecorded: BuildRESTFunction<typeof markSessionAsRecorded$1> & typeof markSessionAsRecorded$1;
|
|
310
343
|
|
|
311
344
|
type index_d_ConversionFunnelSessionsParams = ConversionFunnelSessionsParams;
|
|
312
345
|
type index_d_CountFunnelSessionsRequest = CountFunnelSessionsRequest;
|