glitch-javascript-sdk 0.3.4 → 0.3.6
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 +31 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +12 -0
- package/dist/esm/index.js +31 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/package.json +1 -1
- package/src/api/Events.ts +17 -0
- package/src/routes/RecordingRoute.ts +1 -5
- package/src/util/Requests.ts +17 -0
package/dist/cjs/index.js
CHANGED
|
@@ -15787,6 +15787,10 @@ var Requests = /** @class */ (function () {
|
|
|
15787
15787
|
}
|
|
15788
15788
|
var formData = new FormData();
|
|
15789
15789
|
formData.append(filename, file);
|
|
15790
|
+
if (this.community_id) {
|
|
15791
|
+
// Add the community_id to the request body
|
|
15792
|
+
data = __assign(__assign({}, data), { communities: [this.community_id] });
|
|
15793
|
+
}
|
|
15790
15794
|
for (var key in data) {
|
|
15791
15795
|
formData.append(key, data[key]);
|
|
15792
15796
|
}
|
|
@@ -15804,6 +15808,10 @@ var Requests = /** @class */ (function () {
|
|
|
15804
15808
|
}
|
|
15805
15809
|
var formData = new FormData();
|
|
15806
15810
|
formData.append(filename, blob);
|
|
15811
|
+
if (this.community_id) {
|
|
15812
|
+
// Add the community_id to the request body
|
|
15813
|
+
data = __assign(__assign({}, data), { communities: [this.community_id] });
|
|
15814
|
+
}
|
|
15807
15815
|
for (var key in data) {
|
|
15808
15816
|
formData.append(key, data[key]);
|
|
15809
15817
|
}
|
|
@@ -17118,6 +17126,15 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
17118
17126
|
return EventsRoutes;
|
|
17119
17127
|
}());
|
|
17120
17128
|
|
|
17129
|
+
var RecordingsRoute = /** @class */ (function () {
|
|
17130
|
+
function RecordingsRoute() {
|
|
17131
|
+
}
|
|
17132
|
+
RecordingsRoute.routes = {
|
|
17133
|
+
update: { url: '/events/{event_id}/recording/{recording_id}', method: HTTP_METHODS.PUT },
|
|
17134
|
+
};
|
|
17135
|
+
return RecordingsRoute;
|
|
17136
|
+
}());
|
|
17137
|
+
|
|
17121
17138
|
var Events = /** @class */ (function () {
|
|
17122
17139
|
function Events() {
|
|
17123
17140
|
}
|
|
@@ -17432,6 +17449,20 @@ var Events = /** @class */ (function () {
|
|
|
17432
17449
|
Events.acceptInvite = function (event_id, token, params) {
|
|
17433
17450
|
return Requests.processRoute(EventsRoutes.routes.acceptInvite, { token: token }, { event_id: event_id }, params);
|
|
17434
17451
|
};
|
|
17452
|
+
/**
|
|
17453
|
+
* Update a recording related to an event.
|
|
17454
|
+
*
|
|
17455
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
17456
|
+
*
|
|
17457
|
+
* @param event_id The id of the event to update.
|
|
17458
|
+
* @param recording_id The id of the recording to update.
|
|
17459
|
+
* @param data The data to update.
|
|
17460
|
+
*
|
|
17461
|
+
* @returns promise
|
|
17462
|
+
*/
|
|
17463
|
+
Events.updateRecording = function (event_id, recording_id, data, params) {
|
|
17464
|
+
return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id: recording_id }, params);
|
|
17465
|
+
};
|
|
17435
17466
|
return Events;
|
|
17436
17467
|
}());
|
|
17437
17468
|
|