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.
@@ -101,6 +101,10 @@ 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
+ /** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
105
+ static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
106
+ /** Import valid external registrations after organizer preview. */
107
+ static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
104
108
  /**
105
109
  * List all titles for a game show.
106
110
  */
@@ -177,5 +181,35 @@ declare class GameShows {
177
181
  * List public game shows that include a title. Useful for game-page festival banners.
178
182
  */
179
183
  static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
184
+ /** List private sponsor workflow, contact, billing, media, and placements. */
185
+ static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
186
+ /** Create a manual sponsor or send a self-service invitation. */
187
+ static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
188
+ /** Retrieve one organizer-authorized festival sponsor. */
189
+ static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
190
+ /** Update sponsor workflow, creative metadata, schedule, or billing terms. */
191
+ static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
192
+ /** Delete an unpaid sponsor and its placements. */
193
+ static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
194
+ /** Replace the private token and resend the sponsor invitation. */
195
+ static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
196
+ /** Add another festival, game, session, or event placement. */
197
+ static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
198
+ /** Partially update an existing sponsor placement. */
199
+ static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
200
+ /** Delete one placement without deleting the sponsor creative. */
201
+ static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
202
+ /** List privacy-limited, publicly eligible creatives and placements. */
203
+ static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
204
+ /** Open a token-protected sponsor portal without a user session. */
205
+ static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
206
+ /** Upload sponsor image/video through the shared Media pipeline. */
207
+ static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
208
+ /** Submit sponsor identity, destination, and accessibility metadata. */
209
+ static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
210
+ /** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
211
+ static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
212
+ /** Synchronize the same intent after Stripe.js completes required 3DS. */
213
+ static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
180
214
  }
181
215
  export default GameShows;
package/dist/esm/index.js CHANGED
@@ -15007,6 +15007,10 @@ var Publications = /** @class */ (function () {
15007
15007
  var GameShowsRoute = /** @class */ (function () {
15008
15008
  function GameShowsRoute() {
15009
15009
  }
15010
+ /**
15011
+ * Canonical API route templates. JSON routes are substituted by
15012
+ * Requests.processRoute; multipart methods replace tokens before upload.
15013
+ */
15010
15014
  GameShowsRoute.routes = {
15011
15015
  list: { url: '/gameshows', method: HTTP_METHODS.GET },
15012
15016
  create: { url: '/gameshows', method: HTTP_METHODS.POST },
@@ -15018,6 +15022,9 @@ var GameShowsRoute = /** @class */ (function () {
15018
15022
  registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
15019
15023
  listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
15020
15024
  addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
15025
+ // External registration file preview/import endpoints.
15026
+ previewExternalTitles: { url: '/gameshows/{show_id}/external-titles/preview', method: HTTP_METHODS.POST },
15027
+ importExternalTitles: { url: '/gameshows/{show_id}/external-titles/import', method: HTTP_METHODS.POST },
15021
15028
  viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
15022
15029
  updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
15023
15030
  deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
@@ -15036,6 +15043,24 @@ var GameShowsRoute = /** @class */ (function () {
15036
15043
  joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
15037
15044
  listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
15038
15045
  listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
15046
+ // Organizer sponsor lifecycle and placement administration.
15047
+ listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
15048
+ createSponsor: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.POST },
15049
+ getSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.GET },
15050
+ updateSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.PUT },
15051
+ deleteSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.DELETE },
15052
+ resendSponsorInvitation: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/invite', method: HTTP_METHODS.POST },
15053
+ createSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements', method: HTTP_METHODS.POST },
15054
+ updateSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.PUT },
15055
+ deleteSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.DELETE },
15056
+ // Privacy-limited anonymous sponsor inventory.
15057
+ listPublicSponsors: { url: '/gameshows/{show_id}/sponsors/public', method: HTTP_METHODS.GET },
15058
+ // Token-protected sponsor self-service; backend applies per-route limits.
15059
+ sponsorInvitation: { url: '/gameshow-sponsor-invitations/{token}', method: HTTP_METHODS.GET },
15060
+ sponsorInvitationUpload: { url: '/gameshow-sponsor-invitations/{token}/media', method: HTTP_METHODS.POST },
15061
+ sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
15062
+ sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
15063
+ sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
15039
15064
  };
15040
15065
  return GameShowsRoute;
15041
15066
  }());
