@company-semantics/contracts 13.13.1 → 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 +18 -2
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
|
@@ -87,8 +87,9 @@ export interface WorkspaceOverview {
|
|
|
87
87
|
| "crown"
|
|
88
88
|
| "crown-cross"
|
|
89
89
|
| "person"
|
|
90
|
-
| "
|
|
91
|
-
| "
|
|
90
|
+
| "medal-military"
|
|
91
|
+
| "dog"
|
|
92
|
+
| "cat";
|
|
92
93
|
createdAt: string;
|
|
93
94
|
memberCount: number;
|
|
94
95
|
claimable: boolean;
|
|
@@ -415,6 +416,13 @@ export interface OrgInvite {
|
|
|
415
416
|
* invites created before this field have none.
|
|
416
417
|
*/
|
|
417
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";
|
|
418
426
|
createdAt: string;
|
|
419
427
|
expiresAt: string;
|
|
420
428
|
acceptedAt?: string;
|
|
@@ -432,6 +440,14 @@ export interface CreateInviteRequest {
|
|
|
432
440
|
* can roll out without breaking older callers.
|
|
433
441
|
*/
|
|
434
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";
|
|
435
451
|
}
|
|
436
452
|
|
|
437
453
|
/**
|