@crowdedkingdoms/crowdyjs 18.27.0-test.1 → 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 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
@@ -34,6 +34,7 @@ so it needs that Game API or newer; promote the Game API before the SDK on each
34
34
 
35
35
  | CrowdyJS | Needs the Game API (ck-api) |
36
36
  | --- | --- |
37
+ | 18.28.0 | v2.67.0 or later (`gameApps.nearbyGrids` selects `permissionKeys`) |
37
38
  | 18.27.0 | v2.64.0 or later (`isEmailConfirmationRequiredError` reads a code v2.65.0 sends) |
38
39
  | 18.26.0 | v2.64.0 or later (app reads and `apps.update` select `idleTimeoutSeconds` and `effectiveIdleTimeoutSeconds`) |
39
40
  | 18.25.0 | v2.61.0 or later (app reads and `apps.update` select `hasSafetyModerator`; `platform.territoryPolicies` selects `regionCode`) |
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier test` 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 'test'
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 = "test";
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.test.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.test.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.test.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 test` 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 'test'
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 = 'test';
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.test.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.test.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.test.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,OAAO,CAAC,GACzC,O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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,EACvB,KAAK,kBAAkB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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;;;;;;;;;;;;;;OAcG;IACG,cAAc,CA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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 });
@@ -1883,9 +1883,9 @@ export type ChunksByDistanceResponse = {
1883
1883
  __typename?: 'ChunksByDistanceResponse';
1884
1884
  /** Chunks found within the search cube. */
1885
1885
  chunks: Array<Chunk>;
1886
- /** Echo of the `limit` applied to this page, or null if none was supplied. */
1886
+ /** The `limit` applied to this page: the one asked for, or 1000 when none (or 0) was. */
1887
1887
  limit: Maybe<Scalars['Int']['output']>;
1888
- /** Echo of the `skip` applied to this page, or null if none was supplied. */
1888
+ /** The `skip` applied to this page: the one asked for, or 0. */
1889
1889
  skip: Maybe<Scalars['Int']['output']>;
1890
1890
  };
1891
1891
  /** Claim (or re-assert) the hosting slug for an app. */
@@ -4140,20 +4140,26 @@ export type GetChunkLodsInput = {
4140
4140
  /** LOD levels to return (each >= 0; 0 is the finest). Only matching levels are included in the response. */
4141
4141
  lodLevels: Array<Scalars['Int']['input']>;
4142
4142
  };
4143
- /** Arguments for getChunksByDistance: selects chunks within a cubic (Chebyshev-distance) radius around a center chunk, with pagination. */
4143
+ /** Arguments for getChunksByDistance: selects the stored chunks in a region, either a cube (centerCoordinate and maxDistance) or a box (lowChunk and highChunk), with pagination. A cube is ordered by Chebyshev distance from its center, then x, y, z; a box by x, y, z. */
4144
4144
  export type GetChunksByDistanceInput = {
4145
4145
  /** Id of the app whose chunks to search (decimal string). */
4146
4146
  appId: Scalars['BigInt']['input'];
4147
- /** Center chunk of the search cube. */
4148
- centerCoordinate: ChunkCoordinatesInput;
4149
- /** Maximum number of chunks to return. Defaults to 1000 when omitted. Must be >= 0. */
4147
+ /** Center chunk of the search cube. With maxDistance; leave both out to search a box (lowChunk and highChunk) instead. */
4148
+ centerCoordinate?: InputMaybe<ChunkCoordinatesInput>;
4149
+ /** The opposite corner of the search box, with lowChunk; both corners are inclusive. */
4150
+ highChunk?: InputMaybe<ChunkCoordinatesInput>;
4151
+ /** Maximum number of chunks to return. Defaults to 1000 when omitted or 0; a cube at maxDistance 8 holds up to 4,913. Must be >= 0. */
4150
4152
  limit?: InputMaybe<Scalars['Int']['input']>;
4151
- /** Cube 'radius' in chunks measured as Chebyshev distance: matches chunks whose x, y and z each differ from the center by at most this many chunks (a (2*maxDistance+1)^3 cube). Integer, 1-8 inclusive. */
4152
- maxDistance: Scalars['Int']['input'];
4153
+ /** One corner of a search box, with highChunk, instead of a cube: for streaming only the slab a step uncovers. Corners are normalized per axis, and the box may cover at most 4,913 chunks (the cube maxDistance 8 reads). */
4154
+ lowChunk?: InputMaybe<ChunkCoordinatesInput>;
4155
+ /** Cube 'radius' in chunks measured as Chebyshev distance: matches chunks whose x, y and z each differ from the center by at most this many chunks (a (2*maxDistance+1)^3 cube). Integer, 1-8 inclusive. With centerCoordinate. */
4156
+ maxDistance?: InputMaybe<Scalars['Int']['input']>;
4157
+ /** Optional inclusive lower time bound: only chunks whose updatedAt is at or after it, i.e. chunks whose stored grid, chunk state or LODs were written since (updateChunk, updateChunkState, updateChunkLods). Single voxel edits do not move a chunk's updatedAt; read those with listVoxelUpdatesByDistance's since. */
4158
+ since?: InputMaybe<Scalars['DateTime']['input']>;
4153
4159
  /** Number of chunks to skip for pagination. Defaults to 0 when omitted. Must be >= 0. */
4154
4160
  skip?: InputMaybe<Scalars['Int']['input']>;
4155
4161
  };
