interface EntityMetadata {
            /** Whether a custom activity should appear in the activity menus in the Web application. 0 indicates that the custom activity doesn't appear; 1 indicates that it does appear. */
            ActivityTypeMask: number;
            /** Indicates whether to automatically move records to the owner’s default queue when a record of this type is created or assigned. */
            AutoRouteToOwnerQueue: boolean;
            /** Indicates whether the entity can trigger a workflow process. */
            CanTriggerWorkflow: boolean;
            /** Description for the entity. */
            Description: string;
            /** Plural display name for the entity. */
            DisplayCollectionName: string;
            /** Display name for the entity. */
            DisplayName: string;
            /** Indicates whether the entity will enforce custom state transitions. */
            EnforceStateTransitions: boolean;
            /** The hexadecimal code to represent the color to be used for this entity in the application. */
            EntityColor: string;
            /** The name of the Web API entity set for this entity. */
            EntitySetName: string;
            /** Indicates whether activities are associated with this entity. */
            HasActivities: boolean;
            /** Indicates whether the entity is an activity. */
            IsActivity: boolean;
            /** Indicates whether the email messages can be sent to an email address stored in a record of this type. */
            IsActivityParty: boolean;
            /** Indicates whether the entity is enabled for business process flows. */
            IsBusinessProcessEnabled: boolean;
            /** Indicates whether the entity is a business process flow entity. */
            IsBPFEntity: boolean;
            /** Indicates whether the entity is a child entity. */
            IsChildEntity: boolean;
            /** Indicates whether connections are enabled for this entity. */
            IsConnectionsEnabled: boolean;
            /** Indicates whether the entity is a custom entity. */
            IsCustomEntity: boolean;
            /** Indicates whether the entity is customizable. */
            IsCustomizable: boolean;
            /** Indicates whether document management is enabled. */
            IsDocumentManagementEnabled: boolean;
            /** Indicates whether the documemt recommendations is enabled. */
            IsDocumentRecommendationsEnabled: boolean;
            /** Indicates whether duplicate detection is enabled. */
            IsDuplicateDetectionEnabled: boolean;
            /** Indicates whether charts are enabled. */
            IsEnabledForCharts: boolean;
            /** Indicates whether the entity can be imported using the Import Wizard. */
            IsImportable: boolean;
            /** Indicates the entity is enabled for interactive experience. */
            IsInteractionCentricEnabled: boolean;
            /** Indicates whether knowledge management is enabled for the entity. */
            IsKnowledgeManagementEnabled: boolean;
            /** Indicates whether mail merge is enabled for this entity. */
            IsMailMergeEnabled: boolean;
            /** Indicates whether the entity is part of a managed solution. */
            IsManaged: boolean;
            /** Indicates whether OneNote integration is enabled for the entity. */
            IsOneNoteIntegrationEnabled: boolean;
            /** Indicates whether optimistic concurrency is enabled for the entity. */
            IsOptimisticConcurrencyEnabled: boolean;
            /** Indicates whether the entity is enabled for quick create forms. */
            IsQuickCreateEnabled: boolean;
            /** Indicates whether the entity supports setting custom state transitions. */
            IsStateModelAware: boolean;
            /** Indicates whether the entity is will be shown in Advanced Find. */
            IsValidForAdvancedFind: boolean;
            /** Indicates whether Microsoft Dynamics 365 for tablets users can see data for this entity. */
            IsVisibleInMobileClient: boolean;
            /** Indicates whether the entity is enabled for Unified Interface. */
            IsEnabledInUnifiedInterface: boolean;
            /** The logical collection name. */
            LogicalCollectionName: string;
            /** The logical name for the entity. */
            LogicalName: string;
            /** The entity type code. */
            ObjectTypeCode: number;
            /** The ownership type for the entity: "UserOwned" or "OrganizationOwned". */
            OwnershipType: string;
            /** The name of the attribute that is the primary id for the entity. */
            PrimaryIdAttribute: string;
            /** String	The name of the primary image attribute for an entity. */
            PrimaryImageAttribute: string;
            /** The name of the primary attribute for an entity. */
            PrimaryNameAttribute: string;
            /** The privilege metadata for the entity where each object contains the following attributes to define the security privilege for access to an entity */
            Privileges: Array<EntityPrivilege>;
            /** A collection of attribute metadata objects. The object returned depends on the type of attribute metadata. */
            Attributes: Array<IEntityBaseAttribute | EntityBooleanAttribute | EntityEnumAttribute | EntityPicklistAttribute | EntityStateAttribute | EntityStatusAttribute>;
        }


interface KeyValueString {
            key: string;
            value: string;
        }


interface KeyValueObject {
            key: string,
            value: any
        }


interface KeyValueNumber {
            key: string,
            value: number
        }


interface TextValueNumber {
            text: string,
            value: number
        }


interface DialogAlertOption {
            /** The confirm button label.If you do not specify the button label, OK is used as the button label. */
            confirmButtonLabel?: string;
            /** The message to be displyed in the alert dialog. */
            text: string;
        }


interface DialogConfirmOption {
            /** The cancel button label.If you do not specify the cancel button label, Cancel is used as the button label. */
            cancelButtonLabel?: string;
            /** The confirm button label.If you do not specify the confirm button label, OK is used as the button label. */
            confirmButtonLabel?: string;
            /** The subtitle to be displayed in the confirmation dialog. */
            subtitle?: string;
            /** The message to be displayed in the confirmation dialog. */
            text: string;
            /** The title to be displayed in the confirmation dialog. */
            title?: string;
        }


interface DialogError {
            /** Details about the error. When you specify this, the Download Log File button is available in the error message, and clicking it will let users download a text file with the content specified in this attribute. */
            details?: string;
            /** The error code. If you just set errorCode, the message for the error code is automatically retrieved from the server and displayed in the error dialog.If you specify an invalid errorCode value, an error dialog with a default error message is displayed. */
            errorCode?: number;
            /** The message to be displayed in the error dialog. */
            message?: string;
        }


interface DialogResult {
            /** Indicates whether the confirm button was clicked to close the dialog. */
            confirmed: boolean;
        }


interface FileData {
            /** Contents of the audio file. */
            fileContent: string;
            /** Name of the audio file. */
            fileName: string;
            /** Size of the audio file in KB. */
            fileSize: number;
            /** Audio file MIME type. */
            mimeType: string;
        }


interface FileOption {
            openMode: OptionSet.FileOption
        }


interface FilePickOption {
            /** Image file types to select. */
            accept: OptionSet.FileAccept;
            /** Indicates whether to allow selecting multiple files.  */
            allowMultipleFiles: boolean;
            /** Maximum size of the files(s) to be selected.  */
            maximumAllowedFileSize: number;
        }


interface LookupOption {
            /** Indicates whether the lookup allows more than one item to be selected */
            allowMultiSelect?: boolean;
            /** The default entity type to use */
            defaultEntityType?: string;
            /** The default view to use */
            defaultViewId?: string;
            /** Decides whether to display the most recently used(MRU) item. Available only for Unified Interface */
            disableMru?: boolean;
            /** The entity types to display */
            entityTypes?: Array<string>;
            /** Used to filter the results */
            filters?: Array<LookupFilter>;
            /** Indicates whether the lookup control should show the barcode scanner in mobile clients */
            showBarcodeScanner?: boolean;
            /** The views to be available in the view picker. Only system views are supported */
            viewIds?: Array<string>;
        }


