refactor: iterations

This commit is contained in:
jamesgeorge007
2024-02-04 20:34:23 +05:30
parent 29e25b0ead
commit ab7df212c2
11 changed files with 1235 additions and 187 deletions

View File

@@ -3,6 +3,7 @@ import * as E from "fp-ts/Either"
import { HandleRef } from "./handle"
import { Workspace, WorkspaceCollection, WorkspaceDecor } from "./workspace"
import { RESTCollectionChildrenView, RootRESTCollectionView } from "./view"
import { HoppRESTRequest } from "@hoppscotch/data"
export interface WorkspaceProvider {
providerID: string
@@ -30,6 +31,34 @@ export interface WorkspaceProvider {
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
createRESTChildCollection(
parentCollHandle: HandleRef<WorkspaceCollection>,
collectionName: string
collectionName: string,
path: string
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
createRESTRequest(
parentCollHandle: HandleRef<WorkspaceCollection>,
requestName: string,
path: string
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
removeRESTRequest(
parentCollHandle: HandleRef<WorkspaceCollection>,
path: string,
requestIndex: number
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
selectRESTRequest(
parentCollHandle: HandleRef<WorkspaceCollection>,
collPath: string,
requestIndex: string,
request: HoppRESTRequest
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
duplicateRESTRequest(
parentCollHandle: HandleRef<WorkspaceCollection>,
collPath: string,
request: HoppRESTRequest
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
editRESTRequest(
parentCollHandle: HandleRef<WorkspaceCollection>,
collPath: string,
requestIndex: number,
request: HoppRESTRequest
): Promise<E.Either<unknown, HandleRef<WorkspaceCollection>>>
}