glitch-javascript-sdk 1.2.5 → 1.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.
@@ -0,0 +1,97 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class GameShows {
4
+ /**
5
+ * List all the GameShows.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
8
+ *
9
+ * @returns promise
10
+ */
11
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
12
+ /**
13
+ * Create a new game show.
14
+ *
15
+ * @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
16
+ *
17
+ * @param data The data to be passed when creating a game show.
18
+ *
19
+ * @returns Promise
20
+ */
21
+ static create<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
22
+ /**
23
+ * Update a game show.
24
+ *
25
+ * @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
26
+ *
27
+ * @param show_id The id of the game show to update.
28
+ * @param data The data to update.
29
+ *
30
+ * @returns promise
31
+ */
32
+ static update<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
33
+ /**
34
+ * Retrieve the information for a single game show.
35
+ *
36
+ * @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
37
+ *
38
+ * @param show_id The id fo the game show to retrieve.
39
+ *
40
+ * @returns promise
41
+ */
42
+ static view<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
43
+ /**
44
+ * Deletes a game show.
45
+ *
46
+ * @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
47
+ *
48
+ * @param show_id The id of the game show to delete.
49
+ * @returns promise
50
+ */
51
+ static delete<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
52
+ /**
53
+ * Updates the main image for the game show using a File object.
54
+ *
55
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
56
+ *
57
+ * @param file The file object to upload.
58
+ * @param data Any additional data to pass along to the upload.
59
+ *
60
+ * @returns promise
61
+ */
62
+ static uploadLogoFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
63
+ /**
64
+ * Updates the main image for the game show using a Blob.
65
+ *
66
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
67
+ *
68
+ * @param blob The blob to upload.
69
+ * @param data Any additional data to pass along to the upload
70
+ *
71
+ * @returns promise
72
+ */
73
+ static uploadLogoBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
74
+ /**
75
+ * Updates the banner image for the game show using a File object.
76
+ *
77
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
78
+ *
79
+ * @param file The file object to upload.
80
+ * @param data Any additional data to pass along to the upload.
81
+ *
82
+ * @returns promise
83
+ */
84
+ static uploadBannerImageFile<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
85
+ /**
86
+ * Updates the banner image for the game show using a Blob.
87
+ *
88
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
89
+ *
90
+ * @param blob The blob to upload.
91
+ * @param data Any additional data to pass along to the upload
92
+ *
93
+ * @returns promise
94
+ */
95
+ static uploadBannerImageBlob<T>(show_id: string, blob: Blob, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
96
+ }
97
+ export default GameShows;
@@ -81,5 +81,13 @@ declare class Influencers {
81
81
  * @returns promise
82
82
  */
83
83
  static listContracts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
84
+ /**
85
+ * Download the influencer work
86
+ *
87
+ * @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
88
+ *
89
+ * @returns promise
90
+ */
91
+ static workbook<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
84
92
  }
85
93
  export default Influencers;
@@ -0,0 +1,23 @@
1
+ import Response from "../util/Response";
2
+ import { AxiosPromise } from "axios";
3
+ declare class Publications {
4
+ /**
5
+ * Get a list of all publictions, podcasts and blogs.
6
+ *
7
+ * @see https://api.glitch.fun/api/documentation#/Publications/getPublications
8
+ *
9
+ * @returns promise
10
+ */
11
+ static list<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
12
+ /**
13
+ * Download the list of publictions, podcasts and blogs.
14
+ *
15
+ * @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
16
+ *
17
+ * @param data The data to be passed when creating a team.
18
+ *
19
+ * @returns Promise
20
+ */
21
+ static download<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
22
+ }
23
+ export default Publications;
@@ -21,6 +21,8 @@ import Messages from "./Messages";
21
21
  import Feedback from "./Feedback";
22
22
  import Influencers from "./Influencers";
23
23
  import Games from "./Games";
24
+ import Publications from "./Publications";
25
+ import GameShows from "./GameShows";
24
26
  export { Auth };
25
27
  export { Competitions };
26
28
  export { Communities };
@@ -44,3 +46,5 @@ export { Messages };
44
46
  export { Feedback };
45
47
  export { Influencers };
46
48
  export { Games };
49
+ export { Publications };
50
+ export { GameShows };
@@ -21,6 +21,8 @@ import { Messages } from "./api";
21
21
  import { Feedback } from "./api";
22
22
  import { Influencers } from "./api";
23
23
  import { Games } from "./api";
24
+ import { Publications } from "./api";
25
+ import { GameShows } from "./api";
24
26
  import Requests from "./util/Requests";
25
27
  import Parser from "./util/Parser";
26
28
  import Session from "./util/Session";
@@ -47,6 +49,7 @@ declare class Glitch {
47
49
  Users: typeof Users;
48
50
  Events: typeof Events;
49
51
  Games: typeof Games;
52
+ GameShows: typeof GameShows;
50
53
  Feedback: typeof Feedback;
51
54
  Influencers: typeof Influencers;
52
55
  Teams: typeof Teams;
@@ -63,6 +66,7 @@ declare class Glitch {
63
66
  TipPackages: typeof TipPackages;
64
67
  TipEmojis: typeof TipEmojis;
65
68
  TipPackagePurchases: typeof TipPackagePurchases;
69
+ Publications: typeof Publications;
66
70
  };
67
71
  static util: {
68
72
  Requests: typeof Requests;
package/dist/esm/index.js CHANGED
@@ -10247,6 +10247,7 @@ var InfluencerRoutes = /** @class */ (function () {
10247
10247
  updateNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.PUT },
10248
10248
  deleteNote: { url: '/influencers/{influencer_id}/notes/{note_id}', method: HTTP_METHODS.DELETE },
10249
10249
  listContracts: { url: '/influencers/contracts', method: HTTP_METHODS.GET },
10250
+ workbook: { url: '/influencers/workbook', method: HTTP_METHODS.POST },
10250
10251
  };
10251
10252
  return InfluencerRoutes;
10252
10253
  }());
@@ -10354,6 +10355,16 @@ var Influencers = /** @class */ (function () {
10354
10355
  Influencers.listContracts = function (params) {
10355
10356
  return Requests.processRoute(InfluencerRoutes.routes.listContracts, undefined, undefined, params);
10356
10357
  };
10358
+ /**
10359
+ * Download the influencer work
10360
+ *
10361
+ * @see https://api.glitch.fun/api/documentation#/Influencers/downloadInfluencersWorkbook
10362
+ *
10363
+ * @returns promise
10364
+ */
10365
+ Influencers.workbook = function (data, params) {
10366
+ return Requests.processRoute(InfluencerRoutes.routes.workbook, data, {}, params);
10367
+ };
10357
10368
  return Influencers;
10358
10369
  }());
10359
10370
 
@@ -10404,6 +10415,179 @@ var Games = /** @class */ (function () {
10404
10415
  return Games;
10405
10416
  }());
10406
10417
 
10418
+ var PublicationsRoutes = /** @class */ (function () {
10419
+ function PublicationsRoutes() {
10420
+ }
10421
+ PublicationsRoutes.routes = {
10422
+ list: { url: '/publications', method: HTTP_METHODS.GET },
10423
+ download: { url: '/publications/download', method: HTTP_METHODS.POST },
10424
+ };
10425
+ return PublicationsRoutes;
10426
+ }());
10427
+
10428
+ var Publications = /** @class */ (function () {
10429
+ function Publications() {
10430
+ }
10431
+ /**
10432
+ * Get a list of all publictions, podcasts and blogs.
10433
+ *
10434
+ * @see https://api.glitch.fun/api/documentation#/Publications/getPublications
10435
+ *
10436
+ * @returns promise
10437
+ */
10438
+ Publications.list = function (params) {
10439
+ return Requests.processRoute(PublicationsRoutes.routes.list, undefined, undefined, params);
10440
+ };
10441
+ /**
10442
+ * Download the list of publictions, podcasts and blogs.
10443
+ *
10444
+ * @see https://api.glitch.fun/api/documentation#/Publications/downloadPublications
10445
+ *
10446
+ * @param data The data to be passed when creating a team.
10447
+ *
10448
+ * @returns Promise
10449
+ */
10450
+ Publications.download = function (data, params) {
10451
+ return Requests.processRoute(PublicationsRoutes.routes.download, data, undefined, params);
10452
+ };
10453
+ return Publications;
10454
+ }());
10455
+
10456
+ var GameShowsRoute = /** @class */ (function () {
10457
+ function GameShowsRoute() {
10458
+ }
10459
+ GameShowsRoute.routes = {
10460
+ list: { url: '/gameshows', method: HTTP_METHODS.GET },
10461
+ create: { url: '/gameshows', method: HTTP_METHODS.POST },
10462
+ view: { url: '/gameshows/{show_id}', method: HTTP_METHODS.GET },
10463
+ update: { url: '/gameshows/{show_id}', method: HTTP_METHODS.PUT },
10464
+ delete: { url: '/gameshows/{show_id}', method: HTTP_METHODS.DELETE },
10465
+ uploadLogo: { url: '/gameshows/{show_id}/uploadLogo', method: HTTP_METHODS.POST },
10466
+ uploadBannerImage: { url: '/gameshows/{show_id}/uploadBannerImage', method: HTTP_METHODS.POST },
10467
+ };
10468
+ return GameShowsRoute;
10469
+ }());
10470
+
10471
+ var GameShows = /** @class */ (function () {
10472
+ function GameShows() {
10473
+ }
10474
+ /**
10475
+ * List all the GameShows.
10476
+ *
10477
+ * @see https://api.glitch.fun/api/documentation#/GameShows/getGameShows
10478
+ *
10479
+ * @returns promise
10480
+ */
10481
+ GameShows.list = function (params) {
10482
+ return Requests.processRoute(GameShowsRoute.routes.list, undefined, undefined, params);
10483
+ };
10484
+ /**
10485
+ * Create a new game show.
10486
+ *
10487
+ * @see https://api.glitch.fun/api/documentation#/GameShows/createGameShow
10488
+ *
10489
+ * @param data The data to be passed when creating a game show.
10490
+ *
10491
+ * @returns Promise
10492
+ */
10493
+ GameShows.create = function (data, params) {
10494
+ return Requests.processRoute(GameShowsRoute.routes.create, data, undefined, params);
10495
+ };
10496
+ /**
10497
+ * Update a game show.
10498
+ *
10499
+ * @see https://api.glitch.fun/api/documentation#/GameShows/updateGameShow
10500
+ *
10501
+ * @param show_id The id of the game show to update.
10502
+ * @param data The data to update.
10503
+ *
10504
+ * @returns promise
10505
+ */
10506
+ GameShows.update = function (show_id, data, params) {
10507
+ return Requests.processRoute(GameShowsRoute.routes.update, data, { show_id: show_id }, params);
10508
+ };
10509
+ /**
10510
+ * Retrieve the information for a single game show.
10511
+ *
10512
+ * @see https://api.glitch.fun/api/documentation#/GameShows/getGameShowByUuid
10513
+ *
10514
+ * @param show_id The id fo the game show to retrieve.
10515
+ *
10516
+ * @returns promise
10517
+ */
10518
+ GameShows.view = function (show_id, params) {
10519
+ return Requests.processRoute(GameShowsRoute.routes.view, {}, { show_id: show_id }, params);
10520
+ };
10521
+ /**
10522
+ * Deletes a game show.
10523
+ *
10524
+ * @see https://api.glitch.fun/api/documentation#/GameShows/deleteGameShow
10525
+ *
10526
+ * @param show_id The id of the game show to delete.
10527
+ * @returns promise
10528
+ */
10529
+ GameShows.delete = function (show_id, params) {
10530
+ return Requests.processRoute(GameShowsRoute.routes.delete, {}, { show_id: show_id }, params);
10531
+ };
10532
+ /**
10533
+ * Updates the main image for the game show using a File object.
10534
+ *
10535
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
10536
+ *
10537
+ * @param file The file object to upload.
10538
+ * @param data Any additional data to pass along to the upload.
10539
+ *
10540
+ * @returns promise
10541
+ */
10542
+ GameShows.uploadLogoFile = function (show_id, file, data, params) {
10543
+ var url = GameShowsRoute.routes.uploadLogo.url.replace('{show_id}', show_id);
10544
+ return Requests.uploadFile(url, 'image', file, data);
10545
+ };
10546
+ /**
10547
+ * Updates the main image for the game show using a Blob.
10548
+ *
10549
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowLogo
10550
+ *
10551
+ * @param blob The blob to upload.
10552
+ * @param data Any additional data to pass along to the upload
10553
+ *
10554
+ * @returns promise
10555
+ */
10556
+ GameShows.uploadLogoBlob = function (show_id, blob, data, params) {
10557
+ var url = GameShowsRoute.routes.uploadLogo.url.replace('{show_id}', show_id);
10558
+ return Requests.uploadBlob(url, 'image', blob, data);
10559
+ };
10560
+ /**
10561
+ * Updates the banner image for the game show using a File object.
10562
+ *
10563
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
10564
+ *
10565
+ * @param file The file object to upload.
10566
+ * @param data Any additional data to pass along to the upload.
10567
+ *
10568
+ * @returns promise
10569
+ */
10570
+ GameShows.uploadBannerImageFile = function (show_id, file, data, params) {
10571
+ var url = GameShowsRoute.routes.uploadBannerImage.url.replace('{show_id}', show_id);
10572
+ return Requests.uploadFile(url, 'image', file, data);
10573
+ };
10574
+ /**
10575
+ * Updates the banner image for the game show using a Blob.
10576
+ *
10577
+ * @see https://api.glitch.fun/api/documentation#/GameShows/uploadGameShowBannerImage
10578
+ *
10579
+ * @param blob The blob to upload.
10580
+ * @param data Any additional data to pass along to the upload
10581
+ *
10582
+ * @returns promise
10583
+ */
10584
+ GameShows.uploadBannerImageBlob = function (show_id, blob, data, params) {
10585
+ var url = GameShowsRoute.routes.uploadBannerImage.url.replace('{show_id}', show_id);
10586
+ return Requests.uploadBlob(url, 'image', blob, data);
10587
+ };
10588
+ return GameShows;
10589
+ }());
10590
+
10407
10591
  var Parser = /** @class */ (function () {
10408
10592
  function Parser() {
10409
10593
  }
@@ -10808,6 +10992,7 @@ var Glitch = /** @class */ (function () {
10808
10992
  Users: Users,
10809
10993
  Events: Events,
10810
10994
  Games: Games,
10995
+ GameShows: GameShows,
10811
10996
  Feedback: Feedback,
10812
10997
  Influencers: Influencers,
10813
10998
  Teams: Teams,
@@ -10823,7 +11008,8 @@ var Glitch = /** @class */ (function () {
10823
11008
  Subscriptions: Subscriptions,
10824
11009
  TipPackages: TipPackages,
10825
11010
  TipEmojis: TipEmojis,
10826
- TipPackagePurchases: TipPackagePurchases
11011
+ TipPackagePurchases: TipPackagePurchases,
11012
+ Publications: Publications
10827
11013
  };
10828
11014
  Glitch.util = {
10829
11015
  Requests: Requests,