@soos-io/api-client
Version:
This is the SOOS API Client for registered clients leveraging the various integrations to the SOOS platform. Register for a free trial today at https://app.soos.io/register
36 lines (35 loc) • 2.76 kB
TypeScript
import { HashEncodingEnum, IntegrationName, OnFailure, ScanStatus, ScanType } from "./enums";
declare const generatedScanTypes: ScanType[];
declare const isNil: (value: unknown) => value is null | undefined;
declare const ensureValue: <T>(value: T | null | undefined, propertyName: string) => T;
declare const getEnumOptions: <T, TEnumObject extends Record<string, T> = Record<string, T>>(enumObject: TEnumObject, excludeDefault?: keyof TEnumObject) => Array<[string, string | number]>;
declare const ensureEnumValue: <T, TEnumObject extends Record<string, T> = Record<string, T>>(enumObject: TEnumObject, inputValue: string | null | undefined, parameterName?: string, excludeDefault?: keyof TEnumObject, ignoreCase?: boolean) => T | undefined;
declare const sleep: (ms: number) => Promise<unknown>;
declare const isUrlAvailable: (url: string) => Promise<boolean>;
declare const obfuscateProperties: <T extends Record<string, unknown> = Record<string, unknown>>(dictionary: T, properties: Array<keyof T>, replacement?: string) => T;
declare const obfuscateCommandLine: (input: string, argumentsToObfuscate: string[], replacement?: string) => string;
declare const reassembleCommandLine: (argv: string[]) => string;
declare const convertStringToBase64: (content: string) => string;
declare const getEnvVariable: (name: string) => string | null;
declare const formatBytes: (bytes: number, decimals?: number) => string;
declare const generateFileHash: (hashAlgorithm: string, encoding: HashEncodingEnum, digestEncoding: HashEncodingEnum, filePath: string) => string;
declare const isScanDone: (scanStatus: ScanStatus) => boolean;
declare const getAnalysisExitCodeWithMessage: (scanStatus: ScanStatus, integrationName: IntegrationName, onFailure: OnFailure) => {
exitCode: number;
message: string;
};
declare const DateUtilities: {
getDate: (daysAgo?: number) => Date;
getDateFromUnixUTC: (unixUTC: number) => Date;
isWithinDateRange(date: Date, minDate: Date): boolean;
};
declare const StringUtilities: {
pluralizeWord: (count: number | null | undefined, singular: string, plural?: string) => string;
pluralizeTemplate: (count: number | null, singular: string, plural?: string) => string;
fromCamelToTitleCase: (str: string) => string;
areEqual: (a: string, b: string, options?: {
locales?: Array<string>;
} & Intl.CollatorOptions) => boolean;
isEmptyString: (value: string) => boolean;
};
export { generatedScanTypes, isNil, ensureValue, ensureEnumValue, sleep, isUrlAvailable, obfuscateProperties, obfuscateCommandLine, reassembleCommandLine, convertStringToBase64, getEnvVariable, formatBytes, generateFileHash, getAnalysisExitCodeWithMessage, getEnumOptions, DateUtilities, StringUtilities, isScanDone, };