connectbase-client 6.17.0 → 6.18.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
@@ -6418,11 +6418,33 @@ declare class NativeAPI {
6418
6418
  type OAuthProvider = "google" | "kakao" | "naver" | "apple" | "github" | "discord";
6419
6419
  /**
6420
6420
  * 활성화된 OAuth 프로바이더 정보
6421
+ *
6422
+ * 프로바이더의 client_id 는 돌려주지 않는다. 인가 주소는 서버가 만들므로 앱이 프로바이더 주소를 직접
6423
+ * 조립할 일이 없다 — 로그인은 `signIn()` / `signInWithPopup()` 으로 시작한다.
6421
6424
  */
6422
6425
  interface EnabledProviderInfo {
6423
- provider: OAuthProvider;
6424
- client_id: string;
6426
+ /** 프로바이더 이름. 범용 OIDC 는 콘솔에 등록한 slug 다. */
6427
+ provider: OAuthProvider | (string & {});
6428
+ /** 표시 이름 (예: "Google") */
6429
+ name: string;
6430
+ /** 플랫폼 쪽 설정이 갖춰져 지금 로그인을 시작할 수 있는지 */
6431
+ available: boolean;
6432
+ /** "builtin"(플랫폼 제공) 또는 "oidc"(앱이 등록한 IdP). 없으면 builtin 이다. */
6433
+ kind?: "builtin" | "oidc";
6434
+ /** OIDC 프로바이더의 버튼 아이콘 (선택) */
6435
+ logo_url?: string;
6425
6436
  }
6437
+ /**
6438
+ * 로그인 화면 동작.
6439
+ *
6440
+ * - `select_account`: 로그인할 계정을 고르게 한다. "다른 계정으로 로그인" 버튼에 쓴다.
6441
+ * 이 값이 없으면 프로바이더는 브라우저에 로그인된 계정으로 화면 없이 바로 들어간다.
6442
+ * - `consent`: 이미 동의했어도 권한 동의 화면을 다시 보인다.
6443
+ *
6444
+ * 프로바이더별 동작: Google, GitHub, Kakao, 범용 OIDC 는 계정 선택 화면, Naver 는 다시 로그인 화면이 뜬다.
6445
+ * Discord, Apple 은 계정 선택이 없어 `select_account` 를 무시한다(로그인은 그대로 된다).
6446
+ */
6447
+ type OAuthPrompt = "select_account" | "consent";
6426
6448
  /**
6427
6449
  * 활성화된 프로바이더 목록 응답
6428
6450
  */
@@ -6493,12 +6515,15 @@ declare class OAuthAPI {
6493
6515
  constructor(http: HttpClient);
6494
6516
  /**
6495
6517
  * 활성화된 OAuth 프로바이더 목록 조회
6496
- * 콘솔에서 설정된 소셜 로그인 프로바이더 목록을 반환합니다.
6518
+ * 콘솔에서 설정된 소셜 로그인 프로바이더 목록을 반환합니다. 로그인 버튼을 그릴 때 씁니다.
6519
+ *
6520
+ * 프로바이더의 client_id 는 주지 않습니다. 프로바이더 인가 주소를 직접 만들지 말고 `signIn()` /
6521
+ * `signInWithPopup()` 으로 시작하세요("다른 계정으로 로그인" 은 `prompt: 'select_account'`).
6497
6522
  *
6498
6523
  * @example
6499
6524
  * ```typescript
6500
6525
  * const { providers } = await cb.oauth.getEnabledProviders()
6501
- * // [{ provider: 'google', client_id: '...' }, { provider: 'kakao', client_id: '...' }]
6526
+ * // [{ provider: 'google', name: 'Google', available: true, kind: 'builtin' }]
6502
6527
  * ```
6503
6528
  */
6504
6529
  getEnabledProviders(): Promise<EnabledProvidersResponse>;
@@ -6518,6 +6543,8 @@ declare class OAuthAPI {
6518
6543
  * @param state - 앱이 콜백까지 들고 가고 싶은 값(선택). `getCallbackResult()` 결과의 `state` 로 돌아온다.
6519
6544
  * 로그인 CSRF 방어는 SDK 가 별도의 일회용 값으로 항상 수행하므로 이 값이 없어도 안전하다.
6520
6545
  * @param options - `createIfNotExists: true` 면 미가입 사용자를 자동 가입시킨다([signUp] 과 동일 동작).
6546
+ * `prompt: 'select_account'` 면 프로바이더가 계정 선택 화면을 보인다("다른 계정으로 로그인").
6547
+ * 없으면 브라우저에 로그인된 계정으로 화면 없이 바로 들어간다.
6521
6548
  *
6522
6549
  * @example
6523
6550
  * ```typescript
@@ -6526,6 +6553,9 @@ declare class OAuthAPI {
6526
6553
  *
6527
6554
  * // 로그인=가입 통합 버튼 — 신규면 자동 가입
6528
6555
  * await cb.oauth.signIn('google', 'https://myapp.com/oauth/callback', undefined, { createIfNotExists: true })
6556
+ *
6557
+ * // "다른 계정으로 로그인" — 구글 계정 선택 화면을 띄운다
6558
+ * await cb.oauth.signIn('google', 'https://myapp.com/oauth/callback', undefined, { prompt: 'select_account' })
6529
6559
  * ```
6530
6560
  *
6531
6561
  * @example
@@ -6539,6 +6569,7 @@ declare class OAuthAPI {
6539
6569
  */
6540
6570
  signIn(provider: OAuthProvider, callbackUrl: string, state?: string, options?: {
6541
6571
  createIfNotExists?: boolean;
6572
+ prompt?: OAuthPrompt;
6542
6573
  }): Promise<void>;
6543
6574
  /**
6544
6575
  * 소셜 회원가입 (리다이렉트 방식) — 사용자가 명시적으로 가입 의사를 표시한 경우에만 호출.
@@ -6546,8 +6577,12 @@ declare class OAuthAPI {
6546
6577
  * 기존 회원이면 그대로 로그인 (idempotent). 없으면 신규 AppMember 생성.
6547
6578
  * "로그인" 버튼에는 [signIn] 을 쓰고, "회원가입" 버튼에서만 이 메서드를 호출해야 silent
6548
6579
  * auto-signup 회귀를 방지할 수 있다.
6580
+ *
6581
+ * @param options - `prompt: 'select_account'` 면 프로바이더가 계정 선택 화면을 보인다.
6549
6582
  */
6550
- signUp(provider: OAuthProvider, callbackUrl: string, state?: string): Promise<void>;
6583
+ signUp(provider: OAuthProvider, callbackUrl: string, state?: string, options?: {
6584
+ prompt?: OAuthPrompt;
6585
+ }): Promise<void>;
6551
6586
  private startCentralOAuth;
6552
6587
  /**
6553
6588
  * 콜백에서 확인할 일회용 state 를 만들어 이 브라우저에 저장합니다.
@@ -6581,9 +6616,14 @@ declare class OAuthAPI {
6581
6616
  * 팝업 닫힘 감지가 제한될 수 있습니다. 3분 타임아웃이 적용되며,
6582
6617
  * 안정적인 동작이 필요하면 signIn() (리다이렉트 방식)을 사용하세요.
6583
6618
  *
6619
+ * 계정 선택: 팝업이 떠도 프로바이더는 브라우저에 로그인된 계정으로 바로 들어간다. 사용자가 계정을 고르게
6620
+ * 하려면 `{ prompt: 'select_account' }` 를 준다("다른 계정으로 로그인" 버튼).
6621
+ *
6584
6622
  * @param provider - OAuth 프로바이더
6585
6623
  * @param callbackUrl - (선택) OAuth 완료 후 리다이렉트될 팝업의 URL. 미지정 시 서버 제공 콜백 사용.
6586
6624
  * 지정한다면 이 메서드를 부르는 페이지와 같은 출처여야 합니다(콜백 페이지는 토큰을 같은 출처 창에만 넘깁니다).
6625
+ * @param options - `intent: 'signup'` 이면 미가입 사용자를 가입시킨다(기본 'signin' 은 미가입이면
6626
+ * `account_not_found`). `prompt: 'select_account'` 면 계정 선택 화면을 보인다.
6587
6627
  * @returns 로그인 결과
6588
6628
  *
6589
6629
  * @example
@@ -6592,12 +6632,16 @@ declare class OAuthAPI {
6592
6632
  * const result = await cb.oauth.signInWithPopup('google')
6593
6633
  * console.log('로그인 성공:', result.member_id)
6594
6634
  *
6635
+ * // 로그인=가입 통합 + 매번 계정 고르기
6636
+ * await cb.oauth.signInWithPopup('google', undefined, { intent: 'signup', prompt: 'select_account' })
6637
+ *
6595
6638
  * // 커스텀 콜백 URL 사용 (기존 방식)
6596
6639
  * const result = await cb.oauth.signInWithPopup('google', 'https://myapp.com/oauth/callback')
6597
6640
  * ```
6598
6641
  */
6599
6642
  signInWithPopup(provider: OAuthProvider, callbackUrl?: string, options?: {
6600
6643
  intent?: "signin" | "signup";
6644
+ prompt?: OAuthPrompt;
6601
6645
  }): Promise<OAuthCallbackResponse>;
6602
6646
  /**
6603
6647
  * 네이티브 브릿지가 돌려준 주소에서 로그인 결과를 만든다. code 면 교환하고, 토큰이면(response_type 을 모르는 옛 서버)
@@ -9269,6 +9313,30 @@ interface RenameFileResponse {
9269
9313
  }
9270
9314
  interface FetchFilesResponse {
9271
9315
  files: FileItem[];
9316
+ /** 같은 조건으로 `offset + files.length` 부터 더 읽을 항목이 있다 (옛 서버는 보내지 않는다). */
9317
+ has_more?: boolean;
9318
+ }
9319
+ /**
9320
+ * 파일 목록 조회 옵션 (`listFiles`, `getFiles`).
9321
+ */
9322
+ interface ListFilesOptions {
9323
+ /**
9324
+ * 부모 폴더 ID. 지정하면 그 폴더의 **직계 자식만** 반환한다. `null` 이면 **루트 직계만**
9325
+ * (폴더 없이 올린 파일과 최상위 폴더). 생략하면 스토리지 전체를 flat 배열로 반환한다.
9326
+ */
9327
+ parentId?: string | null;
9328
+ /** 한 번에 받을 최대 개수. 생략하면 서버 상한(10,000)까지. */
9329
+ limit?: number;
9330
+ /** 건너뛸 개수 (쪽 나누기). */
9331
+ offset?: number;
9332
+ }
9333
+ /**
9334
+ * 파일 목록 한 쪽 (`listFiles`).
9335
+ */
9336
+ interface ListFilesResult {
9337
+ files: FileItem[];
9338
+ /** true 면 `offset` 을 `offset + files.length` 로 늘려 다음 쪽을 읽는다. */
9339
+ has_more: boolean;
9272
9340
  }
9273
9341
  /**
9274
9342
  * 파일 업로드 진행률 (바이트 단위).
@@ -9303,8 +9371,11 @@ interface UploadFileOptions {
9303
9371
  /** 업로드 취소용 외부 AbortSignal */
9304
9372
  signal?: AbortSignal;
9305
9373
  /**
9306
- * PUT 요청 타임아웃(ms). 기본 30초. 대용량 파일은 이보다 오래 걸릴 수
9307
- * 있으므로 필요 시 늘린다. 0 또는 무한대면 타임아웃을 두지 않는다.
9374
+ * 파일 본문 전송(PUT)의 타임아웃(ms). **기본은 없음** — 전송 시간은 파일 크기와 회선에
9375
+ * 비례하므로 고정 시간으로 끊지 않는다(예전에는 30초라 큰 파일이 끊겼다).
9376
+ * 값을 주면 그 시간 안에 전송이 끝나지 않을 때 끊는다. 0 이면 타임아웃 없음.
9377
+ * 업로드 URL 발급과 완료 요청은 클라이언트의 `requestTimeoutMs` 를 따른다.
9378
+ * 사용자가 취소할 수 있게 하려면 `signal` 을 쓴다.
9308
9379
  */
9309
9380
  timeout?: number;
9310
9381
  }
@@ -9320,7 +9391,7 @@ interface UploadByPathOptions {
9320
9391
  onProgress?: (progress: StorageUploadProgress) => void;
9321
9392
  /** 업로드 취소용 외부 AbortSignal */
9322
9393
  signal?: AbortSignal;
9323
- /** PUT 요청 타임아웃(ms). 기본 30초. */
9394
+ /** 파일 본문 전송(PUT)의 타임아웃(ms). 기본은 없음. {@link UploadFileOptions.timeout} 참고. */
9324
9395
  timeout?: number;
9325
9396
  }
9326
9397
  /**
@@ -9422,6 +9493,11 @@ interface GenerateUploadURLResponse {
9422
9493
  upload_url: string;
9423
9494
  file_id: string;
9424
9495
  public_url: string;
9496
+ /**
9497
+ * `upload_url` 로 PUT 할 때 함께 보낼 헤더 (원래 파일 이름을 담은 `Content-Disposition`).
9498
+ * 보내면 내려받은 파일이 원래 이름을 유지한다. 옛 서버는 보내지 않는다.
9499
+ */
9500
+ upload_headers?: Record<string, string>;
9425
9501
  }
9426
9502
  /**
9427
9503
  * 경로 기반 Presigned URL 생성 요청
@@ -9490,10 +9566,29 @@ declare class StorageAPI {
9490
9566
  * API Key 인증 시 /v1/public 접두사 반환
9491
9567
  */
9492
9568
  private getPublicPrefix;
9569
+ /**
9570
+ * 경로를 마디별로 인코딩한다(`/` 는 구분자로 둔다). `#`, `?`, `%` 가 들어간 파일 이름이
9571
+ * URL 의 조각, 쿼리, 퍼센트 인코딩으로 읽히지 않게 한다. 앞의 `/` 는 뗀다.
9572
+ */
9573
+ private encodePath;
9574
+ /**
9575
+ * 업로드 URL 을 받은 뒤 실패한 업로드를 서버에서 정리한다(행과 예약 용량). 실패해도
9576
+ * 원래 오류를 가리지 않게 삼킨다 — 남은 행은 서버의 정리 작업이 지운다. 덮어쓰기
9577
+ * 업로드는 행이 원래 파일이라 서버가 409 로 거절한다(지우지 않는다).
9578
+ */
9579
+ private cancelQuietly;
9580
+ /**
9581
+ * 업로드 URL 발급 → 직접 PUT → 완료 알림. PUT 이나 완료가 실패하면 업로드를 취소해
9582
+ * 목록에 남는 미완료 행과 예약 용량을 정리한 뒤 원래 오류를 던진다.
9583
+ */
9584
+ private runUpload;
9493
9585
  /**
9494
9586
  * Presigned URL 로 직접 업로드. 호출 전에 URL 스킴(https)을 검증해
9495
9587
  * 서버 응답을 그대로 신뢰하는 SSRF/오용 경로를 차단.
9496
- * 타임아웃과 외부 signal 을 모두 지원한다.
9588
+ *
9589
+ * 전송 시간은 파일 크기와 회선에 비례하므로 **기본 타임아웃을 두지 않는다** — 예전에는
9590
+ * 일반 API 요청과 같은 30초로 끊어 큰 파일이 실패했다. `timeout` 을 명시하면 그 값을 쓰고,
9591
+ * 취소는 `signal` 로 한다.
9497
9592
  *
9498
9593
  * `onProgress` 가 주어지고 `XMLHttpRequest` 를 쓸 수 있는(브라우저) 환경이면
9499
9594
  * XHR 의 `upload.onprogress` 로 바이트 단위 진행률을 보고한다. 그 외에는
@@ -9511,11 +9606,16 @@ declare class StorageAPI {
9511
9606
  *
9512
9607
  * 접근 수준이 `private` 인 스토리지에서는 **자기가 올린 파일만** 반환하며, 멤버 토큰 없이
9513
9608
  * 호출하면 401 이다 (빈 배열이 아니라 에러다 — 빈 목록은 "스토리지가 비었다" 와 구분되지
9514
- * 않아 원인을 찾을 수 없기 때문). `shared` / `public_read` 는 종전대로 전체를 반환한다.
9609
+ * 않아 원인을 찾을 수 없기 때문). `shared` / `public_read` 는 전체를 반환한다.
9610
+ * 업로드가 끝나지 않은 파일은 나오지 않는다.
9611
+ *
9612
+ * 한 번에 최대 10,000개다. 더 많을 수 있으면 {@link listFiles} 로 `has_more` 를 보며
9613
+ * 쪽을 나눠 읽는다.
9515
9614
  *
9516
9615
  * @param storageId - 파일 스토리지 ID
9517
- * @param parentId - 부모 폴더 ID. 지정 시 해당 폴더의 **직계 자식만** 반환한다.
9518
- * 미지정 시 스토리지 **전체 파일 트리**를 flat 배열로 반환한다.
9616
+ * @param parentIdOrOptions - 부모 폴더 ID(문자열, 기존 호출과 호환) 또는 {@link ListFilesOptions}.
9617
+ * 폴더 ID 를 주면 그 폴더의 **직계 자식만**, `{ parentId: null }` 이면 **루트 직계만**,
9618
+ * 생략하면 스토리지 **전체 파일 트리**를 flat 배열로 반환한다.
9519
9619
  *
9520
9620
  * @example
9521
9621
  * ```ts
@@ -9524,9 +9624,38 @@ declare class StorageAPI {
9524
9624
  *
9525
9625
  * // 특정 폴더의 직계 자식만 (대용량 버킷에서 전체 트리 전송 회피)
9526
9626
  * const subFiles = await cb.storage.getFiles('storage-id', 'folder-id')
9627
+ *
9628
+ * // 루트에 있는 것만, 50개씩
9629
+ * const rootFiles = await cb.storage.getFiles('storage-id', { parentId: null, limit: 50 })
9630
+ * ```
9631
+ */
9632
+ getFiles(storageId: string, parentIdOrOptions?: string | ListFilesOptions): Promise<FileItem[]>;
9633
+ /**
9634
+ * 파일 목록 한 쪽 조회 (쪽 나누기)
9635
+ *
9636
+ * {@link getFiles} 와 같은 조건에 `has_more` 를 함께 돌려준다. `has_more` 가 true 면
9637
+ * `offset` 을 늘려 다음 쪽을 읽는다.
9638
+ *
9639
+ * @example
9640
+ * ```ts
9641
+ * let offset = 0
9642
+ * for (;;) {
9643
+ * const page = await cb.storage.listFiles('storage-id', { parentId: 'folder-id', limit: 100, offset })
9644
+ * render(page.files)
9645
+ * if (!page.has_more) break
9646
+ * offset += page.files.length
9647
+ * }
9527
9648
  * ```
9528
9649
  */
9529
- getFiles(storageId: string, parentId?: string): Promise<FileItem[]>;
9650
+ listFiles(storageId: string, options?: ListFilesOptions): Promise<ListFilesResult>;
9651
+ /**
9652
+ * 파일(폴더) 한 건 조회
9653
+ *
9654
+ * 목록과 같은 접근 수준 규칙이다 — `private` 은 자기가 올린 파일만(남의 파일은 404, 익명은 401).
9655
+ * 업로드가 끝나지 않은 파일은 404 다. `private` 파일의 `url` 은 1시간짜리 서명 주소라 만료되면
9656
+ * 이것으로 다시 받는다.
9657
+ */
9658
+ getFile(storageId: string, fileId: string): Promise<FileItem>;
9530
9659
  /**
9531
9660
  * 파일 업로드 (Presigned URL 방식)
9532
9661
  *
@@ -9551,12 +9680,17 @@ declare class StorageAPI {
9551
9680
  * // 특정 폴더에 업로드 (기존 방식 그대로)
9552
9681
  * await cb.storage.uploadFile('storage-id', file, 'folder-id')
9553
9682
  *
9554
- * // 진행률 표시 + 특정 폴더
9683
+ * // 진행률 표시 + 특정 폴더 + 취소 버튼
9684
+ * const controller = new AbortController()
9555
9685
  * await cb.storage.uploadFile('storage-id', file, {
9556
9686
  * parentId: 'folder-id',
9557
9687
  * onProgress: (p) => console.log(`${p.percentage}%`), // { loaded, total, percentage }
9688
+ * signal: controller.signal,
9558
9689
  * })
9559
9690
  * ```
9691
+ *
9692
+ * 파일 본문 전송에는 기본 타임아웃이 없다(큰 파일도 끝까지 올린다). 시간 제한이 필요하면
9693
+ * `timeout`(ms)을 준다. 전송이나 완료가 실패하면 서버의 미완료 업로드를 자동으로 취소한다.
9560
9694
  */
9561
9695
  uploadFile(storageId: string, file: File, parentIdOrOptions?: string | UploadFileOptions): Promise<UploadFileResponse>;
9562
9696
  /**
@@ -9585,16 +9719,28 @@ declare class StorageAPI {
9585
9719
  * 사용한다.
9586
9720
  */
9587
9721
  deleteFile(storageId: string, fileId: string): Promise<void>;
9722
+ /**
9723
+ * 업로드 취소
9724
+ *
9725
+ * 업로드 URL 을 받았지만 끝내지 않은 업로드를 취소한다 — 서버의 미완료 행과 예약한 용량을
9726
+ * 정리하고, 일부 올라간 바이트가 있으면 지운다. `uploadFile` / `uploadByPath` 는 전송이나
9727
+ * 완료가 실패하면 이것을 자동으로 부르므로, 직접 부를 일은 업로드를 직접 구현할 때다.
9728
+ *
9729
+ * 이미 완료된 파일은 취소할 수 없다(409) — 지우려면 `deleteFile` 을 쓴다.
9730
+ */
9731
+ cancelUpload(storageId: string, fileId: string): Promise<void>;
9588
9732
  /**
9589
9733
  * 파일/폴더 이동
9590
9734
  *
9591
- * Public Key 인증만으로는 이 엔드포인트가 노출되지 않습니다. JWT(콘솔 토큰)가 필요합니다.
9735
+ * 삭제와 같은 권한이 필요하다 — 업로더 본인(멤버 토큰) 또는 앱 관리자(Secret Key).
9736
+ * `new_parent_id` 를 생략하면 루트로 옮긴다.
9592
9737
  */
9593
9738
  moveFile(storageId: string, fileId: string, data: MoveFileRequest): Promise<void>;
9594
9739
  /**
9595
9740
  * 파일/폴더 이름 변경
9596
9741
  *
9597
- * Public Key 인증만으로는 이 엔드포인트가 노출되지 않습니다. JWT(콘솔 토큰)가 필요합니다.
9742
+ * 삭제와 같은 권한이 필요하다 — 업로더 본인(멤버 토큰) 또는 앱 관리자(Secret Key).
9743
+ * 폴더면 하위 항목의 경로도 함께 바뀐다.
9598
9744
  */
9599
9745
  renameFile(storageId: string, fileId: string, data: RenameFileRequest): Promise<RenameFileResponse>;
9600
9746
  /**
@@ -9633,6 +9779,10 @@ declare class StorageAPI {
9633
9779
  * 검사가 없으면 사이트가 참조 중인 이미지를 임의 콘텐츠로 갈아치울 수 있기 때문이다.
9634
9780
  * 기존 파일의 업로더 본인이나 앱 관리자가 아니면 403 이다.
9635
9781
  *
9782
+ * 경로의 중간 폴더가 없으면 서버가 만든다(`/profiles/user123/` 폴더가 목록에도 보인다).
9783
+ * `overwrite: false` 인데 같은 경로가 있으면 같은 폴더에 번호를 붙인 이름(`avatar (1).png`)으로
9784
+ * 올라간다. 파일 이름의 `#`, `?`, 공백, 한글은 SDK 가 인코딩한다.
9785
+ *
9636
9786
  * @example
9637
9787
  * ```ts
9638
9788
  * // 프로필 이미지 업로드 (항상 같은 URL 유지)
@@ -11098,56 +11248,119 @@ interface PlatformIssueReply {
11098
11248
  created_at: string;
11099
11249
  }
11100
11250
 
11251
+ /**
11252
+ * 영상 하나.
11253
+ *
11254
+ * `thumbnail_url` 은 video-server 의 공개 썸네일 주소다(`.../thumbnail/image?token=...`). 토큰이 실려 있어
11255
+ * `<img src>` 에 그대로 넣는다. 응답을 받는 쪽이 볼 수 없는 영상(비공개, 멤버 전용)이면 비어 있다.
11256
+ * 재생 주소는 실리지 않는다 — {@link VideoAPI.getStreamUrl} 을 쓴다.
11257
+ */
11101
11258
  interface Video {
11102
11259
  id: string;
11103
- channel_id: string;
11260
+ /** 영상이 속한 채널. 채널 없이 올린 영상은 없다. */
11261
+ channel_id?: string;
11262
+ /** 영상이 속한 비디오 스토리지. 스토리지 없이 올린 영상은 없다. */
11263
+ storage_video_id?: string;
11104
11264
  title: string;
11105
11265
  description?: string;
11266
+ tags?: string[];
11267
+ /** 길이(초). 변환이 끝나야 채워진다. */
11268
+ duration?: number;
11269
+ width?: number;
11270
+ height?: number;
11271
+ /** 원본 파일 크기(바이트). */
11272
+ file_size: number;
11106
11273
  status: VideoStatus;
11107
11274
  visibility: VideoVisibility;
11108
- duration?: number;
11109
- original_filename: string;
11110
- original_size: number;
11111
- qualities: VideoQuality[];
11275
+ age_restriction: "none" | "age_13" | "age_18";
11112
11276
  thumbnail_url?: string;
11113
- stream_url?: string;
11114
- tags?: string[];
11277
+ /** 변환 중 뽑은 썸네일 전부(첫 번째가 thumbnail_url 과 같은 그림). */
11278
+ thumbnail_urls?: string[];
11279
+ /** 화질 목록. 늘 배열이다(아직 없으면 빈 배열). */
11280
+ qualities: VideoQuality[];
11115
11281
  view_count: number;
11116
11282
  like_count: number;
11117
11283
  comment_count: number;
11284
+ /** 초안이면 공개 목록에 나오지 않는다. */
11285
+ is_draft: boolean;
11286
+ scheduled_at?: string;
11287
+ ppv_price?: number;
11288
+ ppv_currency?: string;
11289
+ /** 올린 회원. 회원 토큰 없이 올린 영상은 없다. */
11290
+ member_id?: string;
11118
11291
  created_at: string;
11119
11292
  updated_at: string;
11293
+ published_at?: string;
11120
11294
  }
11121
- type VideoStatus = "uploading" | "processing" | "ready" | "failed";
11295
+ /**
11296
+ * 영상 상태.
11297
+ *
11298
+ * - `uploading`: 청크를 받는 중
11299
+ * - `uploaded`: 업로드가 끝나 변환을 기다리는 중
11300
+ * - `processing`: 변환 중
11301
+ * - `ready`: 재생 가능(첫 화질이 끝나면 ready 가 되고 나머지 화질은 이어서 붙는다)
11302
+ * - `failed`: 변환 실패 (`retryTranscode` 로 다시 시도)
11303
+ *
11304
+ * 삭제된 영상은 응답에 나오지 않는다.
11305
+ */
11306
+ type VideoStatus = "uploading" | "uploaded" | "processing" | "ready" | "failed";
11122
11307
  type VideoVisibility = "public" | "private" | "unlisted" | "members_only" | "ppv";
11123
11308
  interface VideoQuality {
11124
11309
  quality: string;
11125
11310
  width: number;
11126
11311
  height: number;
11312
+ /** kbps */
11127
11313
  bitrate: number;
11128
- size: number;
11314
+ /** 이 화질 MP4 의 크기(바이트). */
11315
+ file_size: number;
11129
11316
  status: "pending" | "processing" | "ready" | "failed";
11130
11317
  }
11131
11318
  interface VideoListResponse {
11132
11319
  videos: Video[];
11133
11320
  total: number;
11134
- page: number;
11135
11321
  limit: number;
11322
+ offset: number;
11136
11323
  }
11324
+ /**
11325
+ * `cb.video.list()` 옵션.
11326
+ *
11327
+ * 공개키 경로는 **public 이고 초안이 아닌 영상만** 돌려준다. `visibility` 에 public 외의 값을 넣으면 400 이다.
11328
+ */
11137
11329
  interface VideoListOptions {
11138
11330
  status?: VideoStatus;
11139
- visibility?: VideoVisibility;
11140
- search?: string;
11141
- channel_id?: string;
11331
+ /** 공개키 경로에서는 `public` 만 허용된다. */
11332
+ visibility?: "public";
11333
+ /** 한 번에 받을 개수(기본 20, 최대 100). */
11334
+ limit?: number;
11335
+ /** 건너뛸 개수. `page` 와 함께 쓰지 않는다. */
11336
+ offset?: number;
11337
+ /** 1 부터 시작하는 쪽 번호. `offset = (page - 1) * limit` 으로 바뀐다. */
11142
11338
  page?: number;
11339
+ order_by?: "created_at" | "view_count" | "published_at";
11340
+ order?: "asc" | "desc";
11341
+ }
11342
+ /** 스토리지 영상 목록 옵션. 앱 관리자(Secret Key)는 모든 공개 범위를 본다. */
11343
+ interface StorageVideoListOptions {
11344
+ status?: VideoStatus;
11345
+ visibility?: VideoVisibility;
11143
11346
  limit?: number;
11347
+ offset?: number;
11348
+ page?: number;
11349
+ order_by?: "created_at" | "view_count" | "published_at";
11350
+ order?: "asc" | "desc";
11144
11351
  }
11145
11352
  interface UploadOptions {
11146
11353
  title: string;
11147
11354
  description?: string;
11148
11355
  visibility?: VideoVisibility;
11149
11356
  tags?: string[];
11150
- channel_id?: string;
11357
+ age_restriction?: "none" | "age_13" | "age_18";
11358
+ /** true 면 초안으로 만든다(공개 목록에 나오지 않는다). 기본 false — 바로 게시된다. */
11359
+ is_draft?: boolean;
11360
+ /** 업로드를 멈춘다. 멈추면 서버의 업로드 세션도 취소하고 AbortError 로 거부된다. */
11361
+ signal?: AbortSignal;
11362
+ /** 청크 하나의 재시도 횟수(기본 3). 네트워크 오류, 408, 429, 5xx 만 다시 보낸다. */
11363
+ chunkRetries?: number;
11151
11364
  onProgress?: (progress: UploadProgress) => void;
11152
11365
  }
11153
11366
  interface UploadProgress {
@@ -11162,12 +11375,31 @@ interface UpdateVideoRequest {
11162
11375
  description?: string;
11163
11376
  visibility?: VideoVisibility;
11164
11377
  tags?: string[];
11165
- thumbnail_url?: string;
11378
+ age_restriction?: "none" | "age_13" | "age_18";
11379
+ /** false 로 바꾸면 게시된다(published_at 이 그 시각으로 찍힌다). */
11380
+ is_draft?: boolean;
11381
+ /** ISO 8601. 빈 문자열이면 예약을 지운다. */
11382
+ scheduled_at?: string;
11383
+ ppv_price?: number;
11384
+ ppv_currency?: string;
11166
11385
  }
11386
+ /**
11387
+ * 재생 주소. 주소는 모두 `expires_at` 까지 쓸 수 있고, 지나면 다시 받는다.
11388
+ *
11389
+ * - `hls_url`: 적응형 HLS. hls.js 나 Safari 네이티브 HLS 에 넣는다. 토큰이 주소에 실려 있어 헤더가 필요 없다.
11390
+ * `quality` 를 지정했으면 그 화질 하나의 playlist 다. HLS 산출물이 없는 옛 영상이면 없다.
11391
+ * - `mp4_url`: 가장 높은 화질(또는 지정한 화질)의 MP4. `<video src>` 에 바로 넣는다.
11392
+ * - `qualities`: 화질 → MP4 주소.
11393
+ */
11167
11394
  interface StreamURLResponse {
11168
- /** 마스터 HLS 플레이리스트 URL (적응형 비트레이트) */
11395
+ hls_url?: string;
11396
+ mp4_url: string;
11397
+ /** mp4_url 의 화질. */
11398
+ quality?: string;
11399
+ /**
11400
+ * @deprecated `mp4_url` 과 같은 값이다. 이름과 달리 HLS 가 아니다 — HLS 는 `hls_url` 을 쓴다.
11401
+ */
11169
11402
  master_playlist: string;
11170
- /** 화질 키 → 화질별 플레이리스트 URL 맵 (예: { "720p": "https://..." }) */
11171
11403
  qualities: Record<string, string>;
11172
11404
  expires_at: string;
11173
11405
  }
@@ -11181,17 +11413,22 @@ interface VideoCompleteUploadResponse {
11181
11413
  video_id: string;
11182
11414
  status: VideoStatus;
11183
11415
  }
11416
+ /** 변환 상태. `jobs` 는 화질마다 하나다. */
11184
11417
  interface TranscodeStatus {
11185
11418
  video_id: string;
11186
- status: "pending" | "processing" | "completed" | "failed";
11187
- progress: number;
11188
- qualities: QualityProgress[];
11189
- error?: string;
11419
+ status: VideoStatus;
11420
+ jobs: TranscodeJob[];
11190
11421
  }
11191
- interface QualityProgress {
11422
+ interface TranscodeJob {
11423
+ id: string;
11192
11424
  quality: string;
11193
- status: "pending" | "processing" | "completed" | "failed";
11425
+ /** `cancelled` 는 원본보다 높아서 만들지 않기로 한 화질이다. */
11426
+ status: "pending" | "queued" | "processing" | "completed" | "failed" | "cancelled";
11427
+ /** 0-100 */
11194
11428
  progress: number;
11429
+ error?: string;
11430
+ started_at?: string;
11431
+ completed_at?: string;
11195
11432
  }
11196
11433
  interface WaitOptions {
11197
11434
  timeout?: number;
@@ -11355,7 +11592,9 @@ interface VideoStorage {
11355
11592
  cdn_provider: string;
11356
11593
  cdn_config: Record<string, unknown>;
11357
11594
  default_qualities: string[];
11595
+ /** 저장만 되는 설정이다. HLS 암호화는 아직 적용되지 않는다(세그먼트는 암호화되지 않은 채 서명 토큰으로만 보호된다). */
11358
11596
  hls_encryption_enabled: boolean;
11597
+ /** 스토리지 경로(`cb.video.storage.getStreamUrl`)가 내는 재생 주소의 수명(시간, 1~24). 기본 4. */
11359
11598
  token_expiry_hours: number;
11360
11599
  created_at: string;
11361
11600
  updated_at: string;
@@ -11392,11 +11631,16 @@ interface VideoStorageListResponse {
11392
11631
  storage_videos: VideoStorage[];
11393
11632
  total_count: number;
11394
11633
  }
11634
+ /** `cb.video.storage.upload` 옵션. 의미는 {@link UploadOptions} 와 같다. */
11395
11635
  interface StorageUploadOptions {
11396
11636
  title: string;
11397
11637
  description?: string;
11398
11638
  visibility?: VideoVisibility;
11399
11639
  tags?: string[];
11640
+ age_restriction?: "none" | "age_13" | "age_18";
11641
+ is_draft?: boolean;
11642
+ signal?: AbortSignal;
11643
+ chunkRetries?: number;
11400
11644
  onProgress?: (progress: UploadProgress) => void;
11401
11645
  }
11402
11646
  interface SuperChat {
@@ -11461,35 +11705,43 @@ declare class VideoAPI {
11461
11705
  private getPublicPrefix;
11462
11706
  private videoFetch;
11463
11707
  /**
11464
- * Upload a video file with chunked upload support
11708
+ * 영상 업로드 (청크 업로드, video-server 직통).
11709
+ *
11710
+ * 회원 토큰이 필요하다(업로드한 회원이 영상의 주인이 된다). 스토리지에 넣으려면 {@link storage.upload} 를 쓴다 —
11711
+ * 그쪽은 core 서버를 거치고, 스토리지의 화질 설정(default_qualities)과 토큰 수명이 적용되며, Secret Key 로도 올릴 수 있다.
11712
+ *
11713
+ * - `title` 이 비면 서버에 아무것도 보내기 전에 거부한다.
11714
+ * - 청크마다 네트워크 오류, 408, 429, 5xx 를 `chunkRetries`(기본 3)번까지 지수 백오프로 다시 보낸다.
11715
+ * - `signal` 로 멈출 수 있다. 멈추면 서버의 업로드 세션을 취소하고 AbortError 로 거부한다.
11716
+ * - `is_draft` 를 주지 않으면 바로 게시된다(공개 범위가 public 이면 공개 목록에 나온다).
11717
+ *
11718
+ * 반환되는 영상은 막 업로드된 상태(`uploaded`)다. 재생하려면 {@link waitForReady} 로 기다린다.
11465
11719
  */
11466
11720
  upload(file: File, options: UploadOptions): Promise<Video>;
11467
11721
  /**
11468
- * Wait for video processing to complete
11722
+ * 변환이 끝나 재생할 수 있을 때까지 기다린다.
11723
+ *
11724
+ * `onProgress` 의 percentage 는 화질별 변환 작업(`getTranscodeStatus().jobs`)의 진행률 평균이다.
11725
+ * 원본보다 높아 만들지 않기로 한 화질(cancelled)은 빼고 센다.
11469
11726
  */
11470
11727
  waitForReady(videoId: string, options?: WaitOptions): Promise<Video>;
11471
11728
  /**
11472
- * 영상 목록 조회.
11729
+ * 공개 영상 목록.
11473
11730
  *
11474
- * 필터링/페이지네이션 옵션을 조합해 조건에 맞는 영상들을 반환한다.
11475
- * API Key(publicKey) 또는 JWT 인증이 모두 지원되며, publicKey 로는 공개 영상만 노출된다.
11731
+ * 공개키 경로는 **public 이고 초안이 아닌 영상만** 돌려준다(`visibility` 에 다른 값을 넣으면 400). 앱의 모든 영상은
11732
+ * 서버에서 Secret Key 로 {@link storage.listVideos} 를 쓰거나 콘솔에서 본다.
11476
11733
  *
11477
- * @param options - 필터/페이지네이션 옵션
11478
- * @param options.status - `uploading` | `processing` | `ready` | `failed`
11479
- * @param options.visibility - `public` | `unlisted` | `private` | `members`
11480
- * @param options.search - 제목 부분 일치 검색
11481
- * @param options.channel_id - 특정 채널로 한정
11482
- * @param options.page - 1 부터 시작
11483
- * @param options.limit - 기본 20, 최대 100
11484
- * @returns `videos` 배열과 `total` 카운트를 포함하는 응답
11734
+ * @param options - 필터/페이지 옵션. `page`(1부터)는 `offset = (page - 1) * limit` 으로 바뀐다.
11735
+ * @returns `videos`, `total`, `limit`, `offset`
11485
11736
  *
11486
11737
  * @example
11487
11738
  * ```ts
11488
- * // 내 채널의 최근 공개 영상 10개
11739
+ * // 조회수 많은 공개 영상 10개씩, 두 번째 쪽
11489
11740
  * const { videos, total } = await cb.video.list({
11490
- * channel_id: 'ch_abc',
11491
- * visibility: 'public',
11741
+ * order_by: 'view_count',
11742
+ * order: 'desc',
11492
11743
  * limit: 10,
11744
+ * page: 2,
11493
11745
  * })
11494
11746
  * ```
11495
11747
  */
@@ -11522,32 +11774,43 @@ declare class VideoAPI {
11522
11774
  */
11523
11775
  delete(videoId: string): Promise<void>;
11524
11776
  /**
11525
- * 영상 스트리밍 URL 획득 (HLS manifest 권장).
11777
+ * 재생 주소를 받는다.
11778
+ *
11779
+ * - `hls_url`: 적응형 HLS. hls.js 나 Safari 네이티브 HLS 에 넣는다(토큰이 주소에 실려 있어 헤더가 필요 없다).
11780
+ * HLS 산출물이 없는 옛 영상이면 없다.
11781
+ * - `mp4_url`: 가장 높은 화질(또는 지정한 화질)의 MP4. `<video src>` 에 바로 넣는다.
11782
+ * - `qualities`: 화질 → MP4 주소.
11783
+ * - `master_playlist`: `mp4_url` 과 같은 값(옛 이름). HLS 가 아니다.
11526
11784
  *
11527
- * 반환된 URL 은 `hls.js` 또는 Safari 네이티브 HLS 플레이어에 그대로 전달 가능하다.
11528
- * 서명된 URL 이므로 만료 시간이 존재하며, 갱신이 필요한 경우 다시 호출한다.
11785
+ * 주소는 `expires_at` 까지 쓸 수 있다. 지나면 다시 부른다. 비공개, 멤버 전용 영상은 회원 토큰이 있어야 하고
11786
+ * 볼 수 없으면 404 다. 변환이 끝나지 않았으면 409(`code: video_not_ready`)다.
11529
11787
  *
11530
11788
  * @param videoId - 대상 영상 ID
11531
- * @param quality - `auto` (기본) | `1080p` | `720p` | `480p` | `360p` 등 트랜스코딩된 품질 레벨
11532
- * @returns HLS manifest URL 과 만료 정보
11789
+ * @param quality - `1080p` | `720p` | `480p` | `360p` | `240p`. 주면 그 화질만 싣고 `hls_url` 도 그 화질 하나다.
11790
+ * 생략하거나 `auto` 면 모든 화질.
11533
11791
  *
11534
11792
  * @example
11535
11793
  * ```ts
11536
- * const { master_playlist, qualities, expires_at } = await cb.video.getStreamUrl(videoId)
11537
- * videoElement.src = master_playlist // 적응형 비트레이트(HLS.js 등으로 재생)
11538
- * // 특정 화질 고정이 필요하면 qualities['720p'] 사용
11794
+ * const stream = await cb.video.getStreamUrl(videoId)
11795
+ * if (stream.hls_url && Hls.isSupported()) {
11796
+ * const hls = new Hls()
11797
+ * hls.loadSource(stream.hls_url)
11798
+ * hls.attachMedia(videoElement)
11799
+ * } else {
11800
+ * videoElement.src = stream.hls_url ?? stream.mp4_url // Safari 는 HLS 를 네이티브로 재생한다
11801
+ * }
11539
11802
  * ```
11540
11803
  */
11541
11804
  getStreamUrl(videoId: string, quality?: string): Promise<StreamURLResponse>;
11542
11805
  /**
11543
- * Get available thumbnails for a video.
11806
+ * 썸네일 주소 목록. 첫 번째가 대표 썸네일이다.
11544
11807
  *
11545
- * 서버는 대표 썸네일 1개(`thumbnail_url`) + 선택적 추가 썸네일 목록(`thumbnail_urls`)을
11546
- * 반환한다. 둘을 합쳐 중복 없는 URL 배열로 정규화해 돌려준다.
11808
+ * 주소는 video-server 의 공개 썸네일 경로이고 토큰이 실려 있어 `<img src>` 에 그대로 넣는다(공개키 헤더 불필요).
11809
+ * 볼 수 없는 영상이면 404 다.
11547
11810
  */
11548
11811
  getThumbnails(videoId: string): Promise<string[]>;
11549
11812
  /**
11550
- * Get transcode status
11813
+ * 변환 상태. `jobs` 는 화질마다 하나이고 각각 `progress`(0-100)가 있다.
11551
11814
  */
11552
11815
  getTranscodeStatus(videoId: string): Promise<TranscodeStatus>;
11553
11816
  /**
@@ -11739,13 +12002,21 @@ declare class VideoAPI {
11739
12002
  */
11740
12003
  delete: (storageId: string) => Promise<void>;
11741
12004
  /**
11742
- * Upload a video to a specific storage via core-server proxy (chunked)
12005
+ * 스토리지에 영상 업로드 (core 서버 프록시, 청크 업로드).
12006
+ *
12007
+ * {@link VideoAPI.upload} 와 다른 점: 스토리지의 화질 설정(default_qualities)이 적용되고, 재생 주소 수명이
12008
+ * 스토리지의 token_expiry_hours 를 따르며, 회원 토큰 없이 공개키나 Secret Key 로도 올릴 수 있다(공개키만으로 올린
12009
+ * 영상은 올린 회원이 기록되지 않아 공개 API 로 고치거나 지울 수 없다).
12010
+ * 재시도, 중단(signal), title 사전 검사, is_draft 는 `upload` 와 같다.
11743
12011
  */
11744
12012
  upload: (storageId: string, file: File, options: StorageUploadOptions) => Promise<Video>;
11745
12013
  /**
11746
- * List videos in a specific storage
12014
+ * 스토리지의 영상 목록.
12015
+ *
12016
+ * 공개키로 부르면 업로더 소유권과 관계없이 스토리지의 영상이 나온다. 비공개 영상의 썸네일 주소는 볼 수 있는 쪽
12017
+ * (업로더 회원, Secret Key)에게만 실린다.
11747
12018
  */
11748
- listVideos: (storageId: string, options?: VideoListOptions) => Promise<VideoListResponse>;
12019
+ listVideos: (storageId: string, options?: StorageVideoListOptions) => Promise<VideoListResponse>;
11749
12020
  /**
11750
12021
  * Get a video in a specific storage
11751
12022
  */
@@ -11755,9 +12026,10 @@ declare class VideoAPI {
11755
12026
  */
11756
12027
  deleteVideo: (storageId: string, videoId: string) => Promise<void>;
11757
12028
  /**
11758
- * Get streaming URL for a video in a specific storage
12029
+ * 스토리지 영상의 재생 주소. 응답 모양은 {@link VideoAPI.getStreamUrl} 과 같고, 수명은 스토리지의
12030
+ * token_expiry_hours(1~24시간)다. Secret Key 로 부르면 비공개 영상도 받는다(수명 최대 1시간).
11759
12031
  */
11760
- getStreamUrl: (storageId: string, videoId: string) => Promise<StreamURLResponse>;
12032
+ getStreamUrl: (storageId: string, videoId: string, quality?: string) => Promise<StreamURLResponse>;
11761
12033
  /**
11762
12034
  * Get transcode status for a video in a specific storage
11763
12035
  */
@@ -12713,4 +12985,4 @@ declare class ConnectBase {
12713
12985
  updateConfig(config: Partial<ConnectBaseConfig>): void;
12714
12986
  }
12715
12987
 
12716
- 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 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 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 QualityProgress, 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 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 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 };
12988
+ 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 };