152 lines
4.8 KiB
TypeScript
152 lines
4.8 KiB
TypeScript
/*! firebase-admin v13.5.0 */
|
|
/*!
|
|
* @license
|
|
* Copyright 2017 Google Inc.
|
|
*
|
|
* 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.
|
|
*/
|
|
/**
|
|
* Validates that a value is a byte buffer.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is byte buffer or not.
|
|
*/
|
|
export declare function isBuffer(value: any): value is Buffer;
|
|
/**
|
|
* Validates that a value is an array.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is an array or not.
|
|
*/
|
|
export declare function isArray<T>(value: any): value is T[];
|
|
/**
|
|
* Validates that a value is a non-empty array.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a non-empty array or not.
|
|
*/
|
|
export declare function isNonEmptyArray<T>(value: any): value is T[];
|
|
/**
|
|
* Validates that a value is a boolean.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a boolean or not.
|
|
*/
|
|
export declare function isBoolean(value: any): boolean;
|
|
/**
|
|
* Validates that a value is a number.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a number or not.
|
|
*/
|
|
export declare function isNumber(value: any): boolean;
|
|
/**
|
|
* Validates that a value is a string.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a string or not.
|
|
*/
|
|
export declare function isString(value: any): value is string;
|
|
/**
|
|
* Validates that a value is a base64 string.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a base64 string or not.
|
|
*/
|
|
export declare function isBase64String(value: any): boolean;
|
|
/**
|
|
* Validates that a value is a non-empty string.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a non-empty string or not.
|
|
*/
|
|
export declare function isNonEmptyString(value: any): value is string;
|
|
/**
|
|
* Validates that a value is a nullable object.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is an object or not.
|
|
*/
|
|
export declare function isObject(value: any): boolean;
|
|
/**
|
|
* Validates that a value is a non-null object.
|
|
*
|
|
* @param value - The value to validate.
|
|
* @returns Whether the value is a non-null object or not.
|
|
*/
|
|
export declare function isNonNullObject<T>(value: T | null | undefined): value is T;
|
|
/**
|
|
* Validates that a string is a valid Firebase Auth uid.
|
|
*
|
|
* @param uid - The string to validate.
|
|
* @returns Whether the string is a valid Firebase Auth uid.
|
|
*/
|
|
export declare function isUid(uid: any): boolean;
|
|
/**
|
|
* Validates that a string is a valid Firebase Auth password.
|
|
*
|
|
* @param password - The password string to validate.
|
|
* @returns Whether the string is a valid Firebase Auth password.
|
|
*/
|
|
export declare function isPassword(password: any): boolean;
|
|
/**
|
|
* Validates that a string is a valid email.
|
|
*
|
|
* @param email - The string to validate.
|
|
* @returns Whether the string is valid email or not.
|
|
*/
|
|
export declare function isEmail(email: any): boolean;
|
|
/**
|
|
* Validates that a string is a valid phone number.
|
|
*
|
|
* @param phoneNumber - The string to validate.
|
|
* @returns Whether the string is a valid phone number or not.
|
|
*/
|
|
export declare function isPhoneNumber(phoneNumber: any): boolean;
|
|
/**
|
|
* Validates that a string is a valid ISO date string.
|
|
*
|
|
* @param dateString - The string to validate.
|
|
* @returns Whether the string is a valid ISO date string.
|
|
*/
|
|
export declare function isISODateString(dateString: any): boolean;
|
|
/**
|
|
* Validates that a string is a valid UTC date string.
|
|
*
|
|
* @param dateString - The string to validate.
|
|
* @returns Whether the string is a valid UTC date string.
|
|
*/
|
|
export declare function isUTCDateString(dateString: any): boolean;
|
|
/**
|
|
* Validates that a string is a valid web URL.
|
|
*
|
|
* @param urlStr - The string to validate.
|
|
* @returns Whether the string is valid web URL or not.
|
|
*/
|
|
export declare function isURL(urlStr: any): boolean;
|
|
/**
|
|
* Validates that the provided topic is a valid FCM topic name.
|
|
*
|
|
* @param topic - The topic to validate.
|
|
* @returns Whether the provided topic is a valid FCM topic name.
|
|
*/
|
|
export declare function isTopic(topic: any): boolean;
|
|
/**
|
|
* Validates that the provided string can be used as a task ID
|
|
* for Cloud Tasks.
|
|
*
|
|
* @param taskId - the task ID to validate.
|
|
* @returns Whether the provided task ID is valid.
|
|
*/
|
|
export declare function isTaskId(taskId: any): boolean;
|