glitch-javascript-sdk 3.4.0 → 3.5.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.
@@ -1,5 +1,9 @@
1
1
  import Route from "./interface";
2
2
  declare class GameShowsRoute {
3
+ /**
4
+ * Canonical API route templates. JSON routes are substituted by
5
+ * Requests.processRoute; multipart methods replace tokens before upload.
6
+ */
3
7
  static routes: {
4
8
  [key: string]: Route;
5
9
  };
package/dist/index.d.ts CHANGED
@@ -6201,11 +6201,29 @@ declare class GameShows {
6201
6201
  * Register a title to a game show.
6202
6202
  */
6203
6203
  static registerTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6204
+ /** List the active ordered custom-question schema used by public registration. */
6205
+ static listRegistrationQuestions<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6206
+ /** List active, inactive, and archived custom questions for organizers. */
6207
+ static manageRegistrationQuestions<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6208
+ /** Create one schema-driven custom developer-registration question. */
6209
+ static createRegistrationQuestion<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6210
+ /** Update wording, validation, visibility, ordering, or stable choices. */
6211
+ static updateRegistrationQuestion<T>(show_id: string, question_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6212
+ /** Archive a question while preserving historical answers and reporting. */
6213
+ static deleteRegistrationQuestion<T>(show_id: string, question_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6214
+ /** Apply the organizer's exact ordered list of question UUIDs. */
6215
+ static reorderRegistrationQuestions<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6216
+ /** Review custom answers grouped by submitted game. */
6217
+ static listRegistrationResponses<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6218
+ /** Retrieve type-aware aggregate reports without exposing free-text values. */
6219
+ static registrationQuestionReports<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6204
6220
  /**
6205
6221
  * Add a title to a game show by admin.
6206
6222
  */
6207
6223
  static addTitle<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6224
+ /** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
6208
6225
  static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6226
+ /** Import valid external registrations after organizer preview. */
6209
6227
  static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6210
6228
  /**
6211
6229
  * List all titles for a game show.
@@ -6283,20 +6301,35 @@ declare class GameShows {
6283
6301
  * List public game shows that include a title. Useful for game-page festival banners.
6284
6302
  */
6285
6303
  static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6304
+ /** List private sponsor workflow, contact, billing, media, and placements. */
6286
6305
  static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6306
+ /** Create a manual sponsor or send a self-service invitation. */
6287
6307
  static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6308
+ /** Retrieve one organizer-authorized festival sponsor. */
6288
6309
  static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6310
+ /** Update sponsor workflow, creative metadata, schedule, or billing terms. */
6289
6311
  static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6312
+ /** Delete an unpaid sponsor and its placements. */
6290
6313
  static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6314
+ /** Replace the private token and resend the sponsor invitation. */
6291
6315
  static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6316
+ /** Add another festival, game, session, or event placement. */
6292
6317
  static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6318
+ /** Partially update an existing sponsor placement. */
6293
6319
  static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6320
+ /** Delete one placement without deleting the sponsor creative. */
6294
6321
  static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6322
+ /** List privacy-limited, publicly eligible creatives and placements. */
6295
6323
  static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6324
+ /** Open a token-protected sponsor portal without a user session. */
6296
6325
  static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6326
+ /** Upload sponsor image/video through the shared Media pipeline. */
6297
6327
  static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6328
+ /** Submit sponsor identity, destination, and accessibility metadata. */
6298
6329
  static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6330
+ /** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
6299
6331
  static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
6332
+ /** Synchronize the same intent after Stripe.js completes required 3DS. */
6300
6333
  static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
6301
6334
  }
6302
6335
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -147,6 +147,46 @@ class GameShows {
147
147
  return Requests.processRoute(GameShowsRoute.routes.registerTitle, data, { show_id: show_id }, params);
148
148
  }
149
149
 
150
+ /** List the active ordered custom-question schema used by public registration. */
151
+ public static listRegistrationQuestions<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
152
+ return Requests.processRoute(GameShowsRoute.routes.listRegistrationQuestions, {}, { show_id: show_id }, params);
153
+ }
154
+
155
+ /** List active, inactive, and archived custom questions for organizers. */
156
+ public static manageRegistrationQuestions<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
157
+ return Requests.processRoute(GameShowsRoute.routes.manageRegistrationQuestions, {}, { show_id: show_id }, params);
158
+ }
159
+
160
+ /** Create one schema-driven custom developer-registration question. */
161
+ public static createRegistrationQuestion<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
162
+ return Requests.processRoute(GameShowsRoute.routes.createRegistrationQuestion, data, { show_id: show_id }, params);
163
+ }
164
+
165
+ /** Update wording, validation, visibility, ordering, or stable choices. */
166
+ public static updateRegistrationQuestion<T>(show_id: string, question_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
167
+ return Requests.processRoute(GameShowsRoute.routes.updateRegistrationQuestion, data, { show_id: show_id, question_id: question_id }, params);
168
+ }
169
+
170
+ /** Archive a question while preserving historical answers and reporting. */
171
+ public static deleteRegistrationQuestion<T>(show_id: string, question_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
172
+ return Requests.processRoute(GameShowsRoute.routes.deleteRegistrationQuestion, {}, { show_id: show_id, question_id: question_id }, params);
173
+ }
174
+
175
+ /** Apply the organizer's exact ordered list of question UUIDs. */
176
+ public static reorderRegistrationQuestions<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
177
+ return Requests.processRoute(GameShowsRoute.routes.reorderRegistrationQuestions, data, { show_id: show_id }, params);
178
+ }
179
+
180
+ /** Review custom answers grouped by submitted game. */
181
+ public static listRegistrationResponses<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
182
+ return Requests.processRoute(GameShowsRoute.routes.listRegistrationResponses, {}, { show_id: show_id }, params);
183
+ }
184
+
185
+ /** Retrieve type-aware aggregate reports without exposing free-text values. */
186
+ public static registrationQuestionReports<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
187
+ return Requests.processRoute(GameShowsRoute.routes.registrationQuestionReports, {}, { show_id: show_id }, params);
188
+ }
189
+
150
190
  /**
151
191
  * Add a title to a game show by admin.
152
192
  */
