@crowdedkingdoms/crowdyjs 17.14.0-dev.1 → 18.0.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/MIGRATION.md +129 -1
  2. package/README.md +97 -164
  3. package/dist/crowdy-client.d.ts +12 -31
  4. package/dist/crowdy-client.d.ts.map +1 -1
  5. package/dist/crowdy-client.js +15 -37
  6. package/dist/crowdy-dsh/bridge.d.ts.map +1 -1
  7. package/dist/crowdy-dsh/bridge.js +3 -6
  8. package/dist/crowdy-studio/controller.d.ts +34 -59
  9. package/dist/crowdy-studio/controller.d.ts.map +1 -1
  10. package/dist/crowdy-studio/controller.js +96 -225
  11. package/dist/crowdy-studio/diagnostics.d.ts +3 -12
  12. package/dist/crowdy-studio/diagnostics.d.ts.map +1 -1
  13. package/dist/crowdy-studio/dom-shell.d.ts +2 -4
  14. package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
  15. package/dist/crowdy-studio/dom-shell.js +16 -49
  16. package/dist/crowdy-studio/embed/hud-layer.d.ts +1 -2
  17. package/dist/crowdy-studio/embed/hud-layer.d.ts.map +1 -1
  18. package/dist/crowdy-studio/embed/panel.d.ts +3 -13
  19. package/dist/crowdy-studio/embed/panel.d.ts.map +1 -1
  20. package/dist/crowdy-studio/embed/panel.js +3 -6
  21. package/dist/crowdy-studio/index.d.ts +1 -3
  22. package/dist/crowdy-studio/index.d.ts.map +1 -1
  23. package/dist/crowdy-studio/index.js +0 -2
  24. package/dist/crowdy-studio/models.d.ts +3 -4
  25. package/dist/crowdy-studio/models.d.ts.map +1 -1
  26. package/dist/crowdy-studio/starter-projects.d.ts +8 -12
  27. package/dist/crowdy-studio/starter-projects.d.ts.map +1 -1
  28. package/dist/crowdy-studio/starter-projects.js +12 -103
  29. package/dist/domains/appAccess.d.ts +14 -1
  30. package/dist/domains/appAccess.d.ts.map +1 -1
  31. package/dist/domains/appAccess.js +37 -1
  32. package/dist/domains/apps.d.ts +1 -10
  33. package/dist/domains/apps.d.ts.map +1 -1
  34. package/dist/domains/apps.js +1 -16
  35. package/dist/domains/host.d.ts +3 -3
  36. package/dist/domains/host.js +3 -3
  37. package/dist/domains/hosting.d.ts +0 -6
  38. package/dist/domains/hosting.d.ts.map +1 -1
  39. package/dist/domains/hosting.js +1 -16
  40. package/dist/domains/marketplace.d.ts +9 -70
  41. package/dist/domains/marketplace.d.ts.map +1 -1
  42. package/dist/domains/marketplace.js +9 -120
  43. package/dist/domains/organizations.d.ts +1 -9
  44. package/dist/domains/organizations.d.ts.map +1 -1
  45. package/dist/domains/organizations.js +1 -15
  46. package/dist/domains/payments.d.ts +5 -48
  47. package/dist/domains/payments.d.ts.map +1 -1
  48. package/dist/domains/payments.js +5 -57
  49. package/dist/domains/playerWallet.d.ts +6 -12
  50. package/dist/domains/playerWallet.d.ts.map +1 -1
  51. package/dist/domains/playerWallet.js +6 -21
  52. package/dist/domains/quotas.d.ts +20 -7
  53. package/dist/domains/quotas.d.ts.map +1 -1
  54. package/dist/domains/quotas.js +15 -6
  55. package/dist/domains/users.d.ts +7 -74
  56. package/dist/domains/users.d.ts.map +1 -1
  57. package/dist/domains/users.js +7 -105
  58. package/dist/errors.d.ts +7 -13
  59. package/dist/errors.d.ts.map +1 -1
  60. package/dist/errors.js +6 -10
  61. package/dist/generated/graphql.d.ts +955 -8272
  62. package/dist/generated/graphql.d.ts.map +1 -1
  63. package/dist/generated/graphql.js +5 -329
  64. package/dist/grid-mods/exec-client-halves.d.ts +19 -3
  65. package/dist/grid-mods/exec-client-halves.d.ts.map +1 -1
  66. package/dist/grid-mods/exec-client-halves.js +17 -2
  67. package/dist/grid-mods/grid-host-calls.d.ts +29 -17
  68. package/dist/grid-mods/grid-host-calls.d.ts.map +1 -1
  69. package/dist/grid-mods/grid-host-calls.js +40 -46
  70. package/dist/grid-mods/mod-runtime.d.ts +18 -11
  71. package/dist/grid-mods/mod-runtime.d.ts.map +1 -1
  72. package/dist/grid-mods/mod-runtime.js +4 -2
  73. package/dist/grid-scope.d.ts +0 -189
  74. package/dist/grid-scope.d.ts.map +1 -1
  75. package/dist/grid-scope.js +0 -70
  76. package/dist/index.d.ts +12 -18
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +10 -16
  79. package/dist/kit/actions.d.ts +5 -9
  80. package/dist/kit/actions.d.ts.map +1 -1
  81. package/dist/kit/actions.js +5 -9
  82. package/dist/kit/index.d.ts +2 -33
  83. package/dist/kit/index.d.ts.map +1 -1
  84. package/dist/kit/index.js +1 -32
  85. package/dist/kit/kit.d.ts +8 -208
  86. package/dist/kit/kit.d.ts.map +1 -1
  87. package/dist/kit/kit.js +5 -163
  88. package/dist/kit/social.d.ts +1 -3
  89. package/dist/kit/social.d.ts.map +1 -1
  90. package/dist/kit/social.js +1 -3
  91. package/dist/kit/wire.d.ts +16 -5
  92. package/dist/kit/wire.d.ts.map +1 -1
  93. package/dist/kit/wire.js +19 -5
  94. package/dist/live-coding/assets/browser-authoring-index.json +1 -1
  95. package/dist/live-coding/assets/manifest.json +1 -1
  96. package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
  97. package/dist/live-coding/browser-authoring-index.generated.js +1496 -4386
  98. package/dist/live-coding/rust-analysis.d.ts.map +1 -1
  99. package/dist/live-coding/rust-analysis.js +30 -34
  100. package/dist/player-runtime/client-host-calls.d.ts +8 -0
  101. package/dist/player-runtime/client-host-calls.d.ts.map +1 -0
  102. package/dist/player-runtime/client-host-calls.js +28 -0
  103. package/dist/player-runtime/glue-runtime.d.ts +24 -20
  104. package/dist/player-runtime/glue-runtime.d.ts.map +1 -1
  105. package/dist/player-runtime/glue-runtime.js +26 -55
  106. package/dist/player-runtime/glue-sab.d.ts +2 -2
  107. package/dist/player-runtime/glue-sab.js +2 -2
  108. package/dist/player-runtime/player-code-broker.d.ts +70 -43
  109. package/dist/player-runtime/player-code-broker.d.ts.map +1 -1
  110. package/dist/player-runtime/player-code-broker.js +159 -64
  111. package/dist/player-runtime/player-glue-worker.d.ts +8 -9
  112. package/dist/player-runtime/player-glue-worker.d.ts.map +1 -1
  113. package/dist/player-runtime/player-glue-worker.js +26 -11
  114. package/dist/stores/inbox.d.ts +1 -1
  115. package/dist/stores/inbox.d.ts.map +1 -1
  116. package/dist/stores/index.d.ts +0 -11
  117. package/dist/stores/index.d.ts.map +1 -1
  118. package/dist/stores/index.js +0 -4
  119. package/dist/stores/session.d.ts +0 -2
  120. package/dist/stores/session.d.ts.map +1 -1
  121. package/package.json +1 -1
  122. package/dist/crowdy-studio/model-lint-log.d.ts +0 -76
  123. package/dist/crowdy-studio/model-lint-log.d.ts.map +0 -1
  124. package/dist/crowdy-studio/model-lint-log.js +0 -93
  125. package/dist/crowdy-studio/model-lint.d.ts +0 -61
  126. package/dist/crowdy-studio/model-lint.d.ts.map +0 -1
  127. package/dist/crowdy-studio/model-lint.js +0 -45
  128. package/dist/domains/compute.d.ts +0 -208
  129. package/dist/domains/compute.d.ts.map +0 -1
  130. package/dist/domains/compute.js +0 -274
  131. package/dist/domains/controlPlane.d.ts +0 -38
  132. package/dist/domains/controlPlane.d.ts.map +0 -1
  133. package/dist/domains/controlPlane.js +0 -43
  134. package/dist/domains/gameModel.d.ts +0 -1174
  135. package/dist/domains/gameModel.d.ts.map +0 -1
  136. package/dist/domains/gameModel.js +0 -1333
  137. package/dist/domains/playerCompute.d.ts +0 -91
  138. package/dist/domains/playerCompute.d.ts.map +0 -1
  139. package/dist/domains/playerCompute.js +0 -136
  140. package/dist/domains/playerModel.d.ts +0 -20
  141. package/dist/domains/playerModel.d.ts.map +0 -1
  142. package/dist/domains/playerModel.js +0 -54
  143. package/dist/kit/abilities.d.ts +0 -66
  144. package/dist/kit/abilities.d.ts.map +0 -1
  145. package/dist/kit/abilities.js +0 -71
  146. package/dist/kit/blueprints/combat.d.ts +0 -81
  147. package/dist/kit/blueprints/combat.d.ts.map +0 -1
  148. package/dist/kit/blueprints/combat.js +0 -357
  149. package/dist/kit/blueprints/core.d.ts +0 -222
  150. package/dist/kit/blueprints/core.d.ts.map +0 -1
  151. package/dist/kit/blueprints/core.js +0 -185
  152. package/dist/kit/blueprints/decks.d.ts +0 -50
  153. package/dist/kit/blueprints/decks.d.ts.map +0 -1
  154. package/dist/kit/blueprints/decks.js +0 -163
  155. package/dist/kit/blueprints/economy.d.ts +0 -88
  156. package/dist/kit/blueprints/economy.d.ts.map +0 -1
  157. package/dist/kit/blueprints/economy.js +0 -533
  158. package/dist/kit/blueprints/guild.d.ts +0 -51
  159. package/dist/kit/blueprints/guild.d.ts.map +0 -1
  160. package/dist/kit/blueprints/guild.js +0 -50
  161. package/dist/kit/blueprints/index.d.ts +0 -23
  162. package/dist/kit/blueprints/index.d.ts.map +0 -1
  163. package/dist/kit/blueprints/index.js +0 -22
  164. package/dist/kit/blueprints/inventory.d.ts +0 -84
  165. package/dist/kit/blueprints/inventory.d.ts.map +0 -1
  166. package/dist/kit/blueprints/inventory.js +0 -257
  167. package/dist/kit/blueprints/leaderboards.d.ts +0 -49
  168. package/dist/kit/blueprints/leaderboards.d.ts.map +0 -1
  169. package/dist/kit/blueprints/leaderboards.js +0 -126
  170. package/dist/kit/blueprints/liveops.d.ts +0 -42
  171. package/dist/kit/blueprints/liveops.d.ts.map +0 -1
  172. package/dist/kit/blueprints/liveops.js +0 -170
  173. package/dist/kit/blueprints/locks.d.ts +0 -82
  174. package/dist/kit/blueprints/locks.d.ts.map +0 -1
  175. package/dist/kit/blueprints/locks.js +0 -155
  176. package/dist/kit/blueprints/loot.d.ts +0 -90
  177. package/dist/kit/blueprints/loot.d.ts.map +0 -1
  178. package/dist/kit/blueprints/loot.js +0 -229
  179. package/dist/kit/blueprints/matches.d.ts +0 -84
  180. package/dist/kit/blueprints/matches.d.ts.map +0 -1
  181. package/dist/kit/blueprints/matches.js +0 -349
  182. package/dist/kit/blueprints/moderation.d.ts +0 -32
  183. package/dist/kit/blueprints/moderation.d.ts.map +0 -1
  184. package/dist/kit/blueprints/moderation.js +0 -140
  185. package/dist/kit/blueprints/npcs.d.ts +0 -78
  186. package/dist/kit/blueprints/npcs.d.ts.map +0 -1
  187. package/dist/kit/blueprints/npcs.js +0 -125
  188. package/dist/kit/blueprints/plots.d.ts +0 -63
  189. package/dist/kit/blueprints/plots.d.ts.map +0 -1
  190. package/dist/kit/blueprints/plots.js +0 -151
  191. package/dist/kit/blueprints/progression.d.ts +0 -68
  192. package/dist/kit/blueprints/progression.d.ts.map +0 -1
  193. package/dist/kit/blueprints/progression.js +0 -324
  194. package/dist/kit/blueprints/quests.d.ts +0 -72
  195. package/dist/kit/blueprints/quests.d.ts.map +0 -1
  196. package/dist/kit/blueprints/quests.js +0 -285
  197. package/dist/kit/blueprints/worldsim.d.ts +0 -91
  198. package/dist/kit/blueprints/worldsim.d.ts.map +0 -1
  199. package/dist/kit/blueprints/worldsim.js +0 -468
  200. package/dist/kit/combat.d.ts +0 -141
  201. package/dist/kit/combat.d.ts.map +0 -1
  202. package/dist/kit/combat.js +0 -196
  203. package/dist/kit/decks.d.ts +0 -157
  204. package/dist/kit/decks.d.ts.map +0 -1
  205. package/dist/kit/decks.js +0 -186
  206. package/dist/kit/director.d.ts +0 -88
  207. package/dist/kit/director.d.ts.map +0 -1
  208. package/dist/kit/director.js +0 -86
  209. package/dist/kit/economy.d.ts +0 -289
  210. package/dist/kit/economy.d.ts.map +0 -1
  211. package/dist/kit/economy.js +0 -427
  212. package/dist/kit/engine.d.ts +0 -48
  213. package/dist/kit/engine.d.ts.map +0 -1
  214. package/dist/kit/engine.js +0 -113
  215. package/dist/kit/features.d.ts +0 -60
  216. package/dist/kit/features.d.ts.map +0 -1
  217. package/dist/kit/features.js +0 -65
  218. package/dist/kit/instances.d.ts +0 -52
  219. package/dist/kit/instances.d.ts.map +0 -1
  220. package/dist/kit/instances.js +0 -60
  221. package/dist/kit/inventory.d.ts +0 -129
  222. package/dist/kit/inventory.d.ts.map +0 -1
  223. package/dist/kit/inventory.js +0 -200
  224. package/dist/kit/leaderboards.d.ts +0 -86
  225. package/dist/kit/leaderboards.d.ts.map +0 -1
  226. package/dist/kit/leaderboards.js +0 -133
  227. package/dist/kit/liveops.d.ts +0 -112
  228. package/dist/kit/liveops.d.ts.map +0 -1
  229. package/dist/kit/liveops.js +0 -183
  230. package/dist/kit/loot.d.ts +0 -128
  231. package/dist/kit/loot.d.ts.map +0 -1
  232. package/dist/kit/loot.js +0 -160
  233. package/dist/kit/matches.d.ts +0 -301
  234. package/dist/kit/matches.d.ts.map +0 -1
  235. package/dist/kit/matches.js +0 -458
  236. package/dist/kit/matchmaking.d.ts +0 -57
  237. package/dist/kit/matchmaking.d.ts.map +0 -1
  238. package/dist/kit/matchmaking.js +0 -59
  239. package/dist/kit/minigames.d.ts +0 -30
  240. package/dist/kit/minigames.d.ts.map +0 -1
  241. package/dist/kit/minigames.js +0 -38
  242. package/dist/kit/mobs.d.ts +0 -90
  243. package/dist/kit/mobs.d.ts.map +0 -1
  244. package/dist/kit/mobs.js +0 -98
  245. package/dist/kit/moderation.d.ts +0 -73
  246. package/dist/kit/moderation.d.ts.map +0 -1
  247. package/dist/kit/moderation.js +0 -103
  248. package/dist/kit/movement.d.ts +0 -78
  249. package/dist/kit/movement.d.ts.map +0 -1
  250. package/dist/kit/movement.js +0 -103
  251. package/dist/kit/notifications.d.ts +0 -45
  252. package/dist/kit/notifications.d.ts.map +0 -1
  253. package/dist/kit/notifications.js +0 -67
  254. package/dist/kit/npcs.d.ts +0 -226
  255. package/dist/kit/npcs.d.ts.map +0 -1
  256. package/dist/kit/npcs.js +0 -141
  257. package/dist/kit/objects.d.ts +0 -116
  258. package/dist/kit/objects.d.ts.map +0 -1
  259. package/dist/kit/objects.js +0 -119
  260. package/dist/kit/pets.d.ts +0 -85
  261. package/dist/kit/pets.d.ts.map +0 -1
  262. package/dist/kit/pets.js +0 -96
  263. package/dist/kit/plots.d.ts +0 -85
  264. package/dist/kit/plots.d.ts.map +0 -1
  265. package/dist/kit/plots.js +0 -113
  266. package/dist/kit/progression.d.ts +0 -181
  267. package/dist/kit/progression.d.ts.map +0 -1
  268. package/dist/kit/progression.js +0 -265
  269. package/dist/kit/quests.d.ts +0 -171
  270. package/dist/kit/quests.d.ts.map +0 -1
  271. package/dist/kit/quests.js +0 -237
  272. package/dist/kit/racing.d.ts +0 -85
  273. package/dist/kit/racing.d.ts.map +0 -1
  274. package/dist/kit/racing.js +0 -99
  275. package/dist/kit/shared.d.ts +0 -73
  276. package/dist/kit/shared.d.ts.map +0 -1
  277. package/dist/kit/shared.js +0 -101
  278. package/dist/kit/telemetry.d.ts +0 -66
  279. package/dist/kit/telemetry.d.ts.map +0 -1
  280. package/dist/kit/telemetry.js +0 -133
  281. package/dist/kit/territory.d.ts +0 -97
  282. package/dist/kit/territory.d.ts.map +0 -1
  283. package/dist/kit/territory.js +0 -114
  284. package/dist/kit/worldsim.d.ts +0 -263
  285. package/dist/kit/worldsim.d.ts.map +0 -1
  286. package/dist/kit/worldsim.js +0 -268
  287. package/dist/stores/model.d.ts +0 -81
  288. package/dist/stores/model.d.ts.map +0 -1
  289. package/dist/stores/model.js +0 -163
