@elevasis/core 0.10.0 → 0.11.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.
Files changed (43) hide show
  1. package/dist/index.d.ts +67 -159
  2. package/dist/index.js +321 -613
  3. package/dist/organization-model/index.d.ts +67 -159
  4. package/dist/organization-model/index.js +321 -613
  5. package/dist/test-utils/index.d.ts +17 -45
  6. package/dist/test-utils/index.js +254 -600
  7. package/package.json +1 -1
  8. package/src/__tests__/template-core-compatibility.test.ts +73 -91
  9. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +62 -148
  10. package/src/organization-model/README.md +101 -97
  11. package/src/organization-model/__tests__/domains/resource-mappings.test.ts +24 -93
  12. package/src/organization-model/__tests__/graph.test.ts +82 -894
  13. package/src/organization-model/__tests__/resolve.test.ts +59 -690
  14. package/src/organization-model/__tests__/schema.test.ts +83 -407
  15. package/src/organization-model/defaults.ts +276 -141
  16. package/src/organization-model/domains/features.ts +31 -22
  17. package/src/organization-model/foundation.ts +42 -54
  18. package/src/organization-model/graph/build.ts +42 -217
  19. package/src/organization-model/graph/index.ts +4 -4
  20. package/src/organization-model/graph/link.ts +10 -0
  21. package/src/organization-model/graph/schema.ts +21 -16
  22. package/src/organization-model/graph/types.ts +10 -10
  23. package/src/organization-model/helpers.ts +74 -0
  24. package/src/organization-model/index.ts +7 -7
  25. package/src/organization-model/organization-graph.mdx +89 -272
  26. package/src/organization-model/organization-model.mdx +149 -320
  27. package/src/organization-model/published.ts +15 -15
  28. package/src/organization-model/resolve.ts +8 -33
  29. package/src/organization-model/schema.ts +63 -205
  30. package/src/organization-model/types.ts +12 -11
  31. package/src/platform/registry/__tests__/command-view.test.ts +6 -5
  32. package/src/platform/registry/__tests__/resource-link.test.ts +30 -0
  33. package/src/platform/registry/__tests__/resource-registry.integration.test.ts +15 -15
  34. package/src/platform/registry/command-view.ts +10 -12
  35. package/src/platform/registry/index.ts +13 -8
  36. package/src/platform/registry/resource-link.ts +32 -0
  37. package/src/platform/registry/resource-registry.ts +12 -10
  38. package/src/platform/registry/serialization.ts +56 -73
  39. package/src/platform/registry/serialized-types.ts +17 -12
  40. package/src/platform/registry/types.ts +14 -43
  41. package/src/reference/_generated/contracts.md +62 -148
  42. package/src/reference/glossary.md +71 -105
  43. package/src/platform/registry/domains.ts +0 -165
