vanhecke/celmex/1.0.0

NOTE: the latest version is 3.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/vanhecke/celmex is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with the same repo name found; no cached copy. Use another version.

Details

Cortex.Api.Xql

XQL: saved queries, available datasets, and tenant quota counters.

type alias Dataset =
{ datasetName : Maybe String
, type_ : Maybe String
, logUpdateType : Maybe String
, lastUpdated : Maybe Int
, totalDaysStored : Maybe Int
, hotRange : Maybe DatasetRange
, coldRange : Maybe DatasetRange
, totalSizeStored : Maybe Int
, averageDailySize : Maybe Int
, totalEvents : Maybe Int
, averageEventSize : Maybe Int
, ttl : Maybe Int
, defaultQueryTarget : Maybe Bool
}

A dataset available to XQL queries, with its retention ranges and size stats.

type alias DatasetRange =
{ from : Maybe Int
, to : Maybe Int
}

Epoch-millisecond from/to range inside Dataset.

type alias Library =
{ queriesCount : Maybe Int
, xqlQueries : List LibraryQuery
}

Saved-query library returned by getLibrary.

type alias LibraryQuery =
{ id : Maybe Int
, name : Maybe String
, description : Maybe String
, queryText : Maybe String
, createdAt : Maybe Int
, createdBy : Maybe String
, createdByPretty : Maybe String
, modifiedAt : Maybe Int
, modifiedBy : Maybe String
, modifiedByPretty : Maybe String
, queryMetadata : Value
, isPrivate : Maybe Bool
, labels : List String
}

A single saved XQL query inside the Library.

type alias Quota =
{ licenseQuota : Maybe Float
, additionalPurchasedQuota : Maybe Float
, usedQuota : Maybe Float
, dailyUsedQuota : Maybe Float
, evalQuota : Maybe Float
, totalDailyRunningQueries : Maybe Int
, totalDailyConcurrentRejectedQueries : Maybe Int
, currentConcurrentActiveQueries : Value
, currentConcurrentActiveQueriesCount : Maybe Int
, maxDailyConcurrentActiveQueryCount : Maybe Int
}

The Cortex tenant returns quota counters as JSON numbers that may carry a decimal component (e.g. 4015.0), even though the OpenAPI schema documents them as integers. We decode every quota field as Float so the values survive roundtripping through the typed decoder without integer coercion dropping the fractional part.

dailyUsedQuota is not listed in the OpenAPI schema but is returned by the API in practice — per CLAUDE.md we capture every field the response contains.

getDatasets : Request (List Dataset)

POST /public_api/v1/xql/get_datasets

POST /public_api/xql_library/get

POST /public_api/v1/xql/get_quota