glitch-javascript-sdk 3.6.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.
@@ -1,24 +1,88 @@
1
1
  import { AxiosPromise } from 'axios';
2
2
  import Response from '../util/Response';
3
3
  export interface GameAdEventPayload {
4
+ /** Opaque token returned by the server-created advertising manifest. */
4
5
  token: string;
6
+ /** Client idempotency UUID. Reuse is valid only within the same ad session. */
5
7
  event_uuid?: string;
8
+ /** Provider that produced or attempted the event. */
6
9
  provider: string;
10
+ /** Stable Glitch placement name, such as game_banner or game_video. */
7
11
  placement: string;
8
- format: 'banner' | 'video' | 'interstitial' | 'rewarded' | 'other';
9
- event_type: 'sdk_ready' | 'request_started' | 'loaded' | 'no_fill' | 'started' | 'impression' | 'viewable' | 'clicked' | 'completed' | 'skipped' | 'closed' | 'paused_game' | 'resumed_game' | 'error';
12
+ /** Normalized creative/ad format. */
13
+ format: 'banner' | 'video' | 'interstitial' | 'rewarded' | 'in_game_image' | 'in_game_video' | 'other';
14
+ /** Normalized SDK/ad lifecycle event. */
15
+ event_type: 'sdk_ready' | 'request_started' | 'loaded' | 'channel_registered' | 'measurement' | 'no_fill' | 'fallback_shown' | 'started' | 'impression' | 'viewable' | 'clicked' | 'completed' | 'skipped' | 'closed' | 'paused_game' | 'resumed_game' | 'error';
16
+ /** Optional provider-native event or impression identifier. */
10
17
  provider_event_id?: string;
18
+ /** Non-sensitive provider diagnostics and event context. */
11
19
  metadata?: Record<string, any>;
20
+ /** ISO 8601 client-observed timestamp. Defaults to server receipt time. */
12
21
  occurred_at?: string;
13
22
  }
23
+ /** Provider-neutral intrinsic-ad surface declared by a game developer. */
24
+ export interface GameInGameAdPlacement {
25
+ id?: string;
26
+ title_id?: string;
27
+ provider?: 'anzu';
28
+ placement_key: string;
29
+ channel_name: string;
30
+ surface_type: 'mesh' | 'sprite' | 'ui_image' | 'raw_image' | 'html' | 'electron_shell';
31
+ scene_name?: string | null;
32
+ aspect_ratio: number;
33
+ allow_images: boolean;
34
+ allow_videos: boolean;
35
+ allow_audio?: boolean;
36
+ is_dynamic: boolean;
37
+ is_clickable: boolean;
38
+ shrink_to_fit: boolean;
39
+ fallback_media_url?: string | null;
40
+ status: 'active' | 'disabled';
41
+ metadata?: Record<string, any> | null;
42
+ }
43
+ /** Public delivery identity for a provider and runtime platform. */
44
+ export interface GameAdProviderApp {
45
+ id?: string;
46
+ title_id?: string | null;
47
+ provider: 'anzu';
48
+ platform: 'web' | 'electron_macos' | 'electron_windows' | 'electron_linux' | 'unity_webgl' | 'cocos_web' | 'construct_web';
49
+ app_key: string;
50
+ bundle_id?: string | null;
51
+ mode: 'integration' | 'production';
52
+ integration_type: 'managed' | 'direct';
53
+ status: 'active' | 'disabled' | 'pending';
54
+ metadata?: Record<string, any> | null;
55
+ }
56
+ /**
57
+ * Typed client for platform-served game advertising.
58
+ *
59
+ * These endpoints manage publisher inventory displayed around playable games;
60
+ * they are intentionally separate from APIs used to buy advertising campaigns.
61
+ */
14
62
  declare class GameAdvertising {
63
+ /** Return developer-visible ad-earnings settings for a title. */
15
64
  static settings<T>(title_id: string): AxiosPromise<Response<T>>;
65
+ /** Update developer ad-earnings activation and optional title provider ID. */
16
66
  static updateSettings<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
67
+ /** Resolve ad eligibility and create an expiring provider manifest/session. */
17
68
  static createSession<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
69
+ /** Store one normalized, idempotent event for an advertising session. */
18
70
  static storeEvent<T>(title_id: string, session_id: string, data: GameAdEventPayload): AxiosPromise<Response<T>>;
71
+ /** Return developer-visible estimated/finalized earnings and delivery totals. */
19
72
  static revenueSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
73
+ /** Return every intrinsic-ad surface configured for a title. */
74
+ static inGamePlacements<T>(title_id: string): AxiosPromise<Response<T>>;
75
+ /** Atomically replace a title's provider-neutral intrinsic-ad surfaces. */
76
+ static replaceInGamePlacements<T>(title_id: string, placements: GameInGameAdPlacement[]): AxiosPromise<Response<T>>;
77
+ /** Return site-admin delivery settings, aggregate metrics, and recent revenue. */
20
78
  static adminDashboard<T>(): AxiosPromise<Response<T>>;
79
+ /** Partially update platform-wide providers and delivery frequency. */
21
80
  static adminUpdateSettings<T>(data: object): AxiosPromise<Response<T>>;
81
+ /** Import or reconcile one provider revenue report row. */
22
82
  static adminStoreRevenue<T>(data: object): AxiosPromise<Response<T>>;
83
+ /** Return public provider app keys and platform mappings for site admins. */
84
+ static adminProviderApps<T>(): AxiosPromise<Response<T>>;
85
+ /** Create or update a provider app mapping without accepting report secrets. */
86
+ static adminUpsertProviderApp<T>(data: GameAdProviderApp): AxiosPromise<Response<T>>;
23
87
  }
