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/cjs/index.js +71 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameShows.d.ts +17 -0
- package/dist/esm/index.js +71 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +17 -0
- package/package.json +1 -1
- package/src/api/GameShows.ts +71 -0
- package/src/routes/GameShowsRoute.ts +17 -0
|
@@ -101,6 +101,8 @@ declare class GameShows {
|
|
|
101
101
|
* Add a title to a game show by admin.
|
|
102
102
|
*/
|
|
103
103
|
static addTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
104
|
+
static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
105
|
+
static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
104
106
|
/**
|
|
105
107
|
* List all titles for a game show.
|
|
106
108
|
*/
|
|
@@ -177,5 +179,20 @@ declare class GameShows {
|
|
|
177
179
|
* List public game shows that include a title. Useful for game-page festival banners.
|
|
178
180
|
*/
|
|
179
181
|
static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
182
|
+
static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
183
|
+
static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
184
|
+
static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
185
|
+
static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
186
|
+
static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
187
|
+
static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
188
|
+
static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
189
|
+
static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
190
|
+
static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
191
|
+
static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
192
|
+
static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
193
|
+
static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
194
|
+
static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
195
|
+
static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
196
|
+
static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
180
197
|
}
|
|
181
198
|
export default GameShows;
|
package/dist/esm/index.js
CHANGED
|
@@ -15018,6 +15018,8 @@ var GameShowsRoute = /** @class */ (function () {
|
|
|
15018
15018
|
registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
|
|
15019
15019
|
listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
|
|
15020
15020
|
addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
|
|
15021
|
+
previewExternalTitles: { url: '/gameshows/{show_id}/external-titles/preview', method: HTTP_METHODS.POST },
|
|
15022
|
+
importExternalTitles: { url: '/gameshows/{show_id}/external-titles/import', method: HTTP_METHODS.POST },
|
|
15021
15023
|
viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
|
|
15022
15024
|
updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
15023
15025
|
deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
@@ -15036,6 +15038,21 @@ var GameShowsRoute = /** @class */ (function () {
|
|
|
15036
15038
|
joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
|
|
15037
15039
|
listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
|
|
15038
15040
|
listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
|
|
15041
|
+
listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
|
|
15042
|
+
createSponsor: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.POST },
|
|
15043
|
+
getSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.GET },
|
|
15044
|
+
updateSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.PUT },
|
|
15045
|
+
deleteSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.DELETE },
|
|
15046
|
+
resendSponsorInvitation: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/invite', method: HTTP_METHODS.POST },
|
|
15047
|
+
createSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements', method: HTTP_METHODS.POST },
|
|
15048
|
+
updateSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.PUT },
|
|
15049
|
+
deleteSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.DELETE },
|
|
15050
|
+
listPublicSponsors: { url: '/gameshows/{show_id}/sponsors/public', method: HTTP_METHODS.GET },
|
|
15051
|
+
sponsorInvitation: { url: '/gameshow-sponsor-invitations/{token}', method: HTTP_METHODS.GET },
|
|
15052
|
+
sponsorInvitationUpload: { url: '/gameshow-sponsor-invitations/{token}/media', method: HTTP_METHODS.POST },
|
|
15053
|
+
sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
|
|
15054
|
+
sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
|
|
15055
|
+
sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
|
|
15039
15056
|
};
|
|
15040
15057
|
return GameShowsRoute;
|
|
15041
15058
|
}());
|
|
@@ -15169,6 +15186,14 @@ var GameShows = /** @class */ (function () {
|
|
|
15169
15186
|
GameShows.addTitle = function (show_id, data, params) {
|
|
15170
15187
|
return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
|
|
15171
15188
|
};
|
|
15189
|
+
GameShows.previewExternalTitles = function (show_id, file, data, params) {
|
|
15190
|
+
var url = GameShowsRoute.routes.previewExternalTitles.url.replace('{show_id}', show_id);
|
|
15191
|
+
return Requests.uploadFile(url, 'file', file, data, params);
|
|
15192
|
+
};
|
|
15193
|
+
GameShows.importExternalTitles = function (show_id, file, data, params) {
|
|
15194
|
+
var url = GameShowsRoute.routes.importExternalTitles.url.replace('{show_id}', show_id);
|
|
15195
|
+
return Requests.uploadFile(url, 'file', file, data, params);
|
|
15196
|
+
};
|
|
15172
15197
|
/**
|
|
15173
15198
|
* List all titles for a game show.
|
|
15174
15199
|
*/
|
|
@@ -15283,6 +15308,52 @@ var GameShows = /** @class */ (function () {
|
|
|
15283
15308
|
GameShows.listForTitle = function (title_id, params) {
|
|
15284
15309
|
return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
|
|
15285
15310
|
};
|
|
15311
|
+
GameShows.listSponsors = function (show_id, params) {
|
|
15312
|
+
return Requests.processRoute(GameShowsRoute.routes.listSponsors, {}, { show_id: show_id }, params);
|
|
15313
|
+
};
|
|
15314
|
+
GameShows.createSponsor = function (show_id, data, params) {
|
|
15315
|
+
return Requests.processRoute(GameShowsRoute.routes.createSponsor, data, { show_id: show_id }, params);
|
|
15316
|
+
};
|
|
15317
|
+
GameShows.getSponsor = function (show_id, sponsor_id, params) {
|
|
15318
|
+
return Requests.processRoute(GameShowsRoute.routes.getSponsor, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
15319
|
+
};
|
|
15320
|
+
GameShows.updateSponsor = function (show_id, sponsor_id, data, params) {
|
|
15321
|
+
return Requests.processRoute(GameShowsRoute.routes.updateSponsor, data, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
15322
|
+
};
|
|
15323
|
+
GameShows.deleteSponsor = function (show_id, sponsor_id, params) {
|
|
15324
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteSponsor, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
15325
|
+
};
|
|
15326
|
+
GameShows.resendSponsorInvitation = function (show_id, sponsor_id, params) {
|
|
15327
|
+
return Requests.processRoute(GameShowsRoute.routes.resendSponsorInvitation, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
15328
|
+
};
|
|
15329
|
+
GameShows.createSponsorPlacement = function (show_id, sponsor_id, data, params) {
|
|
15330
|
+
return Requests.processRoute(GameShowsRoute.routes.createSponsorPlacement, data, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
15331
|
+
};
|
|
15332
|
+
GameShows.updateSponsorPlacement = function (show_id, sponsor_id, placement_id, data, params) {
|
|
15333
|
+
return Requests.processRoute(GameShowsRoute.routes.updateSponsorPlacement, data, { show_id: show_id, sponsor_id: sponsor_id, placement_id: placement_id }, params);
|
|
15334
|
+
};
|
|
15335
|
+
GameShows.deleteSponsorPlacement = function (show_id, sponsor_id, placement_id, params) {
|
|
15336
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteSponsorPlacement, {}, { show_id: show_id, sponsor_id: sponsor_id, placement_id: placement_id }, params);
|
|
15337
|
+
};
|
|
15338
|
+
GameShows.listPublicSponsors = function (show_id, params) {
|
|
15339
|
+
return Requests.processRoute(GameShowsRoute.routes.listPublicSponsors, {}, { show_id: show_id }, params);
|
|
15340
|
+
};
|
|
15341
|
+
GameShows.sponsorInvitation = function (token, params) {
|
|
15342
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitation, {}, { token: token }, params);
|
|
15343
|
+
};
|
|
15344
|
+
GameShows.uploadSponsorInvitationMedia = function (token, file, data, params) {
|
|
15345
|
+
var url = GameShowsRoute.routes.sponsorInvitationUpload.url.replace('{token}', token);
|
|
15346
|
+
return Requests.uploadFile(url, 'media', file, data, params);
|
|
15347
|
+
};
|
|
15348
|
+
GameShows.submitSponsorInvitation = function (token, data, params) {
|
|
15349
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationSubmit, data, { token: token }, params);
|
|
15350
|
+
};
|
|
15351
|
+
GameShows.paySponsorInvitation = function (token, data, params) {
|
|
15352
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationPayment, data, { token: token }, params);
|
|
15353
|
+
};
|
|
15354
|
+
GameShows.confirmSponsorInvitationPayment = function (token, params) {
|
|
15355
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token: token }, params);
|
|
15356
|
+
};
|
|
15286
15357
|
return GameShows;
|
|
15287
15358
|
}());
|
|
15288
15359
|
|