glitch-javascript-sdk 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +29 -29
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +12 -12
- package/dist/esm/config/Config.d.ts +3 -4
- package/dist/esm/index.js +29 -29
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +15 -97
- package/package.json +1 -1
- package/src/api/Events.ts +29 -29
- package/src/config/Config.ts +3 -3
- package/src/util/Requests.ts +1 -1
package/dist/esm/api/Events.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ declare class Events {
|
|
|
93
93
|
*
|
|
94
94
|
* @returns promise
|
|
95
95
|
*/
|
|
96
|
-
static removeRTMPSource<T>(event_id: string, stream_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
96
|
+
static removeRTMPSource<T>(event_id: string, stream_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
97
97
|
/**
|
|
98
98
|
* A function that should be run on an interval to set the event as live when the live stream is active.
|
|
99
99
|
*
|
|
@@ -103,7 +103,7 @@ declare class Events {
|
|
|
103
103
|
*
|
|
104
104
|
* @returns promise
|
|
105
105
|
*/
|
|
106
|
-
static syncAsLive<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
106
|
+
static syncAsLive<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
107
107
|
/**
|
|
108
108
|
* Updates the main image for the event using a File object.
|
|
109
109
|
*
|
|
@@ -158,7 +158,7 @@ declare class Events {
|
|
|
158
158
|
*
|
|
159
159
|
* @returns promise
|
|
160
160
|
*/
|
|
161
|
-
static enableBroadcastMode<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
161
|
+
static enableBroadcastMode<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
162
162
|
/**
|
|
163
163
|
* Enable livestream mode, in which the stream will be delivered to the invirtu RTMP endpoint for
|
|
164
164
|
* streaming.
|
|
@@ -167,7 +167,7 @@ declare class Events {
|
|
|
167
167
|
*
|
|
168
168
|
* @returns promise
|
|
169
169
|
*/
|
|
170
|
-
static enableLivestreamMode<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
170
|
+
static enableLivestreamMode<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
171
171
|
/**
|
|
172
172
|
* Sends content that will appear on-screen to the user.
|
|
173
173
|
*
|
|
@@ -202,7 +202,7 @@ declare class Events {
|
|
|
202
202
|
*
|
|
203
203
|
* @returns promise
|
|
204
204
|
*/
|
|
205
|
-
static addOverlayAsBlob<T>(event_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
205
|
+
static addOverlayAsBlob<T>(event_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
206
206
|
/**
|
|
207
207
|
* Deletes an overlay image.
|
|
208
208
|
*
|
|
@@ -213,7 +213,7 @@ declare class Events {
|
|
|
213
213
|
*
|
|
214
214
|
* @returns promise
|
|
215
215
|
*/
|
|
216
|
-
static removeOverlay<T>(event_id: string, overlay_id: string): AxiosPromise<Response<T>>;
|
|
216
|
+
static removeOverlay<T>(event_id: string, overlay_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
217
217
|
/**
|
|
218
218
|
* Enables an overlay so that it will appear on screen.
|
|
219
219
|
*
|
|
@@ -224,7 +224,7 @@ declare class Events {
|
|
|
224
224
|
*
|
|
225
225
|
* @returns promise
|
|
226
226
|
*/
|
|
227
|
-
static enableOverlay<T>(event_id: string, overlay_id: string): AxiosPromise<Response<T>>;
|
|
227
|
+
static enableOverlay<T>(event_id: string, overlay_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
228
228
|
/**
|
|
229
229
|
* Disables the overlay so it no longer appears on-screen.
|
|
230
230
|
*
|
|
@@ -234,7 +234,7 @@ declare class Events {
|
|
|
234
234
|
*
|
|
235
235
|
* @returns promise
|
|
236
236
|
*/
|
|
237
|
-
static disableOverlay<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
237
|
+
static disableOverlay<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
238
238
|
/**
|
|
239
239
|
* Enable the donations to appear on-screen
|
|
240
240
|
*
|
|
@@ -244,15 +244,15 @@ declare class Events {
|
|
|
244
244
|
*
|
|
245
245
|
* @returns promise
|
|
246
246
|
*/
|
|
247
|
-
static enableDonations<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
247
|
+
static enableDonations<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
248
248
|
/**
|
|
249
249
|
* Disable the donations and remove from the screen.
|
|
250
250
|
*
|
|
251
251
|
* @param event_id
|
|
252
252
|
* @returns
|
|
253
253
|
*/
|
|
254
|
-
static disableDonations<T>(event_id: string): AxiosPromise<Response<T>>;
|
|
255
|
-
static sendInvite<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
|
|
256
|
-
static acceptInvite<T>(event_id: string, token: string): AxiosPromise<Response<T>>;
|
|
254
|
+
static disableDonations<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
255
|
+
static sendInvite<T>(event_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
256
|
+
static acceptInvite<T>(event_id: string, token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
257
257
|
}
|
|
258
258
|
export default Events;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Community from "../models/community";
|
|
2
1
|
/**
|
|
3
2
|
* Config
|
|
4
3
|
*
|
|
@@ -33,9 +32,9 @@ declare class Config {
|
|
|
33
32
|
/**
|
|
34
33
|
* Set the community to be associated with this config through
|
|
35
34
|
*
|
|
36
|
-
* @param
|
|
35
|
+
* @param community The object of the community
|
|
37
36
|
*/
|
|
38
|
-
static setCommunity(community:
|
|
37
|
+
static setCommunity(community: Record<string, any>): void;
|
|
39
38
|
/**
|
|
40
39
|
* Gets base url
|
|
41
40
|
*/
|
|
@@ -47,6 +46,6 @@ declare class Config {
|
|
|
47
46
|
/**
|
|
48
47
|
* Gets the community currently associated
|
|
49
48
|
*/
|
|
50
|
-
static get getCommunity():
|
|
49
|
+
static get getCommunity(): object;
|
|
51
50
|
}
|
|
52
51
|
export default Config;
|
package/dist/esm/index.js
CHANGED
|
@@ -30086,7 +30086,7 @@ var Config = /** @class */ (function () {
|
|
|
30086
30086
|
/**
|
|
30087
30087
|
* Set the community to be associated with this config through
|
|
30088
30088
|
*
|
|
30089
|
-
* @param
|
|
30089
|
+
* @param community The object of the community
|
|
30090
30090
|
*/
|
|
30091
30091
|
Config.setCommunity = function (community) {
|
|
30092
30092
|
Config._community = community;
|
|
@@ -31354,7 +31354,7 @@ var Events = /** @class */ (function () {
|
|
|
31354
31354
|
* @returns promise
|
|
31355
31355
|
*/
|
|
31356
31356
|
Events.delete = function (event_id, params) {
|
|
31357
|
-
return Requests.processRoute(EventsRoutes.routes.delete, {}, { event_id: event_id });
|
|
31357
|
+
return Requests.processRoute(EventsRoutes.routes.delete, {}, { event_id: event_id }, params);
|
|
31358
31358
|
};
|
|
31359
31359
|
/**
|
|
31360
31360
|
* The event is synced with Invirtu for the lie streams. This will allow you to update
|
|
@@ -31368,7 +31368,7 @@ var Events = /** @class */ (function () {
|
|
|
31368
31368
|
* @returns promise
|
|
31369
31369
|
*/
|
|
31370
31370
|
Events.updateInvirtuEvent = function (event_id, data, params) {
|
|
31371
|
-
return Requests.processRoute(EventsRoutes.routes.updateInvirtu, data, { event_id: event_id });
|
|
31371
|
+
return Requests.processRoute(EventsRoutes.routes.updateInvirtu, data, { event_id: event_id }, params);
|
|
31372
31372
|
};
|
|
31373
31373
|
/**
|
|
31374
31374
|
* Add an RTMP source to multicast a stream too.
|
|
@@ -31381,7 +31381,7 @@ var Events = /** @class */ (function () {
|
|
|
31381
31381
|
* @returns promise
|
|
31382
31382
|
*/
|
|
31383
31383
|
Events.addRTMPSource = function (event_id, data, params) {
|
|
31384
|
-
return Requests.processRoute(EventsRoutes.routes.addRTMPSource, data, { event_id: event_id });
|
|
31384
|
+
return Requests.processRoute(EventsRoutes.routes.addRTMPSource, data, { event_id: event_id }, params);
|
|
31385
31385
|
};
|
|
31386
31386
|
/**
|
|
31387
31387
|
* Update an RTMP Source for multicasing.
|
|
@@ -31394,7 +31394,7 @@ var Events = /** @class */ (function () {
|
|
|
31394
31394
|
* @returns promise
|
|
31395
31395
|
*/
|
|
31396
31396
|
Events.updateRTMPSource = function (event_id, stream_id, data, params) {
|
|
31397
|
-
return Requests.processRoute(EventsRoutes.routes.updateRTMPSource, data, { event_id: event_id, subid: stream_id });
|
|
31397
|
+
return Requests.processRoute(EventsRoutes.routes.updateRTMPSource, data, { event_id: event_id, subid: stream_id }, params);
|
|
31398
31398
|
};
|
|
31399
31399
|
/**
|
|
31400
31400
|
* Remove a RTMP source for multicasing.
|
|
@@ -31406,8 +31406,8 @@ var Events = /** @class */ (function () {
|
|
|
31406
31406
|
*
|
|
31407
31407
|
* @returns promise
|
|
31408
31408
|
*/
|
|
31409
|
-
Events.removeRTMPSource = function (event_id, stream_id, params) {
|
|
31410
|
-
return Requests.processRoute(EventsRoutes.routes.removeRTMPSource,
|
|
31409
|
+
Events.removeRTMPSource = function (event_id, stream_id, data, params) {
|
|
31410
|
+
return Requests.processRoute(EventsRoutes.routes.removeRTMPSource, data, { event_id: event_id, subid: stream_id }, params);
|
|
31411
31411
|
};
|
|
31412
31412
|
/**
|
|
31413
31413
|
* A function that should be run on an interval to set the event as live when the live stream is active.
|
|
@@ -31418,8 +31418,8 @@ var Events = /** @class */ (function () {
|
|
|
31418
31418
|
*
|
|
31419
31419
|
* @returns promise
|
|
31420
31420
|
*/
|
|
31421
|
-
Events.syncAsLive = function (event_id, params) {
|
|
31422
|
-
return Requests.processRoute(EventsRoutes.routes.syncAsLive,
|
|
31421
|
+
Events.syncAsLive = function (event_id, data, params) {
|
|
31422
|
+
return Requests.processRoute(EventsRoutes.routes.syncAsLive, data, { event_id: event_id }, params);
|
|
31423
31423
|
};
|
|
31424
31424
|
/**
|
|
31425
31425
|
* Updates the main image for the event using a File object.
|
|
@@ -31487,8 +31487,8 @@ var Events = /** @class */ (function () {
|
|
|
31487
31487
|
*
|
|
31488
31488
|
* @returns promise
|
|
31489
31489
|
*/
|
|
31490
|
-
Events.enableBroadcastMode = function (event_id, params) {
|
|
31491
|
-
return Requests.processRoute(EventsRoutes.routes.enableBroadcastMode,
|
|
31490
|
+
Events.enableBroadcastMode = function (event_id, data, params) {
|
|
31491
|
+
return Requests.processRoute(EventsRoutes.routes.enableBroadcastMode, data, { event_id: event_id }, params);
|
|
31492
31492
|
};
|
|
31493
31493
|
/**
|
|
31494
31494
|
* Enable livestream mode, in which the stream will be delivered to the invirtu RTMP endpoint for
|
|
@@ -31498,8 +31498,8 @@ var Events = /** @class */ (function () {
|
|
|
31498
31498
|
*
|
|
31499
31499
|
* @returns promise
|
|
31500
31500
|
*/
|
|
31501
|
-
Events.enableLivestreamMode = function (event_id, params) {
|
|
31502
|
-
return Requests.processRoute(EventsRoutes.routes.enableLivestreamMode,
|
|
31501
|
+
Events.enableLivestreamMode = function (event_id, data, params) {
|
|
31502
|
+
return Requests.processRoute(EventsRoutes.routes.enableLivestreamMode, data, { event_id: event_id }, params);
|
|
31503
31503
|
};
|
|
31504
31504
|
/**
|
|
31505
31505
|
* Sends content that will appear on-screen to the user.
|
|
@@ -31512,7 +31512,7 @@ var Events = /** @class */ (function () {
|
|
|
31512
31512
|
* @returns promise
|
|
31513
31513
|
*/
|
|
31514
31514
|
Events.sendOnScreenContent = function (event_id, data, params) {
|
|
31515
|
-
return Requests.processRoute(EventsRoutes.routes.enableLivestreamMode, data, { event_id: event_id });
|
|
31515
|
+
return Requests.processRoute(EventsRoutes.routes.enableLivestreamMode, data, { event_id: event_id }, params);
|
|
31516
31516
|
};
|
|
31517
31517
|
/**
|
|
31518
31518
|
* Uploads an image that can be used and overlay later. A File object is used.
|
|
@@ -31540,7 +31540,7 @@ var Events = /** @class */ (function () {
|
|
|
31540
31540
|
*
|
|
31541
31541
|
* @returns promise
|
|
31542
31542
|
*/
|
|
31543
|
-
Events.addOverlayAsBlob = function (event_id, blob, data) {
|
|
31543
|
+
Events.addOverlayAsBlob = function (event_id, blob, data, params) {
|
|
31544
31544
|
var url = EventsRoutes.routes.addOverlay.url.replace('{event_id}', event_id);
|
|
31545
31545
|
return Requests.uploadBlob(url, 'image', blob, data);
|
|
31546
31546
|
};
|
|
@@ -31554,8 +31554,8 @@ var Events = /** @class */ (function () {
|
|
|
31554
31554
|
*
|
|
31555
31555
|
* @returns promise
|
|
31556
31556
|
*/
|
|
31557
|
-
Events.removeOverlay = function (event_id, overlay_id) {
|
|
31558
|
-
return Requests.processRoute(EventsRoutes.routes.removeOverlay, {}, { event_id: event_id, subid: overlay_id });
|
|
31557
|
+
Events.removeOverlay = function (event_id, overlay_id, params) {
|
|
31558
|
+
return Requests.processRoute(EventsRoutes.routes.removeOverlay, {}, { event_id: event_id, subid: overlay_id }, params);
|
|
31559
31559
|
};
|
|
31560
31560
|
/**
|
|
31561
31561
|
* Enables an overlay so that it will appear on screen.
|
|
@@ -31567,8 +31567,8 @@ var Events = /** @class */ (function () {
|
|
|
31567
31567
|
*
|
|
31568
31568
|
* @returns promise
|
|
31569
31569
|
*/
|
|
31570
|
-
Events.enableOverlay = function (event_id, overlay_id) {
|
|
31571
|
-
return Requests.processRoute(EventsRoutes.routes.enableOverlay,
|
|
31570
|
+
Events.enableOverlay = function (event_id, overlay_id, data, params) {
|
|
31571
|
+
return Requests.processRoute(EventsRoutes.routes.enableOverlay, data, { event_id: event_id, subid: overlay_id }, params);
|
|
31572
31572
|
};
|
|
31573
31573
|
/**
|
|
31574
31574
|
* Disables the overlay so it no longer appears on-screen.
|
|
@@ -31579,8 +31579,8 @@ var Events = /** @class */ (function () {
|
|
|
31579
31579
|
*
|
|
31580
31580
|
* @returns promise
|
|
31581
31581
|
*/
|
|
31582
|
-
Events.disableOverlay = function (event_id) {
|
|
31583
|
-
return Requests.processRoute(EventsRoutes.routes.disableOverlay,
|
|
31582
|
+
Events.disableOverlay = function (event_id, data, params) {
|
|
31583
|
+
return Requests.processRoute(EventsRoutes.routes.disableOverlay, data, { event_id: event_id }, params);
|
|
31584
31584
|
};
|
|
31585
31585
|
/**
|
|
31586
31586
|
* Enable the donations to appear on-screen
|
|
@@ -31591,8 +31591,8 @@ var Events = /** @class */ (function () {
|
|
|
31591
31591
|
*
|
|
31592
31592
|
* @returns promise
|
|
31593
31593
|
*/
|
|
31594
|
-
Events.enableDonations = function (event_id) {
|
|
31595
|
-
return Requests.processRoute(EventsRoutes.routes.enableDonations,
|
|
31594
|
+
Events.enableDonations = function (event_id, data, params) {
|
|
31595
|
+
return Requests.processRoute(EventsRoutes.routes.enableDonations, data, { event_id: event_id }, params);
|
|
31596
31596
|
};
|
|
31597
31597
|
/**
|
|
31598
31598
|
* Disable the donations and remove from the screen.
|
|
@@ -31600,14 +31600,14 @@ var Events = /** @class */ (function () {
|
|
|
31600
31600
|
* @param event_id
|
|
31601
31601
|
* @returns
|
|
31602
31602
|
*/
|
|
31603
|
-
Events.disableDonations = function (event_id) {
|
|
31604
|
-
return Requests.processRoute(EventsRoutes.routes.disableDonations,
|
|
31603
|
+
Events.disableDonations = function (event_id, data, params) {
|
|
31604
|
+
return Requests.processRoute(EventsRoutes.routes.disableDonations, data, { event_id: event_id }, params);
|
|
31605
31605
|
};
|
|
31606
|
-
Events.sendInvite = function (event_id, data) {
|
|
31607
|
-
return Requests.processRoute(EventsRoutes.routes.sendInvite, data, { event_id: event_id });
|
|
31606
|
+
Events.sendInvite = function (event_id, data, params) {
|
|
31607
|
+
return Requests.processRoute(EventsRoutes.routes.sendInvite, data, { event_id: event_id }, params);
|
|
31608
31608
|
};
|
|
31609
|
-
Events.acceptInvite = function (event_id, token) {
|
|
31610
|
-
return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id });
|
|
31609
|
+
Events.acceptInvite = function (event_id, token, params) {
|
|
31610
|
+
return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id }, params);
|
|
31611
31611
|
};
|
|
31612
31612
|
return Events;
|
|
31613
31613
|
}());
|