Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3514338
D7326.id24720.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7326.id24720.diff
View Options
diff --git a/desktop/flow-typed/@commapp/windowspush_vx.x.x.js b/desktop/flow-typed/@commapp/windowspush_vx.x.x.js
--- a/desktop/flow-typed/@commapp/windowspush_vx.x.x.js
+++ b/desktop/flow-typed/@commapp/windowspush_vx.x.x.js
@@ -1,5 +1,97 @@
// @flow
declare module '@commapp/windowspush' {
- declare module.exports: any;
+ declare export class PushNotificationCreateChannelStatus {
+ +status: PushNotificationChannelStatus;
+ +extendedError: number;
+ +retryCount: number;
+ }
+
+ declare export class PushNotificationsContract {}
+
+ declare export type PushNotificationChannelStatus = {
+ +inProgress: 0,
+ +inProgressRetry: 1,
+ +completedSuccess: 2,
+ +completedFailure: 3,
+ };
+
+ declare export class PushNotificationChannel {
+ +expirationTime: Date;
+ +uri: Object;
+
+ close(): void;
+ }
+
+ declare export class PushNotificationCreateChannelResult {
+ +channel: PushNotificationChannel;
+ +extendedError: number;
+ +status: $Values<PushNotificationChannelStatus>;
+ }
+
+ declare export class PushNotificationManager {
+ static +default: PushNotificationManager;
+
+ static isSupported(): boolean;
+
+ createChannelAsync(
+ remoteId: string,
+ callback: (
+ error: Error,
+ result: PushNotificationCreateChannelResult,
+ ) => void,
+ ): void;
+
+ register(): void;
+
+ unregister(): void;
+
+ unregisterAll(): void;
+
+ addListener(
+ type: 'PushReceived',
+ listener: (
+ manager: PushNotificationManager,
+ args: PushNotificationReceivedEventArgs,
+ ) => void,
+ ): void;
+ removeListener(
+ type: 'PushReceived',
+ listener: (
+ manager: PushNotificationManager,
+ args: PushNotificationReceivedEventArgs,
+ ) => void,
+ ): void;
+ on(
+ type: 'PushReceived',
+ listener: (
+ manager: PushNotificationManager,
+ args: PushNotificationReceivedEventArgs,
+ ) => void,
+ ): void;
+ off(
+ type: 'PushReceived',
+ listener: (
+ manager: PushNotificationManager,
+ args: PushNotificationReceivedEventArgs,
+ ) => void,
+ ): void;
+ }
+
+ declare export class PushNotificationReceivedEventArgs {
+ +payload: Object;
+
+ getDeferral(): Object;
+
+ addListener(
+ type: 'Canceled',
+ listener: (sender: any, reason: any) => void,
+ ): void;
+ removeListener(
+ type: 'Canceled',
+ listener: (sender: any, reason: any) => void,
+ ): void;
+ on(type: 'Canceled', listener: (sender: any, reason: any) => void): void;
+ off(type: 'Canceled', listener: (sender: any, reason: any) => void): void;
+ }
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 4:16 AM (18 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693536
Default Alt Text
D7326.id24720.diff (2 KB)
Attached To
Mode
D7326: [desktop] Type windows notifs module
Attached
Detach File
Event Timeline
Log In to Comment