4156
- /** Arguments for getVoxelList: selects all recorded voxel edits for one chunk by app id and chunk coordinates. */
4162
+ /** Arguments for getVoxelList: selects the recorded voxel edits for one chunk by app id and chunk coordinates, by position and at most 65,536 of them (listVoxels pages past that). */
4157
4163
  export type GetVoxelListInput = {
4158
4164
  /** Id of the app that owns the chunk (decimal string). */
4159
4165
  appId: Scalars['BigInt']['input'];
@@ -4755,29 +4761,37 @@ export type LinkIdentityInput = {
4755
4761
  provider: Scalars['String']['input'];
4756
4762
  state: Scalars['String']['input'];
4757
4763
  };
4758
- /** Arguments for listVoxelUpdatesByDistance: selects recorded voxel edits across chunks within a cubic (Chebyshev) radius of a center chunk, grouped per chunk and ordered by increasing distance. */
4764
+ /** Arguments for listVoxelUpdatesByDistance: selects recorded voxel edits across the chunks of a region, either a cube (centerCoordinate and maxDistance) or a box (lowChunk and highChunk), grouped per chunk. A cube is ordered by increasing Chebyshev distance, then x, y, z; a box by x, y, z. Edits are returned for chunks whose grid was never stored too. */
4759
4765
  export type ListVoxelUpdatesByDistanceInput = {
4760
4766
  /** Id of the app whose voxel edits to search (decimal string). */
4761
4767
  appId: Scalars['BigInt']['input'];
4762
- /** Center chunk of the search cube. */
4763
- centerCoordinate: ChunkCoordinatesInput;
4764
- /** Maximum number of CHUNKS (not voxels) to include. Defaults to 1000 when omitted. Must be >= 0. */
4768
+ /** Center chunk of the search cube. With maxDistance; leave both out to search a box (lowChunk and highChunk) instead. */
4769
+ centerCoordinate?: InputMaybe<ChunkCoordinatesInput>;
4770
+ /** The opposite corner of the search box, with lowChunk; both corners are inclusive. */
4771
+ highChunk?: InputMaybe<ChunkCoordinatesInput>;
4772
+ /** Maximum number of CHUNKS (not voxels) to include. Defaults to 1000 when omitted or 0. Must be >= 0. */
4765
4773
  limit?: InputMaybe<Scalars['Int']['input']>;
4766
- /** Cube radius in chunks measured as Chebyshev distance: matches chunks whose x, y and z each differ from the center by at most this many chunks. Integer, 1-8 inclusive. */
4767
- maxDistance: Scalars['Int']['input'];
4774
+ /** One corner of a search box, with highChunk, instead of a cube. Corners are normalized per axis, and the box may cover at most 4,913 chunks (the cube maxDistance 8 reads). */
4775
+ lowChunk?: InputMaybe<ChunkCoordinatesInput>;
4776
+ /** Cube radius in chunks measured as Chebyshev distance: matches chunks whose x, y and z each differ from the center by at most this many chunks. Integer, 1-8 inclusive. With centerCoordinate. */
4777
+ maxDistance?: InputMaybe<Scalars['Int']['input']>;
4768
4778
  /** Optional inclusive lower time bound; only edits with createdAt >= this timestamp are returned. */
4769
4779
  since?: InputMaybe<Scalars['DateTime']['input']>;
4770
4780
  /** Number of chunks to skip for pagination. Defaults to 0 when omitted. Must be >= 0. */
4771
4781
  skip?: InputMaybe<Scalars['Int']['input']>;
4772
4782
  };
4773
- /** Arguments for listVoxels: selects recorded voxel edits for one chunk, optionally only those at/after a timestamp. */
4783
+ /** Arguments for listVoxels: selects the recorded voxel edits of one chunk, ordered by voxel position (x, then y, then z), optionally only those at/after a timestamp, a page at a time. */
4774
4784
  export type ListVoxelsInput = {
4775
4785
  /** Id of the app that owns the chunk (decimal string). */
4776
4786
  appId: Scalars['BigInt']['input'];
4777
4787
  /** Address of the chunk whose voxel edits to list. */
4778
4788
  coordinates: ChunkCoordinatesInput;
4789
+ /** Most edits to return, 1-65,536 (the default). A page shorter than the limit is the last; read the next with skip. */
4790
+ limit?: InputMaybe<Scalars['Int']['input']>;
4779
4791
  /** Optional inclusive lower time bound. When set, only voxel edits with createdAt >= this timestamp are returned. */
4780
4792
  since?: InputMaybe<Scalars['DateTime']['input']>;
4793
+ /** Edits to skip, for the next page. Defaults to 0. */
4794
+ skip?: InputMaybe<Scalars['Int']['input']>;
4781
4795
  };
4782
4796
  /** A single level-of-detail (LOD) representation of a chunk. */
4783
4797
  export type LodData = {
@@ -6342,7 +6356,7 @@ export type MyTierAccess = {
6342
6356
  /** Why access is granted: platform_role, operator_grant, provisioning or verified_email. */
6343
6357
  via: Maybe<Scalars['String']['output']>;
6344
6358
  };
6345
- /** A grid overlapping a scanned region (returned by nearbyGrids). Bounds only — no permission keys. */
6359
+ /** A grid overlapping a scanned region (returned by nearbyGrids): its bounds and the caller's own permission keys on it. */
6346
6360
  export type NearbyGrid = {
6347
6361
  __typename?: 'NearbyGrid';
6348
6362
  /** The app (tenant) that owns the grid. */
@@ -6353,6 +6367,8 @@ export type NearbyGrid = {
6353
6367
  highChunk: ChunkCoordinates;
6354
6368
  /** Low (minimum) corner chunk of the grid box. */
6355
6369
  lowChunk: ChunkCoordinates;
6370
+ /** The caller's own unexpired permission keys on this grid, sorted; empty when none. These are the grants the server checks: a voxel edit needs update_voxel_data on the grid that decides its chunk. */
6371
+ permissionKeys: Array<Scalars['String']['output']>;
6356
6372
  };
6357
6373
  /** A grid overlapping a scanned region, plus a user's effective permission keys on it (returned by nearbyGridPermissions). */
6358
6374
  export type NearbyGridPermissions = {
@@ -6381,7 +6397,7 @@ export type NearbyGridPermissionsInput = {
6381
6397
  /** The user whose effective permissions to report per grid. */
6382
6398
  userId: Scalars['BigInt']['input'];
6383
6399
  };
6384
- /** Scan a region for grids. Player-safe: returns bounds only, no permission keys and no impersonation userId. */
6400
+ /** Scan a region for grids. Player-safe: returns each grid's bounds and the caller's own permission keys, and takes no userId. */
6385
6401
  export type NearbyGridsInput = {
6386
6402
  /** The app (tenant) to scan within. */
6387
6403
  appId: Scalars['BigInt']['input'];
@@ -7509,7 +7525,7 @@ export type Query = {
7509
7525
  getChunk: Maybe<Chunk>;
7510
7526
  /** Fetches only the requested level-of-detail (LOD) meshes for one chunk, identified by app id and coordinates. Returns null if the chunk does not exist. Cheaper than getChunk when you only need LODs. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7511
7527
  getChunkLods: Maybe<ChunkLodsResponse>;
7512
- /** Returns all chunks for an app within a cubic (Chebyshev-distance) radius of a center chunk, paginated. The cube spans center +/- maxDistance chunks on each axis. Each chunk's `voxelStates`, when selected, include its recorded voxel edits as in getChunk (selecting them costs one more read). Use this for bulk region loads; use getChunk for a single chunk. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7528
+ /** Returns the stored chunks of an app in a region, paginated: a cube (center +/- maxDistance chunks on each axis, nearest first) or a box between two corners (lowChunk and highChunk, at most 4,913 chunks, by x, y, z), optionally only those written since a time. Pages are stable: each chunk is on exactly one. Each chunk's `voxelStates`, when selected, include its recorded voxel edits as in getChunk (selecting them costs one more read). Use this for bulk region loads; use getChunk for a single chunk. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7513
7529
  getChunksByDistance: ChunksByDistanceResponse;
7514
7530
  /** Returns all recorded voxel edits (the voxel_updates log) for a single chunk, newest first, as a ChunkVoxelResponse. Use getChunk instead when you want the packed voxel grid rather than the individual edit log. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7515
7531
  getVoxelList: ChunkVoxelResponse;
@@ -7543,9 +7559,9 @@ export type Query = {
7543
7559
  inputLogSessions: InputLogSessionConnection;
7544
7560
  /** OPERATOR: legal holds, newest first (at most 500), on one organization or account if given; only the ones that apply now unless includeReleased. */
7545
7561
  legalHolds: Array<LegalHold>;
7546
- /** Lists recorded voxel edits for all chunks within a cubic (Chebyshev) radius of a center chunk, grouped per chunk and ordered by increasing distance, paginated over chunks. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7562
+ /** Lists recorded voxel edits for the chunks of a region, grouped per chunk and paginated over chunks: a cube (center +/- maxDistance, by increasing distance) or a box between two corners (lowChunk and highChunk, at most 4,913 chunks, by x, y, z). It reads the edit log alone, so chunks whose grid was never stored are included. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7547
7563
  listVoxelUpdatesByDistance: VoxelUpdatesByDistanceResponse;
7548
- /** Lists recorded voxel edits for a single chunk (optionally only those at/after `since`), newest first. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7564
+ /** Lists the recorded voxel edits of a single chunk (optionally only those at/after `since`), one per voxel position, ordered by position and paged by limit (default and most 65,536) and skip. Requires a valid bearer token; app-scoped tokens are limited to their own app. Read-only. */
7549
7565
  listVoxels: Array<Voxel>;
7550
7566
  /** One managed player by the id your organization knows it by, or null. An org token with players:manage, or an org admin with manage_players. */
7551
7567
  managedPlayer: Maybe<ManagedPlayer>;
@@ -7599,7 +7615,7 @@ export type Query = {
7599
7615
  myTierAccess: MyTierAccess;
7600
7616
  /** List every grid overlapping a chunk-coordinate bounding box, each with the given user's effective permission keys on it. Useful for previewing what a user can do across a region (e.g. around their current position). Requires app-admin ('manage_apps'). */
7601
7617
  nearbyGridPermissions: Array<NearbyGridPermissions>;
7602
- /** List every grid overlapping a chunk-coordinate bounding box, returning gridId and bounds only. Player-safe: no permission keys and no impersonation userId. Requires an app-scoped token for the same app. */
7618
+ /** List every grid overlapping a chunk-coordinate bounding box: its gridId, its bounds and the caller's own permission keys on it. Player-safe: another user's keys need nearbyGridPermissions (app admin). The grid that decides a voxel edit in a chunk is the smallest box covering it (the lower gridId on a tie), and the edit needs update_voxel_data there. Requires an app-scoped token for the same app. */
7603
7619
  nearbyGrids: Array<NearbyGrid>;
7604
7620
  /** An org's off-session auto-billing configuration (enabled flag, recharge amount, low-water threshold, per-period cap, and last error). Requires the 'view_billing' org permission. */
7605
7621
  orgAutoBilling: OrgAutoBilling;
@@ -10137,16 +10153,16 @@ export type VoxelUpdateResponse = {
10137
10153
  /** The unique identifier for this voxel update. */
10138
10154
  uuid: Scalars['String']['output'];
10139
10155
  };
10140
- /** Result of listVoxelUpdatesByDistance: per-chunk groups of voxel edits ordered by increasing distance from the center, plus an echo of the pagination applied. */
10156
+ /** Result of listVoxelUpdatesByDistance: per-chunk groups of voxel edits (a cube ordered by increasing distance from its center, a box by x, y, z), plus the pagination applied. */
10141
10157
  export type VoxelUpdatesByDistanceResponse = {
10142
10158
  __typename?: 'VoxelUpdatesByDistanceResponse';
10143
- /** The center chunk the search was performed around. */
10159
+ /** The center chunk of a cube search; for a box, its middle chunk (rounded toward lowChunk). */
10144
10160
  centerCoordinate: ChunkCoordinates;
10145
- /** Per-chunk groups of voxel edits, ordered by increasing Chebyshev distance from centerCoordinate. */
10161
+ /** Per-chunk groups of voxel edits: for a cube by increasing Chebyshev distance from centerCoordinate, then x, y, z; for a box by x, y, z. */
10146
10162
  chunks: Array<ChunkVoxelUpdatesResponse>;
10147
- /** Echo of the chunk `limit` applied to this page, or null if none was supplied. */
10163
+ /** The chunk `limit` applied to this page: the one asked for, or 1000 when none (or 0) was. */
10148
10164
  limit: Maybe<Scalars['Int']['output']>;
10149
- /** Echo of the chunk `skip` applied to this page, or null if none was supplied. */
10165
+ /** The chunk `skip` applied to this page: the one asked for, or 0. */
10150
10166
  skip: Maybe<Scalars['Int']['output']>;
10151
10167
  };
10152
10168
  export type WalletTransaction = {