glitch-javascript-sdk 3.3.6 → 3.4.0

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
@@ -6205,6 +6205,8 @@ declare class GameShows {
6205
6205
  * Add a title to a game show by admin.
6206
6206
  */
6207
6207
  static addTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6208
+ static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6209
+ static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6208
6210
  /**
6209
6211
  * List all titles for a game show.
6210
6212
  */
@@ -6281,6 +6283,21 @@ declare class GameShows {
6281
6283
  * List public game shows that include a title. Useful for game-page festival banners.
6282
6284
  */
6283
6285
  static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6286
+ static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6287
+ static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6288
+ static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6289
+ static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6290
+ static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6291
+ static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6292
+ static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6293
+ static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6294
+ static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6295
+ static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6296
+ static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6297
+ static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6298
+ static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6299
+ static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6300
+ static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6284
6301
  }
6285
6302
 
6286
6303
  declare class Newsletters {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.3.6",
3
+ "version": "3.4.0",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -154,6 +154,16 @@ class GameShows {
154
154
  return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
155
155
  }
156
156
 
157
+ public static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
158
+ const url = GameShowsRoute.routes.previewExternalTitles.url.replace('{show_id}', show_id);
159
+ return Requests.uploadFile(url, 'file', file, data, params);
160
+ }
161
+
162
+ public static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
163
+ const url = GameShowsRoute.routes.importExternalTitles.url.replace('{show_id}', show_id);
164
+ return Requests.uploadFile(url, 'file', file, data, params);
165
+ }
166
+
157
167
  /**
158
168
  * List all titles for a game show.
159
169
  */
@@ -287,6 +297,67 @@ class GameShows {
287
297
  return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
288
298
  }
289
299
 
300
+ public static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
301
+ return Requests.processRoute(GameShowsRoute.routes.listSponsors, {}, { show_id }, params);
302
+ }
303
+
304
+ public static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
305
+ return Requests.processRoute(GameShowsRoute.routes.createSponsor, data, { show_id }, params);
306
+ }
307
+
308
+ public static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
309
+ return Requests.processRoute(GameShowsRoute.routes.getSponsor, {}, { show_id, sponsor_id }, params);
310
+ }
311
+
312
+ public static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
313
+ return Requests.processRoute(GameShowsRoute.routes.updateSponsor, data, { show_id, sponsor_id }, params);
314
+ }
315
+
316
+ public static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
317
+ return Requests.processRoute(GameShowsRoute.routes.deleteSponsor, {}, { show_id, sponsor_id }, params);
318
+ }
319
+
320
+ public static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
321
+ return Requests.processRoute(GameShowsRoute.routes.resendSponsorInvitation, {}, { show_id, sponsor_id }, params);
322
+ }
323
+
324
+ public static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
325
+ return Requests.processRoute(GameShowsRoute.routes.createSponsorPlacement, data, { show_id, sponsor_id }, params);
326
+ }
327
+
328
+ public static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
329
+ return Requests.processRoute(GameShowsRoute.routes.updateSponsorPlacement, data, { show_id, sponsor_id, placement_id }, params);
330
+ }
331
+
332
+ public static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
333
+ return Requests.processRoute(GameShowsRoute.routes.deleteSponsorPlacement, {}, { show_id, sponsor_id, placement_id }, params);
334
+ }
335
+
336
+ public static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
337
+ return Requests.processRoute(GameShowsRoute.routes.listPublicSponsors, {}, { show_id }, params);
338
+ }
339
+
340
+ public static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
341
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitation, {}, { token }, params);
342
+ }
343
+
344
+ public static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
345
+ const url = GameShowsRoute.routes.sponsorInvitationUpload.url.replace('{token}', token);
346
+ return Requests.uploadFile(url, 'media', file, data, params);
347
+ }
348
+
349
+ public static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
350
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationSubmit, data, { token }, params);
351
+ }
352
+
353
+ public static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
354
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationPayment, data, { token }, params);
355
+ }
356
+
357
+ public static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
358
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token }, params);
359
+ }
360
+
290
361
  }
291
362
 
292
363
  export default GameShows;
@@ -14,6 +14,8 @@ class GameShowsRoute {
14
14
  registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
15
15
  listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
16
16
  addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
17
+ previewExternalTitles: { url: '/gameshows/{show_id}/external-titles/preview', method: HTTP_METHODS.POST },
18
+ importExternalTitles: { url: '/gameshows/{show_id}/external-titles/import', method: HTTP_METHODS.POST },
17
19
  viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
18
20
  updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
19
21
  deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
@@ -32,6 +34,21 @@ class GameShowsRoute {
32
34
  joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
33
35
  listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
34
36
  listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
37
+ listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
38
+ createSponsor: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.POST },
39
+ getSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.GET },
40
+ updateSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.PUT },
41
+ deleteSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.DELETE },
42
+ resendSponsorInvitation: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/invite', method: HTTP_METHODS.POST },
43
+ createSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements', method: HTTP_METHODS.POST },
44
+ updateSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.PUT },
45
+ deleteSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.DELETE },
46
+ listPublicSponsors: { url: '/gameshows/{show_id}/sponsors/public', method: HTTP_METHODS.GET },
47
+ sponsorInvitation: { url: '/gameshow-sponsor-invitations/{token}', method: HTTP_METHODS.GET },
48
+ sponsorInvitationUpload: { url: '/gameshow-sponsor-invitations/{token}/media', method: HTTP_METHODS.POST },
49
+ sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
50
+ sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
51
+ sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
35
52
  };
36
53
 
37
54
  }