24
88
  export default GameAdvertising;
@@ -202,6 +202,32 @@ declare class GameShows {
202
202
  * List notification signups for a game show. Requires organizer permissions.
203
203
  */
204
204
  static listWishlist<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
205
+ /** List the anonymous, published festival award/prize/swag catalog. */
206
+ static listPublicRewards<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
207
+ /** Retrieve one SSR-ready public festival reward. */
208
+ static getPublicReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
209
+ /** Retrieve a privacy-safe public game leaderboard for one reward. */
210
+ static getPublicRewardLeaderboard<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
211
+ /** List drafts, sponsor items, inventory, recipients, and fulfillment for organizers. */
212
+ static manageRewards<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
213
+ /** Claim an eligible attendee, entrant, points, or previously awarded festival reward. */
214
+ static claimReward<T>(show_id: string, reward_id: string, data?: {
215
+ title_id?: string;
216
+ }, params?: Record<string, any>): AxiosPromise<Response<T>>;
217
+ /** Create an organizer-controlled festival award, prize, swag item, or reward. */
218
+ static createReward<T>(show_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
219
+ /** Update publication, eligibility, metrics, inventory, or rich content. */
220
+ static updateReward<T>(show_id: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
221
+ /** Soft-delete one festival reward. */
222
+ static deleteReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
223
+ /** Preview the organizer-only game or attendee performance leaderboard. */
224
+ static rewardLeaderboard<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
225
+ /** Snapshot current metric leaders as reward recipients. */
226
+ static autoAwardReward<T>(show_id: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
227
+ /** Add a manual nominee, winner, honoree, claimant, or fulfillment record. */
228
+ static addRewardRecipient<T>(show_id: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
229
+ /** Update judging, claim, revocation, rank, or fulfillment state. */
230
+ static updateRewardRecipient<T>(show_id: string, reward_id: string, recipient_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
205
231
  /**
206
232
  * List public game shows that include a title. Useful for game-page festival banners.
207
233
  */
@@ -253,5 +279,13 @@ declare class GameShows {
253
279
  static paySponsorInvitation<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
254
280
  /** Synchronize the same intent after Stripe.js completes required 3DS. */
255
281
  static confirmSponsorInvitationPayment<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
282
+ /** List awards, prizes, and swag owned by a sponsor invitation. */
283
+ static sponsorInvitationRewards<T>(token: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
284
+ /** Create a draft sponsor-owned award, prize, or swag item. */
285
+ static createSponsorInvitationReward<T>(token: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
286
+ /** Update sponsor-owned reward content and eligibility. */
287
+ static updateSponsorInvitationReward<T>(token: string, reward_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
288
+ /** Remove a sponsor-owned draft reward. */
289
+ static deleteSponsorInvitationReward<T>(token: string, reward_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
256
290
  }
257
291
  export default GameShows;
@@ -1,5 +1,49 @@
1
1
  import Response from "../util/Response";
2
2
  import { AxiosPromise } from "axios";
3
+ /** Human-readable earning categories returned by influencer payout APIs. */
4
+ export type InfluencerPayoutSourceType = "campaign_compensation" | "ad_revenue_share" | "subscription_residual" | "manual_adjustment";
5
+ /** Auditable metrics and creator-content attribution attached to a payout. */
6
+ export interface InfluencerPayoutBreakdown {
7
+ label?: string;
8
+ payment_method?: "flat" | "performance" | "hybrid";
9
+ provider?: string;
10
+ period_start?: string;
11
+ period_end?: string;
12
+ impressions?: number;
13
+ clicks?: number;
14
+ short_link_id?: string | null;
15
+ short_link_click_id?: string | null;
16
+ social_media_post_id?: string | null;
17
+ tracking_link_label?: string | null;
18
+ social_platform?: string | null;
19
+ social_post_url?: string | null;
20
+ }
21
+ /** One campaign or advertising earning payable to the authenticated influencer. */
22
+ export interface InfluencerPayout {
23
+ id: string;
24
+ user_id: string;
25
+ campaign_id: string;
26
+ amount: number;
27
+ currency: string;
28
+ status: "pending" | "completed" | "failed";
29
+ payout_date?: string | null;
30
+ source_type: InfluencerPayoutSourceType;
31
+ source_label: string;
32
+ source_reference_id?: string | null;
33
+ breakdown?: InfluencerPayoutBreakdown;
34
+ campaign?: Record<string, any>;
35
+ }
36
+ /** Optional filters for the authenticated influencer's payout history. */
37
+ export interface InfluencerPayoutQuery {
38
+ campaign_id?: string;
39
+ month?: number;
40
+ year?: number;
41
+ amount?: number;
42
+ status?: "pending" | "completed" | "failed";
43
+ source_type?: InfluencerPayoutSourceType;
44
+ orderBy?: "created_at" | "amount";
45
+ orderDirection?: "asc" | "desc";
46
+ }
3
47
  declare class Users {
4
48
  /**
5
49
  * List all the users.
@@ -42,16 +86,17 @@ declare class Users {
42
86
  */
43
87
  static getCampaignInvites<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
44
88
  /**
45
- * Gets payouts from past campaings
89
+ * Gets the authenticated influencer's payouts from campaigns and attributed
90
+ * game advertising. Advertising revenue is returned as a separate additive
91
+ * source with provider-period metrics and tracking-link/social-post IDs.
46
92
  *
47
93
  * @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
48
94
  *
49
- * @param user_id The id of the user to update.
50
- * @param data The data to update.
95
+ * @param params Optional campaign, date, status, source, and ordering filters.
51
96
  *
52
97
  * @returns promise
53
98
  */
54
- static getPayouts<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
99
+ static getPayouts<T = InfluencerPayout[]>(params?: InfluencerPayoutQuery): AxiosPromise<Response<T>>;
55
100
  /**
56
101
  * Sync the current influencer's information.
57
102
  *
package/dist/esm/index.js CHANGED
@@ -9045,12 +9045,13 @@ var Users = /** @class */ (function () {
9045
9045
  return Requests.processRoute(UserRoutes.routes.getCampaignInvites, {}, undefined, params);
9046
9046
  };
9047
9047
  /**
9048
- * Gets payouts from past campaings
9048
+ * Gets the authenticated influencer's payouts from campaigns and attributed
9049
+ * game advertising. Advertising revenue is returned as a separate additive
9050
+ * source with provider-period metrics and tracking-link/social-post IDs.
9049
9051
  *
9050
9052
  * @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
9051
9053
  *
9052
- * @param user_id The id of the user to update.
9053
- * @param data The data to update.
9054
+ * @param params Optional campaign, date, status, source, and ordering filters.
9054
9055
  *
9055
9056
  * @returns promise
9056
9057
  */
@@ -15058,6 +15059,19 @@ var GameShowsRoute = /** @class */ (function () {
15058
15059
  joinWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.POST },
15059
15060
  confirmWishlist: { url: '/gameshows/wishlist/confirm/{token}', method: HTTP_METHODS.GET },
15060
15061
  listWishlist: { url: '/gameshows/{show_id}/wishlist', method: HTTP_METHODS.GET },
15062
+ // Festival awards, prizes, swag, metric leaderboards, and recipients.
15063
+ listPublicRewards: { url: '/gameshows/{show_id}/rewards', method: HTTP_METHODS.GET },
15064
+ getPublicReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.GET },
15065
+ getPublicRewardLeaderboard: { url: '/gameshows/{show_id}/rewards/{reward_id}/leaderboard/public', method: HTTP_METHODS.GET },
15066
+ manageRewards: { url: '/gameshows/{show_id}/rewards/manage', method: HTTP_METHODS.GET },
15067
+ claimReward: { url: '/gameshows/{show_id}/rewards/{reward_id}/claim', method: HTTP_METHODS.POST },
15068
+ createReward: { url: '/gameshows/{show_id}/rewards', method: HTTP_METHODS.POST },
15069
+ updateReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.PUT },
15070
+ deleteReward: { url: '/gameshows/{show_id}/rewards/{reward_id}', method: HTTP_METHODS.DELETE },
15071
+ rewardLeaderboard: { url: '/gameshows/{show_id}/rewards/{reward_id}/leaderboard', method: HTTP_METHODS.GET },
15072
+ autoAwardReward: { url: '/gameshows/{show_id}/rewards/{reward_id}/auto-award', method: HTTP_METHODS.POST },
15073
+ addRewardRecipient: { url: '/gameshows/{show_id}/rewards/{reward_id}/recipients', method: HTTP_METHODS.POST },
15074
+ updateRewardRecipient: { url: '/gameshows/{show_id}/rewards/{reward_id}/recipients/{recipient_id}', method: HTTP_METHODS.PUT },
15061
15075
  listForTitle: { url: '/titles/{title_id}/gameshows', method: HTTP_METHODS.GET },
15062
15076
  // Organizer sponsor lifecycle and placement administration.
15063
15077
  listSponsors: { url: '/gameshows/{show_id}/sponsors', method: HTTP_METHODS.GET },
@@ -15077,6 +15091,10 @@ var GameShowsRoute = /** @class */ (function () {
15077
15091
  sponsorInvitationSubmit: { url: '/gameshow-sponsor-invitations/{token}/submit', method: HTTP_METHODS.POST },
15078
15092
  sponsorInvitationPayment: { url: '/gameshow-sponsor-invitations/{token}/payment', method: HTTP_METHODS.POST },
15079
15093
  sponsorInvitationConfirmPayment: { url: '/gameshow-sponsor-invitations/{token}/payment/confirm', method: HTTP_METHODS.POST },
15094
+ sponsorInvitationRewards: { url: '/gameshow-sponsor-invitations/{token}/rewards', method: HTTP_METHODS.GET },
15095
+ sponsorInvitationCreateReward: { url: '/gameshow-sponsor-invitations/{token}/rewards', method: HTTP_METHODS.POST },
15096
+ sponsorInvitationUpdateReward: { url: '/gameshow-sponsor-invitations/{token}/rewards/{reward_id}', method: HTTP_METHODS.PUT },
15097
+ sponsorInvitationDeleteReward: { url: '/gameshow-sponsor-invitations/{token}/rewards/{reward_id}', method: HTTP_METHODS.DELETE },
15080
15098
  };
15081
15099
  return GameShowsRoute;
15082
15100
  }());
@@ -15374,6 +15392,55 @@ var GameShows = /** @class */ (function () {
15374
15392
  GameShows.listWishlist = function (show_id, params) {
15375
15393
  return Requests.processRoute(GameShowsRoute.routes.listWishlist, {}, { show_id: show_id }, params);
15376
15394
  };
15395
+ /** List the anonymous, published festival award/prize/swag catalog. */
15396
+ GameShows.listPublicRewards = function (show_id, params) {
15397
+ return Requests.processRoute(GameShowsRoute.routes.listPublicRewards, {}, { show_id: show_id }, params);
15398
+ };
15399
+ /** Retrieve one SSR-ready public festival reward. */
15400
+ GameShows.getPublicReward = function (show_id, reward_id, params) {
15401
+ return Requests.processRoute(GameShowsRoute.routes.getPublicReward, {}, { show_id: show_id, reward_id: reward_id }, params);
15402
+ };
15403
+ /** Retrieve a privacy-safe public game leaderboard for one reward. */
15404
+ GameShows.getPublicRewardLeaderboard = function (show_id, reward_id, params) {
15405
+ return Requests.processRoute(GameShowsRoute.routes.getPublicRewardLeaderboard, {}, { show_id: show_id, reward_id: reward_id }, params);
15406
+ };
15407
+ /** List drafts, sponsor items, inventory, recipients, and fulfillment for organizers. */
15408
+ GameShows.manageRewards = function (show_id, params) {
15409
+ return Requests.processRoute(GameShowsRoute.routes.manageRewards, {}, { show_id: show_id }, params);
15410
+ };
15411
+ /** Claim an eligible attendee, entrant, points, or previously awarded festival reward. */
15412
+ GameShows.claimReward = function (show_id, reward_id, data, params) {
15413
+ if (data === void 0) { data = {}; }
15414
+ return Requests.processRoute(GameShowsRoute.routes.claimReward, data, { show_id: show_id, reward_id: reward_id }, params);
15415
+ };
15416
+ /** Create an organizer-controlled festival award, prize, swag item, or reward. */
15417
+ GameShows.createReward = function (show_id, data, params) {
15418
+ return Requests.processRoute(GameShowsRoute.routes.createReward, data, { show_id: show_id }, params);
15419
+ };
15420
+ /** Update publication, eligibility, metrics, inventory, or rich content. */
15421
+ GameShows.updateReward = function (show_id, reward_id, data, params) {
15422
+ return Requests.processRoute(GameShowsRoute.routes.updateReward, data, { show_id: show_id, reward_id: reward_id }, params);
15423
+ };
15424
+ /** Soft-delete one festival reward. */
15425
+ GameShows.deleteReward = function (show_id, reward_id, params) {
15426
+ return Requests.processRoute(GameShowsRoute.routes.deleteReward, {}, { show_id: show_id, reward_id: reward_id }, params);
15427
+ };
15428
+ /** Preview the organizer-only game or attendee performance leaderboard. */
15429
+ GameShows.rewardLeaderboard = function (show_id, reward_id, params) {
15430
+ return Requests.processRoute(GameShowsRoute.routes.rewardLeaderboard, {}, { show_id: show_id, reward_id: reward_id }, params);
15431
+ };
15432
+ /** Snapshot current metric leaders as reward recipients. */
15433
+ GameShows.autoAwardReward = function (show_id, reward_id, params) {
15434
+ return Requests.processRoute(GameShowsRoute.routes.autoAwardReward, {}, { show_id: show_id, reward_id: reward_id }, params);
15435
+ };
15436
+ /** Add a manual nominee, winner, honoree, claimant, or fulfillment record. */
15437
+ GameShows.addRewardRecipient = function (show_id, reward_id, data, params) {
15438
+ return Requests.processRoute(GameShowsRoute.routes.addRewardRecipient, data, { show_id: show_id, reward_id: reward_id }, params);
15439
+ };
15440
+ /** Update judging, claim, revocation, rank, or fulfillment state. */
15441
+ GameShows.updateRewardRecipient = function (show_id, reward_id, recipient_id, data, params) {
15442
+ return Requests.processRoute(GameShowsRoute.routes.updateRewardRecipient, data, { show_id: show_id, reward_id: reward_id, recipient_id: recipient_id }, params);
15443
+ };
15377
15444
  /**
15378
15445
  * List public game shows that include a title. Useful for game-page festival banners.
15379
15446
  */
@@ -15462,6 +15529,22 @@ var GameShows = /** @class */ (function () {
15462
15529
  GameShows.confirmSponsorInvitationPayment = function (token, params) {
15463
15530
  return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationConfirmPayment, {}, { token: token }, params);
15464
15531
  };
15532
+ /** List awards, prizes, and swag owned by a sponsor invitation. */
15533
+ GameShows.sponsorInvitationRewards = function (token, params) {
15534
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationRewards, {}, { token: token }, params);
15535
+ };
15536
+ /** Create a draft sponsor-owned award, prize, or swag item. */
15537
+ GameShows.createSponsorInvitationReward = function (token, data, params) {
15538
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationCreateReward, data, { token: token }, params);
15539
+ };
15540
+ /** Update sponsor-owned reward content and eligibility. */
15541
+ GameShows.updateSponsorInvitationReward = function (token, reward_id, data, params) {
15542
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationUpdateReward, data, { token: token, reward_id: reward_id }, params);
15543
+ };
15544
+ /** Remove a sponsor-owned draft reward. */
15545
+ GameShows.deleteSponsorInvitationReward = function (token, reward_id, params) {
15546
+ return Requests.processRoute(GameShowsRoute.routes.sponsorInvitationDeleteReward, {}, { token: token, reward_id: reward_id }, params);
15547
+ };
15465
15548
  return GameShows;
15466
15549
  }());
15467
15550
 
@@ -20961,46 +21044,84 @@ var MarketResearch = /** @class */ (function () {
20961
21044
  var GameAdvertisingRoute = /** @class */ (function () {
20962
21045
  function GameAdvertisingRoute() {
20963
21046
  }
21047
+ /**
21048
+ * Route templates for publisher game-ad inventory, telemetry, earnings, and
21049
+ * site administration. Placeholders are expanded by Requests.processRoute.
21050
+ */
20964
21051
  GameAdvertisingRoute.routes = {
20965
21052
  settings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.GET },
20966
21053
  updateSettings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.PUT },
20967
21054
  createSession: { url: '/titles/{title_id}/advertising/sessions', method: HTTP_METHODS.POST },
20968
21055
  storeEvent: { url: '/titles/{title_id}/advertising/sessions/{session_id}/events', method: HTTP_METHODS.POST },
20969
21056
  revenueSummary: { url: '/titles/{title_id}/advertising/revenue-summary', method: HTTP_METHODS.GET },
21057
+ inGamePlacements: { url: '/titles/{title_id}/advertising/in-game/placements', method: HTTP_METHODS.GET },
21058
+ replaceInGamePlacements: { url: '/titles/{title_id}/advertising/in-game/placements', method: HTTP_METHODS.PUT },
20970
21059
  adminDashboard: { url: '/admin/game-advertising', method: HTTP_METHODS.GET },
20971
21060
  adminUpdateSettings: { url: '/admin/game-advertising/settings', method: HTTP_METHODS.PUT },
20972
21061
  adminStoreRevenue: { url: '/admin/game-advertising/revenue', method: HTTP_METHODS.POST },
21062
+ adminProviderApps: { url: '/admin/game-advertising/provider-apps', method: HTTP_METHODS.GET },
21063
+ adminUpsertProviderApp: { url: '/admin/game-advertising/provider-apps', method: HTTP_METHODS.PUT },
20973
21064
  };
20974
21065
  return GameAdvertisingRoute;
20975
21066
  }());
20976
21067
 
21068
+ /**
21069
+ * Typed client for platform-served game advertising.
21070
+ *
21071
+ * These endpoints manage publisher inventory displayed around playable games;
21072
+ * they are intentionally separate from APIs used to buy advertising campaigns.
21073
+ */
20977
21074
  var GameAdvertising = /** @class */ (function () {
20978
21075
  function GameAdvertising() {
20979
21076
  }
21077
+ /** Return developer-visible ad-earnings settings for a title. */
20980
21078
  GameAdvertising.settings = function (title_id) {
20981
21079
  return Requests.processRoute(GameAdvertisingRoute.routes.settings, undefined, { title_id: title_id });
20982
21080
  };
21081
+ /** Update developer ad-earnings activation and optional title provider ID. */
20983
21082
  GameAdvertising.updateSettings = function (title_id, data) {
20984
21083
  return Requests.processRoute(GameAdvertisingRoute.routes.updateSettings, data, { title_id: title_id });
20985
21084
  };
21085
+ /** Resolve ad eligibility and create an expiring provider manifest/session. */
20986
21086
  GameAdvertising.createSession = function (title_id, data) {
20987
21087
  return Requests.processRoute(GameAdvertisingRoute.routes.createSession, data, { title_id: title_id });
20988
21088
  };
21089
+ /** Store one normalized, idempotent event for an advertising session. */
20989
21090
  GameAdvertising.storeEvent = function (title_id, session_id, data) {
20990
21091
  return Requests.processRoute(GameAdvertisingRoute.routes.storeEvent, data, { title_id: title_id, session_id: session_id });
20991
21092
  };
21093
+ /** Return developer-visible estimated/finalized earnings and delivery totals. */
20992
21094
  GameAdvertising.revenueSummary = function (title_id, params) {
20993
21095
  return Requests.processRoute(GameAdvertisingRoute.routes.revenueSummary, undefined, { title_id: title_id }, params);
20994
21096
  };
21097
+ /** Return every intrinsic-ad surface configured for a title. */
21098
+ GameAdvertising.inGamePlacements = function (title_id) {
21099
+ return Requests.processRoute(GameAdvertisingRoute.routes.inGamePlacements, undefined, { title_id: title_id });
21100
+ };
21101
+ /** Atomically replace a title's provider-neutral intrinsic-ad surfaces. */
21102
+ GameAdvertising.replaceInGamePlacements = function (title_id, placements) {
21103
+ return Requests.processRoute(GameAdvertisingRoute.routes.replaceInGamePlacements, { placements: placements }, { title_id: title_id });
21104
+ };
21105
+ /** Return site-admin delivery settings, aggregate metrics, and recent revenue. */
20995
21106
  GameAdvertising.adminDashboard = function () {
20996
21107
  return Requests.processRoute(GameAdvertisingRoute.routes.adminDashboard);
20997
21108
  };
21109
+ /** Partially update platform-wide providers and delivery frequency. */
20998
21110
  GameAdvertising.adminUpdateSettings = function (data) {
20999
21111
  return Requests.processRoute(GameAdvertisingRoute.routes.adminUpdateSettings, data);
21000
21112
  };
21113
+ /** Import or reconcile one provider revenue report row. */
21001
21114
  GameAdvertising.adminStoreRevenue = function (data) {
21002
21115
  return Requests.processRoute(GameAdvertisingRoute.routes.adminStoreRevenue, data);
21003
21116
  };
21117
+ /** Return public provider app keys and platform mappings for site admins. */
21118
+ GameAdvertising.adminProviderApps = function () {
21119
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminProviderApps);
21120
+ };
21121
+ /** Create or update a provider app mapping without accepting report secrets. */
21122
+ GameAdvertising.adminUpsertProviderApp = function (data) {
21123
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminUpsertProviderApp, data);
21124
+ };
21004
21125
  return GameAdvertising;
21005
21126
  }());
21006
21127