connectbase-client 6.19.0 → 6.21.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.ts CHANGED
@@ -896,6 +896,11 @@ interface AIChatStreamCallbacks {
896
896
  */
897
897
  onReasoning?: (reasoning: string) => void;
898
898
  onToken?: (content: string) => void;
899
+ /**
900
+ * 모델이 만든 이미지 한 장 (이미지 출력 모델: Gemini 이미지 모델, OpenRouter 이미지 모델 등).
901
+ * 이미지는 조각나지 않고 한 장씩 통째로 온다. 이미지를 만들지 않는 모델에서는 호출되지 않는다.
902
+ */
903
+ onImage?: (image: AIGeneratedImage) => void;
899
904
  onToolEvent?: (event: AIToolEvent) => void;
900
905
  /**
901
906
  * Agentic 검색(`agentic: true`) 진행 상황. agentic 검색이 검색어를
@@ -979,8 +984,22 @@ interface AISource {
979
984
  content: string;
980
985
  score: number;
981
986
  }
987
+ /**
988
+ * 모델이 답에 담은 이미지 한 장. `url` 은 보통 data URI(`data:image/png;base64,...`)라 `<img src>` 에 그대로 쓸 수
989
+ * 있다. 공급자가 주소로 준 경우만 https 주소이며 공급자의 임시 주소일 수 있다 (오래 보관하려면 Storage 에 올린다).
990
+ */
991
+ interface AIGeneratedImage {
992
+ /** `image/png` 같은 형식 (https 주소로 온 경우 비어 있을 수 있다). */
993
+ mimeType?: string;
994
+ url: string;
995
+ }
982
996
  interface AIChatResponse {
983
997
  content: string;
998
+ /**
999
+ * 모델이 만든 이미지 (이미지 출력 모델일 때만, 응답 하나에 최대 8장). 이미지 생성 비용은 연결한 AI 공급자가
1000
+ * 청구하며, 출력 토큰(`usage.completionTokens`)에 들어간다.
1001
+ */
1002
+ images?: AIGeneratedImage[];
984
1003
  /**
985
1004
  * 추론 모델(Qwen3 reasoning, OpenAI o-series, DeepSeek-R1 등)의 사고 과정.
986
1005
  * 최종 답변(`content`)과 분리되어 제공됩니다. 추론 모델이 아니면 비어 있습니다.
@@ -1025,6 +1044,8 @@ interface AIStreamChunk {
1025
1044
  done: boolean;
1026
1045
  toolCalls?: AIToolCall[];
1027
1046
  sources?: AISource[];
1047
+ /** 이 청크에 온 이미지 (이미지 출력 모델일 때만). */
1048
+ images?: AIGeneratedImage[];
1028
1049
  /**
1029
1050
  * 토큰 사용량. **스트림 종료 청크에만** 실린다 (서버 5.6.3+ / core-server 2026-08-01+).
1030
1051
  * 그 전 서버는 이 필드를 보내지 않으므로 `undefined` 일 수 있다.
@@ -5425,7 +5446,10 @@ declare const AUTH_MEMBER_ID_TOKEN: "$auth.member_id";
5425
5446
  interface KnowledgeSearchRequest {
5426
5447
  /** 검색 쿼리 (필수) */
5427
5448
  query: string;
5428
- /** 반환할 결과 수 (기본: KB 설정값) */
5449
+ /**
5450
+ * 반환할 결과 수 (기본: KB 설정값 `search_top_k`). 서버가 1~50 으로 자른다 — 50 보다 크게
5451
+ * 보내도 오류 없이 50 개까지만 온다 (KB 설정 `search_top_k` 의 상한과 같다).
5452
+ */
5429
5453
  top_k?: number;
5430
5454
  /** Agentic Search 활성화 — AI 가 쿼리를 자동 생성하여 다중 검색 수행 */
5431
5455
  agentic?: boolean;
@@ -5441,6 +5465,21 @@ interface KnowledgeSearchRequest {
5441
5465
  * AppMember JWT 컨텍스트가 있으면 서버가 추가로 metadata.user_id 강제 필터를 AND.
5442
5466
  */
5443
5467
  where?: Record<string, unknown>;
5468
+ /**
5469
+ * 인접 청크 확장(parent-document retrieval). 1 이상이면 매칭된 각 청크에 같은 문서의 앞뒤
5470
+ * 청크(`chunk_index` ± N)를 이어 붙여 결과의 `expanded_content` 에 채운다. 정밀한 작은 청크로
5471
+ * 찾되 LLM 에 넘길 문맥은 넓힐 때 쓴다. 순위와 점수, `content` 는 매칭 청크 그대로다.
5472
+ *
5473
+ * 기본 0(끔). 서버가 0~4 로 자른다 (4 보다 크면 4, 음수는 0). 추가 비용은 문서별 청크 조회
5474
+ * 한 번이고 임베딩이나 LLM 호출은 없다.
5475
+ *
5476
+ * @example
5477
+ * ```typescript
5478
+ * const res = await cb.knowledge.search(kbId, { query: '환불 규정', neighbor_window: 1 })
5479
+ * const context = res.results.map((r) => r.expanded_content ?? r.content).join('\n\n')
5480
+ * ```
5481
+ */
5482
+ neighbor_window?: number;
5444
5483
  }
5445
5484
  interface KnowledgeSearchResult {
5446
5485
  chunk_id: string;
@@ -5451,6 +5490,11 @@ interface KnowledgeSearchResult {
5451
5490
  score: number;
5452
5491
  chunk_index: number;
5453
5492
  metadata?: Record<string, unknown>;
5493
+ /**
5494
+ * 요청에 `neighbor_window` 를 1 이상 주고 인접 청크가 실제로 붙은 경우에만 온다. 매칭 청크와
5495
+ * 앞뒤 청크를 `chunk_index` 순으로 이어 붙인 넓은 문맥이다. 인용과 출처 표시는 `content` 를 쓴다.
5496
+ */
5497
+ expanded_content?: string;
5454
5498
  }
5455
5499
  interface KnowledgeSearchResponse {
5456
5500
  query: string;
@@ -8266,21 +8310,43 @@ declare class PushAPI {
8266
8310
  interface PublishMessageRequest {
8267
8311
  body: unknown;
8268
8312
  headers?: Record<string, string>;
8313
+ /**
8314
+ * 지연 전달 (0-86400초). 생략하면 큐 기본 지연을 쓴다. 서버가 예약해 두었다가 그 시각에 큐에 넣으므로, 트리거와
8315
+ * `consume()` 모두 그 전에는 받지 않고 기다리는 동안 다른 메시지를 막지도 않는다. `publishBatch()` 에도 적용된다.
8316
+ */
8269
8317
  delay_seconds?: number;
8318
+ /** 중복 방지 ID (5분 창). FIFO 큐는 생략하면 서버가 만든다(단건, 배치 모두). */
8270
8319
  deduplication_id?: string;
8320
+ /** 메시지 TTL (초, 큐 retention 이하). 메시지가 전달 가능해진 때(지연 메시지는 그 시각)부터 세어 지나면 서버가 지운다. 배치에도 적용된다. */
8271
8321
  ttl_seconds?: number;
8272
8322
  }
8273
8323
  interface PublishMessageResponse {
8274
8324
  message_id: string;
8275
8325
  published_at: string;
8326
+ /** 같은 deduplication_id 가 5분 안에 이미 발행돼 이번 발행이 버려졌으면 true. 그때 message_id 는 먼저 발행된 메시지의 것이다. */
8327
+ duplicate?: boolean;
8328
+ /**
8329
+ * 지연 메시지가 전달 가능해지는 시각. 지연 메시지는 이 시각에 새로 만들어지므로 소비할 때의 `message_id` 는
8330
+ * 이 응답의 `message_id`(예약의 ID)와 다르다.
8331
+ */
8332
+ deliver_at?: string;
8276
8333
  }
8277
8334
  interface PublishBatchRequest {
8278
8335
  messages: PublishMessageRequest[];
8279
8336
  }
8337
+ /** 배치 발행에서 실패한 메시지 하나 */
8338
+ interface PublishBatchError {
8339
+ /** 요청 `messages` 안의 위치 (0부터) */
8340
+ index: number;
8341
+ /** 실패 사유 (예: 크기 초과, delay_seconds 범위 밖, ttl_seconds 가 retention 초과) */
8342
+ error: string;
8343
+ }
8280
8344
  interface PublishBatchResponse {
8281
8345
  published: PublishMessageResponse[];
8282
8346
  failed: number;
8283
8347
  total: number;
8348
+ /** 실패한 메시지의 위치와 사유. 실패가 없으면 생략된다. */
8349
+ errors?: PublishBatchError[];
8284
8350
  }
8285
8351
  interface ConsumeOptions {
8286
8352
  max_messages?: number;
@@ -8300,15 +8366,59 @@ interface ConsumeMessagesResponse {
8300
8366
  messages: QueueMessage[];
8301
8367
  /** auto_ack=false 시 반환. Ack 호출 시 사용 */
8302
8368
  ack_token?: string;
8369
+ /** auto_ack=false 일 때, 확인하지 않으면 다시 전달되기까지의 초 (요청 값 또는 큐 기본값) */
8370
+ visibility_timeout?: number;
8303
8371
  }
8304
8372
  interface AckMessagesRequest {
8305
8373
  message_ids: string[];
8306
- /** auto_ack=false 소비 시 반환된 ack_token */
8374
+ /**
8375
+ * auto_ack=false 소비 시 반환된 ack_token. 빼도 message_ids 로 실제로 확인되지만, 넘기면 그 소비가 잡고 있던
8376
+ * 자리를 바로 풀어 다음 `consume()` 이 기다리지 않는다.
8377
+ */
8307
8378
  ack_token?: string;
8308
8379
  }
8380
+ /** ack 결과 */
8381
+ interface AckMessagesResponse {
8382
+ message: string;
8383
+ /** 이번 요청으로 실제로 확인(큐에서 끝냄)한 메시지 ID */
8384
+ acked: string[];
8385
+ /** 큐에 이미 없던 메시지 ID (auto_ack=true 로 받았거나 이미 ack 됨, 만료, 잘못된 ID) */
8386
+ not_found: string[];
8387
+ /** 서버 오류로 확인하지 못한 메시지 ID. 다시 ack 하면 된다. */
8388
+ failed?: string[];
8389
+ }
8390
+ /** nack 옵션. 전부 생략할 수 있다. */
8309
8391
  interface NackMessageRequest {
8310
- payload: unknown;
8392
+ /**
8393
+ * 바꿔 넣을 본문. 생략하면 원본 그대로 다시 전달한다.
8394
+ * 원본이 이미 큐에 없을 때(auto_ack=true 로 받은 메시지)는 payload 가 있어야 한다(없으면 404).
8395
+ */
8396
+ payload?: unknown;
8397
+ /** 재전달 지연 (0-86400초). 서버가 예약해 두므로 기다리는 동안 다른 메시지를 막지 않는다. */
8311
8398
  delay_seconds?: number;
8399
+ /** `consume()` 이 돌려준 ack_token. 넘기면 그 소비가 잡고 있는 원본을 바로 찾는다(생략 가능). */
8400
+ ack_token?: string;
8401
+ }
8402
+ /** nack 결과 */
8403
+ interface NackMessageResponse {
8404
+ message: string;
8405
+ /**
8406
+ * 다시 전달하는 방법.
8407
+ * - `'redeliver'`: payload 도 delay_seconds 도 없을 때. 같은 메시지를 바로 다시 전달한다(같은 `message_id`,
8408
+ * `delivery_count` 증가, `max_retries` 를 넘기면 DLQ).
8409
+ * - `'republish'`: payload 나 delay_seconds 가 있을 때. 새 메시지로 넣고 원본을 끝낸다(`headers["Nack-Count"]` 증가).
8410
+ */
8411
+ requeue: "redeliver" | "republish";
8412
+ /** 다시 전달될 메시지 ID. redeliver 면 원본과 같다. 지연 republish 면 예약의 ID 라 실제로 전달될 때 또 새 ID 를 받는다. */
8413
+ message_id: string;
8414
+ original_message_id: string;
8415
+ delay_seconds: number;
8416
+ /** delay_seconds 가 있을 때 다시 전달되는 시각 */
8417
+ deliver_at?: string;
8418
+ /** republish 로 다시 들어간 횟수. 다시 받은 메시지의 `headers["Nack-Count"]` 와 같다. */
8419
+ nack_count: number;
8420
+ /** republish 때 원본을 큐에서 끝냈는지. redeliver 이거나 원본이 이미 없었으면(auto_ack=true 소비 등) false. */
8421
+ original_removed: boolean;
8312
8422
  }
8313
8423
  interface QueueInfoResponse {
8314
8424
  id: string;
@@ -8357,6 +8467,10 @@ declare class QueueAPI {
8357
8467
  publish(queueID: string, data: PublishMessageRequest): Promise<PublishMessageResponse>;
8358
8468
  /**
8359
8469
  * 배치 메시지 발행 (최대 100개) — 엔드유저 동작. 퍼블릭 키만으로 동작합니다.
8470
+ *
8471
+ * 각 메시지는 `publish()` 와 같은 규칙을 따릅니다: `delay_seconds`(생략 시 큐 기본 지연), `ttl_seconds`,
8472
+ * FIFO 큐의 `deduplication_id` 자동 생성. 실패한 메시지는 배치 전체를 실패시키지 않고 `failed` 수와
8473
+ * `errors`(위치, 사유)로 알려 줍니다.
8360
8474
  */
8361
8475
  publishBatch(queueID: string, data: PublishBatchRequest): Promise<PublishBatchResponse>;
8362
8476
  /**
@@ -8367,6 +8481,12 @@ declare class QueueAPI {
8367
8481
  *
8368
8482
  * auto_ack=false(기본값): 명시적 Ack 필요. 응답의 ack_token을 ack() 호출 시 전달.
8369
8483
  * auto_ack=true: 즉시 자동 Ack (at-most-once, 유실 가능)
8484
+ *
8485
+ * - 여러 워커(프로세스)가 같은 큐를 동시에 consume 해도 됩니다. 한 메시지는 한 워커에게만 갑니다.
8486
+ * - `visibility_timeout` 안에 ack 하지 않으면 다시 전달됩니다. 생략하면 큐 설정값(기본 30초)입니다.
8487
+ * - 큐의 `max_retries` 를 넘겨 전달된 메시지는 DLQ 로 옮겨집니다(DLQ 가 켜져 있을 때).
8488
+ * - 지연 메시지(`delay_seconds`)는 그 시각이 되어야 받습니다.
8489
+ * - function 트리거가 걸린 큐는 메시지가 트리거로 가므로 consume 할 수 없습니다(409).
8370
8490
  */
8371
8491
  consume(queueID: string, options?: ConsumeOptions): Promise<ConsumeMessagesResponse>;
8372
8492
  /**
@@ -8374,15 +8494,39 @@ declare class QueueAPI {
8374
8494
  *
8375
8495
  * **워커 동작 — Secret Key 필수.** 퍼블릭 키만이면 401 `SECRET_KEY_REQUIRED`.
8376
8496
  *
8377
- * ackToken: auto_ack=false 소비 시 반환된 ack_token. 생략 시 message_ids로만 확인.
8497
+ * ackToken: auto_ack=false 소비 시 반환된 ack_token. 생략해도 message_ids 로 실제로 확인되지만,
8498
+ * 넘기면 그 소비가 잡고 있던 자리를 바로 풀어 다음 consume() 이 기다리지 않습니다.
8499
+ *
8500
+ * 응답의 `acked` 는 실제로 확인한 메시지, `not_found` 는 큐에 이미 없던 메시지(auto_ack=true 로 받았거나
8501
+ * 이미 ack 됨, 만료)입니다.
8378
8502
  */
8379
- ack(queueID: string, messageIds: string[], ackToken?: string): Promise<void>;
8503
+ ack(queueID: string, messageIds: string[], ackToken?: string): Promise<AckMessagesResponse>;
8380
8504
  /**
8381
- * 메시지 재시도 요청 (Nack)
8505
+ * 메시지 재시도 요청 (Nack) — "이 메시지를 다시 전달하라"
8382
8506
  *
8383
8507
  * **워커 동작 — Secret Key 필수.** 퍼블릭 키만이면 401 `SECRET_KEY_REQUIRED`.
8508
+ *
8509
+ * - `options` 를 통째로 생략하면 같은 메시지를 곧바로 다시 전달합니다(`requeue: 'redeliver'`, 같은 `message_id`,
8510
+ * `delivery_count` 증가, 큐의 `max_retries` 를 넘기면 DLQ).
8511
+ * - `payload` 나 `delay_seconds` 를 주면 새 메시지로 다시 넣고 원본은 끝냅니다(`requeue: 'republish'`, 새
8512
+ * `message_id`, `headers["Nack-Count"]` 증가). 지연은 서버가 예약해 두므로 기다리는 동안 다른 메시지를 막지 않습니다.
8513
+ * - 어느 쪽이든 따로 `ack()` 하지 않으며, 원본이 visibility timeout 뒤 한 번 더 오지 않습니다.
8514
+ * - `auto_ack: true` 로 받은 메시지는 이미 큐에 없으므로 `payload` 를 줘야 합니다(없으면 404).
8515
+ *
8516
+ * @example
8517
+ * ```typescript
8518
+ * const { messages, ack_token } = await worker.queue.consume('queue-id')
8519
+ * for (const msg of messages) {
8520
+ * try {
8521
+ * await processMessage(msg.body)
8522
+ * await worker.queue.ack('queue-id', [msg.message_id], ack_token)
8523
+ * } catch {
8524
+ * await worker.queue.nack('queue-id', msg.message_id, { delay_seconds: 30, ack_token })
8525
+ * }
8526
+ * }
8527
+ * ```
8384
8528
  */
8385
- nack(queueID: string, messageId: string, options?: NackMessageRequest): Promise<void>;
8529
+ nack(queueID: string, messageId: string, options?: NackMessageRequest): Promise<NackMessageResponse>;
8386
8530
  /**
8387
8531
  * 큐 정보 조회 (큐 목록/깊이 등 운영 정보)
8388
8532
  *
@@ -9895,37 +10039,56 @@ declare class StorageAPI {
9895
10039
  }
9896
10040
 
9897
10041
  interface IssueBillingKeyRequest {
9898
- /** 토스 인증 키 (카드 등록 후 받은 키) */
9899
- auth_key: string;
9900
- /** 고객 이메일 */
10042
+ /** 고객 키. 생략하면 서버가 `customer_<uuid>` 로 만든다. 위젯과 `confirmBillingKey` 에 같은 값을 쓴다. */
10043
+ customer_key?: string;
10044
+ /**
10045
+ * @deprecated 서버가 받지 않는 값이다 (발급 시작 단계에는 토스 인증 키가 없다). 위젯 콜백의 authKey 는
10046
+ * `confirmBillingKey({ auth_key })` 에 넣는다.
10047
+ */
10048
+ auth_key?: string;
10049
+ /** @deprecated 발급 시작은 빌링키를 저장하지 않아 버려진다. `confirmBillingKey` 에 넣는다. */
9901
10050
  customer_email?: string;
9902
- /** 고객 이름 */
10051
+ /** @deprecated 발급 시작은 빌링키를 저장하지 않아 버려진다. `confirmBillingKey` 에 넣는다. */
9903
10052
  customer_name?: string;
9904
- /** 고객 전화번호 */
10053
+ /** @deprecated 발급 시작은 빌링키를 저장하지 않아 버려진다. `confirmBillingKey` 에 넣는다. */
9905
10054
  customer_phone?: string;
9906
- /** 기본 결제 수단으로 설정 */
10055
+ /** @deprecated 발급 시작은 빌링키를 저장하지 않아 버려진다. `confirmBillingKey` 에 넣는다. */
9907
10056
  is_default?: boolean;
9908
10057
  }
9909
10058
  interface IssueBillingKeyResponse {
9910
- /** 빌링키 등록을 위한 URL */
9911
- auth_url: string;
9912
- /** 고객 키 (토스에서 사용) */
10059
+ /** 고객 키 (토스 위젯 `customerKey` 에 넣는다) */
9913
10060
  customer_key: string;
9914
- /** 토스 클라이언트 키 */
10061
+ /** 토스 클라이언트 키 (위젯 초기화용) */
9915
10062
  toss_client_key: string;
10063
+ /** 앱 결제 설정의 성공 URL (설정이 없으면 플랫폼 기본값). 위젯 `successUrl` 로 쓸 수 있다. */
10064
+ success_url: string;
10065
+ /** 앱 결제 설정의 실패 URL (설정이 없으면 플랫폼 기본값). 위젯 `failUrl` 로 쓸 수 있다. */
10066
+ fail_url: string;
10067
+ /**
10068
+ * @deprecated 발급 시작 때 만든 임시 UUID 로 저장되지 않는다. `confirmBillingKey` 가 돌려주는 빌링키의 `id` 와
10069
+ * 다르므로 `create({ billing_key_id })` 에 쓰면 안 된다.
10070
+ */
10071
+ billing_key_id: string;
10072
+ /** @deprecated 서버가 채우지 않는다 (늘 빈 문자열). 토스 위젯(`requestBillingAuth`)을 쓴다. */
10073
+ auth_url: string;
9916
10074
  }
9917
10075
  interface ConfirmBillingKeyRequest {
9918
10076
  /** 고객 키 */
9919
10077
  customer_key: string;
9920
10078
  /** 토스 인증 키 */
9921
10079
  auth_key: string;
9922
- /** 고객 이메일 */
10080
+ /** 고객 이메일. 빌링키에 저장되어 `BillingKeyResponse.customer_email` 로 돌아온다 (최대 255자). */
9923
10081
  customer_email?: string;
9924
- /** 고객 이름 */
10082
+ /** 고객 이름. 빌링키에 저장되어 `BillingKeyResponse.customer_name` 으로 돌아온다 (최대 255자). */
9925
10083
  customer_name?: string;
9926
- /** 고객 전화번호 */
10084
+ /** 고객 전화번호. 빌링키에 저장된다 (최대 255자). */
9927
10085
  customer_phone?: string;
9928
- /** 기본 결제 수단으로 설정 */
10086
+ /** 카드 별명. 나중에 `updateBillingKey` 로 바꿀 수 있다 (최대 255자). */
10087
+ card_nickname?: string;
10088
+ /**
10089
+ * 기본 결제 수단으로 설정. 생략하면 `true` 다. `true` 면 같은 회원의 다른 빌링키는 기본에서 내려간다
10090
+ * (회원 토큰 없이 서버 키로 호출하면 다른 빌링키는 건드리지 않는다).
10091
+ */
9929
10092
  is_default?: boolean;
9930
10093
  }
9931
10094
  interface BillingKeyResponse {
@@ -10515,7 +10678,10 @@ declare class SubscriptionAPI {
10515
10678
  * 빌링키 발급 시작
10516
10679
  * 토스 카드 등록 위젯에 필요한 정보를 반환합니다.
10517
10680
  *
10518
- * @returns 토스 클라이언트 키, 고객 키 등
10681
+ * 빌링키는 아직 만들어지지 않는다. 카드 등록이 끝나면 `confirmBillingKey` 가 빌링키를 만들고 그 `id` 를 돌려준다.
10682
+ *
10683
+ * @param request - 선택. `customer_key` 를 직접 정할 때만 넣는다 (생략하면 서버가 만든다)
10684
+ * @returns 토스 클라이언트 키, 고객 키, 성공/실패 URL
10519
10685
  *
10520
10686
  * @example
10521
10687
  * ```typescript
@@ -10530,7 +10696,7 @@ declare class SubscriptionAPI {
10530
10696
  * })
10531
10697
  * ```
10532
10698
  */
10533
- issueBillingKey(): Promise<IssueBillingKeyResponse>;
10699
+ issueBillingKey(request?: IssueBillingKeyRequest): Promise<IssueBillingKeyResponse>;
10534
10700
  /**
10535
10701
  * 빌링키 등록 확인
10536
10702
  * 토스에서 카드 등록 완료 후 빌링키를 확정합니다.
@@ -12990,4 +13156,4 @@ declare class ConnectBase {
12990
13156
  updateConfig(config: Partial<ConnectBaseConfig>): void;
12991
13157
  }
12992
13158
 
12993
- export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, type ChargeWithBillingKeyRequest, type ChargeWithBillingKeyResponse, type ChatMessage, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsentOptions, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameDelta, GameError, type GameErrorCode, type GameEventHandlers, type GamePlayer, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, type GameServerMessage, type GameServerMessageType, type GameState, type GameTransportConfig, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListFilesOptions, type ListFilesResult, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, NativeAPI, type OAuthCallbackResponse, type OAuthPrompt, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StorageVideoListOptions, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeJob, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
13159
+ export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIGeneratedImage, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AckMessagesResponse, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, type ChargeWithBillingKeyRequest, type ChargeWithBillingKeyResponse, type ChatMessage, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsentOptions, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameDelta, GameError, type GameErrorCode, type GameEventHandlers, type GamePlayer, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, type GameServerMessage, type GameServerMessageType, type GameState, type GameTransportConfig, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListFilesOptions, type ListFilesResult, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, type NackMessageResponse, NativeAPI, type OAuthCallbackResponse, type OAuthPrompt, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchError, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StorageVideoListOptions, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeJob, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
package/dist/index.js CHANGED
@@ -337,7 +337,9 @@ function aiErrorToApiError(err) {
337
337
  bad_gateway: 502,
338
338
  service_unavailable: 503,
339
339
  rate_limit_exceeded: 429,
340
- quota_exceeded: 429,
340
+ // 서버는 플랜 할당량 소진을 402 로 준다 (errclass.go ErrPlatformQuotaExceeded, ai_controller
341
+ // enforceChatQuota). 예전 표는 429 라 비스트리밍 응답과 mid-stream 응답의 statusCode 가 달랐다.
342
+ quota_exceeded: 402,
341
343
  invalid_request: 400,
342
344
  config_error: 400,
343
345
  unauthorized: 401
@@ -415,6 +417,10 @@ var AIAPI = class {
415
417
  onReasoning: (delta) => {
416
418
  reasoning += delta;
417
419
  },
420
+ onImage: (image) => {
421
+ if (!aggregated.images) aggregated.images = [];
422
+ aggregated.images.push(image);
423
+ },
418
424
  onSources: (sources) => {
419
425
  aggregated.sources = sources;
420
426
  },
@@ -599,6 +605,11 @@ var AIAPI = class {
599
605
  }
600
606
  if (event.reasoning) callbacks.onReasoning?.(event.reasoning);
601
607
  if (event.content) callbacks.onToken?.(event.content);
608
+ for (const image of event.images ?? []) {
609
+ if (image && typeof image.url === "string" && image.url) {
610
+ callbacks.onImage?.(image);
611
+ }
612
+ }
602
613
  if (event.done) {
603
614
  callbacks.onDone?.();
604
615
  return;
@@ -10238,6 +10249,10 @@ var QueueAPI = class {
10238
10249
  }
10239
10250
  /**
10240
10251
  * 배치 메시지 발행 (최대 100개) — 엔드유저 동작. 퍼블릭 키만으로 동작합니다.
10252
+ *
10253
+ * 각 메시지는 `publish()` 와 같은 규칙을 따릅니다: `delay_seconds`(생략 시 큐 기본 지연), `ttl_seconds`,
10254
+ * FIFO 큐의 `deduplication_id` 자동 생성. 실패한 메시지는 배치 전체를 실패시키지 않고 `failed` 수와
10255
+ * `errors`(위치, 사유)로 알려 줍니다.
10241
10256
  */
10242
10257
  async publishBatch(queueID, data) {
10243
10258
  return this.http.post(`/v1/public/queues/${queueID}/messages/batch`, data);
@@ -10250,6 +10265,12 @@ var QueueAPI = class {
10250
10265
  *
10251
10266
  * auto_ack=false(기본값): 명시적 Ack 필요. 응답의 ack_token을 ack() 호출 시 전달.
10252
10267
  * auto_ack=true: 즉시 자동 Ack (at-most-once, 유실 가능)
10268
+ *
10269
+ * - 여러 워커(프로세스)가 같은 큐를 동시에 consume 해도 됩니다. 한 메시지는 한 워커에게만 갑니다.
10270
+ * - `visibility_timeout` 안에 ack 하지 않으면 다시 전달됩니다. 생략하면 큐 설정값(기본 30초)입니다.
10271
+ * - 큐의 `max_retries` 를 넘겨 전달된 메시지는 DLQ 로 옮겨집니다(DLQ 가 켜져 있을 때).
10272
+ * - 지연 메시지(`delay_seconds`)는 그 시각이 되어야 받습니다.
10273
+ * - function 트리거가 걸린 큐는 메시지가 트리거로 가므로 consume 할 수 없습니다(409).
10253
10274
  */
10254
10275
  async consume(queueID, options) {
10255
10276
  const params = new URLSearchParams();
@@ -10277,7 +10298,11 @@ var QueueAPI = class {
10277
10298
  *
10278
10299
  * **워커 동작 — Secret Key 필수.** 퍼블릭 키만이면 401 `SECRET_KEY_REQUIRED`.
10279
10300
  *
10280
- * ackToken: auto_ack=false 소비 시 반환된 ack_token. 생략 시 message_ids로만 확인.
10301
+ * ackToken: auto_ack=false 소비 시 반환된 ack_token. 생략해도 message_ids 로 실제로 확인되지만,
10302
+ * 넘기면 그 소비가 잡고 있던 자리를 바로 풀어 다음 consume() 이 기다리지 않습니다.
10303
+ *
10304
+ * 응답의 `acked` 는 실제로 확인한 메시지, `not_found` 는 큐에 이미 없던 메시지(auto_ack=true 로 받았거나
10305
+ * 이미 ack 됨, 만료)입니다.
10281
10306
  */
10282
10307
  async ack(queueID, messageIds, ackToken) {
10283
10308
  const data = {
@@ -10287,9 +10312,29 @@ var QueueAPI = class {
10287
10312
  return this.http.post(`/v1/public/queues/${queueID}/messages/ack`, data);
10288
10313
  }
10289
10314
  /**
10290
- * 메시지 재시도 요청 (Nack)
10315
+ * 메시지 재시도 요청 (Nack) — "이 메시지를 다시 전달하라"
10291
10316
  *
10292
10317
  * **워커 동작 — Secret Key 필수.** 퍼블릭 키만이면 401 `SECRET_KEY_REQUIRED`.
10318
+ *
10319
+ * - `options` 를 통째로 생략하면 같은 메시지를 곧바로 다시 전달합니다(`requeue: 'redeliver'`, 같은 `message_id`,
10320
+ * `delivery_count` 증가, 큐의 `max_retries` 를 넘기면 DLQ).
10321
+ * - `payload` 나 `delay_seconds` 를 주면 새 메시지로 다시 넣고 원본은 끝냅니다(`requeue: 'republish'`, 새
10322
+ * `message_id`, `headers["Nack-Count"]` 증가). 지연은 서버가 예약해 두므로 기다리는 동안 다른 메시지를 막지 않습니다.
10323
+ * - 어느 쪽이든 따로 `ack()` 하지 않으며, 원본이 visibility timeout 뒤 한 번 더 오지 않습니다.
10324
+ * - `auto_ack: true` 로 받은 메시지는 이미 큐에 없으므로 `payload` 를 줘야 합니다(없으면 404).
10325
+ *
10326
+ * @example
10327
+ * ```typescript
10328
+ * const { messages, ack_token } = await worker.queue.consume('queue-id')
10329
+ * for (const msg of messages) {
10330
+ * try {
10331
+ * await processMessage(msg.body)
10332
+ * await worker.queue.ack('queue-id', [msg.message_id], ack_token)
10333
+ * } catch {
10334
+ * await worker.queue.nack('queue-id', msg.message_id, { delay_seconds: 30, ack_token })
10335
+ * }
10336
+ * }
10337
+ * ```
10293
10338
  */
10294
10339
  async nack(queueID, messageId, options) {
10295
10340
  return this.http.post(
@@ -13006,7 +13051,10 @@ var SubscriptionAPI = class {
13006
13051
  * 빌링키 발급 시작
13007
13052
  * 토스 카드 등록 위젯에 필요한 정보를 반환합니다.
13008
13053
  *
13009
- * @returns 토스 클라이언트 키, 고객 키 등
13054
+ * 빌링키는 아직 만들어지지 않는다. 카드 등록이 끝나면 `confirmBillingKey` 가 빌링키를 만들고 그 `id` 를 돌려준다.
13055
+ *
13056
+ * @param request - 선택. `customer_key` 를 직접 정할 때만 넣는다 (생략하면 서버가 만든다)
13057
+ * @returns 토스 클라이언트 키, 고객 키, 성공/실패 URL
13010
13058
  *
13011
13059
  * @example
13012
13060
  * ```typescript
@@ -13021,11 +13069,13 @@ var SubscriptionAPI = class {
13021
13069
  * })
13022
13070
  * ```
13023
13071
  */
13024
- async issueBillingKey() {
13072
+ async issueBillingKey(request) {
13025
13073
  const prefix = this.getPublicPrefix();
13074
+ const body = {};
13075
+ if (request?.customer_key) body.customer_key = request.customer_key;
13026
13076
  return this.http.post(
13027
13077
  `${prefix}/subscriptions/billing-keys`,
13028
- {}
13078
+ body
13029
13079
  );
13030
13080
  }
13031
13081
  /**
@@ -13768,8 +13818,8 @@ var SupportAPI = class {
13768
13818
  }
13769
13819
  };
13770
13820
  function detectSdkVersion() {
13771
- if ("6.19.0") {
13772
- return "6.19.0";
13821
+ if ("6.21.0") {
13822
+ return "6.21.0";
13773
13823
  }
13774
13824
  return "unknown";
13775
13825
  }