Skip to content

Commit 0544978

Browse files
committed
✨ Regenerate frontend client for analytics endpoints
1 parent a733520 commit 0544978

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

frontend/src/client/sdk.gen.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import type { CancelablePromise } from "./core/CancelablePromise"
44
import { OpenAPI } from "./core/OpenAPI"
55
import { request as __request } from "./core/request"
66
import type {
7+
AnalyticsGetUserSummaryResponse,
8+
AnalyticsGetItemTrendsResponse,
79
ItemsReadItemsData,
810
ItemsReadItemsResponse,
911
ItemsCreateItemData,
@@ -48,6 +50,32 @@ import type {
4850
UtilsHealthCheckResponse,
4951
} from "./types.gen"
5052

53+
export class AnalyticsService {
54+
/**
55+
* Get User Summary
56+
* @returns UserAnalyticsSummary Successful Response
57+
* @throws ApiError
58+
*/
59+
public static getUserSummary(): CancelablePromise<AnalyticsGetUserSummaryResponse> {
60+
return __request(OpenAPI, {
61+
method: "GET",
62+
url: "/api/v1/analytics/user-summary",
63+
})
64+
}
65+
66+
/**
67+
* Get Item Trends
68+
* @returns ItemAnalyticsTrends Successful Response
69+
* @throws ApiError
70+
*/
71+
public static getItemTrends(): CancelablePromise<AnalyticsGetItemTrendsResponse> {
72+
return __request(OpenAPI, {
73+
method: "GET",
74+
url: "/api/v1/analytics/item-trends",
75+
})
76+
}
77+
}
78+
5179
export class ItemsService {
5280
/**
5381
* Read Items

frontend/src/client/types.gen.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,21 @@ export type HTTPValidationError = {
1313
detail?: Array<ValidationError>
1414
}
1515

16+
export type ItemAnalyticsTrends = {
17+
total_items: number
18+
creation_trends: Array<ItemCreationTrend>
19+
}
20+
1621
export type ItemCreate = {
1722
title: string
1823
description?: string | null
1924
}
2025

26+
export type ItemCreationTrend = {
27+
creation_date: string
28+
count: number
29+
}
30+
2131
export type ItemPublic = {
2232
title: string
2333
description?: string | null
@@ -61,6 +71,17 @@ export type UpdatePassword = {
6171
new_password: string
6272
}
6373

74+
export type UserActivity = {
75+
active_users: number
76+
inactive_users: number
77+
}
78+
79+
export type UserAnalyticsSummary = {
80+
total_users: number
81+
signup_trends: Array<UserSignupTrend>
82+
activity_summary: UserActivity
83+
}
84+
6485
export type UserCreate = {
6586
email: string
6687
is_active?: boolean
@@ -83,6 +104,11 @@ export type UserRegister = {
83104
full_name?: string | null
84105
}
85106

107+
export type UserSignupTrend = {
108+
signup_date: string
109+
count: number
110+
}
111+
86112
export type UsersPublic = {
87113
data: Array<UserPublic>
88114
count: number
@@ -107,6 +133,10 @@ export type ValidationError = {
107133
type: string
108134
}
109135

136+
export type AnalyticsGetUserSummaryResponse = UserAnalyticsSummary
137+
138+
export type AnalyticsGetItemTrendsResponse = ItemAnalyticsTrends
139+
110140
export type ItemsReadItemsData = {
111141
limit?: number
112142
skip?: number

0 commit comments

Comments
 (0)