@company-semantics/contracts 16.0.0 → 18.0.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 +4 -2
- package/src/api/README.md +25 -6
- package/src/api/generated-spec-hash.ts +2 -2
- package/src/api/generated.ts +12 -12
- package/src/auth/README.md +17 -5
- package/src/billing/README.md +17 -3
- package/src/chat/README.md +78 -17
- package/src/ci-envelope/README.md +26 -14
- package/src/email/README.md +20 -12
- package/src/email/__tests__/registry.test.ts +2 -2
- package/src/email/registry.ts +2 -2
- package/src/email/types.ts +2 -2
- package/src/execution/README.md +86 -21
- package/src/generated/openapi-routes.ts +2 -2
- package/src/guards/README.md +56 -28
- package/src/identity/README.md +62 -11
- package/src/ingestion/README.md +22 -8
- package/src/mcp/README.md +33 -14
- package/src/message-parts/README.md +77 -17
- package/src/org/README.md +292 -6
- package/src/ralph/README.md +33 -20
- package/src/rate-limit/README.md +24 -0
- package/src/system/README.md +33 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@company-semantics/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -111,7 +111,9 @@
|
|
|
111
111
|
"generate:api-types:check": "openapi-typescript openapi/backend.yaml -o /tmp/cs-api-types-check.ts && diff -q src/api/generated.ts /tmp/cs-api-types-check.ts",
|
|
112
112
|
"generate:current": "tsx ../company-semantics-ci/scripts/generate-current.ts",
|
|
113
113
|
"repo-map": "tsx ../company-semantics-ci/scripts/generate-repo-map.ts --roots src --name company-semantics-contracts --write",
|
|
114
|
-
"repo-map:check": "tsx ../company-semantics-ci/scripts/generate-repo-map.ts --roots src --name company-semantics-contracts --check"
|
|
114
|
+
"repo-map:check": "tsx ../company-semantics-ci/scripts/generate-repo-map.ts --roots src --name company-semantics-contracts --check",
|
|
115
|
+
"readme-api": "tsx ../company-semantics-ci/scripts/generate-readme-api.ts --roots src --write",
|
|
116
|
+
"readme-api:check": "tsx ../company-semantics-ci/scripts/generate-readme-api.ts --roots src --check"
|
|
115
117
|
},
|
|
116
118
|
"packageManager": "pnpm@10.25.0",
|
|
117
119
|
"engines": {
|
package/src/api/README.md
CHANGED
|
@@ -26,14 +26,33 @@ Regenerate with `pnpm generate:api-types`. Check for staleness with `pnpm genera
|
|
|
26
26
|
|
|
27
27
|
The file is committed to the repo (not .gitignored) so consumers can import types without running the generator, and type changes are visible in code review diffs.
|
|
28
28
|
|
|
29
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
30
|
+
|
|
29
31
|
## Public API
|
|
30
32
|
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
33
|
+
- `CursorPage` _(type)_
|
|
34
|
+
- `CursorPageSchema`
|
|
35
|
+
- `ErrorResponse` _(type)_
|
|
36
|
+
- `ErrorResponseSchema`
|
|
37
|
+
- `SPEC_HASH`
|
|
38
|
+
- `SPEC_HASH_FULL`
|
|
39
|
+
- `components` _(type)_
|
|
40
|
+
- `operations` _(type)_
|
|
41
|
+
- `paths` _(type)_
|
|
42
|
+
|
|
43
|
+
<!-- END GENERATED: readme-public-api -->
|
|
44
|
+
|
|
45
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
35
46
|
|
|
36
47
|
## Dependencies
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
**Internal domains:**
|
|
50
|
+
|
|
51
|
+
- `mcp`
|
|
52
|
+
- `resource-response`
|
|
53
|
+
|
|
54
|
+
**External packages:**
|
|
55
|
+
|
|
56
|
+
- `zod`
|
|
57
|
+
|
|
58
|
+
<!-- END GENERATED: readme-dependencies -->
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
|
|
2
|
-
export const SPEC_HASH = '
|
|
3
|
-
export const SPEC_HASH_FULL = '
|
|
2
|
+
export const SPEC_HASH = '0145da47b329' as const;
|
|
3
|
+
export const SPEC_HASH_FULL = '0145da47b329d350ecef5661168bcdd0a7399c5aa3cacd2ad53f5d76ef2d5908' as const;
|
package/src/api/generated.ts
CHANGED
|
@@ -1955,7 +1955,7 @@ export interface paths {
|
|
|
1955
1955
|
patch?: never;
|
|
1956
1956
|
trace?: never;
|
|
1957
1957
|
};
|
|
1958
|
-
"/api/org-units/{unitId}/
|
|
1958
|
+
"/api/org-units/{unitId}/unit-owners": {
|
|
1959
1959
|
parameters: {
|
|
1960
1960
|
query?: never;
|
|
1961
1961
|
header?: never;
|
|
@@ -1964,15 +1964,15 @@ export interface paths {
|
|
|
1964
1964
|
};
|
|
1965
1965
|
get?: never;
|
|
1966
1966
|
put?: never;
|
|
1967
|
-
/** Assign a user as
|
|
1968
|
-
post: operations["
|
|
1967
|
+
/** Assign a user as unit owner of an org unit */
|
|
1968
|
+
post: operations["assignOrgUnitOwner"];
|
|
1969
1969
|
delete?: never;
|
|
1970
1970
|
options?: never;
|
|
1971
1971
|
head?: never;
|
|
1972
1972
|
patch?: never;
|
|
1973
1973
|
trace?: never;
|
|
1974
1974
|
};
|
|
1975
|
-
"/api/org-units/{unitId}/
|
|
1975
|
+
"/api/org-units/{unitId}/unit-owners/{userId}": {
|
|
1976
1976
|
parameters: {
|
|
1977
1977
|
query?: never;
|
|
1978
1978
|
header?: never;
|
|
@@ -1982,8 +1982,8 @@ export interface paths {
|
|
|
1982
1982
|
get?: never;
|
|
1983
1983
|
put?: never;
|
|
1984
1984
|
post?: never;
|
|
1985
|
-
/** Remove a user as
|
|
1986
|
-
delete: operations["
|
|
1985
|
+
/** Remove a user as unit owner of an org unit */
|
|
1986
|
+
delete: operations["removeOrgUnitOwner"];
|
|
1987
1987
|
options?: never;
|
|
1988
1988
|
head?: never;
|
|
1989
1989
|
patch?: never;
|
|
@@ -4628,7 +4628,7 @@ export interface components {
|
|
|
4628
4628
|
revokedAt: string | null;
|
|
4629
4629
|
reason: string | null;
|
|
4630
4630
|
};
|
|
4631
|
-
|
|
4631
|
+
UnitOwnerAssignResponse: {
|
|
4632
4632
|
/** Format: uuid */
|
|
4633
4633
|
id: string;
|
|
4634
4634
|
/** Format: uuid */
|
|
@@ -8485,7 +8485,7 @@ export interface operations {
|
|
|
8485
8485
|
};
|
|
8486
8486
|
};
|
|
8487
8487
|
};
|
|
8488
|
-
|
|
8488
|
+
assignOrgUnitOwner: {
|
|
8489
8489
|
parameters: {
|
|
8490
8490
|
query?: never;
|
|
8491
8491
|
header?: never;
|
|
@@ -8505,18 +8505,18 @@ export interface operations {
|
|
|
8505
8505
|
};
|
|
8506
8506
|
};
|
|
8507
8507
|
responses: {
|
|
8508
|
-
/** @description Created
|
|
8508
|
+
/** @description Created unit-owner overlay row */
|
|
8509
8509
|
201: {
|
|
8510
8510
|
headers: {
|
|
8511
8511
|
[name: string]: unknown;
|
|
8512
8512
|
};
|
|
8513
8513
|
content: {
|
|
8514
|
-
"application/json": components["schemas"]["
|
|
8514
|
+
"application/json": components["schemas"]["UnitOwnerAssignResponse"];
|
|
8515
8515
|
};
|
|
8516
8516
|
};
|
|
8517
8517
|
};
|
|
8518
8518
|
};
|
|
8519
|
-
|
|
8519
|
+
removeOrgUnitOwner: {
|
|
8520
8520
|
parameters: {
|
|
8521
8521
|
query?: never;
|
|
8522
8522
|
header?: never;
|
|
@@ -8528,7 +8528,7 @@ export interface operations {
|
|
|
8528
8528
|
};
|
|
8529
8529
|
requestBody?: never;
|
|
8530
8530
|
responses: {
|
|
8531
|
-
/** @description
|
|
8531
|
+
/** @description Unit-owner authority revoked */
|
|
8532
8532
|
204: {
|
|
8533
8533
|
headers: {
|
|
8534
8534
|
[name: string]: unknown;
|
package/src/auth/README.md
CHANGED
|
@@ -9,14 +9,26 @@ Shared types for authentication flows across Company Semantics codebases. Define
|
|
|
9
9
|
- AuthStartResponse is a discriminated union on `mode` — consumers must handle all three modes
|
|
10
10
|
- OTPErrorCode values are stable strings used by both backend (error generation) and frontend (user messaging)
|
|
11
11
|
|
|
12
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
13
|
+
|
|
12
14
|
## Public API
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
- `AuthStartMode` _(type)_
|
|
17
|
+
- `AuthStartResponse` _(type)_
|
|
18
|
+
- `OTPErrorCode`
|
|
19
|
+
|
|
20
|
+
<!-- END GENERATED: readme-public-api -->
|
|
15
21
|
|
|
16
|
-
-
|
|
17
|
-
- `AuthStartMode` — `'otp' | 'sso' | 'hybrid'`
|
|
18
|
-
- `AuthStartResponse` — discriminated union describing auth flow entry point
|
|
22
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
19
23
|
|
|
20
24
|
## Dependencies
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
**Internal domains:**
|
|
27
|
+
|
|
28
|
+
_None._
|
|
29
|
+
|
|
30
|
+
**External packages:**
|
|
31
|
+
|
|
32
|
+
_None._
|
|
33
|
+
|
|
34
|
+
<!-- END GENERATED: readme-dependencies -->
|
package/src/billing/README.md
CHANGED
|
@@ -12,11 +12,25 @@ Defines the shared type vocabulary for organization billing status and plan info
|
|
|
12
12
|
- `billingOwnerUserId` must equal `org.ownerUserId` — no separate billing owner concept in v1
|
|
13
13
|
- `OrgPlanStatus` is a closed union: `active`, `trialing`, `past_due`, `canceled`
|
|
14
14
|
|
|
15
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
16
|
+
|
|
15
17
|
## Public API
|
|
16
18
|
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
+
- `OrgBillingInfo` _(type)_
|
|
20
|
+
- `OrgPlanStatus` _(type)_
|
|
21
|
+
|
|
22
|
+
<!-- END GENERATED: readme-public-api -->
|
|
23
|
+
|
|
24
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
19
25
|
|
|
20
26
|
## Dependencies
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
**Internal domains:**
|
|
29
|
+
|
|
30
|
+
_None._
|
|
31
|
+
|
|
32
|
+
**External packages:**
|
|
33
|
+
|
|
34
|
+
_None._
|
|
35
|
+
|
|
36
|
+
<!-- END GENERATED: readme-dependencies -->
|
package/src/chat/README.md
CHANGED
|
@@ -13,29 +13,90 @@ Shared types for chat persistence, sharing, real-time events, and runtime profil
|
|
|
13
13
|
- Runtime profile labels are vendor-agnostic (no model names in UI)
|
|
14
14
|
- Default runtime profile is `agentic`
|
|
15
15
|
|
|
16
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
17
|
+
|
|
16
18
|
## Public API
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
- `BaseEvent` _(type)_
|
|
21
|
+
- `BaseEventSchema`
|
|
22
|
+
- `CHAT_RUNTIME_PROFILES`
|
|
23
|
+
- `ChatByInteractionResponse` _(type)_
|
|
24
|
+
- `ChatByInteractionResponseSchema`
|
|
25
|
+
- `ChatChangedField` _(type)_
|
|
26
|
+
- `ChatChangedFieldSchema`
|
|
27
|
+
- `ChatCreatedEvent` _(type)_
|
|
28
|
+
- `ChatCreatedEventSchema`
|
|
29
|
+
- `ChatDeletedEvent` _(type)_
|
|
30
|
+
- `ChatDeletedEventSchema`
|
|
31
|
+
- `ChatDetail` _(type)_
|
|
32
|
+
- `ChatDetailSchema`
|
|
33
|
+
- `ChatDomainEvent` _(type)_
|
|
34
|
+
- `ChatDomainEventSchema`
|
|
35
|
+
- `ChatInvalidationEvent` _(type)_
|
|
36
|
+
- `ChatInvalidationEventSchema`
|
|
37
|
+
- `ChatListFilters` _(type)_
|
|
38
|
+
- `ChatListResponse` _(type)_
|
|
39
|
+
- `ChatListResponseSchema`
|
|
40
|
+
- `ChatMessage` _(type)_
|
|
41
|
+
- `ChatMessageSchema`
|
|
42
|
+
- `ChatRuntimeProfile` _(type)_
|
|
43
|
+
- `ChatRuntimeProfileInfo` _(type)_
|
|
44
|
+
- `ChatShareInfo` _(type)_
|
|
45
|
+
- `ChatShareInfoSchema`
|
|
46
|
+
- `ChatSseEvent` _(type)_
|
|
47
|
+
- `ChatSseEventSchema`
|
|
48
|
+
- `ChatSuccessResponse` _(type)_
|
|
49
|
+
- `ChatSuccessResponseSchema`
|
|
50
|
+
- `ChatSummary` _(type)_
|
|
51
|
+
- `ChatSummaryExtended` _(type)_
|
|
52
|
+
- `ChatSummaryExtendedSchema`
|
|
53
|
+
- `ChatSummarySchema`
|
|
54
|
+
- `ChatUpdatedEvent` _(type)_
|
|
55
|
+
- `ChatUpdatedEventSchema`
|
|
56
|
+
- `ChatVisibility` _(type)_
|
|
57
|
+
- `ChatVisibilitySchema`
|
|
58
|
+
- `CreateChatResponse` _(type)_
|
|
59
|
+
- `CreateChatResponseSchema`
|
|
60
|
+
- `CreateShareRequest` _(type)_
|
|
61
|
+
- `CreateShareResponse` _(type)_
|
|
62
|
+
- `CreateShareResponseSchema`
|
|
63
|
+
- `DEFAULT_CHAT_RUNTIME_PROFILE`
|
|
64
|
+
- `GetChatResponse` _(type)_
|
|
65
|
+
- `GetChatResponseSchema`
|
|
66
|
+
- `InvalidateChatEvent` _(type)_
|
|
67
|
+
- `InvalidateChatEventSchema`
|
|
68
|
+
- `InvalidateChatListEvent` _(type)_
|
|
69
|
+
- `InvalidateChatListEventSchema`
|
|
70
|
+
- `InvalidationReason` _(type)_
|
|
71
|
+
- `InvalidationReasonSchema`
|
|
72
|
+
- `IsoDateString`
|
|
73
|
+
- `ListSharesResponse` _(type)_
|
|
74
|
+
- `ListSharesResponseSchema`
|
|
75
|
+
- `SharedChatMessage` _(type)_
|
|
76
|
+
- `SharedChatMessageSchema`
|
|
77
|
+
- `SharedChatView` _(type)_
|
|
78
|
+
- `SharedChatViewSchema`
|
|
79
|
+
- `TitleGenerationRequest` _(type)_
|
|
80
|
+
- `TitleGenerationResponse` _(type)_
|
|
81
|
+
- `TitleGenerationResponseSchema`
|
|
82
|
+
- `TitleSource` _(type)_
|
|
83
|
+
- `TitleSourceSchema`
|
|
84
|
+
- `UpdateShareRequest` _(type)_
|
|
85
|
+
- `UpdateShareResponse` _(type)_
|
|
86
|
+
- `UpdateShareResponseSchema`
|
|
87
|
+
|
|
88
|
+
<!-- END GENERATED: readme-public-api -->
|
|
19
89
|
|
|
20
|
-
-
|
|
21
|
-
- `ChatSummary`, `ChatSummaryExtended` — list view models
|
|
22
|
-
- `ChatShareInfo`, `SharedChatView`, `SharedChatMessage` — sharing types
|
|
23
|
-
- `CreateShareRequest`, `UpdateShareRequest` — share mutation requests
|
|
24
|
-
- `TitleSource`, `ChatListFilters`, `TitleGenerationRequest/Response` — lifecycle types
|
|
25
|
-
- `ChatRuntimeProfile` — `'fast' | 'balanced' | 'agentic'` orchestration strategy
|
|
26
|
-
- `ChatRuntimeProfileInfo` — profile metadata for UI rendering
|
|
90
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
27
91
|
|
|
28
|
-
|
|
92
|
+
## Dependencies
|
|
29
93
|
|
|
30
|
-
|
|
31
|
-
- `InvalidateChatEvent`, `InvalidateChatListEvent` — staleness signals
|
|
32
|
-
- `ChatSseEvent` — union of all SSE event types
|
|
94
|
+
**Internal domains:**
|
|
33
95
|
|
|
34
|
-
|
|
96
|
+
_None._
|
|
35
97
|
|
|
36
|
-
|
|
37
|
-
- `DEFAULT_CHAT_RUNTIME_PROFILE` — `'agentic'`
|
|
98
|
+
**External packages:**
|
|
38
99
|
|
|
39
|
-
|
|
100
|
+
- `zod`
|
|
40
101
|
|
|
41
|
-
|
|
102
|
+
<!-- END GENERATED: readme-dependencies -->
|
|
@@ -13,24 +13,36 @@ Defines the shared type vocabulary for CI execution envelopes. An envelope is an
|
|
|
13
13
|
- `ENVELOPE_TRANSITIONS` documents the state machine but does not enforce it
|
|
14
14
|
- Terminal states: `blocked` and `finalized` have no outgoing transitions
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
## Public API
|
|
19
19
|
|
|
20
|
-
- `
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
28
|
-
- `CIGuardViolation
|
|
20
|
+
- `CIActorInfo` _(type)_
|
|
21
|
+
- `CIAuthorityGrant` _(type)_
|
|
22
|
+
- `CIChangeKind` _(type)_
|
|
23
|
+
- `CIEnvelopeStatus` _(type)_
|
|
24
|
+
- `CIExecutionEnvelope` _(type)_
|
|
25
|
+
- `CIExecutionOutcome` _(type)_
|
|
26
|
+
- `CIExecutionScope` _(type)_
|
|
27
|
+
- `CIGuardPlan` _(type)_
|
|
28
|
+
- `CIGuardViolation` _(type)_
|
|
29
|
+
- `CIIntentDeclaration` _(type)_
|
|
30
|
+
- `CISessionInfo` _(type)_
|
|
31
|
+
- `ENVELOPE_TRANSITIONS`
|
|
32
|
+
- `ExecutionIntent` _(type)_
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
<!-- END GENERATED: readme-public-api -->
|
|
31
35
|
|
|
32
|
-
-
|
|
36
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
33
37
|
|
|
34
38
|
## Dependencies
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
**Internal domains:**
|
|
41
|
+
|
|
42
|
+
_None._
|
|
43
|
+
|
|
44
|
+
**External packages:**
|
|
45
|
+
|
|
46
|
+
_None._
|
|
47
|
+
|
|
48
|
+
<!-- END GENERATED: readme-dependencies -->
|
package/src/email/README.md
CHANGED
|
@@ -14,22 +14,30 @@ TypeScript types and registry for transactional email kinds and their metadata.
|
|
|
14
14
|
- Subjects are owned by the registry, never duplicated in templates
|
|
15
15
|
- Unknown email kinds MUST be rejected at API boundaries via `isValidEmailKind()`
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Public API
|
|
20
20
|
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
21
|
+
- `EMAIL_KINDS`
|
|
22
|
+
- `EmailKind` _(type)_
|
|
23
|
+
- `EmailKindDefinition` _(type)_
|
|
24
|
+
- `EmailPayloads` _(type)_
|
|
25
|
+
- `SendEmailInput` _(type)_
|
|
26
|
+
- `getEmailKindDefinition`
|
|
27
|
+
- `isValidEmailKind`
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
<!-- END GENERATED: readme-public-api -->
|
|
27
30
|
|
|
28
|
-
- `
|
|
29
|
-
- `getEmailKindDefinition(kind)` — Type-safe registry lookup
|
|
30
|
-
- `isValidEmailKind(kind)` — Validate string is EmailKind
|
|
31
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
31
32
|
|
|
32
33
|
## Dependencies
|
|
33
34
|
|
|
34
|
-
**
|
|
35
|
-
|
|
35
|
+
**Internal domains:**
|
|
36
|
+
|
|
37
|
+
_None._
|
|
38
|
+
|
|
39
|
+
**External packages:**
|
|
40
|
+
|
|
41
|
+
_None._
|
|
42
|
+
|
|
43
|
+
<!-- END GENERATED: readme-dependencies -->
|
|
@@ -26,8 +26,8 @@ describe("EMAIL_KINDS golden snapshot", () => {
|
|
|
26
26
|
plainTextRequired: true,
|
|
27
27
|
htmlSupported: true,
|
|
28
28
|
},
|
|
29
|
-
"org.
|
|
30
|
-
kind: "org.
|
|
29
|
+
"org.unit_owner_granted": {
|
|
30
|
+
kind: "org.unit_owner_granted",
|
|
31
31
|
subject: "You've been added to a team",
|
|
32
32
|
plainTextRequired: true,
|
|
33
33
|
htmlSupported: true,
|
package/src/email/registry.ts
CHANGED
|
@@ -76,8 +76,8 @@ export const EMAIL_KINDS = {
|
|
|
76
76
|
plainTextRequired: true,
|
|
77
77
|
htmlSupported: true,
|
|
78
78
|
},
|
|
79
|
-
"org.
|
|
80
|
-
kind: "org.
|
|
79
|
+
"org.unit_owner_granted": {
|
|
80
|
+
kind: "org.unit_owner_granted",
|
|
81
81
|
subject: "You've been added to a team",
|
|
82
82
|
plainTextRequired: true,
|
|
83
83
|
htmlSupported: true,
|
package/src/email/types.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type EmailKind =
|
|
|
27
27
|
| "auth.otp"
|
|
28
28
|
| "auth.magic_link" // future
|
|
29
29
|
| "org.invite" // future
|
|
30
|
-
| "org.
|
|
30
|
+
| "org.unit_owner_granted"
|
|
31
31
|
| "org.ownership_transfer"
|
|
32
32
|
| "org.ownership_transfer_completed"
|
|
33
33
|
| "security.alert" // future
|
|
@@ -62,7 +62,7 @@ export interface EmailPayloads {
|
|
|
62
62
|
acceptUrl: string;
|
|
63
63
|
expiresInDays: number;
|
|
64
64
|
};
|
|
65
|
-
"org.
|
|
65
|
+
"org.unit_owner_granted": {
|
|
66
66
|
/** Display name of the person who granted access */
|
|
67
67
|
granterName: string;
|
|
68
68
|
/** Display name of the recipient (optional; falls back to a neutral greeting) */
|
package/src/execution/README.md
CHANGED
|
@@ -14,33 +14,98 @@ TypeScript types and registry for execution kinds and their governance metadata.
|
|
|
14
14
|
- `visibility` is derived from `EXECUTION_KINDS[kind].governance.visibility`, never independently authored
|
|
15
15
|
- Unknown execution kinds MUST be rejected at API boundaries via `isValidExecutionKind()`
|
|
16
16
|
|
|
17
|
+
<!-- BEGIN GENERATED: readme-public-api — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
18
|
+
|
|
17
19
|
## Public API
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
- `ApprovalRequestedMetadata` _(type)_
|
|
22
|
+
- `AuditExportBundle` _(type)_
|
|
23
|
+
- `AuditExportEvent` _(type)_
|
|
24
|
+
- `CancelledMetadata` _(type)_
|
|
25
|
+
- `ConfirmExecutionResponse` _(type)_
|
|
26
|
+
- `ConfirmExecutionResponseSchema`
|
|
27
|
+
- `ConfirmationApprovedMetadata` _(type)_
|
|
28
|
+
- `ConfirmationExpiredMetadata` _(type)_
|
|
29
|
+
- `ConfirmationRejectedMetadata` _(type)_
|
|
30
|
+
- `EFFECTIVE_TERMINAL_STATES`
|
|
31
|
+
- `EXECUTION_EVENT_TYPES`
|
|
32
|
+
- `EXECUTION_KINDS`
|
|
33
|
+
- `EXECUTION_STATES`
|
|
34
|
+
- `EventHashFields` _(type)_
|
|
35
|
+
- `ExecutionCompletedMetadata` _(type)_
|
|
36
|
+
- `ExecutionCreatedMetadata` _(type)_
|
|
37
|
+
- `ExecutionDomain` _(type)_
|
|
38
|
+
- `ExecutionError` _(type)_
|
|
39
|
+
- `ExecutionErrorCode` _(type)_
|
|
40
|
+
- `ExecutionEventMetadataMap` _(type)_
|
|
41
|
+
- `ExecutionEventType` _(type)_
|
|
42
|
+
- `ExecutionEventTypeSchema`
|
|
43
|
+
- `ExecutionFailedMetadata` _(type)_
|
|
44
|
+
- `ExecutionInitiator` _(type)_
|
|
45
|
+
- `ExecutionIntent` _(type)_
|
|
46
|
+
- `ExecutionKind` _(type)_
|
|
47
|
+
- `ExecutionKindDefinition` _(type)_
|
|
48
|
+
- `ExecutionListResponse` _(type)_
|
|
49
|
+
- `ExecutionListResponseSchema`
|
|
50
|
+
- `ExecutionResultDataSchema`
|
|
51
|
+
- `ExecutionResultResponse` _(type)_
|
|
52
|
+
- `ExecutionResultResponseSchema`
|
|
53
|
+
- `ExecutionSseEvent` _(type)_
|
|
54
|
+
- `ExecutionSseEventSchema`
|
|
55
|
+
- `ExecutionStartedMetadata` _(type)_
|
|
56
|
+
- `ExecutionState` _(type)_
|
|
57
|
+
- `ExecutionStateSchema`
|
|
58
|
+
- `ExecutionStatus` _(type)_
|
|
59
|
+
- `ExecutionSummary` _(type)_
|
|
60
|
+
- `ExecutionSummaryProjectionSchema`
|
|
61
|
+
- `ExecutionSummaryResponse` _(type)_
|
|
62
|
+
- `ExecutionSummarySchema`
|
|
63
|
+
- `ExecutionTarget` _(type)_
|
|
64
|
+
- `ExecutionTimelineResponse` _(type)_
|
|
65
|
+
- `ExecutionTimelineResponseSchema`
|
|
66
|
+
- `FrozenExecutionIntent` _(type)_
|
|
67
|
+
- `GetExecutionSummaryResponse` _(type)_
|
|
68
|
+
- `GetExecutionSummaryResponseSchema`
|
|
69
|
+
- `HASH_ALGORITHM`
|
|
70
|
+
- `HASH_ENCODING`
|
|
71
|
+
- `HashChainVerificationResult` _(type)_
|
|
72
|
+
- `ISO8601Timestamp` _(type)_
|
|
73
|
+
- `IconName` _(type)_
|
|
74
|
+
- `LIFECYCLE_DECISIONS`
|
|
75
|
+
- `LifecycleDecision` _(type)_
|
|
76
|
+
- `LifecycleIntent` _(type)_
|
|
77
|
+
- `RejectExecutionResponse` _(type)_
|
|
78
|
+
- `RejectExecutionResponseSchema`
|
|
79
|
+
- `StartExecutionResponse` _(type)_
|
|
80
|
+
- `StartExecutionResponseSchema`
|
|
81
|
+
- `TERMINAL_STATES`
|
|
82
|
+
- `TimelineEvent` _(type)_
|
|
83
|
+
- `TimelineEventSchema`
|
|
84
|
+
- `TimelineIcon` _(type)_
|
|
85
|
+
- `TimelineStatus` _(type)_
|
|
86
|
+
- `TimelineUIEvent` _(type)_
|
|
87
|
+
- `UndoCompletedMetadata` _(type)_
|
|
88
|
+
- `VALID_TRANSITIONS`
|
|
89
|
+
- `applyIntent`
|
|
90
|
+
- `assertValidTransition`
|
|
91
|
+
- `getExecutionKindDefinition`
|
|
92
|
+
- `isConfirmationExpired`
|
|
93
|
+
- `isExecutionEventType`
|
|
94
|
+
- `isValidExecutionKind`
|
|
95
|
+
- `parseExpiresAt`
|
|
96
|
+
|
|
97
|
+
<!-- END GENERATED: readme-public-api -->
|
|
20
98
|
|
|
21
|
-
-
|
|
22
|
-
- `ExecutionKindDefinition` — Full definition schema for a kind
|
|
23
|
-
- `ExecutionDomain` — Domain category (`integration`, `policy`, `data`, `system`)
|
|
24
|
-
- `ISO8601Timestamp` — ISO 8601 timestamp string alias
|
|
25
|
-
- `IconName` — Icon identifiers for UI
|
|
99
|
+
<!-- BEGIN GENERATED: readme-dependencies — derived from code by `pnpm readme-api`. Do not edit. -->
|
|
26
100
|
|
|
27
|
-
|
|
101
|
+
## Dependencies
|
|
28
102
|
|
|
29
|
-
|
|
30
|
-
- `ExecutionTarget` — Target of execution (e.g., Slack workspace)
|
|
31
|
-
- `ExecutionInitiator` — Who initiated the execution
|
|
32
|
-
- `ExecutionStatus` — Execution status (`pending`, `succeeded`, `failed`)
|
|
33
|
-
- `TimelineUIEvent` — User-facing timeline entry (derived from audit records)
|
|
34
|
-
- `TimelineStatus` — Timeline-specific status mapping
|
|
35
|
-
- `TimelineIcon` — Timeline-specific icon subset
|
|
103
|
+
**Internal domains:**
|
|
36
104
|
|
|
37
|
-
|
|
105
|
+
- `message-parts`
|
|
38
106
|
|
|
39
|
-
|
|
40
|
-
- `getExecutionKindDefinition(kind)` — Type-safe registry lookup
|
|
41
|
-
- `isValidExecutionKind(kind)` — Validate string is ExecutionKind
|
|
107
|
+
**External packages:**
|
|
42
108
|
|
|
43
|
-
|
|
109
|
+
- `zod`
|
|
44
110
|
|
|
45
|
-
|
|
46
|
-
**Imported by:** company-semantics-backend, company-semantics-app
|
|
111
|
+
<!-- END GENERATED: readme-dependencies -->
|
|
@@ -96,8 +96,8 @@ export const openApiRoutes = {
|
|
|
96
96
|
'/api/org-units/{unitId}/relationships': ['GET', 'POST'],
|
|
97
97
|
'/api/org-units/{unitId}/reorder': ['POST'],
|
|
98
98
|
'/api/org-units/{unitId}/reparent': ['POST'],
|
|
99
|
-
'/api/org-units/{unitId}/
|
|
100
|
-
'/api/org-units/{unitId}/
|
|
99
|
+
'/api/org-units/{unitId}/unit-owners': ['POST'],
|
|
100
|
+
'/api/org-units/{unitId}/unit-owners/{userId}': ['DELETE'],
|
|
101
101
|
'/api/org/cancel-deletion': ['POST'],
|
|
102
102
|
'/api/org/delete': ['POST'],
|
|
103
103
|
'/api/org/deletion-eligibility': ['GET'],
|