@crowdedkingdoms/crowdyjs 8.15.0 → 8.17.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 +16 -1
- package/dist/crowdy-client.d.ts +12 -0
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +9 -0
- package/dist/domains/admin.d.ts +4 -0
- package/dist/domains/admin.d.ts.map +1 -1
- package/dist/domains/admin.js +1 -0
- package/dist/domains/apps.d.ts +28 -1
- package/dist/domains/apps.d.ts.map +1 -1
- package/dist/domains/apps.js +52 -1
- package/dist/domains/gameApps.d.ts +17 -1
- package/dist/domains/gameApps.d.ts.map +1 -1
- package/dist/domains/gameApps.js +29 -1
- package/dist/domains/marketplace.d.ts +147 -0
- package/dist/domains/marketplace.d.ts.map +1 -0
- package/dist/domains/marketplace.js +257 -0
- package/dist/domains/playerCompute.d.ts +85 -0
- package/dist/domains/playerCompute.d.ts.map +1 -0
- package/dist/domains/playerCompute.js +127 -0
- package/dist/domains/playerModel.d.ts +20 -0
- package/dist/domains/playerModel.d.ts.map +1 -0
- package/dist/domains/playerModel.js +54 -0
- package/dist/domains/playerWallet.d.ts +59 -0
- package/dist/domains/playerWallet.d.ts.map +1 -0
- package/dist/domains/playerWallet.js +106 -0
- package/dist/generated/graphql.d.ts +3529 -241
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +187 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/live-coding/live-coding-controller.d.ts +73 -0
- package/dist/live-coding/live-coding-controller.d.ts.map +1 -0
- package/dist/live-coding/live-coding-controller.js +140 -0
- package/dist/live-coding/mount.d.ts +26 -0
- package/dist/live-coding/mount.d.ts.map +1 -0
- package/dist/live-coding/mount.js +108 -0
- package/dist/live-coding/templates.d.ts +17 -0
- package/dist/live-coding/templates.d.ts.map +1 -0
- package/dist/live-coding/templates.js +59 -0
- package/dist/player-runtime/player-code-broker.d.ts +101 -0
- package/dist/player-runtime/player-code-broker.d.ts.map +1 -0
- package/dist/player-runtime/player-code-broker.js +251 -0
- package/dist/player-runtime/player-glue-worker.d.ts +62 -0
- package/dist/player-runtime/player-glue-worker.d.ts.map +1 -0
- package/dist/player-runtime/player-glue-worker.js +127 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,12 @@ CrowdyJS v4 targets browsers by default and uses native `fetch`, `WebSocket`, `c
|
|
|
15
15
|
> **Server compatibility (v8.13):** v8.13 adds the **flow-correlation surface**: `gameModel.flow({ appId, flowId })` stitches one flow correlation id into a single cross-engine timeline (model events + automation runs + compute module runs, each time-ascending), and the default event/run fragments now select the nullable `flowId` field on `GmEvent` / `GmAutomationRun` / `WasmModuleRun`. Both require the 2026-07-19 `cks-game-api` dev line (the `2026-07-19-compute-fleet-hardening` migration for the columns and the `gameModelFlow` query for the timeline); older servers reject the operations with a GraphQL validation error, and everything else keeps working. `gameModel.flow` requires the app-admin `manage_apps` permission (it is a diagnostics surface). v8.13 also extends the kit invoke helpers' gameplay-verdict mapping: the typed invoke-contract violation `computeInvoke` raises (`BAD_REQUEST` with an "Invoke params violate ..." message, game-api 2026-07-19+) now maps onto `{ success: false, errorMessage }` (`kitInvoke`) / `{ success: false, reason }` (engine invokes) instead of throwing — see the exported `isKitVerdictError` predicate.
|
|
16
16
|
>
|
|
17
17
|
> **Server compatibility:** v8.12's **container query predicates** (`where`/`limit`/`offset` on `gameModel.containers`), **automation compute actions** (`actionKind: 'compute_invoke'` with `computeModuleName`/`computeExport` on `gameModel.upsertAutomation`; `property_changed` events additionally carry `oldValue`/`newValue` to compute modules), **container-change push** (`gameModel.containerChanged` — metadata-only pull-on-push over graphql-transport-ws; on Node ≤ 21 pass `webSocketImpl`), and **invoke-trigger contracts** (`contractJson` on `compute.upsertTrigger`/`moduleTriggers`, validated server-side pre-sandbox) require the 2026-07 `cks-game-api` dev line with the `2026-07-19-automation-compute-action` migration; older servers reject the new arguments/fields (omit them and everything else keeps working). (npm 8.11.0 is a partial cut of this surface — prefer 8.12.0.) v8.12 also adds the `runOptimisticAction` kit helper (client-only: the packaged optimistic apply → referee invoke → confirm/rollback loop with actionId receipts). v5.2+ targets environments on release **v0.1.19 or later** (`cks-game-api >= v0.10.3`, `cks-management-api >= v0.1.70`). The destructive mutations send an `idempotencyKey` argument that older servers don't define. v6.1's `client.gameApps.deleteGrid` additionally requires release **v0.1.33+** (`cks-game-api >= v0.12.3`). The game-model **permission effects** fields (`permissionEffects` on `gameModel.upsertFunction`/`seed`, `permissionEffectsAppliedJson` on events) require a `cks-game-api` build with the `2026-07-17-model-permission-effects` migration (v0.13.11+); older servers reject queries/mutations that include them (omit the fields and everything else keeps working). The **permission-read** surface (the `has_grid_permission`/`grid_at`/`has_chunk_permission` expression builtins the kit's `chunkPermission` locks compile to, and selector `*PermissionWhere` predicates) additionally requires `cks-game-api` **v0.13.12+**. Older `cks-game-api` builds report game-model **invoke policy denials** as `FORBIDDEN` GraphQL errors instead of resolving with `success: false`; as of this version the kit's invoke helpers map that error onto the documented `{ success: false, errorMessage }` result, so kit callers behave identically against both server generations. v8.6's **`client.compute`** (Compute Modules — server-side Rust/WASM logic) requires a `cks-game-api` build with the compute surface (the `compute*` root fields, v0.13.13+ dev line); older servers reject these operations with a GraphQL validation error, and everything else keeps working. v8.9's **realtime + live-ops surfaces** (`kit.abilities`/`movement`/`territory`/`racing`/`liveops`/`moderation`/`telemetry`, the loot engine path, `client.compute.deployTemplate` + `kit.deploy({engines})`, and the type-94..98 event parsers) complete the 30-abstraction catalog; v8.8's **session-genre engine surfaces** (`kit.instances`/`director`/`matchmaking`/`minigames`, the engine paths on matches/decks/leaderboards, `economy.orderBook`, and the type-91/92/93 event parsers) talk to the Wave 2 engine templates; capability detection keeps model-only deployments on today's behavior. v8.7's **engine kit surfaces** (`kit.mobs`, `kit.pets`, `kit.combat.attackRouted`, `kit.worldsim.forecast`, and the `kit/wire` pose/lane registry) talk to compute-module game engines built on the Wave 0/1 `cks-game-api` dev line (`crowdy-game-kit` crates); capability detection makes them degrade gracefully — model-only deployments keep today's behavior.
|
|
18
|
+
>
|
|
19
|
+
> **P1 player runtime compatibility:** `client.playerCompute`,
|
|
20
|
+
> `client.playerModel` (owner/grid-confined flexible data + automations), first-class grid
|
|
21
|
+
> ownership methods on `client.gameApps`, and app code-admission methods on
|
|
22
|
+
> `client.apps` require the 2026-07-20 game-api/management-api player-runtime
|
|
23
|
+
> schemas. Older servers reject only those operations during GraphQL validation.
|
|
18
24
|
|
|
19
25
|
> **v8.10 inventory authority:** generated craft/barter transactions work on
|
|
20
26
|
> existing Model servers. Compute-refereed durable commits require Compute SDK
|
|
@@ -102,9 +108,17 @@ If `managementUrl` is omitted, the SDK falls back to `httpUrl` for backwards-com
|
|
|
102
108
|
| `client.channels`, `client.teams` | Messaging channels and app-scoped player teams (membership + roles). |
|
|
103
109
|
| `client.gameModel` | Abstract game model: containers, properties, functions (incl. model-driven `notify_*` effects), sessions, and **automations / NPCs** (`upsertAutomation`, `runAutomation`, `automationRuns`, `automationStats`, …). |
|
|
104
110
|
| `client.compute` | **Compute Modules** — server-side Rust/WASM logic: author + deploy source (`upsertModule`, `deployVersion`, `waitForCompile`), triggers + policy, synchronous `invoke`, and monitoring (`moduleRuns`, `moduleStats`, `moduleLogs`, `appDiagnostics`). Modules run server-only; see [Compute Modules docs](https://docs.crowdedkingdoms.com/game-api/compute-modules). |
|
|
111
|
+
| `client.playerCompute` | Player-authored SERVER/CLIENT Rust/WASM bound to player-owned grids: deploy source, activate/deactivate, list modules/versions, and delete self-authored modules. |
|
|
112
|
+
| `client.playerModel` | Player-owned flexible model containers and grid-confined automations (`containers`, `createContainer`, `setProperty`, `automations`, `createAutomation`, …). |
|
|
105
113
|
| `client.udp` | UDP proxy subscriptions + spatial mutations (`sendActorUpdate`, `sendVoxelUpdate`, `sendAudioPacket`, `sendTextPacket`, `sendClientEvent`). |
|
|
106
114
|
| `client.realtime` | Connection status, manual `connect()` / `disconnect()`, `onStatus()` listener. |
|
|
107
115
|
| `client.world(appId)` | Higher-level helpers for browser games (`actor.join`, `actor.sendState`, `actor.sendText`). |
|
|
116
|
+
|
|
117
|
+
`PlayerCodeBroker` is the P1 page-side browser security skeleton: it transfers
|
|
118
|
+
compiled client artifacts to a platform-owned worker, keeps tokens on the page,
|
|
119
|
+
allow-lists host calls, and locally clamps chunk-targeted effects to the owned
|
|
120
|
+
grid before the normal SDK path reaches server authorization. P3 adds the
|
|
121
|
+
platform worker glue/live-coding presentation UI.
|
|
108
122
|
| `createWorldSession(client, appId, config)` (from `@crowdedkingdoms/crowdyjs/stores`) | World Stores: opt-in, SDK-managed game state — typed codecs (`structCodec` binary DSL), your own actor with a 5 Hz send loop (`session.self`), a remote-actor registry with lanes/history/staleness (`session.actors`), attributed send errors (`session.errors`), a chunk/voxel cache with realtime merge + worldgen write-back (`session.chunks`), channel/direct-message inboxes + a typed event router, host tracking, typed save/avatar state, and a game-model container mirror. Only configured stores exist (compile-time + runtime); unimported stores tree-shake away. |
|
|
109
123
|
| `client.kit(appId)` | Game Kit: ready-made mappings of game concepts onto the game model — `kit.inventory`, `kit.objects` (lockable doors/chests with custom permissions), `kit.npcs`, `kit.plots` (buy/rent land with transactional, replication-enforced grid grants), and the genre layers `kit.economy` (wallets/shops/trades/market), `kit.progression` (xp/skills/achievements/rating), `kit.loot`, `kit.quests`, `kit.combat`, `kit.matches` (session lobbies/turns/scores with notify-to-pull channels), `kit.decks` (hidden hands), `kit.worldsim` (clock/nodes/crops/waves), `kit.social` (parties/guilds/chat over teams+channels), `kit.leaderboards`, `kit.features` (tier gates), and the engine-aware helpers `kit.mobs` (refereed attacks, defs/slots, contact-damage parsing), `kit.pets` (adopt/summon/dismiss/rename), `kit.instances` (private world slices, seeded runs), `kit.director` (encounter runs), `kit.matchmaking` (queues/proposals/rating), `kit.minigames` (invoke-loop wrapper), `kit.economy.orderBook` (escrowed bid/ask market), engine paths on `kit.matches`/`kit.decks`/`kit.leaderboards`, `kit.quests` tutorial sequencing, `kit.engines` (compute capability detection) with `kit/wire` (the engine pose codec, `engineLanes()`, and the 77/90/91/92/93 event parsers) — plus blueprint builders + `kit.deploy(...)` for the admin "load the rules" step. |
|
|
110
124
|
|
|
@@ -121,7 +135,8 @@ If `managementUrl` is omitted, the SDK falls back to `httpUrl` for backwards-com
|
|
|
121
135
|
| `client.environments` | Dedicated environments: quote, provision, scale, deploy, link apps. |
|
|
122
136
|
| `client.usage` | Replication + GraphQL usage reporting. |
|
|
123
137
|
| `client.sharedEnvironment` | Publish to shared, runtime gating, spend caps, auto-billing. |
|
|
124
|
-
| `client.gameApps` | App grids (`createGrid` / `deleteGrid`)
|
|
138
|
+
| `client.gameApps` | App grids (`createGrid` / `deleteGrid`), first-class grid ownership (`ownership` / `assignOwnership` / `transferOwnership`), and grid runtime-permission administration. |
|
|
139
|
+
| `client.apps` | App registry/routing plus player-code admission mode and code/author/org allow-list administration. |
|
|
125
140
|
|
|
126
141
|
**Operator surface** (platform operations; requires `is_operator`):
|
|
127
142
|
|
package/dist/crowdy-client.d.ts
CHANGED
|
@@ -58,6 +58,10 @@ import { TeamsAPI } from './domains/teams.js';
|
|
|
58
58
|
import { UdpAPI } from './domains/udp.js';
|
|
59
59
|
import { GameModelAPI } from './domains/gameModel.js';
|
|
60
60
|
import { ComputeAPI } from './domains/compute.js';
|
|
61
|
+
import { PlayerComputeAPI } from './domains/playerCompute.js';
|
|
62
|
+
import { PlayerWalletAPI } from './domains/playerWallet.js';
|
|
63
|
+
import { MarketplaceAPI } from './domains/marketplace.js';
|
|
64
|
+
import { PlayerModelAPI } from './domains/playerModel.js';
|
|
61
65
|
export interface CrowdyClientConfig {
|
|
62
66
|
/** game-api HTTP root (e.g. `https://dev-game-api.crowdedkingdoms.com`). */
|
|
63
67
|
httpUrl?: string;
|
|
@@ -190,6 +194,14 @@ export declare class CrowdyClient {
|
|
|
190
194
|
readonly gameModel: GameModelAPI;
|
|
191
195
|
/** Compute Modules: server-side Rust/WASM logic (manage, invoke, observe). */
|
|
192
196
|
readonly compute: ComputeAPI;
|
|
197
|
+
/** Player-authored Rust/WASM bound to player-owned grids. */
|
|
198
|
+
readonly playerCompute: PlayerComputeAPI;
|
|
199
|
+
/** P4a marketplace (free mode): store, installs, consent, claim flows. */
|
|
200
|
+
readonly marketplace: MarketplaceAPI;
|
|
201
|
+
/** Player wallet, spend caps, hourly usage charges, and player policy (P2). */
|
|
202
|
+
readonly playerWallet: PlayerWalletAPI;
|
|
203
|
+
/** Player-owned flexible model data and grid-confined automations. */
|
|
204
|
+
readonly playerModel: PlayerModelAPI;
|
|
193
205
|
/** Durable avatars + per-app avatar state (owner-aware reads). */
|
|
194
206
|
readonly avatars: AvatarsAPI;
|
|
195
207
|
/** Game-host election + actor liveness heartbeat. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crowdy-client.d.ts","sourceRoot":"","sources":["../src/crowdy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,m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crowdy-client.js
CHANGED
|
@@ -56,6 +56,10 @@ import { TeamsAPI } from './domains/teams.js';
|
|
|
56
56
|
import { UdpAPI } from './domains/udp.js';
|
|
57
57
|
import { GameModelAPI } from './domains/gameModel.js';
|
|
58
58
|
import { ComputeAPI } from './domains/compute.js';
|
|
59
|
+
import { PlayerComputeAPI } from './domains/playerCompute.js';
|
|
60
|
+
import { PlayerWalletAPI } from './domains/playerWallet.js';
|
|
61
|
+
import { MarketplaceAPI } from './domains/marketplace.js';
|
|
62
|
+
import { PlayerModelAPI } from './domains/playerModel.js';
|
|
59
63
|
export class CrowdyClient {
|
|
60
64
|
constructor(config = {}) {
|
|
61
65
|
this.session = new AuthState(config.tokenStore);
|
|
@@ -114,11 +118,16 @@ export class CrowdyClient {
|
|
|
114
118
|
getToken: () => this.session.getToken(),
|
|
115
119
|
});
|
|
116
120
|
this.compute = new ComputeAPI(this.graphql);
|
|
121
|
+
this.playerCompute = new PlayerComputeAPI(this.graphql);
|
|
122
|
+
this.playerWallet = new PlayerWalletAPI(this.management);
|
|
123
|
+
this.marketplace = new MarketplaceAPI(this.graphql, this.management);
|
|
124
|
+
this.playerModel = new PlayerModelAPI(this.graphql);
|
|
117
125
|
this.avatars = new AvatarsAPI(this.graphql);
|
|
118
126
|
this.host = new HostAPI(this.graphql);
|
|
119
127
|
this.gameApps = new GameAppsAPI(this.graphql);
|
|
120
128
|
this.admin = new AdminAPI({
|
|
121
129
|
organizations: this.organizations,
|
|
130
|
+
apps: this.apps,
|
|
122
131
|
appAccess: this.appAccess,
|
|
123
132
|
billing: this.billing,
|
|
124
133
|
payments: this.payments,
|
package/dist/domains/admin.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OrganizationsAPI } from './organizations.js';
|
|
2
|
+
import type { AppsAPI } from './apps.js';
|
|
2
3
|
import type { AppAccessAPI } from './appAccess.js';
|
|
3
4
|
import type { BillingAPI } from './billing.js';
|
|
4
5
|
import type { PaymentsAPI } from './payments.js';
|
|
@@ -30,6 +31,8 @@ import type { GameAppsAPI } from './gameApps.js';
|
|
|
30
31
|
export declare class AdminAPI {
|
|
31
32
|
/** Organizations, members, RBAC roles, and org API tokens. */
|
|
32
33
|
readonly organizations: OrganizationsAPI;
|
|
34
|
+
/** App registry, routing, and player-code admission policy. */
|
|
35
|
+
readonly apps: AppsAPI;
|
|
33
36
|
/** App access tiers + per-user access grants. */
|
|
34
37
|
readonly appAccess: AppAccessAPI;
|
|
35
38
|
/** Org wallet + per-app spend budgets. */
|
|
@@ -48,6 +51,7 @@ export declare class AdminAPI {
|
|
|
48
51
|
readonly grids: GameAppsAPI;
|
|
49
52
|
constructor(deps: {
|
|
50
53
|
organizations: OrganizationsAPI;
|
|
54
|
+
apps: AppsAPI;
|
|
51
55
|
appAccess: AppAccessAPI;
|
|
52
56
|
billing: BillingAPI;
|
|
53
57
|
payments: PaymentsAPI;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/domains/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,QAAQ;IACnB,8DA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KACpB;CAYF"}
|
package/dist/domains/admin.js
CHANGED
package/dist/domains/apps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type AppQuery, type AppBySlugQuery, type MyAppsQuery, type AppsForOrgQuery, type MarketplaceAppsQuery, type MarketplaceAppsQueryVariables, type AppsConnectionQuery, type AppsConnectionQueryVariables, type CreateAppMutation, type UpdateAppMutation, type ArchiveAppMutation, type SetAppVisibilityMutation, type CreateAppInput, type UpdateAppInput, type AppVisibility } from '../generated/graphql.js';
|
|
2
|
+
import { type AppQuery, type AppBySlugQuery, type MyAppsQuery, type AppsForOrgQuery, type MarketplaceAppsQuery, type MarketplaceAppsQueryVariables, type AppsConnectionQuery, type AppsConnectionQueryVariables, type CreateAppMutation, type UpdateAppMutation, type ArchiveAppMutation, type SetAppVisibilityMutation, type AppCodeAdmissionModeQuery, type AppCodeAdmissionsQuery, type SetAppCodeAdmissionModeMutation, type AdmitAppCodeMutation, type RevokeAppCodeAdmissionMutation, type CreateAppInput, type UpdateAppInput, type AdmitAppCodeInput, type AppVisibility, type CodeAdmissionMode } from '../generated/graphql.js';
|
|
3
3
|
/**
|
|
4
4
|
* The minimal routing tuple the SDK derives from an `App` row: just enough to
|
|
5
5
|
* decide which game-api endpoint should serve a given app. Returned by
|
|
@@ -66,6 +66,33 @@ export interface AppRoute {
|
|
|
66
66
|
export declare class AppsAPI {
|
|
67
67
|
private readonly management;
|
|
68
68
|
constructor(management: GraphQLClient);
|
|
69
|
+
/**
|
|
70
|
+
* Read the app's player-code admission mode. Requires
|
|
71
|
+
* `view_compute_diagnostics`.
|
|
72
|
+
*/
|
|
73
|
+
codeAdmissionMode(appId: string): Promise<AppCodeAdmissionModeQuery['appCodeAdmissionMode']>;
|
|
74
|
+
/**
|
|
75
|
+
* List code/author/org allow-list entries newest-first. Revoked audit rows
|
|
76
|
+
* are omitted unless `includeRevoked` is true. Requires
|
|
77
|
+
* `view_compute_diagnostics`.
|
|
78
|
+
*/
|
|
79
|
+
codeAdmissions(appId: string, includeRevoked?: boolean): Promise<AppCodeAdmissionsQuery['appCodeAdmissions']>;
|
|
80
|
+
/**
|
|
81
|
+
* Set the app's admission mode. Switching to `ALLOW_LIST` drains unadmitted
|
|
82
|
+
* code at activation while leaving deploy/compile available. Requires
|
|
83
|
+
* `manage_compute`.
|
|
84
|
+
*/
|
|
85
|
+
setCodeAdmissionMode(appId: string, mode: CodeAdmissionMode): Promise<SetAppCodeAdmissionModeMutation['setAppCodeAdmissionMode']>;
|
|
86
|
+
/**
|
|
87
|
+
* Admit one code listing, author, or org to the app allow list. Admission
|
|
88
|
+
* controls execution only and never grants source visibility.
|
|
89
|
+
*/
|
|
90
|
+
admitCode(input: AdmitAppCodeInput): Promise<AdmitAppCodeMutation['admitAppCode']>;
|
|
91
|
+
/**
|
|
92
|
+
* Revoke an active admission. The server audit-logs and replica-syncs the
|
|
93
|
+
* change, then drains affected server modules and blocks client artifacts.
|
|
94
|
+
*/
|
|
95
|
+
revokeCodeAdmission(appId: string, admissionId: string): Promise<RevokeAppCodeAdmissionMutation['revokeAppCodeAdmission']>;
|
|
69
96
|
/**
|
|
70
97
|
* Fetch a single app by its numeric id. Requires authentication (any signed-in
|
|
71
98
|
* user); does **not** enforce org/app permissions, so it can read apps the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/domains/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/domains/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAgBL,KAAK,QAAQ,EAEb,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,oBAAoB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iBAAiB,CAAC,WAAW,CAAC,CAAC;IAQ1C;;;;;;;OAOG;IACG,OAAO,CACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAK5C;;;;;;;OAOG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,aAAa,GACxB,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;CAOzD"}
|
package/dist/domains/apps.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppDocument, AppBySlugDocument, MyAppsDocument, AppsForOrgDocument, MarketplaceAppsDocument, AppsConnectionDocument, CreateAppDocument, UpdateAppDocument, ArchiveAppDocument, SetAppVisibilityDocument, } from '../generated/graphql.js';
|
|
1
|
+
import { AppDocument, AppBySlugDocument, MyAppsDocument, AppsForOrgDocument, MarketplaceAppsDocument, AppsConnectionDocument, CreateAppDocument, UpdateAppDocument, ArchiveAppDocument, SetAppVisibilityDocument, AppCodeAdmissionModeDocument, AppCodeAdmissionsDocument, SetAppCodeAdmissionModeDocument, AdmitAppCodeDocument, RevokeAppCodeAdmissionDocument, } from '../generated/graphql.js';
|
|
2
2
|
function appRouteFromAppRow(row) {
|
|
3
3
|
if (!row || typeof row !== 'object')
|
|
4
4
|
return null;
|
|
@@ -52,6 +52,57 @@ export class AppsAPI {
|
|
|
52
52
|
constructor(management) {
|
|
53
53
|
this.management = management;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Read the app's player-code admission mode. Requires
|
|
57
|
+
* `view_compute_diagnostics`.
|
|
58
|
+
*/
|
|
59
|
+
async codeAdmissionMode(appId) {
|
|
60
|
+
const data = await this.management.request(AppCodeAdmissionModeDocument, {
|
|
61
|
+
appId,
|
|
62
|
+
});
|
|
63
|
+
return data.appCodeAdmissionMode;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* List code/author/org allow-list entries newest-first. Revoked audit rows
|
|
67
|
+
* are omitted unless `includeRevoked` is true. Requires
|
|
68
|
+
* `view_compute_diagnostics`.
|
|
69
|
+
*/
|
|
70
|
+
async codeAdmissions(appId, includeRevoked = false) {
|
|
71
|
+
const variables = {
|
|
72
|
+
appId,
|
|
73
|
+
includeRevoked,
|
|
74
|
+
};
|
|
75
|
+
const data = await this.management.request(AppCodeAdmissionsDocument, variables);
|
|
76
|
+
return data.appCodeAdmissions;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Set the app's admission mode. Switching to `ALLOW_LIST` drains unadmitted
|
|
80
|
+
* code at activation while leaving deploy/compile available. Requires
|
|
81
|
+
* `manage_compute`.
|
|
82
|
+
*/
|
|
83
|
+
async setCodeAdmissionMode(appId, mode) {
|
|
84
|
+
const data = await this.management.request(SetAppCodeAdmissionModeDocument, {
|
|
85
|
+
appId,
|
|
86
|
+
mode,
|
|
87
|
+
});
|
|
88
|
+
return data.setAppCodeAdmissionMode;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Admit one code listing, author, or org to the app allow list. Admission
|
|
92
|
+
* controls execution only and never grants source visibility.
|
|
93
|
+
*/
|
|
94
|
+
async admitCode(input) {
|
|
95
|
+
const data = await this.management.request(AdmitAppCodeDocument, { input });
|
|
96
|
+
return data.admitAppCode;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Revoke an active admission. The server audit-logs and replica-syncs the
|
|
100
|
+
* change, then drains affected server modules and blocks client artifacts.
|
|
101
|
+
*/
|
|
102
|
+
async revokeCodeAdmission(appId, admissionId) {
|
|
103
|
+
const data = await this.management.request(RevokeAppCodeAdmissionDocument, { appId, admissionId });
|
|
104
|
+
return data.revokeAppCodeAdmission;
|
|
105
|
+
}
|
|
55
106
|
/**
|
|
56
107
|
* Fetch a single app by its numeric id. Requires authentication (any signed-in
|
|
57
108
|
* user); does **not** enforce org/app permissions, so it can read apps the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLClient } from '../client.js';
|
|
2
|
-
import { type GridUserPermissionsQuery, type NearbyGridPermissionsQuery, type GridPermissionLimitsQuery, type GridGroupGrantsQuery, type CreateGridMutation, type DeleteGridMutation, type GrantGridPermissionsMutation, type RevokeGridPermissionsMutation, type SetGridPermissionLimitsMutation, type AssignGroupToGridMutation, type RevokeGroupFromGridMutation, type NearbyGridPermissionsInput, type CreateGridInput, type DeleteGridInput, type GrantGridPermissionsInput, type RevokeGridPermissionsInput, type SetGridPermissionLimitsInput, type AssignGroupToGridInput, type RevokeGroupFromGridInput } from '../generated/graphql.js';
|
|
2
|
+
import { type GridOwnershipQuery, type AssignGridOwnershipMutation, type TransferGridOwnershipMutation, type GridUserPermissionsQuery, type NearbyGridPermissionsQuery, type GridPermissionLimitsQuery, type GridGroupGrantsQuery, type CreateGridMutation, type DeleteGridMutation, type GrantGridPermissionsMutation, type RevokeGridPermissionsMutation, type SetGridPermissionLimitsMutation, type AssignGroupToGridMutation, type RevokeGroupFromGridMutation, type AssignGridOwnershipInput, type TransferGridOwnershipInput, type NearbyGridPermissionsInput, type CreateGridInput, type DeleteGridInput, type GrantGridPermissionsInput, type RevokeGridPermissionsInput, type SetGridPermissionLimitsInput, type AssignGroupToGridInput, type RevokeGroupFromGridInput } from '../generated/graphql.js';
|
|
3
3
|
/**
|
|
4
4
|
* App grids + grid runtime-permission administration — exposed as
|
|
5
5
|
* `client.gameApps` (and grouped under `client.admin`).
|
|
@@ -15,6 +15,22 @@ import { type GridUserPermissionsQuery, type NearbyGridPermissionsQuery, type Gr
|
|
|
15
15
|
export declare class GameAppsAPI {
|
|
16
16
|
private readonly graphql;
|
|
17
17
|
constructor(graphql: GraphQLClient);
|
|
18
|
+
/**
|
|
19
|
+
* Read the current first-class title record for a grid. Returns `null` when
|
|
20
|
+
* the grid has no current or unexpired owner. Requires authentication.
|
|
21
|
+
*/
|
|
22
|
+
ownership(appId: string, gridId: string): Promise<GridOwnershipQuery['gridOwnership']>;
|
|
23
|
+
/**
|
|
24
|
+
* Assign an unowned grid to one user. This bootstrap path requires
|
|
25
|
+
* `manage_apps` and assigns title only; grant runtime permissions separately.
|
|
26
|
+
*/
|
|
27
|
+
assignOwnership(input: AssignGridOwnershipInput): Promise<AssignGridOwnershipMutation['assignGridOwnership']>;
|
|
28
|
+
/**
|
|
29
|
+
* Transfer title as the current user owner or an app admin. This security-
|
|
30
|
+
* sensitive operation disables player modules, wipes their state, removes
|
|
31
|
+
* the old owner's direct grants, and gives the new owner no implicit grants.
|
|
32
|
+
*/
|
|
33
|
+
transferOwnership(input: TransferGridOwnershipInput): Promise<TransferGridOwnershipMutation['transferGridOwnership']>;
|
|
18
34
|
/**
|
|
19
35
|
* Read a user's effective (materialized) runtime permission keys on a grid.
|
|
20
36
|
*
|
|
@@ -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,
|
|
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,EAeL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,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GACrB,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAK5C;;;;;;OAMG;IACG,gBAAgB,CACpB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,4BAA4B,CAAC,sBAAsB,CAAC,CAAC;IAOhE;;;;;;OAMG;IACG,iBAAiB,CACrB,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,6BAA6B,CAAC,uBAAuB,CAAC,CAAC;IAOlE;;;;;;OAMG;IACG,mBAAmB,CACvB,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,+BAA+B,CAAC,yBAAyB,CAAC,CAAC;IAOtE;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IAO1D;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;CAM/D"}
|
package/dist/domains/gameApps.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridUserPermissionsDocument, NearbyGridPermissionsDocument, GridPermissionLimitsDocument, GridGroupGrantsDocument, CreateGridDocument, DeleteGridDocument, GrantGridPermissionsDocument, RevokeGridPermissionsDocument, SetGridPermissionLimitsDocument, AssignGroupToGridDocument, RevokeGroupFromGridDocument, } from '../generated/graphql.js';
|
|
1
|
+
import { GridOwnershipDocument, AssignGridOwnershipDocument, TransferGridOwnershipDocument, GridUserPermissionsDocument, NearbyGridPermissionsDocument, GridPermissionLimitsDocument, GridGroupGrantsDocument, CreateGridDocument, DeleteGridDocument, GrantGridPermissionsDocument, RevokeGridPermissionsDocument, SetGridPermissionLimitsDocument, AssignGroupToGridDocument, RevokeGroupFromGridDocument, } from '../generated/graphql.js';
|
|
2
2
|
/**
|
|
3
3
|
* App grids + grid runtime-permission administration — exposed as
|
|
4
4
|
* `client.gameApps` (and grouped under `client.admin`).
|
|
@@ -15,6 +15,34 @@ export class GameAppsAPI {
|
|
|
15
15
|
constructor(graphql) {
|
|
16
16
|
this.graphql = graphql;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Read the current first-class title record for a grid. Returns `null` when
|
|
20
|
+
* the grid has no current or unexpired owner. Requires authentication.
|
|
21
|
+
*/
|
|
22
|
+
async ownership(appId, gridId) {
|
|
23
|
+
const data = await this.graphql.request(GridOwnershipDocument, {
|
|
24
|
+
appId,
|
|
25
|
+
gridId,
|
|
26
|
+
});
|
|
27
|
+
return data.gridOwnership;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Assign an unowned grid to one user. This bootstrap path requires
|
|
31
|
+
* `manage_apps` and assigns title only; grant runtime permissions separately.
|
|
32
|
+
*/
|
|
33
|
+
async assignOwnership(input) {
|
|
34
|
+
const data = await this.graphql.request(AssignGridOwnershipDocument, { input });
|
|
35
|
+
return data.assignGridOwnership;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Transfer title as the current user owner or an app admin. This security-
|
|
39
|
+
* sensitive operation disables player modules, wipes their state, removes
|
|
40
|
+
* the old owner's direct grants, and gives the new owner no implicit grants.
|
|
41
|
+
*/
|
|
42
|
+
async transferOwnership(input) {
|
|
43
|
+
const data = await this.graphql.request(TransferGridOwnershipDocument, { input });
|
|
44
|
+
return data.transferGridOwnership;
|
|
45
|
+
}
|
|
18
46
|
/**
|
|
19
47
|
* Read a user's effective (materialized) runtime permission keys on a grid.
|
|
20
48
|
*
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { GraphQLClient } from '../client.js';
|
|
2
|
+
import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAccountSessionMutationVariables, type MarketplaceCreateOrgAccountSessionMutation, type MarketplaceCreateOrgAccountSessionMutationVariables, type MarketplaceRenewAcquisitionMutationVariables, type MarketplaceTopUpAcquisitionMutationVariables, type MarketplaceRefundAcquisitionMutationVariables, type MarketplaceGridListingsQueryVariables, type MarketplacePurchaseGridMutationVariables, type MarketplaceSetListingPricingMutationVariables, type MarketplaceSetOrgShareMutationVariables, type MarketplaceBeginSellerOnboardingMutationVariables, type MarketplaceBeginOrgSellerOnboardingMutationVariables, type MarketplaceRequestPayoutMutationVariables, type MarketplaceSpendPayoutToWalletMutationVariables, type MarketplaceCommerceRiskQueueQueryVariables, type MarketplaceDecideRiskFlagMutationVariables, type MarketplaceCreateGridListingMutationVariables, type MarketplaceGridListingsQuery, type MarketplacePurchaseGridMutation, type MarketplaceBeginSellerOnboardingMutation, type MarketplaceBeginOrgSellerOnboardingMutation, type MarketplaceMySellerBalanceQuery, type MarketplaceCommerceRiskQueueQuery, type MarketplaceCreateGridListingMutation, type MarketplaceListingsQuery, type MarketplaceListingsQueryVariables, type MarketplaceListingVersionsQuery, type MarketplaceListingVersionsQueryVariables, type MarketplaceMyAcquisitionsQuery, type MarketplaceMyAcquisitionsQueryVariables, type MarketplaceMyInstallsQuery, type MarketplaceMyInstallsQueryVariables, type MarketplaceGridClientModsQuery, type MarketplaceGridClientModsQueryVariables, type MarketplaceClientArtifactQuery, type MarketplaceClientArtifactQueryVariables, type MarketplacePublishListingMutation, type MarketplacePublishListingMutationVariables, type MarketplacePublishVersionMutation, type MarketplacePublishVersionMutationVariables, type MarketplaceAcquireMutation, type MarketplaceAcquireMutationVariables, type MarketplaceInstallMutation, type MarketplaceInstallMutationVariables, type MarketplaceUninstallMutationVariables, type MarketplaceConsentGridClientModMutationVariables, type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
|
|
3
|
+
/**
|
|
4
|
+
* The P4a player-code marketplace (free mode) — exposed as
|
|
5
|
+
* `client.marketplace`. Player-facing browse/publish/acquire/install/consent
|
|
6
|
+
* and the D4 grid claim flows route to the Game API; studio moderation
|
|
7
|
+
* (admission queue, catalog administration, ownership transfer, claim-policy
|
|
8
|
+
* config) routes to the Management API.
|
|
9
|
+
*
|
|
10
|
+
* No money moves through any of these calls: every listing is free in P4a,
|
|
11
|
+
* an acquisition is an entitlement write, and the paid modes ship with P4b.
|
|
12
|
+
* Publishing snapshots artifact hashes and the DERIVED capability summary —
|
|
13
|
+
* never source; installs consent to the summary's hash.
|
|
14
|
+
*/
|
|
15
|
+
export declare class MarketplaceAPI {
|
|
16
|
+
private readonly game;
|
|
17
|
+
private readonly management;
|
|
18
|
+
constructor(game: GraphQLClient, management: GraphQLClient);
|
|
19
|
+
/** Browse the app's active listings with admission standing per listing. */
|
|
20
|
+
listings(variables: MarketplaceListingsQueryVariables): Promise<MarketplaceListingsQuery['playerCodeListings']>;
|
|
21
|
+
/** Published versions of one listing (capability summaries + consent hashes). */
|
|
22
|
+
versions(variables: MarketplaceListingVersionsQueryVariables): Promise<MarketplaceListingVersionsQuery['playerCodeListingVersions']>;
|
|
23
|
+
/** The caller's entitlements in this app. */
|
|
24
|
+
myAcquisitions(variables: MarketplaceMyAcquisitionsQueryVariables): Promise<MarketplaceMyAcquisitionsQuery['myPlayerCodeAcquisitions']>;
|
|
25
|
+
/** The caller's active installs in this app. */
|
|
26
|
+
myInstalls(variables: MarketplaceMyInstallsQueryVariables): Promise<MarketplaceMyInstallsQuery['myPlayerCodeInstalls']>;
|
|
27
|
+
/** Create a listing (personal, or org-owned via input.ownerOrgId). */
|
|
28
|
+
publishListing(variables: MarketplacePublishListingMutationVariables): Promise<MarketplacePublishListingMutation['publishPlayerCode']>;
|
|
29
|
+
/** Publish an immutable version from compiled module versions (hashes only). */
|
|
30
|
+
publishVersion(variables: MarketplacePublishVersionMutationVariables): Promise<MarketplacePublishVersionMutation['publishPlayerCodeVersion']>;
|
|
31
|
+
/** Free acquisition (entitlement write; idempotent per listing+caller). */
|
|
32
|
+
acquire(variables: MarketplaceAcquireMutationVariables): Promise<MarketplaceAcquireMutation['acquirePlayerCode']>;
|
|
33
|
+
/**
|
|
34
|
+
* Install an acquisition after consenting to the version's capability
|
|
35
|
+
* hash. Server/bundled listings need an owned target gridId.
|
|
36
|
+
*/
|
|
37
|
+
install(variables: MarketplaceInstallMutationVariables): Promise<MarketplaceInstallMutation['installPlayerCode']>;
|
|
38
|
+
/** Remove instances/attachments/fetch rights; the acquisition is retained. */
|
|
39
|
+
uninstall(variables: MarketplaceUninstallMutationVariables): Promise<boolean>;
|
|
40
|
+
/** Client mods attached to a grid, with the caller's consent state. */
|
|
41
|
+
gridClientMods(variables: MarketplaceGridClientModsQueryVariables): Promise<MarketplaceGridClientModsQuery['gridClientMods']>;
|
|
42
|
+
/** Consent to one attachment's exact capability hash (per player). */
|
|
43
|
+
consentGridClientMod(variables: MarketplaceConsentGridClientModMutationVariables): Promise<boolean>;
|
|
44
|
+
/** Fetch an acquired/attached listing's client artifact (base64 + metadata). */
|
|
45
|
+
clientArtifact(variables: MarketplaceClientArtifactQueryVariables): Promise<MarketplaceClientArtifactQuery['playerCodeClientArtifact']>;
|
|
46
|
+
/**
|
|
47
|
+
* Fetch and decode a client artifact into broker inputs (bytes, content
|
|
48
|
+
* hash, per-dispatch fuel budget) — the marketplace twin of
|
|
49
|
+
* `playerCompute.artifactBytes` for acquired and grid-attached mods.
|
|
50
|
+
*/
|
|
51
|
+
clientArtifactBytes(variables: MarketplaceClientArtifactQueryVariables): Promise<{
|
|
52
|
+
bytes: ArrayBuffer;
|
|
53
|
+
artifactHash: string;
|
|
54
|
+
fuelPerDispatch: bigint;
|
|
55
|
+
contractJson: string | null;
|
|
56
|
+
versionId: string;
|
|
57
|
+
}>;
|
|
58
|
+
/** The app's claim policy (self_claim / approval / invite / marketplace_only). */
|
|
59
|
+
gridClaimPolicy(variables: MarketplaceGridClaimPolicyQueryVariables): Promise<MarketplaceGridClaimPolicyQuery['gridClaimPolicy']>;
|
|
60
|
+
/** Pending claim requests (approvers see the app queue; players their own). */
|
|
61
|
+
gridClaimRequests(variables: MarketplaceGridClaimRequestsQueryVariables): Promise<MarketplaceGridClaimRequestsQuery['gridClaimRequests']>;
|
|
62
|
+
/** Claim grid ownership under the app policy (server-authorized, D4). */
|
|
63
|
+
claimGridOwnership(variables: MarketplaceClaimGridOwnershipMutationVariables): Promise<MarketplaceClaimGridOwnershipMutation['claimGridOwnership']>;
|
|
64
|
+
/** Approve or deny a pending claim request (approvers/staff). */
|
|
65
|
+
decideGridClaim(variables: MarketplaceDecideGridClaimMutationVariables): Promise<MarketplaceDecideGridClaimMutation['decideGridClaim']>;
|
|
66
|
+
/** Issue a standing claim invite (approvers/staff; INVITE mode). */
|
|
67
|
+
issueGridClaimInvite(variables: MarketplaceIssueGridClaimInviteMutationVariables): Promise<boolean>;
|
|
68
|
+
/** The admission queue: listings joined with allow-list standing. */
|
|
69
|
+
admissionQueue(variables: MarketplaceAdmissionQueueQueryVariables): Promise<MarketplaceAdmissionQueueQuery['appCodeAdmissionQueue']>;
|
|
70
|
+
/** Studio catalog administration view (includes delisted/killed on request). */
|
|
71
|
+
appListings(variables: MarketplaceAppListingsQueryVariables): Promise<MarketplaceAppListingsQuery['appPlayerCodeListings']>;
|
|
72
|
+
/** All acquisitions in the app (studio audit view). */
|
|
73
|
+
appAcquisitions(variables: MarketplaceAppAcquisitionsQueryVariables): Promise<MarketplaceAppAcquisitionsQuery['appPlayerCodeAcquisitions']>;
|
|
74
|
+
/** Audited personal<->org listing transfer (DN-9). */
|
|
75
|
+
transferListing(variables: MarketplaceTransferListingMutationVariables): Promise<MarketplaceTransferListingMutation['transferPlayerCodeListing']>;
|
|
76
|
+
/**
|
|
77
|
+
* Catalog status: DELISTED/ACTIVE are owner actions; KILLED is the studio
|
|
78
|
+
* catalog kill — pair with playerCompute.setSwitch({scope:'listing'}) to
|
|
79
|
+
* also disable running installs fleet-wide.
|
|
80
|
+
*/
|
|
81
|
+
setListingStatus(variables: MarketplaceSetListingStatusMutationVariables): Promise<MarketplaceSetListingStatusMutation['setPlayerCodeListingStatus']>;
|
|
82
|
+
/** Configure the app's D4 grid claim policy (manage_apps). */
|
|
83
|
+
setGridClaimPolicy(variables: MarketplaceSetGridClaimPolicyMutationVariables): Promise<MarketplaceSetGridClaimPolicyMutation['setAppGridClaimPolicy']>;
|
|
84
|
+
/** Renew a RENT / extend a TIME_LIMITED acquisition (a wallet charge). */
|
|
85
|
+
renewAcquisition(variables: MarketplaceRenewAcquisitionMutationVariables): Promise<{
|
|
86
|
+
__typename?: "PlayerCodeAcquisition";
|
|
87
|
+
acquisitionId: string;
|
|
88
|
+
listingId: string;
|
|
89
|
+
appId: string;
|
|
90
|
+
mode: import("../generated/graphql.js").PlayerCodeAcquisitionMode;
|
|
91
|
+
status: string;
|
|
92
|
+
expiresAt: string | null;
|
|
93
|
+
unitBudget: string | null;
|
|
94
|
+
unitsConsumed: string;
|
|
95
|
+
acquiredAt: string;
|
|
96
|
+
}>;
|
|
97
|
+
/** Top up a COST_LIMITED acquisition's unit budget (a wallet charge). */
|
|
98
|
+
topUpAcquisition(variables: MarketplaceTopUpAcquisitionMutationVariables): Promise<{
|
|
99
|
+
__typename?: "PlayerCodeAcquisition";
|
|
100
|
+
acquisitionId: string;
|
|
101
|
+
listingId: string;
|
|
102
|
+
appId: string;
|
|
103
|
+
mode: import("../generated/graphql.js").PlayerCodeAcquisitionMode;
|
|
104
|
+
status: string;
|
|
105
|
+
expiresAt: string | null;
|
|
106
|
+
unitBudget: string | null;
|
|
107
|
+
unitsConsumed: string;
|
|
108
|
+
acquiredAt: string;
|
|
109
|
+
}>;
|
|
110
|
+
/** Refund a paid acquisition (within window, before meaningful use). Returns cents. */
|
|
111
|
+
refundAcquisition(variables: MarketplaceRefundAcquisitionMutationVariables): Promise<number>;
|
|
112
|
+
/** Browse the app's grid listings. */
|
|
113
|
+
gridListings(variables: MarketplaceGridListingsQueryVariables): Promise<MarketplaceGridListingsQuery['gridListings']>;
|
|
114
|
+
/** Buy a grid listing (wallet debit + atomic ownership; refund on failure). */
|
|
115
|
+
purchaseGrid(variables: MarketplacePurchaseGridMutationVariables): Promise<MarketplacePurchaseGridMutation['purchaseGrid']>;
|
|
116
|
+
/** Author-only: set a listing's acquisition mode + price. */
|
|
117
|
+
setListingPricing(variables: MarketplaceSetListingPricingMutationVariables): Promise<boolean>;
|
|
118
|
+
/** Set the app's marketplace org revenue share (bps; manage_billing). */
|
|
119
|
+
setOrgShare(variables: MarketplaceSetOrgShareMutationVariables): Promise<number>;
|
|
120
|
+
/**
|
|
121
|
+
* Account Session for the EMBEDDED Connect components: initialize
|
|
122
|
+
* Connect.js with the returned publishableKey + clientSecret and mount
|
|
123
|
+
* account-onboarding / payouts / balances INSIDE your UI (no Stripe-hosted
|
|
124
|
+
* redirect). Client secrets are short-lived — pass this method as the
|
|
125
|
+
* fetchClientSecret callback so Connect.js refreshes automatically.
|
|
126
|
+
*/
|
|
127
|
+
createAccountSession(variables: MarketplaceCreateAccountSessionMutationVariables): Promise<MarketplaceCreateAccountSessionMutation['createSellerAccountSession']>;
|
|
128
|
+
/** Embedded-components Account Session for an ORG payout account (manage_billing). */
|
|
129
|
+
createOrgAccountSession(variables: MarketplaceCreateOrgAccountSessionMutationVariables): Promise<MarketplaceCreateOrgAccountSessionMutation['createOrgSellerAccountSession']>;
|
|
130
|
+
/** Begin Stripe Connect Express onboarding for the calling player-seller. */
|
|
131
|
+
beginSellerOnboarding(variables: MarketplaceBeginSellerOnboardingMutationVariables): Promise<MarketplaceBeginSellerOnboardingMutation['beginSellerOnboarding']>;
|
|
132
|
+
/** Begin onboarding for an org payout account (manage_billing in the org). */
|
|
133
|
+
beginOrgSellerOnboarding(variables: MarketplaceBeginOrgSellerOnboardingMutationVariables): Promise<MarketplaceBeginOrgSellerOnboardingMutation['beginOrgSellerOnboarding']>;
|
|
134
|
+
/** The calling player's seller payout balance. */
|
|
135
|
+
mySellerBalance(): Promise<MarketplaceMySellerBalanceQuery['mySellerPayoutBalance']>;
|
|
136
|
+
/** Pay out the calling player's payable balance to their Connect account. */
|
|
137
|
+
requestPayout(variables?: MarketplaceRequestPayoutMutationVariables): Promise<number>;
|
|
138
|
+
/** Earn-to-mod: convert payable balance into the player wallet. Returns cents. */
|
|
139
|
+
spendPayoutToWallet(variables: MarketplaceSpendPayoutToWalletMutationVariables): Promise<number>;
|
|
140
|
+
/** The app's open T11 commerce risk queue (manage_compute). */
|
|
141
|
+
commerceRiskQueue(variables: MarketplaceCommerceRiskQueueQueryVariables): Promise<MarketplaceCommerceRiskQueueQuery['commerceRiskQueue']>;
|
|
142
|
+
/** Release or confirm a T11 risk flag (manage_compute). */
|
|
143
|
+
decideRiskFlag(variables: MarketplaceDecideRiskFlagMutationVariables): Promise<boolean>;
|
|
144
|
+
/** Studio: create a grid listing (blueprint or concrete; manage_apps). */
|
|
145
|
+
createGridListing(variables: MarketplaceCreateGridListingMutationVariables): Promise<MarketplaceCreateGridListingMutation['createGridListing']>;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=marketplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/domains/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAmCL,KAAK,uCAAuC,EAC5C,KAAK,gDAAgD,EACrD,KAAK,0CAA0C,EAC/C,KAAK,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