Skip to content
On this page

Directus Cloud

Everything you need to start building. Provisioned in 90 seconds. Starting at $15/month.

Get Started

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 / updateOperationsBatch

Function: updateOperationsBatch() ​

updateOperationsBatch<Schema, TQuery>(items, query?): RestCommand<IfAny<Schema, Record<string, any>, Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, Object, "directus_operations" extends keyof Schema ? UnpackList<...> extends Item ? ... & ... : never : Object>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, Object, "directus_operations" extends keyof Schema ? UnpackList<...> extends Item ? ... & ... : never : Object>>, FieldsWildcard<UnpackList<IfAny<Schema, Object, "directus_operations" extends keyof ... ? ... extends ... ? ... : ... : 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<IfAny<Schema, Object, (...) extends (...) ? (...) : (...)>> ? Extract<UnpackList<(...)>[Field<(...)>], ItemType<Schema>> extends RelatedCollection ? IsNullable<UnpackList<(...)>[Field<(...)>], null | ((...) extends (...) ? (...) : (...)), RelatedCollection extends (...)[] ? (...) extends (...) ? (...) : (...) : ApplyNestedQueryFields<(...), (...), (...)>> : never : never }>>[], Schema>

Update multiple operations as batch.

Type parameters ​

• Schema

• TQuery extends Query<Schema, DirectusOperation<Schema>>

Parameters ​

• items: NestedPartial<DirectusOperation<Schema>>[]

• query?: TQuery

Returns ​

RestCommand<IfAny<Schema, Record<string, any>, Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, Object, "directus_operations" extends keyof Schema ? UnpackList<...> extends Item ? ... & ... : never : Object>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, Object, "directus_operations" extends keyof Schema ? UnpackList<...> extends Item ? ... & ... : never : Object>>, FieldsWildcard<UnpackList<IfAny<Schema, Object, "directus_operations" extends keyof ... ? ... extends ... ? ... : ... : 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<IfAny<Schema, Object, (...) extends (...) ? (...) : (...)>> ? Extract<UnpackList<(...)>[Field<(...)>], ItemType<Schema>> extends RelatedCollection ? IsNullable<UnpackList<(...)>[Field<(...)>], null | ((...) extends (...) ? (...) : (...)), RelatedCollection extends (...)[] ? (...) extends (...) ? (...) : (...) : ApplyNestedQueryFields<(...), (...), (...)>> : never : never }>>[], Schema>

Returns the operation objects for the updated operations.

Source ​

rest/commands/update/operations.ts:44