import { Optional } from './util';
/**
 * type defs
 */
export declare type Callback<T, T2 = undefined> = (err: Error | null | undefined, ret?: T, ret2?: T2) => any;
export declare type HttpMethods = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
export declare type HttpRequest = {
    url: string;
    method: HttpMethods;
    headers?: {
        [name: string]: string;
    };
    body?: string;
};
export declare type HttpResponse = {
    statusCode: number;
    headers: {
        [name: string]: string;
    };
    body: string;
};
export declare type Record = {
    [field: string]: any;
    Id?: string;
    attributes?: {
        type: string;
        url: string;
    };
};
export declare type SavedRecord = Record & {
    Id: string;
};
export declare type SaveError = {
    errorCode: string;
    message: string;
    fields?: string[];
};
export declare type SaveResult = {
    success: true;
    id: string;
    errors?: SaveError[];
} | {
    success: false;
    id?: string;
    errors: SaveError[];
};
export declare type RetrieveOptions = {
    allOrNone?: boolean;
    fields?: string[];
    headers?: {
        [name: string]: string;
    };
};
export declare type DmlOptions = {
    allOrNone?: boolean;
    allowRecursive?: boolean;
    headers?: {
        [name: string]: string;
    };
};
export declare type SignedRequestObject = {
    client: {
        oauthToken: string;
    };
};
export declare type Field = {
    aggregatable: boolean;
    autoNumber: boolean;
    byteLength: number;
    calculated: boolean;
    calculatedFormula: Optional<string>;
    cascadeDelete: boolean;
    caseSensitive: boolean;
    compoundFieldName: Optional<string>;
    controllerName: Optional<string>;
    createable: boolean;
    custom: boolean;
    defaultValue: Optional<string>;
    defaultValueFormula: Optional<string>;
    defaultedOnCreate: boolean;
    dependentPicklist: boolean;
    deprecatedAndHidden: boolean;
    digits: number;
    displayLocationInDecimal: boolean;
    encrypted: boolean;
    externalId: boolean;
    extraTypeInfo: Optional<string>;
    filterable: boolean;
    filteredLookupInfo: object;
    groupable: boolean;
    highScaleNumber: boolean;
    htmlFormatted: boolean;
    idLookup: boolean;
    inlineHelpText: Optional<string>;
    label: string;
    length: number;
    mask: Optional<string>;
    maskType: Optional<string>;
    name: string;
    nameField: boolean;
    namePointing: boolean;
    nillable: boolean;
    permissionable: boolean;
    picklistValues: Optional<any[]>;
    precision: number;
    queryByDistance: boolean;
    referenceTargetField: object;
    referenceTo: Optional<string[]>;
    relationshipName: Optional<string>;
    relationshipOrder: Optional<number>;
    restrictedDelete: boolean;
    restrictedPicklist: boolean;
    scale: number;
    soapType: string;
    sortable: boolean;
    type: string;
    unique: boolean;
    updateable: boolean;
    writeRequiresMasterRead: boolean;
};
declare type ActionOverride = {
    formFactor: string;
    isAvailableInTouch: boolean;
    name: string;
    pageId: string;
    url: Optional<string>;
};
declare type ChildRelationship = {
    cascadeDelete: boolean;
    childSObject: Optional<string>;
    deprecatedAndHidden: boolean;
    field: Optional<string>;
    junctionIdListNames: string[];
    junctionReferenceTo: string[];
    relationshipName: Optional<string>;
    restrictedDelete: boolean;
};
declare type NamedLayoutInfo = {
    name: string;
    urls: {
        [key: string]: string;
    };
};
declare type RecordTypeInfo = {
    available: boolean;
    defaultRecordTypeMapping: boolean;
    master: boolean;
    name: string;
    recordTypeId: string;
    urls: {
        [key: string]: string;
    };
};
declare type DescribeSObjectResult_ = {
    activateable: boolean;
    createable: boolean;
    custom: boolean;
    customSetting: boolean;
    deletable: boolean;
    deprecatedAndHidden: boolean;
    feedEnabled: boolean;
    hasSubtypes: boolean;
    isSubtype: boolean;
    keyPrefix: Optional<string>;
    label: string;
    labelPlural: string;
    layoutable: boolean;
    mergeable: boolean;
    mruEnabled: boolean;
    name: string;
    queryable: boolean;
    replicateable: boolean;
    retrieveable: boolean;
    searchable: boolean;
    triggerable: boolean;
    undeletable: boolean;
    updateable: boolean;
    urls: {
        [key: string]: string;
    };
};
export declare type DescribeSObjectResult = DescribeSObjectResult_ & {
    actionOverrides: ActionOverride[];
    childRelationships: ChildRelationship[];
    compactLayoutable: boolean;
    fields: Field[];
    namedLayoutInfos: NamedLayoutInfo[];
    networkScopeFieldName: Optional<string>;
    recordTypeInfos: RecordTypeInfo[];
    searchLayoutable: boolean;
};
export declare type DescribeGlobalResult = {
    encoding: string;
    maxBatchSize: number;
    sobjects: DescribeSObjectResult_[];
};
declare type DescribeColor = {
    color: string;
    context: string;
    theme: string;
};
declare type DescribeIcon = {
    contentType: string;
    height: Optional<number>;
    theme: string;
    url: string;
    width: Optional<number>;
};
declare type WebLinkPosition = 'fullScreen' | 'none' | 'topLeft';
declare type WebLinkType = 'javascript' | 'page' | 'sControl' | 'url';
declare type WebLinkWindowType = 'newWindow' | 'noSidebar' | 'onClickJavaScript' | 'replace' | 'sidebar';
declare type DescribeLayoutButton = {
    behavior: Optional<WebLinkWindowType>;
    colors: Optional<DescribeColor[]>;
    content: Optional<string>;
    contentSource: Optional<WebLinkType>;
    custom: boolean;
    encoding: Optional<string>;
    height: Optional<number>;
    icons: Optional<DescribeIcon[]>;
    label: string;
    menubar: boolean;
    name: string;
    overridden: boolean;
    resizeable: boolean;
    scrollbars: boolean;
    showsLocation: boolean;
    showsStatus: boolean;
    toolbar: boolean;
    url: Optional<string>;
    width: Optional<number>;
    windowPosition: Optional<WebLinkPosition>;
};
declare type DescribeLayoutButtonSection = {
    detailButtons: DescribeLayoutButton[];
};
declare type LayoutComponentType = 'AnalyticsCloud' | 'Canvas' | 'CustomLink' | 'EmptySpace' | 'ExpandedLookup' | 'Field' | 'ReportChart' | 'SControl' | 'Separator' | 'VisualforcePage';
declare type DescribeLayoutComponent = {
    details?: any;
    displayLines: number;
    tabOrder: number;
    type: LayoutComponentType;
    value: Optional<string>;
};
declare type DescribeLayoutItem = {
    editableForNew: boolean;
    editableForUpdate: boolean;
    label: string;
    layoutComponents: DescribeLayoutComponent[];
    placeholder: boolean;
    required: boolean;
};
declare type DescribeLayoutRow = {
    layoutItems: DescribeLayoutItem[];
    numItems: number;
};
declare type DescribeLayoutSection = {
    columns: number;
    heading: string;
    layoutRows: DescribeLayoutRow[];
    parentLayoutId: string;
    rows: number;
    tabOrder: 'LeftToRight' | 'TopToBottom';
    useCollapsibleSection: boolean;
    useHeading: boolean;
};
declare type DescribeQuickActionListItemResult = {
    colors: Optional<DescribeColor[]>;
    iconUrl: Optional<string>;
    icons: Optional<DescribeIcon[]>;
    label: string;
    miniIconUrl: Optional<string>;
    quickActionName: string;
    targetSobjectType: Optional<string>;
    type: 'Create' | 'VisualforcePage';
};
declare type DescribeQuickActionListResult = {
    quickActionListItems: DescribeQuickActionListItemResult[];
};
declare type DescribeRelatedContentItem = {
    describeLayoutItem: DescribeLayoutItem;
};
declare type RelatedContent = {
    relatedContentItems: DescribeRelatedContentItem[];
};
declare type RelatedListColumn = {
    field: string;
    fieldApiName: string;
    format: string;
    label: string;
    lookupId: Optional<string>;
    name: string;
};
declare type RelatedListSort = {
    column: string;
    ascending: boolean;
};
declare type RelatedList = {
    buttons: DescribeLayoutButton[];
    columns: RelatedListColumn[];
    custom: boolean;
    label: string;
    limitRows: number;
    name: Optional<string>;
    sobject: Optional<string>;
    sort: RelatedListSort[];
};
declare type DescribeLayoutSaveOption = {
    defaultValue: boolean;
    isDisplayed: boolean;
    label: string;
    name: string;
    restHeaderName: string;
    soapHeaderName: string;
};
declare type DescribeLayout = {
    buttonLayoutSection: DescribeLayoutButtonSection;
    detailLayoutSections: DescribeLayoutSection[];
    editLayoutSections: DescribeLayoutSection[];
    highlightsPanelLayoutSection: DescribeLayoutSection[];
    multirowEditLayoutSections: DescribeLayoutSection[];
    id: string;
    quickActionList: DescribeQuickActionListResult;
    relatedContent: RelatedContent;
    relatedLists: RelatedList[];
    saveOptions: DescribeLayoutSaveOption[];
};
declare type DescribeLayoutFeedFilter = {
    label: string;
    name: string;
    type: 'AllUpdates' | 'FeedItemType';
};
declare type DescribeLayoutFeedView = {
    feedFilters: DescribeLayoutFeedFilter[];
};
declare type RecordTypeMapping = any;
export declare type DescribeLayoutResult = {
    feedView: Optional<DescribeLayoutFeedView[]>;
    layouts: DescribeLayout[];
    recordTypeMappings: RecordTypeMapping[];
    recordTypeSelectorRequired: boolean[];
};
export declare type DescribeCompactLayout = {
    actions: DescribeLayoutButton[];
    fieldItems: DescribeLayoutItem[];
    id: Optional<string>;
    imageItems: DescribeLayoutItem[];
    label: string;
    name: string;
    objectType: string;
};
declare type RecordTypeCompactLayoutMapping = {
    available: boolean;
    compactLayoutId: Optional<string>;
    compactLayoutName: string;
    recordTypeId: string;
    recordTypeName: string;
};
export declare type DescribeCompactLayoutsResult = {
    compactLayouts: DescribeCompactLayout[];
    defaultCompactLayoutId: Optional<string>;
    recordTypeCompactLayoutMappings: RecordTypeCompactLayoutMapping[];
};
declare type DescribeApprovalLayout = {
    id: string;
    label: string;
    layoutItems: DescribeLayoutItem[];
    name: string;
};
export declare type DescribeApprovalLayoutsResult = {
    approvalLayouts: DescribeApprovalLayout[];
};
export declare type DescribeTab = {
    colors: Optional<DescribeColor[]>;
    custom: boolean;
    iconUrl: string;
    icons: Optional<DescribeIcon[]>;
    label: string;
    miniIconUrl: string;
    name: string;
    sobjectName: string;
    url: string;
};
export declare type DescribeTheme = {
    themeItems: Array<{
        colors: Optional<DescribeColor[]>;
        icons: Optional<DescribeIcon[]>;
        name: string;
    }>;
};
export declare type DescribeQuickActionResult = {
    actionEnumOrId: string;
    label: string;
    name: string;
    type: string;
    urls: {
        [key: string]: string;
    };
};
declare type DescribeQuickActionDefaultValue = any;
export declare type DescribeQuickActionDetailResult = DescribeQuickActionResult & {
    canvasApplicationId: Optional<string>;
    canvasApplicationName: Optional<string>;
    colors: Optional<DescribeColor[]>;
    defaultValues: Optional<DescribeQuickActionDefaultValue[]>;
    height: Optional<number>;
    iconName: Optional<string>;
    iconUrl: Optional<string>;
    icons: Optional<DescribeIcon[]>;
};
export declare type DeletedResult = {
    deletedRecords: Array<{
        id: string;
        deletedDate: string;
    }>;
    earliestDateAvailable: string;
    latestDateCovered: string;
};
export declare type UpdatedResult = {
    ids: string[];
    latestDateCovered: string;
};
export declare type OrganizationLimitsInfo = {
    [key: string]: {
        Max: number;
        Remaining: number;
    };
};
export {};
