@crowdedkingdoms/crowdyjs 18.23.1 → 18.25.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.
Files changed (55) hide show
  1. package/MIGRATION.md +91 -0
  2. package/README.md +181 -28
  3. package/dist/crowdy-client.d.ts +10 -1
  4. package/dist/crowdy-client.d.ts.map +1 -1
  5. package/dist/crowdy-client.js +5 -0
  6. package/dist/default-origin.d.ts +6 -6
  7. package/dist/default-origin.d.ts.map +1 -1
  8. package/dist/default-origin.js +6 -6
  9. package/dist/domains/admin.d.ts +4 -0
  10. package/dist/domains/admin.d.ts.map +1 -1
  11. package/dist/domains/admin.js +1 -0
  12. package/dist/domains/apps.d.ts +49 -3
  13. package/dist/domains/apps.d.ts.map +1 -1
  14. package/dist/domains/apps.js +52 -3
  15. package/dist/domains/auth.d.ts +145 -16
  16. package/dist/domains/auth.d.ts.map +1 -1
  17. package/dist/domains/auth.js +158 -16
  18. package/dist/domains/inputLog.d.ts +9 -2
  19. package/dist/domains/inputLog.d.ts.map +1 -1
  20. package/dist/domains/inputLog.js +9 -2
  21. package/dist/domains/managedPlayers.d.ts +66 -3
  22. package/dist/domains/managedPlayers.d.ts.map +1 -1
  23. package/dist/domains/managedPlayers.js +19 -3
  24. package/dist/domains/moderation.d.ts +53 -0
  25. package/dist/domains/moderation.d.ts.map +1 -0
  26. package/dist/domains/moderation.js +68 -0
  27. package/dist/domains/platform.d.ts +16 -0
  28. package/dist/domains/platform.d.ts.map +1 -1
  29. package/dist/domains/platform.js +17 -0
  30. package/dist/domains/portal.d.ts +88 -8
  31. package/dist/domains/portal.d.ts.map +1 -1
  32. package/dist/domains/portal.js +80 -8
  33. package/dist/domains/safety.d.ts +164 -0
  34. package/dist/domains/safety.d.ts.map +1 -0
  35. package/dist/domains/safety.js +168 -0
  36. package/dist/domains/users.d.ts +9 -1
  37. package/dist/domains/users.d.ts.map +1 -1
  38. package/dist/domains/users.js +9 -1
  39. package/dist/errors.d.ts +163 -0
  40. package/dist/errors.d.ts.map +1 -1
  41. package/dist/errors.js +188 -0
  42. package/dist/generated/graphql-schema.d.ts +568 -17
  43. package/dist/generated/graphql-schema.d.ts.map +1 -1
  44. package/dist/generated/graphql-schema.js +64 -0
  45. package/dist/generated/graphql.d.ts +378 -0
  46. package/dist/generated/graphql.d.ts.map +1 -1
  47. package/dist/generated/graphql.js +24 -3
  48. package/dist/index.d.ts +12 -9
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +6 -4
  51. package/dist/live-coding/assets/browser-authoring-index.json +1 -1
  52. package/dist/live-coding/assets/manifest.json +1 -1
  53. package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
  54. package/dist/live-coding/browser-authoring-index.generated.js +265 -6
  55. package/package.json +1 -1
@@ -8,6 +8,7 @@ import type { QuotasAPI } from './quotas.js';
8
8
  import type { UsageAPI } from './usage.js';
9
9
  import type { SharedEnvironmentAPI } from './sharedEnvironment.js';
10
10
  import type { GameAppsAPI } from './gameApps.js';
11
+ import type { ModerationAPI } from './moderation.js';
11
12
  /**
12
13
  * Studio-admin facade — exposed as `client.admin`.
13
14
  *
@@ -49,6 +50,8 @@ export declare class AdminAPI {
49
50
  readonly sharedEnvironment: SharedEnvironmentAPI;
50
51
  /** App grids + grid runtime-permission administration. */
51
52
  readonly grids: GameAppsAPI;
