glitch-javascript-sdk 3.3.6 → 3.4.1
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 +98 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameShows.d.ts +34 -0
- package/dist/esm/index.js +98 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/GameShowsRoute.d.ts +4 -0
- package/dist/index.d.ts +34 -0
- package/package.json +1 -1
- package/src/api/GameShows.ts +90 -0
- package/src/routes/GameShowsRoute.ts +25 -1
package/dist/cjs/index.js
CHANGED
|
@@ -27005,6 +27005,10 @@ var Publications = /** @class */ (function () {
|
|
|
27005
27005
|
var GameShowsRoute = /** @class */ (function () {
|
|
27006
27006
|
function GameShowsRoute() {
|
|
27007
27007
|
}
|
|
27008
|
+
/**
|
|
27009
|
+
* Canonical API route templates. JSON routes are substituted by
|
|
27010
|
+
* Requests.processRoute; multipart methods replace tokens before upload.
|
|
27011
|
+
*/
|
|
27008
27012
|
GameShowsRoute.routes = {
|
|
27009
27013
|
list: { url: '/gameshows', method: HTTP_METHODS.GET },
|
|
27010
27014
|
create: { url: '/gameshows', method: HTTP_METHODS.POST },
|
|
@@ -27016,6 +27020,9 @@ var GameShowsRoute = /** @class */ (function () {
|
|
|
27016
27020
|
registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
|
|
27017
27021
|
listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
|
|
27018
27022
|
addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
|
|
27023
|
+
// External registration file preview/import endpoints.
|
|
27024
|
+
previewExternalTitles: { url: '/gameshows/{show_id}/external-titles/preview', method: HTTP_METHODS.POST },
|
|
27025
|
+
importExternalTitles: { url: '/gameshows/{show_id}/external-titles/import', method: HTTP_METHODS.POST },
|
|
27019
27026
|
viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
|
|
27020
27027
|
updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
27021
27028
|
deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
@@ -27034,6 +27041,24 @@ var GameShowsRoute = /** @class */ (function () {
|
|
|
27034
27041
|
joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
|
|
27035
27042
|
listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
|
|
27036
27043
|
listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
|
|
27044
|
+
// Organizer sponsor lifecycle and placement administration.
|
|
27045
|
+
listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
|
|
27046
|
+
createSponsor: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.POST },
|
|
27047
|
+
getSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.GET },
|
|
27048
|
+
updateSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.PUT },
|
|
27049
|
+
deleteSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.DELETE },
|
|
27050
|
+
resendSponsorInvitation: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/invite', method: HTTP_METHODS.POST },
|
|
27051
|
+
createSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements', method: HTTP_METHODS.POST },
|
|
27052
|
+
updateSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.PUT },
|
|
27053
|
+
deleteSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.DELETE },
|
|
27054
|
+
// Privacy-limited anonymous sponsor inventory.
|
|
27055
|
+
listPublicSponsors: { url: '/gameshows/{show_id}/sponsors/public', method: HTTP_METHODS.GET },
|
|
27056
|
+
// Token-protected sponsor self-service; backend applies per-route limits.
|
|
27057
|
+
sponsorInvitation: { url: '/gameshow-sponsor-invitations/{token}', method: HTTP_METHODS.GET },
|
|
27058
|
+
sponsorInvitationUpload: { url: '/gameshow-sponsor-invitations/{token}/media', method: HTTP_METHODS.POST },
|
|
27059
|
+
sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
|
|
27060
|
+
sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
|
|
27061
|
+
sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
|
|
27037
27062
|
};
|
|
27038
27063
|
return GameShowsRoute;
|
|
27039
27064
|
}());
|
|
@@ -27167,6 +27192,17 @@ var GameShows = /** @class */ (function () {
|
|
|
27167
27192
|
GameShows.addTitle = function (show_id, data, params) {
|
|
27168
27193
|
return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
|
|
27169
27194
|
};
|
|
27195
|
+
/** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
|
|
27196
|
+
GameShows.previewExternalTitles = function (show_id, file, data, params) {
|
|
27197
|
+
// Multipart helpers require the concrete URL before uploading.
|
|
27198
|
+
var url = GameShowsRoute.routes.previewExternalTitles.url.replace('{show_id}', show_id);
|
|
27199
|
+
return Requests.uploadFile(url, 'file', file, data, params);
|
|
27200
|
+
};
|
|
27201
|
+
/** Import valid external registrations after organizer preview. */
|
|
27202
|
+
GameShows.importExternalTitles = function (show_id, file, data, params) {
|
|
27203
|
+
var url = GameShowsRoute.routes.importExternalTitles.url.replace('{show_id}', show_id);
|
|
27204
|
+
return Requests.uploadFile(url, 'file', file, data, params);
|
|
27205
|
+
};
|
|
27170
27206
|
/**
|
|
27171
27207
|
* List all titles for a game show.
|
|
27172
27208
|
*/
|
|
@@ -27281,6 +27317,68 @@ var GameShows = /** @class */ (function () {
|
|
|
27281
27317
|
GameShows.listForTitle = function (title_id, params) {
|
|
27282
27318
|
return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
|
|
27283
27319
|
};
|
|
27320
|
+
/** List private sponsor workflow, contact, billing, media, and placements. */
|
|
27321
|
+
GameShows.listSponsors = function (show_id, params) {
|
|
27322
|
+
return Requests.processRoute(GameShowsRoute.routes.listSponsors, {}, { show_id: show_id }, params);
|
|
27323
|
+
};
|
|
27324
|
+
/** Create a manual sponsor or send a self-service invitation. */
|
|
27325
|
+
GameShows.createSponsor = function (show_id, data, params) {
|
|
27326
|
+
return Requests.processRoute(GameShowsRoute.routes.createSponsor, data, { show_id: show_id }, params);
|
|
27327
|
+
};
|
|
27328
|
+
/** Retrieve one organizer-authorized festival sponsor. */
|
|
27329
|
+
GameShows.getSponsor = function (show_id, sponsor_id, params) {
|
|
27330
|
+
return Requests.processRoute(GameShowsRoute.routes.getSponsor, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
27331
|
+
};
|
|
27332
|
+
/** Update sponsor workflow, creative metadata, schedule, or billing terms. */
|
|
27333
|
+
GameShows.updateSponsor = function (show_id, sponsor_id, data, params) {
|
|
27334
|
+
return Requests.processRoute(GameShowsRoute.routes.updateSponsor, data, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
27335
|
+
};
|
|
27336
|
+
/** Delete an unpaid sponsor and its placements. */
|
|
27337
|
+
GameShows.deleteSponsor = function (show_id, sponsor_id, params) {
|
|
27338
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteSponsor, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
27339
|
+
};
|
|
27340
|
+
/** Replace the private token and resend the sponsor invitation. */
|
|
27341
|
+
GameShows.resendSponsorInvitation = function (show_id, sponsor_id, params) {
|
|
27342
|
+
return Requests.processRoute(GameShowsRoute.routes.resendSponsorInvitation, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
27343
|
+
};
|
|
27344
|
+
/** Add another festival, game, session, or event placement. */
|
|
27345
|
+
GameShows.createSponsorPlacement = function (show_id, sponsor_id, data, params) {
|
|
27346
|
+
return Requests.processRoute(GameShowsRoute.routes.createSponsorPlacement, data, { show_id: show_id, sponsor_id: sponsor_id }, params);
|
|
27347
|
+
};
|
|
27348
|
+
/** Partially update an existing sponsor placement. */
|
|
27349
|
+
GameShows.updateSponsorPlacement = function (show_id, sponsor_id, placement_id, data, params) {
|
|
27350
|
+
return Requests.processRoute(GameShowsRoute.routes.updateSponsorPlacement, data, { show_id: show_id, sponsor_id: sponsor_id, placement_id: placement_id }, params);
|
|
27351
|
+
};
|
|
27352
|
+
/** Delete one placement without deleting the sponsor creative. */
|
|
27353
|
+
GameShows.deleteSponsorPlacement = function (show_id, sponsor_id, placement_id, params) {
|
|
27354
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteSponsorPlacement, {}, { show_id: show_id, sponsor_id: sponsor_id, placement_id: placement_id }, params);
|
|
27355
|
+
};
|
|
27356
|
+
/** List privacy-limited, publicly eligible creatives and placements. */
|
|
27357
|
+
GameShows.listPublicSponsors = function (show_id, params) {
|
|
27358
|
+
return Requests.processRoute(GameShowsRoute.routes.listPublicSponsors, {}, { show_id: show_id }, params);
|
|
27359
|
+
};
|
|
27360
|
+
/** Open a token-protected sponsor portal without a user session. */
|
|
27361
|
+
GameShows.sponsorInvitation = function (token, params) {
|
|
27362
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitation, {}, { token: token }, params);
|
|
27363
|
+
};
|
|
27364
|
+
/** Upload sponsor image/video through the shared Media pipeline. */
|
|
27365
|
+
GameShows.uploadSponsorInvitationMedia = function (token, file, data, params) {
|
|
27366
|
+
// Sponsor uploads use the `media` multipart field documented by API.
|
|
27367
|
+
var url = GameShowsRoute.routes.sponsorInvitationUpload.url.replace('{token}', token);
|
|
27368
|
+
return Requests.uploadFile(url, 'media', file, data, params);
|
|
27369
|
+
};
|
|
27370
|
+
/** Submit sponsor identity, destination, and accessibility metadata. */
|
|
27371
|
+
GameShows.submitSponsorInvitation = function (token, data, params) {
|
|
27372
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationSubmit, data, { token: token }, params);
|
|
27373
|
+
};
|
|
27374
|
+
/** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
|
|
27375
|
+
GameShows.paySponsorInvitation = function (token, data, params) {
|
|
27376
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationPayment, data, { token: token }, params);
|
|
27377
|
+
};
|
|
27378
|
+
/** Synchronize the same intent after Stripe.js completes required 3DS. */
|
|
27379
|
+
GameShows.confirmSponsorInvitationPayment = function (token, params) {
|
|
27380
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token: token }, params);
|
|
27381
|
+
};
|
|
27284
27382
|
return GameShows;
|
|
27285
27383
|
}());
|
|
27286
27384
|
|