@crowdedkingdoms/crowdyjs 18.13.2 → 18.14.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 +12 -0
- package/README.md +18 -14
- 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/playerWallet.d.ts +9 -3
- package/dist/domains/playerWallet.d.ts.map +1 -1
- package/dist/domains/playerWallet.js +9 -3
- package/dist/domains/voxels.d.ts +9 -6
- package/dist/domains/voxels.d.ts.map +1 -1
- package/dist/domains/voxels.js +9 -6
- package/dist/generated/graphql-schema.d.ts +21 -18
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/generated/graphql-schema.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/MIGRATION.md
CHANGED
|
@@ -120,6 +120,18 @@ 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.14.0: billing descriptions, and `playerWallet.charges()` deprecated
|
|
124
|
+
|
|
125
|
+
No breaking change. The schema is cks-game-api `dev`'s after #550: the billing descriptions say
|
|
126
|
+
what the lossless ledger does (settled about once a minute, per dimension and period, with no
|
|
127
|
+
clock-hour close), and the voxel comments say what `getChunk` returns (an edit is in the
|
|
128
|
+
chunk's `voxelStates`; only `updateChunk` writes the packed grid).
|
|
129
|
+
|
|
130
|
+
`playerWallet.charges()` is **deprecated**, like the `playerUsageCharges` field it wraps: that
|
|
131
|
+
field reads the cents-era hourly charge rows, which the ledger does not write, so the list ends
|
|
132
|
+
where the ledger took over. Read `playerWallet.transactions()`: each `usage_debit` entry is one
|
|
133
|
+
usage charge, per app, with the app's markup included. Nothing is removed in 18.x.
|
|
134
|
+
|
|
123
135
|
## 18.13.0: the economy
|
|
124
136
|
|
|
125
137
|
Additive. **Needs a compute toolchain whose starter pack has the `player` and `market`
|
package/README.md
CHANGED
|
@@ -12,19 +12,23 @@ 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
|
|
|
@@ -195,8 +199,8 @@ Notes:
|
|
|
195
199
|
- Use `client.auth.setToken(token)` to seed a token externally (e.g. when
|
|
196
200
|
restoring auth from a non-default storage).
|
|
197
201
|
|
|
198
|
-
Deeper reading: [Portals & app-scoped tokens](https://docs.crowdedkingdoms.com/management-api/portals-and-app-tokens)
|
|
199
|
-
and [Sign in](https://docs.crowdedkingdoms.com/management-api/authentication).
|
|
202
|
+
Deeper reading: [Portals & app-scoped tokens](https://docs.dev.crowdedkingdoms.com/management-api/portals-and-app-tokens)
|
|
203
|
+
and [Sign in](https://docs.dev.crowdedkingdoms.com/management-api/authentication).
|
|
200
204
|
|
|
201
205
|
### Token refresh during gameplay
|
|
202
206
|
|
|
@@ -320,7 +324,7 @@ query AppForRouting($appId: BigInt!) {
|
|
|
320
324
|
`CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
|
|
321
325
|
that app's app-scoped token, then drive gameplay through that client. Apps
|
|
322
326
|
with no `gameApiUrl` keep working against the default `httpUrl` you
|
|
323
|
-
configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
327
|
+
configured. See [Loading an app's Game API](https://docs.dev.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
324
328
|
|
|
325
329
|
## Realtime notifications
|
|
326
330
|
|
|
@@ -731,7 +735,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
|
|
|
731
735
|
WebSocket events (not `requestAnimationFrame`), so render loops read freely
|
|
732
736
|
and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
|
|
733
737
|
keep timer-driven sends at full rate while hidden. See the
|
|
734
|
-
[World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
|
|
738
|
+
[World Stores guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/stores).
|
|
735
739
|
|
|
736
740
|
## Game Kit
|
|
737
741
|
|
|
@@ -809,7 +813,7 @@ The protocol is held to ck-exec's golden record of the starters
|
|
|
809
813
|
(`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
|
|
810
814
|
`test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
|
|
811
815
|
helpers went with the game model in 18.0.0; the hub modules replace them. See the
|
|
812
|
-
[Game Kit docs](https://docs.crowdedkingdoms.com/game-kit/intro) and
|
|
816
|
+
[Game Kit docs](https://docs.dev.crowdedkingdoms.com/game-kit/intro) and
|
|
813
817
|
[MIGRATION.md](MIGRATION.md).
|
|
814
818
|
|
|
815
819
|
## ck-exec
|
|
@@ -873,7 +877,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
|
|
|
873
877
|
`{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
|
|
874
878
|
milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
|
|
875
879
|
hub's integer fields refuse). The wire format is in the
|
|
876
|
-
[ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
|
|
880
|
+
[ck-exec docs](https://docs.dev.crowdedkingdoms.com/exec/intro).
|
|
877
881
|
|
|
878
882
|
### A mod's CLIENT half
|
|
879
883
|
|
|
@@ -944,7 +948,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
|
|
|
944
948
|
module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
|
|
945
949
|
grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
|
|
946
950
|
`prompt.authorId` is the player. See
|
|
947
|
-
[CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
|
|
951
|
+
[CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves).
|
|
948
952
|
|
|
949
953
|
## Hosting a game on Crowdy Games
|
|
950
954
|
|
|
@@ -1063,8 +1067,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
|
|
|
1063
1067
|
`mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
|
|
1064
1068
|
on legacy player compute since 18.0.0.
|
|
1065
1069
|
|
|
1066
|
-
See [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.crowdedkingdoms.com/exec/mods)
|
|
1067
|
-
and [Embed Crowdy Studio in your game](https://docs.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
|
|
1070
|
+
See [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.dev.crowdedkingdoms.com/exec/mods)
|
|
1071
|
+
and [Embed Crowdy Studio in your game](https://docs.dev.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
|
|
1068
1072
|
|
|
1069
1073
|
### The Studio agent (DeepSeek Harness in the browser)
|
|
1070
1074
|
|
|
@@ -1253,7 +1257,7 @@ no other repositories and no network access required:
|
|
|
1253
1257
|
`src/generated/graphql-schema.ts`, the generated schema types.
|
|
1254
1258
|
|
|
1255
1259
|
Schema refresh is explicit, from the published
|
|
1256
|
-
[SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1260
|
+
[SDL](https://docs.dev.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1257
1261
|
|
|
1258
1262
|
```bash
|
|
1259
1263
|
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';
|
|
@@ -23,11 +23,17 @@ export declare class PlayerWalletAPI {
|
|
|
23
23
|
* worst case while it runs). `balanceCents` is the deprecated truncation.
|
|
24
24
|
*/
|
|
25
25
|
balance(): Promise<PlayerWalletBalanceQuery["playerWalletBalance"]>;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* The caller's wallet ledger, newest first. Usage charges are its `usage_debit` entries: one
|
|
28
|
+
* per app, dimension and period each time that period's usage costs more, the app's markup
|
|
29
|
+
* included.
|
|
30
|
+
*/
|
|
27
31
|
transactions(variables?: PlayerWalletTransactionsQueryVariables): Promise<PlayerWalletTransactionsQuery["playerWalletTransactions"]>;
|
|
28
32
|
/**
|
|
29
|
-
* The caller's
|
|
30
|
-
*
|
|
33
|
+
* The caller's hourly usage charges from the cents-era billing, which the lossless ledger
|
|
34
|
+
* replaced: nothing is added to this list any more.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated Read {@link transactions}: its `usage_debit` entries are the usage charges.
|
|
31
37
|
*/
|
|
32
38
|
charges(variables?: PlayerUsageChargesQueryVariables): Promise<PlayerUsageChargesQuery["playerUsageCharges"]>;
|
|
33
39
|
/** The caller's self-set spend caps with running counters. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playerWallet.d.ts","sourceRoot":"","sources":["../../src/domains/playerWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EASL,KAAK,4BAA4B,EAOjC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,sCAAsC,EAC3C,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mCAAmC,EACxC,KAAK,4CAA4C,EAClD,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa;IAEnD;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAKzE
|
|
1
|
+
{"version":3,"file":"playerWallet.d.ts","sourceRoot":"","sources":["../../src/domains/playerWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EASL,KAAK,4BAA4B,EAOjC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,sCAAsC,EAC3C,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mCAAmC,EACxC,KAAK,4CAA4C,EAClD,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa;IAEnD;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IAKzE;;;;OAIG;IACG,YAAY,CAChB,SAAS,GAAE,sCAA2C,GACrD,OAAO,CAAC,6BAA6B,CAAC,0BAA0B,CAAC,CAAC;IAQrE;;;;;OAKG;IACG,OAAO,CACX,SAAS,GAAE,gCAAqC,GAC/C,OAAO,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;IAQzD,8DAA8D;IACxD,SAAS,IAAI,OAAO,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAKnE,0EAA0E;IACpE,WAAW,CACf,SAAS,EAAE,kCAAkC,GAC5C,OAAO,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IAQ1D,2CAA2C;IACrC,WAAW,IAAI,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAKzE,6EAA6E;IACvE,cAAc,CAClB,SAAS,EAAE,qCAAqC,GAC/C,OAAO,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,CAAC;IAQhE;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAC7B,4BAA4B,CAAC,sBAAsB,CAAC,CACrD;IAKD,+DAA+D;IACzD,aAAa,IAAI,OAAO,CAC5B,wBAAwB,CAAC,qBAAqB,CAAC,CAChD;IAKD,8EAA8E;IACxE,UAAU,CACd,SAAS,EAAE,8BAA8B,GACxC,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAQrD,+EAA+E;IACzE,aAAa,CACjB,SAAS,EAAE,oCAAoC,GAC9C,OAAO,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;IAQ9D,uEAAuE;IACjE,cAAc,CAClB,SAAS,EAAE,4BAA4B,GACtC,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAKjD;;;OAGG;IACG,gBAAgB,CACpB,SAAS,EAAE,oCAAoC,GAC9C,OAAO,CAAC,2BAA2B,CAAC,wBAAwB,CAAC,CAAC;IAQjE,gFAAgF;IAC1E,wBAAwB,CAC5B,SAAS,EAAE,4CAA4C,GACtD,OAAO,CACR,mCAAmC,CAAC,gCAAgC,CAAC,CACtE;CAOF"}
|
|
@@ -26,14 +26,20 @@ export class PlayerWalletAPI {
|
|
|
26
26
|
const data = await this.graphql.request(PlayerWalletBalanceDocument, {});
|
|
27
27
|
return data.playerWalletBalance;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The caller's wallet ledger, newest first. Usage charges are its `usage_debit` entries: one
|
|
31
|
+
* per app, dimension and period each time that period's usage costs more, the app's markup
|
|
32
|
+
* included.
|
|
33
|
+
*/
|
|
30
34
|
async transactions(variables = {}) {
|
|
31
35
|
const data = await this.graphql.request(PlayerWalletTransactionsDocument, variables);
|
|
32
36
|
return data.playerWalletTransactions;
|
|
33
37
|
}
|
|
34
38
|
/**
|
|
35
|
-
* The caller's
|
|
36
|
-
*
|
|
39
|
+
* The caller's hourly usage charges from the cents-era billing, which the lossless ledger
|
|
40
|
+
* replaced: nothing is added to this list any more.
|
|
41
|
+
*
|
|
42
|
+
* @deprecated Read {@link transactions}: its `usage_debit` entries are the usage charges.
|
|
37
43
|
*/
|
|
38
44
|
async charges(variables = {}) {
|
|
39
45
|
const data = await this.graphql.request(PlayerUsageChargesDocument, variables);
|
package/dist/domains/voxels.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ import { type ListVoxelsQuery, type ListVoxelsQueryVariables, type ListVoxelUpda
|
|
|
7
7
|
*
|
|
8
8
|
* A "voxel edit" is one row of the `voxel_updates` log (a {@link Voxel}): the
|
|
9
9
|
* app / chunk / local position that changed, the new voxel type, an optional
|
|
10
|
-
* base64 state blob, and who/when.
|
|
11
|
-
*
|
|
10
|
+
* base64 state blob, and who/when. `getChunk` applies these edits to the chunk it
|
|
11
|
+
* returns, as entries of its `voxelStates`; the packed grid itself is written only
|
|
12
|
+
* by `updateChunk` (see {@link ChunksAPI}). For high-frequency
|
|
12
13
|
* realtime edits prefer the UDP path (`client.udp.sendVoxelUpdate(...)`); use
|
|
13
14
|
* this API for authoritative reads, audit history, and administrative rollback.
|
|
14
15
|
*
|
|
@@ -60,10 +61,12 @@ export declare class VoxelsAPI {
|
|
|
60
61
|
listByDistance(input: ListVoxelUpdatesByDistanceQueryVariables['input']): Promise<ListVoxelUpdatesByDistanceQuery['listVoxelUpdatesByDistance']>;
|
|
61
62
|
/**
|
|
62
63
|
* Record (upsert) a single voxel edit in the `voxel_updates` log for one chunk.
|
|
63
|
-
* **Writes world state**;
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
64
|
+
* **Writes world state**; `getChunk` returns the edit in the chunk's
|
|
65
|
+
* `voxelStates` (the packed grid is written only by `updateChunk`). Requires
|
|
66
|
+
* voxel-edit permission for the target region: active app access, the
|
|
67
|
+
* `update_voxel_data` tier permission, and `update_voxel_data` on the most
|
|
68
|
+
* specific grid covering the chunk. A chunk no grid covers is refused, and so
|
|
69
|
+
* is one only the app's world grid covers while its wilderness is closed.
|
|
67
70
|
*
|
|
68
71
|
* @param input - {@link UpdateVoxelInput}: `appId`, chunk `coordinates`, the
|
|
69
72
|
* local voxel `location` and the `voxelType` to write (app-defined
|
|
@@ -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
|
|
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,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"}
|
package/dist/domains/voxels.js
CHANGED
|
@@ -6,8 +6,9 @@ import { ListVoxelsDocument, ListVoxelUpdatesByDistanceDocument, UpdateVoxelDocu
|
|
|
6
6
|
*
|
|
7
7
|
* A "voxel edit" is one row of the `voxel_updates` log (a {@link Voxel}): the
|
|
8
8
|
* app / chunk / local position that changed, the new voxel type, an optional
|
|
9
|
-
* base64 state blob, and who/when.
|
|
10
|
-
*
|
|
9
|
+
* base64 state blob, and who/when. `getChunk` applies these edits to the chunk it
|
|
10
|
+
* returns, as entries of its `voxelStates`; the packed grid itself is written only
|
|
11
|
+
* by `updateChunk` (see {@link ChunksAPI}). For high-frequency
|
|
11
12
|
* realtime edits prefer the UDP path (`client.udp.sendVoxelUpdate(...)`); use
|
|
12
13
|
* this API for authoritative reads, audit history, and administrative rollback.
|
|
13
14
|
*
|
|
@@ -66,10 +67,12 @@ export class VoxelsAPI {
|
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
68
69
|
* Record (upsert) a single voxel edit in the `voxel_updates` log for one chunk.
|
|
69
|
-
* **Writes world state**;
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
70
|
+
* **Writes world state**; `getChunk` returns the edit in the chunk's
|
|
71
|
+
* `voxelStates` (the packed grid is written only by `updateChunk`). Requires
|
|
72
|
+
* voxel-edit permission for the target region: active app access, the
|
|
73
|
+
* `update_voxel_data` tier permission, and `update_voxel_data` on the most
|
|
74
|
+
* specific grid covering the chunk. A chunk no grid covers is refused, and so
|
|
75
|
+
* is one only the app's world grid covers while its wilderness is closed.
|
|
73
76
|
*
|
|
74
77
|
* @param input - {@link UpdateVoxelInput}: `appId`, chunk `coordinates`, the
|
|
75
78
|
* local voxel `location` and the `voxelType` to write (app-defined
|
|
@@ -1663,7 +1663,7 @@ export declare enum CheckoutPurpose {
|
|
|
1663
1663
|
PropertyTokens = "PROPERTY_TOKENS",
|
|
1664
1664
|
/**
|
|
1665
1665
|
* @deprecated Legacy recurring subscription for a paid shared app slot. No longer purchasable via createCheckout; retained for historical checkouts and webhook reconciliation.
|
|
1666
|
-
* @deprecated Shared apps
|
|
1666
|
+
* @deprecated Shared apps are billed for metered usage from the org wallet. Publish via publishAppToShared and top up with ORG_WALLET_TOPUP.
|
|
1667
1667
|
*/
|
|
1668
1668
|
SharedAppSubscription = "SHARED_APP_SUBSCRIPTION"
|
|
1669
1669
|
}
|
|
@@ -4596,7 +4596,7 @@ export type Mutation = {
|
|
|
4596
4596
|
confirmEmail: Scalars['Boolean']['output'];
|
|
4597
4597
|
/** Open the UDP proxy session for this game token (idempotent: returns the existing status if one is already open). Binds a socket and selects the game server with the fewest clients on first open. Optional: send mutations and udpNotifications also create a session lazily when none exists. To force a fresh socket, call disconnectUdpProxy first. */
|
|
4598
4598
|
connectUdpProxy: UdpProxyConnectionStatus;
|
|
4599
|
-
/** Operator only.
|
|
4599
|
+
/** Operator only. Close an over-billed charge (an I3 finding: its priced total fell below what was billed and written off). The billed part of the difference is credited to the payer (a wallet credit and a CREDIT event); a written-off part (an exempt org) was never paid, so no money moves and a WRITE_OFF event of the opposite sign (reason OVERBILL_REVERSAL) offsets it. creditedMicrousd is the wallet credit only. Idempotent per charge state. */
|
|
4600
4600
|
cpBillingCreditOverbill: BillingCreditResult;
|
|
4601
4601
|
/** Operator only (is_operator or is_super_admin). Publish or release an emergency kill for one app. This state is separate from the app's own kill and always takes precedence in Management's effective envelope; app users cannot clear it. SIDE EFFECTS: revision increment and a sanitized audit event. NOTHING IS PUSHED TO GAME API: preemption takes effect when its runtime next pulls this app's crowdy.studio-agent-policy/1 replica, which is within about a minute for an app already holding one and not at all for an app that does not until a permitted caller asks. Releasing the operator kill does not enable the app or clear its own kill. Stable errors: AGENT_POLICY_INVALID, AGENT_POLICY_REVISION_CONFLICT, IDEMPOTENCY_CONFLICT. */
|
|
4602
4602
|
cpSetCrowdyStudioAgentAppKill: CrowdyStudioAgentPolicy;
|
|
@@ -4784,7 +4784,7 @@ export type Mutation = {
|
|
|
4784
4784
|
mintAppToken: AppTokenResponse;
|
|
4785
4785
|
/** Mint a grid-scoped token from the app token you hold (DN-10). The result can call only a short, fixed list of gameplay fields, and each is confined to the grid: world reads and replication sends must address a chunk inside it (a send's origin; its reach follows distance), and channels must be the grid's own. refreshAppToken and logout are refused, so the token cannot widen or tear down its parent. Requires an app token (not a session token, not another grid token), and the caller must own the grid or hold run_client_code on it. */
|
|
4786
4786
|
mintGridToken: GridTokenResponse;
|
|
4787
|
-
/** Publishes an app to the shared game-api environment. Free under the org's app-slot quota (result.free = true); beyond the quota, publish still succeeds and
|
|
4787
|
+
/** Publishes an app to the shared game-api environment. Free under the org's app-slot quota (result.free = true); beyond the quota, publish still succeeds and metered usage is charged to the org wallet. Requires the 'manage_apps' permission on the app's org. Blocked when SHARED_GAME_API_URL is not configured. */
|
|
4788
4788
|
publishAppToShared: PublishAppResult;
|
|
4789
4789
|
/** Store acceptance of the current required legal documents (Game Terms, API Terms, SDK Developer Terms, Free Tier and Billing Basis, Overworld Privacy Policy) and the age-of-majority attestation. Both arguments must be true; a false value stores nothing and is refused with LEGAL_ACCEPTANCE_REQUIRED. Idempotent for a version already stored. Requires a session token. Gameplay tokens stay refused until this has succeeded for the current document set. */
|
|
4790
4790
|
recordPlayerConsents: Scalars['Boolean']['output'];
|
|
@@ -4838,7 +4838,7 @@ export type Mutation = {
|
|
|
4838
4838
|
revokeTierAccessRule: TierAccessRule;
|
|
4839
4839
|
/** Reverts every voxel edit made by `userId` in `appId` between `from` and `to`, returning one RollbackVoxelEventResult per affected voxel (`applied` tells you whether each was actually changed). DEFAULTS to dryRun=true, which only PREVIEWS the planned reversions without writing; pass dryRun=false to actually apply them (DESTRUCTIVE — mutates world state). A reverted voxel’s edit-log row takes the earlier edit’s type, state and author and the ROLLBACK’s time as its createdAt, so a client reading edits `since` its last sync sees the revert. When the app’s wilderness is closed (`wildernessOpen` false), an applied rollback that would write any chunk of closed, unclaimed wilderness is refused (403) before it writes anything; a dry run is not. Requires a valid bearer token AND the `manage_apps` permission on the org that owns `appId` (super admins bypass). */
|
|
4840
4840
|
rollbackVoxelUpdates: Array<RollbackVoxelEventResult>;
|
|
4841
|
-
/** OPERATOR ONLY. Runs the shared-usage
|
|
4841
|
+
/** OPERATOR ONLY. Runs the shared-usage tick once instead of waiting for the ~60s cron: reserved-throughput billing, the itemised statement of the last closed clock hour, and the usage-gate evaluation of every shared app. Metered usage is priced and charged by the ledger's settlement, about once a minute, not by this tick. Backdating usage rows is a local-test fixture, not something this mutation does on a live tier. */
|
|
4842
4842
|
runSharedUsageBillingTick: Scalars['Boolean']['output'];
|
|
4843
4843
|
/** Send an actor (player/NPC) state update for spatial replication to nearby chunks. Requires a bearer game token; opens a UDP proxy session automatically if none exists. Returns Boolean! that is true only when the datagram was ACCEPTED FOR SENDING to the game server — it does NOT confirm the world applied the update. There is NO separate per-request success response: the game server fans the update out to every client in the target chunk INCLUDING the sender, so you observe your own applied update as an ActorUpdateNotification carrying the same sequenceNumber (ActorUpdateResponse is legacy and is never emitted). Failures arrive ASYNCHRONOUSLY as a GenericErrorResponse; both are correlated by the request sequenceNumber (correlation only — not an idempotency key; the server does not dedupe replays). Subscribe to udpNotifications before sending so the self-notification/error is not missed. */
|
|
4844
4844
|
sendActorUpdate: Scalars['Boolean']['output'];
|
|
@@ -4880,7 +4880,7 @@ export type Mutation = {
|
|
|
4880
4880
|
setAppVisibility: App;
|
|
4881
4881
|
/** Enables or disables off-session auto-billing for an org and updates its thresholds. When enabled and the wallet falls to lowWaterThresholdCents, the saved payment method is charged rechargeAmountCents (requires setupSharedPaymentMethod first). Pass limitCents=null for no per-period cap. Requires the 'manage_billing' org permission. */
|
|
4882
4882
|
setAutoBilling: OrgAutoBilling;
|
|
4883
|
-
/** OPERATOR ONLY. Sets a metered dimension's price, the UNIT that price is quoted in, its free allowances, or any combination, and returns the new row alongside the values that moved. THIS IS THE ONLY SANCTIONED WAY TO CHANGE A PRICE OR A UNIT: the schema seeds use ON CONFLICT DO NOTHING, so a rate reaches a tier once at install and a unit corrected in the declaration never reaches a tier that already exists. Refuses an unknown or unmetered metric (a rate for a dimension nothing meters bills nobody while appearing configured), refuses a negative price, refuses unitLabel without unitQuantity (which would restate the rate card while the arithmetic kept the old divisor), and refuses a call that would change nothing. A unit change that also moves the money needs acknowledgeRepricing: true, so restating a price and cutting it cannot be confused. priceBands sets a graduated schedule (SHARED aggregate_data_volume only; band 1 becomes priceCents) and clearPriceBands returns the dimension to one flat price; while a dimension is banded a bare priceCents or a unit change is refused. NOT RETROACTIVE:
|
|
4883
|
+
/** OPERATOR ONLY. Sets a metered dimension's price, the UNIT that price is quoted in, its free allowances, or any combination, and returns the new row alongside the values that moved. THIS IS THE ONLY SANCTIONED WAY TO CHANGE A PRICE OR A UNIT: the schema seeds use ON CONFLICT DO NOTHING, so a rate reaches a tier once at install and a unit corrected in the declaration never reaches a tier that already exists. Refuses an unknown or unmetered metric (a rate for a dimension nothing meters bills nobody while appearing configured), refuses a negative price, refuses unitLabel without unitQuantity (which would restate the rate card while the arithmetic kept the old divisor), and refuses a call that would change nothing. A unit change that also moves the money needs acknowledgeRepricing: true, so restating a price and cutting it cannot be confused. priceBands sets a graduated schedule (SHARED aggregate_data_volume only; band 1 becomes priceCents) and clearPriceBands returns the dimension to one flat price; while a dimension is banded a bare priceCents or a unit change is refused. NOT RETROACTIVE: the ledger keeps the rate and allowance in force when a (payer, dimension, period) is first charged, so a change applies from each dimension's next period and nothing already charged is repriced. Takes effect within about a minute — the settlement reloads the card on every run, so no restart is needed. */
|
|
4884
4884
|
setBillingRate: SetRateCardResult;
|
|
4885
4885
|
/** Replace a member's channel roles with the given set (not additive — roles not listed are removed). Requires the 'manage_roles' channel permission (app admins bypass). Re-pushes the member's effective send permission to Buddy so their ability to post updates immediately. */
|
|
4886
4886
|
setChannelMemberRoles: GroupMember;
|
|
@@ -6444,7 +6444,7 @@ export type PlayerSpendCap = {
|
|
|
6444
6444
|
/** The owning player user id. */
|
|
6445
6445
|
userId: Scalars['BigInt']['output'];
|
|
6446
6446
|
};
|
|
6447
|
-
/** One
|
|
6447
|
+
/** One player usage charge from the hourly cents-era billing: a (player, app, closed clock hour) row. The lossless ledger, on by default, replaced that billing and writes no rows here, so the list ends where the ledger took over; usage since is in playerWalletTransactions as "usage_debit" entries. amountCents = platformCents + markupCents: what the platform charged and what the studio added. */
|
|
6448
6448
|
export type PlayerUsageCharge = {
|
|
6449
6449
|
__typename?: 'PlayerUsageCharge';
|
|
6450
6450
|
/** Total debited cents. */
|
|
@@ -6491,7 +6491,7 @@ export type PlayerWallet = {
|
|
|
6491
6491
|
/** Wallet id. */
|
|
6492
6492
|
walletId: Scalars['BigInt']['output'];
|
|
6493
6493
|
};
|
|
6494
|
-
/** One player-wallet ledger entry: top-ups,
|
|
6494
|
+
/** One player-wallet ledger entry: top-ups, usage debits, auto-recharges, refunds, purchases, payouts and adjustments. A usage debit carries the app and charges what one dimension's running total for its period now costs beyond what was already charged, the app's markup included, so a period can bring several debits as its usage arrives; its description names the dimension and the period. */
|
|
6495
6495
|
export type PlayerWalletTransaction = {
|
|
6496
6496
|
__typename?: 'PlayerWalletTransaction';
|
|
6497
6497
|
/**
|
|
@@ -6514,11 +6514,11 @@ export type PlayerWalletTransaction = {
|
|
|
6514
6514
|
createdAt: Scalars['DateTime']['output'];
|
|
6515
6515
|
/** Human description. */
|
|
6516
6516
|
description: Maybe<Scalars['String']['output']>;
|
|
6517
|
-
/** External reference
|
|
6517
|
+
/** External reference: the checkout or PaymentIntent id of a top-up, or for a usage debit the ledger charge it settles ("charge:<chargeId>:<n>", the n-th debit of that charge). */
|
|
6518
6518
|
referenceId: Maybe<Scalars['String']['output']>;
|
|
6519
6519
|
/** Transaction id. */
|
|
6520
6520
|
transactionId: Scalars['BigInt']['output'];
|
|
6521
|
-
/** What produced this entry. The complete set of values this API writes: "topup" (credit from a completed checkout, positive), "auto_recharge" (off-session automatic recharge, positive), "payout_credit" (marketplace seller payout, positive), "refund" (marketplace refund returned to the buyer, positive), "usage_debit" (
|
|
6521
|
+
/** What produced this entry. The complete set of values this API writes: "topup" (credit from a completed checkout, positive), "auto_recharge" (off-session automatic recharge, positive), "payout_credit" (marketplace seller payout, positive), "refund" (marketplace refund returned to the buyer, positive), "usage_debit" (metered player usage in one app: the increase in what one dimension's period total costs since the last debit for it, markup included, negative), "purchase" (marketplace purchase, negative), "adjustment" (operator or dispute-clawback correction, signed). */
|
|
6522
6522
|
transactionType: Scalars['String']['output'];
|
|
6523
6523
|
/** The owning player user id. */
|
|
6524
6524
|
userId: Scalars['BigInt']['output'];
|
|
@@ -6705,7 +6705,7 @@ export type Query = {
|
|
|
6705
6705
|
billingCharges: Array<BillingCharge>;
|
|
6706
6706
|
/** OPERATOR ONLY. Every organization currently marked billing_exempt. An exemption nobody can enumerate is an exemption that outlives its reason. */
|
|
6707
6707
|
billingExemptOrgs: Array<BillingExemptOrgType>;
|
|
6708
|
-
/** OPERATOR ONLY. The metered rate card for a scope: every priced dimension with its unit, price and
|
|
6708
|
+
/** OPERATOR ONLY. The metered rate card for a scope: every priced dimension with its unit, price, free allowance and the period that allowance resets on. SHARED is organization usage charged to the org wallet as "shared_usage"; PLAYER is a player's own metered usage charged to the player wallet as "usage_debit". A dimension priced at 0 is metered but not charged. Read-only. Customers read the same rates through `meteredRateCard`, which is public and omits the operator note. */
|
|
6709
6709
|
billingRateCard: Array<RateCardEntryType>;
|
|
6710
6710
|
/** Amounts the platform could not bill this org for, with the reason (an exempt org, a provider with no generation record, a process that died with metered usage in memory). Requires 'view_billing' on the org. */
|
|
6711
6711
|
billingWriteOffs: Array<BillingWriteOff>;
|
|
@@ -6943,11 +6943,14 @@ export type Query = {
|
|
|
6943
6943
|
playerRuntimeStates: Array<PlayerRuntimeState>;
|
|
6944
6944
|
/** The caller's self-set spend caps (global and per-app) with running counters. The effective runtime limit is min(developer policy, self-cap, wallet balance). */
|
|
6945
6945
|
playerSpendCaps: Array<PlayerSpendCap>;
|
|
6946
|
-
/**
|
|
6946
|
+
/**
|
|
6947
|
+
* The caller's hourly player-usage charges from the cents-era billing, newest first, optionally filtered by app. Nothing has been added since the lossless ledger took over; current usage charges are the "usage_debit" entries in playerWalletTransactions.
|
|
6948
|
+
* @deprecated Reads the hourly cents-era charge rows, which the lossless ledger does not write. Read playerWalletTransactions: each "usage_debit" entry is one charge, per app, markup included.
|
|
6949
|
+
*/
|
|
6947
6950
|
playerUsageCharges: Array<PlayerUsageCharge>;
|
|
6948
6951
|
/** The caller's player wallet, created empty on first access (never null). Platform-scoped: one wallet, across every org and app, pays for the player's mods past their monthly trial and any Agentic Studio model requests charged to them; org billing never touches it. Fund it via createCheckout purpose PLAYER_WALLET_TOPUP. */
|
|
6949
6952
|
playerWalletBalance: PlayerWallet;
|
|
6950
|
-
/** The caller's player-wallet ledger, newest first: top-ups,
|
|
6953
|
+
/** The caller's player-wallet ledger, newest first: top-ups, usage debits (per app, the app's markup included), auto-recharges, refunds, purchases, payouts and adjustments. Each usage debit names its dimension and period, and an over-charge credited back appears as an adjustment. */
|
|
6951
6954
|
playerWalletTransactions: Array<PlayerWalletTransaction>;
|
|
6952
6955
|
/** Whether portaling the calling user into an app needs a consent prompt. Trusted (first-party) apps and already-granted apps return consentRequired=false. The Overworld calls this before createPortalAuthorizationCode. Requires a SESSION token. */
|
|
6953
6956
|
portalConsent: PortalConsentState;
|
|
@@ -7620,7 +7623,7 @@ export type RateCardBandType = {
|
|
|
7620
7623
|
/** Exclusive upper edge of this band on the period's running total, in raw metric units, as a BigInt decimal string. A band covers units from the previous band's edge up to this one. Null on the last band, which has no upper edge. */
|
|
7621
7624
|
upToUnits: Maybe<Scalars['BigInt']['output']>;
|
|
7622
7625
|
};
|
|
7623
|
-
/** One priced dimension: its rate and, where it has one, its
|
|
7626
|
+
/** One priced dimension: its rate and, where it has one, its free allowance and the period that allowance resets on. A dimension with a price of 0 is metered but not charged. */
|
|
7624
7627
|
export type RateCardEntryType = {
|
|
7625
7628
|
__typename?: 'RateCardEntryType';
|
|
7626
7629
|
/** ISO currency code. USD today. */
|
|
@@ -7660,7 +7663,7 @@ export type RateChangeType = {
|
|
|
7660
7663
|
/** The value after this call, as a decimal string. */
|
|
7661
7664
|
updated: Scalars['String']['output'];
|
|
7662
7665
|
};
|
|
7663
|
-
/** Which rate card. SHARED prices organization metered usage
|
|
7666
|
+
/** Which rate card. SHARED prices an organization's metered usage in shared-environment apps, charged to the org wallet as "shared_usage" entries. PLAYER prices a player's own metered usage (mod compute, egress, model storage and player-paid model tokens), charged to the player wallet as "usage_debit" entries with the app's markup added. Both settle about once a minute: each (payer, dimension, period) is charged what its running total now costs beyond what was already charged for it. */
|
|
7664
7667
|
export declare enum RateScope {
|
|
7665
7668
|
Player = "PLAYER",
|
|
7666
7669
|
Shared = "SHARED"
|
|
@@ -8261,13 +8264,13 @@ export type SetRateCardInput = {
|
|
|
8261
8264
|
acknowledgeRepricing?: InputMaybe<Scalars['Boolean']['input']>;
|
|
8262
8265
|
/** true removes the dimension's bands so it is priced flat at priceCents (the former first band's price unless priceCents is also given). Not combinable with priceBands. */
|
|
8263
8266
|
clearPriceBands?: InputMaybe<Scalars['Boolean']['input']>;
|
|
8264
|
-
/** New hourly free allowance in raw metric units, as a BigInt decimal string. Must be >= 0. Omit to leave the allowance unchanged. */
|
|
8267
|
+
/** New hourly free allowance in raw metric units, as a BigInt decimal string. Must be >= 0. Omit to leave the allowance unchanged. Like a price, it applies from a dimension's next period where a period has already been charged. */
|
|
8265
8268
|
freePerHour?: InputMaybe<Scalars['BigInt']['input']>;
|
|
8266
|
-
/** New monthly free allowance in raw metric units, as a BigInt decimal string. Must be >= 0. On the PLAYER card with metric player_wasm_compute_units this is the pooled monthly TRIAL BUDGET per (player, app) — the only sanctioned way to change it on a live tier. Omit to leave it unchanged. */
|
|
8269
|
+
/** New monthly free allowance in raw metric units, as a BigInt decimal string. Must be >= 0. On the PLAYER card with metric player_wasm_compute_units this is the pooled monthly TRIAL BUDGET per (player, app) — the only sanctioned way to change it on a live tier. Omit to leave it unchanged. Like a price, it applies from a dimension's next period where a period has already been charged. */
|
|
8267
8270
|
freePerMonth?: InputMaybe<Scalars['BigInt']['input']>;
|
|
8268
8271
|
/** New period for the free allowance. Leaves the units as they are unless freeUnits is also given. Moving a dimension to MONTH is how the development quota is stated. */
|
|
8269
8272
|
freePeriod?: InputMaybe<AllowancePeriod>;
|
|
8270
|
-
/** New free allowance in raw metric units per freePeriod, as a BigInt decimal string. Must be >= 0. Leaves the period as it is unless freePeriod is also given. Not combinable with freePerHour, which is the older spelling of freeUnits with freePeriod HOUR. */
|
|
8273
|
+
/** New free allowance in raw metric units per freePeriod, as a BigInt decimal string. Must be >= 0. Leaves the period as it is unless freePeriod is also given. Not combinable with freePerHour, which is the older spelling of freeUnits with freePeriod HOUR. Like a price, it applies from a dimension's next period where a period has already been charged. */
|
|
8271
8274
|
freeUnits?: InputMaybe<Scalars['BigInt']['input']>;
|
|
8272
8275
|
/** The metered dimension to reprice. Refused unless the platform actually meters it: a rate for an unmetered metric bills nobody while appearing configured. */
|
|
8273
8276
|
metric: Scalars['String']['input'];
|
|
@@ -9182,7 +9185,7 @@ export type WalletTransaction = {
|
|
|
9182
9185
|
referenceId: Maybe<Scalars['String']['output']>;
|
|
9183
9186
|
/** Unique transaction id (BigInt as a decimal string). */
|
|
9184
9187
|
transactionId: Scalars['BigInt']['output'];
|
|
9185
|
-
/** What produced this transaction. The complete set of values this API writes: "topup" (wallet credit from a completed checkout, positive), "admin_credit" (operator credit applied without a payment provider, positive), "auto_recharge" (off-session automatic wallet recharge, positive), "shared_usage" (
|
|
9188
|
+
/** What produced this transaction. The complete set of values this API writes: "topup" (wallet credit from a completed checkout, positive), "admin_credit" (operator credit applied without a payment provider, positive), "auto_recharge" (off-session automatic wallet recharge, positive), "shared_usage" (metered shared-environment usage: the increase in what one dimension's period total costs since the last charge for it, negative), "agent_usage" (Crowdy Studio agent run charged at provider cost, negative), "reserved_throughput" (monthly or prorated reserved capacity -- realtime bytes/s or GraphQL operations/s -- charged in addition to metered usage rather than including any of it, negative), "markup_payout" (the app developer's markup on a player's metered usage, credited to the org in the same transaction as the player debit that produced it, positive), "refund" (a payment-provider refund of a top-up, the credited amount leaving the wallet again, negative), "chargeback" (a card dispute on an org top-up, clawed back from the org wallet, negative). No other value is written; earlier versions of this description also listed "usage" and "environment_usage", neither of which was ever produced. */
|
|
9186
9189
|
transactionType: Scalars['String']['output'];
|
|
9187
9190
|
/** Wallet this transaction belongs to (BigInt as a decimal string). */
|
|
9188
9191
|
walletId: Scalars['BigInt']['output'];
|