@stream-io/node-sdk 0.8.13 → 0.8.14
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 +7 -0
- package/__tests__/docs-snippets/README.md +23 -12
- package/dist/index.cjs.js +388 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +388 -20
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChannelApi.d.ts +2 -1
- package/dist/src/gen/chat/ChatApi.d.ts +19 -5
- package/dist/src/gen/feeds/FeedsApi.d.ts +1 -0
- package/dist/src/gen/models/index.d.ts +998 -154
- package/package.json +1 -1
- package/src/gen/chat/ChannelApi.ts +18 -0
- package/src/gen/chat/ChatApi.ts +152 -19
- package/src/gen/common/CommonApi.ts +10 -0
- package/src/gen/feeds/FeedsApi.ts +11 -0
- package/src/gen/model-decoders/decoders.ts +220 -9
- package/src/gen/models/index.ts +1103 -215
- package/src/gen/moderation/ModerationApi.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.14](https://github.com/GetStream/stream-node/compare/v0.8.13...v0.8.14) (2026-10-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add comments, reactions and collections to QueryFeedsUsageStatsResponse ([#379](https://github.com/GetStream/stream-node/issues/379)) ([4572577](https://github.com/GetStream/stream-node/commit/457257701f3aed84c4a0ce17ff7d9f67ed4a552c))
|
|
9
|
+
|
|
3
10
|
## [0.8.13](https://github.com/GetStream/stream-node/compare/v0.8.12...v0.8.13) (2026-10-16)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
# Docs snippet tests
|
|
2
2
|
|
|
3
|
-
Typed tests that run the server-side Node.js snippets of the
|
|
4
|
-
`getstream.io/content/docs/_sidebars/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
Typed tests that run the server-side Node.js snippets of the Stream docs against a real Stream app: the pages of
|
|
4
|
+
these sidebars in `getstream.io/content/docs/_sidebars/` (`SIDEBAR_FILES` in `sync/parse.ts`):
|
|
5
|
+
|
|
6
|
+
- chat: `[chat][node].json`
|
|
7
|
+
- activity feeds (v3): `[activity-feeds][node][v3].json`
|
|
8
|
+
- moderation: `[moderation][node].json`
|
|
9
|
+
- video: `[video][api].json` (the server-side API docs)
|
|
10
|
+
- platform: `[platform][default].json`
|
|
11
|
+
|
|
12
|
+
Only fences labelled `Node.js` are in scope (a fence label, or the `label` of the enclosing `<tabs-item>` on the video pages) (docs fences must always have a label): they are fixed when they are
|
|
13
|
+
wrong. `JavaScript`, `React` and `React Native` fences (client-side code), the stream-chat-js@9 fences (`JavaScript (stream-chat-js@9)`,
|
|
14
|
+
`Node.js (stream-chat-js@9)`) and `Node.js` fences inside a `<disclosure label="... (no SDK)">` block (reference
|
|
8
15
|
implementations without the SDK) are out of scope and are neither tested nor changed.
|
|
9
16
|
|
|
10
17
|
```sh
|
|
@@ -38,6 +45,9 @@ check that notifications or webhook events arrive.
|
|
|
38
45
|
|
|
39
46
|
```
|
|
40
47
|
pages/chat/<docs section>/<page>.test.ts # chat Node.js snippets, run with the server client
|
|
48
|
+
pages/activity-feeds/v3-latest/<docs section>/<page>.test.ts # feeds v3 Node.js snippets
|
|
49
|
+
pages/moderation/<docs section>/<page>.test.ts # moderation Node.js snippets
|
|
50
|
+
pages/video/api/<docs section>/<page>.test.ts # video API Node.js snippets
|
|
41
51
|
pages/platform/<docs section>/<page>.test.ts # platform Node.js snippets
|
|
42
52
|
helpers/ # server client, unique ids, cleanup registry, server-side helpers,
|
|
43
53
|
# waits, leak check, app snapshot, push credentials
|
|
@@ -46,13 +56,14 @@ setup.ts # per-file leak check and app-settin
|
|
|
46
56
|
global-setup.ts # end-of-run sweep: removes leftovers of files that failed while loading
|
|
47
57
|
sync/ # `yarn test:docs:sync` (docs fence <-> test region check)
|
|
48
58
|
maintenance/ # `yarn test:docs:sweep`
|
|
49
|
-
docs-snippets-todo.md # open API spec / generator and node SDK issues
|
|
50
59
|
AGENTS.md # test conventions and API quirks, read before working on a page
|
|
51
60
|
```
|
|
52
61
|
|
|
53
62
|
The path mirrors the docs path (relative to `content/docs`) without `/_default`, e.g.
|
|
54
63
|
`chat/_default/04-messages/01-send_message.md` maps to `pages/chat/04-messages/01-send_message.test.ts`,
|
|
55
|
-
`chat/node/01-quick_start/...` to `pages/chat/node/01-quick_start
|
|
64
|
+
`chat/node/01-quick_start/...` to `pages/chat/node/01-quick_start/...`,
|
|
65
|
+
`activity-feeds/v3-latest/_default/05-activities/01-activities.md` to `pages/activity-feeds/v3-latest/05-activities/01-activities.test.ts`,
|
|
66
|
+
`video/api/01-basics/03-calls.md` to `pages/video/api/01-basics/03-calls.test.ts` and
|
|
56
67
|
`platform/02-identity-and-access/02-users.md` to `pages/platform/02-identity-and-access/02-users.test.ts`.
|
|
57
68
|
|
|
58
69
|
## Conventions
|
|
@@ -74,14 +85,14 @@ await channel.getOrCreate({ data: { created_by_id: creatorId } });
|
|
|
74
85
|
```
|
|
75
86
|
|
|
76
87
|
- **Fence key**:
|
|
77
|
-
- `docs` is the page path relative to `getstream.io/content/docs/` (`chat/...` or `platform/...`).
|
|
88
|
+
- `docs` is the page path relative to `getstream.io/content/docs/` (`chat/...`, `activity-feeds/...`, `moderation/...`, `video/...` or `platform/...`).
|
|
78
89
|
- `heading` is the text of the nearest heading above the fence.
|
|
79
|
-
- `tab` is the fence `label` (or `unlabelled`).
|
|
90
|
+
- `tab` is the fence `label`, else the `label` of the enclosing `<tabs-item>` (or `unlabelled`).
|
|
80
91
|
- `index` is 1-based among fences with the same heading text and tab (default 1).
|
|
81
92
|
- **COPY**: `name="literal"` pairs, applied to the region before comparing (identifier `name` becomes the docs literal). Don't use COPY variables as object keys or shorthand properties.
|
|
82
93
|
- **Comparison**: both sides are formatted with the same prettier options, so quote style and line wrapping don't matter, but any code or comment change does.
|
|
83
|
-
- **Coverage** (checked first): every `Node.js` fence (`js`/`javascript`/`ts`/`typescript`) on the pages of the
|
|
84
|
-
- **Labels**: every JS fence on those pages must be labelled `JavaScript`, `React`, `React Native` or `Node.js`; unlabelled or otherwise labelled JS fences fail.
|
|
85
|
-
- **Excluded pages**: `EXCLUDED_PAGES` in `sync/parse.ts` lists sidebar pages that are deliberately not validated, with a reason. Both checks skip them.
|
|
94
|
+
- **Coverage** (checked first): every `Node.js` fence (`js`/`javascript`/`ts`/`typescript`) on the pages of the tested sidebars (see the top of this file; `$fragment` entries are resolved from `_sidebars/fragments/`), whether or not the page has tests yet, must have a region (inside `it.skip` if it can't run). `JavaScript` / `React` / `React Native` / stream-chat-js@9 fences and comment-only fences are ignored.
|
|
95
|
+
- **Labels**: every JS fence on those pages must be labelled `JavaScript`, `React`, `React Native`, `Node.js`, `JavaScript (stream-chat-js@9)` or `Node.js (stream-chat-js@9)`; unlabelled or otherwise labelled JS fences fail.
|
|
96
|
+
- **Excluded pages and fences**: `EXCLUDED_PAGES` in `sync/parse.ts` lists sidebar pages that are deliberately not validated, with a reason. Both checks skip them. `EXCLUDED_FENCES` does the same for single `Node.js` fences (keyed by fence id) that hold another SDK's code, e.g. Feeds v2 `getstream` client code on the moderation Feeds v2 quick start: not ours to test or update.
|
|
86
97
|
- **`DOCS_SYNC_WRITE=<page path> yarn test:docs:sync`** writes the regions of that page into the docs fences (docs prettier style). Use it to apply a fix to the docs. `DOCS_SYNC_WRITE=1` writes all pages.
|
|
87
98
|
- **`DOCS_DIR`** points at another docs checkout (default: `../getstream.io/content/docs` next to this repo). The check is skipped if the directory doesn't exist.
|