@@ -15169,6 +15194,17 @@ var GameShows = /** @class */ (function () {
15169
15194
  GameShows.addTitle = function (show_id, data, params) {
15170
15195
  return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
15171
15196
  };
15197
+ /** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
15198
+ GameShows.previewExternalTitles = function (show_id, file, data, params) {
15199
+ // Multipart helpers require the concrete URL before uploading.
15200
+ var url = GameShowsRoute.routes.previewExternalTitles.url.replace('{show_id}', show_id);
15201
+ return Requests.uploadFile(url, 'file', file, data, params);
15202
+ };
15203
+ /** Import valid external registrations after organizer preview. */
15204
+ GameShows.importExternalTitles = function (show_id, file, data, params) {
15205
+ var url = GameShowsRoute.routes.importExternalTitles.url.replace('{show_id}', show_id);
15206
+ return Requests.uploadFile(url, 'file', file, data, params);
15207
+ };
15172
15208
  /**
15173
15209
  * List all titles for a game show.
15174
15210
  */
@@ -15283,6 +15319,68 @@ var GameShows = /** @class */ (function () {
15283
15319
  GameShows.listForTitle = function (title_id, params) {
15284
15320
  return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
15285
15321
  };
15322
+ /** List private sponsor workflow, contact, billing, media, and placements. */
15323
+ GameShows.listSponsors = function (show_id, params) {
15324
+ return Requests.processRoute(GameShowsRoute.routes.listSponsors, {}, { show_id: show_id }, params);
15325
+ };
15326
+ /** Create a manual sponsor or send a self-service invitation. */
15327
+ GameShows.createSponsor = function (show_id, data, params) {
15328
+ return Requests.processRoute(GameShowsRoute.routes.createSponsor, data, { show_id: show_id }, params);
15329
+ };
15330
+ /** Retrieve one organizer-authorized festival sponsor. */
15331
+ GameShows.getSponsor = function (show_id, sponsor_id, params) {
15332
+ return Requests.processRoute(GameShowsRoute.routes.getSponsor, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
15333
+ };
15334
+ /** Update sponsor workflow, creative metadata, schedule, or billing terms. */
15335
+ GameShows.updateSponsor = function (show_id, sponsor_id, data, params) {
15336
+ return Requests.processRoute(GameShowsRoute.routes.updateSponsor, data, { show_id: show_id, sponsor_id: sponsor_id }, params);
15337
+ };
15338
+ /** Delete an unpaid sponsor and its placements. */
15339
+ GameShows.deleteSponsor = function (show_id, sponsor_id, params) {
15340
+ return Requests.processRoute(GameShowsRoute.routes.deleteSponsor, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
15341
+ };
15342
+ /** Replace the private token and resend the sponsor invitation. */
15343
+ GameShows.resendSponsorInvitation = function (show_id, sponsor_id, params) {
15344
+ return Requests.processRoute(GameShowsRoute.routes.resendSponsorInvitation, {}, { show_id: show_id, sponsor_id: sponsor_id }, params);
15345
+ };
15346
+ /** Add another festival, game, session, or event placement. */
15347
+ GameShows.createSponsorPlacement = function (show_id, sponsor_id, data, params) {
15348
+ return Requests.processRoute(GameShowsRoute.routes.createSponsorPlacement, data, { show_id: show_id, sponsor_id: sponsor_id }, params);
15349
+ };
15350
+ /** Partially update an existing sponsor placement. */
15351
+ GameShows.updateSponsorPlacement = function (show_id, sponsor_id, placement_id, data, params) {
15352
+ return Requests.processRoute(GameShowsRoute.routes.updateSponsorPlacement, data, { show_id: show_id, sponsor_id: sponsor_id, placement_id: placement_id }, params);
15353
+ };
15354
+ /** Delete one placement without deleting the sponsor creative. */
15355
+ GameShows.deleteSponsorPlacement = function (show_id, sponsor_id, placement_id, params) {
15356
+ return Requests.processRoute(GameShowsRoute.routes.deleteSponsorPlacement, {}, { show_id: show_id, sponsor_id: sponsor_id, placement_id: placement_id }, params);
15357
+ };
15358
+ /** List privacy-limited, publicly eligible creatives and placements. */
15359
+ GameShows.listPublicSponsors = function (show_id, params) {
15360
+ return Requests.processRoute(GameShowsRoute.routes.listPublicSponsors, {}, { show_id: show_id }, params);
15361
+ };
15362
+ /** Open a token-protected sponsor portal without a user session. */
15363
+ GameShows.sponsorInvitation = function (token, params) {
15364
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitation, {}, { token: token }, params);
15365
+ };
15366
+ /** Upload sponsor image/video through the shared Media pipeline. */
15367
+ GameShows.uploadSponsorInvitationMedia = function (token, file, data, params) {
15368
+ // Sponsor uploads use the `media` multipart field documented by API.
15369
+ var url = GameShowsRoute.routes.sponsorInvitationUpload.url.replace('{token}', token);
15370
+ return Requests.uploadFile(url, 'media', file, data, params);
15371
+ };
15372
+ /** Submit sponsor identity, destination, and accessibility metadata. */
15373
+ GameShows.submitSponsorInvitation = function (token, data, params) {
15374
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationSubmit, data, { token: token }, params);
15375
+ };
15376
+ /** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
15377
+ GameShows.paySponsorInvitation = function (token, data, params) {
15378
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationPayment, data, { token: token }, params);
15379
+ };
15380
+ /** Synchronize the same intent after Stripe.js completes required 3DS. */
15381
+ GameShows.confirmSponsorInvitationPayment = function (token, params) {
15382
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token: token }, params);
15383
+ };
15286
15384
  return GameShows;
15287
15385
  }());
15288
15386