summaryrefslogtreecommitdiff
path: root/frontend-old/node_modules/@firebase/performance/dist/src/utils
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
committeraltaf-creator <dev@altafcreator.com>2025-11-09 11:15:19 +0800
commit8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch)
tree05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/performance/dist/src/utils
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/performance/dist/src/utils')
-rw-r--r--frontend-old/node_modules/@firebase/performance/dist/src/utils/app_utils.d.ts20
-rw-r--r--frontend-old/node_modules/@firebase/performance/dist/src/utils/attributes_utils.d.ts41
-rw-r--r--frontend-old/node_modules/@firebase/performance/dist/src/utils/console_logger.d.ts18
-rw-r--r--frontend-old/node_modules/@firebase/performance/dist/src/utils/errors.d.ts60
-rw-r--r--frontend-old/node_modules/@firebase/performance/dist/src/utils/metric_utils.d.ts28
-rw-r--r--frontend-old/node_modules/@firebase/performance/dist/src/utils/string_merger.d.ts17
6 files changed, 184 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/performance/dist/src/utils/app_utils.d.ts b/frontend-old/node_modules/@firebase/performance/dist/src/utils/app_utils.d.ts
new file mode 100644
index 0000000..3c86d5a
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/performance/dist/src/utils/app_utils.d.ts
@@ -0,0 +1,20 @@
+/**
+ * @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 function getAppId(firebaseApp: FirebaseApp): string;
+export declare function getProjectId(firebaseApp: FirebaseApp): string;
+export declare function getApiKey(firebaseApp: FirebaseApp): string;
diff --git a/frontend-old/node_modules/@firebase/performance/dist/src/utils/attributes_utils.d.ts b/frontend-old/node_modules/@firebase/performance/dist/src/utils/attributes_utils.d.ts
new file mode 100644
index 0000000..bbdcd52
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/performance/dist/src/utils/attributes_utils.d.ts
@@ -0,0 +1,41 @@
+/**
+ * @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 const enum ServiceWorkerStatus {
+ UNKNOWN = 0,
+ UNSUPPORTED = 1,
+ CONTROLLED = 2,
+ UNCONTROLLED = 3
+}
+export declare enum VisibilityState {
+ UNKNOWN = 0,
+ VISIBLE = 1,
+ HIDDEN = 2
+}
+declare const enum EffectiveConnectionType {
+ UNKNOWN = 0,
+ CONNECTION_SLOW_2G = 1,
+ CONNECTION_2G = 2,
+ CONNECTION_3G = 3,
+ CONNECTION_4G = 4
+}
+export declare const MAX_ATTRIBUTE_VALUE_LENGTH = 100;
+export declare function getServiceWorkerStatus(): ServiceWorkerStatus;
+export declare function getVisibilityState(): VisibilityState;
+export declare function getEffectiveConnectionType(): EffectiveConnectionType;
+export declare function isValidCustomAttributeName(name: string): boolean;
+export declare function isValidCustomAttributeValue(value: string): boolean;
+export {};
diff --git a/frontend-old/node_modules/@firebase/performance/dist/src/utils/console_logger.d.ts b/frontend-old/node_modules/@firebase/performance/dist/src/utils/console_logger.d.ts
new file mode 100644
index 0000000..3049fb6
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/performance/dist/src/utils/console_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 consoleLogger: Logger;
diff --git a/frontend-old/node_modules/@firebase/performance/dist/src/utils/errors.d.ts b/frontend-old/node_modules/@firebase/performance/dist/src/utils/errors.d.ts
new file mode 100644
index 0000000..8db0240
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/performance/dist/src/utils/errors.d.ts
@@ -0,0 +1,60 @@
+/**
+ * @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 ErrorCode {
+ TRACE_STARTED_BEFORE = "trace started",
+ TRACE_STOPPED_BEFORE = "trace stopped",
+ NONPOSITIVE_TRACE_START_TIME = "nonpositive trace startTime",
+ NONPOSITIVE_TRACE_DURATION = "nonpositive trace duration",
+ NO_WINDOW = "no window",
+ NO_APP_ID = "no app id",
+ NO_PROJECT_ID = "no project id",
+ NO_API_KEY = "no api key",
+ INVALID_CC_LOG = "invalid cc log",
+ FB_NOT_DEFAULT = "FB not default",
+ RC_NOT_OK = "RC response not ok",
+ INVALID_ATTRIBUTE_NAME = "invalid attribute name",
+ INVALID_ATTRIBUTE_VALUE = "invalid attribute value",
+ INVALID_CUSTOM_METRIC_NAME = "invalid custom metric name",
+ INVALID_STRING_MERGER_PARAMETER = "invalid String merger input",
+ ALREADY_INITIALIZED = "already initialized"
+}
+interface ErrorParams {
+ [ErrorCode.TRACE_STARTED_BEFORE]: {
+ traceName: string;
+ };
+ [ErrorCode.TRACE_STOPPED_BEFORE]: {
+ traceName: string;
+ };
+ [ErrorCode.NONPOSITIVE_TRACE_START_TIME]: {
+ traceName: string;
+ };
+ [ErrorCode.NONPOSITIVE_TRACE_DURATION]: {
+ traceName: string;
+ };
+ [ErrorCode.INVALID_ATTRIBUTE_NAME]: {
+ attributeName: string;
+ };
+ [ErrorCode.INVALID_ATTRIBUTE_VALUE]: {
+ attributeValue: string;
+ };
+ [ErrorCode.INVALID_CUSTOM_METRIC_NAME]: {
+ customMetricName: string;
+ };
+}
+export declare const ERROR_FACTORY: ErrorFactory<ErrorCode, ErrorParams>;
+export {};
diff --git a/frontend-old/node_modules/@firebase/performance/dist/src/utils/metric_utils.d.ts b/frontend-old/node_modules/@firebase/performance/dist/src/utils/metric_utils.d.ts
new file mode 100644
index 0000000..9639f76
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/performance/dist/src/utils/metric_utils.d.ts
@@ -0,0 +1,28 @@
+/**
+ * @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.
+ */
+/**
+ * Returns true if the metric is custom and does not start with reserved prefix, or if
+ * the metric is one of out of the box page load trace metrics.
+ */
+export declare function isValidMetricName(name: string, traceName?: string): boolean;
+/**
+ * Converts the provided value to an integer value to be used in case of a metric.
+ * @param providedValue Provided number value of the metric that needs to be converted to an integer.
+ *
+ * @returns Converted integer number to be set for the metric.
+ */
+export declare function convertMetricValueToInteger(providedValue: number): number;
diff --git a/frontend-old/node_modules/@firebase/performance/dist/src/utils/string_merger.d.ts b/frontend-old/node_modules/@firebase/performance/dist/src/utils/string_merger.d.ts
new file mode 100644
index 0000000..4bdb19e
--- /dev/null
+++ b/frontend-old/node_modules/@firebase/performance/dist/src/utils/string_merger.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.
+ */
+export declare function mergeStrings(part1: string, part2: string): string;