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", () => {
|
package/dist/types/common.d.ts
CHANGED