Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments for fields in the response for nodejs/query endpoint #4707

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions static/nodejs_server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,29 @@ export interface TileResult {

// Properties to use for drawing a single chart
export interface ChartProps {
// DCID of the place shown in the chart. If it's a chart that shows children
// places such as map or ranking, this is the DCID of the parent place.
place: string;
// Type of place shown in the chart if it's a chart that shows children places
enclosedPlaceType: string;
chejennifer marked this conversation as resolved.
Show resolved Hide resolved
// Details about the variables to show in the chart including their DCIDs,
// units, denominators, etc.
statVarSpec: StatVarSpec[];
// Details about the chart including the title, type of chart, etc.
tileConfig: TileConfig;
// Event type information to be used by this chart. The key is the event
// type id and the value is the spec for that event type.
eventTypeSpec: Record<string, EventTypeSpec>;
}

// Debug info to return in /nodejs/query response
export interface DebugInfo {
timing: {
// The time it took to generate the chart configurations for a given query
getNlResult: number;
// The time it took to generate results given the chart configurations
getTileResults: number;
// The total time it took to get from query to the results
total: number;
};
// debug info from detect-and-fulfill endpoint
Expand Down
Loading