@crowdedkingdoms/crowdyjs 13.9.0 → 14.1.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/MIGRATION.md +44 -0
- package/README.md +68 -33
- package/dist/binary-relay.d.ts +1 -1
- package/dist/binary-relay.js +1 -1
- package/dist/client.d.ts +27 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +61 -2
- package/dist/crowdy-client.d.ts +29 -34
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +67 -40
- package/dist/datacenter-redirect.d.ts +49 -0
- package/dist/datacenter-redirect.d.ts.map +1 -0
- package/dist/datacenter-redirect.js +62 -0
- package/dist/domains/appAccess.d.ts +3 -3
- package/dist/domains/appAccess.d.ts.map +1 -1
- package/dist/domains/appAccess.js +16 -16
- package/dist/domains/apps.d.ts +4 -8
- package/dist/domains/apps.d.ts.map +1 -1
- package/dist/domains/apps.js +19 -23
- package/dist/domains/auth.d.ts +1 -1
- package/dist/domains/billing.d.ts +3 -3
- package/dist/domains/billing.d.ts.map +1 -1
- package/dist/domains/billing.js +9 -9
- package/dist/domains/controlPlane.d.ts +2 -2
- package/dist/domains/controlPlane.d.ts.map +1 -1
- package/dist/domains/controlPlane.js +4 -4
- package/dist/domains/discovery.d.ts +50 -0
- package/dist/domains/discovery.d.ts.map +1 -0
- package/dist/domains/discovery.js +35 -0
- package/dist/domains/marketplace.d.ts +4 -5
- package/dist/domains/marketplace.d.ts.map +1 -1
- package/dist/domains/marketplace.js +25 -26
- package/dist/domains/organizations.d.ts +3 -3
- package/dist/domains/organizations.d.ts.map +1 -1
- package/dist/domains/organizations.js +22 -22
- package/dist/domains/payments.d.ts +3 -3
- package/dist/domains/payments.d.ts.map +1 -1
- package/dist/domains/payments.js +11 -11
- package/dist/domains/platform.d.ts +5 -6
- package/dist/domains/platform.d.ts.map +1 -1
- package/dist/domains/platform.js +6 -7
- package/dist/domains/portal.d.ts +19 -2
- package/dist/domains/portal.d.ts.map +1 -1
- package/dist/domains/portal.js +12 -12
- package/dist/domains/quotas.d.ts +3 -3
- package/dist/domains/quotas.d.ts.map +1 -1
- package/dist/domains/quotas.js +8 -8
- package/dist/domains/serverStatus.d.ts +1 -2
- package/dist/domains/serverStatus.d.ts.map +1 -1
- package/dist/domains/serverStatus.js +1 -2
- package/dist/domains/sharedEnvironment.d.ts +3 -3
- package/dist/domains/sharedEnvironment.d.ts.map +1 -1
- package/dist/domains/sharedEnvironment.js +15 -15
- package/dist/domains/udp.d.ts +1 -1
- package/dist/domains/udp.js +1 -1
- package/dist/domains/usage.d.ts +2 -2
- package/dist/domains/usage.d.ts.map +1 -1
- package/dist/domains/usage.js +5 -5
- package/dist/domains/users.d.ts +1 -1
- package/dist/domains/users.js +1 -1
- package/dist/errors.d.ts +56 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +64 -0
- package/dist/generated/graphql.d.ts +65 -16
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +1 -0
- package/dist/index.d.ts +13 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -17
- package/dist/kit/decks.d.ts +1 -1
- package/dist/kit/npcs.d.ts +2 -2
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/kit/worldsim.d.ts +1 -1
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +83 -0
- package/dist/rediscover.d.ts +7 -3
- package/dist/rediscover.d.ts.map +1 -1
- package/dist/rediscover.js +7 -3
- package/dist/session.d.ts +21 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +23 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { type WalletBalanceQuery, type WalletTransactionsQuery, type WalletTrans
|
|
|
4
4
|
* Org wallet + per-app budgets — exposed as `client.billing` (and grouped under
|
|
5
5
|
* `client.admin`).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* Part of the management surface. Reads require the `view_billing` org/app
|
|
8
8
|
* permission; {@link setAppBudget} requires `manage_billing`. Monetary values
|
|
9
9
|
* are minor currency units (`*Cents`) and serialized as `BigInt` decimal
|
|
10
10
|
* strings.
|
|
@@ -13,8 +13,8 @@ import { type WalletBalanceQuery, type WalletTransactionsQuery, type WalletTrans
|
|
|
13
13
|
* per the permission notes above.
|
|
14
14
|
*/
|
|
15
15
|
export declare class BillingAPI {
|
|
16
|
-
private readonly
|
|
17
|
-
constructor(
|
|
16
|
+
private readonly api;
|
|
17
|
+
constructor(api: GraphQLClient);
|
|
18
18
|
/**
|
|
19
19
|
* Return an organization's wallet balance. Requires the `view_billing` org
|
|
20
20
|
* permission.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/domains/billing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAOL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/domains/billing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAOL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAE/C;;;;;;OAMG;IACG,aAAa,CACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAK/C;;;;;;;OAOG;IACG,kBAAkB,CACtB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAO,GAC7C,OAAO,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;IASzD;;;;;;;OAOG;IACG,SAAS,CACb,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAQvC;;;;;;OAMG;IACG,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAKvE;;;;;;;;;OASG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,MAAM,GACxB,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAShD;;;;;;;;OAQG;IACG,4BAA4B,CAChC,IAAI,EAAE,0CAA0C,GAC/C,OAAO,CACR,iCAAiC,CAAC,8BAA8B,CAAC,CAClE;CAWF"}
|
package/dist/domains/billing.js
CHANGED
|
@@ -3,7 +3,7 @@ import { WalletBalanceDocument, WalletTransactionsDocument, WalletTransactionsCo
|
|
|
3
3
|
* Org wallet + per-app budgets — exposed as `client.billing` (and grouped under
|
|
4
4
|
* `client.admin`).
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Part of the management surface. Reads require the `view_billing` org/app
|
|
7
7
|
* permission; {@link setAppBudget} requires `manage_billing`. Monetary values
|
|
8
8
|
* are minor currency units (`*Cents`) and serialized as `BigInt` decimal
|
|
9
9
|
* strings.
|
|
@@ -12,8 +12,8 @@ import { WalletBalanceDocument, WalletTransactionsDocument, WalletTransactionsCo
|
|
|
12
12
|
* per the permission notes above.
|
|
13
13
|
*/
|
|
14
14
|
export class BillingAPI {
|
|
15
|
-
constructor(
|
|
16
|
-
this.
|
|
15
|
+
constructor(api) {
|
|
16
|
+
this.api = api;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Return an organization's wallet balance. Requires the `view_billing` org
|
|
@@ -23,7 +23,7 @@ export class BillingAPI {
|
|
|
23
23
|
* @returns The wallet balance (cents as a decimal string).
|
|
24
24
|
*/
|
|
25
25
|
async walletBalance(orgId) {
|
|
26
|
-
const data = await this.
|
|
26
|
+
const data = await this.api.request(WalletBalanceDocument, { orgId });
|
|
27
27
|
return data.walletBalance;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -35,7 +35,7 @@ export class BillingAPI {
|
|
|
35
35
|
* @returns The wallet transactions.
|
|
36
36
|
*/
|
|
37
37
|
async walletTransactions(orgId, opts = {}) {
|
|
38
|
-
const data = await this.
|
|
38
|
+
const data = await this.api.request(WalletTransactionsDocument, {
|
|
39
39
|
orgId,
|
|
40
40
|
limit: opts.limit,
|
|
41
41
|
offset: opts.offset,
|
|
@@ -51,7 +51,7 @@ export class BillingAPI {
|
|
|
51
51
|
* @returns The app budget, or `null` if unset.
|
|
52
52
|
*/
|
|
53
53
|
async appBudget(orgId, appId) {
|
|
54
|
-
const data = await this.
|
|
54
|
+
const data = await this.api.request(AppBudgetDocument, {
|
|
55
55
|
orgId,
|
|
56
56
|
appId,
|
|
57
57
|
});
|
|
@@ -65,7 +65,7 @@ export class BillingAPI {
|
|
|
65
65
|
* @returns The app budgets.
|
|
66
66
|
*/
|
|
67
67
|
async appBudgets(orgId) {
|
|
68
|
-
const data = await this.
|
|
68
|
+
const data = await this.api.request(AppBudgetsDocument, { orgId });
|
|
69
69
|
return data.appBudgets;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -79,7 +79,7 @@ export class BillingAPI {
|
|
|
79
79
|
* @returns The updated app budget.
|
|
80
80
|
*/
|
|
81
81
|
async setAppBudget(orgId, appId, monthlyLimitCents) {
|
|
82
|
-
const data = await this.
|
|
82
|
+
const data = await this.api.request(SetAppBudgetDocument, {
|
|
83
83
|
orgId,
|
|
84
84
|
appId,
|
|
85
85
|
monthlyLimitCents,
|
|
@@ -96,7 +96,7 @@ export class BillingAPI {
|
|
|
96
96
|
* @returns A wallet-transactions connection.
|
|
97
97
|
*/
|
|
98
98
|
async walletTransactionsConnection(args) {
|
|
99
|
-
const data = await this.
|
|
99
|
+
const data = await this.api.request(WalletTransactionsConnectionDocument, args);
|
|
100
100
|
return data.walletTransactionsConnection;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -14,8 +14,8 @@ import { type CpComputePlatformCeilingsQuery, type CpSetComputePlatformCeilingsM
|
|
|
14
14
|
* when the caller is not an operator.
|
|
15
15
|
*/
|
|
16
16
|
export declare class ControlPlaneAPI {
|
|
17
|
-
private readonly
|
|
18
|
-
constructor(
|
|
17
|
+
private readonly api;
|
|
18
|
+
constructor(api: GraphQLClient);
|
|
19
19
|
/**
|
|
20
20
|
* The platform-wide compute ceilings (max modules, tick rates, fuel,
|
|
21
21
|
* memory, run time, db-op and egress budgets).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controlPlane.d.ts","sourceRoot":"","sources":["../../src/domains/controlPlane.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,iCAAiC,EACvC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"controlPlane.d.ts","sourceRoot":"","sources":["../../src/domains/controlPlane.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,iCAAiC,EACvC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAE/C;;;;;OAKG;IACG,uBAAuB,IAAI,OAAO,CACtC,8BAA8B,CAAC,2BAA2B,CAAC,CAC5D;IAOD;;;;;;;;;OASG;IACG,0BAA0B,CAC9B,KAAK,EAAE,iCAAiC,GACvC,OAAO,CACR,oCAAoC,CAAC,8BAA8B,CAAC,CACrE;CAOF"}
|
|
@@ -13,8 +13,8 @@ import { CpComputePlatformCeilingsDocument, CpSetComputePlatformCeilingsDocument
|
|
|
13
13
|
* when the caller is not an operator.
|
|
14
14
|
*/
|
|
15
15
|
export class ControlPlaneAPI {
|
|
16
|
-
constructor(
|
|
17
|
-
this.
|
|
16
|
+
constructor(api) {
|
|
17
|
+
this.api = api;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* The platform-wide compute ceilings (max modules, tick rates, fuel,
|
|
@@ -23,7 +23,7 @@ export class ControlPlaneAPI {
|
|
|
23
23
|
* @returns The stored ceilings row.
|
|
24
24
|
*/
|
|
25
25
|
async computePlatformCeilings() {
|
|
26
|
-
const data = await this.
|
|
26
|
+
const data = await this.api.request(CpComputePlatformCeilingsDocument);
|
|
27
27
|
return data.cpComputePlatformCeilings;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -37,7 +37,7 @@ export class ControlPlaneAPI {
|
|
|
37
37
|
* @returns The stored ceilings after the patch.
|
|
38
38
|
*/
|
|
39
39
|
async setComputePlatformCeilings(input) {
|
|
40
|
-
const data = await this.
|
|
40
|
+
const data = await this.api.request(CpSetComputePlatformCeilingsDocument, { input });
|
|
41
41
|
return data.cpSetComputePlatformCeilings;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where each app lives — the call a client makes BEFORE it authenticates.
|
|
3
|
+
*
|
|
4
|
+
* WHY IT COMES FIRST. `ck.<tier>.cp.cks-env.com` is a multivalue DNS record over every
|
|
5
|
+
* datacenter's load balancer, so a cold client's first request lands wherever DNS
|
|
6
|
+
* pointed it — and roughly half the time that is not the datacenter hosting the app.
|
|
7
|
+
* Authenticating there writes the session in the wrong place and then mints the app
|
|
8
|
+
* token across a WAN.
|
|
9
|
+
*
|
|
10
|
+
* A client already knows its app id before it has any credential: it is a build-time
|
|
11
|
+
* constant. So it can ask this, move to the returned origin, and log in locally. That is
|
|
12
|
+
* the whole trick, and it is why this query takes no token.
|
|
13
|
+
*
|
|
14
|
+
* PLURAL. A launcher or in-game switcher resolves every game it might offer in one call
|
|
15
|
+
* and caches the answer, so switching games is instant instead of a round trip at click
|
|
16
|
+
* time. Placement changes rarely and only an operator can change it.
|
|
17
|
+
*
|
|
18
|
+
* An app with no placement comes back with null endpoints, which means "stay on the
|
|
19
|
+
* shared origin" — not "this app is broken".
|
|
20
|
+
*/
|
|
21
|
+
import type { GraphQLClient } from '../client.js';
|
|
22
|
+
export interface AppEndpoint {
|
|
23
|
+
/** The app this entry describes (decimal string). */
|
|
24
|
+
appId: string;
|
|
25
|
+
/** Datacenter code, e.g. `or` / `va`. Null when the app has no placement. */
|
|
26
|
+
datacenterCode: string | null;
|
|
27
|
+
/** HTTPS GraphQL origin for the app's own datacenter, or null if unplaced. */
|
|
28
|
+
gameApiUrl: string | null;
|
|
29
|
+
/** The wss:// form of gameApiUrl. */
|
|
30
|
+
gameApiWsUrl: string | null;
|
|
31
|
+
}
|
|
32
|
+
export declare class DiscoveryDomain {
|
|
33
|
+
private readonly gql;
|
|
34
|
+
constructor(gql: GraphQLClient);
|
|
35
|
+
/**
|
|
36
|
+
* Resolve where one or more apps are placed. No authentication required.
|
|
37
|
+
*
|
|
38
|
+
* Call this against the SHARED origin — that is the name every datacenter answers, and
|
|
39
|
+
* the only one a client can rely on before it knows where it belongs.
|
|
40
|
+
*/
|
|
41
|
+
apps(appIds: Array<string | number | bigint>): Promise<AppEndpoint[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve one app, or null if it has no placement.
|
|
44
|
+
*
|
|
45
|
+
* Convenience over {@link apps}; prefer the plural form when you have more than one,
|
|
46
|
+
* because it is one round trip rather than N.
|
|
47
|
+
*/
|
|
48
|
+
app(appId: string | number | bigint): Promise<AppEndpoint | null>;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/domains/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,8EAA8E;IAC9E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qCAAqC;IACrC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAE/C;;;;;OAKG;IACG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAY3E;;;;;OAKG;IACG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAKxE"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AppDiscoveryDocument } from '../generated/graphql.js';
|
|
2
|
+
export class DiscoveryDomain {
|
|
3
|
+
constructor(gql) {
|
|
4
|
+
this.gql = gql;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resolve where one or more apps are placed. No authentication required.
|
|
8
|
+
*
|
|
9
|
+
* Call this against the SHARED origin — that is the name every datacenter answers, and
|
|
10
|
+
* the only one a client can rely on before it knows where it belongs.
|
|
11
|
+
*/
|
|
12
|
+
async apps(appIds) {
|
|
13
|
+
const data = await this.gql.request(AppDiscoveryDocument, {
|
|
14
|
+
appIds: appIds.map((id) => String(id)),
|
|
15
|
+
});
|
|
16
|
+
return data.appDiscovery.map((entry) => ({
|
|
17
|
+
appId: String(entry.appId),
|
|
18
|
+
datacenterCode: entry.datacenterCode ?? null,
|
|
19
|
+
gameApiUrl: entry.gameApiUrl ?? null,
|
|
20
|
+
gameApiWsUrl: entry.gameApiWsUrl ?? null,
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Resolve one app, or null if it has no placement.
|
|
25
|
+
*
|
|
26
|
+
* Convenience over {@link apps}; prefer the plural form when you have more than one,
|
|
27
|
+
* because it is one round trip rather than N.
|
|
28
|
+
*/
|
|
29
|
+
async app(appId) {
|
|
30
|
+
const [entry] = await this.apps([appId]);
|
|
31
|
+
if (!entry || !entry.gameApiUrl)
|
|
32
|
+
return null;
|
|
33
|
+
return entry;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -3,9 +3,9 @@ import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAcc
|
|
|
3
3
|
/**
|
|
4
4
|
* The P4a player-code marketplace (free mode) — exposed as
|
|
5
5
|
* `client.marketplace`. Player-facing browse/publish/acquire/install/consent
|
|
6
|
-
* and the D4 grid claim flows
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* and the D4 grid claim flows, plus studio moderation (admission queue, catalog
|
|
7
|
+
* administration, ownership transfer, claim-policy config). Player and moderation
|
|
8
|
+
* operations differ by the permissions they require, not by endpoint.
|
|
9
9
|
*
|
|
10
10
|
* No money moves through any of these calls: every listing is free in P4a,
|
|
11
11
|
* an acquisition is an entitlement write, and the paid modes ship with P4b.
|
|
@@ -14,8 +14,7 @@ import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAcc
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class MarketplaceAPI {
|
|
16
16
|
private readonly game;
|
|
17
|
-
|
|
18
|
-
constructor(game: GraphQLClient, management: GraphQLClient);
|
|
17
|
+
constructor(game: GraphQLClient);
|
|
19
18
|
/** Browse the app's active listings with admission standing per listing. */
|
|
20
19
|
listings(variables: MarketplaceListingsQueryVariables): Promise<MarketplaceListingsQuery['playerCodeListings']>;
|
|
21
20
|
/** Published versions of one listing (capability summaries + consent hashes). */
|
|
@@ -1 +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,EAsCL,KAAK,uCAAuC,EAC5C,KAAK,gDAAgD,EACrD,KAAK,0CAA0C,EAC/C,KAAK,mDAAmD,EAOxD,KAAK,4CAA4C,EACjD,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,qCAAqC,EAC1C,KAAK,wCAAwC,EAC7C,KAAK,6CAA6C,EAClD,KAAK,uCAAuC,EAC5C,KAAK,iDAAiD,EACtD,KAAK,oDAAoD,EACzD,KAAK,yCAAyC,EAC9C,KAAK,+CAA+C,EACpD,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,KAAK,6CAA6C,EAClD,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,2CAA2C,EAChD,KAAK,+BAA+B,EACpC,KAAK,iCAAiC,EACtC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC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,OAAO,CAAC;IAQnB,0EAA0E;IACpE,iBAAiB,CACrB,SAAS,EAAE,6CAA6C,GACvD,OAAO,CAAC,oCAAoC,CAAC,mBAAmB,CAAC,CAAC;CAOtE"}
|
|
@@ -2,9 +2,9 @@ import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, Market
|
|
|
2
2
|
/**
|
|
3
3
|
* The P4a player-code marketplace (free mode) — exposed as
|
|
4
4
|
* `client.marketplace`. Player-facing browse/publish/acquire/install/consent
|
|
5
|
-
* and the D4 grid claim flows
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* and the D4 grid claim flows, plus studio moderation (admission queue, catalog
|
|
6
|
+
* administration, ownership transfer, claim-policy config). Player and moderation
|
|
7
|
+
* operations differ by the permissions they require, not by endpoint.
|
|
8
8
|
*
|
|
9
9
|
* No money moves through any of these calls: every listing is free in P4a,
|
|
10
10
|
* an acquisition is an entitlement write, and the paid modes ship with P4b.
|
|
@@ -12,11 +12,10 @@ import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, Market
|
|
|
12
12
|
* never source; installs consent to the summary's hash.
|
|
13
13
|
*/
|
|
14
14
|
export class MarketplaceAPI {
|
|
15
|
-
constructor(game
|
|
15
|
+
constructor(game) {
|
|
16
16
|
this.game = game;
|
|
17
|
-
this.management = management;
|
|
18
17
|
}
|
|
19
|
-
// -- Store
|
|
18
|
+
// -- Store ---------------------------------------------------------
|
|
20
19
|
/** Browse the app's active listings with admission standing per listing. */
|
|
21
20
|
async listings(variables) {
|
|
22
21
|
const data = await this.game.request(MarketplaceListingsDocument, variables);
|
|
@@ -152,25 +151,25 @@ export class MarketplaceAPI {
|
|
|
152
151
|
const data = await this.game.request(MarketplaceIssueGridClaimInviteDocument, variables);
|
|
153
152
|
return data.issueGridClaimInvite;
|
|
154
153
|
}
|
|
155
|
-
// -- Studio moderation (
|
|
154
|
+
// -- Studio moderation (requires studio permissions) -----------------------------
|
|
156
155
|
/** The admission queue: listings joined with allow-list standing. */
|
|
157
156
|
async admissionQueue(variables) {
|
|
158
|
-
const data = await this.
|
|
157
|
+
const data = await this.game.request(MarketplaceAdmissionQueueDocument, variables);
|
|
159
158
|
return data.appCodeAdmissionQueue;
|
|
160
159
|
}
|
|
161
160
|
/** Studio catalog administration view (includes delisted/killed on request). */
|
|
162
161
|
async appListings(variables) {
|
|
163
|
-
const data = await this.
|
|
162
|
+
const data = await this.game.request(MarketplaceAppListingsDocument, variables);
|
|
164
163
|
return data.appPlayerCodeListings;
|
|
165
164
|
}
|
|
166
165
|
/** All acquisitions in the app (studio audit view). */
|
|
167
166
|
async appAcquisitions(variables) {
|
|
168
|
-
const data = await this.
|
|
167
|
+
const data = await this.game.request(MarketplaceAppAcquisitionsDocument, variables);
|
|
169
168
|
return data.appPlayerCodeAcquisitions;
|
|
170
169
|
}
|
|
171
170
|
/** Audited personal<->org listing transfer (DN-9). */
|
|
172
171
|
async transferListing(variables) {
|
|
173
|
-
const data = await this.
|
|
172
|
+
const data = await this.game.request(MarketplaceTransferListingDocument, variables);
|
|
174
173
|
return data.transferPlayerCodeListing;
|
|
175
174
|
}
|
|
176
175
|
/**
|
|
@@ -179,12 +178,12 @@ export class MarketplaceAPI {
|
|
|
179
178
|
* also disable running installs fleet-wide.
|
|
180
179
|
*/
|
|
181
180
|
async setListingStatus(variables) {
|
|
182
|
-
const data = await this.
|
|
181
|
+
const data = await this.game.request(MarketplaceSetListingStatusDocument, variables);
|
|
183
182
|
return data.setPlayerCodeListingStatus;
|
|
184
183
|
}
|
|
185
184
|
/** Configure the app's D4 grid claim policy (manage_apps). */
|
|
186
185
|
async setGridClaimPolicy(variables) {
|
|
187
|
-
const data = await this.
|
|
186
|
+
const data = await this.game.request(MarketplaceSetGridClaimPolicyDocument, variables);
|
|
188
187
|
return data.setAppGridClaimPolicy;
|
|
189
188
|
}
|
|
190
189
|
// -- P4b: paid modes + grid commerce (Game API) --------------------------------
|
|
@@ -213,15 +212,15 @@ export class MarketplaceAPI {
|
|
|
213
212
|
const data = await this.game.request(MarketplacePurchaseGridDocument, variables);
|
|
214
213
|
return data.purchaseGrid;
|
|
215
214
|
}
|
|
216
|
-
// -- P4b: pricing, seller payouts, grid catalog, risk
|
|
215
|
+
// -- P4b: pricing, seller payouts, grid catalog, risk ---------------------------
|
|
217
216
|
/** Author-only: set a listing's acquisition mode + price. */
|
|
218
217
|
async setListingPricing(variables) {
|
|
219
|
-
const data = await this.
|
|
218
|
+
const data = await this.game.request(MarketplaceSetListingPricingDocument, variables);
|
|
220
219
|
return data.setListingPricing;
|
|
221
220
|
}
|
|
222
221
|
/** Set the app's marketplace org revenue share (bps; manage_billing). */
|
|
223
222
|
async setOrgShare(variables) {
|
|
224
|
-
const data = await this.
|
|
223
|
+
const data = await this.game.request(MarketplaceSetOrgShareDocument, variables);
|
|
225
224
|
return data.setAppMarketplaceOrgShare;
|
|
226
225
|
}
|
|
227
226
|
/**
|
|
@@ -232,52 +231,52 @@ export class MarketplaceAPI {
|
|
|
232
231
|
* fetchClientSecret callback so Connect.js refreshes automatically.
|
|
233
232
|
*/
|
|
234
233
|
async createAccountSession(variables) {
|
|
235
|
-
const data = await this.
|
|
234
|
+
const data = await this.game.request(MarketplaceCreateAccountSessionDocument, variables);
|
|
236
235
|
return data.createSellerAccountSession;
|
|
237
236
|
}
|
|
238
237
|
/** Embedded-components Account Session for an ORG payout account (manage_billing). */
|
|
239
238
|
async createOrgAccountSession(variables) {
|
|
240
|
-
const data = await this.
|
|
239
|
+
const data = await this.game.request(MarketplaceCreateOrgAccountSessionDocument, variables);
|
|
241
240
|
return data.createOrgSellerAccountSession;
|
|
242
241
|
}
|
|
243
242
|
/** Begin Stripe Connect Express onboarding for the calling player-seller. */
|
|
244
243
|
async beginSellerOnboarding(variables) {
|
|
245
|
-
const data = await this.
|
|
244
|
+
const data = await this.game.request(MarketplaceBeginSellerOnboardingDocument, variables);
|
|
246
245
|
return data.beginSellerOnboarding;
|
|
247
246
|
}
|
|
248
247
|
/** Begin onboarding for an org payout account (manage_billing in the org). */
|
|
249
248
|
async beginOrgSellerOnboarding(variables) {
|
|
250
|
-
const data = await this.
|
|
249
|
+
const data = await this.game.request(MarketplaceBeginOrgSellerOnboardingDocument, variables);
|
|
251
250
|
return data.beginOrgSellerOnboarding;
|
|
252
251
|
}
|
|
253
252
|
/** The calling player's seller payout balance. */
|
|
254
253
|
async mySellerBalance() {
|
|
255
|
-
const data = await this.
|
|
254
|
+
const data = await this.game.request(MarketplaceMySellerBalanceDocument, {});
|
|
256
255
|
return data.mySellerPayoutBalance;
|
|
257
256
|
}
|
|
258
257
|
/** Pay out the calling player's payable balance to their Connect account. */
|
|
259
258
|
async requestPayout(variables = {}) {
|
|
260
|
-
const data = await this.
|
|
259
|
+
const data = await this.game.request(MarketplaceRequestPayoutDocument, variables);
|
|
261
260
|
return data.requestSellerPayout;
|
|
262
261
|
}
|
|
263
262
|
/** Earn-to-mod: convert payable balance into the player wallet. Returns cents. */
|
|
264
263
|
async spendPayoutToWallet(variables) {
|
|
265
|
-
const data = await this.
|
|
264
|
+
const data = await this.game.request(MarketplaceSpendPayoutToWalletDocument, variables);
|
|
266
265
|
return data.spendPayoutBalanceToWallet;
|
|
267
266
|
}
|
|
268
267
|
/** The app's open T11 commerce risk queue (manage_compute). */
|
|
269
268
|
async commerceRiskQueue(variables) {
|
|
270
|
-
const data = await this.
|
|
269
|
+
const data = await this.game.request(MarketplaceCommerceRiskQueueDocument, variables);
|
|
271
270
|
return data.commerceRiskQueue;
|
|
272
271
|
}
|
|
273
272
|
/** Release or confirm a T11 risk flag (manage_compute). */
|
|
274
273
|
async decideRiskFlag(variables) {
|
|
275
|
-
const data = await this.
|
|
274
|
+
const data = await this.game.request(MarketplaceDecideRiskFlagDocument, variables);
|
|
276
275
|
return data.decideCommerceRiskFlag;
|
|
277
276
|
}
|
|
278
277
|
/** Studio: create a grid listing (blueprint or concrete; manage_apps). */
|
|
279
278
|
async createGridListing(variables) {
|
|
280
|
-
const data = await this.
|
|
279
|
+
const data = await this.game.request(MarketplaceCreateGridListingDocument, variables);
|
|
281
280
|
return data.createGridListing;
|
|
282
281
|
}
|
|
283
282
|
}
|
|
@@ -4,7 +4,7 @@ import { type OrganizationQuery, type OrganizationBySlugQuery, type MyOrganizati
|
|
|
4
4
|
* Organizations, members, roles (RBAC), and org API tokens — exposed as
|
|
5
5
|
* `client.organizations` (and grouped under `client.admin`).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* Part of the management surface. This is the studio-admin surface: an
|
|
8
8
|
* organization owns apps, billing, quotas, and environments, and its RBAC
|
|
9
9
|
* grants (`manage_members`, `manage_tokens`, ...) gate the rest of the admin
|
|
10
10
|
* APIs. Most operations require an authenticated caller who is an active member
|
|
@@ -18,8 +18,8 @@ import { type OrganizationQuery, type OrganizationBySlugQuery, type MyOrganizati
|
|
|
18
18
|
* / `SCOPE_MISSING` when the caller lacks the required org permission.
|
|
19
19
|
*/
|
|
20
20
|
export declare class OrganizationsAPI {
|
|
21
|
-
private readonly
|
|
22
|
-
constructor(
|
|
21
|
+
private readonly api;
|
|
22
|
+
constructor(api: GraphQLClient);
|
|
23
23
|
/**
|
|
24
24
|
* Fetch a single organization by numeric id. Requires authentication.
|
|
25
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/domains/organizations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAoBL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,uBAAu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