@spawnco/sdk-types 0.0.52 → 0.0.54

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.mts CHANGED
@@ -207,6 +207,16 @@ interface SpawnServerSDK__V1<TConfig = any> {
207
207
  /** Returns true if the user is currently muted (and not expired) */
208
208
  checkIsMuted(userId: string): Promise<boolean>;
209
209
  };
210
+ studioChat: {
211
+ /** Send a hidden DM-style notification to Savi for this variant's app. */
212
+ notifyDm(options: {
213
+ message: string;
214
+ source?: string;
215
+ entityId?: string;
216
+ }): Promise<{
217
+ success: boolean;
218
+ }>;
219
+ };
210
220
  sparks: {
211
221
  verifyPurchase({ purchaseId, price }: {
212
222
  purchaseId: string;
@@ -261,6 +271,23 @@ interface SpawnServerSDK__V1<TConfig = any> {
261
271
  */
262
272
  unlock(key: string): Promise<void>;
263
273
  };
274
+ /**
275
+ * Game spec access (Tome).
276
+ * Returns the latest resolved game_spec for an app.
277
+ */
278
+ gameSpec: {
279
+ /**
280
+ * Fetch the latest game spec for this variant's app, or an explicit appId override.
281
+ * Returns null if no spec exists.
282
+ */
283
+ latest(options?: {
284
+ appId?: string;
285
+ }): Promise<{
286
+ appId: string;
287
+ version: number;
288
+ gameSpec: Record<string, unknown>;
289
+ } | null>;
290
+ };
264
291
  config: {
265
292
  get(): Promise<TConfig>;
266
293
  version(): Promise<string>;
@@ -271,7 +298,7 @@ interface SpawnServerSDK__V1<TConfig = any> {
271
298
  getClaimsToday(userId: string): Promise<{
272
299
  claimedIds: ('A' | 'B' | 'C')[];
273
300
  }>;
274
- /** Claim a dew plant for a user. Returns random 10-20 dew amount. */
301
+ /** Claim a dew plant for a user. Returns random 5-10 dew amount. */
275
302
  claim(userId: string, plantId: 'A' | 'B' | 'C'): Promise<{
276
303
  success: boolean;
277
304
  amount?: number;
@@ -465,7 +492,7 @@ interface JobDewEnv {
465
492
  getClaimsToday(userId: string): Promise<{
466
493
  claimedIds: ('A' | 'B' | 'C')[];
467
494
  }>;
468
- /** Claim a dew plant for a user. Returns random 10-20 dew amount. */
495
+ /** Claim a dew plant for a user. Returns random 5-10 dew amount. */
469
496
  claim(userId: string, plantId: 'A' | 'B' | 'C'): Promise<{
470
497
  success: boolean;
471
498
  amount?: number;
package/dist/index.d.ts CHANGED
@@ -207,6 +207,16 @@ interface SpawnServerSDK__V1<TConfig = any> {
207
207
  /** Returns true if the user is currently muted (and not expired) */
208
208
  checkIsMuted(userId: string): Promise<boolean>;
209
209
  };
210
+ studioChat: {
211
+ /** Send a hidden DM-style notification to Savi for this variant's app. */
212
+ notifyDm(options: {
213
+ message: string;
214
+ source?: string;
215
+ entityId?: string;
216
+ }): Promise<{
217
+ success: boolean;
218
+ }>;
219
+ };
210
220
  sparks: {
211
221
  verifyPurchase({ purchaseId, price }: {
212
222
  purchaseId: string;
@@ -261,6 +271,23 @@ interface SpawnServerSDK__V1<TConfig = any> {
261
271
  */
262
272
  unlock(key: string): Promise<void>;
263
273
  };
274
+ /**
275
+ * Game spec access (Tome).
276
+ * Returns the latest resolved game_spec for an app.
277
+ */
278
+ gameSpec: {
279
+ /**
280
+ * Fetch the latest game spec for this variant's app, or an explicit appId override.
281
+ * Returns null if no spec exists.
282
+ */
283
+ latest(options?: {
284
+ appId?: string;
285
+ }): Promise<{
286
+ appId: string;
287
+ version: number;
288
+ gameSpec: Record<string, unknown>;
289
+ } | null>;
290
+ };
264
291
  config: {
265
292
  get(): Promise<TConfig>;
266
293
  version(): Promise<string>;
@@ -271,7 +298,7 @@ interface SpawnServerSDK__V1<TConfig = any> {
271
298
  getClaimsToday(userId: string): Promise<{
272
299
  claimedIds: ('A' | 'B' | 'C')[];
273
300
  }>;
274
- /** Claim a dew plant for a user. Returns random 10-20 dew amount. */
301
+ /** Claim a dew plant for a user. Returns random 5-10 dew amount. */
275
302
  claim(userId: string, plantId: 'A' | 'B' | 'C'): Promise<{
276
303
  success: boolean;
277
304
  amount?: number;
@@ -465,7 +492,7 @@ interface JobDewEnv {
465
492
  getClaimsToday(userId: string): Promise<{
466
493
  claimedIds: ('A' | 'B' | 'C')[];
467
494
  }>;
468
- /** Claim a dew plant for a user. Returns random 10-20 dew amount. */
495
+ /** Claim a dew plant for a user. Returns random 5-10 dew amount. */
469
496
  claim(userId: string, plantId: 'A' | 'B' | 'C'): Promise<{
470
497
  success: boolean;
471
498
  amount?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spawnco/sdk-types",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "description": "TypeScript type definitions for Spawn SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/v1.ts CHANGED
@@ -230,6 +230,11 @@ export interface SpawnServerSDK__V1<TConfig = any> {
230
230
  checkIsMuted(userId: string): Promise<boolean>;
231
231
  };
232
232
 
233
+ studioChat: {
234
+ /** Send a hidden DM-style notification to Savi for this variant's app. */
235
+ notifyDm(options: { message: string; source?: string; entityId?: string }): Promise<{ success: boolean }>;
236
+ };
237
+
233
238
  sparks: {
234
239
  verifyPurchase({ purchaseId, price }: { purchaseId: string; price: number }): Promise<boolean>;
235
240
  };
@@ -291,6 +296,22 @@ export interface SpawnServerSDK__V1<TConfig = any> {
291
296
  unlock(key: string): Promise<void>;
292
297
  };
293
298
 
299
+ /**
300
+ * Game spec access (Tome).
301
+ * Returns the latest resolved game_spec for an app.
302
+ */
303
+ gameSpec: {
304
+ /**
305
+ * Fetch the latest game spec for this variant's app, or an explicit appId override.
306
+ * Returns null if no spec exists.
307
+ */
308
+ latest(options?: { appId?: string }): Promise<{
309
+ appId: string;
310
+ version: number;
311
+ gameSpec: Record<string, unknown>;
312
+ } | null>;
313
+ };
314
+
294
315
  config: {
295
316
  get(): Promise<TConfig>;
296
317
  version(): Promise<string>;
@@ -301,7 +322,7 @@ export interface SpawnServerSDK__V1<TConfig = any> {
301
322
  /** Get today's plant claims for a user in this variant */
302
323
  getClaimsToday(userId: string): Promise<{ claimedIds: ('A' | 'B' | 'C')[] }>;
303
324
 
304
- /** Claim a dew plant for a user. Returns random 10-20 dew amount. */
325
+ /** Claim a dew plant for a user. Returns random 5-10 dew amount. */
305
326
  claim(
306
327
  userId: string,
307
328
  plantId: 'A' | 'B' | 'C'
@@ -550,7 +571,7 @@ export interface JobDewEnv {
550
571
  /** Get today's plant claims for a user in this variant */
551
572
  getClaimsToday(userId: string): Promise<{ claimedIds: ('A' | 'B' | 'C')[] }>;
552
573
 
553
- /** Claim a dew plant for a user. Returns random 10-20 dew amount. */
574
+ /** Claim a dew plant for a user. Returns random 5-10 dew amount. */
554
575
  claim(
555
576
  userId: string,
556
577
  plantId: 'A' | 'B' | 'C'