/** Site analytics data */ export interface SiteAnalyticsData { /** Data ID. */ _id?: string; } /** The request to get analytics data */ export interface GetAnalyticsDataRequest { /** Date range. */ dateRange: DateRange; /** Time zone. */ timeZone?: string | null; /** Measurement types. */ measurementTypes: MeasureNameEnum[]; } /** Date range. */ export interface DateRange { /** * Custom start date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. * If the requested `startDate` is more than 61 days before the current date, a "Do not have data for this start date" error will be returned, as only 62 days of data is stored. */ startDate?: string; /** * Custom end date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Returned data will include all dates until the requested end date. * For example, { start: '2024-01-01', end: '2024-01-03' } will return data for '2024-01-01' and '2024-01-02'. */ endDate?: string; } /** Available measure names */ export declare enum MeasureNameEnum { /** Default value. This value is unused. */ UNKNOWN_MEASUREMENT_TYPE = "UNKNOWN_MEASUREMENT_TYPE", /** Total amount of money expected from all product and service sales, before deducting refunds, shipping, and fees, including both online and manual payments. */ TOTAL_SALES = "TOTAL_SALES", /** Total amount of income from sales after deducting refunds. */ TOTAL_ORDERS = "TOTAL_ORDERS", /** Total amount of site sessions where a visitor clicked to contact you via WhatsApp, phone or email. */ CLICKS_TO_CONTACT = "CLICKS_TO_CONTACT", /** Total amount of visitor sessions. */ TOTAL_SESSIONS = "TOTAL_SESSIONS" } /** The response with analytics data */ export interface GetAnalyticsDataResponse { /** Analytics data per type. */ data?: MeasureItem[]; } /** Measure item */ export interface MeasureItem { /** Measurement type. */ type?: MeasureNameEnum; /** Data values per date. */ values?: MeasureValue[]; /** Total value. */ total?: number; } /** Measure value with period */ export interface MeasureValue { /** Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. */ date?: string; /** Value. */ value?: number; } interface MeasureValueNonNullableFields { date: string; value: number; } interface MeasureItemNonNullableFields { type: MeasureNameEnum; values: MeasureValueNonNullableFields[]; total: number; } export interface GetAnalyticsDataResponseNonNullableFields { data: MeasureItemNonNullableFields[]; } /** * Retrieves analytics data, given the specified filtering. * @param measurementTypes - Measurement types. * @public * @requiredField measurementTypes * @requiredField options.dateRange * @param options - Field options. * @permissionId ANALYTICS_AND_REPORTS.ANALYTICS_PUBLIC_READ * @permissionScope Site Analytics - read permissions * @permissionScopeId SCOPE.DC-ANALYTICS-AND-REPORTS.READ-SITE-ANALYTICS * @applicableIdentity APP * @returns The response with analytics data */ export declare function getAnalyticsData(measurementTypes: MeasureNameEnum[], options?: GetAnalyticsDataOptions): Promise; export interface GetAnalyticsDataOptions { /** Date range. */ dateRange: DateRange; /** Time zone. */ timeZone?: string | null; } export {};