@flashbacktech/tsclient 0.4.63 → 0.4.64

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
@@ -335,6 +335,33 @@ var OrganizationClient = class {
335
335
  );
336
336
  return unwrapData(res);
337
337
  }
338
+ /**
339
+ * Platform-admin only: list every outstanding org + member invite (founding-
340
+ * owner invites from `inviteOrg` and members added via `addUserToOrg`) with
341
+ * derived status, newest first. Cancelled invites (soft-deleted) and live
342
+ * non-invited orgs are excluded. Returns 403 unless platform admin.
343
+ */
344
+ async listOrgInvites() {
345
+ const res = await this.http.get("/admin/org-invites");
346
+ return res.data ?? [];
347
+ }
348
+ /**
349
+ * Platform-admin only: re-send an invite — mints a fresh 7-day token and
350
+ * re-emails the link. Returns 403 unless platform admin; 404 when no pending
351
+ * invite exists; 409 once the invite has been redeemed.
352
+ */
353
+ resendOrgInvite(userId) {
354
+ return this.http.post(`/admin/org-invites/${userId}/resend`, {});
355
+ }
356
+ /**
357
+ * Platform-admin only: cancel a pending invite. Soft-deletes the invited user
358
+ * (and the shell org, for a never-redeemed founding-owner invite with no other
359
+ * members) and revokes the token, freeing the email for re-invite. Returns 403
360
+ * unless platform admin; 404 when absent; 409 once the invite has been redeemed.
361
+ */
362
+ cancelOrgInvite(userId) {
363
+ return this.http.post(`/admin/org-invites/${userId}/cancel`, {});
364
+ }
338
365
  /**
339
366
  * Platform-admin only: enable or disable the debug surface for an org.
340
367
  * Returns the updated org entry with the new allowDebug value.