interface LookupFilter {
            /** The FetchXML filter element to apply. */
            filterXml: string;
            /** The entity type to which to apply this filter. */
            entityLogicalName: string
        }


interface DateFormattingInfo {
            AMDesignator: string,
            AbbreviatedDayNames: Array<string>,
            AbbreviatedMonthGenitiveNames: Array<string>,
            AbbreviatedMonthNames: Array<string>,
            CalendarWeekRule: number,
            Calendar: any,
            DateSeparator: string,
            DayNames: Array<string>,
            FirstDayOfWeek: number,
            FullDateTimePattern: string,
            LongDatePattern: string,
            LongTimePattern: string,
            MonthDayPattern: string,
            MonthGenitiveNames: Array<string>,
            MonthNames: Array<string>,
            PMDesignator: string,
            ShortDatePattern: string,
            ShortTimePattern: string,
            ShortestDayNames: Array<string>,
            UniversalSortableDateTimePattern: string,
            SortableDateTimePattern: string,
            TimeSeparator: string,
            YearMonthPattern: string
        }


interface FormOption {
            /** Indicates whether to display the command bar. If you do not specify this parameter, the command bar is displayed by default. */
            cmdbar?: boolean;
            /** Designates a record that will provide default values based on mapped attribute values.  */
            createFromEntity?: EntityReference;
            /** ID of the entity record to display the form for. */
            entityId?: string;
            /** Logical name of the entity to display the form for. */
            entityName?: string;
            /** ID of the form instance to be displayed. */
            formId?: string;
            /** Height of the form window to be displayed in pixels. */
            height?: number;
            /** Controls whether the navigation bar is displayed and whether application navigation is available using the areas and subareas defined in the sitemap. */
            navbar?: OptionSet.FormNavBar;
            /** Indicates whether to display form in a new window. */
            openInNewWindow?: boolean;
            /** Specify one of the following values for the window position of the form on the screen. */
            windowPosition?: OptionSet.FormWindowPosition;
            /**  ID of the business process to be displayed on the form. */
            processId?: string;
            /** ID of the business process instance to be displayed on the form. */
            processInstanceId?: string;
            /** Define a relationship object to display the related records on the form. */
            relationship?: FormRelationship;
            /** ID of the selected stage in business process instance. */
            selectedStageId?: string;
            /** Indicates whether to open a quick create form. If you do not specify this, by default false is passed. */
            useQuickCreateForm?: boolean;
            /**  Width of the form window to be displayed in pixels. */
            width?: number;
        }


interface FormRelationship {
            /** Name of the attribute used for relationship. */
            attributeName: string;
            /** Name of the relationship. */
            name: string;
            /** Name of the navigation property for this relationship. */
            navigationPropertyName: string;
            /** Relationship type. */
            relationshipType: OptionSet.FormRelationshipType;
            /** Role type in relationship.  */
            roleType: OptionSet.FormRelationshipRoleType;
        }


interface ImageOption {
            /**  Indicates whether to edit the image before saving. */
            allowEdit: boolean;
            /** Height of the image to capture. */
            height: number;
            /** Indicates whether to capture image using the front camera of the device. */
            preferFrontCamera: boolean;
            /** Quality of the image file in percentage. */
            quality: number;
            /** Width of the image to capture. */
            width: number;
        }


interface PositionData {
            /** Contains a set of geographic coordinates along with associated accuracy as well as a set of other optional attributes such as altitude and speed. */
            coords: any;
            /** Represents the time when the object was acquired and is represented as DOMTimeStamp. */
            timestamp: any;
        }


interface AppProperty {
            appId: string;
            displayName: string;
            uniqueName: string;
            url: string;
            webResourceId: string;
            webResourceName: string;
            welcomePageId: string;
            welcomePageName: string;
        }


interface SaveOption {
            /** Specify a value indicating how the save event was initiated */
            saveMode?: OptionSet.SaveMode;
            /** Indicate whether to use the Book or Reschedule messages rather than the Create or Update messages. This option is only applicable when used with appointment, recurring appointment, or service activity records */
            useSchedulingEngine: boolean;
        }


interface FieldUserPrivilege {
            canRead: boolean;
            canUpdate: boolean;
            canCreate: boolean;
        }


interface FieldNotification {
            /** A collection of objects */
            actions: Array<FieldNotificationAction>;
            /** The message to display in the notification. In the current release, only the first message specified in this array will be displayed. The string that you specify here appears as bold text in the notification, and is typically used for title or subject of the notification. You should limit your message to 50 characters for optimal user experience */
            messages: Array<string>;
            /** Defines the type of notification */
            notificationLevel: OptionSet.FieldNotificationLevel;
            /** The ID to use to clear this notification when using the clearNotification method */
            uniqueId: string;
        }


interface FieldNotificationAction {
            /** The body message of the notification to be displayed to the user. Limit your message to 100 characters for optimal user experience */
            message: string;
            /** Array of functions. The corresponding actions for the message */
            actions: Array<any>;
        }


interface ProcessStage {
            /**
             * Returns the integer value of the business process flow category
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getcategory
             */
            Category: OptionSet.ProcessCategory;
            /**
             * Returns the logical name of the entity associated with the stage
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getentityname
             */
            EntityName: String;
            /**
             * Returns the unique identifier of the stage
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getid
             */
            Id: string;
            /**
             * Returns the name of the stage
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getname
             */
            Name: string;
            /**
             * Returns the status of the stage
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getstatus
             */
            Status: "active" | "inactive";
            /**
             * Returns a navigation behavior object for a stage that can be used to define whether the Create button is available for users to create other entity record in a cross-entity business process flow navigation scenario. This method is available only for Unified Interface
             * @param callback The function to execute
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getnavigationbehavior
             */
            NavigationBehavior(callback: () => void): void;
            /**
             * Returns a collection of steps in the stage
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/stage/getsteps
             */
            Steps: Array<ProcessStep>;
        }


interface ProcessStep {
            /**
             * Returns the logical name of the attribute associated to the step
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/step/getattribute
             */
            Attribute: string;
            /**
             * Returns the name of the step
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/step/getname
             */
            Name: string;
            /**
             * Returns the progress of the action step. This method is supported only for the action steps; not for the data steps. Action steps are buttons on the business process stages that users can click to trigger an on-demand workflow or action. Action step is a preview feature introduced in the Dynamics 365 for Customer Engagement apps version 9.0 release
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/step/getprogress
             */
            Progress: OptionSet.ProcessProgress;
            /**
             * Returns a boolean value indicating whether the step is required in the business process flow
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/step/isrequired
             * */
            Required: boolean;
            /**
             * Updates the progress of the action step. This method is supported only for the action steps. Action steps are buttons on the business process stages that users can click to trigger an on-demand workflow or action. Action step is a preview feature introduced in the Dynamics 365 for Customer Engagement apps version 9.0 release
             * @param stepProgress Specify the step progress
             * @param message An optional message that is set as the Alt text on the icon for the step
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/step/setprogress
             */
            SetProgress(stepProgress: OptionSet.ProcessProgress, message?: string): void;
        }


