glitch-javascript-sdk 3.7.0 → 3.8.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 +82 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameShows.d.ts +34 -0
- package/dist/esm/index.js +82 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +34 -0
- package/package.json +1 -1
- package/src/api/GameShows.ts +80 -0
- package/src/routes/GameShowsRoute.ts +17 -0
package/dist/index.d.ts
CHANGED
|
@@ -6351,6 +6351,32 @@ declare class GameShows {
|
|
|
6351
6351
|
* List notification signups for a game show. Requires organizer permissions.
|
|
6352
6352
|
*/
|
|
6353
6353
|
static listWishlist<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6354
|
+
/** List the anonymous, published festival award/prize/swag catalog. */
|
|
6355
|
+
static listPublicRewards<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6356
|
+
/** Retrieve one SSR-ready public festival reward. */
|
|
6357
|
+
static getPublicReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6358
|
+
/** Retrieve a privacy-safe public game leaderboard for one reward. */
|
|
6359
|
+
static getPublicRewardLeaderboard<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6360
|
+
/** List drafts, sponsor items, inventory, recipients, and fulfillment for organizers. */
|
|
6361
|
+
static manageRewards<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6362
|
+
/** Claim an eligible attendee, entrant, points, or previously awarded festival reward. */
|
|
6363
|
+
static claimReward<T>(show_id: string, reward_id: string, data?: {
|
|
6364
|
+
title_id?: string;
|
|
6365
|
+
}, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6366
|
+
/** Create an organizer-controlled festival award, prize, swag item, or reward. */
|
|
6367
|
+
static createReward<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6368
|
+
/** Update publication, eligibility, metrics, inventory, or rich content. */
|
|
6369
|
+
static updateReward<T>(show_id: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6370
|
+
/** Soft-delete one festival reward. */
|
|
6371
|
+
static deleteReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6372
|
+
/** Preview the organizer-only game or attendee performance leaderboard. */
|
|
6373
|
+
static rewardLeaderboard<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6374
|
+
/** Snapshot current metric leaders as reward recipients. */
|
|
6375
|
+
static autoAwardReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6376
|
+
/** Add a manual nominee, winner, honoree, claimant, or fulfillment record. */
|
|
6377
|
+
static addRewardRecipient<T>(show_id: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6378
|
+
/** Update judging, claim, revocation, rank, or fulfillment state. */
|
|
6379
|
+
static updateRewardRecipient<T>(show_id: string, reward_id: string, recipient_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6354
6380
|
/**
|
|
6355
6381
|
* List public game shows that include a title. Useful for game-page festival banners.
|
|
6356
6382
|
*/
|
|
@@ -6402,6 +6428,14 @@ declare class GameShows {
|
|
|
6402
6428
|
static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6403
6429
|
/** Synchronize the same intent after Stripe.js completes required 3DS. */
|
|
6404
6430
|
static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6431
|
+
/** List awards, prizes, and swag owned by a sponsor invitation. */
|
|
6432
|
+
static sponsorInvitationRewards<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6433
|
+
/** Create a draft sponsor-owned award, prize, or swag item. */
|
|
6434
|
+
static createSponsorInvitationReward<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6435
|
+
/** Update sponsor-owned reward content and eligibility. */
|
|
6436
|
+
static updateSponsorInvitationReward<T>(token: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6437
|
+
/** Remove a sponsor-owned draft reward. */
|
|
6438
|
+
static deleteSponsorInvitationReward<T>(token: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6405
6439
|
}
|
|
6406
6440
|
|
|
6407
6441
|
declare class Newsletters {
|
package/package.json
CHANGED
package/src/api/GameShows.ts
CHANGED
|
@@ -348,6 +348,66 @@ class GameShows {
|
|
|
348
348
|
return Requests.processRoute(GameShowsRoute.routes.listWishlist, {}, { show_id: show_id }, params);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
/** List the anonymous, published festival award/prize/swag catalog. */
|
|
352
|
+
public static listPublicRewards<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
353
|
+
return Requests.processRoute(GameShowsRoute.routes.listPublicRewards, {}, { show_id }, params);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/** Retrieve one SSR-ready public festival reward. */
|
|
357
|
+
public static getPublicReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
358
|
+
return Requests.processRoute(GameShowsRoute.routes.getPublicReward, {}, { show_id, reward_id }, params);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/** Retrieve a privacy-safe public game leaderboard for one reward. */
|
|
362
|
+
public static getPublicRewardLeaderboard<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
363
|
+
return Requests.processRoute(GameShowsRoute.routes.getPublicRewardLeaderboard, {}, { show_id, reward_id }, params);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/** List drafts, sponsor items, inventory, recipients, and fulfillment for organizers. */
|
|
367
|
+
public static manageRewards<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
368
|
+
return Requests.processRoute(GameShowsRoute.routes.manageRewards, {}, { show_id }, params);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/** Claim an eligible attendee, entrant, points, or previously awarded festival reward. */
|
|
372
|
+
public static claimReward<T>(show_id: string, reward_id: string, data: { title_id?: string } = {}, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
373
|
+
return Requests.processRoute(GameShowsRoute.routes.claimReward, data, { show_id, reward_id }, params);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/** Create an organizer-controlled festival award, prize, swag item, or reward. */
|
|
377
|
+
public static createReward<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
378
|
+
return Requests.processRoute(GameShowsRoute.routes.createReward, data, { show_id }, params);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** Update publication, eligibility, metrics, inventory, or rich content. */
|
|
382
|
+
public static updateReward<T>(show_id: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
383
|
+
return Requests.processRoute(GameShowsRoute.routes.updateReward, data, { show_id, reward_id }, params);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/** Soft-delete one festival reward. */
|
|
387
|
+
public static deleteReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
388
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteReward, {}, { show_id, reward_id }, params);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/** Preview the organizer-only game or attendee performance leaderboard. */
|
|
392
|
+
public static rewardLeaderboard<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
393
|
+
return Requests.processRoute(GameShowsRoute.routes.rewardLeaderboard, {}, { show_id, reward_id }, params);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** Snapshot current metric leaders as reward recipients. */
|
|
397
|
+
public static autoAwardReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
398
|
+
return Requests.processRoute(GameShowsRoute.routes.autoAwardReward, {}, { show_id, reward_id }, params);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/** Add a manual nominee, winner, honoree, claimant, or fulfillment record. */
|
|
402
|
+
public static addRewardRecipient<T>(show_id: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
403
|
+
return Requests.processRoute(GameShowsRoute.routes.addRewardRecipient, data, { show_id, reward_id }, params);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/** Update judging, claim, revocation, rank, or fulfillment state. */
|
|
407
|
+
public static updateRewardRecipient<T>(show_id: string, reward_id: string, recipient_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
408
|
+
return Requests.processRoute(GameShowsRoute.routes.updateRewardRecipient, data, { show_id, reward_id, recipient_id }, params);
|
|
409
|
+
}
|
|
410
|
+
|
|
351
411
|
/**
|
|
352
412
|
* List public game shows that include a title. Useful for game-page festival banners.
|
|
353
413
|
*/
|
|
@@ -457,6 +517,26 @@ class GameShows {
|
|
|
457
517
|
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token }, params);
|
|
458
518
|
}
|
|
459
519
|
|
|
520
|
+
/** List awards, prizes, and swag owned by a sponsor invitation. */
|
|
521
|
+
public static sponsorInvitationRewards<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
522
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationRewards, {}, { token }, params);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/** Create a draft sponsor-owned award, prize, or swag item. */
|
|
526
|
+
public static createSponsorInvitationReward<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
527
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationCreateReward, data, { token }, params);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** Update sponsor-owned reward content and eligibility. */
|
|
531
|
+
public static updateSponsorInvitationReward<T>(token: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
532
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationUpdateReward, data, { token, reward_id }, params);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/** Remove a sponsor-owned draft reward. */
|
|
536
|
+
public static deleteSponsorInvitationReward<T>(token: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
537
|
+
return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationDeleteReward, {}, { token, reward_id }, params);
|
|
538
|
+
}
|
|
539
|
+
|
|
460
540
|
}
|
|
461
541
|
|
|
462
542
|
export default GameShows;
|
|
@@ -53,6 +53,19 @@ class GameShowsRoute {
|
|
|
53
53
|
joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
|
|
54
54
|
confirmWishlist: { url: '/gameshows/wishlist/confirm/{token}', method: HTTP_METHODS.GET },
|
|
55
55
|
listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
|
|
56
|
+
// Festival awards, prizes, swag, metric leaderboards, and recipients.
|
|
57
|
+
listPublicRewards: { url: '/gameshows/{show_id}/rewards', method: HTTP_METHODS.GET },
|
|
58
|
+
getPublicReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.GET },
|
|
59
|
+
getPublicRewardLeaderboard: { url: '/gameshows/{show_id}/rewards/{reward_id}/leaderboard/public', method: HTTP_METHODS.GET },
|
|
60
|
+
manageRewards: { url: '/gameshows/{show_id}/rewards/manage', method: HTTP_METHODS.GET },
|
|
61
|
+
claimReward: { url: '/gameshows/{show_id}/rewards/{reward_id}/claim', method: HTTP_METHODS.POST },
|
|
62
|
+
createReward: { url: '/gameshows/{show_id}/rewards', method: HTTP_METHODS.POST },
|
|
63
|
+
updateReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.PUT },
|
|
64
|
+
deleteReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.DELETE },
|
|
65
|
+
rewardLeaderboard: { url: '/gameshows/{show_id}/rewards/{reward_id}/leaderboard', method: HTTP_METHODS.GET },
|
|
66
|
+
autoAwardReward: { url: '/gameshows/{show_id}/rewards/{reward_id}/auto-award', method: HTTP_METHODS.POST },
|
|
67
|
+
addRewardRecipient: { url: '/gameshows/{show_id}/rewards/{reward_id}/recipients', method: HTTP_METHODS.POST },
|
|
68
|
+
updateRewardRecipient: { url: '/gameshows/{show_id}/rewards/{reward_id}/recipients/{recipient_id}', method: HTTP_METHODS.PUT },
|
|
56
69
|
listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
|
|
57
70
|
// Organizer sponsor lifecycle and placement administration.
|
|
58
71
|
listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
|
|
@@ -72,6 +85,10 @@ class GameShowsRoute {
|
|
|
72
85
|
sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
|
|
73
86
|
sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
|
|
74
87
|
sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
|
|
88
|
+
sponsorInvitationRewards: { url: '/gameshow-sponsor-invitations/{token}/rewards', method: HTTP_METHODS.GET },
|
|
89
|
+
sponsorInvitationCreateReward: { url: '/gameshow-sponsor-invitations/{token}/rewards', method: HTTP_METHODS.POST },
|
|
90
|
+
sponsorInvitationUpdateReward: { url: '/gameshow-sponsor-invitations/{token}/rewards/{reward_id}', method: HTTP_METHODS.PUT },
|
|
91
|
+
sponsorInvitationDeleteReward: { url: '/gameshow-sponsor-invitations/{token}/rewards/{reward_id}', method: HTTP_METHODS.DELETE },
|
|
75
92
|
};
|
|
76
93
|
|
|
77
94
|
}
|