glitch-javascript-sdk 3.8.5 → 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;
@@ -44,6 +44,35 @@ export interface InfluencerPayoutQuery {
44
44
  orderBy?: "created_at" | "amount";
45
45
  orderDirection?: "asc" | "desc";
46
46
  }
47
+ /** Delivery state for the authenticated user's registered email address. */
48
+ export type EmailDeliveryState = "healthy" | "suppressed";
49
+ /** Recovery action selected by the API for the current suppression category. */
50
+ export type EmailDeliveryRecoveryAction = "none" | "self_service" | "change_email" | "contact_support";
51
+ /** Self-service and fallback actions available for an email-delivery state. */
52
+ export interface EmailDeliveryRecovery {
53
+ allowed: boolean;
54
+ action: EmailDeliveryRecoveryAction;
55
+ requires_acknowledgement: boolean;
56
+ account_verified?: boolean;
57
+ change_email_path?: string;
58
+ support_path?: string;
59
+ }
60
+ /** Current delivery state for the authenticated user's registered email. */
61
+ export interface EmailDeliveryStatus {
62
+ state: EmailDeliveryState;
63
+ action_required: boolean;
64
+ email: string | null;
65
+ category: string | null;
66
+ provider: string | null;
67
+ suppressed_at: string | null;
68
+ display_reason: string | null;
69
+ recovery: EmailDeliveryRecovery;
70
+ restored_now?: boolean;
71
+ }
72
+ /** Explicit confirmation required to remove an eligible active suppression. */
73
+ export interface RestoreEmailDeliveryRequest {
74
+ acknowledged: true;
75
+ }
47
76
  declare class Users {
48
77
  /**
49
78
  * List all the users.
@@ -74,6 +103,16 @@ declare class Users {
74
103
  * @returns promise
75
104
  */
76
105
  static me<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
106
+ /**
107
+ * Gets the delivery and suppression state for the authenticated user's
108
+ * current registered email address.
109
+ */
110
+ static emailDeliveryStatus(): AxiosPromise<Response<EmailDeliveryStatus>>;
111
+ /**
112
+ * Removes an eligible active suppression for the authenticated user's
113
+ * current verified email address.
114
+ */
115
+ static restoreEmailDelivery(data: RestoreEmailDeliveryRequest): AxiosPromise<Response<EmailDeliveryStatus>>;
77
116
  /**
78
117
  * Gets the campaigns the users has been invited too.
79
118
  *
package/dist/esm/index.js CHANGED
@@ -8935,6 +8935,8 @@ var UserRoutes = /** @class */ (function () {
8935
8935
  follow: { url: '/users/{user_id}/follow', method: HTTP_METHODS.POST },
8936
8936
  profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
8937
8937
  me: { url: '/users/me', method: HTTP_METHODS.GET },
8938
+ emailDeliveryStatus: { url: '/users/me/email-delivery', method: HTTP_METHODS.GET },
8939
+ restoreEmailDelivery: { url: '/users/me/email-delivery/restore', method: HTTP_METHODS.POST },
8938
8940
  syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
8939
8941
  generateInfluencerProfile: { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
8940
8942
  oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
@@ -9031,6 +9033,20 @@ var Users = /** @class */ (function () {
9031
9033
  Users.me = function (params) {
9032
9034
  return Requests.processRoute(UserRoutes.routes.me, {}, undefined, params);
9033
9035
  };
9036
+ /**
9037
+ * Gets the delivery and suppression state for the authenticated user's
9038
+ * current registered email address.
9039
+ */
9040
+ Users.emailDeliveryStatus = function () {
9041
+ return Requests.processRoute(UserRoutes.routes.emailDeliveryStatus);
9042
+ };
9043
+ /**
9044
+ * Removes an eligible active suppression for the authenticated user's
9045
+ * current verified email address.
9046
+ */
9047
+ Users.restoreEmailDelivery = function (data) {
9048
+ return Requests.processRoute(UserRoutes.routes.restoreEmailDelivery, data);
9049
+ };
9034
9050
  /**
9035
9051
  * Gets the campaigns the users has been invited too.
9036
9052
  *
@@ -15060,6 +15076,7 @@ var GameShowsRoute = /** @class */ (function () {
15060
15076
  updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
15061
15077
  deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
15062
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 },
15063
15080
  createBlock: { url: '/gameshows/{show_id}/blocks', method: HTTP_METHODS.POST },
15064
15081
  updateBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.PUT },
15065
15082
  deleteBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.DELETE },
@@ -15069,6 +15086,16 @@ var GameShowsRoute = /** @class */ (function () {
15069
15086
  createScheduleItem: { url: '/gameshows/{show_id}/schedule', method: HTTP_METHODS.POST },
15070
15087
  updateScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.PUT },
15071
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 },
15072
15099
  discoveryQueue: { url: '/gameshows/{show_id}/discovery', method: HTTP_METHODS.GET },
15073
15100
  trackAnalytics: { url: '/gameshows/{show_id}/analytics', method: HTTP_METHODS.POST },
15074
15101
  analyticsReport: { url: '/gameshows/{show_id}/analytics/report', method: HTTP_METHODS.GET },
@@ -15317,6 +15344,10 @@ var GameShows = /** @class */ (function () {
15317
15344
  GameShows.listBlocks = function (show_id, params) {
15318
15345
  return Requests.processRoute(GameShowsRoute.routes.listBlocks, {}, { show_id: show_id }, params);
15319
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
+ };
15320
15351
  /**
15321
15352
  * Create a page-builder block for a game show. Requires organizer permissions.
15322
15353
  */
@@ -15369,6 +15400,46 @@ var GameShows = /** @class */ (function () {
15369
15400
  GameShows.deleteScheduleItem = function (show_id, schedule_id, params) {
15370
15401
  return Requests.processRoute(GameShowsRoute.routes.deleteScheduleItem, {}, { show_id: show_id, schedule_id: schedule_id }, params);
15371
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
+ };
15372
15443
  /**
15373
15444
  * Get the game show discovery queue.
15374
15445
  */
@@ -20209,6 +20280,30 @@ var ServerOperationsRoute = /** @class */ (function () {
20209
20280
  url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/policy',
20210
20281
  method: HTTP_METHODS.PUT
20211
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
+ },
20212
20307
  };
20213
20308
  return ServerOperationsRoute;
20214
20309
  }());
@@ -20219,9 +20314,48 @@ var ServerOperations = /** @class */ (function () {
20219
20314
  ServerOperations.listDeployments = function (params) {
20220
20315
  return Requests.processRoute(ServerOperationsRoute.routes.listDeployments, undefined, undefined, params);
20221
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
+ */
20222
20321
  ServerOperations.updatePolicy = function (title_id, build_id, data) {
20223
20322
  return Requests.processRoute(ServerOperationsRoute.routes.updatePolicy, data, { title_id: title_id, build_id: build_id });
20224
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
+ };
20225
20359
  return ServerOperations;
20226
20360
  }());
20227
20361