From 8a2fd58ff08848cbdc95bd64ed75342052c7c1d2 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Fri, 23 Feb 2024 14:33:53 +0100 Subject: [PATCH] Add js protocol package (#601) * Add js protocol package * add agent and webhook * fix version * remove unneeded tsconfig * add index type file * Add js release action * test workflow * install protoc * install nodejs first * remove dev branch * move into packages folder * add other files * add egress, ingress, sip * fix commit path * Add types entry point * add gitattributes * no dry run --- .gitattributes | 1 + .github/workflows/release-js.yaml | 60 + packages/js/.gitignore | 1 + packages/js/package.json | 27 + packages/js/pnpm-lock.yaml | 283 +++ packages/js/src/gen/livekit_agent_pb.d.ts | 458 +++++ packages/js/src/gen/livekit_agent_pb.js | 188 ++ packages/js/src/gen/livekit_egress_pb.d.ts | 1969 +++++++++++++++++++ packages/js/src/gen/livekit_egress_pb.js | 572 ++++++ packages/js/src/gen/livekit_ingress_pb.d.ts | 818 ++++++++ packages/js/src/gen/livekit_ingress_pb.js | 265 +++ packages/js/src/gen/livekit_models_pb.d.ts | 1781 +++++++++++++++++ packages/js/src/gen/livekit_models_pb.js | 612 ++++++ packages/js/src/gen/livekit_rtc_pb.d.ts | 1782 +++++++++++++++++ packages/js/src/gen/livekit_rtc_pb.js | 565 ++++++ packages/js/src/gen/livekit_sip_pb.d.ts | 578 ++++++ packages/js/src/gen/livekit_sip_pb.js | 198 ++ packages/js/src/gen/livekit_webhook_pb.d.ts | 105 + packages/js/src/gen/livekit_webhook_pb.js | 42 + packages/js/src/gen/version.d.ts | 1 + packages/js/src/gen/version.js | 2 + packages/js/src/index.d.ts | 8 + packages/js/src/index.js | 8 + 23 files changed, 10324 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/workflows/release-js.yaml create mode 100644 packages/js/.gitignore create mode 100644 packages/js/package.json create mode 100644 packages/js/pnpm-lock.yaml create mode 100644 packages/js/src/gen/livekit_agent_pb.d.ts create mode 100644 packages/js/src/gen/livekit_agent_pb.js create mode 100644 packages/js/src/gen/livekit_egress_pb.d.ts create mode 100644 packages/js/src/gen/livekit_egress_pb.js create mode 100644 packages/js/src/gen/livekit_ingress_pb.d.ts create mode 100644 packages/js/src/gen/livekit_ingress_pb.js create mode 100644 packages/js/src/gen/livekit_models_pb.d.ts create mode 100644 packages/js/src/gen/livekit_models_pb.js create mode 100644 packages/js/src/gen/livekit_rtc_pb.d.ts create mode 100644 packages/js/src/gen/livekit_rtc_pb.js create mode 100644 packages/js/src/gen/livekit_sip_pb.d.ts create mode 100644 packages/js/src/gen/livekit_sip_pb.js create mode 100644 packages/js/src/gen/livekit_webhook_pb.d.ts create mode 100644 packages/js/src/gen/livekit_webhook_pb.js create mode 100644 packages/js/src/gen/version.d.ts create mode 100644 packages/js/src/gen/version.js create mode 100644 packages/js/src/index.d.ts create mode 100644 packages/js/src/index.js diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7de141a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +packages/js/src/gen/* linguist-generated=true \ No newline at end of file diff --git a/.github/workflows/release-js.yaml b/.github/workflows/release-js.yaml new file mode 100644 index 0000000..44238ca --- /dev/null +++ b/.github/workflows/release-js.yaml @@ -0,0 +1,60 @@ +# Copyright 2023 LiveKit, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Generate and release JS protocol package + +on: + workflow_dispatch: + push: + branches: ["main"] + +defaults: + run: + working-directory: ./packages/js + +jobs: + generate: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + cache-dependency-path: "packages/js/pnpm-lock.yaml" + - name: Install Protoc + uses: arduino/setup-protoc@v3 + - name: Install dependencies + run: pnpm install + - name: Version package + if: startsWith(github.event.ref, 'refs/tags/v') + run: npm version from-git + - name: Generate files + run: | + pnpm generate:version + pnpm generate:proto + - name: Add changes + uses: EndBug/add-and-commit@v9 + with: + add: '["packages/js"]' + default_author: github_actions + message: auto-generated JS files + - name: Publish + if: startsWith(github.event.ref, 'refs/tags/v') + run: pnpm ci:publish diff --git a/packages/js/.gitignore b/packages/js/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/packages/js/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/packages/js/package.json b/packages/js/package.json new file mode 100644 index 0000000..ee285c7 --- /dev/null +++ b/packages/js/package.json @@ -0,0 +1,27 @@ +{ + "name": "@livekit/protocol", + "version": "13.0.0", + "description": "", + "type": "module", + "main": "src/index.js", + "types": "src/index.d.ts", + "files": [ + "src" + ], + "scripts": { + "generate:version": "genversion --esm --semi src/gen/version.js", + "generate:proto": "protoc --es_out src/gen --es_opt target=js+dts -I=../../ ../../livekit_rtc.proto ../../livekit_models.proto ../../livekit_agent.proto ../../livekit_webhook.proto ../../livekit_egress.proto ../../livekit_ingress.proto ../../livekit_sip.proto", + "ci:publish": "pnpm publish" + }, + "keywords": [], + "author": "LiveKit", + "license": "Apache-2.0", + "devDependencies": { + "@bufbuild/buf": "^1.29.0", + "@bufbuild/protoc-gen-es": "^1.7.2", + "genversion": "^3.2.0" + }, + "dependencies": { + "@bufbuild/protobuf": "^1.7.2" + } +} diff --git a/packages/js/pnpm-lock.yaml b/packages/js/pnpm-lock.yaml new file mode 100644 index 0000000..fd0792c --- /dev/null +++ b/packages/js/pnpm-lock.yaml @@ -0,0 +1,283 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@bufbuild/protobuf': + specifier: ^1.7.2 + version: 1.7.2 + +devDependencies: + '@bufbuild/buf': + specifier: ^1.29.0 + version: 1.29.0 + '@bufbuild/protoc-gen-es': + specifier: ^1.7.2 + version: 1.7.2(@bufbuild/protobuf@1.7.2) + genversion: + specifier: ^3.2.0 + version: 3.2.0 + +packages: + + /@bufbuild/buf-darwin-arm64@1.29.0: + resolution: {integrity: sha512-5hKxsARoY2WpWq1n5ONFqqGuauHb4yILKXCy37KRYCKiRLWmIP5yI3gWvWHKoH7sUJWTQmBqdJoCvYQr6ahQnw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-darwin-x64@1.29.0: + resolution: {integrity: sha512-wOAPxbPLBns4AHiComWtdO1sx1J1p6mDYTbqmloHuI+B5U2rDbMsoHoe4nBcoMF8+RHxoqjypha29wVo6yzbZg==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-linux-aarch64@1.29.0: + resolution: {integrity: sha512-jLk2J/wyyM7KNJ/DkLfhy3eS2/Bdb70e/56adMkapSoLJmghnpgxW+oFznMxxQUX5I9BU5hTn1UhDFxgLwhP7g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-linux-x64@1.29.0: + resolution: {integrity: sha512-heLOywj3Oaoh69RnTx7tHsuz6rEnvz77bghLEOghsrjBR6Jcpcwc137EZR4kRTIWJNrE8Kmo3RVeXlv144qQIQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-win32-arm64@1.29.0: + resolution: {integrity: sha512-Eglyvr3PLqVucuHBcQ61conyBgH9BRaoLpKWcce1gYBVlxMQM1NxjVjGOWihxQ1dXXw5qZXmYfVODf3gSwPMuQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-win32-x64@1.29.0: + resolution: {integrity: sha512-wRk6co+nqHqEq4iLolXgej0jUVlWlTtGHjKaq54lTbKZrwxrBgql6qS06abgNPRASX0++XT9m3QRZ97qEIC/HQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf@1.29.0: + resolution: {integrity: sha512-euksXeFtvlvAV5j94LqXb69qQcJvFfo8vN1d3cx+IzhOKoipykuQQTq7mOWVo2R0kdk6yIMBLBofOYOsh0Df8g==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@bufbuild/buf-darwin-arm64': 1.29.0 + '@bufbuild/buf-darwin-x64': 1.29.0 + '@bufbuild/buf-linux-aarch64': 1.29.0 + '@bufbuild/buf-linux-x64': 1.29.0 + '@bufbuild/buf-win32-arm64': 1.29.0 + '@bufbuild/buf-win32-x64': 1.29.0 + dev: true + + /@bufbuild/protobuf@1.7.2: + resolution: {integrity: sha512-i5GE2Dk5ekdlK1TR7SugY4LWRrKSfb5T1Qn4unpIMbfxoeGKERKQ59HG3iYewacGD10SR7UzevfPnh6my4tNmQ==} + + /@bufbuild/protoc-gen-es@1.7.2(@bufbuild/protobuf@1.7.2): + resolution: {integrity: sha512-yiRk/T+YGmpSVvIkybCjPt+QyM/pLWMO+MAiz6auvCsiAgfXfc5nFFosD4yBYXID55M6eIkgBcity1AoJ6I30A==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + '@bufbuild/protobuf': 1.7.2 + peerDependenciesMeta: + '@bufbuild/protobuf': + optional: true + dependencies: + '@bufbuild/protobuf': 1.7.2 + '@bufbuild/protoplugin': 1.7.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@bufbuild/protoplugin@1.7.2: + resolution: {integrity: sha512-N3QtO8XWD4F4alMtASWtxBw6BWXp4aLz7rPBXH4KTULdjpUHnq46g15TsrG0/8szZw6pIklTO3lFe14dl6ZYdA==} + dependencies: + '@bufbuild/protobuf': 1.7.2 + '@typescript/vfs': 1.5.0 + typescript: 4.5.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript/vfs@1.5.0: + resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + dev: true + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /ejs@3.1.9: + resolution: {integrity: sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==} + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + jake: 10.8.7 + dev: true + + /filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + dependencies: + minimatch: 5.1.6 + dev: true + + /find-package@1.0.0: + resolution: {integrity: sha512-yVn71XCCaNgxz58ERTl8nA/8YYtIQDY9mHSrgFBfiFtdNNfY0h183Vh8BRkKxD8x9TUw3ec290uJKhDVxqGZBw==} + dependencies: + parents: 1.0.1 + dev: true + + /genversion@3.2.0: + resolution: {integrity: sha512-OIYSX6XYA8PHecLDCTri30hadSZfAjZ8Iq1+BBDXqLWP4dRLuJNLoNjsSWtTpw97IccK2LDWzkEstxAB8GdN7g==} + engines: {node: '>=10.0.0'} + hasBin: true + dependencies: + commander: 7.2.0 + ejs: 3.1.9 + find-package: 1.0.0 + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /jake@10.8.7: + resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==} + engines: {node: '>=10'} + hasBin: true + dependencies: + async: 3.2.5 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /parents@1.0.1: + resolution: {integrity: sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==} + dependencies: + path-platform: 0.11.15 + dev: true + + /path-platform@0.11.15: + resolution: {integrity: sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==} + engines: {node: '>= 0.8.0'} + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /typescript@4.5.2: + resolution: {integrity: sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true diff --git a/packages/js/src/gen/livekit_agent_pb.d.ts b/packages/js/src/gen/livekit_agent_pb.d.ts new file mode 100644 index 0000000..25ba1bb --- /dev/null +++ b/packages/js/src/gen/livekit_agent_pb.d.ts @@ -0,0 +1,458 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_agent.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { ParticipantInfo, Room } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.JobType + */ +export declare enum JobType { + /** + * @generated from enum value: JT_ROOM = 0; + */ + JT_ROOM = 0, + + /** + * @generated from enum value: JT_PUBLISHER = 1; + */ + JT_PUBLISHER = 1, +} + +/** + * @generated from enum livekit.WorkerStatus + */ +export declare enum WorkerStatus { + /** + * @generated from enum value: WS_AVAILABLE = 0; + */ + WS_AVAILABLE = 0, + + /** + * @generated from enum value: WS_FULL = 1; + */ + WS_FULL = 1, +} + +/** + * @generated from enum livekit.JobStatus + */ +export declare enum JobStatus { + /** + * @generated from enum value: JS_UNKNOWN = 0; + */ + JS_UNKNOWN = 0, + + /** + * @generated from enum value: JS_SUCCESS = 1; + */ + JS_SUCCESS = 1, + + /** + * @generated from enum value: JS_FAILED = 2; + */ + JS_FAILED = 2, +} + +/** + * @generated from message livekit.AgentInfo + */ +export declare class AgentInfo extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string version = 3; + */ + version: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AgentInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AgentInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): AgentInfo; + + static fromJsonString(jsonString: string, options?: Partial): AgentInfo; + + static equals(a: AgentInfo | PlainMessage | undefined, b: AgentInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.Job + */ +export declare class Job extends Message { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: livekit.JobType type = 2; + */ + type: JobType; + + /** + * @generated from field: livekit.Room room = 3; + */ + room?: Room; + + /** + * @generated from field: optional livekit.ParticipantInfo participant = 4; + */ + participant?: ParticipantInfo; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.Job"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Job; + + static fromJson(jsonValue: JsonValue, options?: Partial): Job; + + static fromJsonString(jsonString: string, options?: Partial): Job; + + static equals(a: Job | PlainMessage | undefined, b: Job | PlainMessage | undefined): boolean; +} + +/** + * from Worker to Server + * + * @generated from message livekit.WorkerMessage + */ +export declare class WorkerMessage extends Message { + /** + * @generated from oneof livekit.WorkerMessage.message + */ + message: { + /** + * agent workers need to register themselves with the server first + * + * @generated from field: livekit.RegisterWorkerRequest register = 1; + */ + value: RegisterWorkerRequest; + case: "register"; + } | { + /** + * worker confirms to server that it's available for a job, or declines it + * + * @generated from field: livekit.AvailabilityResponse availability = 2; + */ + value: AvailabilityResponse; + case: "availability"; + } | { + /** + * worker can update its status to the server, including taking itself out of the pool + * + * @generated from field: livekit.UpdateWorkerStatus status = 3; + */ + value: UpdateWorkerStatus; + case: "status"; + } | { + /** + * @generated from field: livekit.JobStatusUpdate job_update = 4; + */ + value: JobStatusUpdate; + case: "jobUpdate"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.WorkerMessage"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkerMessage; + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkerMessage; + + static fromJsonString(jsonString: string, options?: Partial): WorkerMessage; + + static equals(a: WorkerMessage | PlainMessage | undefined, b: WorkerMessage | PlainMessage | undefined): boolean; +} + +/** + * from Server to Worker + * + * @generated from message livekit.ServerMessage + */ +export declare class ServerMessage extends Message { + /** + * @generated from oneof livekit.ServerMessage.message + */ + message: { + /** + * server confirms the registration, from this moment on, the worker is considered active + * + * @generated from field: livekit.RegisterWorkerResponse register = 1; + */ + value: RegisterWorkerResponse; + case: "register"; + } | { + /** + * server asks worker to confirm availability for a job + * + * @generated from field: livekit.AvailabilityRequest availability = 2; + */ + value: AvailabilityRequest; + case: "availability"; + } | { + /** + * @generated from field: livekit.JobAssignment assignment = 3; + */ + value: JobAssignment; + case: "assignment"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ServerMessage"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ServerMessage; + + static fromJson(jsonValue: JsonValue, options?: Partial): ServerMessage; + + static fromJsonString(jsonString: string, options?: Partial): ServerMessage; + + static equals(a: ServerMessage | PlainMessage | undefined, b: ServerMessage | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RegisterWorkerRequest + */ +export declare class RegisterWorkerRequest extends Message { + /** + * @generated from field: livekit.JobType type = 1; + */ + type: JobType; + + /** + * @generated from field: string worker_id = 2; + */ + workerId: string; + + /** + * @generated from field: string version = 3; + */ + version: string; + + /** + * @generated from field: string name = 4; + */ + name: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RegisterWorkerRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RegisterWorkerRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RegisterWorkerRequest; + + static fromJsonString(jsonString: string, options?: Partial): RegisterWorkerRequest; + + static equals(a: RegisterWorkerRequest | PlainMessage | undefined, b: RegisterWorkerRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RegisterWorkerResponse + */ +export declare class RegisterWorkerResponse extends Message { + /** + * @generated from field: string worker_id = 1; + */ + workerId: string; + + /** + * @generated from field: string server_version = 2; + */ + serverVersion: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RegisterWorkerResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RegisterWorkerResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RegisterWorkerResponse; + + static fromJsonString(jsonString: string, options?: Partial): RegisterWorkerResponse; + + static equals(a: RegisterWorkerResponse | PlainMessage | undefined, b: RegisterWorkerResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AvailabilityRequest + */ +export declare class AvailabilityRequest extends Message { + /** + * @generated from field: livekit.Job job = 1; + */ + job?: Job; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AvailabilityRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AvailabilityRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): AvailabilityRequest; + + static fromJsonString(jsonString: string, options?: Partial): AvailabilityRequest; + + static equals(a: AvailabilityRequest | PlainMessage | undefined, b: AvailabilityRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AvailabilityResponse + */ +export declare class AvailabilityResponse extends Message { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: bool available = 2; + */ + available: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AvailabilityResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AvailabilityResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): AvailabilityResponse; + + static fromJsonString(jsonString: string, options?: Partial): AvailabilityResponse; + + static equals(a: AvailabilityResponse | PlainMessage | undefined, b: AvailabilityResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.JobStatusUpdate + */ +export declare class JobStatusUpdate extends Message { + /** + * @generated from field: string job_id = 1; + */ + jobId: string; + + /** + * @generated from field: livekit.JobStatus status = 2; + */ + status: JobStatus; + + /** + * @generated from field: string error = 3; + */ + error: string; + + /** + * @generated from field: string user_data = 4; + */ + userData: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.JobStatusUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): JobStatusUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): JobStatusUpdate; + + static fromJsonString(jsonString: string, options?: Partial): JobStatusUpdate; + + static equals(a: JobStatusUpdate | PlainMessage | undefined, b: JobStatusUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.JobAssignment + */ +export declare class JobAssignment extends Message { + /** + * @generated from field: livekit.Job job = 1; + */ + job?: Job; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.JobAssignment"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): JobAssignment; + + static fromJson(jsonValue: JsonValue, options?: Partial): JobAssignment; + + static fromJsonString(jsonString: string, options?: Partial): JobAssignment; + + static equals(a: JobAssignment | PlainMessage | undefined, b: JobAssignment | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateWorkerStatus + */ +export declare class UpdateWorkerStatus extends Message { + /** + * @generated from field: livekit.WorkerStatus status = 1; + */ + status: WorkerStatus; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateWorkerStatus"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateWorkerStatus; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateWorkerStatus; + + static fromJsonString(jsonString: string, options?: Partial): UpdateWorkerStatus; + + static equals(a: UpdateWorkerStatus | PlainMessage | undefined, b: UpdateWorkerStatus | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_agent_pb.js b/packages/js/src/gen/livekit_agent_pb.js new file mode 100644 index 0000000..e72c377 --- /dev/null +++ b/packages/js/src/gen/livekit_agent_pb.js @@ -0,0 +1,188 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_agent.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { ParticipantInfo, Room } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.JobType + */ +export const JobType = proto3.makeEnum( + "livekit.JobType", + [ + {no: 0, name: "JT_ROOM"}, + {no: 1, name: "JT_PUBLISHER"}, + ], +); + +/** + * @generated from enum livekit.WorkerStatus + */ +export const WorkerStatus = proto3.makeEnum( + "livekit.WorkerStatus", + [ + {no: 0, name: "WS_AVAILABLE"}, + {no: 1, name: "WS_FULL"}, + ], +); + +/** + * @generated from enum livekit.JobStatus + */ +export const JobStatus = proto3.makeEnum( + "livekit.JobStatus", + [ + {no: 0, name: "JS_UNKNOWN"}, + {no: 1, name: "JS_SUCCESS"}, + {no: 2, name: "JS_FAILED"}, + ], +); + +/** + * @generated from message livekit.AgentInfo + */ +export const AgentInfo = proto3.makeMessageType( + "livekit.AgentInfo", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.Job + */ +export const Job = proto3.makeMessageType( + "livekit.Job", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(JobType) }, + { no: 3, name: "room", kind: "message", T: Room }, + { no: 4, name: "participant", kind: "message", T: ParticipantInfo, opt: true }, + ], +); + +/** + * from Worker to Server + * + * @generated from message livekit.WorkerMessage + */ +export const WorkerMessage = proto3.makeMessageType( + "livekit.WorkerMessage", + () => [ + { no: 1, name: "register", kind: "message", T: RegisterWorkerRequest, oneof: "message" }, + { no: 2, name: "availability", kind: "message", T: AvailabilityResponse, oneof: "message" }, + { no: 3, name: "status", kind: "message", T: UpdateWorkerStatus, oneof: "message" }, + { no: 4, name: "job_update", kind: "message", T: JobStatusUpdate, oneof: "message" }, + ], +); + +/** + * from Server to Worker + * + * @generated from message livekit.ServerMessage + */ +export const ServerMessage = proto3.makeMessageType( + "livekit.ServerMessage", + () => [ + { no: 1, name: "register", kind: "message", T: RegisterWorkerResponse, oneof: "message" }, + { no: 2, name: "availability", kind: "message", T: AvailabilityRequest, oneof: "message" }, + { no: 3, name: "assignment", kind: "message", T: JobAssignment, oneof: "message" }, + ], +); + +/** + * @generated from message livekit.RegisterWorkerRequest + */ +export const RegisterWorkerRequest = proto3.makeMessageType( + "livekit.RegisterWorkerRequest", + () => [ + { no: 1, name: "type", kind: "enum", T: proto3.getEnumType(JobType) }, + { no: 2, name: "worker_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.RegisterWorkerResponse + */ +export const RegisterWorkerResponse = proto3.makeMessageType( + "livekit.RegisterWorkerResponse", + () => [ + { no: 1, name: "worker_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "server_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.AvailabilityRequest + */ +export const AvailabilityRequest = proto3.makeMessageType( + "livekit.AvailabilityRequest", + () => [ + { no: 1, name: "job", kind: "message", T: Job }, + ], +); + +/** + * @generated from message livekit.AvailabilityResponse + */ +export const AvailabilityResponse = proto3.makeMessageType( + "livekit.AvailabilityResponse", + () => [ + { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "available", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.JobStatusUpdate + */ +export const JobStatusUpdate = proto3.makeMessageType( + "livekit.JobStatusUpdate", + () => [ + { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "status", kind: "enum", T: proto3.getEnumType(JobStatus) }, + { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "user_data", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.JobAssignment + */ +export const JobAssignment = proto3.makeMessageType( + "livekit.JobAssignment", + () => [ + { no: 1, name: "job", kind: "message", T: Job }, + ], +); + +/** + * @generated from message livekit.UpdateWorkerStatus + */ +export const UpdateWorkerStatus = proto3.makeMessageType( + "livekit.UpdateWorkerStatus", + () => [ + { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(WorkerStatus) }, + ], +); + diff --git a/packages/js/src/gen/livekit_egress_pb.d.ts b/packages/js/src/gen/livekit_egress_pb.d.ts new file mode 100644 index 0000000..c45fa62 --- /dev/null +++ b/packages/js/src/gen/livekit_egress_pb.d.ts @@ -0,0 +1,1969 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_egress.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { AudioCodec, ImageCodec, VideoCodec } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.EncodedFileType + */ +export declare enum EncodedFileType { + /** + * file type chosen based on codecs + * + * @generated from enum value: DEFAULT_FILETYPE = 0; + */ + DEFAULT_FILETYPE = 0, + + /** + * @generated from enum value: MP4 = 1; + */ + MP4 = 1, + + /** + * @generated from enum value: OGG = 2; + */ + OGG = 2, +} + +/** + * @generated from enum livekit.SegmentedFileProtocol + */ +export declare enum SegmentedFileProtocol { + /** + * @generated from enum value: DEFAULT_SEGMENTED_FILE_PROTOCOL = 0; + */ + DEFAULT_SEGMENTED_FILE_PROTOCOL = 0, + + /** + * @generated from enum value: HLS_PROTOCOL = 1; + */ + HLS_PROTOCOL = 1, +} + +/** + * @generated from enum livekit.SegmentedFileSuffix + */ +export declare enum SegmentedFileSuffix { + /** + * @generated from enum value: INDEX = 0; + */ + INDEX = 0, + + /** + * @generated from enum value: TIMESTAMP = 1; + */ + TIMESTAMP = 1, +} + +/** + * @generated from enum livekit.ImageFileSuffix + */ +export declare enum ImageFileSuffix { + /** + * @generated from enum value: IMAGE_SUFFIX_INDEX = 0; + */ + IMAGE_SUFFIX_INDEX = 0, + + /** + * @generated from enum value: IMAGE_SUFFIX_TIMESTAMP = 1; + */ + IMAGE_SUFFIX_TIMESTAMP = 1, +} + +/** + * @generated from enum livekit.StreamProtocol + */ +export declare enum StreamProtocol { + /** + * protocol chosen based on urls + * + * @generated from enum value: DEFAULT_PROTOCOL = 0; + */ + DEFAULT_PROTOCOL = 0, + + /** + * @generated from enum value: RTMP = 1; + */ + RTMP = 1, +} + +/** + * @generated from enum livekit.EncodingOptionsPreset + */ +export declare enum EncodingOptionsPreset { + /** + * 1280x720, 30fps, 3000kpbs, H.264_MAIN / OPUS + * + * @generated from enum value: H264_720P_30 = 0; + */ + H264_720P_30 = 0, + + /** + * 1280x720, 60fps, 4500kbps, H.264_MAIN / OPUS + * + * @generated from enum value: H264_720P_60 = 1; + */ + H264_720P_60 = 1, + + /** + * 1920x1080, 30fps, 4500kbps, H.264_MAIN / OPUS + * + * @generated from enum value: H264_1080P_30 = 2; + */ + H264_1080P_30 = 2, + + /** + * 1920x1080, 60fps, 6000kbps, H.264_MAIN / OPUS + * + * @generated from enum value: H264_1080P_60 = 3; + */ + H264_1080P_60 = 3, + + /** + * 720x1280, 30fps, 3000kpbs, H.264_MAIN / OPUS + * + * @generated from enum value: PORTRAIT_H264_720P_30 = 4; + */ + PORTRAIT_H264_720P_30 = 4, + + /** + * 720x1280, 60fps, 4500kbps, H.264_MAIN / OPUS + * + * @generated from enum value: PORTRAIT_H264_720P_60 = 5; + */ + PORTRAIT_H264_720P_60 = 5, + + /** + * 1080x1920, 30fps, 4500kbps, H.264_MAIN / OPUS + * + * @generated from enum value: PORTRAIT_H264_1080P_30 = 6; + */ + PORTRAIT_H264_1080P_30 = 6, + + /** + * 1080x1920, 60fps, 6000kbps, H.264_MAIN / OPUS + * + * @generated from enum value: PORTRAIT_H264_1080P_60 = 7; + */ + PORTRAIT_H264_1080P_60 = 7, +} + +/** + * @generated from enum livekit.EgressStatus + */ +export declare enum EgressStatus { + /** + * @generated from enum value: EGRESS_STARTING = 0; + */ + EGRESS_STARTING = 0, + + /** + * @generated from enum value: EGRESS_ACTIVE = 1; + */ + EGRESS_ACTIVE = 1, + + /** + * @generated from enum value: EGRESS_ENDING = 2; + */ + EGRESS_ENDING = 2, + + /** + * @generated from enum value: EGRESS_COMPLETE = 3; + */ + EGRESS_COMPLETE = 3, + + /** + * @generated from enum value: EGRESS_FAILED = 4; + */ + EGRESS_FAILED = 4, + + /** + * @generated from enum value: EGRESS_ABORTED = 5; + */ + EGRESS_ABORTED = 5, + + /** + * @generated from enum value: EGRESS_LIMIT_REACHED = 6; + */ + EGRESS_LIMIT_REACHED = 6, +} + +/** + * composite using a web browser + * + * @generated from message livekit.RoomCompositeEgressRequest + */ +export declare class RoomCompositeEgressRequest extends Message { + /** + * required + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * (optional) + * + * @generated from field: string layout = 2; + */ + layout: string; + + /** + * (default false) + * + * @generated from field: bool audio_only = 3; + */ + audioOnly: boolean; + + /** + * (default false) + * + * @generated from field: bool video_only = 4; + */ + videoOnly: boolean; + + /** + * template base url (default https://recorder.livekit.io) + * + * @generated from field: string custom_base_url = 5; + */ + customBaseUrl: string; + + /** + * deprecated (use _output fields) + * + * @generated from oneof livekit.RoomCompositeEgressRequest.output + */ + output: { + /** + * @generated from field: livekit.EncodedFileOutput file = 6 [deprecated = true]; + * @deprecated + */ + value: EncodedFileOutput; + case: "file"; + } | { + /** + * @generated from field: livekit.StreamOutput stream = 7 [deprecated = true]; + * @deprecated + */ + value: StreamOutput; + case: "stream"; + } | { + /** + * @generated from field: livekit.SegmentedFileOutput segments = 10 [deprecated = true]; + * @deprecated + */ + value: SegmentedFileOutput; + case: "segments"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof livekit.RoomCompositeEgressRequest.options + */ + options: { + /** + * (default H264_720P_30) + * + * @generated from field: livekit.EncodingOptionsPreset preset = 8; + */ + value: EncodingOptionsPreset; + case: "preset"; + } | { + /** + * (optional) + * + * @generated from field: livekit.EncodingOptions advanced = 9; + */ + value: EncodingOptions; + case: "advanced"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated livekit.EncodedFileOutput file_outputs = 11; + */ + fileOutputs: EncodedFileOutput[]; + + /** + * @generated from field: repeated livekit.StreamOutput stream_outputs = 12; + */ + streamOutputs: StreamOutput[]; + + /** + * @generated from field: repeated livekit.SegmentedFileOutput segment_outputs = 13; + */ + segmentOutputs: SegmentedFileOutput[]; + + /** + * @generated from field: repeated livekit.ImageOutput image_outputs = 14; + */ + imageOutputs: ImageOutput[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RoomCompositeEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomCompositeEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomCompositeEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): RoomCompositeEgressRequest; + + static equals(a: RoomCompositeEgressRequest | PlainMessage | undefined, b: RoomCompositeEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * record any website + * + * @generated from message livekit.WebEgressRequest + */ +export declare class WebEgressRequest extends Message { + /** + * @generated from field: string url = 1; + */ + url: string; + + /** + * @generated from field: bool audio_only = 2; + */ + audioOnly: boolean; + + /** + * @generated from field: bool video_only = 3; + */ + videoOnly: boolean; + + /** + * @generated from field: bool await_start_signal = 12; + */ + awaitStartSignal: boolean; + + /** + * deprecated (use _output fields) + * + * @generated from oneof livekit.WebEgressRequest.output + */ + output: { + /** + * @generated from field: livekit.EncodedFileOutput file = 4 [deprecated = true]; + * @deprecated + */ + value: EncodedFileOutput; + case: "file"; + } | { + /** + * @generated from field: livekit.StreamOutput stream = 5 [deprecated = true]; + * @deprecated + */ + value: StreamOutput; + case: "stream"; + } | { + /** + * @generated from field: livekit.SegmentedFileOutput segments = 6 [deprecated = true]; + * @deprecated + */ + value: SegmentedFileOutput; + case: "segments"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof livekit.WebEgressRequest.options + */ + options: { + /** + * @generated from field: livekit.EncodingOptionsPreset preset = 7; + */ + value: EncodingOptionsPreset; + case: "preset"; + } | { + /** + * @generated from field: livekit.EncodingOptions advanced = 8; + */ + value: EncodingOptions; + case: "advanced"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated livekit.EncodedFileOutput file_outputs = 9; + */ + fileOutputs: EncodedFileOutput[]; + + /** + * @generated from field: repeated livekit.StreamOutput stream_outputs = 10; + */ + streamOutputs: StreamOutput[]; + + /** + * @generated from field: repeated livekit.SegmentedFileOutput segment_outputs = 11; + */ + segmentOutputs: SegmentedFileOutput[]; + + /** + * @generated from field: repeated livekit.ImageOutput image_outputs = 13; + */ + imageOutputs: ImageOutput[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.WebEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): WebEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): WebEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): WebEgressRequest; + + static equals(a: WebEgressRequest | PlainMessage | undefined, b: WebEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * record audio and video from a single participant + * + * @generated from message livekit.ParticipantEgressRequest + */ +export declare class ParticipantEgressRequest extends Message { + /** + * required + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * required + * + * @generated from field: string identity = 2; + */ + identity: string; + + /** + * (default false) + * + * @generated from field: bool screen_share = 3; + */ + screenShare: boolean; + + /** + * @generated from oneof livekit.ParticipantEgressRequest.options + */ + options: { + /** + * (default H264_720P_30) + * + * @generated from field: livekit.EncodingOptionsPreset preset = 4; + */ + value: EncodingOptionsPreset; + case: "preset"; + } | { + /** + * (optional) + * + * @generated from field: livekit.EncodingOptions advanced = 5; + */ + value: EncodingOptions; + case: "advanced"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated livekit.EncodedFileOutput file_outputs = 6; + */ + fileOutputs: EncodedFileOutput[]; + + /** + * @generated from field: repeated livekit.StreamOutput stream_outputs = 7; + */ + streamOutputs: StreamOutput[]; + + /** + * @generated from field: repeated livekit.SegmentedFileOutput segment_outputs = 8; + */ + segmentOutputs: SegmentedFileOutput[]; + + /** + * @generated from field: repeated livekit.ImageOutput image_outputs = 9; + */ + imageOutputs: ImageOutput[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ParticipantEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantEgressRequest; + + static equals(a: ParticipantEgressRequest | PlainMessage | undefined, b: ParticipantEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * containerize up to one audio and one video track + * + * @generated from message livekit.TrackCompositeEgressRequest + */ +export declare class TrackCompositeEgressRequest extends Message { + /** + * required + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * (optional) + * + * @generated from field: string audio_track_id = 2; + */ + audioTrackId: string; + + /** + * (optional) + * + * @generated from field: string video_track_id = 3; + */ + videoTrackId: string; + + /** + * deprecated (use _output fields) + * + * @generated from oneof livekit.TrackCompositeEgressRequest.output + */ + output: { + /** + * @generated from field: livekit.EncodedFileOutput file = 4 [deprecated = true]; + * @deprecated + */ + value: EncodedFileOutput; + case: "file"; + } | { + /** + * @generated from field: livekit.StreamOutput stream = 5 [deprecated = true]; + * @deprecated + */ + value: StreamOutput; + case: "stream"; + } | { + /** + * @generated from field: livekit.SegmentedFileOutput segments = 8 [deprecated = true]; + * @deprecated + */ + value: SegmentedFileOutput; + case: "segments"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from oneof livekit.TrackCompositeEgressRequest.options + */ + options: { + /** + * (default H264_720P_30) + * + * @generated from field: livekit.EncodingOptionsPreset preset = 6; + */ + value: EncodingOptionsPreset; + case: "preset"; + } | { + /** + * (optional) + * + * @generated from field: livekit.EncodingOptions advanced = 7; + */ + value: EncodingOptions; + case: "advanced"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated livekit.EncodedFileOutput file_outputs = 11; + */ + fileOutputs: EncodedFileOutput[]; + + /** + * @generated from field: repeated livekit.StreamOutput stream_outputs = 12; + */ + streamOutputs: StreamOutput[]; + + /** + * @generated from field: repeated livekit.SegmentedFileOutput segment_outputs = 13; + */ + segmentOutputs: SegmentedFileOutput[]; + + /** + * @generated from field: repeated livekit.ImageOutput image_outputs = 14; + */ + imageOutputs: ImageOutput[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrackCompositeEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackCompositeEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackCompositeEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): TrackCompositeEgressRequest; + + static equals(a: TrackCompositeEgressRequest | PlainMessage | undefined, b: TrackCompositeEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * record tracks individually, without transcoding + * + * @generated from message livekit.TrackEgressRequest + */ +export declare class TrackEgressRequest extends Message { + /** + * required + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * required + * + * @generated from field: string track_id = 2; + */ + trackId: string; + + /** + * required + * + * @generated from oneof livekit.TrackEgressRequest.output + */ + output: { + /** + * @generated from field: livekit.DirectFileOutput file = 3; + */ + value: DirectFileOutput; + case: "file"; + } | { + /** + * @generated from field: string websocket_url = 4; + */ + value: string; + case: "websocketUrl"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrackEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): TrackEgressRequest; + + static equals(a: TrackEgressRequest | PlainMessage | undefined, b: TrackEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.EncodedFileOutput + */ +export declare class EncodedFileOutput extends Message { + /** + * (optional) + * + * @generated from field: livekit.EncodedFileType file_type = 1; + */ + fileType: EncodedFileType; + + /** + * see egress docs for templating (default {room_name}-{time}) + * + * @generated from field: string filepath = 2; + */ + filepath: string; + + /** + * disable upload of manifest file (default false) + * + * @generated from field: bool disable_manifest = 6; + */ + disableManifest: boolean; + + /** + * @generated from oneof livekit.EncodedFileOutput.output + */ + output: { + /** + * @generated from field: livekit.S3Upload s3 = 3; + */ + value: S3Upload; + case: "s3"; + } | { + /** + * @generated from field: livekit.GCPUpload gcp = 4; + */ + value: GCPUpload; + case: "gcp"; + } | { + /** + * @generated from field: livekit.AzureBlobUpload azure = 5; + */ + value: AzureBlobUpload; + case: "azure"; + } | { + /** + * @generated from field: livekit.AliOSSUpload aliOSS = 7; + */ + value: AliOSSUpload; + case: "aliOSS"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.EncodedFileOutput"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EncodedFileOutput; + + static fromJson(jsonValue: JsonValue, options?: Partial): EncodedFileOutput; + + static fromJsonString(jsonString: string, options?: Partial): EncodedFileOutput; + + static equals(a: EncodedFileOutput | PlainMessage | undefined, b: EncodedFileOutput | PlainMessage | undefined): boolean; +} + +/** + * Used to generate HLS segments or other kind of segmented output + * + * @generated from message livekit.SegmentedFileOutput + */ +export declare class SegmentedFileOutput extends Message { + /** + * (optional) + * + * @generated from field: livekit.SegmentedFileProtocol protocol = 1; + */ + protocol: SegmentedFileProtocol; + + /** + * (optional) + * + * @generated from field: string filename_prefix = 2; + */ + filenamePrefix: string; + + /** + * (optional) + * + * @generated from field: string playlist_name = 3; + */ + playlistName: string; + + /** + * (optional, disabled if not provided). Path of a live playlist + * + * @generated from field: string live_playlist_name = 11; + */ + livePlaylistName: string; + + /** + * in seconds (optional) + * + * @generated from field: uint32 segment_duration = 4; + */ + segmentDuration: number; + + /** + * (optional, default INDEX) + * + * @generated from field: livekit.SegmentedFileSuffix filename_suffix = 10; + */ + filenameSuffix: SegmentedFileSuffix; + + /** + * disable upload of manifest file (default false) + * + * @generated from field: bool disable_manifest = 8; + */ + disableManifest: boolean; + + /** + * required + * + * @generated from oneof livekit.SegmentedFileOutput.output + */ + output: { + /** + * @generated from field: livekit.S3Upload s3 = 5; + */ + value: S3Upload; + case: "s3"; + } | { + /** + * @generated from field: livekit.GCPUpload gcp = 6; + */ + value: GCPUpload; + case: "gcp"; + } | { + /** + * @generated from field: livekit.AzureBlobUpload azure = 7; + */ + value: AzureBlobUpload; + case: "azure"; + } | { + /** + * @generated from field: livekit.AliOSSUpload aliOSS = 9; + */ + value: AliOSSUpload; + case: "aliOSS"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SegmentedFileOutput"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SegmentedFileOutput; + + static fromJson(jsonValue: JsonValue, options?: Partial): SegmentedFileOutput; + + static fromJsonString(jsonString: string, options?: Partial): SegmentedFileOutput; + + static equals(a: SegmentedFileOutput | PlainMessage | undefined, b: SegmentedFileOutput | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.DirectFileOutput + */ +export declare class DirectFileOutput extends Message { + /** + * see egress docs for templating (default {track_id}-{time}) + * + * @generated from field: string filepath = 1; + */ + filepath: string; + + /** + * disable upload of manifest file (default false) + * + * @generated from field: bool disable_manifest = 5; + */ + disableManifest: boolean; + + /** + * @generated from oneof livekit.DirectFileOutput.output + */ + output: { + /** + * @generated from field: livekit.S3Upload s3 = 2; + */ + value: S3Upload; + case: "s3"; + } | { + /** + * @generated from field: livekit.GCPUpload gcp = 3; + */ + value: GCPUpload; + case: "gcp"; + } | { + /** + * @generated from field: livekit.AzureBlobUpload azure = 4; + */ + value: AzureBlobUpload; + case: "azure"; + } | { + /** + * @generated from field: livekit.AliOSSUpload aliOSS = 6; + */ + value: AliOSSUpload; + case: "aliOSS"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DirectFileOutput"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DirectFileOutput; + + static fromJson(jsonValue: JsonValue, options?: Partial): DirectFileOutput; + + static fromJsonString(jsonString: string, options?: Partial): DirectFileOutput; + + static equals(a: DirectFileOutput | PlainMessage | undefined, b: DirectFileOutput | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ImageOutput + */ +export declare class ImageOutput extends Message { + /** + * in seconds (required) + * + * @generated from field: uint32 capture_interval = 1; + */ + captureInterval: number; + + /** + * (optional, defaults to track width) + * + * @generated from field: int32 width = 2; + */ + width: number; + + /** + * (optional, defaults to track height) + * + * @generated from field: int32 height = 3; + */ + height: number; + + /** + * (optional) + * + * @generated from field: string filename_prefix = 4; + */ + filenamePrefix: string; + + /** + * (optional, default INDEX) + * + * @generated from field: livekit.ImageFileSuffix filename_suffix = 5; + */ + filenameSuffix: ImageFileSuffix; + + /** + * (optional) + * + * @generated from field: livekit.ImageCodec image_codec = 6; + */ + imageCodec: ImageCodec; + + /** + * disable upload of manifest file (default false) + * + * @generated from field: bool disable_manifest = 7; + */ + disableManifest: boolean; + + /** + * required + * + * @generated from oneof livekit.ImageOutput.output + */ + output: { + /** + * @generated from field: livekit.S3Upload s3 = 8; + */ + value: S3Upload; + case: "s3"; + } | { + /** + * @generated from field: livekit.GCPUpload gcp = 9; + */ + value: GCPUpload; + case: "gcp"; + } | { + /** + * @generated from field: livekit.AzureBlobUpload azure = 10; + */ + value: AzureBlobUpload; + case: "azure"; + } | { + /** + * @generated from field: livekit.AliOSSUpload aliOSS = 11; + */ + value: AliOSSUpload; + case: "aliOSS"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ImageOutput"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ImageOutput; + + static fromJson(jsonValue: JsonValue, options?: Partial): ImageOutput; + + static fromJsonString(jsonString: string, options?: Partial): ImageOutput; + + static equals(a: ImageOutput | PlainMessage | undefined, b: ImageOutput | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.S3Upload + */ +export declare class S3Upload extends Message { + /** + * @generated from field: string access_key = 1; + */ + accessKey: string; + + /** + * @generated from field: string secret = 2; + */ + secret: string; + + /** + * @generated from field: string region = 3; + */ + region: string; + + /** + * @generated from field: string endpoint = 4; + */ + endpoint: string; + + /** + * @generated from field: string bucket = 5; + */ + bucket: string; + + /** + * @generated from field: bool force_path_style = 6; + */ + forcePathStyle: boolean; + + /** + * @generated from field: map metadata = 7; + */ + metadata: { [key: string]: string }; + + /** + * @generated from field: string tagging = 8; + */ + tagging: string; + + /** + * Content-Disposition header + * + * @generated from field: string content_disposition = 9; + */ + contentDisposition: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.S3Upload"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): S3Upload; + + static fromJson(jsonValue: JsonValue, options?: Partial): S3Upload; + + static fromJsonString(jsonString: string, options?: Partial): S3Upload; + + static equals(a: S3Upload | PlainMessage | undefined, b: S3Upload | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.GCPUpload + */ +export declare class GCPUpload extends Message { + /** + * service account credentials serialized in JSON "credentials.json" + * + * @generated from field: string credentials = 1; + */ + credentials: string; + + /** + * @generated from field: string bucket = 2; + */ + bucket: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.GCPUpload"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GCPUpload; + + static fromJson(jsonValue: JsonValue, options?: Partial): GCPUpload; + + static fromJsonString(jsonString: string, options?: Partial): GCPUpload; + + static equals(a: GCPUpload | PlainMessage | undefined, b: GCPUpload | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AzureBlobUpload + */ +export declare class AzureBlobUpload extends Message { + /** + * @generated from field: string account_name = 1; + */ + accountName: string; + + /** + * @generated from field: string account_key = 2; + */ + accountKey: string; + + /** + * @generated from field: string container_name = 3; + */ + containerName: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AzureBlobUpload"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AzureBlobUpload; + + static fromJson(jsonValue: JsonValue, options?: Partial): AzureBlobUpload; + + static fromJsonString(jsonString: string, options?: Partial): AzureBlobUpload; + + static equals(a: AzureBlobUpload | PlainMessage | undefined, b: AzureBlobUpload | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AliOSSUpload + */ +export declare class AliOSSUpload extends Message { + /** + * @generated from field: string access_key = 1; + */ + accessKey: string; + + /** + * @generated from field: string secret = 2; + */ + secret: string; + + /** + * @generated from field: string region = 3; + */ + region: string; + + /** + * @generated from field: string endpoint = 4; + */ + endpoint: string; + + /** + * @generated from field: string bucket = 5; + */ + bucket: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AliOSSUpload"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AliOSSUpload; + + static fromJson(jsonValue: JsonValue, options?: Partial): AliOSSUpload; + + static fromJsonString(jsonString: string, options?: Partial): AliOSSUpload; + + static equals(a: AliOSSUpload | PlainMessage | undefined, b: AliOSSUpload | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.StreamOutput + */ +export declare class StreamOutput extends Message { + /** + * required + * + * @generated from field: livekit.StreamProtocol protocol = 1; + */ + protocol: StreamProtocol; + + /** + * required + * + * @generated from field: repeated string urls = 2; + */ + urls: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.StreamOutput"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamOutput; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamOutput; + + static fromJsonString(jsonString: string, options?: Partial): StreamOutput; + + static equals(a: StreamOutput | PlainMessage | undefined, b: StreamOutput | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.EncodingOptions + */ +export declare class EncodingOptions extends Message { + /** + * (default 1920) + * + * @generated from field: int32 width = 1; + */ + width: number; + + /** + * (default 1080) + * + * @generated from field: int32 height = 2; + */ + height: number; + + /** + * (default 24) + * + * @generated from field: int32 depth = 3; + */ + depth: number; + + /** + * (default 30) + * + * @generated from field: int32 framerate = 4; + */ + framerate: number; + + /** + * (default OPUS) + * + * @generated from field: livekit.AudioCodec audio_codec = 5; + */ + audioCodec: AudioCodec; + + /** + * (default 128) + * + * @generated from field: int32 audio_bitrate = 6; + */ + audioBitrate: number; + + /** + * quality setting on audio encoder + * + * @generated from field: int32 audio_quality = 11; + */ + audioQuality: number; + + /** + * (default 44100) + * + * @generated from field: int32 audio_frequency = 7; + */ + audioFrequency: number; + + /** + * (default H264_MAIN) + * + * @generated from field: livekit.VideoCodec video_codec = 8; + */ + videoCodec: VideoCodec; + + /** + * (default 4500) + * + * @generated from field: int32 video_bitrate = 9; + */ + videoBitrate: number; + + /** + * quality setting on video encoder + * + * @generated from field: int32 video_quality = 12; + */ + videoQuality: number; + + /** + * in seconds (default 4s for streaming, segment duration for segmented output, encoder default for files) + * + * @generated from field: double key_frame_interval = 10; + */ + keyFrameInterval: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.EncodingOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EncodingOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): EncodingOptions; + + static fromJsonString(jsonString: string, options?: Partial): EncodingOptions; + + static equals(a: EncodingOptions | PlainMessage | undefined, b: EncodingOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateLayoutRequest + */ +export declare class UpdateLayoutRequest extends Message { + /** + * @generated from field: string egress_id = 1; + */ + egressId: string; + + /** + * @generated from field: string layout = 2; + */ + layout: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateLayoutRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateLayoutRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateLayoutRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateLayoutRequest; + + static equals(a: UpdateLayoutRequest | PlainMessage | undefined, b: UpdateLayoutRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateStreamRequest + */ +export declare class UpdateStreamRequest extends Message { + /** + * @generated from field: string egress_id = 1; + */ + egressId: string; + + /** + * @generated from field: repeated string add_output_urls = 2; + */ + addOutputUrls: string[]; + + /** + * @generated from field: repeated string remove_output_urls = 3; + */ + removeOutputUrls: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateStreamRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateStreamRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateStreamRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateStreamRequest; + + static equals(a: UpdateStreamRequest | PlainMessage | undefined, b: UpdateStreamRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListEgressRequest + */ +export declare class ListEgressRequest extends Message { + /** + * (optional, filter by room name) + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * (optional, filter by egress ID) + * + * @generated from field: string egress_id = 2; + */ + egressId: string; + + /** + * (optional, list active egress only) + * + * @generated from field: bool active = 3; + */ + active: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListEgressRequest; + + static equals(a: ListEgressRequest | PlainMessage | undefined, b: ListEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListEgressResponse + */ +export declare class ListEgressResponse extends Message { + /** + * @generated from field: repeated livekit.EgressInfo items = 1; + */ + items: EgressInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListEgressResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListEgressResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListEgressResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListEgressResponse; + + static equals(a: ListEgressResponse | PlainMessage | undefined, b: ListEgressResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.StopEgressRequest + */ +export declare class StopEgressRequest extends Message { + /** + * @generated from field: string egress_id = 1; + */ + egressId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.StopEgressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StopEgressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): StopEgressRequest; + + static fromJsonString(jsonString: string, options?: Partial): StopEgressRequest; + + static equals(a: StopEgressRequest | PlainMessage | undefined, b: StopEgressRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.EgressInfo + */ +export declare class EgressInfo extends Message { + /** + * @generated from field: string egress_id = 1; + */ + egressId: string; + + /** + * @generated from field: string room_id = 2; + */ + roomId: string; + + /** + * @generated from field: string room_name = 13; + */ + roomName: string; + + /** + * @generated from field: livekit.EgressStatus status = 3; + */ + status: EgressStatus; + + /** + * @generated from field: int64 started_at = 10; + */ + startedAt: bigint; + + /** + * @generated from field: int64 ended_at = 11; + */ + endedAt: bigint; + + /** + * @generated from field: int64 updated_at = 18; + */ + updatedAt: bigint; + + /** + * @generated from field: string error = 9; + */ + error: string; + + /** + * @generated from oneof livekit.EgressInfo.request + */ + request: { + /** + * @generated from field: livekit.RoomCompositeEgressRequest room_composite = 4; + */ + value: RoomCompositeEgressRequest; + case: "roomComposite"; + } | { + /** + * @generated from field: livekit.WebEgressRequest web = 14; + */ + value: WebEgressRequest; + case: "web"; + } | { + /** + * @generated from field: livekit.ParticipantEgressRequest participant = 19; + */ + value: ParticipantEgressRequest; + case: "participant"; + } | { + /** + * @generated from field: livekit.TrackCompositeEgressRequest track_composite = 5; + */ + value: TrackCompositeEgressRequest; + case: "trackComposite"; + } | { + /** + * @generated from field: livekit.TrackEgressRequest track = 6; + */ + value: TrackEgressRequest; + case: "track"; + } | { case: undefined; value?: undefined }; + + /** + * deprecated (use _result fields) + * + * @generated from oneof livekit.EgressInfo.result + */ + result: { + /** + * @generated from field: livekit.StreamInfoList stream = 7 [deprecated = true]; + * @deprecated + */ + value: StreamInfoList; + case: "stream"; + } | { + /** + * @generated from field: livekit.FileInfo file = 8 [deprecated = true]; + * @deprecated + */ + value: FileInfo; + case: "file"; + } | { + /** + * @generated from field: livekit.SegmentsInfo segments = 12 [deprecated = true]; + * @deprecated + */ + value: SegmentsInfo; + case: "segments"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated livekit.StreamInfo stream_results = 15; + */ + streamResults: StreamInfo[]; + + /** + * @generated from field: repeated livekit.FileInfo file_results = 16; + */ + fileResults: FileInfo[]; + + /** + * @generated from field: repeated livekit.SegmentsInfo segment_results = 17; + */ + segmentResults: SegmentsInfo[]; + + /** + * @generated from field: repeated livekit.ImagesInfo image_results = 20; + */ + imageResults: ImagesInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.EgressInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): EgressInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): EgressInfo; + + static fromJsonString(jsonString: string, options?: Partial): EgressInfo; + + static equals(a: EgressInfo | PlainMessage | undefined, b: EgressInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.StreamInfoList + * @deprecated + */ +export declare class StreamInfoList extends Message { + /** + * @generated from field: repeated livekit.StreamInfo info = 1; + */ + info: StreamInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.StreamInfoList"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamInfoList; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamInfoList; + + static fromJsonString(jsonString: string, options?: Partial): StreamInfoList; + + static equals(a: StreamInfoList | PlainMessage | undefined, b: StreamInfoList | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.StreamInfo + */ +export declare class StreamInfo extends Message { + /** + * @generated from field: string url = 1; + */ + url: string; + + /** + * @generated from field: int64 started_at = 2; + */ + startedAt: bigint; + + /** + * @generated from field: int64 ended_at = 3; + */ + endedAt: bigint; + + /** + * @generated from field: int64 duration = 4; + */ + duration: bigint; + + /** + * @generated from field: livekit.StreamInfo.Status status = 5; + */ + status: StreamInfo_Status; + + /** + * @generated from field: string error = 6; + */ + error: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.StreamInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamInfo; + + static fromJsonString(jsonString: string, options?: Partial): StreamInfo; + + static equals(a: StreamInfo | PlainMessage | undefined, b: StreamInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.StreamInfo.Status + */ +export declare enum StreamInfo_Status { + /** + * @generated from enum value: ACTIVE = 0; + */ + ACTIVE = 0, + + /** + * @generated from enum value: FINISHED = 1; + */ + FINISHED = 1, + + /** + * @generated from enum value: FAILED = 2; + */ + FAILED = 2, +} + +/** + * @generated from message livekit.FileInfo + */ +export declare class FileInfo extends Message { + /** + * @generated from field: string filename = 1; + */ + filename: string; + + /** + * @generated from field: int64 started_at = 2; + */ + startedAt: bigint; + + /** + * @generated from field: int64 ended_at = 3; + */ + endedAt: bigint; + + /** + * @generated from field: int64 duration = 6; + */ + duration: bigint; + + /** + * @generated from field: int64 size = 4; + */ + size: bigint; + + /** + * @generated from field: string location = 5; + */ + location: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.FileInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): FileInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): FileInfo; + + static fromJsonString(jsonString: string, options?: Partial): FileInfo; + + static equals(a: FileInfo | PlainMessage | undefined, b: FileInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SegmentsInfo + */ +export declare class SegmentsInfo extends Message { + /** + * @generated from field: string playlist_name = 1; + */ + playlistName: string; + + /** + * @generated from field: string live_playlist_name = 8; + */ + livePlaylistName: string; + + /** + * @generated from field: int64 duration = 2; + */ + duration: bigint; + + /** + * @generated from field: int64 size = 3; + */ + size: bigint; + + /** + * @generated from field: string playlist_location = 4; + */ + playlistLocation: string; + + /** + * @generated from field: string live_playlist_location = 9; + */ + livePlaylistLocation: string; + + /** + * @generated from field: int64 segment_count = 5; + */ + segmentCount: bigint; + + /** + * @generated from field: int64 started_at = 6; + */ + startedAt: bigint; + + /** + * @generated from field: int64 ended_at = 7; + */ + endedAt: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SegmentsInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SegmentsInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SegmentsInfo; + + static fromJsonString(jsonString: string, options?: Partial): SegmentsInfo; + + static equals(a: SegmentsInfo | PlainMessage | undefined, b: SegmentsInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ImagesInfo + */ +export declare class ImagesInfo extends Message { + /** + * @generated from field: int64 image_count = 1; + */ + imageCount: bigint; + + /** + * @generated from field: int64 started_at = 2; + */ + startedAt: bigint; + + /** + * @generated from field: int64 ended_at = 3; + */ + endedAt: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ImagesInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ImagesInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ImagesInfo; + + static fromJsonString(jsonString: string, options?: Partial): ImagesInfo; + + static equals(a: ImagesInfo | PlainMessage | undefined, b: ImagesInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AutoParticipantEgress + */ +export declare class AutoParticipantEgress extends Message { + /** + * @generated from oneof livekit.AutoParticipantEgress.options + */ + options: { + /** + * (default H264_720P_30) + * + * @generated from field: livekit.EncodingOptionsPreset preset = 1; + */ + value: EncodingOptionsPreset; + case: "preset"; + } | { + /** + * (optional) + * + * @generated from field: livekit.EncodingOptions advanced = 2; + */ + value: EncodingOptions; + case: "advanced"; + } | { case: undefined; value?: undefined }; + + /** + * @generated from field: repeated livekit.EncodedFileOutput file_outputs = 3; + */ + fileOutputs: EncodedFileOutput[]; + + /** + * @generated from field: repeated livekit.SegmentedFileOutput segment_outputs = 4; + */ + segmentOutputs: SegmentedFileOutput[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AutoParticipantEgress"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AutoParticipantEgress; + + static fromJson(jsonValue: JsonValue, options?: Partial): AutoParticipantEgress; + + static fromJsonString(jsonString: string, options?: Partial): AutoParticipantEgress; + + static equals(a: AutoParticipantEgress | PlainMessage | undefined, b: AutoParticipantEgress | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AutoTrackEgress + */ +export declare class AutoTrackEgress extends Message { + /** + * see docs for templating (default {track_id}-{time}) + * + * @generated from field: string filepath = 1; + */ + filepath: string; + + /** + * disables upload of json manifest file (default false) + * + * @generated from field: bool disable_manifest = 5; + */ + disableManifest: boolean; + + /** + * @generated from oneof livekit.AutoTrackEgress.output + */ + output: { + /** + * @generated from field: livekit.S3Upload s3 = 2; + */ + value: S3Upload; + case: "s3"; + } | { + /** + * @generated from field: livekit.GCPUpload gcp = 3; + */ + value: GCPUpload; + case: "gcp"; + } | { + /** + * @generated from field: livekit.AzureBlobUpload azure = 4; + */ + value: AzureBlobUpload; + case: "azure"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AutoTrackEgress"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AutoTrackEgress; + + static fromJson(jsonValue: JsonValue, options?: Partial): AutoTrackEgress; + + static fromJsonString(jsonString: string, options?: Partial): AutoTrackEgress; + + static equals(a: AutoTrackEgress | PlainMessage | undefined, b: AutoTrackEgress | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_egress_pb.js b/packages/js/src/gen/livekit_egress_pb.js new file mode 100644 index 0000000..172720b --- /dev/null +++ b/packages/js/src/gen/livekit_egress_pb.js @@ -0,0 +1,572 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_egress.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { AudioCodec, ImageCodec, VideoCodec } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.EncodedFileType + */ +export const EncodedFileType = proto3.makeEnum( + "livekit.EncodedFileType", + [ + {no: 0, name: "DEFAULT_FILETYPE"}, + {no: 1, name: "MP4"}, + {no: 2, name: "OGG"}, + ], +); + +/** + * @generated from enum livekit.SegmentedFileProtocol + */ +export const SegmentedFileProtocol = proto3.makeEnum( + "livekit.SegmentedFileProtocol", + [ + {no: 0, name: "DEFAULT_SEGMENTED_FILE_PROTOCOL"}, + {no: 1, name: "HLS_PROTOCOL"}, + ], +); + +/** + * @generated from enum livekit.SegmentedFileSuffix + */ +export const SegmentedFileSuffix = proto3.makeEnum( + "livekit.SegmentedFileSuffix", + [ + {no: 0, name: "INDEX"}, + {no: 1, name: "TIMESTAMP"}, + ], +); + +/** + * @generated from enum livekit.ImageFileSuffix + */ +export const ImageFileSuffix = proto3.makeEnum( + "livekit.ImageFileSuffix", + [ + {no: 0, name: "IMAGE_SUFFIX_INDEX"}, + {no: 1, name: "IMAGE_SUFFIX_TIMESTAMP"}, + ], +); + +/** + * @generated from enum livekit.StreamProtocol + */ +export const StreamProtocol = proto3.makeEnum( + "livekit.StreamProtocol", + [ + {no: 0, name: "DEFAULT_PROTOCOL"}, + {no: 1, name: "RTMP"}, + ], +); + +/** + * @generated from enum livekit.EncodingOptionsPreset + */ +export const EncodingOptionsPreset = proto3.makeEnum( + "livekit.EncodingOptionsPreset", + [ + {no: 0, name: "H264_720P_30"}, + {no: 1, name: "H264_720P_60"}, + {no: 2, name: "H264_1080P_30"}, + {no: 3, name: "H264_1080P_60"}, + {no: 4, name: "PORTRAIT_H264_720P_30"}, + {no: 5, name: "PORTRAIT_H264_720P_60"}, + {no: 6, name: "PORTRAIT_H264_1080P_30"}, + {no: 7, name: "PORTRAIT_H264_1080P_60"}, + ], +); + +/** + * @generated from enum livekit.EgressStatus + */ +export const EgressStatus = proto3.makeEnum( + "livekit.EgressStatus", + [ + {no: 0, name: "EGRESS_STARTING"}, + {no: 1, name: "EGRESS_ACTIVE"}, + {no: 2, name: "EGRESS_ENDING"}, + {no: 3, name: "EGRESS_COMPLETE"}, + {no: 4, name: "EGRESS_FAILED"}, + {no: 5, name: "EGRESS_ABORTED"}, + {no: 6, name: "EGRESS_LIMIT_REACHED"}, + ], +); + +/** + * composite using a web browser + * + * @generated from message livekit.RoomCompositeEgressRequest + */ +export const RoomCompositeEgressRequest = proto3.makeMessageType( + "livekit.RoomCompositeEgressRequest", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "layout", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "audio_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "video_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "custom_base_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "file", kind: "message", T: EncodedFileOutput, oneof: "output" }, + { no: 7, name: "stream", kind: "message", T: StreamOutput, oneof: "output" }, + { no: 10, name: "segments", kind: "message", T: SegmentedFileOutput, oneof: "output" }, + { no: 8, name: "preset", kind: "enum", T: proto3.getEnumType(EncodingOptionsPreset), oneof: "options" }, + { no: 9, name: "advanced", kind: "message", T: EncodingOptions, oneof: "options" }, + { no: 11, name: "file_outputs", kind: "message", T: EncodedFileOutput, repeated: true }, + { no: 12, name: "stream_outputs", kind: "message", T: StreamOutput, repeated: true }, + { no: 13, name: "segment_outputs", kind: "message", T: SegmentedFileOutput, repeated: true }, + { no: 14, name: "image_outputs", kind: "message", T: ImageOutput, repeated: true }, + ], +); + +/** + * record any website + * + * @generated from message livekit.WebEgressRequest + */ +export const WebEgressRequest = proto3.makeMessageType( + "livekit.WebEgressRequest", + () => [ + { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "audio_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "video_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 12, name: "await_start_signal", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "file", kind: "message", T: EncodedFileOutput, oneof: "output" }, + { no: 5, name: "stream", kind: "message", T: StreamOutput, oneof: "output" }, + { no: 6, name: "segments", kind: "message", T: SegmentedFileOutput, oneof: "output" }, + { no: 7, name: "preset", kind: "enum", T: proto3.getEnumType(EncodingOptionsPreset), oneof: "options" }, + { no: 8, name: "advanced", kind: "message", T: EncodingOptions, oneof: "options" }, + { no: 9, name: "file_outputs", kind: "message", T: EncodedFileOutput, repeated: true }, + { no: 10, name: "stream_outputs", kind: "message", T: StreamOutput, repeated: true }, + { no: 11, name: "segment_outputs", kind: "message", T: SegmentedFileOutput, repeated: true }, + { no: 13, name: "image_outputs", kind: "message", T: ImageOutput, repeated: true }, + ], +); + +/** + * record audio and video from a single participant + * + * @generated from message livekit.ParticipantEgressRequest + */ +export const ParticipantEgressRequest = proto3.makeMessageType( + "livekit.ParticipantEgressRequest", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "screen_share", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "preset", kind: "enum", T: proto3.getEnumType(EncodingOptionsPreset), oneof: "options" }, + { no: 5, name: "advanced", kind: "message", T: EncodingOptions, oneof: "options" }, + { no: 6, name: "file_outputs", kind: "message", T: EncodedFileOutput, repeated: true }, + { no: 7, name: "stream_outputs", kind: "message", T: StreamOutput, repeated: true }, + { no: 8, name: "segment_outputs", kind: "message", T: SegmentedFileOutput, repeated: true }, + { no: 9, name: "image_outputs", kind: "message", T: ImageOutput, repeated: true }, + ], +); + +/** + * containerize up to one audio and one video track + * + * @generated from message livekit.TrackCompositeEgressRequest + */ +export const TrackCompositeEgressRequest = proto3.makeMessageType( + "livekit.TrackCompositeEgressRequest", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "audio_track_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "video_track_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "file", kind: "message", T: EncodedFileOutput, oneof: "output" }, + { no: 5, name: "stream", kind: "message", T: StreamOutput, oneof: "output" }, + { no: 8, name: "segments", kind: "message", T: SegmentedFileOutput, oneof: "output" }, + { no: 6, name: "preset", kind: "enum", T: proto3.getEnumType(EncodingOptionsPreset), oneof: "options" }, + { no: 7, name: "advanced", kind: "message", T: EncodingOptions, oneof: "options" }, + { no: 11, name: "file_outputs", kind: "message", T: EncodedFileOutput, repeated: true }, + { no: 12, name: "stream_outputs", kind: "message", T: StreamOutput, repeated: true }, + { no: 13, name: "segment_outputs", kind: "message", T: SegmentedFileOutput, repeated: true }, + { no: 14, name: "image_outputs", kind: "message", T: ImageOutput, repeated: true }, + ], +); + +/** + * record tracks individually, without transcoding + * + * @generated from message livekit.TrackEgressRequest + */ +export const TrackEgressRequest = proto3.makeMessageType( + "livekit.TrackEgressRequest", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "track_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "file", kind: "message", T: DirectFileOutput, oneof: "output" }, + { no: 4, name: "websocket_url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "output" }, + ], +); + +/** + * @generated from message livekit.EncodedFileOutput + */ +export const EncodedFileOutput = proto3.makeMessageType( + "livekit.EncodedFileOutput", + () => [ + { no: 1, name: "file_type", kind: "enum", T: proto3.getEnumType(EncodedFileType) }, + { no: 2, name: "filepath", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "disable_manifest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "s3", kind: "message", T: S3Upload, oneof: "output" }, + { no: 4, name: "gcp", kind: "message", T: GCPUpload, oneof: "output" }, + { no: 5, name: "azure", kind: "message", T: AzureBlobUpload, oneof: "output" }, + { no: 7, name: "aliOSS", kind: "message", T: AliOSSUpload, oneof: "output" }, + ], +); + +/** + * Used to generate HLS segments or other kind of segmented output + * + * @generated from message livekit.SegmentedFileOutput + */ +export const SegmentedFileOutput = proto3.makeMessageType( + "livekit.SegmentedFileOutput", + () => [ + { no: 1, name: "protocol", kind: "enum", T: proto3.getEnumType(SegmentedFileProtocol) }, + { no: 2, name: "filename_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "playlist_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "live_playlist_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "segment_duration", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 10, name: "filename_suffix", kind: "enum", T: proto3.getEnumType(SegmentedFileSuffix) }, + { no: 8, name: "disable_manifest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "s3", kind: "message", T: S3Upload, oneof: "output" }, + { no: 6, name: "gcp", kind: "message", T: GCPUpload, oneof: "output" }, + { no: 7, name: "azure", kind: "message", T: AzureBlobUpload, oneof: "output" }, + { no: 9, name: "aliOSS", kind: "message", T: AliOSSUpload, oneof: "output" }, + ], +); + +/** + * @generated from message livekit.DirectFileOutput + */ +export const DirectFileOutput = proto3.makeMessageType( + "livekit.DirectFileOutput", + () => [ + { no: 1, name: "filepath", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "disable_manifest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "s3", kind: "message", T: S3Upload, oneof: "output" }, + { no: 3, name: "gcp", kind: "message", T: GCPUpload, oneof: "output" }, + { no: 4, name: "azure", kind: "message", T: AzureBlobUpload, oneof: "output" }, + { no: 6, name: "aliOSS", kind: "message", T: AliOSSUpload, oneof: "output" }, + ], +); + +/** + * @generated from message livekit.ImageOutput + */ +export const ImageOutput = proto3.makeMessageType( + "livekit.ImageOutput", + () => [ + { no: 1, name: "capture_interval", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 2, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 4, name: "filename_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "filename_suffix", kind: "enum", T: proto3.getEnumType(ImageFileSuffix) }, + { no: 6, name: "image_codec", kind: "enum", T: proto3.getEnumType(ImageCodec) }, + { no: 7, name: "disable_manifest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 8, name: "s3", kind: "message", T: S3Upload, oneof: "output" }, + { no: 9, name: "gcp", kind: "message", T: GCPUpload, oneof: "output" }, + { no: 10, name: "azure", kind: "message", T: AzureBlobUpload, oneof: "output" }, + { no: 11, name: "aliOSS", kind: "message", T: AliOSSUpload, oneof: "output" }, + ], +); + +/** + * @generated from message livekit.S3Upload + */ +export const S3Upload = proto3.makeMessageType( + "livekit.S3Upload", + () => [ + { no: 1, name: "access_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "secret", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "bucket", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "force_path_style", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 8, name: "tagging", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "content_disposition", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.GCPUpload + */ +export const GCPUpload = proto3.makeMessageType( + "livekit.GCPUpload", + () => [ + { no: 1, name: "credentials", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "bucket", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.AzureBlobUpload + */ +export const AzureBlobUpload = proto3.makeMessageType( + "livekit.AzureBlobUpload", + () => [ + { no: 1, name: "account_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "account_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "container_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.AliOSSUpload + */ +export const AliOSSUpload = proto3.makeMessageType( + "livekit.AliOSSUpload", + () => [ + { no: 1, name: "access_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "secret", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "bucket", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.StreamOutput + */ +export const StreamOutput = proto3.makeMessageType( + "livekit.StreamOutput", + () => [ + { no: 1, name: "protocol", kind: "enum", T: proto3.getEnumType(StreamProtocol) }, + { no: 2, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * @generated from message livekit.EncodingOptions + */ +export const EncodingOptions = proto3.makeMessageType( + "livekit.EncodingOptions", + () => [ + { no: 1, name: "width", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 2, name: "height", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "depth", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 4, name: "framerate", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 5, name: "audio_codec", kind: "enum", T: proto3.getEnumType(AudioCodec) }, + { no: 6, name: "audio_bitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 11, name: "audio_quality", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 7, name: "audio_frequency", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 8, name: "video_codec", kind: "enum", T: proto3.getEnumType(VideoCodec) }, + { no: 9, name: "video_bitrate", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 12, name: "video_quality", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 10, name: "key_frame_interval", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + ], +); + +/** + * @generated from message livekit.UpdateLayoutRequest + */ +export const UpdateLayoutRequest = proto3.makeMessageType( + "livekit.UpdateLayoutRequest", + () => [ + { no: 1, name: "egress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "layout", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.UpdateStreamRequest + */ +export const UpdateStreamRequest = proto3.makeMessageType( + "livekit.UpdateStreamRequest", + () => [ + { no: 1, name: "egress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "add_output_urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "remove_output_urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * @generated from message livekit.ListEgressRequest + */ +export const ListEgressRequest = proto3.makeMessageType( + "livekit.ListEgressRequest", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "egress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.ListEgressResponse + */ +export const ListEgressResponse = proto3.makeMessageType( + "livekit.ListEgressResponse", + () => [ + { no: 1, name: "items", kind: "message", T: EgressInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.StopEgressRequest + */ +export const StopEgressRequest = proto3.makeMessageType( + "livekit.StopEgressRequest", + () => [ + { no: 1, name: "egress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.EgressInfo + */ +export const EgressInfo = proto3.makeMessageType( + "livekit.EgressInfo", + () => [ + { no: 1, name: "egress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "room_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "status", kind: "enum", T: proto3.getEnumType(EgressStatus) }, + { no: 10, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 11, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 18, name: "updated_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 9, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "room_composite", kind: "message", T: RoomCompositeEgressRequest, oneof: "request" }, + { no: 14, name: "web", kind: "message", T: WebEgressRequest, oneof: "request" }, + { no: 19, name: "participant", kind: "message", T: ParticipantEgressRequest, oneof: "request" }, + { no: 5, name: "track_composite", kind: "message", T: TrackCompositeEgressRequest, oneof: "request" }, + { no: 6, name: "track", kind: "message", T: TrackEgressRequest, oneof: "request" }, + { no: 7, name: "stream", kind: "message", T: StreamInfoList, oneof: "result" }, + { no: 8, name: "file", kind: "message", T: FileInfo, oneof: "result" }, + { no: 12, name: "segments", kind: "message", T: SegmentsInfo, oneof: "result" }, + { no: 15, name: "stream_results", kind: "message", T: StreamInfo, repeated: true }, + { no: 16, name: "file_results", kind: "message", T: FileInfo, repeated: true }, + { no: 17, name: "segment_results", kind: "message", T: SegmentsInfo, repeated: true }, + { no: 20, name: "image_results", kind: "message", T: ImagesInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.StreamInfoList + * @deprecated + */ +export const StreamInfoList = proto3.makeMessageType( + "livekit.StreamInfoList", + () => [ + { no: 1, name: "info", kind: "message", T: StreamInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.StreamInfo + */ +export const StreamInfo = proto3.makeMessageType( + "livekit.StreamInfo", + () => [ + { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "duration", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 5, name: "status", kind: "enum", T: proto3.getEnumType(StreamInfo_Status) }, + { no: 6, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from enum livekit.StreamInfo.Status + */ +export const StreamInfo_Status = proto3.makeEnum( + "livekit.StreamInfo.Status", + [ + {no: 0, name: "ACTIVE"}, + {no: 1, name: "FINISHED"}, + {no: 2, name: "FAILED"}, + ], +); + +/** + * @generated from message livekit.FileInfo + */ +export const FileInfo = proto3.makeMessageType( + "livekit.FileInfo", + () => [ + { no: 1, name: "filename", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 6, name: "duration", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "size", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 5, name: "location", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SegmentsInfo + */ +export const SegmentsInfo = proto3.makeMessageType( + "livekit.SegmentsInfo", + () => [ + { no: 1, name: "playlist_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "live_playlist_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "duration", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "size", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "playlist_location", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "live_playlist_location", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "segment_count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 6, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 7, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * @generated from message livekit.ImagesInfo + */ +export const ImagesInfo = proto3.makeMessageType( + "livekit.ImagesInfo", + () => [ + { no: 1, name: "image_count", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 2, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * @generated from message livekit.AutoParticipantEgress + */ +export const AutoParticipantEgress = proto3.makeMessageType( + "livekit.AutoParticipantEgress", + () => [ + { no: 1, name: "preset", kind: "enum", T: proto3.getEnumType(EncodingOptionsPreset), oneof: "options" }, + { no: 2, name: "advanced", kind: "message", T: EncodingOptions, oneof: "options" }, + { no: 3, name: "file_outputs", kind: "message", T: EncodedFileOutput, repeated: true }, + { no: 4, name: "segment_outputs", kind: "message", T: SegmentedFileOutput, repeated: true }, + ], +); + +/** + * @generated from message livekit.AutoTrackEgress + */ +export const AutoTrackEgress = proto3.makeMessageType( + "livekit.AutoTrackEgress", + () => [ + { no: 1, name: "filepath", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "disable_manifest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "s3", kind: "message", T: S3Upload, oneof: "output" }, + { no: 3, name: "gcp", kind: "message", T: GCPUpload, oneof: "output" }, + { no: 4, name: "azure", kind: "message", T: AzureBlobUpload, oneof: "output" }, + ], +); + diff --git a/packages/js/src/gen/livekit_ingress_pb.d.ts b/packages/js/src/gen/livekit_ingress_pb.d.ts new file mode 100644 index 0000000..fb4cb91 --- /dev/null +++ b/packages/js/src/gen/livekit_ingress_pb.d.ts @@ -0,0 +1,818 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_ingress.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { AudioCodec, TrackInfo, TrackSource, VideoCodec, VideoLayer } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.IngressInput + */ +export declare enum IngressInput { + /** + * @generated from enum value: RTMP_INPUT = 0; + */ + RTMP_INPUT = 0, + + /** + * @generated from enum value: WHIP_INPUT = 1; + */ + WHIP_INPUT = 1, + + /** + * Pull from the provided URL. Only HTTP url are supported, serving either a single media file or a HLS stream + * + * @generated from enum value: URL_INPUT = 2; + */ + URL_INPUT = 2, +} + +/** + * @generated from enum livekit.IngressAudioEncodingPreset + */ +export declare enum IngressAudioEncodingPreset { + /** + * OPUS, 2 channels, 96kbps + * + * @generated from enum value: OPUS_STEREO_96KBPS = 0; + */ + OPUS_STEREO_96KBPS = 0, + + /** + * OPUS, 1 channel, 64kbps + * + * @generated from enum value: OPUS_MONO_64KBS = 1; + */ + OPUS_MONO_64KBS = 1, +} + +/** + * @generated from enum livekit.IngressVideoEncodingPreset + */ +export declare enum IngressVideoEncodingPreset { + /** + * 1280x720, 30fps, 1900kbps main layer, 3 layers total + * + * @generated from enum value: H264_720P_30FPS_3_LAYERS = 0; + */ + H264_720P_30FPS_3_LAYERS = 0, + + /** + * 1980x1080, 30fps, 3500kbps main layer, 3 layers total + * + * @generated from enum value: H264_1080P_30FPS_3_LAYERS = 1; + */ + H264_1080P_30FPS_3_LAYERS = 1, + + /** + * 960x540, 25fps, 1000kbps main layer, 2 layers total + * + * @generated from enum value: H264_540P_25FPS_2_LAYERS = 2; + */ + H264_540P_25FPS_2_LAYERS = 2, + + /** + * 1280x720, 30fps, 1900kbps, no simulcast + * + * @generated from enum value: H264_720P_30FPS_1_LAYER = 3; + */ + H264_720P_30FPS_1_LAYER = 3, + + /** + * 1980x1080, 30fps, 3500kbps, no simulcast + * + * @generated from enum value: H264_1080P_30FPS_1_LAYER = 4; + */ + H264_1080P_30FPS_1_LAYER = 4, + + /** + * 1280x720, 30fps, 2500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content + * + * @generated from enum value: H264_720P_30FPS_3_LAYERS_HIGH_MOTION = 5; + */ + H264_720P_30FPS_3_LAYERS_HIGH_MOTION = 5, + + /** + * 1980x1080, 30fps, 4500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content + * + * @generated from enum value: H264_1080P_30FPS_3_LAYERS_HIGH_MOTION = 6; + */ + H264_1080P_30FPS_3_LAYERS_HIGH_MOTION = 6, + + /** + * 960x540, 25fps, 1300kbps main layer, 2 layers total, higher bitrate for high motion, harder to encode content + * + * @generated from enum value: H264_540P_25FPS_2_LAYERS_HIGH_MOTION = 7; + */ + H264_540P_25FPS_2_LAYERS_HIGH_MOTION = 7, + + /** + * 1280x720, 30fps, 2500kbps, no simulcast, higher bitrate for high motion, harder to encode content + * + * @generated from enum value: H264_720P_30FPS_1_LAYER_HIGH_MOTION = 8; + */ + H264_720P_30FPS_1_LAYER_HIGH_MOTION = 8, + + /** + * 1980x1080, 30fps, 4500kbps, no simulcast, higher bitrate for high motion, harder to encode content + * + * @generated from enum value: H264_1080P_30FPS_1_LAYER_HIGH_MOTION = 9; + */ + H264_1080P_30FPS_1_LAYER_HIGH_MOTION = 9, +} + +/** + * @generated from message livekit.CreateIngressRequest + */ +export declare class CreateIngressRequest extends Message { + /** + * @generated from field: livekit.IngressInput input_type = 1; + */ + inputType: IngressInput; + + /** + * Where to pull media from, only for URL input type + * + * @generated from field: string url = 9; + */ + url: string; + + /** + * User provided identifier for the ingress + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * room to publish to + * + * @generated from field: string room_name = 3; + */ + roomName: string; + + /** + * publish as participant + * + * @generated from field: string participant_identity = 4; + */ + participantIdentity: string; + + /** + * name of publishing participant (used for display only) + * + * @generated from field: string participant_name = 5; + */ + participantName: string; + + /** + * metadata associated with the publishing participant + * + * @generated from field: string participant_metadata = 10; + */ + participantMetadata: string; + + /** + * whether to pass through the incoming media without transcoding, only compatible with some input types + * + * @generated from field: bool bypass_transcoding = 8; + */ + bypassTranscoding: boolean; + + /** + * @generated from field: livekit.IngressAudioOptions audio = 6; + */ + audio?: IngressAudioOptions; + + /** + * @generated from field: livekit.IngressVideoOptions video = 7; + */ + video?: IngressVideoOptions; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.CreateIngressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateIngressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateIngressRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateIngressRequest; + + static equals(a: CreateIngressRequest | PlainMessage | undefined, b: CreateIngressRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.IngressAudioOptions + */ +export declare class IngressAudioOptions extends Message { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: livekit.TrackSource source = 2; + */ + source: TrackSource; + + /** + * @generated from oneof livekit.IngressAudioOptions.encoding_options + */ + encodingOptions: { + /** + * @generated from field: livekit.IngressAudioEncodingPreset preset = 3; + */ + value: IngressAudioEncodingPreset; + case: "preset"; + } | { + /** + * @generated from field: livekit.IngressAudioEncodingOptions options = 4; + */ + value: IngressAudioEncodingOptions; + case: "options"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.IngressAudioOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressAudioOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressAudioOptions; + + static fromJsonString(jsonString: string, options?: Partial): IngressAudioOptions; + + static equals(a: IngressAudioOptions | PlainMessage | undefined, b: IngressAudioOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.IngressVideoOptions + */ +export declare class IngressVideoOptions extends Message { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: livekit.TrackSource source = 2; + */ + source: TrackSource; + + /** + * @generated from oneof livekit.IngressVideoOptions.encoding_options + */ + encodingOptions: { + /** + * @generated from field: livekit.IngressVideoEncodingPreset preset = 3; + */ + value: IngressVideoEncodingPreset; + case: "preset"; + } | { + /** + * @generated from field: livekit.IngressVideoEncodingOptions options = 4; + */ + value: IngressVideoEncodingOptions; + case: "options"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.IngressVideoOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressVideoOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressVideoOptions; + + static fromJsonString(jsonString: string, options?: Partial): IngressVideoOptions; + + static equals(a: IngressVideoOptions | PlainMessage | undefined, b: IngressVideoOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.IngressAudioEncodingOptions + */ +export declare class IngressAudioEncodingOptions extends Message { + /** + * desired audio codec to publish to room + * + * @generated from field: livekit.AudioCodec audio_codec = 1; + */ + audioCodec: AudioCodec; + + /** + * @generated from field: uint32 bitrate = 2; + */ + bitrate: number; + + /** + * @generated from field: bool disable_dtx = 3; + */ + disableDtx: boolean; + + /** + * @generated from field: uint32 channels = 4; + */ + channels: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.IngressAudioEncodingOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressAudioEncodingOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressAudioEncodingOptions; + + static fromJsonString(jsonString: string, options?: Partial): IngressAudioEncodingOptions; + + static equals(a: IngressAudioEncodingOptions | PlainMessage | undefined, b: IngressAudioEncodingOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.IngressVideoEncodingOptions + */ +export declare class IngressVideoEncodingOptions extends Message { + /** + * desired codec to publish to room + * + * @generated from field: livekit.VideoCodec video_codec = 1; + */ + videoCodec: VideoCodec; + + /** + * @generated from field: double frame_rate = 2; + */ + frameRate: number; + + /** + * simulcast layers to publish, when empty, should usually be set to layers at 1/2 and 1/4 of the dimensions + * + * @generated from field: repeated livekit.VideoLayer layers = 3; + */ + layers: VideoLayer[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.IngressVideoEncodingOptions"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressVideoEncodingOptions; + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressVideoEncodingOptions; + + static fromJsonString(jsonString: string, options?: Partial): IngressVideoEncodingOptions; + + static equals(a: IngressVideoEncodingOptions | PlainMessage | undefined, b: IngressVideoEncodingOptions | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.IngressInfo + */ +export declare class IngressInfo extends Message { + /** + * @generated from field: string ingress_id = 1; + */ + ingressId: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string stream_key = 3; + */ + streamKey: string; + + /** + * URL to point the encoder to for push (RTMP, WHIP), or location to pull media from for pull (URL) + * + * @generated from field: string url = 4; + */ + url: string; + + /** + * for RTMP input, it'll be a rtmp:// URL + * for FILE input, it'll be a http:// URL + * for SRT input, it'll be a srt:// URL + * + * @generated from field: livekit.IngressInput input_type = 5; + */ + inputType: IngressInput; + + /** + * @generated from field: bool bypass_transcoding = 13; + */ + bypassTranscoding: boolean; + + /** + * @generated from field: livekit.IngressAudioOptions audio = 6; + */ + audio?: IngressAudioOptions; + + /** + * @generated from field: livekit.IngressVideoOptions video = 7; + */ + video?: IngressVideoOptions; + + /** + * @generated from field: string room_name = 8; + */ + roomName: string; + + /** + * @generated from field: string participant_identity = 9; + */ + participantIdentity: string; + + /** + * @generated from field: string participant_name = 10; + */ + participantName: string; + + /** + * @generated from field: string participant_metadata = 14; + */ + participantMetadata: string; + + /** + * @generated from field: bool reusable = 11; + */ + reusable: boolean; + + /** + * Description of error/stream non compliance and debug info for publisher otherwise (received bitrate, resolution, bandwidth) + * + * @generated from field: livekit.IngressState state = 12; + */ + state?: IngressState; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.IngressInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressInfo; + + static fromJsonString(jsonString: string, options?: Partial): IngressInfo; + + static equals(a: IngressInfo | PlainMessage | undefined, b: IngressInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.IngressState + */ +export declare class IngressState extends Message { + /** + * @generated from field: livekit.IngressState.Status status = 1; + */ + status: IngressState_Status; + + /** + * Error/non compliance description if any + * + * @generated from field: string error = 2; + */ + error: string; + + /** + * @generated from field: livekit.InputVideoState video = 3; + */ + video?: InputVideoState; + + /** + * @generated from field: livekit.InputAudioState audio = 4; + */ + audio?: InputAudioState; + + /** + * ID of the current/previous room published to + * + * @generated from field: string room_id = 5; + */ + roomId: string; + + /** + * @generated from field: int64 started_at = 7; + */ + startedAt: bigint; + + /** + * @generated from field: int64 ended_at = 8; + */ + endedAt: bigint; + + /** + * @generated from field: string resource_id = 9; + */ + resourceId: string; + + /** + * @generated from field: repeated livekit.TrackInfo tracks = 6; + */ + tracks: TrackInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.IngressState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressState; + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressState; + + static fromJsonString(jsonString: string, options?: Partial): IngressState; + + static equals(a: IngressState | PlainMessage | undefined, b: IngressState | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.IngressState.Status + */ +export declare enum IngressState_Status { + /** + * @generated from enum value: ENDPOINT_INACTIVE = 0; + */ + ENDPOINT_INACTIVE = 0, + + /** + * @generated from enum value: ENDPOINT_BUFFERING = 1; + */ + ENDPOINT_BUFFERING = 1, + + /** + * @generated from enum value: ENDPOINT_PUBLISHING = 2; + */ + ENDPOINT_PUBLISHING = 2, + + /** + * @generated from enum value: ENDPOINT_ERROR = 3; + */ + ENDPOINT_ERROR = 3, + + /** + * @generated from enum value: ENDPOINT_COMPLETE = 4; + */ + ENDPOINT_COMPLETE = 4, +} + +/** + * @generated from message livekit.InputVideoState + */ +export declare class InputVideoState extends Message { + /** + * @generated from field: string mime_type = 1; + */ + mimeType: string; + + /** + * @generated from field: uint32 average_bitrate = 2; + */ + averageBitrate: number; + + /** + * @generated from field: uint32 width = 3; + */ + width: number; + + /** + * @generated from field: uint32 height = 4; + */ + height: number; + + /** + * @generated from field: double framerate = 5; + */ + framerate: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.InputVideoState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): InputVideoState; + + static fromJson(jsonValue: JsonValue, options?: Partial): InputVideoState; + + static fromJsonString(jsonString: string, options?: Partial): InputVideoState; + + static equals(a: InputVideoState | PlainMessage | undefined, b: InputVideoState | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.InputAudioState + */ +export declare class InputAudioState extends Message { + /** + * @generated from field: string mime_type = 1; + */ + mimeType: string; + + /** + * @generated from field: uint32 average_bitrate = 2; + */ + averageBitrate: number; + + /** + * @generated from field: uint32 channels = 3; + */ + channels: number; + + /** + * @generated from field: uint32 sample_rate = 4; + */ + sampleRate: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.InputAudioState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): InputAudioState; + + static fromJson(jsonValue: JsonValue, options?: Partial): InputAudioState; + + static fromJsonString(jsonString: string, options?: Partial): InputAudioState; + + static equals(a: InputAudioState | PlainMessage | undefined, b: InputAudioState | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateIngressRequest + */ +export declare class UpdateIngressRequest extends Message { + /** + * @generated from field: string ingress_id = 1; + */ + ingressId: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string room_name = 3; + */ + roomName: string; + + /** + * @generated from field: string participant_identity = 4; + */ + participantIdentity: string; + + /** + * @generated from field: string participant_name = 5; + */ + participantName: string; + + /** + * @generated from field: string participant_metadata = 9; + */ + participantMetadata: string; + + /** + * @generated from field: optional bool bypass_transcoding = 8; + */ + bypassTranscoding?: boolean; + + /** + * @generated from field: livekit.IngressAudioOptions audio = 6; + */ + audio?: IngressAudioOptions; + + /** + * @generated from field: livekit.IngressVideoOptions video = 7; + */ + video?: IngressVideoOptions; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateIngressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateIngressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateIngressRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateIngressRequest; + + static equals(a: UpdateIngressRequest | PlainMessage | undefined, b: UpdateIngressRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListIngressRequest + */ +export declare class ListIngressRequest extends Message { + /** + * when blank, lists all ingress endpoints + * + * (optional, filter by room name) + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * (optional, filter by ingress ID) + * + * @generated from field: string ingress_id = 2; + */ + ingressId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListIngressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListIngressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListIngressRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListIngressRequest; + + static equals(a: ListIngressRequest | PlainMessage | undefined, b: ListIngressRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListIngressResponse + */ +export declare class ListIngressResponse extends Message { + /** + * @generated from field: repeated livekit.IngressInfo items = 1; + */ + items: IngressInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListIngressResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListIngressResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListIngressResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListIngressResponse; + + static equals(a: ListIngressResponse | PlainMessage | undefined, b: ListIngressResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.DeleteIngressRequest + */ +export declare class DeleteIngressRequest extends Message { + /** + * @generated from field: string ingress_id = 1; + */ + ingressId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DeleteIngressRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteIngressRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteIngressRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteIngressRequest; + + static equals(a: DeleteIngressRequest | PlainMessage | undefined, b: DeleteIngressRequest | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_ingress_pb.js b/packages/js/src/gen/livekit_ingress_pb.js new file mode 100644 index 0000000..752dc92 --- /dev/null +++ b/packages/js/src/gen/livekit_ingress_pb.js @@ -0,0 +1,265 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_ingress.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { AudioCodec, TrackInfo, TrackSource, VideoCodec, VideoLayer } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.IngressInput + */ +export const IngressInput = proto3.makeEnum( + "livekit.IngressInput", + [ + {no: 0, name: "RTMP_INPUT"}, + {no: 1, name: "WHIP_INPUT"}, + {no: 2, name: "URL_INPUT"}, + ], +); + +/** + * @generated from enum livekit.IngressAudioEncodingPreset + */ +export const IngressAudioEncodingPreset = proto3.makeEnum( + "livekit.IngressAudioEncodingPreset", + [ + {no: 0, name: "OPUS_STEREO_96KBPS"}, + {no: 1, name: "OPUS_MONO_64KBS"}, + ], +); + +/** + * @generated from enum livekit.IngressVideoEncodingPreset + */ +export const IngressVideoEncodingPreset = proto3.makeEnum( + "livekit.IngressVideoEncodingPreset", + [ + {no: 0, name: "H264_720P_30FPS_3_LAYERS"}, + {no: 1, name: "H264_1080P_30FPS_3_LAYERS"}, + {no: 2, name: "H264_540P_25FPS_2_LAYERS"}, + {no: 3, name: "H264_720P_30FPS_1_LAYER"}, + {no: 4, name: "H264_1080P_30FPS_1_LAYER"}, + {no: 5, name: "H264_720P_30FPS_3_LAYERS_HIGH_MOTION"}, + {no: 6, name: "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION"}, + {no: 7, name: "H264_540P_25FPS_2_LAYERS_HIGH_MOTION"}, + {no: 8, name: "H264_720P_30FPS_1_LAYER_HIGH_MOTION"}, + {no: 9, name: "H264_1080P_30FPS_1_LAYER_HIGH_MOTION"}, + ], +); + +/** + * @generated from message livekit.CreateIngressRequest + */ +export const CreateIngressRequest = proto3.makeMessageType( + "livekit.CreateIngressRequest", + () => [ + { no: 1, name: "input_type", kind: "enum", T: proto3.getEnumType(IngressInput) }, + { no: 9, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "participant_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "participant_metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "bypass_transcoding", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "audio", kind: "message", T: IngressAudioOptions }, + { no: 7, name: "video", kind: "message", T: IngressVideoOptions }, + ], +); + +/** + * @generated from message livekit.IngressAudioOptions + */ +export const IngressAudioOptions = proto3.makeMessageType( + "livekit.IngressAudioOptions", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) }, + { no: 3, name: "preset", kind: "enum", T: proto3.getEnumType(IngressAudioEncodingPreset), oneof: "encoding_options" }, + { no: 4, name: "options", kind: "message", T: IngressAudioEncodingOptions, oneof: "encoding_options" }, + ], +); + +/** + * @generated from message livekit.IngressVideoOptions + */ +export const IngressVideoOptions = proto3.makeMessageType( + "livekit.IngressVideoOptions", + () => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) }, + { no: 3, name: "preset", kind: "enum", T: proto3.getEnumType(IngressVideoEncodingPreset), oneof: "encoding_options" }, + { no: 4, name: "options", kind: "message", T: IngressVideoEncodingOptions, oneof: "encoding_options" }, + ], +); + +/** + * @generated from message livekit.IngressAudioEncodingOptions + */ +export const IngressAudioEncodingOptions = proto3.makeMessageType( + "livekit.IngressAudioEncodingOptions", + () => [ + { no: 1, name: "audio_codec", kind: "enum", T: proto3.getEnumType(AudioCodec) }, + { no: 2, name: "bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "disable_dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ], +); + +/** + * @generated from message livekit.IngressVideoEncodingOptions + */ +export const IngressVideoEncodingOptions = proto3.makeMessageType( + "livekit.IngressVideoEncodingOptions", + () => [ + { no: 1, name: "video_codec", kind: "enum", T: proto3.getEnumType(VideoCodec) }, + { no: 2, name: "frame_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 3, name: "layers", kind: "message", T: VideoLayer, repeated: true }, + ], +); + +/** + * @generated from message livekit.IngressInfo + */ +export const IngressInfo = proto3.makeMessageType( + "livekit.IngressInfo", + () => [ + { no: 1, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "stream_key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "input_type", kind: "enum", T: proto3.getEnumType(IngressInput) }, + { no: 13, name: "bypass_transcoding", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "audio", kind: "message", T: IngressAudioOptions }, + { no: 7, name: "video", kind: "message", T: IngressVideoOptions }, + { no: 8, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "participant_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 14, name: "participant_metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 11, name: "reusable", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 12, name: "state", kind: "message", T: IngressState }, + ], +); + +/** + * @generated from message livekit.IngressState + */ +export const IngressState = proto3.makeMessageType( + "livekit.IngressState", + () => [ + { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(IngressState_Status) }, + { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "video", kind: "message", T: InputVideoState }, + { no: 4, name: "audio", kind: "message", T: InputAudioState }, + { no: 5, name: "room_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 8, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 9, name: "resource_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "tracks", kind: "message", T: TrackInfo, repeated: true }, + ], +); + +/** + * @generated from enum livekit.IngressState.Status + */ +export const IngressState_Status = proto3.makeEnum( + "livekit.IngressState.Status", + [ + {no: 0, name: "ENDPOINT_INACTIVE"}, + {no: 1, name: "ENDPOINT_BUFFERING"}, + {no: 2, name: "ENDPOINT_PUBLISHING"}, + {no: 3, name: "ENDPOINT_ERROR"}, + {no: 4, name: "ENDPOINT_COMPLETE"}, + ], +); + +/** + * @generated from message livekit.InputVideoState + */ +export const InputVideoState = proto3.makeMessageType( + "livekit.InputVideoState", + () => [ + { no: 1, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "average_bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 4, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 5, name: "framerate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + ], +); + +/** + * @generated from message livekit.InputAudioState + */ +export const InputAudioState = proto3.makeMessageType( + "livekit.InputAudioState", + () => [ + { no: 1, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "average_bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ], +); + +/** + * @generated from message livekit.UpdateIngressRequest + */ +export const UpdateIngressRequest = proto3.makeMessageType( + "livekit.UpdateIngressRequest", + () => [ + { no: 1, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "participant_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "participant_metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "bypass_transcoding", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 6, name: "audio", kind: "message", T: IngressAudioOptions }, + { no: 7, name: "video", kind: "message", T: IngressVideoOptions }, + ], +); + +/** + * @generated from message livekit.ListIngressRequest + */ +export const ListIngressRequest = proto3.makeMessageType( + "livekit.ListIngressRequest", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.ListIngressResponse + */ +export const ListIngressResponse = proto3.makeMessageType( + "livekit.ListIngressResponse", + () => [ + { no: 1, name: "items", kind: "message", T: IngressInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.DeleteIngressRequest + */ +export const DeleteIngressRequest = proto3.makeMessageType( + "livekit.DeleteIngressRequest", + () => [ + { no: 1, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/js/src/gen/livekit_models_pb.d.ts b/packages/js/src/gen/livekit_models_pb.d.ts new file mode 100644 index 0000000..d74568a --- /dev/null +++ b/packages/js/src/gen/livekit_models_pb.d.ts @@ -0,0 +1,1781 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_models.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Timestamp } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum livekit.AudioCodec + */ +export declare enum AudioCodec { + /** + * @generated from enum value: DEFAULT_AC = 0; + */ + DEFAULT_AC = 0, + + /** + * @generated from enum value: OPUS = 1; + */ + OPUS = 1, + + /** + * @generated from enum value: AAC = 2; + */ + AAC = 2, +} + +/** + * @generated from enum livekit.VideoCodec + */ +export declare enum VideoCodec { + /** + * @generated from enum value: DEFAULT_VC = 0; + */ + DEFAULT_VC = 0, + + /** + * @generated from enum value: H264_BASELINE = 1; + */ + H264_BASELINE = 1, + + /** + * @generated from enum value: H264_MAIN = 2; + */ + H264_MAIN = 2, + + /** + * @generated from enum value: H264_HIGH = 3; + */ + H264_HIGH = 3, + + /** + * @generated from enum value: VP8 = 4; + */ + VP8 = 4, +} + +/** + * @generated from enum livekit.ImageCodec + */ +export declare enum ImageCodec { + /** + * @generated from enum value: IC_DEFAULT = 0; + */ + IC_DEFAULT = 0, + + /** + * @generated from enum value: IC_JPEG = 1; + */ + IC_JPEG = 1, +} + +/** + * @generated from enum livekit.TrackType + */ +export declare enum TrackType { + /** + * @generated from enum value: AUDIO = 0; + */ + AUDIO = 0, + + /** + * @generated from enum value: VIDEO = 1; + */ + VIDEO = 1, + + /** + * @generated from enum value: DATA = 2; + */ + DATA = 2, +} + +/** + * @generated from enum livekit.TrackSource + */ +export declare enum TrackSource { + /** + * @generated from enum value: UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: CAMERA = 1; + */ + CAMERA = 1, + + /** + * @generated from enum value: MICROPHONE = 2; + */ + MICROPHONE = 2, + + /** + * @generated from enum value: SCREEN_SHARE = 3; + */ + SCREEN_SHARE = 3, + + /** + * @generated from enum value: SCREEN_SHARE_AUDIO = 4; + */ + SCREEN_SHARE_AUDIO = 4, +} + +/** + * @generated from enum livekit.VideoQuality + */ +export declare enum VideoQuality { + /** + * @generated from enum value: LOW = 0; + */ + LOW = 0, + + /** + * @generated from enum value: MEDIUM = 1; + */ + MEDIUM = 1, + + /** + * @generated from enum value: HIGH = 2; + */ + HIGH = 2, + + /** + * @generated from enum value: OFF = 3; + */ + OFF = 3, +} + +/** + * @generated from enum livekit.ConnectionQuality + */ +export declare enum ConnectionQuality { + /** + * @generated from enum value: POOR = 0; + */ + POOR = 0, + + /** + * @generated from enum value: GOOD = 1; + */ + GOOD = 1, + + /** + * @generated from enum value: EXCELLENT = 2; + */ + EXCELLENT = 2, + + /** + * @generated from enum value: LOST = 3; + */ + LOST = 3, +} + +/** + * @generated from enum livekit.ClientConfigSetting + */ +export declare enum ClientConfigSetting { + /** + * @generated from enum value: UNSET = 0; + */ + UNSET = 0, + + /** + * @generated from enum value: DISABLED = 1; + */ + DISABLED = 1, + + /** + * @generated from enum value: ENABLED = 2; + */ + ENABLED = 2, +} + +/** + * @generated from enum livekit.DisconnectReason + */ +export declare enum DisconnectReason { + /** + * @generated from enum value: UNKNOWN_REASON = 0; + */ + UNKNOWN_REASON = 0, + + /** + * @generated from enum value: CLIENT_INITIATED = 1; + */ + CLIENT_INITIATED = 1, + + /** + * @generated from enum value: DUPLICATE_IDENTITY = 2; + */ + DUPLICATE_IDENTITY = 2, + + /** + * @generated from enum value: SERVER_SHUTDOWN = 3; + */ + SERVER_SHUTDOWN = 3, + + /** + * @generated from enum value: PARTICIPANT_REMOVED = 4; + */ + PARTICIPANT_REMOVED = 4, + + /** + * @generated from enum value: ROOM_DELETED = 5; + */ + ROOM_DELETED = 5, + + /** + * @generated from enum value: STATE_MISMATCH = 6; + */ + STATE_MISMATCH = 6, + + /** + * @generated from enum value: JOIN_FAILURE = 7; + */ + JOIN_FAILURE = 7, + + /** + * @generated from enum value: MIGRATION = 8; + */ + MIGRATION = 8, + + /** + * @generated from enum value: SIGNAL_CLOSE = 9; + */ + SIGNAL_CLOSE = 9, +} + +/** + * @generated from enum livekit.ReconnectReason + */ +export declare enum ReconnectReason { + /** + * @generated from enum value: RR_UNKNOWN = 0; + */ + RR_UNKNOWN = 0, + + /** + * @generated from enum value: RR_SIGNAL_DISCONNECTED = 1; + */ + RR_SIGNAL_DISCONNECTED = 1, + + /** + * @generated from enum value: RR_PUBLISHER_FAILED = 2; + */ + RR_PUBLISHER_FAILED = 2, + + /** + * @generated from enum value: RR_SUBSCRIBER_FAILED = 3; + */ + RR_SUBSCRIBER_FAILED = 3, + + /** + * @generated from enum value: RR_SWITCH_CANDIDATE = 4; + */ + RR_SWITCH_CANDIDATE = 4, +} + +/** + * @generated from enum livekit.SubscriptionError + */ +export declare enum SubscriptionError { + /** + * @generated from enum value: SE_UNKNOWN = 0; + */ + SE_UNKNOWN = 0, + + /** + * @generated from enum value: SE_CODEC_UNSUPPORTED = 1; + */ + SE_CODEC_UNSUPPORTED = 1, + + /** + * @generated from enum value: SE_TRACK_NOTFOUND = 2; + */ + SE_TRACK_NOTFOUND = 2, +} + +/** + * @generated from message livekit.Room + */ +export declare class Room extends Message { + /** + * @generated from field: string sid = 1; + */ + sid: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: uint32 empty_timeout = 3; + */ + emptyTimeout: number; + + /** + * @generated from field: uint32 max_participants = 4; + */ + maxParticipants: number; + + /** + * @generated from field: int64 creation_time = 5; + */ + creationTime: bigint; + + /** + * @generated from field: string turn_password = 6; + */ + turnPassword: string; + + /** + * @generated from field: repeated livekit.Codec enabled_codecs = 7; + */ + enabledCodecs: Codec[]; + + /** + * @generated from field: string metadata = 8; + */ + metadata: string; + + /** + * @generated from field: uint32 num_participants = 9; + */ + numParticipants: number; + + /** + * @generated from field: uint32 num_publishers = 11; + */ + numPublishers: number; + + /** + * @generated from field: bool active_recording = 10; + */ + activeRecording: boolean; + + /** + * @generated from field: livekit.TimedVersion version = 13; + */ + version?: TimedVersion; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.Room"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Room; + + static fromJson(jsonValue: JsonValue, options?: Partial): Room; + + static fromJsonString(jsonString: string, options?: Partial): Room; + + static equals(a: Room | PlainMessage | undefined, b: Room | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.Codec + */ +export declare class Codec extends Message { + /** + * @generated from field: string mime = 1; + */ + mime: string; + + /** + * @generated from field: string fmtp_line = 2; + */ + fmtpLine: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.Codec"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Codec; + + static fromJson(jsonValue: JsonValue, options?: Partial): Codec; + + static fromJsonString(jsonString: string, options?: Partial): Codec; + + static equals(a: Codec | PlainMessage | undefined, b: Codec | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.PlayoutDelay + */ +export declare class PlayoutDelay extends Message { + /** + * @generated from field: bool enabled = 1; + */ + enabled: boolean; + + /** + * @generated from field: uint32 min = 2; + */ + min: number; + + /** + * @generated from field: uint32 max = 3; + */ + max: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.PlayoutDelay"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PlayoutDelay; + + static fromJson(jsonValue: JsonValue, options?: Partial): PlayoutDelay; + + static fromJsonString(jsonString: string, options?: Partial): PlayoutDelay; + + static equals(a: PlayoutDelay | PlainMessage | undefined, b: PlayoutDelay | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ParticipantPermission + */ +export declare class ParticipantPermission extends Message { + /** + * allow participant to subscribe to other tracks in the room + * + * @generated from field: bool can_subscribe = 1; + */ + canSubscribe: boolean; + + /** + * allow participant to publish new tracks to room + * + * @generated from field: bool can_publish = 2; + */ + canPublish: boolean; + + /** + * allow participant to publish data + * + * @generated from field: bool can_publish_data = 3; + */ + canPublishData: boolean; + + /** + * sources that are allowed to be published + * + * @generated from field: repeated livekit.TrackSource can_publish_sources = 9; + */ + canPublishSources: TrackSource[]; + + /** + * indicates that it's hidden to others + * + * @generated from field: bool hidden = 7; + */ + hidden: boolean; + + /** + * indicates it's a recorder instance + * + * @generated from field: bool recorder = 8; + */ + recorder: boolean; + + /** + * indicates that participant can update own metadata + * + * @generated from field: bool can_update_metadata = 10; + */ + canUpdateMetadata: boolean; + + /** + * indicates that participant is an agent + * + * @generated from field: bool agent = 11; + */ + agent: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ParticipantPermission"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantPermission; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantPermission; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantPermission; + + static equals(a: ParticipantPermission | PlainMessage | undefined, b: ParticipantPermission | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ParticipantInfo + */ +export declare class ParticipantInfo extends Message { + /** + * @generated from field: string sid = 1; + */ + sid: string; + + /** + * @generated from field: string identity = 2; + */ + identity: string; + + /** + * @generated from field: livekit.ParticipantInfo.State state = 3; + */ + state: ParticipantInfo_State; + + /** + * @generated from field: repeated livekit.TrackInfo tracks = 4; + */ + tracks: TrackInfo[]; + + /** + * @generated from field: string metadata = 5; + */ + metadata: string; + + /** + * timestamp when participant joined room, in seconds + * + * @generated from field: int64 joined_at = 6; + */ + joinedAt: bigint; + + /** + * @generated from field: string name = 9; + */ + name: string; + + /** + * @generated from field: uint32 version = 10; + */ + version: number; + + /** + * @generated from field: livekit.ParticipantPermission permission = 11; + */ + permission?: ParticipantPermission; + + /** + * @generated from field: string region = 12; + */ + region: string; + + /** + * indicates the participant has an active publisher connection + * and can publish to the server + * + * @generated from field: bool is_publisher = 13; + */ + isPublisher: boolean; + + /** + * @generated from field: livekit.ParticipantInfo.Kind kind = 14; + */ + kind: ParticipantInfo_Kind; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ParticipantInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantInfo; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantInfo; + + static equals(a: ParticipantInfo | PlainMessage | undefined, b: ParticipantInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.ParticipantInfo.State + */ +export declare enum ParticipantInfo_State { + /** + * websocket' connected, but not offered yet + * + * @generated from enum value: JOINING = 0; + */ + JOINING = 0, + + /** + * server received client offer + * + * @generated from enum value: JOINED = 1; + */ + JOINED = 1, + + /** + * ICE connectivity established + * + * @generated from enum value: ACTIVE = 2; + */ + ACTIVE = 2, + + /** + * WS disconnected + * + * @generated from enum value: DISCONNECTED = 3; + */ + DISCONNECTED = 3, +} + +/** + * @generated from enum livekit.ParticipantInfo.Kind + */ +export declare enum ParticipantInfo_Kind { + /** + * standard participants, e.g. web clients + * + * @generated from enum value: STANDARD = 0; + */ + STANDARD = 0, + + /** + * only ingests streams + * + * @generated from enum value: INGRESS = 1; + */ + INGRESS = 1, + + /** + * only consumes streams + * + * @generated from enum value: EGRESS = 2; + */ + EGRESS = 2, + + /** + * SIP participants + * + * @generated from enum value: SIP = 3; + */ + SIP = 3, + + /** + * LiveKit agents + * + * @generated from enum value: AGENT = 4; + */ + AGENT = 4, +} + +/** + * @generated from message livekit.Encryption + */ +export declare class Encryption extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.Encryption"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Encryption; + + static fromJson(jsonValue: JsonValue, options?: Partial): Encryption; + + static fromJsonString(jsonString: string, options?: Partial): Encryption; + + static equals(a: Encryption | PlainMessage | undefined, b: Encryption | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.Encryption.Type + */ +export declare enum Encryption_Type { + /** + * @generated from enum value: NONE = 0; + */ + NONE = 0, + + /** + * @generated from enum value: GCM = 1; + */ + GCM = 1, + + /** + * @generated from enum value: CUSTOM = 2; + */ + CUSTOM = 2, +} + +/** + * @generated from message livekit.SimulcastCodecInfo + */ +export declare class SimulcastCodecInfo extends Message { + /** + * @generated from field: string mime_type = 1; + */ + mimeType: string; + + /** + * @generated from field: string mid = 2; + */ + mid: string; + + /** + * @generated from field: string cid = 3; + */ + cid: string; + + /** + * @generated from field: repeated livekit.VideoLayer layers = 4; + */ + layers: VideoLayer[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SimulcastCodecInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SimulcastCodecInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SimulcastCodecInfo; + + static fromJsonString(jsonString: string, options?: Partial): SimulcastCodecInfo; + + static equals(a: SimulcastCodecInfo | PlainMessage | undefined, b: SimulcastCodecInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.TrackInfo + */ +export declare class TrackInfo extends Message { + /** + * @generated from field: string sid = 1; + */ + sid: string; + + /** + * @generated from field: livekit.TrackType type = 2; + */ + type: TrackType; + + /** + * @generated from field: string name = 3; + */ + name: string; + + /** + * @generated from field: bool muted = 4; + */ + muted: boolean; + + /** + * original width of video (unset for audio) + * clients may receive a lower resolution version with simulcast + * + * @generated from field: uint32 width = 5; + */ + width: number; + + /** + * original height of video (unset for audio) + * + * @generated from field: uint32 height = 6; + */ + height: number; + + /** + * true if track is simulcasted + * + * @generated from field: bool simulcast = 7; + */ + simulcast: boolean; + + /** + * true if DTX (Discontinuous Transmission) is disabled for audio + * + * @generated from field: bool disable_dtx = 8; + */ + disableDtx: boolean; + + /** + * source of media + * + * @generated from field: livekit.TrackSource source = 9; + */ + source: TrackSource; + + /** + * @generated from field: repeated livekit.VideoLayer layers = 10; + */ + layers: VideoLayer[]; + + /** + * mime type of codec + * + * @generated from field: string mime_type = 11; + */ + mimeType: string; + + /** + * @generated from field: string mid = 12; + */ + mid: string; + + /** + * @generated from field: repeated livekit.SimulcastCodecInfo codecs = 13; + */ + codecs: SimulcastCodecInfo[]; + + /** + * @generated from field: bool stereo = 14; + */ + stereo: boolean; + + /** + * true if RED (Redundant Encoding) is disabled for audio + * + * @generated from field: bool disable_red = 15; + */ + disableRed: boolean; + + /** + * @generated from field: livekit.Encryption.Type encryption = 16; + */ + encryption: Encryption_Type; + + /** + * @generated from field: string stream = 17; + */ + stream: string; + + /** + * @generated from field: livekit.TimedVersion version = 18; + */ + version?: TimedVersion; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrackInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackInfo; + + static fromJsonString(jsonString: string, options?: Partial): TrackInfo; + + static equals(a: TrackInfo | PlainMessage | undefined, b: TrackInfo | PlainMessage | undefined): boolean; +} + +/** + * provide information about available spatial layers + * + * @generated from message livekit.VideoLayer + */ +export declare class VideoLayer extends Message { + /** + * for tracks with a single layer, this should be HIGH + * + * @generated from field: livekit.VideoQuality quality = 1; + */ + quality: VideoQuality; + + /** + * @generated from field: uint32 width = 2; + */ + width: number; + + /** + * @generated from field: uint32 height = 3; + */ + height: number; + + /** + * target bitrate in bit per second (bps), server will measure actual + * + * @generated from field: uint32 bitrate = 4; + */ + bitrate: number; + + /** + * @generated from field: uint32 ssrc = 5; + */ + ssrc: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.VideoLayer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoLayer; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoLayer; + + static fromJsonString(jsonString: string, options?: Partial): VideoLayer; + + static equals(a: VideoLayer | PlainMessage | undefined, b: VideoLayer | PlainMessage | undefined): boolean; +} + +/** + * new DataPacket API + * + * @generated from message livekit.DataPacket + */ +export declare class DataPacket extends Message { + /** + * @generated from field: livekit.DataPacket.Kind kind = 1; + */ + kind: DataPacket_Kind; + + /** + * @generated from oneof livekit.DataPacket.value + */ + value: { + /** + * @generated from field: livekit.UserPacket user = 2; + */ + value: UserPacket; + case: "user"; + } | { + /** + * @generated from field: livekit.ActiveSpeakerUpdate speaker = 3; + */ + value: ActiveSpeakerUpdate; + case: "speaker"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DataPacket"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataPacket; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataPacket; + + static fromJsonString(jsonString: string, options?: Partial): DataPacket; + + static equals(a: DataPacket | PlainMessage | undefined, b: DataPacket | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.DataPacket.Kind + */ +export declare enum DataPacket_Kind { + /** + * @generated from enum value: RELIABLE = 0; + */ + RELIABLE = 0, + + /** + * @generated from enum value: LOSSY = 1; + */ + LOSSY = 1, +} + +/** + * @generated from message livekit.ActiveSpeakerUpdate + */ +export declare class ActiveSpeakerUpdate extends Message { + /** + * @generated from field: repeated livekit.SpeakerInfo speakers = 1; + */ + speakers: SpeakerInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ActiveSpeakerUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ActiveSpeakerUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): ActiveSpeakerUpdate; + + static fromJsonString(jsonString: string, options?: Partial): ActiveSpeakerUpdate; + + static equals(a: ActiveSpeakerUpdate | PlainMessage | undefined, b: ActiveSpeakerUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SpeakerInfo + */ +export declare class SpeakerInfo extends Message { + /** + * @generated from field: string sid = 1; + */ + sid: string; + + /** + * audio level, 0-1.0, 1 is loudest + * + * @generated from field: float level = 2; + */ + level: number; + + /** + * true if speaker is currently active + * + * @generated from field: bool active = 3; + */ + active: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SpeakerInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SpeakerInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SpeakerInfo; + + static fromJsonString(jsonString: string, options?: Partial): SpeakerInfo; + + static equals(a: SpeakerInfo | PlainMessage | undefined, b: SpeakerInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UserPacket + */ +export declare class UserPacket extends Message { + /** + * participant ID of user that sent the message + * + * @generated from field: string participant_sid = 1; + */ + participantSid: string; + + /** + * @generated from field: string participant_identity = 5; + */ + participantIdentity: string; + + /** + * user defined payload + * + * @generated from field: bytes payload = 2; + */ + payload: Uint8Array; + + /** + * the ID of the participants who will receive the message (sent to all by default) + * + * @generated from field: repeated string destination_sids = 3; + */ + destinationSids: string[]; + + /** + * identities of participants who will receive the message (sent to all by default) + * + * @generated from field: repeated string destination_identities = 6; + */ + destinationIdentities: string[]; + + /** + * topic under which the message was published + * + * @generated from field: optional string topic = 4; + */ + topic?: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UserPacket"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UserPacket; + + static fromJson(jsonValue: JsonValue, options?: Partial): UserPacket; + + static fromJsonString(jsonString: string, options?: Partial): UserPacket; + + static equals(a: UserPacket | PlainMessage | undefined, b: UserPacket | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ParticipantTracks + */ +export declare class ParticipantTracks extends Message { + /** + * participant ID of participant to whom the tracks belong + * + * @generated from field: string participant_sid = 1; + */ + participantSid: string; + + /** + * @generated from field: repeated string track_sids = 2; + */ + trackSids: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ParticipantTracks"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantTracks; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantTracks; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantTracks; + + static equals(a: ParticipantTracks | PlainMessage | undefined, b: ParticipantTracks | PlainMessage | undefined): boolean; +} + +/** + * details about the server + * + * @generated from message livekit.ServerInfo + */ +export declare class ServerInfo extends Message { + /** + * @generated from field: livekit.ServerInfo.Edition edition = 1; + */ + edition: ServerInfo_Edition; + + /** + * @generated from field: string version = 2; + */ + version: string; + + /** + * @generated from field: int32 protocol = 3; + */ + protocol: number; + + /** + * @generated from field: string region = 4; + */ + region: string; + + /** + * @generated from field: string node_id = 5; + */ + nodeId: string; + + /** + * additional debugging information. sent only if server is in development mode + * + * @generated from field: string debug_info = 6; + */ + debugInfo: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ServerInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ServerInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ServerInfo; + + static fromJsonString(jsonString: string, options?: Partial): ServerInfo; + + static equals(a: ServerInfo | PlainMessage | undefined, b: ServerInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.ServerInfo.Edition + */ +export declare enum ServerInfo_Edition { + /** + * @generated from enum value: Standard = 0; + */ + Standard = 0, + + /** + * @generated from enum value: Cloud = 1; + */ + Cloud = 1, +} + +/** + * details about the client + * + * @generated from message livekit.ClientInfo + */ +export declare class ClientInfo extends Message { + /** + * @generated from field: livekit.ClientInfo.SDK sdk = 1; + */ + sdk: ClientInfo_SDK; + + /** + * @generated from field: string version = 2; + */ + version: string; + + /** + * @generated from field: int32 protocol = 3; + */ + protocol: number; + + /** + * @generated from field: string os = 4; + */ + os: string; + + /** + * @generated from field: string os_version = 5; + */ + osVersion: string; + + /** + * @generated from field: string device_model = 6; + */ + deviceModel: string; + + /** + * @generated from field: string browser = 7; + */ + browser: string; + + /** + * @generated from field: string browser_version = 8; + */ + browserVersion: string; + + /** + * @generated from field: string address = 9; + */ + address: string; + + /** + * wifi, wired, cellular, vpn, empty if not known + * + * @generated from field: string network = 10; + */ + network: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ClientInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientInfo; + + static fromJsonString(jsonString: string, options?: Partial): ClientInfo; + + static equals(a: ClientInfo | PlainMessage | undefined, b: ClientInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from enum livekit.ClientInfo.SDK + */ +export declare enum ClientInfo_SDK { + /** + * @generated from enum value: UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: JS = 1; + */ + JS = 1, + + /** + * @generated from enum value: SWIFT = 2; + */ + SWIFT = 2, + + /** + * @generated from enum value: ANDROID = 3; + */ + ANDROID = 3, + + /** + * @generated from enum value: FLUTTER = 4; + */ + FLUTTER = 4, + + /** + * @generated from enum value: GO = 5; + */ + GO = 5, + + /** + * @generated from enum value: UNITY = 6; + */ + UNITY = 6, + + /** + * @generated from enum value: REACT_NATIVE = 7; + */ + REACT_NATIVE = 7, + + /** + * @generated from enum value: RUST = 8; + */ + RUST = 8, + + /** + * @generated from enum value: PYTHON = 9; + */ + PYTHON = 9, + + /** + * @generated from enum value: CPP = 10; + */ + CPP = 10, +} + +/** + * server provided client configuration + * + * @generated from message livekit.ClientConfiguration + */ +export declare class ClientConfiguration extends Message { + /** + * @generated from field: livekit.VideoConfiguration video = 1; + */ + video?: VideoConfiguration; + + /** + * @generated from field: livekit.VideoConfiguration screen = 2; + */ + screen?: VideoConfiguration; + + /** + * @generated from field: livekit.ClientConfigSetting resume_connection = 3; + */ + resumeConnection: ClientConfigSetting; + + /** + * @generated from field: livekit.DisabledCodecs disabled_codecs = 4; + */ + disabledCodecs?: DisabledCodecs; + + /** + * @generated from field: livekit.ClientConfigSetting force_relay = 5; + */ + forceRelay: ClientConfigSetting; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ClientConfiguration"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ClientConfiguration; + + static fromJson(jsonValue: JsonValue, options?: Partial): ClientConfiguration; + + static fromJsonString(jsonString: string, options?: Partial): ClientConfiguration; + + static equals(a: ClientConfiguration | PlainMessage | undefined, b: ClientConfiguration | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.VideoConfiguration + */ +export declare class VideoConfiguration extends Message { + /** + * @generated from field: livekit.ClientConfigSetting hardware_encoder = 1; + */ + hardwareEncoder: ClientConfigSetting; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.VideoConfiguration"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): VideoConfiguration; + + static fromJson(jsonValue: JsonValue, options?: Partial): VideoConfiguration; + + static fromJsonString(jsonString: string, options?: Partial): VideoConfiguration; + + static equals(a: VideoConfiguration | PlainMessage | undefined, b: VideoConfiguration | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.DisabledCodecs + */ +export declare class DisabledCodecs extends Message { + /** + * disabled for both publish and subscribe + * + * @generated from field: repeated livekit.Codec codecs = 1; + */ + codecs: Codec[]; + + /** + * only disable for publish + * + * @generated from field: repeated livekit.Codec publish = 2; + */ + publish: Codec[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DisabledCodecs"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DisabledCodecs; + + static fromJson(jsonValue: JsonValue, options?: Partial): DisabledCodecs; + + static fromJsonString(jsonString: string, options?: Partial): DisabledCodecs; + + static equals(a: DisabledCodecs | PlainMessage | undefined, b: DisabledCodecs | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RTPDrift + */ +export declare class RTPDrift extends Message { + /** + * @generated from field: google.protobuf.Timestamp start_time = 1; + */ + startTime?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp end_time = 2; + */ + endTime?: Timestamp; + + /** + * @generated from field: double duration = 3; + */ + duration: number; + + /** + * @generated from field: uint64 start_timestamp = 4; + */ + startTimestamp: bigint; + + /** + * @generated from field: uint64 end_timestamp = 5; + */ + endTimestamp: bigint; + + /** + * @generated from field: uint64 rtp_clock_ticks = 6; + */ + rtpClockTicks: bigint; + + /** + * @generated from field: int64 drift_samples = 7; + */ + driftSamples: bigint; + + /** + * @generated from field: double drift_ms = 8; + */ + driftMs: number; + + /** + * @generated from field: double clock_rate = 9; + */ + clockRate: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RTPDrift"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RTPDrift; + + static fromJson(jsonValue: JsonValue, options?: Partial): RTPDrift; + + static fromJsonString(jsonString: string, options?: Partial): RTPDrift; + + static equals(a: RTPDrift | PlainMessage | undefined, b: RTPDrift | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RTPStats + */ +export declare class RTPStats extends Message { + /** + * @generated from field: google.protobuf.Timestamp start_time = 1; + */ + startTime?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp end_time = 2; + */ + endTime?: Timestamp; + + /** + * @generated from field: double duration = 3; + */ + duration: number; + + /** + * @generated from field: uint32 packets = 4; + */ + packets: number; + + /** + * @generated from field: double packet_rate = 5; + */ + packetRate: number; + + /** + * @generated from field: uint64 bytes = 6; + */ + bytes: bigint; + + /** + * @generated from field: uint64 header_bytes = 39; + */ + headerBytes: bigint; + + /** + * @generated from field: double bitrate = 7; + */ + bitrate: number; + + /** + * @generated from field: uint32 packets_lost = 8; + */ + packetsLost: number; + + /** + * @generated from field: double packet_loss_rate = 9; + */ + packetLossRate: number; + + /** + * @generated from field: float packet_loss_percentage = 10; + */ + packetLossPercentage: number; + + /** + * @generated from field: uint32 packets_duplicate = 11; + */ + packetsDuplicate: number; + + /** + * @generated from field: double packet_duplicate_rate = 12; + */ + packetDuplicateRate: number; + + /** + * @generated from field: uint64 bytes_duplicate = 13; + */ + bytesDuplicate: bigint; + + /** + * @generated from field: uint64 header_bytes_duplicate = 40; + */ + headerBytesDuplicate: bigint; + + /** + * @generated from field: double bitrate_duplicate = 14; + */ + bitrateDuplicate: number; + + /** + * @generated from field: uint32 packets_padding = 15; + */ + packetsPadding: number; + + /** + * @generated from field: double packet_padding_rate = 16; + */ + packetPaddingRate: number; + + /** + * @generated from field: uint64 bytes_padding = 17; + */ + bytesPadding: bigint; + + /** + * @generated from field: uint64 header_bytes_padding = 41; + */ + headerBytesPadding: bigint; + + /** + * @generated from field: double bitrate_padding = 18; + */ + bitratePadding: number; + + /** + * @generated from field: uint32 packets_out_of_order = 19; + */ + packetsOutOfOrder: number; + + /** + * @generated from field: uint32 frames = 20; + */ + frames: number; + + /** + * @generated from field: double frame_rate = 21; + */ + frameRate: number; + + /** + * @generated from field: double jitter_current = 22; + */ + jitterCurrent: number; + + /** + * @generated from field: double jitter_max = 23; + */ + jitterMax: number; + + /** + * @generated from field: map gap_histogram = 24; + */ + gapHistogram: { [key: number]: number }; + + /** + * @generated from field: uint32 nacks = 25; + */ + nacks: number; + + /** + * @generated from field: uint32 nack_acks = 37; + */ + nackAcks: number; + + /** + * @generated from field: uint32 nack_misses = 26; + */ + nackMisses: number; + + /** + * @generated from field: uint32 nack_repeated = 38; + */ + nackRepeated: number; + + /** + * @generated from field: uint32 plis = 27; + */ + plis: number; + + /** + * @generated from field: google.protobuf.Timestamp last_pli = 28; + */ + lastPli?: Timestamp; + + /** + * @generated from field: uint32 firs = 29; + */ + firs: number; + + /** + * @generated from field: google.protobuf.Timestamp last_fir = 30; + */ + lastFir?: Timestamp; + + /** + * @generated from field: uint32 rtt_current = 31; + */ + rttCurrent: number; + + /** + * @generated from field: uint32 rtt_max = 32; + */ + rttMax: number; + + /** + * @generated from field: uint32 key_frames = 33; + */ + keyFrames: number; + + /** + * @generated from field: google.protobuf.Timestamp last_key_frame = 34; + */ + lastKeyFrame?: Timestamp; + + /** + * @generated from field: uint32 layer_lock_plis = 35; + */ + layerLockPlis: number; + + /** + * @generated from field: google.protobuf.Timestamp last_layer_lock_pli = 36; + */ + lastLayerLockPli?: Timestamp; + + /** + * @generated from field: livekit.RTPDrift packet_drift = 44; + */ + packetDrift?: RTPDrift; + + /** + * NEXT_ID: 46 + * + * @generated from field: livekit.RTPDrift report_drift = 45; + */ + reportDrift?: RTPDrift; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RTPStats"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RTPStats; + + static fromJson(jsonValue: JsonValue, options?: Partial): RTPStats; + + static fromJsonString(jsonString: string, options?: Partial): RTPStats; + + static equals(a: RTPStats | PlainMessage | undefined, b: RTPStats | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.TimedVersion + */ +export declare class TimedVersion extends Message { + /** + * @generated from field: int64 unix_micro = 1; + */ + unixMicro: bigint; + + /** + * @generated from field: int32 ticks = 2; + */ + ticks: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TimedVersion"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TimedVersion; + + static fromJson(jsonValue: JsonValue, options?: Partial): TimedVersion; + + static fromJsonString(jsonString: string, options?: Partial): TimedVersion; + + static equals(a: TimedVersion | PlainMessage | undefined, b: TimedVersion | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_models_pb.js b/packages/js/src/gen/livekit_models_pb.js new file mode 100644 index 0000000..6138170 --- /dev/null +++ b/packages/js/src/gen/livekit_models_pb.js @@ -0,0 +1,612 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_models.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3, Timestamp } from "@bufbuild/protobuf"; + +/** + * @generated from enum livekit.AudioCodec + */ +export const AudioCodec = proto3.makeEnum( + "livekit.AudioCodec", + [ + {no: 0, name: "DEFAULT_AC"}, + {no: 1, name: "OPUS"}, + {no: 2, name: "AAC"}, + ], +); + +/** + * @generated from enum livekit.VideoCodec + */ +export const VideoCodec = proto3.makeEnum( + "livekit.VideoCodec", + [ + {no: 0, name: "DEFAULT_VC"}, + {no: 1, name: "H264_BASELINE"}, + {no: 2, name: "H264_MAIN"}, + {no: 3, name: "H264_HIGH"}, + {no: 4, name: "VP8"}, + ], +); + +/** + * @generated from enum livekit.ImageCodec + */ +export const ImageCodec = proto3.makeEnum( + "livekit.ImageCodec", + [ + {no: 0, name: "IC_DEFAULT"}, + {no: 1, name: "IC_JPEG"}, + ], +); + +/** + * @generated from enum livekit.TrackType + */ +export const TrackType = proto3.makeEnum( + "livekit.TrackType", + [ + {no: 0, name: "AUDIO"}, + {no: 1, name: "VIDEO"}, + {no: 2, name: "DATA"}, + ], +); + +/** + * @generated from enum livekit.TrackSource + */ +export const TrackSource = proto3.makeEnum( + "livekit.TrackSource", + [ + {no: 0, name: "UNKNOWN"}, + {no: 1, name: "CAMERA"}, + {no: 2, name: "MICROPHONE"}, + {no: 3, name: "SCREEN_SHARE"}, + {no: 4, name: "SCREEN_SHARE_AUDIO"}, + ], +); + +/** + * @generated from enum livekit.VideoQuality + */ +export const VideoQuality = proto3.makeEnum( + "livekit.VideoQuality", + [ + {no: 0, name: "LOW"}, + {no: 1, name: "MEDIUM"}, + {no: 2, name: "HIGH"}, + {no: 3, name: "OFF"}, + ], +); + +/** + * @generated from enum livekit.ConnectionQuality + */ +export const ConnectionQuality = proto3.makeEnum( + "livekit.ConnectionQuality", + [ + {no: 0, name: "POOR"}, + {no: 1, name: "GOOD"}, + {no: 2, name: "EXCELLENT"}, + {no: 3, name: "LOST"}, + ], +); + +/** + * @generated from enum livekit.ClientConfigSetting + */ +export const ClientConfigSetting = proto3.makeEnum( + "livekit.ClientConfigSetting", + [ + {no: 0, name: "UNSET"}, + {no: 1, name: "DISABLED"}, + {no: 2, name: "ENABLED"}, + ], +); + +/** + * @generated from enum livekit.DisconnectReason + */ +export const DisconnectReason = proto3.makeEnum( + "livekit.DisconnectReason", + [ + {no: 0, name: "UNKNOWN_REASON"}, + {no: 1, name: "CLIENT_INITIATED"}, + {no: 2, name: "DUPLICATE_IDENTITY"}, + {no: 3, name: "SERVER_SHUTDOWN"}, + {no: 4, name: "PARTICIPANT_REMOVED"}, + {no: 5, name: "ROOM_DELETED"}, + {no: 6, name: "STATE_MISMATCH"}, + {no: 7, name: "JOIN_FAILURE"}, + {no: 8, name: "MIGRATION"}, + {no: 9, name: "SIGNAL_CLOSE"}, + ], +); + +/** + * @generated from enum livekit.ReconnectReason + */ +export const ReconnectReason = proto3.makeEnum( + "livekit.ReconnectReason", + [ + {no: 0, name: "RR_UNKNOWN"}, + {no: 1, name: "RR_SIGNAL_DISCONNECTED"}, + {no: 2, name: "RR_PUBLISHER_FAILED"}, + {no: 3, name: "RR_SUBSCRIBER_FAILED"}, + {no: 4, name: "RR_SWITCH_CANDIDATE"}, + ], +); + +/** + * @generated from enum livekit.SubscriptionError + */ +export const SubscriptionError = proto3.makeEnum( + "livekit.SubscriptionError", + [ + {no: 0, name: "SE_UNKNOWN"}, + {no: 1, name: "SE_CODEC_UNSUPPORTED"}, + {no: 2, name: "SE_TRACK_NOTFOUND"}, + ], +); + +/** + * @generated from message livekit.Room + */ +export const Room = proto3.makeMessageType( + "livekit.Room", + () => [ + { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "empty_timeout", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 4, name: "max_participants", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 5, name: "creation_time", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 6, name: "turn_password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "enabled_codecs", kind: "message", T: Codec, repeated: true }, + { no: 8, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "num_participants", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 11, name: "num_publishers", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 10, name: "active_recording", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 13, name: "version", kind: "message", T: TimedVersion }, + ], +); + +/** + * @generated from message livekit.Codec + */ +export const Codec = proto3.makeMessageType( + "livekit.Codec", + () => [ + { no: 1, name: "mime", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "fmtp_line", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.PlayoutDelay + */ +export const PlayoutDelay = proto3.makeMessageType( + "livekit.PlayoutDelay", + () => [ + { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "min", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "max", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ], +); + +/** + * @generated from message livekit.ParticipantPermission + */ +export const ParticipantPermission = proto3.makeMessageType( + "livekit.ParticipantPermission", + () => [ + { no: 1, name: "can_subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "can_publish", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "can_publish_data", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 9, name: "can_publish_sources", kind: "enum", T: proto3.getEnumType(TrackSource), repeated: true }, + { no: 7, name: "hidden", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 8, name: "recorder", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "can_update_metadata", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 11, name: "agent", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.ParticipantInfo + */ +export const ParticipantInfo = proto3.makeMessageType( + "livekit.ParticipantInfo", + () => [ + { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "state", kind: "enum", T: proto3.getEnumType(ParticipantInfo_State) }, + { no: 4, name: "tracks", kind: "message", T: TrackInfo, repeated: true }, + { no: 5, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "joined_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 9, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "version", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 11, name: "permission", kind: "message", T: ParticipantPermission }, + { no: 12, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "is_publisher", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 14, name: "kind", kind: "enum", T: proto3.getEnumType(ParticipantInfo_Kind) }, + ], +); + +/** + * @generated from enum livekit.ParticipantInfo.State + */ +export const ParticipantInfo_State = proto3.makeEnum( + "livekit.ParticipantInfo.State", + [ + {no: 0, name: "JOINING"}, + {no: 1, name: "JOINED"}, + {no: 2, name: "ACTIVE"}, + {no: 3, name: "DISCONNECTED"}, + ], +); + +/** + * @generated from enum livekit.ParticipantInfo.Kind + */ +export const ParticipantInfo_Kind = proto3.makeEnum( + "livekit.ParticipantInfo.Kind", + [ + {no: 0, name: "STANDARD"}, + {no: 1, name: "INGRESS"}, + {no: 2, name: "EGRESS"}, + {no: 3, name: "SIP"}, + {no: 4, name: "AGENT"}, + ], +); + +/** + * @generated from message livekit.Encryption + */ +export const Encryption = proto3.makeMessageType( + "livekit.Encryption", + [], +); + +/** + * @generated from enum livekit.Encryption.Type + */ +export const Encryption_Type = proto3.makeEnum( + "livekit.Encryption.Type", + [ + {no: 0, name: "NONE"}, + {no: 1, name: "GCM"}, + {no: 2, name: "CUSTOM"}, + ], +); + +/** + * @generated from message livekit.SimulcastCodecInfo + */ +export const SimulcastCodecInfo = proto3.makeMessageType( + "livekit.SimulcastCodecInfo", + () => [ + { no: 1, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "layers", kind: "message", T: VideoLayer, repeated: true }, + ], +); + +/** + * @generated from message livekit.TrackInfo + */ +export const TrackInfo = proto3.makeMessageType( + "livekit.TrackInfo", + () => [ + { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "type", kind: "enum", T: proto3.getEnumType(TrackType) }, + { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 6, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 7, name: "simulcast", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 8, name: "disable_dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 9, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) }, + { no: 10, name: "layers", kind: "message", T: VideoLayer, repeated: true }, + { no: 11, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "mid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 13, name: "codecs", kind: "message", T: SimulcastCodecInfo, repeated: true }, + { no: 14, name: "stereo", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 15, name: "disable_red", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 16, name: "encryption", kind: "enum", T: proto3.getEnumType(Encryption_Type) }, + { no: 17, name: "stream", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 18, name: "version", kind: "message", T: TimedVersion }, + ], +); + +/** + * provide information about available spatial layers + * + * @generated from message livekit.VideoLayer + */ +export const VideoLayer = proto3.makeMessageType( + "livekit.VideoLayer", + () => [ + { no: 1, name: "quality", kind: "enum", T: proto3.getEnumType(VideoQuality) }, + { no: 2, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 4, name: "bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 5, name: "ssrc", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ], +); + +/** + * new DataPacket API + * + * @generated from message livekit.DataPacket + */ +export const DataPacket = proto3.makeMessageType( + "livekit.DataPacket", + () => [ + { no: 1, name: "kind", kind: "enum", T: proto3.getEnumType(DataPacket_Kind) }, + { no: 2, name: "user", kind: "message", T: UserPacket, oneof: "value" }, + { no: 3, name: "speaker", kind: "message", T: ActiveSpeakerUpdate, oneof: "value" }, + ], +); + +/** + * @generated from enum livekit.DataPacket.Kind + */ +export const DataPacket_Kind = proto3.makeEnum( + "livekit.DataPacket.Kind", + [ + {no: 0, name: "RELIABLE"}, + {no: 1, name: "LOSSY"}, + ], +); + +/** + * @generated from message livekit.ActiveSpeakerUpdate + */ +export const ActiveSpeakerUpdate = proto3.makeMessageType( + "livekit.ActiveSpeakerUpdate", + () => [ + { no: 1, name: "speakers", kind: "message", T: SpeakerInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.SpeakerInfo + */ +export const SpeakerInfo = proto3.makeMessageType( + "livekit.SpeakerInfo", + () => [ + { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "level", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 3, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.UserPacket + */ +export const UserPacket = proto3.makeMessageType( + "livekit.UserPacket", + () => [ + { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "payload", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + { no: 3, name: "destination_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 6, name: "destination_identities", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "topic", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ], +); + +/** + * @generated from message livekit.ParticipantTracks + */ +export const ParticipantTracks = proto3.makeMessageType( + "livekit.ParticipantTracks", + () => [ + { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * details about the server + * + * @generated from message livekit.ServerInfo + */ +export const ServerInfo = proto3.makeMessageType( + "livekit.ServerInfo", + () => [ + { no: 1, name: "edition", kind: "enum", T: proto3.getEnumType(ServerInfo_Edition) }, + { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "protocol", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 4, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "node_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "debug_info", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from enum livekit.ServerInfo.Edition + */ +export const ServerInfo_Edition = proto3.makeEnum( + "livekit.ServerInfo.Edition", + [ + {no: 0, name: "Standard"}, + {no: 1, name: "Cloud"}, + ], +); + +/** + * details about the client + * + * @generated from message livekit.ClientInfo + */ +export const ClientInfo = proto3.makeMessageType( + "livekit.ClientInfo", + () => [ + { no: 1, name: "sdk", kind: "enum", T: proto3.getEnumType(ClientInfo_SDK) }, + { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "protocol", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 4, name: "os", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "os_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "device_model", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "browser", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "browser_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "network", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from enum livekit.ClientInfo.SDK + */ +export const ClientInfo_SDK = proto3.makeEnum( + "livekit.ClientInfo.SDK", + [ + {no: 0, name: "UNKNOWN"}, + {no: 1, name: "JS"}, + {no: 2, name: "SWIFT"}, + {no: 3, name: "ANDROID"}, + {no: 4, name: "FLUTTER"}, + {no: 5, name: "GO"}, + {no: 6, name: "UNITY"}, + {no: 7, name: "REACT_NATIVE"}, + {no: 8, name: "RUST"}, + {no: 9, name: "PYTHON"}, + {no: 10, name: "CPP"}, + ], +); + +/** + * server provided client configuration + * + * @generated from message livekit.ClientConfiguration + */ +export const ClientConfiguration = proto3.makeMessageType( + "livekit.ClientConfiguration", + () => [ + { no: 1, name: "video", kind: "message", T: VideoConfiguration }, + { no: 2, name: "screen", kind: "message", T: VideoConfiguration }, + { no: 3, name: "resume_connection", kind: "enum", T: proto3.getEnumType(ClientConfigSetting) }, + { no: 4, name: "disabled_codecs", kind: "message", T: DisabledCodecs }, + { no: 5, name: "force_relay", kind: "enum", T: proto3.getEnumType(ClientConfigSetting) }, + ], +); + +/** + * @generated from message livekit.VideoConfiguration + */ +export const VideoConfiguration = proto3.makeMessageType( + "livekit.VideoConfiguration", + () => [ + { no: 1, name: "hardware_encoder", kind: "enum", T: proto3.getEnumType(ClientConfigSetting) }, + ], +); + +/** + * @generated from message livekit.DisabledCodecs + */ +export const DisabledCodecs = proto3.makeMessageType( + "livekit.DisabledCodecs", + () => [ + { no: 1, name: "codecs", kind: "message", T: Codec, repeated: true }, + { no: 2, name: "publish", kind: "message", T: Codec, repeated: true }, + ], +); + +/** + * @generated from message livekit.RTPDrift + */ +export const RTPDrift = proto3.makeMessageType( + "livekit.RTPDrift", + () => [ + { no: 1, name: "start_time", kind: "message", T: Timestamp }, + { no: 2, name: "end_time", kind: "message", T: Timestamp }, + { no: 3, name: "duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 4, name: "start_timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 5, name: "end_timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 6, name: "rtp_clock_ticks", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 7, name: "drift_samples", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 8, name: "drift_ms", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 9, name: "clock_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + ], +); + +/** + * @generated from message livekit.RTPStats + */ +export const RTPStats = proto3.makeMessageType( + "livekit.RTPStats", + () => [ + { no: 1, name: "start_time", kind: "message", T: Timestamp }, + { no: 2, name: "end_time", kind: "message", T: Timestamp }, + { no: 3, name: "duration", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 4, name: "packets", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 5, name: "packet_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 6, name: "bytes", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 39, name: "header_bytes", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 7, name: "bitrate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 8, name: "packets_lost", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 9, name: "packet_loss_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 10, name: "packet_loss_percentage", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + { no: 11, name: "packets_duplicate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 12, name: "packet_duplicate_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 13, name: "bytes_duplicate", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 40, name: "header_bytes_duplicate", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 14, name: "bitrate_duplicate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 15, name: "packets_padding", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 16, name: "packet_padding_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 17, name: "bytes_padding", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 41, name: "header_bytes_padding", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 18, name: "bitrate_padding", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 19, name: "packets_out_of_order", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 20, name: "frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 21, name: "frame_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 22, name: "jitter_current", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 23, name: "jitter_max", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, + { no: 24, name: "gap_histogram", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 13 /* ScalarType.UINT32 */} }, + { no: 25, name: "nacks", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 37, name: "nack_acks", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 26, name: "nack_misses", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 38, name: "nack_repeated", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 27, name: "plis", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 28, name: "last_pli", kind: "message", T: Timestamp }, + { no: 29, name: "firs", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 30, name: "last_fir", kind: "message", T: Timestamp }, + { no: 31, name: "rtt_current", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 32, name: "rtt_max", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 33, name: "key_frames", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 34, name: "last_key_frame", kind: "message", T: Timestamp }, + { no: 35, name: "layer_lock_plis", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 36, name: "last_layer_lock_pli", kind: "message", T: Timestamp }, + { no: 44, name: "packet_drift", kind: "message", T: RTPDrift }, + { no: 45, name: "report_drift", kind: "message", T: RTPDrift }, + ], +); + +/** + * @generated from message livekit.TimedVersion + */ +export const TimedVersion = proto3.makeMessageType( + "livekit.TimedVersion", + () => [ + { no: 1, name: "unix_micro", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 2, name: "ticks", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ], +); + diff --git a/packages/js/src/gen/livekit_rtc_pb.d.ts b/packages/js/src/gen/livekit_rtc_pb.d.ts new file mode 100644 index 0000000..9cddcb6 --- /dev/null +++ b/packages/js/src/gen/livekit_rtc_pb.d.ts @@ -0,0 +1,1782 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_rtc.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { ClientConfiguration, ConnectionQuality, DisconnectReason, Encryption_Type, ParticipantInfo, ParticipantTracks, Room, ServerInfo, SpeakerInfo, SubscriptionError, TrackInfo, TrackSource, TrackType, VideoLayer, VideoQuality } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.SignalTarget + */ +export declare enum SignalTarget { + /** + * @generated from enum value: PUBLISHER = 0; + */ + PUBLISHER = 0, + + /** + * @generated from enum value: SUBSCRIBER = 1; + */ + SUBSCRIBER = 1, +} + +/** + * @generated from enum livekit.StreamState + */ +export declare enum StreamState { + /** + * @generated from enum value: ACTIVE = 0; + */ + ACTIVE = 0, + + /** + * @generated from enum value: PAUSED = 1; + */ + PAUSED = 1, +} + +/** + * @generated from enum livekit.CandidateProtocol + */ +export declare enum CandidateProtocol { + /** + * @generated from enum value: UDP = 0; + */ + UDP = 0, + + /** + * @generated from enum value: TCP = 1; + */ + TCP = 1, + + /** + * @generated from enum value: TLS = 2; + */ + TLS = 2, +} + +/** + * @generated from message livekit.SignalRequest + */ +export declare class SignalRequest extends Message { + /** + * @generated from oneof livekit.SignalRequest.message + */ + message: { + /** + * initial join exchange, for publisher + * + * @generated from field: livekit.SessionDescription offer = 1; + */ + value: SessionDescription; + case: "offer"; + } | { + /** + * participant answering publisher offer + * + * @generated from field: livekit.SessionDescription answer = 2; + */ + value: SessionDescription; + case: "answer"; + } | { + /** + * @generated from field: livekit.TrickleRequest trickle = 3; + */ + value: TrickleRequest; + case: "trickle"; + } | { + /** + * @generated from field: livekit.AddTrackRequest add_track = 4; + */ + value: AddTrackRequest; + case: "addTrack"; + } | { + /** + * mute the participant's published tracks + * + * @generated from field: livekit.MuteTrackRequest mute = 5; + */ + value: MuteTrackRequest; + case: "mute"; + } | { + /** + * Subscribe or unsubscribe from tracks + * + * @generated from field: livekit.UpdateSubscription subscription = 6; + */ + value: UpdateSubscription; + case: "subscription"; + } | { + /** + * Update settings of subscribed tracks + * + * @generated from field: livekit.UpdateTrackSettings track_setting = 7; + */ + value: UpdateTrackSettings; + case: "trackSetting"; + } | { + /** + * Immediately terminate session + * + * @generated from field: livekit.LeaveRequest leave = 8; + */ + value: LeaveRequest; + case: "leave"; + } | { + /** + * Update published video layers + * + * @generated from field: livekit.UpdateVideoLayers update_layers = 10; + */ + value: UpdateVideoLayers; + case: "updateLayers"; + } | { + /** + * Update subscriber permissions + * + * @generated from field: livekit.SubscriptionPermission subscription_permission = 11; + */ + value: SubscriptionPermission; + case: "subscriptionPermission"; + } | { + /** + * sync client's subscribe state to server during reconnect + * + * @generated from field: livekit.SyncState sync_state = 12; + */ + value: SyncState; + case: "syncState"; + } | { + /** + * Simulate conditions, for client validations + * + * @generated from field: livekit.SimulateScenario simulate = 13; + */ + value: SimulateScenario; + case: "simulate"; + } | { + /** + * client triggered ping to server + * + * deprecated by ping_req (message Ping) + * + * @generated from field: int64 ping = 14; + */ + value: bigint; + case: "ping"; + } | { + /** + * update a participant's own metadata and/or name + * + * @generated from field: livekit.UpdateParticipantMetadata update_metadata = 15; + */ + value: UpdateParticipantMetadata; + case: "updateMetadata"; + } | { + /** + * @generated from field: livekit.Ping ping_req = 16; + */ + value: Ping; + case: "pingReq"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SignalRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SignalRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): SignalRequest; + + static fromJsonString(jsonString: string, options?: Partial): SignalRequest; + + static equals(a: SignalRequest | PlainMessage | undefined, b: SignalRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SignalResponse + */ +export declare class SignalResponse extends Message { + /** + * @generated from oneof livekit.SignalResponse.message + */ + message: { + /** + * sent when join is accepted + * + * @generated from field: livekit.JoinResponse join = 1; + */ + value: JoinResponse; + case: "join"; + } | { + /** + * sent when server answers publisher + * + * @generated from field: livekit.SessionDescription answer = 2; + */ + value: SessionDescription; + case: "answer"; + } | { + /** + * sent when server is sending subscriber an offer + * + * @generated from field: livekit.SessionDescription offer = 3; + */ + value: SessionDescription; + case: "offer"; + } | { + /** + * sent when an ICE candidate is available + * + * @generated from field: livekit.TrickleRequest trickle = 4; + */ + value: TrickleRequest; + case: "trickle"; + } | { + /** + * sent when participants in the room has changed + * + * @generated from field: livekit.ParticipantUpdate update = 5; + */ + value: ParticipantUpdate; + case: "update"; + } | { + /** + * sent to the participant when their track has been published + * + * @generated from field: livekit.TrackPublishedResponse track_published = 6; + */ + value: TrackPublishedResponse; + case: "trackPublished"; + } | { + /** + * Immediately terminate session + * + * @generated from field: livekit.LeaveRequest leave = 8; + */ + value: LeaveRequest; + case: "leave"; + } | { + /** + * server initiated mute + * + * @generated from field: livekit.MuteTrackRequest mute = 9; + */ + value: MuteTrackRequest; + case: "mute"; + } | { + /** + * indicates changes to speaker status, including when they've gone to not speaking + * + * @generated from field: livekit.SpeakersChanged speakers_changed = 10; + */ + value: SpeakersChanged; + case: "speakersChanged"; + } | { + /** + * sent when metadata of the room has changed + * + * @generated from field: livekit.RoomUpdate room_update = 11; + */ + value: RoomUpdate; + case: "roomUpdate"; + } | { + /** + * when connection quality changed + * + * @generated from field: livekit.ConnectionQualityUpdate connection_quality = 12; + */ + value: ConnectionQualityUpdate; + case: "connectionQuality"; + } | { + /** + * when streamed tracks state changed, used to notify when any of the streams were paused due to + * congestion + * + * @generated from field: livekit.StreamStateUpdate stream_state_update = 13; + */ + value: StreamStateUpdate; + case: "streamStateUpdate"; + } | { + /** + * when max subscribe quality changed, used by dynamic broadcasting to disable unused layers + * + * @generated from field: livekit.SubscribedQualityUpdate subscribed_quality_update = 14; + */ + value: SubscribedQualityUpdate; + case: "subscribedQualityUpdate"; + } | { + /** + * when subscription permission changed + * + * @generated from field: livekit.SubscriptionPermissionUpdate subscription_permission_update = 15; + */ + value: SubscriptionPermissionUpdate; + case: "subscriptionPermissionUpdate"; + } | { + /** + * update the token the client was using, to prevent an active client from using an expired token + * + * @generated from field: string refresh_token = 16; + */ + value: string; + case: "refreshToken"; + } | { + /** + * server initiated track unpublish + * + * @generated from field: livekit.TrackUnpublishedResponse track_unpublished = 17; + */ + value: TrackUnpublishedResponse; + case: "trackUnpublished"; + } | { + /** + * respond to ping + * + * deprecated by pong_resp (message Pong) + * + * @generated from field: int64 pong = 18; + */ + value: bigint; + case: "pong"; + } | { + /** + * sent when client reconnects + * + * @generated from field: livekit.ReconnectResponse reconnect = 19; + */ + value: ReconnectResponse; + case: "reconnect"; + } | { + /** + * respond to Ping + * + * @generated from field: livekit.Pong pong_resp = 20; + */ + value: Pong; + case: "pongResp"; + } | { + /** + * Subscription response, client should not expect any media from this subscription if it fails + * + * @generated from field: livekit.SubscriptionResponse subscription_response = 21; + */ + value: SubscriptionResponse; + case: "subscriptionResponse"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SignalResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SignalResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SignalResponse; + + static fromJsonString(jsonString: string, options?: Partial): SignalResponse; + + static equals(a: SignalResponse | PlainMessage | undefined, b: SignalResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SimulcastCodec + */ +export declare class SimulcastCodec extends Message { + /** + * @generated from field: string codec = 1; + */ + codec: string; + + /** + * @generated from field: string cid = 2; + */ + cid: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SimulcastCodec"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SimulcastCodec; + + static fromJson(jsonValue: JsonValue, options?: Partial): SimulcastCodec; + + static fromJsonString(jsonString: string, options?: Partial): SimulcastCodec; + + static equals(a: SimulcastCodec | PlainMessage | undefined, b: SimulcastCodec | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.AddTrackRequest + */ +export declare class AddTrackRequest extends Message { + /** + * client ID of track, to match it when RTC track is received + * + * @generated from field: string cid = 1; + */ + cid: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: livekit.TrackType type = 3; + */ + type: TrackType; + + /** + * to be deprecated in favor of layers + * + * @generated from field: uint32 width = 4; + */ + width: number; + + /** + * @generated from field: uint32 height = 5; + */ + height: number; + + /** + * true to add track and initialize to muted + * + * @generated from field: bool muted = 6; + */ + muted: boolean; + + /** + * true if DTX (Discontinuous Transmission) is disabled for audio + * + * @generated from field: bool disable_dtx = 7; + */ + disableDtx: boolean; + + /** + * @generated from field: livekit.TrackSource source = 8; + */ + source: TrackSource; + + /** + * @generated from field: repeated livekit.VideoLayer layers = 9; + */ + layers: VideoLayer[]; + + /** + * @generated from field: repeated livekit.SimulcastCodec simulcast_codecs = 10; + */ + simulcastCodecs: SimulcastCodec[]; + + /** + * server ID of track, publish new codec to exist track + * + * @generated from field: string sid = 11; + */ + sid: string; + + /** + * @generated from field: bool stereo = 12; + */ + stereo: boolean; + + /** + * true if RED (Redundant Encoding) is disabled for audio + * + * @generated from field: bool disable_red = 13; + */ + disableRed: boolean; + + /** + * @generated from field: livekit.Encryption.Type encryption = 14; + */ + encryption: Encryption_Type; + + /** + * which stream the track belongs to, used to group tracks together. + * if not specified, server will infer it from track source to bundle camera/microphone, screenshare/audio together + * + * @generated from field: string stream = 15; + */ + stream: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.AddTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): AddTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): AddTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): AddTrackRequest; + + static equals(a: AddTrackRequest | PlainMessage | undefined, b: AddTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.TrickleRequest + */ +export declare class TrickleRequest extends Message { + /** + * @generated from field: string candidateInit = 1; + */ + candidateInit: string; + + /** + * @generated from field: livekit.SignalTarget target = 2; + */ + target: SignalTarget; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrickleRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrickleRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrickleRequest; + + static fromJsonString(jsonString: string, options?: Partial): TrickleRequest; + + static equals(a: TrickleRequest | PlainMessage | undefined, b: TrickleRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.MuteTrackRequest + */ +export declare class MuteTrackRequest extends Message { + /** + * @generated from field: string sid = 1; + */ + sid: string; + + /** + * @generated from field: bool muted = 2; + */ + muted: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.MuteTrackRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MuteTrackRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): MuteTrackRequest; + + static fromJsonString(jsonString: string, options?: Partial): MuteTrackRequest; + + static equals(a: MuteTrackRequest | PlainMessage | undefined, b: MuteTrackRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.JoinResponse + */ +export declare class JoinResponse extends Message { + /** + * @generated from field: livekit.Room room = 1; + */ + room?: Room; + + /** + * @generated from field: livekit.ParticipantInfo participant = 2; + */ + participant?: ParticipantInfo; + + /** + * @generated from field: repeated livekit.ParticipantInfo other_participants = 3; + */ + otherParticipants: ParticipantInfo[]; + + /** + * deprecated. use server_info.version instead. + * + * @generated from field: string server_version = 4; + */ + serverVersion: string; + + /** + * @generated from field: repeated livekit.ICEServer ice_servers = 5; + */ + iceServers: ICEServer[]; + + /** + * use subscriber as the primary PeerConnection + * + * @generated from field: bool subscriber_primary = 6; + */ + subscriberPrimary: boolean; + + /** + * when the current server isn't available, return alternate url to retry connection + * when this is set, the other fields will be largely empty + * + * @generated from field: string alternative_url = 7; + */ + alternativeUrl: string; + + /** + * @generated from field: livekit.ClientConfiguration client_configuration = 8; + */ + clientConfiguration?: ClientConfiguration; + + /** + * deprecated. use server_info.region instead. + * + * @generated from field: string server_region = 9; + */ + serverRegion: string; + + /** + * @generated from field: int32 ping_timeout = 10; + */ + pingTimeout: number; + + /** + * @generated from field: int32 ping_interval = 11; + */ + pingInterval: number; + + /** + * @generated from field: livekit.ServerInfo server_info = 12; + */ + serverInfo?: ServerInfo; + + /** + * Server-Injected-Frame byte trailer, used to identify unencrypted frames when e2ee is enabled + * + * @generated from field: bytes sif_trailer = 13; + */ + sifTrailer: Uint8Array; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.JoinResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): JoinResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): JoinResponse; + + static fromJsonString(jsonString: string, options?: Partial): JoinResponse; + + static equals(a: JoinResponse | PlainMessage | undefined, b: JoinResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ReconnectResponse + */ +export declare class ReconnectResponse extends Message { + /** + * @generated from field: repeated livekit.ICEServer ice_servers = 1; + */ + iceServers: ICEServer[]; + + /** + * @generated from field: livekit.ClientConfiguration client_configuration = 2; + */ + clientConfiguration?: ClientConfiguration; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ReconnectResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ReconnectResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ReconnectResponse; + + static fromJsonString(jsonString: string, options?: Partial): ReconnectResponse; + + static equals(a: ReconnectResponse | PlainMessage | undefined, b: ReconnectResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.TrackPublishedResponse + */ +export declare class TrackPublishedResponse extends Message { + /** + * @generated from field: string cid = 1; + */ + cid: string; + + /** + * @generated from field: livekit.TrackInfo track = 2; + */ + track?: TrackInfo; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrackPublishedResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackPublishedResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackPublishedResponse; + + static fromJsonString(jsonString: string, options?: Partial): TrackPublishedResponse; + + static equals(a: TrackPublishedResponse | PlainMessage | undefined, b: TrackPublishedResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.TrackUnpublishedResponse + */ +export declare class TrackUnpublishedResponse extends Message { + /** + * @generated from field: string track_sid = 1; + */ + trackSid: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrackUnpublishedResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackUnpublishedResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackUnpublishedResponse; + + static fromJsonString(jsonString: string, options?: Partial): TrackUnpublishedResponse; + + static equals(a: TrackUnpublishedResponse | PlainMessage | undefined, b: TrackUnpublishedResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SessionDescription + */ +export declare class SessionDescription extends Message { + /** + * "answer" | "offer" | "pranswer" | "rollback" + * + * @generated from field: string type = 1; + */ + type: string; + + /** + * @generated from field: string sdp = 2; + */ + sdp: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SessionDescription"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SessionDescription; + + static fromJson(jsonValue: JsonValue, options?: Partial): SessionDescription; + + static fromJsonString(jsonString: string, options?: Partial): SessionDescription; + + static equals(a: SessionDescription | PlainMessage | undefined, b: SessionDescription | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ParticipantUpdate + */ +export declare class ParticipantUpdate extends Message { + /** + * @generated from field: repeated livekit.ParticipantInfo participants = 1; + */ + participants: ParticipantInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ParticipantUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ParticipantUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): ParticipantUpdate; + + static fromJsonString(jsonString: string, options?: Partial): ParticipantUpdate; + + static equals(a: ParticipantUpdate | PlainMessage | undefined, b: ParticipantUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateSubscription + */ +export declare class UpdateSubscription extends Message { + /** + * @generated from field: repeated string track_sids = 1; + */ + trackSids: string[]; + + /** + * @generated from field: bool subscribe = 2; + */ + subscribe: boolean; + + /** + * @generated from field: repeated livekit.ParticipantTracks participant_tracks = 3; + */ + participantTracks: ParticipantTracks[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateSubscription"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateSubscription; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateSubscription; + + static fromJsonString(jsonString: string, options?: Partial): UpdateSubscription; + + static equals(a: UpdateSubscription | PlainMessage | undefined, b: UpdateSubscription | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateTrackSettings + */ +export declare class UpdateTrackSettings extends Message { + /** + * @generated from field: repeated string track_sids = 1; + */ + trackSids: string[]; + + /** + * when true, the track is placed in a paused state, with no new data returned + * + * @generated from field: bool disabled = 3; + */ + disabled: boolean; + + /** + * deprecated in favor of width & height + * + * @generated from field: livekit.VideoQuality quality = 4; + */ + quality: VideoQuality; + + /** + * for video, width to receive + * + * @generated from field: uint32 width = 5; + */ + width: number; + + /** + * for video, height to receive + * + * @generated from field: uint32 height = 6; + */ + height: number; + + /** + * @generated from field: uint32 fps = 7; + */ + fps: number; + + /** + * subscription priority. 1 being the highest (0 is unset) + * when unset, server sill assign priority based on the order of subscription + * server will use priority in the following ways: + * 1. when subscribed tracks exceed per-participant subscription limit, server will + * pause the lowest priority tracks + * 2. when the network is congested, server will assign available bandwidth to + * higher priority tracks first. lowest priority tracks can be paused + * + * @generated from field: uint32 priority = 8; + */ + priority: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateTrackSettings"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrackSettings; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrackSettings; + + static fromJsonString(jsonString: string, options?: Partial): UpdateTrackSettings; + + static equals(a: UpdateTrackSettings | PlainMessage | undefined, b: UpdateTrackSettings | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.LeaveRequest + */ +export declare class LeaveRequest extends Message { + /** + * sent when server initiates the disconnect due to server-restart + * indicates clients should attempt full-reconnect sequence + * NOTE: `can_reconnect` obsoleted by `action` starting in protocol version 13 + * + * @generated from field: bool can_reconnect = 1; + */ + canReconnect: boolean; + + /** + * @generated from field: livekit.DisconnectReason reason = 2; + */ + reason: DisconnectReason; + + /** + * @generated from field: livekit.LeaveRequest.Action action = 3; + */ + action: LeaveRequest_Action; + + /** + * @generated from field: livekit.RegionSettings regions = 4; + */ + regions?: RegionSettings; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.LeaveRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): LeaveRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): LeaveRequest; + + static fromJsonString(jsonString: string, options?: Partial): LeaveRequest; + + static equals(a: LeaveRequest | PlainMessage | undefined, b: LeaveRequest | PlainMessage | undefined): boolean; +} + +/** + * indicates action clients should take on receiving this message + * + * @generated from enum livekit.LeaveRequest.Action + */ +export declare enum LeaveRequest_Action { + /** + * should disconnect + * + * @generated from enum value: DISCONNECT = 0; + */ + DISCONNECT = 0, + + /** + * should attempt a resume with `reconnect=1` in join URL + * + * @generated from enum value: RESUME = 1; + */ + RESUME = 1, + + /** + * should attempt a reconnect, i. e. no `reconnect=1` + * + * @generated from enum value: RECONNECT = 2; + */ + RECONNECT = 2, +} + +/** + * message to indicate published video track dimensions are changing + * + * @generated from message livekit.UpdateVideoLayers + */ +export declare class UpdateVideoLayers extends Message { + /** + * @generated from field: string track_sid = 1; + */ + trackSid: string; + + /** + * @generated from field: repeated livekit.VideoLayer layers = 2; + */ + layers: VideoLayer[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateVideoLayers"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateVideoLayers; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateVideoLayers; + + static fromJsonString(jsonString: string, options?: Partial): UpdateVideoLayers; + + static equals(a: UpdateVideoLayers | PlainMessage | undefined, b: UpdateVideoLayers | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.UpdateParticipantMetadata + */ +export declare class UpdateParticipantMetadata extends Message { + /** + * @generated from field: string metadata = 1; + */ + metadata: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.UpdateParticipantMetadata"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateParticipantMetadata; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateParticipantMetadata; + + static fromJsonString(jsonString: string, options?: Partial): UpdateParticipantMetadata; + + static equals(a: UpdateParticipantMetadata | PlainMessage | undefined, b: UpdateParticipantMetadata | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ICEServer + */ +export declare class ICEServer extends Message { + /** + * @generated from field: repeated string urls = 1; + */ + urls: string[]; + + /** + * @generated from field: string username = 2; + */ + username: string; + + /** + * @generated from field: string credential = 3; + */ + credential: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ICEServer"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ICEServer; + + static fromJson(jsonValue: JsonValue, options?: Partial): ICEServer; + + static fromJsonString(jsonString: string, options?: Partial): ICEServer; + + static equals(a: ICEServer | PlainMessage | undefined, b: ICEServer | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SpeakersChanged + */ +export declare class SpeakersChanged extends Message { + /** + * @generated from field: repeated livekit.SpeakerInfo speakers = 1; + */ + speakers: SpeakerInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SpeakersChanged"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SpeakersChanged; + + static fromJson(jsonValue: JsonValue, options?: Partial): SpeakersChanged; + + static fromJsonString(jsonString: string, options?: Partial): SpeakersChanged; + + static equals(a: SpeakersChanged | PlainMessage | undefined, b: SpeakersChanged | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RoomUpdate + */ +export declare class RoomUpdate extends Message { + /** + * @generated from field: livekit.Room room = 1; + */ + room?: Room; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RoomUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RoomUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): RoomUpdate; + + static fromJsonString(jsonString: string, options?: Partial): RoomUpdate; + + static equals(a: RoomUpdate | PlainMessage | undefined, b: RoomUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ConnectionQualityInfo + */ +export declare class ConnectionQualityInfo extends Message { + /** + * @generated from field: string participant_sid = 1; + */ + participantSid: string; + + /** + * @generated from field: livekit.ConnectionQuality quality = 2; + */ + quality: ConnectionQuality; + + /** + * @generated from field: float score = 3; + */ + score: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ConnectionQualityInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionQualityInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionQualityInfo; + + static fromJsonString(jsonString: string, options?: Partial): ConnectionQualityInfo; + + static equals(a: ConnectionQualityInfo | PlainMessage | undefined, b: ConnectionQualityInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ConnectionQualityUpdate + */ +export declare class ConnectionQualityUpdate extends Message { + /** + * @generated from field: repeated livekit.ConnectionQualityInfo updates = 1; + */ + updates: ConnectionQualityInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ConnectionQualityUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ConnectionQualityUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): ConnectionQualityUpdate; + + static fromJsonString(jsonString: string, options?: Partial): ConnectionQualityUpdate; + + static equals(a: ConnectionQualityUpdate | PlainMessage | undefined, b: ConnectionQualityUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.StreamStateInfo + */ +export declare class StreamStateInfo extends Message { + /** + * @generated from field: string participant_sid = 1; + */ + participantSid: string; + + /** + * @generated from field: string track_sid = 2; + */ + trackSid: string; + + /** + * @generated from field: livekit.StreamState state = 3; + */ + state: StreamState; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.StreamStateInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamStateInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamStateInfo; + + static fromJsonString(jsonString: string, options?: Partial): StreamStateInfo; + + static equals(a: StreamStateInfo | PlainMessage | undefined, b: StreamStateInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.StreamStateUpdate + */ +export declare class StreamStateUpdate extends Message { + /** + * @generated from field: repeated livekit.StreamStateInfo stream_states = 1; + */ + streamStates: StreamStateInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.StreamStateUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamStateUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamStateUpdate; + + static fromJsonString(jsonString: string, options?: Partial): StreamStateUpdate; + + static equals(a: StreamStateUpdate | PlainMessage | undefined, b: StreamStateUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SubscribedQuality + */ +export declare class SubscribedQuality extends Message { + /** + * @generated from field: livekit.VideoQuality quality = 1; + */ + quality: VideoQuality; + + /** + * @generated from field: bool enabled = 2; + */ + enabled: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SubscribedQuality"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubscribedQuality; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubscribedQuality; + + static fromJsonString(jsonString: string, options?: Partial): SubscribedQuality; + + static equals(a: SubscribedQuality | PlainMessage | undefined, b: SubscribedQuality | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SubscribedCodec + */ +export declare class SubscribedCodec extends Message { + /** + * @generated from field: string codec = 1; + */ + codec: string; + + /** + * @generated from field: repeated livekit.SubscribedQuality qualities = 2; + */ + qualities: SubscribedQuality[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SubscribedCodec"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubscribedCodec; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubscribedCodec; + + static fromJsonString(jsonString: string, options?: Partial): SubscribedCodec; + + static equals(a: SubscribedCodec | PlainMessage | undefined, b: SubscribedCodec | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SubscribedQualityUpdate + */ +export declare class SubscribedQualityUpdate extends Message { + /** + * @generated from field: string track_sid = 1; + */ + trackSid: string; + + /** + * @generated from field: repeated livekit.SubscribedQuality subscribed_qualities = 2; + */ + subscribedQualities: SubscribedQuality[]; + + /** + * @generated from field: repeated livekit.SubscribedCodec subscribed_codecs = 3; + */ + subscribedCodecs: SubscribedCodec[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SubscribedQualityUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubscribedQualityUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubscribedQualityUpdate; + + static fromJsonString(jsonString: string, options?: Partial): SubscribedQualityUpdate; + + static equals(a: SubscribedQualityUpdate | PlainMessage | undefined, b: SubscribedQualityUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.TrackPermission + */ +export declare class TrackPermission extends Message { + /** + * permission could be granted either by participant sid or identity + * + * @generated from field: string participant_sid = 1; + */ + participantSid: string; + + /** + * @generated from field: bool all_tracks = 2; + */ + allTracks: boolean; + + /** + * @generated from field: repeated string track_sids = 3; + */ + trackSids: string[]; + + /** + * @generated from field: string participant_identity = 4; + */ + participantIdentity: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.TrackPermission"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): TrackPermission; + + static fromJson(jsonValue: JsonValue, options?: Partial): TrackPermission; + + static fromJsonString(jsonString: string, options?: Partial): TrackPermission; + + static equals(a: TrackPermission | PlainMessage | undefined, b: TrackPermission | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SubscriptionPermission + */ +export declare class SubscriptionPermission extends Message { + /** + * @generated from field: bool all_participants = 1; + */ + allParticipants: boolean; + + /** + * @generated from field: repeated livekit.TrackPermission track_permissions = 2; + */ + trackPermissions: TrackPermission[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SubscriptionPermission"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubscriptionPermission; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubscriptionPermission; + + static fromJsonString(jsonString: string, options?: Partial): SubscriptionPermission; + + static equals(a: SubscriptionPermission | PlainMessage | undefined, b: SubscriptionPermission | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SubscriptionPermissionUpdate + */ +export declare class SubscriptionPermissionUpdate extends Message { + /** + * @generated from field: string participant_sid = 1; + */ + participantSid: string; + + /** + * @generated from field: string track_sid = 2; + */ + trackSid: string; + + /** + * @generated from field: bool allowed = 3; + */ + allowed: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SubscriptionPermissionUpdate"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubscriptionPermissionUpdate; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubscriptionPermissionUpdate; + + static fromJsonString(jsonString: string, options?: Partial): SubscriptionPermissionUpdate; + + static equals(a: SubscriptionPermissionUpdate | PlainMessage | undefined, b: SubscriptionPermissionUpdate | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SyncState + */ +export declare class SyncState extends Message { + /** + * last subscribe answer before reconnecting + * + * @generated from field: livekit.SessionDescription answer = 1; + */ + answer?: SessionDescription; + + /** + * @generated from field: livekit.UpdateSubscription subscription = 2; + */ + subscription?: UpdateSubscription; + + /** + * @generated from field: repeated livekit.TrackPublishedResponse publish_tracks = 3; + */ + publishTracks: TrackPublishedResponse[]; + + /** + * @generated from field: repeated livekit.DataChannelInfo data_channels = 4; + */ + dataChannels: DataChannelInfo[]; + + /** + * last received server side offer before reconnecting + * + * @generated from field: livekit.SessionDescription offer = 5; + */ + offer?: SessionDescription; + + /** + * @generated from field: repeated string track_sids_disabled = 6; + */ + trackSidsDisabled: string[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SyncState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SyncState; + + static fromJson(jsonValue: JsonValue, options?: Partial): SyncState; + + static fromJsonString(jsonString: string, options?: Partial): SyncState; + + static equals(a: SyncState | PlainMessage | undefined, b: SyncState | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.DataChannelInfo + */ +export declare class DataChannelInfo extends Message { + /** + * @generated from field: string label = 1; + */ + label: string; + + /** + * @generated from field: uint32 id = 2; + */ + id: number; + + /** + * @generated from field: livekit.SignalTarget target = 3; + */ + target: SignalTarget; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DataChannelInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DataChannelInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): DataChannelInfo; + + static fromJsonString(jsonString: string, options?: Partial): DataChannelInfo; + + static equals(a: DataChannelInfo | PlainMessage | undefined, b: DataChannelInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SimulateScenario + */ +export declare class SimulateScenario extends Message { + /** + * @generated from oneof livekit.SimulateScenario.scenario + */ + scenario: { + /** + * simulate N seconds of speaker activity + * + * @generated from field: int32 speaker_update = 1; + */ + value: number; + case: "speakerUpdate"; + } | { + /** + * simulate local node failure + * + * @generated from field: bool node_failure = 2; + */ + value: boolean; + case: "nodeFailure"; + } | { + /** + * simulate migration + * + * @generated from field: bool migration = 3; + */ + value: boolean; + case: "migration"; + } | { + /** + * server to send leave + * + * @generated from field: bool server_leave = 4; + */ + value: boolean; + case: "serverLeave"; + } | { + /** + * switch candidate protocol to tcp + * + * @generated from field: livekit.CandidateProtocol switch_candidate_protocol = 5; + */ + value: CandidateProtocol; + case: "switchCandidateProtocol"; + } | { + /** + * maximum bandwidth for subscribers, in bps + * when zero, clears artificial bandwidth limit + * + * @generated from field: int64 subscriber_bandwidth = 6; + */ + value: bigint; + case: "subscriberBandwidth"; + } | { + /** + * disconnect signal on resume + * + * @generated from field: bool disconnect_signal_on_resume = 7; + */ + value: boolean; + case: "disconnectSignalOnResume"; + } | { + /** + * disconnect signal on resume before sending any messages from server + * + * @generated from field: bool disconnect_signal_on_resume_no_messages = 8; + */ + value: boolean; + case: "disconnectSignalOnResumeNoMessages"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SimulateScenario"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SimulateScenario; + + static fromJson(jsonValue: JsonValue, options?: Partial): SimulateScenario; + + static fromJsonString(jsonString: string, options?: Partial): SimulateScenario; + + static equals(a: SimulateScenario | PlainMessage | undefined, b: SimulateScenario | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.Ping + */ +export declare class Ping extends Message { + /** + * @generated from field: int64 timestamp = 1; + */ + timestamp: bigint; + + /** + * rtt in milliseconds calculated by client + * + * @generated from field: int64 rtt = 2; + */ + rtt: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.Ping"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Ping; + + static fromJson(jsonValue: JsonValue, options?: Partial): Ping; + + static fromJsonString(jsonString: string, options?: Partial): Ping; + + static equals(a: Ping | PlainMessage | undefined, b: Ping | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.Pong + */ +export declare class Pong extends Message { + /** + * timestamp field of last received ping request + * + * @generated from field: int64 last_ping_timestamp = 1; + */ + lastPingTimestamp: bigint; + + /** + * @generated from field: int64 timestamp = 2; + */ + timestamp: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.Pong"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Pong; + + static fromJson(jsonValue: JsonValue, options?: Partial): Pong; + + static fromJsonString(jsonString: string, options?: Partial): Pong; + + static equals(a: Pong | PlainMessage | undefined, b: Pong | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RegionSettings + */ +export declare class RegionSettings extends Message { + /** + * @generated from field: repeated livekit.RegionInfo regions = 1; + */ + regions: RegionInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RegionSettings"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RegionSettings; + + static fromJson(jsonValue: JsonValue, options?: Partial): RegionSettings; + + static fromJsonString(jsonString: string, options?: Partial): RegionSettings; + + static equals(a: RegionSettings | PlainMessage | undefined, b: RegionSettings | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.RegionInfo + */ +export declare class RegionInfo extends Message { + /** + * @generated from field: string region = 1; + */ + region: string; + + /** + * @generated from field: string url = 2; + */ + url: string; + + /** + * @generated from field: int64 distance = 3; + */ + distance: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.RegionInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RegionInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): RegionInfo; + + static fromJsonString(jsonString: string, options?: Partial): RegionInfo; + + static equals(a: RegionInfo | PlainMessage | undefined, b: RegionInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SubscriptionResponse + */ +export declare class SubscriptionResponse extends Message { + /** + * @generated from field: string track_sid = 1; + */ + trackSid: string; + + /** + * @generated from field: livekit.SubscriptionError err = 2; + */ + err: SubscriptionError; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SubscriptionResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SubscriptionResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): SubscriptionResponse; + + static fromJsonString(jsonString: string, options?: Partial): SubscriptionResponse; + + static equals(a: SubscriptionResponse | PlainMessage | undefined, b: SubscriptionResponse | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_rtc_pb.js b/packages/js/src/gen/livekit_rtc_pb.js new file mode 100644 index 0000000..450eb82 --- /dev/null +++ b/packages/js/src/gen/livekit_rtc_pb.js @@ -0,0 +1,565 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_rtc.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { ClientConfiguration, ConnectionQuality, DisconnectReason, Encryption_Type, ParticipantInfo, ParticipantTracks, Room, ServerInfo, SpeakerInfo, SubscriptionError, TrackInfo, TrackSource, TrackType, VideoLayer, VideoQuality } from "./livekit_models_pb.js"; + +/** + * @generated from enum livekit.SignalTarget + */ +export const SignalTarget = proto3.makeEnum( + "livekit.SignalTarget", + [ + {no: 0, name: "PUBLISHER"}, + {no: 1, name: "SUBSCRIBER"}, + ], +); + +/** + * @generated from enum livekit.StreamState + */ +export const StreamState = proto3.makeEnum( + "livekit.StreamState", + [ + {no: 0, name: "ACTIVE"}, + {no: 1, name: "PAUSED"}, + ], +); + +/** + * @generated from enum livekit.CandidateProtocol + */ +export const CandidateProtocol = proto3.makeEnum( + "livekit.CandidateProtocol", + [ + {no: 0, name: "UDP"}, + {no: 1, name: "TCP"}, + {no: 2, name: "TLS"}, + ], +); + +/** + * @generated from message livekit.SignalRequest + */ +export const SignalRequest = proto3.makeMessageType( + "livekit.SignalRequest", + () => [ + { no: 1, name: "offer", kind: "message", T: SessionDescription, oneof: "message" }, + { no: 2, name: "answer", kind: "message", T: SessionDescription, oneof: "message" }, + { no: 3, name: "trickle", kind: "message", T: TrickleRequest, oneof: "message" }, + { no: 4, name: "add_track", kind: "message", T: AddTrackRequest, oneof: "message" }, + { no: 5, name: "mute", kind: "message", T: MuteTrackRequest, oneof: "message" }, + { no: 6, name: "subscription", kind: "message", T: UpdateSubscription, oneof: "message" }, + { no: 7, name: "track_setting", kind: "message", T: UpdateTrackSettings, oneof: "message" }, + { no: 8, name: "leave", kind: "message", T: LeaveRequest, oneof: "message" }, + { no: 10, name: "update_layers", kind: "message", T: UpdateVideoLayers, oneof: "message" }, + { no: 11, name: "subscription_permission", kind: "message", T: SubscriptionPermission, oneof: "message" }, + { no: 12, name: "sync_state", kind: "message", T: SyncState, oneof: "message" }, + { no: 13, name: "simulate", kind: "message", T: SimulateScenario, oneof: "message" }, + { no: 14, name: "ping", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "message" }, + { no: 15, name: "update_metadata", kind: "message", T: UpdateParticipantMetadata, oneof: "message" }, + { no: 16, name: "ping_req", kind: "message", T: Ping, oneof: "message" }, + ], +); + +/** + * @generated from message livekit.SignalResponse + */ +export const SignalResponse = proto3.makeMessageType( + "livekit.SignalResponse", + () => [ + { no: 1, name: "join", kind: "message", T: JoinResponse, oneof: "message" }, + { no: 2, name: "answer", kind: "message", T: SessionDescription, oneof: "message" }, + { no: 3, name: "offer", kind: "message", T: SessionDescription, oneof: "message" }, + { no: 4, name: "trickle", kind: "message", T: TrickleRequest, oneof: "message" }, + { no: 5, name: "update", kind: "message", T: ParticipantUpdate, oneof: "message" }, + { no: 6, name: "track_published", kind: "message", T: TrackPublishedResponse, oneof: "message" }, + { no: 8, name: "leave", kind: "message", T: LeaveRequest, oneof: "message" }, + { no: 9, name: "mute", kind: "message", T: MuteTrackRequest, oneof: "message" }, + { no: 10, name: "speakers_changed", kind: "message", T: SpeakersChanged, oneof: "message" }, + { no: 11, name: "room_update", kind: "message", T: RoomUpdate, oneof: "message" }, + { no: 12, name: "connection_quality", kind: "message", T: ConnectionQualityUpdate, oneof: "message" }, + { no: 13, name: "stream_state_update", kind: "message", T: StreamStateUpdate, oneof: "message" }, + { no: 14, name: "subscribed_quality_update", kind: "message", T: SubscribedQualityUpdate, oneof: "message" }, + { no: 15, name: "subscription_permission_update", kind: "message", T: SubscriptionPermissionUpdate, oneof: "message" }, + { no: 16, name: "refresh_token", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "message" }, + { no: 17, name: "track_unpublished", kind: "message", T: TrackUnpublishedResponse, oneof: "message" }, + { no: 18, name: "pong", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "message" }, + { no: 19, name: "reconnect", kind: "message", T: ReconnectResponse, oneof: "message" }, + { no: 20, name: "pong_resp", kind: "message", T: Pong, oneof: "message" }, + { no: 21, name: "subscription_response", kind: "message", T: SubscriptionResponse, oneof: "message" }, + ], +); + +/** + * @generated from message livekit.SimulcastCodec + */ +export const SimulcastCodec = proto3.makeMessageType( + "livekit.SimulcastCodec", + () => [ + { no: 1, name: "codec", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.AddTrackRequest + */ +export const AddTrackRequest = proto3.makeMessageType( + "livekit.AddTrackRequest", + () => [ + { no: 1, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "type", kind: "enum", T: proto3.getEnumType(TrackType) }, + { no: 4, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 5, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 6, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: "disable_dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 8, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) }, + { no: 9, name: "layers", kind: "message", T: VideoLayer, repeated: true }, + { no: 10, name: "simulcast_codecs", kind: "message", T: SimulcastCodec, repeated: true }, + { no: 11, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "stereo", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 13, name: "disable_red", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 14, name: "encryption", kind: "enum", T: proto3.getEnumType(Encryption_Type) }, + { no: 15, name: "stream", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.TrickleRequest + */ +export const TrickleRequest = proto3.makeMessageType( + "livekit.TrickleRequest", + () => [ + { no: 1, name: "candidateInit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "target", kind: "enum", T: proto3.getEnumType(SignalTarget) }, + ], +); + +/** + * @generated from message livekit.MuteTrackRequest + */ +export const MuteTrackRequest = proto3.makeMessageType( + "livekit.MuteTrackRequest", + () => [ + { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.JoinResponse + */ +export const JoinResponse = proto3.makeMessageType( + "livekit.JoinResponse", + () => [ + { no: 1, name: "room", kind: "message", T: Room }, + { no: 2, name: "participant", kind: "message", T: ParticipantInfo }, + { no: 3, name: "other_participants", kind: "message", T: ParticipantInfo, repeated: true }, + { no: 4, name: "server_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "ice_servers", kind: "message", T: ICEServer, repeated: true }, + { no: 6, name: "subscriber_primary", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 7, name: "alternative_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "client_configuration", kind: "message", T: ClientConfiguration }, + { no: 9, name: "server_region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "ping_timeout", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 11, name: "ping_interval", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 12, name: "server_info", kind: "message", T: ServerInfo }, + { no: 13, name: "sif_trailer", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ], +); + +/** + * @generated from message livekit.ReconnectResponse + */ +export const ReconnectResponse = proto3.makeMessageType( + "livekit.ReconnectResponse", + () => [ + { no: 1, name: "ice_servers", kind: "message", T: ICEServer, repeated: true }, + { no: 2, name: "client_configuration", kind: "message", T: ClientConfiguration }, + ], +); + +/** + * @generated from message livekit.TrackPublishedResponse + */ +export const TrackPublishedResponse = proto3.makeMessageType( + "livekit.TrackPublishedResponse", + () => [ + { no: 1, name: "cid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "track", kind: "message", T: TrackInfo }, + ], +); + +/** + * @generated from message livekit.TrackUnpublishedResponse + */ +export const TrackUnpublishedResponse = proto3.makeMessageType( + "livekit.TrackUnpublishedResponse", + () => [ + { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SessionDescription + */ +export const SessionDescription = proto3.makeMessageType( + "livekit.SessionDescription", + () => [ + { no: 1, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "sdp", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.ParticipantUpdate + */ +export const ParticipantUpdate = proto3.makeMessageType( + "livekit.ParticipantUpdate", + () => [ + { no: 1, name: "participants", kind: "message", T: ParticipantInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.UpdateSubscription + */ +export const UpdateSubscription = proto3.makeMessageType( + "livekit.UpdateSubscription", + () => [ + { no: 1, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "subscribe", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "participant_tracks", kind: "message", T: ParticipantTracks, repeated: true }, + ], +); + +/** + * @generated from message livekit.UpdateTrackSettings + */ +export const UpdateTrackSettings = proto3.makeMessageType( + "livekit.UpdateTrackSettings", + () => [ + { no: 1, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "disabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "quality", kind: "enum", T: proto3.getEnumType(VideoQuality) }, + { no: 5, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 6, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 7, name: "fps", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 8, name: "priority", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + ], +); + +/** + * @generated from message livekit.LeaveRequest + */ +export const LeaveRequest = proto3.makeMessageType( + "livekit.LeaveRequest", + () => [ + { no: 1, name: "can_reconnect", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "reason", kind: "enum", T: proto3.getEnumType(DisconnectReason) }, + { no: 3, name: "action", kind: "enum", T: proto3.getEnumType(LeaveRequest_Action) }, + { no: 4, name: "regions", kind: "message", T: RegionSettings }, + ], +); + +/** + * indicates action clients should take on receiving this message + * + * @generated from enum livekit.LeaveRequest.Action + */ +export const LeaveRequest_Action = proto3.makeEnum( + "livekit.LeaveRequest.Action", + [ + {no: 0, name: "DISCONNECT"}, + {no: 1, name: "RESUME"}, + {no: 2, name: "RECONNECT"}, + ], +); + +/** + * message to indicate published video track dimensions are changing + * + * @generated from message livekit.UpdateVideoLayers + */ +export const UpdateVideoLayers = proto3.makeMessageType( + "livekit.UpdateVideoLayers", + () => [ + { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "layers", kind: "message", T: VideoLayer, repeated: true }, + ], +); + +/** + * @generated from message livekit.UpdateParticipantMetadata + */ +export const UpdateParticipantMetadata = proto3.makeMessageType( + "livekit.UpdateParticipantMetadata", + () => [ + { no: 1, name: "metadata", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.ICEServer + */ +export const ICEServer = proto3.makeMessageType( + "livekit.ICEServer", + () => [ + { no: 1, name: "urls", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "credential", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SpeakersChanged + */ +export const SpeakersChanged = proto3.makeMessageType( + "livekit.SpeakersChanged", + () => [ + { no: 1, name: "speakers", kind: "message", T: SpeakerInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.RoomUpdate + */ +export const RoomUpdate = proto3.makeMessageType( + "livekit.RoomUpdate", + () => [ + { no: 1, name: "room", kind: "message", T: Room }, + ], +); + +/** + * @generated from message livekit.ConnectionQualityInfo + */ +export const ConnectionQualityInfo = proto3.makeMessageType( + "livekit.ConnectionQualityInfo", + () => [ + { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "quality", kind: "enum", T: proto3.getEnumType(ConnectionQuality) }, + { no: 3, name: "score", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, + ], +); + +/** + * @generated from message livekit.ConnectionQualityUpdate + */ +export const ConnectionQualityUpdate = proto3.makeMessageType( + "livekit.ConnectionQualityUpdate", + () => [ + { no: 1, name: "updates", kind: "message", T: ConnectionQualityInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.StreamStateInfo + */ +export const StreamStateInfo = proto3.makeMessageType( + "livekit.StreamStateInfo", + () => [ + { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "state", kind: "enum", T: proto3.getEnumType(StreamState) }, + ], +); + +/** + * @generated from message livekit.StreamStateUpdate + */ +export const StreamStateUpdate = proto3.makeMessageType( + "livekit.StreamStateUpdate", + () => [ + { no: 1, name: "stream_states", kind: "message", T: StreamStateInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.SubscribedQuality + */ +export const SubscribedQuality = proto3.makeMessageType( + "livekit.SubscribedQuality", + () => [ + { no: 1, name: "quality", kind: "enum", T: proto3.getEnumType(VideoQuality) }, + { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.SubscribedCodec + */ +export const SubscribedCodec = proto3.makeMessageType( + "livekit.SubscribedCodec", + () => [ + { no: 1, name: "codec", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "qualities", kind: "message", T: SubscribedQuality, repeated: true }, + ], +); + +/** + * @generated from message livekit.SubscribedQualityUpdate + */ +export const SubscribedQualityUpdate = proto3.makeMessageType( + "livekit.SubscribedQualityUpdate", + () => [ + { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "subscribed_qualities", kind: "message", T: SubscribedQuality, repeated: true }, + { no: 3, name: "subscribed_codecs", kind: "message", T: SubscribedCodec, repeated: true }, + ], +); + +/** + * @generated from message livekit.TrackPermission + */ +export const TrackPermission = proto3.makeMessageType( + "livekit.TrackPermission", + () => [ + { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "all_tracks", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "track_sids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SubscriptionPermission + */ +export const SubscriptionPermission = proto3.makeMessageType( + "livekit.SubscriptionPermission", + () => [ + { no: 1, name: "all_participants", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "track_permissions", kind: "message", T: TrackPermission, repeated: true }, + ], +); + +/** + * @generated from message livekit.SubscriptionPermissionUpdate + */ +export const SubscriptionPermissionUpdate = proto3.makeMessageType( + "livekit.SubscriptionPermissionUpdate", + () => [ + { no: 1, name: "participant_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "allowed", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.SyncState + */ +export const SyncState = proto3.makeMessageType( + "livekit.SyncState", + () => [ + { no: 1, name: "answer", kind: "message", T: SessionDescription }, + { no: 2, name: "subscription", kind: "message", T: UpdateSubscription }, + { no: 3, name: "publish_tracks", kind: "message", T: TrackPublishedResponse, repeated: true }, + { no: 4, name: "data_channels", kind: "message", T: DataChannelInfo, repeated: true }, + { no: 5, name: "offer", kind: "message", T: SessionDescription }, + { no: 6, name: "track_sids_disabled", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ], +); + +/** + * @generated from message livekit.DataChannelInfo + */ +export const DataChannelInfo = proto3.makeMessageType( + "livekit.DataChannelInfo", + () => [ + { no: 1, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, + { no: 3, name: "target", kind: "enum", T: proto3.getEnumType(SignalTarget) }, + ], +); + +/** + * @generated from message livekit.SimulateScenario + */ +export const SimulateScenario = proto3.makeMessageType( + "livekit.SimulateScenario", + () => [ + { no: 1, name: "speaker_update", kind: "scalar", T: 5 /* ScalarType.INT32 */, oneof: "scenario" }, + { no: 2, name: "node_failure", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" }, + { no: 3, name: "migration", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" }, + { no: 4, name: "server_leave", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" }, + { no: 5, name: "switch_candidate_protocol", kind: "enum", T: proto3.getEnumType(CandidateProtocol), oneof: "scenario" }, + { no: 6, name: "subscriber_bandwidth", kind: "scalar", T: 3 /* ScalarType.INT64 */, oneof: "scenario" }, + { no: 7, name: "disconnect_signal_on_resume", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" }, + { no: 8, name: "disconnect_signal_on_resume_no_messages", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "scenario" }, + ], +); + +/** + * @generated from message livekit.Ping + */ +export const Ping = proto3.makeMessageType( + "livekit.Ping", + () => [ + { no: 1, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 2, name: "rtt", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * @generated from message livekit.Pong + */ +export const Pong = proto3.makeMessageType( + "livekit.Pong", + () => [ + { no: 1, name: "last_ping_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 2, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * @generated from message livekit.RegionSettings + */ +export const RegionSettings = proto3.makeMessageType( + "livekit.RegionSettings", + () => [ + { no: 1, name: "regions", kind: "message", T: RegionInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.RegionInfo + */ +export const RegionInfo = proto3.makeMessageType( + "livekit.RegionInfo", + () => [ + { no: 1, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "distance", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ], +); + +/** + * @generated from message livekit.SubscriptionResponse + */ +export const SubscriptionResponse = proto3.makeMessageType( + "livekit.SubscriptionResponse", + () => [ + { no: 1, name: "track_sid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "err", kind: "enum", T: proto3.getEnumType(SubscriptionError) }, + ], +); + diff --git a/packages/js/src/gen/livekit_sip_pb.d.ts b/packages/js/src/gen/livekit_sip_pb.d.ts new file mode 100644 index 0000000..458169d --- /dev/null +++ b/packages/js/src/gen/livekit_sip_pb.d.ts @@ -0,0 +1,578 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_sip.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message livekit.CreateSIPTrunkRequest + */ +export declare class CreateSIPTrunkRequest extends Message { + /** + * CIDR or IPs that traffic is accepted from + * An empty list means all inbound traffic is accepted. + * + * @generated from field: repeated string inbound_addresses = 1; + */ + inboundAddresses: string[]; + + /** + * IP that SIP INVITE is sent too + * + * @generated from field: string outbound_address = 2; + */ + outboundAddress: string; + + /** + * Number used to make outbound calls + * + * @generated from field: string outbound_number = 3; + */ + outboundNumber: string; + + /** + * Accepted `To` values. This Trunk will only accept a call made to + * these numbers. This allows you to have distinct Trunks for different phone + * numbers at the same provider. + * + * @generated from field: repeated string inbound_numbers_regex = 4; + */ + inboundNumbersRegex: string[]; + + /** + * Username and password used to authenticate inbound and outbound SIP invites + * May be empty to have no Authentication + * + * @generated from field: string inbound_username = 5; + */ + inboundUsername: string; + + /** + * @generated from field: string inbound_password = 6; + */ + inboundPassword: string; + + /** + * @generated from field: string outbound_username = 7; + */ + outboundUsername: string; + + /** + * @generated from field: string outbound_password = 8; + */ + outboundPassword: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.CreateSIPTrunkRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSIPTrunkRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSIPTrunkRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateSIPTrunkRequest; + + static equals(a: CreateSIPTrunkRequest | PlainMessage | undefined, b: CreateSIPTrunkRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SIPTrunkInfo + */ +export declare class SIPTrunkInfo extends Message { + /** + * @generated from field: string sip_trunk_id = 1; + */ + sipTrunkId: string; + + /** + * CIDR or IPs that traffic is accepted from + * An empty list means all inbound traffic is accepted. + * + * @generated from field: repeated string inbound_addresses = 2; + */ + inboundAddresses: string[]; + + /** + * IP that SIP INVITE is sent too + * + * @generated from field: string outbound_address = 3; + */ + outboundAddress: string; + + /** + * Number used to make outbound calls + * + * @generated from field: string outbound_number = 4; + */ + outboundNumber: string; + + /** + * Accepted `To` values. This Trunk will only accept a call made to + * these numbers. This allows you to have distinct Trunks for different phone + * numbers at the same provider. + * + * @generated from field: repeated string inbound_numbers_regex = 5; + */ + inboundNumbersRegex: string[]; + + /** + * Username and password used to authenticate inbound and outbound SIP invites + * May be empty to have no Authentication + * + * @generated from field: string inbound_username = 6; + */ + inboundUsername: string; + + /** + * @generated from field: string inbound_password = 7; + */ + inboundPassword: string; + + /** + * @generated from field: string outbound_username = 8; + */ + outboundUsername: string; + + /** + * @generated from field: string outbound_password = 9; + */ + outboundPassword: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SIPTrunkInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SIPTrunkInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SIPTrunkInfo; + + static fromJsonString(jsonString: string, options?: Partial): SIPTrunkInfo; + + static equals(a: SIPTrunkInfo | PlainMessage | undefined, b: SIPTrunkInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListSIPTrunkRequest + */ +export declare class ListSIPTrunkRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListSIPTrunkRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSIPTrunkRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSIPTrunkRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListSIPTrunkRequest; + + static equals(a: ListSIPTrunkRequest | PlainMessage | undefined, b: ListSIPTrunkRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListSIPTrunkResponse + */ +export declare class ListSIPTrunkResponse extends Message { + /** + * @generated from field: repeated livekit.SIPTrunkInfo items = 1; + */ + items: SIPTrunkInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListSIPTrunkResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSIPTrunkResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSIPTrunkResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListSIPTrunkResponse; + + static equals(a: ListSIPTrunkResponse | PlainMessage | undefined, b: ListSIPTrunkResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.DeleteSIPTrunkRequest + */ +export declare class DeleteSIPTrunkRequest extends Message { + /** + * @generated from field: string sip_trunk_id = 1; + */ + sipTrunkId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DeleteSIPTrunkRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSIPTrunkRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSIPTrunkRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteSIPTrunkRequest; + + static equals(a: DeleteSIPTrunkRequest | PlainMessage | undefined, b: DeleteSIPTrunkRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SIPDispatchRuleDirect + */ +export declare class SIPDispatchRuleDirect extends Message { + /** + * What room should call be directed into + * + * @generated from field: string room_name = 1; + */ + roomName: string; + + /** + * Optional pin required to enter room + * + * @generated from field: string pin = 2; + */ + pin: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SIPDispatchRuleDirect"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SIPDispatchRuleDirect; + + static fromJson(jsonValue: JsonValue, options?: Partial): SIPDispatchRuleDirect; + + static fromJsonString(jsonString: string, options?: Partial): SIPDispatchRuleDirect; + + static equals(a: SIPDispatchRuleDirect | PlainMessage | undefined, b: SIPDispatchRuleDirect | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SIPDispatchRuleIndividual + */ +export declare class SIPDispatchRuleIndividual extends Message { + /** + * Prefix used on new room name + * + * @generated from field: string room_prefix = 1; + */ + roomPrefix: string; + + /** + * Optional pin required to enter room + * + * @generated from field: string pin = 2; + */ + pin: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SIPDispatchRuleIndividual"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SIPDispatchRuleIndividual; + + static fromJson(jsonValue: JsonValue, options?: Partial): SIPDispatchRuleIndividual; + + static fromJsonString(jsonString: string, options?: Partial): SIPDispatchRuleIndividual; + + static equals(a: SIPDispatchRuleIndividual | PlainMessage | undefined, b: SIPDispatchRuleIndividual | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SIPDispatchRule + */ +export declare class SIPDispatchRule extends Message { + /** + * @generated from oneof livekit.SIPDispatchRule.rule + */ + rule: { + /** + * SIPDispatchRuleDirect is a `SIP Dispatch Rule` that puts a user directly into a room + * This places users into an existing room. Optionally you can require a pin before a user can + * enter the room + * + * @generated from field: livekit.SIPDispatchRuleDirect dispatch_rule_direct = 1; + */ + value: SIPDispatchRuleDirect; + case: "dispatchRuleDirect"; + } | { + /** + * SIPDispatchRuleIndividual is a `SIP Dispatch Rule` that creates a new room for each caller. + * + * @generated from field: livekit.SIPDispatchRuleIndividual dispatch_rule_individual = 2; + */ + value: SIPDispatchRuleIndividual; + case: "dispatchRuleIndividual"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SIPDispatchRule"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SIPDispatchRule; + + static fromJson(jsonValue: JsonValue, options?: Partial): SIPDispatchRule; + + static fromJsonString(jsonString: string, options?: Partial): SIPDispatchRule; + + static equals(a: SIPDispatchRule | PlainMessage | undefined, b: SIPDispatchRule | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.CreateSIPDispatchRuleRequest + */ +export declare class CreateSIPDispatchRuleRequest extends Message { + /** + * @generated from field: livekit.SIPDispatchRule rule = 1; + */ + rule?: SIPDispatchRule; + + /** + * What trunks are accepted for this dispatch rule + * If empty all trunks will match this dispatch rule + * + * @generated from field: repeated string trunk_ids = 2; + */ + trunkIds: string[]; + + /** + * By default the From value (Phone number) is used as the participant identity + * If true a random value will be used instead + * + * @generated from field: bool hide_phone_number = 3; + */ + hidePhoneNumber: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.CreateSIPDispatchRuleRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSIPDispatchRuleRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSIPDispatchRuleRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateSIPDispatchRuleRequest; + + static equals(a: CreateSIPDispatchRuleRequest | PlainMessage | undefined, b: CreateSIPDispatchRuleRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SIPDispatchRuleInfo + */ +export declare class SIPDispatchRuleInfo extends Message { + /** + * @generated from field: string sip_dispatch_rule_id = 1; + */ + sipDispatchRuleId: string; + + /** + * @generated from field: livekit.SIPDispatchRule rule = 2; + */ + rule?: SIPDispatchRule; + + /** + * @generated from field: repeated string trunk_ids = 3; + */ + trunkIds: string[]; + + /** + * @generated from field: bool hide_phone_number = 4; + */ + hidePhoneNumber: boolean; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SIPDispatchRuleInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SIPDispatchRuleInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SIPDispatchRuleInfo; + + static fromJsonString(jsonString: string, options?: Partial): SIPDispatchRuleInfo; + + static equals(a: SIPDispatchRuleInfo | PlainMessage | undefined, b: SIPDispatchRuleInfo | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListSIPDispatchRuleRequest + */ +export declare class ListSIPDispatchRuleRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListSIPDispatchRuleRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSIPDispatchRuleRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSIPDispatchRuleRequest; + + static fromJsonString(jsonString: string, options?: Partial): ListSIPDispatchRuleRequest; + + static equals(a: ListSIPDispatchRuleRequest | PlainMessage | undefined, b: ListSIPDispatchRuleRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.ListSIPDispatchRuleResponse + */ +export declare class ListSIPDispatchRuleResponse extends Message { + /** + * @generated from field: repeated livekit.SIPDispatchRuleInfo items = 1; + */ + items: SIPDispatchRuleInfo[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.ListSIPDispatchRuleResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): ListSIPDispatchRuleResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): ListSIPDispatchRuleResponse; + + static fromJsonString(jsonString: string, options?: Partial): ListSIPDispatchRuleResponse; + + static equals(a: ListSIPDispatchRuleResponse | PlainMessage | undefined, b: ListSIPDispatchRuleResponse | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.DeleteSIPDispatchRuleRequest + */ +export declare class DeleteSIPDispatchRuleRequest extends Message { + /** + * @generated from field: string sip_dispatch_rule_id = 1; + */ + sipDispatchRuleId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.DeleteSIPDispatchRuleRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteSIPDispatchRuleRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteSIPDispatchRuleRequest; + + static fromJsonString(jsonString: string, options?: Partial): DeleteSIPDispatchRuleRequest; + + static equals(a: DeleteSIPDispatchRuleRequest | PlainMessage | undefined, b: DeleteSIPDispatchRuleRequest | PlainMessage | undefined): boolean; +} + +/** + * A SIP Participant is a singular SIP session connected to a LiveKit room via + * a SIP Trunk into a SIP DispatchRule + * + * @generated from message livekit.CreateSIPParticipantRequest + */ +export declare class CreateSIPParticipantRequest extends Message { + /** + * What SIP Trunk should be used to dial the user + * + * @generated from field: string sip_trunk_id = 1; + */ + sipTrunkId: string; + + /** + * What number should be dialed via SIP + * + * @generated from field: string sip_call_to = 2; + */ + sipCallTo: string; + + /** + * What LiveKit room should this participant be connected too + * + * @generated from field: string room_name = 3; + */ + roomName: string; + + /** + * Optional identity of the participant in LiveKit room + * + * @generated from field: string participant_identity = 4; + */ + participantIdentity: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.CreateSIPParticipantRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateSIPParticipantRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateSIPParticipantRequest; + + static fromJsonString(jsonString: string, options?: Partial): CreateSIPParticipantRequest; + + static equals(a: CreateSIPParticipantRequest | PlainMessage | undefined, b: CreateSIPParticipantRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message livekit.SIPParticipantInfo + */ +export declare class SIPParticipantInfo extends Message { + /** + * @generated from field: string participant_id = 1; + */ + participantId: string; + + /** + * @generated from field: string participant_identity = 2; + */ + participantIdentity: string; + + /** + * @generated from field: string room_name = 3; + */ + roomName: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.SIPParticipantInfo"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): SIPParticipantInfo; + + static fromJson(jsonValue: JsonValue, options?: Partial): SIPParticipantInfo; + + static fromJsonString(jsonString: string, options?: Partial): SIPParticipantInfo; + + static equals(a: SIPParticipantInfo | PlainMessage | undefined, b: SIPParticipantInfo | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_sip_pb.js b/packages/js/src/gen/livekit_sip_pb.js new file mode 100644 index 0000000..d4a22c9 --- /dev/null +++ b/packages/js/src/gen/livekit_sip_pb.js @@ -0,0 +1,198 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_sip.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message livekit.CreateSIPTrunkRequest + */ +export const CreateSIPTrunkRequest = proto3.makeMessageType( + "livekit.CreateSIPTrunkRequest", + () => [ + { no: 1, name: "inbound_addresses", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "outbound_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "outbound_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "inbound_numbers_regex", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "inbound_username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "inbound_password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "outbound_username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "outbound_password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SIPTrunkInfo + */ +export const SIPTrunkInfo = proto3.makeMessageType( + "livekit.SIPTrunkInfo", + () => [ + { no: 1, name: "sip_trunk_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "inbound_addresses", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "outbound_address", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "outbound_number", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "inbound_numbers_regex", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 6, name: "inbound_username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "inbound_password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "outbound_username", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "outbound_password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.ListSIPTrunkRequest + */ +export const ListSIPTrunkRequest = proto3.makeMessageType( + "livekit.ListSIPTrunkRequest", + [], +); + +/** + * @generated from message livekit.ListSIPTrunkResponse + */ +export const ListSIPTrunkResponse = proto3.makeMessageType( + "livekit.ListSIPTrunkResponse", + () => [ + { no: 1, name: "items", kind: "message", T: SIPTrunkInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.DeleteSIPTrunkRequest + */ +export const DeleteSIPTrunkRequest = proto3.makeMessageType( + "livekit.DeleteSIPTrunkRequest", + () => [ + { no: 1, name: "sip_trunk_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SIPDispatchRuleDirect + */ +export const SIPDispatchRuleDirect = proto3.makeMessageType( + "livekit.SIPDispatchRuleDirect", + () => [ + { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "pin", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SIPDispatchRuleIndividual + */ +export const SIPDispatchRuleIndividual = proto3.makeMessageType( + "livekit.SIPDispatchRuleIndividual", + () => [ + { no: 1, name: "room_prefix", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "pin", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SIPDispatchRule + */ +export const SIPDispatchRule = proto3.makeMessageType( + "livekit.SIPDispatchRule", + () => [ + { no: 1, name: "dispatch_rule_direct", kind: "message", T: SIPDispatchRuleDirect, oneof: "rule" }, + { no: 2, name: "dispatch_rule_individual", kind: "message", T: SIPDispatchRuleIndividual, oneof: "rule" }, + ], +); + +/** + * @generated from message livekit.CreateSIPDispatchRuleRequest + */ +export const CreateSIPDispatchRuleRequest = proto3.makeMessageType( + "livekit.CreateSIPDispatchRuleRequest", + () => [ + { no: 1, name: "rule", kind: "message", T: SIPDispatchRule }, + { no: 2, name: "trunk_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "hide_phone_number", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.SIPDispatchRuleInfo + */ +export const SIPDispatchRuleInfo = proto3.makeMessageType( + "livekit.SIPDispatchRuleInfo", + () => [ + { no: 1, name: "sip_dispatch_rule_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "rule", kind: "message", T: SIPDispatchRule }, + { no: 3, name: "trunk_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "hide_phone_number", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ], +); + +/** + * @generated from message livekit.ListSIPDispatchRuleRequest + */ +export const ListSIPDispatchRuleRequest = proto3.makeMessageType( + "livekit.ListSIPDispatchRuleRequest", + [], +); + +/** + * @generated from message livekit.ListSIPDispatchRuleResponse + */ +export const ListSIPDispatchRuleResponse = proto3.makeMessageType( + "livekit.ListSIPDispatchRuleResponse", + () => [ + { no: 1, name: "items", kind: "message", T: SIPDispatchRuleInfo, repeated: true }, + ], +); + +/** + * @generated from message livekit.DeleteSIPDispatchRuleRequest + */ +export const DeleteSIPDispatchRuleRequest = proto3.makeMessageType( + "livekit.DeleteSIPDispatchRuleRequest", + () => [ + { no: 1, name: "sip_dispatch_rule_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * A SIP Participant is a singular SIP session connected to a LiveKit room via + * a SIP Trunk into a SIP DispatchRule + * + * @generated from message livekit.CreateSIPParticipantRequest + */ +export const CreateSIPParticipantRequest = proto3.makeMessageType( + "livekit.CreateSIPParticipantRequest", + () => [ + { no: 1, name: "sip_trunk_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "sip_call_to", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message livekit.SIPParticipantInfo + */ +export const SIPParticipantInfo = proto3.makeMessageType( + "livekit.SIPParticipantInfo", + () => [ + { no: 1, name: "participant_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + diff --git a/packages/js/src/gen/livekit_webhook_pb.d.ts b/packages/js/src/gen/livekit_webhook_pb.d.ts new file mode 100644 index 0000000..8923e1d --- /dev/null +++ b/packages/js/src/gen/livekit_webhook_pb.d.ts @@ -0,0 +1,105 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_webhook.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { ParticipantInfo, Room, TrackInfo } from "./livekit_models_pb.js"; +import type { EgressInfo } from "./livekit_egress_pb.js"; +import type { IngressInfo } from "./livekit_ingress_pb.js"; + +/** + * @generated from message livekit.WebhookEvent + */ +export declare class WebhookEvent extends Message { + /** + * one of room_started, room_finished, participant_joined, participant_left, + * track_published, track_unpublished, egress_started, egress_updated, egress_ended, + * ingress_started, ingress_ended + * + * @generated from field: string event = 1; + */ + event: string; + + /** + * @generated from field: livekit.Room room = 2; + */ + room?: Room; + + /** + * set when event is participant_* or track_* + * + * @generated from field: livekit.ParticipantInfo participant = 3; + */ + participant?: ParticipantInfo; + + /** + * set when event is egress_* + * + * @generated from field: livekit.EgressInfo egress_info = 9; + */ + egressInfo?: EgressInfo; + + /** + * set when event is ingress_* + * + * @generated from field: livekit.IngressInfo ingress_info = 10; + */ + ingressInfo?: IngressInfo; + + /** + * set when event is track_* + * + * @generated from field: livekit.TrackInfo track = 8; + */ + track?: TrackInfo; + + /** + * unique event uuid + * + * @generated from field: string id = 6; + */ + id: string; + + /** + * timestamp in seconds + * + * @generated from field: int64 created_at = 7; + */ + createdAt: bigint; + + /** + * @generated from field: int32 num_dropped = 11; + */ + numDropped: number; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "livekit.WebhookEvent"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): WebhookEvent; + + static fromJson(jsonValue: JsonValue, options?: Partial): WebhookEvent; + + static fromJsonString(jsonString: string, options?: Partial): WebhookEvent; + + static equals(a: WebhookEvent | PlainMessage | undefined, b: WebhookEvent | PlainMessage | undefined): boolean; +} + diff --git a/packages/js/src/gen/livekit_webhook_pb.js b/packages/js/src/gen/livekit_webhook_pb.js new file mode 100644 index 0000000..e246cad --- /dev/null +++ b/packages/js/src/gen/livekit_webhook_pb.js @@ -0,0 +1,42 @@ +// Copyright 2023 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts" +// @generated from file livekit_webhook.proto (package livekit, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; +import { ParticipantInfo, Room, TrackInfo } from "./livekit_models_pb.js"; +import { EgressInfo } from "./livekit_egress_pb.js"; +import { IngressInfo } from "./livekit_ingress_pb.js"; + +/** + * @generated from message livekit.WebhookEvent + */ +export const WebhookEvent = proto3.makeMessageType( + "livekit.WebhookEvent", + () => [ + { no: 1, name: "event", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "room", kind: "message", T: Room }, + { no: 3, name: "participant", kind: "message", T: ParticipantInfo }, + { no: 9, name: "egress_info", kind: "message", T: EgressInfo }, + { no: 10, name: "ingress_info", kind: "message", T: IngressInfo }, + { no: 8, name: "track", kind: "message", T: TrackInfo }, + { no: 6, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "created_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 11, name: "num_dropped", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ], +); + diff --git a/packages/js/src/gen/version.d.ts b/packages/js/src/gen/version.d.ts new file mode 100644 index 0000000..baaee2f --- /dev/null +++ b/packages/js/src/gen/version.d.ts @@ -0,0 +1 @@ +export declare const version: string; diff --git a/packages/js/src/gen/version.js b/packages/js/src/gen/version.js new file mode 100644 index 0000000..46584a7 --- /dev/null +++ b/packages/js/src/gen/version.js @@ -0,0 +1,2 @@ +// Generated by genversion. +export const version = '13.0.0'; diff --git a/packages/js/src/index.d.ts b/packages/js/src/index.d.ts new file mode 100644 index 0000000..e64b3eb --- /dev/null +++ b/packages/js/src/index.d.ts @@ -0,0 +1,8 @@ +export * from "./gen/version.js"; +export * from "./gen/livekit_agent_pb.js"; +export * from "./gen/livekit_models_pb.js"; +export * from "./gen/livekit_rtc_pb.js"; +export * from "./gen/livekit_webhook_pb.js"; +export * from "./gen/livekit_egress.js"; +export * from "./gen/livekit_ingress.js"; +export * from "./gen/livekit_sip.js"; diff --git a/packages/js/src/index.js b/packages/js/src/index.js new file mode 100644 index 0000000..e64b3eb --- /dev/null +++ b/packages/js/src/index.js @@ -0,0 +1,8 @@ +export * from "./gen/version.js"; +export * from "./gen/livekit_agent_pb.js"; +export * from "./gen/livekit_models_pb.js"; +export * from "./gen/livekit_rtc_pb.js"; +export * from "./gen/livekit_webhook_pb.js"; +export * from "./gen/livekit_egress.js"; +export * from "./gen/livekit_ingress.js"; +export * from "./gen/livekit_sip.js";