53
+ /** An app's safety reports, for its moderators (`moderate_safety`). */
54
+ readonly moderation: ModerationAPI;
52
55
  constructor(deps: {
53
56
  organizations: OrganizationsAPI;
54
57
  managedPlayers: ManagedPlayersAPI;
@@ -60,6 +63,7 @@ export declare class AdminAPI {
60
63
  usage: UsageAPI;
61
64
  sharedEnvironment: SharedEnvironmentAPI;
62
65
  grids: GameAppsAPI;
66
+ moderation: ModerationAPI;
63
67
  });
64
68
  }
65
69
  //# sourceMappingURL=admin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/domains/admin.ts"],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+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,mEAAmE;IACnE,QAAQ,CAAC,iBAAiB,EAAE,oBAAoB,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;gBAEvB,IAAI,EAAE;QAChB,aAAa,EAAE,gBAAgB,CAAC;QAChC,cAAc,EAAE,iBAAiB,CAAC;QAClC,IAAI,EAAE,OAAO,CAAC;QACd,SAAS,EAAE,YAAY,CAAC;QACxB,OAAO,EAAE,UAAU,CAAC;QACpB,QAAQ,EAAE,WAAW,CAAC;QACtB,MAAM,EAAE,SAAS,CAAC;QAClB,KAAK,EAAE,QAAQ,CAAC;QAChB,iBAAiB,EAAE,oBAAoB,CAAC;QACxC,KAAK,EAAE,WAAW,CAAC;QACnB,UAAU,EAAE,aAAa,CAAC;KAC3B;CAaF"}
@@ -30,5 +30,6 @@ export class AdminAPI {
30
30
  this.usage = deps.usage;
31
31
  this.sharedEnvironment = deps.sharedEnvironment;
32
32
  this.grids = deps.grids;
33
+ this.moderation = deps.moderation;
33
34
  }
34
35
  }
@@ -1,5 +1,5 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
- import { type AppQuery, type AppBySlugQuery, type MyAppsQuery, type AppsForOrgQuery, type MarketplaceAppsQuery, type MarketplaceAppsQueryVariables, type AppsConnectionQuery, type AppsConnectionQueryVariables, type CreateAppMutation, type UpdateAppMutation, type ArchiveAppMutation, type AppCodeAdmissionModeQuery, type AppCodeAdmissionsQuery, type SetAppCodeAdmissionModeMutation, type AdmitAppCodeMutation, type RevokeAppCodeAdmissionMutation, type PlaceableDatacentersQuery, type CreateAppInput, type UpdateAppInput, type AdmitAppCodeInput, type CodeAdmissionMode } from '../generated/graphql.js';
2
+ import { type AppRecordingQuery, type AppRequiredDocumentInput, type SetAppRequiredDocumentsMutation, type AppQuery, type AppBySlugQuery, type MyAppsQuery, type AppsForOrgQuery, type MarketplaceAppsQuery, type MarketplaceAppsQueryVariables, type AppsConnectionQuery, type AppsConnectionQueryVariables, type CreateAppMutation, type UpdateAppMutation, type ArchiveAppMutation, type AppCodeAdmissionModeQuery, type AppCodeAdmissionsQuery, type SetAppCodeAdmissionModeMutation, type AdmitAppCodeMutation, type RevokeAppCodeAdmissionMutation, type PlaceableDatacentersQuery, type CreateAppInput, type UpdateAppInput, type AdmitAppCodeInput, type CodeAdmissionMode } from '../generated/graphql.js';
3
3
  /**
4
4
  * The minimal routing tuple the SDK derives from an `App` row: just enough to
5
5
  * decide which game-api endpoint should serve a given app. Returned by
@@ -27,6 +27,12 @@ export interface AppRoute {
27
27
  */
28
28
  gameApiUrl: string | null;
29
29
  }
30
+ /**
31
+ * What an app's safety log records right now ({@link AppsAPI.recording}): `enabled` (the log
32
+ * is on, so text chat and direct messages are recorded), `voice` (voice and channel audio)
33
+ * and `video` (webcam video).
34
+ */
35
+ export type AppRecordingState = NonNullable<AppRecordingQuery['app']>['recording'];
30
36
  /**
31
37
  * App discovery & game-api routing — exposed as `client.apps`.
32
38
  *
@@ -100,6 +106,29 @@ export declare class AppsAPI {
100
106
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` if the caller is not signed in.
101
107
  */
