@crowdedkingdoms/crowdyjs 18.27.0 → 18.29.0-dev.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.
Files changed (37) hide show
  1. package/MIGRATION.md +41 -0
  2. package/README.md +21 -15
  3. package/dist/binary-wire.d.ts +1 -0
  4. package/dist/binary-wire.d.ts.map +1 -1
  5. package/dist/binary-wire.js +14 -0
  6. package/dist/default-origin.d.ts +6 -6
  7. package/dist/default-origin.d.ts.map +1 -1
  8. package/dist/default-origin.js +6 -6
  9. package/dist/domains/chunks.d.ts +24 -15
  10. package/dist/domains/chunks.d.ts.map +1 -1
  11. package/dist/domains/chunks.js +24 -15
  12. package/dist/domains/gameApps.d.ts +7 -4
  13. package/dist/domains/gameApps.d.ts.map +1 -1
  14. package/dist/domains/gameApps.js +7 -4
  15. package/dist/domains/voxels.d.ts +22 -16
  16. package/dist/domains/voxels.d.ts.map +1 -1
  17. package/dist/domains/voxels.js +22 -16
  18. package/dist/generated/graphql-schema.d.ts +62 -28
  19. package/dist/generated/graphql-schema.d.ts.map +1 -1
  20. package/dist/generated/graphql.d.ts +10 -0
  21. package/dist/generated/graphql.d.ts.map +1 -1
  22. package/dist/generated/graphql.js +2 -2
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/live-coding/assets/browser-authoring-index.json +1 -1
  27. package/dist/live-coding/assets/manifest.json +1 -1
  28. package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
  29. package/dist/live-coding/browser-authoring-index.generated.js +101 -10
  30. package/dist/realtime.d.ts +7 -0
  31. package/dist/realtime.d.ts.map +1 -1
  32. package/dist/realtime.js +4 -0
  33. package/dist/stores/session.d.ts.map +1 -1
  34. package/dist/stores/session.js +1 -0
  35. package/dist/types.d.ts +26 -1
  36. package/dist/types.d.ts.map +1 -1
  37. package/package.json +1 -1
package/MIGRATION.md CHANGED
@@ -120,6 +120,47 @@ super-admin's session). There is no SDK replacement.
120
120
  `dev`'s SDL after #417 merged (`npm run schema:sync:paths -- --schema <that schema.gql>`, then
121
121
  `npm run codegen`).
122
122
 
