livekit-server-sdk 1.1.3 → 1.2.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 (55) hide show
  1. package/.github/banner_dark.png +0 -0
  2. package/.github/banner_light.png +0 -0
  3. package/README.md +25 -1
  4. package/dist/AccessToken.d.ts +56 -0
  5. package/dist/AccessToken.js +118 -0
  6. package/dist/AccessToken.js.map +1 -0
  7. package/dist/AccessToken.test.d.ts +1 -0
  8. package/dist/AccessToken.test.js +72 -0
  9. package/dist/AccessToken.test.js.map +1 -0
  10. package/dist/EgressClient.d.ts +128 -0
  11. package/dist/EgressClient.js +263 -0
  12. package/dist/EgressClient.js.map +1 -0
  13. package/dist/IngressClient.d.ts +84 -0
  14. package/dist/IngressClient.js +112 -0
  15. package/dist/IngressClient.js.map +1 -0
  16. package/dist/RoomServiceClient.d.ts +132 -0
  17. package/dist/RoomServiceClient.js +189 -0
  18. package/dist/RoomServiceClient.js.map +1 -0
  19. package/dist/ServiceBase.d.ts +16 -0
  20. package/dist/ServiceBase.js +27 -0
  21. package/dist/ServiceBase.js.map +1 -0
  22. package/dist/TwirpRPC.d.ts +16 -0
  23. package/dist/TwirpRPC.js +37 -0
  24. package/dist/TwirpRPC.js.map +1 -0
  25. package/dist/WebhookReceiver.d.ts +14 -0
  26. package/dist/WebhookReceiver.js +40 -0
  27. package/dist/WebhookReceiver.js.map +1 -0
  28. package/dist/WebhookReceiver.test.d.ts +1 -0
  29. package/dist/WebhookReceiver.test.js +39 -0
  30. package/dist/WebhookReceiver.test.js.map +1 -0
  31. package/dist/grants.d.ts +53 -0
  32. package/dist/grants.js +11 -0
  33. package/dist/grants.js.map +1 -0
  34. package/dist/index.d.ts +9 -0
  35. package/dist/index.js +50 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/proto/google/protobuf/timestamp.d.ts +132 -0
  38. package/dist/proto/google/protobuf/timestamp.js +92 -0
  39. package/dist/proto/google/protobuf/timestamp.js.map +1 -0
  40. package/dist/proto/livekit_egress.d.ts +11266 -0
  41. package/dist/proto/livekit_egress.js +2869 -0
  42. package/dist/proto/livekit_egress.js.map +1 -0
  43. package/dist/proto/livekit_ingress.d.ts +2163 -0
  44. package/dist/proto/livekit_ingress.js +1264 -0
  45. package/dist/proto/livekit_ingress.js.map +1 -0
  46. package/dist/proto/livekit_models.d.ts +1356 -0
  47. package/dist/proto/livekit_models.js +2893 -0
  48. package/dist/proto/livekit_models.js.map +1 -0
  49. package/dist/proto/livekit_room.d.ts +3273 -0
  50. package/dist/proto/livekit_room.js +1057 -0
  51. package/dist/proto/livekit_room.js.map +1 -0
  52. package/dist/proto/livekit_webhook.d.ts +4841 -0
  53. package/dist/proto/livekit_webhook.js +179 -0
  54. package/dist/proto/livekit_webhook.js.map +1 -0
  55. package/package.json +7 -6
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RoomServiceClient = void 0;
16
+ const livekit_models_1 = require("./proto/livekit_models");
17
+ const livekit_room_1 = require("./proto/livekit_room");
18
+ const ServiceBase_1 = __importDefault(require("./ServiceBase"));
19
+ const TwirpRPC_1 = require("./TwirpRPC");
20
+ const svc = 'RoomService';
21
+ /**
22
+ * Client to access Room APIs
23
+ */
24
+ class RoomServiceClient extends ServiceBase_1.default {
25
+ /**
26
+ *
27
+ * @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
28
+ * @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
29
+ * @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
30
+ */
31
+ constructor(host, apiKey, secret) {
32
+ super(apiKey, secret);
33
+ this.rpc = new TwirpRPC_1.TwirpRpc(host, TwirpRPC_1.livekitPackage);
34
+ }
35
+ /**
36
+ * Creates a new room. Explicit room creation is not required, since rooms will
37
+ * be automatically created when the first participant joins. This method can be
38
+ * used to customize room settings.
39
+ * @param options
40
+ */
41
+ createRoom(options) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const data = yield this.rpc.request(svc, 'CreateRoom', livekit_room_1.CreateRoomRequest.toJSON(livekit_room_1.CreateRoomRequest.fromPartial(options)), this.authHeader({ roomCreate: true }));
44
+ return livekit_models_1.Room.fromJSON(data);
45
+ });
46
+ }
47
+ /**
48
+ * List active rooms
49
+ * @param names when undefined or empty, list all rooms.
50
+ * otherwise returns rooms with matching names
51
+ * @returns
52
+ */
53
+ listRooms(names) {
54
+ var _a;
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ const data = yield this.rpc.request(svc, 'ListRooms', livekit_room_1.ListRoomsRequest.toJSON({ names: names !== null && names !== void 0 ? names : [] }), this.authHeader({ roomList: true }));
57
+ const res = livekit_room_1.ListRoomsResponse.fromJSON(data);
58
+ return (_a = res.rooms) !== null && _a !== void 0 ? _a : [];
59
+ });
60
+ }
61
+ deleteRoom(room) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ yield this.rpc.request(svc, 'DeleteRoom', livekit_room_1.DeleteRoomRequest.toJSON({ room }), this.authHeader({ roomCreate: true }));
64
+ });
65
+ }
66
+ /**
67
+ * Update metadata of a room
68
+ * @param room name of the room
69
+ * @param metadata the new metadata for the room
70
+ */
71
+ updateRoomMetadata(room, metadata) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const data = yield this.rpc.request(svc, 'UpdateRoomMetadata', livekit_room_1.UpdateRoomMetadataRequest.toJSON({ room, metadata }), this.authHeader({ roomAdmin: true, room }));
74
+ return livekit_models_1.Room.fromJSON(data);
75
+ });
76
+ }
77
+ /**
78
+ * List participants in a room
79
+ * @param room name of the room
80
+ */
81
+ listParticipants(room) {
82
+ var _a;
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ const data = yield this.rpc.request(svc, 'ListParticipants', livekit_room_1.ListParticipantsRequest.toJSON({ room }), this.authHeader({ roomAdmin: true, room }));
85
+ const res = livekit_room_1.ListParticipantsResponse.fromJSON(data);
86
+ return (_a = res.participants) !== null && _a !== void 0 ? _a : [];
87
+ });
88
+ }
89
+ /**
90
+ * Get information on a specific participant, including the tracks that participant
91
+ * has published
92
+ * @param room name of the room
93
+ * @param identity identity of the participant to return
94
+ */
95
+ getParticipant(room, identity) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const data = yield this.rpc.request(svc, 'GetParticipant', livekit_room_1.RoomParticipantIdentity.toJSON({ room, identity }), this.authHeader({ roomAdmin: true, room }));
98
+ return livekit_models_1.ParticipantInfo.fromJSON(data);
99
+ });
100
+ }
101
+ /**
102
+ * Removes a participant in the room. This will disconnect the participant
103
+ * and will emit a Disconnected event for that participant.
104
+ * Even after being removed, the participant can still re-join the room.
105
+ * @param room
106
+ * @param identity
107
+ */
108
+ removeParticipant(room, identity) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ yield this.rpc.request(svc, 'RemoveParticipant', livekit_room_1.RoomParticipantIdentity.toJSON({ room, identity }), this.authHeader({ roomAdmin: true, room }));
111
+ });
112
+ }
113
+ /**
114
+ * Mutes a track that the participant has published.
115
+ * @param room
116
+ * @param identity
117
+ * @param trackSid sid of the track to be muted
118
+ * @param muted true to mute, false to unmute
119
+ */
120
+ mutePublishedTrack(room, identity, trackSid, muted) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const req = livekit_room_1.MuteRoomTrackRequest.toJSON({
123
+ room,
124
+ identity,
125
+ trackSid,
126
+ muted,
127
+ });
128
+ const data = yield this.rpc.request(svc, 'MutePublishedTrack', req, this.authHeader({ roomAdmin: true, room }));
129
+ const res = livekit_room_1.MuteRoomTrackResponse.fromJSON(data);
130
+ return res.track;
131
+ });
132
+ }
133
+ /**
134
+ * Updates a participant's metadata or permissions
135
+ * @param room
136
+ * @param identity
137
+ * @param metadata optional, metadata to update
138
+ * @param permission optional, new permissions to assign to participant
139
+ * @param name optional, new name for participant
140
+ */
141
+ updateParticipant(room, identity, metadata, permission, name) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ const req = {
144
+ room,
145
+ identity,
146
+ metadata: metadata || '',
147
+ permission,
148
+ name: name || '',
149
+ };
150
+ const data = yield this.rpc.request(svc, 'UpdateParticipant', livekit_room_1.UpdateParticipantRequest.toJSON(req), this.authHeader({ roomAdmin: true, room }));
151
+ return livekit_models_1.ParticipantInfo.fromJSON(data);
152
+ });
153
+ }
154
+ /**
155
+ * Updates a participant's subscription to tracks
156
+ * @param room
157
+ * @param identity
158
+ * @param trackSids
159
+ * @param subscribe true to subscribe, false to unsubscribe
160
+ */
161
+ updateSubscriptions(room, identity, trackSids, subscribe) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ const req = livekit_room_1.UpdateSubscriptionsRequest.toJSON({
164
+ room,
165
+ identity,
166
+ trackSids,
167
+ subscribe,
168
+ participantTracks: [],
169
+ });
170
+ yield this.rpc.request(svc, 'UpdateSubscriptions', req, this.authHeader({ roomAdmin: true, room }));
171
+ });
172
+ }
173
+ sendData(room, data, kind, options = {}) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ const destinationSids = Array.isArray(options) ? options : options.destinationSids;
176
+ const topic = Array.isArray(options) ? undefined : options.topic;
177
+ const req = livekit_room_1.SendDataRequest.toJSON({
178
+ room,
179
+ data,
180
+ kind,
181
+ destinationSids: destinationSids !== null && destinationSids !== void 0 ? destinationSids : [],
182
+ topic,
183
+ });
184
+ yield this.rpc.request(svc, 'SendData', req, this.authHeader({ roomAdmin: true, room }));
185
+ });
186
+ }
187
+ }
188
+ exports.RoomServiceClient = RoomServiceClient;
189
+ //# sourceMappingURL=RoomServiceClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoomServiceClient.js","sourceRoot":"","sources":["../src/RoomServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2DAMgC;AAChC,uDAe8B;AAC9B,gEAAwC;AACxC,yCAA2D;AAwC3D,MAAM,GAAG,GAAG,aAAa,CAAC;AAE1B;;GAEG;AACH,MAAa,iBAAkB,SAAQ,qBAAW;IAGhD;;;;;OAKG;IACH,YAAY,IAAY,EAAE,MAAe,EAAE,MAAe;QACxD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,IAAI,mBAAQ,CAAC,IAAI,EAAE,yBAAc,CAAC,CAAC;IAChD,CAAC;IAED;;;;;OAKG;IACG,UAAU,CAAC,OAAsB;;YACrC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CACjC,GAAG,EACH,YAAY,EACZ,gCAAiB,CAAC,MAAM,CAAC,gCAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAChE,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACtC,CAAC;YACF,OAAO,qBAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;KAAA;IAED;;;;;OAKG;IACG,SAAS,CAAC,KAAgB;;;YAC9B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CACjC,GAAG,EACH,WAAW,EACX,+BAAgB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAAE,CAAC,EAC/C,IAAI,CAAC,UAAU,CAAC,EAAE,QAAQ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8BAAe,CAAC,MAAM,CAAC;gBACjC,IAAI;gBACJ,IAAI;gBACJ,IAAI;gBACJ,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE;gBACtC,KAAK;aACN,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC3F,CAAC;KAAA;CACF;AA1PD,8CA0PC"}
@@ -0,0 +1,16 @@
1
+ import { VideoGrant } from './grants';
2
+ /**
3
+ * Utilities to handle authentication
4
+ */
5
+ export default class ServiceBase {
6
+ private readonly apiKey?;
7
+ private readonly secret?;
8
+ private readonly ttl;
9
+ /**
10
+ * @param apiKey API Key.
11
+ * @param secret API Secret.
12
+ * @param ttl token TTL
13
+ */
14
+ constructor(apiKey?: string, secret?: string, ttl?: string);
15
+ authHeader(grant: VideoGrant): any;
16
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const AccessToken_1 = require("./AccessToken");
4
+ /**
5
+ * Utilities to handle authentication
6
+ */
7
+ class ServiceBase {
8
+ /**
9
+ * @param apiKey API Key.
10
+ * @param secret API Secret.
11
+ * @param ttl token TTL
12
+ */
13
+ constructor(apiKey, secret, ttl) {
14
+ this.apiKey = apiKey;
15
+ this.secret = secret;
16
+ this.ttl = ttl || '10m';
17
+ }
18
+ authHeader(grant) {
19
+ const at = new AccessToken_1.AccessToken(this.apiKey, this.secret, { ttl: this.ttl });
20
+ at.addGrant(grant);
21
+ return {
22
+ Authorization: `Bearer ${at.toJwt()}`,
23
+ };
24
+ }
25
+ }
26
+ exports.default = ServiceBase;
27
+ //# sourceMappingURL=ServiceBase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceBase.js","sourceRoot":"","sources":["../src/ServiceBase.ts"],"names":[],"mappings":";;AAAA,+CAA4C;AAG5C;;GAEG;AACH,MAAqB,WAAW;IAO9B;;;;OAIG;IACH,YAAY,MAAe,EAAE,MAAe,EAAE,GAAY;QACxD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC;IAC1B,CAAC;IAED,UAAU,CAAC,KAAiB;QAC1B,MAAM,EAAE,GAAG,IAAI,yBAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACxE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACnB,OAAO;YACL,aAAa,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;SACtC,CAAC;IACJ,CAAC;CACF;AAzBD,8BAyBC"}
@@ -0,0 +1,16 @@
1
+ import { AxiosInstance } from 'axios';
2
+ export declare const livekitPackage = "livekit";
3
+ export interface Rpc {
4
+ request(service: string, method: string, data: any, headers?: any): Promise<string>;
5
+ }
6
+ /**
7
+ * JSON based Twirp V7 RPC
8
+ */
9
+ export declare class TwirpRpc {
10
+ host: string;
11
+ pkg: string;
12
+ prefix: string;
13
+ instance: AxiosInstance;
14
+ constructor(host: string, pkg: string, prefix?: string);
15
+ request(service: string, method: string, data: any, headers?: any): Promise<any>;
16
+ }
@@ -0,0 +1,37 @@
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"));
9
+ // twirp RPC adapter for client implementation
10
+ const defaultPrefix = '/twirp';
11
+ exports.livekitPackage = 'livekit';
12
+ /**
13
+ * JSON based Twirp V7 RPC
14
+ */
15
+ class TwirpRpc {
16
+ constructor(host, pkg, prefix) {
17
+ this.host = host;
18
+ this.pkg = pkg;
19
+ this.prefix = prefix || defaultPrefix;
20
+ this.instance = axios_1.default.create({
21
+ baseURL: host,
22
+ });
23
+ }
24
+ request(service, method, data, headers) {
25
+ return new Promise((resolve, reject) => {
26
+ const path = `${this.prefix}/${this.pkg}.${service}/${method}`;
27
+ this.instance
28
+ .post(path, data, { headers })
29
+ .then((res) => {
30
+ resolve(camelcase_keys_1.default(res.data, { deep: true }));
31
+ })
32
+ .catch(reject);
33
+ });
34
+ }
35
+ }
36
+ exports.TwirpRpc = TwirpRpc;
37
+ //# sourceMappingURL=TwirpRPC.js.map
@@ -0,0 +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,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,CAAC,CAAC,CAAC;YACnD,CAAC,CAAC;iBACD,KAAK,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,4BA6BC"}
@@ -0,0 +1,14 @@
1
+ import { WebhookEvent } from './proto/livekit_webhook';
2
+ export declare const authorizeHeader = "Authorize";
3
+ export declare class WebhookReceiver {
4
+ private verifier;
5
+ constructor(apiKey: string, apiSecret: string);
6
+ /**
7
+ *
8
+ * @param body string of the posted body
9
+ * @param authHeader `Authorization` header from the request
10
+ * @param skipAuth true to skip auth validation
11
+ * @returns
12
+ */
13
+ receive(body: string, authHeader?: string, skipAuth?: boolean): WebhookEvent;
14
+ }
@@ -0,0 +1,40 @@
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 {
12
+ constructor(apiKey, apiSecret) {
13
+ this.verifier = new AccessToken_1.TokenVerifier(apiKey, apiSecret);
14
+ }
15
+ /**
16
+ *
17
+ * @param body string of the posted body
18
+ * @param authHeader `Authorization` header from the request
19
+ * @param skipAuth true to skip auth validation
20
+ * @returns
21
+ */
22
+ receive(body, authHeader, skipAuth = false) {
23
+ // verify token
24
+ if (!skipAuth) {
25
+ if (!authHeader) {
26
+ throw new Error('authorization header is empty');
27
+ }
28
+ const claims = this.verifier.verify(authHeader);
29
+ // confirm sha
30
+ const hash = crypto_1.default.createHash('sha256');
31
+ hash.update(body);
32
+ if (claims.sha256 !== hash.digest('base64')) {
33
+ throw new Error('sha256 checksum of body does not match');
34
+ }
35
+ }
36
+ return livekit_webhook_1.WebhookEvent.fromJSON(JSON.parse(body));
37
+ }
38
+ }
39
+ exports.WebhookReceiver = WebhookReceiver;
40
+ //# sourceMappingURL=WebhookReceiver.js.map
@@ -0,0 +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,CAAC;IACjD,CAAC;CACF;AAhCD,0CAgCC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const AccessToken_1 = require("./AccessToken");
4
+ const livekit_webhook_1 = require("./proto/livekit_webhook");
5
+ const WebhookReceiver_1 = require("./WebhookReceiver");
6
+ const testApiKey = 'abcdefg';
7
+ const testSecret = 'abababa';
8
+ describe('webhook receiver', () => {
9
+ const body = '{"event":"room_started", "room":{"sid":"RM_TkVjUvAqgzKz", "name":"mytestroom", "emptyTimeout":300, "creationTime":"1628545903", "turnPassword":"ICkSr2rEeslkN6e9bXL4Ji5zzMD5Z7zzr6ulOaxMj6N", "enabledCodecs":[{"mime":"audio/opus"}, {"mime":"video/VP8"}]}}';
10
+ const sha = 'CoEQz1chqJ9bnZRcORddjplkvpjmPujmLTR42DbefYI=';
11
+ const t = new AccessToken_1.AccessToken(testApiKey, testSecret);
12
+ t.sha256 = sha;
13
+ const token = t.toJwt();
14
+ const receiver = new WebhookReceiver_1.WebhookReceiver(testApiKey, testSecret);
15
+ it('should receive and decode WebhookEvent', () => {
16
+ var _a;
17
+ const event = receiver.receive(body, token);
18
+ expect(event).toBeTruthy();
19
+ expect((_a = event.room) === null || _a === void 0 ? void 0 : _a.name).toBe('mytestroom');
20
+ expect(event.event).toBe('room_started');
21
+ });
22
+ });
23
+ describe('decoding json payload', () => {
24
+ it('should allow server to return extra fields', () => {
25
+ var _a;
26
+ const obj = {
27
+ type: 'room_started',
28
+ room: {
29
+ sid: 'RM_TkVjUvAqgzKz',
30
+ name: 'mytestroom',
31
+ },
32
+ extra: 'extra',
33
+ };
34
+ const event = livekit_webhook_1.WebhookEvent.fromJSON(obj);
35
+ expect(event).toBeTruthy();
36
+ expect((_a = event.room) === null || _a === void 0 ? void 0 : _a.name).toBe('mytestroom');
37
+ });
38
+ });
39
+ //# sourceMappingURL=WebhookReceiver.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebhookReceiver.test.js","sourceRoot":"","sources":["../src/WebhookReceiver.test.ts"],"names":[],"mappings":";;AAAA,+CAA4C;AAC5C,6DAAuD;AACvD,uDAAoD;AAEpD,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,UAAU,GAAG,SAAS,CAAC;AAE7B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,IAAI,GACR,+PAA+P,CAAC;IAClQ,MAAM,GAAG,GAAG,8CAA8C,CAAC;IAC3D,MAAM,CAAC,GAAG,IAAI,yBAAW,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAClD,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC;IACf,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;IACxB,MAAM,QAAQ,GAAG,IAAI,iCAAe,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAE7D,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;;QAChD,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC5C,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5C,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;;QACpD,MAAM,GAAG,GAAG;YACV,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE;gBACJ,GAAG,EAAE,iBAAiB;gBACtB,IAAI,EAAE,YAAY;aACnB;YACD,KAAK,EAAE,OAAO;SACf,CAAC;QAEF,MAAM,KAAK,GAAG,8BAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,53 @@
1
+ export declare enum TrackSource {
2
+ CAMERA = "camera",
3
+ MICROPHONE = "microphone",
4
+ SCREEN_SHARE = "screen_share",
5
+ SCREEN_SHARE_AUDIO = "screen_share_audio"
6
+ }
7
+ export interface VideoGrant {
8
+ /** permission to create a room */
9
+ roomCreate?: boolean;
10
+ /** permission to join a room as a participant, room must be set */
11
+ roomJoin?: boolean;
12
+ /** permission to list rooms */
13
+ roomList?: boolean;
14
+ /** permission to start a recording */
15
+ roomRecord?: boolean;
16
+ /** permission to control a specific room, room must be set */
17
+ roomAdmin?: boolean;
18
+ /** name of the room, must be set for admin or join permissions */
19
+ room?: string;
20
+ /** permissions to control ingress, not specific to any room or ingress */
21
+ ingressAdmin?: boolean;
22
+ /**
23
+ * allow participant to publish. If neither canPublish or canSubscribe is set,
24
+ * both publish and subscribe are enabled
25
+ */
26
+ canPublish?: boolean;
27
+ /**
28
+ * TrackSource types that the participant is allowed to publish
29
+ * When set, it supersedes CanPublish. Only sources explicitly set here can be published
30
+ */
31
+ canPublishSources?: TrackSource[];
32
+ /** allow participant to subscribe to other tracks */
33
+ canSubscribe?: boolean;
34
+ /**
35
+ * allow participants to publish data, defaults to true if not set
36
+ */
37
+ canPublishData?: boolean;
38
+ /**
39
+ * by default, a participant is not allowed to update its own metadata
40
+ */
41
+ canUpdateOwnMetadata?: boolean;
42
+ /** participant isn't visible to others */
43
+ hidden?: boolean;
44
+ /** participant is recording the room, when set, allows room to indicate it's being recorded */
45
+ recorder?: boolean;
46
+ }
47
+ /** @internal */
48
+ export interface ClaimGrants {
49
+ name?: string;
50
+ video?: VideoGrant;
51
+ metadata?: string;
52
+ sha256?: string;
53
+ }
package/dist/grants.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TrackSource = void 0;
4
+ var TrackSource;
5
+ (function (TrackSource) {
6
+ TrackSource["CAMERA"] = "camera";
7
+ TrackSource["MICROPHONE"] = "microphone";
8
+ TrackSource["SCREEN_SHARE"] = "screen_share";
9
+ TrackSource["SCREEN_SHARE_AUDIO"] = "screen_share_audio";
10
+ })(TrackSource = exports.TrackSource || (exports.TrackSource = {}));
11
+ //# sourceMappingURL=grants.js.map
@@ -0,0 +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"}
@@ -0,0 +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, TrackSource, TrackType, } from './proto/livekit_models';
package/dist/index.js ADDED
@@ -0,0 +1,50 @@
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.TrackSource = 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, "TrackSource", { enumerable: true, get: function () { return livekit_models_1.TrackSource; } });
49
+ Object.defineProperty(exports, "TrackType", { enumerable: true, get: function () { return livekit_models_1.TrackType; } });
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,yDASgC;AAR9B,iHAAA,eAAe,OAAA;AACf,iHAAA,eAAe,OAAA;AACf,uHAAA,qBAAqB,OAAA;AACrB,uHAAA,qBAAqB,OAAA;AACrB,sGAAA,IAAI,OAAA;AACJ,2GAAA,SAAS,OAAA;AACT,6GAAA,WAAW,OAAA;AACX,2GAAA,SAAS,OAAA"}