@elevasis/core 0.21.0 → 0.23.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/dist/index.d.ts +2518 -2169
- package/dist/index.js +2495 -1095
- package/dist/knowledge/index.d.ts +706 -1044
- package/dist/knowledge/index.js +9 -9
- package/dist/organization-model/index.d.ts +2518 -2169
- package/dist/organization-model/index.js +2495 -1095
- package/dist/test-utils/index.d.ts +826 -1014
- package/dist/test-utils/index.js +1894 -1032
- package/package.json +3 -3
- package/src/__tests__/template-core-compatibility.test.ts +11 -79
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +852 -397
- package/src/auth/multi-tenancy/permissions.ts +20 -8
- package/src/business/README.md +2 -2
- package/src/business/acquisition/api-schemas.test.ts +175 -2
- package/src/business/acquisition/api-schemas.ts +132 -16
- package/src/business/acquisition/build-templates.test.ts +4 -4
- package/src/business/acquisition/build-templates.ts +72 -30
- package/src/business/acquisition/crm-state-actions.test.ts +13 -11
- package/src/business/acquisition/index.ts +12 -0
- package/src/business/acquisition/types.ts +7 -3
- package/src/business/clients/api-schemas.test.ts +115 -0
- package/src/business/clients/api-schemas.ts +158 -0
- package/src/business/clients/index.ts +1 -0
- package/src/business/deals/api-schemas.ts +8 -0
- package/src/business/index.ts +5 -2
- package/src/business/projects/types.ts +19 -0
- package/src/execution/engine/__tests__/fixtures/test-agents.ts +10 -8
- package/src/execution/engine/agent/core/__tests__/agent.test.ts +16 -12
- package/src/execution/engine/agent/core/__tests__/error-passthrough.test.ts +4 -3
- package/src/execution/engine/agent/core/types.ts +25 -15
- package/src/execution/engine/agent/index.ts +6 -4
- package/src/execution/engine/agent/reasoning/__tests__/request-builder.test.ts +24 -18
- package/src/execution/engine/index.ts +3 -0
- package/src/execution/engine/workflow/types.ts +9 -2
- package/src/knowledge/README.md +8 -7
- package/src/knowledge/__tests__/queries.test.ts +74 -73
- package/src/knowledge/format.ts +10 -9
- package/src/knowledge/index.ts +1 -1
- package/src/knowledge/published.ts +1 -1
- package/src/knowledge/queries.ts +26 -25
- package/src/organization-model/README.md +73 -26
- package/src/organization-model/__tests__/content-kinds-registry.test.ts +210 -0
- package/src/organization-model/__tests__/defaults.test.ts +76 -96
- package/src/organization-model/__tests__/domains/actions.test.ts +56 -0
- package/src/organization-model/__tests__/domains/customers.test.ts +299 -295
- package/src/organization-model/__tests__/domains/entities.test.ts +56 -0
- package/src/organization-model/__tests__/domains/goals.test.ts +493 -479
- package/src/organization-model/__tests__/domains/identity.test.ts +280 -279
- package/src/organization-model/__tests__/domains/navigation.test.ts +268 -212
- package/src/organization-model/__tests__/domains/offerings.test.ts +414 -419
- package/src/organization-model/__tests__/domains/policies.test.ts +323 -0
- package/src/organization-model/__tests__/domains/resource-mappings.test.ts +271 -271
- package/src/organization-model/__tests__/domains/resources.test.ts +310 -0
- package/src/organization-model/__tests__/domains/roles.test.ts +463 -347
- package/src/organization-model/__tests__/domains/statuses.test.ts +246 -243
- package/src/organization-model/__tests__/domains/systems.test.ts +209 -0
- package/src/organization-model/__tests__/flatten-additive-merge.test.ts +361 -0
- package/src/organization-model/__tests__/foundation.test.ts +74 -102
- package/src/organization-model/__tests__/get-resources-for-system.test.ts +144 -0
- package/src/organization-model/__tests__/graph.test.ts +899 -71
- package/src/organization-model/__tests__/knowledge.test.ts +209 -49
- package/src/organization-model/__tests__/lookup-helpers.test.ts +438 -0
- package/src/organization-model/__tests__/migration-helpers.test.ts +591 -0
- package/src/organization-model/__tests__/prospecting-ssot.test.ts +36 -27
- package/src/organization-model/__tests__/recursive-system-schema.test.ts +520 -0
- package/src/organization-model/__tests__/resolve.test.ts +174 -23
- package/src/organization-model/__tests__/schema.test.ts +291 -114
- package/src/organization-model/__tests__/surface-projection.test.ts +207 -97
- package/src/organization-model/catalogs/lead-gen.ts +144 -0
- package/src/organization-model/content-kinds/config.ts +36 -0
- package/src/organization-model/content-kinds/index.ts +74 -0
- package/src/organization-model/content-kinds/pipeline.ts +68 -0
- package/src/organization-model/content-kinds/registry.ts +44 -0
- package/src/organization-model/content-kinds/status.ts +71 -0
- package/src/organization-model/content-kinds/template.ts +83 -0
- package/src/organization-model/content-kinds/types.ts +117 -0
- package/src/organization-model/contracts.ts +13 -3
- package/src/organization-model/defaults.ts +499 -86
- package/src/organization-model/domains/actions.ts +239 -0
- package/src/organization-model/domains/customers.ts +78 -75
- package/src/organization-model/domains/entities.ts +144 -0
- package/src/organization-model/domains/goals.ts +83 -80
- package/src/organization-model/domains/knowledge.ts +76 -17
- package/src/organization-model/domains/navigation.ts +107 -384
- package/src/organization-model/domains/offerings.ts +71 -66
- package/src/organization-model/domains/policies.ts +102 -0
- package/src/organization-model/domains/projects.ts +14 -48
- package/src/organization-model/domains/prospecting.ts +62 -181
- package/src/organization-model/domains/resources.ts +145 -0
- package/src/organization-model/domains/roles.ts +96 -55
- package/src/organization-model/domains/sales.ts +10 -219
- package/src/organization-model/domains/shared.ts +57 -57
- package/src/organization-model/domains/statuses.ts +339 -130
- package/src/organization-model/domains/systems.ts +203 -0
- package/src/organization-model/foundation.ts +54 -67
- package/src/organization-model/graph/build.ts +682 -54
- package/src/organization-model/graph/link.ts +1 -1
- package/src/organization-model/graph/schema.ts +24 -9
- package/src/organization-model/graph/types.ts +20 -7
- package/src/organization-model/helpers.ts +231 -26
- package/src/organization-model/icons.ts +1 -0
- package/src/organization-model/index.ts +118 -5
- package/src/organization-model/migration-helpers.ts +249 -0
- package/src/organization-model/organization-graph.mdx +16 -15
- package/src/organization-model/organization-model.mdx +111 -44
- package/src/organization-model/published.ts +172 -19
- package/src/organization-model/resolve.ts +117 -54
- package/src/organization-model/schema.ts +654 -112
- package/src/organization-model/surface-projection.ts +116 -122
- package/src/organization-model/types.ts +146 -20
- package/src/platform/api/types.ts +38 -35
- package/src/platform/constants/versions.ts +1 -1
- package/src/platform/registry/__tests__/command-view.test.ts +6 -8
- package/src/platform/registry/__tests__/resource-link.test.ts +13 -8
- package/src/platform/registry/__tests__/resource-registry.integration.test.ts +16 -31
- package/src/platform/registry/__tests__/resource-registry.nested-systems.test.ts +245 -0
- package/src/platform/registry/__tests__/resource-registry.test.ts +2053 -2005
- package/src/platform/registry/__tests__/validation.test.ts +1347 -1086
- package/src/platform/registry/index.ts +14 -0
- package/src/platform/registry/resource-registry.ts +52 -2
- package/src/platform/registry/serialization.ts +241 -202
- package/src/platform/registry/serialized-types.ts +1 -0
- package/src/platform/registry/types.ts +411 -361
- package/src/platform/registry/validation.ts +745 -513
- package/src/projects/api-schemas.ts +290 -267
- package/src/reference/_generated/contracts.md +853 -397
- package/src/reference/glossary.md +23 -18
- package/src/supabase/database.types.ts +181 -0
- package/src/test-utils/test-utils.test.ts +1 -6
- package/src/organization-model/__tests__/domains/operations.test.ts +0 -203
- package/src/organization-model/domains/features.ts +0 -31
- package/src/organization-model/domains/operations.ts +0 -85
|
@@ -15,34 +15,58 @@ description: Auto-generated TypeScript contracts for SDK consumers. Do not edit
|
|
|
15
15
|
export type OrganizationModel = z.infer<typeof OrganizationModelSchema>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
### `OrganizationModelDomainKey`
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
export type OrganizationModelDomainKey = z.infer<typeof OrganizationModelDomainKeySchema>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### `OrganizationModelDomainMetadata`
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
export type OrganizationModelDomainMetadata = z.infer<typeof OrganizationModelDomainMetadataSchema>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### `OrganizationModelDomainMetadataByDomain`
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
export type OrganizationModelDomainMetadataByDomain = z.infer<typeof OrganizationModelDomainMetadataByDomainSchema>
|
|
34
|
+
```
|
|
35
|
+
|
|
18
36
|
### `OrganizationModelBranding`
|
|
19
37
|
|
|
20
38
|
```typescript
|
|
21
39
|
export type OrganizationModelBranding = z.infer<typeof OrganizationModelBrandingSchema>
|
|
22
40
|
```
|
|
23
41
|
|
|
24
|
-
### `
|
|
42
|
+
### `SalesPipeline`
|
|
25
43
|
|
|
26
44
|
```typescript
|
|
27
|
-
export type
|
|
45
|
+
export type SalesPipeline = z.infer<typeof SalesPipelineSchema>
|
|
28
46
|
```
|
|
29
47
|
|
|
30
|
-
### `
|
|
48
|
+
### `SalesStage`
|
|
31
49
|
|
|
32
50
|
```typescript
|
|
33
|
-
export type
|
|
51
|
+
export type SalesStage = z.infer<typeof SalesStageSchema>
|
|
34
52
|
```
|
|
35
53
|
|
|
36
|
-
### `
|
|
54
|
+
### `ProspectingBuildTemplate`
|
|
37
55
|
|
|
38
56
|
```typescript
|
|
39
|
-
export type
|
|
57
|
+
export type ProspectingBuildTemplate = z.infer<typeof ProspectingBuildTemplateSchema>
|
|
40
58
|
```
|
|
41
59
|
|
|
42
|
-
### `
|
|
60
|
+
### `ProspectingLifecycleStage`
|
|
43
61
|
|
|
44
62
|
```typescript
|
|
45
|
-
export type
|
|
63
|
+
export type ProspectingLifecycleStage = z.infer<typeof ProspectingLifecycleStageSchema>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `ProjectsDomainState`
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
export type ProjectsDomainState = z.infer<typeof ProjectsDomainStateSchema>
|
|
46
70
|
```
|
|
47
71
|
|
|
48
72
|
### `NodeIdPath`
|
|
@@ -57,58 +81,82 @@ export type NodeIdPath = z.infer<typeof NodeIdPathSchema>
|
|
|
57
81
|
export type NodeIdString = z.infer<typeof NodeIdStringSchema>
|
|
58
82
|
```
|
|
59
83
|
|
|
84
|
+
### `OrganizationModelSurface`
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
export type OrganizationModelSurface = z.infer<typeof SurfaceDefinitionSchema>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### `OrganizationModelNavigationGroup`
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
export type OrganizationModelNavigationGroup = z.infer<typeof NavigationGroupSchema>
|
|
94
|
+
```
|
|
95
|
+
|
|
60
96
|
### `OrganizationModelNavigation`
|
|
61
97
|
|
|
62
98
|
```typescript
|
|
63
99
|
export type OrganizationModelNavigation = z.infer<typeof OrganizationModelNavigationSchema>
|
|
64
100
|
```
|
|
65
101
|
|
|
66
|
-
### `
|
|
102
|
+
### `OrganizationModelSidebar`
|
|
67
103
|
|
|
68
104
|
```typescript
|
|
69
|
-
export type
|
|
105
|
+
export type OrganizationModelSidebar = z.infer<typeof SidebarNavigationSchema>
|
|
70
106
|
```
|
|
71
107
|
|
|
72
|
-
### `
|
|
108
|
+
### `OrganizationModelSidebarSection`
|
|
73
109
|
|
|
74
110
|
```typescript
|
|
75
|
-
export type
|
|
111
|
+
export type OrganizationModelSidebarSection = z.infer<typeof SidebarSectionSchema>
|
|
76
112
|
```
|
|
77
113
|
|
|
78
|
-
### `
|
|
114
|
+
### `OrganizationModelSidebarNode`
|
|
79
115
|
|
|
80
116
|
```typescript
|
|
81
|
-
export type
|
|
117
|
+
export type OrganizationModelSidebarNode = z.infer<typeof SidebarNodeSchema>
|
|
82
118
|
```
|
|
83
119
|
|
|
84
|
-
### `
|
|
120
|
+
### `OrganizationModelSidebarSurfaceTargets`
|
|
85
121
|
|
|
86
122
|
```typescript
|
|
87
|
-
export type
|
|
123
|
+
export type OrganizationModelSidebarSurfaceTargets = z.infer<typeof SidebarSurfaceTargetsSchema>
|
|
88
124
|
```
|
|
89
125
|
|
|
90
|
-
### `
|
|
126
|
+
### `OrganizationModelSidebarSurfaceNode`
|
|
91
127
|
|
|
92
128
|
```typescript
|
|
93
|
-
export type
|
|
129
|
+
export type OrganizationModelSidebarSurfaceNode = Extract<OrganizationModelSidebarNode, { type: 'surface' }>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### `OrganizationModelSidebarGroupNode`
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
export type OrganizationModelSidebarGroupNode = Extract<OrganizationModelSidebarNode, { type: 'group' }>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### `OrganizationModelTechStackEntry`
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
export type OrganizationModelTechStackEntry = z.infer<typeof TechStackEntrySchema>
|
|
94
142
|
```
|
|
95
143
|
|
|
96
|
-
### `
|
|
144
|
+
### `OrganizationModelStatuses`
|
|
97
145
|
|
|
98
146
|
```typescript
|
|
99
|
-
export type
|
|
147
|
+
export type OrganizationModelStatuses = z.infer<typeof StatusesDomainSchema>
|
|
100
148
|
```
|
|
101
149
|
|
|
102
|
-
### `
|
|
150
|
+
### `OrganizationModelStatusEntry`
|
|
103
151
|
|
|
104
152
|
```typescript
|
|
105
|
-
export type
|
|
153
|
+
export type OrganizationModelStatusEntry = z.infer<typeof StatusEntrySchema>
|
|
106
154
|
```
|
|
107
155
|
|
|
108
|
-
### `
|
|
156
|
+
### `OrganizationModelStatusSemanticClass`
|
|
109
157
|
|
|
110
158
|
```typescript
|
|
111
|
-
export type
|
|
159
|
+
export type OrganizationModelStatusSemanticClass = z.infer<typeof StatusSemanticClassSchema>
|
|
112
160
|
```
|
|
113
161
|
|
|
114
162
|
### `OrganizationModelCustomers`
|
|
@@ -159,6 +207,36 @@ export type OrganizationModelRoles = z.infer<typeof RolesDomainSchema>
|
|
|
159
207
|
export type OrganizationModelRole = z.infer<typeof RoleSchema>
|
|
160
208
|
```
|
|
161
209
|
|
|
210
|
+
### `OrganizationModelRoleId`
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
export type OrganizationModelRoleId = z.infer<typeof RoleIdSchema>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### `OrganizationModelRoleHolder`
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
export type OrganizationModelRoleHolder = z.infer<typeof RoleHolderSchema>
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### `OrganizationModelHumanRoleHolder`
|
|
223
|
+
|
|
224
|
+
```typescript
|
|
225
|
+
export type OrganizationModelHumanRoleHolder = z.infer<typeof HumanRoleHolderSchema>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### `OrganizationModelAgentRoleHolder`
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
export type OrganizationModelAgentRoleHolder = z.infer<typeof AgentRoleHolderSchema>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### `OrganizationModelTeamRoleHolder`
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
export type OrganizationModelTeamRoleHolder = z.infer<typeof TeamRoleHolderSchema>
|
|
238
|
+
```
|
|
239
|
+
|
|
162
240
|
### `OrganizationModelGoals`
|
|
163
241
|
|
|
164
242
|
```typescript
|
|
@@ -177,6 +255,253 @@ export type OrganizationModelObjective = z.infer<typeof ObjectiveSchema>
|
|
|
177
255
|
export type OrganizationModelKeyResult = z.infer<typeof KeyResultSchema>
|
|
178
256
|
```
|
|
179
257
|
|
|
258
|
+
### `OrganizationModelSystems`
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
export type OrganizationModelSystems = z.infer<typeof SystemsDomainSchema>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### `OrganizationModelSystemEntry`
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
export type OrganizationModelSystemEntry = z.infer<typeof SystemEntrySchema>
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### `OrganizationModelSystemId`
|
|
271
|
+
|
|
272
|
+
```typescript
|
|
273
|
+
export type OrganizationModelSystemId = z.infer<typeof SystemIdSchema>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### `OrganizationModelSystemPath`
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
export type OrganizationModelSystemPath = z.infer<typeof SystemPathSchema>
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### `OrganizationModelSystemKind`
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
export type OrganizationModelSystemKind = z.infer<typeof SystemKindSchema>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### `OrganizationModelSystemLifecycle`
|
|
289
|
+
|
|
290
|
+
```typescript
|
|
291
|
+
export type OrganizationModelSystemLifecycle = z.infer<typeof SystemLifecycleSchema>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### `OrganizationModelSystemStatus`
|
|
295
|
+
|
|
296
|
+
```typescript
|
|
297
|
+
/** @deprecated Use OrganizationModelSystemLifecycle. Accepted for one publish cycle. */
|
|
298
|
+
export type OrganizationModelSystemStatus = z.infer<typeof SystemStatusSchema>
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### `OrganizationModelResources`
|
|
302
|
+
|
|
303
|
+
```typescript
|
|
304
|
+
export type OrganizationModelResources = z.infer<typeof ResourcesDomainSchema>
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### `OrganizationModelResourceEntry`
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
export type OrganizationModelResourceEntry = z.infer<typeof ResourceEntrySchema>
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### `OrganizationModelResourceId`
|
|
314
|
+
|
|
315
|
+
```typescript
|
|
316
|
+
export type OrganizationModelResourceId = z.infer<typeof ResourceIdSchema>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### `EventId`
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
export type EventId = z.infer<typeof EventIdSchema>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### `EventEmissionDescriptor`
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
export type EventEmissionDescriptor = z.infer<typeof EventEmissionDescriptorSchema>
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### `EventDescriptor`
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
export type EventDescriptor = z.infer<typeof EventDescriptorSchema>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### `OrganizationModelResourceKind`
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
export type OrganizationModelResourceKind = z.infer<typeof ResourceKindSchema>
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### `OrganizationModelResourceGovernanceStatus`
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
export type OrganizationModelResourceGovernanceStatus = z.infer<typeof ResourceGovernanceStatusSchema>
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### `OrganizationModelAgentKind`
|
|
350
|
+
|
|
351
|
+
```typescript
|
|
352
|
+
export type OrganizationModelAgentKind = z.infer<typeof AgentKindSchema>
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### `OrganizationModelScriptResourceLanguage`
|
|
356
|
+
|
|
357
|
+
```typescript
|
|
358
|
+
export type OrganizationModelScriptResourceLanguage = z.infer<typeof ScriptResourceLanguageSchema>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### `OrganizationModelScriptResourceSource`
|
|
362
|
+
|
|
363
|
+
```typescript
|
|
364
|
+
export type OrganizationModelScriptResourceSource = z.infer<typeof ScriptResourceSourceSchema>
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### `OrganizationModelWorkflowResourceEntry`
|
|
368
|
+
|
|
369
|
+
```typescript
|
|
370
|
+
export type OrganizationModelWorkflowResourceEntry = z.infer<typeof WorkflowResourceEntrySchema>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### `OrganizationModelAgentResourceEntry`
|
|
374
|
+
|
|
375
|
+
```typescript
|
|
376
|
+
export type OrganizationModelAgentResourceEntry = z.infer<typeof AgentResourceEntrySchema>
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### `OrganizationModelIntegrationResourceEntry`
|
|
380
|
+
|
|
381
|
+
```typescript
|
|
382
|
+
export type OrganizationModelIntegrationResourceEntry = z.infer<typeof IntegrationResourceEntrySchema>
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### `OrganizationModelScriptResourceEntry`
|
|
386
|
+
|
|
387
|
+
```typescript
|
|
388
|
+
export type OrganizationModelScriptResourceEntry = z.infer<typeof ScriptResourceEntrySchema>
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### `OrganizationModelActions`
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
394
|
+
export type OrganizationModelActions = z.infer<typeof ActionsDomainSchema>
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### `OrganizationModelAction`
|
|
398
|
+
|
|
399
|
+
```typescript
|
|
400
|
+
export type OrganizationModelAction = z.infer<typeof ActionSchema>
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### `OrganizationModelActionId`
|
|
404
|
+
|
|
405
|
+
```typescript
|
|
406
|
+
export type OrganizationModelActionId = z.infer<typeof ActionIdSchema>
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### `OrganizationModelActionScope`
|
|
410
|
+
|
|
411
|
+
```typescript
|
|
412
|
+
export type OrganizationModelActionScope = z.infer<typeof ActionScopeSchema>
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### `OrganizationModelActionRef`
|
|
416
|
+
|
|
417
|
+
```typescript
|
|
418
|
+
export type OrganizationModelActionRef = z.infer<typeof ActionRefSchema>
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### `OrganizationModelActionInvocationKind`
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
export type OrganizationModelActionInvocationKind = z.infer<typeof ActionInvocationKindSchema>
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### `OrganizationModelActionInvocation`
|
|
428
|
+
|
|
429
|
+
```typescript
|
|
430
|
+
export type OrganizationModelActionInvocation = z.infer<typeof ActionInvocationSchema>
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### `EntityId`
|
|
434
|
+
|
|
435
|
+
```typescript
|
|
436
|
+
export type EntityId = z.infer<typeof EntityIdSchema>
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### `EntityLink`
|
|
440
|
+
|
|
441
|
+
```typescript
|
|
442
|
+
export type EntityLink = z.infer<typeof EntityLinkSchema>
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### `Entity`
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
export type Entity = z.infer<typeof EntitySchema>
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### `OrganizationModelEntity`
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
export type OrganizationModelEntity = z.infer<typeof EntitySchema>
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### `OrganizationModelEntities`
|
|
458
|
+
|
|
459
|
+
```typescript
|
|
460
|
+
export type OrganizationModelEntities = z.infer<typeof EntitiesDomainSchema>
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### `OrganizationModelPolicies`
|
|
464
|
+
|
|
465
|
+
```typescript
|
|
466
|
+
export type OrganizationModelPolicies = z.infer<typeof PoliciesDomainSchema>
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### `OrganizationModelPolicy`
|
|
470
|
+
|
|
471
|
+
```typescript
|
|
472
|
+
export type OrganizationModelPolicy = z.infer<typeof PolicySchema>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### `OrganizationModelPolicyId`
|
|
476
|
+
|
|
477
|
+
```typescript
|
|
478
|
+
export type OrganizationModelPolicyId = z.infer<typeof PolicyIdSchema>
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### `OrganizationModelPolicyApplicability`
|
|
482
|
+
|
|
483
|
+
```typescript
|
|
484
|
+
export type OrganizationModelPolicyApplicability = z.infer<typeof PolicyApplicabilitySchema>
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### `OrganizationModelPolicyTrigger`
|
|
488
|
+
|
|
489
|
+
```typescript
|
|
490
|
+
export type OrganizationModelPolicyTrigger = z.infer<typeof PolicyTriggerSchema>
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
### `OrganizationModelPolicyPredicate`
|
|
494
|
+
|
|
495
|
+
```typescript
|
|
496
|
+
export type OrganizationModelPolicyPredicate = z.infer<typeof PolicyPredicateSchema>
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### `OrganizationModelPolicyEffect`
|
|
500
|
+
|
|
501
|
+
```typescript
|
|
502
|
+
export type OrganizationModelPolicyEffect = z.infer<typeof PolicyEffectSchema>
|
|
503
|
+
```
|
|
504
|
+
|
|
180
505
|
### `OrganizationModelKnowledge`
|
|
181
506
|
|
|
182
507
|
```typescript
|
|
@@ -189,22 +514,34 @@ export type OrganizationModelKnowledge = z.infer<typeof KnowledgeDomainSchema>
|
|
|
189
514
|
export type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>
|
|
190
515
|
```
|
|
191
516
|
|
|
517
|
+
### `OrgKnowledgeNodeInput`
|
|
518
|
+
|
|
519
|
+
```typescript
|
|
520
|
+
export type OrgKnowledgeNodeInput = z.input<typeof OrgKnowledgeNodeSchema>
|
|
521
|
+
```
|
|
522
|
+
|
|
192
523
|
### `OrgKnowledgeKind`
|
|
193
524
|
|
|
194
525
|
```typescript
|
|
195
526
|
export type OrgKnowledgeKind = z.infer<typeof OrgKnowledgeKindSchema>
|
|
196
527
|
```
|
|
197
528
|
|
|
198
|
-
### `
|
|
529
|
+
### `KnowledgeTargetKind`
|
|
199
530
|
|
|
200
531
|
```typescript
|
|
201
|
-
export type
|
|
532
|
+
export type KnowledgeTargetKind = z.infer<typeof KnowledgeTargetKindSchema>
|
|
202
533
|
```
|
|
203
534
|
|
|
204
|
-
### `
|
|
535
|
+
### `KnowledgeTargetRef`
|
|
205
536
|
|
|
206
537
|
```typescript
|
|
207
|
-
export type
|
|
538
|
+
export type KnowledgeTargetRef = z.infer<typeof KnowledgeTargetRefSchema>
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
### `KnowledgeLink`
|
|
542
|
+
|
|
543
|
+
```typescript
|
|
544
|
+
export type KnowledgeLink = z.infer<typeof KnowledgeLinkSchema>
|
|
208
545
|
```
|
|
209
546
|
|
|
210
547
|
### `OrganizationModelIconToken`
|
|
@@ -236,76 +573,80 @@ export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
|
|
|
236
573
|
}
|
|
237
574
|
```
|
|
238
575
|
|
|
239
|
-
### `
|
|
576
|
+
### `SystemSidebarComponent`
|
|
240
577
|
|
|
241
578
|
```typescript
|
|
242
|
-
export type
|
|
579
|
+
export type SystemSidebarComponent = ComponentType
|
|
243
580
|
```
|
|
244
581
|
|
|
245
|
-
### `
|
|
582
|
+
### `SystemIconComponent`
|
|
246
583
|
|
|
247
584
|
```typescript
|
|
248
|
-
export type
|
|
585
|
+
export type SystemIconComponent = ComponentType<{ size?: number; stroke?: number }>
|
|
249
586
|
```
|
|
250
587
|
|
|
251
|
-
### `
|
|
588
|
+
### `SystemSidebarWidthResolver`
|
|
252
589
|
|
|
253
590
|
```typescript
|
|
254
|
-
export type
|
|
591
|
+
export type SystemSidebarWidthResolver = number | ((context: { currentPath: string }) => number)
|
|
255
592
|
```
|
|
256
593
|
|
|
257
|
-
### `
|
|
594
|
+
### `SystemModule`
|
|
258
595
|
|
|
259
596
|
```typescript
|
|
260
|
-
export interface
|
|
261
|
-
/** Unique stable identifier for this
|
|
597
|
+
export interface SystemModule {
|
|
598
|
+
/** Unique stable identifier for this UI system module. */
|
|
262
599
|
key: string
|
|
263
|
-
/** Organization Model
|
|
264
|
-
|
|
265
|
-
/**
|
|
600
|
+
/** Organization Model system id this module presents. Omit for navigation-only app surfaces. */
|
|
601
|
+
systemId?: string
|
|
602
|
+
/** Route prefixes owned by navigation-only app surfaces. */
|
|
603
|
+
routePrefixes?: string[]
|
|
604
|
+
/** Capability identifiers contributed by this system module. */
|
|
266
605
|
capabilityIds?: string[]
|
|
267
|
-
/** Icon used when this
|
|
268
|
-
icon?:
|
|
269
|
-
/** Sidebar component rendered when this
|
|
270
|
-
sidebar?:
|
|
606
|
+
/** Icon used when this system node appears in shell navigation. */
|
|
607
|
+
icon?: SystemIconComponent
|
|
608
|
+
/** Sidebar component rendered when this system's subtree route is active. */
|
|
609
|
+
sidebar?: SystemSidebarComponent
|
|
271
610
|
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
272
|
-
sidebarWidth?:
|
|
273
|
-
/** Operations-only bridge connecting this
|
|
274
|
-
organizationGraph?:
|
|
611
|
+
sidebarWidth?: SystemSidebarWidthResolver
|
|
612
|
+
/** Operations-only bridge connecting this system to the organization graph node. */
|
|
613
|
+
organizationGraph?: OrganizationGraphSystemBridge
|
|
275
614
|
}
|
|
276
615
|
```
|
|
277
616
|
|
|
278
|
-
### `
|
|
617
|
+
### `ResolvedSystemAccess`
|
|
279
618
|
|
|
280
619
|
```typescript
|
|
281
|
-
export interface
|
|
282
|
-
|
|
620
|
+
export interface ResolvedSystemAccess {
|
|
621
|
+
featureKey: string
|
|
622
|
+
systemId?: string
|
|
283
623
|
enabled: boolean
|
|
284
624
|
}
|
|
285
625
|
```
|
|
286
626
|
|
|
287
|
-
### `
|
|
627
|
+
### `ResolvedSystemSemantics`
|
|
288
628
|
|
|
289
629
|
```typescript
|
|
290
|
-
export interface
|
|
630
|
+
export interface ResolvedSystemSemantics {
|
|
291
631
|
capabilityIds: string[]
|
|
292
632
|
}
|
|
293
633
|
```
|
|
294
634
|
|
|
295
|
-
### `
|
|
635
|
+
### `ResolvedSystemModule`
|
|
296
636
|
|
|
297
637
|
```typescript
|
|
298
|
-
export interface
|
|
299
|
-
access:
|
|
300
|
-
semantics:
|
|
638
|
+
export interface ResolvedSystemModule extends SystemModule {
|
|
639
|
+
access: ResolvedSystemAccess
|
|
640
|
+
semantics: ResolvedSystemSemantics
|
|
301
641
|
}
|
|
302
642
|
```
|
|
303
643
|
|
|
304
|
-
### `
|
|
644
|
+
### `ResolvedShellSystem`
|
|
305
645
|
|
|
306
646
|
```typescript
|
|
307
|
-
export
|
|
308
|
-
|
|
647
|
+
export type ResolvedShellSystem = OrganizationModelSystemEntry & {
|
|
648
|
+
label: string
|
|
649
|
+
iconComponent?: SystemIconComponent
|
|
309
650
|
}
|
|
310
651
|
```
|
|
311
652
|
|
|
@@ -313,19 +654,50 @@ export interface ResolvedShellFeature extends OrganizationModelFeature {
|
|
|
313
654
|
|
|
314
655
|
```typescript
|
|
315
656
|
export interface ResolvedShellModel {
|
|
316
|
-
|
|
317
|
-
findByPath: (path: string) =>
|
|
318
|
-
findById: (id: string) =>
|
|
319
|
-
childrenOf: (id: string) =>
|
|
320
|
-
ancestorsOf: (id: string) =>
|
|
321
|
-
parentOf: (id: string) =>
|
|
322
|
-
topLevel: () =>
|
|
323
|
-
uiPositionFor: (id: string) => OrganizationModelFeature['uiPosition'] | undefined
|
|
657
|
+
systems: readonly ResolvedShellSystem[]
|
|
658
|
+
findByPath: (path: string) => ResolvedShellSystem | undefined
|
|
659
|
+
findById: (id: string) => ResolvedShellSystem | undefined
|
|
660
|
+
childrenOf: (id: string) => ResolvedShellSystem[]
|
|
661
|
+
ancestorsOf: (id: string) => ResolvedShellSystem[]
|
|
662
|
+
parentOf: (id: string) => ResolvedShellSystem | undefined
|
|
663
|
+
topLevel: () => ResolvedShellSystem[]
|
|
324
664
|
requiresAdminFor: (id: string) => boolean
|
|
325
665
|
devOnlyFor: (id: string) => boolean
|
|
326
666
|
}
|
|
327
667
|
```
|
|
328
668
|
|
|
669
|
+
### `ShellSidebarLinkItem`
|
|
670
|
+
|
|
671
|
+
```typescript
|
|
672
|
+
export interface ShellSidebarLinkItem {
|
|
673
|
+
label: string
|
|
674
|
+
link: string
|
|
675
|
+
exact?: boolean
|
|
676
|
+
activeMatchPaths?: string[]
|
|
677
|
+
}
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### `ShellSidebarLinkGroup`
|
|
681
|
+
|
|
682
|
+
```typescript
|
|
683
|
+
export interface ShellSidebarLinkGroup {
|
|
684
|
+
icon: SystemIconComponent
|
|
685
|
+
label: string
|
|
686
|
+
links?: ShellSidebarLinkItem[]
|
|
687
|
+
link?: string
|
|
688
|
+
}
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
### `ShellSidebarProjectionOptions`
|
|
692
|
+
|
|
693
|
+
```typescript
|
|
694
|
+
export interface ShellSidebarProjectionOptions {
|
|
695
|
+
isPlatformAdmin?: boolean
|
|
696
|
+
isDev?: boolean
|
|
697
|
+
section?: 'primary' | 'bottom'
|
|
698
|
+
}
|
|
699
|
+
```
|
|
700
|
+
|
|
329
701
|
### `ShellRouteMatchStatus`
|
|
330
702
|
|
|
331
703
|
```typescript
|
|
@@ -338,8 +710,8 @@ export type ShellRouteMatchStatus = 'matched' | 'hidden' | 'unmatched'
|
|
|
338
710
|
export interface ResolvedShellRouteMatch {
|
|
339
711
|
status: ShellRouteMatchStatus
|
|
340
712
|
path: string
|
|
341
|
-
|
|
342
|
-
node?:
|
|
713
|
+
system?: ResolvedSystemModule
|
|
714
|
+
node?: ResolvedShellSystem
|
|
343
715
|
}
|
|
344
716
|
```
|
|
345
717
|
|
|
@@ -351,11 +723,11 @@ export interface ShellRuntime {
|
|
|
351
723
|
}
|
|
352
724
|
```
|
|
353
725
|
|
|
354
|
-
### `
|
|
726
|
+
### `OrganizationGraphSystemBridge`
|
|
355
727
|
|
|
356
728
|
```typescript
|
|
357
|
-
export interface
|
|
358
|
-
|
|
729
|
+
export interface OrganizationGraphSystemBridge {
|
|
730
|
+
systemId?: string
|
|
359
731
|
}
|
|
360
732
|
```
|
|
361
733
|
|
|
@@ -364,16 +736,16 @@ export interface OrganizationGraphFeatureBridge {
|
|
|
364
736
|
```typescript
|
|
365
737
|
export interface OrganizationGraphContextValue {
|
|
366
738
|
available: boolean
|
|
367
|
-
|
|
368
|
-
|
|
739
|
+
systemId?: string
|
|
740
|
+
systemPath?: string
|
|
369
741
|
}
|
|
370
742
|
```
|
|
371
743
|
|
|
372
|
-
### `
|
|
744
|
+
### `ElevasisSystemsProviderProps`
|
|
373
745
|
|
|
374
746
|
```typescript
|
|
375
|
-
export interface
|
|
376
|
-
|
|
747
|
+
export interface ElevasisSystemsProviderProps {
|
|
748
|
+
systems?: SystemModule[]
|
|
377
749
|
organizationModel?: ElevasisOrganizationModel
|
|
378
750
|
timeRange?: TimeRange
|
|
379
751
|
operationsApiUrl?: string
|
|
@@ -385,14 +757,15 @@ export interface ElevasisFeaturesProviderProps {
|
|
|
385
757
|
}
|
|
386
758
|
```
|
|
387
759
|
|
|
388
|
-
### `
|
|
760
|
+
### `ElevasisSystemsContextValue`
|
|
389
761
|
|
|
390
762
|
```typescript
|
|
391
|
-
export interface
|
|
763
|
+
export interface ElevasisSystemsContextValue {
|
|
392
764
|
shellModel: ResolvedShellModel
|
|
393
765
|
shellRuntime: ShellRuntime
|
|
394
|
-
|
|
395
|
-
|
|
766
|
+
getSidebarLinks: (options?: ShellSidebarProjectionOptions) => ShellSidebarLinkGroup[]
|
|
767
|
+
enabledResolvedSystems: ResolvedSystemModule[]
|
|
768
|
+
resolvedSystems: ResolvedSystemModule[]
|
|
396
769
|
organizationGraph: OrganizationGraphContextValue
|
|
397
770
|
organizationModel?: OrganizationModel
|
|
398
771
|
timeRange?: TimeRange
|
|
@@ -401,8 +774,8 @@ export interface ElevasisFeaturesContextValue {
|
|
|
401
774
|
deliveryApiUrl?: string
|
|
402
775
|
deliverySSEManager?: SSEConnectionManagerLike
|
|
403
776
|
disabledSubsectionPaths: string[]
|
|
404
|
-
|
|
405
|
-
|
|
777
|
+
isSystemEnabled: (key: string) => boolean
|
|
778
|
+
getResolvedSystem: (key: string) => ResolvedSystemModule | undefined
|
|
406
779
|
}
|
|
407
780
|
```
|
|
408
781
|
|
|
@@ -411,413 +784,464 @@ export interface ElevasisFeaturesContextValue {
|
|
|
411
784
|
### `ResourceStatus`
|
|
412
785
|
|
|
413
786
|
```typescript
|
|
414
|
-
/**
|
|
415
|
-
* Environment/deployment status for resources
|
|
416
|
-
*/
|
|
787
|
+
/**
|
|
788
|
+
* Environment/deployment status for resources
|
|
789
|
+
*/
|
|
417
790
|
export type ResourceStatus = 'dev' | 'prod'
|
|
418
791
|
```
|
|
419
792
|
|
|
420
793
|
### `ResourceType`
|
|
421
794
|
|
|
422
795
|
```typescript
|
|
423
|
-
/**
|
|
424
|
-
* All resource types in the platform
|
|
425
|
-
* Used as the discriminator field in ResourceDefinition
|
|
426
|
-
*/
|
|
796
|
+
/**
|
|
797
|
+
* All resource types in the platform
|
|
798
|
+
* Used as the discriminator field in ResourceDefinition
|
|
799
|
+
*/
|
|
427
800
|
export type ResourceType = 'agent' | 'workflow' | 'trigger' | 'integration' | 'external' | 'human'
|
|
428
801
|
```
|
|
429
802
|
|
|
430
803
|
### `ExecutableResourceType`
|
|
431
804
|
|
|
432
805
|
```typescript
|
|
433
|
-
/**
|
|
434
|
-
* Executable resource types (subset of ResourceType)
|
|
435
|
-
* These resources can be directly executed by the execution engine
|
|
436
|
-
*/
|
|
806
|
+
/**
|
|
807
|
+
* Executable resource types (subset of ResourceType)
|
|
808
|
+
* These resources can be directly executed by the execution engine
|
|
809
|
+
*/
|
|
437
810
|
export type ExecutableResourceType = 'workflow' | 'agent'
|
|
438
811
|
```
|
|
439
812
|
|
|
813
|
+
### `ResourceSystemSummary`
|
|
814
|
+
|
|
815
|
+
```typescript
|
|
816
|
+
export type ResourceSystemSummary = Pick<SystemEntry, 'id' | 'title' | 'description' | 'kind' | 'lifecycle'>
|
|
817
|
+
```
|
|
818
|
+
|
|
440
819
|
### `ResourceDefinition`
|
|
441
820
|
|
|
442
821
|
```typescript
|
|
443
|
-
/**
|
|
444
|
-
* Base interface for ALL platform resources
|
|
445
|
-
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
446
|
-
*/
|
|
447
|
-
export interface ResourceDefinition {
|
|
448
|
-
/** Unique resource identifier */
|
|
449
|
-
resourceId: string
|
|
450
|
-
|
|
451
|
-
/** Display name */
|
|
452
|
-
name: string
|
|
453
|
-
|
|
454
|
-
/** Purpose and functionality description */
|
|
455
|
-
description: string
|
|
456
|
-
|
|
457
|
-
/** Version for change tracking and evolution */
|
|
458
|
-
version: string
|
|
459
|
-
|
|
460
|
-
/** Resource type discriminator */
|
|
461
|
-
type: ResourceType
|
|
462
|
-
|
|
463
|
-
/** Environment/deployment status */
|
|
464
|
-
status: ResourceStatus
|
|
465
|
-
|
|
822
|
+
/**
|
|
823
|
+
* Base interface for ALL platform resources
|
|
824
|
+
* Shared by both executable (agents, workflows) and non-executable (triggers, integrations, etc.) resources
|
|
825
|
+
*/
|
|
826
|
+
export interface ResourceDefinition {
|
|
827
|
+
/** Unique resource identifier */
|
|
828
|
+
resourceId: string
|
|
829
|
+
|
|
830
|
+
/** Display name */
|
|
831
|
+
name: string
|
|
832
|
+
|
|
833
|
+
/** Purpose and functionality description */
|
|
834
|
+
description: string
|
|
835
|
+
|
|
836
|
+
/** Version for change tracking and evolution */
|
|
837
|
+
version: string
|
|
838
|
+
|
|
839
|
+
/** Resource type discriminator */
|
|
840
|
+
type: ResourceType
|
|
841
|
+
|
|
842
|
+
/** Environment/deployment status */
|
|
843
|
+
status: ResourceStatus
|
|
844
|
+
|
|
466
845
|
/** Graph links to Organization Model nodes */
|
|
467
846
|
links?: ResourceLink[]
|
|
468
847
|
|
|
469
848
|
/** Infrastructure category for filtering */
|
|
470
849
|
category?: ResourceCategory
|
|
471
|
-
|
|
472
|
-
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
473
|
-
sessionCapable?: boolean
|
|
474
|
-
|
|
475
|
-
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
476
|
-
origin?: 'local' | 'remote'
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
|
|
850
|
+
|
|
851
|
+
/** Whether the agent supports multi-turn sessions (agents only) */
|
|
852
|
+
sessionCapable?: boolean
|
|
853
|
+
|
|
854
|
+
/** Whether the resource is local (monorepo) or remote (externally deployed) */
|
|
855
|
+
origin?: 'local' | 'remote'
|
|
856
|
+
|
|
857
|
+
/** OM System membership — dot-separated system path (e.g. "sys.lead-gen"), when backed by a Resource descriptor */
|
|
858
|
+
systemPath?: string
|
|
859
|
+
|
|
860
|
+
/** Display metadata for the owning OM System */
|
|
861
|
+
system?: ResourceSystemSummary
|
|
862
|
+
|
|
863
|
+
/** Governance lifecycle status from the OM Resource descriptor */
|
|
864
|
+
governanceStatus?: ResourceGovernanceStatus
|
|
865
|
+
|
|
866
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
867
|
+
archived?: boolean
|
|
868
|
+
}
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
### `RuntimeResourceDescriptor`
|
|
872
|
+
|
|
873
|
+
```typescript
|
|
874
|
+
export type RuntimeResourceDescriptor = Extract<ResourceEntry, { kind: 'workflow' | 'agent' | 'integration' }>
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
### `DescriptorBackedResourceDefinition`
|
|
878
|
+
|
|
879
|
+
```typescript
|
|
880
|
+
export type DescriptorBackedResourceDefinition<
|
|
881
|
+
TResource extends RuntimeResourceDescriptor = RuntimeResourceDescriptor
|
|
882
|
+
> = Omit<ResourceDefinition, 'resourceId' | 'type'> & {
|
|
883
|
+
/** OM descriptor that owns canonical identity and governance metadata. */
|
|
884
|
+
resource: TResource
|
|
885
|
+
resourceId?: never
|
|
886
|
+
type?: never
|
|
480
887
|
}
|
|
481
888
|
```
|
|
482
889
|
|
|
890
|
+
### `BoundResourceDefinition`
|
|
891
|
+
|
|
892
|
+
```typescript
|
|
893
|
+
export type BoundResourceDefinition<TResource extends RuntimeResourceDescriptor = RuntimeResourceDescriptor> = Omit<
|
|
894
|
+
DescriptorBackedResourceDefinition<TResource>,
|
|
895
|
+
'resource'
|
|
896
|
+
> &
|
|
897
|
+
ResourceDefinition & {
|
|
898
|
+
resource: TResource
|
|
899
|
+
resourceId: TResource['id']
|
|
900
|
+
type: TResource['kind']
|
|
901
|
+
}
|
|
902
|
+
```
|
|
903
|
+
|
|
483
904
|
### `ResourceList`
|
|
484
905
|
|
|
485
906
|
```typescript
|
|
486
907
|
/**
|
|
487
908
|
* Resource list for organization
|
|
488
909
|
* Returns ResourceDefinition metadata (not full definitions)
|
|
489
|
-
*/
|
|
490
|
-
export interface ResourceList {
|
|
491
|
-
workflows: ResourceDefinition[]
|
|
492
|
-
agents: ResourceDefinition[]
|
|
493
|
-
total: number
|
|
494
|
-
organizationName: string
|
|
495
|
-
environment?: 'dev' | 'prod'
|
|
910
|
+
*/
|
|
911
|
+
export interface ResourceList {
|
|
912
|
+
workflows: ResourceDefinition[]
|
|
913
|
+
agents: ResourceDefinition[]
|
|
914
|
+
total: number
|
|
915
|
+
organizationName: string
|
|
916
|
+
environment?: 'dev' | 'prod'
|
|
496
917
|
}
|
|
497
918
|
```
|
|
498
919
|
|
|
499
920
|
### `WebhookProviderType`
|
|
500
921
|
|
|
501
922
|
```typescript
|
|
502
|
-
/** Webhook provider identifiers */
|
|
923
|
+
/** Webhook provider identifiers */
|
|
503
924
|
export type WebhookProviderType = 'cal-com' | 'stripe' | 'signature-api' | 'instantly' | 'apify' | 'test'
|
|
504
925
|
```
|
|
505
926
|
|
|
506
927
|
### `WebhookTriggerConfig`
|
|
507
928
|
|
|
508
929
|
```typescript
|
|
509
|
-
/** Webhook trigger configuration */
|
|
510
|
-
export interface WebhookTriggerConfig {
|
|
511
|
-
/** Provider identifier */
|
|
512
|
-
provider: WebhookProviderType
|
|
513
|
-
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
514
|
-
event?: string
|
|
515
|
-
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
516
|
-
filter?: Record<string, string>
|
|
517
|
-
/** References credential in credentials table for per-org webhook secrets */
|
|
518
|
-
credentialName?: string
|
|
930
|
+
/** Webhook trigger configuration */
|
|
931
|
+
export interface WebhookTriggerConfig {
|
|
932
|
+
/** Provider identifier */
|
|
933
|
+
provider: WebhookProviderType
|
|
934
|
+
/** Event type for documentation (not used for matching - workflow handles routing) */
|
|
935
|
+
event?: string
|
|
936
|
+
/** Optional filtering (e.g., specific form ID for Fillout) */
|
|
937
|
+
filter?: Record<string, string>
|
|
938
|
+
/** References credential in credentials table for per-org webhook secrets */
|
|
939
|
+
credentialName?: string
|
|
519
940
|
}
|
|
520
941
|
```
|
|
521
942
|
|
|
522
943
|
### `ScheduleTriggerConfig`
|
|
523
944
|
|
|
524
945
|
```typescript
|
|
525
|
-
/** Schedule trigger configuration */
|
|
526
|
-
export interface ScheduleTriggerConfig {
|
|
527
|
-
/** Cron expression (e.g., '0 6 * * *') */
|
|
528
|
-
cron: string
|
|
529
|
-
/** Optional timezone (default: UTC) */
|
|
530
|
-
timezone?: string
|
|
946
|
+
/** Schedule trigger configuration */
|
|
947
|
+
export interface ScheduleTriggerConfig {
|
|
948
|
+
/** Cron expression (e.g., '0 6 * * *') */
|
|
949
|
+
cron: string
|
|
950
|
+
/** Optional timezone (default: UTC) */
|
|
951
|
+
timezone?: string
|
|
531
952
|
}
|
|
532
953
|
```
|
|
533
954
|
|
|
534
955
|
### `EventTriggerConfig`
|
|
535
956
|
|
|
536
957
|
```typescript
|
|
537
|
-
/** Event trigger configuration */
|
|
538
|
-
export interface EventTriggerConfig {
|
|
539
|
-
/** Internal event type */
|
|
540
|
-
eventType: string
|
|
541
|
-
/** Event source */
|
|
542
|
-
source?: string
|
|
958
|
+
/** Event trigger configuration */
|
|
959
|
+
export interface EventTriggerConfig {
|
|
960
|
+
/** Internal event type */
|
|
961
|
+
eventType: string
|
|
962
|
+
/** Event source */
|
|
963
|
+
source?: string
|
|
543
964
|
}
|
|
544
965
|
```
|
|
545
966
|
|
|
546
967
|
### `TriggerConfig`
|
|
547
968
|
|
|
548
969
|
```typescript
|
|
549
|
-
/** Union of all trigger configs */
|
|
970
|
+
/** Union of all trigger configs */
|
|
550
971
|
export type TriggerConfig = WebhookTriggerConfig | ScheduleTriggerConfig | EventTriggerConfig
|
|
551
972
|
```
|
|
552
973
|
|
|
553
974
|
### `TriggerDefinition`
|
|
554
975
|
|
|
555
976
|
```typescript
|
|
556
|
-
/**
|
|
557
|
-
* Trigger metadata - entry points that initiate resource execution
|
|
558
|
-
*
|
|
559
|
-
* Triggers represent how executions start: webhooks from external services,
|
|
560
|
-
* scheduled cron jobs, platform events, or manual user actions.
|
|
561
|
-
*
|
|
562
|
-
* BREAKING CHANGES (2025-11-30):
|
|
977
|
+
/**
|
|
978
|
+
* Trigger metadata - entry points that initiate resource execution
|
|
979
|
+
*
|
|
980
|
+
* Triggers represent how executions start: webhooks from external services,
|
|
981
|
+
* scheduled cron jobs, platform events, or manual user actions.
|
|
982
|
+
*
|
|
983
|
+
* BREAKING CHANGES (2025-11-30):
|
|
563
984
|
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
564
|
-
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
565
|
-
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
566
|
-
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
567
|
-
* - triggers object now includes `externalResources` option
|
|
568
|
-
*
|
|
569
|
-
* @example
|
|
570
|
-
* // TriggerDefinition - metadata only
|
|
571
|
-
* {
|
|
572
|
-
* resourceId: 'trigger-new-order',
|
|
573
|
-
* type: 'trigger',
|
|
574
|
-
* triggerType: 'webhook',
|
|
575
|
-
* name: 'New Order',
|
|
576
|
-
* description: 'Webhook from Shopify on new orders',
|
|
577
|
-
* version: '1.0.0',
|
|
578
|
-
* status: 'prod',
|
|
579
|
-
* webhookPath: '/webhooks/shopify/orders'
|
|
580
|
-
* }
|
|
581
|
-
*
|
|
582
|
-
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
583
|
-
* // relationships: {
|
|
584
|
-
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
585
|
-
* // }
|
|
586
|
-
*/
|
|
587
|
-
export interface TriggerDefinition extends ResourceDefinition {
|
|
588
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
589
|
-
type: 'trigger'
|
|
590
|
-
|
|
591
|
-
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
592
|
-
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
593
|
-
|
|
594
|
-
/** Type-specific configuration */
|
|
595
|
-
config?: TriggerConfig
|
|
596
|
-
|
|
597
|
-
// Legacy fields (deprecated, use config instead)
|
|
598
|
-
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
599
|
-
webhookPath?: string
|
|
600
|
-
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
601
|
-
schedule?: string
|
|
602
|
-
/** For event triggers: event type like 'low-stock-alert' */
|
|
603
|
-
eventType?: string
|
|
604
|
-
|
|
605
|
-
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
606
|
-
// This prevents duplication - triggers are forward-declared in relationships
|
|
985
|
+
* - Field renames: `id` -> `resourceId` (inherited), `type` -> `triggerType`
|
|
986
|
+
* - Relationship rename: `invokes` -> `triggers` (unified vocabulary)
|
|
987
|
+
* - New required fields: `version` (inherited), `type: 'trigger'` (inherited)
|
|
988
|
+
* - triggers object now includes `externalResources` option
|
|
989
|
+
*
|
|
990
|
+
* @example
|
|
991
|
+
* // TriggerDefinition - metadata only
|
|
992
|
+
* {
|
|
993
|
+
* resourceId: 'trigger-new-order',
|
|
994
|
+
* type: 'trigger',
|
|
995
|
+
* triggerType: 'webhook',
|
|
996
|
+
* name: 'New Order',
|
|
997
|
+
* description: 'Webhook from Shopify on new orders',
|
|
998
|
+
* version: '1.0.0',
|
|
999
|
+
* status: 'prod',
|
|
1000
|
+
* webhookPath: '/webhooks/shopify/orders'
|
|
1001
|
+
* }
|
|
1002
|
+
*
|
|
1003
|
+
* // Relationships declared in ResourceRelationships (not on TriggerDefinition):
|
|
1004
|
+
* // relationships: {
|
|
1005
|
+
* // 'trigger-new-order': { triggers: { workflows: ['order-fulfillment-workflow'] } }
|
|
1006
|
+
* // }
|
|
1007
|
+
*/
|
|
1008
|
+
export interface TriggerDefinition extends ResourceDefinition {
|
|
1009
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1010
|
+
type: 'trigger'
|
|
1011
|
+
|
|
1012
|
+
/** Trigger mechanism type (renamed from 'type' to avoid collision with base type discriminator) */
|
|
1013
|
+
triggerType: 'webhook' | 'schedule' | 'manual' | 'event'
|
|
1014
|
+
|
|
1015
|
+
/** Type-specific configuration */
|
|
1016
|
+
config?: TriggerConfig
|
|
1017
|
+
|
|
1018
|
+
// Legacy fields (deprecated, use config instead)
|
|
1019
|
+
/** For webhook triggers: path like '/webhooks/shopify/orders' */
|
|
1020
|
+
webhookPath?: string
|
|
1021
|
+
/** For schedule triggers: cron expression like '0 6 * * *' */
|
|
1022
|
+
schedule?: string
|
|
1023
|
+
/** For event triggers: event type like 'low-stock-alert' */
|
|
1024
|
+
eventType?: string
|
|
1025
|
+
|
|
1026
|
+
// NOTE: What this trigger starts is declared in ResourceRelationships, not here
|
|
1027
|
+
// This prevents duplication - triggers are forward-declared in relationships
|
|
607
1028
|
}
|
|
608
1029
|
```
|
|
609
1030
|
|
|
610
1031
|
### `IntegrationDefinition`
|
|
611
1032
|
|
|
612
1033
|
```typescript
|
|
613
|
-
/**
|
|
614
|
-
* Integration metadata - external service connections
|
|
615
|
-
*
|
|
616
|
-
* References credentials table for actual connection. No connection status
|
|
617
|
-
* stored here (queried at runtime from credentials table).
|
|
618
|
-
*
|
|
619
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1034
|
+
/**
|
|
1035
|
+
* Integration metadata - external service connections
|
|
1036
|
+
*
|
|
1037
|
+
* References credentials table for actual connection. No connection status
|
|
1038
|
+
* stored here (queried at runtime from credentials table).
|
|
1039
|
+
*
|
|
1040
|
+
* BREAKING CHANGES (2025-11-30):
|
|
620
1041
|
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
621
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
622
|
-
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
623
|
-
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
624
|
-
* - New required field: `type: 'integration'` (inherited) - resource type discriminator
|
|
625
|
-
*
|
|
626
|
-
* @example
|
|
627
|
-
* {
|
|
628
|
-
* resourceId: 'integration-shopify-prod',
|
|
629
|
-
* type: 'integration',
|
|
630
|
-
* provider: 'shopify',
|
|
631
|
-
* credentialName: 'shopify-prod',
|
|
632
|
-
* name: 'Shopify Production',
|
|
633
|
-
* description: 'E-commerce platform',
|
|
634
|
-
* version: '1.0.0',
|
|
635
|
-
* status: 'prod'
|
|
636
|
-
* }
|
|
637
|
-
*/
|
|
638
|
-
export interface IntegrationDefinition extends ResourceDefinition {
|
|
639
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
640
|
-
type: 'integration'
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
1042
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1043
|
+
* - New required field: `status` (inherited) - organizations must add status to all integrations
|
|
1044
|
+
* - New required field: `version` (inherited) - organizations must add version to all integrations
|
|
1045
|
+
* - New required field: `type: 'integration'` (inherited) - resource type discriminator
|
|
1046
|
+
*
|
|
1047
|
+
* @example
|
|
1048
|
+
* {
|
|
1049
|
+
* resourceId: 'integration-shopify-prod',
|
|
1050
|
+
* type: 'integration',
|
|
1051
|
+
* provider: 'shopify',
|
|
1052
|
+
* credentialName: 'shopify-prod',
|
|
1053
|
+
* name: 'Shopify Production',
|
|
1054
|
+
* description: 'E-commerce platform',
|
|
1055
|
+
* version: '1.0.0',
|
|
1056
|
+
* status: 'prod'
|
|
1057
|
+
* }
|
|
1058
|
+
*/
|
|
1059
|
+
export interface IntegrationDefinition extends ResourceDefinition {
|
|
1060
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1061
|
+
type: 'integration'
|
|
1062
|
+
|
|
1063
|
+
/** OM descriptor that owns canonical identity and governance metadata. */
|
|
1064
|
+
resource?: Extract<ResourceEntry, { kind: 'integration' }>
|
|
1065
|
+
|
|
1066
|
+
/** Integration provider type */
|
|
1067
|
+
provider: IntegrationType
|
|
1068
|
+
/** References credentials table (e.g., 'shopify-prod', 'zendesk-api') */
|
|
1069
|
+
credentialName: string
|
|
646
1070
|
}
|
|
647
1071
|
```
|
|
648
1072
|
|
|
649
1073
|
### `RelationshipDeclaration`
|
|
650
1074
|
|
|
651
1075
|
```typescript
|
|
652
|
-
/**
|
|
653
|
-
* Explicit resource relationship declaration
|
|
654
|
-
*
|
|
655
|
-
* Single-direction only - Command View derives reverse relationships.
|
|
656
|
-
* Agents/workflows declare what they trigger and use.
|
|
657
|
-
*
|
|
658
|
-
* @example
|
|
659
|
-
* {
|
|
660
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
661
|
-
* uses: { integrations: ['integration-shopify-prod', 'integration-postgres'] }
|
|
662
|
-
* }
|
|
663
|
-
*/
|
|
664
|
-
export interface RelationshipDeclaration {
|
|
665
|
-
/** Resources this resource triggers */
|
|
666
|
-
triggers?: {
|
|
667
|
-
/** Agent resourceIds this resource triggers */
|
|
668
|
-
agents?: string[]
|
|
669
|
-
/** Workflow resourceIds this resource triggers */
|
|
670
|
-
workflows?: string[]
|
|
671
|
-
}
|
|
672
|
-
/** Integrations this resource uses */
|
|
673
|
-
uses?: {
|
|
674
|
-
/** Integration IDs this resource uses */
|
|
675
|
-
integrations?: string[]
|
|
676
|
-
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Explicit resource relationship declaration
|
|
1078
|
+
*
|
|
1079
|
+
* Single-direction only - Command View derives reverse relationships.
|
|
1080
|
+
* Agents/workflows declare what they trigger and use.
|
|
1081
|
+
*
|
|
1082
|
+
* @example
|
|
1083
|
+
* {
|
|
1084
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1085
|
+
* uses: { integrations: ['integration-shopify-prod', 'integration-postgres'] }
|
|
1086
|
+
* }
|
|
1087
|
+
*/
|
|
1088
|
+
export interface RelationshipDeclaration {
|
|
1089
|
+
/** Resources this resource triggers */
|
|
1090
|
+
triggers?: {
|
|
1091
|
+
/** Agent resourceIds this resource triggers */
|
|
1092
|
+
agents?: string[]
|
|
1093
|
+
/** Workflow resourceIds this resource triggers */
|
|
1094
|
+
workflows?: string[]
|
|
1095
|
+
}
|
|
1096
|
+
/** Integrations this resource uses */
|
|
1097
|
+
uses?: {
|
|
1098
|
+
/** Integration IDs this resource uses */
|
|
1099
|
+
integrations?: string[]
|
|
1100
|
+
}
|
|
677
1101
|
}
|
|
678
1102
|
```
|
|
679
1103
|
|
|
680
1104
|
### `ResourceRelationships`
|
|
681
1105
|
|
|
682
1106
|
```typescript
|
|
683
|
-
/**
|
|
684
|
-
* Resource relationships map
|
|
685
|
-
* Maps resourceId to its relationship declarations
|
|
686
|
-
*
|
|
687
|
-
* @example
|
|
688
|
-
* {
|
|
689
|
-
* 'order-processor-agent': {
|
|
690
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
691
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
692
|
-
* }
|
|
693
|
-
* }
|
|
694
|
-
*/
|
|
1107
|
+
/**
|
|
1108
|
+
* Resource relationships map
|
|
1109
|
+
* Maps resourceId to its relationship declarations
|
|
1110
|
+
*
|
|
1111
|
+
* @example
|
|
1112
|
+
* {
|
|
1113
|
+
* 'order-processor-agent': {
|
|
1114
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1115
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
1116
|
+
* }
|
|
1117
|
+
* }
|
|
1118
|
+
*/
|
|
695
1119
|
export type ResourceRelationships = Record<string, RelationshipDeclaration>
|
|
696
1120
|
```
|
|
697
1121
|
|
|
698
1122
|
### `ExternalPlatform`
|
|
699
1123
|
|
|
700
1124
|
```typescript
|
|
701
|
-
/**
|
|
702
|
-
* External platform type
|
|
703
|
-
* Supported third-party automation platforms
|
|
704
|
-
*/
|
|
1125
|
+
/**
|
|
1126
|
+
* External platform type
|
|
1127
|
+
* Supported third-party automation platforms
|
|
1128
|
+
*/
|
|
705
1129
|
export type ExternalPlatform = 'n8n' | 'make' | 'zapier' | 'other'
|
|
706
1130
|
```
|
|
707
1131
|
|
|
708
1132
|
### `ExternalResourceDefinition`
|
|
709
1133
|
|
|
710
1134
|
```typescript
|
|
711
|
-
/**
|
|
712
|
-
* External automation resource metadata
|
|
713
|
-
*
|
|
714
|
-
* Represents workflows/automations running on third-party platforms
|
|
715
|
-
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
716
|
-
*
|
|
717
|
-
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
718
|
-
* no API integration with external platforms, no status syncing.
|
|
719
|
-
*
|
|
720
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1135
|
+
/**
|
|
1136
|
+
* External automation resource metadata
|
|
1137
|
+
*
|
|
1138
|
+
* Represents workflows/automations running on third-party platforms
|
|
1139
|
+
* (n8n, Make, Zapier, etc.) for visualization in Command View.
|
|
1140
|
+
*
|
|
1141
|
+
* NOTE: This is metadata ONLY for visualization. No execution logic,
|
|
1142
|
+
* no API integration with external platforms, no status syncing.
|
|
1143
|
+
*
|
|
1144
|
+
* BREAKING CHANGES (2025-11-30):
|
|
721
1145
|
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
722
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
723
|
-
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
724
|
-
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
725
|
-
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
726
|
-
*
|
|
727
|
-
* @example
|
|
728
|
-
* {
|
|
729
|
-
* resourceId: 'external-n8n-order-sync',
|
|
730
|
-
* type: 'external',
|
|
731
|
-
* version: '1.0.0',
|
|
732
|
-
* platform: 'n8n',
|
|
733
|
-
* name: 'Shopify Order Sync',
|
|
734
|
-
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
735
|
-
* status: 'prod',
|
|
736
|
-
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
737
|
-
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
738
|
-
* uses: { integrations: ['integration-shopify-prod'] }
|
|
739
|
-
* }
|
|
740
|
-
*/
|
|
741
|
-
export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
742
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
743
|
-
type: 'external'
|
|
744
|
-
|
|
745
|
-
/** Platform type */
|
|
746
|
-
platform: ExternalPlatform
|
|
747
|
-
|
|
748
|
-
// Optional platform-specific metadata
|
|
749
|
-
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
750
|
-
platformUrl?: string
|
|
751
|
-
/** Platform's internal ID/reference */
|
|
752
|
-
externalId?: string
|
|
753
|
-
|
|
754
|
-
/** What this external resource triggers (external -> internal) */
|
|
755
|
-
triggers?: {
|
|
756
|
-
/** Elevasis workflow resourceIds this external automation triggers */
|
|
757
|
-
workflows?: string[]
|
|
758
|
-
/** Elevasis agent resourceIds this external automation triggers */
|
|
759
|
-
agents?: string[]
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
/** Integrations this external resource uses (shared credentials) */
|
|
763
|
-
uses?: {
|
|
764
|
-
/** Integration IDs this external automation uses */
|
|
765
|
-
integrations?: string[]
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
769
|
-
// all relationships are forward-only declarations. Graph edges are built
|
|
770
|
-
// from forward declarations only.
|
|
1146
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1147
|
+
* - New required field: `version` (inherited) - organizations must add version to all external resources
|
|
1148
|
+
* - New required field: `type: 'external'` (inherited) - resource type discriminator
|
|
1149
|
+
* - REMOVED FIELD: `triggeredBy` - per relationship-consolidation design, all relationships are forward-only declarations
|
|
1150
|
+
*
|
|
1151
|
+
* @example
|
|
1152
|
+
* {
|
|
1153
|
+
* resourceId: 'external-n8n-order-sync',
|
|
1154
|
+
* type: 'external',
|
|
1155
|
+
* version: '1.0.0',
|
|
1156
|
+
* platform: 'n8n',
|
|
1157
|
+
* name: 'Shopify Order Sync',
|
|
1158
|
+
* description: 'Legacy n8n workflow for syncing Shopify orders',
|
|
1159
|
+
* status: 'prod',
|
|
1160
|
+
* platformUrl: 'https://n8n.client.com/workflow/123',
|
|
1161
|
+
* triggers: { workflows: ['order-fulfillment-workflow'] },
|
|
1162
|
+
* uses: { integrations: ['integration-shopify-prod'] }
|
|
1163
|
+
* }
|
|
1164
|
+
*/
|
|
1165
|
+
export interface ExternalResourceDefinition extends ResourceDefinition {
|
|
1166
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1167
|
+
type: 'external'
|
|
1168
|
+
|
|
1169
|
+
/** Platform type */
|
|
1170
|
+
platform: ExternalPlatform
|
|
1171
|
+
|
|
1172
|
+
// Optional platform-specific metadata
|
|
1173
|
+
/** Link to external platform (e.g., n8n workflow editor URL) */
|
|
1174
|
+
platformUrl?: string
|
|
1175
|
+
/** Platform's internal ID/reference */
|
|
1176
|
+
externalId?: string
|
|
1177
|
+
|
|
1178
|
+
/** What this external resource triggers (external -> internal) */
|
|
1179
|
+
triggers?: {
|
|
1180
|
+
/** Elevasis workflow resourceIds this external automation triggers */
|
|
1181
|
+
workflows?: string[]
|
|
1182
|
+
/** Elevasis agent resourceIds this external automation triggers */
|
|
1183
|
+
agents?: string[]
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
/** Integrations this external resource uses (shared credentials) */
|
|
1187
|
+
uses?: {
|
|
1188
|
+
/** Integration IDs this external automation uses */
|
|
1189
|
+
integrations?: string[]
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
// NOTE: triggeredBy field removed - per relationship-consolidation design,
|
|
1193
|
+
// all relationships are forward-only declarations. Graph edges are built
|
|
1194
|
+
// from forward declarations only.
|
|
771
1195
|
}
|
|
772
1196
|
```
|
|
773
1197
|
|
|
774
1198
|
### `HumanCheckpointDefinition`
|
|
775
1199
|
|
|
776
1200
|
```typescript
|
|
777
|
-
/**
|
|
778
|
-
* Human Checkpoint definition - human decision points in automation
|
|
779
|
-
*
|
|
780
|
-
* Represents where human judgment is deployed in the automation landscape.
|
|
781
|
-
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
782
|
-
*
|
|
783
|
-
* BREAKING CHANGES (2025-11-30):
|
|
1201
|
+
/**
|
|
1202
|
+
* Human Checkpoint definition - human decision points in automation
|
|
1203
|
+
*
|
|
1204
|
+
* Represents where human judgment is deployed in the automation landscape.
|
|
1205
|
+
* Tasks with matching command_queue_group are routed to this checkpoint.
|
|
1206
|
+
*
|
|
1207
|
+
* BREAKING CHANGES (2025-11-30):
|
|
784
1208
|
* - Now extends ResourceDefinition (inherits: resourceId, name, description, version, type, status, links, category)
|
|
785
|
-
* - Field renames: `id` -> `resourceId` (inherited)
|
|
786
|
-
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
787
|
-
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
788
|
-
* - New required field: `type: 'human'` (inherited) - resource type discriminator
|
|
789
|
-
*
|
|
790
|
-
* @example
|
|
791
|
-
* {
|
|
792
|
-
* resourceId: 'sales-approval',
|
|
793
|
-
* type: 'human',
|
|
794
|
-
* name: 'Sales Approval Queue',
|
|
795
|
-
* description: 'High-value order approvals for sales team',
|
|
796
|
-
* version: '1.0.0',
|
|
797
|
-
* status: 'prod',
|
|
798
|
-
* requestedBy: { agents: ['order-processor-agent'] },
|
|
799
|
-
* routesTo: { agents: ['order-fulfillment-agent'] }
|
|
800
|
-
* }
|
|
801
|
-
*/
|
|
802
|
-
export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
803
|
-
/** Resource type discriminator (narrowed from base union) */
|
|
804
|
-
type: 'human'
|
|
805
|
-
|
|
806
|
-
/** Resources that create tasks for this checkpoint */
|
|
807
|
-
requestedBy?: {
|
|
808
|
-
/** Agent resourceIds that request approval here */
|
|
809
|
-
agents?: string[]
|
|
810
|
-
/** Workflow resourceIds that request approval here */
|
|
811
|
-
workflows?: string[]
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
/** Resources that receive approved decisions */
|
|
815
|
-
routesTo?: {
|
|
816
|
-
/** Agent resourceIds that handle approved tasks */
|
|
817
|
-
agents?: string[]
|
|
818
|
-
/** Workflow resourceIds that handle approved tasks */
|
|
819
|
-
workflows?: string[]
|
|
820
|
-
}
|
|
1209
|
+
* - Field renames: `id` -> `resourceId` (inherited)
|
|
1210
|
+
* - description is now REQUIRED (was optional) - organizations must add description to all human checkpoints
|
|
1211
|
+
* - New required field: `version` (inherited) - organizations must add version to all human checkpoints
|
|
1212
|
+
* - New required field: `type: 'human'` (inherited) - resource type discriminator
|
|
1213
|
+
*
|
|
1214
|
+
* @example
|
|
1215
|
+
* {
|
|
1216
|
+
* resourceId: 'sales-approval',
|
|
1217
|
+
* type: 'human',
|
|
1218
|
+
* name: 'Sales Approval Queue',
|
|
1219
|
+
* description: 'High-value order approvals for sales team',
|
|
1220
|
+
* version: '1.0.0',
|
|
1221
|
+
* status: 'prod',
|
|
1222
|
+
* requestedBy: { agents: ['order-processor-agent'] },
|
|
1223
|
+
* routesTo: { agents: ['order-fulfillment-agent'] }
|
|
1224
|
+
* }
|
|
1225
|
+
*/
|
|
1226
|
+
export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
1227
|
+
/** Resource type discriminator (narrowed from base union) */
|
|
1228
|
+
type: 'human'
|
|
1229
|
+
|
|
1230
|
+
/** Resources that create tasks for this checkpoint */
|
|
1231
|
+
requestedBy?: {
|
|
1232
|
+
/** Agent resourceIds that request approval here */
|
|
1233
|
+
agents?: string[]
|
|
1234
|
+
/** Workflow resourceIds that request approval here */
|
|
1235
|
+
workflows?: string[]
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
/** Resources that receive approved decisions */
|
|
1239
|
+
routesTo?: {
|
|
1240
|
+
/** Agent resourceIds that handle approved tasks */
|
|
1241
|
+
agents?: string[]
|
|
1242
|
+
/** Workflow resourceIds that handle approved tasks */
|
|
1243
|
+
workflows?: string[]
|
|
1244
|
+
}
|
|
821
1245
|
}
|
|
822
1246
|
```
|
|
823
1247
|
|
|
@@ -835,6 +1259,11 @@ export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
|
835
1259
|
export interface DeploymentSpec {
|
|
836
1260
|
/** Deployment version (semver) */
|
|
837
1261
|
version: string
|
|
1262
|
+
/** Optional Organization Model governance catalog used for OM-code validation */
|
|
1263
|
+
organizationModel?: {
|
|
1264
|
+
systems?: OrganizationModelSystems
|
|
1265
|
+
resources?: OrganizationModelResources
|
|
1266
|
+
}
|
|
838
1267
|
/** Workflow definitions */
|
|
839
1268
|
workflows?: WorkflowDefinition[]
|
|
840
1269
|
/** Agent definitions */
|
|
@@ -1155,6 +1584,9 @@ export const DealTaskIdParamsSchema = z.object({
|
|
|
1155
1584
|
export const ListDealsQuerySchema = z
|
|
1156
1585
|
.object({
|
|
1157
1586
|
stage: DealStageSchema.optional(),
|
|
1587
|
+
list: UuidSchema.optional(),
|
|
1588
|
+
batch: z.string().trim().min(1).max(255).optional(),
|
|
1589
|
+
staleSince: z.string().datetime().optional(),
|
|
1158
1590
|
search: z.string().optional(),
|
|
1159
1591
|
limit: z.coerce.number().int().positive().default(50),
|
|
1160
1592
|
offset: z.coerce.number().int().min(0).default(0)
|
|
@@ -1300,6 +1732,7 @@ export const DealListItemSchema = z.object({
|
|
|
1300
1732
|
// acq_deals columns
|
|
1301
1733
|
id: z.string(),
|
|
1302
1734
|
organization_id: z.string(),
|
|
1735
|
+
client_id: z.string().nullable().optional(),
|
|
1303
1736
|
contact_id: z.string().nullable(),
|
|
1304
1737
|
contact_email: z.string(),
|
|
1305
1738
|
pipeline_key: z.string(),
|
|
@@ -1348,7 +1781,8 @@ export const DealListResponseSchema = z.object({
|
|
|
1348
1781
|
* Additive fields keep existing DealListItem callers compatible.
|
|
1349
1782
|
*/
|
|
1350
1783
|
export const DealDetailResponseSchema = DealListItemSchema.extend({
|
|
1351
|
-
conversation: DealConversationSchema
|
|
1784
|
+
conversation: DealConversationSchema,
|
|
1785
|
+
lineage: DealLineageSchema.optional()
|
|
1352
1786
|
})
|
|
1353
1787
|
```
|
|
1354
1788
|
|
|
@@ -1437,6 +1871,10 @@ export const DealSchemas = {
|
|
|
1437
1871
|
DealSummaryResponse: DealSummaryResponseSchema,
|
|
1438
1872
|
DealLookupResponse: DealLookupResponseSchema,
|
|
1439
1873
|
ConversationMessage: ConversationMessageSchema,
|
|
1874
|
+
DealLineageListRef: DealLineageListRefSchema,
|
|
1875
|
+
DealLineageProjectRef: DealLineageProjectRefSchema,
|
|
1876
|
+
DealLineageClientRef: DealLineageClientRefSchema,
|
|
1877
|
+
DealLineage: DealLineageSchema,
|
|
1440
1878
|
DealDetailResponse: DealDetailResponseSchema,
|
|
1441
1879
|
DealNoteResponse: DealNoteResponseSchema,
|
|
1442
1880
|
DealNoteListResponse: DealNoteListResponseSchema,
|
|
@@ -2093,6 +2531,7 @@ export const ListContactsQuerySchema = z
|
|
|
2093
2531
|
export const CreateCompanyRequestSchema = z
|
|
2094
2532
|
.object({
|
|
2095
2533
|
name: z.string().trim().min(1).max(255),
|
|
2534
|
+
clientId: UuidSchema.nullable().optional(),
|
|
2096
2535
|
domain: z.string().trim().min(1).max(255).optional(),
|
|
2097
2536
|
linkedinUrl: z.string().trim().url().optional(),
|
|
2098
2537
|
website: z.string().trim().url().optional(),
|
|
@@ -2115,6 +2554,7 @@ export const CreateCompanyRequestSchema = z
|
|
|
2115
2554
|
export const UpdateCompanyRequestSchema = z
|
|
2116
2555
|
.object({
|
|
2117
2556
|
name: z.string().trim().min(1).max(255).optional(),
|
|
2557
|
+
clientId: UuidSchema.nullable().optional(),
|
|
2118
2558
|
domain: z.string().trim().min(1).max(255).optional(),
|
|
2119
2559
|
linkedinUrl: z.string().trim().url().optional(),
|
|
2120
2560
|
website: z.string().trim().url().optional(),
|
|
@@ -2136,6 +2576,7 @@ export const UpdateCompanyRequestSchema = z
|
|
|
2136
2576
|
.refine(
|
|
2137
2577
|
(data) =>
|
|
2138
2578
|
data.name !== undefined ||
|
|
2579
|
+
data.clientId !== undefined ||
|
|
2139
2580
|
data.domain !== undefined ||
|
|
2140
2581
|
data.linkedinUrl !== undefined ||
|
|
2141
2582
|
data.website !== undefined ||
|
|
@@ -2164,6 +2605,7 @@ export const UpdateCompanyRequestSchema = z
|
|
|
2164
2605
|
export const CreateContactRequestSchema = z
|
|
2165
2606
|
.object({
|
|
2166
2607
|
email: z.string().trim().email(),
|
|
2608
|
+
clientId: UuidSchema.nullable().optional(),
|
|
2167
2609
|
companyId: UuidSchema.optional(),
|
|
2168
2610
|
firstName: z.string().trim().min(1).max(255).optional(),
|
|
2169
2611
|
lastName: z.string().trim().min(1).max(255).optional(),
|
|
@@ -2183,6 +2625,7 @@ export const CreateContactRequestSchema = z
|
|
|
2183
2625
|
export const UpdateContactRequestSchema = z
|
|
2184
2626
|
.object({
|
|
2185
2627
|
companyId: UuidSchema.optional(),
|
|
2628
|
+
clientId: UuidSchema.nullable().optional(),
|
|
2186
2629
|
emailValid: AcqEmailValidSchema.optional(),
|
|
2187
2630
|
firstName: z.string().trim().min(1).max(255).optional(),
|
|
2188
2631
|
lastName: z.string().trim().min(1).max(255).optional(),
|
|
@@ -2200,6 +2643,7 @@ export const UpdateContactRequestSchema = z
|
|
|
2200
2643
|
.refine(
|
|
2201
2644
|
(data) =>
|
|
2202
2645
|
data.companyId !== undefined ||
|
|
2646
|
+
data.clientId !== undefined ||
|
|
2203
2647
|
data.emailValid !== undefined ||
|
|
2204
2648
|
data.firstName !== undefined ||
|
|
2205
2649
|
data.lastName !== undefined ||
|
|
@@ -2224,6 +2668,7 @@ export const UpdateContactRequestSchema = z
|
|
|
2224
2668
|
export const AcqCompanyResponseSchema = z.object({
|
|
2225
2669
|
id: z.string(),
|
|
2226
2670
|
organizationId: z.string(),
|
|
2671
|
+
clientId: z.string().nullable().optional(),
|
|
2227
2672
|
name: z.string(),
|
|
2228
2673
|
domain: z.string().nullable(),
|
|
2229
2674
|
linkedinUrl: z.string().nullable(),
|
|
@@ -2290,6 +2735,7 @@ export const AcqContactCompanySummarySchema = z.object({
|
|
|
2290
2735
|
export const AcqContactResponseSchema = z.object({
|
|
2291
2736
|
id: z.string(),
|
|
2292
2737
|
organizationId: z.string(),
|
|
2738
|
+
clientId: z.string().nullable().optional(),
|
|
2293
2739
|
companyId: z.string().nullable(),
|
|
2294
2740
|
email: z.string(),
|
|
2295
2741
|
emailValid: AcqEmailValidSchema.nullable(),
|
|
@@ -2511,13 +2957,15 @@ export const AcqListSchemas = {
|
|
|
2511
2957
|
BuildPlanSnapshotStep: BuildPlanSnapshotStepSchema,
|
|
2512
2958
|
AcqListMetadata: AcqListMetadataSchema,
|
|
2513
2959
|
LeadGenStageKey: LeadGenStageKeySchema,
|
|
2514
|
-
|
|
2960
|
+
LeadGenActionKey: LeadGenActionKeySchema,
|
|
2515
2961
|
ProcessingStageStatus: ProcessingStageStatusSchema,
|
|
2516
2962
|
ProcessingState: ProcessingStateSchema,
|
|
2517
2963
|
ListStageCounts: ListStageCountsSchema,
|
|
2518
2964
|
ListTelemetry: ListTelemetrySchema,
|
|
2519
2965
|
|
|
2520
2966
|
// Requests
|
|
2967
|
+
ListReadQuery: ListReadQuerySchema,
|
|
2968
|
+
GetListQuery: GetListQuerySchema,
|
|
2521
2969
|
CreateListRequest: CreateListRequestSchema,
|
|
2522
2970
|
UpdateListRequest: UpdateListRequestSchema,
|
|
2523
2971
|
UpdateListStatusRequest: UpdateListStatusRequestSchema,
|
|
@@ -2529,7 +2977,11 @@ export const AcqListSchemas = {
|
|
|
2529
2977
|
|
|
2530
2978
|
// Responses
|
|
2531
2979
|
AcqListResponse: AcqListResponseSchema,
|
|
2980
|
+
AcqListDetailResponse: AcqListDetailResponseSchema,
|
|
2532
2981
|
AcqListListResponse: AcqListListResponseSchema,
|
|
2982
|
+
AcqListDealRef: AcqListDealRefSchema,
|
|
2983
|
+
AcqListLineage: AcqListLineageSchema,
|
|
2984
|
+
AcqListStatusResponse: AcqListStatusResponseSchema,
|
|
2533
2985
|
ListTelemetryResponse: ListTelemetryResponseSchema,
|
|
2534
2986
|
ListTelemetryListResponse: ListTelemetryListResponseSchema,
|
|
2535
2987
|
ListExecutionsResponse: ListExecutionsResponseSchema,
|
|
@@ -3329,15 +3781,23 @@ export type ListToolMap = {
|
|
|
3329
3781
|
### `KnowledgeLinkSchema`
|
|
3330
3782
|
|
|
3331
3783
|
```typescript
|
|
3332
|
-
export const KnowledgeLinkSchema = z
|
|
3333
|
-
|
|
3334
|
-
|
|
3784
|
+
export const KnowledgeLinkSchema = z
|
|
3785
|
+
.union([CanonicalKnowledgeLinkSchema, LegacyKnowledgeLinkSchema])
|
|
3786
|
+
.transform((link) => {
|
|
3787
|
+
const target = 'target' in link ? link.target : targetFromNodeId(link.nodeId)
|
|
3788
|
+
return {
|
|
3789
|
+
target,
|
|
3790
|
+
nodeId: nodeIdFromTarget(target)
|
|
3791
|
+
}
|
|
3792
|
+
})
|
|
3335
3793
|
```
|
|
3336
3794
|
|
|
3337
3795
|
### `OrgKnowledgeKindSchema`
|
|
3338
3796
|
|
|
3339
3797
|
```typescript
|
|
3340
|
-
export const OrgKnowledgeKindSchema = z
|
|
3798
|
+
export const OrgKnowledgeKindSchema = z
|
|
3799
|
+
.enum(['playbook', 'strategy', 'reference'])
|
|
3800
|
+
.meta({ label: 'Knowledge kind', color: 'grape' })
|
|
3341
3801
|
```
|
|
3342
3802
|
|
|
3343
3803
|
### `OrgKnowledgeNodeSchema`
|
|
@@ -3349,6 +3809,8 @@ export const OrgKnowledgeNodeSchema = z.object({
|
|
|
3349
3809
|
title: z.string().trim().min(1).max(200),
|
|
3350
3810
|
summary: z.string().trim().min(1).max(1000),
|
|
3351
3811
|
icon: IconNameSchema.optional(),
|
|
3812
|
+
/** Canonical documentation URL when body content is a local summary. */
|
|
3813
|
+
externalUrl: z.string().trim().url().max(500).optional(),
|
|
3352
3814
|
/** Raw MDX string. Phase 2 will introduce a structured block format. */
|
|
3353
3815
|
body: z.string().trim().min(1),
|
|
3354
3816
|
/**
|
|
@@ -3356,12 +3818,8 @@ export const OrgKnowledgeNodeSchema = z.object({
|
|
|
3356
3818
|
* Each link emits a `governs` edge: knowledge-node -> target node.
|
|
3357
3819
|
*/
|
|
3358
3820
|
links: z.array(KnowledgeLinkSchema).default([]),
|
|
3359
|
-
/**
|
|
3360
|
-
|
|
3361
|
-
/** Domain key used to derive fast graph->skill registries. */
|
|
3362
|
-
domain: KnowledgeDomainBindingSchema.optional(),
|
|
3363
|
-
/** Identifiers of the roles or members who own this knowledge node. */
|
|
3364
|
-
ownerIds: z.array(ModelIdSchema).default([]),
|
|
3821
|
+
/** Role identifiers that own this knowledge node. */
|
|
3822
|
+
ownerIds: z.array(RoleIdSchema.meta({ ref: 'role' })).default([]),
|
|
3365
3823
|
/** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
|
|
3366
3824
|
updatedAt: z.string().trim().min(1).max(50)
|
|
3367
3825
|
})
|
|
@@ -3370,9 +3828,7 @@ export const OrgKnowledgeNodeSchema = z.object({
|
|
|
3370
3828
|
### `KnowledgeDomainSchema`
|
|
3371
3829
|
|
|
3372
3830
|
```typescript
|
|
3373
|
-
export const KnowledgeDomainSchema = z.
|
|
3374
|
-
nodes: z.array(OrgKnowledgeNodeSchema).default([])
|
|
3375
|
-
})
|
|
3831
|
+
export const KnowledgeDomainSchema = z.record(ModelIdSchema, OrgKnowledgeNodeSchema).default({})
|
|
3376
3832
|
```
|
|
3377
3833
|
|
|
3378
3834
|
### `OrgKnowledgeNode`
|