refactor: initial iterations
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
@@ -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>
|
||||
}
|
||||
Reference in New Issue
Block a user