Directus / @directus/sdk / rest / updateShares
Function: updateShares() ​
updateShares<
Schema
,TQuery
>(keys
,item
,query
?):RestCommand
<IfAny
<Schema
,Record
<string
,any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { collection: ...; date_created: ...; date_end: ...; date_start: ...; id: ...; item: ...; max_uses: ...; name: ...; password: ...; role: ...; times_used: ...; user_created: ... }, (...) extends (...) ? (...) : (...)>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { collection: ...; date_created: ...; date_end: ...; date_start: ...; id: ...; item: ...; max_uses: ...; name: ...; password: ...; role: ...; times_used: ...; user_created: ... }, (...) 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/shares.ts:21
Update multiple existing shares.
Type Parameters ​
• Schema
• TQuery extends Query
<Schema
, DirectusShare
<Schema
>>
Parameters ​
keys ​
DirectusShare
<Schema
>["id"
][]
item ​
Partial
<DirectusShare
<Schema
>>
query? ​
TQuery
Returns ​
RestCommand
<IfAny
<Schema
, Record
<string
, any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { collection: ...; date_created: ...; date_end: ...; date_start: ...; id: ...; item: ...; max_uses: ...; name: ...; password: ...; role: ...; times_used: ...; user_created: ... }, (...) extends (...) ? (...) : (...)>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { collection: ...; date_created: ...; date_end: ...; date_start: ...; id: ...; item: ...; max_uses: ...; name: ...; password: ...; role: ...; times_used: ...; user_created: ... }, (...) 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 share objects for the updated shares.
Throws ​
Will throw if keys is empty