1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
declare module "@salesforce/apex" {
    /**
     * Identifier for an object's field.
     */
    export interface FieldId {
        /** The field's API name. */
        fieldApiName: string;
        /** The object's API name. */
        objectApiName: string;
    }
 
    /**
     * Services for Apex.
     */
    export interface ApexServices {
        /**
         * Refreshes a property annotated with @wire. Queries the server for updated data and refreshes the cache.
         * @param wiredTargetValue A property annotated with @wire.
         * @returns Promise that resolves to the refreshed value. If an error occurs, the promise is rejected.
         */
        refreshApex: (wiredTargetValue: any) => Promise<any>;
 
        /**
         * Gets a field value from an Apex sObject.
         * @param sObject The sObject holding the field.
         * @param field The field to return.
         * @returns The field's value. If it doesn't exist, undefined is returned.
         */
        getSObjectValue: (sObject: object, field: string | FieldId) => any;
    }
}