Directus / @directus/sdk / rest / readNotification
Function: readNotification() ​
readNotification<
Schema
,TQuery
>(key
,query
?):RestCommand
<IfAny
<Schema
,Record
<string
,any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { collection: (...) | (...); id: string; item: (...) | (...); message: (...) | (...); recipient: (...) | (...); sender: (...) | (...) | (...); status: (...) | (...); subject: string; timestamp: (...) | (...) }, "directus_notifications" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { collection: ...; id: ...; item: ...; message: ...; recipient: ...; sender: ...; status: ...; subject: ...; timestamp: ... }>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { collection: (...) | (...); id: string; item: (...) | (...); message: (...) | (...); recipient: (...) | (...); sender: (...) | (...) | (...); status: (...) | (...); subject: string; timestamp: (...) | (...) }, "directus_notifications" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { collection: ...; id: ...; item: ...; message: ...; recipient: ...; sender: ...; status: ...; subject: ...; timestamp: ... }>>, FieldsWildcard<UnpackList<IfAny<Schema, { collection: ...; id: ...; item: ...; message: ...; recipient: ...; sender: ...; status: ...; subject: ...; timestamp: ... }, (...) 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/read/notifications.ts:35
List an existing notification by primary key.
Type Parameters ​
• Schema
• TQuery extends Query
<Schema
, DirectusNotification
<Schema
>>
Parameters ​
key ​
DirectusNotification
<Schema
>["id"
]
The primary key of the dashboard
query? ​
TQuery
The query parameters
Returns ​
RestCommand
<IfAny
<Schema
, Record
<string
, any
>, { [K in string | number | symbol]: Merge<MappedFunctionFields<Schema, UnpackList<IfAny<Schema, { collection: (...) | (...); id: string; item: (...) | (...); message: (...) | (...); recipient: (...) | (...); sender: (...) | (...) | (...); status: (...) | (...); subject: string; timestamp: (...) | (...) }, "directus_notifications" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { collection: ...; id: ...; item: ...; message: ...; recipient: ...; sender: ...; status: ...; subject: ...; timestamp: ... }>>> extends FF ? MapFlatFields<UnpackList<IfAny<Schema, { collection: (...) | (...); id: string; item: (...) | (...); message: (...) | (...); recipient: (...) | (...); sender: (...) | (...) | (...); status: (...) | (...); subject: string; timestamp: (...) | (...) }, "directus_notifications" extends keyof (...) ? (...) extends (...) ? (...) : (...) : { collection: ...; id: ...; item: ...; message: ...; recipient: ...; sender: ...; status: ...; subject: ...; timestamp: ... }>>, FieldsWildcard<UnpackList<IfAny<Schema, { collection: ...; id: ...; item: ...; message: ...; recipient: ...; sender: ...; status: ...; subject: ...; timestamp: ... }, (...) 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 requested notification object.
Throws ​
Will throw if key is empty