Add calendar aligned months #59

Merged
countablecloud merged 1 commits from mk/calendar-months into master 2024-09-20 21:15:47 -06:00
2 changed files with 15 additions and 5 deletions

View File

@ -145,6 +145,7 @@ export type DateRangeFilter = {
export type DatetimeRangeAggregationInput = {
endDatetime: Scalars["DateTime"]["input"];
feature?: Scalars["String"]["input"];
interval: TimeInterval;
startDatetime: Scalars["DateTime"]["input"];
};
@ -1914,10 +1915,15 @@ export type TargetMetricsGql = {
};
export type TimeInterval = {
/**
* Example usage:
* True eg 1/15-3/15 => [(1/15,1/31), (2/1,2/28), (3/1,3/15)]
* False eg 1/15-2/15 => [(1/15,2/15), (2/16,3/15)]
*/
calendarAlignedMonths?: Scalars["Boolean"]["input"];
days?: InputMaybe<Scalars["Int"]["input"]>;
hours?: InputMaybe<Scalars["Int"]["input"]>;
minutes?: InputMaybe<Scalars["Int"]["input"]>;
/** Assumes a month is 30 days long */
months?: InputMaybe<Scalars["Int"]["input"]>;
/** A second is the base unit and cannot be subdivided */
seconds?: InputMaybe<Scalars["Int"]["input"]>;

View File

@ -99,6 +99,7 @@ input DatetimeRangeAggregationInput {
startDatetime: DateTime!
endDatetime: DateTime!
interval: TimeInterval!
feature: String! = "created_at"
}
"""
@ -115,16 +116,19 @@ input TimeInterval {
hours: Int = 0
days: Int = 0
weeks: Int = 0
"""
Assumes a month is 30 days long
"""
months: Int = 0
"""
Assumes a year is 365 days long
"""
years: Int = 0
"""
Example usage:
True eg 1/15-3/15 => [(1/15,1/31), (2/1,2/28), (3/1,3/15)]
False eg 1/15-2/15 => [(1/15,2/15), (2/16,3/15)]
"""
calendarAlignedMonths: Boolean! = true
}
input FilterInput @oneOf {