@autogames/sdk 1.2.4 → 1.4.0

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/main.d.ts CHANGED
@@ -15,6 +15,7 @@ export declare interface AuthState {
15
15
  declare interface AuthStoreState {
16
16
  accessToken: string | null;
17
17
  accessTokenUpdatedAt: string | null;
18
+ refreshToken: string | null;
18
19
  user: AutoGamesSDKUser | null;
19
20
  isAuthenticated: boolean;
20
21
  isReady: boolean;
@@ -29,7 +30,7 @@ declare interface AuthStoreState {
29
30
  isReady: boolean;
30
31
  }) => void;
31
32
  _setPrivyInstance: (instance: PrivyInstance) => void;
32
- _resolveLogin: (accessToken: string, user: AutoGamesSDKUser) => void;
33
+ _resolveLogin: (accessToken: string, refreshToken: string, user: AutoGamesSDKUser) => void;
33
34
  _rejectLogin: (error: string) => void;
34
35
  }
35
36
 
@@ -254,9 +255,13 @@ declare type RecallResponse = {
254
255
 
255
256
  export declare interface SDKConfig {
256
257
  /**
257
- * Agent ID. Game ID in the AutoGames platform.
258
+ * Agent ID. Used for authentication purposes.
258
259
  */
259
260
  agentId: number;
261
+ /**
262
+ * Game ID. Used for game-related API calls.
263
+ */
264
+ gameId: number;
260
265
  /**
261
266
  * Optional: Privy App ID. If not provided, uses the bundled default.
262
267
  * Only needed if you want to use a different Privy app for isolated user base.
@@ -358,6 +363,7 @@ persist: {
358
363
  setOptions: (options: Partial<PersistOptions<AuthStoreState, {
359
364
  accessToken: string | null;
360
365
  accessTokenUpdatedAt: string | null;
366
+ refreshToken: string | null;
361
367
  user: AutoGamesSDKUser | null;
362
368
  isAuthenticated: boolean;
363
369
  }, unknown>>) => void;
@@ -369,6 +375,7 @@ onFinishHydration: (fn: (state: AuthStoreState) => void) => () => void;
369
375
  getOptions: () => Partial<PersistOptions<AuthStoreState, {
370
376
  accessToken: string | null;
371
377
  accessTokenUpdatedAt: string | null;
378
+ refreshToken: string | null;
372
379
  user: AutoGamesSDKUser | null;
373
380
  isAuthenticated: boolean;
374
381
  }, unknown>>;
@@ -1,4 +1,4 @@
1
- import { M as m, bV as y, bI as w, a5 as x, bX as p, cj as z, cg as M, d9 as k, ci as d, da as T, Z as E, db as N, a4 as P, dc as S, bx as B, dd as L, cc as $, de as A } from "./bridge-mount-CWHdoUW-.js";
1
+ import { M as m, bV as y, bI as w, a5 as x, bX as p, cj as z, cg as M, d9 as k, ci as d, da as T, Z as E, db as N, a4 as P, dc as S, bx as B, dd as L, cc as $, de as A } from "./bridge-mount-FZvmk0-F.js";
2
2
  function H(s, e) {
3
3
  if (s.length !== e.length)
4
4
  throw new m({
@@ -1,4 +1,4 @@
1
- import { df as nt, dg as qt, dh as ht, di as ue, dj as D, dk as ae, dl as le, dm as Ct, dn as de, dp as he } from "./bridge-mount-CWHdoUW-.js";
1
+ import { df as nt, dg as qt, dh as ht, di as ue, dj as D, dk as ae, dl as le, dm as Ct, dn as de, dp as he } from "./bridge-mount-FZvmk0-F.js";
2
2
  const Nt = /* @__PURE__ */ BigInt(0), xt = /* @__PURE__ */ BigInt(1);
3
3
  function wt(e, n = "") {
4
4
  if (typeof e != "boolean") {