Directus / @directus/sdk / rest / readActivity
Function: readActivity() ​
readActivity<
Schema
,TQuery
>(key
,query
?):RestCommand
<IfAny
<Schema
,Record
<string
,any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, Object, "directus_activity" extends keyof (...) ? (...) extends (...) ? (...) : (...) : Object>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, Object, "directus_activity" extends keyof (...) ? (...) extends (...) ? (...) : (...) : Object>>, FieldsWildcard<UnpackList<IfAny<Schema, Object, (...) 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 a single activity action by primary key.
Type Parameters ​
• Schema
• TQuery extends Query
<Schema
, DirectusActivity
<Schema
>>
Parameters ​
• key: DirectusActivity
<Schema
>["id"
]
The primary key of the activity
• query?: TQuery
The query parameters
Returns ​
RestCommand
<IfAny
<Schema
, Record
<string
, any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, Object, "directus_activity" extends keyof (...) ? (...) extends (...) ? (...) : (...) : Object>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, Object, "directus_activity" extends keyof (...) ? (...) extends (...) ? (...) : (...) : Object>>, FieldsWildcard<UnpackList<IfAny<Schema, Object, (...) 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 an activity object if a valid identifier was provided.
Throws ​
Will throw if key is empty