interface ProcessInstance {
            /**
             * Returns the unique identifier of the process instance
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/instance/getinstanceid
             */
            InstanceId: string;
            /**
             * Returns the name of the process instance
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/instance/getinstancename
             */
            InstanceName: string;
            /**
             * Returns the current status of the process instance
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/instance/getstatus
             */
            Status: OptionSet.ProcessStatus;
        }


interface ProcessProcess {
            /**
             * Returns the unique identifier of the process
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/process/getid
             */
            Id: string;
            /**
             * Returns the name of the process
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/process/getname
             */
            Name: string;
            /**
             * Returns a boolean value indicating whether the process is rendered
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/process/isrendered
             */
            Rendered: boolean;
            /**
             * Returns a collection of stages in the process
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-data-process/process/getstages
             */
            Stages: Array<ProcessStage>;
        }


interface OptionSetValue {
            /** The optionset number value. E.g.: 1000000001 */
            Value: number;
            /** The optionset formatted text. E.g. "Dynamics 365" */
            readonly FormattedValue: string;
        }


interface OptionSetValueReadonly {
            /** The optionset number value. E.g.: 1000000001 */
            readonly Value: number;
            /** The optionset formatted text. E.g. "Dynamics 365" */
            readonly FormattedValue: string;
        }


interface MultiOptionSetValue {
            /** The optionset number values. E.g.: [1000000001, 1000000003]*/
            Value: Array<number>;
            /** The optionset formatted texts. E.g.: ["Dynamics 2011", "Dynamics 365"] */
            readonly FormattedValue: Array<string>;
        }


interface MultiOptionSetValueReadonly {
            /** The optionset number values. E.g.: [1000000001, 1000000003]*/
            readonly Value: Array<number>;
            /** The optionset formatted texts. E.g.: ["Dynamics 2011", "Dynamics 365"] */
            readonly FormattedValue: Array<string>;
        }


interface BooleanValue {
            /** The boollean value. E.g.: true */
            Value: boolean;
            /** The boolean formatted text. E.g.: "Yes" */
            readonly FormattedValue: string;
        }


interface BooleanValueReadonly {
            /** The boollean value. E.g.: true */
            readonly Value: boolean;
            /** The boolean formatted text. E.g.: "Yes" */
            readonly FormattedValue: string;
        }


interface DateOnlyValue {
            /** The date only value. Always format yyyy-MM-dd. E.g.: "2019-04-30" */
            Value: string;
            /** The date only formatted text, base on user setting format. E.g.: "2019.04.30" */
            readonly FormattedValue: string;
        }


interface DateOnlyValueReadonly {
            /** The date only value. Always format yyyy-MM-dd. E.g.: "2019-04-30" */
            readonly Value: string;
            /** The date only formatted text, base on user setting format. E.g.: "2019.04.30" */
            readonly FormattedValue: string;
        }


interface UtcDateOnlyValue {
            /** The UTC date only value. E.g.: "2019-04-29T17:00:00Z" */
            Value: string;
            /** The UTC date formatted text, base on user setting format. E.g.: "30.04.2019" */
            readonly FormattedValue: string;
        }


interface UtcDateOnlyValueReadonly {
            /** The UTC date only value. E.g.: "2019-04-29T17:00:00Z" */
            readonly Value: string;
            /** The UTC date formatted text, base on user setting format. E.g.: "30.04.2019" */
            readonly FormattedValue: string;
        }


interface UtcDateAndTimeValue {
            /** The UTC date and time value. E.g.: "2019-04-27T07:30:00Z" */
            Value: string;
            /** The UTC date and time formatted text, base on user setting format. E.g.: "27.04.2019 02:30 CH" */
            readonly FormattedValue: string;
        }


interface UtcDateAndTimeValueReadonly {
            /** The UTC date and time value. E.g.: "2019-04-27T07:30:00Z" */
            readonly Value: string;
            /** The UTC date and time formatted text, base on user setting format. E.g.: "27.04.2019 02:30 CH" */
            readonly FormattedValue: string;
        }


interface TimezoneDateOnlyValue {
            /** The time-zone date only value. E.g.: "2019-04-26T00:00:00Z" */
            Value: string;
            /** The time-zone date formatted text, base on user setting format. E.g.: "26.04.2019" */
            readonly FormattedValue: string;
        }


interface TimezoneDateOnlyValueReadonly {
            /** The time-zone date only value. E.g.: "2019-04-26T00:00:00Z" */
            readonly Value: string;
            /** The time-zone date formatted text, base on user setting format. E.g.: "26.04.2019" */
            readonly FormattedValue: string;
        }


interface TimezoneDateAndTimeValue {
            /** The time-zone date and time value. E.g.: "2019-04-28T15:30:00Z" */
            Value: string;
            /** The time-zone date and time formatted text, base on user setting format. E.g.: "28.04.2019 03:30 CH" */
            readonly FormattedValue: string;
        }


interface TimezoneDateAndTimeValueReadonly {
            /** The time-zone date and time value. E.g.: "2019-04-28T15:30:00Z" */
            readonly Value: string;
            /** The time-zone date and time formatted text, base on user setting format. E.g.: "28.04.2019 03:30 CH" */
            readonly FormattedValue: string;
        }


interface IntegerValue {
            /** The integer value. E.g.: 1234567 */
            Value: number;
            /** The integer formatted text, base on user setting format. E.g.: "1.234.567" */
            readonly FormattedValue: string;
        }


interface IntegerValueReadonly {
            /** The integer value. E.g.: 1234567 */
            readonly Value: number;
            /** The integer formatted text, base on user setting format. E.g.: "1.234.567" */
            readonly FormattedValue: string;
        }


interface BigIntValue {
            /** The big integer value. E.g.: 1234567 */
            Value: number;
            /** The big integer formatted text, base on user setting format. E.g.: "1.234.567" */
            readonly FormattedValue: string;
        }


interface BigIntValueReadonly {
            /** The integer value. E.g.: 1234567 */
            readonly Value: number;
            /** The integer formatted text, base on user setting format. E.g.: "1.234.567" */
            readonly FormattedValue: string;
        }


interface DoubleValue {
            /** The double value. E.g.: 1234.57 */
            Value: number;
            /** The double formatted text, base on user setting format. E.g.: "1.234,57" */
            readonly FormattedValue: string;
        }


interface DoubleValueReadonly {
            /** The double value. E.g.: 1234.57 */
            readonly Value: number;
            /** The double formatted text, base on user setting format. E.g.: "1.234,57" */
            readonly FormattedValue: string;
        }


interface DecimalValue {
            /** The decimal value. E.g.: 1234567.89 */
            Value: number;
            /** The decimal formatted text, base on user setting format. E.g.: "1.234.567,89" */
            readonly FormattedValue: string;
        }


interface DecimalValueReadonly {
            /** The decimal value. E.g.: 1234567.89 */
            readonly Value: number;
            /** The decimal formatted text, base on user setting format. E.g.: "1.234.567,89" */
            readonly FormattedValue: string;
        }


interface MoneyValue {
            /** The currency value of field. E.g.: 123456.35 */
            Value: number;
            /** The currency formatted text, base on user setting format. E.g.: "123.456,35 $" */
            readonly FormattedValue: string;
        }


