@elevasis/core 0.17.0 → 0.19.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 +82 -1
- package/dist/index.js +291 -171
- package/dist/knowledge/index.d.ts +43 -0
- package/dist/organization-model/index.d.ts +82 -1
- package/dist/organization-model/index.js +291 -171
- package/dist/test-utils/index.d.ts +41 -12
- package/dist/test-utils/index.js +291 -171
- package/package.json +2 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +78 -65
- package/src/auth/multi-tenancy/organizations/__tests__/api-schemas.test.ts +194 -0
- package/src/auth/multi-tenancy/organizations/api-schemas.ts +136 -128
- package/src/business/acquisition/api-schemas.test.ts +100 -2
- package/src/business/acquisition/api-schemas.ts +81 -43
- package/src/business/acquisition/build-templates.test.ts +212 -0
- package/src/business/acquisition/types.ts +21 -38
- package/src/execution/engine/index.ts +436 -434
- package/src/execution/engine/tools/integration/server/adapters/google-calendar/google-calendar-adapter.ts +428 -0
- package/src/execution/engine/tools/integration/server/adapters/google-calendar/index.ts +2 -0
- package/src/execution/engine/tools/lead-service-types.ts +51 -9
- package/src/execution/engine/tools/platform/acquisition/company-tools.ts +7 -6
- package/src/execution/engine/tools/platform/acquisition/contact-tools.ts +6 -5
- package/src/execution/engine/tools/platform/acquisition/types.ts +20 -9
- package/src/execution/engine/tools/registry.ts +700 -698
- package/src/execution/engine/tools/tool-maps.ts +10 -0
- package/src/execution/external/__tests__/api-schemas.test.ts +127 -0
- package/src/integrations/oauth/__tests__/provider-registry.test.ts +7 -6
- package/src/integrations/oauth/provider-registry.ts +74 -61
- package/src/integrations/oauth/server/credentials.ts +43 -39
- package/src/knowledge/__tests__/queries.test.ts +89 -0
- package/src/organization-model/__tests__/icons.test.ts +61 -0
- package/src/organization-model/__tests__/knowledge.test.ts +118 -1
- package/src/organization-model/__tests__/prospecting-ssot.test.ts +94 -0
- package/src/organization-model/defaults.ts +8 -0
- package/src/organization-model/domains/knowledge.ts +9 -0
- package/src/organization-model/domains/prospecting.ts +272 -226
- package/src/organization-model/domains/sales.ts +32 -25
- package/src/organization-model/icons.ts +3 -0
- package/src/organization-model/types.ts +9 -1
- package/src/platform/constants/versions.ts +1 -1
- package/src/platform/utils/__tests__/validation.test.ts +1084 -1083
- package/src/platform/utils/validation.ts +425 -425
- package/src/reference/_generated/contracts.md +78 -65
- package/src/server.ts +6 -0
- package/src/supabase/database.types.ts +6 -12
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
import { isProspectingBuildTemplateId } from '../../../../../business/acquisition/build-templates'
|
|
3
|
+
import {
|
|
4
|
+
CompanyProcessingStateSchema,
|
|
5
|
+
ContactProcessingStateSchema
|
|
6
|
+
} from '../../../../../business/acquisition/api-schemas'
|
|
3
7
|
import { EmailSchema } from '../../../../../platform/utils/validation'
|
|
4
8
|
|
|
5
9
|
// ============================================
|
|
@@ -46,7 +50,8 @@ export const CreateCompanyInputSchema = z.object({
|
|
|
46
50
|
locationCity: z.string().optional(),
|
|
47
51
|
locationState: z.string().optional(),
|
|
48
52
|
source: z.string().optional(),
|
|
49
|
-
batchId: z.string().optional()
|
|
53
|
+
batchId: z.string().optional(),
|
|
54
|
+
pipelineStatus: z.unknown().optional().describe('@deprecated Use processingState. Compatibility no-op.')
|
|
50
55
|
})
|
|
51
56
|
|
|
52
57
|
export const UpdateCompanyInputSchema = z.object({
|
|
@@ -61,13 +66,14 @@ export const UpdateCompanyInputSchema = z.object({
|
|
|
61
66
|
locationState: z.string().optional(),
|
|
62
67
|
category: z.string().optional(),
|
|
63
68
|
segment: z.string().optional(),
|
|
64
|
-
|
|
69
|
+
processingState: CompanyProcessingStateSchema.optional(),
|
|
70
|
+
pipelineStatus: z.unknown().optional().describe('@deprecated Use processingState. Compatibility no-op.'),
|
|
65
71
|
enrichmentData: z.record(z.string(), z.unknown()).optional(),
|
|
66
72
|
source: z.string().optional(),
|
|
67
73
|
batchId: z.string().optional(),
|
|
68
74
|
/** Track A: flat qualification score column (null until a scoring rubric is defined) */
|
|
69
75
|
qualificationScore: z.number().nullable().optional(),
|
|
70
|
-
/** Track A: flat qualification signals jsonb
|
|
76
|
+
/** Track A: flat qualification signals jsonb */
|
|
71
77
|
qualificationSignals: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
72
78
|
/** Track A: key identifying the rubric used for qualification */
|
|
73
79
|
qualificationRubricKey: z.string().nullable().optional()
|
|
@@ -86,7 +92,8 @@ export const ListCompaniesInputSchema = z.object({
|
|
|
86
92
|
category: z.string().optional(),
|
|
87
93
|
domain: z.string().optional().describe('Exact domain match filter'),
|
|
88
94
|
website: z.string().optional().describe('Exact website match filter'),
|
|
89
|
-
|
|
95
|
+
processingState: CompanyProcessingStateSchema.optional().describe('JSONB containment filter for processing state'),
|
|
96
|
+
pipelineStatus: z.unknown().optional().describe('@deprecated Use processingState. Compatibility no-op.'),
|
|
90
97
|
batchId: z.string().optional(),
|
|
91
98
|
status: z
|
|
92
99
|
.enum(['active', 'invalid'])
|
|
@@ -97,7 +104,7 @@ export const ListCompaniesInputSchema = z.object({
|
|
|
97
104
|
.optional()
|
|
98
105
|
.describe('Bypass default active-only filter to return all companies regardless of status'),
|
|
99
106
|
excludeColumns: z
|
|
100
|
-
.array(z.enum(['enrichmentData', '
|
|
107
|
+
.array(z.enum(['enrichmentData', 'processingState']))
|
|
101
108
|
.optional()
|
|
102
109
|
.describe('Exclude large JSONB columns from the response to reduce query size')
|
|
103
110
|
})
|
|
@@ -119,7 +126,8 @@ export const CompanyOutputSchema = z.object({
|
|
|
119
126
|
locationState: z.string().nullable(),
|
|
120
127
|
category: z.string().nullable(),
|
|
121
128
|
segment: z.string().nullable(),
|
|
122
|
-
|
|
129
|
+
processingState: CompanyProcessingStateSchema.nullable(),
|
|
130
|
+
pipelineStatus: z.unknown().nullable().describe('@deprecated Use processingState. Compatibility no-op.'),
|
|
123
131
|
enrichmentData: z.record(z.string(), z.unknown()).nullable(),
|
|
124
132
|
source: z.string().nullable(),
|
|
125
133
|
batchId: z.string().nullable().optional(),
|
|
@@ -143,7 +151,8 @@ export const CreateContactInputSchema = z.object({
|
|
|
143
151
|
title: z.string().optional(),
|
|
144
152
|
source: z.string().optional(),
|
|
145
153
|
sourceId: z.string().optional(),
|
|
146
|
-
batchId: z.string().optional()
|
|
154
|
+
batchId: z.string().optional(),
|
|
155
|
+
pipelineStatus: z.unknown().optional().describe('@deprecated Use processingState. Compatibility no-op.')
|
|
147
156
|
})
|
|
148
157
|
|
|
149
158
|
export const UpdateContactInputSchema = z.object({
|
|
@@ -157,7 +166,8 @@ export const UpdateContactInputSchema = z.object({
|
|
|
157
166
|
headline: z.string().optional(),
|
|
158
167
|
filterReason: z.string().optional(),
|
|
159
168
|
openingLine: z.string().optional(),
|
|
160
|
-
|
|
169
|
+
processingState: ContactProcessingStateSchema.optional(),
|
|
170
|
+
pipelineStatus: z.unknown().optional().describe('@deprecated Use processingState. Compatibility no-op.'),
|
|
161
171
|
enrichmentData: z.record(z.string(), z.unknown()).optional(),
|
|
162
172
|
status: z.enum(['active', 'invalid']).optional()
|
|
163
173
|
})
|
|
@@ -207,7 +217,8 @@ export const ContactOutputSchema = z.object({
|
|
|
207
217
|
openingLine: z.string().nullable(),
|
|
208
218
|
source: z.string().nullable(),
|
|
209
219
|
sourceId: z.string().nullable(),
|
|
210
|
-
|
|
220
|
+
processingState: ContactProcessingStateSchema.nullable(),
|
|
221
|
+
pipelineStatus: z.unknown().nullable().describe('@deprecated Use processingState. Compatibility no-op.'),
|
|
211
222
|
enrichmentData: z.record(z.string(), z.unknown()).nullable(),
|
|
212
223
|
batchId: z.string().nullable().optional(),
|
|
213
224
|
status: z.enum(['active', 'invalid']),
|