@onlyworlds/sdk 4.43.0 → 4.44.0
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/CHANGELOG.md +5 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.44.0] - 2026-10-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `changes({ after })` and `changesAll(since, { after })`: keel #514 (PR 152, D142, live 2026-10-22 00:55), `GET /changes?after=<ISO time>` returns only the changes made at or after that time, a filter and not a position: order, `cursor`, `has_more` and `head` are unchanged, and the window is read by passing the cursor back as `since` with the same `after`. A bad value is a 422 naming `after`.
|
|
12
|
+
|
|
8
13
|
## [4.43.0] - 2026-10-22
|
|
9
14
|
|
|
10
15
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -3075,10 +3075,17 @@ declare class OwV2Client {
|
|
|
3075
3075
|
* Citizenship: heaviest route on the platform; default page size is polite.
|
|
3076
3076
|
* keel sends the cursor of a page at the head as a number (an empty page, for a key
|
|
3077
3077
|
* whose cursor carries no epoch); it is handed back as a string, like every cursor here.
|
|
3078
|
+
* `after` (keel #514, D142): only the changes made at or after an ISO 8601 time (`updated_at` of an
|
|
3079
|
+
* upsert, `deleted_at` of a delete; no offset means UTC). A filter, not a position: the order,
|
|
3080
|
+
* `cursor`, `has_more` and `head` are as without it, so to read the whole window pass the cursor
|
|
3081
|
+
* back as `since` with the same `after` until `has_more` is false (`changesAll` does). "Since
|
|
3082
|
+
* yesterday" by the clock; a kept cursor is still the exact "since my last visit". Anything
|
|
3083
|
+
* that is not a date and time is a 422 naming `after`.
|
|
3078
3084
|
*/
|
|
3079
3085
|
changes(opts?: {
|
|
3080
3086
|
since?: string;
|
|
3081
3087
|
limit?: number;
|
|
3088
|
+
after?: string;
|
|
3082
3089
|
}): Promise<OwChangesPage>;
|
|
3083
3090
|
/**
|
|
3084
3091
|
* GET /changes?head=true -- where the feed is now, without a page: no element is read.
|
|
@@ -3105,7 +3112,9 @@ declare class OwV2Client {
|
|
|
3105
3112
|
* return value; persist it for the next incremental pull (with the last page's
|
|
3106
3113
|
* `head` and `epoch`: the view epoch the walk ran under, for a guest or a contributor).
|
|
3107
3114
|
*/
|
|
3108
|
-
changesAll(since?: string
|
|
3115
|
+
changesAll(since?: string, opts?: {
|
|
3116
|
+
after?: string;
|
|
3117
|
+
}): AsyncGenerator<OwChange, {
|
|
3109
3118
|
cursor: string;
|
|
3110
3119
|
head: number;
|
|
3111
3120
|
epoch: number | null;
|
package/dist/index.js
CHANGED
|
@@ -558,9 +558,15 @@ var OwV2Client = class {
|
|
|
558
558
|
* Citizenship: heaviest route on the platform; default page size is polite.
|
|
559
559
|
* keel sends the cursor of a page at the head as a number (an empty page, for a key
|
|
560
560
|
* whose cursor carries no epoch); it is handed back as a string, like every cursor here.
|
|
561
|
+
* `after` (keel #514, D142): only the changes made at or after an ISO 8601 time (`updated_at` of an
|
|
562
|
+
* upsert, `deleted_at` of a delete; no offset means UTC). A filter, not a position: the order,
|
|
563
|
+
* `cursor`, `has_more` and `head` are as without it, so to read the whole window pass the cursor
|
|
564
|
+
* back as `since` with the same `after` until `has_more` is false (`changesAll` does). "Since
|
|
565
|
+
* yesterday" by the clock; a kept cursor is still the exact "since my last visit". Anything
|
|
566
|
+
* that is not a date and time is a 422 naming `after`.
|
|
561
567
|
*/
|
|
562
568
|
async changes(opts = {}) {
|
|
563
|
-
const query = buildQuery({ since: opts.since, limit: opts.limit ?? this.changesPageSize });
|
|
569
|
+
const query = buildQuery({ since: opts.since, limit: opts.limit ?? this.changesPageSize, after: opts.after });
|
|
564
570
|
const page = await this.request("GET", "/changes/", { query });
|
|
565
571
|
return { ...page, cursor: String(page.cursor) };
|
|
566
572
|
}
|
|
@@ -589,11 +595,11 @@ var OwV2Client = class {
|
|
|
589
595
|
* return value; persist it for the next incremental pull (with the last page's
|
|
590
596
|
* `head` and `epoch`: the view epoch the walk ran under, for a guest or a contributor).
|
|
591
597
|
*/
|
|
592
|
-
async *changesAll(since) {
|
|
598
|
+
async *changesAll(since, opts = {}) {
|
|
593
599
|
let cursor = since;
|
|
594
600
|
let page;
|
|
595
601
|
do {
|
|
596
|
-
page = await this.changes({ since: cursor });
|
|
602
|
+
page = await this.changes({ since: cursor, after: opts.after });
|
|
597
603
|
for (const op of page.changes) yield op;
|
|
598
604
|
cursor = page.cursor;
|
|
599
605
|
} while (page.has_more);
|