Directus / @directus/sdk / rest / updatePanel
Function: updatePanel() ​
updatePanel<
Schema
,TQuery
>(key
,item
,query
?):RestCommand
<IfAny
<Schema
,Record
<string
,any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { color: (...) | (...); dashboard: (...) | (...); date_created: (...) | (...); height: number; icon: (...) | (...); id: string; name: (...) | (...); note: (...) | (...); options: (...) | (...); position_x: number; position_y: number; show_header: boolean; type: string; user_created: (...) | (...) | (...); width: number }, "directus_panels" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { color: ...; dashboard: ...; date_created: ...; height: ...; icon: ...; id: ...; name: ...; note: ...; options: ...; position_x: ...; position_y: ...; show_header: ...; type: ...; user_created: ...; width: ... }>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { color: (...) | (...); dashboard: (...) | (...); date_created: (...) | (...); height: number; icon: (...) | (...); id: string; name: (...) | (...); note: (...) | (...); options: (...) | (...); position_x: number; position_y: number; show_header: boolean; type: string; user_created: (...) | (...) | (...); width: number }, "directus_panels" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { color: ...; dashboard: ...; date_created: ...; height: ...; icon: ...; id: ...; name: ...; note: ...; options: ...; position_x: ...; position_y: ...; show_header: ...; type: ...; user_created: ...; width: ... }>>, FieldsWildcard<UnpackList<IfAny<Schema, { color: ...; dashboard: ...; date_created: ...; height: ...; icon: ...; id: ...; name: ...; note: ...; options: ...; position_x: ...; position_y: ...; show_header: ...; type: ...; user_created: ...; width: ... }, (...) 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/panels.ts:64
Update an existing panel.
Type Parameters ​
• Schema
• TQuery extends Query
<Schema
, DirectusPanel
<Schema
>>
Parameters ​
key ​
DirectusPanel
<Schema
>["id"
]
item ​
Partial
<DirectusPanel
<Schema
>>
query? ​
TQuery
Returns ​
RestCommand
<IfAny
<Schema
, Record
<string
, any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { color: (...) | (...); dashboard: (...) | (...); date_created: (...) | (...); height: number; icon: (...) | (...); id: string; name: (...) | (...); note: (...) | (...); options: (...) | (...); position_x: number; position_y: number; show_header: boolean; type: string; user_created: (...) | (...) | (...); width: number }, "directus_panels" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { color: ...; dashboard: ...; date_created: ...; height: ...; icon: ...; id: ...; name: ...; note: ...; options: ...; position_x: ...; position_y: ...; show_header: ...; type: ...; user_created: ...; width: ... }>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { color: (...) | (...); dashboard: (...) | (...); date_created: (...) | (...); height: number; icon: (...) | (...); id: string; name: (...) | (...); note: (...) | (...); options: (...) | (...); position_x: number; position_y: number; show_header: boolean; type: string; user_created: (...) | (...) | (...); width: number }, "directus_panels" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { color: ...; dashboard: ...; date_created: ...; height: ...; icon: ...; id: ...; name: ...; note: ...; options: ...; position_x: ...; position_y: ...; show_header: ...; type: ...; user_created: ...; width: ... }>>, FieldsWildcard<UnpackList<IfAny<Schema, { color: ...; dashboard: ...; date_created: ...; height: ...; icon: ...; id: ...; name: ...; note: ...; options: ...; position_x: ...; position_y: ...; show_header: ...; type: ...; user_created: ...; width: ... }, (...) 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 panel object for the updated panel.
Throws ​
Will throw if key is empty