@protobase/client 0.28.1 → 0.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -228,6 +228,7 @@ const createClient = (options = {}) => {
228
228
  filter: filterText(params.filter) || void 0,
229
229
  sum: params.sum,
230
230
  average: params.average,
231
+ maximum: params.maximum,
231
232
  limit: params.limit,
232
233
  label: params.label,
233
234
  granularity: params.granularity,
package/dist/types.d.ts CHANGED
@@ -138,10 +138,10 @@ export type Series = {
138
138
  };
139
139
  export type SeriesParams = {
140
140
  field: string;
141
- range?: '7d' | '30d' | '90d' | '1y' | 'all';
141
+ range?: '1h' | '24h' | '7d' | '30d' | '90d' | '1y' | 'all';
142
142
  from?: string;
143
143
  to?: string;
144
- granularity?: 'hour' | 'day' | 'week' | 'month';
144
+ granularity?: 'minute' | '5_minutes' | '15_minutes' | 'hour' | 'day' | 'week' | 'month';
145
145
  timeZone?: string;
146
146
  };
147
147
  export type AggregateParams = {
@@ -152,13 +152,15 @@ export type AggregateParams = {
152
152
  sum?: string;
153
153
  /** A numeric field to average per group, instead of `sum`. */
154
154
  average?: string;
155
+ /** A numeric field whose largest value per group it reads, instead of `sum`. */
156
+ maximum?: string;
155
157
  /** Value groups only: the most to return, default 100. */
156
158
  limit?: number;
157
159
  /** Value groups only: for a relation, the field of the related record that names each group. */
158
160
  label?: string;
159
161
  /** Date groups only. */
160
- granularity?: 'hour' | 'day' | 'week' | 'month' | 'year';
161
- range?: '7d' | '30d' | '90d' | '1y' | 'all';
162
+ granularity?: 'minute' | '5_minutes' | '15_minutes' | 'hour' | 'day' | 'week' | 'month' | 'year';
163
+ range?: '1h' | '24h' | '7d' | '30d' | '90d' | '1y' | 'all';
162
164
  from?: string;
163
165
  to?: string;
164
166
  timeZone?: string;
@@ -169,13 +171,14 @@ export type AggregateParams = {
169
171
  /** Date groups only, with `splitBy`: for a relation, the field of the related record that names each value. */
170
172
  splitLabel?: string;
171
173
  };
172
- /** One group: its value (a date group's bucket in local ISO time), how many records it holds and its sum or average. */
174
+ /** One group: its value (a date group's bucket in local ISO time), how many records it holds and its sum, average or maximum. */
173
175
  export type AggregateGroup = {
174
176
  value: string | number | boolean | null;
175
177
  label?: string;
176
178
  count: number;
177
179
  sum?: number | null;
178
180
  average?: number | null;
181
+ maximum?: number | null;
179
182
  /** With `splitBy`: the kept split values that have records in this date group, largest first. */
180
183
  splits?: AggregateSplitTotal[];
181
184
  };
@@ -185,6 +188,7 @@ export type AggregateSplitTotal = {
185
188
  count: number;
186
189
  sum?: number | null;
187
190
  average?: number | null;
191
+ maximum?: number | null;
188
192
  };
189
193
  export type Aggregate = {
190
194
  groupBy: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/client",
3
- "version": "0.28.1",
3
+ "version": "0.28.3",
4
4
  "description": "Typed fetch client for the Protobase REST API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@better-auth/passkey": "^1.7.7",
33
- "@protobase/layout": "0.28.1",
34
- "@protobase/schema": "0.28.1",
33
+ "@protobase/layout": "0.28.3",
34
+ "@protobase/schema": "0.28.3",
35
35
  "@simplewebauthn/browser": "^13.3.0",
36
36
  "better-auth": "^1.7.7"
37
37
  }