constructor(context: PapierApiContext);Parameters
contextPapierApiContext
packages/client/src/delivery/devices.ts:18
Server-side management of browser push devices registered through `@usepapier/browser`. Requires a secret API key; never call it from a browser.
import { PushDevices } from '@usepapier/client/base';export class PushDevices {
constructor(context: PapierApiContext);
issueUserToken(options: {
userId: string;
ttlSeconds?: number;
}): Promise<{ token: string; expiresInSeconds: number; }>;
list(options?: {
userId?: string;
limit?: number;
}): Promise<PushDevice[]>;
remove(id: string): Promise<void>;
}Source: packages/client/src/delivery/devices.ts:17
constructor(context: PapierApiContext);contextPapierApiContextpackages/client/src/delivery/devices.ts:18
Mints a short-lived token for one signed-in user. Hand it to that user's browser and pass it to `push.subscribe({ userToken })`; only then is the device tied to `userId`.
issueUserToken(options: {
userId: string;
ttlSeconds?: number;
}): Promise<{ token: string; expiresInSeconds: number; }>;options{ userId: string; ttlSeconds?: number }packages/client/src/delivery/devices.ts:28
list(options?: {
userId?: string;
limit?: number;
}): Promise<PushDevice[]>;optionsOptional{ userId?: string; limit?: number }packages/client/src/delivery/devices.ts:41
remove(id: string): Promise<void>;idstringpackages/client/src/delivery/devices.ts:54
b1e9ee529902