@elevasis/core 0.5.0 → 0.6.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 +427 -42
- package/dist/index.js +589 -47
- package/dist/organization-model/index.d.ts +427 -42
- package/dist/organization-model/index.js +589 -47
- package/package.json +3 -3
- package/src/__tests__/template-foundations-compatibility.test.ts +2 -2
- 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/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 +278 -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 +87 -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/supabase/database.types.ts +88 -0
- 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
|
@@ -2074,6 +2074,94 @@ export type Database = {
|
|
|
2074
2074
|
},
|
|
2075
2075
|
]
|
|
2076
2076
|
}
|
|
2077
|
+
reported_requests: {
|
|
2078
|
+
Row: {
|
|
2079
|
+
affected_page: string | null
|
|
2080
|
+
category: string
|
|
2081
|
+
context: Json | null
|
|
2082
|
+
created_at: string
|
|
2083
|
+
description: string
|
|
2084
|
+
evidence: Json | null
|
|
2085
|
+
id: string
|
|
2086
|
+
organization_id: string
|
|
2087
|
+
project_id: string | null
|
|
2088
|
+
reported_at: string
|
|
2089
|
+
reporter_id: string | null
|
|
2090
|
+
resolved_at: string | null
|
|
2091
|
+
severity: string
|
|
2092
|
+
source: string
|
|
2093
|
+
status: string
|
|
2094
|
+
task_id: string | null
|
|
2095
|
+
title: string
|
|
2096
|
+
type: string
|
|
2097
|
+
updated_at: string
|
|
2098
|
+
}
|
|
2099
|
+
Insert: {
|
|
2100
|
+
affected_page?: string | null
|
|
2101
|
+
category: string
|
|
2102
|
+
context?: Json | null
|
|
2103
|
+
created_at?: string
|
|
2104
|
+
description: string
|
|
2105
|
+
evidence?: Json | null
|
|
2106
|
+
id?: string
|
|
2107
|
+
organization_id: string
|
|
2108
|
+
project_id?: string | null
|
|
2109
|
+
reported_at?: string
|
|
2110
|
+
reporter_id?: string | null
|
|
2111
|
+
resolved_at?: string | null
|
|
2112
|
+
severity: string
|
|
2113
|
+
source: string
|
|
2114
|
+
status?: string
|
|
2115
|
+
task_id?: string | null
|
|
2116
|
+
title: string
|
|
2117
|
+
type: string
|
|
2118
|
+
updated_at?: string
|
|
2119
|
+
}
|
|
2120
|
+
Update: {
|
|
2121
|
+
affected_page?: string | null
|
|
2122
|
+
category?: string
|
|
2123
|
+
context?: Json | null
|
|
2124
|
+
created_at?: string
|
|
2125
|
+
description?: string
|
|
2126
|
+
evidence?: Json | null
|
|
2127
|
+
id?: string
|
|
2128
|
+
organization_id?: string
|
|
2129
|
+
project_id?: string | null
|
|
2130
|
+
reported_at?: string
|
|
2131
|
+
reporter_id?: string | null
|
|
2132
|
+
resolved_at?: string | null
|
|
2133
|
+
severity?: string
|
|
2134
|
+
source?: string
|
|
2135
|
+
status?: string
|
|
2136
|
+
task_id?: string | null
|
|
2137
|
+
title?: string
|
|
2138
|
+
type?: string
|
|
2139
|
+
updated_at?: string
|
|
2140
|
+
}
|
|
2141
|
+
Relationships: [
|
|
2142
|
+
{
|
|
2143
|
+
foreignKeyName: "reported_requests_organization_id_fkey"
|
|
2144
|
+
columns: ["organization_id"]
|
|
2145
|
+
isOneToOne: false
|
|
2146
|
+
referencedRelation: "organizations"
|
|
2147
|
+
referencedColumns: ["id"]
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
foreignKeyName: "reported_requests_project_id_fkey"
|
|
2151
|
+
columns: ["project_id"]
|
|
2152
|
+
isOneToOne: false
|
|
2153
|
+
referencedRelation: "prj_projects"
|
|
2154
|
+
referencedColumns: ["id"]
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
foreignKeyName: "reported_requests_task_id_fkey"
|
|
2158
|
+
columns: ["task_id"]
|
|
2159
|
+
isOneToOne: false
|
|
2160
|
+
referencedRelation: "prj_tasks"
|
|
2161
|
+
referencedColumns: ["id"]
|
|
2162
|
+
},
|
|
2163
|
+
]
|
|
2164
|
+
}
|
|
2077
2165
|
session_messages: {
|
|
2078
2166
|
Row: {
|
|
2079
2167
|
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
|