hydrousdb 3.5.0 → 3.5.1

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/index.d.cts CHANGED
@@ -133,6 +133,25 @@ interface QueryOptions {
133
133
  startAt?: string;
134
134
  endAt?: string;
135
135
  dateRange?: DateRange;
136
+ /**
137
+ * Time-scope shorthand filter — narrows the query to a specific day, month, or year
138
+ * using the record ID prefix convention.
139
+ *
140
+ * Format: `_<type>_<code>`
141
+ * - Day: `_day_YYMMDD` e.g. `_day_260305` → March 5, 2026
142
+ * - Month: `_month_YYMM` e.g. `_month_2603` → March 2026
143
+ * - Year: `_year_YY` e.g. `_year_26` → 2026
144
+ *
145
+ * Maps to `?timeScope=` on the server.
146
+ *
147
+ * @example
148
+ * // All records from March 2026
149
+ * await posts.query({ timeScope: '_month_2603' });
150
+ *
151
+ * // All records from a specific day
152
+ * await posts.query({ timeScope: '_day_260305' });
153
+ */
154
+ timeScope?: string;
136
155
  }
137
156
  interface QueryResult<T = RecordData> {
138
157
  records: (T & RecordResult)[];
package/dist/index.d.ts CHANGED
@@ -133,6 +133,25 @@ interface QueryOptions {
133
133
  startAt?: string;
134
134
  endAt?: string;
135
135
  dateRange?: DateRange;
136
+ /**
137
+ * Time-scope shorthand filter — narrows the query to a specific day, month, or year
138
+ * using the record ID prefix convention.
139
+ *
140
+ * Format: `_<type>_<code>`
141
+ * - Day: `_day_YYMMDD` e.g. `_day_260305` → March 5, 2026
142
+ * - Month: `_month_YYMM` e.g. `_month_2603` → March 2026
143
+ * - Year: `_year_YY` e.g. `_year_26` → 2026
144
+ *
145
+ * Maps to `?timeScope=` on the server.
146
+ *
147
+ * @example
148
+ * // All records from March 2026
149
+ * await posts.query({ timeScope: '_month_2603' });
150
+ *
151
+ * // All records from a specific day
152
+ * await posts.query({ timeScope: '_day_260305' });
153
+ */
154
+ timeScope?: string;
136
155
  }
137
156
  interface QueryResult<T = RecordData> {
138
157
  records: (T & RecordResult)[];
package/dist/index.mjs CHANGED
@@ -559,6 +559,7 @@ function buildQueryParams(options = {}) {
559
559
  if (options.fields !== void 0) params.set("fields", options.fields);
560
560
  if (options.startAfter !== void 0) params.set("cursor", options.startAfter);
561
561
  if (options.startAt !== void 0) params.set("cursor", options.startAt);
562
+ if (options.timeScope !== void 0) params.set("timeScope", options.timeScope);
562
563
  if (options.dateRange?.start !== void 0)
563
564
  params.set("startDate", new Date(options.dateRange.start).toISOString().split("T")[0]);
564
565
  if (options.dateRange?.end !== void 0)