@flashbacktech/tsclient 0.4.36 → 0.4.38

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
@@ -138,6 +138,14 @@ var AuthClient = class {
138
138
  register(body) {
139
139
  return this.http.post("/user/register", { body, skipAuth: true });
140
140
  }
141
+ /**
142
+ * Unauthenticated boot config. The SPA reads `openRegistration` to decide
143
+ * whether to render the self-service signup form (false => invite-only /
144
+ * preview mode). Safe to call before any session exists.
145
+ */
146
+ publicConfig() {
147
+ return this.http.get("/public-config", { skipAuth: true });
148
+ }
141
149
  logout(refreshToken) {
142
150
  return this.http.post("/user/logout", {
143
151
  body: { refreshToken }
@@ -272,6 +280,20 @@ var OrganizationClient = class {
272
280
  const res = await this.http.get("/orgs/list-all");
273
281
  return res.data ?? [];
274
282
  }
283
+ /**
284
+ * Platform-admin only: provision a new organization + founding owner and
285
+ * email the owner an invite link. The invite-only counterpart to public
286
+ * self-service registration (used while the backend has OPEN_REGISTRATION
287
+ * disabled). Returns 403 unless the caller's home org is the configured
288
+ * ADMIN_ORGANIZATION; 409 when the owner email already exists.
289
+ */
290
+ async inviteOrg(body) {
291
+ const res = await this.http.post(
292
+ "/organization/invite-org",
293
+ { body }
294
+ );
295
+ return unwrapData(res);
296
+ }
275
297
  /**
276
298
  * Platform-admin only: enable or disable the debug surface for an org.
277
299
  * Returns the updated org entry with the new allowDebug value.