@camera.ui/sdk / plugin / NotifierInterface
Interface: NotifierInterface
Defined in: plugin/notifier.ts:97
Implemented by plugins that deliver notifications. The NotificationManager invokes these methods over RPC. Plugins own their device storage, the manager never persists devices itself.
Methods
getDevice()
getDevice(
deviceId):Promise<NotifierDevice|null>
Defined in: plugin/notifier.ts:105
Returns a single device by id, or null if not found.
Parameters
deviceId
string
Returns
Promise<NotifierDevice | null>
getDevices()
getDevices(
ownerUserIds):Promise<NotifierDevice[]>
Defined in: plugin/notifier.ts:103
Returns the devices this notifier knows for the given users, each carrying its ownerUserId. Returns [] when the notifier is unavailable (e.g. invalid license). Called often, keep it cheap.
Parameters
ownerUserIds
string[]
Returns
Promise<NotifierDevice[]>
notificationSettings()?
optionalnotificationSettings():Promise<JsonSchema[] |undefined>
Defined in: plugin/notifier.ts:115
Returns the JSON schema used to render the notifier's settings form in the UI, or undefined for no schema.
Returns
Promise<JsonSchema[] | undefined>
registerDevice()
registerDevice(
ownerUserId,input):Promise<NotifierDevice>
Defined in: plugin/notifier.ts:109
Creates a new device. input is plugin-specific JSON the manager forwards opaquely.
Parameters
ownerUserId
string
input
Record<string, unknown>
Returns
Promise<NotifierDevice>
revokeDevice()
revokeDevice(
deviceId):Promise<void>
Defined in: plugin/notifier.ts:111
Permanently removes a device. Called when the user revokes it through their notifier-specific UI.
Parameters
deviceId
string
Returns
Promise<void>
sendNotification()
sendNotification(
deviceIds,n):Promise<void>
Defined in: plugin/notifier.ts:107
Delivers a notification to the given devices in one call. Errors are logged, a failing notifier never aborts the fan-out.
Parameters
deviceIds
string[]
n
Returns
Promise<void>
updateDevice()
updateDevice(
deviceId,patch):Promise<NotifierDevice|null>
Defined in: plugin/notifier.ts:113
Mutates name / active on an existing device. Returns null if the id isn't ours so the manager can probe the next plugin.
Parameters
deviceId
string
patch
Record<string, unknown>
Returns
Promise<NotifierDevice | null>