import { Query } from "https://deno.land/x/entsoe_api_client@1.0.1/mod.ts";
Function to request generic documents from the ENTSO-e Rest API
Identifies the fetched document, validates key features and returns an array of typed documents
Will throw if recieving a document other than the ones currently supported, which is
- Publication_MarketDocument
- GL_MarketDocument
- Unavailability_MarketDocument
Note: You should normally determine which document type you'll get
and use the properly typed alternative. Example: If you expect a
Publication document - use QueryPublication()
instead of Query
type
(securityToken: string, params: QueryParameters) => Promise<(PublicationDocument | GLDocument | UnavailabilityDocument)[]>