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
|
@@ -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
|
@@ -6205,6 +6205,10 @@ 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
|
+
/** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
|
|
6209
|
+
static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6210
|
+
/** Import valid external registrations after organizer preview. */
|
|
6211
|
+
static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6208
6212
|
/**
|
|
6209
6213
|
* List all titles for a game show.
|
|
6210
6214
|
*/
|
|
@@ -6281,6 +6285,36 @@ declare class GameShows {
|
|
|
6281
6285
|
* List public game shows that include a title. Useful for game-page festival banners.
|
|
6282
6286
|
*/
|
|
6283
6287
|
static listForTitle<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6288
|
+
/** List private sponsor workflow, contact, billing, media, and placements. */
|
|
6289
|
+
static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6290
|
+
/** Create a manual sponsor or send a self-service invitation. */
|
|
6291
|
+
static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6292
|
+
/** Retrieve one organizer-authorized festival sponsor. */
|
|
6293
|
+
static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6294
|
+
/** Update sponsor workflow, creative metadata, schedule, or billing terms. */
|
|
6295
|
+
static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6296
|
+
/** Delete an unpaid sponsor and its placements. */
|
|
6297
|
+
static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6298
|
+
/** Replace the private token and resend the sponsor invitation. */
|
|
6299
|
+
static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6300
|
+
/** Add another festival, game, session, or event placement. */
|
|
6301
|
+
static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6302
|
+
/** Partially update an existing sponsor placement. */
|
|
6303
|
+
static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6304
|
+
/** Delete one placement without deleting the sponsor creative. */
|
|
6305
|
+
static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6306
|
+
/** List privacy-limited, publicly eligible creatives and placements. */
|
|
6307
|
+
static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6308
|
+
/** Open a token-protected sponsor portal without a user session. */
|
|
6309
|
+
static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6310
|
+
/** Upload sponsor image/video through the shared Media pipeline. */
|
|
6311
|
+
static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6312
|
+
/** Submit sponsor identity, destination, and accessibility metadata. */
|
|
6313
|
+
static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6314
|
+
/** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
|
|
6315
|
+
static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6316
|
+
/** Synchronize the same intent after Stripe.js completes required 3DS. */
|
|
6317
|
+
static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6284
6318
|
}
|
|
6285
6319
|
|
|
6286
6320
|
declare class Newsletters {
|
package/package.json
CHANGED
package/src/api/GameShows.ts
CHANGED
|
@@ -154,6 +154,19 @@ class GameShows {
|
|
|
154
154
|
return Requests.processRoute(GameShowsRoute.routes.addTitle, data, { show_id: show_id }, params);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
/** Preview CSV/TSV/TXT/ZIP registrations without writing showcase data. */
|
|
158
|
+
public static previewExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
159
|
+
// Multipart helpers require the concrete URL before uploading.
|
|
160
|
+
const url = GameShowsRoute.routes.previewExternalTitles.url.replace('{show_id}', show_id);
|
|
161
|
+
return Requests.uploadFile(url, 'file', file, data, params);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Import valid external registrations after organizer preview. */
|
|
165
|
+
public static importExternalTitles<T>(show_id: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
166
|
+
const url = GameShowsRoute.routes.importExternalTitles.url.replace('{show_id}', show_id);
|
|
167
|
+
return Requests.uploadFile(url, 'file', file, data, params);
|
|
168
|
+
}
|
|
169
|
+
|
|
157
170
|
/**
|
|
158
171
|
* List all titles for a game show.
|
|
159
172
|
*/
|
|
@@ -287,6 +300,83 @@ class GameShows {
|
|
|
287
300
|
return Requests.processRoute(GameShowsRoute.routes.listForTitle, {}, { title_id: title_id }, params);
|
|
288
301
|
}
|
|
289
302
|
|
|
303
|
+
/** List private sponsor workflow, contact, billing, media, and placements. */
|
|
304
|
+
public static listSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
305
|
+
return Requests.processRoute(GameShowsRoute.routes.listSponsors, {}, { show_id }, params);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/** Create a manual sponsor or send a self-service invitation. */
|
|
309
|
+
public static createSponsor<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
310
|
+
return Requests.processRoute(GameShowsRoute.routes.createSponsor, data, { show_id }, params);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** Retrieve one organizer-authorized festival sponsor. */
|
|
314
|
+
public static getSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
315
|
+
return Requests.processRoute(GameShowsRoute.routes.getSponsor, {}, { show_id, sponsor_id }, params);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** Update sponsor workflow, creative metadata, schedule, or billing terms. */
|
|
319
|
+
public static updateSponsor<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
320
|
+
return Requests.processRoute(GameShowsRoute.routes.updateSponsor, data, { show_id, sponsor_id }, params);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** Delete an unpaid sponsor and its placements. */
|
|
324
|
+
public static deleteSponsor<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
325
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteSponsor, {}, { show_id, sponsor_id }, params);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/** Replace the private token and resend the sponsor invitation. */
|
|
329
|
+
public static resendSponsorInvitation<T>(show_id: string, sponsor_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
330
|
+
return Requests.processRoute(GameShowsRoute.routes.resendSponsorInvitation, {}, { show_id, sponsor_id }, params);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** Add another festival, game, session, or event placement. */
|
|
334
|
+
public static createSponsorPlacement<T>(show_id: string, sponsor_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
335
|
+
return Requests.processRoute(GameShowsRoute.routes.createSponsorPlacement, data, { show_id, sponsor_id }, params);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** Partially update an existing sponsor placement. */
|
|
339
|
+
public static updateSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
340
|
+
return Requests.processRoute(GameShowsRoute.routes.updateSponsorPlacement, data, { show_id, sponsor_id, placement_id }, params);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** Delete one placement without deleting the sponsor creative. */
|
|
344
|
+
public static deleteSponsorPlacement<T>(show_id: string, sponsor_id: string, placement_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
345
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteSponsorPlacement, {}, { show_id, sponsor_id, placement_id }, params);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/** List privacy-limited, publicly eligible creatives and placements. */
|
|
349
|
+
public static listPublicSponsors<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
350
|
+
return Requests.processRoute(GameShowsRoute.routes.listPublicSponsors, {}, { show_id }, params);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** Open a token-protected sponsor portal without a user session. */
|
|
354
|
+
public static sponsorInvitation<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
355
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitation, {}, { token }, params);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** Upload sponsor image/video through the shared Media pipeline. */
|
|
359
|
+
public static uploadSponsorInvitationMedia<T>(token: string, file: File, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
360
|
+
// Sponsor uploads use the `media` multipart field documented by API.
|
|
361
|
+
const url = GameShowsRoute.routes.sponsorInvitationUpload.url.replace('{token}', token);
|
|
362
|
+
return Requests.uploadFile(url, 'media', file, data, params);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
/** Submit sponsor identity, destination, and accessibility metadata. */
|
|
366
|
+
public static submitSponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
367
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationSubmit, data, { token }, params);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/** Create/confirm a destination PaymentIntent from a PaymentMethod ID. */
|
|
371
|
+
public static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
372
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationPayment, data, { token }, params);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/** Synchronize the same intent after Stripe.js completes required 3DS. */
|
|
376
|
+
public static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
377
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token }, params);
|
|
378
|
+
}
|
|
379
|
+
|
|
290
380
|
}
|
|
291
381
|
|
|
292
382
|
export default GameShows;
|
|
@@ -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 },
|
|
@@ -14,6 +17,9 @@ class GameShowsRoute {
|
|
|
14
17
|
registerTitle: { url: '/gameshows/{show_id}/registerTitle', method: HTTP_METHODS.POST },
|
|
15
18
|
listTitles: { url: '/gameshows/{show_id}/titles', method: HTTP_METHODS.GET },
|
|
16
19
|
addTitle: { url: '/gameshows/{show_id}/addTitle', method: HTTP_METHODS.POST },
|
|
20
|
+
// External registration file preview/import endpoints.
|
|
21
|
+
previewExternalTitles: { url: '/gameshows/{show_id}/external-titles/preview', method: HTTP_METHODS.POST },
|
|
22
|
+
importExternalTitles: { url: '/gameshows/{show_id}/external-titles/import', method: HTTP_METHODS.POST },
|
|
17
23
|
viewTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.GET },
|
|
18
24
|
updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
19
25
|
deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
@@ -32,6 +38,24 @@ class GameShowsRoute {
|
|
|
32
38
|
joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
|
|
33
39
|
listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
|
|
34
40
|
listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
|
|
41
|
+
// Organizer sponsor lifecycle and placement administration.
|
|
42
|
+
listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
|
|
43
|
+
createSponsor: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.POST },
|
|
44
|
+
getSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.GET },
|
|
45
|
+
updateSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.PUT },
|
|
46
|
+
deleteSponsor: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}', method: HTTP_METHODS.DELETE },
|
|
47
|
+
resendSponsorInvitation: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/invite', method: HTTP_METHODS.POST },
|
|
48
|
+
createSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements', method: HTTP_METHODS.POST },
|
|
49
|
+
updateSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.PUT },
|
|
50
|
+
deleteSponsorPlacement: { url: '/gameshows/{show_id}/sponsors/{sponsor_id}/placements/{placement_id}', method: HTTP_METHODS.DELETE },
|
|
51
|
+
// Privacy-limited anonymous sponsor inventory.
|
|
52
|
+
listPublicSponsors: { url: '/gameshows/{show_id}/sponsors/public', method: HTTP_METHODS.GET },
|
|
53
|
+
// Token-protected sponsor self-service; backend applies per-route limits.
|
|
54
|
+
sponsorInvitation: { url: '/gameshow-sponsor-invitations/{token}', method: HTTP_METHODS.GET },
|
|
55
|
+
sponsorInvitationUpload: { url: '/gameshow-sponsor-invitations/{token}/media', method: HTTP_METHODS.POST },
|
|
56
|
+
sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
|
|
57
|
+
sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
|
|
58
|
+
sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
|
|
35
59
|
};
|
|
36
60
|
|
|
37
61
|
}
|