diff --git a/src/index.tsx b/src/index.tsx index 4c84046..62c35c4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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; hours?: InputMaybe; minutes?: InputMaybe; - /** Assumes a month is 30 days long */ months?: InputMaybe; /** A second is the base unit and cannot be subdivided */ seconds?: InputMaybe; diff --git a/src/schema.gql b/src/schema.gql index d75c6d2..20dc7d8 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -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 {