feat(kiwi-fe): add getOrchUsage API call and OrchUsage type
This commit is contained in:
parent
99e9cbb8c1
commit
bdfbc963b7
1 changed files with 17 additions and 0 deletions
|
|
@ -807,6 +807,16 @@ export const mealPlanAPI = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========== Orch Usage Types ==========
|
||||||
|
|
||||||
|
export interface OrchUsage {
|
||||||
|
calls_used: number
|
||||||
|
topup_calls: number
|
||||||
|
calls_total: number
|
||||||
|
period_start: string // ISO date YYYY-MM-DD
|
||||||
|
resets_on: string // ISO date YYYY-MM-DD
|
||||||
|
}
|
||||||
|
|
||||||
// ========== Browser Types ==========
|
// ========== Browser Types ==========
|
||||||
|
|
||||||
export interface BrowserDomain {
|
export interface BrowserDomain {
|
||||||
|
|
@ -853,4 +863,11 @@ export const browserAPI = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Orch Usage ────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
export async function getOrchUsage(): Promise<OrchUsage | null> {
|
||||||
|
const resp = await api.get<OrchUsage | null>('/orch-usage')
|
||||||
|
return resp.data
|
||||||
|
}
|
||||||
|
|
||||||
export default api
|
export default api
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue