glitch-javascript-sdk 2.8.1 → 2.8.3
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 +41 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Titles.d.ts +13 -0
- package/dist/esm/api/WebsiteAnalytics.d.ts +11 -0
- package/dist/esm/index.js +41 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/api/Titles.ts +20 -0
- package/src/api/WebsiteAnalytics.ts +26 -7
- package/src/routes/TitlesRoute.ts +9 -0
- package/src/routes/WebsiteAnalyticsRoute.ts +9 -5
package/dist/esm/api/Titles.d.ts
CHANGED
|
@@ -501,5 +501,18 @@ declare class Titles {
|
|
|
501
501
|
* Get the total earnings and playtime summary for a title.
|
|
502
502
|
*/
|
|
503
503
|
static getDeveloperPayoutSummary<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
504
|
+
/**
|
|
505
|
+
* The Aegis Handshake: Verify if a player is allowed to play.
|
|
506
|
+
*
|
|
507
|
+
* This is used by the game engine (Unity/Unreal) to confirm that the
|
|
508
|
+
* current session is valid and the user has a proper license.
|
|
509
|
+
*
|
|
510
|
+
* @see https://api.glitch.fun/api/documentation#/Aegis%20Security/validateGameSession
|
|
511
|
+
*
|
|
512
|
+
* @param title_id The UUID of the game title.
|
|
513
|
+
* @param install_id The UUID of the specific install/session.
|
|
514
|
+
* @returns AxiosPromise containing { valid: boolean, user_name: string, license_type: string }
|
|
515
|
+
*/
|
|
516
|
+
static validateInstall<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
|
|
504
517
|
}
|
|
505
518
|
export default Titles;
|
|
@@ -200,5 +200,16 @@ declare class WebsiteAnalytics {
|
|
|
200
200
|
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
201
201
|
*/
|
|
202
202
|
static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
203
|
+
/**
|
|
204
|
+
* Get a detailed marketing report for the game's landing page.
|
|
205
|
+
* Includes scroll depth, video watch time distribution, and CTA performance.
|
|
206
|
+
*
|
|
207
|
+
* @param params
|
|
208
|
+
* - title_id: string (Required)
|
|
209
|
+
* - start_date?: string (YYYY-MM-DD)
|
|
210
|
+
* - end_date?: string (YYYY-MM-DD)
|
|
211
|
+
* - group_by?: 'country' | 'device'
|
|
212
|
+
*/
|
|
213
|
+
static landingPageReport<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
203
214
|
}
|
|
204
215
|
export default WebsiteAnalytics;
|
package/dist/esm/index.js
CHANGED
|
@@ -11701,6 +11701,14 @@ var TitlesRoute = /** @class */ (function () {
|
|
|
11701
11701
|
listDeveloperPayouts: { url: '/titles/{title_id}/payouts', method: HTTP_METHODS.GET },
|
|
11702
11702
|
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
11703
11703
|
developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
|
|
11704
|
+
/**
|
|
11705
|
+
* The Aegis Handshake: Validates if a specific install/session is authorized to play.
|
|
11706
|
+
* POST /titles/{title_id}/installs/{install_id}/validate
|
|
11707
|
+
*/
|
|
11708
|
+
validateInstall: {
|
|
11709
|
+
url: '/titles/{title_id}/installs/{install_id}/validate',
|
|
11710
|
+
method: HTTP_METHODS.POST
|
|
11711
|
+
},
|
|
11704
11712
|
};
|
|
11705
11713
|
return TitlesRoute;
|
|
11706
11714
|
}());
|
|
@@ -12358,6 +12366,21 @@ var Titles = /** @class */ (function () {
|
|
|
12358
12366
|
Titles.getDeveloperPayoutSummary = function (title_id) {
|
|
12359
12367
|
return Requests.processRoute(TitlesRoute.routes.developerPayoutSummary, {}, { title_id: title_id });
|
|
12360
12368
|
};
|
|
12369
|
+
/**
|
|
12370
|
+
* The Aegis Handshake: Verify if a player is allowed to play.
|
|
12371
|
+
*
|
|
12372
|
+
* This is used by the game engine (Unity/Unreal) to confirm that the
|
|
12373
|
+
* current session is valid and the user has a proper license.
|
|
12374
|
+
*
|
|
12375
|
+
* @see https://api.glitch.fun/api/documentation#/Aegis%20Security/validateGameSession
|
|
12376
|
+
*
|
|
12377
|
+
* @param title_id The UUID of the game title.
|
|
12378
|
+
* @param install_id The UUID of the specific install/session.
|
|
12379
|
+
* @returns AxiosPromise containing { valid: boolean, user_name: string, license_type: string }
|
|
12380
|
+
*/
|
|
12381
|
+
Titles.validateInstall = function (title_id, install_id) {
|
|
12382
|
+
return Requests.processRoute(TitlesRoute.routes.validateInstall, {}, { title_id: title_id, install_id: install_id });
|
|
12383
|
+
};
|
|
12361
12384
|
return Titles;
|
|
12362
12385
|
}());
|
|
12363
12386
|
|
|
@@ -15884,7 +15907,11 @@ var WebsiteAnalyticsRoute = /** @class */ (function () {
|
|
|
15884
15907
|
journey: {
|
|
15885
15908
|
url: '/analytics/journey',
|
|
15886
15909
|
method: HTTP_METHODS.GET
|
|
15887
|
-
}
|
|
15910
|
+
},
|
|
15911
|
+
landingPageReport: {
|
|
15912
|
+
url: '/analytics/reports/landing-page',
|
|
15913
|
+
method: HTTP_METHODS.GET
|
|
15914
|
+
},
|
|
15888
15915
|
};
|
|
15889
15916
|
return WebsiteAnalyticsRoute;
|
|
15890
15917
|
}());
|
|
@@ -16125,6 +16152,19 @@ var WebsiteAnalytics = /** @class */ (function () {
|
|
|
16125
16152
|
{}, // no body data (GET request)
|
|
16126
16153
|
undefined, params);
|
|
16127
16154
|
};
|
|
16155
|
+
/**
|
|
16156
|
+
* Get a detailed marketing report for the game's landing page.
|
|
16157
|
+
* Includes scroll depth, video watch time distribution, and CTA performance.
|
|
16158
|
+
*
|
|
16159
|
+
* @param params
|
|
16160
|
+
* - title_id: string (Required)
|
|
16161
|
+
* - start_date?: string (YYYY-MM-DD)
|
|
16162
|
+
* - end_date?: string (YYYY-MM-DD)
|
|
16163
|
+
* - group_by?: 'country' | 'device'
|
|
16164
|
+
*/
|
|
16165
|
+
WebsiteAnalytics.landingPageReport = function (params) {
|
|
16166
|
+
return Requests.processRoute(WebsiteAnalyticsRoute.routes.landingPageReport, {}, undefined, params);
|
|
16167
|
+
};
|
|
16128
16168
|
return WebsiteAnalytics;
|
|
16129
16169
|
}());
|
|
16130
16170
|
|