@@ -1,18 +1,17 @@
1
- import { MyCheckoutsDocument, MyCheckoutsConnectionDocument, CheckoutsDocument, CheckoutsConnectionDocument, CreateCheckoutDocument, CapturePaypalCheckoutDocument, PaymentEventsDocument, PaymentEventsConnectionDocument, } from '../generated/graphql.js';
1
+ import { MyCheckoutsDocument, MyCheckoutsConnectionDocument, CreateCheckoutDocument, CapturePaypalCheckoutDocument, } from '../generated/graphql.js';
2
2
  /**
3
3
  * Payment checkouts (wallet top-ups, plan purchases) — exposed as
4
4
  * `client.payments` (and grouped under `client.admin`).
5
5
  *
6
- * Part of the management surface. {@link create} and {@link mine} require an
7
- * authenticated caller and act on their own checkouts; {@link all} is
8
- * super-admin only. Amounts are minor currency units (`*Cents`).
6
+ * Part of the management surface. Every method requires an authenticated
7
+ * caller and acts on the caller's own checkouts. Amounts are minor currency
8
+ * units (`*Cents`).
9
9
  *
10
10
  * Note: {@link create} starts a real payment-provider checkout (Stripe /
11
11
  * PayPal). In tests use sandbox provider keys only — never trigger real
12
12
  * charges.
13
13
  *
14
- * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN` per the notes
15
- * above.
14
+ * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` without a session.
16
15
  */