102
108
  app(appId: string): Promise<AppQuery['app']>;
109
+ /**
110
+ * What the app's safety log (replay logging) records right now, for the notice and the
111
+ * recording indicator a game shows its players: `enabled` (the log is on: text chat and
112
+ * direct messages are recorded), `voice` (voice and channel audio) and `video` (webcam
113
+ * video). Readable with the app's own app token, so a game reads it on its gameplay client.
114
+ * ck-api v2.60.0.
115
+ *
116
+ * While `voice` or `video` is true, show the player a notice before they first speak or
117
+ * appear on camera, and an indicator while it stays true. Read it when the player enters
118
+ * the app; an admin's change applies within about 15 seconds. Null for an unknown app.
119
+ */
120
+ recording(appId: string): Promise<AppRecordingState | null>;
121
+ /**
122
+ * Set the documents the app's players accept before playing, replacing the list:
123
+ * documents left out stop being required, and a new `version` of one asks every player of
124
+ * the app again at their next mint or refresh (`LEGAL_ACCEPTANCE_REQUIRED` until they accept
125
+ * it). At most 10; `documentId` is 1-64 lower-case letters, digits and hyphens and may not
126
+ * reuse a platform document's id; `url` is https. An empty list requires none. Players
127
+ * read the list with `auth.appRequiredDocuments(appId)` and accept it with
128
+ * `auth.recordPlayerConsents({ acceptLegal: true, appId })`. Requires `manage_apps` on the
129
+ * app. ck-api v2.60.0.
130
+ */
131
+ setRequiredDocuments(appId: string, documents: AppRequiredDocumentInput[]): Promise<SetAppRequiredDocumentsMutation['setAppRequiredDocuments']>;
103
132
  /**
104
133
  * Look up a single app by its org slug + app slug (the marketplace URL path).
105
134
  * **Public**: no authentication required, and not filtered by visibility or
@@ -222,13 +251,30 @@ export declare class AppsAPI {
222
251
  * every client input they accept for the app, readable with `client.inputLog` and
223
252
  * billed as stored input logs (crowdedkingdoms.com/pricing). Apps start with it off
224
253
  * ("No replication logging"), and recording stops shortly after it is turned off.
254
+ * It is the app's safety log: an app that admits players under 18 must keep it on, so
255
+ * turning it off there is refused `SAFETY_LOG_REQUIRED` (ck-api v2.60.0).
256
+ *
257
+ * `replayLoggingRecordsVoice` / `replayLoggingRecordsVideo` (both true by default) keep
258
+ * voice and channel audio, or webcam video, in or out of the log while it is on;
259
+ * {@link recording} is what players are told. `minPlayerAge` (13 to 18) raises the
260
+ * youngest age the app admits above the platform's, never below it; `null` returns
261
+ * it to the platform's, and `effectiveMinPlayerAge` reads the result. Younger players
262
+ * are refused `AGE_REQUIREMENT_NOT_MET` at their next mint or refresh.
263
+ *
264
+ * App reads and this update also return `hasSafetyModerator` (ck-api v2.61.0): whether the
265
+ * organization has appointed a safety moderator, a member whose own role grants
266
+ * `moderate_safety` (an admin alone does not count). An app that admits players under 18
267
+ * needs one, or its minors are refused `SAFETY_MODERATOR_REQUIRED`. Null for a caller who is
268
+ * not a member of the app's organization.
225
269
  *
226
270
  * @param appId - Numeric app id.
227
271
  * @param input - {@link UpdateAppInput} fields to change.
228
272
  * @returns The updated {@link App}.
229
273
  * @throws {CrowdyGraphQLError} `FORBIDDEN`/`SCOPE_MISSING` without
230
- * `manage_apps`, or `INPUT_LOG_FUNDS_NEEDED` when turning replay logging on for
231
- * an org whose wallet has no spendable balance (a billing-exempt org needs none).
274
+ * `manage_apps`, `INPUT_LOG_FUNDS_NEEDED` when turning replay logging on for
275
+ * an org whose wallet has no spendable balance (a billing-exempt org needs none),
276
+ * or `SAFETY_LOG_REQUIRED` when turning it off in an app that admits players
277
+ * under 18.
232
278
  */
