@playcademy/sdk 0.2.11 → 0.2.12

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.
@@ -1,8 +1,8 @@
1
+ import { SchemaInfo } from '@playcademy/cloudflare';
1
2
  import { InferSelectModel } from 'drizzle-orm';
2
3
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
3
4
  import * as drizzle_zod from 'drizzle-zod';
4
5
  import { z } from 'zod';
5
- import { SchemaInfo } from '@playcademy/cloudflare';
6
6
  import { AUTH_PROVIDER_IDS } from '@playcademy/constants';
7
7
 
8
8
  /**
@@ -583,6 +583,56 @@ interface PopulateStudentResponse {
583
583
  status: string;
584
584
  message?: string;
585
585
  }
586
+ interface TimebackSetupRequest {
587
+ gameId: string;
588
+ config: {
589
+ organization: {
590
+ name: string;
591
+ type: string;
592
+ identifier: string;
593
+ };
594
+ course: {
595
+ title: string;
596
+ subjects: string[];
597
+ grades: number[];
598
+ courseCode: string;
599
+ level: string;
600
+ gradingScheme: string;
601
+ metadata?: Record<string, unknown>;
602
+ };
603
+ component: {
604
+ title: string;
605
+ sortOrder: number;
606
+ prerequisites: string[];
607
+ prerequisiteCriteria: string;
608
+ };
609
+ resource: {
610
+ title: string;
611
+ vendorResourceId: string;
612
+ vendorId: string;
613
+ applicationId: string;
614
+ roles: string[];
615
+ importance: string;
616
+ metadata: {
617
+ type?: string;
618
+ launchUrl?: string;
619
+ toolProvider?: string;
620
+ instructionalMethod?: string;
621
+ subject?: string;
622
+ grades?: number[];
623
+ language?: string;
624
+ xp?: number;
625
+ [key: string]: unknown;
626
+ };
627
+ };
628
+ componentResource: {
629
+ title: string;
630
+ sortOrder: number;
631
+ lessonType: string | null;
632
+ };
633
+ };
634
+ verbose?: boolean;
635
+ }
586
636
  interface PlatformTimebackSetupRequest {
587
637
  gameId: string;
588
638
  courses: DerivedPlatformCourseConfig[];
@@ -928,7 +978,7 @@ declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
928
978
  tableName: "user";
929
979
  dataType: "string";
930
980
  columnType: "PgEnumColumn";
931
- data: "admin" | "developer" | "player";
981
+ data: "admin" | "player" | "developer";
932
982
  driverParam: string;
933
983
  notNull: true;
934
984
  hasDefault: true;
@@ -945,7 +995,7 @@ declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
945
995
  tableName: "user";
946
996
  dataType: "string";
947
997
  columnType: "PgEnumColumn";
948
- data: "approved" | "none" | "pending";
998
+ data: "none" | "pending" | "approved";
949
999
  driverParam: string;
950
1000
  notNull: true;
951
1001
  hasDefault: true;
@@ -1134,7 +1184,7 @@ declare const games: drizzle_orm_pg_core.PgTableWithColumns<{
1134
1184
  tableName: "games";
1135
1185
  dataType: "string";
1136
1186
  columnType: "PgEnumColumn";
1137
- data: "external" | "hosted";
1187
+ data: "hosted" | "external";
1138
1188
  driverParam: string;
1139
1189
  notNull: true;
1140
1190
  hasDefault: true;
@@ -1185,7 +1235,7 @@ declare const games: drizzle_orm_pg_core.PgTableWithColumns<{
1185
1235
  tableName: "games";
1186
1236
  dataType: "string";
1187
1237
  columnType: "PgEnumColumn";
1188
- data: "godot" | "unity" | "web";
1238
+ data: "web" | "godot" | "unity";
1189
1239
  driverParam: string;
1190
1240
  notNull: true;
1191
1241
  hasDefault: true;
@@ -1461,7 +1511,7 @@ declare const gameCustomHostnames: drizzle_orm_pg_core.PgTableWithColumns<{
1461
1511
  tableName: "game_custom_hostnames";
1462
1512
  dataType: "string";
1463
1513
  columnType: "PgEnumColumn";
1464
- data: "production" | "staging";
1514
+ data: "staging" | "production";
1465
1515
  driverParam: string;
1466
1516
  notNull: true;
1467
1517
  hasDefault: true;
@@ -1478,7 +1528,7 @@ declare const gameCustomHostnames: drizzle_orm_pg_core.PgTableWithColumns<{
1478
1528
  tableName: "game_custom_hostnames";
1479
1529
  dataType: "string";
1480
1530
  columnType: "PgEnumColumn";
1481
- data: "active" | "blocked" | "deleted" | "pending" | "pending_deletion" | "pending_deployment" | "pending_validation";
1531
+ data: "pending" | "active" | "pending_validation" | "pending_deployment" | "pending_deletion" | "blocked" | "deleted";
1482
1532
  driverParam: string;
1483
1533
  notNull: true;
1484
1534
  hasDefault: true;
@@ -1495,7 +1545,7 @@ declare const gameCustomHostnames: drizzle_orm_pg_core.PgTableWithColumns<{
1495
1545
  tableName: "game_custom_hostnames";
1496
1546
  dataType: "string";
1497
1547
  columnType: "PgEnumColumn";
1498
- data: "active" | "deleted" | "initializing" | "pending_deployment" | "pending_issuance" | "pending_validation";
1548
+ data: "active" | "pending_validation" | "pending_deployment" | "deleted" | "initializing" | "pending_issuance";
1499
1549
  driverParam: string;
1500
1550
  notNull: true;
1501
1551
  hasDefault: true;
@@ -1657,7 +1707,7 @@ declare const items: drizzle_orm_pg_core.PgTableWithColumns<{
1657
1707
  tableName: "items";
1658
1708
  dataType: "string";
1659
1709
  columnType: "PgEnumColumn";
1660
- data: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
1710
+ data: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
1661
1711
  driverParam: string;
1662
1712
  notNull: true;
1663
1713
  hasDefault: true;
@@ -2348,7 +2398,7 @@ declare const mapElements: drizzle_orm_pg_core.PgTableWithColumns<{
2348
2398
  tableName: "map_elements";
2349
2399
  dataType: "string";
2350
2400
  columnType: "PgEnumColumn";
2351
- data: "door_in" | "door_out" | "game_entry" | "game_registry" | "info" | "npc_interaction" | "quest_trigger" | "teleport";
2401
+ data: "info" | "game_entry" | "game_registry" | "teleport" | "door_in" | "door_out" | "npc_interaction" | "quest_trigger";
2352
2402
  driverParam: string;
2353
2403
  notNull: true;
2354
2404
  hasDefault: false;
@@ -2901,7 +2951,7 @@ declare const characterComponents: drizzle_orm_pg_core.PgTableWithColumns<{
2901
2951
  tableName: "character_components";
2902
2952
  dataType: "string";
2903
2953
  columnType: "PgEnumColumn";
2904
- data: "accessory" | "body" | "eyes" | "hairstyle" | "outfit";
2954
+ data: "accessory" | "body" | "outfit" | "hairstyle" | "eyes";
2905
2955
  driverParam: string;
2906
2956
  notNull: true;
2907
2957
  hasDefault: false;
@@ -3427,7 +3477,7 @@ declare const notifications: drizzle_orm_pg_core.PgTableWithColumns<{
3427
3477
  tableName: "notifications";
3428
3478
  dataType: "string";
3429
3479
  columnType: "PgEnumColumn";
3430
- data: "high" | "low" | "normal" | "urgent";
3480
+ data: "low" | "normal" | "high" | "urgent";
3431
3481
  driverParam: string;
3432
3482
  notNull: true;
3433
3483
  hasDefault: true;
@@ -3444,7 +3494,7 @@ declare const notifications: drizzle_orm_pg_core.PgTableWithColumns<{
3444
3494
  tableName: "notifications";
3445
3495
  dataType: "string";
3446
3496
  columnType: "PgEnumColumn";
3447
- data: "clicked" | "delivered" | "dismissed" | "expired" | "pending" | "seen";
3497
+ data: "pending" | "delivered" | "seen" | "clicked" | "dismissed" | "expired";
3448
3498
  driverParam: string;
3449
3499
  notNull: true;
3450
3500
  hasDefault: true;
@@ -3605,33 +3655,33 @@ declare const UpsertGameMetadataSchema: z.ZodEffects<z.ZodObject<{
3605
3655
  gameType: z.ZodDefault<z.ZodOptional<z.ZodEnum<["hosted", "external"]>>>;
3606
3656
  externalUrl: z.ZodOptional<z.ZodString>;
3607
3657
  }, "strip", z.ZodTypeAny, {
3608
- displayName: string;
3609
- mapElementId?: string | null | undefined;
3610
- platform: "godot" | "unity" | "web";
3611
3658
  metadata: Record<string, unknown>;
3612
- gameType: "external" | "hosted";
3659
+ displayName: string;
3660
+ gameType: "hosted" | "external";
3661
+ platform: "web" | "godot" | "unity";
3613
3662
  externalUrl?: string | undefined;
3663
+ mapElementId?: string | null | undefined;
3614
3664
  }, {
3615
3665
  displayName: string;
3616
- mapElementId?: string | null | undefined;
3617
- platform: "godot" | "unity" | "web";
3666
+ platform: "web" | "godot" | "unity";
3618
3667
  metadata?: Record<string, unknown> | undefined;
3619
- gameType?: "external" | "hosted" | undefined;
3668
+ gameType?: "hosted" | "external" | undefined;
3620
3669
  externalUrl?: string | undefined;
3621
- }>, {
3622
- displayName: string;
3623
3670
  mapElementId?: string | null | undefined;
3624
- platform: "godot" | "unity" | "web";
3671
+ }>, {
3625
3672
  metadata: Record<string, unknown>;
3626
- gameType: "external" | "hosted";
3673
+ displayName: string;
3674
+ gameType: "hosted" | "external";
3675
+ platform: "web" | "godot" | "unity";
3627
3676
  externalUrl?: string | undefined;
3677
+ mapElementId?: string | null | undefined;
3628
3678
  }, {
3629
3679
  displayName: string;
3630
- mapElementId?: string | null | undefined;
3631
- platform: "godot" | "unity" | "web";
3680
+ platform: "web" | "godot" | "unity";
3632
3681
  metadata?: Record<string, unknown> | undefined;
3633
- gameType?: "external" | "hosted" | undefined;
3682
+ gameType?: "hosted" | "external" | undefined;
3634
3683
  externalUrl?: string | undefined;
3684
+ mapElementId?: string | null | undefined;
3635
3685
  }>;
3636
3686
 
3637
3687
  declare const InsertItemSchema: drizzle_zod.BuildSchema<"insert", {
@@ -3725,7 +3775,7 @@ declare const InsertItemSchema: drizzle_zod.BuildSchema<"insert", {
3725
3775
  tableName: "items";
3726
3776
  dataType: "string";
3727
3777
  columnType: "PgEnumColumn";
3728
- data: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
3778
+ data: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
3729
3779
  driverParam: string;
3730
3780
  notNull: true;
3731
3781
  hasDefault: true;
@@ -3820,24 +3870,24 @@ declare const UpdateItemSchema: z.ZodObject<Omit<{
3820
3870
  imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3821
3871
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3822
3872
  createdAt: z.ZodOptional<z.ZodDate>;
3823
- }, "createdAt" | "id">, "strip", z.ZodTypeAny, {
3873
+ }, "id" | "createdAt">, "strip", z.ZodTypeAny, {
3874
+ description?: string | null | undefined;
3875
+ metadata?: Record<string, unknown> | undefined;
3876
+ type?: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other" | undefined;
3824
3877
  slug?: string | undefined;
3825
- gameId?: string | null | undefined;
3826
3878
  displayName?: string | undefined;
3827
- description?: string | null | undefined;
3828
- type?: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade" | undefined;
3879
+ gameId?: string | null | undefined;
3829
3880
  isPlaceable?: boolean | undefined;
3830
3881
  imageUrl?: string | null | undefined;
3831
- metadata?: Record<string, unknown> | undefined;
3832
3882
  }, {
3883
+ description?: string | null | undefined;
3884
+ metadata?: Record<string, unknown> | undefined;
3885
+ type?: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other" | undefined;
3833
3886
  slug?: string | undefined;
3834
- gameId?: string | null | undefined;
3835
3887
  displayName?: string | undefined;
3836
- description?: string | null | undefined;
3837
- type?: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade" | undefined;
3888
+ gameId?: string | null | undefined;
3838
3889
  isPlaceable?: boolean | undefined;
3839
3890
  imageUrl?: string | null | undefined;
3840
- metadata?: Record<string, unknown> | undefined;
3841
3891
  }>;
3842
3892
  declare const InsertCurrencySchema: drizzle_zod.BuildSchema<"insert", {
3843
3893
  id: drizzle_orm_pg_core.PgColumn<{
@@ -3947,16 +3997,16 @@ declare const InsertCurrencySchema: drizzle_zod.BuildSchema<"insert", {
3947
3997
  isPrimary: z.ZodDefault<z.ZodBoolean>;
3948
3998
  }>;
3949
3999
  declare const UpdateCurrencySchema: z.ZodObject<{
3950
- itemId: z.ZodOptional<z.ZodString>;
3951
4000
  symbol: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
4001
+ itemId: z.ZodOptional<z.ZodString>;
3952
4002
  isPrimary: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3953
4003
  }, "strip", z.ZodTypeAny, {
3954
- itemId?: string | undefined;
3955
4004
  symbol?: string | null | undefined;
4005
+ itemId?: string | undefined;
3956
4006
  isPrimary?: boolean | undefined;
3957
4007
  }, {
3958
- itemId?: string | undefined;
3959
4008
  symbol?: string | null | undefined;
4009
+ itemId?: string | undefined;
3960
4010
  isPrimary?: boolean | undefined;
3961
4011
  }>;
3962
4012
  declare const InsertShopListingSchema: drizzle_zod.BuildSchema<"insert", {
@@ -4167,28 +4217,28 @@ declare const UpdateShopListingSchema: z.ZodObject<{
4167
4217
  updatedAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodDate>>>;
4168
4218
  }, "strip", z.ZodTypeAny, {
4169
4219
  id?: string | undefined;
4220
+ createdAt?: Date | undefined;
4221
+ updatedAt?: Date | null | undefined;
4222
+ isActive?: boolean | undefined;
4170
4223
  itemId?: string | undefined;
4171
4224
  currencyId?: string | undefined;
4172
4225
  price?: number | undefined;
4173
4226
  sellBackPercentage?: number | null | undefined;
4174
4227
  stock?: number | null | undefined;
4175
- isActive?: boolean | undefined;
4176
4228
  availableFrom?: Date | null | undefined;
4177
4229
  availableUntil?: Date | null | undefined;
4178
- createdAt?: Date | undefined;
4179
- updatedAt?: Date | null | undefined;
4180
4230
  }, {
4181
4231
  id?: string | undefined;
4232
+ createdAt?: Date | undefined;
4233
+ updatedAt?: Date | null | undefined;
4234
+ isActive?: boolean | undefined;
4182
4235
  itemId?: string | undefined;
4183
4236
  currencyId?: string | undefined;
4184
4237
  price?: number | undefined;
4185
4238
  sellBackPercentage?: number | null | undefined;
4186
4239
  stock?: number | null | undefined;
4187
- isActive?: boolean | undefined;
4188
4240
  availableFrom?: Date | null | undefined;
4189
4241
  availableUntil?: Date | null | undefined;
4190
- createdAt?: Date | undefined;
4191
- updatedAt?: Date | null | undefined;
4192
4242
  }>;
4193
4243
 
4194
4244
  type GameRow = typeof games.$inferSelect;
@@ -5768,6 +5818,9 @@ declare abstract class PlaycademyBaseClient {
5768
5818
  * Initializes connection monitoring if enabled.
5769
5819
  */
