@7365admin1/core 3.48.1-staging.178 → 3.48.1-staging.179

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.
@@ -0,0 +1,11 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Treat a maximum seat count of 0 as unlimited when an organisation sends an
6
+ invitation. `createOrganizationInvite` read the subscription's `maxSeats` through
7
+ `?? 0` and then refused on any falsy value, so an organisation configured with 0
8
+ seats — which the plan dialog offers and the console labels UNLIMITED — had every
9
+ invitation rejected with "No seats configured for organization." 0 now admits
10
+ invitations without a cap, a real limit is still enforced at the limit, and only a
11
+ genuinely absent or non-numeric value is still treated as a misconfiguration.
package/dist/index.js CHANGED
@@ -80443,12 +80443,12 @@ function useVerificationServiceV2() {
80443
80443
  _countMemberByOrg(orgId),
80444
80444
  _countPendingOrgInvites(orgId)
80445
80445
  ]);
80446
- const maxSeats = subscription?.maxSeats ?? 0;
80447
- if (!maxSeats) {
80446
+ const maxSeats = subscription?.maxSeats;
80447
+ if (typeof maxSeats !== "number" || !Number.isFinite(maxSeats)) {
80448
80448
  throw new import_node_server_utils260.BadRequestError("No seats configured for organization.");
80449
80449
  }
80450
80450
  const usedSeats = memberCount + pendingInviteCount;
80451
- if (usedSeats >= maxSeats) {
80451
+ if (maxSeats > 0 && usedSeats >= maxSeats) {
80452
80452
  throw new import_node_server_utils260.BadRequestError("No available seats for new invitation.");
80453
80453
  }
80454
80454
  return createUserInvite({ email, metadata });