@company-semantics/contracts 13.13.2 → 13.14.0
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 +1 -1
- package/src/org/schemas.ts +3 -0
- package/src/org/types.ts +15 -0
package/package.json
CHANGED
package/src/org/schemas.ts
CHANGED
|
@@ -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
|
/**
|