233
279
  update(appId: string, input: UpdateAppInput): Promise<UpdateAppMutation['updateApp']>;
234
280
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/domains/apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAgBL,KAAK,QAAQ,EAEb,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAE9B,KAAK,cAAc,EACnB,K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CAAC,CAAC;IAKrE;;;;;;;;;OASG;IACG,WAAW,CACf,IAAI,GAAE;QACJ,MAAM,CAAC,EAAE,6BAA6B,CAAC,QAAQ,CAAC,CAAC;QACjD,KAAK,CAAC,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,CAAC,EAAE,6BAA6B,CAAC,QAAQ,CAAC,CAAC;KAC7C,GACL,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAKxC;;;;;;;OAOG;IACG,qBAAqB,CACzB,IAAI,GAAE,4BAAiC,GACtC,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAKjD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,oBAAoB,IAAI,OAAO,CACnC,yBAAyB,CAAC,sBAAsB,CAAC,CAClD;IAKD;;;;;;;;;;;;;;OAcG;IACG,MAAM,CACV,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAK1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACG,MAAM,CACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAQ1C;;;;;;;OAOG;IACG,OAAO,CACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;CAI7C"}
@@ -1,4 +1,4 @@
1
- import { AppDocument, AppBySlugDocument, MyAppsDocument, AppsForOrgDocument, MarketplaceAppsDocument, AppsConnectionDocument, CreateAppDocument, UpdateAppDocument, ArchiveAppDocument, AppCodeAdmissionModeDocument, AppCodeAdmissionsDocument, SetAppCodeAdmissionModeDocument, AdmitAppCodeDocument, RevokeAppCodeAdmissionDocument, PlaceableDatacentersDocument, } from '../generated/graphql.js';
1
+ import { AppDocument, AppBySlugDocument, MyAppsDocument, AppsForOrgDocument, MarketplaceAppsDocument, AppsConnectionDocument, CreateAppDocument, UpdateAppDocument, ArchiveAppDocument, AppCodeAdmissionModeDocument, AppCodeAdmissionsDocument, SetAppCodeAdmissionModeDocument, AdmitAppCodeDocument, RevokeAppCodeAdmissionDocument, PlaceableDatacentersDocument, AppRecordingDocument, SetAppRequiredDocumentsDocument, } from '../generated/graphql.js';
2
2
  function appRouteFromAppRow(row) {
3
3
  if (!row || typeof row !== 'object')
4
4
  return null;
@@ -113,6 +113,38 @@ export class AppsAPI {
113
113
  const data = await this.api.request(AppDocument, { appId });
114
114
  return data.app;
115
115
  }
116
+ /**
117
+ * What the app's safety log (replay logging) records right now, for the notice and the
118
+ * recording indicator a game shows its players: `enabled` (the log is on: text chat and
119
+ * direct messages are recorded), `voice` (voice and channel audio) and `video` (webcam
120
+ * video). Readable with the app's own app token, so a game reads it on its gameplay client.
121
+ * ck-api v2.60.0.
122
+ *
123
+ * While `voice` or `video` is true, show the player a notice before they first speak or
124
+ * appear on camera, and an indicator while it stays true. Read it when the player enters
125
+ * the app; an admin's change applies within about 15 seconds. Null for an unknown app.
126
+ */
127
+ async recording(appId) {
128
+ const data = await this.api.request(AppRecordingDocument, { appId });
129
+ return data.app?.recording ?? null;
130
+ }
131
+ /**
132
+ * Set the documents the app's players accept before playing, replacing the list:
133
+ * documents left out stop being required, and a new `version` of one asks every player of
134
+ * the app again at their next mint or refresh (`LEGAL_ACCEPTANCE_REQUIRED` until they accept
135
+ * it). At most 10; `documentId` is 1-64 lower-case letters, digits and hyphens and may not
136
+ * reuse a platform document's id; `url` is https. An empty list requires none. Players
137
+ * read the list with `auth.appRequiredDocuments(appId)` and accept it with
138
+ * `auth.recordPlayerConsents({ acceptLegal: true, appId })`. Requires `manage_apps` on the
139
+ * app. ck-api v2.60.0.
140
+ */
141
+ async setRequiredDocuments(appId, documents) {
142
+ const data = await this.api.request(SetAppRequiredDocumentsDocument, {
143
+ appId,
144
+ documents,
145
+ });
146
+ return data.setAppRequiredDocuments;
147
+ }
116
148
  /**
117
149
  * Look up a single app by its org slug + app slug (the marketplace URL path).
118
150
  * **Public**: no authentication required, and not filtered by visibility or
@@ -260,13 +292,30 @@ export class AppsAPI {
260
292
  * every client input they accept for the app, readable with `client.inputLog` and
261
293
  * billed as stored input logs (crowdedkingdoms.com/pricing). Apps start with it off
262
294
  * ("No replication logging"), and recording stops shortly after it is turned off.
295
+ * It is the app's safety log: an app that admits players under 18 must keep it on, so
296
+ * turning it off there is refused `SAFETY_LOG_REQUIRED` (ck-api v2.60.0).
297
+ *
298
+ * `replayLoggingRecordsVoice` / `replayLoggingRecordsVideo` (both true by default) keep
299
+ * voice and channel audio, or webcam video, in or out of the log while it is on;
300
+ * {@link recording} is what players are told. `minPlayerAge` (13 to 18) raises the
301
+ * youngest age the app admits above the platform's, never below it; `null` returns
302
+ * it to the platform's, and `effectiveMinPlayerAge` reads the result. Younger players
303
+ * are refused `AGE_REQUIREMENT_NOT_MET` at their next mint or refresh.
304
+ *
305
+ * App reads and this update also return `hasSafetyModerator` (ck-api v2.61.0): whether the
306
+ * organization has appointed a safety moderator, a member whose own role grants
307
+ * `moderate_safety` (an admin alone does not count). An app that admits players under 18
308
+ * needs one, or its minors are refused `SAFETY_MODERATOR_REQUIRED`. Null for a caller who is
309
+ * not a member of the app's organization.
263
310
  *
264
311
  * @param appId - Numeric app id.
265
312
  * @param input - {@link UpdateAppInput} fields to change.
266
313
  * @returns The updated {@link App}.
267
314
  * @throws {CrowdyGraphQLError} `FORBIDDEN`/`SCOPE_MISSING` without
268
- * `manage_apps`, or `INPUT_LOG_FUNDS_NEEDED` when turning replay logging on for
269
- * an org whose wallet has no spendable balance (a billing-exempt org needs none).
315
+ * `manage_apps`, `INPUT_LOG_FUNDS_NEEDED` when turning replay logging on for
316
+ * an org whose wallet has no spendable balance (a billing-exempt org needs none),
317
+ * or `SAFETY_LOG_REQUIRED` when turning it off in an app that admits players
318
+ * under 18.
270
319
  */
271
320
  async update(appId, input) {
272
321
  const data = await this.api.request(UpdateAppDocument, {
@@ -1,5 +1,6 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
2
  import type { AuthState } from '../auth-state.js';
3
+ import { type LegalDocument } from '../generated/graphql.js';
3
4
  /**
4
5
  * Authentication and account lifecycle — exposed as `client.auth`.
5
6
  *
@@ -34,10 +35,15 @@ import type { AuthState } from '../auth-state.js';
34
35
  * **Public (no session):** {@link register}, {@link login},
35
36
  * {@link requestLoginLink}, {@link completeLoginLink}, {@link socialLoginStart},
36
37
  * {@link socialLoginComplete}, {@link availableLoginProviders},
37
- * {@link checkAuthMethod}, {@link requestPasswordReset}, {@link resetPassword}.
38
+ * {@link checkAuthMethod}, {@link requestPasswordReset}, {@link resetPassword},
39
+ * and the documents to show: {@link playerLegalDocuments},
40
+ * {@link appRequiredDocuments}, {@link developerLegalDocuments}.
38
41
  * **Require a session:** {@link logout}, {@link logoutAllDevices},
39
42
  * {@link myIdentities}, {@link linkIdentity}, {@link unlinkIdentity},
40
- * {@link changePassword}, {@link setInitialPassword}.
43
+ * {@link changePassword}, {@link setInitialPassword}, and what a player or
44
+ * developer agrees to or answers: {@link recordPlayerConsents},
45
+ * {@link playerLegalAcceptance}, {@link recordPlayerAge},
46
+ * {@link recordDeveloperConsents}, {@link developerLegalAcceptance}.
41
47
  *
42
48
  * **Which password method:** the four are distinguished by what the caller has
43
49
  * already proven, not by what they want to do. Signed in with a password →
@@ -66,6 +72,36 @@ export interface UserIdentity {
66
72
  createdAt: string;
67
73
  lastLoginAt: string | null;
68
74
  }
75
+ /**
76
+ * A player's age bracket as the API reports it (`me.ageBracket`): `unknown` until an age is
77
+ * given, then `under_13`, `13_15`, `16_17` or `18_plus`. Open union: the server may add one.
78
+ * A bracket is for your logic; never show it to a player as an age.
79
+ */
80
+ export type AgeBracket = 'unknown' | 'under_13' | '13_15' | '16_17' | '18_plus' | (string & {});
81
+ /** How a player accepted documents: on a Crowded Kingdoms or SDK form, or on the app's own screen. */
82
+ export type LegalAcceptanceMethodValue = 'CLICKWRAP' | 'IN_GAME';
83
+ /** The account after {@link AuthAPI.recordPlayerAge}. */
84
+ export interface PlayerAge {
85
+ userId: string;
86
+ ageBracket: AgeBracket | null;
87
+ /** The declared country (ISO 3166-1 alpha-2). */
88
+ country: string | null;
89
+ }
90
+ /** A birth date, country and parental agreement, as {@link AuthAPI.recordPlayerAge} and `register` take them. */
91
+ export interface PlayerAgeInput {
92
+ /**
93
+ * `YYYY-MM-DD` (`YYYY-MM` is accepted too). Only the year and month are kept, and the age
94
+ * is counted from the last day of that month.
95
+ */
96
+ birthDate: string;
97
+ /** The country the player lives in, ISO 3166-1 alpha-2 (such as `US`). */
98
+ country: string;
99
+ /**
100
+ * True when a player under 18 confirmed that a parent or guardian agreed. Required true
101
+ * under 18; ignored at 18 or over.
102
+ */
103
+ parentalConfirmation?: boolean;
104
+ }
69
105
  /**
70
106
  * `register` refused because the address already has an account.
71
107
  *
@@ -211,6 +247,19 @@ export declare class AuthAPI {
211
247
  * exists; the account then starts accepted. A client with no browser origin may
212
248
  * omit them and call {@link recordPlayerConsents} before its first gameplay
213
249
  * token.
250
+ *
251
+ * **The age (ck-api v2.60.0).** `birthDate`, `country` and, for a player under 18,
252
+ * `parentalConfirmation` are the answers of a neutral age screen: it asks the date
253
+ * of birth and the country and shows no age, and only a player under 18 sees the
254
+ * line that a parent or guardian agreed. They are optional until the platform
255
+ * admits players under 18; after that a browser sign-up without them is refused
256
+ * `AGE_REQUIRED`, and a request with no browser origin may give them later with
257
+ * {@link recordPlayerAge}. A country Crowded Kingdoms does not serve, declared or
258
+ * detected, is refused `TERRITORY_NOT_SUPPORTED` (`territoryNotSupportedOf`), and an
259
+ * age the platform does not admit `AGE_REQUIREMENT_NOT_MET`
260
+ * (`ageRequirementNotMetOf`); either way no account is made. Since ck-api v2.61.0
261
+ * the age refusal names no age, and for 24 hours the same client (address and user
262
+ * agent) is refused it whatever it sends.
214
263
  */
215
264
  register(input: {
216
265
  email: string;
@@ -220,31 +269,111 @@ export declare class AuthAPI {
220
269
  acceptLegal?: boolean;
221
270
  /** The player is at least 18, or the age of majority where they live if higher. */
222
271
  attestAgeOfMajority?: boolean;
272
+ /** Birth date, `YYYY-MM-DD` (or `YYYY-MM`); only the year and month are kept. Sent with `country`. */
273
+ birthDate?: string;
274
+ /** The country the player lives in, ISO 3166-1 alpha-2; required with `birthDate`. */
275
+ country?: string;
276
+ /** A player under 18 confirmed a parent or guardian agreed; required true under 18. */
277
+ parentalConfirmation?: boolean;
223
278
  }): Promise<AuthResponse>;
224
279
  /**
225
- * Store the signed-in player's agreement to the current required legal
226
- * documents (Game Terms, API Terms, SDK Developer Terms, Free Tier and Billing
227
- * Basis, Overworld Privacy Policy) and their attestation that they are at least
228
- * 18, or the age of majority where they live if that is higher. Requires the
229
- * identity session token; both must be `true`, and repeating it is harmless.
280
+ * Store the signed-in player's agreement to the platform's current player
281
+ * documents ({@link playerLegalDocuments}) and, with `appId`, to that app's own
282
+ * ({@link appRequiredDocuments}). Requires the identity session token;
283
+ * `acceptLegal` must be `true`, and repeating it is harmless.
284
+ *
285
+ * `attestAgeOfMajority` (the player is at least 18, or the age of majority where
286
+ * they live if higher) must be `true` while the platform still uses the
287
+ * attestation; once players give a birth date instead ({@link recordPlayerAge})
288
+ * the server ignores it, and it may be left out. `method` records how the player
289
+ * accepted: `CLICKWRAP` (the default; a Crowded Kingdoms or SDK form) or `IN_GAME`
290
+ * (the app's own screen).
230
291
  *
231
292
  * Since ck-api v2.35.0 a gameplay token (`portal.mintAppToken`,
232
293
  * `portal.createAuthorizationCode`, `portal.refresh`) is refused with
233
- * `LEGAL_ACCEPTANCE_REQUIRED` ({@link isLegalAcceptanceRequiredError}) until
234
- * this is stored. It records the PLAYER's agreement: call it only after they
235
- * have ticked both boxes in your own UI, linking each document. A browser game
236
- * never needs it, because Studio's hosted `/authorize` asks for both.
294
+ * `LEGAL_ACCEPTANCE_REQUIRED` ({@link isLegalAcceptanceRequiredError};
295
+ * `legalAcceptanceRequiredOf` lists the missing documents) until this is stored.
296
+ * It records the PLAYER's agreement: call it only after they ticked the box in
297
+ * your own UI, which links each document. A browser game never needs it, because
298
+ * Studio's hosted `/authorize` asks.
299
+ *
300
+ * `appId`, `method` and leaving the attestation out need ck-api v2.60.0; the call
301
+ * with both flags and neither of those works against any API since v2.35.0.
237
302
  */
238
303
  recordPlayerConsents(input: {
239
304
  acceptLegal: boolean;
240
- attestAgeOfMajority: boolean;
305
+ attestAgeOfMajority?: boolean;
306
+ /** The app whose own documents the player also accepted (BigInt as a decimal string). */
307
+ appId?: string;
308
+ method?: LegalAcceptanceMethodValue;
309
+ }): Promise<boolean>;
310
+ /**
311
+ * Whether the signed-in player has stored the platform's current player
312
+ * documents and, while the platform asks for one, the age attestation or a birth
313
+ * date: whether a gameplay token would be issued. With `appId` the app's own
314
+ * documents count too (ck-api v2.60.0). Requires the identity session token.
315
+ * ck-api v2.35.0.
316
+ */
317
+ playerLegalAcceptance(options?: {
318
+ appId?: string;
241
319
  }): Promise<boolean>;
242
320
  /**
243
- * Whether the signed-in player has the current required documents and the age
244
- * attestation stored, i.e. whether a gameplay token would be issued. Requires
245
- * the identity session token. ck-api v2.35.0.
321
+ * The platform's documents every player accepts before playing, at the versions
322
+ * required now: show them (with the app's own, {@link appRequiredDocuments})
323
+ * before {@link recordPlayerConsents}. Each has `documentId`, `version`, `title`
324
+ * and `url`. Public. ck-api v2.60.0.
325
+ */
326
+ playerLegalDocuments(): Promise<LegalDocument[]>;
327
+ /**
328
+ * An app's own documents (its rules, an addendum), which its players accept on top
329
+ * of the platform's: record them with {@link recordPlayerConsents} and the
330
+ * `appId` before the player's next mint. Empty when the app requires none. Its
331
+ * admins set them with `apps.setRequiredDocuments`. Public. ck-api v2.60.0.
332
+ */
333
+ appRequiredDocuments(appId: string): Promise<LegalDocument[]>;
334
+ /**
335
+ * Record the signed-in player's birth date and country, and under 18 that a parent
336
+ * or guardian agreed, for an account whose age is not known yet (`users.me()`'s
337
+ * `ageBracket` is `unknown`, and a mint answers `AGE_REQUIRED`). Only the year and
338
+ * month are kept. Requires the identity session token. ck-api v2.60.0.
339
+ *
340
+ * Ask on a neutral screen: the date of birth and the country, with no age shown,
341
+ * and the parental line only for a player under 18. Refused with `CONFLICT` once
342
+ * the account has an age, `TERRITORY_NOT_SUPPORTED` where Crowded Kingdoms does not
343
+ * serve (the declared country, or the network's country or region), and
344
+ * `AGE_REQUIREMENT_NOT_MET` under the platform's youngest age. Since ck-api v2.61.0
345
+ * that refusal names no age, the account is deleted and erased as
346
+ * `users.deleteMyAccount` does, and for 24 hours the same client (address and user
347
+ * agent) is refused here and at sign-up whatever it sends: drop the session and do
348
+ * not ask again. Whether the player may play a given app is decided at the mint.
349
+ * Returns the account's `ageBracket` and `country`.
350
+ */
351
+ recordPlayerAge(input: PlayerAgeInput): Promise<PlayerAge>;
352
+ /**
353
+ * The documents a developer accepts before creating or administering an
354
+ * organization, at the versions required now. Empty while the platform asks
355
+ * developers for nothing beyond the player documents. Public. ck-api v2.60.0.
356
+ */
357
+ developerLegalDocuments(): Promise<LegalDocument[]>;
358
+ /**
359
+ * Whether the signed-in account has accepted the current developer documents.
360
+ * False means creating or administering an organization is refused with
361
+ * `LEGAL_ACCEPTANCE_REQUIRED` until {@link recordDeveloperConsents}. Requires the
362
+ * identity session token. ck-api v2.60.0.
246
363
  */
247
- playerLegalAcceptance(): Promise<boolean>;
364
+ developerLegalAcceptance(): Promise<boolean>;
365
+ /**
366
+ * Store the signed-in account's agreement to the current developer documents
367
+ * ({@link developerLegalDocuments}); `acceptDeveloperTerms` must be `true`, and
368
+ * repeating it is harmless. It records a person's agreement: call it only after
369
+ * they ticked the box in your own UI, linking each document. The developer
370
+ * documents are for adults: an account with no age is refused `AGE_REQUIRED`
371
+ * ({@link recordPlayerAge} first) and one under 18 `AGE_REQUIREMENT_NOT_MET`.
372
+ * Requires the identity session token. ck-api v2.60.0.
373
+ */
374
+ recordDeveloperConsents(input: {
375
+ acceptDeveloperTerms: boolean;
376
+ }): Promise<boolean>;
248
377
  /**
249
378
  * Email-first adaptive login: does this address have password sign-in enabled?
250
379
  * Public, and deliberately does not reveal whether the address is registered.
@@ -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;AAGlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAkCD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKhE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGlE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAA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