@flashbacktech/tsclient 0.4.62 → 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 +35 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +93 -1
- package/dist/index.d.ts +93 -1
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
@@ -1093,6 +1120,14 @@ var SubscriptionsClient = class {
|
|
|
1093
1120
|
buy(body) {
|
|
1094
1121
|
return this.http.post("/subscriptions/buy", { body });
|
|
1095
1122
|
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Preview the cost/credit impact of a plan change (pro-rated charge,
|
|
1125
|
+
* credit delta, effective dates) for the confirmation modal — no change
|
|
1126
|
+
* is made. kind="new" means a first purchase that would go via Checkout.
|
|
1127
|
+
*/
|
|
1128
|
+
previewChange(body) {
|
|
1129
|
+
return this.http.post("/subscriptions/preview-change", { body });
|
|
1130
|
+
}
|
|
1096
1131
|
cancel() {
|
|
1097
1132
|
return this.http.post("/subscriptions/cancel", {});
|
|
1098
1133
|
}
|