import { NonNullablePaths } from '@wix/sdk-types'; interface Session { /** * Session ID. * @format GUID */ _id?: string; } /** List sessions async request. */ interface ListSessionsAsyncRequest extends ListSessionsAsyncRequestPeriodOneOf, ListSessionsAsyncRequestParamsOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; /** 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). * @maxLength 100 */ timezone?: string | null; } /** @oneof */ interface ListSessionsAsyncRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; } /** @oneof */ 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. */ interface CustomTimePeriod { /** * Custom period start date in provided timezone. * @format LOCAL_DATE */ 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' * @format LOCAL_DATE */ endDate?: string; } /** * Predefined time period. * `THIS_WEEK`begins with Monday. */ 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" } /** @enumType */ type PredefinedTimePeriodWithLiterals = PredefinedTimePeriod | 'TODAY' | 'YESTERDAY' | 'LAST_7_DAYS' | 'LAST_14_DAYS' | 'LAST_30_DAYS' | 'LAST_90_DAYS' | 'LAST_28_DAYS' | 'LAST_180_DAYS' | 'LAST_365_DAYS' | 'THIS_WEEK' | 'THIS_MONTH' | 'THIS_QUARTER' | 'THIS_YEAR' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_QUARTER' | 'LAST_YEAR' | 'LAST_12_MONTHS'; /** Navigation flow details. */ 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. * @minSize 1 * @maxSize 5 * @maxLength 255 */ pageInteractions?: string[] | null; } /** Conversion funnel details, meaning the steps in the journey the visitor has taken on the site. */ interface ConversionFunnelSessionsParams { /** Funnel step to include. */ include?: FunnelStepWithLiterals; /** Funnel step to exclude. */ exclude?: FunnelStepWithLiterals; } /** Funnel step. */ 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" } /** @enumType */ type FunnelStepWithLiterals = FunnelStep | 'NOT_SELECTED_FUNNEL_STEP' | 'SITE_SESSIONS' | 'VIEWED_PRODUCT' | 'ADDED_TO_CART' | 'REACHED_CHECKOUT' | 'SESSIONS_CONVERTED'; /** Device details. */ interface SessionsByDeviceParams { /** Device type. */ type?: DeviceTypeWithLiterals; } /** Device type. */ 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" } /** @enumType */ type DeviceTypeWithLiterals = DeviceType | 'NOT_SELECTED_DEVICE_TYPE' | 'DESKTOP' | 'MOBILE' | 'TABLET' | 'ALL'; /** List sessions async response. */ interface ListSessionsAsyncResponse { /** * List sessions job ID. * Pass this ID to Get List Sessions Job Result to retrieve job details and metadata. * @format GUID */ jobId?: string; } /** Get list sessions job result request. */ interface GetListSessionsJobResultRequest { /** * List sessions job ID. * @format GUID */ jobId: string; /** * Number of items to load. * @min 1 * @max 1000 */ limit: number; /** Number of items to skip in the current sort order. */ offset: number; } /** Get list sessions job result response. */ interface GetListSessionsJobResultResponse { /** List sessions job result data. */ result?: JobResult; } /** List sessions job result. */ interface JobResult { /** Job status. */ jobStatus?: JobStatusWithLiterals; /** Total number of sessions. */ total?: number | null; /** * Session IDs. * @format GUID * @maxSize 1000 */ sessionIds?: string[]; } /** Job status. */ declare enum JobStatus { /** Unknown. */ UNKNOWN_JOB_STATUS = "UNKNOWN_JOB_STATUS", /** In progress. */ IN_PROGRESS = "IN_PROGRESS", /** Finished. */ FINISHED = "FINISHED", /** Error. */ ERROR = "ERROR" } /** @enumType */ type JobStatusWithLiterals = JobStatus | 'UNKNOWN_JOB_STATUS' | 'IN_PROGRESS' | 'FINISHED' | 'ERROR'; /** Request for getting store conversion sessions. */ interface CountFunnelSessionsRequest extends CountFunnelSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; /** * User timezone. If not provided it will be taken from site properties. * @maxLength 100 */ timezone?: string | null; } /** @oneof */ interface CountFunnelSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; } /** Response for getting store conversion sessions. */ interface CountFunnelSessionsResponse { /** Recordings. */ recordings?: Recordings; } /** Recordings. */ 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. */ interface CountSessionsRequest extends CountSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; /** * User timezone. If not provided it will be taken from site properties. * @maxLength 100 */ timezone?: string | null; } /** @oneof */ interface CountSessionsRequestPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; } /** Response for getting the total number of sessions. */ interface CountSessionsResponse { /** Total number of sessions. */ sessions?: number; } /** Mark a browser session as recorded. */ interface MarkSessionAsRecordedRequest { /** * Browser session ID. * @minLength 1 * @maxLength 100 */ sessionId: string; } /** Mark a browser session as recorded. */ interface MarkSessionAsRecordedResponse { } /** Marks browser session recordings as deleted. */ interface MarkRecordingsAsDeletedRequest { /** * Browser session IDs. * @minSize 1 * @maxSize 100 * @minLength 1 * @maxLength 100 */ sessionIds: string[]; } /** Marks browser session recordings as deleted. */ interface MarkRecordingsAsDeletedResponse { } /** * 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 * @requiredField options.params * @requiredField options.period * @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 * @applicableIdentity APP * @returns List sessions async response. * @fqn wix.analytics_ng.session_ids.v1.SessionIdsService.ListSessionsAsync */ declare function listSessionsAsync(options?: ListSessionsAsyncOptions): Promise>; interface ListSessionsAsyncOptions extends ListSessionsAsyncOptionsPeriodOneOf, ListSessionsAsyncOptionsParamsOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; /** * 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). * @maxLength 100 */ 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; } /** @oneof */ interface ListSessionsAsyncOptionsPeriodOneOf { /** Custom time period with start & end dates. */ customTimePeriod?: CustomTimePeriod; /** Predefined time period. */ predefinedTimePeriod?: PredefinedTimePeriodWithLiterals; } /** @oneof */ interface ListSessionsAsyncOptionsParamsOneOf { /** 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 * @applicableIdentity APP * @returns Get list sessions job result response. * @fqn wix.analytics_ng.session_ids.v1.SessionIdsService.GetListSessionsJobResult */ declare function getListSessionsJobResult(jobId: string, options: NonNullablePaths): Promise>; interface GetListSessionsJobResultOptions { /** * Number of items to load. * @min 1 * @max 1000 */ 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 * @applicableIdentity APP * @returns Mark a browser session as recorded. * @fqn wix.analytics_ng.session_ids.v1.SessionIdsService.MarkSessionAsRecorded */ declare function markSessionAsRecorded(sessionId: string): Promise; /** * Marks browser session recordings as deleted. * @param sessionIds - Browser session IDs. * @public * @requiredField sessionIds * @permissionId ANALYTICS_AND_REPORTS.SESSIONS_UPDATE * @applicableIdentity APP * @returns Marks browser session recordings as deleted. * @fqn wix.analytics_ng.session_ids.v1.SessionIdsService.MarkRecordingsAsDeleted */ declare function markRecordingsAsDeleted(sessionIds: string[]): Promise; export { type ConversionFunnelSessionsParams, type CountFunnelSessionsRequest, type CountFunnelSessionsRequestPeriodOneOf, type CountFunnelSessionsResponse, type CountSessionsRequest, type CountSessionsRequestPeriodOneOf, type CountSessionsResponse, type CustomTimePeriod, DeviceType, type DeviceTypeWithLiterals, FunnelStep, type FunnelStepWithLiterals, type GetListSessionsJobResultOptions, type GetListSessionsJobResultRequest, type GetListSessionsJobResultResponse, type JobResult, JobStatus, type JobStatusWithLiterals, type ListSessionsAsyncOptions, type ListSessionsAsyncOptionsParamsOneOf, type ListSessionsAsyncOptionsPeriodOneOf, type ListSessionsAsyncRequest, type ListSessionsAsyncRequestParamsOneOf, type ListSessionsAsyncRequestPeriodOneOf, type ListSessionsAsyncResponse, type MarkRecordingsAsDeletedRequest, type MarkRecordingsAsDeletedResponse, type MarkSessionAsRecordedRequest, type MarkSessionAsRecordedResponse, type NavigationFlowSessionsParams, PredefinedTimePeriod, type PredefinedTimePeriodWithLiterals, type Recordings, type Session, type SessionsByDeviceParams, getListSessionsJobResult, listSessionsAsync, markRecordingsAsDeleted, markSessionAsRecorded };