glitch-javascript-sdk 0.2.5 → 0.2.7

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/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { AxiosPromise } from 'axios';
9
9
  declare class Config {
10
10
  private static _baseUrl;
11
11
  private static _authToken;
12
+ private static _community;
12
13
  private static _baseUrlLocked;
13
14
  /**
14
15
  * Set the configuration
@@ -30,6 +31,12 @@ declare class Config {
30
31
  * @param authToken The JWT
31
32
  */
32
33
  static setAuthToken(authToken: string): void;
34
+ /**
35
+ * Set the community to be associated with this config through
36
+ *
37
+ * @param community The object of the community
38
+ */
39
+ static setCommunity(community: Record<string, any>): void;
33
40
  /**
34
41
  * Gets base url
35
42
  */
@@ -38,6 +45,10 @@ declare class Config {
38
45
  * Gets auth token
39
46
  */
40
47
  static get authToken(): string;
48
+ /**
49
+ * Gets the community currently associated
50
+ */
51
+ static get getCommunity(): object;
41
52
  }
42
53
 
43
54
  interface Response<T> {
@@ -117,7 +128,7 @@ declare class Competitions {
117
128
  *
118
129
  * @returns promise
119
130
  */
120
- static list<T>(): AxiosPromise<Response<T>>;
131
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
121
132
  /**
122
133
  * Create a new competition
123
134
  *
@@ -127,7 +138,7 @@ declare class Competitions {
127
138
  *
128
139
  * @returns Promise
129
140
  */
130
- static create<T>(data: object): AxiosPromise<Response<T>>;
141
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
131
142
  /**
132
143
  * Update a competition
133
144
  *
@@ -138,7 +149,7 @@ declare class Competitions {
138
149
  *
139
150
  * @returns promise
140
151
  */
141
- static update<T>(competition_id: string, data: object): AxiosPromise<Response<T>>;
152
+ static update<T>(competition_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
142
153
  /**
143
154
  * Retrieve the information for a single competition.
144
155
  *
@@ -148,7 +159,7 @@ declare class Competitions {
148
159
  *
149
160
  * @returns promise
150
161
  */
151
- static view<T>(competition_id: string): AxiosPromise<Response<T>>;
162
+ static view<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
152
163
  /**
153
164
  * Deletes a competition.
154
165
  *
@@ -157,7 +168,7 @@ declare class Competitions {
157
168
  * @param competition_id The id of the competition to delete.
158
169
  * @returns promise
159
170
  */
160
- static delete<T>(competition_id: string): AxiosPromise<Response<T>>;
171
+ static delete<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
161
172
  /**
162
173
  * Add a team
163
174
  *
@@ -167,7 +178,7 @@ declare class Competitions {
167
178
  * @param team_id
168
179
  * @returns promise
169
180
  */
170
- static addTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
181
+ static addTeam<T>(competition_id: string, team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
171
182
  /**
172
183
  * Adds participant
173
184
  *
@@ -177,7 +188,7 @@ declare class Competitions {
177
188
  * @param user_id
178
189
  * @returns promise
179
190
  */
180
- static addParticipant<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
191
+ static addParticipant<T>(competition_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
181
192
  /**
182
193
  * Register a team
183
194
  *
@@ -187,7 +198,7 @@ declare class Competitions {
187
198
  * @param team_id
188
199
  * @returns promise
189
200
  */
190
- static registerTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
201
+ static registerTeam<T>(competition_id: string, team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
191
202
  /**
192
203
  * Register a user
193
204
  *
@@ -196,7 +207,7 @@ declare class Competitions {
196
207
  * @param competition_id
197
208
  * @returns promise
198
209
  */
199
- static registerUser<T>(competition_id: string): AxiosPromise<Response<T>>;
210
+ static registerUser<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
200
211
  /**
201
212
  * Sync rounds
202
213
  *
@@ -207,7 +218,7 @@ declare class Competitions {
207
218
  * @param competitors_per_bracket
208
219
  * @returns promise
209
220
  */
210
- static syncRounds<T>(competition_id: string): AxiosPromise<Response<T>>;
221
+ static syncRounds<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
211
222
  /**
212
223
  * auto generate team brackets
213
224
  *
@@ -217,7 +228,7 @@ declare class Competitions {
217
228
  * @param round_id
218
229
  * @returns promise
219
230
  */
220
- static autoGenerate<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
231
+ static autoGenerate<T>(competition_id: string, round_id: number, params?: Record<string, any>): AxiosPromise<Response<T>>;
221
232
  /**
222
233
  * auto generate user brackets
223
234
  *
@@ -226,7 +237,7 @@ declare class Competitions {
226
237
  * @param competition_id
227
238
  * @returns promise
228
239
  */
229
- static autoGenerateUserBrackets<T>(competition_id: string): AxiosPromise<Response<T>>;
240
+ static autoGenerateUserBrackets<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
230
241
  /**
231
242
  * Updates the main image for the event using a File object.
232
243
  *
@@ -237,7 +248,7 @@ declare class Competitions {
237
248
  *
238
249
  * @returns promise
239
250
  */
240
- static uploadCompetitionMainImageFile<T>(competition_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
251
+ static uploadCompetitionMainImageFile<T>(competition_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
241
252
  /**
242
253
  * Updates the main image for the competition using a Blob.
243
254
  *
@@ -248,7 +259,7 @@ declare class Competitions {
248
259
  *
249
260
  * @returns promise
250
261
  */
251
- static uploadCompetitionMainImageBlob<T>(competition_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
262
+ static uploadCompetitionMainImageBlob<T>(competition_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
252
263
  /**
253
264
  * Updates the banner image for the competition using a File object.
254
265
  *
@@ -259,7 +270,7 @@ declare class Competitions {
259
270
  *
260
271
  * @returns promise
261
272
  */
262
- static uploadCompetitionBannerImageFile<T>(competition_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
273
+ static uploadCompetitionBannerImageFile<T>(competition_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
263
274
  /**
264
275
  * Updates the banner image for the competition using a Blob.
265
276
  *
@@ -270,7 +281,7 @@ declare class Competitions {
270
281
  *
271
282
  * @returns promise
272
283
  */
273
- static uploadCompetitionsBannerImageBlob<T>(competition_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
284
+ static uploadCompetitionsBannerImageBlob<T>(competition_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
274
285
  /**
275
286
  * Invites
276
287
  *
@@ -279,7 +290,7 @@ declare class Competitions {
279
290
  * @param competition_id
280
291
  * @returns promise
281
292
  */
282
- static invites<T>(competition_id: string): AxiosPromise<Response<T>>;
293
+ static invites<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
283
294
  /**
284
295
  * Sends invite
285
296
  *
@@ -308,7 +319,7 @@ declare class Competitions {
308
319
  * @param round_id
309
320
  * @returns promise
310
321
  */
311
- static brackets<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
322
+ static brackets<T>(competition_id: string, round_id: number, params?: Record<string, any>): AxiosPromise<Response<T>>;
312
323
  /**
313
324
  * Store round brackets
314
325
  *
@@ -318,7 +329,7 @@ declare class Competitions {
318
329
  * @param round_id
319
330
  * @returns promise
320
331
  */
321
- static createBracket<T>(competition_id: string, round_id: number, data?: object): AxiosPromise<Response<T>>;
332
+ static createBracket<T>(competition_id: string, round_id: number, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
322
333
  /**
323
334
  * Show round bracket
324
335
  *
@@ -329,7 +340,7 @@ declare class Competitions {
329
340
  * @param bracket_id
330
341
  * @returns promise
331
342
  */
332
- static showBracket<T>(competition_id: string, round_id: number, bracket_id: number): AxiosPromise<Response<T>>;
343
+ static showBracket<T>(competition_id: string, round_id: number, bracket_id: number, params?: Record<string, any>): AxiosPromise<Response<T>>;
333
344
  /**
334
345
  * Update bracket
335
346
  *
@@ -340,7 +351,7 @@ declare class Competitions {
340
351
  * @param bracket_id
341
352
  * @returns promise
342
353
  */
343
- static updateBracket<T>(competition_id: string, round_id: number, bracket_id: number, data?: object): AxiosPromise<Response<T>>;
354
+ static updateBracket<T>(competition_id: string, round_id: number, bracket_id: number, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
344
355
  /**
345
356
  * Delete bracket
346
357
  *
@@ -360,7 +371,7 @@ declare class Competitions {
360
371
  * @param competition_id
361
372
  * @returns promise
362
373
  */
363
- static rounds<T>(competition_id: string): AxiosPromise<Response<T>>;
374
+ static rounds<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
364
375
  /**
365
376
  * Create a new round for competition
366
377
  *
@@ -369,7 +380,7 @@ declare class Competitions {
369
380
  * @param competition_id
370
381
  * @returns promise
371
382
  */
372
- static createRound<T>(competition_id: string, data?: object): AxiosPromise<Response<T>>;
383
+ static createRound<T>(competition_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
373
384
  /**
374
385
  * Retrieve the information for a single round.
375
386
  *
@@ -379,7 +390,7 @@ declare class Competitions {
379
390
  * @param round_id
380
391
  * @returns promise
381
392
  */
382
- static showRound<T>(competition_id: string, round_id: number): AxiosPromise<Response<T>>;
393
+ static showRound<T>(competition_id: string, round_id: number, params?: Record<string, any>): AxiosPromise<Response<T>>;
383
394
  /**
384
395
  * Updating resource in storage with new information.
385
396
  *
@@ -389,7 +400,7 @@ declare class Competitions {
389
400
  * @param round_id
390
401
  * @returns promise
391
402
  */
392
- static updateRound<T>(competition_id: string, round_id: number, data?: object): AxiosPromise<Response<T>>;
403
+ static updateRound<T>(competition_id: string, round_id: number, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
393
404
  /**
394
405
  * Deletes the round for the competition.
395
406
  *
@@ -408,7 +419,7 @@ declare class Competitions {
408
419
  * @param competition_id
409
420
  * @returns promise
410
421
  */
411
- static team<T>(competition_id: string): AxiosPromise<Response<T>>;
422
+ static team<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
412
423
  /**
413
424
  * Associate a new team with the competition.
414
425
  *
@@ -417,7 +428,7 @@ declare class Competitions {
417
428
  * @param competition_id
418
429
  * @returns promise
419
430
  */
420
- static createCompetitionTeam<T>(competition_id: string, data?: object): AxiosPromise<Response<T>>;
431
+ static createCompetitionTeam<T>(competition_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
421
432
  /**
422
433
  * Display the contents of a single team associated with the competition.
423
434
  *
@@ -427,7 +438,7 @@ declare class Competitions {
427
438
  * @param team_id The id of the team
428
439
  * @returns promise
429
440
  */
430
- static showTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
441
+ static showTeam<T>(competition_id: string, team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
431
442
  /**
432
443
  * Update the team information associated with the competition.
433
444
  *
@@ -447,7 +458,7 @@ declare class Competitions {
447
458
  * @param team_id
448
459
  * @returns promise
449
460
  */
450
- static destroyTeam<T>(competition_id: string, team_id: string): AxiosPromise<Response<T>>;
461
+ static destroyTeam<T>(competition_id: string, team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
451
462
  /**
452
463
  * List all the users associated with a competition.
453
464
  *
@@ -456,7 +467,7 @@ declare class Competitions {
456
467
  * @param competition_id
457
468
  * @returns promise
458
469
  */
459
- static users<T>(competition_id: string): AxiosPromise<Response<T>>;
470
+ static users<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
460
471
  /**
461
472
  * Associate a new users with the competition.
462
473
  *
@@ -475,7 +486,7 @@ declare class Competitions {
475
486
  * @param user_id
476
487
  * @returns promise
477
488
  */
478
- static showCompetitionUser<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
489
+ static showCompetitionUser<T>(competition_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
479
490
  /**
480
491
  * Update the user associated with competition.
481
492
  *
@@ -485,7 +496,7 @@ declare class Competitions {
485
496
  * @param user_id
486
497
  * @returns promise
487
498
  */
488
- static updateCompetitionUser<T>(competition_id: string, user_id: string, data?: object): AxiosPromise<Response<T>>;
499
+ static updateCompetitionUser<T>(competition_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
489
500
  /**
490
501
  * Remove the associated user from the competition.
491
502
  *
@@ -495,7 +506,7 @@ declare class Competitions {
495
506
  * @param user_id
496
507
  * @returns promise
497
508
  */
498
- static destroyCompetitionUser<T>(competition_id: string, user_id: string): AxiosPromise<Response<T>>;
509
+ static destroyCompetitionUser<T>(competition_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
499
510
  /**
500
511
  * List all the venues associated with a competition.
501
512
  *
@@ -504,7 +515,7 @@ declare class Competitions {
504
515
  * @param competition_id
505
516
  * @returns promise
506
517
  */
507
- static venues<T>(competition_id: string): AxiosPromise<Response<T>>;
518
+ static venues<T>(competition_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
508
519
  /**
509
520
  * Creating a new venue.
510
521
  *
@@ -513,7 +524,7 @@ declare class Competitions {
513
524
  * @param competition_id
514
525
  * @returns promise
515
526
  */
516
- static createVenue<T>(competition_id: string, data: object): AxiosPromise<Response<T>>;
527
+ static createVenue<T>(competition_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
517
528
  /**
518
529
  * Show a single venue by its ID.
519
530
  *
@@ -523,7 +534,7 @@ declare class Competitions {
523
534
  * @param venue_id
524
535
  * @returns promise
525
536
  */
526
- static showVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
537
+ static showVenue<T>(competition_id: string, venue_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
527
538
  /**
528
539
  * Update the venue.
529
540
  *
@@ -533,7 +544,7 @@ declare class Competitions {
533
544
  * @param venue_id
534
545
  * @returns promise
535
546
  */
536
- static updateVenue<T>(competition_id: string, venue_id: string, data: object): AxiosPromise<Response<T>>;
547
+ static updateVenue<T>(competition_id: string, venue_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
537
548
  /**
538
549
  * Deletes the venue from the competition.
539
550
  *
@@ -543,7 +554,7 @@ declare class Competitions {
543
554
  * @param venue_id
544
555
  * @returns promise
545
556
  */
546
- static destroyVenue<T>(competition_id: string, venue_id: string): AxiosPromise<Response<T>>;
557
+ static destroyVenue<T>(competition_id: string, venue_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
547
558
  /**
548
559
  * Updates the main image for the venue using a File object.
549
560
  *
@@ -554,7 +565,7 @@ declare class Competitions {
554
565
  *
555
566
  * @returns promise
556
567
  */
557
- static uploadVenueMainImageFile<T>(competition_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
568
+ static uploadVenueMainImageFile<T>(competition_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
558
569
  /**
559
570
  * Updates the main image for the venue using a Blob.
560
571
  *
@@ -565,7 +576,7 @@ declare class Competitions {
565
576
  *
566
577
  * @returns promise
567
578
  */
568
- static uploadVenueMainImageBlob<T>(competition_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
579
+ static uploadVenueMainImageBlob<T>(competition_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
569
580
  }
570
581
 
571
582
  declare class Communities {
@@ -576,7 +587,7 @@ declare class Communities {
576
587
  *
577
588
  * @returns promise
578
589
  */
579
- static list<T>(): AxiosPromise<Response<T>>;
590
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
580
591
  /**
581
592
  * Create a new community.
582
593
  *
@@ -586,7 +597,7 @@ declare class Communities {
586
597
  *
587
598
  * @returns Promise
588
599
  */
589
- static create<T>(data: object): AxiosPromise<Response<T>>;
600
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
590
601
  /**
591
602
  * Update a community.
592
603
  *
@@ -597,7 +608,7 @@ declare class Communities {
597
608
  *
598
609
  * @returns promise
599
610
  */
600
- static update<T>(community_id: string, data: object): AxiosPromise<Response<T>>;
611
+ static update<T>(community_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
601
612
  /**
602
613
  * Retrieve the information for a single community.
603
614
  *
@@ -607,7 +618,7 @@ declare class Communities {
607
618
  *
608
619
  * @returns promise
609
620
  */
610
- static view<T>(community_id: string): AxiosPromise<Response<T>>;
621
+ static view<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
611
622
  /**
612
623
  * Deletes a community.
613
624
  *
@@ -616,7 +627,7 @@ declare class Communities {
616
627
  * @param community_id The id of the community to delete.
617
628
  * @returns promise
618
629
  */
619
- static delete<T>(community_id: string): AxiosPromise<Response<T>>;
630
+ static delete<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
620
631
  /**
621
632
  * Updates the main image for the community using a File object.
622
633
  *
@@ -627,7 +638,7 @@ declare class Communities {
627
638
  *
628
639
  * @returns promise
629
640
  */
630
- static uploadLogoFile<T>(community_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
641
+ static uploadLogoFile<T>(community_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
631
642
  /**
632
643
  * Updates the main image for the community using a Blob.
633
644
  *
@@ -638,7 +649,7 @@ declare class Communities {
638
649
  *
639
650
  * @returns promise
640
651
  */
641
- static uploadLogoBlob<T>(community_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
652
+ static uploadLogoBlob<T>(community_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
642
653
  /**
643
654
  * Updates the banner image for the community using a File object.
644
655
  *
@@ -649,7 +660,7 @@ declare class Communities {
649
660
  *
650
661
  * @returns promise
651
662
  */
652
- static uploadBannerImageFile<T>(community_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
663
+ static uploadBannerImageFile<T>(community_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
653
664
  /**
654
665
  * Updates the banner image for the community using a Blob.
655
666
  *
@@ -660,7 +671,7 @@ declare class Communities {
660
671
  *
661
672
  * @returns promise
662
673
  */
663
- static uploadBannerImageBlob<T>(community_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
674
+ static uploadBannerImageBlob<T>(community_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
664
675
  /**
665
676
  * Updates the banner image for the community using a File object.
666
677
  *
@@ -671,7 +682,7 @@ declare class Communities {
671
682
  *
672
683
  * @returns promise
673
684
  */
674
- static uploadVideoLogoFile<T>(community_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
685
+ static uploadVideoLogoFile<T>(community_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
675
686
  /**
676
687
  * Updates the banner image for the community using a Blob.
677
688
  *
@@ -682,7 +693,7 @@ declare class Communities {
682
693
  *
683
694
  * @returns promise
684
695
  */
685
- static uploadVideoLogoBlob<T>(community_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
696
+ static uploadVideoLogoBlob<T>(community_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
686
697
  /**
687
698
  * List the invites that have been sent for the community to users.
688
699
  *
@@ -692,7 +703,7 @@ declare class Communities {
692
703
  *
693
704
  * @returns promise
694
705
  */
695
- static listInvites<T>(community_id: string): AxiosPromise<Response<T>>;
706
+ static listInvites<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
696
707
  /**
697
708
  * Send an invitation to a user to join the community.
698
709
  *
@@ -703,7 +714,7 @@ declare class Communities {
703
714
  *
704
715
  * @returns promise
705
716
  */
706
- static sendInvite<T>(community_id: string, data?: object): AxiosPromise<Response<T>>;
717
+ static sendInvite<T>(community_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
707
718
  /**
708
719
  * Accept an invite to a community. The JSON Web Token (JWT) must be related to the token.
709
720
  *
@@ -714,7 +725,7 @@ declare class Communities {
714
725
  *
715
726
  * @returns promise
716
727
  */
717
- static acceptInvite<T>(community_id: string, token: string): AxiosPromise<Response<T>>;
728
+ static acceptInvite<T>(community_id: string, token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
718
729
  /**
719
730
  * List the users who are currently associated with the community.
720
731
  *
@@ -724,7 +735,7 @@ declare class Communities {
724
735
  *
725
736
  * @returns promise
726
737
  */
727
- static listUsers<T>(community_id: string): AxiosPromise<Response<T>>;
738
+ static listUsers<T>(community_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
728
739
  /**
729
740
  * Add a user to a community.
730
741
  *
@@ -735,7 +746,7 @@ declare class Communities {
735
746
  *
736
747
  * @returns promise
737
748
  */
738
- static addUser<T>(community_id: string, data?: object): AxiosPromise<Response<T>>;
749
+ static addUser<T>(community_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
739
750
  /**
740
751
  * Retrieves a single user and their information that is associated with a community.
741
752
  *
@@ -746,7 +757,7 @@ declare class Communities {
746
757
  *
747
758
  * @returns promise
748
759
  */
749
- static getUser<T>(community_id: string, user_id: string): AxiosPromise<Response<T>>;
760
+ static getUser<T>(community_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
750
761
  /**
751
762
  * Updates the users information associated with the community.
752
763
  *
@@ -755,7 +766,7 @@ declare class Communities {
755
766
  *
756
767
  * @returns promise
757
768
  */
758
- static updatetUser<T>(community_id: string, user_id: string, data?: object): AxiosPromise<Response<T>>;
769
+ static updatetUser<T>(community_id: string, user_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
759
770
  /**
760
771
  * Removes a user from a community.
761
772
  *
@@ -764,7 +775,7 @@ declare class Communities {
764
775
  *
765
776
  * @returns promise
766
777
  */
767
- static removetUser<T>(community_id: string, user_id: string): AxiosPromise<Response<T>>;
778
+ static removetUser<T>(community_id: string, user_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
768
779
  /**
769
780
  * Finds a community either by its subdomain or cname. The cname must be active.
770
781
  *
@@ -772,7 +783,7 @@ declare class Communities {
772
783
  *
773
784
  * @returns promise
774
785
  */
775
- static findByDomain<T>(domain: string): AxiosPromise<Response<T>>;
786
+ static findByDomain<T>(domain: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
776
787
  }
777
788
 
778
789
  declare class Users {
@@ -783,7 +794,7 @@ declare class Users {
783
794
  *
784
795
  * @returns promise
785
796
  */
786
- static list<T>(): AxiosPromise<Response<T>>;
797
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
787
798
  /**
788
799
  * Updates a users information. Requires the users JSON Web Token (JWT) for them to update their profile.
789
800
  *
@@ -793,7 +804,7 @@ declare class Users {
793
804
  *
794
805
  * @returns Promise
795
806
  */
796
- static update<T>(data: object): AxiosPromise<Response<T>>;
807
+ static update<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
797
808
  /**
798
809
  * Gets the current users information based on the current Json Web Token (JWT).
799
810
  *
@@ -804,7 +815,7 @@ declare class Users {
804
815
  *
805
816
  * @returns promise
806
817
  */
807
- static me<T>(): AxiosPromise<Response<T>>;
818
+ static me<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
808
819
  /**
809
820
  * Will follow and unfollow a user. If the user is not being following, it will follow the user. If they are following, it will unfollow the user. The current JWT is used for the follower.
810
821
  *
@@ -896,7 +907,7 @@ declare class Events {
896
907
  *
897
908
  * @returns promise
898
909
  */
899
- static list<T>(): AxiosPromise<Response<T>>;
910
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
900
911
  /**
901
912
  * Create a new event.
902
913
  *
@@ -906,7 +917,7 @@ declare class Events {
906
917
  *
907
918
  * @returns Promise
908
919
  */
909
- static create<T>(data: object): AxiosPromise<Response<T>>;
920
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
910
921
  /**
911
922
  * Update a event
912
923
  *
@@ -917,7 +928,7 @@ declare class Events {
917
928
  *
918
929
  * @returns promise
919
930
  */
920
- static update<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
931
+ static update<T>(event_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
921
932
  /**
922
933
  * Retrieve the information for a single event.
923
934
  *
@@ -927,7 +938,7 @@ declare class Events {
927
938
  *
928
939
  * @returns promise
929
940
  */
930
- static view<T>(event_id: string): AxiosPromise<Response<T>>;
941
+ static view<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
931
942
  /**
932
943
  * Deletes a event.
933
944
  *
@@ -936,7 +947,7 @@ declare class Events {
936
947
  * @param event_id The id of the event to delete.
937
948
  * @returns promise
938
949
  */
939
- static delete<T>(event_id: string): AxiosPromise<Response<T>>;
950
+ static delete<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
940
951
  /**
941
952
  * The event is synced with Invirtu for the lie streams. This will allow you to update
942
953
  *
@@ -948,7 +959,7 @@ declare class Events {
948
959
  *
949
960
  * @returns promise
950
961
  */
951
- static updateInvirtuEvent<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
962
+ static updateInvirtuEvent<T>(event_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
952
963
  /**
953
964
  * Add an RTMP source to multicast a stream too.
954
965
  *
@@ -959,7 +970,7 @@ declare class Events {
959
970
  *
960
971
  * @returns promise
961
972
  */
962
- static addRTMPSource<T>(event_id: string, data?: object): AxiosPromise<Response<T>>;
973
+ static addRTMPSource<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
963
974
  /**
964
975
  * Update an RTMP Source for multicasing.
965
976
  *
@@ -970,7 +981,7 @@ declare class Events {
970
981
  *
971
982
  * @returns promise
972
983
  */
973
- static updateRTMPSource<T>(event_id: string, stream_id: string, data?: object): AxiosPromise<Response<T>>;
984
+ static updateRTMPSource<T>(event_id: string, stream_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
974
985
  /**
975
986
  * Remove a RTMP source for multicasing.
976
987
  *
@@ -981,7 +992,7 @@ declare class Events {
981
992
  *
982
993
  * @returns promise
983
994
  */
984
- static removeRTMPSource<T>(event_id: string, stream_id: string): AxiosPromise<Response<T>>;
995
+ static removeRTMPSource<T>(event_id: string, stream_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
985
996
  /**
986
997
  * A function that should be run on an interval to set the event as live when the live stream is active.
987
998
  *
@@ -991,7 +1002,7 @@ declare class Events {
991
1002
  *
992
1003
  * @returns promise
993
1004
  */
994
- static syncAsLive<T>(event_id: string): AxiosPromise<Response<T>>;
1005
+ static syncAsLive<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
995
1006
  /**
996
1007
  * Updates the main image for the event using a File object.
997
1008
  *
@@ -1002,7 +1013,7 @@ declare class Events {
1002
1013
  *
1003
1014
  * @returns promise
1004
1015
  */
1005
- static uploadMainImageFile<T>(event_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
1016
+ static uploadMainImageFile<T>(event_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1006
1017
  /**
1007
1018
  * Updates the main image for the event using a Blob.
1008
1019
  *
@@ -1013,7 +1024,7 @@ declare class Events {
1013
1024
  *
1014
1025
  * @returns promise
1015
1026
  */
1016
- static uploadMainImageBlob<T>(event_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
1027
+ static uploadMainImageBlob<T>(event_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1017
1028
  /**
1018
1029
  * Updates the banner image for the team using a File object.
1019
1030
  *
@@ -1024,7 +1035,7 @@ declare class Events {
1024
1035
  *
1025
1036
  * @returns promise
1026
1037
  */
1027
- static uploadBannerImageFile<T>(event_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
1038
+ static uploadBannerImageFile<T>(event_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1028
1039
  /**
1029
1040
  * Updates the banner image for the team using a Blob.
1030
1041
  *
@@ -1035,7 +1046,7 @@ declare class Events {
1035
1046
  *
1036
1047
  * @returns promise
1037
1048
  */
1038
- static uploadBannerImageBlob<T>(event_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
1049
+ static uploadBannerImageBlob<T>(event_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1039
1050
  /**
1040
1051
  * Enable Broadcast Mode. Broadcast mode is when the live stream is broadcasted from the game play through a protocol
1041
1052
  * such as screen sharing.
@@ -1046,7 +1057,7 @@ declare class Events {
1046
1057
  *
1047
1058
  * @returns promise
1048
1059
  */
1049
- static enableBroadcastMode<T>(event_id: string): AxiosPromise<Response<T>>;
1060
+ static enableBroadcastMode<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1050
1061
  /**
1051
1062
  * Enable livestream mode, in which the stream will be delivered to the invirtu RTMP endpoint for
1052
1063
  * streaming.
@@ -1055,7 +1066,7 @@ declare class Events {
1055
1066
  *
1056
1067
  * @returns promise
1057
1068
  */
1058
- static enableLivestreamMode<T>(event_id: string): AxiosPromise<Response<T>>;
1069
+ static enableLivestreamMode<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1059
1070
  /**
1060
1071
  * Sends content that will appear on-screen to the user.
1061
1072
  *
@@ -1066,7 +1077,7 @@ declare class Events {
1066
1077
  *
1067
1078
  * @returns promise
1068
1079
  */
1069
- static sendOnScreenContent<T>(event_id: string, data: object): AxiosPromise<Response<T>>;
1080
+ static sendOnScreenContent<T>(event_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1070
1081
  /**
1071
1082
  * Uploads an image that can be used and overlay later. A File object is used.
1072
1083
  *
@@ -1152,7 +1163,7 @@ declare class Teams {
1152
1163
  *
1153
1164
  * @returns promise
1154
1165
  */
1155
- static list<T>(): AxiosPromise<Response<T>>;
1166
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
1156
1167
  /**
1157
1168
  * Create a new team.
1158
1169
  *
@@ -1162,7 +1173,7 @@ declare class Teams {
1162
1173
  *
1163
1174
  * @returns Promise
1164
1175
  */
1165
- static create<T>(data: object): AxiosPromise<Response<T>>;
1176
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1166
1177
  /**
1167
1178
  * Update a team.
1168
1179
  *
@@ -1173,7 +1184,7 @@ declare class Teams {
1173
1184
  *
1174
1185
  * @returns promise
1175
1186
  */
1176
- static update<T>(team_id: string, data: object): AxiosPromise<Response<T>>;
1187
+ static update<T>(team_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1177
1188
  /**
1178
1189
  * Retrieve the information for a single team.
1179
1190
  *
@@ -1183,7 +1194,7 @@ declare class Teams {
1183
1194
  *
1184
1195
  * @returns promise
1185
1196
  */
1186
- static view<T>(team_id: string): AxiosPromise<Response<T>>;
1197
+ static view<T>(team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1187
1198
  /**
1188
1199
  * Deletes a team.
1189
1200
  *
@@ -1192,7 +1203,7 @@ declare class Teams {
1192
1203
  * @param team_id The id of the team to delete.
1193
1204
  * @returns promise
1194
1205
  */
1195
- static delete<T>(team_id: string): AxiosPromise<Response<T>>;
1206
+ static delete<T>(team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1196
1207
  /**
1197
1208
  * Updates the main image for the team using a File object.
1198
1209
  *
@@ -1246,7 +1257,7 @@ declare class Teams {
1246
1257
  *
1247
1258
  * @returns promise
1248
1259
  */
1249
- static listInvites<T>(team_id: string): AxiosPromise<Response<T>>;
1260
+ static listInvites<T>(team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1250
1261
  /**
1251
1262
  * Send an invitation to a user to join the team.
1252
1263
  *
@@ -1278,7 +1289,7 @@ declare class Teams {
1278
1289
  *
1279
1290
  * @returns promise
1280
1291
  */
1281
- static listUsers<T>(team_id: string): AxiosPromise<Response<T>>;
1292
+ static listUsers<T>(team_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1282
1293
  /**
1283
1294
  * Add a user to a team.
1284
1295
  *
@@ -1329,7 +1340,7 @@ declare class Waitlists {
1329
1340
  *
1330
1341
  * @returns promise
1331
1342
  */
1332
- static list<T>(): AxiosPromise<Response<T>>;
1343
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
1333
1344
  /**
1334
1345
  * Sign-up to the waitlist.
1335
1346
  *
@@ -1339,7 +1350,7 @@ declare class Waitlists {
1339
1350
  *
1340
1351
  * @returns Promise
1341
1352
  */
1342
- static create<T>(data: object): AxiosPromise<Response<T>>;
1353
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1343
1354
  /**
1344
1355
  * Update a waitlist.
1345
1356
  *
@@ -1350,7 +1361,7 @@ declare class Waitlists {
1350
1361
  *
1351
1362
  * @returns promise
1352
1363
  */
1353
- static update<T>(waitlist_id: string, data: object): AxiosPromise<Response<T>>;
1364
+ static update<T>(waitlist_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1354
1365
  /**
1355
1366
  * Retrieve the information for a single user who signed-up to the waitlist.
1356
1367
  *
@@ -1360,7 +1371,7 @@ declare class Waitlists {
1360
1371
  *
1361
1372
  * @returns promise
1362
1373
  */
1363
- static view<T>(waitlist_id: string): AxiosPromise<Response<T>>;
1374
+ static view<T>(waitlist_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1364
1375
  /**
1365
1376
  * Deletes an entry from the waitlist.
1366
1377
  *
@@ -1369,7 +1380,7 @@ declare class Waitlists {
1369
1380
  * @param waitlist_id The id of the team to delete.
1370
1381
  * @returns promise
1371
1382
  */
1372
- static delete<T>(waitlist_id: string): AxiosPromise<Response<T>>;
1383
+ static delete<T>(waitlist_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1373
1384
  }
1374
1385
 
1375
1386
  declare class Templates {
@@ -1380,7 +1391,7 @@ declare class Templates {
1380
1391
  *
1381
1392
  * @returns promise
1382
1393
  */
1383
- static list<T>(): AxiosPromise<Response<T>>;
1394
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
1384
1395
  /**
1385
1396
  * Create a new template.
1386
1397
  *
@@ -1390,7 +1401,7 @@ declare class Templates {
1390
1401
  *
1391
1402
  * @returns Promise
1392
1403
  */
1393
- static create<T>(data: object): AxiosPromise<Response<T>>;
1404
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1394
1405
  /**
1395
1406
  * Update a template.
1396
1407
  *
@@ -1401,7 +1412,7 @@ declare class Templates {
1401
1412
  *
1402
1413
  * @returns promise
1403
1414
  */
1404
- static update<T>(template_id: string, data: object): AxiosPromise<Response<T>>;
1415
+ static update<T>(template_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1405
1416
  /**
1406
1417
  * Retrieve the information for a single template.
1407
1418
  *
@@ -1411,7 +1422,7 @@ declare class Templates {
1411
1422
  *
1412
1423
  * @returns promise
1413
1424
  */
1414
- static view<T>(template_id: string): AxiosPromise<Response<T>>;
1425
+ static view<T>(template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1415
1426
  /**
1416
1427
  * Deletes a template.
1417
1428
  *
@@ -1420,7 +1431,7 @@ declare class Templates {
1420
1431
  * @param template_id The id of the template to delete.
1421
1432
  * @returns promise
1422
1433
  */
1423
- static delete<T>(template_id: string): AxiosPromise<Response<T>>;
1434
+ static delete<T>(template_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1424
1435
  /**
1425
1436
  * Updates the logo for the template using a File object.
1426
1437
  *
@@ -1431,7 +1442,7 @@ declare class Templates {
1431
1442
  *
1432
1443
  * @returns promise
1433
1444
  */
1434
- static uploadLogoFile<T>(template_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
1445
+ static uploadLogoFile<T>(template_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1435
1446
  /**
1436
1447
  * Updates the logo for the template using a Blob.
1437
1448
  *
@@ -1442,7 +1453,7 @@ declare class Templates {
1442
1453
  *
1443
1454
  * @returns promise
1444
1455
  */
1445
- static uploadLogoBlob<T>(template_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
1456
+ static uploadLogoBlob<T>(template_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1446
1457
  /**
1447
1458
  * Updates the main image for the template using a File object.
1448
1459
  *
@@ -1453,7 +1464,7 @@ declare class Templates {
1453
1464
  *
1454
1465
  * @returns promise
1455
1466
  */
1456
- static uploadMainImageFile<T>(template_id: string, file: File, data?: object): AxiosPromise<Response<T>>;
1467
+ static uploadMainImageFile<T>(template_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1457
1468
  /**
1458
1469
  * Updates the main image for the template using a Blob.
1459
1470
  *
@@ -1464,7 +1475,7 @@ declare class Templates {
1464
1475
  *
1465
1476
  * @returns promise
1466
1477
  */
1467
- static uploadMainImageBlob<T>(template_id: string, blob: Blob, data?: object): AxiosPromise<Response<T>>;
1478
+ static uploadMainImageBlob<T>(template_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1468
1479
  }
1469
1480
 
1470
1481
  interface Route {
@@ -1476,6 +1487,7 @@ declare class Requests {
1476
1487
  config: Config;
1477
1488
  private static baseUrl;
1478
1489
  private static authToken;
1490
+ private static community_id?;
1479
1491
  constructor(config: Config);
1480
1492
  /**
1481
1493
  * Sets the base url of the API.
@@ -1489,6 +1501,12 @@ declare class Requests {
1489
1501
  * @param token
1490
1502
  */
1491
1503
  static setAuthToken(token: string): void;
1504
+ /**
1505
+ * Sets the community id that will be associated with all requests
1506
+ *
1507
+ * @param token
1508
+ */
1509
+ static setCommunityID(community_id: string | undefined): void;
1492
1510
  private static request;
1493
1511
  /**
1494
1512
  * Calls a GET request to the url endpoint.
@@ -1496,12 +1514,12 @@ declare class Requests {
1496
1514
  * @param url
1497
1515
  * @returns
1498
1516
  */
1499
- static get<T>(url: string): AxiosPromise<Response<T>>;
1500
- static post<T>(url: string, data: any): AxiosPromise<Response<T>>;
1501
- static put<T>(url: string, data: any): AxiosPromise<Response<T>>;
1502
- static delete<T>(url: string): AxiosPromise<Response<T>>;
1503
- static uploadFile<T>(url: string, filename: string, file: File, data?: any): AxiosPromise<Response<T>>;
1504
- static uploadBlob<T>(url: string, filename: string, blob: Blob, data?: any): AxiosPromise<Response<T>>;
1517
+ static get<T>(url: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1518
+ static post<T>(url: string, data: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
1519
+ static put<T>(url: string, data: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
1520
+ static delete<T>(url: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1521
+ static uploadFile<T>(url: string, filename: string, file: File, data?: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
1522
+ static uploadBlob<T>(url: string, filename: string, blob: Blob, data?: any, params?: Record<string, any>): AxiosPromise<Response<T>>;
1505
1523
  /**
1506
1524
  * The Route class contains the method and url, thereforce items can be
1507
1525
  * automatically routed depending on the configuration.
@@ -1512,7 +1530,7 @@ declare class Requests {
1512
1530
  */
1513
1531
  static processRoute<T>(route: Route, data?: object, routeReplace?: {
1514
1532
  [key: string]: any;
1515
- }): AxiosPromise<Response<T>>;
1533
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
1516
1534
  }
1517
1535
 
1518
1536
  declare class Parser {