@company-semantics/contracts 13.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "13.7.0",
3
+ "version": "13.9.0",
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 = '3740712c6cee' as const;
3
- export const SPEC_HASH_FULL = '3740712c6cee7d3684fb174624951f59bc1c3bb5f48dabf43ebf6c2a535c654e' as const;
2
+ export const SPEC_HASH = '82b9493c89c4' as const;
3
+ export const SPEC_HASH_FULL = '82b9493c89c442f25165f969fc23716d2ed0ba12f563534d9d00eae3aed8f671' as const;
@@ -3832,6 +3832,56 @@ export interface components {
3832
3832
  visibilityLevel: "system" | "oversight" | "org_admin" | "user";
3833
3833
  }[];
3834
3834
  };
3835
+ ExecutionSummaryResponse: {
3836
+ summary: {
3837
+ executionId: string;
3838
+ /** @enum {string} */
3839
+ kind: "integration.connect" | "integration.disconnect" | "profile.update" | "slack.send" | "data.ingest" | "data.scope" | "system.cleanup";
3840
+ target: {
3841
+ /** @constant */
3842
+ type: "slack";
3843
+ workspaceId?: string;
3844
+ };
3845
+ /** @enum {string} */
3846
+ status: "pending" | "succeeded" | "failed";
3847
+ initiatedBy: {
3848
+ /** @enum {string} */
3849
+ actorType: "user" | "system";
3850
+ actorId: string;
3851
+ displayName: string;
3852
+ };
3853
+ decidedAt: string;
3854
+ completedAt?: string;
3855
+ /** @enum {string} */
3856
+ visibility: "admin" | "user";
3857
+ explanationAvailable: boolean;
3858
+ };
3859
+ };
3860
+ ExecutionResultResponse: {
3861
+ result: {
3862
+ actionId: string;
3863
+ executionId: string;
3864
+ /** @enum {string} */
3865
+ state: "completed" | "failed";
3866
+ artifacts: {
3867
+ /** @enum {string} */
3868
+ kind: "message" | "api_call" | "diff" | "notification" | "task" | "calendar" | "integration";
3869
+ label: string;
3870
+ /** @enum {string} */
3871
+ status: "success" | "failed" | "skipped";
3872
+ error?: string;
3873
+ resultLabel?: string;
3874
+ }[];
3875
+ summary: {
3876
+ title: string;
3877
+ description?: string;
3878
+ };
3879
+ undo?: {
3880
+ availableUntil: string;
3881
+ kind: string;
3882
+ };
3883
+ };
3884
+ };
3835
3885
  ConfirmExecutionResponse: {
3836
3886
  /** @enum {string} */
3837
3887
  status: "executing" | "blocked_pending_approval" | "already_confirmed" | "awaiting_approval";
@@ -6956,7 +7006,9 @@ export interface operations {
6956
7006
  headers: {
6957
7007
  [name: string]: unknown;
6958
7008
  };
6959
- content?: never;
7009
+ content: {
7010
+ "application/json": components["schemas"]["ExecutionSummaryResponse"];
7011
+ };
6960
7012
  };
6961
7013
  };
6962
7014
  };
@@ -6976,7 +7028,9 @@ export interface operations {
6976
7028
  headers: {
6977
7029
  [name: string]: unknown;
6978
7030
  };
6979
- content?: never;
7031
+ content: {
7032
+ "application/json": components["schemas"]["ExecutionResultResponse"];
7033
+ };
6980
7034
  };
6981
7035
  };
6982
7036
  };
@@ -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
  /**