Skip to content

basalt / drives/src / watchConnection

Function: watchConnection() ​

> watchConnection(drives, connectionId, input): Promise<DriveWatch>

Defined in: drives/src/notifications.ts:342

Subscribes a connection to provider push notifications and persists the subscription (including the secret the provider will echo back).

The secret is generated here, never by the adapter: it is what authenticates every later notification, and a per-subscription random value from one place is the difference between "a caller needs 32 bytes of entropy" and "a caller needs to guess whatever this adapter happened to use".

Parameters ​

drives ​

Drives

connectionId ​

string

input ​

notificationUrl ​

string

tenantId? ​

string

ttlMs? ​

number

Returns ​

Promise<DriveWatch>

Released under the MIT License.