123
+ ## 18.29.0: a replaced chunk says so
124
+
125
+ **What it needs.** ck-api `v2.68.0` (cks-game-api #654) for the GraphQL proxy: the
126
+ `udpNotifications` document selects `ChunkChangedNotification`, which an older Game API refuses as
127
+ a whole subscription. The binary relay needs nothing new. The notification itself comes from the
128
+ realtime servers' `v0.45.0`.
129
+
130
+ **What changes for a game.**
131
+
132
+ - `chunkChanged` (a handler, a World Stores bus key, `ChunkChangedNotification`) fires when a chunk
133
+ near the player was replaced as a whole by a hub's or mod's `world.set_chunk`. It carries the
134
+ chunk and its new `updatedAtMs`: read the chunk again (`chunks.get`, or `chunks.byDistance` with
135
+ `since`). It comes instead of a voxel update per voxel, so a game that ignores it sees the
136
+ change only on its next read.
137
+
138
+ ## 18.28.0: region reads take a box, a `since` and stable pages
139
+
140
+ **What it needs.** ck-api `v2.67.0` (cks-game-api #652): `gameApps.nearbyGrids` selects
141
+ `permissionKeys`, which older releases refuse as a whole query. The other changes are inputs.
142
+
143
+ **What changes for a game.**
144
+
145
+ - `chunks.byDistance` and `voxels.listByDistance` take a box, `lowChunk` and `highChunk`
146
+ (inclusive, either order, at most 4,913 chunks), instead of `centerCoordinate` and
147
+ `maxDistance`: a client streaming the world as the player walks reads only the slab a step
148
+ uncovers. Give one region or the other; both is `BAD_USER_INPUT`.
149
+ - Pages are stable: a cube comes nearest first and then by x, y, z, a box by x, y, z, so each
150
+ chunk is on exactly one page. `limit` and `skip` in the answer are the values applied (1000
151
+ and 0 by default), not `null`.
152
+ - `chunks.byDistance` takes `since`: only chunks whose stored row was written at or after it
153
+ (`updateChunk`, `updateChunkState`, `updateChunkLods`). Single voxel edits do not move it; read
154
+ those with `voxels.listByDistance`'s `since`.
155
+ - `voxels.list` pages: `limit` (1-65,536, the default) and `skip`, ordered by position. It was
156
+ newest first and unbounded; `chunks.voxelList` is its first page.
157
+ - `gameApps.nearbyGrids` returns each grid's `permissionKeys` for the caller, so a game can grey
158
+ out a build tool or draw claim borders before an edit is refused. The grid that decides a voxel
159
+ edit is the smallest one covering its chunk (the lower `gridId` on a tie), and the edit needs
160
+ `update_voxel_data` there.
161
+ - `voxels.listByDistance` reads the edit log alone, so it returns edits in chunks whose grid was
162
+ never stored.
163
+
123
164
  ## 18.27.0: a new account confirms its email before it plays
124
165
 
125
166
  **What it needs.** Nothing new: the release selects nothing ck-api `v2.64.0` lacks.
package/README.md CHANGED
@@ -12,24 +12,30 @@ gameplay, minted per app through `client.portal`.
12
12
 
13
13
  Start here:
14
14
 
15
- - [SDK guide](https://docs.crowdedkingdoms.com/crowdyjs/readme) — the canonical
15
+ - [SDK guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/readme) — the canonical
16
16
  walkthrough of everything in this README.
17
- - [Build a game](https://docs.crowdedkingdoms.com/build-a-game/intro) — a
17
+ - [Build a game](https://docs.dev.crowdedkingdoms.com/build-a-game/intro) — a
18
18
  hands-on tutorial from sign-in to a playable voxel game.
19
- - [Platform overview](https://docs.crowdedkingdoms.com/overview/client-workflow)
19
+ - [Platform overview](https://docs.dev.crowdedkingdoms.com/overview/client-workflow)
20
20
  — how a client session flows through the platform.
21
21
 
22
22
  ## Install
23
23
 
24
24
  ```bash
25
- npm install @crowdedkingdoms/crowdyjs
25
+ npm install @crowdedkingdoms/crowdyjs@dev
26
26
  ```
27
27
 
28
+ This README is the `dev` branch's: it documents the release on the `dev` dist-tag
29
+ (`npm view @crowdedkingdoms/crowdyjs dist-tags`), and its links go to the dev docs site. A
30
+ plain `npm install` resolves `latest`, the production release, which has no `client.exec`.
31
+
28
32
  **Server compatibility.** A release selects fields the Game API it was built against has,
29
33
  so it needs that Game API or newer; promote the Game API before the SDK on each tier.
30
34
 
31
35
  | CrowdyJS | Needs the Game API (ck-api) |
32
36
  | --- | --- |
37
+ | 18.29.0 | v2.68.0 or later for the GraphQL proxy (`udpNotifications` selects `ChunkChangedNotification`) |
38
+ | 18.28.0 | v2.67.0 or later (`gameApps.nearbyGrids` selects `permissionKeys`) |
33
39
  | 18.27.0 | v2.64.0 or later (`isEmailConfirmationRequiredError` reads a code v2.65.0 sends) |
34
40
  | 18.26.0 | v2.64.0 or later (app reads and `apps.update` select `idleTimeoutSeconds` and `effectiveIdleTimeoutSeconds`) |
35
41
  | 18.25.0 | v2.61.0 or later (app reads and `apps.update` select `hasSafetyModerator`; `platform.territoryPolicies` selects `regionCode`) |
@@ -222,8 +228,8 @@ Notes:
222
228
  - Use `client.auth.setToken(token)` to seed a token externally (e.g. when
223
229
  restoring auth from a non-default storage).
224
230
 
225
- Deeper reading: [Portals & app-scoped tokens](https://docs.crowdedkingdoms.com/management-api/portals-and-app-tokens)
226
- and [Sign in](https://docs.crowdedkingdoms.com/management-api/authentication).
231
+ Deeper reading: [Portals & app-scoped tokens](https://docs.dev.crowdedkingdoms.com/management-api/portals-and-app-tokens)
232
+ and [Sign in](https://docs.dev.crowdedkingdoms.com/management-api/authentication).
227
233
 
228
234
  ### Org-managed players
229
235
 
@@ -515,7 +521,7 @@ query AppForRouting($appId: BigInt!) {
515
521
  `CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
516
522
  that app's app-scoped token, then drive gameplay through that client. Apps
517
523
  with no `gameApiUrl` keep working against the default `httpUrl` you
518
- configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
524
+ configured. See [Loading an app's Game API](https://docs.dev.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
519
525
 
520
526
  ## Realtime notifications
521
527
 
@@ -968,7 +974,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
968
974
  WebSocket events (not `requestAnimationFrame`), so render loops read freely
969
975
  and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
970
976
  keep timer-driven sends at full rate while hidden. See the
971
- [World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
977
+ [World Stores guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/stores).
972
978
 
973
979
  ## Game Kit
974
980
 
@@ -1046,7 +1052,7 @@ The protocol is held to ck-exec's golden record of the starters
1046
1052
  (`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
1047
1053
  `test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
1048
1054
  helpers went with the game model in 18.0.0; the hub modules replace them. See the
1049
- [Game Kit docs](https://docs.crowdedkingdoms.com/game-kit/intro) and
1055
+ [Game Kit docs](https://docs.dev.crowdedkingdoms.com/game-kit/intro) and
1050
1056
  [MIGRATION.md](MIGRATION.md).
1051
1057
 
1052
1058
  ## ck-exec
@@ -1110,7 +1116,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
1110
1116
  `{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
1111
1117
  milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
1112
1118
  hub's integer fields refuse). The wire format is in the
1113
- [ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
1119
+ [ck-exec docs](https://docs.dev.crowdedkingdoms.com/exec/intro).
1114
1120
 
1115
1121
  ### A mod's CLIENT half
1116
1122
 
@@ -1181,7 +1187,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
1181
1187
  module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
1182
1188
  grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
1183
1189
  `prompt.authorId` is the player. See
1184
- [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
1190
+ [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves).
1185
1191
 
1186
1192
  ## Hosting your game
1187
1193
 
@@ -1194,7 +1200,7 @@ set response headers. Then, in Studio, open the app's
1194
1200
  origin as the app's **Launch URL**. The redirect URI is what admits the origin to CORS
1195
1201
  and to the hosted sign-in return, so `portal.signIn` works there as in the
1196
1202
  [Quick start](#quick-start).
1197
- [Host your game](https://docs.crowdedkingdoms.com/build-a-game/host-your-game)
1203
+ [Host your game](https://docs.dev.crowdedkingdoms.com/build-a-game/host-your-game)
1198
1204
  has the requirements and recipes.
1199
1205
 
1200
1206
  `client.hosting`, `uploadPublishFiles`, `publishDirectory` and `manifestForDirectory`
@@ -1290,8 +1296,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
1290
1296
  `mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
1291
1297
  on legacy player compute since 18.0.0.
1292
1298
 
1293
- See [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.crowdedkingdoms.com/exec/mods)
1294
- and [Embed Crowdy Studio in your game](https://docs.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
1299
+ See [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.dev.crowdedkingdoms.com/exec/mods)
1300
+ and [Embed Crowdy Studio in your game](https://docs.dev.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
1295
1301
 
1296
1302
  ### The Studio agent (DeepSeek Harness in the browser)
1297
1303
 
@@ -1547,7 +1553,7 @@ no other repositories and no network access required:
1547
1553
  `src/generated/graphql-schema.ts`, the generated schema types.
1548
1554
 
1549
1555
  Schema refresh is explicit, from the published
1550
- [SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
1556
+ [SDL](https://docs.dev.crowdedkingdoms.com/schema/game-api.graphql):
1551
1557
 
1552
1558
  ```bash
1553
1559
  npm run schema:sync:prod
@@ -71,6 +71,7 @@ export declare const WireMessageType: {
71
71
  readonly CLIENT_VIDEO_PACKET_2: 143;
72
72
  readonly CLIENT_VIDEO_NOTIFICATION_2: 144;
73
73
  readonly ACTOR_LEFT_NOTIFICATION_2: 145;
74
+ readonly CHUNK_CHANGED_NOTIFICATION: 146;
74
75
  };
75
76
  /**
76
77
  * Per-session signing context: the game token id (from the relay `ready`
@@ -1 +1 @@
1
- {"version":3,"file":"binary-wire.d.ts","sourceRoot":"","sources":["../src/binary-wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,qEAAqE;AACrE,eAAO,MAAM,6BAA6B,QACmC,CAAC;AAE9E;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAInE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CAwB5E;AAED,kEAAkE;AAClE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsClB,CAAC;AA8DX;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,EAAE,SAAS,CAAC;CAChB;AAED,gFAAgF;AAChF,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAU3B;AA+FD,sDAAsD;AACtD,eAAO,MAAM,gBAAgB;IAC3B,+EAA+E;;CAEvE,CAAC;AAEX,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,EAAE,MAAuC,CAAC;AAEvE;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAC/B,KAAK,G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G;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,UAAU,CAAC,CAErB;AAED,6FAA6F;AAC7F,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AA6CD,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD;;;;;GAKG;AACH,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE;IACL,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,GACA,OAAO,CAAC,UAAU,CAAC,CAwDrB;AAwQD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,EAAE,CAuBpE"}
@@ -114,6 +114,9 @@ export const WireMessageType = {
114
114
  CLIENT_VIDEO_PACKET_2: 143,
115
115
  CLIENT_VIDEO_NOTIFICATION_2: 144,
116
116
  ACTOR_LEFT_NOTIFICATION_2: 145,
117
+ // Buddy v0.45.0, server-only: a chunk was replaced as a whole (`world.set_chunk`); read it
118
+ // again. Payload [i64 updatedAt ms LE].
119
+ CHUNK_CHANGED_NOTIFICATION: 146,
117
120
  };
118
121
  const SPATIAL_HEADER_SIZE = 68;
119
122
  const UUID_SIZE = 32;
@@ -615,6 +618,17 @@ function parseOne(bytes) {
615
618
  leftReason: p.payload.length >= 1 && p.payload[0] === 1 ? 1 : 0,
616
619
  };
617
620
  }
621
+ case WireMessageType.CHUNK_CHANGED_NOTIFICATION: {
622
+ const { decayRate: _r, uuid: _u, epochMillis: _e, ...rest } = spatialCommon(p);
623
+ const updatedAtMs = p.payload.length >= 8
624
+ ? new DataView(p.payload.buffer, p.payload.byteOffset, 8).getBigInt64(0, true).toString()
625
+ : '0';
626
+ return {
627
+ __typename: 'ChunkChangedNotification',
628
+ ...rest,
629
+ updatedAtMs,
630
+ };
631
+ }
618
632
  case WireMessageType.CLIENT_TEXT_NOTIFICATION_2:
619
633
  return {
620
634
  __typename: 'ClientTextNotification',
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier prod` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier dev` writes this file, and
4
4
  * `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
5
5
  * host that declaration does not carry. Regenerate; never hand-edit.
6
6
  *
@@ -10,14 +10,14 @@
10
10
  * than no default at all. Every fallback this SDK ever removed named a host that
11
11
  * was already dead. A generated file plus a gate is what makes this one different.
12
12
  *
13
- * Source: the operator's per-tier public CK API origin declaration, tier 'prod'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export declare const CROWDY_DEFAULT_TIER = "prod";
16
+ export declare const CROWDY_DEFAULT_TIER = "dev";
17
17
  /** The public CK API origin for that tier. */
18
- export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.prod.crowdedkingdoms.com";
18
+ export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.crowdedkingdoms.com";
19
19
  /** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
20
- export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.prod.crowdedkingdoms.com";
20
+ export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export declare const CROWDY_DEFAULT_HOST = "ck.prod.crowdedkingdoms.com";
22
+ export declare const CROWDY_DEFAULT_HOST = "ck.dev.crowdedkingdoms.com";
23
23
  //# sourceMappingURL=default-origin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAEhF,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,sCAAsC,CAAC;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,gCAAgC,CAAC"}
1
+ {"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier prod` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier dev` writes this file, and
4
4
  * `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
5
5
  * host that declaration does not carry. Regenerate; never hand-edit.
6
6
  *
@@ -10,13 +10,13 @@
10
10
  * than no default at all. Every fallback this SDK ever removed named a host that
11
11
  * was already dead. A generated file plus a gate is what makes this one different.
12
12
  *
13
- * Source: the operator's per-tier public CK API origin declaration, tier 'prod'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export const CROWDY_DEFAULT_TIER = 'prod';
16
+ export const CROWDY_DEFAULT_TIER = 'dev';
17
17
  /** The public CK API origin for that tier. */
18
- export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.prod.crowdedkingdoms.com';
18
+ export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.crowdedkingdoms.com';
19
19
  /** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
20
- export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.prod.crowdedkingdoms.com';
20
+ export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export const CROWDY_DEFAULT_HOST = 'ck.prod.crowdedkingdoms.com';
22
+ export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
@@ -60,29 +60,38 @@ export declare class ChunksAPI {
60
60
  */
61
61
  getLods(input: GetChunkLodsQueryVariables['input']): Promise<GetChunkLodsQuery['getChunkLods']>;
62
62
  /**
63
- * Return all chunks for an app within a cubic (Chebyshev-distance) radius of a
64
- * center chunk, paginated — the cube spans center ± `maxDistance` chunks on
65
- * each axis (a `(2·maxDistance+1)³` cube). Use this for bulk region loads; use
66
- * {@link ChunksAPI.get} for a single chunk. Read-only.
63
+ * Return the stored chunks of a region, paginated: a cube (`centerCoordinate`
64
+ * ± `maxDistance` chunks on each axis, nearest first) or a box between two
65
+ * corners (`lowChunk` and `highChunk`, inclusive, either order, at most 4,913
66
+ * chunks, ordered by x, y, z), one or the other. A box streams in only the
67
+ * slab a step uncovers. Pages are stable: each chunk is on exactly one. Use
68
+ * this for bulk region loads; use {@link ChunksAPI.get} for a single chunk.
69
+ * Read-only.
67
70
  *
68
- * @param input - {@link GetChunksByDistanceInput}: `appId`, `centerCoordinate`
69
- * (int64 decimal strings), `maxDistance` (in chunk units, integer `1-8`),
70
- * and optional `limit` (max chunks, default 1000) / `skip` (default 0)
71
- * pagination.
72
- * @returns A {@link ChunksByDistanceResponse}: the matching `chunks` plus an
73
- * echo of the applied `limit`/`skip`.
71
+ * @param input - {@link GetChunksByDistanceInput}: `appId`, the region,
72
+ * optional `limit` (max chunks, default 1000) / `skip` (default 0), and an
73
+ * optional `since`: only chunks whose stored row was written at or after it
74
+ * (`updateChunk`, `updateChunkState`, `updateChunkLods`; voxel edits do not
75
+ * move it, see {@link VoxelsAPI.listByDistance}). Box, `since` and stable
76
+ * pages need ck-api v2.67.0.
77
+ * @returns A {@link ChunksByDistanceResponse}: the matching `chunks` and the
78
+ * `limit`/`skip` applied.
74
79
  * @throws {CrowdyGraphQLError} `BAD_USER_INPUT` (e.g. `maxDistance` outside
75
- * `1-8`), `UNAUTHENTICATED`, or `FORBIDDEN`.
80
+ * `1-8`, a box over 4,913 chunks, or a cube and a box together),
81
+ * `UNAUTHENTICATED`, or `FORBIDDEN`.
76
82
  */
77
83
  byDistance(input: GetChunksByDistanceQueryVariables['input']): Promise<GetChunksByDistanceQuery['getChunksByDistance']>;
78
84
  /**
79
- * List every recorded voxel edit (the `voxel_updates` log) for a single chunk,
80
- * newest first. Use {@link ChunksAPI.get} instead when you want the packed
81
- * voxel grid rather than the individual edit log. Read-only.
85
+ * List the recorded voxel edits (the `voxel_updates` log) of a single chunk,
86
+ * ordered by position and at most 65,536 of them, in a chunk-shaped envelope:
87
+ * the first page of {@link VoxelsAPI.list}, which pages past that (ck-api
88
+ * v2.67.0; before it the list was newest first and unbounded). Use
89
+ * {@link ChunksAPI.get} instead when you want the packed voxel grid rather
90
+ * than the individual edit log. Read-only.
82
91
  *
83
92
  * @param input - {@link GetVoxelListInput}: `appId` and chunk `coordinates`.
84
93
  * @returns A {@link ChunkVoxelResponse}: the chunk address plus its
85
- * {@link Voxel} edits (each `state` blob base64-encoded), newest first.
94
+ * {@link Voxel} edits (each `state` blob base64-encoded).
86
95
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN`.
87
96
  */
88
97
  voxelList(input: GetVoxelListQueryVariables['input']): Promise<GetVoxelListQuery['getVoxelList']>;
@@ -1 +1 @@
1
- {"version":3,"file":"chunks.d.ts","sourceRoot":"","sources":["../../src/domains/chunks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAE3B,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAE/B,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EAEtC,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAE/B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EAEtC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACtC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,SAAS;IACR,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEtC;;;;;;;;;;;;;OAaG;IACG,GAAG,CACP,KAAK,EAAE,sBAAsB,CAAC,OAAO,CAAC,GACrC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAKrC;;;;;;;;;;OAUG;IACG,OAAO,CACX,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC,GACzC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAK7C;;;;;;;;;;;;;;OAcG;IACG,UAAU,CACd,KAAK,EAAE,iCAAiC,CAAC,OAAO,CAAC,GAChD,OAAO,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAK3D;;;;;;;;;OASG;IACG,SAAS,CACb,KAAK,EAAE,0BAA0B,CAAC,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BAA0B,CAAC,OAAO,CAAC,GACzC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAK7C;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,UAAU,CACd,KAAK,EAAE,iCAAiC,CAAC,OAAO,CAAC,GAChD,OAAO,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAK3D;;;;;;;;;;;;OAYG;IACG,SAAS,CACb,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC,GACzC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAK7C;;;;;;;;;;;;;;OAcG;IACG,MAAM,CACV,KAAK,EAAE,4BAA4B,CAAC,OAAO,CAAC,GAC3C,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAK9C;;;;;;;;;;;OAWG;IACG,WAAW,CACf,KAAK,EAAE,iCAAiC,CAAC,OAAO,CAAC,GAChD,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IAKxD;;;;;;;;;;;;OAYG;IACG,UAAU,CACd,KAAK,EAAE,gCAAgC,CAAC,OAAO,CAAC,GAC/C,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;CAIvD"}
@@ -66,32 +66,41 @@ export class ChunksAPI {
66
66
  return data.getChunkLods;
67
67
  }
68
68
  /**
69
- * Return all chunks for an app within a cubic (Chebyshev-distance) radius of a
70
- * center chunk, paginated — the cube spans center ± `maxDistance` chunks on
71
- * each axis (a `(2·maxDistance+1)³` cube). Use this for bulk region loads; use
72
- * {@link ChunksAPI.get} for a single chunk. Read-only.
69
+ * Return the stored chunks of a region, paginated: a cube (`centerCoordinate`
70
+ * ± `maxDistance` chunks on each axis, nearest first) or a box between two
71
+ * corners (`lowChunk` and `highChunk`, inclusive, either order, at most 4,913
72
+ * chunks, ordered by x, y, z), one or the other. A box streams in only the
73
+ * slab a step uncovers. Pages are stable: each chunk is on exactly one. Use
74
+ * this for bulk region loads; use {@link ChunksAPI.get} for a single chunk.
75
+ * Read-only.
73
76
  *
74
- * @param input - {@link GetChunksByDistanceInput}: `appId`, `centerCoordinate`
75
- * (int64 decimal strings), `maxDistance` (in chunk units, integer `1-8`),
76
- * and optional `limit` (max chunks, default 1000) / `skip` (default 0)
77
- * pagination.
78
- * @returns A {@link ChunksByDistanceResponse}: the matching `chunks` plus an
79
- * echo of the applied `limit`/`skip`.
77
+ * @param input - {@link GetChunksByDistanceInput}: `appId`, the region,
78
+ * optional `limit` (max chunks, default 1000) / `skip` (default 0), and an
79
+ * optional `since`: only chunks whose stored row was written at or after it
80
+ * (`updateChunk`, `updateChunkState`, `updateChunkLods`; voxel edits do not
81
+ * move it, see {@link VoxelsAPI.listByDistance}). Box, `since` and stable
82
+ * pages need ck-api v2.67.0.
83
+ * @returns A {@link ChunksByDistanceResponse}: the matching `chunks` and the
84
+ * `limit`/`skip` applied.
80
85
  * @throws {CrowdyGraphQLError} `BAD_USER_INPUT` (e.g. `maxDistance` outside
81
- * `1-8`), `UNAUTHENTICATED`, or `FORBIDDEN`.
86
+ * `1-8`, a box over 4,913 chunks, or a cube and a box together),
87
+ * `UNAUTHENTICATED`, or `FORBIDDEN`.
82
88
  */
83
89
  async byDistance(input) {
84
90
  const data = await this.gql.request(GetChunksByDistanceDocument, { input });
85
91
  return data.getChunksByDistance;
86
92
  }
87
93
  /**
88
- * List every recorded voxel edit (the `voxel_updates` log) for a single chunk,
89
- * newest first. Use {@link ChunksAPI.get} instead when you want the packed
90
- * voxel grid rather than the individual edit log. Read-only.
94
+ * List the recorded voxel edits (the `voxel_updates` log) of a single chunk,
95
+ * ordered by position and at most 65,536 of them, in a chunk-shaped envelope:
96
+ * the first page of {@link VoxelsAPI.list}, which pages past that (ck-api
97
+ * v2.67.0; before it the list was newest first and unbounded). Use
98
+ * {@link ChunksAPI.get} instead when you want the packed voxel grid rather
99
+ * than the individual edit log. Read-only.
91
100
  *
92
101
  * @param input - {@link GetVoxelListInput}: `appId` and chunk `coordinates`.
93
102
  * @returns A {@link ChunkVoxelResponse}: the chunk address plus its
94
- * {@link Voxel} edits (each `state` blob base64-encoded), newest first.
103
+ * {@link Voxel} edits (each `state` blob base64-encoded).
95
104
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN`.
96
105
  */
97
106
  async voxelList(input) {
@@ -49,12 +49,15 @@ export declare class GameAppsAPI {
49
49
  */
50
50
  nearbyPermissions(input: NearbyGridPermissionsInput): Promise<NearbyGridPermissionsQuery['nearbyGridPermissions']>;
51
51
  /**
52
- * List grids overlapping a chunk-coordinate box. Player-safe: bounds only,
53
- * no permission keys and no impersonation userId. Requires an app-scoped
54
- * token (ck-api v1.93.0).
52
+ * List grids overlapping a chunk-coordinate box, each with the caller's own
53
+ * unexpired `permissionKeys` on it (ck-api v2.67.0; bounds only before).
54
+ * Player-safe: another user's keys need {@link GameAppsAPI.nearbyGridPermissions}.
55
+ * The grid that decides a voxel edit in a chunk is the smallest box covering
56
+ * it (the lower `gridId` on a tie), and the edit needs `update_voxel_data`
57
+ * there. Requires an app-scoped token (ck-api v1.93.0).
55
58
  *
56
59
  * @param input - {@link NearbyGridsInput} (app, corners).
57
- * @returns The overlapping grids with id and bounds.
60
+ * @returns The overlapping grids with id, bounds and your keys on each.
58
61
  */
59
62
  nearbyGrids(input: NearbyGridsInput): Promise<NearbyGridsQuery['nearbyGrids']>;
60
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"gameApps.d.ts","sourceRoot":"","sources":["../../src/domains/gameApps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAkBL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,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AAE,0BAA0B,GAChC,OAAO,CAAC,6BAA6B,CAAC,uBAAuB,CAAC,CAAC;IAOlE;;;;;;OAMG;IACG,mBAAmB,CACvB,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,+BAA+B,CAAC,yBAAyB,CAAC,CAAC;IAOtE;;;;;;;;;;;;;;OAcG;IACG,kBAAkB,CACtB,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,CAAC;IAOpE;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IAO1D;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;CAM/D"}
@@ -73,12 +73,15 @@ export class GameAppsAPI {
73
73
  return data.nearbyGridPermissions;
74
74
  }
75
75
  /**
76
- * List grids overlapping a chunk-coordinate box. Player-safe: bounds only,
77
- * no permission keys and no impersonation userId. Requires an app-scoped
78
- * token (ck-api v1.93.0).
76
+ * List grids overlapping a chunk-coordinate box, each with the caller's own
77
+ * unexpired `permissionKeys` on it (ck-api v2.67.0; bounds only before).
78
+ * Player-safe: another user's keys need {@link GameAppsAPI.nearbyGridPermissions}.
79
+ * The grid that decides a voxel edit in a chunk is the smallest box covering
80
+ * it (the lower `gridId` on a tie), and the edit needs `update_voxel_data`
81
+ * there. Requires an app-scoped token (ck-api v1.93.0).
79
82
  *
80
83
  * @param input - {@link NearbyGridsInput} (app, corners).
81
- * @returns The overlapping grids with id and bounds.
84
+ * @returns The overlapping grids with id, bounds and your keys on each.
82
85
  */
83
86
  async nearbyGrids(input) {
84
87
  const data = await this.graphql.request(NearbyGridsDocument, { input });
@@ -32,31 +32,37 @@ export declare class VoxelsAPI {
32
32
  private gql;
33
33
  constructor(gql: GraphQLClient);
34
34
  /**
35
- * List recorded voxel edits for a single chunk, newest first (optionally only
36
- * those at/after a timestamp). Read-only.
35
+ * List the recorded voxel edits of a single chunk, one per voxel position,
36
+ * ordered by position, a page at a time (optionally only those at/after a
37
+ * timestamp). Read-only.
37
38
  *
38
- * @param input - {@link ListVoxelsInput}: `appId`, chunk `coordinates`, and an
39
+ * @param input - {@link ListVoxelsInput}: `appId`, chunk `coordinates`, an
39
40
  * optional inclusive `since` lower time bound (only edits with
40
- * `createdAt >= since`).
41
- * @returns The matching {@link Voxel} edits, newest first (each `state` blob
41
+ * `createdAt >= since`), and `limit` (1-65,536, the default) / `skip`
42
+ * paging (ck-api v2.67.0; before it the list was newest first and
43
+ * unbounded). A page shorter than `limit` is the last.
44
+ * @returns The matching {@link Voxel} edits (each `state` blob
42
45
  * base64-encoded).
43
- * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN`.
46
+ * @throws {CrowdyGraphQLError} `BAD_USER_INPUT` (a `limit` outside
47
+ * `1-65,536`), `UNAUTHENTICATED` / `FORBIDDEN`.
44
48
  */
45
49
  list(input: ListVoxelsQueryVariables['input']): Promise<ListVoxelsQuery['listVoxels']>;
46
50
  /**
47
- * List recorded voxel edits for all chunks within a cubic (Chebyshev) radius of
48
- * a center chunk, grouped per chunk and ordered by increasing distance,
49
- * paginated over chunks. Read-only.
51
+ * List recorded voxel edits for the chunks of a region, grouped per chunk and
52
+ * paginated over chunks: a cube (`centerCoordinate` ± `maxDistance`, by
53
+ * increasing distance) or a box between two corners (`lowChunk` and
54
+ * `highChunk`, at most 4,913 chunks, by x, y, z; ck-api v2.67.0). It reads
55
+ * the edit log alone, so it returns edits in chunks whose grid was never
56
+ * stored. Read-only.
50
57
  *
51
- * @param input - {@link ListVoxelUpdatesByDistanceInput}: `appId`,
52
- * `centerCoordinate`, `maxDistance` (in chunk units, integer `1-8`), optional
53
- * `limit` (max **chunks**, not voxels — default 1000) / `skip` (default 0),
54
- * and an optional `since` lower time bound.
58
+ * @param input - {@link ListVoxelUpdatesByDistanceInput}: `appId`, the
59
+ * region, optional `limit` (max **chunks**, not voxels — default 1000) /
60
+ * `skip` (default 0), and an optional `since` lower time bound.
55
61
  * @returns A {@link VoxelUpdatesByDistanceResponse}: per-chunk groups of voxel
56
- * edits ordered by increasing distance from `centerCoordinate`, plus an echo
57
- * of the applied `limit`/`skip`.
62
+ * edits, `centerCoordinate` (for a box, its middle chunk) and the
63
+ * `limit`/`skip` applied.
58
64
  * @throws {CrowdyGraphQLError} `BAD_USER_INPUT` (e.g. `maxDistance` outside
59
- * `1-8`), `UNAUTHENTICATED`, or `FORBIDDEN`.
65
+ * `1-8`, or a box over 4,913 chunks), `UNAUTHENTICATED`, or `FORBIDDEN`.
60
66
  */
61
67
  listByDistance(input: ListVoxelUpdatesByDistanceQueryVariables['input']): Promise<ListVoxelUpdatesByDistanceQuery['listVoxelUpdatesByDistance']>;
62
68
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"voxels.d.ts","sourceRoot":"","sources":["../../src/domains/voxels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAE7B,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAE7C,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EAErC,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAE/C,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAC3C,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,SAAS;IACR,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEtC;;;;;;;;;;OAUG;IACG,IAAI,CACR,KAAK,EAAE,wBAAwB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAKzC;;;;;;;;;;;;;;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AAK,EAAE,wBAAwB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAKzC;;;;;;;;;;;;;;;;OAgBG;IACG,cAAc,CAClB,KAAK,EAAE,wCAAwC,CAAC,OAAO,CAAC,GACvD,OAAO,CAAC,+BAA+B,CAAC,4BAA4B,CAAC,CAAC;IAKzE;;;;;;;;;;;;;;;OAeG;IACG,MAAM,CACV,KAAK,EAAE,4BAA4B,CAAC,OAAO,CAAC,GAC3C,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAK9C;;;;;;;;;;;;;;;;;;OAkBG;IACG,OAAO,CACX,IAAI,EAAE,gCAAgC,GACrC,OAAO,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;IAKzD;;;;;;;;;;;;OAYG;IACG,iBAAiB,CACrB,IAAI,EAAE,0CAA0C,GAC/C,OAAO,CAAC,iCAAiC,CAAC,8BAA8B,CAAC,CAAC;IAQ7E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,QAAQ,CACZ,KAAK,EAAE,qCAAqC,CAAC,OAAO,CAAC,GACpD,OAAO,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,CAAC;CAIjE"}
@@ -32,34 +32,40 @@ export class VoxelsAPI {
32
32
  this.gql = gql;
33
33
  }
34
34
  /**
35
- * List recorded voxel edits for a single chunk, newest first (optionally only
36
- * those at/after a timestamp). Read-only.
35
+ * List the recorded voxel edits of a single chunk, one per voxel position,
36
+ * ordered by position, a page at a time (optionally only those at/after a
37
+ * timestamp). Read-only.
37
38
  *
38
- * @param input - {@link ListVoxelsInput}: `appId`, chunk `coordinates`, and an
39
+ * @param input - {@link ListVoxelsInput}: `appId`, chunk `coordinates`, an
39
40
  * optional inclusive `since` lower time bound (only edits with
40
- * `createdAt >= since`).
41
- * @returns The matching {@link Voxel} edits, newest first (each `state` blob
41
+ * `createdAt >= since`), and `limit` (1-65,536, the default) / `skip`
42
+ * paging (ck-api v2.67.0; before it the list was newest first and
43
+ * unbounded). A page shorter than `limit` is the last.
44
+ * @returns The matching {@link Voxel} edits (each `state` blob
42
45
  * base64-encoded).
43
- * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN`.
46
+ * @throws {CrowdyGraphQLError} `BAD_USER_INPUT` (a `limit` outside
47
+ * `1-65,536`), `UNAUTHENTICATED` / `FORBIDDEN`.
44
48
  */
45
49
  async list(input) {
46
50
  const data = await this.gql.request(ListVoxelsDocument, { input });
47
51
  return data.listVoxels;
48
52
  }
49
53
  /**
50
- * List recorded voxel edits for all chunks within a cubic (Chebyshev) radius of
51
- * a center chunk, grouped per chunk and ordered by increasing distance,
52
- * paginated over chunks. Read-only.
54
+ * List recorded voxel edits for the chunks of a region, grouped per chunk and
55
+ * paginated over chunks: a cube (`centerCoordinate` ± `maxDistance`, by
56
+ * increasing distance) or a box between two corners (`lowChunk` and
57
+ * `highChunk`, at most 4,913 chunks, by x, y, z; ck-api v2.67.0). It reads
58
+ * the edit log alone, so it returns edits in chunks whose grid was never
59
+ * stored. Read-only.
53
60
  *
54
- * @param input - {@link ListVoxelUpdatesByDistanceInput}: `appId`,
55
- * `centerCoordinate`, `maxDistance` (in chunk units, integer `1-8`), optional
56
- * `limit` (max **chunks**, not voxels — default 1000) / `skip` (default 0),
57
- * and an optional `since` lower time bound.
61
+ * @param input - {@link ListVoxelUpdatesByDistanceInput}: `appId`, the
62
+ * region, optional `limit` (max **chunks**, not voxels — default 1000) /
63
+ * `skip` (default 0), and an optional `since` lower time bound.
58
64
  * @returns A {@link VoxelUpdatesByDistanceResponse}: per-chunk groups of voxel
59
- * edits ordered by increasing distance from `centerCoordinate`, plus an echo
60
- * of the applied `limit`/`skip`.
65
+ * edits, `centerCoordinate` (for a box, its middle chunk) and the
66
+ * `limit`/`skip` applied.
61
67
  * @throws {CrowdyGraphQLError} `BAD_USER_INPUT` (e.g. `maxDistance` outside
62
- * `1-8`), `UNAUTHENTICATED`, or `FORBIDDEN`.
68
+ * `1-8`, or a box over 4,913 chunks), `UNAUTHENTICATED`, or `FORBIDDEN`.
63
69
  */
64
70
  async listByDistance(input) {
65
71
  const data = await this.gql.request(ListVoxelUpdatesByDistanceDocument, { input });