@@ -1,165 +0,0 @@
1
- /**
2
- * Standard Domain Definitions
3
- * Centralized domain constants and definitions for all organization resources.
4
- */
5
-
6
- import type { DomainDefinition } from './types'
7
-
8
- // ============================================================================
9
- // Standard Domain IDs
10
- // ============================================================================
11
-
12
- export const DOMAINS = {
13
- // Business domains
14
- INBOUND_PIPELINE: 'inbound-pipeline',
15
- LEAD_GEN_PIPELINE: 'lead-gen-pipeline',
16
- SUPPORT: 'support',
17
- CLIENT_SUPPORT: 'client-support',
18
- DELIVERY: 'delivery',
19
- OPERATIONS: 'operations',
20
- FINANCE: 'finance',
21
- EXECUTIVE: 'executive',
22
- INSTANTLY: 'instantly',
23
-
24
- // Technical domains
25
- TESTING: 'testing',
26
- INTERNAL: 'internal',
27
- INTEGRATION: 'integration',
28
- UTILITY: 'utility',
29
- DIAGNOSTIC: 'diagnostic'
30
- } as const
31
-
32
- /**
33
- * ResourceDomain - Strongly typed domain identifier
34
- * Use this type for all domain references to ensure compile-time validation.
35
- */
36
- export type ResourceDomain = (typeof DOMAINS)[keyof typeof DOMAINS]
37
-
38
- // ============================================================================
39
- // Domain Definitions
40
- // ============================================================================
41
-
42
- export const INBOUND_PIPELINE_DOMAIN: DomainDefinition = {
43
- id: DOMAINS.INBOUND_PIPELINE,
44
- name: 'Inbound Pipeline',
45
- description: 'End-to-end inbound client acquisition from first reply to onboarding',
46
- color: 'blue'
47
- }
48
-
49
- export const LEAD_GEN_PIPELINE_DOMAIN: DomainDefinition = {
50
- id: DOMAINS.LEAD_GEN_PIPELINE,
51
- name: 'Lead Gen Pipeline',
52
- description: 'Lead scraping, enrichment, qualification, and personalization',
53
- color: 'cyan'
54
- }
55
-
56
- export const SUPPORT_DOMAIN: DomainDefinition = {
57
- id: DOMAINS.SUPPORT,
58
- name: 'Customer Support',
59
- description: 'Ticket triage, knowledge base, escalations',
60
- color: 'green'
61
- }
62
-
63
- export const CLIENT_SUPPORT_DOMAIN: DomainDefinition = {
64
- id: DOMAINS.CLIENT_SUPPORT,
65
- name: 'Client Support',
66
- description: 'Client change requests, bug reports, and feature requests',
67
- color: 'teal'
68
- }
69
-
70
- export const DELIVERY_DOMAIN: DomainDefinition = {
71
- id: DOMAINS.DELIVERY,
72
- name: 'Client Delivery',
73
- description: 'Project execution and milestone tracking',
74
- color: 'orange'
75
- }
76
-
77
- export const OPERATIONS_DOMAIN: DomainDefinition = {
78
- id: DOMAINS.OPERATIONS,
79
- name: 'Operations',
80
- description: 'Internal business operations and administration',
81
- color: 'violet'
82
- }
83
-
84
- export const FINANCE_DOMAIN: DomainDefinition = {
85
- id: DOMAINS.FINANCE,
86
- name: 'Finance',
87
- description: 'Billing, invoicing, and financial operations',
88
- color: 'pink'
89
- }
90
-
91
- export const EXECUTIVE_DOMAIN: DomainDefinition = {
92
- id: DOMAINS.EXECUTIVE,
93
- name: 'Executive Operations',
94
- description: 'High-level business orchestration and decision-making',
95
- color: 'indigo'
96
- }
97
-
98
- export const TESTING_DOMAIN: DomainDefinition = {
99
- id: DOMAINS.TESTING,
100
- name: 'Testing',
101
- description: 'Test resources and development workflows',
102
- color: 'gray'
103
- }
104
-
105
- export const INTERNAL_DOMAIN: DomainDefinition = {
106
- id: DOMAINS.INTERNAL,
107
- name: 'Internal',
108
- description: 'Internal platform resources',
109
- color: 'dark'
110
- }
111
-
112
- export const INTEGRATION_DOMAIN: DomainDefinition = {
113
- id: DOMAINS.INTEGRATION,
114
- name: 'Integration',
115
- description: 'External service integrations',
116
- color: 'teal'
117
- }
118
-
119
- export const INSTANTLY_DOMAIN: DomainDefinition = {
120
- id: DOMAINS.INSTANTLY,
121
- name: 'Instantly Toolkit',
122
- description: 'Instantly campaign creation, analytics, and optimization',
123
- color: 'lime'
124
- }
125
-
126
- export const UTILITY_DOMAIN: DomainDefinition = {
127
- id: DOMAINS.UTILITY,
128
- name: 'Utility',
129
- description: 'Utility workflows for maintenance and diagnostics',
130
- color: 'grape'
131
- }
132
-
133
- export const DIAGNOSTIC_DOMAIN: DomainDefinition = {
134
- id: DOMAINS.DIAGNOSTIC,
135
- name: 'Diagnostic',
136
- description: 'Diagnostic workflows for testing integrations and services',
137
- color: 'yellow'
138
- }
139
-
140
- /**
141
- * Domain lookup map for O(1) access during serialization
142
- */
143
- export const DOMAIN_MAP: Record<ResourceDomain, DomainDefinition> = {
144
- [DOMAINS.INBOUND_PIPELINE]: INBOUND_PIPELINE_DOMAIN,
145
- [DOMAINS.LEAD_GEN_PIPELINE]: LEAD_GEN_PIPELINE_DOMAIN,
146
- [DOMAINS.SUPPORT]: SUPPORT_DOMAIN,
147
- [DOMAINS.CLIENT_SUPPORT]: CLIENT_SUPPORT_DOMAIN,
148
- [DOMAINS.DELIVERY]: DELIVERY_DOMAIN,
149
- [DOMAINS.OPERATIONS]: OPERATIONS_DOMAIN,
150
- [DOMAINS.FINANCE]: FINANCE_DOMAIN,
151
- [DOMAINS.EXECUTIVE]: EXECUTIVE_DOMAIN,
152
- [DOMAINS.TESTING]: TESTING_DOMAIN,
153
- [DOMAINS.INTERNAL]: INTERNAL_DOMAIN,
154
- [DOMAINS.INSTANTLY]: INSTANTLY_DOMAIN,
155
- [DOMAINS.INTEGRATION]: INTEGRATION_DOMAIN,
156
- [DOMAINS.UTILITY]: UTILITY_DOMAIN,
157
- [DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
158
- }
159
-
160
- /**
161
- * Get domain definition by ID
162
- */
163
- export function getDomainDefinition(id: ResourceDomain): DomainDefinition {
164
- return DOMAIN_MAP[id]
165
- }