mirror of
https://github.com/langgenius/dify.git
synced 2026-07-21 20:15:31 -04:00
473c945839
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
20 lines
606 B
TypeScript
20 lines
606 B
TypeScript
import type { CurrentPlanInfoBackend, SubscriptionUrlsBackend } from '@/app/components/billing/type'
|
|
import { get } from './base'
|
|
|
|
export type CurrentPlanVectorSpaceBackend = {
|
|
size: number
|
|
limit: number
|
|
}
|
|
|
|
export const fetchCurrentPlanInfo = () => {
|
|
return get<CurrentPlanInfoBackend>('/features')
|
|
}
|
|
|
|
export const fetchCurrentPlanVectorSpace = () => {
|
|
return get<CurrentPlanVectorSpaceBackend>('/features/vector-space')
|
|
}
|
|
|
|
export const fetchSubscriptionUrls = (plan: string, interval: string) => {
|
|
return get<SubscriptionUrlsBackend>(`/billing/subscription?plan=${plan}&interval=${interval}`)
|
|
}
|