interface MoneyValueReadonly {
            /** The currency value of field. E.g.: 123456.35 */
            readonly Value: number;
            /** The currency formatted text, base on user setting format. E.g.: "123.456,35 $" */
            readonly FormattedValue: string;
        }


interface StringValue {
            /** The string value. E.g.: "A. Datum Corporation (sample)" */
            Value: string;
        }


interface StringValueReadonly {
            /** The string value. E.g.: "A. Datum Corporation (sample)" */
            readonly Value: string;
        }


interface LookupValue {
            /** The guid value. E.g.: f55a0d1e-286b-e911-a997-000d3a802135 */
            Value: string;
            /** The name formatted text. E.g.: "A. Datum Corporation (sample)" */
            readonly FormattedValue: string;
        }


interface LookupValueReadonly {
            /** The guid value. E.g.: f55a0d1e-286b-e911-a997-000d3a802135 */
            readonly Value: string;
            /** The name formatted text. E.g.: "A. Datum Corporation (sample)" */
            readonly FormattedValue: string;
        }


interface GuidValue {
            /** The guid value. E.g.: f55a0d1e-286b-e911-a997-000d3a802135 */
            Value: string;
        }


interface GuidValueReadonly {
            /** The guid value. E.g.: f55a0d1e-286b-e911-a997-000d3a802135 */
            Value: string;
        }


interface ManagedPropertyValue{
            Value: string;
        }


interface ManagedPropertyValueReadonly{
            Value: string;
        }


interface RetrieveMultipleResponse {
            /** An array of JSON objects, where each object represents the retrieved entity record containing attributes and their values as key: value pairs. The Id of the entity record is retrieved by default. */
            entities: Array<DevKit.Core.KeyValueObject>;
            /** If the number of records being retrieved is more than the value specified in the maxPageSize parameter in the request, this attribute returns the URL to return next set of records. */
            nextLink: string;
        }


interface ExecuteRequest {
            /**
             * The name of the bound parameter for the action or function to execute. Specify undefined if you are executing a CRUD request. Specify null if the action or function to execute is not bound to any entity. Specify entity in case the action or function to execute is bound to an entity.
             */
            boundParameter?: "entity" | undefined | null;
            /** Name of the action, function, or one of the following values if you are executing a CRUD request. */
            operationName?: "Create" | "Retrieve" | "RetrieveMultiple" | "Update" | "Delete" | string;
            /** Indicates the type of operation you are executing */
            operationType?: OptionSet.OperationType;
            /** The metadata for parameter types. */
            parameterTypes: {
                /**  The metadata for enum types. The object has two string attributes: name and value */
                enumProperties?: Array<DevKit.Core.KeyValueObject>;
                /** The category of the parameter type.  */
                structuralProperty: OptionSet.StructuralProperty;
            }
        }


interface ExecuteResponse {
            /** Response body. */
            body?: any;
            /** Response headers. */
            headers: any;
            /** Indicates whether the request was successful. */
            ok: boolean;
            /** Numeric value in the response status code.For example: 200 */
            status: number;
            /** Description of the response status code.For example: OK */
            statusText: string;
            /** Response type */
            type: "" | "arraybuffer" | "blob" | "document" | "json" | "text";
            /** Request URL of the action, function, or CRUD request that was sent to the Web API endpoint. */
            url: string;
        }


interface ChangeSetRequest {

        }


interface IControl {
                /**
                 * Returns a string value that represents the type of control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getcontroltype
                 */
                readonly ControlType: OptionSet.FieldControlType;
                /**
                 * Returns a string value that represents the type of attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getattributetype
                 */
                readonly AttributeType: OptionSet.FieldAttributeType;
                /**
                 * Sets a function to be called when the OnChange event occurs
                 * @param successCallback
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/addonchange
                 */
                AddOnChange(successCallback: (executionContext: any) => void): void;
                /**
                 * Causes the OnChange event to occur on the attribute so that any script associated to that event can execute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/fireonchange
                 */
                FireOnChange(): void;
                /**
                 * Sets the focus on the control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setfocus
                 */
                Focus(): void;
                /**
                 * Returns a string value that represents formatting options for the attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getformat
                 */
                readonly Format: OptionSet.FieldFormat;
                /**
                 * Returns a Boolean value indicating if there are unsaved changes to the attribute value
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getisdirty
                 */
                readonly IsDirty: boolean;
                /**
                 * Returns a string representing the logical name of the attribute
                 * Returns the name assigned to the control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getname
                 */
                readonly Name: string;
                /**
                 * Returns a string representing the logical name of the attribute
                 * Returns the name assigned to the control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getname
                 */
                readonly Name2: string;
                /**
                 * Returns the formContext.data.entity object that is the parent to all attributes
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getparent
                 */
                readonly AttributeParent: any;
                /**
                 * Returns a string value indicating whether a value for the attribute is required or recommended
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getrequiredlevel
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setrequiredlevel
                 */
                RequiredLevel: OptionSet.FieldRequiredLevel;
                /**
                 * Returns a string indicating when data from the attribute will be submitted when the record is saved
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getsubmitmode
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setsubmitmode
                 */
                SubmitMode: OptionSet.FieldSubmitMode;
                /**
                 * Returns a boolean value to indicate whether the value of an attribute is valid
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/isvalid
                 */
                readonly Valid: boolean;
                /**
                 * Removes a function from the OnChange event hander for an attribute
                 * @param callback Specifies the function to be removed from the OnChange event
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/removeonchange
                 */
                RemoveOnChange(callback: (executionContext: any) => void): void;
                /**
                 * Displays an error or recommendation notification for a control, and lets you specify actions to execute based on the notification. When you specify an error type of notification, a red "X" icon appears next to the control. When you specify a recommendation type of notification, an "i" icon appears next to the control. On Dynamics 365 for Customer Engagement apps mobile clients, tapping on the icon will display the message, and let you perform the configured action by clicking the Apply button or dismiss the message
                 * @param notification The notification to add
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addnotification
                 */
                AddNotification(notification: DevKit.Core.FieldNotification): void;
                /**
                 * Remove a message already displayed for a control
                 * @param uniqueId The ID to use to clear a specific message that was set using setNotification or addNotification. If the uniqueId parameter isn’t specified, the currently displayed notification will be cleared
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/clearnotification
                 */
                ClearNotification(uniqueId: string): void;
                /**
                 * Displays an error message for the control to indicate that data isn’t valid. When this method is used,  a red "X" icon appears next to the control. On Dynamics 365 for Customer Engagement apps mobile clients, tapping on the icon will display the message
                 * @param message The message to display
                 * @param uniqueId The ID to use to clear this message when using the clearNotification method
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setnotification
                 */
                SetNotification(message: string, uniqueId?: string): void;
                /**
                 * Returns whether the control is disabled
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getdisabled
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setdisabled
                 */
                Disabled: boolean;
                /**
                 * Returns the label for the control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getlabel
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setlabel
                 */
                Label: string;
                /**
                 * Returns a reference to the section object that contains the control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getparent
                 */
                readonly ControlParent: any;
                /**
                 * Returns a value that indicates whether the control is currently visible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getvisible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setvisible
                 */
                Visible: boolean;
                /**
                 * Returns an object with three Boolean properties corresponding to privileges indicating if the user can create, read or update data values for an attribute. This function is intended for use when Field Level Security modifies a user’s privileges for a particular attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getuserprivilege
                 */
                readonly UserPrivilege: DevKit.Core.FieldUserPrivilege;
            }


