31 lines
1,009 B
TypeScript
31 lines
1,009 B
TypeScript
|
interface CreatePushNotificationsSubscriptionParams {
|
||
|
subscription: {
|
||
|
/** String. The endpoint URL that is called when a notification event occurs. */
|
||
|
endpoint: string;
|
||
|
keys?: {
|
||
|
/** String. User agent public key. Base64 encoded string of a public key from a ECDH keypair using the prime256v1 curve. */
|
||
|
p256dh: string;
|
||
|
/** String. Auth secret. Base64 encoded string of 16 bytes of random data. */
|
||
|
auth: string;
|
||
|
};
|
||
|
};
|
||
|
data?: {
|
||
|
alerts?: Record<string, boolean>;
|
||
|
/** String. Specify whether to receive push notifications from `all`, `followed`, `follower`, or `none` users. */
|
||
|
policy?: string;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
interface UpdatePushNotificationsSubscriptionParams {
|
||
|
data?: {
|
||
|
alerts?: Record<string, boolean>;
|
||
|
};
|
||
|
/** String. Specify whether to receive push notifications from `all`, `followed`, `follower`, or `none` users. */
|
||
|
policy?: string;
|
||
|
}
|
||
|
|
||
|
export type {
|
||
|
CreatePushNotificationsSubscriptionParams,
|
||
|
UpdatePushNotificationsSubscriptionParams,
|
||
|
};
|