@flashbacktech/tsclient 0.4.57 → 0.4.59

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.cjs CHANGED
@@ -1296,6 +1296,36 @@ var ReferralsClient = class {
1296
1296
  );
1297
1297
  return unwrapData(res);
1298
1298
  }
1299
+ // --- Platform-admin only ---
1300
+ /**
1301
+ * Platform-wide referral monitor: rollup stats + every redemption (with the
1302
+ * code string and both org names). Returns 403 unless platform admin.
1303
+ */
1304
+ async adminOverview() {
1305
+ const res = await this.http.get("/admin/referrals");
1306
+ return unwrapData(res);
1307
+ }
1308
+ /**
1309
+ * Void a PENDING redemption (abuse control) so it can never qualify. Fails
1310
+ * with 409 `not_pending` if the redemption is missing, already qualified, or
1311
+ * already void. Platform-admin only.
1312
+ */
1313
+ async voidRedemption(redemptionId) {
1314
+ await this.http.post(`/admin/referrals/${redemptionId}/void`, { body: {} });
1315
+ }
1316
+ /**
1317
+ * Force-qualify a PENDING non-reseller redemption: grants the snapshotted
1318
+ * referrer reward + referred welcome credit immediately, bypassing the spend
1319
+ * threshold. Fails with 409 `not_pending` (missing/qualified/void) or 400
1320
+ * `reseller_code`. Platform-admin only. Returns the updated redemption.
1321
+ */
1322
+ async qualifyRedemption(redemptionId) {
1323
+ const res = await this.http.post(
1324
+ `/admin/referrals/${redemptionId}/qualify`,
1325
+ { body: {} }
1326
+ );
1327
+ return unwrapData(res);
1328
+ }
1299
1329
  };
1300
1330
 
1301
1331
  // src/modules/reseller/ResellerClient.ts