@crowdedkingdoms/crowdyjs 18.14.0-test.1 → 18.14.0
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/README.md +14 -18
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.js +6 -6
- package/dist/generated/graphql-schema.d.ts +17 -14
- 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 +1 -1
package/README.md
CHANGED
|
@@ -12,23 +12,19 @@ gameplay, minted per app through `client.portal`.
|
|
|
12
12
|
|
|
13
13
|
Start here:
|
|
14
14
|
|
|
15
|
-
- [SDK guide](https://docs.
|
|
15
|
+
- [SDK guide](https://docs.crowdedkingdoms.com/crowdyjs/readme) — the canonical
|
|
16
16
|
walkthrough of everything in this README.
|
|
17
|
-
- [Build a game](https://docs.
|
|
17
|
+
- [Build a game](https://docs.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.
|
|
19
|
+
- [Platform overview](https://docs.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
|
|
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
|
-
|
|
32
28
|
**Server compatibility.** A release selects fields the Game API it was built against has,
|
|
33
29
|
so it needs that Game API or newer; promote the Game API before the SDK on each tier.
|
|
34
30
|
|
|
@@ -199,8 +195,8 @@ Notes:
|
|
|
199
195
|
- Use `client.auth.setToken(token)` to seed a token externally (e.g. when
|
|
200
196
|
restoring auth from a non-default storage).
|
|
201
197
|
|
|
202
|
-
Deeper reading: [Portals & app-scoped tokens](https://docs.
|
|
203
|
-
and [Sign in](https://docs.
|
|
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).
|
|
204
200
|
|
|
205
201
|
### Token refresh during gameplay
|
|
206
202
|
|
|
@@ -324,7 +320,7 @@ query AppForRouting($appId: BigInt!) {
|
|
|
324
320
|
`CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
|
|
325
321
|
that app's app-scoped token, then drive gameplay through that client. Apps
|
|
326
322
|
with no `gameApiUrl` keep working against the default `httpUrl` you
|
|
327
|
-
configured. See [Loading an app's Game API](https://docs.
|
|
323
|
+
configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
328
324
|
|
|
329
325
|
## Realtime notifications
|
|
330
326
|
|
|
@@ -735,7 +731,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
|
|
|
735
731
|
WebSocket events (not `requestAnimationFrame`), so render loops read freely
|
|
736
732
|
and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
|
|
737
733
|
keep timer-driven sends at full rate while hidden. See the
|
|
738
|
-
[World Stores guide](https://docs.
|
|
734
|
+
[World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
|
|
739
735
|
|
|
740
736
|
## Game Kit
|
|
741
737
|
|
|
@@ -813,7 +809,7 @@ The protocol is held to ck-exec's golden record of the starters
|
|
|
813
809
|
(`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
|
|
814
810
|
`test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
|
|
815
811
|
helpers went with the game model in 18.0.0; the hub modules replace them. See the
|
|
816
|
-
[Game Kit docs](https://docs.
|
|
812
|
+
[Game Kit docs](https://docs.crowdedkingdoms.com/game-kit/intro) and
|
|
817
813
|
[MIGRATION.md](MIGRATION.md).
|
|
818
814
|
|
|
819
815
|
## ck-exec
|
|
@@ -877,7 +873,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
|
|
|
877
873
|
`{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
|
|
878
874
|
milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
|
|
879
875
|
hub's integer fields refuse). The wire format is in the
|
|
880
|
-
[ck-exec docs](https://docs.
|
|
876
|
+
[ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
|
|
881
877
|
|
|
882
878
|
### A mod's CLIENT half
|
|
883
879
|
|
|
@@ -948,7 +944,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
|
|
|
948
944
|
module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
|
|
949
945
|
grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
|
|
950
946
|
`prompt.authorId` is the player. See
|
|
951
|
-
[CLIENT halves](https://docs.
|
|
947
|
+
[CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
|
|
952
948
|
|
|
953
949
|
## Hosting a game on Crowdy Games
|
|
954
950
|
|
|
@@ -1067,8 +1063,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
|
|
|
1067
1063
|
`mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
|
|
1068
1064
|
on legacy player compute since 18.0.0.
|
|
1069
1065
|
|
|
1070
|
-
See [CLIENT halves](https://docs.
|
|
1071
|
-
and [Embed Crowdy Studio in your game](https://docs.
|
|
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).
|
|
1072
1068
|
|
|
1073
1069
|
### The Studio agent (DeepSeek Harness in the browser)
|
|
1074
1070
|
|
|
@@ -1257,7 +1253,7 @@ no other repositories and no network access required:
|
|
|
1257
1253
|
`src/generated/graphql-schema.ts`, the generated schema types.
|
|
1258
1254
|
|
|
1259
1255
|
Schema refresh is explicit, from the published
|
|
1260
|
-
[SDL](https://docs.
|
|
1256
|
+
[SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1261
1257
|
|
|
1262
1258
|
```bash
|
|
1263
1259
|
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 prod` 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 'prod'
|
|
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 = "prod";
|
|
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.prod.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.prod.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.prod.crowdedkingdoms.com";
|
|
23
23
|
//# sourceMappingURL=default-origin.d.ts.map
|
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 prod` 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 'prod'
|
|
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 = 'prod';
|
|
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.prod.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.prod.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.prod.crowdedkingdoms.com';
|
|
@@ -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
|
}
|
|
@@ -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"
|
|
@@ -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'];
|