@crowdedkingdoms/crowdyjs 18.26.0-test.1 → 18.27.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/MIGRATION.md CHANGED
@@ -120,6 +120,26 @@ super-admin's session). There is no SDK replacement.
120
120
  `dev`'s SDL after #417 merged (`npm run schema:sync:paths -- --schema <that schema.gql>`, then
121
121
  `npm run codegen`).
122
122
 
123
+ ## 18.27.0: a new account confirms its email before it plays
124
+
125
+ **What it needs.** Nothing new: the release selects nothing ck-api `v2.64.0` lacks.
126
+ `isEmailConfirmationRequiredError` reads a code that ck-api `v2.65.0` (cks-game-api #648)
127
+ starts to send.
128
+
129
+ **What changes for a game.** A password account made since 2026-11-11 gets no gameplay token
130
+ until it confirms its email address: `portal.mintAppToken`, `portal.createAuthorizationCode`
131
+ and `portal.refresh` answer `EMAIL_CONFIRMATION_REQUIRED`, the player gate's last check.
132
+ Accounts made before then, managed players (an organization's own, and Minecraft sign-ins),
133
+ staff, and dev or test accounts made with a provisioning token are not asked.
134
+
135
+ - A browser game needs no change: Studio's hosted `/authorize` tells the player and resends
136
+ the link.
137
+ - A native client that signs players up with `auth.register` checks
138
+ `isEmailConfirmationRequiredError(err)` at the mint, tells the player to open the emailed link,
139
+ and offers `client.auth.resendConfirmationEmail(email)` (new; it always resolves `true`). Then
140
+ it mints again.
141
+ - `client.auth.confirmEmail(token)` is new too, for a client that serves the link's page itself.
142
+
123
143
  ## 18.26.0: a session released for idleness is final
124
144
 
125
145
  **What it needs.** ck-api `v2.64.0` (cks-game-api #643): `apps.app()` and `apps.update()` select
package/README.md CHANGED
@@ -34,6 +34,7 @@ so it needs that Game API or newer; promote the Game API before the SDK on each
34
34
 
35
35
  | CrowdyJS | Needs the Game API (ck-api) |
36
36
  | --- | --- |
37
+ | 18.27.0 | v2.64.0 or later (`isEmailConfirmationRequiredError` reads a code v2.65.0 sends) |
37
38
  | 18.26.0 | v2.64.0 or later (app reads and `apps.update` select `idleTimeoutSeconds` and `effectiveIdleTimeoutSeconds`) |
38
39
  | 18.25.0 | v2.61.0 or later (app reads and `apps.update` select `hasSafetyModerator`; `platform.territoryPolicies` selects `regionCode`) |
39
40
  | 18.24.0 | v2.60.0 or later (`users.me` selects `ageBracket` and `country`; app reads and `apps.update` select the safety log and age fields; the teen safety calls). `auth.recordPlayerConsents` with both flags and `auth.playerLegalAcceptance()` without an app work against older releases |
@@ -133,6 +134,13 @@ before minting; `client.auth.playerLegalAcceptance({ appId })` says whether that
133
134
  needed. `auth.register` takes the same fields, and a browser page must send them.
134
135
  See [MIGRATION.md](MIGRATION.md#1840-the-terms-and-age-gate).
135
136
 
137
+ **A new password account confirms its email before it plays** (ck-api v2.65.0, 2026-11-11).
138
+ Until the player opens the link `auth.register` emailed, those same three calls answer
139
+ `EMAIL_CONFIRMATION_REQUIRED` (`isEmailConfirmationRequiredError`). Studio's `/authorize`
140
+ handles it on the first row; a native client shows "check your inbox" and offers
141
+ `client.auth.resendConfirmationEmail(email)`. Accounts made before 2026-11-11, managed
142
+ players, staff and dev or test accounts made with a provisioning token are not asked.
143
+
136
144
  **The player gate** (ck-api v2.60.0, the teen safety program) runs at every mint and
137
145
  refresh: a country Crowded Kingdoms does not serve is refused `TERRITORY_NOT_SUPPORTED`
138
146
  (`territoryNotSupportedOf(err)?.country`), an account with no age `AGE_REQUIRED`
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier test` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier dev` writes this file, and
4
4
  * `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
5
5
  * host that declaration does not carry. Regenerate; never hand-edit.
6
6
  *
@@ -10,14 +10,14 @@
10
10
  * than no default at all. Every fallback this SDK ever removed named a host that
11
11
  * was already dead. A generated file plus a gate is what makes this one different.
12
12
  *
13
- * Source: the operator's per-tier public CK API origin declaration, tier 'test'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export declare const CROWDY_DEFAULT_TIER = "test";
16
+ export declare const CROWDY_DEFAULT_TIER = "dev";
17
17
  /** The public CK API origin for that tier. */
18
- export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.test.crowdedkingdoms.com";
18
+ export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.crowdedkingdoms.com";
19
19
  /** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
20
- export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.test.crowdedkingdoms.com";
20
+ export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export declare const CROWDY_DEFAULT_HOST = "ck.test.crowdedkingdoms.com";
22
+ export declare const CROWDY_DEFAULT_HOST = "ck.dev.crowdedkingdoms.com";
23
23
  //# sourceMappingURL=default-origin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAEhF,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,sCAAsC,CAAC;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,gCAAgC,CAAC"}
1
+ {"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier test` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier dev` writes this file, and
4
4
  * `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
5
5
  * host that declaration does not carry. Regenerate; never hand-edit.
6
6
  *
@@ -10,13 +10,13 @@
10
10
  * than no default at all. Every fallback this SDK ever removed named a host that
11
11
  * was already dead. A generated file plus a gate is what makes this one different.
12
12
  *
13
- * Source: the operator's per-tier public CK API origin declaration, tier 'test'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export const CROWDY_DEFAULT_TIER = 'test';
16
+ export const CROWDY_DEFAULT_TIER = 'dev';
17
17
  /** The public CK API origin for that tier. */
18
- export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.test.crowdedkingdoms.com';
18
+ export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.crowdedkingdoms.com';
19
19
  /** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
20
- export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.test.crowdedkingdoms.com';
20
+ export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export const CROWDY_DEFAULT_HOST = 'ck.test.crowdedkingdoms.com';
22
+ export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
@@ -260,6 +260,14 @@ export declare class AuthAPI {
260
260
  * (`ageRequirementNotMetOf`); either way no account is made. Since ck-api v2.61.0
261
261
  * the age refusal names no age, and for 24 hours the same client (address and user
262
262
  * agent) is refused it whatever it sends.
263
+ *
264
+ * **The email (ck-api v2.65.0).** The account starts unconfirmed and is emailed a
265
+ * link. A password account made since 2026-11-11 gets no gameplay token until it
266
+ * confirms: `portal.mintAppToken`, `portal.createAuthorizationCode` and
267
+ * `portal.refresh` answer `EMAIL_CONFIRMATION_REQUIRED`
268
+ * ({@link isEmailConfirmationRequiredError}), and {@link resendConfirmationEmail}
269
+ * sends the link again. Accounts made with a dev or test provisioning token are
270
+ * not asked.
263
271
  */
264
272
  register(input: {
265
273
  email: string;
@@ -393,6 +401,24 @@ export declare class AuthAPI {
393
401
  * signed in should use {@link setInitialPassword} instead and skip the inbox.
394
402
  */
395
403
  requestPasswordReset(email: string): Promise<boolean>;
404
+ /**
405
+ * Confirm the account's email address with the token from the emailed link, which
406
+ * also enables password sign-in. `false` for an invalid or expired token. Public
407
+ * (the token is the authorization), from a first-party origin or a client with no
408
+ * browser origin. The link opens Studio, which calls this itself; a client needs it
409
+ * only if it serves the link's page.
410
+ */
411
+ confirmEmail(token: string): Promise<boolean>;
412
+ /**
413
+ * Email the confirmation link again: the remedy for `EMAIL_CONFIRMATION_REQUIRED`
414
+ * ({@link isEmailConfirmationRequiredError}, ck-api v2.65.0). Public, from a
415
+ * first-party origin or a native client that sends no `Origin`; rate-limited.
416
+ *
417
+ * Always resolves `true`, whether or not the address has an unconfirmed account,
418
+ * so it cannot be used to enumerate users and a `true` is not evidence an email
419
+ * was sent.
420
+ */
421
+ resendConfirmationEmail(email: string): Promise<boolean>;
396
422
  /**
397
423
  * Complete a password reset with the token from the emailed link. Public —
398
424
  * the token is the authorization.
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/domains/auth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC;KACrB,GAAG,OAAO,CAAC,OAAO,CAAC;IAOpB;;;;;;;;;;;;;;;;;;OAkBG;IACG,cAAc,CAAC,KAAK,EAAE;QAC1B,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,OAAO,CAAC;IAKpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAO/D,0EAA0E;IACpE,YAAY,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAK7C,sEAAsE;IAChE,YAAY,CAAC,KAAK,EAAE;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,YAAY,CAAC;IAKzB,2EAA2E;IACrE,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAO1D,mEAAmE;IAC7D,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAMhC,oEAAoE;IAC9D,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;IAK1C,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIpC,+CAA+C;IAC/C,QAAQ,IAAI,MAAM,GAAG,IAAI;CAG1B"}
@@ -163,6 +163,12 @@ const RequestPasswordResetDocument = parse(`mutation RequestPasswordReset($email
163
163
  const ResetPasswordDocument = parse(`mutation ResetPassword($resetPasswordInput: ResetPasswordInput!) { resetPassword(resetPasswordInput: $resetPasswordInput) }`);
164
164
  const ChangePasswordDocument = parse(`mutation ChangePassword($currentPassword: String!, $newPassword: String!) { changePassword(currentPassword: $currentPassword, newPassword: $newPassword) }`);
165
165
  const SetInitialPasswordDocument = parse(`mutation SetInitialPassword($newPassword: String!) { setInitialPassword(newPassword: $newPassword) }`);
166
+ // EMAIL CONFIRMATION. `register` emails a link carrying the token, and the page it
167
+ // opens (Studio's) calls `confirmEmail`. Since ck-api v2.65.0 a password account made
168
+ // from 2026-11-11 confirms before its first gameplay token, so a native client that
169
+ // meets `EMAIL_CONFIRMATION_REQUIRED` offers `resendConfirmationEmail`.
170
+ const ConfirmEmailDocument = parse(`mutation ConfirmEmail($token: String!) { confirmEmail(token: $token) }`);
171
+ const ResendConfirmationEmailDocument = parse(`mutation ResendConfirmationEmail($email: String!) { resendConfirmationEmail(email: $email) }`);
166
172
  const CheckAuthMethodDocument = parse(`query CheckAuthMethod($input: CheckAuthMethodInput!) { checkAuthMethod(input: $input) { hasPassword } }`);
167
173
  const AvailableLoginProvidersDocument = parse(`query AvailableLoginProviders { availableLoginProviders }`);
168
174
  const MyIdentitiesDocument = parse(`query MyIdentities { myIdentities { ${IDENTITY_FIELDS} } }`);
@@ -275,6 +281,14 @@ export class AuthAPI {
275
281
  * (`ageRequirementNotMetOf`); either way no account is made. Since ck-api v2.61.0
276
282
  * the age refusal names no age, and for 24 hours the same client (address and user
277
283
  * agent) is refused it whatever it sends.
284
+ *
285
+ * **The email (ck-api v2.65.0).** The account starts unconfirmed and is emailed a
286
+ * link. A password account made since 2026-11-11 gets no gameplay token until it
287
+ * confirms: `portal.mintAppToken`, `portal.createAuthorizationCode` and
288
+ * `portal.refresh` answer `EMAIL_CONFIRMATION_REQUIRED`
289
+ * ({@link isEmailConfirmationRequiredError}), and {@link resendConfirmationEmail}
290
+ * sends the link again. Accounts made with a dev or test provisioning token are
291
+ * not asked.
278
292
  */
279
293
  async register(input) {
280
294
  const data = await this.graphql.request(RegisterDocument, {
@@ -452,6 +466,32 @@ export class AuthAPI {
452
466
  });
453
467
  return data.requestPasswordReset;
454
468
  }
469
+ /**
470
+ * Confirm the account's email address with the token from the emailed link, which
471
+ * also enables password sign-in. `false` for an invalid or expired token. Public
472
+ * (the token is the authorization), from a first-party origin or a client with no
473
+ * browser origin. The link opens Studio, which calls this itself; a client needs it
474
+ * only if it serves the link's page.
475
+ */
476
+ async confirmEmail(token) {
477
+ const data = await this.graphql.request(ConfirmEmailDocument, { token });
478
+ return data.confirmEmail;
479
+ }
480
+ /**
481
+ * Email the confirmation link again: the remedy for `EMAIL_CONFIRMATION_REQUIRED`
482
+ * ({@link isEmailConfirmationRequiredError}, ck-api v2.65.0). Public, from a
483
+ * first-party origin or a native client that sends no `Origin`; rate-limited.
484
+ *
485
+ * Always resolves `true`, whether or not the address has an unconfirmed account,
486
+ * so it cannot be used to enumerate users and a `true` is not evidence an email
487
+ * was sent.
488
+ */
489
+ async resendConfirmationEmail(email) {
490
+ const data = await this.graphql.request(ResendConfirmationEmailDocument, {
491
+ email,
492
+ });
493
+ return data.resendConfirmationEmail;
494
+ }
455
495
  /**
456
496
  * Complete a password reset with the token from the emailed link. Public —
457
497
  * the token is the authorization.
@@ -254,6 +254,17 @@ export declare function isHostedSignInRequiredError(error: unknown): boolean;
254
254
  * `legalAcceptanceRequiredOf` reads which documents are missing. ck-api v2.35.0.
255
255
  */
256
256
  export declare function isLegalAcceptanceRequiredError(error: unknown): boolean;
257
+ /**
258
+ * `EMAIL_CONFIRMATION_REQUIRED`: a password account made since 2026-11-11 has not
259
+ * confirmed its email address, so no gameplay token is issued
260
+ * ({@link PortalAPI.mintAppToken}, {@link PortalAPI.createAuthorizationCode},
261
+ * {@link PortalAPI.refresh}). Retrying cannot succeed: ask the player to open the
262
+ * emailed link, and offer `auth.resendConfirmationEmail(email)`. A browser game
263
+ * never sees it, because Studio's hosted `/authorize` asks. Older accounts, managed
264
+ * players, staff and dev or test accounts made with a provisioning token are not
265
+ * asked. ck-api v2.65.0.
266
+ */
267
+ export declare function isEmailConfirmationRequiredError(error: unknown): boolean;
257
268
  export declare class PortalAPI {
258
269
  private readonly api;
259
270
  private readonly session;
@@ -291,13 +302,20 @@ export declare class PortalAPI {
291
302
  * then `SAFETY_MODERATOR_REQUIRED` (`safetyModeratorRequiredOf`, ck-api v2.61.0) in
292
303
  * one whose organization has appointed no safety moderator. None of them is fixed
293
304
  * by retrying, and no refusal names an age.
305
+ *
306
+ * Last, since ck-api v2.65.0, `EMAIL_CONFIRMATION_REQUIRED`
307
+ * ({@link isEmailConfirmationRequiredError}) for a password account made since
308
+ * 2026-11-11 that has not confirmed its email: show "check your inbox" and offer
309
+ * `auth.resendConfirmationEmail`.
294
310
  */
295
311
  mintAppToken(appId: string): Promise<AppTokenResponse>;
296
312
  /**
297
313
  * Overworld/identity side: mint a one-time authorization code for a target
298
314
  * app, bound to the destination game's PKCE challenge + redirect URI.
299
315
  * Requires the identity session token. Refused with `LEGAL_ACCEPTANCE_REQUIRED`
300
- * until the player's consents are stored (ck-api v2.35.0).
316
+ * until the player's consents are stored (ck-api v2.35.0), and with the player
317
+ * gate's other refusals, `EMAIL_CONFIRMATION_REQUIRED` among them
318
+ * ({@link mintAppToken}).
301
319
  */
302
320
  createAuthorizationCode(params: {
303
321
  appId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/domains/portal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACpE,qFAAqF;IACrF,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,KAAK,EAAE,MAA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OAAO,CAAC,MAAM,CAAC;IA8BnD;;;;;;OAMG;IACG,oBAAoB,CACxB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAQnC;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAa3D;;;;;;OAMG;IACG,sBAAsB,CAC1B,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GACtD,OAAO,CAAC,MAAM,CAAC;IAoClB;;;;;OAKG;IACG,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAmBvE"}
@@ -145,6 +145,28 @@ export function isLegalAcceptanceRequiredError(error) {
145
145
  // Not the organization's ORG_LEGAL_ACCEPTANCE_REQUIRED: no player clickwrap answers that.
146
146
  return /(^|[^A-Z_])LEGAL_ACCEPTANCE_REQUIRED/.test(typeof e?.message === 'string' ? e.message : '');
147
147
  }
148
+ /**
149
+ * `EMAIL_CONFIRMATION_REQUIRED`: a password account made since 2026-11-11 has not
150
+ * confirmed its email address, so no gameplay token is issued
151
+ * ({@link PortalAPI.mintAppToken}, {@link PortalAPI.createAuthorizationCode},
152
+ * {@link PortalAPI.refresh}). Retrying cannot succeed: ask the player to open the
153
+ * emailed link, and offer `auth.resendConfirmationEmail(email)`. A browser game
154
+ * never sees it, because Studio's hosted `/authorize` asks. Older accounts, managed
155
+ * players, staff and dev or test accounts made with a provisioning token are not
156
+ * asked. ck-api v2.65.0.
157
+ */
158
+ export function isEmailConfirmationRequiredError(error) {
159
+ const e = error;
160
+ const codes = [
161
+ e?.code,
162
+ e?.extensions?.code,
163
+ ...(e?.graphQLErrors ?? []).map((g) => g.extensions?.code),
164
+ ...(e?.graphqlErrors ?? []).map((g) => g.extensions?.code),
165
+ ];
166
+ if (codes.includes('EMAIL_CONFIRMATION_REQUIRED'))
167
+ return true;
168
+ return /EMAIL_CONFIRMATION_REQUIRED/.test(typeof e?.message === 'string' ? e.message : '');
169
+ }
148
170
  export class PortalAPI {
149
171
  constructor(api, session, pkceStore = new BrowserSessionPkceStore(),
150
172
  /**
@@ -180,6 +202,11 @@ export class PortalAPI {
180
202
  * then `SAFETY_MODERATOR_REQUIRED` (`safetyModeratorRequiredOf`, ck-api v2.61.0) in
181
203
  * one whose organization has appointed no safety moderator. None of them is fixed
182
204
  * by retrying, and no refusal names an age.
205
+ *
206
+ * Last, since ck-api v2.65.0, `EMAIL_CONFIRMATION_REQUIRED`
207
+ * ({@link isEmailConfirmationRequiredError}) for a password account made since
208
+ * 2026-11-11 that has not confirmed its email: show "check your inbox" and offer
209
+ * `auth.resendConfirmationEmail`.
183
210
  */
184
211
  async mintAppToken(appId) {
185
212
  const data = await this.api.request(MintAppTokenDocument, {
@@ -191,7 +218,9 @@ export class PortalAPI {
191
218
  * Overworld/identity side: mint a one-time authorization code for a target
192
219
  * app, bound to the destination game's PKCE challenge + redirect URI.
193
220
  * Requires the identity session token. Refused with `LEGAL_ACCEPTANCE_REQUIRED`
194
- * until the player's consents are stored (ck-api v2.35.0).
221
+ * until the player's consents are stored (ck-api v2.35.0), and with the player
222
+ * gate's other refusals, `EMAIL_CONFIRMATION_REQUIRED` among them
223
+ * ({@link mintAppToken}).
195
224
  */
196
225
  async createAuthorizationCode(params) {
197
226
  const data = await this.api.request(CreatePortalAuthorizationCodeDocument, { input: params });
@@ -4963,7 +4963,7 @@ export type Mutation = {
4963
4963
  createOrgToken: OrgTokenWithSecret;
4964
4964
  /** Creates a new organization and makes the authenticated caller its owner (with full permissions). Requires a valid session token. Once developers accept their own documents (developerLegalDocuments not empty), refused with LEGAL_ACCEPTANCE_REQUIRED until recordDeveloperConsents, and to an account under 18 (AGE_REQUIREMENT_NOT_MET) or with no age (AGE_REQUIRED); administering an organization or app asks the same. */
4965
4965
  createOrganization: Organization;
4966
- /** Create a one-time, PKCE-bound portal authorization code (browser handoff). The Overworld identity origin (holding the SESSION token) calls this; redirect the player to the destination game carrying the code, which the game exchanges via exchangePortalCode. Refused like mintAppToken before any code exists: TERRITORY_NOT_SUPPORTED, AGE_REQUIRED, AGE_REQUIREMENT_NOT_MET and LEGAL_ACCEPTANCE_REQUIRED, and for a player under 18 SAFETY_LOG_REQUIRED (the app keeps no safety log) then SAFETY_MODERATOR_REQUIRED (its organization has no safety moderator), with the same neutral messages. Requires a SESSION token. */
4966
+ /** Create a one-time, PKCE-bound portal authorization code (browser handoff). The Overworld identity origin (holding the SESSION token) calls this; redirect the player to the destination game carrying the code, which the game exchanges via exchangePortalCode. Refused like mintAppToken before any code exists: TERRITORY_NOT_SUPPORTED, AGE_REQUIRED, AGE_REQUIREMENT_NOT_MET, LEGAL_ACCEPTANCE_REQUIRED and EMAIL_CONFIRMATION_REQUIRED, and for a player under 18 SAFETY_LOG_REQUIRED (the app keeps no safety log) then SAFETY_MODERATOR_REQUIRED (its organization has no safety moderator), with the same neutral messages. Requires a SESSION token. */
4967
4967
  createPortalAuthorizationCode: PortalAuthorizationCode;
4968
4968
  /** Create a team. Whether the caller may create one is governed by the per-app team policy (app_group_policies: admin | member | anyone). The caller becomes the owner and is granted a system 'leader' role holding every team permission. New teams default to the app's default membership policy unless overridden. */
4969
4969
  createTeam: Group;
@@ -5133,7 +5133,7 @@ export type Mutation = {
5133
5133
  logoutAllDevices: Scalars['Boolean']['output'];
5134
5134
  /** Start a Minecraft sign-in: a one-time server id for the app, good for two minutes. The client mod joins it through Mojang's session service as the account signed in to the game (the request a client makes to join any online-mode server), then calls signInWithMinecraft. Ask for it yourself: never join a server id something else hands you. Open only to Crowded Kingdoms' own apps (FORBIDDEN otherwise; FEATURE_DISABLED on a tier without Minecraft sign-in). Public; rate-limited per address. */
5135
5135
  minecraftChallenge: MinecraftChallenge;
5136
- /** Mint a short-lived, app-scoped gameplay token for the calling user (native/direct path; no browser redirect). Requires an identity SESSION token (app tokens cannot mint). Free/open apps auto-grant access; paid apps require an existing entitlement (else FORBIDDEN). Side effect: may create an app_user_access row on the app's free default tier. */
5136
+ /** Mint a short-lived, app-scoped gameplay token for the calling user (native/direct path; no browser redirect). Requires an identity SESSION token (app tokens cannot mint). Free/open apps auto-grant access; paid apps require an existing entitlement (else FORBIDDEN). A Crowded Kingdoms account created on or after 2026-11-11 must confirm its email first (EMAIL_CONFIRMATION_REQUIRED; resendConfirmationEmail sends another link). Side effect: may create an app_user_access row on the app's free default tier. */
5137
5137
  mintAppToken: AppTokenResponse;
5138
5138
  /** Mint a grid-scoped token from the app token you hold (DN-10). The result can call only a short, fixed list of gameplay fields, and each is confined to the grid: world reads and replication sends must address a chunk inside it (a send's origin; its reach follows distance), and channels must be the grid's own. refreshAppToken and logout are refused, so the token cannot widen or tear down its parent. Requires an app token (not a session token, not another grid token), and the caller must own the grid or hold run_client_code on it. */
5139
5139
  mintGridToken: GridTokenResponse;
@@ -5153,7 +5153,7 @@ export type Mutation = {
5153
5153
  recordPlayerConsents: Scalars['Boolean']['output'];
5154
5154
  /** Rotate the calling app token for a fresh one (same app, extended TTL) and revoke the old. Call before the current token expires to keep playing without bouncing back through the Overworld. Allowed for app-scoped tokens; re-checks entitlement. NATIVE CLIENTS: pass `currentServer` (the ip4 + clientPort serverWithLeastClients gave you) and the new token is authorized on that same Buddy -- read `authorizedServer` on the response: when it is set, keep your UDP session and just switch tokens; when it is null, call serverWithLeastClients for a fresh placement. `authorizedServer` is null when the node is gone, draining, Full, on the wrong shard -- or when it is NearCapacity / running hot and a Ready sibling has room: a refresh is the cheapest moment to rebalance a resident, so expect to be moved occasionally under load. Without `currentServer` the new token is not known to any Buddy until you call serverWithLeastClients. */
5155
5155
  refreshAppToken: AppTokenResponse;
5156
- /** Registers a new email + password account: creates the (initially unconfirmed) account, emails a confirmation link, and returns an AuthResponse with a session `token` for immediate use (send as `Authorization: Bearer <token>`). If an account already exists for the email it is refused with extensions.code EMAIL_ALREADY_REGISTERED (409) and no session is returned: an account that already has a password is left exactly as it was (sign in, or use the emailed reset), and only a password-less account (created via magic link/social) gets the password attached pending email confirmation. It is a routine outcome rather than a fault, and it reached clients as INTERNAL_SERVER_ERROR before v1.60.0, which is why several of them match it by its message text. A browser request (Origin header present) must send acceptLegal and attestAgeOfMajority both true or it is refused with LEGAL_ACCEPTANCE_REQUIRED before an account is created; a request with no Origin may omit them, and gameplay tokens stay refused until the documents are stored. Public; first-party origins only (HOSTED_SIGN_IN_REQUIRED otherwise); rate-limited. */
5156
+ /** Registers a new email + password account: creates the (initially unconfirmed) account, emails a confirmation link, and returns an AuthResponse with a session `token` for immediate use (send as `Authorization: Bearer <token>`). Since 2026-11-11 a gameplay token (mintAppToken, the hosted sign-in) is refused with EMAIL_CONFIRMATION_REQUIRED until the account confirms its address (confirmEmail with the emailed link); dev and test accounts made with a provisioning token are not asked. If an account already exists for the email it is refused with extensions.code EMAIL_ALREADY_REGISTERED (409) and no session is returned: an account that already has a password is left exactly as it was (sign in, or use the emailed reset), and only a password-less account (created via magic link/social) gets the password attached pending email confirmation. It is a routine outcome rather than a fault, and it reached clients as INTERNAL_SERVER_ERROR before v1.60.0, which is why several of them match it by its message text. A browser request (Origin header present) must send acceptLegal and attestAgeOfMajority both true or it is refused with LEGAL_ACCEPTANCE_REQUIRED before an account is created; a request with no Origin may omit them, and gameplay tokens stay refused until the documents are stored. Public; first-party origins only (HOSTED_SIGN_IN_REQUIRED otherwise); rate-limited. */
5157
5157
  register: AuthResponse;
5158
5158
  /** Register the PUBLIC half of a key your organization signs its players' sign-in assertions with (exchangeManagedPlayerAssertion): its kid, algorithm (EdDSA, ES256 or RS256), the JWK, the iss your assertions carry and, if your identity provider sets its own, their aud. The private key never leaves your systems. Requires manage_players on the org. */
5159
5159
  registerOrgSigningKey: OrgSigningKey;
@@ -5187,7 +5187,7 @@ export type Mutation = {
5187
5187
  requestToJoinChannel: GroupMember;
5188
5188
  /** Request to join a request-only team (creates a pending membership a manager can approve via addTeamMember). Behaves identically to joinTeam; named for request-policy UIs. */
5189
5189
  requestToJoinTeam: GroupMember;
5190
- /** Re-sends the email-confirmation link. Always returns true regardless of whether the account exists or is already confirmed (prevents enumeration); the email is only sent for existing unconfirmed accounts. Public; first-party origins only (HOSTED_SIGN_IN_REQUIRED otherwise); rate-limited. */
5190
+ /** Re-sends the email-confirmation link. Always returns true regardless of whether the account exists or is already confirmed (prevents enumeration); the email is only sent for existing unconfirmed accounts. The remedy for EMAIL_CONFIRMATION_REQUIRED. Public; first-party origins and clients that send no Origin (native games) only (HOSTED_SIGN_IN_REQUIRED otherwise); rate-limited. */
5191
5191
  resendConfirmationEmail: Scalars['Boolean']['output'];
5192
5192
  /** Completes a password reset using the reset token and a new password. Returns true on success; throws if the token is invalid or expired. Public (the token authorizes the call); first-party origins only (HOSTED_SIGN_IN_REQUIRED otherwise). EVERY existing session for the account is revoked (and every app token minted from one): a reset is what an owner does after losing control of the account, so whoever held a session loses it. The user signs in again with the new password. */
5193
5193
  resetPassword: Scalars['Boolean']['output'];