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.
- package/dist/cjs/index.js +134 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameShows.d.ts +46 -0
- package/dist/esm/api/ServerOperations.d.ts +29 -0
- package/dist/esm/api/Users.d.ts +39 -0
- package/dist/esm/index.js +134 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +114 -0
- package/package.json +2 -2
- package/src/api/GameShows.ts +82 -0
- package/src/api/ServerOperations.ts +45 -0
- package/src/api/Users.ts +50 -0
- package/src/routes/GameShowsRoute.ts +11 -0
- package/src/routes/ServerOperationsRoute.ts +24 -0
- package/src/routes/UserRoutes.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -1937,6 +1937,35 @@ interface InfluencerPayoutQuery {
|
|
|
1937
1937
|
orderBy?: "created_at" | "amount";
|
|
1938
1938
|
orderDirection?: "asc" | "desc";
|
|
1939
1939
|
}
|
|
1940
|
+
/** Delivery state for the authenticated user's registered email address. */
|
|
1941
|
+
type EmailDeliveryState = "healthy" | "suppressed";
|
|
1942
|
+
/** Recovery action selected by the API for the current suppression category. */
|
|
1943
|
+
type EmailDeliveryRecoveryAction = "none" | "self_service" | "change_email" | "contact_support";
|
|
1944
|
+
/** Self-service and fallback actions available for an email-delivery state. */
|
|
1945
|
+
interface EmailDeliveryRecovery {
|
|
1946
|
+
allowed: boolean;
|
|
1947
|
+
action: EmailDeliveryRecoveryAction;
|
|
1948
|
+
requires_acknowledgement: boolean;
|
|
1949
|
+
account_verified?: boolean;
|
|
1950
|
+
change_email_path?: string;
|
|
1951
|
+
support_path?: string;
|
|
1952
|
+
}
|
|
1953
|
+
/** Current delivery state for the authenticated user's registered email. */
|
|
1954
|
+
interface EmailDeliveryStatus {
|
|
1955
|
+
state: EmailDeliveryState;
|
|
1956
|
+
action_required: boolean;
|
|
1957
|
+
email: string | null;
|
|
1958
|
+
category: string | null;
|
|
1959
|
+
provider: string | null;
|
|
1960
|
+
suppressed_at: string | null;
|
|
1961
|
+
display_reason: string | null;
|
|
1962
|
+
recovery: EmailDeliveryRecovery;
|
|
1963
|
+
restored_now?: boolean;
|
|
1964
|
+
}
|
|
1965
|
+
/** Explicit confirmation required to remove an eligible active suppression. */
|
|
1966
|
+
interface RestoreEmailDeliveryRequest {
|
|
1967
|
+
acknowledged: true;
|
|
1968
|
+
}
|
|
1940
1969
|
declare class Users {
|
|
1941
1970
|
/**
|
|
1942
1971
|
* List all the users.
|
|
@@ -1967,6 +1996,16 @@ declare class Users {
|
|
|
1967
1996
|
* @returns promise
|
|
1968
1997
|
*/
|
|
1969
1998
|
static me<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
1999
|
+
/**
|
|
2000
|
+
* Gets the delivery and suppression state for the authenticated user's
|
|
2001
|
+
* current registered email address.
|
|
2002
|
+
*/
|
|
2003
|
+
static emailDeliveryStatus(): AxiosPromise<Response<EmailDeliveryStatus>>;
|
|
2004
|
+
/**
|
|
2005
|
+
* Removes an eligible active suppression for the authenticated user's
|
|
2006
|
+
* current verified email address.
|
|
2007
|
+
*/
|
|
2008
|
+
static restoreEmailDelivery(data: RestoreEmailDeliveryRequest): AxiosPromise<Response<EmailDeliveryStatus>>;
|
|
1970
2009
|
/**
|
|
1971
2010
|
* Gets the campaigns the users has been invited too.
|
|
1972
2011
|
*
|
|
@@ -6165,6 +6204,30 @@ declare class Publications {
|
|
|
6165
6204
|
static download<T>(data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6166
6205
|
}
|
|
6167
6206
|
|
|
6207
|
+
interface GameShowScheduleTicketTypeInput {
|
|
6208
|
+
name: string;
|
|
6209
|
+
description?: string | null;
|
|
6210
|
+
kind: 'early_bird' | 'regular' | 'other';
|
|
6211
|
+
price_cents: number;
|
|
6212
|
+
currency: string;
|
|
6213
|
+
quantity_available?: number | null;
|
|
6214
|
+
sales_start_at?: string | null;
|
|
6215
|
+
sales_end_at?: string | null;
|
|
6216
|
+
sort_order?: number;
|
|
6217
|
+
is_active?: boolean;
|
|
6218
|
+
}
|
|
6219
|
+
interface GameShowScheduleTicketPurchaseInput {
|
|
6220
|
+
ticket_type_id: string;
|
|
6221
|
+
email: string;
|
|
6222
|
+
first_name?: string;
|
|
6223
|
+
last_name?: string;
|
|
6224
|
+
quantity: number;
|
|
6225
|
+
payment_method_id?: string;
|
|
6226
|
+
}
|
|
6227
|
+
interface GameShowScheduleTicketRefundInput {
|
|
6228
|
+
amount_cents: number;
|
|
6229
|
+
reason?: string;
|
|
6230
|
+
}
|
|
6168
6231
|
declare class GameShows {
|
|
6169
6232
|
/**
|
|
6170
6233
|
* List all the GameShows.
|
|
@@ -6306,6 +6369,8 @@ declare class GameShows {
|
|
|
6306
6369
|
* List public page-builder blocks for a game show.
|
|
6307
6370
|
*/
|
|
6308
6371
|
static listBlocks<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6372
|
+
/** Paginate one Page Builder game section without downloading its full catalog. */
|
|
6373
|
+
static listBlockTitles<T>(show_id: string, block_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6309
6374
|
/**
|
|
6310
6375
|
* Create a page-builder block for a game show. Requires organizer permissions.
|
|
6311
6376
|
*/
|
|
@@ -6340,6 +6405,26 @@ declare class GameShows {
|
|
|
6340
6405
|
* Delete a schedule item from a game show. Requires organizer permissions.
|
|
6341
6406
|
*/
|
|
6342
6407
|
static deleteScheduleItem<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6408
|
+
/** List public early-bird, regular, and other ticket tiers for one session. */
|
|
6409
|
+
static listScheduleTicketTypes<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6410
|
+
/** List every ticket tier, including archived tiers, for festival organizers. */
|
|
6411
|
+
static manageScheduleTicketTypes<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6412
|
+
/** Create one session ticket price tier. */
|
|
6413
|
+
static createScheduleTicketType<T>(show_id: string, schedule_id: string, data: GameShowScheduleTicketTypeInput, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6414
|
+
/** Update ticket price, inventory, availability window, or publication state. */
|
|
6415
|
+
static updateScheduleTicketType<T>(show_id: string, schedule_id: string, ticket_type_id: string, data: Partial<GameShowScheduleTicketTypeInput>, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6416
|
+
/** Archive a ticket tier while retaining historical purchases. */
|
|
6417
|
+
static deleteScheduleTicketType<T>(show_id: string, schedule_id: string, ticket_type_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6418
|
+
/** Reserve inventory and create/confirm the session ticket PaymentIntent. */
|
|
6419
|
+
static purchaseScheduleTickets<T>(show_id: string, schedule_id: string, data: GameShowScheduleTicketPurchaseInput, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6420
|
+
/** Synchronize the same ticket PaymentIntent after Stripe.js completes 3DS. */
|
|
6421
|
+
static confirmScheduleTicketPurchase<T>(show_id: string, schedule_id: string, purchase_id: string, access_token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6422
|
+
/** Retrieve a token-protected customer receipt. */
|
|
6423
|
+
static getScheduleTicketReceipt<T>(show_id: string, schedule_id: string, purchase_id: string, access_token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6424
|
+
/** List ticket purchasers and refund state for festival organizers. */
|
|
6425
|
+
static listScheduleTicketPurchases<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6426
|
+
/** Issue a partial or full destination-charge refund at organizer discretion. */
|
|
6427
|
+
static refundScheduleTicketPurchase<T>(show_id: string, schedule_id: string, purchase_id: string, data: GameShowScheduleTicketRefundInput, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6343
6428
|
/**
|
|
6344
6429
|
* Get the game show discovery queue.
|
|
6345
6430
|
*/
|
|
@@ -10266,7 +10351,36 @@ declare class Multiplayer {
|
|
|
10266
10351
|
|
|
10267
10352
|
declare class ServerOperations {
|
|
10268
10353
|
static listDeployments<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
10354
|
+
/**
|
|
10355
|
+
* Update the warm/spare/ceiling shape of a matchmaker managed instance pool.
|
|
10356
|
+
* Rejected for any build whose capacity model is not "pooled".
|
|
10357
|
+
*/
|
|
10269
10358
|
static updatePolicy<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>>;
|
|
10359
|
+
/**
|
|
10360
|
+
* Resize the Container App behind a build. Replica bounds are enforced
|
|
10361
|
+
* server side against the build's capacity model, so a singleton world
|
|
10362
|
+
* cannot be given a second replica. Pass acknowledge_outage when
|
|
10363
|
+
* deliberately setting min replicas to 0 on a singleton or replicated
|
|
10364
|
+
* deployment, which takes the game offline.
|
|
10365
|
+
*/
|
|
10366
|
+
static updateContainerAppResources<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>>;
|
|
10367
|
+
/**
|
|
10368
|
+
* Declare how many server processes a build may run at once: singleton,
|
|
10369
|
+
* replicated, pooled, serverless, or static. Re-clamps the stored replica
|
|
10370
|
+
* shape and is honored by the next deployment.
|
|
10371
|
+
*/
|
|
10372
|
+
static updateCapacityModel<T>(title_id: string, build_id: string, data: {
|
|
10373
|
+
capacity_model: string;
|
|
10374
|
+
}): AxiosPromise<Response<T>>;
|
|
10375
|
+
/**
|
|
10376
|
+
* Realms are how a singleton world scales: one process per realm, all
|
|
10377
|
+
* sharing a database. These are the site-admin views of the multiplayer
|
|
10378
|
+
* realm records.
|
|
10379
|
+
*/
|
|
10380
|
+
static listRealms<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
10381
|
+
static createRealm<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
|
|
10382
|
+
static updateRealm<T>(title_id: string, realm_id: string, data: object): AxiosPromise<Response<T>>;
|
|
10383
|
+
static deleteRealm<T>(title_id: string, realm_id: string): AxiosPromise<Response<T>>;
|
|
10270
10384
|
}
|
|
10271
10385
|
|
|
10272
10386
|
interface AgentRunRequest {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glitch-javascript-sdk",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.7",
|
|
4
4
|
"description": "Javascript SDK for Glitch",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
15
|
"scripts": {
|
|
16
|
-
"test": "node scripts/test-game-advertising-routes.cjs && node scripts/test-discord-media-routes.cjs",
|
|
16
|
+
"test": "node scripts/test-game-advertising-routes.cjs && node scripts/test-discord-media-routes.cjs && node scripts/test-user-email-delivery-routes.cjs && node scripts/test-game-show-ticket-routes.cjs",
|
|
17
17
|
"build": "rm -Rf dist && rollup -c --bundleConfigAsCjs",
|
|
18
18
|
"build-docs": "rm -rf docs && typedoc --tsconfig tsconfig.json src/"
|
|
19
19
|
},
|
package/src/api/GameShows.ts
CHANGED
|
@@ -3,6 +3,33 @@ import Requests from "../util/Requests";
|
|
|
3
3
|
import Response from "../util/Response";
|
|
4
4
|
import { AxiosPromise } from "axios";
|
|
5
5
|
|
|
6
|
+
export interface GameShowScheduleTicketTypeInput {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string | null;
|
|
9
|
+
kind: 'early_bird' | 'regular' | 'other';
|
|
10
|
+
price_cents: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
quantity_available?: number | null;
|
|
13
|
+
sales_start_at?: string | null;
|
|
14
|
+
sales_end_at?: string | null;
|
|
15
|
+
sort_order?: number;
|
|
16
|
+
is_active?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface GameShowScheduleTicketPurchaseInput {
|
|
20
|
+
ticket_type_id: string;
|
|
21
|
+
email: string;
|
|
22
|
+
first_name?: string;
|
|
23
|
+
last_name?: string;
|
|
24
|
+
quantity: number;
|
|
25
|
+
payment_method_id?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface GameShowScheduleTicketRefundInput {
|
|
29
|
+
amount_cents: number;
|
|
30
|
+
reason?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
6
33
|
class GameShows {
|
|
7
34
|
|
|
8
35
|
/**
|
|
@@ -242,6 +269,11 @@ class GameShows {
|
|
|
242
269
|
return Requests.processRoute(GameShowsRoute.routes.listBlocks, {}, { show_id: show_id }, params);
|
|
243
270
|
}
|
|
244
271
|
|
|
272
|
+
/** Paginate one Page Builder game section without downloading its full catalog. */
|
|
273
|
+
public static listBlockTitles<T>(show_id: string, block_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
274
|
+
return Requests.processRoute(GameShowsRoute.routes.listBlockTitles, {}, { show_id, block_id }, params);
|
|
275
|
+
}
|
|
276
|
+
|
|
245
277
|
/**
|
|
246
278
|
* Create a page-builder block for a game show. Requires organizer permissions.
|
|
247
279
|
*/
|
|
@@ -303,6 +335,56 @@ class GameShows {
|
|
|
303
335
|
return Requests.processRoute(GameShowsRoute.routes.deleteScheduleItem, {}, { show_id: show_id, schedule_id: schedule_id }, params);
|
|
304
336
|
}
|
|
305
337
|
|
|
338
|
+
/** List public early-bird, regular, and other ticket tiers for one session. */
|
|
339
|
+
public static listScheduleTicketTypes<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
340
|
+
return Requests.processRoute(GameShowsRoute.routes.listScheduleTicketTypes, {}, { show_id, schedule_id }, params);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** List every ticket tier, including archived tiers, for festival organizers. */
|
|
344
|
+
public static manageScheduleTicketTypes<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
345
|
+
return Requests.processRoute(GameShowsRoute.routes.manageScheduleTicketTypes, {}, { show_id, schedule_id }, params);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/** Create one session ticket price tier. */
|
|
349
|
+
public static createScheduleTicketType<T>(show_id: string, schedule_id: string, data: GameShowScheduleTicketTypeInput, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
350
|
+
return Requests.processRoute(GameShowsRoute.routes.createScheduleTicketType, data, { show_id, schedule_id }, params);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** Update ticket price, inventory, availability window, or publication state. */
|
|
354
|
+
public static updateScheduleTicketType<T>(show_id: string, schedule_id: string, ticket_type_id: string, data: Partial<GameShowScheduleTicketTypeInput>, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
355
|
+
return Requests.processRoute(GameShowsRoute.routes.updateScheduleTicketType, data, { show_id, schedule_id, ticket_type_id }, params);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/** Archive a ticket tier while retaining historical purchases. */
|
|
359
|
+
public static deleteScheduleTicketType<T>(show_id: string, schedule_id: string, ticket_type_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
360
|
+
return Requests.processRoute(GameShowsRoute.routes.deleteScheduleTicketType, {}, { show_id, schedule_id, ticket_type_id }, params);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** Reserve inventory and create/confirm the session ticket PaymentIntent. */
|
|
364
|
+
public static purchaseScheduleTickets<T>(show_id: string, schedule_id: string, data: GameShowScheduleTicketPurchaseInput, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
365
|
+
return Requests.processRoute(GameShowsRoute.routes.purchaseScheduleTickets, data, { show_id, schedule_id }, params);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** Synchronize the same ticket PaymentIntent after Stripe.js completes 3DS. */
|
|
369
|
+
public static confirmScheduleTicketPurchase<T>(show_id: string, schedule_id: string, purchase_id: string, access_token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
370
|
+
return Requests.processRoute(GameShowsRoute.routes.confirmScheduleTicketPurchase, { access_token }, { show_id, schedule_id, purchase_id }, params);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** Retrieve a token-protected customer receipt. */
|
|
374
|
+
public static getScheduleTicketReceipt<T>(show_id: string, schedule_id: string, purchase_id: string, access_token: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
375
|
+
return Requests.processRoute(GameShowsRoute.routes.getScheduleTicketReceipt, {}, { show_id, schedule_id, purchase_id }, { ...params, access_token });
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/** List ticket purchasers and refund state for festival organizers. */
|
|
379
|
+
public static listScheduleTicketPurchases<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
380
|
+
return Requests.processRoute(GameShowsRoute.routes.listScheduleTicketPurchases, {}, { show_id, schedule_id }, params);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/** Issue a partial or full destination-charge refund at organizer discretion. */
|
|
384
|
+
public static refundScheduleTicketPurchase<T>(show_id: string, schedule_id: string, purchase_id: string, data: GameShowScheduleTicketRefundInput, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
385
|
+
return Requests.processRoute(GameShowsRoute.routes.refundScheduleTicketPurchase, data, { show_id, schedule_id, purchase_id }, params);
|
|
386
|
+
}
|
|
387
|
+
|
|
306
388
|
/**
|
|
307
389
|
* Get the game show discovery queue.
|
|
308
390
|
*/
|
|
@@ -8,9 +8,54 @@ class ServerOperations {
|
|
|
8
8
|
return Requests.processRoute(ServerOperationsRoute.routes.listDeployments, undefined, undefined, params);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Update the warm/spare/ceiling shape of a matchmaker managed instance pool.
|
|
13
|
+
* Rejected for any build whose capacity model is not "pooled".
|
|
14
|
+
*/
|
|
11
15
|
public static updatePolicy<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>> {
|
|
12
16
|
return Requests.processRoute(ServerOperationsRoute.routes.updatePolicy, data, { title_id, build_id });
|
|
13
17
|
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Resize the Container App behind a build. Replica bounds are enforced
|
|
21
|
+
* server side against the build's capacity model, so a singleton world
|
|
22
|
+
* cannot be given a second replica. Pass acknowledge_outage when
|
|
23
|
+
* deliberately setting min replicas to 0 on a singleton or replicated
|
|
24
|
+
* deployment, which takes the game offline.
|
|
25
|
+
*/
|
|
26
|
+
public static updateContainerAppResources<T>(title_id: string, build_id: string, data: object): AxiosPromise<Response<T>> {
|
|
27
|
+
return Requests.processRoute(ServerOperationsRoute.routes.updateContainerAppResources, data, { title_id, build_id });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Declare how many server processes a build may run at once: singleton,
|
|
32
|
+
* replicated, pooled, serverless, or static. Re-clamps the stored replica
|
|
33
|
+
* shape and is honored by the next deployment.
|
|
34
|
+
*/
|
|
35
|
+
public static updateCapacityModel<T>(title_id: string, build_id: string, data: { capacity_model: string }): AxiosPromise<Response<T>> {
|
|
36
|
+
return Requests.processRoute(ServerOperationsRoute.routes.updateCapacityModel, data, { title_id, build_id });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Realms are how a singleton world scales: one process per realm, all
|
|
41
|
+
* sharing a database. These are the site-admin views of the multiplayer
|
|
42
|
+
* realm records.
|
|
43
|
+
*/
|
|
44
|
+
public static listRealms<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
45
|
+
return Requests.processRoute(ServerOperationsRoute.routes.listRealms, undefined, { title_id }, params);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public static createRealm<T>(title_id: string, data: object): AxiosPromise<Response<T>> {
|
|
49
|
+
return Requests.processRoute(ServerOperationsRoute.routes.createRealm, data, { title_id });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public static updateRealm<T>(title_id: string, realm_id: string, data: object): AxiosPromise<Response<T>> {
|
|
53
|
+
return Requests.processRoute(ServerOperationsRoute.routes.updateRealm, data, { title_id, realm_id });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public static deleteRealm<T>(title_id: string, realm_id: string): AxiosPromise<Response<T>> {
|
|
57
|
+
return Requests.processRoute(ServerOperationsRoute.routes.deleteRealm, undefined, { title_id, realm_id });
|
|
58
|
+
}
|
|
14
59
|
}
|
|
15
60
|
|
|
16
61
|
export default ServerOperations;
|
package/src/api/Users.ts
CHANGED
|
@@ -52,6 +52,40 @@ export interface InfluencerPayoutQuery {
|
|
|
52
52
|
orderDirection?: "asc" | "desc";
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/** Delivery state for the authenticated user's registered email address. */
|
|
56
|
+
export type EmailDeliveryState = "healthy" | "suppressed";
|
|
57
|
+
|
|
58
|
+
/** Recovery action selected by the API for the current suppression category. */
|
|
59
|
+
export type EmailDeliveryRecoveryAction = "none" | "self_service" | "change_email" | "contact_support";
|
|
60
|
+
|
|
61
|
+
/** Self-service and fallback actions available for an email-delivery state. */
|
|
62
|
+
export interface EmailDeliveryRecovery {
|
|
63
|
+
allowed: boolean;
|
|
64
|
+
action: EmailDeliveryRecoveryAction;
|
|
65
|
+
requires_acknowledgement: boolean;
|
|
66
|
+
account_verified?: boolean;
|
|
67
|
+
change_email_path?: string;
|
|
68
|
+
support_path?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Current delivery state for the authenticated user's registered email. */
|
|
72
|
+
export interface EmailDeliveryStatus {
|
|
73
|
+
state: EmailDeliveryState;
|
|
74
|
+
action_required: boolean;
|
|
75
|
+
email: string | null;
|
|
76
|
+
category: string | null;
|
|
77
|
+
provider: string | null;
|
|
78
|
+
suppressed_at: string | null;
|
|
79
|
+
display_reason: string | null;
|
|
80
|
+
recovery: EmailDeliveryRecovery;
|
|
81
|
+
restored_now?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Explicit confirmation required to remove an eligible active suppression. */
|
|
85
|
+
export interface RestoreEmailDeliveryRequest {
|
|
86
|
+
acknowledged: true;
|
|
87
|
+
}
|
|
88
|
+
|
|
55
89
|
class Users {
|
|
56
90
|
|
|
57
91
|
/**
|
|
@@ -94,6 +128,22 @@ class Users {
|
|
|
94
128
|
return Requests.processRoute(UserRoutes.routes.me, {}, undefined, params);
|
|
95
129
|
}
|
|
96
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Gets the delivery and suppression state for the authenticated user's
|
|
133
|
+
* current registered email address.
|
|
134
|
+
*/
|
|
135
|
+
public static emailDeliveryStatus(): AxiosPromise<Response<EmailDeliveryStatus>> {
|
|
136
|
+
return Requests.processRoute(UserRoutes.routes.emailDeliveryStatus);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Removes an eligible active suppression for the authenticated user's
|
|
141
|
+
* current verified email address.
|
|
142
|
+
*/
|
|
143
|
+
public static restoreEmailDelivery(data: RestoreEmailDeliveryRequest): AxiosPromise<Response<EmailDeliveryStatus>> {
|
|
144
|
+
return Requests.processRoute(UserRoutes.routes.restoreEmailDelivery, data);
|
|
145
|
+
}
|
|
146
|
+
|
|
97
147
|
/**
|
|
98
148
|
* Gets the campaigns the users has been invited too.
|
|
99
149
|
*
|
|
@@ -38,6 +38,7 @@ class GameShowsRoute {
|
|
|
38
38
|
updateTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.PUT },
|
|
39
39
|
deleteTitle: { url: '/gameshows/{show_id}/titles/{title_id}', method: HTTP_METHODS.DELETE },
|
|
40
40
|
listBlocks: { url: '/gameshows/{show_id}/blocks', method: HTTP_METHODS.GET },
|
|
41
|
+
listBlockTitles: { url: '/gameshows/{show_id}/blocks/{block_id}/titles', method: HTTP_METHODS.GET },
|
|
41
42
|
createBlock: { url: '/gameshows/{show_id}/blocks', method: HTTP_METHODS.POST },
|
|
42
43
|
updateBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.PUT },
|
|
43
44
|
deleteBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.DELETE },
|
|
@@ -47,6 +48,16 @@ class GameShowsRoute {
|
|
|
47
48
|
createScheduleItem: { url: '/gameshows/{show_id}/schedule', method: HTTP_METHODS.POST },
|
|
48
49
|
updateScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.PUT },
|
|
49
50
|
deleteScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.DELETE },
|
|
51
|
+
listScheduleTicketTypes: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types', method: HTTP_METHODS.GET },
|
|
52
|
+
manageScheduleTicketTypes: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types/manage', method: HTTP_METHODS.GET },
|
|
53
|
+
createScheduleTicketType: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types', method: HTTP_METHODS.POST },
|
|
54
|
+
updateScheduleTicketType: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types/{ticket_type_id}', method: HTTP_METHODS.PUT },
|
|
55
|
+
deleteScheduleTicketType: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-types/{ticket_type_id}', method: HTTP_METHODS.DELETE },
|
|
56
|
+
purchaseScheduleTickets: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases', method: HTTP_METHODS.POST },
|
|
57
|
+
confirmScheduleTicketPurchase: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases/{purchase_id}/confirm', method: HTTP_METHODS.POST },
|
|
58
|
+
getScheduleTicketReceipt: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases/{purchase_id}/receipt', method: HTTP_METHODS.GET },
|
|
59
|
+
listScheduleTicketPurchases: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases', method: HTTP_METHODS.GET },
|
|
60
|
+
refundScheduleTicketPurchase: { url: '/gameshows/{show_id}/schedule/{schedule_id}/ticket-purchases/{purchase_id}/refund', method: HTTP_METHODS.POST },
|
|
50
61
|
discoveryQueue: { url: '/gameshows/{show_id}/discovery', method: HTTP_METHODS.GET },
|
|
51
62
|
trackAnalytics: { url: '/gameshows/{show_id}/analytics', method: HTTP_METHODS.POST },
|
|
52
63
|
analyticsReport: { url: '/gameshows/{show_id}/analytics/report', method: HTTP_METHODS.GET },
|
|
@@ -11,6 +11,30 @@ class ServerOperationsRoute {
|
|
|
11
11
|
url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/policy',
|
|
12
12
|
method: HTTP_METHODS.PUT
|
|
13
13
|
},
|
|
14
|
+
updateContainerAppResources: {
|
|
15
|
+
url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/container-app',
|
|
16
|
+
method: HTTP_METHODS.PUT
|
|
17
|
+
},
|
|
18
|
+
updateCapacityModel: {
|
|
19
|
+
url: '/admin/server-operations/titles/{title_id}/builds/{build_id}/capacity-model',
|
|
20
|
+
method: HTTP_METHODS.PUT
|
|
21
|
+
},
|
|
22
|
+
listRealms: {
|
|
23
|
+
url: '/admin/server-operations/titles/{title_id}/realms',
|
|
24
|
+
method: HTTP_METHODS.GET
|
|
25
|
+
},
|
|
26
|
+
createRealm: {
|
|
27
|
+
url: '/admin/server-operations/titles/{title_id}/realms',
|
|
28
|
+
method: HTTP_METHODS.POST
|
|
29
|
+
},
|
|
30
|
+
updateRealm: {
|
|
31
|
+
url: '/admin/server-operations/titles/{title_id}/realms/{realm_id}',
|
|
32
|
+
method: HTTP_METHODS.PUT
|
|
33
|
+
},
|
|
34
|
+
deleteRealm: {
|
|
35
|
+
url: '/admin/server-operations/titles/{title_id}/realms/{realm_id}',
|
|
36
|
+
method: HTTP_METHODS.DELETE
|
|
37
|
+
},
|
|
14
38
|
};
|
|
15
39
|
}
|
|
16
40
|
|
package/src/routes/UserRoutes.ts
CHANGED
|
@@ -9,6 +9,8 @@ class UserRoutes {
|
|
|
9
9
|
follow: { url: '/users/{user_id}/follow', method: HTTP_METHODS.POST },
|
|
10
10
|
profile: { url: '/users/{user_id}/profile', method: HTTP_METHODS.GET },
|
|
11
11
|
me: { url: '/users/me', method: HTTP_METHODS.GET },
|
|
12
|
+
emailDeliveryStatus: { url: '/users/me/email-delivery', method: HTTP_METHODS.GET },
|
|
13
|
+
restoreEmailDelivery: { url: '/users/me/email-delivery/restore', method: HTTP_METHODS.POST },
|
|
12
14
|
syncInfluencer: { url: '/users/syncInfluencer', method: HTTP_METHODS.POST },
|
|
13
15
|
generateInfluencerProfile: { url: '/users/generateInfluencerProfile', method: HTTP_METHODS.POST },
|
|
14
16
|
oneTimeToken: { url: '/users/oneTimeToken', method: HTTP_METHODS.GET },
|