@company-semantics/contracts 13.13.2 → 13.14.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "13.13.2",
3
+ "version": "13.14.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = 'afe43c58e0be' as const;
3
- export const SPEC_HASH_FULL = 'afe43c58e0be9fb60f1e34f047c3c40dfff055e88079d8d0c9e7f64f587f0c53' as const;
2
+ export const SPEC_HASH = '59bdd00ab50e' as const;
3
+ export const SPEC_HASH_FULL = '59bdd00ab50e21ba41ca82d872a7296e40a7241cf1e497dad9f25a08da3dbc8a' as const;
@@ -3693,6 +3693,8 @@ export interface components {
3693
3693
  status: "pending" | "accepted" | "expired" | "revoked";
3694
3694
  /** Format: uuid */
3695
3695
  homeUnitId?: string;
3696
+ /** @enum {string} */
3697
+ homeUnitRole?: "member" | "leader";
3696
3698
  createdAt: string;
3697
3699
  expiresAt: string;
3698
3700
  acceptedAt?: string;
@@ -3705,6 +3707,8 @@ export interface components {
3705
3707
  role: "admin" | "member";
3706
3708
  /** Format: uuid */
3707
3709
  homeUnitId?: string;
3710
+ /** @enum {string} */
3711
+ homeUnitRole?: "member" | "leader";
3708
3712
  };
3709
3713
  InviteListResponse: {
3710
3714
  id: string;
@@ -3720,6 +3724,8 @@ export interface components {
3720
3724
  status: "pending" | "accepted" | "expired" | "revoked";
3721
3725
  /** Format: uuid */
3722
3726
  homeUnitId?: string;
3727
+ /** @enum {string} */
3728
+ homeUnitRole?: "member" | "leader";
3723
3729
  createdAt: string;
3724
3730
  expiresAt: string;
3725
3731
  acceptedAt?: string;
@@ -578,6 +578,9 @@ const OrgInviteSchema = z.object({
578
578
  // Home unit the invitee is placed in on acceptance (users.primary_unit_id).
579
579
  // Optional/nullable: legacy invites predate this field.
580
580
  homeUnitId: z.string().uuid().optional(),
581
+ // Role the invitee takes in homeUnitId on acceptance ('leader' is a deferred
582
+ // structural-leadership grant). Optional/'member' for legacy + unit-less invites.
583
+ homeUnitRole: z.enum(["member", "leader"]).optional(),
581
584
  createdAt: z.string(),
582
585
  expiresAt: z.string(),
583
586
  acceptedAt: z.string().optional(),
package/src/org/types.ts CHANGED
@@ -416,6 +416,13 @@ export interface OrgInvite {
416
416
  * invites created before this field have none.
417
417
  */
418
418
  homeUnitId?: string;
419
+ /**
420
+ * Role the invitee takes in `homeUnitId` on acceptance — a plain team member,
421
+ * or a structural leader of that unit (a *deferred* leadership grant applied
422
+ * at acceptance time). Distinct from the org-level {@link role}. Optional:
423
+ * legacy invites and unit-less invites have none (treated as `member`).
424
+ */
425
+ homeUnitRole?: "member" | "leader";
419
426
  createdAt: string;
420
427
  expiresAt: string;
421
428
  acceptedAt?: string;
@@ -433,6 +440,14 @@ export interface CreateInviteRequest {
433
440
  * can roll out without breaking older callers.
434
441
  */
435
442
  homeUnitId?: string;
443
+ /**
444
+ * Role the invitee takes in `homeUnitId` on acceptance: a plain team member
445
+ * (default), or a structural leader of that unit. `leader` is a *deferred*
446
+ * grant — the invite is sent now and the leadership is assigned when the
447
+ * invitee accepts. Only meaningful when `homeUnitId` is set; the backend
448
+ * rejects `leader` without a home unit. Optional/`member` for older callers.
449
+ */
450
+ homeUnitRole?: "member" | "leader";
436
451
  }
437
452
 
438
453
  /**