File tree Expand file tree Collapse file tree 10 files changed +17
-30
lines changed
Expand file tree Collapse file tree 10 files changed +17
-30
lines changed Original file line number Diff line number Diff line change 11import type { SetRequired } from 'type-fest' ;
22
3- import type { APIHeaders } from 'src/shared/models/APIHeaders' ;
43import type {
54 NotificationTypeValue ,
65 SubscriptionTypeValue ,
76} from 'src/shared/subscriptions/types' ;
87
8+ export interface APIHeaders {
9+ Authorization ?: string ;
10+ [ key : string ] : any ;
11+ }
12+
913export interface RequestMetadata {
1014 appId : string ;
1115 subscriptionId ?: string ;
Original file line number Diff line number Diff line change 11import { RETRY_MS } from 'src/core/operationRepo/constants' ;
2+ import type { APIHeaders } from 'src/core/types/api' ;
23import { getOneSignalApiUrl } from '../environment/detect' ;
34import { AppIDMissingError , RetryLimitError } from '../errors/common' ;
45import { delay } from '../helpers/general' ;
56import { isValidUuid } from '../helpers/validators' ;
67import { error } from '../libraries/log' ;
7- import type { APIHeaders } from '../models/APIHeaders' ;
88import { IS_SERVICE_WORKER , VERSION } from '../utils/env' ;
99
1010type SupportedMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' ;
Original file line number Diff line number Diff line change 11import { IdentityConstants } from 'src/core/constants' ;
22import { updateUserByAlias } from 'src/core/requests/api' ;
33import type { IUpdateUser } from 'src/core/types/api' ;
4+ import { debug } from 'src/shared/libraries/log' ;
45import type { ServerAppConfig } from '../config/types' ;
56import { enforceAlias , enforceAppId } from '../context/helpers' ;
7+ import type { DeliveryPlatformKindValue } from '../environment/constants' ;
68import { getSubscriptionType } from '../environment/detect' ;
7- import type { DeliveryPlatformKindValue } from '../models/DeliveryPlatformKind' ;
89import {
910 OutcomeAttributionType ,
1011 type OutcomeAttribution ,
@@ -13,7 +14,6 @@ import type { OutcomeRequestData } from '../outcomes/types';
1314import { NotificationType } from '../subscriptions/constants' ;
1415import * as OneSignalApiBase from './base' ;
1516import { sendOutcome } from './shared' ;
16- import { debug } from 'src/shared/libraries/log' ;
1717
1818export async function downloadSWServerAppConfig (
1919 appId : string ,
File renamed without changes.
Original file line number Diff line number Diff line change 1- import {
2- DeliveryPlatformKind ,
3- type DeliveryPlatformKindValue ,
4- } from '../models/DeliveryPlatformKind' ;
51import { SubscriptionType } from '../subscriptions/constants' ;
62import type { SubscriptionTypeValue } from '../subscriptions/types' ;
73import { Browser } from '../useragent/constants' ;
84import { getBrowserName , getBrowserVersion } from '../useragent/detect' ;
95import { API_ORIGIN , API_TYPE , IS_SERVICE_WORKER } from '../utils/env' ;
6+ import {
7+ DeliveryPlatformKind ,
8+ type DeliveryPlatformKindValue ,
9+ } from './constants' ;
1010
1111export const isBrowser = ( ) => typeof window !== 'undefined' ;
1212
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,12 +17,12 @@ import {
1717 mockPushSubscription ,
1818 MockServiceWorker ,
1919} from '__test__/support/mocks/MockServiceWorker' ;
20- import { setPushToken } from '../database/subscription' ;
21- import { IDManager } from './IDManager' ;
20+ import { setPushToken } from '../../ database/subscription' ;
21+ import { IDManager } from '.. /IDManager' ;
2222import {
2323 SubscriptionManagerPage ,
2424 updatePushSubscriptionModelWithRawSubscription ,
25- } from './subscription/ page' ;
25+ } from './page' ;
2626
2727describe ( 'SubscriptionManager' , ( ) => {
2828 beforeEach ( ( ) => {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ import {
1414 putNotificationClickedForOutcomes ,
1515} from 'src/shared/database/notifications' ;
1616import { getSubscription } from 'src/shared/database/subscription' ;
17+ import { DeliveryPlatformKind } from 'src/shared/environment/constants' ;
1718import * as Log from 'src/shared/libraries/log' ;
1819import { WorkerMessengerCommand } from 'src/shared/libraries/workerMessenger/constants' ;
1920import { DEFAULT_DEVICE_ID } from 'src/shared/managers/subscription/constants' ;
2021import { SubscriptionManagerSW } from 'src/shared/managers/subscription/sw' ;
21- import { DeliveryPlatformKind } from 'src/shared/models/DeliveryPlatformKind' ;
2222import { RawPushSubscription } from 'src/shared/models/RawPushSubscription' ;
2323import { SubscriptionStrategyKind } from 'src/shared/models/SubscriptionStrategyKind' ;
2424import {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 getSubscription ,
2121 setSubscription ,
2222} from 'src/shared/database/subscription' ;
23+ import type { DeliveryPlatformKindValue } from 'src/shared/environment/constants' ;
2324import { getDeviceType } from 'src/shared/environment/detect' ;
2425import { delay } from 'src/shared/helpers/general' ;
2526import {
@@ -31,7 +32,6 @@ import { WorkerMessengerCommand } from 'src/shared/libraries/workerMessenger/con
3132import { WorkerMessengerSW } from 'src/shared/libraries/workerMessenger/sw' ;
3233import type { WorkerMessengerMessage } from 'src/shared/libraries/workerMessenger/types' ;
3334import ContextSW from 'src/shared/models/ContextSW' ;
34- import type { DeliveryPlatformKindValue } from 'src/shared/models/DeliveryPlatformKind' ;
3535import { RawPushSubscription } from 'src/shared/models/RawPushSubscription' ;
3636import { SubscriptionStrategyKind } from 'src/shared/models/SubscriptionStrategyKind' ;
3737import type {
You can’t perform that action at this time.
0 commit comments