@company-semantics/contracts 13.8.0 → 13.9.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 +12 -0
package/package.json
CHANGED
package/src/org/schemas.ts
CHANGED
|
@@ -553,6 +553,9 @@ const OrgInviteSchema = z.object({
|
|
|
553
553
|
role: z.enum(["admin", "member"]),
|
|
554
554
|
invitedBy: z.object({ id: z.string(), name: z.string() }),
|
|
555
555
|
status: z.enum(["pending", "accepted", "expired", "revoked"]),
|
|
556
|
+
// Home unit the invitee is placed in on acceptance (users.primary_unit_id).
|
|
557
|
+
// Optional/nullable: legacy invites predate this field.
|
|
558
|
+
homeUnitId: z.string().uuid().optional(),
|
|
556
559
|
createdAt: z.string(),
|
|
557
560
|
expiresAt: z.string(),
|
|
558
561
|
acceptedAt: z.string().optional(),
|
package/src/org/types.ts
CHANGED
|
@@ -398,6 +398,12 @@ export interface OrgInvite {
|
|
|
398
398
|
name: string;
|
|
399
399
|
};
|
|
400
400
|
status: OrgInviteStatus;
|
|
401
|
+
/**
|
|
402
|
+
* Org unit the invitee is placed in on acceptance (their home unit /
|
|
403
|
+
* `users.primary_unit_id`). Chosen at invite time. Optional/nullable: legacy
|
|
404
|
+
* invites created before this field have none.
|
|
405
|
+
*/
|
|
406
|
+
homeUnitId?: string;
|
|
401
407
|
createdAt: string;
|
|
402
408
|
expiresAt: string;
|
|
403
409
|
acceptedAt?: string;
|
|
@@ -409,6 +415,12 @@ export interface OrgInvite {
|
|
|
409
415
|
export interface CreateInviteRequest {
|
|
410
416
|
email: string;
|
|
411
417
|
role: "admin" | "member";
|
|
418
|
+
/**
|
|
419
|
+
* Org unit (depth ≥ 2; not the org root) the invitee will be placed in on
|
|
420
|
+
* acceptance. Required by the UI, but optional in the contract so the field
|
|
421
|
+
* can roll out without breaking older callers.
|
|
422
|
+
*/
|
|
423
|
+
homeUnitId?: string;
|
|
412
424
|
}
|
|
413
425
|
|
|
414
426
|
/**
|