interface IControlSelectBase extends IControl {
                /**
                 * Returns a value that represents the value set for a Boolean, OptionSet or MultiOptionSet attribute when the form is opened
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getinitialvalue
                 */
                readonly InitialValue: number;
            }


interface IControlTab {
                /**
                 * Adds a function to be called when the TabStateChange event occurs
                 * @param callback The function to be executed on the TabStateChange event. The function will be added to the bottom of the event handler pipeline. The execution context is automatically passed as the first parameter to the function. See Execution context for more information
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/addtabstatechange
                 */
                AddTabStateChange(callback: (executionContext: any) => void): void;
                /**
                 * Get/Set display state of the tab
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/getdisplaystate
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/setdisplaystate
                 */
                DisplayState: OptionSet.TabDisplayState;
                /**
                 * Sets the focus on the tab
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/setfocus
                 * */
                Focus(): void;
                /**
                 * Get/Set the label for the tab
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/getlabel
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/setlabel
                 */
                Label: string;
                /**
                 * Get the name of the tab
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/getname
                 */
                readonly Name: string;
                /**
                 * Get the formContext.ui object containing the tab
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/getparent
                 */
                Parent: any;
                /**
                 * Get/Set a value that indicates whether the tab is currently visible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/getvisible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/setvisible
                 */
                Visible: boolean;
                /**
                 * Removes a function to be called when the TabStateChange event occurs
                 * @param callback The function to be removed from the TabStateChange event
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-tabs/removetabstatechange
                 */
                RemoveTabStateChange(callback: (executionContext: any) => void): void;
            }


interface IControlSelect extends IControlSelectBase {
                /**
                 * Returns an option object with the value matching the argument (label or enumeration value) passed to the method
                 * @param label The label of the option
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getoption
                 */
                Option(label: string): DevKit.Core.TextValueNumber;
                /**
                 * Returns an option object with the value matching the argument (label or enumeration value) passed to the method
                 * @param value The enumeration value of the option
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getoption
                 */
                Option(value: number): DevKit.Core.TextValueNumber;
                /**
                 * Returns an array of option objects representing valid options for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getoptions
                 */
                readonly Options: Array<DevKit.Core.TextValueNumber>;
                /**
                 * Returns a string value of the text for the currently selected option for an optionset or multiselectoptionset attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/gettext
                 */
                readonly Text: string;
                /**
                 * Adds an option to a control
                 * @param option The option to add
                 * @param index The index position to place the new option in. If not provided, the option will be added to the end
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addoption
                 */
                AddOption(option: DevKit.Core.TextValueNumber, index: number): void;
                /**
                 * Clears all options from a control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/clearoptions
                 */
                ClearOptions(): void;
                /**
                 * Removes an option from a control
                 * @param value The value of the option you want to remove
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/removeoption
                 */
                RemoveOption(value: number): void;
            }


interface IControlText extends IControl {
                /**
                 *
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getmaxlength
                 */
                readonly MaxLength: number;
                /**
                 * Retrieves the data value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: string;
                /**
                 * Gets the latest value in a control as the user types characters in a specific text or number field. This method helps you to build interactive experiences by validating data and alerting users as they type characters in a control. The getValue method is different from the attribute getValue method because the control method retrieves the value from the control as the user is typing in the control as opposed to the attribute getValue method that retrieves the value after the user commits (saves) the field
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getvalue
                 */
                Value2: string;
            }


interface IControlNumber extends IControl {
                /**
                 * Returns a number indicating the maximum allowed value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getmax
                 */
                readonly Max: number;
                /**
                 * Returns a number indicating the minimum allowed value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getmin
                 */
                readonly Min: number;
                /**
                 * Returns the number of digits allowed to the right of the decimal point
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getprecision
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setprecision
                 */
                Precision: number;
                /**
                 * Retrieves the data value for an attribute.
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: number;
                /**
                 * Gets the latest value in a control as the user types characters in a specific text or number field. This method helps you to build interactive experiences by validating data and alerting users as they type characters in a control. The getValue method is different from the attribute getValue method because the control method retrieves the value from the control as the user is typing in the control as opposed to the attribute getValue method that retrieves the value after the user commits (saves) the field
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getvalue
                 */
                Value2: string;
            }


interface ControlInteger extends IControlNumber {

            }


interface ControlDecimal extends IControlNumber {

            }


interface ControlDouble extends IControlNumber {

            }


interface ControlMoney extends IControlNumber {

            }


interface ControlString extends IControlText {

            }


interface ControlMemo extends IControlText {

            }


interface ControlDateTime extends IControl {
                /**
                 * Get whether a date control shows the time portion of the date
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getshowtime
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setshowtime
                 */
                ShowTime: boolean;
                                /**
                 * Retrieves the data value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: string;
                /**
                 * Gets the latest value in a control as the user types characters in a specific text or number field. This method helps you to build interactive experiences by validating data and alerting users as they type characters in a control. The getValue method is different from the attribute getValue method because the control method retrieves the value from the control as the user is typing in the control as opposed to the attribute getValue method that retrieves the value after the user commits (saves) the field
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getvalue
                 */
                Value2: string;
            }


interface ControlDate extends IControl {
                                /**
                 * Retrieves the data value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: string;
                /**
                 * Gets the latest value in a control as the user types characters in a specific text or number field. This method helps you to build interactive experiences by validating data and alerting users as they type characters in a control. The getValue method is different from the attribute getValue method because the control method retrieves the value from the control as the user is typing in the control as opposed to the attribute getValue method that retrieves the value after the user commits (saves) the field
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getvalue
                 */
                Value2: string;
            }


interface ControlLookup extends IControl {
                /**
                 * Returns a Boolean value indicating whether the lookup represents a partylist lookup. Partylist lookups allow for multiple records to be set, such as the To: field for an email entity record
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getispartylist
                 */
                readonly IsPartyList: boolean;
                /**
                 * Retrieves the data value for an attribute.
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: Array<DevKit.Core.EntityReference>;
                /**
                 * Adds filters to the results displayed in the lookup. Each filter will be combined with any previously added filters as an “AND” condition. This method can only be used in a function in an event handler for the Lookup Control PreSearch Event
                 * @param filter The fetchXml filter element to apply
                 * @param entityLogicaName If this is set, the filter only applies to that entity type. Otherwise, it applies to all types of entities returned
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addcustomfilter
                 */
                AddCustomFilter(filter: string, entityLogicaName?: string): void;
                /**
                 * Adds a new view for the lookup dialog box. This method doesn’t work with Owner lookups. Owner lookups are used to assign user-owned records
                 * @param viewId The string representation of a GUID for a view
                 * @param entityName The name of the entity
                 * @param viewDisplayName The name of the view
                 * @param fetchXml The fetchXml query for the view
                 * @param layoutXml The XML that defines the layout of the view
                 * @param isDefault Indicates whether the view should be the default view
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addcustomview
                 */
                AddCustomView(viewId: string, entityName: string, viewDisplayName: string, fetchXml: string, layoutXml: string, isDefault: boolean): void;
                /**
                 * Applies changes to lookups based on values current just as the user is about to view results for the lookup
                 * @param callback The function that will be run just before the search to provide results for a lookup occurs. You can use this function to call one of the other lookup control functions and improve the results to be displayed in the lookup. The execution context is automatically passed as the first parameter to this function
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addpresearch
                 */
                AddPreSearch(callback: (executionContext: any) => void): void;
                /**
                 * Returns the ID value of the default lookup dialog view
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getdefaultview
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setdefaultview
                 */
                DefaultView: string;
                /**
                 * Gets the types of entities allowed in the lookup control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getentitytypes
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setentitytypes
                 */
                EntityTypes: Array<string>;
                /**
                 * Removes event handler functions that have previously been set for the PreSearch event
                 * @param callback The function to remove. The execution context is automatically passed as the first parameter to this function
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/removepresearch
                 */
                RemovePreSearch(callback: (executionContext: any) => void): void;
            }


