@elevasis/core 0.5.0 → 0.7.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 +428 -42
- package/dist/index.js +596 -47
- package/dist/organization-model/index.d.ts +428 -42
- package/dist/organization-model/index.js +596 -47
- package/package.json +4 -3
- package/src/__tests__/template-foundations-compatibility.test.ts +2 -2
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +1131 -0
- package/src/_gen/__tests__/scaffold-contracts.test.ts +53 -0
- package/src/_gen/scaffold-contracts.ts +45 -0
- package/src/business/acquisition/types.ts +2 -0
- package/src/commands/queue/types/task.ts +3 -3
- package/src/execution/engine/index.ts +8 -0
- package/src/execution/engine/tools/registry.ts +26 -24
- package/src/execution/engine/tools/tool-maps.ts +13 -9
- package/src/execution/engine/workflow/types.ts +2 -3
- package/src/index.ts +10 -0
- package/src/organization-model/README.md +16 -12
- package/src/organization-model/__tests__/defaults.test.ts +175 -0
- package/src/organization-model/__tests__/domains/customers.test.ts +295 -0
- package/src/organization-model/__tests__/domains/goals.test.ts +479 -0
- package/src/organization-model/__tests__/domains/identity.test.ts +279 -0
- package/src/organization-model/__tests__/domains/navigation.test.ts +212 -0
- package/src/organization-model/__tests__/domains/offerings.test.ts +419 -0
- package/src/organization-model/__tests__/domains/operations.test.ts +203 -0
- package/src/organization-model/__tests__/domains/resource-mappings.test.ts +362 -0
- package/src/organization-model/__tests__/domains/roles.test.ts +347 -0
- package/src/organization-model/__tests__/domains/statuses.test.ts +243 -0
- package/src/organization-model/__tests__/foundation.test.ts +3 -3
- package/src/organization-model/__tests__/resolve.test.ts +447 -3
- package/src/organization-model/__tests__/schema.test.ts +407 -0
- package/src/organization-model/contracts.ts +5 -5
- package/src/organization-model/defaults.ts +39 -16
- package/src/organization-model/domains/customers.ts +75 -0
- package/src/organization-model/domains/goals.ts +80 -0
- package/src/organization-model/domains/identity.ts +94 -0
- package/src/organization-model/domains/navigation.ts +43 -4
- package/src/organization-model/domains/offerings.ts +66 -0
- package/src/organization-model/domains/operations.ts +85 -0
- package/src/organization-model/domains/{delivery.ts → projects.ts} +6 -6
- package/src/organization-model/domains/{lead-gen.ts → prospecting.ts} +5 -5
- package/src/organization-model/domains/roles.ts +55 -0
- package/src/organization-model/domains/sales.ts +94 -0
- package/src/organization-model/domains/shared.ts +30 -1
- package/src/organization-model/domains/statuses.ts +130 -0
- package/src/organization-model/index.ts +3 -3
- package/src/organization-model/organization-graph.mdx +1 -0
- package/src/organization-model/organization-model.mdx +84 -19
- package/src/organization-model/published.ts +53 -8
- package/src/organization-model/schema.ts +67 -7
- package/src/organization-model/types.ts +31 -7
- package/src/platform/constants/versions.ts +1 -1
- package/src/platform/registry/types.ts +1 -1
- package/src/projects/api-schemas.ts +1 -0
- package/src/reference/_generated/contracts.md +116 -8
- package/src/reference/glossary.md +25 -4
- package/src/requests/__tests__/api-schemas.test.ts +277 -0
- package/src/requests/api-schemas.ts +83 -0
- package/src/requests/index.ts +1 -0
- package/src/scaffold-registry/__tests__/schema.test.ts +280 -0
- package/src/scaffold-registry/index.ts +194 -0
- package/src/scaffold-registry/schema.ts +144 -0
- package/src/supabase/database.types.ts +158 -6
- package/src/organization-model/domains/crm.ts +0 -46
- /package/src/business/{delivery → projects}/index.ts +0 -0
- /package/src/business/{delivery → projects}/types.ts +0 -0
- /package/src/business/{crm → sales}/api-schemas.ts +0 -0
|
@@ -1267,10 +1267,8 @@ export type Database = {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
deployments: {
|
|
1269
1269
|
Row: {
|
|
1270
|
-
compiled_docs: Json | null
|
|
1271
1270
|
created_at: string
|
|
1272
1271
|
deployment_version: string | null
|
|
1273
|
-
documentation: Json | null
|
|
1274
1272
|
error_message: string | null
|
|
1275
1273
|
id: string
|
|
1276
1274
|
organization_id: string
|
|
@@ -1282,10 +1280,8 @@ export type Database = {
|
|
|
1282
1280
|
updated_at: string
|
|
1283
1281
|
}
|
|
1284
1282
|
Insert: {
|
|
1285
|
-
compiled_docs?: Json | null
|
|
1286
1283
|
created_at?: string
|
|
1287
1284
|
deployment_version?: string | null
|
|
1288
|
-
documentation?: Json | null
|
|
1289
1285
|
error_message?: string | null
|
|
1290
1286
|
id?: string
|
|
1291
1287
|
organization_id: string
|
|
@@ -1297,10 +1293,8 @@ export type Database = {
|
|
|
1297
1293
|
updated_at?: string
|
|
1298
1294
|
}
|
|
1299
1295
|
Update: {
|
|
1300
|
-
compiled_docs?: Json | null
|
|
1301
1296
|
created_at?: string
|
|
1302
1297
|
deployment_version?: string | null
|
|
1303
|
-
documentation?: Json | null
|
|
1304
1298
|
error_message?: string | null
|
|
1305
1299
|
id?: string
|
|
1306
1300
|
organization_id?: string
|
|
@@ -1812,6 +1806,13 @@ export type Database = {
|
|
|
1812
1806
|
updated_at?: string
|
|
1813
1807
|
}
|
|
1814
1808
|
Relationships: [
|
|
1809
|
+
{
|
|
1810
|
+
foreignKeyName: "fk_milestones_project"
|
|
1811
|
+
columns: ["project_id"]
|
|
1812
|
+
isOneToOne: false
|
|
1813
|
+
referencedRelation: "prj_projects"
|
|
1814
|
+
referencedColumns: ["id"]
|
|
1815
|
+
},
|
|
1815
1816
|
{
|
|
1816
1817
|
foreignKeyName: "prj_milestones_organization_id_fkey"
|
|
1817
1818
|
columns: ["organization_id"]
|
|
@@ -1872,6 +1873,34 @@ export type Database = {
|
|
|
1872
1873
|
type?: string
|
|
1873
1874
|
}
|
|
1874
1875
|
Relationships: [
|
|
1876
|
+
{
|
|
1877
|
+
foreignKeyName: "fk_notes_created_by"
|
|
1878
|
+
columns: ["created_by"]
|
|
1879
|
+
isOneToOne: false
|
|
1880
|
+
referencedRelation: "users"
|
|
1881
|
+
referencedColumns: ["id"]
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
foreignKeyName: "fk_notes_milestone"
|
|
1885
|
+
columns: ["milestone_id"]
|
|
1886
|
+
isOneToOne: false
|
|
1887
|
+
referencedRelation: "prj_milestones"
|
|
1888
|
+
referencedColumns: ["id"]
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
foreignKeyName: "fk_notes_project"
|
|
1892
|
+
columns: ["project_id"]
|
|
1893
|
+
isOneToOne: false
|
|
1894
|
+
referencedRelation: "prj_projects"
|
|
1895
|
+
referencedColumns: ["id"]
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
foreignKeyName: "fk_notes_task"
|
|
1899
|
+
columns: ["task_id"]
|
|
1900
|
+
isOneToOne: false
|
|
1901
|
+
referencedRelation: "prj_tasks"
|
|
1902
|
+
referencedColumns: ["id"]
|
|
1903
|
+
},
|
|
1875
1904
|
{
|
|
1876
1905
|
foreignKeyName: "prj_notes_created_by_fkey"
|
|
1877
1906
|
columns: ["created_by"]
|
|
@@ -1962,6 +1991,20 @@ export type Database = {
|
|
|
1962
1991
|
updated_at?: string
|
|
1963
1992
|
}
|
|
1964
1993
|
Relationships: [
|
|
1994
|
+
{
|
|
1995
|
+
foreignKeyName: "fk_projects_company"
|
|
1996
|
+
columns: ["client_company_id"]
|
|
1997
|
+
isOneToOne: false
|
|
1998
|
+
referencedRelation: "acq_companies"
|
|
1999
|
+
referencedColumns: ["id"]
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
foreignKeyName: "fk_projects_deal"
|
|
2003
|
+
columns: ["deal_id"]
|
|
2004
|
+
isOneToOne: false
|
|
2005
|
+
referencedRelation: "acq_deals"
|
|
2006
|
+
referencedColumns: ["id"]
|
|
2007
|
+
},
|
|
1965
2008
|
{
|
|
1966
2009
|
foreignKeyName: "prj_projects_client_company_id_fkey"
|
|
1967
2010
|
columns: ["client_company_id"]
|
|
@@ -2044,6 +2087,27 @@ export type Database = {
|
|
|
2044
2087
|
updated_at?: string
|
|
2045
2088
|
}
|
|
2046
2089
|
Relationships: [
|
|
2090
|
+
{
|
|
2091
|
+
foreignKeyName: "fk_tasks_milestone"
|
|
2092
|
+
columns: ["milestone_id"]
|
|
2093
|
+
isOneToOne: false
|
|
2094
|
+
referencedRelation: "prj_milestones"
|
|
2095
|
+
referencedColumns: ["id"]
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
foreignKeyName: "fk_tasks_parent"
|
|
2099
|
+
columns: ["parent_task_id"]
|
|
2100
|
+
isOneToOne: false
|
|
2101
|
+
referencedRelation: "prj_tasks"
|
|
2102
|
+
referencedColumns: ["id"]
|
|
2103
|
+
},
|
|
2104
|
+
{
|
|
2105
|
+
foreignKeyName: "fk_tasks_project"
|
|
2106
|
+
columns: ["project_id"]
|
|
2107
|
+
isOneToOne: false
|
|
2108
|
+
referencedRelation: "prj_projects"
|
|
2109
|
+
referencedColumns: ["id"]
|
|
2110
|
+
},
|
|
2047
2111
|
{
|
|
2048
2112
|
foreignKeyName: "prj_tasks_milestone_id_fkey"
|
|
2049
2113
|
columns: ["milestone_id"]
|
|
@@ -2074,6 +2138,94 @@ export type Database = {
|
|
|
2074
2138
|
},
|
|
2075
2139
|
]
|
|
2076
2140
|
}
|
|
2141
|
+
reported_requests: {
|
|
2142
|
+
Row: {
|
|
2143
|
+
affected_page: string | null
|
|
2144
|
+
category: string
|
|
2145
|
+
context: Json | null
|
|
2146
|
+
created_at: string
|
|
2147
|
+
description: string
|
|
2148
|
+
evidence: Json | null
|
|
2149
|
+
id: string
|
|
2150
|
+
organization_id: string
|
|
2151
|
+
project_id: string | null
|
|
2152
|
+
reported_at: string
|
|
2153
|
+
reporter_id: string | null
|
|
2154
|
+
resolved_at: string | null
|
|
2155
|
+
severity: string
|
|
2156
|
+
source: string
|
|
2157
|
+
status: string
|
|
2158
|
+
task_id: string | null
|
|
2159
|
+
title: string
|
|
2160
|
+
type: string
|
|
2161
|
+
updated_at: string
|
|
2162
|
+
}
|
|
2163
|
+
Insert: {
|
|
2164
|
+
affected_page?: string | null
|
|
2165
|
+
category: string
|
|
2166
|
+
context?: Json | null
|
|
2167
|
+
created_at?: string
|
|
2168
|
+
description: string
|
|
2169
|
+
evidence?: Json | null
|
|
2170
|
+
id?: string
|
|
2171
|
+
organization_id: string
|
|
2172
|
+
project_id?: string | null
|
|
2173
|
+
reported_at?: string
|
|
2174
|
+
reporter_id?: string | null
|
|
2175
|
+
resolved_at?: string | null
|
|
2176
|
+
severity: string
|
|
2177
|
+
source: string
|
|
2178
|
+
status?: string
|
|
2179
|
+
task_id?: string | null
|
|
2180
|
+
title: string
|
|
2181
|
+
type: string
|
|
2182
|
+
updated_at?: string
|
|
2183
|
+
}
|
|
2184
|
+
Update: {
|
|
2185
|
+
affected_page?: string | null
|
|
2186
|
+
category?: string
|
|
2187
|
+
context?: Json | null
|
|
2188
|
+
created_at?: string
|
|
2189
|
+
description?: string
|
|
2190
|
+
evidence?: Json | null
|
|
2191
|
+
id?: string
|
|
2192
|
+
organization_id?: string
|
|
2193
|
+
project_id?: string | null
|
|
2194
|
+
reported_at?: string
|
|
2195
|
+
reporter_id?: string | null
|
|
2196
|
+
resolved_at?: string | null
|
|
2197
|
+
severity?: string
|
|
2198
|
+
source?: string
|
|
2199
|
+
status?: string
|
|
2200
|
+
task_id?: string | null
|
|
2201
|
+
title?: string
|
|
2202
|
+
type?: string
|
|
2203
|
+
updated_at?: string
|
|
2204
|
+
}
|
|
2205
|
+
Relationships: [
|
|
2206
|
+
{
|
|
2207
|
+
foreignKeyName: "reported_requests_organization_id_fkey"
|
|
2208
|
+
columns: ["organization_id"]
|
|
2209
|
+
isOneToOne: false
|
|
2210
|
+
referencedRelation: "organizations"
|
|
2211
|
+
referencedColumns: ["id"]
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
foreignKeyName: "reported_requests_project_id_fkey"
|
|
2215
|
+
columns: ["project_id"]
|
|
2216
|
+
isOneToOne: false
|
|
2217
|
+
referencedRelation: "prj_projects"
|
|
2218
|
+
referencedColumns: ["id"]
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
foreignKeyName: "reported_requests_task_id_fkey"
|
|
2222
|
+
columns: ["task_id"]
|
|
2223
|
+
isOneToOne: false
|
|
2224
|
+
referencedRelation: "prj_tasks"
|
|
2225
|
+
referencedColumns: ["id"]
|
|
2226
|
+
},
|
|
2227
|
+
]
|
|
2228
|
+
}
|
|
2077
2229
|
session_messages: {
|
|
2078
2230
|
Row: {
|
|
2079
2231
|
created_at: string | null
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
import { DescriptionSchema, DisplayMetadataSchema, ModelIdSchema, ReferenceIdsSchema } from './shared'
|
|
3
|
-
|
|
4
|
-
export const CrmStageSemanticClassSchema = z.enum(['open', 'active', 'nurturing', 'closed_won', 'closed_lost'])
|
|
5
|
-
|
|
6
|
-
export const CrmStageSchema = DisplayMetadataSchema.extend({
|
|
7
|
-
id: ModelIdSchema,
|
|
8
|
-
order: z.number().int().min(0),
|
|
9
|
-
semanticClass: CrmStageSemanticClassSchema,
|
|
10
|
-
surfaceIds: ReferenceIdsSchema,
|
|
11
|
-
resourceIds: ReferenceIdsSchema
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export const CrmPipelineSchema = z.object({
|
|
15
|
-
id: ModelIdSchema,
|
|
16
|
-
label: z.string().trim().min(1).max(120),
|
|
17
|
-
description: DescriptionSchema.optional(),
|
|
18
|
-
entityId: ModelIdSchema,
|
|
19
|
-
stages: z.array(CrmStageSchema).min(1)
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export const OrganizationModelCrmSchema = z.object({
|
|
23
|
-
entityId: ModelIdSchema,
|
|
24
|
-
defaultPipelineId: ModelIdSchema,
|
|
25
|
-
pipelines: z.array(CrmPipelineSchema).min(1)
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
export const DEFAULT_ORGANIZATION_MODEL_CRM: z.infer<typeof OrganizationModelCrmSchema> = {
|
|
29
|
-
entityId: 'crm.deal',
|
|
30
|
-
defaultPipelineId: 'default',
|
|
31
|
-
pipelines: [
|
|
32
|
-
{
|
|
33
|
-
id: 'default',
|
|
34
|
-
label: 'Default Pipeline',
|
|
35
|
-
entityId: 'crm.deal',
|
|
36
|
-
stages: [
|
|
37
|
-
{ id: 'interested', label: 'Interested', color: 'blue', order: 1, semanticClass: 'open', surfaceIds: ['crm.pipeline'], resourceIds: [] },
|
|
38
|
-
{ id: 'proposal', label: 'Proposal', color: 'yellow', order: 2, semanticClass: 'active', surfaceIds: ['crm.pipeline'], resourceIds: [] },
|
|
39
|
-
{ id: 'closing', label: 'Closing', color: 'lime', order: 3, semanticClass: 'active', surfaceIds: ['crm.pipeline'], resourceIds: [] },
|
|
40
|
-
{ id: 'closed_won', label: 'Closed Won', color: 'green', order: 4, semanticClass: 'closed_won', surfaceIds: ['crm.pipeline'], resourceIds: [] },
|
|
41
|
-
{ id: 'closed_lost', label: 'Closed Lost', color: 'red', order: 5, semanticClass: 'closed_lost', surfaceIds: ['crm.pipeline'], resourceIds: [] },
|
|
42
|
-
{ id: 'nurturing', label: 'Nurturing', color: 'grape', order: 6, semanticClass: 'nurturing', surfaceIds: ['crm.pipeline'], resourceIds: [] }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|