glitch-javascript-sdk 2.8.1 → 2.8.2

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/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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
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;
@@ -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
  }