glitch-javascript-sdk 3.5.3 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +89 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/GameAdvertising.d.ts +88 -0
- package/dist/esm/api/Users.d.ts +49 -4
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +89 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/GameAdvertisingRoute.d.ts +11 -0
- package/dist/index.d.ts +136 -4
- package/package.json +2 -2
- package/src/api/GameAdvertising.ts +130 -0
- package/src/api/Titles.ts +1 -1
- package/src/api/Users.ts +53 -4
- package/src/api/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/routes/GameAdvertisingRoute.ts +25 -0
package/dist/cjs/index.js
CHANGED
|
@@ -21043,12 +21043,13 @@ var Users = /** @class */ (function () {
|
|
|
21043
21043
|
return Requests.processRoute(UserRoutes.routes.getCampaignInvites, {}, undefined, params);
|
|
21044
21044
|
};
|
|
21045
21045
|
/**
|
|
21046
|
-
* Gets payouts from
|
|
21046
|
+
* Gets the authenticated influencer's payouts from campaigns and attributed
|
|
21047
|
+
* game advertising. Advertising revenue is returned as a separate additive
|
|
21048
|
+
* source with provider-period metrics and tracking-link/social-post IDs.
|
|
21047
21049
|
*
|
|
21048
21050
|
* @see https://api.glitch.fun/api/documentation#/Users%20Route/showMe
|
|
21049
21051
|
*
|
|
21050
|
-
* @param
|
|
21051
|
-
* @param data The data to update.
|
|
21052
|
+
* @param params Optional campaign, date, status, source, and ordering filters.
|
|
21052
21053
|
*
|
|
21053
21054
|
* @returns promise
|
|
21054
21055
|
*/
|
|
@@ -32956,6 +32957,90 @@ var MarketResearch = /** @class */ (function () {
|
|
|
32956
32957
|
return MarketResearch;
|
|
32957
32958
|
}());
|
|
32958
32959
|
|
|
32960
|
+
var GameAdvertisingRoute = /** @class */ (function () {
|
|
32961
|
+
function GameAdvertisingRoute() {
|
|
32962
|
+
}
|
|
32963
|
+
/**
|
|
32964
|
+
* Route templates for publisher game-ad inventory, telemetry, earnings, and
|
|
32965
|
+
* site administration. Placeholders are expanded by Requests.processRoute.
|
|
32966
|
+
*/
|
|
32967
|
+
GameAdvertisingRoute.routes = {
|
|
32968
|
+
settings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.GET },
|
|
32969
|
+
updateSettings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.PUT },
|
|
32970
|
+
createSession: { url: '/titles/{title_id}/advertising/sessions', method: HTTP_METHODS.POST },
|
|
32971
|
+
storeEvent: { url: '/titles/{title_id}/advertising/sessions/{session_id}/events', method: HTTP_METHODS.POST },
|
|
32972
|
+
revenueSummary: { url: '/titles/{title_id}/advertising/revenue-summary', method: HTTP_METHODS.GET },
|
|
32973
|
+
inGamePlacements: { url: '/titles/{title_id}/advertising/in-game/placements', method: HTTP_METHODS.GET },
|
|
32974
|
+
replaceInGamePlacements: { url: '/titles/{title_id}/advertising/in-game/placements', method: HTTP_METHODS.PUT },
|
|
32975
|
+
adminDashboard: { url: '/admin/game-advertising', method: HTTP_METHODS.GET },
|
|
32976
|
+
adminUpdateSettings: { url: '/admin/game-advertising/settings', method: HTTP_METHODS.PUT },
|
|
32977
|
+
adminStoreRevenue: { url: '/admin/game-advertising/revenue', method: HTTP_METHODS.POST },
|
|
32978
|
+
adminProviderApps: { url: '/admin/game-advertising/provider-apps', method: HTTP_METHODS.GET },
|
|
32979
|
+
adminUpsertProviderApp: { url: '/admin/game-advertising/provider-apps', method: HTTP_METHODS.PUT },
|
|
32980
|
+
};
|
|
32981
|
+
return GameAdvertisingRoute;
|
|
32982
|
+
}());
|
|
32983
|
+
|
|
32984
|
+
/**
|
|
32985
|
+
* Typed client for platform-served game advertising.
|
|
32986
|
+
*
|
|
32987
|
+
* These endpoints manage publisher inventory displayed around playable games;
|
|
32988
|
+
* they are intentionally separate from APIs used to buy advertising campaigns.
|
|
32989
|
+
*/
|
|
32990
|
+
var GameAdvertising = /** @class */ (function () {
|
|
32991
|
+
function GameAdvertising() {
|
|
32992
|
+
}
|
|
32993
|
+
/** Return developer-visible ad-earnings settings for a title. */
|
|
32994
|
+
GameAdvertising.settings = function (title_id) {
|
|
32995
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.settings, undefined, { title_id: title_id });
|
|
32996
|
+
};
|
|
32997
|
+
/** Update developer ad-earnings activation and optional title provider ID. */
|
|
32998
|
+
GameAdvertising.updateSettings = function (title_id, data) {
|
|
32999
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.updateSettings, data, { title_id: title_id });
|
|
33000
|
+
};
|
|
33001
|
+
/** Resolve ad eligibility and create an expiring provider manifest/session. */
|
|
33002
|
+
GameAdvertising.createSession = function (title_id, data) {
|
|
33003
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.createSession, data, { title_id: title_id });
|
|
33004
|
+
};
|
|
33005
|
+
/** Store one normalized, idempotent event for an advertising session. */
|
|
33006
|
+
GameAdvertising.storeEvent = function (title_id, session_id, data) {
|
|
33007
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.storeEvent, data, { title_id: title_id, session_id: session_id });
|
|
33008
|
+
};
|
|
33009
|
+
/** Return developer-visible estimated/finalized earnings and delivery totals. */
|
|
33010
|
+
GameAdvertising.revenueSummary = function (title_id, params) {
|
|
33011
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.revenueSummary, undefined, { title_id: title_id }, params);
|
|
33012
|
+
};
|
|
33013
|
+
/** Return every intrinsic-ad surface configured for a title. */
|
|
33014
|
+
GameAdvertising.inGamePlacements = function (title_id) {
|
|
33015
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.inGamePlacements, undefined, { title_id: title_id });
|
|
33016
|
+
};
|
|
33017
|
+
/** Atomically replace a title's provider-neutral intrinsic-ad surfaces. */
|
|
33018
|
+
GameAdvertising.replaceInGamePlacements = function (title_id, placements) {
|
|
33019
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.replaceInGamePlacements, { placements: placements }, { title_id: title_id });
|
|
33020
|
+
};
|
|
33021
|
+
/** Return site-admin delivery settings, aggregate metrics, and recent revenue. */
|
|
33022
|
+
GameAdvertising.adminDashboard = function () {
|
|
33023
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.adminDashboard);
|
|
33024
|
+
};
|
|
33025
|
+
/** Partially update platform-wide providers and delivery frequency. */
|
|
33026
|
+
GameAdvertising.adminUpdateSettings = function (data) {
|
|
33027
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.adminUpdateSettings, data);
|
|
33028
|
+
};
|
|
33029
|
+
/** Import or reconcile one provider revenue report row. */
|
|
33030
|
+
GameAdvertising.adminStoreRevenue = function (data) {
|
|
33031
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.adminStoreRevenue, data);
|
|
33032
|
+
};
|
|
33033
|
+
/** Return public provider app keys and platform mappings for site admins. */
|
|
33034
|
+
GameAdvertising.adminProviderApps = function () {
|
|
33035
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.adminProviderApps);
|
|
33036
|
+
};
|
|
33037
|
+
/** Create or update a provider app mapping without accepting report secrets. */
|
|
33038
|
+
GameAdvertising.adminUpsertProviderApp = function (data) {
|
|
33039
|
+
return Requests.processRoute(GameAdvertisingRoute.routes.adminUpsertProviderApp, data);
|
|
33040
|
+
};
|
|
33041
|
+
return GameAdvertising;
|
|
33042
|
+
}());
|
|
33043
|
+
|
|
32959
33044
|
var Parser = /** @class */ (function () {
|
|
32960
33045
|
function Parser() {
|
|
32961
33046
|
}
|
|
@@ -33505,6 +33590,7 @@ var Glitch = /** @class */ (function () {
|
|
|
33505
33590
|
AdminReports: AdminReports,
|
|
33506
33591
|
AdminUsers: AdminUsers,
|
|
33507
33592
|
MarketResearch: MarketResearch,
|
|
33593
|
+
GameAdvertising: GameAdvertising,
|
|
33508
33594
|
};
|
|
33509
33595
|
Glitch.util = {
|
|
33510
33596
|
Requests: Requests,
|