interface ControlKnowledge extends IControl {
                /**
                 * Adds an event handler to the PostSearch event
                 * @param callback The function to add to the PostSearch event. The execution context is automatically passed as the first parameter to this function
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addonpostsearch
                 */
                AddOnPostSearch(callback: (executionContext: any) => void): void;
                /**
                 * Adds an event handler to the OnResultOpened event
                 * @param callback The function to add to the OnResultOpened event. The execution context is automatically passed as the first parameter to this function
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addonresultopened
                 */
                AddOnResultOpened(callback: (executionContext: any) => void): void;
                /**
                 * Adds an event handler to the OnSelection event
                 * @param callback The function to add to the OnSelection event. The execution context is automatically passed as the first parameter to this function
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/addonselection
                 */
                AddOnSelection(callback: (executionContext: any) => void): void;
                /**
                 * Gets the text used as the search criteria for the knowledge base management control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getsearchquery
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setsearchquery
                 */
                SearchQuery: string;
                /**
                 * Gets the count of results found in the search control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/gettotalresultcount
                 */
                readonly TotalResultCount: number;
                /**
                 * Opens a search result in the search control by specifying the result number
                 * @param resultNumber Numerical value specifying the result number to be opened. Result number starts from 1
                 * @param mode Specify "Inline" or "Popout". If you do not specify a value for the argument, the default ("Inline") option is used. The "Inline" mode opens the result inline either in the reading pane of the control or in a reference panel tab in case of reference panel. The "Popout" mode opens the result in a pop-out window
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/opensearchresult
                 */
                OpenSearchResult(resultNumber: number, mode: string): boolean;
                /**
                 * Removes an event handler from the PostSearch event
                 * @param callback The function to remove from the PostSearch event
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/removeonpostsearch
                 */
                RemoveOnPostSearch(callback: () => void): void;
                /**
                 * Removes an event handler from the OnResultOpened event
                 * @param callback The function to remove from the OnResultOpened event
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/removeonresultopened
                 */
                RemoveOnResultOpened(callback: () => void): void;
                /**
                 * Removes an event handler from the OnSelection even
                 * @param callback The function to remove from the OnSelection event
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/removeonselection
                 */
                RemoveOnSelection(callback: () => void): void;
            }


interface ControlWebResource extends IControl {
                /**
                 * Returns the value of the data query string parameter passed to a Silverlight web resource
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getdata
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setdata
                 */
                Data: string;
                /**
                 * Returns the object in the form that represents an IFRAME or web resource
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getobject
                 */
                readonly Object: any;
                /**
                 * Returns the current URL being displayed in an IFRAME or web resource
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getsrc
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setsrc
                 */
                Src: string;
            }


interface ControlIFrame extends IControl {
                /**
                 * Returns the default URL that an IFRAME control is configured to display
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getinitialurl
                 **/
                readonly InitialUrl: string;
                /**
                * Returns the object in the form that represents an IFRAME or web resource
                * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getobject
                */
                readonly Object: any;
                /**
                 * Returns the current URL being displayed in an IFRAME or web resource
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getsrc
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/setsrc
                 */
                Src: string;
            }


interface ControlTimer extends IControl {
                /**
                 * Returns the state of the timer control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/getstate
                 */
                readonly State: number;
                /**
                 * Refreshes the data displayed in a timelinewall and timer control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/refresh
                 */
                Refresh(): void;
            }


interface ControlTimelineWall extends IControl {
                /**
                 * Refreshes the data displayed in a timelinewall and timer control
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/controls/refresh
                 */
                Refresh(): void;
            }


interface ControlNavigationItem {
                /**
                 * Returns the name of the item
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-navigation/getid
                 */
                Id: string;
                /**
                 * Sets the focus on the item
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-navigation/setfocus
                 */
                Focus(): void;
                /**
                 * Returns the label for the item
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-navigation/getlabel
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-navigation/setlabel
                 */
                Label: string;
                /**
                 * Returns a value that indicates whether the item is currently visible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-navigation/getvisible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-navigation/setvisible
                 */
                Visible: boolean;
            }


interface ControlBoolean extends IControlSelectBase {
                /**
                 * Retrieves the data value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: boolean;
            }


interface ControlSection {
                /**
                 * Get the name of the section
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-sections/getname
                 */
                readonly Name: string;
                /**
                 * Get/Set the label for the section
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-sections/getlabel
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-sections/setlabel
                 */
                Label: string;
                /**
                 * Get/Set a value that indicates whether the section is currently visible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-sections/getvisible
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-sections/setvisible
                 */
                Visible: boolean;
                /**
                 * Get the tab containing the section
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/formcontext-ui-sections/getparent
                 */
                Parent: any;
            }


interface ControlOptionSet extends IControlSelect {
                /**
                 * Returns the option object or an array of option objects selected in an optionset or multiselectoptionset attribute respectively
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getselectedoption
                 */
                readonly SelectedOption: DevKit.Core.TextValueNumber;
                /**
                 * Retrieves the data value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: number;            }


interface ControlMultiOptionSet extends IControlSelect {
                /**
                 * Returns the option object or an array of option objects selected in an optionset or multiselectoptionset attribute respectively
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getselectedoption
                 */
                readonly SelectedOption: Array<DevKit.Core.TextValueNumber>
                /**
                 * Retrieves the data value for an attribute
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/getvalue
                 * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/attributes/setvalue
                 */
                Value: Array<number>;
            }


interface ControlGrid {

            }


interface ControlNote {

            }


interface ControlEmailEngagement {

            }


interface ControlEmailRecipient {

            }


interface ControlTimer {

            }


interface ControlMap {

            }


interface ControlActionCards {

            }


interface ControlQuickView {

            }


interface ControlAciWidget {

            }


interface ControlPowerBi {

            }


