diff options
Diffstat (limited to 'frontend-old/node_modules/@firebase/app-check/dist/src')
27 files changed, 978 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/api.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/api.d.ts new file mode 100644 index 0000000..def58a8 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/api.d.ts @@ -0,0 +1,105 @@ +/** + * @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 { AppCheck, AppCheckOptions, AppCheckTokenResult, Unsubscribe, PartialObserver } from './public-types'; +import { FirebaseApp } from '@firebase/app'; +import { AppCheckService } from './factory'; +declare module '@firebase/component' { + interface NameServiceMapping { + 'app-check': AppCheckService; + } +} +export { ReCaptchaV3Provider, CustomProvider, ReCaptchaEnterpriseProvider } from './providers'; +/** + * Activate App Check for the given app. Can be called only once per app. + * @param app - the {@link @firebase/app#FirebaseApp} to activate App Check for + * @param options - App Check initialization options + * @public + */ +export declare function initializeAppCheck(app: FirebaseApp | undefined, options: AppCheckOptions): AppCheck; +/** + * Set whether App Check will automatically refresh tokens as needed. + * + * @param appCheckInstance - The App Check service instance. + * @param isTokenAutoRefreshEnabled - If true, the SDK automatically + * refreshes App Check tokens as needed. This overrides any value set + * during `initializeAppCheck()`. + * @public + */ +export declare function setTokenAutoRefreshEnabled(appCheckInstance: AppCheck, isTokenAutoRefreshEnabled: boolean): void; +/** + * Get the current App Check token. If `forceRefresh` is false, this function first + * checks for a valid token in memory, then local persistence (IndexedDB). + * If not found, or if `forceRefresh` is true, it makes a request to the + * App Check endpoint for a fresh token. That request attaches + * to the most recent in-flight request if one is present. + * + * @param appCheckInstance - The App Check service instance. + * @param forceRefresh - If true, will always try to fetch a fresh token. + * If false, will use a cached token if found in storage. + * @public + */ +export declare function getToken(appCheckInstance: AppCheck, forceRefresh?: boolean): Promise<AppCheckTokenResult>; +/** + * Requests a Firebase App Check token. This method should be used + * only if you need to authorize requests to a non-Firebase backend. + * + * Returns limited-use tokens that are intended for use with your + * non-Firebase backend endpoints that are protected with + * <a href="https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection"> + * Replay Protection</a>. This method + * does not affect the token generation behavior of the + * #getAppCheckToken() method. + * + * @param appCheckInstance - The App Check service instance. + * @returns The limited use token. + * @public + */ +export declare function getLimitedUseToken(appCheckInstance: AppCheck): Promise<AppCheckTokenResult>; +/** + * Registers a listener to changes in the token state. There can be more + * than one listener registered at the same time for one or more + * App Check instances. The listeners call back on the UI thread whenever + * the current token associated with this App Check instance changes. + * + * @param appCheckInstance - The App Check service instance. + * @param observer - An object with `next`, `error`, and `complete` + * properties. `next` is called with an + * {@link AppCheckTokenResult} + * whenever the token changes. `error` is optional and is called if an + * error is thrown by the listener (the `next` function). `complete` + * is unused, as the token stream is unending. + * + * @returns A function that unsubscribes this listener. + * @public + */ +export declare function onTokenChanged(appCheckInstance: AppCheck, observer: PartialObserver<AppCheckTokenResult>): Unsubscribe; +/** + * Registers a listener to changes in the token state. There can be more + * than one listener registered at the same time for one or more + * App Check instances. The listeners call back on the UI thread whenever + * the current token associated with this App Check instance changes. + * + * @param appCheckInstance - The App Check service instance. + * @param onNext - When the token changes, this function is called with an + * {@link AppCheckTokenResult}. + * @param onError - Optional. Called if there is an error thrown by the + * listener (the `onNext` function). + * @param onCompletion - Currently unused, as the token stream is unending. + * @returns A function that unsubscribes this listener. + * @public + */ +export declare function onTokenChanged(appCheckInstance: AppCheck, onNext: (tokenResult: AppCheckTokenResult) => void, onError?: (error: Error) => void, onCompletion?: () => void): Unsubscribe; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/api.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/api.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/api.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/client.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/client.d.ts new file mode 100644 index 0000000..d49e05c --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/client.d.ts @@ -0,0 +1,30 @@ +/** + * @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'; +import { Provider } from '@firebase/component'; +import { AppCheckTokenInternal } from './types'; +interface AppCheckRequest { + url: string; + body: { + [key: string]: string; + }; +} +export declare function exchangeToken({ url, body }: AppCheckRequest, heartbeatServiceProvider: Provider<'heartbeat'>): Promise<AppCheckTokenInternal>; +export declare function getExchangeRecaptchaV3TokenRequest(app: FirebaseApp, reCAPTCHAToken: string): AppCheckRequest; +export declare function getExchangeRecaptchaEnterpriseTokenRequest(app: FirebaseApp, reCAPTCHAToken: string): AppCheckRequest; +export declare function getExchangeDebugTokenRequest(app: FirebaseApp, debugToken: string): AppCheckRequest; +export {}; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/client.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/client.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/client.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/constants.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/constants.d.ts new file mode 100644 index 0000000..2b1e3dc --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/constants.d.ts @@ -0,0 +1,40 @@ +/** + * @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. + */ +export declare const BASE_ENDPOINT = "https://content-firebaseappcheck.googleapis.com/v1"; +export declare const EXCHANGE_RECAPTCHA_TOKEN_METHOD = "exchangeRecaptchaV3Token"; +export declare const EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD = "exchangeRecaptchaEnterpriseToken"; +export declare const EXCHANGE_DEBUG_TOKEN_METHOD = "exchangeDebugToken"; +export declare const TOKEN_REFRESH_TIME: { + /** + * The offset time before token natural expiration to run the refresh. + * This is currently 5 minutes. + */ + OFFSET_DURATION: number; + /** + * This is the first retrial wait after an error. This is currently + * 30 seconds. + */ + RETRIAL_MIN_WAIT: number; + /** + * This is the maximum retrial wait, currently 16 minutes. + */ + RETRIAL_MAX_WAIT: number; +}; +/** + * One day in millis, for certain error code backoffs. + */ +export declare const ONE_DAY: number; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/debug.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/debug.d.ts new file mode 100644 index 0000000..c5abdf9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/debug.d.ts @@ -0,0 +1,22 @@ +/** + * @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. + */ +declare global { + var FIREBASE_APPCHECK_DEBUG_TOKEN: boolean | string | undefined; +} +export declare function isDebugMode(): boolean; +export declare function getDebugToken(): Promise<string>; +export declare function initializeDebugMode(): void; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/debug.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/debug.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/debug.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/errors.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/errors.d.ts new file mode 100644 index 0000000..c9549d8 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/errors.d.ts @@ -0,0 +1,66 @@ +/** + * @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 { ErrorFactory } from '@firebase/util'; +export declare const enum AppCheckError { + ALREADY_INITIALIZED = "already-initialized", + USE_BEFORE_ACTIVATION = "use-before-activation", + FETCH_NETWORK_ERROR = "fetch-network-error", + FETCH_PARSE_ERROR = "fetch-parse-error", + FETCH_STATUS_ERROR = "fetch-status-error", + STORAGE_OPEN = "storage-open", + STORAGE_GET = "storage-get", + STORAGE_WRITE = "storage-set", + RECAPTCHA_ERROR = "recaptcha-error", + INITIAL_THROTTLE = "initial-throttle", + THROTTLED = "throttled" +} +interface ErrorParams { + [AppCheckError.ALREADY_INITIALIZED]: { + appName: string; + }; + [AppCheckError.USE_BEFORE_ACTIVATION]: { + appName: string; + }; + [AppCheckError.FETCH_NETWORK_ERROR]: { + originalErrorMessage: string; + }; + [AppCheckError.FETCH_PARSE_ERROR]: { + originalErrorMessage: string; + }; + [AppCheckError.FETCH_STATUS_ERROR]: { + httpStatus: number; + }; + [AppCheckError.STORAGE_OPEN]: { + originalErrorMessage?: string; + }; + [AppCheckError.STORAGE_GET]: { + originalErrorMessage?: string; + }; + [AppCheckError.STORAGE_WRITE]: { + originalErrorMessage?: string; + }; + [AppCheckError.INITIAL_THROTTLE]: { + time: string; + httpStatus: number; + }; + [AppCheckError.THROTTLED]: { + time: string; + httpStatus: number; + }; +} +export declare const ERROR_FACTORY: ErrorFactory<AppCheckError, ErrorParams>; +export {}; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/factory.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/factory.d.ts new file mode 100644 index 0000000..805f982 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/factory.d.ts @@ -0,0 +1,31 @@ +/** + * @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 { AppCheck } from './public-types'; +import { FirebaseApp, _FirebaseService } from '@firebase/app'; +import { FirebaseAppCheckInternal } from './types'; +import { Provider } from '@firebase/component'; +/** + * AppCheck Service class. + */ +export declare class AppCheckService implements AppCheck, _FirebaseService { + app: FirebaseApp; + heartbeatServiceProvider: Provider<'heartbeat'>; + constructor(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>); + _delete(): Promise<void>; +} +export declare function factory(app: FirebaseApp, heartbeatServiceProvider: Provider<'heartbeat'>): AppCheckService; +export declare function internalFactory(appCheck: AppCheckService): FirebaseAppCheckInternal; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/index.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/index.d.ts new file mode 100644 index 0000000..2d51c62 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/index.d.ts @@ -0,0 +1,14 @@ +/** + * The Firebase App Check Web SDK. + * + * @remarks + * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or + * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use + * `CustomProvider` and write your own attestation method. + * + * @packageDocumentation + */ +import { _AppCheckInternalComponentName } from './types'; +export { _AppCheckInternalComponentName }; +export * from './api'; +export * from './public-types'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/indexeddb.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/indexeddb.d.ts new file mode 100644 index 0000000..b6942da --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/indexeddb.d.ts @@ -0,0 +1,22 @@ +/** + * @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'; +import { AppCheckTokenInternal } from './types'; +export declare function readTokenFromIndexedDB(app: FirebaseApp): Promise<AppCheckTokenInternal | undefined>; +export declare function writeTokenToIndexedDB(app: FirebaseApp, token?: AppCheckTokenInternal): Promise<void>; +export declare function writeDebugTokenToIndexedDB(token: string): Promise<void>; +export declare function readDebugTokenFromIndexedDB(): Promise<string | undefined>; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/internal-api.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/internal-api.d.ts new file mode 100644 index 0000000..a4f5fe3 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/internal-api.d.ts @@ -0,0 +1,44 @@ +/** + * @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'; +import { AppCheckTokenResult, AppCheckTokenInternal, ListenerType } from './types'; +import { AppCheckTokenListener } from './public-types'; +import { AppCheckService } from './factory'; +export declare const defaultTokenErrorData: { + error: string; +}; +/** + * Stringify and base64 encode token error data. + * + * @param tokenError Error data, currently hardcoded. + */ +export declare function formatDummyToken(tokenErrorData: Record<string, string>): string; +/** + * This function always resolves. + * The result will contain an error field if there is any error. + * In case there is an error, the token field in the result will be populated with a dummy value + */ +export declare function getToken(appCheck: AppCheckService, forceRefresh?: boolean, shouldLogErrors?: boolean): Promise<AppCheckTokenResult>; +/** + * Internal API for limited use tokens. Skips all FAC state and simply calls + * the underlying provider. + */ +export declare function getLimitedUseToken(appCheck: AppCheckService): Promise<AppCheckTokenResult>; +export declare function addTokenListener(appCheck: AppCheckService, type: ListenerType, listener: AppCheckTokenListener, onError?: (error: Error) => void): void; +export declare function removeTokenListener(app: FirebaseApp, listener: AppCheckTokenListener): void; +export declare function notifyTokenListeners(app: FirebaseApp, token: AppCheckTokenResult): void; +export declare function isValid(token: AppCheckTokenInternal): boolean; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/internal-api.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/internal-api.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/internal-api.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/logger.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/logger.d.ts new file mode 100644 index 0000000..bfd6d07 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/logger.d.ts @@ -0,0 +1,18 @@ +/** + * @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 { Logger } from '@firebase/logger'; +export declare const logger: Logger; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/proactive-refresh.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/proactive-refresh.d.ts new file mode 100644 index 0000000..d90731c --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/proactive-refresh.d.ts @@ -0,0 +1,35 @@ +/** + * @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. + */ +/** + * Port from auth proactiverefresh.js + * + */ +export declare class Refresher { + private readonly operation; + private readonly retryPolicy; + private readonly getWaitDuration; + private readonly lowerBound; + private readonly upperBound; + private pending; + private nextErrorWaitInterval; + constructor(operation: () => Promise<unknown>, retryPolicy: (error: unknown) => boolean, getWaitDuration: () => number, lowerBound: number, upperBound: number); + start(): void; + stop(): void; + isRunning(): boolean; + private process; + private getNextRun; +} diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/proactive-refresh.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/proactive-refresh.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/proactive-refresh.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/providers.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/providers.d.ts new file mode 100644 index 0000000..787cea7 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/providers.d.ts @@ -0,0 +1,108 @@ +/** + * @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 { FirebaseApp } from '@firebase/app'; +import { CustomProviderOptions } from './public-types'; +import { AppCheckProvider, AppCheckTokenInternal } from './types'; +/** + * App Check provider that can obtain a reCAPTCHA V3 token and exchange it + * for an App Check token. + * + * @public + */ +export declare class ReCaptchaV3Provider implements AppCheckProvider { + private _siteKey; + private _app?; + private _heartbeatServiceProvider?; + /** + * Throttle requests on certain error codes to prevent too many retries + * in a short time. + */ + private _throttleData; + /** + * Create a ReCaptchaV3Provider instance. + * @param siteKey - ReCAPTCHA V3 siteKey. + */ + constructor(_siteKey: string); + /** + * Returns an App Check token. + * @internal + */ + getToken(): Promise<AppCheckTokenInternal>; + /** + * @internal + */ + initialize(app: FirebaseApp): void; + /** + * @internal + */ + isEqual(otherProvider: unknown): boolean; +} +/** + * App Check provider that can obtain a reCAPTCHA Enterprise token and exchange it + * for an App Check token. + * + * @public + */ +export declare class ReCaptchaEnterpriseProvider implements AppCheckProvider { + private _siteKey; + private _app?; + private _heartbeatServiceProvider?; + /** + * Throttle requests on certain error codes to prevent too many retries + * in a short time. + */ + private _throttleData; + /** + * Create a ReCaptchaEnterpriseProvider instance. + * @param siteKey - reCAPTCHA Enterprise score-based site key. + */ + constructor(_siteKey: string); + /** + * Returns an App Check token. + * @internal + */ + getToken(): Promise<AppCheckTokenInternal>; + /** + * @internal + */ + initialize(app: FirebaseApp): void; + /** + * @internal + */ + isEqual(otherProvider: unknown): boolean; +} +/** + * Custom provider class. + * @public + */ +export declare class CustomProvider implements AppCheckProvider { + private _customProviderOptions; + private _app?; + constructor(_customProviderOptions: CustomProviderOptions); + /** + * @internal + */ + getToken(): Promise<AppCheckTokenInternal>; + /** + * @internal + */ + initialize(app: FirebaseApp): void; + /** + * @internal + */ + isEqual(otherProvider: unknown): boolean; +} diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/providers.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/providers.test.d.ts new file mode 100644 index 0000000..c5efdd9 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/providers.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/public-types.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/public-types.d.ts new file mode 100644 index 0000000..0fe5708 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/public-types.d.ts @@ -0,0 +1,85 @@ +/** + * @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 { FirebaseApp } from '@firebase/app'; +import { CustomProvider, ReCaptchaEnterpriseProvider, ReCaptchaV3Provider } from './providers'; +export { Unsubscribe, PartialObserver } from '@firebase/util'; +/** + * The Firebase App Check service interface. + * + * @public + */ +export interface AppCheck { + /** + * The {@link @firebase/app#FirebaseApp} this `AppCheck` instance is associated with. + */ + app: FirebaseApp; +} +/** + * The token returned from an App Check provider. + * @public + */ +export interface AppCheckToken { + readonly token: string; + /** + * The local timestamp after which the token will expire. + */ + readonly expireTimeMillis: number; +} +/** + * @internal + */ +export type _AppCheckComponentName = 'app-check'; +/** + * Options for App Check initialization. + * @public + */ +export interface AppCheckOptions { + /** + * A reCAPTCHA V3 provider, reCAPTCHA Enterprise provider, or custom provider. + */ + provider: CustomProvider | ReCaptchaV3Provider | ReCaptchaEnterpriseProvider; + /** + * If set to true, enables automatic background refresh of App Check token. + */ + isTokenAutoRefreshEnabled?: boolean; +} +/** + * Options when creating a {@link CustomProvider}. + * @public + */ +export interface CustomProviderOptions { + /** + * Function to get an App Check token through a custom provider + * service. + */ + getToken: () => Promise<AppCheckToken>; +} +/** + * Result returned by `getToken()`. + * @public + */ +export interface AppCheckTokenResult { + /** + * The token string in JWT format. + */ + readonly token: string; +} +/** + * A listener that is called whenever the App Check token changes. + * @public + */ +export type AppCheckTokenListener = (token: AppCheckTokenResult) => void; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/recaptcha.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/recaptcha.d.ts new file mode 100644 index 0000000..22a51d2 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/recaptcha.d.ts @@ -0,0 +1,43 @@ +/** + * @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'; +export declare const RECAPTCHA_URL = "https://www.google.com/recaptcha/api.js"; +export declare const RECAPTCHA_ENTERPRISE_URL = "https://www.google.com/recaptcha/enterprise.js"; +export declare function initializeV3(app: FirebaseApp, siteKey: string): Promise<GreCAPTCHA>; +export declare function initializeEnterprise(app: FirebaseApp, siteKey: string): Promise<GreCAPTCHA>; +export declare function getToken(app: FirebaseApp): Promise<string>; +declare global { + interface Window { + grecaptcha: GreCAPTCHATopLevel | undefined; + } +} +export interface GreCAPTCHATopLevel extends GreCAPTCHA { + enterprise: GreCAPTCHA; +} +export interface GreCAPTCHA { + ready: (callback: () => void) => void; + execute: (siteKey: string, options: { + action: string; + }) => Promise<string>; + render: (container: string | HTMLElement, parameters: GreCAPTCHARenderOption) => string; +} +export interface GreCAPTCHARenderOption { + sitekey: string; + size: 'invisible'; + callback: () => void; + 'error-callback': () => void; +} diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/recaptcha.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/recaptcha.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/recaptcha.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/state.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/state.d.ts new file mode 100644 index 0000000..698374b --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/state.d.ts @@ -0,0 +1,54 @@ +/** + * @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'; +import { AppCheckProvider, AppCheckTokenInternal, AppCheckTokenObserver } from './types'; +import { Refresher } from './proactive-refresh'; +import { Deferred } from '@firebase/util'; +import { GreCAPTCHA } from './recaptcha'; +export interface AppCheckState { + activated: boolean; + tokenObservers: AppCheckTokenObserver[]; + provider?: AppCheckProvider; + token?: AppCheckTokenInternal; + cachedTokenPromise?: Promise<AppCheckTokenInternal | undefined>; + exchangeTokenPromise?: Promise<AppCheckTokenInternal>; + tokenRefresher?: Refresher; + reCAPTCHAState?: ReCAPTCHAState; + isTokenAutoRefreshEnabled?: boolean; +} +export interface ReCAPTCHAState { + initialized: Deferred<GreCAPTCHA>; + widgetId?: string; + succeeded?: boolean; +} +export interface DebugState { + initialized: boolean; + enabled: boolean; + token?: Deferred<string>; +} +export declare const DEFAULT_STATE: AppCheckState; +/** + * Gets a reference to the state object. + */ +export declare function getStateReference(app: FirebaseApp): AppCheckState; +/** + * Set once on initialization. The map should hold the same reference to the + * same object until this entry is deleted. + */ +export declare function setInitialState(app: FirebaseApp, state: AppCheckState): AppCheckState; +export declare function clearState(): void; +export declare function getDebugState(): DebugState; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/storage.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/storage.d.ts new file mode 100644 index 0000000..b1dfd96 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/storage.d.ts @@ -0,0 +1,27 @@ +/** + * @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'; +import { AppCheckTokenInternal } from './types'; +/** + * Always resolves. In case of an error reading from indexeddb, resolve with undefined + */ +export declare function readTokenFromStorage(app: FirebaseApp): Promise<AppCheckTokenInternal | undefined>; +/** + * Always resolves. In case of an error writing to indexeddb, print a warning and resolve the promise + */ +export declare function writeTokenToStorage(app: FirebaseApp, token?: AppCheckTokenInternal): Promise<void>; +export declare function readOrCreateDebugTokenFromStorage(): Promise<string>; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/storage.test.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/storage.test.d.ts new file mode 100644 index 0000000..68eefa5 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/storage.test.d.ts @@ -0,0 +1,17 @@ +/** + * @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 '../test/setup'; diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/tsdoc-metadata.json b/frontend-old/node_modules/@firebase/app-check/dist/src/tsdoc-metadata.json new file mode 100644 index 0000000..6af1f6a --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/tsdoc-metadata.json @@ -0,0 +1,11 @@ +// This file is read by tools that parse documentation comments conforming to the TSDoc standard. +// It should be published with your NPM package. It should not be tracked by Git. +{ + "tsdocVersion": "0.12", + "toolPackages": [ + { + "packageName": "@microsoft/api-extractor", + "packageVersion": "0.1.2" + } + ] +} diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/types.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/types.d.ts new file mode 100644 index 0000000..e1b916c --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/types.d.ts @@ -0,0 +1,66 @@ +/** + * @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 { FirebaseApp } from '@firebase/app'; +import { PartialObserver } from '@firebase/util'; +import { AppCheckToken, AppCheckTokenListener } from './public-types'; +export interface FirebaseAppCheckInternal { + getToken(forceRefresh?: boolean): Promise<AppCheckTokenResult>; + getLimitedUseToken(): Promise<AppCheckTokenResult>; + addTokenListener(listener: AppCheckTokenListener): void; + removeTokenListener(listener: AppCheckTokenListener): void; +} +export interface AppCheckTokenObserver extends PartialObserver<AppCheckTokenResult> { + next: AppCheckTokenListener; + type: ListenerType; +} +export declare const enum ListenerType { + 'INTERNAL' = "INTERNAL", + 'EXTERNAL' = "EXTERNAL" +} +export interface AppCheckTokenResult { + readonly token: string; + readonly error?: Error; + readonly internalError?: Error; +} +export interface AppCheckTokenInternal extends AppCheckToken { + issuedAtTimeMillis: number; +} +export interface AppCheckProvider { + /** + * Returns an App Check token. + * @internal + */ + getToken: () => Promise<AppCheckTokenInternal>; + /** + * @internal + */ + initialize(app: FirebaseApp): void; +} +/** + * @internal + */ +export type _AppCheckInternalComponentName = 'app-check-internal'; +export interface ThrottleData { + allowRequestsAfter: number; + backoffCount: number; + httpStatus: number; +} +declare module '@firebase/component' { + interface NameServiceMapping { + 'app-check-internal': FirebaseAppCheckInternal; + } +} diff --git a/frontend-old/node_modules/@firebase/app-check/dist/src/util.d.ts b/frontend-old/node_modules/@firebase/app-check/dist/src/util.d.ts new file mode 100644 index 0000000..29cc2e3 --- /dev/null +++ b/frontend-old/node_modules/@firebase/app-check/dist/src/util.d.ts @@ -0,0 +1,21 @@ +/** + * @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 { GreCAPTCHA } from './recaptcha'; +import { FirebaseApp } from '@firebase/app'; +export declare function getRecaptcha(isEnterprise?: boolean): GreCAPTCHA | undefined; +export declare function ensureActivated(app: FirebaseApp): void; +export declare function getDurationString(durationInMillis: number): string; |
