livekit-server-sdk 1.2.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/release.yaml +46 -0
  4. package/.github/workflows/test.yaml +21 -21
  5. package/.prettierignore +1 -0
  6. package/CHANGELOG.md +23 -0
  7. package/NOTICE +13 -0
  8. package/README.md +47 -13
  9. package/dist/AccessToken.d.ts +4 -4
  10. package/dist/AccessToken.js +23 -42
  11. package/dist/AccessToken.js.map +1 -1
  12. package/dist/EgressClient.d.ts +21 -2
  13. package/dist/EgressClient.js +183 -170
  14. package/dist/EgressClient.js.map +1 -1
  15. package/dist/IngressClient.d.ts +17 -2
  16. package/dist/IngressClient.js +68 -89
  17. package/dist/IngressClient.js.map +1 -1
  18. package/dist/RoomServiceClient.d.ts +22 -5
  19. package/dist/RoomServiceClient.js +70 -105
  20. package/dist/RoomServiceClient.js.map +1 -1
  21. package/dist/ServiceBase.d.ts +2 -2
  22. package/dist/ServiceBase.js +5 -8
  23. package/dist/ServiceBase.js.map +1 -1
  24. package/dist/TwirpRPC.d.ts +2 -3
  25. package/dist/TwirpRPC.js +15 -23
  26. package/dist/TwirpRPC.js.map +1 -1
  27. package/dist/WebhookReceiver.d.ts +15 -2
  28. package/dist/WebhookReceiver.js +29 -19
  29. package/dist/WebhookReceiver.js.map +1 -1
  30. package/dist/grants.d.ts +2 -1
  31. package/dist/grants.js +2 -5
  32. package/dist/grants.js.map +1 -1
  33. package/dist/index.d.ts +9 -10
  34. package/dist/index.js +9 -48
  35. package/dist/index.js.map +1 -1
  36. package/dist/proto/livekit_egress_pb.d.ts +1650 -0
  37. package/dist/proto/livekit_egress_pb.js +1878 -0
  38. package/dist/proto/livekit_egress_pb.js.map +1 -0
  39. package/dist/proto/livekit_ingress_pb.d.ts +624 -0
  40. package/dist/proto/livekit_ingress_pb.js +824 -0
  41. package/dist/proto/livekit_ingress_pb.js.map +1 -0
  42. package/dist/proto/livekit_models_pb.d.ts +1349 -0
  43. package/dist/proto/livekit_models_pb.js +1829 -0
  44. package/dist/proto/livekit_models_pb.js.map +1 -0
  45. package/dist/proto/livekit_room_pb.d.ts +460 -0
  46. package/dist/proto/livekit_room_pb.js +695 -0
  47. package/dist/proto/livekit_room_pb.js.map +1 -0
  48. package/dist/proto/livekit_webhook_pb.d.ts +70 -0
  49. package/dist/proto/livekit_webhook_pb.js +76 -0
  50. package/dist/proto/livekit_webhook_pb.js.map +1 -0
  51. package/generate-proto.sh +1 -18
  52. package/package.json +32 -28
  53. package/tsconfig.eslint.json +2 -1
  54. package/vite.config.js +8 -0
  55. package/.github/workflows/publish.yaml +0 -57
  56. package/dist/AccessToken.test.d.ts +0 -1
  57. package/dist/AccessToken.test.js +0 -72
  58. package/dist/AccessToken.test.js.map +0 -1
  59. package/dist/WebhookReceiver.test.d.ts +0 -1
  60. package/dist/WebhookReceiver.test.js +0 -39
  61. package/dist/WebhookReceiver.test.js.map +0 -1
  62. package/dist/proto/google/protobuf/timestamp.d.ts +0 -132
  63. package/dist/proto/google/protobuf/timestamp.js +0 -92
  64. package/dist/proto/google/protobuf/timestamp.js.map +0 -1
  65. package/dist/proto/livekit_egress.d.ts +0 -11286
  66. package/dist/proto/livekit_egress.js +0 -2889
  67. package/dist/proto/livekit_egress.js.map +0 -1
  68. package/dist/proto/livekit_ingress.d.ts +0 -2249
  69. package/dist/proto/livekit_ingress.js +0 -1360
  70. package/dist/proto/livekit_ingress.js.map +0 -1
  71. package/dist/proto/livekit_models.d.ts +0 -1454
  72. package/dist/proto/livekit_models.js +0 -3066
  73. package/dist/proto/livekit_models.js.map +0 -1
  74. package/dist/proto/livekit_room.d.ts +0 -3316
  75. package/dist/proto/livekit_room.js +0 -1074
  76. package/dist/proto/livekit_room.js.map +0 -1
  77. package/dist/proto/livekit_webhook.d.ts +0 -4899
  78. package/dist/proto/livekit_webhook.js +0 -179
  79. package/dist/proto/livekit_webhook.js.map +0 -1
  80. /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
