glitch-javascript-sdk 3.5.2 → 3.6.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.
@@ -0,0 +1,24 @@
1
+ import { AxiosPromise } from 'axios';
2
+ import Response from '../util/Response';
3
+ export interface GameAdEventPayload {
4
+ token: string;
5
+ event_uuid?: string;
6
+ provider: string;
7
+ 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';
10
+ provider_event_id?: string;
11
+ metadata?: Record<string, any>;
12
+ occurred_at?: string;
13
+ }
14
+ declare class GameAdvertising {
15
+ static settings<T>(title_id: string): AxiosPromise<Response<T>>;
16
+ static updateSettings<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
17
+ static createSession<T>(title_id: string, data: object): AxiosPromise<Response<T>>;
18
+ static storeEvent<T>(title_id: string, session_id: string, data: GameAdEventPayload): AxiosPromise<Response<T>>;
19
+ static revenueSummary<T>(title_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
20
+ static adminDashboard<T>(): AxiosPromise<Response<T>>;
21
+ static adminUpdateSettings<T>(data: object): AxiosPromise<Response<T>>;
22
+ static adminStoreRevenue<T>(data: object): AxiosPromise<Response<T>>;
23
+ }
24
+ export default GameAdvertising;
@@ -161,6 +161,8 @@ declare class GameShows {
161
161
  * List livestream and programming schedule items for a game show.
162
162
  */
163
163
  static listSchedule<T>(show_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
164
+ /** Fetch one public or organizer-visible festival schedule item. */
165
+ static getScheduleItem<T>(show_id: string, schedule_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
164
166
  /**
165
167
  * Create a schedule item for a game show. Requires organizer permissions.
166
168
  */
@@ -51,6 +51,7 @@ import PrDirectory from "./PrDirectory";
51
51
  import AdminReports from "./AdminReports";
52
52
  import AdminUsers from "./AdminUsers";
53
53
  import MarketResearch from "./MarketResearch";
54
+ import GameAdvertising from './GameAdvertising';
54
55
  export { Ads };
55
56
  export { AccessKeys };
56
57
  export { Auth };
@@ -104,3 +105,4 @@ export { PrDirectory };
104
105
  export { AdminReports };
105
106
  export { AdminUsers };
106
107
  export { MarketResearch };
108
+ export { GameAdvertising };
@@ -51,6 +51,7 @@ import { PrDirectory } from './api';
51
51
  import { AdminReports } from './api';
52
52
  import { AdminUsers } from './api';
53
53
  import { MarketResearch } from './api';
54
+ import { GameAdvertising } from './api';
54
55
  import Requests from "./util/Requests";
55
56
  import Parser from "./util/Parser";
56
57
  import Session from "./util/Session";
@@ -123,6 +124,7 @@ declare class Glitch {
123
124
  AdminReports: typeof AdminReports;
124
125
  AdminUsers: typeof AdminUsers;
125
126
  MarketResearch: typeof MarketResearch;
127
+ GameAdvertising: typeof GameAdvertising;
126
128
  };
127
129
  static util: {
128
130
  Requests: typeof Requests;
package/dist/esm/index.js CHANGED
@@ -15048,6 +15048,7 @@ var GameShowsRoute = /** @class */ (function () {
15048
15048
  deleteBlock: { url: '/gameshows/{show_id}/blocks/{block_id}', method: HTTP_METHODS.DELETE },
15049
15049
  reorderBlocks: { url: '/gameshows/{show_id}/blocks/reorder', method: HTTP_METHODS.POST },
15050
15050
  listSchedule: { url: '/gameshows/{show_id}/schedule', method: HTTP_METHODS.GET },
15051
+ getScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.GET },
15051
15052
  createScheduleItem: { url: '/gameshows/{show_id}/schedule', method: HTTP_METHODS.POST },
15052
15053
  updateScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.PUT },
15053
15054
  deleteScheduleItem: { url: '/gameshows/{show_id}/schedule/{schedule_id}', method: HTTP_METHODS.DELETE },
@@ -15312,6 +15313,10 @@ var GameShows = /** @class */ (function () {
15312
15313
  GameShows.listSchedule = function (show_id, params) {
15313
15314
  return Requests.processRoute(GameShowsRoute.routes.listSchedule, {}, { show_id: show_id }, params);
15314
15315
  };
15316
+ /** Fetch one public or organizer-visible festival schedule item. */
15317
+ GameShows.getScheduleItem = function (show_id, schedule_id, params) {
15318
+ return Requests.processRoute(GameShowsRoute.routes.getScheduleItem, {}, { show_id: show_id, schedule_id: schedule_id }, params);
15319
+ };
15315
15320
  /**
15316
15321
  * Create a schedule item for a game show. Requires organizer permissions.
15317
15322
  */
@@ -20953,6 +20958,52 @@ var MarketResearch = /** @class */ (function () {
20953
20958
  return MarketResearch;
20954
20959
  }());
20955
20960
 
20961
+ var GameAdvertisingRoute = /** @class */ (function () {
20962
+ function GameAdvertisingRoute() {
20963
+ }
20964
+ GameAdvertisingRoute.routes = {
20965
+ settings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.GET },
20966
+ updateSettings: { url: '/titles/{title_id}/advertising/settings', method: HTTP_METHODS.PUT },
20967
+ createSession: { url: '/titles/{title_id}/advertising/sessions', method: HTTP_METHODS.POST },
20968
+ storeEvent: { url: '/titles/{title_id}/advertising/sessions/{session_id}/events', method: HTTP_METHODS.POST },
20969
+ revenueSummary: { url: '/titles/{title_id}/advertising/revenue-summary', method: HTTP_METHODS.GET },
20970
+ adminDashboard: { url: '/admin/game-advertising', method: HTTP_METHODS.GET },
20971
+ adminUpdateSettings: { url: '/admin/game-advertising/settings', method: HTTP_METHODS.PUT },
20972
+ adminStoreRevenue: { url: '/admin/game-advertising/revenue', method: HTTP_METHODS.POST },
20973
+ };
20974
+ return GameAdvertisingRoute;
20975
+ }());
20976
+
20977
+ var GameAdvertising = /** @class */ (function () {
20978
+ function GameAdvertising() {
20979
+ }
20980
+ GameAdvertising.settings = function (title_id) {
20981
+ return Requests.processRoute(GameAdvertisingRoute.routes.settings, undefined, { title_id: title_id });
20982
+ };
20983
+ GameAdvertising.updateSettings = function (title_id, data) {
20984
+ return Requests.processRoute(GameAdvertisingRoute.routes.updateSettings, data, { title_id: title_id });
20985
+ };
20986
+ GameAdvertising.createSession = function (title_id, data) {
20987
+ return Requests.processRoute(GameAdvertisingRoute.routes.createSession, data, { title_id: title_id });
20988
+ };
20989
+ GameAdvertising.storeEvent = function (title_id, session_id, data) {
20990
+ return Requests.processRoute(GameAdvertisingRoute.routes.storeEvent, data, { title_id: title_id, session_id: session_id });
20991
+ };
20992
+ GameAdvertising.revenueSummary = function (title_id, params) {
20993
+ return Requests.processRoute(GameAdvertisingRoute.routes.revenueSummary, undefined, { title_id: title_id }, params);
20994
+ };
20995
+ GameAdvertising.adminDashboard = function () {
20996
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminDashboard);
20997
+ };
20998
+ GameAdvertising.adminUpdateSettings = function (data) {
20999
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminUpdateSettings, data);
21000
+ };
21001
+ GameAdvertising.adminStoreRevenue = function (data) {
21002
+ return Requests.processRoute(GameAdvertisingRoute.routes.adminStoreRevenue, data);
21003
+ };
21004
+ return GameAdvertising;
21005
+ }());
21006
+
20956
21007
  var Parser = /** @class */ (function () {
20957
21008
  function Parser() {
20958
21009
  }
@@ -21502,6 +21553,7 @@ var Glitch = /** @class */ (function () {
21502
21553
  AdminReports: AdminReports,
21503
21554
  AdminUsers: AdminUsers,
21504
21555
  MarketResearch: MarketResearch,
21556
+ GameAdvertising: GameAdvertising,
21505
21557
  };
21506
21558
  Glitch.util = {
21507
21559
  Requests: Requests,