diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
| commit | 8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch) | |
| tree | 05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes | |
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes')
5 files changed, 162 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/firebase-dependencies.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/firebase-dependencies.d.ts new file mode 100644 index 0000000..8b623d4 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/firebase-dependencies.d.ts @@ -0,0 +1,25 @@ +/** + * @license + * Copyright 2017 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types'; +import { FirebaseInternalDependencies } from '../../interfaces/internal-dependencies'; +import { FirebaseOptions } from '@firebase/app'; +import { Provider } from '@firebase/component'; +import { _FirebaseInstallationsInternal } from '@firebase/installations'; +export declare function getFakeFirebaseDependencies(options?: FirebaseOptions): FirebaseInternalDependencies; +export declare function getFakeApp(options?: FirebaseOptions): any; +export declare function getFakeInstallations(): _FirebaseInstallationsInternal; +export declare function getFakeAnalyticsProvider(): Provider<FirebaseAnalyticsInternalName>; diff --git a/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/logging-object.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/logging-object.d.ts new file mode 100644 index 0000000..02d52f5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/logging-object.d.ts @@ -0,0 +1,18 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +import { LogEvent, LogResponse } from '../../interfaces/logging-types'; +export declare function getFakeLogEvent(): LogEvent; +export declare function getSuccessResponse(): LogResponse; +export declare function getFailedResponse(): LogResponse; diff --git a/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/messaging-service.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/messaging-service.d.ts new file mode 100644 index 0000000..154a0d9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/messaging-service.d.ts @@ -0,0 +1,18 @@ +/** + * @license + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { MessagingService } from '../../messaging-service'; +export declare function getFakeMessagingService(): MessagingService; diff --git a/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/service-worker.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/service-worker.d.ts new file mode 100644 index 0000000..11b3a7d --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/service-worker.d.ts @@ -0,0 +1,83 @@ +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { ExtendableEvent } from '../../util/sw-types'; +export declare function mockServiceWorker(): void; +export declare function restoreServiceWorker(): void; +export declare class FakeServiceWorkerRegistration implements ServiceWorkerRegistration { + active: null; + installing: null; + waiting: null; + onupdatefound: null; + pushManager: FakePushManager; + scope: string; + navigationPreload: NavigationPreloadManager; + updateViaCache: ServiceWorkerUpdateViaCache; + getNotifications(): Promise<never[]>; + showNotification(): Promise<void>; + update(): Promise<void>; + unregister(): Promise<boolean>; + addEventListener(): void; + removeEventListener(): void; + dispatchEvent(): boolean; +} +declare class FakePushManager implements PushManager { + private subscription; + permissionState(): Promise<"granted">; + getSubscription(): Promise<FakePushSubscription | null>; + subscribe(): Promise<FakePushSubscription>; +} +export declare class FakePushSubscription implements PushSubscription { + endpoint: string; + expirationTime: number; + auth: string; + p256: string; + getKey(name: PushEncryptionKeyName): Uint8Array; + unsubscribe(): Promise<boolean>; + toJSON: () => PushSubscriptionJSON; + options: PushSubscriptionOptions; +} +/** + * Most of the fields in here are unused / deprecated. They are only added here to match the TS + * Event interface. + */ +export declare class FakeEvent implements ExtendableEvent { + type: string; + NONE: 0; + AT_TARGET: 2; + BUBBLING_PHASE: 3; + CAPTURING_PHASE: 1; + bubbles: boolean; + cancelable: boolean; + composed: boolean; + timeStamp: number; + isTrusted: boolean; + eventPhase: 0; + target: null; + currentTarget: null; + srcElement: null; + cancelBubble: boolean; + defaultPrevented: boolean; + returnValue: boolean; + preventDefault(): void; + stopPropagation(): void; + stopImmediatePropagation(): void; + initEvent(): void; + waitUntil(): void; + composedPath(): never[]; + constructor(type: string, options?: EventInit); +} +export {}; diff --git a/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/token-details.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/token-details.d.ts new file mode 100644 index 0000000..27d7257 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/src/testing/fakes/token-details.d.ts @@ -0,0 +1,18 @@ +/** + * @license + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TokenDetails } from '../../interfaces/token-details'; +export declare function getFakeTokenDetails(): TokenDetails; |
