feat: collection level headers and authorization (#3505)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
@@ -65,24 +65,29 @@ import {
|
||||
GetGqlRootUserCollectionsQueryVariables,
|
||||
GetGqlRootUserCollectionsDocument,
|
||||
ReqType,
|
||||
UpdateUserCollectionMutation,
|
||||
UpdateUserCollectionMutationVariables,
|
||||
UpdateUserCollectionDocument,
|
||||
} from "../../api/generated/graphql"
|
||||
|
||||
export const createRESTRootUserCollection = (title: string) =>
|
||||
export const createRESTRootUserCollection = (title: string, data?: string) =>
|
||||
runMutation<
|
||||
CreateRestRootUserCollectionMutation,
|
||||
CreateRestRootUserCollectionMutationVariables,
|
||||
""
|
||||
>(CreateRestRootUserCollectionDocument, {
|
||||
title,
|
||||
data,
|
||||
})()
|
||||
|
||||
export const createGQLRootUserCollection = (title: string) =>
|
||||
export const createGQLRootUserCollection = (title: string, data?: string) =>
|
||||
runMutation<
|
||||
CreateGqlRootUserCollectionMutation,
|
||||
CreateGqlRootUserCollectionMutationVariables,
|
||||
""
|
||||
>(CreateGqlRootUserCollectionDocument, {
|
||||
title,
|
||||
data,
|
||||
})()
|
||||
|
||||
export const createRESTUserRequest = (
|
||||
@@ -117,7 +122,8 @@ export const createGQLUserRequest = (
|
||||
|
||||
export const createRESTChildUserCollection = (
|
||||
title: string,
|
||||
parentUserCollectionID: string
|
||||
parentUserCollectionID: string,
|
||||
data?: string
|
||||
) =>
|
||||
runMutation<
|
||||
CreateRestChildUserCollectionMutation,
|
||||
@@ -126,11 +132,13 @@ export const createRESTChildUserCollection = (
|
||||
>(CreateRestChildUserCollectionDocument, {
|
||||
title,
|
||||
parentUserCollectionID,
|
||||
data,
|
||||
})()
|
||||
|
||||
export const createGQLChildUserCollection = (
|
||||
title: string,
|
||||
parentUserCollectionID: string
|
||||
parentUserCollectionID: string,
|
||||
data?: string
|
||||
) =>
|
||||
runMutation<
|
||||
CreateGqlChildUserCollectionMutation,
|
||||
@@ -139,6 +147,7 @@ export const createGQLChildUserCollection = (
|
||||
>(CreateGqlChildUserCollectionDocument, {
|
||||
title,
|
||||
parentUserCollectionID,
|
||||
data,
|
||||
})()
|
||||
|
||||
export const deleteUserCollection = (userCollectionID: string) =>
|
||||
@@ -160,6 +169,17 @@ export const renameUserCollection = (
|
||||
""
|
||||
>(RenameUserCollectionDocument, { userCollectionID, newTitle })()
|
||||
|
||||
export const updateUserCollection = (
|
||||
userCollectionID: string,
|
||||
newTitle?: string,
|
||||
data?: string
|
||||
) =>
|
||||
runMutation<
|
||||
UpdateUserCollectionMutation,
|
||||
UpdateUserCollectionMutationVariables,
|
||||
""
|
||||
>(UpdateUserCollectionDocument, { userCollectionID, newTitle, data })()
|
||||
|
||||
export const moveUserCollection = (
|
||||
sourceCollectionID: string,
|
||||
destinationCollectionID?: string
|
||||
|
||||
Reference in New Issue
Block a user