UNPKG

@contentstack/cli-utilities

Version:

Utilities for contentstack projects

30 lines (29 loc) 1.37 kB
import { ContentstackClient } from '.'; export declare const isAuthenticated: () => boolean; export declare const doesBranchExist: (stack: any, branchName: any) => Promise<any>; export declare const getBranchFromAlias: (stack: ReturnType<ContentstackClient['stack']>, branchAlias: string) => Promise<string>; export declare const isManagementTokenValid: (stackAPIKey: any, managementToken: any) => Promise<{ valid: boolean; message?: undefined; } | { valid: boolean; message: any; } | { valid: string; message: string; }>; export declare const createDeveloperHubUrl: (developerHubBaseUrl: string) => string; export declare const validatePath: (input: string) => boolean; export declare const escapeRegExp: (str: string) => string; export declare const sanitizePath: (str: string) => string; export declare const validateUids: (uid: any) => boolean; export declare const validateFileName: (fileName: any) => boolean; export declare const validateRegex: (str: unknown) => import("recheck").Diagnostics; export declare const formatError: (error: any) => string; /** * The function redactObject takes an object as input and replaces any sensitive keys with the string * '[REDACTED]'. * @param {any} obj - The `obj` parameter is an object that you want to redact sensitive information * from. */ export declare const redactObject: (obj: any) => any;