type maybe = (T | null | undefined) // From // https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describesobjects_describesobjectresult.htm export interface DescribeSObjectResult { activateable: boolean; actionOverrides?: maybe; childRelationships: ChildRelationship[]; compactLayoutable: boolean; createable: boolean; custom: boolean; customSetting: boolean; deletable: boolean; deprecatedAndHidden: boolean; feedEnabled: boolean; fields: Field[]; keyPrefix?: maybe; label: string; labelPlural: string; layoutable: boolean; listviewable?: maybe; lookupLayoutable?: maybe; mergeable: boolean; mruEnabled: boolean; name: string; namedLayoutInfos: NamedLayoutInfo[]; networkScopeFieldName?: maybe; queryable: boolean; recordTypeInfos: RecordTypeInfo[]; replicateable: boolean; retrieveable: boolean; searchable: boolean; searchLayoutable: boolean; supportedScopes: ScopeInfo[]; triggerable: boolean; undeletable: boolean; updateable: boolean; urlDetail?: string; urlEdit?: string; urlNew?: string; urls: Record; } export interface ActionOverride { formFactor: string; isAvailableInTouch: boolean; name: string; pageId: string; url?: maybe; } export interface ChildRelationship { cascadeDelete: boolean; childSObject: string; deprecatedAndHidden: boolean; field: string; junctionIdListNames: string[]; junctionReferenceTo: string[]; relationshipName?: maybe; restrictedDelete: boolean; } export interface Field { aggregatable: boolean; autonumber: boolean; byteLength: number; calculated: boolean; calculatedFormula?: maybe; cascadeDelete: boolean; caseSensitive: boolean; compoundFieldName?: maybe; controllerName?: maybe; createable: boolean; custom: boolean; defaultValue?: maybe; defaultValueFormula?: maybe; defaultedOnCreate: boolean; dependentPicklist: boolean; deprecatedAndHidden: boolean; digits?: maybe; displayLocationInDecimal?: maybe; encrypted?: maybe; externalId: boolean; extraTypeInfo?: maybe; filterable: boolean; filteredLookupInfo?: maybe; formula?: maybe; groupable: boolean; highScaleNumber?: maybe; htmlFormatted :boolean; idLookup: boolean; inlineHelpText?: maybe; label: string; length: number; mask?: maybe; maskType?: maybe; name: string; nameField: boolean; namePointing: boolean; nillable: boolean; permissionable: boolean; picklistValues?: maybe; polymorphicForeignKey: boolean; precision?: maybe; queryByDistance: boolean; relationshipName?: maybe; relationshipOrder?: maybe; referenceTargetField?: maybe; referenceTo?: maybe; restrictedPicklist: boolean; scale: number; searchPrefilterable: boolean; soapType: SOAPType; sortable: boolean; type: FieldType; unique: boolean; updateable: boolean; writeRequiresMasterRead?: maybe; } export type ExtraTypeInfo = | 'imageurl' | 'personname' | 'plaintextarea' | 'richtextarea' | 'switchablepersonname' | 'externallookup' | 'indirectlookup' export type FieldType = | 'string' | 'boolean' | 'int' | 'double' | 'date' | 'datetime' | 'base64' | 'id' | 'reference' | 'currency' | 'textarea' | 'percent' | 'phone' | 'url' | 'email' | 'combobox' | 'picklist' | 'multipicklist' | 'anyType' | 'location' // the following are not found in official documentation, but still occur when describing an sobject | 'time' | 'encryptedstring' | 'address' | 'complexvalue' export interface FilteredLookupInfo { controllingFields: string[]; dependent: boolean; optionalFilter: boolean; } export type SOAPType = | 'tns:ID' | 'xsd:anyType' | 'xsd:base64Binary' | 'xsd:boolean' | 'xsd:date' | 'xsd:dateTime' | 'xsd:double' | 'xsd:int' | 'xsd:string' // the following are not found in official documentation, but still occur when describing an sobject | 'xsd:time' | 'urn:address' | 'urn:JunctionIdListNames' | 'urn:location' | 'urn:RecordTypesSupported' | 'urn:RelationshipReferenceTo' | 'urn:SearchLayoutButtonsDisplayed' | 'urn:SearchLayoutFieldsDisplayed' export interface PicklistEntry { active: boolean; validFor?: maybe; defaultValue: boolean; label?: maybe; value: string; } export interface RecordTypeInfo { available: boolean; defaultRecordTypeMapping: boolean; developerName?: maybe; master: boolean; name: string; recordTypeId: string; urls: Record; } export interface NamedLayoutInfo { name: string; urls: Record; } export interface ScopeInfo { label: string; name: string; } // From // https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describeglobal_describeglobalresult.htm#! export interface DescribeGlobalSObjectResult { activateable: boolean; createable: boolean; custom: boolean; customSetting: boolean; deletable: boolean; deprecatedAndHidden: boolean; feedEnabled: boolean; hasSubtypes: boolean; isSubtype: boolean; keyPrefix: string | null; 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: Record; } export interface DescribeGlobalResult { encoding: string; maxBatchSize: number; sobjects: DescribeGlobalSObjectResult[]; }