17
16
  export class PaymentsAPI {
18
17
  constructor(api) {
@@ -44,22 +43,6 @@ export class PaymentsAPI {
44
43
  });
45
44
  return data.myCheckouts;
46
45
  }
47
- /**
48
- * List checkouts across all users with an optional filter. **Super-admin
49
- * only.**
50
- *
51
- * @param opts - Optional {@link CheckoutFilterInput} `filter` and `limit` /
52
- * `offset`.
53
- * @returns The matching checkouts.
54
- */
55
- async all(opts = {}) {
56
- const data = await this.api.request(CheckoutsDocument, {
57
- filter: opts.filter,
58
- limit: opts.limit,
59
- offset: opts.offset,
60
- });
61
- return data.checkouts;
62
- }
63
46
  /**
64
47
  * Capture an approved PayPal order, finalizing the checkout it belongs to.
65
48
  * Call this after the buyer approves the PayPal order returned by
@@ -91,39 +74,4 @@ export class PaymentsAPI {
91
74
  const data = await this.api.request(MyCheckoutsConnectionDocument, args);
92
75
  return data.myCheckoutsConnection;
93
76
  }
94
- /**
95
- * Relay-style cursor pagination over all checkouts (with optional filter) —
96
- * the preferred alternative to {@link all}. **Super-admin only.**
97
- *
98
- * @param args - Optional `first`, `after`, and {@link CheckoutFilterInput}.
99
- * @returns A checkouts connection.
100
- */
101
- async allConnection(args = {}) {
102
- const data = await this.api.request(CheckoutsConnectionDocument, args);
103
- return data.checkoutsConnection;
104
- }
105
- /**
106
- * List provider webhook events (offset pagination). **Super-admin only** — an
107
- * audit view of received Stripe/PayPal/SES events.
108
- *
109
- * @param opts - Optional `limit` / `offset`.
110
- * @returns A page of {@link PaymentEventRecord}s.
111
- * @remarks Prefer {@link eventsConnection} (Relay cursor pagination); the
112
- * offset args here are deprecated server-side.
113
- */
114
- async events(opts = {}) {
115
- const data = await this.api.request(PaymentEventsDocument, opts);
116
- return data.paymentEvents;
117
- }
118
- /**
119
- * Relay-style cursor pagination over provider webhook events. **Super-admin
120
- * only.** See https://docs.crowdedkingdoms.com/overview/pagination.
121
- *
122
- * @param args - Optional `first` and `after`.
123
- * @returns A payment-events connection.
124
- */
125
- async eventsConnection(args = {}) {
126
- const data = await this.api.request(PaymentEventsConnectionDocument, args);
127
- return data.paymentEventsConnection;
128
- }
129
77
  }
