@playcademy/sdk 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
4
4
  import * as drizzle_zod from 'drizzle-zod';
5
5
  import { z } from 'zod';
6
6
  import { OrganizationConfig, CourseConfig, ComponentConfig, ResourceConfig, ComponentResourceConfig } from '@playcademy/timeback/types';
7
+ import { AUTH_PROVIDER_IDS } from '@playcademy/constants';
7
8
 
8
9
  declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
9
10
  name: "user";
@@ -552,7 +553,7 @@ declare const items: drizzle_orm_pg_core.PgTableWithColumns<{
552
553
  tableName: "items";
553
554
  dataType: "string";
554
555
  columnType: "PgEnumColumn";
555
- data: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
556
+ data: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
556
557
  driverParam: string;
557
558
  notNull: true;
558
559
  hasDefault: true;
@@ -1439,7 +1440,7 @@ declare const characterComponents: drizzle_orm_pg_core.PgTableWithColumns<{
1439
1440
  tableName: "character_components";
1440
1441
  dataType: "string";
1441
1442
  columnType: "PgEnumColumn";
1442
- data: "accessory" | "body" | "outfit" | "hairstyle" | "eyes";
1443
+ data: "body" | "outfit" | "hairstyle" | "eyes" | "accessory";
1443
1444
  driverParam: string;
1444
1445
  notNull: true;
1445
1446
  hasDefault: false;
@@ -2441,7 +2442,7 @@ declare const InsertItemSchema: drizzle_zod.BuildSchema<"insert", {
2441
2442
  tableName: "items";
2442
2443
  dataType: "string";
2443
2444
  columnType: "PgEnumColumn";
2444
- data: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
2445
+ data: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
2445
2446
  driverParam: string;
2446
2447
  notNull: true;
2447
2448
  hasDefault: true;
@@ -2542,7 +2543,7 @@ declare const UpdateItemSchema: z.ZodObject<Omit<{
2542
2543
  slug?: string | undefined;
2543
2544
  metadata?: Record<string, unknown> | undefined;
2544
2545
  gameId?: string | null | undefined;
2545
- type?: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other" | undefined;
2546
+ type?: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other" | undefined;
2546
2547
  isPlaceable?: boolean | undefined;
2547
2548
  imageUrl?: string | null | undefined;
2548
2549
  }, {
@@ -2551,7 +2552,7 @@ declare const UpdateItemSchema: z.ZodObject<Omit<{
2551
2552
  slug?: string | undefined;
2552
2553
  metadata?: Record<string, unknown> | undefined;
2553
2554
  gameId?: string | null | undefined;
2554
- type?: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other" | undefined;
2555
+ type?: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other" | undefined;
2555
2556
  isPlaceable?: boolean | undefined;
2556
2557
  imageUrl?: string | null | undefined;
2557
2558
  }>;
@@ -3174,24 +3175,6 @@ type AwardXpResponse = {
3174
3175
  xpAwarded: number;
3175
3176
  };
3176
3177
 
3177
- /**
3178
- * SDK Constants
3179
- * These are re-exported from @playcademy/data but defined here
3180
- * to avoid bundling issues with API Extractor
3181
- */
3182
- declare const CURRENCIES: {
3183
- readonly PRIMARY: "PLAYCADEMY_CREDITS";
3184
- readonly XP: "PLAYCADEMY_XP";
3185
- };
3186
- declare const BADGES: {
3187
- readonly FOUNDING_MEMBER: "FOUNDING_MEMBER_BADGE";
3188
- readonly EARLY_ADOPTER: "EARLY_ADOPTER_BADGE";
3189
- readonly FIRST_GAME: "FIRST_GAME_BADGE";
3190
- };
3191
- declare const AuthProvider: {
3192
- readonly TIMEBACK: "TIMEBACK";
3193
- };
3194
-
3195
3178
  /**
3196
3179
  * @fileoverview Server SDK Type Definitions
3197
3180
  *
@@ -3270,7 +3253,7 @@ interface ClientConfig {
3270
3253
  gameId?: string;
3271
3254
  autoStartSession?: boolean;
3272
3255
  }
3273
- type AuthProviderType = (typeof AuthProvider)[keyof typeof AuthProvider];
3256
+ type AuthProviderType = (typeof AUTH_PROVIDER_IDS)[keyof typeof AUTH_PROVIDER_IDS];
3274
3257
  interface AuthOptions {
3275
3258
  /** The identity provider to use for authentication */
3276
3259
  provider: AuthProviderType;
@@ -3635,7 +3618,7 @@ declare class PlaycademyClient {
3635
3618
  * Creates a new PlaycademyClient instance.
3636
3619
  *
3637
3620
  * @param config - Optional configuration object
3638
- * @param config.baseUrl - Base URL (e.g., 'https://hub.playcademy.com' or '/'). SDK automatically appends /api
3621
+ * @param config.baseUrl - Base URL (e.g., 'https://hub.playcademy.net' or '/'). SDK automatically appends /api
3639
3622
  * @param config.token - Authentication token
3640
3623
  * @param config.tokenType - Optional token type (auto-detected if not provided)
3641
3624
  * @param config.gameId - Game ID for automatic session management
@@ -3936,7 +3919,7 @@ declare class PlaycademyClient {
3936
3919
  create: (props: InsertItemInput) => Promise<{
3937
3920
  id: string;
3938
3921
  createdAt: Date;
3939
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
3922
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
3940
3923
  gameId: string | null;
3941
3924
  slug: string;
3942
3925
  displayName: string;
@@ -3948,7 +3931,7 @@ declare class PlaycademyClient {
3948
3931
  get: (itemId: string) => Promise<{
3949
3932
  id: string;
3950
3933
  createdAt: Date;
3951
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
3934
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
3952
3935
  gameId: string | null;
3953
3936
  slug: string;
3954
3937
  displayName: string;
@@ -3960,7 +3943,7 @@ declare class PlaycademyClient {
3960
3943
  list: () => Promise<{
3961
3944
  id: string;
3962
3945
  createdAt: Date;
3963
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
3946
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
3964
3947
  gameId: string | null;
3965
3948
  slug: string;
3966
3949
  displayName: string;
@@ -3972,7 +3955,7 @@ declare class PlaycademyClient {
3972
3955
  update: (itemId: string, props: UpdateItemInput) => Promise<{
3973
3956
  id: string;
3974
3957
  createdAt: Date;
3975
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
3958
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
3976
3959
  gameId: string | null;
3977
3960
  slug: string;
3978
3961
  displayName: string;
@@ -4766,5 +4749,5 @@ declare class PlaycademyMessaging {
4766
4749
  */
4767
4750
  declare const messaging: PlaycademyMessaging;
4768
4751
 
4769
- export { AuthProvider, BADGES, CURRENCIES, MessageEvents, PlaycademyClient, messaging };
4752
+ export { MessageEvents, PlaycademyClient, messaging };
4770
4753
  export type { DevUploadEvent, DevUploadHooks };