


type RegistryEntry {
    registrationOptions: TextDocumentRegistrationOptions
    provider: String
}

# union DocumentSelector = DocumentFilter | String

type DocumentFilter {
    language: String!
    schema: String
    pattern: String
}

interface ITextDocumentIdentifier {
    uri: URI
    """
     just to statisfy few issues
    """
    languageId: String
}

type TextDocumentIdentifier implements ITextDocumentIdentifier{
    uri: URI
    languageId: String
}

input TextDocumentIdentifierInput {
    uri: URI
}


type TextDocumentRegistrationOptions {
#    documentSelector: DocumentSelector
    documentSelector: [String]
}

input TextDocumentRegistrationOptionsInput {
    documentSelector: [String]
}

type ProvideTextDocumentLocationSignature implements TextDocumentPositionParams & Location {
    textDocument: TextDocumentIdentifier
    position: Position
    rangeOrUri: Position
    uriRangeOrPosition: String
    range: Position
    uri: String
}

input ProvideTextDocumentLocationSignatureInput {
    textDocument: TextDocumentIdentifierInput
    position: PositionInput
    rangeOrUri: PositionInput
    uriRangeOrPosition: String
    range: PositionInput
    uri: String
}



"""
 Represents a location inside a resource, such as a line
 inside a text file.
"""
interface Location {
  rangeOrUri: Position
  uriRangeOrPosition: String
  range: Position
  uri: String
}


input OpenDocumentTextParamsInput {
  uri: String
  languageId: String
  version: Int
  text: String 
}

input OpenDocumentParamsInput {
  textDocument: OpenDocumentTextParamsInput
}

interface TextDocumentPositionParams {
    textDocument: TextDocumentIdentifier
    position: Position
}

input TextDocumentPositionParamsInput {
    textDocument: TextDocumentIdentifierInput
    position: PositionInput
}




interface Hover {
    contents: MarkupContent
    range: Range
}

enum MarkupKind {
    plaintext
    markdown
}
interface MarkupContent {
    value: String
    kind: MarkupKind
}

type IViewComponentData {
    type: String
    item: TextDocumentItem
    # selections: Selection[]
    isActive: Boolean
}

input IViewComponentDataInput {
    type: String
    item: TextDocumentItemInput
    # selections: Selection[]
    isActive: Boolean
}

"""
 An item to transfer a text document from the client to the server.
"""
type TextDocumentItem implements ITextDocumentIdentifier {
    uri: URI
    """
     The ID of the document's language. This is a well-defined string identifier such as "phython".
    """
    languageId: String
    """
     The document's text content.
    """
    text: String
}

input TextDocumentItemInput {
    uri: String
    languageId: String
    text: String
}

type IWorkspaceRoot {
    url: String
}

input IWorkspaceRootInput {
    url: String
}

type IModel {
    roots: IWorkspaceRoot
    visibleViewComponents: [IViewComponentData]
}

input IModelInput {
    roots: IWorkspaceRootInput
    visibleViewComponents: [IViewComponentDataInput]
}

type  ISwitchMapOperator {
    project: String
}

type IDocumentSelector {
    documentSelector: JSON
}

type IBehaviorSubjectValue {
    provider: String
    registrationOptions: IDocumentSelector
}

type IBehaviorSubject {
    closed: Boolean
    hasError: Boolean
    isStopped: Boolean
    observers: [JSON]
    thrownError: String
    _isScalar: Boolean
    value: [IBehaviorSubjectValue]
}

type IDestinationAnonymousSubject {
    closed: Boolean
    destination: String
    hasError: Boolean
    isStopped: Boolean
    observers: [JSON]
    operator: ISwitchMapOperator
    source: IBehaviorSubject
    thrownError: String
    _isScalar: Boolean
}

type ISourceAnonymousSubject {
    closed: Boolean
    destination: IDestinationAnonymousSubject
    hasError: Boolean
    isStopped: Boolean
    observers: [JSON]
    operator: ISwitchMapOperator
    source: IBehaviorSubject
    thrownError: String
    _isScalar: Boolean
}

type IObservableResult {
    closed: Boolean
    destination: IDestinationAnonymousSubject
    hasError: Boolean
    isStopped: Boolean
    observers: [JSON]
    operator: ISwitchMapOperator
    source: ISourceAnonymousSubject
    thrownError: String
    _isScalar: Boolean
}

extend type Query {
    #getViews(containerId: String!): JSON
    registerProvider(registrationOptions: TextDocumentRegistrationOptionsInput, provider: ProvideTextDocumentLocationSignatureInput): Boolean
}

extend type Mutation {
    codeLenseProviderDefinition(params: TextDocumentPositionParamsInput): Observable
    hoverProviderDefinition(params: TextDocumentPositionParamsInput): Observable
    completionProviderDefinition(params: TextDocumentPositionParamsInput): Observable
    definitionDefinition(params: TextDocumentPositionParamsInput): Observable
    documentHighLightProviderDefinition(params: TextDocumentPositionParamsInput): Observable
    documentFormattingProviderDefinition(params: TextDocumentPositionParamsInput): Observable
    openLanguageDocument(params: OpenDocumentParamsInput): Observable
    referenceProviderDefinition(params: TextDocumentPositionParamsInput): Observable
    renameDefinition(params: TextDocumentPositionParamsInput): Observable
    documentSymbolDefinition(params: TextDocumentPositionParamsInput): Observable
    """
     @deprecated need to remove
    """
    updateModel(model: IModelInput): Boolean
}