@@ -154,11 +194,14 @@ class GameShows {
154
194
  return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
155
195
  }
156
196
 
197
+ /** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
157
198
  public static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
199
+ // Multipart helpers require the concrete URL before uploading.
158
200
  const url = GameShowsRoute.routes.previewExternalTitles.url.replace('{show_id}', show_id);
159
201
  return Requests.uploadFile(url, 'file', file, data, params);
160
202
  }
161
203
 
204
+ /** Import valid external registrations after organizer preview. */
162
205
  public static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
163
206
  const url = GameShowsRoute.routes.importExternalTitles.url.replace('{show_id}', show_id);
164
207
  return Requests.uploadFile(url, 'file', file, data, params);
@@ -297,63 +340,79 @@ class GameShows {
297
340
  return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
298
341
  }
299
342
 
343
+ /** List private sponsor workflow, contact, billing, media, and placements. */
300
344
  public static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
301
345
  return Requests.processRoute(GameShowsRoute.routes.listSponsors, {}, { show_id }, params);
302
346
  }
303
347
 
348
+ /** Create a manual sponsor or send a self-service invitation. */
304
349
  public static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
305
350
  return Requests.processRoute(GameShowsRoute.routes.createSponsor, data, { show_id }, params);
306
351
  }
307
352
 
353
+ /** Retrieve one organizer-authorized festival sponsor. */
308
354
  public static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
309
355
  return Requests.processRoute(GameShowsRoute.routes.getSponsor, {}, { show_id, sponsor_id }, params);
310
356
  }
311
357
 
358
+ /** Update sponsor workflow, creative metadata, schedule, or billing terms. */
312
359
  public static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
313
360
  return Requests.processRoute(GameShowsRoute.routes.updateSponsor, data, { show_id, sponsor_id }, params);
314
361
  }
315
362
 
363
+ /** Delete an unpaid sponsor and its placements. */
316
364
  public static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
317
365
  return Requests.processRoute(GameShowsRoute.routes.deleteSponsor, {}, { show_id, sponsor_id }, params);
318
366
  }
319
367
 
368
+ /** Replace the private token and resend the sponsor invitation. */
320
369
  public static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
321
370
  return Requests.processRoute(GameShowsRoute.routes.resendSponsorInvitation, {}, { show_id, sponsor_id }, params);
322
371
  }
323
372
 
373
+ /** Add another festival, game, session, or event placement. */
324
374
  public static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
325
375
  return Requests.processRoute(GameShowsRoute.routes.createSponsorPlacement, data, { show_id, sponsor_id }, params);
326
376
  }
327
377
 
378
+ /** Partially update an existing sponsor placement. */
328
379
  public static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
329
380
  return Requests.processRoute(GameShowsRoute.routes.updateSponsorPlacement, data, { show_id, sponsor_id, placement_id }, params);
330
381
  }
331
382
 
383
+ /** Delete one placement without deleting the sponsor creative. */
332
384
  public static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
333
385
  return Requests.processRoute(GameShowsRoute.routes.deleteSponsorPlacement, {}, { show_id, sponsor_id, placement_id }, params);
334
386
  }
335
387
 
388
+ /** List privacy-limited, publicly eligible creatives and placements. */
336
389
  public static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
337
390
  return Requests.processRoute(GameShowsRoute.routes.listPublicSponsors, {}, { show_id }, params);
