summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@firebase/installations/dist/src/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'frontend-old/node_modules/@firebase/installations/dist/src/helpers')
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/buffer-to-base64-url-safe.d.ts17
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/extract-app-config.d.ts19
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/fid-changed.d.ts25
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/generate-fid.d.ts23
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/get-installation-entry.d.ts28
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/idb-manager.d.ts32
-rw-r--r--frontend-old/node_modules/@firebase/installations/dist/src/helpers/refresh-auth-token.d.ts25
7 files changed, 169 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/buffer-to-base64-url-safe.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/buffer-to-base64-url-safe.d.ts
new file mode 100644
index 0000000..19bcb44
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/buffer-to-base64-url-safe.d.ts
@@ -0,0 +1,17 @@
+/**
+ * @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 declare function bufferToBase64UrlSafe(array: Uint8Array): string;
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/extract-app-config.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/extract-app-config.d.ts
new file mode 100644
index 0000000..4293d64
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/extract-app-config.d.ts
@@ -0,0 +1,19 @@
+/**
+ * @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 { FirebaseApp } from '@firebase/app';
+import { AppConfig } from '../interfaces/installation-impl';
+export declare function extractAppConfig(app: FirebaseApp): AppConfig;
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/fid-changed.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/fid-changed.d.ts
new file mode 100644
index 0000000..58dcb38
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/fid-changed.d.ts
@@ -0,0 +1,25 @@
+/**
+ * @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 '../interfaces/installation-impl';
+import { IdChangeCallbackFn } from '../api';
+/**
+ * Calls the onIdChange callbacks with the new FID value, and broadcasts the
+ * change to other tabs.
+ */
+export declare function fidChanged(appConfig: AppConfig, fid: string): void;
+export declare function addCallback(appConfig: AppConfig, callback: IdChangeCallbackFn): void;
+export declare function removeCallback(appConfig: AppConfig, callback: IdChangeCallbackFn): void;
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/generate-fid.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/generate-fid.d.ts
new file mode 100644
index 0000000..a1a8f8d
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/generate-fid.d.ts
@@ -0,0 +1,23 @@
+/**
+ * @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 declare const VALID_FID_PATTERN: RegExp;
+export declare const INVALID_FID = "";
+/**
+ * Generates a new FID using random values from Web Crypto API.
+ * Returns an empty string if FID generation fails for any reason.
+ */
+export declare function generateFid(): string;
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/get-installation-entry.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/get-installation-entry.d.ts
new file mode 100644
index 0000000..1b0355f
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/get-installation-entry.d.ts
@@ -0,0 +1,28 @@
+/**
+ * @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 { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
+import { InstallationEntry, RegisteredInstallationEntry } from '../interfaces/installation-entry';
+export interface InstallationEntryWithRegistrationPromise {
+ installationEntry: InstallationEntry;
+ /** Exist iff the installationEntry is not registered. */
+ registrationPromise?: Promise<RegisteredInstallationEntry>;
+}
+/**
+ * Updates and returns the InstallationEntry from the database.
+ * Also triggers a registration request if it is necessary and possible.
+ */
+export declare function getInstallationEntry(installations: FirebaseInstallationsImpl): Promise<InstallationEntryWithRegistrationPromise>;
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/idb-manager.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/idb-manager.d.ts
new file mode 100644
index 0000000..8ee7efa
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/idb-manager.d.ts
@@ -0,0 +1,32 @@
+/**
+ * @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 '../interfaces/installation-impl';
+import { InstallationEntry } from '../interfaces/installation-entry';
+/** Gets record(s) from the objectStore that match the given key. */
+export declare function get(appConfig: AppConfig): Promise<InstallationEntry | undefined>;
+/** Assigns or overwrites the record for the given key with the given value. */
+export declare function set<ValueType extends InstallationEntry>(appConfig: AppConfig, value: ValueType): Promise<ValueType>;
+/** Removes record(s) from the objectStore that match the given key. */
+export declare function remove(appConfig: AppConfig): Promise<void>;
+/**
+ * Atomically updates a record with the result of updateFn, which gets
+ * called with the current value. If newValue is undefined, the record is
+ * deleted instead.
+ * @return Updated value
+ */
+export declare function update<ValueType extends InstallationEntry | undefined>(appConfig: AppConfig, updateFn: (previousValue: InstallationEntry | undefined) => ValueType): Promise<ValueType>;
+export declare function clear(): Promise<void>;
diff --git a/frontend-old/node_modules/@firebase/installations/dist/src/helpers/refresh-auth-token.d.ts b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/refresh-auth-token.d.ts
new file mode 100644
index 0000000..9bf6c6b
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/installations/dist/src/helpers/refresh-auth-token.d.ts
@@ -0,0 +1,25 @@
+/**
+ * @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 { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
+import { CompletedAuthToken } from '../interfaces/installation-entry';
+/**
+ * Returns a valid authentication token for the installation. Generates a new
+ * token if one doesn't exist, is expired or about to expire.
+ *
+ * Should only be called if the Firebase Installation is registered.
+ */
+export declare function refreshAuthToken(installations: FirebaseInstallationsImpl, forceRefresh?: boolean): Promise<CompletedAuthToken>;