refactor: initial iterations

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
jamesgeorge007
2024-01-31 11:20:24 +05:30
parent f8ac6dfeb1
commit 29e25b0ead
24 changed files with 2197 additions and 514 deletions

View File

@@ -0,0 +1,42 @@
import { Ref } from "vue"
export type RESTCollectionViewCollection = {
collectionID: string
name: string
}
export type RESTCollectionViewRequest = {
requestID: string
name: string
method: string
}
export type RESTCollectionViewItem =
| { type: "collection"; value: RESTCollectionViewCollection }
| { type: "request"; value: RESTCollectionViewRequest }
export interface RootRESTCollectionView {
providerID: string
workspaceID: string
mayHaveMoreContent: Ref<boolean>
loading: Ref<boolean>
collections: Ref<RESTCollectionViewCollection[]>
loadMore(count: number): Promise<void>
}
export interface RESTCollectionChildrenView {
providerID: string
workspaceID: string
collectionID: string
mayHaveMoreContent: Ref<boolean>
loading: Ref<boolean>
content: Ref<RESTCollectionViewItem[]>
loadMore(count: number): Promise<void>
}