Directus / @directus/sdk / rest / updateWebhooks
Function: updateWebhooks() ​
updateWebhooks<
Schema,TQuery>(keys,item,query?):RestCommand<IfAny<Schema,Record<string,any>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { actions: ...; collections: ...; data: ...; headers: ...; id: ...; method: ...; name: ...; status: ...; url: ... }, (...) extends (...) ? (...) : (...)>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { actions: ...; collections: ...; data: ...; headers: ...; id: ...; method: ...; name: ...; status: ...; url: ... }, (...) extends (...) ? (...) : (...)>>, FieldsWildcard<UnpackList<IfAny<(...), (...), (...)>>, Exclude<UnpackList<(...)>, (...) extends (...) ? (...) : (...)>>, FF extends Record<string, string> ? FF<FF> : Record<string, string>> : never, PickRelationalFields<UnpackList<Mutable<(...)[(...)]>>> extends never ? never : { [Field in string | number | symbol]: Field extends keyof UnpackList<(...)> ? Extract<(...), (...)> extends RelatedCollection ? IsNullable<(...), (...), (...)> : never : never }>[K] }>[],Schema>
Defined in: rest/commands/update/webhooks.ts:21
Update multiple existing webhooks.
Type Parameters ​
• Schema
• TQuery extends Query<Schema, DirectusWebhook<Schema>>
Parameters ​
keys ​
DirectusWebhook<Schema>["id"][]
item ​
Partial<DirectusWebhook<Schema>>
query? ​
TQuery
Returns ​
RestCommand<IfAny<Schema, Record<string, any>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { actions: ...; collections: ...; data: ...; headers: ...; id: ...; method: ...; name: ...; status: ...; url: ... }, (...) extends (...) ? (...) : (...)>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { actions: ...; collections: ...; data: ...; headers: ...; id: ...; method: ...; name: ...; status: ...; url: ... }, (...) extends (...) ? (...) : (...)>>, FieldsWildcard<UnpackList<IfAny<(...), (...), (...)>>, Exclude<UnpackList<(...)>, (...) extends (...) ? (...) : (...)>>, FF extends Record<string, string> ? FF<FF> : Record<string, string>> : never, PickRelationalFields<UnpackList<Mutable<(...)[(...)]>>> extends never ? never : { [Field in string | number | symbol]: Field extends keyof UnpackList<(...)> ? Extract<(...), (...)> extends RelatedCollection ? IsNullable<(...), (...), (...)> : never : never }>[K] }>[], Schema>
Returns the webhook objects for the updated webhooks.
Throws ​
Will throw if keys is empty