@@ -1,17 +1,17 @@
1
1
  import type { GraphQLClient } from "../client.js";
2
- import { type BeginPlayerCardSetupMutation, type PlayerWalletBalanceQuery, type PlayerWalletTransactionsQuery, type PlayerWalletTransactionsQueryVariables, type PlayerUsageChargesQuery, type PlayerUsageChargesQueryVariables, type PlayerSpendCapsQuery, type SetPlayerSpendCapMutation, type SetPlayerSpendCapMutationVariables, type PlayerAutoBillingQuery, type SetPlayerAutoBillingMutation, type SetPlayerAutoBillingMutationVariables, type PlayerRuntimeStatesQuery, type PlayerWasmPoliciesQuery, type PlayerWasmPoliciesQueryVariables, type SetPlayerWasmPolicyMutation, type SetPlayerWasmPolicyMutationVariables, type DeletePlayerWasmPolicyMutation, type DeletePlayerWasmPolicyMutationVariables, type PlayerRateMarkupQuery, type PlayerRateMarkupQueryVariables, type SetPlayerRateMarkupMutation, type SetPlayerRateMarkupMutationVariables, type AppPlayerUsageQuery, type AppPlayerUsageQueryVariables, type AppPlayerMarkupAccruedQuery, type AppPlayerMarkupAccruedQueryVariables, type AppPlayerMarkupAccruedMicrousdQuery, type AppPlayerMarkupAccruedMicrousdQueryVariables } from "../generated/graphql.js";
2
+ import { type BeginPlayerCardSetupMutation, type PlayerWalletBalanceQuery, type PlayerWalletTransactionsQuery, type PlayerWalletTransactionsQueryVariables, type PlayerUsageChargesQuery, type PlayerUsageChargesQueryVariables, type PlayerSpendCapsQuery, type SetPlayerSpendCapMutation, type SetPlayerSpendCapMutationVariables, type PlayerAutoBillingQuery, type SetPlayerAutoBillingMutation, type SetPlayerAutoBillingMutationVariables, type PlayerRuntimeStatesQuery, type PlayerRateMarkupQuery, type PlayerRateMarkupQueryVariables, type SetPlayerRateMarkupMutation, type SetPlayerRateMarkupMutationVariables, type AppPlayerUsageQuery, type AppPlayerUsageQueryVariables, type AppPlayerMarkupAccruedQuery, type AppPlayerMarkupAccruedQueryVariables, type AppPlayerMarkupAccruedMicrousdQuery, type AppPlayerMarkupAccruedMicrousdQueryVariables } from "../generated/graphql.js";
3
3
  /**
4
- * The player wallet and player-billing surface (player compute P2, DN-5) —
5
- * exposed as `client.playerWallet` and routed to the Management API.
4
+ * The player wallet and player-billing surface (DN-5) — exposed as
5
+ * `client.playerWallet`. A ck-exec mod's compute is billed here, to its owner.
6
6
  *
7
7
  * Every viewer-scoped call operates on the CALLER's own wallet: balance,
8
8
  * ledger, hourly usage charges (platform vs studio-markup split), self-set
9
9
  * spend caps, auto-recharge config, and per-app gate states. Fund the wallet
10
10
  * via `client.payments.createCheckout` with purpose `PLAYER_WALLET_TOPUP`.
11
11
  *
12
- * The studio-scoped calls (policies, markup, per-player usage, accrued
13
- * markup) require the corresponding org permissions (`manage_compute`,
14
- * `manage_billing`, `view_compute_diagnostics`, `view_billing`).
12
+ * The studio-scoped calls (markup, per-player usage, accrued markup) require
13
+ * the corresponding org permissions (`manage_billing`,
14
+ * `view_compute_diagnostics`, `view_billing`).
15
15
  */
