@crowdedkingdoms/crowdyjs 18.27.0 → 18.28.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.
- package/MIGRATION.md +26 -0
- package/README.md +20 -15
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.d.ts.map +1 -1
- package/dist/default-origin.js +6 -6
- package/dist/domains/chunks.d.ts +24 -15
- package/dist/domains/chunks.d.ts.map +1 -1
- package/dist/domains/chunks.js +24 -15
- package/dist/domains/gameApps.d.ts +7 -4
- package/dist/domains/gameApps.d.ts.map +1 -1
- package/dist/domains/gameApps.js +7 -4
- package/dist/domains/voxels.d.ts +22 -16
- package/dist/domains/voxels.d.ts.map +1 -1
- package/dist/domains/voxels.js +22 -16
- package/dist/generated/graphql-schema.d.ts +43 -27
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/generated/graphql.d.ts +1 -0
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -120,6 +120,32 @@ 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.28.0: region reads take a box, a `since` and stable pages
|
|
124
|
+
|
|
125
|
+
**What it needs.** ck-api `v2.67.0` (cks-game-api #652): `gameApps.nearbyGrids` selects
|
|
126
|
+
`permissionKeys`, which older releases refuse as a whole query. The other changes are inputs.
|
|
127
|
+
|
|
128
|
+
**What changes for a game.**
|
|
129
|
+
|
|
130
|
+
- `chunks.byDistance` and `voxels.listByDistance` take a box, `lowChunk` and `highChunk`
|
|
131
|
+
(inclusive, either order, at most 4,913 chunks), instead of `centerCoordinate` and
|
|
132
|
+
`maxDistance`: a client streaming the world as the player walks reads only the slab a step
|
|
133
|
+
uncovers. Give one region or the other; both is `BAD_USER_INPUT`.
|
|
134
|
+
- Pages are stable: a cube comes nearest first and then by x, y, z, a box by x, y, z, so each
|
|
135
|
+
chunk is on exactly one page. `limit` and `skip` in the answer are the values applied (1000
|
|
136
|
+
and 0 by default), not `null`.
|
|
137
|
+
- `chunks.byDistance` takes `since`: only chunks whose stored row was written at or after it
|
|
138
|
+
(`updateChunk`, `updateChunkState`, `updateChunkLods`). Single voxel edits do not move it; read
|
|
139
|
+
those with `voxels.listByDistance`'s `since`.
|
|
140
|
+
- `voxels.list` pages: `limit` (1-65,536, the default) and `skip`, ordered by position. It was
|
|
141
|
+
newest first and unbounded; `chunks.voxelList` is its first page.
|
|
142
|
+
- `gameApps.nearbyGrids` returns each grid's `permissionKeys` for the caller, so a game can grey
|
|
143
|
+
out a build tool or draw claim borders before an edit is refused. The grid that decides a voxel
|
|
144
|
+
edit is the smallest one covering its chunk (the lower `gridId` on a tie), and the edit needs
|
|
145
|
+
`update_voxel_data` there.
|
|
146
|
+
- `voxels.listByDistance` reads the edit log alone, so it returns edits in chunks whose grid was
|
|
147
|
+
never stored.
|
|
148
|
+
|
|
123
149
|
## 18.27.0: a new account confirms its email before it plays
|
|
124
150
|
|
|
125
151
|
**What it needs.** Nothing new: the release selects nothing ck-api `v2.64.0` lacks.
|
package/README.md
CHANGED
|
@@ -12,24 +12,29 @@ 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.28.0 | v2.67.0 or later (`gameApps.nearbyGrids` selects `permissionKeys`) |
|
|
33
38
|
| 18.27.0 | v2.64.0 or later (`isEmailConfirmationRequiredError` reads a code v2.65.0 sends) |
|
|
34
39
|
| 18.26.0 | v2.64.0 or later (app reads and `apps.update` select `idleTimeoutSeconds` and `effectiveIdleTimeoutSeconds`) |
|
|
35
40
|
| 18.25.0 | v2.61.0 or later (app reads and `apps.update` select `hasSafetyModerator`; `platform.territoryPolicies` selects `regionCode`) |
|
|
@@ -222,8 +227,8 @@ Notes:
|
|
|
222
227
|
- Use `client.auth.setToken(token)` to seed a token externally (e.g. when
|
|
223
228
|
restoring auth from a non-default storage).
|
|
224
229
|
|
|
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).
|
|
230
|
+
Deeper reading: [Portals & app-scoped tokens](https://docs.dev.crowdedkingdoms.com/management-api/portals-and-app-tokens)
|
|
231
|
+
and [Sign in](https://docs.dev.crowdedkingdoms.com/management-api/authentication).
|
|
227
232
|
|
|
228
233
|
### Org-managed players
|
|
229
234
|
|
|
@@ -515,7 +520,7 @@ query AppForRouting($appId: BigInt!) {
|
|
|
515
520
|
`CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
|
|
516
521
|
that app's app-scoped token, then drive gameplay through that client. Apps
|
|
517
522
|
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).
|
|
523
|
+
configured. See [Loading an app's Game API](https://docs.dev.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
519
524
|
|
|
520
525
|
## Realtime notifications
|
|
521
526
|
|
|
@@ -968,7 +973,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
|
|
|
968
973
|
WebSocket events (not `requestAnimationFrame`), so render loops read freely
|
|
969
974
|
and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
|
|
970
975
|
keep timer-driven sends at full rate while hidden. See the
|
|
971
|
-
[World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
|
|
976
|
+
[World Stores guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/stores).
|
|
972
977
|
|
|
973
978
|
## Game Kit
|
|
974
979
|
|
|
@@ -1046,7 +1051,7 @@ The protocol is held to ck-exec's golden record of the starters
|
|
|
1046
1051
|
(`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
|
|
1047
1052
|
`test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
|
|
1048
1053
|
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
|
|
1054
|
+
[Game Kit docs](https://docs.dev.crowdedkingdoms.com/game-kit/intro) and
|
|
1050
1055
|
[MIGRATION.md](MIGRATION.md).
|
|
1051
1056
|
|
|
1052
1057
|
## ck-exec
|
|
@@ -1110,7 +1115,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
|
|
|
1110
1115
|
`{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
|
|
1111
1116
|
milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
|
|
1112
1117
|
hub's integer fields refuse). The wire format is in the
|
|
1113
|
-
[ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
|
|
1118
|
+
[ck-exec docs](https://docs.dev.crowdedkingdoms.com/exec/intro).
|
|
1114
1119
|
|
|
1115
1120
|
### A mod's CLIENT half
|
|
1116
1121
|
|
|
@@ -1181,7 +1186,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
|
|
|
1181
1186
|
module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
|
|
1182
1187
|
grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
|
|
1183
1188
|
`prompt.authorId` is the player. See
|
|
1184
|
-
[CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
|
|
1189
|
+
[CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves).
|
|
1185
1190
|
|
|
1186
1191
|
## Hosting your game
|
|
1187
1192
|
|
|
@@ -1194,7 +1199,7 @@ set response headers. Then, in Studio, open the app's
|
|
|
1194
1199
|
origin as the app's **Launch URL**. The redirect URI is what admits the origin to CORS
|
|
1195
1200
|
and to the hosted sign-in return, so `portal.signIn` works there as in the
|
|
1196
1201
|
[Quick start](#quick-start).
|
|
1197
|
-
[Host your game](https://docs.crowdedkingdoms.com/build-a-game/host-your-game)
|
|
1202
|
+
[Host your game](https://docs.dev.crowdedkingdoms.com/build-a-game/host-your-game)
|
|
1198
1203
|
has the requirements and recipes.
|
|
1199
1204
|
|
|
1200
1205
|
`client.hosting`, `uploadPublishFiles`, `publishDirectory` and `manifestForDirectory`
|
|
@@ -1290,8 +1295,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
|
|
|
1290
1295
|
`mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
|
|
1291
1296
|
on legacy player compute since 18.0.0.
|
|
1292
1297
|
|
|
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).
|
|
1298
|
+
See [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.dev.crowdedkingdoms.com/exec/mods)
|
|
1299
|
+
and [Embed Crowdy Studio in your game](https://docs.dev.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
|
|
1295
1300
|
|
|
1296
1301
|
### The Studio agent (DeepSeek Harness in the browser)
|
|
1297
1302
|
|
|
@@ -1547,7 +1552,7 @@ no other repositories and no network access required:
|
|
|
1547
1552
|
`src/generated/graphql-schema.ts`, the generated schema types.
|
|
1548
1553
|
|
|
1549
1554
|
Schema refresh is explicit, from the published
|
|
1550
|
-
[SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1555
|
+
[SDL](https://docs.dev.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1551
1556
|
|
|
1552
1557
|
```bash
|
|
1553
1558
|
npm run schema:sync:prod
|
package/dist/default-origin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
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 '
|
|
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 = "
|
|
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.
|
|
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.
|
|
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.
|
|
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,
|
|
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"}
|
package/dist/default-origin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
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 '
|
|
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 = '
|
|
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.
|
|
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.
|
|
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.
|
|
22
|
+
export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
|
package/dist/domains/chunks.d.ts
CHANGED
|
@@ -60,29 +60,38 @@ export declare class ChunksAPI {
|
|
|
60
60
|
*/
|
|
61
61
|
getLods(input: GetChunkLodsQueryVariables['input']): Promise<GetChunkLodsQuery['getChunkLods']>;
|
|
62
62
|
/**
|
|
63
|
-
* Return
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
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`,
|
|
69
|
-
* (
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
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
|
|
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
|
|
80
|
-
*
|
|
81
|
-
*
|
|
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)
|
|
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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AAC,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"}
|
package/dist/domains/chunks.js
CHANGED
|
@@ -66,32 +66,41 @@ export class ChunksAPI {
|
|
|
66
66
|
return data.getChunkLods;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* Return
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
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`,
|
|
75
|
-
* (
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
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
|
|
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
|
|
89
|
-
*
|
|
90
|
-
*
|
|
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)
|
|
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
|
|
53
|
-
*
|
|
54
|
-
*
|
|
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
|
|
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,0B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AC;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"}
|
package/dist/domains/gameApps.js
CHANGED
|
@@ -73,12 +73,15 @@ export class GameAppsAPI {
|
|
|
73
73
|
return data.nearbyGridPermissions;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
|
-
* List grids overlapping a chunk-coordinate box
|
|
77
|
-
*
|
|
78
|
-
*
|
|
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
|
|
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 });
|
package/dist/domains/voxels.d.ts
CHANGED
|
@@ -32,31 +32,37 @@ export declare class VoxelsAPI {
|
|
|
32
32
|
private gql;
|
|
33
33
|
constructor(gql: GraphQLClient);
|
|
34
34
|
/**
|
|
35
|
-
* List recorded voxel edits
|
|
36
|
-
* those at/after a
|
|
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`,
|
|
39
|
+
* @param input - {@link ListVoxelsInput}: `appId`, chunk `coordinates`, an
|
|
39
40
|
* optional inclusive `since` lower time bound (only edits with
|
|
40
|
-
* `createdAt >= since`)
|
|
41
|
-
*
|
|
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} `
|
|
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
|
|
48
|
-
*
|
|
49
|
-
*
|
|
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
|
-
*
|
|
53
|
-
* `
|
|
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
|
|
57
|
-
*
|
|
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
|
|
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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;;;;;;OAwBG;IACG,QAAQ,CACZ,KAAK,EAAE,qCAAqC,CAAC,OAAO,CAAC,GACpD,OAAO,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,CAAC;CAIjE"}
|
package/dist/domains/voxels.js
CHANGED
|
@@ -32,34 +32,40 @@ export class VoxelsAPI {
|
|
|
32
32
|
this.gql = gql;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* List recorded voxel edits
|
|
36
|
-
* those at/after a
|
|
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`,
|
|
39
|
+
* @param input - {@link ListVoxelsInput}: `appId`, chunk `coordinates`, an
|
|
39
40
|
* optional inclusive `since` lower time bound (only edits with
|
|
40
|
-
* `createdAt >= since`)
|
|
41
|
-
*
|
|
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} `
|
|
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
|
|
51
|
-
*
|
|
52
|
-
*
|
|
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
|
-
*
|
|
56
|
-
* `
|
|
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
|
|
60
|
-
*
|
|
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
|
|
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 });
|