glitch-javascript-sdk 3.8.6 → 3.8.7

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,29 @@
1
1
  import Response from "../util/Response";
2
2
  import { AxiosPromise } from "axios";
3
+ export interface GameShowScheduleTicketTypeInput {
4
+ name: string;
5
+ description?: string | null;
6
+ kind: 'early_bird' | 'regular' | 'other';
7
+ price_cents: number;
8
+ currency: string;
9
+ quantity_available?: number | null;
10
+ sales_start_at?: string | null;
11
+ sales_end_at?: string | null;
12
+ sort_order?: number;
13
+ is_active?: boolean;
14
+ }
15
+ export interface GameShowScheduleTicketPurchaseInput {
16
+ ticket_type_id: string;
17
+ email: string;
18
+ first_name?: string;
19
+ last_name?: string;
20
+ quantity: number;
21
+ payment_method_id?: string;
22
+ }
23
+ export interface GameShowScheduleTicketRefundInput {
24
+ amount_cents: number;
25
+ reason?: string;
26
+ }
3
27
  declare class GameShows {
4
28
  /**
5
29
  * List all the GameShows.
@@ -141,6 +165,8 @@ declare class GameShows {
141
165
  * List public page-builder blocks for a game show.
142
166
  */
143
167
  static listBlocks<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
168
+ /** Paginate one Page Builder game section without downloading its full catalog. */
169
+ static listBlockTitles<T>(show_id: string, block_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
144
170
  /**
145
171
  * Create a page-builder block for a game show. Requires organizer permissions.
146
172
  */
@@ -175,6 +201,26 @@ declare class GameShows {
175
201
  * Delete a schedule item from a game show. Requires organizer permissions.
176
202
  */
177
203
  static deleteScheduleItem<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
204
+ /** List public early-bird, regular, and other ticket tiers for one session. */
205
+ static listScheduleTicketTypes<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
206
+ /** List every ticket tier, including archived tiers, for festival organizers. */
207
+ static manageScheduleTicketTypes<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
208
+ /** Create one session ticket price tier. */
209
+ static createScheduleTicketType<T>(show_id: string, schedule_id: string, data: GameShowScheduleTicketTypeInput, params?: Record<string, any>): AxiosPromise<Response<T>>;
210
+ /** Update ticket price, inventory, availability window, or publication state. */
211
+ static updateScheduleTicketType<T>(show_id: string, schedule_id: string, ticket_type_id: string, data: Partial<GameShowScheduleTicketTypeInput>, params?: Record<string, any>): AxiosPromise<Response<T>>;
212
+ /** Archive a ticket tier while retaining historical purchases. */
213
+ static deleteScheduleTicketType<T>(show_id: string, schedule_id: string, ticket_type_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
214
+ /** Reserve inventory and create/confirm the session ticket PaymentIntent. */
215
+ static purchaseScheduleTickets<T>(show_id: string, schedule_id: string, data: GameShowScheduleTicketPurchaseInput, params?: Record<string, any>): AxiosPromise<Response<T>>;
216
+ /** Synchronize the same ticket PaymentIntent after Stripe.js completes 3DS. */
217
+ static confirmScheduleTicketPurchase<T>(show_id: string, schedule_id: string, purchase_id: string, access_token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
218
+ /** Retrieve a token-protected customer receipt. */
219
+ static getScheduleTicketReceipt<T>(show_id: string, schedule_id: string, purchase_id: string, access_token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
220
+ /** List ticket purchasers and refund state for festival organizers. */
221
+ static listScheduleTicketPurchases<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
222
+ /** Issue a partial or full destination-charge refund at organizer discretion. */
223
+ static refundScheduleTicketPurchase<T>(show_id: string, schedule_id: string, purchase_id: string, data: GameShowScheduleTicketRefundInput, params?: Record<string, any>): AxiosPromise<Response<T>>;
178
224
  /**
179
225
  * Get the game show discovery queue.
180
226
  */
@@ -2,6 +2,35 @@ import Response from "../util/Response";
2
2
  import { AxiosPromise } from "axios";
3
3
  declare class ServerOperations {
4
4
  static listDeployments<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
5
+ /**
6
+ * Update the warm/spare/ceiling shape of a matchmaker managed instance pool.
7
+ * Rejected for any build whose capacity model is not "pooled".
8
+ */
5
9
  static updatePolicy<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>>;
10
+ /**
11
+ * Resize the Container App behind a build. Replica bounds are enforced
12
+ * server side against the build's capacity model, so a singleton world
13
+ * cannot be given a second replica. Pass acknowledge_outage when
14
+ * deliberately setting min replicas to 0 on a singleton or replicated
15
+ * deployment, which takes the game offline.
16
+ */
17
+ static updateContainerAppResources<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>>;
18
+ /**
19
+ * Declare how many server processes a build may run at once: singleton,
20
+ * replicated, pooled, serverless, or static. Re-clamps the stored replica
21
+ * shape and is honored by the next deployment.
22
+ */
23
+ static updateCapacityModel<T>(title_id: string, build_id: string, data: {
24
+ capacity_model: string;
25
+ }): AxiosPromise<Response<T>>;
26
+ /**
27
+ * Realms are how a singleton world scales: one process per realm, all
28
+ * sharing a database. These are the site-admin views of the multiplayer
29
+ * realm records.
30
+ */
31
+ static listRealms<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
32
+ static createRealm<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
33
+ static updateRealm<T>(title_id: string, realm_id: string, data: object): AxiosPromise<Response<T>>;
34
+ static deleteRealm<T>(title_id: string, realm_id: string): AxiosPromise<Response<T>>;
6
35
  }
7
36
  export default ServerOperations;
package/dist/esm/index.js CHANGED
@@ -15076,6 +15076,7 @@ var GameShowsRoute = /** @class */ (function () {
15076
15076
  updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
15077
15077
  deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
15078
15078
  listBlocks: { url: '/gameshows/{show_id}/blocks', method: HTTP_METHODS.GET },
15079
+ listBlockTitles: { url: '/gameshows/{show_id}/blocks/{block_id}/titles', method: HTTP_METHODS.GET },
15079
15080
  createBlock: { url: '/gameshows/{show_id}/blocks', method: HTTP_METHODS.POST },
15080
15081
  updateBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.PUT },
15081
15082
  deleteBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.DELETE },
@@ -15085,6 +15086,16 @@ var GameShowsRoute = /** @class */ (function () {
15085
15086
  createScheduleItem: { url: '/gameshows/{show_id}/schedule', method: HTTP_METHODS.POST },
15086
15087
  updateScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.PUT },
15087
15088
  deleteScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.DELETE },
15089
+ listScheduleTicketTypes: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types', method: HTTP_METHODS.GET },
15090
+ manageScheduleTicketTypes: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types/manage', method: HTTP_METHODS.GET },
15091
+ createScheduleTicketType: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types', method: HTTP_METHODS.POST },
15092
+ updateScheduleTicketType: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types/{ticket_type_id}', method: HTTP_METHODS.PUT },
15093
+ deleteScheduleTicketType: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types/{ticket_type_id}', method: HTTP_METHODS.DELETE },
15094
+ purchaseScheduleTickets: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases', method: HTTP_METHODS.POST },
15095
+ confirmScheduleTicketPurchase: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases/{purchase_id}/confirm', method: HTTP_METHODS.POST },
15096
+ getScheduleTicketReceipt: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases/{purchase_id}/receipt', method: HTTP_METHODS.GET },
15097
+ listScheduleTicketPurchases: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases', method: HTTP_METHODS.GET },
15098
+ refundScheduleTicketPurchase: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases/{purchase_id}/refund', method: HTTP_METHODS.POST },
15088
15099
  discoveryQueue: { url: '/gameshows/{show_id}/discovery', method: HTTP_METHODS.GET },
15089
15100
  trackAnalytics: { url: '/gameshows/{show_id}/analytics', method: HTTP_METHODS.POST },
15090
15101
  analyticsReport: { url: '/gameshows/{show_id}/analytics/report', method: HTTP_METHODS.GET },
@@ -15333,6 +15344,10 @@ var GameShows = /** @class */ (function () {
15333
15344
  GameShows.listBlocks = function (show_id, params) {
15334
15345
  return Requests.processRoute(GameShowsRoute.routes.listBlocks, {}, { show_id: show_id }, params);
15335
15346
  };
15347
+ /** Paginate one Page Builder game section without downloading its full catalog. */
15348
+ GameShows.listBlockTitles = function (show_id, block_id, params) {
15349
+ return Requests.processRoute(GameShowsRoute.routes.listBlockTitles, {}, { show_id: show_id, block_id: block_id }, params);
15350
+ };
15336
15351
  /**
15337
15352
  * Create a page-builder block for a game show. Requires organizer permissions.
15338
15353
  */
@@ -15385,6 +15400,46 @@ var GameShows = /** @class */ (function () {
15385
15400
  GameShows.deleteScheduleItem = function (show_id, schedule_id, params) {
15386
15401
  return Requests.processRoute(GameShowsRoute.routes.deleteScheduleItem, {}, { show_id: show_id, schedule_id: schedule_id }, params);
15387
15402
  };
15403
+ /** List public early-bird, regular, and other ticket tiers for one session. */
15404
+ GameShows.listScheduleTicketTypes = function (show_id, schedule_id, params) {
15405
+ return Requests.processRoute(GameShowsRoute.routes.listScheduleTicketTypes, {}, { show_id: show_id, schedule_id: schedule_id }, params);
15406
+ };
15407
+ /** List every ticket tier, including archived tiers, for festival organizers. */
15408
+ GameShows.manageScheduleTicketTypes = function (show_id, schedule_id, params) {
15409
+ return Requests.processRoute(GameShowsRoute.routes.manageScheduleTicketTypes, {}, { show_id: show_id, schedule_id: schedule_id }, params);
15410
+ };
15411
+ /** Create one session ticket price tier. */
15412
+ GameShows.createScheduleTicketType = function (show_id, schedule_id, data, params) {
15413
+ return Requests.processRoute(GameShowsRoute.routes.createScheduleTicketType, data, { show_id: show_id, schedule_id: schedule_id }, params);
15414
+ };
15415
+ /** Update ticket price, inventory, availability window, or publication state. */
15416
+ GameShows.updateScheduleTicketType = function (show_id, schedule_id, ticket_type_id, data, params) {
15417
+ return Requests.processRoute(GameShowsRoute.routes.updateScheduleTicketType, data, { show_id: show_id, schedule_id: schedule_id, ticket_type_id: ticket_type_id }, params);
15418
+ };
15419
+ /** Archive a ticket tier while retaining historical purchases. */
15420
+ GameShows.deleteScheduleTicketType = function (show_id, schedule_id, ticket_type_id, params) {
15421
+ return Requests.processRoute(GameShowsRoute.routes.deleteScheduleTicketType, {}, { show_id: show_id, schedule_id: schedule_id, ticket_type_id: ticket_type_id }, params);
15422
+ };
15423
+ /** Reserve inventory and create/confirm the session ticket PaymentIntent. */
15424
+ GameShows.purchaseScheduleTickets = function (show_id, schedule_id, data, params) {
15425
+ return Requests.processRoute(GameShowsRoute.routes.purchaseScheduleTickets, data, { show_id: show_id, schedule_id: schedule_id }, params);
15426
+ };
15427
+ /** Synchronize the same ticket PaymentIntent after Stripe.js completes 3DS. */
15428
+ GameShows.confirmScheduleTicketPurchase = function (show_id, schedule_id, purchase_id, access_token, params) {
15429
+ return Requests.processRoute(GameShowsRoute.routes.confirmScheduleTicketPurchase, { access_token: access_token }, { show_id: show_id, schedule_id: schedule_id, purchase_id: purchase_id }, params);
15430
+ };
15431
+ /** Retrieve a token-protected customer receipt. */
15432
+ GameShows.getScheduleTicketReceipt = function (show_id, schedule_id, purchase_id, access_token, params) {
15433
+ return Requests.processRoute(GameShowsRoute.routes.getScheduleTicketReceipt, {}, { show_id: show_id, schedule_id: schedule_id, purchase_id: purchase_id }, __assign(__assign({}, params), { access_token: access_token }));
15434
+ };
15435
+ /** List ticket purchasers and refund state for festival organizers. */
15436
+ GameShows.listScheduleTicketPurchases = function (show_id, schedule_id, params) {
15437
+ return Requests.processRoute(GameShowsRoute.routes.listScheduleTicketPurchases, {}, { show_id: show_id, schedule_id: schedule_id }, params);
15438
+ };
15439
+ /** Issue a partial or full destination-charge refund at organizer discretion. */
15440
+ GameShows.refundScheduleTicketPurchase = function (show_id, schedule_id, purchase_id, data, params) {
15441
+ return Requests.processRoute(GameShowsRoute.routes.refundScheduleTicketPurchase, data, { show_id: show_id, schedule_id: schedule_id, purchase_id: purchase_id }, params);
15442
+ };
15388
15443
  /**
15389
15444
  * Get the game show discovery queue.
15390
15445
  */
@@ -20225,6 +20280,30 @@ var ServerOperationsRoute = /** @class */ (function () {
20225
20280
  url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/policy',
20226
20281
  method: HTTP_METHODS.PUT
20227
20282
  },
20283
+ updateContainerAppResources: {
20284
+ url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/container-app',
20285
+ method: HTTP_METHODS.PUT
20286
+ },
20287
+ updateCapacityModel: {
20288
+ url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/capacity-model',
20289
+ method: HTTP_METHODS.PUT
20290
+ },
20291
+ listRealms: {
20292
+ url: '/admin/server-operations/titles/{title_id}/realms',
20293
+ method: HTTP_METHODS.GET
20294
+ },
20295
+ createRealm: {
20296
+ url: '/admin/server-operations/titles/{title_id}/realms',
20297
+ method: HTTP_METHODS.POST
20298
+ },
20299
+ updateRealm: {
20300
+ url: '/admin/server-operations/titles/{title_id}/realms/{realm_id}',
20301
+ method: HTTP_METHODS.PUT
20302
+ },
20303
+ deleteRealm: {
20304
+ url: '/admin/server-operations/titles/{title_id}/realms/{realm_id}',
20305
+ method: HTTP_METHODS.DELETE
20306
+ },
20228
20307
  };
20229
20308
  return ServerOperationsRoute;
20230
20309
  }());
@@ -20235,9 +20314,48 @@ var ServerOperations = /** @class */ (function () {
20235
20314
  ServerOperations.listDeployments = function (params) {
20236
20315
  return Requests.processRoute(ServerOperationsRoute.routes.listDeployments, undefined, undefined, params);
20237
20316
  };
20317
+ /**
20318
+ * Update the warm/spare/ceiling shape of a matchmaker managed instance pool.
20319
+ * Rejected for any build whose capacity model is not "pooled".
20320
+ */
20238
20321
  ServerOperations.updatePolicy = function (title_id, build_id, data) {
20239
20322
  return Requests.processRoute(ServerOperationsRoute.routes.updatePolicy, data, { title_id: title_id, build_id: build_id });
20240
20323
  };
20324
+ /**
20325
+ * Resize the Container App behind a build. Replica bounds are enforced
20326
+ * server side against the build's capacity model, so a singleton world
20327
+ * cannot be given a second replica. Pass acknowledge_outage when
20328
+ * deliberately setting min replicas to 0 on a singleton or replicated
20329
+ * deployment, which takes the game offline.
20330
+ */
20331
+ ServerOperations.updateContainerAppResources = function (title_id, build_id, data) {
20332
+ return Requests.processRoute(ServerOperationsRoute.routes.updateContainerAppResources, data, { title_id: title_id, build_id: build_id });
20333
+ };
20334
+ /**
20335
+ * Declare how many server processes a build may run at once: singleton,
20336
+ * replicated, pooled, serverless, or static. Re-clamps the stored replica
20337
+ * shape and is honored by the next deployment.
20338
+ */
20339
+ ServerOperations.updateCapacityModel = function (title_id, build_id, data) {
20340
+ return Requests.processRoute(ServerOperationsRoute.routes.updateCapacityModel, data, { title_id: title_id, build_id: build_id });
20341
+ };
20342
+ /**
20343
+ * Realms are how a singleton world scales: one process per realm, all
20344
+ * sharing a database. These are the site-admin views of the multiplayer
20345
+ * realm records.
20346
+ */
20347
+ ServerOperations.listRealms = function (title_id, params) {
20348
+ return Requests.processRoute(ServerOperationsRoute.routes.listRealms, undefined, { title_id: title_id }, params);
20349
+ };
20350
+ ServerOperations.createRealm = function (title_id, data) {
20351
+ return Requests.processRoute(ServerOperationsRoute.routes.createRealm, data, { title_id: title_id });
20352
+ };
20353
+ ServerOperations.updateRealm = function (title_id, realm_id, data) {
20354
+ return Requests.processRoute(ServerOperationsRoute.routes.updateRealm, data, { title_id: title_id, realm_id: realm_id });
20355
+ };
20356
+ ServerOperations.deleteRealm = function (title_id, realm_id) {
20357
+ return Requests.processRoute(ServerOperationsRoute.routes.deleteRealm, undefined, { title_id: title_id, realm_id: realm_id });
20358
+ };
20241
20359
  return ServerOperations;
20242
20360
  }());
20243
20361