package/dist/TwirpRPC.js CHANGED
@@ -1,18 +1,11 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TwirpRpc = exports.livekitPackage = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const camelcase_keys_1 = __importDefault(require("camelcase-keys"));
1
+ import camelcaseKeys from 'camelcase-keys';
9
2
  // twirp RPC adapter for client implementation
10
3
  const defaultPrefix = '/twirp';
11
- exports.livekitPackage = 'livekit';
4
+ export const livekitPackage = 'livekit';
12
5
  /**
13
6
  * JSON based Twirp V7 RPC
14
7
  */
15
- class TwirpRpc {
8
+ export class TwirpRpc {
16
9
  constructor(host, pkg, prefix) {
17
10
  if (host.startsWith('ws')) {
18
11
  host = host.replace('ws', 'http');
@@ -20,21 +13,20 @@ class TwirpRpc {
20
13
  this.host = host;
21
14
  this.pkg = pkg;
22
15
  this.prefix = prefix || defaultPrefix;
23
- this.instance = axios_1.default.create({
24
- baseURL: host,
25
- });
26
16
  }
27
- request(service, method, data, headers) {
28
- return new Promise((resolve, reject) => {
29
- const path = `${this.prefix}/${this.pkg}.${service}/${method}`;
30
- this.instance
31
- .post(path, data, { headers })
32
- .then((res) => {
33
- resolve(camelcase_keys_1.default(res.data, { deep: true }));
34
- })
35
- .catch(reject);
17
+ async request(service, method, data, headers) {
18
+ const path = `${this.prefix}/${this.pkg}.${service}/${method}`;
19
+ const url = new URL(path, this.host);
20
+ const response = await fetch(url, {
21
+ method: 'POST',
22
+ headers: Object.assign({ 'Content-Type': 'application/json;charset=UTF-8' }, headers),
23
+ body: JSON.stringify(data),
36
24
  });
25
+ if (!response.ok) {
26
+ throw new Error(`Request failed with status ${response.status}: ${response.statusText}`);
27
+ }
28
+ const parsedResp = await response.json();
29
+ return camelcaseKeys(parsedResp, { deep: true });
37
30
  }
38
31
  }
39
- exports.TwirpRpc = TwirpRpc;
40
32
  //# sourceMappingURL=TwirpRPC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TwirpRPC.js","sourceRoot":"","sources":["../src/TwirpRPC.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAC7C,oEAA2C;AAE3C,8CAA8C;AAE9C,MAAM,aAAa,GAAG,QAAQ,CAAC;AAElB,QAAA,cAAc,GAAG,SAAS,CAAC;AAKxC;;GAEG;AACH,MAAa,QAAQ;IASnB,YAAY,IAAY,EAAE,GAAW,EAAE,MAAe;QACpD,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACzB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SACnC;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,aAAa,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC;YAC3B,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC;IAED,OAAO,CAAC,OAAe,EAAE,MAAc,EAAE,IAAS,EAAE,OAAa;QAC/D,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YAC/D,IAAI,CAAC,QAAQ;iBACV,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC;iBAC7B,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBACZ,OAAO,CAAC,wBAAa,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE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MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;SAC1F;QACD,MAAM,UAAU,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzC,OAAO,aAAa,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;CACF"}
@@ -1,5 +1,18 @@
1
- import { WebhookEvent } from './proto/livekit_webhook';
1
+ import { BinaryReadOptions, JsonValue, JsonReadOptions } from '@bufbuild/protobuf';
2
+ import { WebhookEvent as ProtoWebhookEvent } from './proto/livekit_webhook_pb.js';
2
3
  export declare const authorizeHeader = "Authorize";
4
+ export declare class WebhookEvent extends ProtoWebhookEvent {
5
+ event: WebhookEventNames;
6
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WebhookEvent;
7
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WebhookEvent;
8
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WebhookEvent;
9
+ }
10
+ export declare type WebhookEventNames = 'room_started' | 'room_finished' | 'participant_joined' | 'participant_left' | 'track_published' | 'track_unpublished' | 'egress_started' | 'egress_updated' | 'egress_ended' | 'ingress_started' | 'ingress_ended'
11
+ /**
12
+ * @internal
13
+ * @note only used as a default value, not a valid webhook event
14
+ */
15
+ | '';
3
16
  export declare class WebhookReceiver {
4
17
  private verifier;
5
18
  constructor(apiKey: string, apiSecret: string);
@@ -10,5 +23,5 @@ export declare class WebhookReceiver {
10
23
  * @param skipAuth true to skip auth validation
11
24
  * @returns
12
25
  */
13
- receive(body: string, authHeader?: string, skipAuth?: boolean): WebhookEvent;
26
+ receive(body: string, authHeader?: string, skipAuth?: boolean): Promise<WebhookEvent>;
14
27
  }
@@ -1,16 +1,24 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WebhookReceiver = exports.authorizeHeader = void 0;
7
- const crypto_1 = __importDefault(require("crypto"));
8
- const AccessToken_1 = require("./AccessToken");
9
- const livekit_webhook_1 = require("./proto/livekit_webhook");
10
- exports.authorizeHeader = 'Authorize';
11
- class WebhookReceiver {
1
+ import { TokenVerifier } from './AccessToken.js';
2
+ import { WebhookEvent as ProtoWebhookEvent } from './proto/livekit_webhook_pb.js';
3
+ export const authorizeHeader = 'Authorize';
4
+ export class WebhookEvent extends ProtoWebhookEvent {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.event = '';
8
+ }
9
+ static fromBinary(bytes, options) {
10
+ return new WebhookEvent().fromBinary(bytes, options);
11
+ }
12
+ static fromJson(jsonValue, options) {
13
+ return new WebhookEvent().fromJson(jsonValue, options);
14
+ }
15
+ static fromJsonString(jsonString, options) {
16
+ return new WebhookEvent().fromJsonString(jsonString, options);
17
+ }
18
+ }
19
+ export class WebhookReceiver {
12
20
  constructor(apiKey, apiSecret) {
13
- this.verifier = new AccessToken_1.TokenVerifier(apiKey, apiSecret);
21
+ this.verifier = new TokenVerifier(apiKey, apiSecret);
14
22
  }
15
23
  /**
16
24
  *
@@ -19,22 +27,24 @@ class WebhookReceiver {
19
27
  * @param skipAuth true to skip auth validation
20
28
  * @returns
21
29
  */
22
- receive(body, authHeader, skipAuth = false) {
30
+ async receive(body, authHeader, skipAuth = false) {
23
31
  // verify token
24
32
  if (!skipAuth) {
25
33
  if (!authHeader) {
26
34
  throw new Error('authorization header is empty');
27
35
  }
28
- const claims = this.verifier.verify(authHeader);
36
+ const claims = await this.verifier.verify(authHeader);
29
37
  // confirm sha
30
- const hash = crypto_1.default.createHash('sha256');
31
- hash.update(body);
32
- if (claims.sha256 !== hash.digest('base64')) {
38
+ const encoder = new TextEncoder();
39
+ const hash = await crypto.subtle.digest('SHA-256', encoder.encode(body));
40
+ const hashDecoded = btoa(Array.from(new Uint8Array(hash))
41
+ .map((v) => String.fromCharCode(v))
42
+ .join(''));
43
+ if (claims.sha256 !== hashDecoded) {
33
44
  throw new Error('sha256 checksum of body does not match');
34
45
  }
35
46
  }
36
- return livekit_webhook_1.WebhookEvent.fromJSON(JSON.parse(body));
47
+ return WebhookEvent.fromJson(JSON.parse(body));
37
48
  }
38
49
  }
39
- exports.WebhookReceiver = WebhookReceiver;
40
50
  //# sourceMappingURL=WebhookReceiver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebhookReceiver.js","sourceRoot":"","sources":["../src/WebhookReceiver.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,+CAA8C;AAC9C,6DAAuD;AAE1C,QAAA,eAAe,GAAG,WAAW,CAAC;AAE3C,MAAa,eAAe;IAG1B,YAAY,MAAc,EAAE,SAAiB;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,IAAY,EAAE,UAAmB,EAAE,WAAoB,KAAK;QAClE,eAAe;QACf,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,UAAU,EAAE;gBACf,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;aAClD;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAChD,cAAc;YACd,MAAM,IAAI,GAAG,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YACzC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAElB,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;gBAC3C,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC3D;SACF;QAED,OAAO,8BAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,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AU,CAAC,CAAC;YACtD,cAAc;YACd,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;YAClC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YACzE,MAAM,WAAW,GAAG,IAAI,CACtB,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;iBAC7B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;iBAClC,IAAI,CAAC,EAAE,CAAC,CACZ,CAAC;YAEF,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE;gBACjC,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC3D;SACF;QAED,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,CAAC;CACF"}
package/dist/grants.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { JWTPayload } from 'jose';
1
2
  export declare enum TrackSource {
2
3
  CAMERA = "camera",
3
4
  MICROPHONE = "microphone",
@@ -45,7 +46,7 @@ export interface VideoGrant {
45
46
  recorder?: boolean;
46
47
  }
47
48
  /** @internal */
48
- export interface ClaimGrants {
49
+ export interface ClaimGrants extends JWTPayload {
49
50
  name?: string;
50
51
  video?: VideoGrant;
51
52
  metadata?: string;
package/dist/grants.js CHANGED
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TrackSource = void 0;
4
- var TrackSource;
1
+ export var TrackSource;
5
2
  (function (TrackSource) {
6
3
  TrackSource["CAMERA"] = "camera";
7
4
  TrackSource["MICROPHONE"] = "microphone";
8
5
  TrackSource["SCREEN_SHARE"] = "screen_share";
9
6
  TrackSource["SCREEN_SHARE_AUDIO"] = "screen_share_audio";
10
- })(TrackSource = exports.TrackSource || (exports.TrackSource = {}));
7
+ })(TrackSource || (TrackSource = {}));
11
8
  //# sourceMappingURL=grants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grants.js","sourceRoot":"","sources":["../src/grants.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,4CAA6B,CAAA;IAC7B,wDAAyC,CAAA;AAC3C,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB"}
1
+ {"version":3,"file":"grants.js","sourceRoot":"","sources":["../src/grants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,wCAAyB,CAAA;IACzB,4CAA6B,CAAA;IAC7B,wDAAyC,CAAA;AAC3C,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- export * from './AccessToken';
2
- export * from './EgressClient';
3
- export * from './IngressClient';
4
- export * from './RoomServiceClient';
5
- export * from './WebhookReceiver';
6
- export * from './grants';
7
- export { DirectFileOutput, EgressInfo, EncodedFileOutput, EncodedFileType, EncodingOptions, EncodingOptionsPreset, SegmentedFileOutput, SegmentedFileProtocol, StreamOutput, StreamProtocol, } from './proto/livekit_egress';
8
- export { IngressAudioEncodingOptions, IngressAudioEncodingPreset, IngressAudioOptions, IngressInfo, IngressInput, IngressState, IngressVideoEncodingOptions, IngressVideoEncodingPreset, IngressVideoOptions, } from './proto/livekit_ingress';
9
- export { DataPacket_Kind, ParticipantInfo, ParticipantInfo_State, ParticipantPermission, Room, TrackInfo, TrackType, } from './proto/livekit_models';
10
- export type { WebhookEvent } from './proto/livekit_webhook';
1
+ export * from './AccessToken.js';
2
+ export * from './EgressClient.js';
3
+ export * from './IngressClient.js';
4
+ export * from './RoomServiceClient.js';
5
+ export * from './WebhookReceiver.js';
6
+ export * from './grants.js';
7
+ export { DirectFileOutput, EgressInfo, EncodedFileOutput, EncodedFileType, EncodingOptions, EncodingOptionsPreset, SegmentedFileOutput, SegmentedFileProtocol, StreamOutput, StreamProtocol, } from './proto/livekit_egress_pb.js';
8
+ export { IngressAudioEncodingOptions, IngressAudioEncodingPreset, IngressAudioOptions, IngressInfo, IngressInput, IngressState, IngressVideoEncodingOptions, IngressVideoEncodingPreset, IngressVideoOptions, } from './proto/livekit_ingress_pb.js';
9
+ export { DataPacket_Kind, ParticipantInfo, ParticipantInfo_State, ParticipantPermission, Room, TrackInfo, TrackType, } from './proto/livekit_models_pb.js';
package/dist/index.js CHANGED
@@ -1,49 +1,10 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.TrackType = exports.TrackInfo = exports.Room = exports.ParticipantPermission = exports.ParticipantInfo_State = exports.ParticipantInfo = exports.DataPacket_Kind = exports.IngressVideoOptions = exports.IngressVideoEncodingPreset = exports.IngressVideoEncodingOptions = exports.IngressState = exports.IngressInput = exports.IngressInfo = exports.IngressAudioOptions = exports.IngressAudioEncodingPreset = exports.IngressAudioEncodingOptions = exports.StreamProtocol = exports.StreamOutput = exports.SegmentedFileProtocol = exports.SegmentedFileOutput = exports.EncodingOptionsPreset = exports.EncodingOptions = exports.EncodedFileType = exports.EncodedFileOutput = exports.EgressInfo = exports.DirectFileOutput = void 0;
14
- __exportStar(require("./AccessToken"), exports);
15
- __exportStar(require("./EgressClient"), exports);
16
- __exportStar(require("./IngressClient"), exports);
17
- __exportStar(require("./RoomServiceClient"), exports);
18
- __exportStar(require("./WebhookReceiver"), exports);
19
- __exportStar(require("./grants"), exports);
20
- var livekit_egress_1 = require("./proto/livekit_egress");
21
- Object.defineProperty(exports, "DirectFileOutput", { enumerable: true, get: function () { return livekit_egress_1.DirectFileOutput; } });
22
- Object.defineProperty(exports, "EgressInfo", { enumerable: true, get: function () { return livekit_egress_1.EgressInfo; } });
23
- Object.defineProperty(exports, "EncodedFileOutput", { enumerable: true, get: function () { return livekit_egress_1.EncodedFileOutput; } });
24
- Object.defineProperty(exports, "EncodedFileType", { enumerable: true, get: function () { return livekit_egress_1.EncodedFileType; } });
25
- Object.defineProperty(exports, "EncodingOptions", { enumerable: true, get: function () { return livekit_egress_1.EncodingOptions; } });
26
- Object.defineProperty(exports, "EncodingOptionsPreset", { enumerable: true, get: function () { return livekit_egress_1.EncodingOptionsPreset; } });
27
- Object.defineProperty(exports, "SegmentedFileOutput", { enumerable: true, get: function () { return livekit_egress_1.SegmentedFileOutput; } });
28
- Object.defineProperty(exports, "SegmentedFileProtocol", { enumerable: true, get: function () { return livekit_egress_1.SegmentedFileProtocol; } });
29
- Object.defineProperty(exports, "StreamOutput", { enumerable: true, get: function () { return livekit_egress_1.StreamOutput; } });
30
- Object.defineProperty(exports, "StreamProtocol", { enumerable: true, get: function () { return livekit_egress_1.StreamProtocol; } });
31
- var livekit_ingress_1 = require("./proto/livekit_ingress");
32
- Object.defineProperty(exports, "IngressAudioEncodingOptions", { enumerable: true, get: function () { return livekit_ingress_1.IngressAudioEncodingOptions; } });
33
- Object.defineProperty(exports, "IngressAudioEncodingPreset", { enumerable: true, get: function () { return livekit_ingress_1.IngressAudioEncodingPreset; } });
34
- Object.defineProperty(exports, "IngressAudioOptions", { enumerable: true, get: function () { return livekit_ingress_1.IngressAudioOptions; } });
35
- Object.defineProperty(exports, "IngressInfo", { enumerable: true, get: function () { return livekit_ingress_1.IngressInfo; } });
36
- Object.defineProperty(exports, "IngressInput", { enumerable: true, get: function () { return livekit_ingress_1.IngressInput; } });
37
- Object.defineProperty(exports, "IngressState", { enumerable: true, get: function () { return livekit_ingress_1.IngressState; } });
38
- Object.defineProperty(exports, "IngressVideoEncodingOptions", { enumerable: true, get: function () { return livekit_ingress_1.IngressVideoEncodingOptions; } });
39
- Object.defineProperty(exports, "IngressVideoEncodingPreset", { enumerable: true, get: function () { return livekit_ingress_1.IngressVideoEncodingPreset; } });
40
- Object.defineProperty(exports, "IngressVideoOptions", { enumerable: true, get: function () { return livekit_ingress_1.IngressVideoOptions; } });
41
- var livekit_models_1 = require("./proto/livekit_models");
42
- Object.defineProperty(exports, "DataPacket_Kind", { enumerable: true, get: function () { return livekit_models_1.DataPacket_Kind; } });
43
- Object.defineProperty(exports, "ParticipantInfo", { enumerable: true, get: function () { return livekit_models_1.ParticipantInfo; } });
44
- Object.defineProperty(exports, "ParticipantInfo_State", { enumerable: true, get: function () { return livekit_models_1.ParticipantInfo_State; } });
45
- Object.defineProperty(exports, "ParticipantPermission", { enumerable: true, get: function () { return livekit_models_1.ParticipantPermission; } });
46
- Object.defineProperty(exports, "Room", { enumerable: true, get: function () { return livekit_models_1.Room; } });
47
- Object.defineProperty(exports, "TrackInfo", { enumerable: true, get: function () { return livekit_models_1.TrackInfo; } });
48
- Object.defineProperty(exports, "TrackType", { enumerable: true, get: function () { return livekit_models_1.TrackType; } });
1
+ export * from './AccessToken.js';
2
+ export * from './EgressClient.js';
3
+ export * from './IngressClient.js';
4
+ export * from './RoomServiceClient.js';
5
+ export * from './WebhookReceiver.js';
6
+ export * from './grants.js';
7
+ export { DirectFileOutput, EgressInfo, EncodedFileOutput, EncodedFileType, EncodingOptions, EncodingOptionsPreset, SegmentedFileOutput, SegmentedFileProtocol, StreamOutput, StreamProtocol, } from './proto/livekit_egress_pb.js';
8
+ export { IngressAudioEncodingOptions, IngressAudioEncodingPreset, IngressAudioOptions, IngressInfo, IngressInput, IngressState, IngressVideoEncodingOptions, IngressVideoEncodingPreset, IngressVideoOptions, } from './proto/livekit_ingress_pb.js';
9
+ export { DataPacket_Kind, ParticipantInfo, ParticipantInfo_State, ParticipantPermission, Room, TrackInfo, TrackType, } from './proto/livekit_models_pb.js';
49
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,iDAA+B;AAC/B,kDAAgC;AAChC,sDAAoC;AACpC,oDAAkC;AAClC,2CAAyB;AACzB,yDAWgC;AAV9B,kHAAA,gBAAgB,OAAA;AAChB,4GAAA,UAAU,OAAA;AACV,mHAAA,iBAAiB,OAAA;AACjB,iHAAA,eAAe,OAAA;AACf,iHAAA,eAAe,OAAA;AACf,uHAAA,qBAAqB,OAAA;AACrB,qHAAA,mBAAmB,OAAA;AACnB,uHAAA,qBAAqB,OAAA;AACrB,8GAAA,YAAY,OAAA;AACZ,gHAAA,cAAc,OAAA;AAEhB,2DAUiC;AAT/B,8HAAA,2BAA2B,OAAA;AAC3B,6HAAA,0BAA0B,OAAA;AAC1B,sHAAA,mBAAmB,OAAA;AACnB,8GAAA,WAAW,OAAA;AACX,+GAAA,YAAY,OAAA;AACZ,+GAAA,YAAY,OAAA;AACZ,8HAAA,2BAA2B,OAAA;AAC3B,6HAAA,0BAA0B,OAAA;AAC1B,sHAAA,mBAAmB,OAAA;AAErB,yDAQgC;AAP9B,iHAAA,eAAe,OAAA;AACf,iHAAA,eAAe,OAAA;AACf,uHAAA,qBAAqB,OAAA;AACrB,uHAAA,qBAAqB,OAAA;AACrB,sGAAA,IAAI,OAAA;AACJ,2GAAA,SAAS,OAAA;AACT,2GAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,C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