interface WebApi {
            /**
             * Creates an entity record.
             * @param entityLogicalName Logical name of the entity you want to create. For example: "account".
             * @param data A JSON object defining the attributes and values for the new entity record.
             * @param successCallback A function to call when a record is created. An object will be passed to identify the new record.
             * @param errorCallback
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/createrecord
             */
            CreateRecord(entityLogicalName: string, data: any, successCallback: (result: DevKit.Core.EntityReference) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
            /**
             *
             * @param entityLogicalName The entity logical name of the record you want to delete. For example: "account".
             * @param id GUID of the entity record you want to delete.
             * @param successCallback A function to call when a record is deleted. An object will be passed to identify the deleted record.
             * @param errorCallback A function to call when the operation fails.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/deleterecord
             */
            DeleteRecord(entityLogicalName: string, id: string, successCallback: (result: DevKit.Core.EntityReference) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
            /**
             *
             * @param entityLogicalName The entity logical name of the record you want to retrieve. For example: "account".
             * @param id GUID of the entity record you want to retrieve.
             * @param options OData system query options, $select and $expand, to retrieve your data.
             * @param successCallback A function to call when a record is retrieved. A JSON object with the retrieved properties and values will be passed to the function.
             * @param errorCallback A function to call when the operation fails.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrieverecord
             */
            RetrieveRecord(entityLogicalName: string, id: string, options: string, successCallback: (result: any) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
            /**
             * Retrieves a collection of entity records.
             * @param entityLogicalName The entity logical name of the records you want to retrieve. For example: "account".
             * @param options OData system query options or FetchXML query to retrieve your data.
             * @param maxPageSize Specify a positive number that indicates the number of entity records to be returned per page. If you do not specify this parameter, the default value is passed as 5000.
             * @param successCallback A function to call when entity records are retrieved. An object is passed to the function
             * @param errorCallback A function to call when the operation fails.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrievemultiplerecords
             */
            RetrieveMultipleRecords(entityLogicalName: string, options: string, maxPageSize: number, successCallback: (result: DevKit.WebApi.RetrieveMultipleResponse) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
            /**
             * Updates an entity record.
             * @param entityLogicalName The entity logical name of the record you want to update. For example: "account".
             * @param id GUID of the entity record you want to update.
             * @param data A JSON object containing key: value pairs, where key is the property of the entity and value is the value of the property you want to update.
             * @param successCallback A function to call when a record is updated. An object will be passed to identify the updated record.
             * @param errorCallback
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/updaterecord
             */
            UpdateRecord(entityLogicalName: string, id: string, data: any, successCallback: (result: DevKit.Core.EntityReference) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
            /**
             * Returns a boolean value indicating whether an entity is present in user’s profile and is currently available for use in offline mode.
             * @param entityLogicalName Logical name of the entity. For example: "account".
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/isavailableoffline
             */
            IsAvailableOffline(entityLogicalName: string): boolean;
            /**
             * Execute a single action, function, or CRUD operation.
             * @param request Object that will be passed to the Web API endpoint to execute an action, function, or CRUD request.
             * @param successCallback A function to call when operation is executed successfully. A response object is passed to the function.
             * @param errorCallback A function to call when the operation fails.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/online/execute
             */
            Execute(request: DevKit.WebApi.ExecuteRequest, successCallback: (result: DevKit.WebApi.ExecuteResponse) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
            /**
             * Execute a collection of action, function, or CRUD operations.
             * @param requests An array of one of object types.
             * @param successCallback A function to call when operation is executed suucessfully. An array of response objects are passed to the function.
             * @param errorCallback A function to call when the operation fails.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/online/executemultiple
             */
            ExecuteMultiple(requests: Array<DevKit.WebApi.ExecuteRequest | DevKit.WebApi.ChangeSetRequest>, successCallback: (result: Array<DevKit.WebApi.ExecuteResponse>) => void, errorCallback: (error: DevKit.Core.Error) => void): void;
        }


interface Collections {
            /**
             * Applies the action contained in a delegate function.
             * @param successCallback Delegate function with parameters for item and index.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/collections/foreach
             */
            forEach(successCallback: (item: any, index: number) => void): void;
            /**
             *  Get one or more objects from the collection depending on the arguments passed.
             *  @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/collections/get
             */
            get(): Array<any>;
            /**
             * Get one or more objects from the collection depending on the arguments passed.
             * @param item The object where the name matches the argument. The objects returned in the formContext.data.process namespace don’t contain names. So, using the string parameter for this method returns no objects.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/collections/get
             */
            get(item: string): any;
            /**
             * Get one or more objects from the collection depending on the arguments passed.
             * @param index The object where the index matches the number.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/collections/get
             */
            get(index: number): any;
            /**
             * Get one or more objects from the collection depending on the arguments passed.
             * @param successCallback Any objects that cause the delegate function to return true.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/collections/get
             */
            get(successCallback: (item: any, index: number) => void): Array<any>;
            /**
             * Gets the count of items in the collection.
             * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/collections/getlength
             */
            getLength(): number;
        }


interface Client {
            /**
            *  Returns a value to indicate which client the script is executing in.
            *  @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/client#getclient
            */
            ClientName: OptionSet.ClientName;
            /**
            *  Returns a value to indicate the state of the client.
            *  @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/client#getclientstate
            */
            ClientState: OptionSet.ClientState;
            /**
            *  Returns information about the kind of device the user is using.
            *  @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/client#getformfactor
            */
            FormFactor: OptionSet.FormFactor;
            /**
            *  Returns information whether the server is online or offline
            *  @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/client#isoffline
            */
            IsOffline(): boolean;
        }


interface OrganizationSettings {
            /**
            * Returns attributes and their values as key:value pairs that are available for the organization entity. Additional values will be available as attributes if they are specified as attribute dependencies in the web resource dependency list. The key will be the attribute logical name
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#attributes
            */
            Attributes: Array<DevKit.Core.KeyValueObject>;
            /**
            * Returns the ID of the base currency for the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#basecurrencyid
            */
            BaseCurrencyId: string;
            /**
            * Returns the default country/region code for phone numbers for the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#defaultcountrycode
            */
            DefaultCountryCode: string;
            /**
            * Indicates whether the auto-save option is enabled for the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#isautosaveenabled
            */
            IsAutoSaveEnabled(): boolean;
            /**
            * Returns the preferred language ID for the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#languageid
            */
            LanguageId: number;
            /**
            * Returns the ID of the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#organizationid
            */
            OrganizationId: string;
            /**
            * Returns the unique name of the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#uniquename
            */
            UniqueName: string;
            /**
            * Indicates whether the Skype protocol is used for the current organization
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/organizationsettings#useskypeprotocol
            */
            UseSkypeProtocol: boolean;
        }


interface UserSettings {
            /**
            * Returns the date formatting information for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#dateformattinginfo
            */
            DateFormattingInfo: DevKit.Core.DateFormattingInfo;
            /**
            * Returns the ID of the default dashboard for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#defaultdashboardid
            */
            DefaultDashboardId: string;
            /**
            * Indicates whether guided help is enabled for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#isguidedhelpenabled
            */
            IsGuidedHelpEnabled(): boolean;
            /**
            * Indicates whether high contrast is enabled for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#ishighcontrastenabled
            */
            IsHighContrastEnabled(): boolean;
            /**
            * Indicates whether the language for the current user is a right-to-left (RTL) language
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#isrtl
            */
            IsRTL(): boolean;
            /**
            * Returns the language ID for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#languageid
            */
            LanguageId: number;
            /**
            * Returns an array of strings that represent the GUID values of each of the security role privilege that the user is associated with or any teams that the user is associated with
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#securityroleprivileges
            */
            SecurityRolePrivileges: Array<string>;
            /**
            * Returns an array of strings that represent the GUID values of each of the security role that the user is associated with or any teams that the user is associated with
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#securityroles
            */
            SecurityRoles: Array<string>;
            /**
            * Returns the transaction currency ID for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#transactioncurrencyid
            */
            TransactionCurrencyId: string;
            /**
            * Returns the GUID of the SystemUser.Id value for the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#userid
            */
            UserId: string;
            /**
            * Returns the name of the current user
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#username
            */
            UserName: string;
            /**
            * Returns the difference in minutes between the local time and Coordinated Universal Time (UTC)
            * @link https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/usersettings#gettimezoneoffsetminutes-method
            */
            TimeZoneOffsetMinutes(): number;
        }


interface RetrieveResponse {
        /**
         * Use with asynchronous request.
         * @param callback the callback for asynchronous request.
         */
        then(callback: (result: any) => void): CatchRespone;
        "@odata.context": string;
        /** Use the value of the @odata.nextLink property to request the next set of records. Don’t change or append any additional system query options to the value. */
        "@odata.nextLink": string;
        /** The response @odata.count property will contain the number of entities that match the filter criteria irrespective of an odata.maxpagesize preference limitation. */
        "@odata.count": number;
        /** A paging cookie must be requested as an annotation. And a @Microsoft.Dynamics.CRM.fetchxmlpagingcookie property will be returned with the result. */
        "@Microsoft.Dynamics.CRM.fetchxmlpagingcookie": string;
        /** Set to true if you want retrieve more records. */
        "@Microsoft.Dynamics.CRM.morerecords": boolean;
        /** When you set returntotalrecordcount="true" in FetchXml, this value return the count. */
        "@Microsoft.Dynamics.CRM.totalrecordcount": number;
        /** The total record count limit exceeded value. */
        "@Microsoft.Dynamics.CRM.totalrecordcountlimitexceeded": boolean;
        /** An array object of ODATA value. */
        value: Array<any>;
    }


interface CatchRespone {
        /**
         * Use with asynchronous request.
         * @param callback the callback for asynchronous request.
         */
        catch(callback: (result: any) => void): FinallyRespone;
    }


interface FinallyRespone {
        /**
         * Use with asynchronous request.
         * @param callback the callback for asynchronous request.
         */
        finally(callback: (result: any) => void): DoneRespone;
    }


interface DoneRespone {
        /**
         * Use with asynchronous request
         * @param callback the callback for asynchronous request
         */
        done(callback: (result: any) => void);
    }


interface UpdateResponse {
        /**
         * Use with asynchronous request.
         * @param callback the callback for asynchronous request.
         */
        then(callback: (result: any) => void): CatchRespone;
    }


interface CreateResponse {
        /**
         * Use with asynchronous request.
         * @param callback the callback for asynchronous request.
         */
        then(callback: (result: any) => void): CatchRespone;
    }


interface DeleteResponse {
        /**
         * Use with asynchronous request.
         * @param callback the callback for asynchronous request.
         */
        then(callback: (result: any) => void): CatchRespone;
    }


interface AssociateResponse {
        /**
         * Use with asynchronous request.
         * @param callback The callback for asynchronous request.
         */
        then(callback: (result: any) => void): CatchRespone;
    }


interface DisassociateResponse {
        /**
         * Use with asynchronous request.
         * @param callback The callback for asynchronous request.
         */
        then(callback: (result: any) => void): CatchRespone;
    }


/**  */
enum StructuralProperty {
        /** 0 */
        Unknown,
        /** 1 */
        PrimitiveType,
        /** 2 */
        ComplexType,
        /** 3 */
        EnumerationType,
        /** 4 */
        Collection,
        /** 5 */
        EntityType
    }


/**  */
enum OperationType {
        /** 0 */
        Action,
        /** 1 */
        Function,
        /** 2 */
        CRUD
    }


/**  */
enum RollupState {
        /** 0 - Attribute value is yet to be calculated */
        NotCalculated,
        /** 1 - Attribute value has been calculated per the last update time in <AttributeSchemaName>_Date attribute */
        Calculated,
        /** 2 - Attribute value calculation lead to overflow error */
        OverflowError,
        /** 3 - Attribute value calculation failed due to an internal error, next run of calculation job will likely fix it */
        OtherError,
        /** 4 - Attribute value calculation failed because the maximum number of retry attempts to calculate the value were exceeded likely due to high number of concurrency and locking conflicts */
        RetryLimitExceeded,
        /** 5 - Attribute value calculation failed because maximum hierarchy depth limit for calculation was reached */
        HierarchicalRecursionLimitReached,
        /** 6 - Attribute value calculation failed because a recursive loop was detected in the hierarchy of the record */
        LoopDetected
    }


/** Returns information about the kind of device the user is using. */
enum FormFactor {
        /** 0 */
        Unknown,
        /** 1 */
        Desktop,
        /** 2 */
        Tablet,
        /** 3 */
        Phone,
    }


/** Returns a value to indicate the state of the client. */
enum ClientState {
        /** Online */
        Online,
        /** Offline */
        Offline,
    }


/** Returns a value to indicate which client the script is executing in. */
enum ClientName {
        /** Web */
        Web,
        /** Outlook */
        Outlook,
        /** Mobile */
        Mobile
    }


/** Gets the form type for the record. */
enum FormType {
        /** 0 */
        Undefined,
        /** 1 - Quick Create forms return 1 */
        Create,
        /** 2 */
        Update,
        /** 3 */
        ReadOnly,
        /** 4 */
        Disabled,
        /** 5 */
        BulkEdit,
    }


/** Specify options for saving the record. If no parameter is included in the method, the record will simply be saved. This is the equivalent of using the Save command */
enum SaveOption {
        /** saveandclose - This is the equivalent of using the Save and Close command */
        SaveAndClose,
        /** saveandnew - This is the equivalent of the using the Save and New command */
        SaveAndNew
    }


/** Returns a value indicating how the save event was initiated by the user */
enum SaveMode {
        /** 1 - All entities */
        Save,
        /** 2 - All entities */
        SaveAndClose,
        /** 5 - All entities */
        Deactivate,
        /** 6 - All entities */
        Reactivate,
        /** 7 - Email */
        Send,
        /** 15 - Lead */
        Disqualify,
        /** 16 - Lead */
        Qualify,
        /** 47 - User or Team */
        Assign,
        /** 58 - Activities */
        SaveAsCompleted,
        /** 59 - All entities */
        SaveAndNew,
        /** 70 - All entities */
        AutoSave
    }


/** The level of the message, which defines how the message will be displayed */
enum FormNotificationLevel {
        /** ERROR - Notification will use the system error icon */
        Error,
        /** WARNING - Notification will use the system warning icon */
        Warning,
        /** INFO - Notification will use the system info icon */
        Info
    }


/** Display state of the tab */
enum TabDisplayState {
        /** expanded */
        Expanded,
        /** collapsed */
        Collapsed
    }


/** */
enum ProcessDisplayState {
        /** expanded */
        Expanded,
        /** collapsed */
        Collapsed,
        /** floating */
        Floating
    }