1 | import { JsonMap, Optional } from '@salesforce/ts-types';
|
2 | export declare const sfdc: {
|
3 | /**
|
4 | * Converts an 18 character Salesforce ID to 15 characters.
|
5 | *
|
6 | * @param id The id to convert.
|
7 | */
|
8 | trimTo15: (id?: string | undefined) => Optional<string>;
|
9 | /**
|
10 | * Tests whether an API version matches the format `i.0`.
|
11 | *
|
12 | * @param value The API version as a string.
|
13 | */
|
14 | 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 | */
|
20 | 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 | */
|
26 | 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 | */
|
32 | validatePathDoesNotContainInvalidChars: (value: string) => boolean;
|
33 | /**
|
34 | * Returns the first key within the object that has an upper case first letter.
|
35 | *
|
36 | * @param data The object in which to check key casing.
|
37 | * @param sectionBlocklist properties in the object to exclude from the search. e.g. a blocklist of `["a"]` and data of `{ "a": { "B" : "b"}}` would ignore `B` because it is in the object value under `a`.
|
38 | */
|
39 | findUpperCaseKeys: (data?: JsonMap | undefined, sectionBlocklist?: string[]) => Optional<string>;
|
40 | /**
|
41 | * Tests whether a given string is an access token
|
42 | *
|
43 | * @param value
|
44 | */
|
45 | matchesAccessToken: (value: string) => boolean;
|
46 | /**
|
47 | * Tests whether a given url is an internal Salesforce domain
|
48 | *
|
49 | * @param url
|
50 | */
|
51 | isInternalUrl: (url: string) => boolean;
|
52 | };
|