doover-js 0.6.3 → 0.6.4

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.
@@ -11,6 +11,12 @@ export interface ListMessagesParams {
11
11
  * index 0.
12
12
  */
13
13
  order?: "asc" | "desc";
14
+ /**
15
+ * Opt into paginated timeseries responses (`getTimeseries` only). When true
16
+ * the server returns a `next` cursor alongside `{ results, count }`; pass it
17
+ * back as `before` to page through results.
18
+ */
19
+ paginate?: boolean;
14
20
  }
15
21
  export interface MessageMutationParams {
16
22
  suppress_response?: boolean;
@@ -121,6 +121,14 @@ describe("MessagesApi overloads + defaults", () => {
121
121
  (0, chai_1.expect)(wireParams.order).to.equal(undefined);
122
122
  (0, chai_1.expect)(wireParams.limit).to.equal(5);
123
123
  });
124
+ it("getTimeseries forwards paginate to the server", async () => {
125
+ const rest = makeRestStub();
126
+ const api = new messages_api_1.MessagesApi(rest);
127
+ await api.getTimeseries("a1", "c1", { limit: 1500, paginate: true });
128
+ const wireParams = rest.calls[0].args[1];
129
+ (0, chai_1.expect)(wireParams.paginate).to.equal(true);
130
+ (0, chai_1.expect)(wireParams.limit).to.equal(1500);
131
+ });
124
132
  });
125
133
  const aggregates_api_1 = require("../apis/aggregates-api");
126
134
  describe("AggregatesApi overloads", () => {
@@ -142,6 +142,7 @@ export interface DataSeriesResult {
142
142
  export interface DataSeries {
143
143
  count: number;
144
144
  results: DataSeriesResult[];
145
+ next?: string | null;
145
146
  __source?: SourceProvenance;
146
147
  }
147
148
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doover-js",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "TypeScript client for Doover.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",