connectbase-client 6.28.0 → 6.29.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/index.d.mts CHANGED
@@ -5869,12 +5869,19 @@ declare class GameAPI {
5869
5869
  createClient(config: Omit<GameClientConfig, "gameServerUrl">): GameRoom;
5870
5870
  /**
5871
5871
  * 룸 목록 조회 (HTTP)
5872
+ *
5873
+ * `options.gameId` 를 주면 그 게임의 방만 본다(`?game_id=`). 게임 격리를 켠 앱의 로비나 허브는 게임 토큰 없이
5874
+ * 회원 토큰이나 공개 키로 이렇게 읽는다(허브 읽기 예외). 방 상태는 게임 토큰이나 서버 함수 자격으로만 읽는다.
5872
5875
  */
5873
- listRooms(appId?: string): Promise<GameRoomInfo[]>;
5876
+ listRooms(appId?: string, options?: {
5877
+ gameId?: string;
5878
+ }): Promise<GameRoomInfo[]>;
5874
5879
  /**
5875
- * 룸 상세 조회 (HTTP)
5880
+ * 룸 상세 조회 (HTTP). `options.gameId` 는 listRooms 와 같다.
5876
5881
  */
5877
- getRoom(roomId: string): Promise<GameRoomInfo>;
5882
+ getRoom(roomId: string, options?: {
5883
+ gameId?: string;
5884
+ }): Promise<GameRoomInfo>;
5878
5885
  /**
5879
5886
  * 룸 생성 (HTTP, gRPC 대안)
5880
5887
  *
package/dist/index.d.ts CHANGED
@@ -5869,12 +5869,19 @@ declare class GameAPI {
5869
5869
  createClient(config: Omit<GameClientConfig, "gameServerUrl">): GameRoom;
5870
5870
  /**
5871
5871
  * 룸 목록 조회 (HTTP)
5872
+ *
5873
+ * `options.gameId` 를 주면 그 게임의 방만 본다(`?game_id=`). 게임 격리를 켠 앱의 로비나 허브는 게임 토큰 없이
5874
+ * 회원 토큰이나 공개 키로 이렇게 읽는다(허브 읽기 예외). 방 상태는 게임 토큰이나 서버 함수 자격으로만 읽는다.
5872
5875
  */
5873
- listRooms(appId?: string): Promise<GameRoomInfo[]>;
5876
+ listRooms(appId?: string, options?: {
5877
+ gameId?: string;
5878
+ }): Promise<GameRoomInfo[]>;
5874
5879
  /**
5875
- * 룸 상세 조회 (HTTP)
5880
+ * 룸 상세 조회 (HTTP). `options.gameId` 는 listRooms 와 같다.
5876
5881
  */
5877
- getRoom(roomId: string): Promise<GameRoomInfo>;
5882
+ getRoom(roomId: string, options?: {
5883
+ gameId?: string;
5884
+ }): Promise<GameRoomInfo>;
5878
5885
  /**
5879
5886
  * 룸 생성 (HTTP, gRPC 대안)
5880
5887
  *
package/dist/index.js CHANGED
@@ -7486,12 +7486,19 @@ var GameAPI = class {
7486
7486
  }
7487
7487
  /**
7488
7488
  * 룸 목록 조회 (HTTP)
7489
+ *
7490
+ * `options.gameId` 를 주면 그 게임의 방만 본다(`?game_id=`). 게임 격리를 켠 앱의 로비나 허브는 게임 토큰 없이
7491
+ * 회원 토큰이나 공개 키로 이렇게 읽는다(허브 읽기 예외). 방 상태는 게임 토큰이나 서버 함수 자격으로만 읽는다.
7489
7492
  */
7490
- async listRooms(appId) {
7493
+ async listRooms(appId, options) {
7491
7494
  const id = appId || this.appId || "";
7492
- const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/rooms`, {
7493
- headers: this.getHeaders()
7494
- });
7495
+ const q = options?.gameId ? `?game_id=${encodeURIComponent(options.gameId)}` : "";
7496
+ const response = await fetch(
7497
+ `${this.gameServerUrl}/v1/game/${id}/rooms${q}`,
7498
+ {
7499
+ headers: this.getHeaders()
7500
+ }
7501
+ );
7495
7502
  if (!response.ok) {
7496
7503
  throw new ApiError(
7497
7504
  response.status,
@@ -7503,12 +7510,13 @@ var GameAPI = class {
7503
7510
  return data.rooms;
7504
7511
  }
7505
7512
  /**
7506
- * 룸 상세 조회 (HTTP)
7513
+ * 룸 상세 조회 (HTTP). `options.gameId` 는 listRooms 와 같다.
7507
7514
  */
7508
- async getRoom(roomId) {
7515
+ async getRoom(roomId, options) {
7509
7516
  const id = this.appId || "";
7517
+ const q = options?.gameId ? `?game_id=${encodeURIComponent(options.gameId)}` : "";
7510
7518
  const response = await fetch(
7511
- `${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}`,
7519
+ `${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}${q}`,
7512
7520
  {
7513
7521
  headers: this.getHeaders()
7514
7522
  }
@@ -14659,8 +14667,8 @@ var SupportAPI = class {
14659
14667
  }
14660
14668
  };
14661
14669
  function detectSdkVersion() {
14662
- if ("6.28.0") {
14663
- return "6.28.0";
14670
+ if ("6.29.0") {
14671
+ return "6.29.0";
14664
14672
  }
14665
14673
  return "unknown";
14666
14674
  }
package/dist/index.mjs CHANGED
@@ -7429,12 +7429,19 @@ var GameAPI = class {
7429
7429
  }
7430
7430
  /**
7431
7431
  * 룸 목록 조회 (HTTP)
7432
+ *
7433
+ * `options.gameId` 를 주면 그 게임의 방만 본다(`?game_id=`). 게임 격리를 켠 앱의 로비나 허브는 게임 토큰 없이
7434
+ * 회원 토큰이나 공개 키로 이렇게 읽는다(허브 읽기 예외). 방 상태는 게임 토큰이나 서버 함수 자격으로만 읽는다.
7432
7435
  */
7433
- async listRooms(appId) {
7436
+ async listRooms(appId, options) {
7434
7437
  const id = appId || this.appId || "";
7435
- const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/rooms`, {
7436
- headers: this.getHeaders()
7437
- });
7438
+ const q = options?.gameId ? `?game_id=${encodeURIComponent(options.gameId)}` : "";
7439
+ const response = await fetch(
7440
+ `${this.gameServerUrl}/v1/game/${id}/rooms${q}`,
7441
+ {
7442
+ headers: this.getHeaders()
7443
+ }
7444
+ );
7438
7445
  if (!response.ok) {
7439
7446
  throw new ApiError(
7440
7447
  response.status,
@@ -7446,12 +7453,13 @@ var GameAPI = class {
7446
7453
  return data.rooms;
7447
7454
  }
7448
7455
  /**
7449
- * 룸 상세 조회 (HTTP)
7456
+ * 룸 상세 조회 (HTTP). `options.gameId` 는 listRooms 와 같다.
7450
7457
  */
7451
- async getRoom(roomId) {
7458
+ async getRoom(roomId, options) {
7452
7459
  const id = this.appId || "";
7460
+ const q = options?.gameId ? `?game_id=${encodeURIComponent(options.gameId)}` : "";
7453
7461
  const response = await fetch(
7454
- `${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}`,
7462
+ `${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}${q}`,
7455
7463
  {
7456
7464
  headers: this.getHeaders()
7457
7465
  }
@@ -14602,8 +14610,8 @@ var SupportAPI = class {
14602
14610
  }
14603
14611
  };
14604
14612
  function detectSdkVersion() {
14605
- if ("6.28.0") {
14606
- return "6.28.0";
14613
+ if ("6.29.0") {
14614
+ return "6.29.0";
14607
14615
  }
14608
14616
  return "unknown";
14609
14617
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectbase-client",
3
- "version": "6.28.0",
3
+ "version": "6.29.0",
4
4
  "description": "Connect Base JavaScript/TypeScript SDK for browser and Node.js",
5
5
  "repository": {
6
6
  "type": "git",