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/index.d.ts
CHANGED
|
@@ -4289,6 +4289,19 @@ declare class Titles {
|
|
|
4289
4289
|
* Get the total earnings and playtime summary for a title.
|
|
4290
4290
|
*/
|
|
4291
4291
|
static getDeveloperPayoutSummary<T>(title_id: string): AxiosPromise<Response<T>>;
|
|
4292
|
+
/**
|
|
4293
|
+
* The Aegis Handshake: Verify if a player is allowed to play.
|
|
4294
|
+
*
|
|
4295
|
+
* This is used by the game engine (Unity/Unreal) to confirm that the
|
|
4296
|
+
* current session is valid and the user has a proper license.
|
|
4297
|
+
*
|
|
4298
|
+
* @see https://api.glitch.fun/api/documentation#/Aegis%20Security/validateGameSession
|
|
4299
|
+
*
|
|
4300
|
+
* @param title_id The UUID of the game title.
|
|
4301
|
+
* @param install_id The UUID of the specific install/session.
|
|
4302
|
+
* @returns AxiosPromise containing { valid: boolean, user_name: string, license_type: string }
|
|
4303
|
+
*/
|
|
4304
|
+
static validateInstall<T>(title_id: string, install_id: string): AxiosPromise<Response<T>>;
|
|
4292
4305
|
}
|
|
4293
4306
|
|
|
4294
4307
|
declare class Campaigns {
|
|
@@ -6957,6 +6970,17 @@ declare class WebsiteAnalytics {
|
|
|
6957
6970
|
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
6958
6971
|
*/
|
|
6959
6972
|
static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6973
|
+
/**
|
|
6974
|
+
* Get a detailed marketing report for the game's landing page.
|
|
6975
|
+
* Includes scroll depth, video watch time distribution, and CTA performance.
|
|
6976
|
+
*
|
|
6977
|
+
* @param params
|
|
6978
|
+
* - title_id: string (Required)
|
|
6979
|
+
* - start_date?: string (YYYY-MM-DD)
|
|
6980
|
+
* - end_date?: string (YYYY-MM-DD)
|
|
6981
|
+
* - group_by?: 'country' | 'device'
|
|
6982
|
+
*/
|
|
6983
|
+
static landingPageReport<T>(params: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6960
6984
|
}
|
|
6961
6985
|
|
|
6962
6986
|
declare class ShortLinks {
|
package/package.json
CHANGED
package/src/api/Titles.ts
CHANGED
|
@@ -976,6 +976,26 @@ class Titles {
|
|
|
976
976
|
public static getDeveloperPayoutSummary<T>(title_id: string): AxiosPromise<Response<T>> {
|
|
977
977
|
return Requests.processRoute(TitlesRoute.routes.developerPayoutSummary, {}, { title_id });
|
|
978
978
|
}
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* The Aegis Handshake: Verify if a player is allowed to play.
|
|
982
|
+
*
|
|
983
|
+
* This is used by the game engine (Unity/Unreal) to confirm that the
|
|
984
|
+
* current session is valid and the user has a proper license.
|
|
985
|
+
*
|
|
986
|
+
* @see https://api.glitch.fun/api/documentation#/Aegis%20Security/validateGameSession
|
|
987
|
+
*
|
|
988
|
+
* @param title_id The UUID of the game title.
|
|
989
|
+
* @param install_id The UUID of the specific install/session.
|
|
990
|
+
* @returns AxiosPromise containing { valid: boolean, user_name: string, license_type: string }
|
|
991
|
+
*/
|
|
992
|
+
public static validateInstall<T>(title_id: string, install_id: string): AxiosPromise<Response<T>> {
|
|
993
|
+
return Requests.processRoute(
|
|
994
|
+
TitlesRoute.routes.validateInstall,
|
|
995
|
+
{},
|
|
996
|
+
{ title_id: title_id, install_id: install_id }
|
|
997
|
+
);
|
|
998
|
+
}
|
|
979
999
|
}
|
|
980
1000
|
|
|
981
1001
|
export default Titles;
|
|
@@ -319,15 +319,34 @@ class WebsiteAnalytics {
|
|
|
319
319
|
* - end_date?: string Optional. End date (YYYY-MM-DD) if your API supports time limiting
|
|
320
320
|
*
|
|
321
321
|
* @returns Promise with a unified timeline of the user’s journey, in chronological order.
|
|
322
|
-
*/
|
|
323
|
-
public static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
324
|
-
return Requests.processRoute(
|
|
322
|
+
*/
|
|
323
|
+
public static userJourney<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
324
|
+
return Requests.processRoute(
|
|
325
325
|
WebsiteAnalyticsRoute.routes.journey, // references our new route definition
|
|
326
326
|
{}, // no body data (GET request)
|
|
327
|
-
undefined,
|
|
328
|
-
params
|
|
329
|
-
);
|
|
330
|
-
}
|
|
327
|
+
undefined,
|
|
328
|
+
params
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Get a detailed marketing report for the game's landing page.
|
|
334
|
+
* Includes scroll depth, video watch time distribution, and CTA performance.
|
|
335
|
+
*
|
|
336
|
+
* @param params
|
|
337
|
+
* - title_id: string (Required)
|
|
338
|
+
* - start_date?: string (YYYY-MM-DD)
|
|
339
|
+
* - end_date?: string (YYYY-MM-DD)
|
|
340
|
+
* - group_by?: 'country' | 'device'
|
|
341
|
+
*/
|
|
342
|
+
public static landingPageReport<T>(params: Record<string, any>): AxiosPromise<Response<T>> {
|
|
343
|
+
return Requests.processRoute(
|
|
344
|
+
WebsiteAnalyticsRoute.routes.landingPageReport,
|
|
345
|
+
{},
|
|
346
|
+
undefined,
|
|
347
|
+
params
|
|
348
|
+
);
|
|
349
|
+
}
|
|
331
350
|
}
|
|
332
351
|
|
|
333
352
|
export default WebsiteAnalytics;
|
|
@@ -190,6 +190,15 @@ class TitlesRoute {
|
|
|
190
190
|
viewDeveloperPayout: { url: '/titles/{title_id}/payouts/{payout_id}', method: HTTP_METHODS.GET },
|
|
191
191
|
developerPayoutSummary: { url: '/titles/{title_id}/payouts/summary', method: HTTP_METHODS.GET },
|
|
192
192
|
|
|
193
|
+
/**
|
|
194
|
+
* The Aegis Handshake: Validates if a specific install/session is authorized to play.
|
|
195
|
+
* POST /titles/{title_id}/installs/{install_id}/validate
|
|
196
|
+
*/
|
|
197
|
+
validateInstall: {
|
|
198
|
+
url: '/titles/{title_id}/installs/{install_id}/validate',
|
|
199
|
+
method: HTTP_METHODS.POST
|
|
200
|
+
},
|
|
201
|
+
|
|
193
202
|
};
|
|
194
203
|
|
|
195
204
|
}
|
|
@@ -63,11 +63,15 @@ class WebsiteAnalyticsRoute {
|
|
|
63
63
|
url: '/analytics/utm-performance',
|
|
64
64
|
method: HTTP_METHODS.GET
|
|
65
65
|
},
|
|
66
|
-
journey: {
|
|
67
|
-
url: '/analytics/journey',
|
|
68
|
-
method: HTTP_METHODS.GET
|
|
69
|
-
}
|
|
70
|
-
|
|
66
|
+
journey: {
|
|
67
|
+
url: '/analytics/journey',
|
|
68
|
+
method: HTTP_METHODS.GET
|
|
69
|
+
},
|
|
70
|
+
landingPageReport: {
|
|
71
|
+
url: '/analytics/reports/landing-page',
|
|
72
|
+
method: HTTP_METHODS.GET
|
|
73
|
+
},
|
|
74
|
+
|
|
71
75
|
};
|
|
72
76
|
}
|
|
73
77
|
|