diff options
Diffstat (limited to 'frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces')
6 files changed, 352 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/app-config.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/app-config.d.ts new file mode 100644 index 0000000..6d74827 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/app-config.d.ts @@ -0,0 +1,24 @@ +/** + * @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. + */ +export interface AppConfig { + readonly appName: string; + readonly projectId: string; + readonly apiKey: string; + readonly appId: string; + /** Only used for old DB migration. */ + readonly senderId: string; +} diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-dependencies.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-dependencies.d.ts new file mode 100644 index 0000000..05e6d28 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-dependencies.d.ts @@ -0,0 +1,27 @@ +/** + * @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 { AppConfig } from './app-config'; +import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types'; +import { FirebaseApp } from '@firebase/app'; +import { Provider } from '@firebase/component'; +import { _FirebaseInstallationsInternal } from '@firebase/installations'; +export interface FirebaseInternalDependencies { + app: FirebaseApp; + appConfig: AppConfig; + installations: _FirebaseInstallationsInternal; + analyticsProvider: Provider<FirebaseAnalyticsInternalName>; +} diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-message-payload.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-message-payload.d.ts new file mode 100644 index 0000000..ce7b48c --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/internal-message-payload.d.ts @@ -0,0 +1,65 @@ +/** + * @license + * Copyright 2018 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 { CONSOLE_CAMPAIGN_ANALYTICS_ENABLED, CONSOLE_CAMPAIGN_ID, CONSOLE_CAMPAIGN_NAME, CONSOLE_CAMPAIGN_TIME } from '../util/constants'; +export interface MessagePayloadInternal { + notification?: NotificationPayloadInternal; + data?: unknown; + fcmOptions?: FcmOptionsInternal; + messageType?: MessageType; + isFirebaseMessaging?: boolean; + from: string; + fcmMessageId: string; + productId: number; + collapse_key: string; +} +interface NotificationAction { + action: string; + icon?: string; + title: string; +} +/** + * This interface defines experimental properties of NotificationOptions, that are not part of + * the interface in the generated DOM types at https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/179bdd84a944933a3103f29c2274c9f5a857b693/baselines/dom.generated.d.ts#L1012 + * https://developer.mozilla.org/en-US/docs/Web/API/Notification + */ +interface NotificationOptionsExperimental extends NotificationOptions { + readonly maxActions?: number; + readonly actions?: NotificationAction[]; + readonly image?: string; + readonly renotify?: boolean; + readonly timestamp?: EpochTimeStamp; + readonly vibrate?: VibratePattern; +} +export interface NotificationPayloadInternal extends NotificationOptionsExperimental { + title: string; + click_action?: string; + icon?: string; +} +export interface FcmOptionsInternal { + link?: string; + analytics_label?: string; +} +export declare enum MessageType { + PUSH_RECEIVED = "push-received", + NOTIFICATION_CLICKED = "notification-clicked" +} +/** Additional data of a message sent from the FN Console. */ +export interface ConsoleMessageData { + [CONSOLE_CAMPAIGN_ID]: string; + [CONSOLE_CAMPAIGN_TIME]: string; + [CONSOLE_CAMPAIGN_NAME]?: string; + [CONSOLE_CAMPAIGN_ANALYTICS_ENABLED]?: '1'; +} +export {}; diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/logging-types.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/logging-types.d.ts new file mode 100644 index 0000000..6e09f66 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/logging-types.d.ts @@ -0,0 +1,60 @@ +/** + * @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. + */ +export interface FcmEvent { + project_number: string; + message_id: string; + instance_id: string; + message_type: string; + sdk_platform: string; + package_name: string; + collapse_key: string; + event: string; + analytics_label?: string; +} +/** + * A LogRequest represents a batched collection of loggable events sent to firelog, each event to be + * processed and sent to Sawmill. Defined as in proto/clientanalytics.proto#LogRequest + */ +export interface LogRequest { + log_source: string; + log_event: LogEvent[]; +} +export interface LogEvent { + event_time_ms: string; + source_extension_json_proto3: string; + compliance_data: ComplianceData; +} +export interface ComplianceData { + privacy_context: ExternalPrivacyContext; +} +export interface ExternalPrivacyContext { + prequest: ExternalPRequestContext; +} +export interface ExternalPRequestContext { + origin_associated_product_id: number; +} +export interface LogResponse { + nextRequestWaitMillis: number; + logResponseDetails: LogResponseDetails[]; +} +interface LogResponseDetails { + responseAction: UserResponse; +} +export declare const enum UserResponse { + RESPONSE_ACTION_UNKNOWN = "RESPONSE_ACTION_UNKNOWN", + RETRY_REQUEST_LATER = "RETRY_REQUEST_LATER", + DELETE_REQUEST = "DELETE_REQUEST" +} +export {}; diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/public-types.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/public-types.d.ts new file mode 100644 index 0000000..56019e4 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/public-types.d.ts @@ -0,0 +1,144 @@ +/** + * @license + * Copyright 2020 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 { FirebaseApp } from '@firebase/app'; +/** + * Display notification details. Details are sent through the + * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}. + * + * @public + */ +export interface NotificationPayload { + /** + * The notification's title. + */ + title?: string; + /** + * The notification's body text. + */ + body?: string; + /** + * The URL of an image that is downloaded on the device and displayed in the notification. + */ + image?: string; + /** + * The URL to use for the notification's icon. If you don't send this key in the request, + * FCM displays the launcher icon specified in your app manifest. + */ + icon?: string; +} +/** + * Options for features provided by the FCM SDK for Web. See {@link + * https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions | + * WebpushFcmOptions}. + * + * @public + */ +export interface FcmOptions { + /** + * The link to open when the user clicks on the notification. + */ + link?: string; + /** + * The label associated with the message's analytics data. + */ + analyticsLabel?: string; +} +/** + * Message payload that contains the notification payload that is represented with + * {@link NotificationPayload} and the data payload that contains an arbitrary + * number of key-value pairs sent by developers through the + * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}. + * + * @public + */ +export interface MessagePayload { + /** + * {@inheritdoc NotificationPayload} + */ + notification?: NotificationPayload; + /** + * Arbitrary key/value payload. + */ + data?: { + [key: string]: string; + }; + /** + * {@inheritdoc FcmOptions} + */ + fcmOptions?: FcmOptions; + /** + * The sender of this message. + */ + from: string; + /** + * The collapse key of the message. See + * {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages} + */ + collapseKey: string; + /** + * The message ID of a message. + */ + messageId: string; +} +/** + * Options for {@link getToken}. + * + * @public + */ +export interface GetTokenOptions { + /** + * The public server key provided to push services. The key is used to + * authenticate push subscribers to receive push messages only from sending servers that hold + * the corresponding private key. If it is not provided, a default VAPID key is used. Note that some + * push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended + * to generate and import a VAPID key for your project with + * {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}. + * See + * {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol} + * for details on web push services. + */ + vapidKey?: string; + /** + * The service worker registration for receiving push + * messaging. If the registration is not provided explicitly, you need to have a + * `firebase-messaging-sw.js` at your root location. See + * {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token} + * for more details. + */ + serviceWorkerRegistration?: ServiceWorkerRegistration; +} +/** + * Public interface of the Firebase Cloud Messaging SDK. + * + * @public + */ +export interface Messaging { + /** + * The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with. + */ + app: FirebaseApp; +} +/** + * @internal + */ +export type _FirebaseMessagingName = 'messaging'; +export { NextFn, Observer, Unsubscribe } from '@firebase/util'; +declare module '@firebase/component' { + interface NameServiceMapping { + 'messaging': Messaging; + } +} diff --git a/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/token-details.d.ts b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/token-details.d.ts new file mode 100644 index 0000000..cab71a3 --- /dev/null +++ b/frontend-old/node_modules/@firebase/messaging/dist/esm/src/interfaces/token-details.d.ts @@ -0,0 +1,32 @@ +/** + * @license + * Copyright 2018 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. + */ +export interface TokenDetails { + token: string; + createTime: number; + /** Does not exist in Safari since it's not using Push API. */ + subscriptionOptions?: SubscriptionOptions; +} +/** + * Additional options and values required by a Push API subscription. + */ +export interface SubscriptionOptions { + vapidKey: string; + swScope: string; + endpoint: string; + auth: string; + p256dh: string; +} |
