archastro.platform.types.notifications
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 7228878a4902 4 5from datetime import datetime 6from typing import Any 7 8from pydantic import BaseModel, Field 9 10 11class Notification(BaseModel): 12 """ 13 An inbox notification delivered to a recipient user. Includes type-specific render data resolved at request time. 14 """ 15 16 archived_at: datetime | None = Field( 17 default=None, 18 description="When the recipient archived this notification. `null` if the notification has not been archived.", 19 ) 20 created_at: datetime = Field(..., description="When the notification was sent (ISO 8601).") 21 id: str = Field(..., description="Notification ID (`ntf_...`).") 22 read_at: datetime | None = Field( 23 default=None, 24 description="When the recipient marked this notification read. `null` if the notification has not been read.", 25 ) 26 rendered: dict[str, Any] = Field( 27 ..., 28 description='Type-specific render spec resolved at request time. All types include `title`, `kind`, and `actions`; custom types may add their own keys. Notifications whose type is no longer registered render with `kind: "unknown"`.', 29 ) 30 status: str = Field( 31 ..., 32 description='Current read state of the notification. One of `"unread"`, `"read"`, or `"archived"`.', 33 ) 34 type: str = Field( 35 ..., 36 description='Notification type slug, e.g. `"app_info"` for a built-in type or `"custom:deploy_complete"` for a custom type.', 37 ) 38 39 40class NotificationPreference(BaseModel): 41 """ 42 A single per-channel notification preference for the authenticated viewer, scoped to a notification type and optional app. 43 """ 44 45 app_id: str | None = Field( 46 default=None, 47 description="App this preference is scoped to (`app_...`). `null` indicates a system-level (no-app) slot that applies across all apps.", 48 ) 49 channel: str = Field( 50 ..., 51 description='Delivery channel for this preference, e.g. `"email"`. The `in_app` channel is always active and never has a preference row.', 52 ) 53 created_at: datetime | None = Field( 54 default=None, description="When this preference record was created (ISO 8601)." 55 ) 56 enabled: bool = Field( 57 ..., 58 description="Whether delivery over this channel is enabled for the given type-and-app combination. `false` suppresses delivery even when the notification is triggered.", 59 ) 60 id: str = Field(..., description="Preference record ID (`ntfp_...`).") 61 type: str = Field( 62 ..., 63 description='Notification type in wire-format. Built-in types use their atom name, e.g. `"app_info"` or `"billing_alert"`. Custom notification types use the form `"custom:<lookup_key>"`.', 64 ) 65 updated_at: datetime | None = Field( 66 default=None, description="When this preference record was last modified (ISO 8601)." 67 ) 68 69 70class NotificationPreferenceList(BaseModel): 71 """ 72 The complete set of notification preferences belonging to the authenticated viewer. 73 """ 74 75 data: list[NotificationPreference] = Field( 76 ..., 77 description="Array of notification preference objects for the authenticated viewer. Each entry corresponds to a distinct type-and-channel combination.", 78 )
12class Notification(BaseModel): 13 """ 14 An inbox notification delivered to a recipient user. Includes type-specific render data resolved at request time. 15 """ 16 17 archived_at: datetime | None = Field( 18 default=None, 19 description="When the recipient archived this notification. `null` if the notification has not been archived.", 20 ) 21 created_at: datetime = Field(..., description="When the notification was sent (ISO 8601).") 22 id: str = Field(..., description="Notification ID (`ntf_...`).") 23 read_at: datetime | None = Field( 24 default=None, 25 description="When the recipient marked this notification read. `null` if the notification has not been read.", 26 ) 27 rendered: dict[str, Any] = Field( 28 ..., 29 description='Type-specific render spec resolved at request time. All types include `title`, `kind`, and `actions`; custom types may add their own keys. Notifications whose type is no longer registered render with `kind: "unknown"`.', 30 ) 31 status: str = Field( 32 ..., 33 description='Current read state of the notification. One of `"unread"`, `"read"`, or `"archived"`.', 34 ) 35 type: str = Field( 36 ..., 37 description='Notification type slug, e.g. `"app_info"` for a built-in type or `"custom:deploy_complete"` for a custom type.', 38 )
An inbox notification delivered to a recipient user. Includes type-specific render data resolved at request time.
When the recipient archived this notification. null if the notification has not been archived.
When the recipient marked this notification read. null if the notification has not been read.
Type-specific render spec resolved at request time. All types include title, kind, and actions; custom types may add their own keys. Notifications whose type is no longer registered render with kind: "unknown".
41class NotificationPreference(BaseModel): 42 """ 43 A single per-channel notification preference for the authenticated viewer, scoped to a notification type and optional app. 44 """ 45 46 app_id: str | None = Field( 47 default=None, 48 description="App this preference is scoped to (`app_...`). `null` indicates a system-level (no-app) slot that applies across all apps.", 49 ) 50 channel: str = Field( 51 ..., 52 description='Delivery channel for this preference, e.g. `"email"`. The `in_app` channel is always active and never has a preference row.', 53 ) 54 created_at: datetime | None = Field( 55 default=None, description="When this preference record was created (ISO 8601)." 56 ) 57 enabled: bool = Field( 58 ..., 59 description="Whether delivery over this channel is enabled for the given type-and-app combination. `false` suppresses delivery even when the notification is triggered.", 60 ) 61 id: str = Field(..., description="Preference record ID (`ntfp_...`).") 62 type: str = Field( 63 ..., 64 description='Notification type in wire-format. Built-in types use their atom name, e.g. `"app_info"` or `"billing_alert"`. Custom notification types use the form `"custom:<lookup_key>"`.', 65 ) 66 updated_at: datetime | None = Field( 67 default=None, description="When this preference record was last modified (ISO 8601)." 68 )
A single per-channel notification preference for the authenticated viewer, scoped to a notification type and optional app.
App this preference is scoped to (app_...). null indicates a system-level (no-app) slot that applies across all apps.
Delivery channel for this preference, e.g. "email". The in_app channel is always active and never has a preference row.
Whether delivery over this channel is enabled for the given type-and-app combination. false suppresses delivery even when the notification is triggered.
71class NotificationPreferenceList(BaseModel): 72 """ 73 The complete set of notification preferences belonging to the authenticated viewer. 74 """ 75 76 data: list[NotificationPreference] = Field( 77 ..., 78 description="Array of notification preference objects for the authenticated viewer. Each entry corresponds to a distinct type-and-channel combination.", 79 )
The complete set of notification preferences belonging to the authenticated viewer.