export interface Session { /** Session ID. */ _id?: string; } /** List sessions async request. */ export interface ListSessionsAsyncRequest extends ListSessionsAsyncRequestPeriodOneOf, ListSessionsAsyncRequestParamsOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; /** Navigation flow details. */ navigationFlow?: NavigationFlowSessionsParams; /** Conversion funnel details. The steps in the journey the visitor has taken on the site. */ conversionFunnel?: ConversionFunnelSessionsParams; /** Device type. */ deviceType?: SessionsByDeviceParams; /** 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). */ timezone?: string | null; } /** @oneof */ export interface ListSessionsAsyncRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; } /** @oneof */ export interface ListSessionsAsyncRequestParamsOneOf { /** Navigation flow details. */ navigationFlow?: NavigationFlowSessionsParams; /** Conversion funnel details. The steps in the journey the visitor has taken on the site. */ conversionFunnel?: ConversionFunnelSessionsParams; /** Device type. */ deviceType?: SessionsByDeviceParams; } /** Custom time period. */ export interface CustomTimePeriod { /** Custom period start date in provided timezone. */ startDate?: string; /** * Custom period end date in provided timezone. Returned data will include all dates until the requested end date. * For example, { startDate: '2024-01-01', endDate: '2024-01-03' } will return data for '2024-01-01' and '2024-01-02' */ endDate?: string; } /** * Predefined time period. * `THIS_WEEK`begins with Monday. */ export declare enum PredefinedTimePeriod { /** Today. */ TODAY = "TODAY", /** Yesterday. */ YESTERDAY = "YESTERDAY", /** Last 7 days. */ LAST_7_DAYS = "LAST_7_DAYS", /** Last 14 days. */ LAST_14_DAYS = "LAST_14_DAYS", /** Last 30 days. */ LAST_30_DAYS = "LAST_30_DAYS", /** Last 90 days. */ LAST_90_DAYS = "LAST_90_DAYS", /** Last 28 days. */ LAST_28_DAYS = "LAST_28_DAYS", /** Last 180 days. */ LAST_180_DAYS = "LAST_180_DAYS", /** Last 365 days. */ LAST_365_DAYS = "LAST_365_DAYS", /** Current week, starting on Monday. */ THIS_WEEK = "THIS_WEEK", /** Current month. */ THIS_MONTH = "THIS_MONTH", /** Current quarter. */ THIS_QUARTER = "THIS_QUARTER", /** This year. */ THIS_YEAR = "THIS_YEAR", /** Last week (previous week). */ LAST_WEEK = "LAST_WEEK", /** Last month. */ LAST_MONTH = "LAST_MONTH", /** Last quarter. */ LAST_QUARTER = "LAST_QUARTER", /** Last year. */ LAST_YEAR = "LAST_YEAR", /** Last 12 months. */ LAST_12_MONTHS = "LAST_12_MONTHS" } /** Navigation flow details. */ export interface NavigationFlowSessionsParams { /** * Page interactions, including where the user dropped off. For example: * - ["/{Homepage}", "__DROP__"]: Sessions where a user visited the site's homepage and then dropped off. * - ["", "__DROP__"]: Sessions where a user visited (any page) and then dropped off. * - ["", "", "__DROP__"]: Session where a user visited any page, then navigated to any page, and then dropped off. */ pageInteractions?: string[] | null; } /** Conversion funnel details, meaning the steps in the journey the visitor has taken on the site. */ export interface ConversionFunnelSessionsParams { /** Funnel step to include. */ include?: FunnelStep; /** Funnel step to exclude. */ exclude?: FunnelStep; } /** Funnel step. */ export declare enum FunnelStep { /** Not selected. */ NOT_SELECTED_FUNNEL_STEP = "NOT_SELECTED_FUNNEL_STEP", /** Site sessions. */ SITE_SESSIONS = "SITE_SESSIONS", /** Viewed product. */ VIEWED_PRODUCT = "VIEWED_PRODUCT", /** Added to cart. */ ADDED_TO_CART = "ADDED_TO_CART", /** Reached checkout. */ REACHED_CHECKOUT = "REACHED_CHECKOUT", /** Sessions converted. */ SESSIONS_CONVERTED = "SESSIONS_CONVERTED" } /** Device details. */ export interface SessionsByDeviceParams { /** Device type. */ type?: DeviceType; } /** Device type. */ export declare enum DeviceType { /** Not selected. */ NOT_SELECTED_DEVICE_TYPE = "NOT_SELECTED_DEVICE_TYPE", /** Desktop. */ DESKTOP = "DESKTOP", /** Mobile. */ MOBILE = "MOBILE", /** Tablet. */ TABLET = "TABLET", /** All. */ ALL = "ALL" } /** List sessions async response. */ export interface ListSessionsAsyncResponse { /** * List sessions job ID. * Pass this ID to Get List Sessions Job Result to retrieve job details and metadata. */ jobId?: string; } /** Get list sessions job result request. */ export interface GetListSessionsJobResultRequest { /** List sessions job ID. */ jobId: string; /** Number of items to load. */ limit: number; /** Number of items to skip in the current sort order. */ offset: number; } /** Get list sessions job result response. */ export interface GetListSessionsJobResultResponse { /** List sessions job result data. */ result?: JobResult; } /** List sessions job result. */ export interface JobResult { /** Job status. */ jobStatus?: JobStatus; /** Total number of sessions. */ total?: number | null; /** Session IDs. */ sessionIds?: string[]; } /** Job status. */ export declare enum JobStatus { /** Unknown. */ UNKNOWN_JOB_STATUS = "UNKNOWN_JOB_STATUS", /** In progress. */ IN_PROGRESS = "IN_PROGRESS", /** Finished. */ FINISHED = "FINISHED", /** Error. */ ERROR = "ERROR" } /** Request for getting store conversion sessions. */ export interface CountFunnelSessionsRequest extends CountFunnelSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; /** User timezone. If not provided it will be taken from site properties. */ timezone?: string | null; } /** @oneof */ export interface CountFunnelSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; } /** Response for getting store conversion sessions. */ export interface CountFunnelSessionsResponse { /** Recordings. */ recordings?: Recordings; } /** Recordings. */ export interface Recordings { /** Saved Session count. */ siteSessions?: number | null; /** Saved Sessions with Product Views */ productViewSessions?: number | null; /** Saved Sessions with Cart Views */ cartViewSessions?: number | null; /** Saved Sessions with Checkouts */ checkoutSessions?: number | null; /** Saved Converted Sessions */ convertedSessions?: number | null; } /** Request for getting the total number of sessions. */ export interface CountSessionsRequest extends CountSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; /** User timezone. If not provided it will be taken from site properties. */ timezone?: string | null; } /** @oneof */ export interface CountSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; } /** Response for getting the total number of sessions. */ export interface CountSessionsResponse { /** Total number of sessions. */ sessions?: number; } /** Mark a browser session as recorded. */ export interface MarkSessionAsRecordedRequest { /** Browser session ID. */ sessionId: string; } /** Mark a browser session as recorded. */ export interface MarkSessionAsRecordedResponse { } /** Marks browser session recordings as deleted. */ export interface MarkRecordingsAsDeletedRequest { /** Browser session IDs. */ sessionIds: string[]; } /** Marks browser session recordings as deleted. */ export interface MarkRecordingsAsDeletedResponse { } export interface ListSessionsAsyncResponseNonNullableFields { jobId: string; } interface JobResultNonNullableFields { jobStatus: JobStatus; sessionIds: string[]; } export interface GetListSessionsJobResultResponseNonNullableFields { result?: JobResultNonNullableFields; } /** * Start an async job to retrieve a list of session IDs, given the specified filters. The following filters **must** be passed: * - Time period, either predefined or custom. * - Session filter, either navigation flow (page interactions), conversion funnel steps, or device type. * @public * @param options - Filter options. The following filters **must** be passed: * * - Time period, either predefined or custom. * * - Session filter, either navigation flow (page interactions), conversion funnel steps, or device type. * @permissionId ANALYTICS_AND_REPORTS.SESSIONS_READ * @permissionScope Manage Session Recording Analytics - all permissions * @permissionScopeId SCOPE.DC-ANALYTICS-AND-REPORTS.MANAGE-SESSIONS * @applicableIdentity APP * @returns List sessions async response. */ export declare function listSessionsAsync(options?: ListSessionsAsyncOptions): Promise<ListSessionsAsyncResponse & ListSessionsAsyncResponseNonNullableFields>; export interface ListSessionsAsyncOptions extends ListSessionsAsyncRequestPeriodOneOf, ListSessionsAsyncRequestParamsOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriod; /** 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). */ timezone?: string | null; /** Navigation flow details. */ navigationFlow?: NavigationFlowSessionsParams; /** Conversion funnel details. The steps in the journey the visitor has taken on the site. */ conversionFunnel?: ConversionFunnelSessionsParams; /** Device type. */ deviceType?: SessionsByDeviceParams; } /** * Retrieves the job status and a list of session IDs, if ready. * @param jobId - List sessions job ID. * @public * @requiredField jobId * @requiredField options * @requiredField options.limit * @requiredField options.offset * @param options - Field options. The `limit` and `offset` filters **must** be passed. * @permissionId ANALYTICS_AND_REPORTS.SESSIONS_READ * @permissionScope Manage Session Recording Analytics - all permissions * @permissionScopeId SCOPE.DC-ANALYTICS-AND-REPORTS.MANAGE-SESSIONS * @applicableIdentity APP * @returns Get list sessions job result response. */ export declare function getListSessionsJobResult(jobId: string, options: GetListSessionsJobResultOptions): Promise<GetListSessionsJobResultResponse & GetListSessionsJobResultResponseNonNullableFields>; export interface GetListSessionsJobResultOptions { /** Number of items to load. */ limit: number; /** Number of items to skip in the current sort order. */ offset: number; } /** * Marks a browser session as recorded. * @param sessionId - Browser session ID. * @public * @requiredField sessionId * @permissionId ANALYTICS_AND_REPORTS.SESSIONS_UPDATE * @permissionScope Manage Session Recording Analytics - all permissions * @permissionScopeId SCOPE.DC-ANALYTICS-AND-REPORTS.MANAGE-SESSIONS * @applicableIdentity APP * @returns Mark a browser session as recorded. */ export declare function markSessionAsRecorded(sessionId: string): Promise<void>; /** * Marks browser session recordings as deleted. * @param sessionIds - Browser session IDs. * @public * @requiredField sessionIds * @permissionId ANALYTICS_AND_REPORTS.SESSIONS_UPDATE * @permissionScope Manage Session Recording Analytics - all permissions * @permissionScopeId SCOPE.DC-ANALYTICS-AND-REPORTS.MANAGE-SESSIONS * @applicableIdentity APP * @returns Marks browser session recordings as deleted. */ export declare function markRecordingsAsDeleted(sessionIds: string[]): Promise<void>; export {};