glitch-javascript-sdk 0.1.7 → 0.1.9
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 +119 -52
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Competitions.d.ts +58 -22
- package/dist/esm/constants/VenueTypes.d.ts +16 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +119 -52
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +76 -22
- package/package.json +2 -2
- package/src/api/Competitions.ts +112 -49
- package/src/api/Events.ts +11 -11
- package/src/api/Teams.ts +1 -1
- package/src/constants/VenueTypes.ts +19 -0
- package/src/index.ts +3 -1
|
@@ -119,25 +119,49 @@ declare class Competitions {
|
|
|
119
119
|
*/
|
|
120
120
|
static autoGenerateUserBrackets<T>(competition_id: string): AxiosPromise<Response<T>>;
|
|
121
121
|
/**
|
|
122
|
-
|
|
122
|
+
* Updates the main image for the event using a File object.
|
|
123
|
+
*
|
|
124
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
125
|
+
*
|
|
126
|
+
* @param file The file object to upload.
|
|
127
|
+
* @param data Any additional data to pass along to the upload.
|
|
128
|
+
*
|
|
129
|
+
* @returns promise
|
|
130
|
+
*/
|
|
131
|
+
static uploadCompetitionMainImageFile<T>(competition_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
|
|
132
|
+
/**
|
|
133
|
+
* Updates the main image for the competition using a Blob.
|
|
123
134
|
*
|
|
124
135
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
125
136
|
*
|
|
126
|
-
* @param
|
|
127
|
-
* @param
|
|
137
|
+
* @param blob The blob to upload.
|
|
138
|
+
* @param data Any additional data to pass along to the upload
|
|
139
|
+
*
|
|
128
140
|
* @returns promise
|
|
129
141
|
*/
|
|
130
|
-
static
|
|
142
|
+
static uploadCompetitionMainImageBlob<T>(competition_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
131
143
|
/**
|
|
132
|
-
*
|
|
144
|
+
* Updates the banner image for the competition using a File object.
|
|
133
145
|
*
|
|
134
146
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
135
147
|
*
|
|
136
|
-
* @param
|
|
137
|
-
* @param
|
|
148
|
+
* @param file The file object to upload.
|
|
149
|
+
* @param data Any additional data to pass along to the upload.
|
|
150
|
+
*
|
|
138
151
|
* @returns promise
|
|
139
152
|
*/
|
|
140
|
-
static
|
|
153
|
+
static uploadCompetitionBannerImageFile<T>(competition_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
|
|
154
|
+
/**
|
|
155
|
+
* Updates the banner image for the competition using a Blob.
|
|
156
|
+
*
|
|
157
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
158
|
+
*
|
|
159
|
+
* @param blob The blob to upload.
|
|
160
|
+
* @param data Any additional data to pass along to the upload
|
|
161
|
+
*
|
|
162
|
+
* @returns promise
|
|
163
|
+
*/
|
|
164
|
+
static uploadCompetitionsBannerImageBlob<T>(competition_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
141
165
|
/**
|
|
142
166
|
* Invites
|
|
143
167
|
*
|
|
@@ -185,7 +209,7 @@ declare class Competitions {
|
|
|
185
209
|
* @param round_id
|
|
186
210
|
* @returns promise
|
|
187
211
|
*/
|
|
188
|
-
static
|
|
212
|
+
static createBracjet<T>(competition_id: string, round_id: number, data?: object): AxiosPromise<Response<T>>;
|
|
189
213
|
/**
|
|
190
214
|
* Show round bracket
|
|
191
215
|
*
|
|
@@ -207,7 +231,7 @@ declare class Competitions {
|
|
|
207
231
|
* @param bracket_id
|
|
208
232
|
* @returns promise
|
|
209
233
|
*/
|
|
210
|
-
static updateBracket<T>(competition_id: string, round_id: number, bracket_id: number): AxiosPromise<Response<T>>;
|
|
234
|
+
static updateBracket<T>(competition_id: string, round_id: number, bracket_id: number, data?: object): AxiosPromise<Response<T>>;
|
|
211
235
|
/**
|
|
212
236
|
* Delete bracket
|
|
213
237
|
*
|
|
@@ -236,7 +260,7 @@ declare class Competitions {
|
|
|
236
260
|
* @param competition_id
|
|
237
261
|
* @returns promise
|
|
238
262
|
*/
|
|
239
|
-
static
|
|
263
|
+
static createRound<T>(competition_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
240
264
|
/**
|
|
241
265
|
* Retrieve the information for a single round.
|
|
242
266
|
*
|
|
@@ -256,7 +280,7 @@ declare class Competitions {
|
|
|
256
280
|
* @param round_id
|
|
257
281
|
* @returns promise
|
|
258
282
|
*/
|
|
259
|
-
static updateRound<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
|
|
283
|
+
static updateRound<T>(competition_id: string, round_id: number, data?: object): AxiosPromise<Response<T>>;
|
|
260
284
|
/**
|
|
261
285
|
* Deletes the round for the competition.
|
|
262
286
|
*
|
|
@@ -284,7 +308,7 @@ declare class Competitions {
|
|
|
284
308
|
* @param competition_id
|
|
285
309
|
* @returns promise
|
|
286
310
|
*/
|
|
287
|
-
static
|
|
311
|
+
static createCompetitionTeam<T>(competition_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
288
312
|
/**
|
|
289
313
|
* Display the contents of a single team associated with the competition.
|
|
290
314
|
*
|
|
@@ -304,7 +328,7 @@ declare class Competitions {
|
|
|
304
328
|
* @param team_id
|
|
305
329
|
* @returns promise
|
|
306
330
|
*/
|
|
307
|
-
static updateTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
|
|
331
|
+
static updateTeam<T>(competition_id: string, team_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
308
332
|
/**
|
|
309
333
|
* Removes the team from the competition.
|
|
310
334
|
*
|
|
@@ -332,7 +356,7 @@ declare class Competitions {
|
|
|
332
356
|
* @param competition_id
|
|
333
357
|
* @returns promise
|
|
334
358
|
*/
|
|
335
|
-
static
|
|
359
|
+
static createCompetitionUser<T>(competition_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
336
360
|
/**
|
|
337
361
|
* Show a single user by its ID.
|
|
338
362
|
*
|
|
@@ -352,7 +376,7 @@ declare class Competitions {
|
|
|
352
376
|
* @param user_id
|
|
353
377
|
* @returns promise
|
|
354
378
|
*/
|
|
355
|
-
static updateCompetitionUser<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
|
|
379
|
+
static updateCompetitionUser<T>(competition_id: string, user_id: string, data?: object): AxiosPromise<Response<T>>;
|
|
356
380
|
/**
|
|
357
381
|
* Remove the associated user from the competition.
|
|
358
382
|
*
|
|
@@ -380,7 +404,7 @@ declare class Competitions {
|
|
|
380
404
|
* @param competition_id
|
|
381
405
|
* @returns promise
|
|
382
406
|
*/
|
|
383
|
-
static
|
|
407
|
+
static createVenue<T>(competition_id: string, data: object): AxiosPromise<Response<T>>;
|
|
384
408
|
/**
|
|
385
409
|
* Show a single venue by its ID.
|
|
386
410
|
*
|
|
@@ -400,7 +424,7 @@ declare class Competitions {
|
|
|
400
424
|
* @param venue_id
|
|
401
425
|
* @returns promise
|
|
402
426
|
*/
|
|
403
|
-
static updateVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
|
|
427
|
+
static updateVenue<T>(competition_id: string, venue_id: string, data: object): AxiosPromise<Response<T>>;
|
|
404
428
|
/**
|
|
405
429
|
* Deletes the venue from the competition.
|
|
406
430
|
*
|
|
@@ -412,14 +436,26 @@ declare class Competitions {
|
|
|
412
436
|
*/
|
|
413
437
|
static destroyVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
|
|
414
438
|
/**
|
|
415
|
-
|
|
439
|
+
* Updates the main image for the venue using a File object.
|
|
440
|
+
*
|
|
441
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
442
|
+
*
|
|
443
|
+
* @param file The file object to upload.
|
|
444
|
+
* @param data Any additional data to pass along to the upload.
|
|
445
|
+
*
|
|
446
|
+
* @returns promise
|
|
447
|
+
*/
|
|
448
|
+
static uploadVenueMainImageFile<T>(competition_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
|
|
449
|
+
/**
|
|
450
|
+
* Updates the main image for the venue using a Blob.
|
|
416
451
|
*
|
|
417
452
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
418
453
|
*
|
|
419
|
-
* @param
|
|
420
|
-
* @param
|
|
454
|
+
* @param blob The blob to upload.
|
|
455
|
+
* @param data Any additional data to pass along to the upload
|
|
456
|
+
*
|
|
421
457
|
* @returns promise
|
|
422
458
|
*/
|
|
423
|
-
static
|
|
459
|
+
static uploadVenueMainImageBlob<T>(competition_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
|
|
424
460
|
}
|
|
425
461
|
export default Competitions;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select what kind of venue this is for the event.
|
|
3
|
+
* @readonly
|
|
4
|
+
* @enum {integer}
|
|
5
|
+
*/
|
|
6
|
+
export declare enum VenueType {
|
|
7
|
+
/** @member {integer} */
|
|
8
|
+
/** A virtual only event. */
|
|
9
|
+
VIRTUAL = 1,
|
|
10
|
+
/** @member {integer} */
|
|
11
|
+
/** An in person only event (IRL). */
|
|
12
|
+
IN_PERSON = 2,
|
|
13
|
+
/** @member {integer} */
|
|
14
|
+
/** Combination of IRL and in-person. */
|
|
15
|
+
HYBRID = 3
|
|
16
|
+
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { TeamJoinProcess } from "./constants/TeamJoinProcess";
|
|
|
16
16
|
import TicketTypes from "./constants/TicketTypes";
|
|
17
17
|
import { TicketUsageTypes } from "./constants/TicketUsageTypes";
|
|
18
18
|
import { TicketVisibility } from "./constants/TicketVisbility";
|
|
19
|
+
import { VenueType } from "./constants/VenueTypes";
|
|
19
20
|
declare class Glitch {
|
|
20
21
|
static config: {
|
|
21
22
|
Config: typeof Config;
|
|
@@ -68,6 +69,7 @@ declare class Glitch {
|
|
|
68
69
|
TicketTypes: typeof TicketTypes;
|
|
69
70
|
TicketUsageTypes: typeof TicketUsageTypes;
|
|
70
71
|
TicketVisibility: typeof TicketVisibility;
|
|
72
|
+
VenueType: typeof VenueType;
|
|
71
73
|
};
|
|
72
74
|
}
|
|
73
75
|
export default Glitch;
|
package/dist/esm/index.js
CHANGED
|
@@ -30282,28 +30282,60 @@ var Competitions = /** @class */ (function () {
|
|
|
30282
30282
|
return Requests.processRoute(CompetitionRoutes.routes.autoGenerateUserBrackets, { competition_id: competition_id });
|
|
30283
30283
|
};
|
|
30284
30284
|
/**
|
|
30285
|
-
|
|
30285
|
+
* Updates the main image for the event using a File object.
|
|
30286
|
+
*
|
|
30287
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
30288
|
+
*
|
|
30289
|
+
* @param file The file object to upload.
|
|
30290
|
+
* @param data Any additional data to pass along to the upload.
|
|
30291
|
+
*
|
|
30292
|
+
* @returns promise
|
|
30293
|
+
*/
|
|
30294
|
+
Competitions.uploadCompetitionMainImageFile = function (competition_id, file, data) {
|
|
30295
|
+
var url = CompetitionRoutes.routes.uploadMainImage.url.replace('{competition_id}', competition_id);
|
|
30296
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
30297
|
+
};
|
|
30298
|
+
/**
|
|
30299
|
+
* Updates the main image for the competition using a Blob.
|
|
30286
30300
|
*
|
|
30287
30301
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadMainImage
|
|
30288
30302
|
*
|
|
30289
|
-
* @param
|
|
30290
|
-
* @param
|
|
30303
|
+
* @param blob The blob to upload.
|
|
30304
|
+
* @param data Any additional data to pass along to the upload
|
|
30305
|
+
*
|
|
30291
30306
|
* @returns promise
|
|
30292
30307
|
*/
|
|
30293
|
-
Competitions.
|
|
30294
|
-
|
|
30308
|
+
Competitions.uploadCompetitionMainImageBlob = function (competition_id, blob, data) {
|
|
30309
|
+
var url = CompetitionRoutes.routes.uploadMainImage.url.replace('{competition_id}', competition_id);
|
|
30310
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
30295
30311
|
};
|
|
30296
30312
|
/**
|
|
30297
|
-
*
|
|
30313
|
+
* Updates the banner image for the competition using a File object.
|
|
30298
30314
|
*
|
|
30299
30315
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
30300
30316
|
*
|
|
30301
|
-
* @param
|
|
30302
|
-
* @param
|
|
30317
|
+
* @param file The file object to upload.
|
|
30318
|
+
* @param data Any additional data to pass along to the upload.
|
|
30319
|
+
*
|
|
30303
30320
|
* @returns promise
|
|
30304
30321
|
*/
|
|
30305
|
-
Competitions.
|
|
30306
|
-
|
|
30322
|
+
Competitions.uploadCompetitionBannerImageFile = function (competition_id, file, data) {
|
|
30323
|
+
var url = CompetitionRoutes.routes.uploadBannerImage.url.replace('{competition_id}', competition_id);
|
|
30324
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
30325
|
+
};
|
|
30326
|
+
/**
|
|
30327
|
+
* Updates the banner image for the competition using a Blob.
|
|
30328
|
+
*
|
|
30329
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadBannerImage
|
|
30330
|
+
*
|
|
30331
|
+
* @param blob The blob to upload.
|
|
30332
|
+
* @param data Any additional data to pass along to the upload
|
|
30333
|
+
*
|
|
30334
|
+
* @returns promise
|
|
30335
|
+
*/
|
|
30336
|
+
Competitions.uploadCompetitionsBannerImageBlob = function (competition_id, blob, data) {
|
|
30337
|
+
var url = CompetitionRoutes.routes.uploadBannerImage.url.replace('{competition_id}', competition_id);
|
|
30338
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
30307
30339
|
};
|
|
30308
30340
|
/**
|
|
30309
30341
|
* Invites
|
|
@@ -30349,7 +30381,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30349
30381
|
* @returns promise
|
|
30350
30382
|
*/
|
|
30351
30383
|
Competitions.brackets = function (competition_id, round_id) {
|
|
30352
|
-
return Requests.processRoute(CompetitionRoutes.routes.brackets, {
|
|
30384
|
+
return Requests.processRoute(CompetitionRoutes.routes.brackets, {}, { round_id: round_id, competition_id: competition_id });
|
|
30353
30385
|
};
|
|
30354
30386
|
/**
|
|
30355
30387
|
* Store round brackets
|
|
@@ -30360,8 +30392,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30360
30392
|
* @param round_id
|
|
30361
30393
|
* @returns promise
|
|
30362
30394
|
*/
|
|
30363
|
-
Competitions.
|
|
30364
|
-
return Requests.processRoute(CompetitionRoutes.routes.bracketStore,
|
|
30395
|
+
Competitions.createBracjet = function (competition_id, round_id, data) {
|
|
30396
|
+
return Requests.processRoute(CompetitionRoutes.routes.bracketStore, data, { round_id: round_id, competition_id: competition_id });
|
|
30365
30397
|
};
|
|
30366
30398
|
/**
|
|
30367
30399
|
* Show round bracket
|
|
@@ -30374,7 +30406,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30374
30406
|
* @returns promise
|
|
30375
30407
|
*/
|
|
30376
30408
|
Competitions.showBracket = function (competition_id, round_id, bracket_id) {
|
|
30377
|
-
return Requests.processRoute(CompetitionRoutes.routes.showBracket, {
|
|
30409
|
+
return Requests.processRoute(CompetitionRoutes.routes.showBracket, {}, { round_id: round_id, bracket_id: bracket_id, competition_id: competition_id });
|
|
30378
30410
|
};
|
|
30379
30411
|
/**
|
|
30380
30412
|
* Update bracket
|
|
@@ -30386,8 +30418,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30386
30418
|
* @param bracket_id
|
|
30387
30419
|
* @returns promise
|
|
30388
30420
|
*/
|
|
30389
|
-
Competitions.updateBracket = function (competition_id, round_id, bracket_id) {
|
|
30390
|
-
return Requests.processRoute(CompetitionRoutes.routes.updateBracket,
|
|
30421
|
+
Competitions.updateBracket = function (competition_id, round_id, bracket_id, data) {
|
|
30422
|
+
return Requests.processRoute(CompetitionRoutes.routes.updateBracket, data, { round_id: round_id, bracket_id: bracket_id, competition_id: competition_id });
|
|
30391
30423
|
};
|
|
30392
30424
|
/**
|
|
30393
30425
|
* Delete bracket
|
|
@@ -30400,7 +30432,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30400
30432
|
* @returns promise
|
|
30401
30433
|
*/
|
|
30402
30434
|
Competitions.destroyBracket = function (competition_id, round_id, bracket_id) {
|
|
30403
|
-
return Requests.processRoute(CompetitionRoutes.routes.destroyBracket, {
|
|
30435
|
+
return Requests.processRoute(CompetitionRoutes.routes.destroyBracket, {}, { round_id: round_id, bracket_id: bracket_id, competition_id: competition_id });
|
|
30404
30436
|
};
|
|
30405
30437
|
/**
|
|
30406
30438
|
* List round
|
|
@@ -30411,7 +30443,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30411
30443
|
* @returns promise
|
|
30412
30444
|
*/
|
|
30413
30445
|
Competitions.rounds = function (competition_id) {
|
|
30414
|
-
return Requests.processRoute(CompetitionRoutes.routes.rounds, { competition_id: competition_id });
|
|
30446
|
+
return Requests.processRoute(CompetitionRoutes.routes.rounds, {}, { competition_id: competition_id });
|
|
30415
30447
|
};
|
|
30416
30448
|
/**
|
|
30417
30449
|
* Create a new round for competition
|
|
@@ -30421,8 +30453,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30421
30453
|
* @param competition_id
|
|
30422
30454
|
* @returns promise
|
|
30423
30455
|
*/
|
|
30424
|
-
Competitions.
|
|
30425
|
-
return Requests.processRoute(CompetitionRoutes.routes.roundStore, { competition_id: competition_id });
|
|
30456
|
+
Competitions.createRound = function (competition_id, data) {
|
|
30457
|
+
return Requests.processRoute(CompetitionRoutes.routes.roundStore, data, { competition_id: competition_id });
|
|
30426
30458
|
};
|
|
30427
30459
|
/**
|
|
30428
30460
|
* Retrieve the information for a single round.
|
|
@@ -30434,7 +30466,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30434
30466
|
* @returns promise
|
|
30435
30467
|
*/
|
|
30436
30468
|
Competitions.showRound = function (competition_id, round_id) {
|
|
30437
|
-
return Requests.processRoute(CompetitionRoutes.routes.showRound, {
|
|
30469
|
+
return Requests.processRoute(CompetitionRoutes.routes.showRound, {}, { round_id: round_id, competition_id: competition_id });
|
|
30438
30470
|
};
|
|
30439
30471
|
/**
|
|
30440
30472
|
* Updating resource in storage with new information.
|
|
@@ -30445,8 +30477,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30445
30477
|
* @param round_id
|
|
30446
30478
|
* @returns promise
|
|
30447
30479
|
*/
|
|
30448
|
-
Competitions.updateRound = function (competition_id, round_id) {
|
|
30449
|
-
return Requests.processRoute(CompetitionRoutes.routes.updateBracket,
|
|
30480
|
+
Competitions.updateRound = function (competition_id, round_id, data) {
|
|
30481
|
+
return Requests.processRoute(CompetitionRoutes.routes.updateBracket, data, { round_id: round_id, competition_id: competition_id });
|
|
30450
30482
|
};
|
|
30451
30483
|
/**
|
|
30452
30484
|
* Deletes the round for the competition.
|
|
@@ -30458,7 +30490,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30458
30490
|
* @returns promise
|
|
30459
30491
|
*/
|
|
30460
30492
|
Competitions.destroyRound = function (competition_id, round_id) {
|
|
30461
|
-
return Requests.processRoute(CompetitionRoutes.routes.destroyRound, {
|
|
30493
|
+
return Requests.processRoute(CompetitionRoutes.routes.destroyRound, {}, { round_id: round_id, competition_id: competition_id });
|
|
30462
30494
|
};
|
|
30463
30495
|
/**
|
|
30464
30496
|
* Retrieve a list of teams associated with the competition.
|
|
@@ -30469,7 +30501,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30469
30501
|
* @returns promise
|
|
30470
30502
|
*/
|
|
30471
30503
|
Competitions.team = function (competition_id) {
|
|
30472
|
-
return Requests.processRoute(CompetitionRoutes.routes.team, { competition_id: competition_id });
|
|
30504
|
+
return Requests.processRoute(CompetitionRoutes.routes.team, {}, { competition_id: competition_id });
|
|
30473
30505
|
};
|
|
30474
30506
|
/**
|
|
30475
30507
|
* Associate a new team with the competition.
|
|
@@ -30479,8 +30511,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30479
30511
|
* @param competition_id
|
|
30480
30512
|
* @returns promise
|
|
30481
30513
|
*/
|
|
30482
|
-
Competitions.
|
|
30483
|
-
return Requests.processRoute(CompetitionRoutes.routes.teamStore, { competition_id: competition_id });
|
|
30514
|
+
Competitions.createCompetitionTeam = function (competition_id, data) {
|
|
30515
|
+
return Requests.processRoute(CompetitionRoutes.routes.teamStore, data, { competition_id: competition_id });
|
|
30484
30516
|
};
|
|
30485
30517
|
/**
|
|
30486
30518
|
* Display the contents of a single team associated with the competition.
|
|
@@ -30503,8 +30535,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30503
30535
|
* @param team_id
|
|
30504
30536
|
* @returns promise
|
|
30505
30537
|
*/
|
|
30506
|
-
Competitions.updateTeam = function (competition_id, team_id) {
|
|
30507
|
-
return Requests.processRoute(CompetitionRoutes.routes.updateTeam,
|
|
30538
|
+
Competitions.updateTeam = function (competition_id, team_id, data) {
|
|
30539
|
+
return Requests.processRoute(CompetitionRoutes.routes.updateTeam, data, { team_id: team_id, competition_id: competition_id });
|
|
30508
30540
|
};
|
|
30509
30541
|
/**
|
|
30510
30542
|
* Removes the team from the competition.
|
|
@@ -30516,7 +30548,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30516
30548
|
* @returns promise
|
|
30517
30549
|
*/
|
|
30518
30550
|
Competitions.destroyTeam = function (competition_id, team_id) {
|
|
30519
|
-
return Requests.processRoute(CompetitionRoutes.routes.destroyTeam, {
|
|
30551
|
+
return Requests.processRoute(CompetitionRoutes.routes.destroyTeam, {}, { team_id: team_id, competition_id: competition_id });
|
|
30520
30552
|
};
|
|
30521
30553
|
/**
|
|
30522
30554
|
* List all the users associated with a competition.
|
|
@@ -30527,7 +30559,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30527
30559
|
* @returns promise
|
|
30528
30560
|
*/
|
|
30529
30561
|
Competitions.users = function (competition_id) {
|
|
30530
|
-
return Requests.processRoute(CompetitionRoutes.routes.users, { competition_id: competition_id });
|
|
30562
|
+
return Requests.processRoute(CompetitionRoutes.routes.users, {}, { competition_id: competition_id });
|
|
30531
30563
|
};
|
|
30532
30564
|
/**
|
|
30533
30565
|
* Associate a new users with the competition.
|
|
@@ -30537,8 +30569,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30537
30569
|
* @param competition_id
|
|
30538
30570
|
* @returns promise
|
|
30539
30571
|
*/
|
|
30540
|
-
Competitions.
|
|
30541
|
-
return Requests.processRoute(CompetitionRoutes.routes.competitionUser, { competition_id: competition_id });
|
|
30572
|
+
Competitions.createCompetitionUser = function (competition_id, data) {
|
|
30573
|
+
return Requests.processRoute(CompetitionRoutes.routes.competitionUser, {}, { competition_id: competition_id });
|
|
30542
30574
|
};
|
|
30543
30575
|
/**
|
|
30544
30576
|
* Show a single user by its ID.
|
|
@@ -30550,7 +30582,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30550
30582
|
* @returns promise
|
|
30551
30583
|
*/
|
|
30552
30584
|
Competitions.showCompetitionUser = function (competition_id, user_id) {
|
|
30553
|
-
return Requests.processRoute(CompetitionRoutes.routes.showCompetitionUser, {
|
|
30585
|
+
return Requests.processRoute(CompetitionRoutes.routes.showCompetitionUser, {}, { user_id: user_id, competition_id: competition_id });
|
|
30554
30586
|
};
|
|
30555
30587
|
/**
|
|
30556
30588
|
* Update the user associated with competition.
|
|
@@ -30561,8 +30593,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30561
30593
|
* @param user_id
|
|
30562
30594
|
* @returns promise
|
|
30563
30595
|
*/
|
|
30564
|
-
Competitions.updateCompetitionUser = function (competition_id, user_id) {
|
|
30565
|
-
return Requests.processRoute(CompetitionRoutes.routes.updateCompetitionUser,
|
|
30596
|
+
Competitions.updateCompetitionUser = function (competition_id, user_id, data) {
|
|
30597
|
+
return Requests.processRoute(CompetitionRoutes.routes.updateCompetitionUser, data, { user_id: user_id, competition_id: competition_id });
|
|
30566
30598
|
};
|
|
30567
30599
|
/**
|
|
30568
30600
|
* Remove the associated user from the competition.
|
|
@@ -30574,7 +30606,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30574
30606
|
* @returns promise
|
|
30575
30607
|
*/
|
|
30576
30608
|
Competitions.destroyCompetitionUser = function (competition_id, user_id) {
|
|
30577
|
-
return Requests.processRoute(CompetitionRoutes.routes.destroyCompetitionUser, {
|
|
30609
|
+
return Requests.processRoute(CompetitionRoutes.routes.destroyCompetitionUser, {}, { user_id: user_id, competition_id: competition_id });
|
|
30578
30610
|
};
|
|
30579
30611
|
/**
|
|
30580
30612
|
* List all the venues associated with a competition.
|
|
@@ -30585,7 +30617,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30585
30617
|
* @returns promise
|
|
30586
30618
|
*/
|
|
30587
30619
|
Competitions.venues = function (competition_id) {
|
|
30588
|
-
return Requests.processRoute(CompetitionRoutes.routes.venues, { competition_id: competition_id });
|
|
30620
|
+
return Requests.processRoute(CompetitionRoutes.routes.venues, {}, { competition_id: competition_id });
|
|
30589
30621
|
};
|
|
30590
30622
|
/**
|
|
30591
30623
|
* Creating a new venue.
|
|
@@ -30595,8 +30627,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30595
30627
|
* @param competition_id
|
|
30596
30628
|
* @returns promise
|
|
30597
30629
|
*/
|
|
30598
|
-
Competitions.
|
|
30599
|
-
return Requests.processRoute(CompetitionRoutes.routes.newVenue, { competition_id: competition_id });
|
|
30630
|
+
Competitions.createVenue = function (competition_id, data) {
|
|
30631
|
+
return Requests.processRoute(CompetitionRoutes.routes.newVenue, data, { competition_id: competition_id });
|
|
30600
30632
|
};
|
|
30601
30633
|
/**
|
|
30602
30634
|
* Show a single venue by its ID.
|
|
@@ -30608,7 +30640,7 @@ var Competitions = /** @class */ (function () {
|
|
|
30608
30640
|
* @returns promise
|
|
30609
30641
|
*/
|
|
30610
30642
|
Competitions.showVenue = function (competition_id, venue_id) {
|
|
30611
|
-
return Requests.processRoute(CompetitionRoutes.routes.showVenue, {
|
|
30643
|
+
return Requests.processRoute(CompetitionRoutes.routes.showVenue, {}, { venue_id: venue_id, competition_id: competition_id });
|
|
30612
30644
|
};
|
|
30613
30645
|
/**
|
|
30614
30646
|
* Update the venue.
|
|
@@ -30619,8 +30651,8 @@ var Competitions = /** @class */ (function () {
|
|
|
30619
30651
|
* @param venue_id
|
|
30620
30652
|
* @returns promise
|
|
30621
30653
|
*/
|
|
30622
|
-
Competitions.updateVenue = function (competition_id, venue_id) {
|
|
30623
|
-
return Requests.processRoute(CompetitionRoutes.routes.updateVenue, { competition_id: competition_id
|
|
30654
|
+
Competitions.updateVenue = function (competition_id, venue_id, data) {
|
|
30655
|
+
return Requests.processRoute(CompetitionRoutes.routes.updateVenue, data, { competition_id: competition_id, venue_id: venue_id });
|
|
30624
30656
|
};
|
|
30625
30657
|
/**
|
|
30626
30658
|
* Deletes the venue from the competition.
|
|
@@ -30632,19 +30664,35 @@ var Competitions = /** @class */ (function () {
|
|
|
30632
30664
|
* @returns promise
|
|
30633
30665
|
*/
|
|
30634
30666
|
Competitions.destroyVenue = function (competition_id, venue_id) {
|
|
30635
|
-
return Requests.processRoute(CompetitionRoutes.routes.destroyVenue, { competition_id: competition_id
|
|
30667
|
+
return Requests.processRoute(CompetitionRoutes.routes.destroyVenue, {}, { competition_id: competition_id, venue_id: venue_id });
|
|
30668
|
+
};
|
|
30669
|
+
/**
|
|
30670
|
+
* Updates the main image for the venue using a File object.
|
|
30671
|
+
*
|
|
30672
|
+
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
30673
|
+
*
|
|
30674
|
+
* @param file The file object to upload.
|
|
30675
|
+
* @param data Any additional data to pass along to the upload.
|
|
30676
|
+
*
|
|
30677
|
+
* @returns promise
|
|
30678
|
+
*/
|
|
30679
|
+
Competitions.uploadVenueMainImageFile = function (competition_id, file, data) {
|
|
30680
|
+
var url = CompetitionRoutes.routes.uploadVenueMainImage.url.replace('{competition_id}', competition_id);
|
|
30681
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
30636
30682
|
};
|
|
30637
30683
|
/**
|
|
30638
|
-
*
|
|
30684
|
+
* Updates the main image for the venue using a Blob.
|
|
30639
30685
|
*
|
|
30640
30686
|
* @see https://api.glitch.fun/api/documentation#/Competitions%20Route/uploadVenueMainImage
|
|
30641
30687
|
*
|
|
30642
|
-
* @param
|
|
30643
|
-
* @param
|
|
30688
|
+
* @param blob The blob to upload.
|
|
30689
|
+
* @param data Any additional data to pass along to the upload
|
|
30690
|
+
*
|
|
30644
30691
|
* @returns promise
|
|
30645
30692
|
*/
|
|
30646
|
-
Competitions.
|
|
30647
|
-
|
|
30693
|
+
Competitions.uploadVenueMainImageBlob = function (competition_id, blob, data) {
|
|
30694
|
+
var url = CompetitionRoutes.routes.uploadVenueMainImage.url.replace('{competition_id}', competition_id);
|
|
30695
|
+
return Requests.uploadBlob(url, 'image', blob, data);
|
|
30648
30696
|
};
|
|
30649
30697
|
return Competitions;
|
|
30650
30698
|
}());
|
|
@@ -31275,8 +31323,8 @@ var Teams = /** @class */ (function () {
|
|
|
31275
31323
|
* @returns promise
|
|
31276
31324
|
*/
|
|
31277
31325
|
Teams.uploadBannerImageFile = function (team_id, file, data) {
|
|
31278
|
-
TeamsRoute.routes.uploadBannerImage.url.replace('{team_id}', team_id);
|
|
31279
|
-
return Requests.uploadFile(
|
|
31326
|
+
var url = TeamsRoute.routes.uploadBannerImage.url.replace('{team_id}', team_id);
|
|
31327
|
+
return Requests.uploadFile(url, 'image', file, data);
|
|
31280
31328
|
};
|
|
31281
31329
|
/**
|
|
31282
31330
|
* Updates the banner image for the team using a Blob.
|
|
@@ -31732,6 +31780,24 @@ var TicketVisibility;
|
|
|
31732
31780
|
TicketVisibility[TicketVisibility["SCHEDULED"] = 4] = "SCHEDULED";
|
|
31733
31781
|
})(TicketVisibility || (TicketVisibility = {}));
|
|
31734
31782
|
|
|
31783
|
+
/**
|
|
31784
|
+
* Select what kind of venue this is for the event.
|
|
31785
|
+
* @readonly
|
|
31786
|
+
* @enum {integer}
|
|
31787
|
+
*/
|
|
31788
|
+
var VenueType;
|
|
31789
|
+
(function (VenueType) {
|
|
31790
|
+
/** @member {integer} */
|
|
31791
|
+
/** A virtual only event. */
|
|
31792
|
+
VenueType[VenueType["VIRTUAL"] = 1] = "VIRTUAL";
|
|
31793
|
+
/** @member {integer} */
|
|
31794
|
+
/** An in person only event (IRL). */
|
|
31795
|
+
VenueType[VenueType["IN_PERSON"] = 2] = "IN_PERSON";
|
|
31796
|
+
/** @member {integer} */
|
|
31797
|
+
/** Combination of IRL and in-person. */
|
|
31798
|
+
VenueType[VenueType["HYBRID"] = 3] = "HYBRID";
|
|
31799
|
+
})(VenueType || (VenueType = {}));
|
|
31800
|
+
|
|
31735
31801
|
//Configuration
|
|
31736
31802
|
var Glitch = /** @class */ (function () {
|
|
31737
31803
|
function Glitch() {
|
|
@@ -31763,7 +31829,8 @@ var Glitch = /** @class */ (function () {
|
|
|
31763
31829
|
TeamJoinProcess: TeamJoinProcess,
|
|
31764
31830
|
TicketTypes: TicketTypes$1,
|
|
31765
31831
|
TicketUsageTypes: TicketUsageTypes,
|
|
31766
|
-
TicketVisibility: TicketVisibility
|
|
31832
|
+
TicketVisibility: TicketVisibility,
|
|
31833
|
+
VenueType: VenueType
|
|
31767
31834
|
};
|
|
31768
31835
|
return Glitch;
|
|
31769
31836
|
}());
|