Class: NotificationEndpoint ​
Defined in: endpoints/notification.ts:37
Constructors ​
Constructor ​
ts
new NotificationEndpoint(client): NotificationEndpoint;Defined in: endpoints/notification.ts:38
Parameters ​
| Parameter | Type |
|---|---|
client | RESTClient |
Returns ​
NotificationEndpoint
Methods ​
getDevices() ​
ts
getDevices(): Promise<IPushDevicesResponse>;Defined in: endpoints/notification.ts:45
Returns ​
Promise<IPushDevicesResponse>
getMentions() ​
ts
getMentions(options?): Promise<IMentionFeedResponse>;Defined in: endpoints/notification.ts:97
Recent messages that mention the current user, newest first, in channels they can still see. Pass the last one's message id as before for more.
Parameters ​
| Parameter | Type |
|---|---|
options? | { before?: number; limit?: number; } |
options.before? | number |
options.limit? | number |
Returns ​
Promise<IMentionFeedResponse>
getSettings() ​
ts
getSettings(): Promise<INotificationSettingsResponse>;Defined in: endpoints/notification.ts:82
every server and channel notification setting away from its default
Returns ​
Promise<INotificationSettingsResponse>
registerDevice() ​
ts
registerDevice(registration): Promise<IPushDeviceResponse>;Defined in: endpoints/notification.ts:41
Register this installation, replacing its previous token or account binding.
Parameters ​
| Parameter | Type |
|---|---|
registration | IPushDeviceRegistration |
Returns ​
Promise<IPushDeviceResponse>
signOutDevice() ​
ts
signOutDevice(deviceId): Promise<IApiResponse>;Defined in: endpoints/notification.ts:73
Sign out the phone's whole sign-in, as for a lost phone. It stops getting pushes at once.
Parameters ​
| Parameter | Type |
|---|---|
deviceId | string |
Returns ​
Promise<IApiResponse>
testDevice() ​
ts
testDevice(deviceId): Promise<IPushDeviceTestResponse>;Defined in: endpoints/notification.ts:64
Send the device a test notification through the relay.
Parameters ​
| Parameter | Type |
|---|---|
deviceId | string |
Returns ​
Promise<IPushDeviceTestResponse>
unregisterDevice() ​
ts
unregisterDevice(deviceId): Promise<IApiResponse>;Defined in: endpoints/notification.ts:50
Idempotent and scoped to the authenticated owner. A phone still signed in registers again when it is next opened.
Parameters ​
| Parameter | Type |
|---|---|
deviceId | string |
Returns ​
Promise<IApiResponse>
updateChannelSetting() ​
ts
updateChannelSetting(channelId, changes): Promise<IChannelNotificationSettingResponse>;Defined in: endpoints/notification.ts:105
Parameters ​
| Parameter | Type |
|---|---|
channelId | number |
changes | IChannelNotificationUpdate |
Returns ​
Promise<IChannelNotificationSettingResponse>
updateDevice() ​
ts
updateDevice(deviceId, changes): Promise<IPushDeviceResponse>;Defined in: endpoints/notification.ts:57
Switch a device's pushes off or on. Off survives the phone registering again.
Parameters ​
| Parameter | Type |
|---|---|
deviceId | string |
changes | IPushDeviceUpdate |
Returns ​
Promise<IPushDeviceResponse>
updateServerSetting() ​
ts
updateServerSetting(serverId, changes): Promise<IServerNotificationSettingResponse>;Defined in: endpoints/notification.ts:86
Parameters ​
| Parameter | Type |
|---|---|
serverId | number |
changes | IServerNotificationUpdate |
Returns ​
Promise<IServerNotificationSettingResponse>