type Query {
    collections(options: CollectionListOptions): CollectionList!
    "Get a Collection either by id or slug. If neither id nor slug is specified, an error will result."
    collection(id: ID, slug: String): Collection
    collectionFilters: [ConfigurableOperationDefinition!]!
    "Used for real-time previews of the contents of a Collection"
    previewCollectionVariants(input: PreviewCollectionVariantsInput!, options: ProductVariantListOptions): ProductVariantList!
}

type Mutation {
    "Create a new Collection"
    createCollection(input: CreateCollectionInput!): Collection!

    "Update an existing Collection"
    updateCollection(input: UpdateCollectionInput!): Collection!

    "Delete a Collection and all of its descendants"
    deleteCollection(id: ID!): DeletionResponse!

    "Delete multiple Collections and all of their descendants"
    deleteCollections(ids: [ID!]!): [DeletionResponse!]!

    "Move a Collection to a different parent or index"
    moveCollection(input: MoveCollectionInput!): Collection!

    "Assigns Collections to the specified Channel"
    assignCollectionsToChannel(input: AssignCollectionsToChannelInput!): [Collection!]!

    "Removes Collections from the specified Channel"
    removeCollectionsFromChannel(input: RemoveCollectionsFromChannelInput!): [Collection!]!
}

# generated by generateListOptions function
input CollectionListOptions

input MoveCollectionInput {
    collectionId: ID!
    parentId: ID!
    index: Int!
}

input CreateCollectionTranslationInput {
    languageCode: LanguageCode!
    name: String!
    slug: String!
    description: String!
}

input UpdateCollectionTranslationInput {
    id: ID
    languageCode: LanguageCode!
    name: String
    slug: String
    description: String
}

input CreateCollectionInput {
    isPrivate: Boolean
    featuredAssetId: ID
    assetIds: [ID!]
    parentId: ID
    inheritFilters: Boolean
    filters: [ConfigurableOperationInput!]!
    translations: [CreateCollectionTranslationInput!]!
}

input PreviewCollectionVariantsInput {
    parentId: ID
    inheritFilters: Boolean!
    filters: [ConfigurableOperationInput!]!
}

input UpdateCollectionInput {
    id: ID!
    isPrivate: Boolean
    featuredAssetId: ID
    parentId: ID
    assetIds: [ID!]
    inheritFilters: Boolean
    filters: [ConfigurableOperationInput!]
    translations: [UpdateCollectionTranslationInput!]
}

input AssignCollectionsToChannelInput {
    collectionIds: [ID!]!
    channelId: ID!
}

input RemoveCollectionsFromChannelInput {
    collectionIds: [ID!]!
    channelId: ID!
}
