UNPKG

1.4 kBTypeScriptView Raw
1/**
2 * Converts an 18 character Salesforce ID to 15 characters.
3 *
4 * @param id The id to convert.
5 */
6export declare function trimTo15(id: string): string;
7export declare function trimTo15(id?: undefined): undefined;
8export declare function trimTo15(id: string | undefined): string | undefined;
9/**
10 * Tests whether an API version matches the format `i.0`.
11 *
12 * @param value The API version as a string.
13 */
14export declare const validateApiVersion: (value: string) => boolean;
15/**
16 * Tests whether an email matches the format `me@my.org`
17 *
18 * @param value The email as a string.
19 */
20export declare const validateEmail: (value: string) => boolean;
21/**
22 * Tests whether a Salesforce ID is in the correct format, a 15- or 18-character length string with only letters and numbers
23 *
24 * @param value The ID as a string.
25 */
26export declare const validateSalesforceId: (value: string) => boolean;
27/**
28 * Tests whether a path is in the correct format; the value doesn't include the characters "[", "]", "?", "<", ">", "?", "|"
29 *
30 * @param value The path as a string.
31 */
32export declare const validatePathDoesNotContainInvalidChars: (value: string) => boolean;
33export declare const accessTokenRegex: RegExp;
34export declare const sfdxAuthUrlRegex: RegExp;
35/**
36 * Tests whether a given string is an access token
37 *
38 * @param value
39 */
40export declare const matchesAccessToken: (value: string) => boolean;