Skip to content
On this page

This is an auto-generated document to support extension builders understand the internal packages they can utilize. To find our written guides, tutorials, and API/SDK reference, check out our main docs .

Directus / @directus/sdk / rest / updateFoldersBatch

Function: updateFoldersBatch()

updateFoldersBatch<Schema, TQuery>(items, query?): RestCommand<IfAny<Schema, Record<string, any>, Merge<MappedFunctionFields<Schema, UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>>> extends FF ? MapFlatFields<UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>>, FieldsWildcard<UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>>, Exclude<UnpackList<Mutable<...[...]>>, PickRelationalFields<UnpackList<...>> extends never ? never : AllKeys<... extends ... ? ... : ...>>>, FF extends Record<string, string> ? FF<FF> : Record<string, string>> : never, PickRelationalFields<UnpackList<Mutable<TQuery["fields"]>>> extends never ? never : { [Field in string | number | symbol]: Field extends keyof UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>> ? Extract<UnpackList<(...)>[Field<(...)>], ItemType<Schema>> extends RelatedCollection ? IsNullable<UnpackList<(...)>[Field<(...)>], null | ((...) extends (...) ? (...) : (...)), RelatedCollection extends (...)[] ? (...) extends (...) ? (...) : (...) : ApplyNestedQueryFields<(...), (...), (...)>> : never : never }>>[], Schema>

Update multiple folders as batch.

Type parameters

Schema

TQuery extends Query<Schema, DirectusFolder<Schema>>

Parameters

items: NestedPartial<DirectusFolder<Schema>>[]

query?: TQuery

Returns

RestCommand<IfAny<Schema, Record<string, any>, Merge<MappedFunctionFields<Schema, UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>>> extends FF ? MapFlatFields<UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>>, FieldsWildcard<UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>>, Exclude<UnpackList<Mutable<...[...]>>, PickRelationalFields<UnpackList<...>> extends never ? never : AllKeys<... extends ... ? ... : ...>>>, FF extends Record<string, string> ? FF<FF> : Record<string, string>> : never, PickRelationalFields<UnpackList<Mutable<TQuery["fields"]>>> extends never ? never : { [Field in string | number | symbol]: Field extends keyof UnpackList<MergeCoreCollection<Schema, "directus_folders", Object>> ? Extract<UnpackList<(...)>[Field<(...)>], ItemType<Schema>> extends RelatedCollection ? IsNullable<UnpackList<(...)>[Field<(...)>], null | ((...) extends (...) ? (...) : (...)), RelatedCollection extends (...)[] ? (...) extends (...) ? (...) : (...) : ApplyNestedQueryFields<(...), (...), (...)>> : never : never }>>[], Schema>

Returns the folder objects of the folders that were updated.

Source

rest/commands/update/folders.ts:44