feat: duplicate REST/GraphQL collections (#4211)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com> Co-authored-by: nivedin <nivedinp@gmail.com>
This commit is contained in:
@@ -20,11 +20,13 @@ import {
|
||||
createGQLUserRequest,
|
||||
deleteUserCollection,
|
||||
deleteUserRequest,
|
||||
duplicateUserCollection,
|
||||
editGQLUserRequest,
|
||||
updateUserCollection,
|
||||
} from "./collections.api"
|
||||
|
||||
import * as E from "fp-ts/Either"
|
||||
import { ReqType } from "../../api/generated/graphql"
|
||||
import { moveOrReorderRequests } from "./collections.sync"
|
||||
|
||||
// gqlCollectionsMapper uses the collectionPath as the local identifier
|
||||
@@ -261,6 +263,11 @@ export const storeSyncDefinition: StoreSyncDefinitionOf<
|
||||
await deleteUserCollection(folderID)
|
||||
}
|
||||
},
|
||||
async duplicateCollection({ collectionSyncID }) {
|
||||
if (collectionSyncID) {
|
||||
await duplicateUserCollection(collectionSyncID, ReqType.Gql)
|
||||
}
|
||||
},
|
||||
editRequest({ path, requestIndex, requestNew }) {
|
||||
const request = navigateToFolderWithIndexPath(
|
||||
graphqlCollectionStore.value.state,
|
||||
|
||||
Reference in New Issue
Block a user