glitch-javascript-sdk 3.2.31 → 3.2.32

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 CHANGED
@@ -32209,6 +32209,78 @@ var AdminReports = /** @class */ (function () {
32209
32209
  return AdminReports;
32210
32210
  }());
32211
32211
 
32212
+ var AdminUsersRoute = /** @class */ (function () {
32213
+ function AdminUsersRoute() {
32214
+ }
32215
+ AdminUsersRoute.routes = {
32216
+ // List and search every user in the system (site admin only).
32217
+ list: {
32218
+ url: '/admin/users',
32219
+ method: HTTP_METHODS.GET
32220
+ },
32221
+ // Full profile for a single user (site admin only).
32222
+ view: {
32223
+ url: '/admin/users/{user_id}',
32224
+ method: HTTP_METHODS.GET
32225
+ },
32226
+ // Securely impersonate a user (super admin only, audited).
32227
+ impersonate: {
32228
+ url: '/admin/users/impersonate',
32229
+ method: HTTP_METHODS.POST
32230
+ },
32231
+ };
32232
+ return AdminUsersRoute;
32233
+ }());
32234
+
32235
+ /**
32236
+ * Site-administrator user management.
32237
+ *
32238
+ * These endpoints back the admin dashboard user directory. They require a
32239
+ * site-admin auth token (Super Administrator or Administrator), and
32240
+ * impersonation additionally requires a Super Administrator token.
32241
+ */
32242
+ var AdminUsers = /** @class */ (function () {
32243
+ function AdminUsers() {
32244
+ }
32245
+ /**
32246
+ * List and search all users in the system.
32247
+ *
32248
+ * Supported params include `search` (matches name, username, email, or id),
32249
+ * `is_site_admin`, `is_verified`, `sort_by`, `sort_order`, `per_page`, and
32250
+ * `page`.
32251
+ *
32252
+ * @param params Optional query parameters.
32253
+ * @returns promise
32254
+ */
32255
+ AdminUsers.list = function (params) {
32256
+ return Requests.processRoute(AdminUsersRoute.routes.list, undefined, undefined, params);
32257
+ };
32258
+ /**
32259
+ * Retrieve a comprehensive profile for a single user, including communities,
32260
+ * administered titles, games played, roles, billing status, social presence,
32261
+ * and activity counts.
32262
+ *
32263
+ * @param user_id The id of the user to view.
32264
+ * @param params Optional query parameters.
32265
+ * @returns promise
32266
+ */
32267
+ AdminUsers.view = function (user_id, params) {
32268
+ return Requests.processRoute(AdminUsersRoute.routes.view, undefined, { user_id: user_id }, params);
32269
+ };
32270
+ /**
32271
+ * Impersonate a user. Issues a JWT for the target account so a Super
32272
+ * Administrator can operate as that user. Administrator accounts cannot be
32273
+ * impersonated, and every call is written to the impersonation audit log.
32274
+ *
32275
+ * @param user_id The id of the user to impersonate.
32276
+ * @returns promise resolving to an access token and the impersonated user summary.
32277
+ */
32278
+ AdminUsers.impersonate = function (user_id) {
32279
+ return Requests.processRoute(AdminUsersRoute.routes.impersonate, { user_id: user_id });
32280
+ };
32281
+ return AdminUsers;
32282
+ }());
32283
+
32212
32284
  var MarketResearchRoute = /** @class */ (function () {
32213
32285
  function MarketResearchRoute() {
32214
32286
  }
@@ -32795,6 +32867,7 @@ var Glitch = /** @class */ (function () {
32795
32867
  Mcp: Mcp,
32796
32868
  PrDirectory: PrDirectory,
32797
32869
  AdminReports: AdminReports,
32870
+ AdminUsers: AdminUsers,
32798
32871
  MarketResearch: MarketResearch,
32799
32872
  };
32800
32873
  Glitch.util = {