338
391
  }
339
392
 
393
+ /** Open a token-protected sponsor portal without a user session. */
340
394
  public static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
341
395
  return Requests.processRoute(GameShowsRoute.routes.sponsorInvitation, {}, { token }, params);
342
396
  }
343
397
 
398
+ /** Upload sponsor image/video through the shared Media pipeline. */
344
399
  public static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
400
+ // Sponsor uploads use the `media` multipart field documented by API.
345
401
  const url = GameShowsRoute.routes.sponsorInvitationUpload.url.replace('{token}', token);
346
402
  return Requests.uploadFile(url, 'media', file, data, params);
347
403
  }
348
404
 
405
+ /** Submit sponsor identity, destination, and accessibility metadata. */
349
406
  public static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
350
407
  return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationSubmit, data, { token }, params);
351
408
  }
352
409
 
410
+ /** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
353
411
  public static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
354
412
  return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationPayment, data, { token }, params);
355
413
  }
356
414
 
415
+ /** Synchronize the same intent after Stripe.js completes required 3DS. */
357
416
  public static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
358
417
  return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token }, params);
359
418
  }
@@ -2,7 +2,10 @@ import Route from "./interface";
2
2
  import HTTP_METHODS from "../constants/HttpMethods";
3
3
 
4
4
  class GameShowsRoute {
5
-
5
+ /**
6
+ * Canonical API route templates. JSON routes are substituted by
7
+ * Requests.processRoute; multipart methods replace tokens before upload.
8
+ */
6
9
  public static routes: { [key: string]: Route } = {
7
10
  list: { url: '/gameshows', method: HTTP_METHODS.GET },
8
11
  create: { url: '/gameshows', method: HTTP_METHODS.POST },
@@ -12,8 +15,18 @@ class GameShowsRoute {
12
15
  uploadLogo : {url : '/gameshows/{show_id}/uploadLogo', method: HTTP_METHODS.POST},
13
16
  uploadBannerImage : {url : '/gameshows/{show_id}/uploadBannerImage', method: HTTP_METHODS.POST},
14
17
  registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
18
+ // Schema-driven developer registration questions and organizer reports.
19
+ listRegistrationQuestions: { url: '/gameshows/{show_id}/registration-questions', method: HTTP_METHODS.GET },
20
+ manageRegistrationQuestions: { url: '/gameshows/{show_id}/registration-form/questions', method: HTTP_METHODS.GET },
21
+ createRegistrationQuestion: { url: '/gameshows/{show_id}/registration-form/questions', method: HTTP_METHODS.POST },
22
+ updateRegistrationQuestion: { url: '/gameshows/{show_id}/registration-form/questions/{question_id}', method: HTTP_METHODS.PUT },
23
+ deleteRegistrationQuestion: { url: '/gameshows/{show_id}/registration-form/questions/{question_id}', method: HTTP_METHODS.DELETE },
24
+ reorderRegistrationQuestions: { url: '/gameshows/{show_id}/registration-form/questions/reorder', method: HTTP_METHODS.POST },
25
+ listRegistrationResponses: { url: '/gameshows/{show_id}/registration-form/responses', method: HTTP_METHODS.GET },
26
+ registrationQuestionReports: { url: '/gameshows/{show_id}/registration-form/reports', method: HTTP_METHODS.GET },
15
27
  listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
16
28
  addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
29
+ // External registration file preview/import endpoints.
17
30
  previewExternalTitles: { url: '/gameshows/{show_id}/external-titles/preview', method: HTTP_METHODS.POST },
18
31
  importExternalTitles: { url: '/gameshows/{show_id}/external-titles/import', method: HTTP_METHODS.POST },
19
32
  viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
@@ -34,6 +47,7 @@ class GameShowsRoute {
34
47
  joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
35
48
  listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
36
49
  listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
50
+ // Organizer sponsor lifecycle and placement administration.
37
51
  listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
38
52
  createSponsor: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.POST },
39
53
  getSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.GET },
@@ -43,7 +57,9 @@ class GameShowsRoute {
43
57
  createSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements', method: HTTP_METHODS.POST },
44
58
  updateSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.PUT },
45
59
  deleteSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.DELETE },
60
+ // Privacy-limited anonymous sponsor inventory.
46
61
  listPublicSponsors: { url: '/gameshows/{show_id}/sponsors/public', method: HTTP_METHODS.GET },
62
+ // Token-protected sponsor self-service; backend applies per-route limits.
47
63
  sponsorInvitation: { url: '/gameshow-sponsor-invitations/{token}', method: HTTP_METHODS.GET },
48
64
  sponsorInvitationUpload: { url: '/gameshow-sponsor-invitations/{token}/media', method: HTTP_METHODS.POST },
49
65
  sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },