Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33307221
D7326.1768797187.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D7326.1768797187.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,100 @@
// @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: string;
+
+ 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: {
+ +[number]: number,
+ +length: number,
+ };
+
+ 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, Jan 19, 4:33 AM (21 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5953369
Default Alt Text
D7326.1768797187.diff (2 KB)
Attached To
Mode
D7326: [desktop] Type windows notifs module
Attached
Detach File
Event Timeline
Log In to Comment