Directus / @directus/sdk / rest / updateFolder
Function: updateFolder() ​
updateFolder<
Schema
,TQuery
>(key
,item
,query
?):RestCommand
<IfAny
<Schema
,Record
<string
,any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { id: string; name: string; parent: (...) | (...) | (...) }, "directus_folders" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { id: ...; name: ...; parent: ... }>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { id: string; name: string; parent: (...) | (...) | (...) }, "directus_folders" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { id: ...; name: ...; parent: ... }>>, FieldsWildcard<UnpackList<IfAny<Schema, { id: ...; name: ...; parent: ... }, (...) extends (...) ? (...) : (...)>>, Exclude<UnpackList<Mutable<(...)>>, PickRelationalFields<(...)> extends never ? never : AllKeys<(...)>>>, 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<(...), (...), (...)>> ? Extract<(...)[(...)], ItemType<(...)>> extends RelatedCollection ? IsNullable<(...)[(...)], (...) | (...), (...) extends (...) ? (...) : (...)> : never : never }>[K] }>,Schema
>
Defined in: rest/commands/update/folders.ts:64
Update an existing folder.
Type Parameters ​
• Schema
• TQuery extends Query
<Schema
, DirectusFolder
<Schema
>>
Parameters ​
key ​
DirectusFolder
<Schema
>["id"
]
item ​
Partial
<DirectusFolder
<Schema
>>
query? ​
TQuery
Returns ​
RestCommand
<IfAny
<Schema
, Record
<string
, any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { id: string; name: string; parent: (...) | (...) | (...) }, "directus_folders" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { id: ...; name: ...; parent: ... }>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { id: string; name: string; parent: (...) | (...) | (...) }, "directus_folders" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { id: ...; name: ...; parent: ... }>>, FieldsWildcard<UnpackList<IfAny<Schema, { id: ...; name: ...; parent: ... }, (...) extends (...) ? (...) : (...)>>, Exclude<UnpackList<Mutable<(...)>>, PickRelationalFields<(...)> extends never ? never : AllKeys<(...)>>>, 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<(...), (...), (...)>> ? Extract<(...)[(...)], ItemType<(...)>> extends RelatedCollection ? IsNullable<(...)[(...)], (...) | (...), (...) extends (...) ? (...) : (...)> : never : never }>[K] }>, Schema
>
Returns the folder object of the folder that was updated.
Throws ​
Will throw if key is empty