@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/server.d.ts CHANGED
@@ -96,7 +96,7 @@ interface PlaycademyServerClientConfig {
96
96
  config?: PlaycademyConfig;
97
97
  /**
98
98
  * Optional base URL for Playcademy API.
99
- * Defaults to environment variables or 'https://hub.playcademy.com'.
99
+ * Defaults to environment variables or 'https://hub.playcademy.net'.
100
100
  *
101
101
  * @example 'http://localhost:3000' for local development
102
102
  */
package/dist/server.js CHANGED
@@ -301,7 +301,7 @@ class PlaycademyClient {
301
301
  if (!apiKey || typeof apiKey !== "string") {
302
302
  throw new Error("[Playcademy SDK] apiKey is required");
303
303
  }
304
- const finalBaseUrl = baseUrl || process.env.PLAYCADEMY_BASE_URL || "https://hub.playcademy.com";
304
+ const finalBaseUrl = baseUrl || process.env.PLAYCADEMY_BASE_URL || "https://hub.playcademy.net";
305
305
  const loadedConfig = config.config || await loadConfig(configPath);
306
306
  const state = {
307
307
  apiKey,
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AUTH_PROVIDER_IDS } from '@playcademy/constants';
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';
@@ -645,7 +646,7 @@ declare const items: drizzle_orm_pg_core.PgTableWithColumns<{
645
646
  tableName: "items";
646
647
  dataType: "string";
647
648
  columnType: "PgEnumColumn";
648
- data: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
649
+ data: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
649
650
  driverParam: string;
650
651
  notNull: true;
651
652
  hasDefault: true;
@@ -1889,7 +1890,7 @@ declare const characterComponents: drizzle_orm_pg_core.PgTableWithColumns<{
1889
1890
  tableName: "character_components";
1890
1891
  dataType: "string";
1891
1892
  columnType: "PgEnumColumn";
1892
- data: "accessory" | "body" | "outfit" | "hairstyle" | "eyes";
1893
+ data: "body" | "outfit" | "hairstyle" | "eyes" | "accessory";
1893
1894
  driverParam: string;
1894
1895
  notNull: true;
1895
1896
  hasDefault: false;
@@ -3108,7 +3109,7 @@ declare const InsertItemSchema: drizzle_zod.BuildSchema<"insert", {
3108
3109
  tableName: "items";
3109
3110
  dataType: "string";
3110
3111
  columnType: "PgEnumColumn";
3111
- data: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
3112
+ data: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
3112
3113
  driverParam: string;
3113
3114
  notNull: true;
3114
3115
  hasDefault: true;
@@ -3209,7 +3210,7 @@ declare const UpdateItemSchema: z.ZodObject<Omit<{
3209
3210
  slug?: string | undefined;
3210
3211
  metadata?: Record<string, unknown> | undefined;
3211
3212
  gameId?: string | null | undefined;
3212
- type?: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other" | undefined;
3213
+ type?: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other" | undefined;
3213
3214
  isPlaceable?: boolean | undefined;
3214
3215
  imageUrl?: string | null | undefined;
3215
3216
  }, {
@@ -3218,7 +3219,7 @@ declare const UpdateItemSchema: z.ZodObject<Omit<{
3218
3219
  slug?: string | undefined;
3219
3220
  metadata?: Record<string, unknown> | undefined;
3220
3221
  gameId?: string | null | undefined;
3221
- type?: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other" | undefined;
3222
+ type?: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other" | undefined;
3222
3223
  isPlaceable?: boolean | undefined;
3223
3224
  imageUrl?: string | null | undefined;
3224
3225
  }>;
@@ -3858,10 +3859,6 @@ type AwardXpResponse = {
3858
3859
  xpAwarded: number;
3859
3860
  };
3860
3861
 
3861
- declare const AuthProvider: {
3862
- readonly TIMEBACK: "TIMEBACK";
3863
- };
3864
-
3865
3862
  /**
3866
3863
  * OAuth 2.0 implementation for the Playcademy SDK
3867
3864
  */
@@ -4041,7 +4038,7 @@ interface PlaycademyServerClientConfig {
4041
4038
  config?: PlaycademyConfig;
4042
4039
  /**
4043
4040
  * Optional base URL for Playcademy API.
4044
- * Defaults to environment variables or 'https://hub.playcademy.com'.
4041
+ * Defaults to environment variables or 'https://hub.playcademy.net'.
4045
4042
  *
4046
4043
  * @example 'http://localhost:3000' for local development
4047
4044
  */
@@ -4309,7 +4306,7 @@ declare class PlaycademyClient {
4309
4306
  * Creates a new PlaycademyClient instance.
4310
4307
  *
4311
4308
  * @param config - Optional configuration object
4312
- * @param config.baseUrl - Base URL (e.g., 'https://hub.playcademy.com' or '/'). SDK automatically appends /api
4309
+ * @param config.baseUrl - Base URL (e.g., 'https://hub.playcademy.net' or '/'). SDK automatically appends /api
4313
4310
  * @param config.token - Authentication token
4314
4311
  * @param config.tokenType - Optional token type (auto-detected if not provided)
4315
4312
  * @param config.gameId - Game ID for automatic session management
@@ -4610,7 +4607,7 @@ declare class PlaycademyClient {
4610
4607
  create: (props: InsertItemInput) => Promise<{
4611
4608
  id: string;
4612
4609
  createdAt: Date;
4613
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
4610
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
4614
4611
  gameId: string | null;
4615
4612
  slug: string;
4616
4613
  displayName: string;
@@ -4622,7 +4619,7 @@ declare class PlaycademyClient {
4622
4619
  get: (itemId: string) => Promise<{
4623
4620
  id: string;
4624
4621
  createdAt: Date;
4625
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
4622
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
4626
4623
  gameId: string | null;
4627
4624
  slug: string;
4628
4625
  displayName: string;
@@ -4634,7 +4631,7 @@ declare class PlaycademyClient {
4634
4631
  list: () => Promise<{
4635
4632
  id: string;
4636
4633
  createdAt: Date;
4637
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
4634
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
4638
4635
  gameId: string | null;
4639
4636
  slug: string;
4640
4637
  displayName: string;
@@ -4646,7 +4643,7 @@ declare class PlaycademyClient {
4646
4643
  update: (itemId: string, props: UpdateItemInput) => Promise<{
4647
4644
  id: string;
4648
4645
  createdAt: Date;
4649
- type: "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "accessory" | "other";
4646
+ type: "accessory" | "currency" | "badge" | "trophy" | "collectible" | "consumable" | "unlock" | "upgrade" | "other";
4650
4647
  gameId: string | null;
4651
4648
  slug: string;
4652
4649
  displayName: string;
@@ -4912,7 +4909,7 @@ interface InitPayload {
4912
4909
  gameId: string;
4913
4910
  realtimeUrl?: string;
4914
4911
  }
4915
- type AuthProviderType = (typeof AuthProvider)[keyof typeof AuthProvider];
4912
+ type AuthProviderType = (typeof AUTH_PROVIDER_IDS)[keyof typeof AUTH_PROVIDER_IDS];
4916
4913
  interface AuthOptions {
4917
4914
  /** The identity provider to use for authentication */
4918
4915
  provider: AuthProviderType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -34,14 +34,15 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "@inquirer/prompts": "^7.8.6",
37
+ "@playcademy/constants": "0.0.1",
37
38
  "@playcademy/data": "0.0.1",
38
39
  "@playcademy/logger": "0.0.1",
39
- "@playcademy/sandbox": "0.1.0-beta.20",
40
+ "@playcademy/sandbox": "0.1.0",
40
41
  "@playcademy/test": "0.0.1",
41
42
  "@playcademy/timeback": "0.0.1",
42
43
  "@playcademy/utils": "0.0.1",
43
44
  "@types/bun": "latest",
44
- "playcademy": "0.10.0",
45
+ "playcademy": "0.11.3",
45
46
  "rollup": "^4.50.2",
46
47
  "rollup-plugin-dts": "^6.2.3",
47
48
  "typescript": "^5.7.2",