feat: add price history admin page with fetch button

This commit is contained in:
counterweight 2025-12-22 15:49:41 +01:00
parent 94497f9200
commit c2dd7b5b91
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 372 additions and 1 deletions

View file

@ -204,6 +204,46 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/audit/price-history": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get Price History
* @description Get the 20 most recent price history records.
*/
get: operations["get_price_history_api_audit_price_history_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/audit/price-history/fetch": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Fetch Price Now
* @description Manually trigger a price fetch from Bitfinex.
*/
post: operations["fetch_price_now_api_audit_price_history_fetch_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/profile": {
parameters: {
query?: never;
@ -791,6 +831,30 @@ export interface components {
* @enum {string}
*/
Permission: "view_counter" | "increment_counter" | "use_sum" | "view_audit" | "manage_own_profile" | "manage_invites" | "view_own_invites" | "book_appointment" | "view_own_appointments" | "cancel_own_appointment" | "manage_availability" | "view_all_appointments" | "cancel_any_appointment";
/**
* PriceHistoryResponse
* @description Response model for a price history record.
*/
PriceHistoryResponse: {
/** Id */
id: number;
/** Source */
source: string;
/** Pair */
pair: string;
/** Price */
price: number;
/**
* Timestamp
* Format: date-time
*/
timestamp: string;
/**
* Created At
* Format: date-time
*/
created_at: string;
};
/**
* ProfileResponse
* @description Response model for profile data.
@ -1268,6 +1332,46 @@ export interface operations {
};
};
};
get_price_history_api_audit_price_history_get: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PriceHistoryResponse"][];
};
};
};
};
fetch_price_now_api_audit_price_history_fetch_post: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PriceHistoryResponse"];
};
};
};
};
get_profile_api_profile_get: {
parameters: {
query?: never;