Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/push/utils.js
// @flow | // @flow | ||||
import apn from '@parse/node-apn'; | import apn from '@parse/node-apn'; | ||||
import type { ResponseFailure } from '@parse/node-apn'; | import type { ResponseFailure } from '@parse/node-apn'; | ||||
import type { FirebaseApp, FirebaseError } from 'firebase-admin'; | import type { FirebaseApp, FirebaseError } from 'firebase-admin'; | ||||
import invariant from 'invariant'; | import invariant from 'invariant'; | ||||
import fetch from 'node-fetch'; | import fetch from 'node-fetch'; | ||||
import type { Response } from 'node-fetch'; | import type { Response } from 'node-fetch'; | ||||
import webpush from 'web-push'; | import webpush from 'web-push'; | ||||
import type { PlatformDetails } from 'lib/types/device-types.js'; | import type { PlatformDetails } from 'lib/types/device-types.js'; | ||||
import type { | import type { | ||||
WebNotification, | WebNotification, | ||||
WNSNotification, | WNSNotification, | ||||
} from 'lib/types/notif-types.js'; | } from 'lib/types/notif-types.js'; | ||||
import { threadSubscriptions } from 'lib/types/subscription-types.js'; | import { threadSubscriptions } from 'lib/types/subscription-types.js'; | ||||
import { threadPermissions } from 'lib/types/thread-types.js'; | import { threadPermissions } from 'lib/types/thread-permission-types.js'; | ||||
import { | import { | ||||
getAPNPushProfileForCodeVersion, | getAPNPushProfileForCodeVersion, | ||||
getFCMPushProfileForCodeVersion, | getFCMPushProfileForCodeVersion, | ||||
getAPNProvider, | getAPNProvider, | ||||
getFCMProvider, | getFCMProvider, | ||||
ensureWebPushInitialized, | ensureWebPushInitialized, | ||||
getWNSToken, | getWNSToken, | ||||
▲ Show 20 Lines • Show All 350 Lines • Show Last 20 Lines |