fix: typecheck
This commit is contained in:
@@ -96,8 +96,6 @@ export async function getPages(
|
|||||||
startDate: startDate,
|
startDate: startDate,
|
||||||
endDate: endDate,
|
endDate: endDate,
|
||||||
timezone,
|
timezone,
|
||||||
cursor: parsed.data.cursor,
|
|
||||||
limit: Math.min(parsed.data.limit, 50),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,8 +168,6 @@ export function getOverviewGeneric(
|
|||||||
startDate: startDate,
|
startDate: startDate,
|
||||||
endDate: endDate,
|
endDate: endDate,
|
||||||
timezone,
|
timezone,
|
||||||
cursor: parsed.data.cursor,
|
|
||||||
limit: Math.min(parsed.data.limit, 50),
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"lint": "biome check .",
|
"lint": "biome check .",
|
||||||
"lint:fix": "biome check --write .",
|
"lint:fix": "biome check --write .",
|
||||||
"lint:workspace": "pnpm dlx sherif@latest",
|
"lint:workspace": "pnpm dlx sherif@latest",
|
||||||
"typecheck": "pnpm -r typecheck",
|
"typecheck": "pnpm -r --no-bail typecheck",
|
||||||
"update-simple-git-hooks": "npx simple-git-hooks"
|
"update-simple-git-hooks": "npx simple-git-hooks"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ export async function executeAggregateChart(
|
|||||||
endDate: normalized.endDate,
|
endDate: normalized.endDate,
|
||||||
breakdowns: normalized.breakdowns,
|
breakdowns: normalized.breakdowns,
|
||||||
limit: normalized.limit,
|
limit: normalized.limit,
|
||||||
|
metric: normalized.metric,
|
||||||
|
previous: normalized.previous,
|
||||||
timezone,
|
timezone,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -251,6 +253,8 @@ export async function executeAggregateChart(
|
|||||||
endDate: previousPeriod.endDate,
|
endDate: previousPeriod.endDate,
|
||||||
breakdowns: normalized.breakdowns,
|
breakdowns: normalized.breakdowns,
|
||||||
limit: normalized.limit,
|
limit: normalized.limit,
|
||||||
|
metric: normalized.metric,
|
||||||
|
previous: normalized.previous,
|
||||||
timezone,
|
timezone,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { uniq } from 'ramda';
|
|
||||||
import sqlstring from 'sqlstring';
|
import sqlstring from 'sqlstring';
|
||||||
|
|
||||||
import { DateTime, stripLeadingAndTrailingSlashes } from '@openpanel/common';
|
import { DateTime, stripLeadingAndTrailingSlashes } from '@openpanel/common';
|
||||||
@@ -355,23 +354,10 @@ export function getAggregateChartSql({
|
|||||||
endDate,
|
endDate,
|
||||||
projectId,
|
projectId,
|
||||||
limit,
|
limit,
|
||||||
timezone,
|
|
||||||
}: Omit<IGetChartDataInput, 'interval' | 'chartType'> & {
|
}: Omit<IGetChartDataInput, 'interval' | 'chartType'> & {
|
||||||
timezone: string;
|
timezone: string;
|
||||||
}) {
|
}) {
|
||||||
const {
|
const { sb, join, getJoins, with: addCte, getSql } = createSqlBuilder();
|
||||||
sb,
|
|
||||||
join,
|
|
||||||
getWhere,
|
|
||||||
getFrom,
|
|
||||||
getJoins,
|
|
||||||
getSelect,
|
|
||||||
getOrderBy,
|
|
||||||
getGroupBy,
|
|
||||||
getWith,
|
|
||||||
with: addCte,
|
|
||||||
getSql,
|
|
||||||
} = createSqlBuilder();
|
|
||||||
|
|
||||||
sb.where = getEventFiltersWhereClause(event.filters);
|
sb.where = getEventFiltersWhereClause(event.filters);
|
||||||
sb.where.projectId = `project_id = ${sqlstring.escape(projectId)}`;
|
sb.where.projectId = `project_id = ${sqlstring.escape(projectId)}`;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { TABLE_NAMES, ch } from '../clickhouse/client';
|
import { TABLE_NAMES, ch } from '../clickhouse/client';
|
||||||
import { clix } from '../clickhouse/query-builder';
|
import { clix } from '../clickhouse/query-builder';
|
||||||
|
|
||||||
export interface IGetTopPagesInput {
|
export interface IGetPagesInput {
|
||||||
projectId: string;
|
projectId: string;
|
||||||
startDate: string;
|
startDate: string;
|
||||||
endDate: string;
|
endDate: string;
|
||||||
@@ -28,7 +28,7 @@ export class PagesService {
|
|||||||
endDate,
|
endDate,
|
||||||
timezone,
|
timezone,
|
||||||
search,
|
search,
|
||||||
}: IGetTopPagesInput): Promise<ITopPage[]> {
|
}: IGetPagesInput): Promise<ITopPage[]> {
|
||||||
// CTE: Get titles from the last 30 days for faster retrieval
|
// CTE: Get titles from the last 30 days for faster retrieval
|
||||||
const titlesCte = clix(this.client, timezone)
|
const titlesCte = clix(this.client, timezone)
|
||||||
.select([
|
.select([
|
||||||
|
|||||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -1419,7 +1419,7 @@ importers:
|
|||||||
packages/sdks/astro:
|
packages/sdks/astro:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@openpanel/web':
|
'@openpanel/web':
|
||||||
specifier: workspace:1.0.6-local
|
specifier: workspace:1.0.7-local
|
||||||
version: link:../web
|
version: link:../web
|
||||||
devDependencies:
|
devDependencies:
|
||||||
astro:
|
astro:
|
||||||
@@ -1432,7 +1432,7 @@ importers:
|
|||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../common
|
version: link:../../common
|
||||||
'@openpanel/sdk':
|
'@openpanel/sdk':
|
||||||
specifier: workspace:1.0.3-local
|
specifier: workspace:1.0.4-local
|
||||||
version: link:../sdk
|
version: link:../sdk
|
||||||
express:
|
express:
|
||||||
specifier: ^4.17.0 || ^5.0.0
|
specifier: ^4.17.0 || ^5.0.0
|
||||||
@@ -1457,7 +1457,7 @@ importers:
|
|||||||
packages/sdks/nextjs:
|
packages/sdks/nextjs:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@openpanel/web':
|
'@openpanel/web':
|
||||||
specifier: workspace:1.0.6-local
|
specifier: workspace:1.0.7-local
|
||||||
version: link:../web
|
version: link:../web
|
||||||
next:
|
next:
|
||||||
specifier: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0
|
specifier: ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0
|
||||||
@@ -1485,7 +1485,7 @@ importers:
|
|||||||
packages/sdks/nuxt:
|
packages/sdks/nuxt:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@openpanel/web':
|
'@openpanel/web':
|
||||||
specifier: workspace:1.0.6-local
|
specifier: workspace:1.0.7-local
|
||||||
version: link:../web
|
version: link:../web
|
||||||
h3:
|
h3:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.0.0
|
||||||
@@ -1522,7 +1522,7 @@ importers:
|
|||||||
packages/sdks/react-native:
|
packages/sdks/react-native:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@openpanel/sdk':
|
'@openpanel/sdk':
|
||||||
specifier: workspace:1.0.3-local
|
specifier: workspace:1.0.4-local
|
||||||
version: link:../sdk
|
version: link:../sdk
|
||||||
expo-application:
|
expo-application:
|
||||||
specifier: 5 - 6
|
specifier: 5 - 6
|
||||||
@@ -1568,7 +1568,7 @@ importers:
|
|||||||
packages/sdks/web:
|
packages/sdks/web:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@openpanel/sdk':
|
'@openpanel/sdk':
|
||||||
specifier: workspace:1.0.3-local
|
specifier: workspace:1.0.4-local
|
||||||
version: link:../sdk
|
version: link:../sdk
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@openpanel/tsconfig':
|
'@openpanel/tsconfig':
|
||||||
|
|||||||
Reference in New Issue
Block a user