16
16
  export declare class PlayerWalletAPI {
17
17
  private readonly graphql;
@@ -46,12 +46,6 @@ export declare class PlayerWalletAPI {
46
46
  beginCardSetup(): Promise<BeginPlayerCardSetupMutation["beginPlayerCardSetup"]>;
47
47
  /** The caller's per-app gate states (absence means active). */
48
48
  runtimeStates(): Promise<PlayerRuntimeStatesQuery["playerRuntimeStates"]>;
49
- /** Studio: list an app's player policy rows (`view_compute_diagnostics`). */
50
- policies(variables: PlayerWasmPoliciesQueryVariables): Promise<PlayerWasmPoliciesQuery["playerWasmPolicies"]>;
51
- /** Studio: upsert a player policy row (`manage_compute`). */
52
- setPolicy(variables: SetPlayerWasmPolicyMutationVariables): Promise<SetPlayerWasmPolicyMutation["setPlayerWasmPolicy"]>;
53
- /** Studio: delete a player policy row (`manage_compute`). */
54
- deletePolicy(variables: DeletePlayerWasmPolicyMutationVariables): Promise<DeletePlayerWasmPolicyMutation["deletePlayerWasmPolicy"]>;
55
49
  /** Studio: read the app's player rate-card markup in bps (`view_billing`). */
56
50
  rateMarkup(variables: PlayerRateMarkupQueryVariables): Promise<PlayerRateMarkupQuery["playerRateMarkup"]>;
57
51
  /** Studio: set the app's player rate-card markup in bps (`manage_billing`). */
@@ -1 +1 @@
1
- {"version":3,"file":"playerWallet.d.ts","sourceRoot":"","sources":["../../src/domains/playerWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EASL,KAAK,4BAA4B,EAUjC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,sCAAsC,EAC3C,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mCAAmC,EACxC,KAAK,4CAA4C,EAClD,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP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AoC,GAC9C,OAAO,CAAC,2BAA2B,CAAC,wBAAwB,CAAC,CAAC;IAQjE,gFAAgF;IAC1E,wBAAwB,CAC5B,SAAS,EAAE,4CAA4C,GACtD,OAAO,CACR,mCAAmC,CAAC,gCAAgC,CAAC,CACtE;CAOF"}
@@ -1,16 +1,16 @@
1
- import { PlayerWalletBalanceDocument, PlayerWalletTransactionsDocument, PlayerUsageChargesDocument, PlayerSpendCapsDocument, SetPlayerSpendCapDocument, PlayerAutoBillingDocument, SetPlayerAutoBillingDocument, BeginPlayerCardSetupDocument, PlayerRuntimeStatesDocument, PlayerWasmPoliciesDocument, SetPlayerWasmPolicyDocument, DeletePlayerWasmPolicyDocument, PlayerRateMarkupDocument, SetPlayerRateMarkupDocument, AppPlayerUsageDocument, AppPlayerMarkupAccruedDocument, AppPlayerMarkupAccruedMicrousdDocument, } from "../generated/graphql.js";
1
+ import { PlayerWalletBalanceDocument, PlayerWalletTransactionsDocument, PlayerUsageChargesDocument, PlayerSpendCapsDocument, SetPlayerSpendCapDocument, PlayerAutoBillingDocument, SetPlayerAutoBillingDocument, BeginPlayerCardSetupDocument, PlayerRuntimeStatesDocument, PlayerRateMarkupDocument, SetPlayerRateMarkupDocument, AppPlayerUsageDocument, AppPlayerMarkupAccruedDocument, AppPlayerMarkupAccruedMicrousdDocument, } from "../generated/graphql.js";
2
2
  /**
3
- * The player wallet and player-billing surface (player compute P2, DN-5) —
4
- * exposed as `client.playerWallet` and routed to the Management API.
3
+ * The player wallet and player-billing surface (DN-5) — exposed as
4
+ * `client.playerWallet`. A ck-exec mod's compute is billed here, to its owner.
5
5
  *
6
6
  * Every viewer-scoped call operates on the CALLER's own wallet: balance,
7
7
  * ledger, hourly usage charges (platform vs studio-markup split), self-set
8
8
  * spend caps, auto-recharge config, and per-app gate states. Fund the wallet
9
9
  * via `client.payments.createCheckout` with purpose `PLAYER_WALLET_TOPUP`.
10
10
  *
11
- * The studio-scoped calls (policies, markup, per-player usage, accrued
12
- * markup) require the corresponding org permissions (`manage_compute`,
13
- * `manage_billing`, `view_compute_diagnostics`, `view_billing`).
11
+ * The studio-scoped calls (markup, per-player usage, accrued markup) require
12
+ * the corresponding org permissions (`manage_billing`,
13
+ * `view_compute_diagnostics`, `view_billing`).
14
14
  */
15
15
  export class PlayerWalletAPI {
16
16
  constructor(graphql) {
@@ -73,21 +73,6 @@ export class PlayerWalletAPI {
73
73
  const data = await this.graphql.request(PlayerRuntimeStatesDocument, {});
74
74
  return data.playerRuntimeStates;
75
75
  }
76
- /** Studio: list an app's player policy rows (`view_compute_diagnostics`). */
77
- async policies(variables) {
78
- const data = await this.graphql.request(PlayerWasmPoliciesDocument, variables);
79
- return data.playerWasmPolicies;
80
- }
81
- /** Studio: upsert a player policy row (`manage_compute`). */
82
- async setPolicy(variables) {
83
- const data = await this.graphql.request(SetPlayerWasmPolicyDocument, variables);
84
- return data.setPlayerWasmPolicy;
85
- }
86
- /** Studio: delete a player policy row (`manage_compute`). */
87
- async deletePolicy(variables) {
88
- const data = await this.graphql.request(DeletePlayerWasmPolicyDocument, variables);
89
- return data.deletePlayerWasmPolicy;
90
- }
91
76
  /** Studio: read the app's player rate-card markup in bps (`view_billing`). */
92
77
  async rateMarkup(variables) {
93
78
  const data = await this.graphql.request(PlayerRateMarkupDocument, variables);
@@ -1,13 +1,23 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
2
  import { type QuotasForOrgQuery, type QuotasForAppQuery, type EffectiveQuotaQuery, type SetQuotaMutation, type DeleteQuotaMutation, type SetQuotaInput } from '../generated/graphql.js';
3
+ /**
4
+ * A quota rule for {@link QuotasAPI.set}: {@link SetQuotaInput} scoped to an app
5
+ * or an organization (`tierId` may narrow either). The SDK does not set
6
+ * platform-global rules.
7
+ */
8
+ export type ScopedSetQuotaInput = SetQuotaInput & ({
9
+ appId: string;
10
+ } | {
11
+ orgId: string;
12
+ });
3
13
  /**
4
14
  * Usage quotas at the org and app scope — exposed as `client.quotas` (and
5
15
  * grouped under `client.admin`).
6
16
  *
7
17
  * Part of the management surface. Reads require the `view_usage` org/app
8
- * permission; {@link set} / {@link remove} require `manage_quotas` (global
9
- * quotas are super-admin only). A quota is keyed by a `metric` string; the
10
- * effective value resolves app → org → platform default.
18
+ * permission; {@link set} / {@link remove} require `manage_quotas` on the
19
+ * rule's org or app. A quota is keyed by a `metric` string; the effective
20
+ * value resolves app → org → platform default.
11
21
  *
12
22
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN` / `SCOPE_MISSING`
13
23
  * per the permission notes above.
@@ -45,14 +55,17 @@ export declare class QuotasAPI {
45
55
  }): Promise<EffectiveQuotaQuery['effectiveQuota']>;
46
56
  /**
47
57
  * Create or update a quota at an org or app scope. Requires `manage_quotas`
48
- * (super-admin for platform-global quotas).
58
+ * on that org or app.
49
59
  *
50
- * @param input - {@link SetQuotaInput}: scope ids, `metric`, and `limitValue`.
60
+ * @param input - {@link ScopedSetQuotaInput}: `appId` or `orgId` (and
61
+ * optionally `tierId`), `metric`, and `limitValue`.
51
62
  * @returns The created/updated quota.
63
+ * @throws {CrowdyError} before any request when the input names neither an
64
+ * app nor an organization.
52
65
  */
53
- set(input: SetQuotaInput): Promise<SetQuotaMutation['setQuota']>;
66
+ set(input: ScopedSetQuotaInput): Promise<SetQuotaMutation['setQuota']>;
54
67
  /**
55
- * Delete a quota by id. Requires `manage_quotas` on the owning scope.
68
+ * Delete a quota by id. Requires `manage_quotas` on the quota's org or app.
56
69
  *
57
70
  * @param quotaId - Numeric quota id.
58
71
  * @returns `true` on success.
@@ -1 +1 @@
1
- {"version":3,"file":"quotas.d.ts","sourceRoot":"","sources":["../../src/domains/quotas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,aAAa,E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,qBAAa,SAAS;IACR,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAE/C;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAKvE;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAKvE;;;;;;;OAOG;IACG,SAAS,CACb,MAAM,EAAE,MAAM,EACd,KAAK,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAC7C,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IASjD;;;;;;;;;OASG;IACG,GAAG,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAU5E;;;;;OAKG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;CAM3E"}
@@ -1,12 +1,13 @@
1
+ import { CrowdyError } from '../errors.js';
1
2
  import { QuotasForOrgDocument, QuotasForAppDocument, EffectiveQuotaDocument, SetQuotaDocument, DeleteQuotaDocument, } from '../generated/graphql.js';
2
3
  /**
3
4
  * Usage quotas at the org and app scope — exposed as `client.quotas` (and
4
5
  * grouped under `client.admin`).
5
6
  *
6
7
  * Part of the management surface. Reads require the `view_usage` org/app
7
- * permission; {@link set} / {@link remove} require `manage_quotas` (global
8
- * quotas are super-admin only). A quota is keyed by a `metric` string; the
9
- * effective value resolves app → org → platform default.
8
+ * permission; {@link set} / {@link remove} require `manage_quotas` on the
9
+ * rule's org or app. A quota is keyed by a `metric` string; the effective
10
+ * value resolves app → org → platform default.
10
11
  *
11
12
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` / `FORBIDDEN` / `SCOPE_MISSING`
12
13
  * per the permission notes above.
@@ -55,17 +56,25 @@ export class QuotasAPI {
55
56
  }
56
57
  /**
57
58
  * Create or update a quota at an org or app scope. Requires `manage_quotas`
58
- * (super-admin for platform-global quotas).
59
+ * on that org or app.
59
60
  *
60
- * @param input - {@link SetQuotaInput}: scope ids, `metric`, and `limitValue`.
61
+ * @param input - {@link ScopedSetQuotaInput}: `appId` or `orgId` (and
62
+ * optionally `tierId`), `metric`, and `limitValue`.
61
63
  * @returns The created/updated quota.
64
+ * @throws {CrowdyError} before any request when the input names neither an
65
+ * app nor an organization.
62
66
  */
63
67
  async set(input) {
68
+ if (!input.appId && !input.orgId) {
69
+ throw new CrowdyError({
70
+ message: 'quotas.set needs an appId or an orgId: the SDK sets app and org quotas only',
71
+ });
72
+ }
64
73
  const data = await this.api.request(SetQuotaDocument, { input });
65
74
  return data.setQuota;
66
75
  }
67
76
  /**
68
- * Delete a quota by id. Requires `manage_quotas` on the owning scope.
77
+ * Delete a quota by id. Requires `manage_quotas` on the quota's org or app.
69
78
  *
70
79
  * @param quotaId - Numeric quota id.
71
80
  * @returns `true` on success.
@@ -1,5 +1,5 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
- import { type MeQuery, type UpdateGamertagInput, type UpdateGamertagMutation, type UserQuery, type UsersPaginatedQuery, type UsersPaginatedQueryVariables, type UsersConnectionQuery, type UsersConnectionQueryVariables, type SetSuperAdminMutation, type SetOperatorMutation, type SetEarlyAccessOverrideMutation, type UpdateUserTypeMutation, type ForceLogoutUserMutation, type UpdateUserStateMutation, type UpdateUserStateInput, type FreePlayWindowQuery } from '../generated/graphql.js';
2
+ import { type MeQuery, type UpdateGamertagInput, type UpdateGamertagMutation, type UserQuery, type UpdateUserStateMutation, type UpdateUserStateInput, type FreePlayWindowQuery } from '../generated/graphql.js';
3
3
  /**
4
4
  * User identity & account management — exposed as `client.users`.
5
5
  *
@@ -8,8 +8,8 @@ import { type MeQuery, type UpdateGamertagInput, type UpdateGamertagMutation, ty
8
8
  * exposes these identity mutations — calling them against a game-api endpoint
9
9
  * throws {@link CrowdyGraphQLError} with `FORBIDDEN`, directing you to the
10
10
  * management API. Only the read/identity surface a game client realistically
11
- * needs lives here; super-admin / operator screens use the management UI
12
- * directly rather than the SDK.
11
+ * needs lives here; platform administration (super-admin and operator fields)
12
+ * is not in the SDK: call the API directly from your own tooling.
13
13
  *
14
14
  * Every method needs a valid session (a bearer token set by
15
15
  * `client.auth.login()` / `register()` or `client.setToken()`); without one the
@@ -62,84 +62,17 @@ export declare class UsersAPI {
62
62
  */
63
63
  freePlayWindow(): Promise<FreePlayWindowQuery['freePlayWindowInfo']>;
64
64
  /**
65
- * Look up any user by id. **Super-admin only** (regular callers can only read
66
- * their own profile via {@link me}).
65
+ * Look up a user by id. Requires a valid session.
67
66
  *
68
67
  * @param id - Numeric user id (`BigInt` as a decimal string).
69
68
  * @returns The {@link User}, or `null` if no such user.
70
69
  */
71
70
  get(id: string): Promise<UserQuery['user']>;
72
71
  /**
73
- * Search/list users with offset pagination. **Super-admin only.**
72
+ * Replace the caller's own top-level state blob (base64; `null` clears it).
73
+ * Only ever writes the caller. Requires a valid session.
74
74
  *
75
- * @param opts - Optional `query` (prefix match over email/gamertag/id) and
76
- * `limit` / `offset`.
77
- * @returns A page of users.
78
- * @remarks Prefer {@link listConnection} (Relay cursor pagination) for large
79
- * result sets; the offset args here are deprecated server-side.
80
- */
81
- paginated(opts?: {
82
- query?: UsersPaginatedQueryVariables['query'];
83
- limit?: UsersPaginatedQueryVariables['limit'];
84
- offset?: UsersPaginatedQueryVariables['offset'];
85
- }): Promise<UsersPaginatedQuery['usersPaginated']>;
86
- /**
87
- * Relay-style cursor pagination over users — the preferred alternative to
88
- * {@link paginated}. **Super-admin only.** Page with `first` plus the previous
89
- * page's `pageInfo.endCursor` as `after`. See
90
- * https://docs.crowdedkingdoms.com/overview/pagination.
91
- *
92
- * @param args - Optional `first`, `after`, and `query`.
93
- * @returns A {@link UsersConnection}.
94
- */
95
- listConnection(args?: UsersConnectionQueryVariables): Promise<UsersConnectionQuery['usersConnection']>;
96
- /**
97
- * Grant or revoke the platform `is_super_admin` flag on a user. **Super-admin
98
- * only.**
99
- *
100
- * @param userId - Target user id.
101
- * @param value - `true` to grant, `false` to revoke.
102
- * @returns The updated user's `userId` + `isSuperAdmin`.
103
- */
104
- setSuperAdmin(userId: string, value: boolean): Promise<SetSuperAdminMutation['setSuperAdmin']>;
105
- /**
106
- * Grant or revoke the platform `is_operator` flag (control-plane access) on a
107
- * user. **Super-admin only.**
108
- *
109
- * @param userId - Target user id.
110
- * @param value - `true` to grant, `false` to revoke.
111
- * @returns The updated user's `userId` + `isOperator`.
112
- */
113
- setOperator(userId: string, value: boolean): Promise<SetOperatorMutation['setOperator']>;
114
- /**
115
- * Force an early-access override on a user (bypasses the early-access gate).
116
- * **Super-admin only.**
117
- *
118
- * @param userId - Target user id.
119
- * @param value - `true` to grant the override, `false` to clear it.
120
- * @returns The updated user's `userId` + `grantEarlyAccessOverride`.
121
- */
122
- setEarlyAccessOverride(userId: string, value: boolean): Promise<SetEarlyAccessOverrideMutation['setEarlyAccessOverride']>;
123
- /**
124
- * Set a user's `user_type`. **Super-admin only.**
125
- *
126
- * @param userId - Target user id.
127
- * @param value - The new user type string.
128
- * @returns The updated user's `userId` + `userType`.
129
- */
130
- updateType(userId: string, value: string): Promise<UpdateUserTypeMutation['updateUserType']>;
131
- /**
132
- * Revoke all of a user's sessions (force logout everywhere). **Super-admin
133
- * only.**
134
- *
135
- * @param userId - Target user id.
136
- * @returns `true` on success.
137
- */
138
- forceLogout(userId: string): Promise<ForceLogoutUserMutation['forceLogoutUser']>;
139
- /**
140
- * Replace a user's top-level state blob. **Super-admin only.**
141
- *
142
- * @param input - {@link UpdateUserStateInput} (`userId` + base64 `state`).
75
+ * @param input - {@link UpdateUserStateInput}: the base64 `state`.
143
76
  * @returns The updated user's `userId` + `state`.
144
77
  */
145
78
  updateState(input: UpdateUserStateInput): Promise<UpdateUserStateM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B,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa;IAEnD;;;;;;;OAOG;IACG,EAAE,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAKlC;;;;;;;;;;;;;OAaG;IACG,cAAc,CAClB,KAAK,EAAE,mBAAmB,GACzB,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAKpD;;;;;;;;;OASG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAKzC;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;IAK1E;;;;;OAKG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAKjD;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;CAIvD"}
@@ -1,4 +1,4 @@
1
- import { MeDocument, UpdateGamertagDocument, DeleteMyAccountDocument, UserDocument, UsersPaginatedDocument, UsersConnectionDocument, SetSuperAdminDocument, SetOperatorDocument, SetEarlyAccessOverrideDocument, UpdateUserTypeDocument, ForceLogoutUserDocument, UpdateUserStateDocument, FreePlayWindowDocument, } from '../generated/graphql.js';
1
+ import { MeDocument, UpdateGamertagDocument, DeleteMyAccountDocument, UserDocument, UpdateUserStateDocument, FreePlayWindowDocument, } from '../generated/graphql.js';
2
2
  /**
3
3
  * User identity & account management — exposed as `client.users`.
4
4
  *
@@ -7,8 +7,8 @@ import { MeDocument, UpdateGamertagDocument, DeleteMyAccountDocument, UserDocume
7
7
  * exposes these identity mutations — calling them against a game-api endpoint
8
8
  * throws {@link CrowdyGraphQLError} with `FORBIDDEN`, directing you to the
9
9
  * management API. Only the read/identity surface a game client realistically
10
- * needs lives here; super-admin / operator screens use the management UI
11
- * directly rather than the SDK.
10
+ * needs lives here; platform administration (super-admin and operator fields)
11
+ * is not in the SDK: call the API directly from your own tooling.
12
12
  *
13
13
  * Every method needs a valid session (a bearer token set by
14
14
  * `client.auth.login()` / `register()` or `client.setToken()`); without one the
@@ -74,8 +74,7 @@ export class UsersAPI {
74
74
  return data.freePlayWindowInfo;
75
75
  }
76
76
  /**
77
- * Look up any user by id. **Super-admin only** (regular callers can only read
78
- * their own profile via {@link me}).
77
+ * Look up a user by id. Requires a valid session.
79
78
  *
80
79
  * @param id - Numeric user id (`BigInt` as a decimal string).
81
80
  * @returns The {@link User}, or `null` if no such user.
@@ -85,107 +84,10 @@ export class UsersAPI {
85
84
  return data.user;
86
85
  }
87
86
  /**
88
- * Search/list users with offset pagination. **Super-admin only.**
87
+ * Replace the caller's own top-level state blob (base64; `null` clears it).
88
+ * Only ever writes the caller. Requires a valid session.
89
89
  *
90
- * @param opts - Optional `query` (prefix match over email/gamertag/id) and
91
- * `limit` / `offset`.
92
- * @returns A page of users.
93
- * @remarks Prefer {@link listConnection} (Relay cursor pagination) for large
94
- * result sets; the offset args here are deprecated server-side.
95
- */
96
- async paginated(opts = {}) {
97
- const data = await this.graphql.request(UsersPaginatedDocument, opts);
98
- return data.usersPaginated;
99
- }
100
- /**
101
- * Relay-style cursor pagination over users — the preferred alternative to
102
- * {@link paginated}. **Super-admin only.** Page with `first` plus the previous
103
- * page's `pageInfo.endCursor` as `after`. See
104
- * https://docs.crowdedkingdoms.com/overview/pagination.
105
- *
106
- * @param args - Optional `first`, `after`, and `query`.
107
- * @returns A {@link UsersConnection}.
108
- */
109
- async listConnection(args = {}) {
110
- const data = await this.graphql.request(UsersConnectionDocument, args);
111
- return data.usersConnection;
112
- }
113
- /**
114
- * Grant or revoke the platform `is_super_admin` flag on a user. **Super-admin
115
- * only.**
116
- *
117
- * @param userId - Target user id.
118
- * @param value - `true` to grant, `false` to revoke.
119
- * @returns The updated user's `userId` + `isSuperAdmin`.
120
- */
121
- async setSuperAdmin(userId, value) {
122
- const data = await this.graphql.request(SetSuperAdminDocument, {
123
- userId,
124
- value,
125
- });
126
- return data.setSuperAdmin;
127
- }
128
- /**
129
- * Grant or revoke the platform `is_operator` flag (control-plane access) on a
130
- * user. **Super-admin only.**
131
- *
132
- * @param userId - Target user id.
133
- * @param value - `true` to grant, `false` to revoke.
134
- * @returns The updated user's `userId` + `isOperator`.
135
- */
136
- async setOperator(userId, value) {
137
- const data = await this.graphql.request(SetOperatorDocument, {
138
- userId,
139
- value,
140
- });
141
- return data.setOperator;
142
- }
143
- /**
144
- * Force an early-access override on a user (bypasses the early-access gate).
145
- * **Super-admin only.**
146
- *
147
- * @param userId - Target user id.
148
- * @param value - `true` to grant the override, `false` to clear it.
149
- * @returns The updated user's `userId` + `grantEarlyAccessOverride`.
150
- */
151
- async setEarlyAccessOverride(userId, value) {
152
- const data = await this.graphql.request(SetEarlyAccessOverrideDocument, {
153
- userId,
154
- value,
155
- });
156
- return data.setEarlyAccessOverride;
157
- }
158
- /**
159
- * Set a user's `user_type`. **Super-admin only.**
160
- *
161
- * @param userId - Target user id.
162
- * @param value - The new user type string.
163
- * @returns The updated user's `userId` + `userType`.
164
- */
165
- async updateType(userId, value) {
166
- const data = await this.graphql.request(UpdateUserTypeDocument, {
167
- userId,
168
- value,
169
- });
170
- return data.updateUserType;
171
- }
172
- /**
173
- * Revoke all of a user's sessions (force logout everywhere). **Super-admin
174
- * only.**
175
- *
176
- * @param userId - Target user id.
177
- * @returns `true` on success.
178
- */
179
- async forceLogout(userId) {
180
- const data = await this.graphql.request(ForceLogoutUserDocument, {
181
- userId,
182
- });
183
- return data.forceLogoutUser;
184
- }
185
- /**
186
- * Replace a user's top-level state blob. **Super-admin only.**
187
- *
188
- * @param input - {@link UpdateUserStateInput} (`userId` + base64 `state`).
90
+ * @param input - {@link UpdateUserStateInput}: the base64 `state`.
189
91
  * @returns The updated user's `userId` + `state`.
190
92
  */
191
93
  async updateState(input) {
package/dist/errors.d.ts CHANGED
@@ -175,9 +175,7 @@ export type CrowdyFaultBlame = 'PLATFORM' | 'AUTHOR' | 'BUDGET';
175
175
  * reads the full detail in the Crowdy console. Treat it as an open union: the server may
176
176
  * add a code, and a client that switches on it should have a default branch.
177
177
  */
178
- export type CrowdyFaultCode = 'USER_CODE_ERROR' | 'USER_CODE_TOO_SLOW' | 'USER_CODE_LIMIT_EXCEEDED' | 'PLATFORM_BUSY' | 'PLATFORM_ERROR' | 'BUDGET_EXCEEDED' | 'RATE_LIMITED' | 'QUOTA_EXHAUSTED' | 'CIRCUIT_OPEN' | 'TEMPORARILY_DISABLED' | 'INVALID_REQUEST' | 'NOT_ALLOWED' | 'NOT_FOUND' | 'UNAUTHENTICATED' | 'WRONG_DATACENTER' | 'APP_UNAVAILABLE'
179
- /** The tier switched the legacy engine off (compute, player compute, game model); never retryable. */
180
- | 'ENGINE_SWITCHED_OFF' | (string & {});
178
+ export type CrowdyFaultCode = 'USER_CODE_ERROR' | 'USER_CODE_TOO_SLOW' | 'USER_CODE_LIMIT_EXCEEDED' | 'PLATFORM_BUSY' | 'PLATFORM_ERROR' | 'BUDGET_EXCEEDED' | 'RATE_LIMITED' | 'QUOTA_EXHAUSTED' | 'CIRCUIT_OPEN' | 'TEMPORARILY_DISABLED' | 'INVALID_REQUEST' | 'NOT_ALLOWED' | 'NOT_FOUND' | 'UNAUTHENTICATED' | 'WRONG_DATACENTER' | 'APP_UNAVAILABLE' | (string & {});
181
179
  /** What the platform says about a failure, in the only vocabulary a player is shown. */
182
180
  export interface CrowdyPlayerFault {
183
181
  /** A stable, enumerated reason. Branch on this, never on a message. */
@@ -211,7 +209,7 @@ export interface CrowdyPlayerFault {
211
209
  * @example
212
210
  * ```ts
213
211
  * try {
214
- * await client.compute.invoke({ appId, moduleName: 'combat', exportName: 'hit' });
212
+ * await client.graphql.request(SomeDocument, variables);
215
213
  * } catch (err) {
216
214
  * const fault = playerFaultOf(err);
217
215
  * if (!fault) throw err;
@@ -232,13 +230,10 @@ export declare class CrowdyUserCodeFaultError extends CrowdyGraphQLError {
232
230
  /**
233
231
  * Read the platform's attribution from EITHER carrier, so a game branches once.
234
232
  *
235
- * There are two, and the split is the server's rather than a wart of this SDK.
236
- * `computeInvoke` and `playerComputeInvoke` FAIL — they throw, and the fault arrives in
237
- * the GraphQL error's extensions. `gameModelInvoke` RETURNS — a denial or an evaluation
238
- * failure is a gameplay verdict that still carries an event id and any writes that did
239
- * apply, so it comes back as `success: false` with a `fault` field. Forcing either into
240
- * the other's shape would lose something real, so this function accepts both and gives
241
- * you one thing to switch on.
233
+ * There are two. A refused or failed call THROWS, and the fault arrives in the GraphQL
234
+ * error's extensions. A result may instead RETURN one: a verdict that still carries
235
+ * whatever did apply comes back as `success: false` with a `fault` field. This function
236
+ * accepts both and gives you one thing to switch on.
242
237
  *
243
238
  * Returns `null` when there is no fault: a successful result, or an error that is not an
244
239
  * attributed one (a network drop, a timeout, an ordinary validation error elsewhere in
@@ -247,8 +242,7 @@ export declare class CrowdyUserCodeFaultError extends CrowdyGraphQLError {
247
242
  *
248
243
  * @example
249
244
  * ```ts
250
- * const result = await client.gameModel.invoke({ appId, functionName, selfContainerId });
251
- * const fault = playerFaultOf(result);
245
+ * const fault = playerFaultOf(errorOrResult);
252
246
  * if (fault?.retryable) scheduleRetry();
253
247
  * ```
254
248
  */
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,iFAAiF;AACjF,MAAM,WAAW,yBAAyB;IACxC,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,SAAS,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC/B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC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