5770
5820
  private _initializeConnectionMonitor;
5821
+ /**
5822
+ * Initializes an internal game session for automatic session management.
5823
+ */
5771
5824
  private _initializeInternalSession;
5772
5825
  /**
5773
5826
  * Current user data and inventory management.
@@ -5811,8 +5864,8 @@ declare class PlaycademyClient extends PlaycademyBaseClient {
5811
5864
  */
5812
5865
  runtime: {
5813
5866
  getGameToken: (gameId: string, options?: {
5814
- apply?: boolean | undefined;
5815
- } | undefined) => Promise<GameTokenResponse>;
5867
+ apply?: boolean;
5868
+ }) => Promise<GameTokenResponse>;
5816
5869
  exit: () => Promise<void>;
5817
5870
  onInit: (handler: (context: GameContextPayload) => void) => void;
5818
5871
  onTokenRefresh: (handler: (data: {
@@ -5836,7 +5889,7 @@ declare class PlaycademyClient extends PlaycademyBaseClient {
5836
5889
  getListenerCounts: () => Record<string, number>;
5837
5890
  assets: {
5838
5891
  url(pathOrStrings: string | TemplateStringsArray, ...values: unknown[]): string;
5839
- fetch: (path: string, options?: RequestInit | undefined) => Promise<Response>;
5892
+ fetch: (path: string, options?: RequestInit) => Promise<Response>;
5840
5893
  json: <T = unknown>(path: string) => Promise<T>;
5841
5894
  blob: (path: string) => Promise<Blob>;
5842
5895
  text: (path: string) => Promise<string>;
@@ -5879,7 +5932,7 @@ declare class PlaycademyClient extends PlaycademyBaseClient {
5879
5932
  * - `submit(gameId, score, metadata?)` - Record a game score
5880
5933
  */
5881
5934
  scores: {
5882
- submit: (gameId: string, score: number, metadata?: Record<string, unknown> | undefined) => Promise<ScoreSubmission>;
5935
+ submit: (gameId: string, score: number, metadata?: Record<string, unknown>) => Promise<ScoreSubmission>;
5883
5936
  };
5884
5937
  /**
5885
5938
  * Realtime multiplayer authentication.
@@ -5896,13 +5949,13 @@ declare class PlaycademyClient extends PlaycademyBaseClient {
5896
5949
  * - Routes are relative to your game's deployment (e.g., '/hello' → your-game.playcademy.gg/api/hello)
5897
5950
  */
5898
5951
  backend: {
5899
- get<T = unknown>(path: string, headers?: Record<string, string> | undefined): Promise<T>;
5900
- post<T = unknown>(path: string, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
5901
- put<T = unknown>(path: string, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
5902
- patch<T = unknown>(path: string, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
5903
- delete<T = unknown>(path: string, headers?: Record<string, string> | undefined): Promise<T>;
5904
- request<T = unknown>(path: string, method: Method, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
5905
- download(path: string, method?: Method, body?: unknown, headers?: Record<string, string> | undefined): Promise<Response>;
5952
+ get<T = unknown>(path: string, headers?: Record<string, string>): Promise<T>;
5953
+ post<T = unknown>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
5954
+ put<T = unknown>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
5955
+ patch<T = unknown>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
5956
+ delete<T = unknown>(path: string, headers?: Record<string, string>): Promise<T>;
5957
+ request<T = unknown>(path: string, method: Method, body?: unknown, headers?: Record<string, string>): Promise<T>;
5958
+ download(path: string, method?: Method, body?: unknown, headers?: Record<string, string>): Promise<Response>;
5906
5959
  url(pathOrStrings: string | TemplateStringsArray, ...values: unknown[]): string;
5907
5960
  };
5908
5961
  /** Auto-initializes a PlaycademyClient with context from the environment */
@@ -5960,6 +6013,45 @@ interface TimebackUserContext {
5960
6013
  /** User's organizations (schools/districts) */
5961
6014
  organizations: TimebackOrganization[];
5962
6015
  }
6016
+ /**
6017
+ * XP data access for the current user.
6018
+ * Results are cached for 5 seconds to avoid redundant network requests.
6019
+ */
6020
+ interface TimebackUserXp {
6021
+ /**
6022
+ * Fetch XP data from the server.
6023
+ * Returns XP for all courses in this game, or filter by grade/subject.
6024
+ * Results are cached for 5 seconds (use `force: true` to bypass).
6025
+ *
6026
+ * @param options - Query options
6027
+ * @param options.grade - Grade level to filter (must be used with subject)
6028
+ * @param options.subject - Subject to filter (must be used with grade)
6029
+ * @param options.include - Additional data to include: 'perCourse', 'today'
6030
+ * @param options.force - Bypass cache and fetch fresh data (default: false)
6031
+ * @returns Promise resolving to XP data
6032
+ *
6033
+ * @example
6034
+ * ```typescript
6035
+ * // Get total XP for all game courses
6036
+ * const xp = await client.timeback.user.xp.fetch()
6037
+ *
6038
+ * // Get XP for a specific grade/subject
6039
+ * const xp = await client.timeback.user.xp.fetch({
6040
+ * grade: 3,
6041
+ * subject: 'Math'
6042
+ * })
6043
+ *
6044
+ * // Get XP with per-course breakdown
6045
+ * const xp = await client.timeback.user.xp.fetch({
6046
+ * include: ['perCourse', 'today']
6047
+ * })
6048
+ *
6049
+ * // Force fresh data
6050
+ * const xp = await client.timeback.user.xp.fetch({ force: true })
6051
+ * ```
6052
+ */
6053
+ fetch(options?: GetXpOptions): Promise<XpResponse>;
6054
+ }
5963
6055
  /**
5964
6056
  * TimeBack user object with both cached getters and fetch method.
5965
6057
  */
@@ -5973,6 +6065,42 @@ interface TimebackUser extends TimebackUserContext {
5973
6065
  fetch(options?: {
5974
6066
  force?: boolean;
5975
6067
  }): Promise<TimebackUserContext>;
6068
+ /**
6069
+ * XP data for the current user.
6070
+ * Call `xp.fetch()` to get XP from the server.
6071
+ */
6072
+ xp: TimebackUserXp;
6073
+ }
6074
+ /**
6075
+ * Options for querying student XP.
6076
+ */
6077
+ interface GetXpOptions {
6078
+ /** Grade level to filter (must be used with subject) */
6079
+ grade?: TimebackGrade;
6080
+ /** Subject to filter (must be used with grade) */
6081
+ subject?: TimebackSubject;
6082
+ /** Additional data to include: 'perCourse', 'today' */
6083
+ include?: ('perCourse' | 'today')[];
6084
+ /** Bypass cache and fetch fresh data (default: false) */
6085
+ force?: boolean;
6086
+ }
6087
+ /**
6088
+ * XP data for a single course.
6089
+ */
6090
+ interface CourseXp {
6091
+ grade: TimebackGrade;
6092
+ subject: TimebackSubject;
6093
+ title: string;
6094
+ totalXp: number;
6095
+ todayXp?: number;
6096
+ }
6097
+ /**
6098
+ * Response from XP query.
6099
+ */
6100
+ interface XpResponse {
6101
+ totalXp: number;
6102
+ todayXp?: number;
6103
+ courses?: CourseXp[];
5976
6104
  }
5977
6105
 
5978
6106
  /**
@@ -6703,8 +6831,8 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
6703
6831
  */
6704
6832
  runtime: {
6705
6833
  getGameToken: (gameId: string, options?: {
6706
- apply?: boolean | undefined;
6707
- } | undefined) => Promise<GameTokenResponse>;
6834
+ apply?: boolean;
6835
+ }) => Promise<GameTokenResponse>;
6708
6836
  exit: () => Promise<void>;
6709
6837
  onInit: (handler: (context: GameContextPayload) => void) => void;
6710
6838
  onTokenRefresh: (handler: (data: {
@@ -6728,7 +6856,7 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
6728
6856
  getListenerCounts: () => Record<string, number>;
6729
6857
  assets: {
6730
6858
  url(pathOrStrings: string | TemplateStringsArray, ...values: unknown[]): string;
6731
- fetch: (path: string, options?: RequestInit | undefined) => Promise<Response>;
6859
+ fetch: (path: string, options?: RequestInit) => Promise<Response>;
6732
6860
  json: <T = unknown>(path: string) => Promise<T>;
6733
6861
  blob: (path: string) => Promise<Blob>;
6734
6862
  text: (path: string) => Promise<string>;
@@ -6759,13 +6887,13 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
6759
6887
  * - `get(path)`, `post(path, body)`, `put()`, `delete()` - HTTP methods
6760
6888
  */
6761
6889
  backend: {
6762
- get<T = unknown>(path: string, headers?: Record<string, string> | undefined): Promise<T>;
6763
- post<T = unknown>(path: string, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
6764
- put<T = unknown>(path: string, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
6765
- patch<T = unknown>(path: string, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
6766
- delete<T = unknown>(path: string, headers?: Record<string, string> | undefined): Promise<T>;
6767
- request<T = unknown>(path: string, method: Method, body?: unknown, headers?: Record<string, string> | undefined): Promise<T>;
6768
- download(path: string, method?: Method, body?: unknown, headers?: Record<string, string> | undefined): Promise<Response>;
6890
+ get<T = unknown>(path: string, headers?: Record<string, string>): Promise<T>;
6891
+ post<T = unknown>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
6892
+ put<T = unknown>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
6893
+ patch<T = unknown>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
6894
+ delete<T = unknown>(path: string, headers?: Record<string, string>): Promise<T>;
6895
+ request<T = unknown>(path: string, method: Method, body?: unknown, headers?: Record<string, string>): Promise<T>;
6896
+ download(path: string, method?: Method, body?: unknown, headers?: Record<string, string>): Promise<Response>;
6769
6897
  url(pathOrStrings: string | TemplateStringsArray, ...values: unknown[]): string;
6770
6898
  };
6771
6899
  /**
@@ -6780,21 +6908,28 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
6780
6908
  password: string;
6781
6909
  }) => Promise<{
6782
6910
  success: boolean;
6783
- token?: string | undefined;
6911
+ token?: string;
6784
6912
  user?: {
6785
6913
  id: string;
6786
6914
  email: string;
6787
- } | undefined;
6788
- expiresAt?: string | undefined;
6789
- error?: string | undefined;
6915
+ };
6916
+ expiresAt?: string;
6917
+ error?: string;
6790
6918
  }>;
6791
6919
  logout: () => Promise<void>;
6792
6920
  apiKeys: {
6793
6921
  create: (options?: {
6794
- name?: string | undefined;
6795
- expiresIn?: number | null | undefined;
6796
- permissions?: Record<string, string[]> | undefined;
6797
- } | undefined) => Promise<BetterAuthApiKeyResponse>;
6922
+ name?: string;
6923
+ expiresIn
6924
+ /**
6925
+ * Platform-wide achievements system.
6926
+ * - `list()` - Get all achievements
6927
+ * - `getUserAchievements()` - Get user's earned achievements
6928
+ * - `award(achievementId)` - Grant achievement to user
6929
+ */
6930
+ ?: number | null;
6931
+ permissions?: Record<string, string[]>;
6932
+ }) => Promise<BetterAuthApiKeyResponse>;
6798
6933
  list: () => Promise<BetterAuthApiKey[]>;
6799
6934
  revoke: (keyId: string) => Promise<void>;
6800
6935
  };
@@ -6811,198 +6946,143 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
6811
6946
  resumeGame: (gameId: string) => Promise<void>;
6812
6947
  };
6813
6948
  items: {
6814
- create: (props: {
6815
- id?: string | undefined;
6949
+ create: (props: InsertItemInput) => Promise<{
6950
+ gameId: string | null;
6951
+ id: string;
6816
6952
  slug: string;
6817
- gameId?: string | null | undefined;
6818
6953
  displayName: string;
6819
- description?: string | null | undefined;
6820
- type?: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade" | undefined;
6821
- isPlaceable?: boolean | undefined;
6822
- imageUrl?: string | null | undefined;
6823
- metadata?: Record<string, unknown> | undefined;
6824
- createdAt?: Date | undefined;
6825
- }) => Promise<{
6826
- createdAt: Date;
6827
6954
  description: string | null;
6828
- displayName: string;
6829
- gameId: string | null;
6830
- id: string;
6831
- imageUrl: string | null;
6955
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
6832
6956
  isPlaceable: boolean;
6957
+ imageUrl: string | null;
6833
6958
  metadata: unknown;
6834
- slug: string;
6835
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
6959
+ createdAt: Date;
6836
6960
  }>;
6837
6961
  get: (itemId: string) => Promise<{
6838
- createdAt: Date;
6839
- description: string | null;
6840
- displayName: string;
6841
6962
  gameId: string | null;
6842
6963
  id: string;
6843
- imageUrl: string | null;
6964
+ slug: string;
6965
+ displayName: string;
6966
+ description: string | null;
6967
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
6844
6968
  isPlaceable: boolean;
6969
+ imageUrl: string | null;
6845
6970
  metadata: unknown;
6846
- slug: string;
6847
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
6971
+ createdAt: Date;
6848
6972
  }>;
6849
6973
  list: () => Promise<{
6850
- createdAt: Date;
6851
- description: string | null;
6852
- displayName: string;
6853
6974
  gameId: string | null;
6854
6975
  id: string;
6855
- imageUrl: string | null;
6976
+ slug: string;
6977
+ displayName: string;
6978
+ description: string | null;
6979
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
6856
6980
  isPlaceable: boolean;
6981
+ imageUrl: string | null;
6857
6982
  metadata: unknown;
6858
- slug: string;
6859
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
6860
- }[]>;
6861
- update: (itemId: string, props: {
6862
- slug?: string | undefined;
6863
- gameId?: string | null | undefined;
6864
- displayName?: string | undefined;
6865
- description?: string | null | undefined;
6866
- type?: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade" | undefined;
6867
- isPlaceable?: boolean | undefined;
6868
- imageUrl?: string | null | undefined;
6869
- metadata?: Record<string, unknown> | undefined;
6870
- }) => Promise<{
6871
6983
  createdAt: Date;
6872
- description: string | null;
6873
- displayName: string;
6984
+ }[]>;
6985
+ update: (itemId: string, props: UpdateItemInput) => Promise<{
6874
6986
  gameId: string | null;
6875
6987
  id: string;
6876
- imageUrl: string | null;
6988
+ slug: string;
6989
+ displayName: string;
6990
+ description: string | null;
6991
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
6877
6992
  isPlaceable: boolean;
6993
+ imageUrl: string | null;
6878
6994
  metadata: unknown;
6879
- slug: string;
6880
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
6995
+ createdAt: Date;
6881
6996
  }>;
6882
6997
  delete: (itemId: string) => Promise<void>;
6883
6998
  };
6884
6999
  currencies: {
6885
- create: (props: {
6886
- id?: string | undefined;
6887
- itemId: string;
6888
- symbol?: string | null | undefined;
6889
- isPrimary: boolean;
6890
- createdAt?: Date | undefined;
6891
- updatedAt?: Date | null | undefined;
6892
- }) => Promise<{
6893
- createdAt: Date;
7000
+ create: (props: InsertCurrencyInput) => Promise<{
7001
+ symbol: string | null;
6894
7002
  id: string;
6895
- isPrimary: boolean;
7003
+ createdAt: Date;
6896
7004
  itemId: string;
6897
- symbol: string | null;
6898
7005
  updatedAt: Date | null;
7006
+ isPrimary: boolean;
6899
7007
  }>;
6900
7008
  get: (currencyId: string) => Promise<{
6901
- createdAt: Date;
7009
+ symbol: string | null;
6902
7010
  id: string;
6903
- isPrimary: boolean;
7011
+ createdAt: Date;
6904
7012
  itemId: string;
6905
- symbol: string | null;
6906
7013
  updatedAt: Date | null;
7014
+ isPrimary: boolean;
6907
7015
  }>;
6908
7016
  list: () => Promise<{
6909
- createdAt: Date;
7017
+ symbol: string | null;
6910
7018
  id: string;
6911
- isPrimary: boolean;
7019
+ createdAt: Date;
6912
7020
  itemId: string;
6913
- symbol: string | null;
6914
7021
  updatedAt: Date | null;
7022
+ isPrimary: boolean;
6915
7023
  }[]>;
6916
- update: (currencyId: string, props: {
6917
- itemId?: string | undefined;
6918
- symbol?: string | null | undefined;
6919
- isPrimary?: boolean | undefined;
6920
- }) => Promise<{
6921
- createdAt: Date;
7024
+ update: (currencyId: string, props: UpdateCurrencyInput) => Promise<{
7025
+ symbol: string | null;
6922
7026
  id: string;
6923
- isPrimary: boolean;
7027
+ createdAt: Date;
6924
7028
  itemId: string;
6925
- symbol: string | null;
6926
7029
  updatedAt: Date | null;
7030
+ isPrimary: boolean;
6927
7031
  }>;
6928
7032
  delete: (currencyId: string) => Promise<void>;
6929
7033
  };
6930
7034
  shopListings: {
6931
- create: (props: {
6932
- id?: string | undefined;
7035
+ create: (props: InsertShopListingInput) => Promise<{
7036
+ id: string;
7037
+ createdAt: Date;
6933
7038
  itemId: string;
7039
+ updatedAt: Date | null;
6934
7040
  currencyId: string;
6935
7041
  price: number;
6936
- sellBackPercentage?: number | null | undefined;
6937
- stock?: number | null | undefined;
7042
+ sellBackPercentage: number | null;
7043
+ stock: number | null;
6938
7044
  isActive: boolean;
6939
- availableFrom?: Date | null | undefined;
6940
- availableUntil?: Date | null | undefined;
6941
- createdAt?: Date | undefined;
6942
- updatedAt?: Date | null | undefined;
6943
- }) => Promise<{
6944
7045
  availableFrom: Date | null;
6945
7046
  availableUntil: Date | null;
6946
- createdAt: Date;
6947
- currencyId: string;
6948
- id: string;
6949
- isActive: boolean;
6950
- itemId: string;
6951
- price: number;
6952
- sellBackPercentage: number | null;
6953
- stock: number | null;
6954
- updatedAt: Date | null;
6955
7047
  }>;
6956
7048
  get: (listingId: string) => Promise<{
6957
- availableFrom: Date | null;
6958
- availableUntil: Date | null;
6959
- createdAt: Date;
6960
- currencyId: string;
6961
7049
  id: string;
6962
- isActive: boolean;
7050
+ createdAt: Date;
6963
7051
  itemId: string;
7052
+ updatedAt: Date | null;
7053
+ currencyId: string;
6964
7054
  price: number;
6965
7055
  sellBackPercentage: number | null;
6966
7056
  stock: number | null;
6967
- updatedAt: Date | null;
6968
- }>;
6969
- list: () => Promise<{
7057
+ isActive: boolean;
6970
7058
  availableFrom: Date | null;
6971
7059
  availableUntil: Date | null;
6972
- createdAt: Date;
6973
- currencyId: string;
7060
+ }>;
7061
+ list: () => Promise<{
6974
7062
  id: string;
6975
- isActive: boolean;
7063
+ createdAt: Date;
6976
7064
  itemId: string;
7065
+ updatedAt: Date | null;
7066
+ currencyId: string;
6977
7067
  price: number;
6978
7068
  sellBackPercentage: number | null;
6979
7069
  stock: number | null;
6980
- updatedAt: Date | null;
6981
- }[]>;
6982
- update: (listingId: string, props: {
6983
- id?: string | undefined;
6984
- itemId?: string | undefined;
6985
- currencyId?: string | undefined;
6986
- price?: number | undefined;
6987
- sellBackPercentage?: number | null | undefined;
6988
- stock?: number | null | undefined;
6989
- isActive?: boolean | undefined;
6990
- availableFrom?: Date | null | undefined;
6991
- availableUntil?: Date | null | undefined;
6992
- createdAt?: Date | undefined;
6993
- updatedAt?: Date | null | undefined;
6994
- }) => Promise<{
7070
+ isActive: boolean;
6995
7071
  availableFrom: Date | null;
6996
7072
  availableUntil: Date | null;
6997
- createdAt: Date;
6998
- currencyId: string;
7073
+ }[]>;
7074
+ update: (listingId: string, props: UpdateShopListingInput) => Promise<{
6999
7075
  id: string;
7000
- isActive: boolean;
7076
+ createdAt: Date;
7001
7077
  itemId: string;
7078
+ updatedAt: Date | null;
7079
+ currencyId: string;
7002
7080
  price: number;
7003
7081
  sellBackPercentage: number | null;
7004
7082
  stock: number | null;
7005
- updatedAt: Date | null;
7083
+ isActive: boolean;
7084
+ availableFrom: Date | null;
7085
+ availableUntil: Date | null;
7006
7086
  }>;
7007
7087
  delete: (listingId: string) => Promise<void>;
7008
7088
  };
@@ -7016,31 +7096,17 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7016
7096
  dev: {
7017
7097
  status: {
7018
7098
  apply: () => Promise<void>;
7019
- get: () => Promise<DeveloperStatusEnumType>;
7099
+ get: () => Promise<DeveloperStatusValue>;
7020
7100
  };
7021
7101
  games: {
7022
7102
  deploy: (slug: string, options: {
7023
- metadata?: {
7024
- displayName: string;
7025
- mapElementId?: string | null | undefined;
7026
- platform: "godot" | "unity" | "web";
7027
- metadata: Record<string, unknown>;
7028
- gameType: "external" | "hosted";
7029
- externalUrl?: string | undefined;
7030
- } | undefined;
7031
- file?: Blob | File | null | undefined;
7032
- backend?: BackendDeploymentBundle | undefined;
7033
- hooks?: DevUploadHooks | undefined;
7034
- }) => Promise<Game>;
7035
- seed: (slug: string, code: string, environment?: "production" | "staging" | undefined, secrets?: Record<string, string> | undefined) => Promise<SeedResponse>;
7036
- upsert: (slug: string, metadata: {
7037
- displayName: string;
7038
- mapElementId?: string | null | undefined;
7039
- platform: "godot" | "unity" | "web";
7040
- metadata: Record<string, unknown>;
7041
- gameType: "external" | "hosted";
7042
- externalUrl?: string | undefined;
7103
+ metadata?: UpsertGameMetadataInput;
7104
+ file?: File | Blob | null;
7105
+ backend?: BackendDeploymentBundle;
7106
+ hooks?: DevUploadHooks;
7043
7107
  }) => Promise<Game>;
7108
+ seed: (slug: string, code: string, environment?: "staging" | "production", secrets?: Record<string, string>) => Promise<SeedResponse>;
7109
+ upsert: (slug: string, metadata: UpsertGameMetadataInput) => Promise<Game>;
7044
7110
  delete: (gameId: string) => Promise<void>;
7045
7111
  secrets: {
7046
7112
  set: (slug: string, secrets: Record<string, string>) => Promise<string[]>;
@@ -7051,7 +7117,7 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7051
7117
  reset: (slug: string, schema?: {
7052
7118
  sql: string;
7053
7119
  hash: string;
7054
- } | undefined) => Promise<{
7120
+ }) => Promise<{
7055
7121
  success: boolean;
7056
7122
  deploymentId: string;
7057
7123
  resetAt: string;
@@ -7059,13 +7125,13 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7059
7125
  }>;
7060
7126
  };
7061
7127
  bucket: {
7062
- list: (slug: string, prefix?: string | undefined) => Promise<BucketFile[]>;
7128
+ list: (slug: string, prefix?: string) => Promise<BucketFile[]>;
7063
7129
  get: (slug: string, key: string) => Promise<ArrayBuffer>;
7064
- put: (slug: string, key: string, content: ArrayBuffer | Blob | Uint8Array<ArrayBufferLike>, contentType?: string | undefined) => Promise<void>;
7130
+ put: (slug: string, key: string, content: Blob | ArrayBuffer | Uint8Array, contentType?: string) => Promise<void>;
7065
7131
  delete: (slug: string, key: string) => Promise<void>;
7066
7132
  };
7067
7133
  kv: {
7068
- list: (slug: string, prefix?: string | undefined) => Promise<KVKeyEntry[]>;
7134
+ list: (slug: string, prefix?: string) => Promise<KVKeyEntry[]>;
7069
7135
  get: (slug: string, key: string) => Promise<string | null>;
7070
7136
  set: (slug: string, key: string, value: string) => Promise<void>;
7071
7137
  delete: (slug: string, key: string) => Promise<void>;
@@ -7077,177 +7143,30 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7077
7143
  domains: {
7078
7144
  add: (slug: string, hostname: string) => Promise<GameCustomHostname>;
7079
7145
  list: (slug: string) => Promise<GameCustomHostname[]>;
7080
- status: (slug: string, hostname: string, refresh?: boolean | undefined) => Promise<GameCustomHostname>;
7146
+ status: (slug: string, hostname: string, refresh?: boolean) => Promise<GameCustomHostname>;
7081
7147
  delete: (slug: string, hostname: string) => Promise<void>;
7082
7148
  };
7083
7149
  logs: {
7084
- getToken: (slug: string, environment: "production" | "staging") => Promise<{
7150
+ getToken: (slug: string, environment: "staging" | "production") => Promise<{
7085
7151
  token: string;
7086
7152
  workerId: string;
7087
7153
  }>;
7088
7154
  };
7089
7155
  };
7090
7156
  items: {
7091
- create: (gameId: string, slug: string, itemData: Omit<{
7092
- id?: string | undefined;
7093
- slug: string;
7094
- gameId?: string | null | undefined;
7095
- displayName: string;
7096
- description?: string | null | undefined;
7097
- type?: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade" | undefined;
7098
- isPlaceable?: boolean | undefined;
7099
- imageUrl?: string | null | undefined;
7100
- metadata?: Record<string, unknown> | undefined;
7101
- createdAt?: Date | undefined;
7102
- }, "gameId" | "slug">) => Promise<{
7103
- createdAt: Date;
7104
- description: string | null;
7105
- displayName: string;
7106
- gameId: string | null;
7107
- id: string;
7108
- imageUrl: string | null;
7109
- isPlaceable: boolean;
7110
- metadata: unknown;
7111
- slug: string;
7112
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
7113
- }>;
7114
- update: (gameId: string, itemId: string, updates: {
7115
- slug?: string | undefined;
7116
- gameId?: string | null | undefined;
7117
- displayName?: string | undefined;
7118
- description?: string | null | undefined;
7119
- type?: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade" | undefined;
7120
- isPlaceable?: boolean | undefined;
7121
- imageUrl?: string | null | undefined;
7122
- metadata?: Record<string, unknown> | undefined;
7123
- }) => Promise<{
7124
- createdAt: Date;
7125
- description: string | null;
7126
- displayName: string;
7127
- gameId: string | null;
7128
- id: string;
7129
- imageUrl: string | null;
7130
- isPlaceable: boolean;
7131
- metadata: unknown;
7132
- slug: string;
7133
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
7134
- }>;
7135
- list: (gameId: string) => Promise<{
7136
- createdAt: Date;
7137
- description: string | null;
7138
- displayName: string;
7139
- gameId: string | null;
7140
- id: string;
7141
- imageUrl: string | null;
7142
- isPlaceable: boolean;
7143
- metadata: unknown;
7144
- slug: string;
7145
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
7146
- }[]>;
7147
- get: (gameId: string, slug: string) => Promise<{
7148
- createdAt: Date;
7149
- description: string | null;
7150
- displayName: string;
7151
- gameId: string | null;
7152
- id: string;
7153
- imageUrl: string | null;
7154
- isPlaceable: boolean;
7155
- metadata: unknown;
7156
- slug: string;
7157
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
7158
- }>;
7157
+ create: (gameId: string, slug: string, itemData: Omit<InsertItemInput, "slug" | "gameId">) => Promise<ItemRow>;
7158
+ update: (gameId: string, itemId: string, updates: UpdateItemInput) => Promise<ItemRow>;
7159
+ list: (gameId: string) => Promise<Array<ItemRow>>;
7160
+ get: (gameId: string, slug: string) => Promise<ItemRow>;
7159
7161
  delete: (gameId: string, itemId: string) => Promise<void>;
7160
7162
  shop: {
7161
- create: (gameId: string, itemId: string, listingData: Omit<{
7162
- id?: string | undefined;
7163
- itemId: string;
7164
- currencyId: string;
7165
- price: number;
7166
- sellBackPercentage?: number | null | undefined;
7167
- stock?: number | null | undefined;
7168
- isActive: boolean;
7169
- availableFrom?: Date | null | undefined;
7170
- availableUntil?: Date | null | undefined;
7171
- createdAt?: Date | undefined;
7172
- updatedAt?: Date | null | undefined;
7173
- }, "itemId">) => Promise<{
7174
- availableFrom: Date | null;
7175
- availableUntil: Date | null;
7176
- createdAt: Date;
7177
- currencyId: string;
7178
- id: string;
7179
- isActive: boolean;
7180
- itemId: string;
7181
- price: number;
7182
- sellBackPercentage: number | null;
7183
- stock: number | null;
7184
- updatedAt: Date | null;
7185
- }>;
7186
- get: (gameId: string, itemId: string) => Promise<{
7187
- availableFrom: Date | null;
7188
- availableUntil: Date | null;
7189
- createdAt: Date;
7190
- currencyId: string;
7191
- id: string;
7192
- isActive: boolean;
7193
- itemId: string;
7194
- price: number;
7195
- sellBackPercentage: number | null;
7196
- stock: number | null;
7197
- updatedAt: Date | null;
7198
- } | null>;
7199
- update: (gameId: string, itemId: string, updates: {
7200
- id?: string | undefined;
7201
- itemId?: string | undefined;
7202
- currencyId?: string | undefined;
7203
- price?: number | undefined;
7204
- sellBackPercentage?: number | null | undefined;
7205
- stock?: number | null | undefined;
7206
- isActive?: boolean | undefined;
7207
- availableFrom?: Date | null | undefined;
7208
- availableUntil?: Date | null | undefined;
7209
- createdAt?: Date | undefined;
7210
- updatedAt?: Date | null | undefined;
7211
- }) => Promise<{
7212
- availableFrom: Date | null;
7213
- availableUntil: Date | null;
7214
- createdAt: Date;
7215
- currencyId: string;
7216
- id: string;
7217
- isActive: boolean;
7218
- itemId: string;
7219
- price: number;
7220
- sellBackPercentage: number | null;
7221
- stock: number | null;
7222
- updatedAt: Date | null;
7223
- }>;
7163
+ create: (gameId: string, itemId: string, listingData: Omit<InsertShopListingInput, "itemId">) => Promise<ShopListingRow>;
7164
+ get: (gameId: string, itemId: string) => Promise<ShopListingRow | null>;
7165
+ update: (gameId: string, itemId: string, updates: UpdateShopListingInput) => Promise<ShopListingRow>;
7224
7166
  delete: (gameId: string, itemId: string) => Promise<void>;
7225
- list: (gameId: string) => Promise<({
7226
- availableFrom: Date | null;
7227
- availableUntil: Date | null;
7228
- createdAt: Date;
7229
- currencyId: string;
7230
- id: string;
7231
- isActive: boolean;
7232
- itemId: string;
7233
- price: number;
7234
- sellBackPercentage: number | null;
7235
- stock: number | null;
7236
- updatedAt: Date | null;
7237
- } & {
7238
- item: {
7239
- createdAt: Date;
7240
- description: string | null;
7241
- displayName: string;
7242
- gameId: string | null;
7243
- id: string;
7244
- imageUrl: string | null;
7245
- isPlaceable: boolean;
7246
- metadata: unknown;
7247
- slug: string;
7248
- type: "accessory" | "badge" | "collectible" | "consumable" | "currency" | "other" | "trophy" | "unlock" | "upgrade";
7249
- };
7250
- })[]>;
7167
+ list: (gameId: string) => Promise<Array<ShopListingRow & {
7168
+ item: ItemRow;
7169
+ }>>;
7251
7170
  };
7252
7171
  };
7253
7172
  };
@@ -7259,21 +7178,21 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7259
7178
  * - `getGameToken(gameId)` - Get short-lived game auth token
7260
7179
  */
7261
7180
  games: {
7262
- fetch: (gameIdOrSlug: string, options?: TTLCacheConfig | undefined) => Promise<FetchedGame>;
7263
- list: (options?: TTLCacheConfig | undefined) => Promise<Game[]>;
7181
+ fetch: (gameIdOrSlug: string, options?: TTLCacheConfig) => Promise<FetchedGame>;
7182
+ list: (options?: TTLCacheConfig) => Promise<Array<Game>>;
7264
7183
  getSubjects: () => Promise<Record<string, string | null>>;
7265
- startSession: (gameId?: string | undefined) => Promise<StartSessionResponse>;
7266
- endSession: (sessionId: string, gameId?: string | undefined) => Promise<void>;
7184
+ startSession: (gameId?: string) => Promise<StartSessionResponse>;
7185
+ endSession: (sessionId: string, gameId?: string) => Promise<void>;
7267
7186
  token: {
7268
7187
  create: (gameId: string, options?: {
7269
- apply?: boolean | undefined;
7270
- } | undefined) => Promise<GameTokenResponse>;
7188
+ apply?: boolean;
7189
+ }) => Promise<GameTokenResponse>;
7271
7190
  };
7272
7191
  leaderboard: {
7273
7192
  get: (gameId: string, options?: {
7274
- limit?: number | undefined;
7275
- offset?: number | undefined;
7276
- } | undefined) => Promise<LeaderboardEntry[]>;
7193
+ limit?: number;
7194
+ offset?: number;
7195
+ }) => Promise<LeaderboardEntry[]>;
7277
7196
  };
7278
7197
  };
7279
7198
  /**
@@ -7282,34 +7201,20 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7282
7201
  * - `update(config)` - Update avatar appearance
7283
7202
  */
7284
7203
  character: {
7285
- get: (userId?: string | undefined) => Promise<PlayerCharacterRow | null>;
7204
+ get: (userId?: string) => Promise<PlayerCharacterRow | null>;
7286
7205
  create: (characterData: CreateCharacterData) => Promise<PlayerCharacterRow>;
7287
7206
  update: (updates: UpdateCharacterData) => Promise<PlayerCharacterRow>;
7288
7207
  components: {
7289
- list: (options?: (CharacterComponentsOptions & TTLCacheConfig) | undefined) => Promise<CharacterComponentWithSpriteUrl[]>;
7290
- clearCache: (key?: string | undefined) => void;
7208
+ list: (options?: CharacterComponentsOptions & TTLCacheConfig) => Promise<CharacterComponentWithSpriteUrl[]>;
7209
+ clearCache: (key?: string) => void;
7291
7210
  getCacheKeys: () => string[];
7292
7211
  };
7293
7212
  accessories: {
7294
- equip: (slot: string, componentId: string) => Promise<{
7295
- accessoryComponentId: string;
7296
- equippedAt: Date;
7297
- id: string;
7298
- playerCharacterId: string;
7299
- slot: string;
7300
- updatedAt: Date;
7301
- }>;
7213
+ equip: (slot: string, componentId: string) => Promise<PlayerCharacterAccessoryRow>;
7302
7214
  remove: (slot: string) => Promise<{
7303
7215
  success: boolean;
7304
7216
  }>;
7305
- list: () => Promise<{
7306
- accessoryComponentId: string;
7307
- equippedAt: Date;
7308
- id: string;
7309
- playerCharacterId: string;
7310
- slot: string;
7311
- updatedAt: Date;
7312
- }[]>;
7217
+ list: () => Promise<PlayerCharacterAccessoryRow[]>;
7313
7218
  };
7314
7219
  };
7315
7220
  /**
@@ -7319,11 +7224,11 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7319
7224
  * - `award(achievementId)` - Grant achievement to user
7320
7225
  */
7321
7226
  achievements: {
7322
- list: (options?: TTLCacheConfig | undefined) => Promise<AchievementCurrent[]>;
7227
+ list: (options?: TTLCacheConfig) => Promise<AchievementCurrent[]>;
7323
7228
  history: {
7324
7229
  list: (queryOptions?: {
7325
- limit?: number | undefined;
7326
- } | undefined, cacheOptions?: TTLCacheConfig | undefined) => Promise<AchievementHistoryEntry[]>;
7230
+ limit?: number;
7231
+ }, cacheOptions?: TTLCacheConfig) => Promise<AchievementHistoryEntry[]>;
7327
7232
  };
7328
7233
  progress: {
7329
7234
  submit: (achievementId: string) => Promise<AchievementProgressResponse>;
@@ -7335,7 +7240,7 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7335
7240
  * - `submit(leaderboardId, score)` - Submit score to leaderboard
7336
7241
  */
7337
7242
  leaderboard: {
7338
- fetch: (options?: LeaderboardOptions | undefined) => Promise<GameLeaderboardEntry[]>;
7243
+ fetch: (options?: LeaderboardOptions) => Promise<GameLeaderboardEntry[]>;
7339
7244
  getUserRank: (gameId: string, userId: string) => Promise<UserRank | null>;
7340
7245
  };
7341
7246
  /**
@@ -7344,36 +7249,16 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7344
7249
  * - `addXp(amount)` - Award XP to user
7345
7250
  */
7346
7251
  levels: {
7347
- get: () => Promise<{
7348
- createdAt: Date;
7349
- currentLevel: number;
7350
- currentXp: number;
7351
- lastLevelUpAt: Date | null;
7352
- totalXP: number;
7353
- updatedAt: Date | null;
7354
- userId: string;
7355
- }>;
7356
- progress: (options?: CooldownCacheConfig | undefined) => Promise<{
7252
+ get: () => Promise<UserLevelRow>;
7253
+ progress: (options?: CooldownCacheConfig) => Promise<{
7357
7254
  level: number;
7358
7255
  currentXp: number;
7359
7256
  xpToNextLevel: number;
7360
7257
  totalXP: number;
7361
7258
  }>;
7362
7259
  config: {
7363
- list: () => Promise<{
7364
- createdAt: Date;
7365
- creditsReward: number;
7366
- id: string;
7367
- level: number;
7368
- xpRequired: number;
7369
- }[]>;
7370
- get: (level: number) => Promise<{
7371
- createdAt: Date;
7372
- creditsReward: number;
7373
- id: string;
7374
- level: number;
7375
- xpRequired: number;
7376
- } | null>;
7260
+ list: () => Promise<LevelConfigRow[]>;
7261
+ get: (level: number) => Promise<LevelConfigRow | null>;
7377
7262
  };
7378
7263
  };
7379
7264
  /**
@@ -7391,108 +7276,23 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7391
7276
  */
7392
7277
  notifications: {
7393
7278
  list: (queryOptions?: {
7394
- status?: NotificationStatus | undefined;
7395
- type?: NotificationType | undefined;
7396
- limit?: number | undefined;
7397
- offset?: number | undefined;
7398
- } | undefined, cacheOptions?: TTLCacheConfig | undefined) => Promise<{
7399
- clickUrl: string | null;
7400
- clickedAt: Date | null;
7401
- createdAt: Date;
7402
- data: unknown;
7403
- deliveredAt: Date | null;
7404
- expiresAt: Date | null;
7405
- id: string;
7406
- message: string;
7407
- metadata: unknown;
7408
- method: string | null;
7409
- priority: "high" | "low" | "normal" | "urgent";
7410
- seenAt: Date | null;
7411
- status: "clicked" | "delivered" | "dismissed" | "expired" | "pending" | "seen";
7412
- title: string;
7413
- type: string;
7414
- userId: string;
7415
- }[]>;
7416
- markAsSeen: (notificationId: string) => Promise<{
7417
- clickUrl: string | null;
7418
- clickedAt: Date | null;
7419
- createdAt: Date;
7420
- data: unknown;
7421
- deliveredAt: Date | null;
7422
- expiresAt: Date | null;
7423
- id: string;
7424
- message: string;
7425
- metadata: unknown;
7426
- method: string | null;
7427
- priority: "high" | "low" | "normal" | "urgent";
7428
- seenAt: Date | null;
7429
- status: "clicked" | "delivered" | "dismissed" | "expired" | "pending" | "seen";
7430
- title: string;
7431
- type: string;
7432
- userId: string;
7433
- }>;
7434
- markAsClicked: (notificationId: string) => Promise<{
7435
- clickUrl: string | null;
7436
- clickedAt: Date | null;
7437
- createdAt: Date;
7438
- data: unknown;
7439
- deliveredAt: Date | null;
7440
- expiresAt: Date | null;
7441
- id: string;
7442
- message: string;
7443
- metadata: unknown;
7444
- method: string | null;
7445
- priority: "high" | "low" | "normal" | "urgent";
7446
- seenAt: Date | null;
7447
- status: "clicked" | "delivered" | "dismissed" | "expired" | "pending" | "seen";
7448
- title: string;
7449
- type: string;
7450
- userId: string;
7451
- }>;
7452
- dismiss: (notificationId: string) => Promise<{
7453
- clickUrl: string | null;
7454
- clickedAt: Date | null;
7455
- createdAt: Date;
7456
- data: unknown;
7457
- deliveredAt: Date | null;
7458
- expiresAt: Date | null;
7459
- id: string;
7460
- message: string;
7461
- metadata: unknown;
7462
- method: string | null;
7463
- priority: "high" | "low" | "normal" | "urgent";
7464
- seenAt: Date | null;
7465
- status: "clicked" | "delivered" | "dismissed" | "expired" | "pending" | "seen";
7466
- title: string;
7467
- type: string;
7468
- userId: string;
7469
- }>;
7470
- markAsDelivered: (notificationId: string, method?: NotificationMethod) => Promise<{
7471
- clickUrl: string | null;
7472
- clickedAt: Date | null;
7473
- createdAt: Date;
7474
- data: unknown;
7475
- deliveredAt: Date | null;
7476
- expiresAt: Date | null;
7477
- id: string;
7478
- message: string;
7479
- metadata: unknown;
7480
- method: string | null;
7481
- priority: "high" | "low" | "normal" | "urgent";
7482
- seenAt: Date | null;
7483
- status: "clicked" | "delivered" | "dismissed" | "expired" | "pending" | "seen";
7484
- title: string;
7485
- type: string;
7486
- userId: string;
7487
- }>;
7279
+ status?: NotificationStatus;
7280
+ type?: NotificationType;
7281
+ limit?: number;
7282
+ offset?: number;
7283
+ }, cacheOptions?: TTLCacheConfig) => Promise<NotificationRow[]>;
7284
+ markAsSeen: (notificationId: string) => Promise<NotificationRow>;
7285
+ markAsClicked: (notificationId: string) => Promise<NotificationRow>;
7286
+ dismiss: (notificationId: string) => Promise<NotificationRow>;
7287
+ markAsDelivered: (notificationId: string, method?: NotificationMethod) => Promise<NotificationRow>;
7488
7288
  deliverPending: () => Promise<{
7489
7289
  success: boolean;
7490
7290
  }>;
7491
7291
  stats: {
7492
7292
  get: (queryOptions?: {
7493
- from?: string | undefined;
7494
- to?: string | undefined;
7495
- } | undefined, cacheOptions?: TTLCacheConfig | undefined) => Promise<NotificationStats>;
7293
+ from?: string;
7294
+ to?: string;
7295
+ }, cacheOptions?: TTLCacheConfig) => Promise<NotificationStats>;
7496
7296
  };
7497
7297
  };
7498
7298
  /**
@@ -7501,8 +7301,8 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7501
7301
  * - `unlock(areaId)` - Unlock a new map area
7502
7302
  */
7503
7303
  maps: {
7504
- get: (identifier: string, options?: TTLCacheConfig | undefined) => Promise<MapData>;
7505
- elements: (mapId: string, options?: TTLCacheConfig | undefined) => Promise<MapElementWithGame[]>;
7304
+ get: (identifier: string, options?: TTLCacheConfig) => Promise<MapData>;
7305
+ elements: (mapId: string, options?: TTLCacheConfig) => Promise<MapElementWithGame[]>;
7506
7306
  objects: {
7507
7307
  list: (mapId: string) => Promise<MapObjectWithItem[]>;
7508
7308
  create: (mapId: string, objectData: CreateMapObjectData) => Promise<MapObjectWithItem>;
@@ -7533,10 +7333,10 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7533
7333
  * - `getByUser(userId)` - Get all scores for a user
7534
7334
  */
7535
7335
  scores: {
7536
- submit: (gameId: string, score: number, metadata?: Record<string, unknown> | undefined) => Promise<ScoreSubmission>;
7537
7336
  getByUser: (gameId: string, userId: string, options?: {
7538
- limit?: number | undefined;
7539
- } | undefined) => Promise<UserScore[]>;
7337
+ limit?: number;
7338
+ }) => Promise<UserScore[]>;
7339
+ submit: (gameId: string, score: number, metadata?: Record<string, unknown>) => Promise<ScoreSubmission>;
7540
7340
  };
7541
7341
  /**
7542
7342
  * TimeBack integration for user context, XP tracking, and course management.
@@ -7557,9 +7357,9 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7557
7357
  timeback: {
7558
7358
  readonly user: PlatformTimebackUser;
7559
7359
  populateStudent: (names?: {
7560
- firstName?: string | undefined;
7561
- lastName?: string | undefined;
7562
- } | undefined) => Promise<PopulateStudentResponse>;
7360
+ firstName?: string;
7361
+ lastName?: string;
7362
+ }) => Promise<PopulateStudentResponse>;
7563
7363
  startActivity: (_metadata: ActivityData) => void;
7564
7364
  pauseActivity: () => void;
7565
7365
  resumeActivity: () => void;
@@ -7569,71 +7369,26 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7569
7369
  verify: (gameId: string) => Promise<TimebackVerifyAllResponse>;
7570
7370
  cleanup: (gameId: string) => Promise<void>;
7571
7371
  get: (gameId: string) => Promise<GameTimebackIntegration[]>;
7572
- getConfig: (gameId: string) => Promise<{
7573
- organization: {
7574
- name: string;
7575
- type: string;
7576
- identifier: string;
7577
- };
7578
- course: {
7579
- title: string;
7580
- subjects: string[];
7581
- grades: number[];
7582
- courseCode: string;
7583
- level: string;
7584
- gradingScheme: string;
7585
- metadata?: Record<string, unknown> | undefined;
7586
- };
7587
- component: {
7588
- title: string;
7589
- sortOrder: number;
7590
- prerequisites: string[];
7591
- prerequisiteCriteria: string;
7592
- };
7593
- resource: {
7594
- title: string;
7595
- vendorResourceId: string;
7596
- vendorId: string;
7597
- applicationId: string;
7598
- roles: string[];
7599
- importance: string;
7600
- metadata: {
7601
- [key: string]: unknown;
7602
- type?: string | undefined;
7603
- launchUrl?: string | undefined;
7604
- toolProvider?: string | undefined;
7605
- instructionalMethod?: string | undefined;
7606
- subject?: string | undefined;
7607
- grades?: number[] | undefined;
7608
- language?: string | undefined;
7609
- xp?: number | undefined;
7610
- };
7611
- };
7612
- componentResource: {
7613
- title: string;
7614
- sortOrder: number;
7615
- lessonType: string | null;
7616
- };
7617
- }>;
7372
+ getConfig: (gameId: string) => Promise<TimebackSetupRequest["config"]>;
7618
7373
  };
7619
7374
  xp: {
7620
7375
  today: (options?: {
7621
- date?: string | undefined;
7622
- timezone?: string | undefined;
7623
- } | undefined) => Promise<TodayXpResponse>;
7376
+ date?: string;
7377
+ timezone?: string;
7378
+ }) => Promise<TodayXpResponse>;
7624
7379
  total: () => Promise<TotalXpResponse>;
7625
7380
  history: (options?: {
7626
- startDate?: string | undefined;
7627
- endDate?: string | undefined;
7628
- } | undefined) => Promise<XpHistoryResponse>;
7381
+ startDate?: string;
7382
+ endDate?: string;
7383
+ }) => Promise<XpHistoryResponse>;
7629
7384
  summary: (options?: {
7630
- date?: string | undefined;
7631
- timezone?: string | undefined;
7632
- } | undefined) => Promise<XpSummaryResponse>;
7385
+ date?: string;
7386
+ timezone?: string;
7387
+ }) => Promise<XpSummaryResponse>;
7633
7388
  };
7634
7389
  students: {
7635
- get: (timebackId: string, options?: TTLCacheConfig | undefined) => Promise<PlatformTimebackUserContext>;
7636
- clearCache: (timebackId?: string | undefined) => void;
7390
+ get: (timebackId: string, options?: TTLCacheConfig) => Promise<PlatformTimebackUserContext>;
7391
+ clearCache: (timebackId?: string) => void;
7637
7392
  };
7638
7393
  };
7639
7394
  /** Auto-initializes a PlaycademyInternalClient with context from the environment */
@@ -7647,4 +7402,4 @@ declare class PlaycademyInternalClient extends PlaycademyBaseClient {
7647
7402
  }
7648
7403
 
7649
7404
  export { AchievementCompletionType, ApiError, ConnectionManager, ConnectionMonitor, MessageEvents, NotificationStatus, NotificationType, PlaycademyInternalClient as PlaycademyClient, PlaycademyError, PlaycademyInternalClient, extractApiErrorInfo, messaging };
7650
- export type { AchievementCurrent, AchievementHistoryEntry, AchievementProgressResponse, AchievementScopeType, AchievementWithStatus, ApiErrorCode, ApiErrorInfo, AuthCallbackPayload, AuthOptions, AuthProviderType, AuthResult, AuthServerMessage, AuthStateChangePayload, AuthStateUpdate, AuthenticatedUser, BetterAuthApiKey, BetterAuthApiKeyResponse, BetterAuthSignInResponse, BucketFile, CharacterComponentRow as CharacterComponent, CharacterComponentType, CharacterComponentWithSpriteUrl, CharacterComponentsOptions, ClientConfig, ClientEvents, ConnectionMonitorConfig, ConnectionState, ConnectionStatePayload, CreateCharacterData, CreateMapObjectData, CurrencyRow as Currency, DevUploadEvent, DevUploadHooks, DeveloperStatusEnumType, DeveloperStatusResponse, DeveloperStatusValue, DisconnectContext, DisconnectHandler, DisplayAlertPayload, ErrorResponseBody, EventListeners, ExternalGame, FetchedGame, Game, GameContextPayload, GameCustomHostname, GameInitUser, GameLeaderboardEntry, MapRow as GameMap, GamePlatform, GameRow as GameRecord, GameSessionRow as GameSession, GameTimebackIntegration, GameTokenResponse, GameType, GameUser, HostedGame, InitPayload, InsertCurrencyInput, InsertItemInput, InsertShopListingInput, InteractionType, InventoryItemRow as InventoryItem, InventoryItemWithItem, InventoryMutationResponse, ItemRow as Item, ItemType, KVKeyEntry, KVKeyMetadata, KVSeedEntry, KVStatsResponse, KeyEventPayload, LeaderboardEntry, LeaderboardOptions, LeaderboardTimeframe, LevelConfigRow as LevelConfig, LevelProgressResponse, LevelUpCheckResult, LoginResponse, ManifestV1, MapData, MapElementRow as MapElement, MapElementMetadata, MapElementWithGame, MapObjectRow as MapObject, MapObjectWithItem, NotificationRow as Notification, NotificationStats, PlaceableItemMetadata, PlatformTimebackUser, PlatformTimebackUserContext, PlaycademyServerClientConfig, PlaycademyServerClientState, PlayerCharacterRow as PlayerCharacter, PlayerCharacterAccessoryRow as PlayerCharacterAccessory, PlayerCurrency, PlayerInventoryItem, PlayerProfile, PlayerSessionPayload, PopulateStudentResponse, RealtimeTokenResponse, ScoreSubmission, ShopCurrency, ShopDisplayItem, ShopListingRow as ShopListing, ShopViewResponse, SpriteAnimationFrame, SpriteConfigWithDimensions, SpriteTemplateRow as SpriteTemplate, SpriteTemplateData, StartSessionResponse, TelemetryPayload, TimebackEnrollment, TimebackInitContext, TimebackOrganization, TimebackUser, TimebackUserContext, TodayXpResponse, TokenRefreshPayload, TokenType, TotalXpResponse, UpdateCharacterData, UpdateCurrencyInput, UpdateItemInput, UpdateShopListingInput, UpsertGameMetadataInput, UserRow as User, UserEnrollment, UserInfo, UserLevelRow as UserLevel, UserLevelWithConfig, UserOrganization, UserRank, UserRankResponse, UserRoleEnumType, UserScore, UserTimebackData, XPAddResult, XpHistoryResponse, XpSummaryResponse };
7405
+ export type { AchievementCurrent, AchievementHistoryEntry, AchievementProgressResponse, AchievementScopeType, AchievementWithStatus, ApiErrorCode, ApiErrorInfo, AuthCallbackPayload, AuthOptions, AuthProviderType, AuthResult, AuthServerMessage, AuthStateChangePayload, AuthStateUpdate, AuthenticatedUser, BetterAuthApiKey, BetterAuthApiKeyResponse, BetterAuthSignInResponse, BucketFile, CharacterComponentRow as CharacterComponent, CharacterComponentType, CharacterComponentWithSpriteUrl, CharacterComponentsOptions, ClientConfig, ClientEvents, ConnectionMonitorConfig, ConnectionState, ConnectionStatePayload, CourseXp, CreateCharacterData, CreateMapObjectData, CurrencyRow as Currency, DevUploadEvent, DevUploadHooks, DeveloperStatusEnumType, DeveloperStatusResponse, DeveloperStatusValue, DisconnectContext, DisconnectHandler, DisplayAlertPayload, ErrorResponseBody, EventListeners, ExternalGame, FetchedGame, Game, GameContextPayload, GameCustomHostname, GameInitUser, GameLeaderboardEntry, MapRow as GameMap, GamePlatform, GameRow as GameRecord, GameSessionRow as GameSession, GameTimebackIntegration, GameTokenResponse, GameType, GameUser, GetXpOptions, HostedGame, InitPayload, InsertCurrencyInput, InsertItemInput, InsertShopListingInput, InteractionType, InventoryItemRow as InventoryItem, InventoryItemWithItem, InventoryMutationResponse, ItemRow as Item, ItemType, KVKeyEntry, KVKeyMetadata, KVSeedEntry, KVStatsResponse, KeyEventPayload, LeaderboardEntry, LeaderboardOptions, LeaderboardTimeframe, LevelConfigRow as LevelConfig, LevelProgressResponse, LevelUpCheckResult, LoginResponse, ManifestV1, MapData, MapElementRow as MapElement, MapElementMetadata, MapElementWithGame, MapObjectRow as MapObject, MapObjectWithItem, NotificationRow as Notification, NotificationStats, PlaceableItemMetadata, PlatformTimebackUser, PlatformTimebackUserContext, PlaycademyServerClientConfig, PlaycademyServerClientState, PlayerCharacterRow as PlayerCharacter, PlayerCharacterAccessoryRow as PlayerCharacterAccessory, PlayerCurrency, PlayerInventoryItem, PlayerProfile, PlayerSessionPayload, PopulateStudentResponse, RealtimeTokenResponse, ScoreSubmission, ShopCurrency, ShopDisplayItem, ShopListingRow as ShopListing, ShopViewResponse, SpriteAnimationFrame, SpriteConfigWithDimensions, SpriteTemplateRow as SpriteTemplate, SpriteTemplateData, StartSessionResponse, TelemetryPayload, TimebackEnrollment, TimebackInitContext, TimebackOrganization, TimebackUser, TimebackUserContext, TimebackUserXp, TodayXpResponse, TokenRefreshPayload, TokenType, TotalXpResponse, UpdateCharacterData, UpdateCurrencyInput, UpdateItemInput, UpdateShopListingInput, UpsertGameMetadataInput, UserRow as User, UserEnrollment, UserInfo, UserLevelRow as UserLevel, UserLevelWithConfig, UserOrganization, UserRank, UserRankResponse, UserRoleEnumType, UserScore, UserTimebackData, XPAddResult, XpHistoryResponse, XpResponse, XpSummaryResponse };