@elevasis/core 0.16.0 → 0.18.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.
@@ -195,6 +195,18 @@ export type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>
195
195
  export type OrgKnowledgeKind = z.infer<typeof OrgKnowledgeKindSchema>
196
196
  ```
197
197
 
198
+ ### `OrganizationModelIconToken`
199
+
200
+ ```typescript
201
+ export type OrganizationModelIconToken = z.infer<typeof OrganizationModelIconTokenSchema>
202
+ ```
203
+
204
+ ### `OrganizationModelBuiltinIconToken`
205
+
206
+ ```typescript
207
+ export type OrganizationModelBuiltinIconToken = z.infer<typeof OrganizationModelBuiltinIconTokenSchema>
208
+ ```
209
+
198
210
  ### `DeepPartial`
199
211
 
200
212
  ```typescript
@@ -835,73 +847,73 @@ export interface DeploymentSpec {
835
847
  ### `AcqCompany`
836
848
 
837
849
  ```typescript
838
- /**
839
- * Company record in the acquisition database.
840
- * Contains enriched company data from various sources.
841
- * Transformed from AcqCompanyRow with camelCase properties.
842
- */
843
- export interface AcqCompany {
844
- id: string
845
- organizationId: string
846
- name: string
847
- domain: string | null
848
- linkedinUrl: string | null
849
- website: string | null
850
- numEmployees: number | null
851
- foundedYear: number | null
852
- locationCity: string | null
853
- locationState: string | null
854
- category: string | null
855
- categoryPain: string | null
856
- segment: string | null
857
- pipelineStatus: CompanyPipelineStatus | null
858
- enrichmentData: CompanyEnrichmentData | null
859
- source: string | null
860
- batchId: string | null
861
- status: 'active' | 'invalid'
862
- verticalResearch: string | null
863
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
864
- qualificationScore: number | null
865
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
866
- qualificationSignals: Record<string, unknown> | null
867
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
868
- qualificationRubricKey: string | null
869
- createdAt: Date
870
- updatedAt: Date
850
+ /**
851
+ * Company record in the acquisition database.
852
+ * Contains enriched company data from various sources.
853
+ * Transformed from AcqCompanyRow with camelCase properties.
854
+ */
855
+ export interface AcqCompany {
856
+ id: string
857
+ organizationId: string
858
+ name: string
859
+ domain: string | null
860
+ linkedinUrl: string | null
861
+ website: string | null
862
+ numEmployees: number | null
863
+ foundedYear: number | null
864
+ locationCity: string | null
865
+ locationState: string | null
866
+ category: string | null
867
+ categoryPain: string | null
868
+ segment: string | null
869
+ pipelineStatus: CompanyPipelineStatus | null
870
+ enrichmentData: CompanyEnrichmentData | null
871
+ source: string | null
872
+ batchId: string | null
873
+ status: 'active' | 'invalid'
874
+ verticalResearch: string | null
875
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
876
+ qualificationScore: number | null
877
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
878
+ qualificationSignals: Record<string, unknown> | null
879
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
880
+ qualificationRubricKey: string | null
881
+ createdAt: Date
882
+ updatedAt: Date
871
883
  }
872
884
  ```
873
885
 
874
886
  ### `AcqContact`
875
887
 
876
888
  ```typescript
877
- /**
878
- * Contact record in the acquisition database.
879
- * Contains enriched contact data and personalization content.
880
- * Transformed from AcqContactRow with camelCase properties.
881
- */
882
- export interface AcqContact {
883
- id: string
884
- organizationId: string
885
- companyId: string | null
886
- email: string
887
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
888
- firstName: string | null
889
- lastName: string | null
890
- linkedinUrl: string | null
891
- title: string | null
892
- headline: string | null
893
- filterReason: string | null
894
- openingLine: string | null
895
- source: string | null
896
- sourceId: string | null
897
- pipelineStatus: ContactPipelineStatus | null
898
- enrichmentData: ContactEnrichmentData | null
899
- /** Attio Person record ID - set when contact responds and is added to CRM */
900
- attioPersonId: string | null
901
- batchId: string | null
902
- status: 'active' | 'invalid'
903
- createdAt: Date
904
- updatedAt: Date
889
+ /**
890
+ * Contact record in the acquisition database.
891
+ * Contains enriched contact data and personalization content.
892
+ * Transformed from AcqContactRow with camelCase properties.
893
+ */
894
+ export interface AcqContact {
895
+ id: string
896
+ organizationId: string
897
+ companyId: string | null
898
+ email: string
899
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
900
+ firstName: string | null
901
+ lastName: string | null
902
+ linkedinUrl: string | null
903
+ title: string | null
904
+ headline: string | null
905
+ filterReason: string | null
906
+ openingLine: string | null
907
+ source: string | null
908
+ sourceId: string | null
909
+ pipelineStatus: ContactPipelineStatus | null
910
+ enrichmentData: ContactEnrichmentData | null
911
+ /** Attio Person record ID - set when contact responds and is added to CRM */
912
+ attioPersonId: string | null
913
+ batchId: string | null
914
+ status: 'active' | 'invalid'
915
+ createdAt: Date
916
+ updatedAt: Date
905
917
  }
906
918
  ```
907
919
 
@@ -920,23 +932,23 @@ export type DealPriorityBucketKey = 'needs_response' | 'follow_up_due' | 'waitin
920
932
  ### `DealPriority`
921
933
 
922
934
  ```typescript
923
- export interface DealPriority {
924
- bucketKey: DealPriorityBucketKey
925
- rank: number
926
- label: string
927
- color: string
928
- reason: string
929
- latestActivityAt: string | null
930
- nextActionAt: string | null
935
+ export interface DealPriority {
936
+ bucketKey: DealPriorityBucketKey
937
+ rank: number
938
+ label: string
939
+ color: string
940
+ reason: string
941
+ latestActivityAt: string | null
942
+ nextActionAt: string | null
931
943
  }
932
944
  ```
933
945
 
934
946
  ### `KanbanStageConfig`
935
947
 
936
948
  ```typescript
937
- export interface KanbanStageConfig {
938
- color: string // Mantine color token (e.g. 'blue', 'teal')
939
- label?: string // Optional display label override
949
+ export interface KanbanStageConfig {
950
+ color: string // Mantine color token (e.g. 'blue', 'teal')
951
+ label?: string // Optional display label override
940
952
  }
941
953
  ```
942
954
 
@@ -949,44 +961,44 @@ export type KanbanBoardConfig = Partial<Record<DealStage, KanbanStageConfig>>
949
961
  ### `DealContact`
950
962
 
951
963
  ```typescript
952
- export interface DealContact {
953
- id: string
954
- first_name: string | null
955
- last_name: string | null
956
- email: string
957
- title: string | null
958
- headline: string | null
959
- linkedin_url: string | null
960
- pipeline_status: Record<string, unknown> | null
961
- enrichment_data: Record<string, unknown> | null
962
- company: {
963
- id: string
964
- name: string
965
- domain: string | null
966
- website: string | null
967
- linkedin_url: string | null
968
- segment: string | null
969
- category: string | null
970
- num_employees: number | null
971
- } | null
964
+ export interface DealContact {
965
+ id: string
966
+ first_name: string | null
967
+ last_name: string | null
968
+ email: string
969
+ title: string | null
970
+ headline: string | null
971
+ linkedin_url: string | null
972
+ pipeline_status: Record<string, unknown> | null
973
+ enrichment_data: Record<string, unknown> | null
974
+ company: {
975
+ id: string
976
+ name: string
977
+ domain: string | null
978
+ website: string | null
979
+ linkedin_url: string | null
980
+ segment: string | null
981
+ category: string | null
982
+ num_employees: number | null
983
+ } | null
972
984
  }
973
985
  ```
974
986
 
975
987
  ### `DealFilters`
976
988
 
977
989
  ```typescript
978
- export interface DealFilters {
979
- stage?: DealStage
980
- search?: string
981
- limit?: number
982
- offset?: number
990
+ export interface DealFilters {
991
+ stage?: DealStage
992
+ search?: string
993
+ limit?: number
994
+ offset?: number
983
995
  }
984
996
  ```
985
997
 
986
998
  ### `DealListItem`
987
999
 
988
1000
  ```typescript
989
- /** Deal list item with joined contact and company data */
1001
+ /** Deal list item with joined contact and company data */
990
1002
  export interface DealListItem extends AcqDealRow {
991
1003
  priority: DealPriority
992
1004
  ownership: 'us' | 'them' | null
@@ -1004,31 +1016,31 @@ export type DealDetail = DealListItem
1004
1016
  ### `AcqDealTaskKind`
1005
1017
 
1006
1018
  ```typescript
1007
- /** Task kind options for a deal task (human follow-up action type) */
1019
+ /** Task kind options for a deal task (human follow-up action type) */
1008
1020
  export type AcqDealTaskKind = 'call' | 'email' | 'meeting' | 'other'
1009
1021
  ```
1010
1022
 
1011
1023
  ### `AcqDealTask`
1012
1024
 
1013
1025
  ```typescript
1014
- /**
1015
- * A CRM to-do item attached to a deal representing a human follow-up action.
1016
- * Transformed from AcqDealTaskRow with camelCase properties.
1017
- */
1018
- export interface AcqDealTask {
1019
- id: string
1020
- organizationId: string
1021
- dealId: string
1022
- title: string
1023
- description: string | null
1024
- kind: AcqDealTaskKind
1025
- dueAt: string | null
1026
- assigneeUserId: string | null
1027
- completedAt: string | null
1028
- completedByUserId: string | null
1029
- createdAt: string
1030
- updatedAt: string
1031
- createdByUserId: string | null
1026
+ /**
1027
+ * A CRM to-do item attached to a deal representing a human follow-up action.
1028
+ * Transformed from AcqDealTaskRow with camelCase properties.
1029
+ */
1030
+ export interface AcqDealTask {
1031
+ id: string
1032
+ organizationId: string
1033
+ dealId: string
1034
+ title: string
1035
+ description: string | null
1036
+ kind: AcqDealTaskKind
1037
+ dueAt: string | null
1038
+ assigneeUserId: string | null
1039
+ completedAt: string | null
1040
+ completedByUserId: string | null
1041
+ createdAt: string
1042
+ updatedAt: string
1043
+ createdByUserId: string | null
1032
1044
  }
1033
1045
  ```
1034
1046
 
@@ -1107,190 +1119,190 @@ export const AcqDealTaskKindSchema = z.enum(['call', 'email', 'meeting', 'other'
1107
1119
  ### `DealIdParamsSchema`
1108
1120
 
1109
1121
  ```typescript
1110
- export const DealIdParamsSchema = z.object({
1111
- dealId: UuidSchema
1122
+ export const DealIdParamsSchema = z.object({
1123
+ dealId: UuidSchema
1112
1124
  })
1113
1125
  ```
1114
1126
 
1115
1127
  ### `DealTaskIdParamsSchema`
1116
1128
 
1117
1129
  ```typescript
1118
- export const DealTaskIdParamsSchema = z.object({
1119
- dealId: UuidSchema,
1120
- taskId: UuidSchema
1130
+ export const DealTaskIdParamsSchema = z.object({
1131
+ dealId: UuidSchema,
1132
+ taskId: UuidSchema
1121
1133
  })
1122
1134
  ```
1123
1135
 
1124
1136
  ### `ListDealsQuerySchema`
1125
1137
 
1126
1138
  ```typescript
1127
- export const ListDealsQuerySchema = z
1128
- .object({
1129
- stage: DealStageSchema.optional(),
1130
- search: z.string().optional(),
1131
- limit: z.coerce.number().int().positive().default(50),
1132
- offset: z.coerce.number().int().min(0).default(0)
1133
- })
1139
+ export const ListDealsQuerySchema = z
1140
+ .object({
1141
+ stage: DealStageSchema.optional(),
1142
+ search: z.string().optional(),
1143
+ limit: z.coerce.number().int().positive().default(50),
1144
+ offset: z.coerce.number().int().min(0).default(0)
1145
+ })
1134
1146
  .strict()
1135
1147
  ```
1136
1148
 
1137
1149
  ### `DealLookupQuerySchema`
1138
1150
 
1139
1151
  ```typescript
1140
- export const DealLookupQuerySchema = z
1141
- .object({
1142
- search: z.string().trim().min(1).max(200).optional(),
1143
- limit: z.coerce.number().int().min(1).max(25).default(10)
1144
- })
1152
+ export const DealLookupQuerySchema = z
1153
+ .object({
1154
+ search: z.string().trim().min(1).max(200).optional(),
1155
+ limit: z.coerce.number().int().min(1).max(25).default(10)
1156
+ })
1145
1157
  .strict()
1146
1158
  ```
1147
1159
 
1148
1160
  ### `ListDealTasksDueQuerySchema`
1149
1161
 
1150
1162
  ```typescript
1151
- export const ListDealTasksDueQuerySchema = z
1152
- .object({
1153
- window: z.enum(['overdue', 'today', 'today_and_overdue', 'upcoming']).optional(),
1154
- assigneeUserId: UuidSchema.optional()
1155
- })
1163
+ export const ListDealTasksDueQuerySchema = z
1164
+ .object({
1165
+ window: z.enum(['overdue', 'today', 'today_and_overdue', 'upcoming']).optional(),
1166
+ assigneeUserId: UuidSchema.optional()
1167
+ })
1156
1168
  .strict()
1157
1169
  ```
1158
1170
 
1159
1171
  ### `CreateDealNoteRequestSchema`
1160
1172
 
1161
1173
  ```typescript
1162
- export const CreateDealNoteRequestSchema = z
1163
- .object({
1164
- body: z.string().trim().min(1).max(10000)
1165
- })
1174
+ export const CreateDealNoteRequestSchema = z
1175
+ .object({
1176
+ body: z.string().trim().min(1).max(10000)
1177
+ })
1166
1178
  .strict()
1167
1179
  ```
1168
1180
 
1169
1181
  ### `CreateDealTaskRequestSchema`
1170
1182
 
1171
1183
  ```typescript
1172
- export const CreateDealTaskRequestSchema = z
1173
- .object({
1174
- title: z.string().trim().min(1).max(255),
1175
- description: z.string().nullable().optional(),
1176
- kind: AcqDealTaskKindSchema.optional(),
1177
- dueAt: z.string().datetime().nullable().optional(),
1178
- assigneeUserId: UuidSchema.nullable().optional()
1179
- })
1184
+ export const CreateDealTaskRequestSchema = z
1185
+ .object({
1186
+ title: z.string().trim().min(1).max(255),
1187
+ description: z.string().nullable().optional(),
1188
+ kind: AcqDealTaskKindSchema.optional(),
1189
+ dueAt: z.string().datetime().nullable().optional(),
1190
+ assigneeUserId: UuidSchema.nullable().optional()
1191
+ })
1180
1192
  .strict()
1181
1193
  ```
1182
1194
 
1183
1195
  ### `TransitionItemRequestSchema`
1184
1196
 
1185
1197
  ```typescript
1186
- export const TransitionItemRequestSchema = z
1187
- .object({
1188
- pipelineKey: z.string().min(1),
1189
- stageKey: z.string().min(1),
1190
- stateKey: z.string().nullable().optional(),
1191
- reason: z.string().optional(),
1192
- expectedUpdatedAt: z.string().datetime().optional()
1193
- })
1198
+ export const TransitionItemRequestSchema = z
1199
+ .object({
1200
+ pipelineKey: z.string().min(1),
1201
+ stageKey: z.string().min(1),
1202
+ stateKey: z.string().nullable().optional(),
1203
+ reason: z.string().optional(),
1204
+ expectedUpdatedAt: z.string().datetime().optional()
1205
+ })
1194
1206
  .strict()
1195
1207
  ```
1196
1208
 
1197
1209
  ### `ExecuteActionParamsSchema`
1198
1210
 
1199
1211
  ```typescript
1200
- export const ExecuteActionParamsSchema = z
1201
- .object({
1202
- dealId: UuidSchema,
1203
- actionKey: NonEmptyStringSchema
1204
- })
1212
+ export const ExecuteActionParamsSchema = z
1213
+ .object({
1214
+ dealId: UuidSchema,
1215
+ actionKey: NonEmptyStringSchema
1216
+ })
1205
1217
  .strict()
1206
1218
  ```
1207
1219
 
1208
1220
  ### `ExecuteActionRequestSchema`
1209
1221
 
1210
1222
  ```typescript
1211
- export const ExecuteActionRequestSchema = z
1212
- .object({
1213
- payload: z.record(z.string(), z.unknown()).optional()
1214
- })
1223
+ export const ExecuteActionRequestSchema = z
1224
+ .object({
1225
+ payload: z.record(z.string(), z.unknown()).optional()
1226
+ })
1215
1227
  .strict()
1216
1228
  ```
1217
1229
 
1218
1230
  ### `DealContactSummarySchema`
1219
1231
 
1220
1232
  ```typescript
1221
- /**
1222
- * Contact summary nested inside DealListItem / DealDetailResponse.
1223
- * Matches the joined shape returned by useDeals / useDealDetail Supabase queries.
1224
- */
1225
- export const DealContactSummarySchema = z.object({
1226
- id: z.string(),
1227
- first_name: z.string().nullable(),
1228
- last_name: z.string().nullable(),
1229
- email: z.string(),
1230
- title: z.string().nullable(),
1231
- headline: z.string().nullable(),
1232
- linkedin_url: z.string().nullable(),
1233
- pipeline_status: z.record(z.string(), z.unknown()).nullable(),
1234
- enrichment_data: z.record(z.string(), z.unknown()).nullable(),
1235
- company: z
1236
- .object({
1237
- id: z.string(),
1238
- name: z.string(),
1239
- domain: z.string().nullable(),
1240
- website: z.string().nullable(),
1241
- linkedin_url: z.string().nullable(),
1242
- segment: z.string().nullable(),
1243
- category: z.string().nullable(),
1244
- num_employees: z.number().nullable()
1245
- })
1246
- .nullable()
1233
+ /**
1234
+ * Contact summary nested inside DealListItem / DealDetailResponse.
1235
+ * Matches the joined shape returned by useDeals / useDealDetail Supabase queries.
1236
+ */
1237
+ export const DealContactSummarySchema = z.object({
1238
+ id: z.string(),
1239
+ first_name: z.string().nullable(),
1240
+ last_name: z.string().nullable(),
1241
+ email: z.string(),
1242
+ title: z.string().nullable(),
1243
+ headline: z.string().nullable(),
1244
+ linkedin_url: z.string().nullable(),
1245
+ pipeline_status: z.record(z.string(), z.unknown()).nullable(),
1246
+ enrichment_data: z.record(z.string(), z.unknown()).nullable(),
1247
+ company: z
1248
+ .object({
1249
+ id: z.string(),
1250
+ name: z.string(),
1251
+ domain: z.string().nullable(),
1252
+ website: z.string().nullable(),
1253
+ linkedin_url: z.string().nullable(),
1254
+ segment: z.string().nullable(),
1255
+ category: z.string().nullable(),
1256
+ num_employees: z.number().nullable()
1257
+ })
1258
+ .nullable()
1247
1259
  })
1248
1260
  ```
1249
1261
 
1250
1262
  ### `DealPrioritySchema`
1251
1263
 
1252
1264
  ```typescript
1253
- export const DealPrioritySchema = z.object({
1254
- bucketKey: z.enum(['needs_response', 'follow_up_due', 'waiting', 'stale', 'closed_low']),
1255
- rank: z.number().int(),
1256
- label: z.string(),
1257
- color: z.string(),
1258
- reason: z.string(),
1259
- latestActivityAt: z.string().nullable(),
1260
- nextActionAt: z.string().nullable()
1265
+ export const DealPrioritySchema = z.object({
1266
+ bucketKey: z.enum(['needs_response', 'follow_up_due', 'waiting', 'stale', 'closed_low']),
1267
+ rank: z.number().int(),
1268
+ label: z.string(),
1269
+ color: z.string(),
1270
+ reason: z.string(),
1271
+ latestActivityAt: z.string().nullable(),
1272
+ nextActionAt: z.string().nullable()
1261
1273
  })
1262
1274
  ```
1263
1275
 
1264
1276
  ### `DealListItemSchema`
1265
1277
 
1266
1278
  ```typescript
1267
- /**
1268
- * Deal list item with joined contact (and company via contact).
1269
- * Matches DealListItem from @repo/core types.
1270
- */
1271
- export const DealListItemSchema = z.object({
1272
- // acq_deals columns
1273
- id: z.string(),
1274
- organization_id: z.string(),
1275
- contact_id: z.string().nullable(),
1276
- contact_email: z.string(),
1277
- pipeline_key: z.string(),
1278
- stage_key: z.string().nullable(),
1279
- state_key: z.string().nullable(),
1280
- activity_log: z.unknown(),
1281
- discovery_data: z.unknown().nullable(),
1282
- discovery_submitted_at: z.string().nullable(),
1283
- discovery_submitted_by: z.string().nullable(),
1284
- proposal_data: z.unknown().nullable(),
1285
- proposal_sent_at: z.string().nullable(),
1286
- proposal_pdf_url: z.string().nullable(),
1287
- signature_envelope_id: z.string().nullable(),
1288
- source_list_id: z.string().nullable(),
1289
- source_type: z.string().nullable(),
1290
- initial_fee: z.number().nullable(),
1291
- monthly_fee: z.number().nullable(),
1292
- closed_lost_at: z.string().nullable(),
1293
- closed_lost_reason: z.string().nullable(),
1279
+ /**
1280
+ * Deal list item with joined contact (and company via contact).
1281
+ * Matches DealListItem from @repo/core types.
1282
+ */
1283
+ export const DealListItemSchema = z.object({
1284
+ // acq_deals columns
1285
+ id: z.string(),
1286
+ organization_id: z.string(),
1287
+ contact_id: z.string().nullable(),
1288
+ contact_email: z.string(),
1289
+ pipeline_key: z.string(),
1290
+ stage_key: z.string().nullable(),
1291
+ state_key: z.string().nullable(),
1292
+ activity_log: z.unknown(),
1293
+ discovery_data: z.unknown().nullable(),
1294
+ discovery_submitted_at: z.string().nullable(),
1295
+ discovery_submitted_by: z.string().nullable(),
1296
+ proposal_data: z.unknown().nullable(),
1297
+ proposal_sent_at: z.string().nullable(),
1298
+ proposal_pdf_url: z.string().nullable(),
1299
+ signature_envelope_id: z.string().nullable(),
1300
+ source_list_id: z.string().nullable(),
1301
+ source_type: z.string().nullable(),
1302
+ initial_fee: z.number().nullable(),
1303
+ monthly_fee: z.number().nullable(),
1304
+ closed_lost_at: z.string().nullable(),
1305
+ closed_lost_reason: z.string().nullable(),
1294
1306
  created_at: z.string(),
1295
1307
  updated_at: z.string(),
1296
1308
  priority: DealPrioritySchema,
@@ -1304,40 +1316,40 @@ export const DealListItemSchema = z.object({
1304
1316
  ### `DealListResponseSchema`
1305
1317
 
1306
1318
  ```typescript
1307
- export const DealListResponseSchema = z.object({
1308
- data: z.array(DealListItemSchema),
1309
- total: z.number().int(),
1310
- limit: z.number().int(),
1311
- offset: z.number().int()
1319
+ export const DealListResponseSchema = z.object({
1320
+ data: z.array(DealListItemSchema),
1321
+ total: z.number().int(),
1322
+ limit: z.number().int(),
1323
+ offset: z.number().int()
1312
1324
  })
1313
1325
  ```
1314
1326
 
1315
1327
  ### `DealDetailResponseSchema`
1316
1328
 
1317
1329
  ```typescript
1318
- /**
1319
- * Deal detail shape — currently the same as a list item (full joined record).
1320
- * Additive fields keep existing DealListItem callers compatible.
1321
- */
1322
- export const DealDetailResponseSchema = DealListItemSchema.extend({
1323
- conversation: DealConversationSchema
1330
+ /**
1331
+ * Deal detail shape — currently the same as a list item (full joined record).
1332
+ * Additive fields keep existing DealListItem callers compatible.
1333
+ */
1334
+ export const DealDetailResponseSchema = DealListItemSchema.extend({
1335
+ conversation: DealConversationSchema
1324
1336
  })
1325
1337
  ```
1326
1338
 
1327
1339
  ### `DealNoteResponseSchema`
1328
1340
 
1329
1341
  ```typescript
1330
- /**
1331
- * Single acq_deal_notes row (camelCase API representation).
1332
- */
1333
- export const DealNoteResponseSchema = z.object({
1334
- id: z.string(),
1335
- dealId: z.string(),
1336
- organizationId: z.string(),
1337
- authorUserId: z.string().nullable(),
1338
- body: z.string(),
1339
- createdAt: z.string(),
1340
- updatedAt: z.string()
1342
+ /**
1343
+ * Single acq_deal_notes row (camelCase API representation).
1344
+ */
1345
+ export const DealNoteResponseSchema = z.object({
1346
+ id: z.string(),
1347
+ dealId: z.string(),
1348
+ organizationId: z.string(),
1349
+ authorUserId: z.string().nullable(),
1350
+ body: z.string(),
1351
+ createdAt: z.string(),
1352
+ updatedAt: z.string()
1341
1353
  })
1342
1354
  ```
1343
1355
 
@@ -1350,24 +1362,24 @@ export const DealNoteListResponseSchema = z.array(DealNoteResponseSchema)
1350
1362
  ### `DealTaskResponseSchema`
1351
1363
 
1352
1364
  ```typescript
1353
- /**
1354
- * Single acq_deal_tasks row (camelCase API representation).
1355
- * Matches AcqDealTask domain type from types.ts.
1356
- */
1357
- export const DealTaskResponseSchema = z.object({
1358
- id: z.string(),
1359
- organizationId: z.string(),
1360
- dealId: z.string(),
1361
- title: z.string(),
1362
- description: z.string().nullable(),
1363
- kind: AcqDealTaskKindSchema,
1364
- dueAt: z.string().nullable(),
1365
- assigneeUserId: z.string().nullable(),
1366
- completedAt: z.string().nullable(),
1367
- completedByUserId: z.string().nullable(),
1368
- createdAt: z.string(),
1369
- updatedAt: z.string(),
1370
- createdByUserId: z.string().nullable()
1365
+ /**
1366
+ * Single acq_deal_tasks row (camelCase API representation).
1367
+ * Matches AcqDealTask domain type from types.ts.
1368
+ */
1369
+ export const DealTaskResponseSchema = z.object({
1370
+ id: z.string(),
1371
+ organizationId: z.string(),
1372
+ dealId: z.string(),
1373
+ title: z.string(),
1374
+ description: z.string().nullable(),
1375
+ kind: AcqDealTaskKindSchema,
1376
+ dueAt: z.string().nullable(),
1377
+ assigneeUserId: z.string().nullable(),
1378
+ completedAt: z.string().nullable(),
1379
+ completedByUserId: z.string().nullable(),
1380
+ createdAt: z.string(),
1381
+ updatedAt: z.string(),
1382
+ createdByUserId: z.string().nullable()
1371
1383
  })
1372
1384
  ```
1373
1385
 
@@ -1380,35 +1392,35 @@ export const DealTaskListResponseSchema = z.array(DealTaskResponseSchema)
1380
1392
  ### `DealSchemas`
1381
1393
 
1382
1394
  ```typescript
1383
- export const DealSchemas = {
1384
- // Params
1385
- DealIdParams: DealIdParamsSchema,
1386
- DealTaskIdParams: DealTaskIdParamsSchema,
1387
-
1388
- // Queries
1389
- ListDealsQuery: ListDealsQuerySchema,
1390
- DealLookupQuery: DealLookupQuerySchema,
1391
- ListDealTasksDueQuery: ListDealTasksDueQuerySchema,
1392
-
1393
- // Request bodies
1394
- CreateDealNoteRequest: CreateDealNoteRequestSchema,
1395
- CreateDealTaskRequest: CreateDealTaskRequestSchema,
1396
- TransitionItemRequest: TransitionItemRequestSchema,
1397
- TransitionDealStateRequest: TransitionDealStateRequestSchema,
1398
- ExecuteActionParams: ExecuteActionParamsSchema,
1399
- ExecuteActionRequest: ExecuteActionRequestSchema,
1400
-
1401
- // Responses
1402
- DealPriority: DealPrioritySchema,
1403
- DealListResponse: DealListResponseSchema,
1404
- DealSummaryResponse: DealSummaryResponseSchema,
1405
- DealLookupResponse: DealLookupResponseSchema,
1406
- ConversationMessage: ConversationMessageSchema,
1407
- DealDetailResponse: DealDetailResponseSchema,
1408
- DealNoteResponse: DealNoteResponseSchema,
1409
- DealNoteListResponse: DealNoteListResponseSchema,
1410
- DealTaskResponse: DealTaskResponseSchema,
1411
- DealTaskListResponse: DealTaskListResponseSchema
1395
+ export const DealSchemas = {
1396
+ // Params
1397
+ DealIdParams: DealIdParamsSchema,
1398
+ DealTaskIdParams: DealTaskIdParamsSchema,
1399
+
1400
+ // Queries
1401
+ ListDealsQuery: ListDealsQuerySchema,
1402
+ DealLookupQuery: DealLookupQuerySchema,
1403
+ ListDealTasksDueQuery: ListDealTasksDueQuerySchema,
1404
+
1405
+ // Request bodies
1406
+ CreateDealNoteRequest: CreateDealNoteRequestSchema,
1407
+ CreateDealTaskRequest: CreateDealTaskRequestSchema,
1408
+ TransitionItemRequest: TransitionItemRequestSchema,
1409
+ TransitionDealStateRequest: TransitionDealStateRequestSchema,
1410
+ ExecuteActionParams: ExecuteActionParamsSchema,
1411
+ ExecuteActionRequest: ExecuteActionRequestSchema,
1412
+
1413
+ // Responses
1414
+ DealPriority: DealPrioritySchema,
1415
+ DealListResponse: DealListResponseSchema,
1416
+ DealSummaryResponse: DealSummaryResponseSchema,
1417
+ DealLookupResponse: DealLookupResponseSchema,
1418
+ ConversationMessage: ConversationMessageSchema,
1419
+ DealDetailResponse: DealDetailResponseSchema,
1420
+ DealNoteResponse: DealNoteResponseSchema,
1421
+ DealNoteListResponse: DealNoteListResponseSchema,
1422
+ DealTaskResponse: DealTaskResponseSchema,
1423
+ DealTaskListResponse: DealTaskListResponseSchema
1412
1424
  }
1413
1425
  ```
1414
1426
 
@@ -1542,364 +1554,364 @@ export type CrmToolMap = {
1542
1554
  ### `WebPost`
1543
1555
 
1544
1556
  ```typescript
1545
- /**
1546
- * Represents a web post from company website scraping.
1547
- * Used for recent blog posts, news, or announcements.
1548
- */
1549
- export interface WebPost {
1550
- /** ISO date string of when the post was published */
1551
- date: string
1552
- /** Title of the web post */
1553
- title: string
1554
- /** Brief summary of the post content */
1555
- summary: string
1556
- /** AI-generated insight about the post's relevance */
1557
- aiInsight?: string
1557
+ /**
1558
+ * Represents a web post from company website scraping.
1559
+ * Used for recent blog posts, news, or announcements.
1560
+ */
1561
+ export interface WebPost {
1562
+ /** ISO date string of when the post was published */
1563
+ date: string
1564
+ /** Title of the web post */
1565
+ title: string
1566
+ /** Brief summary of the post content */
1567
+ summary: string
1568
+ /** AI-generated insight about the post's relevance */
1569
+ aiInsight?: string
1558
1570
  }
1559
1571
  ```
1560
1572
 
1561
1573
  ### `CompanyPipelineStatus`
1562
1574
 
1563
1575
  ```typescript
1564
- /**
1565
- * Tracks pipeline status for a company across all processing stages.
1566
- */
1567
- export interface CompanyPipelineStatus {
1568
- acquired: boolean
1569
- enrichment: {
1570
- [source: string]: {
1571
- status: 'pending' | 'complete' | 'failed' | 'skipped'
1572
- completedAt?: string
1573
- error?: string
1574
- }
1575
- }
1576
+ /**
1577
+ * Tracks pipeline status for a company across all processing stages.
1578
+ */
1579
+ export interface CompanyPipelineStatus {
1580
+ acquired: boolean
1581
+ enrichment: {
1582
+ [source: string]: {
1583
+ status: 'pending' | 'complete' | 'failed' | 'skipped'
1584
+ completedAt?: string
1585
+ error?: string
1586
+ }
1587
+ }
1576
1588
  }
1577
1589
  ```
1578
1590
 
1579
1591
  ### `ContactPipelineStatus`
1580
1592
 
1581
1593
  ```typescript
1582
- /**
1583
- * Tracks pipeline status for a contact across all processing stages.
1584
- */
1585
- export interface ContactPipelineStatus {
1586
- enrichment: {
1587
- [source: string]: {
1588
- status: 'pending' | 'complete' | 'failed' | 'skipped'
1589
- completedAt?: string
1590
- error?: string
1591
- }
1592
- }
1593
- personalization: {
1594
- status: 'pending' | 'complete' | 'failed' | 'skipped'
1595
- completedAt?: string
1596
- }
1597
- outreach: {
1598
- status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out'
1599
- sentAt?: string
1600
- channel?: string
1601
- campaignId?: string
1602
- }
1594
+ /**
1595
+ * Tracks pipeline status for a contact across all processing stages.
1596
+ */
1597
+ export interface ContactPipelineStatus {
1598
+ enrichment: {
1599
+ [source: string]: {
1600
+ status: 'pending' | 'complete' | 'failed' | 'skipped'
1601
+ completedAt?: string
1602
+ error?: string
1603
+ }
1604
+ }
1605
+ personalization: {
1606
+ status: 'pending' | 'complete' | 'failed' | 'skipped'
1607
+ completedAt?: string
1608
+ }
1609
+ outreach: {
1610
+ status: 'pending' | 'sent' | 'replied' | 'bounced' | 'opted-out'
1611
+ sentAt?: string
1612
+ channel?: string
1613
+ campaignId?: string
1614
+ }
1603
1615
  }
1604
1616
  ```
1605
1617
 
1606
1618
  ### `CompanyEnrichmentData`
1607
1619
 
1608
1620
  ```typescript
1609
- /**
1610
- * Enrichment data collected for a company from various sources.
1611
- */
1612
- export interface CompanyEnrichmentData {
1613
- googleMaps?: {
1614
- placeId?: string
1615
- totalScore?: number
1616
- reviewsCount?: number
1617
- address?: string
1618
- phone?: string
1619
- categoryName?: string
1620
- googleMapsUrl?: string
1621
- scrapedAt?: string
1622
- }
1623
- websiteCrawl?: {
1624
- companyDescription?: string
1625
- services?: string[]
1626
- specialties?: string[]
1627
- staff?: Array<{ name: string; title?: string; email?: string }>
1628
- automationGaps?: string[]
1629
- targetAudience?: string
1630
- category?: string
1631
- segment?: string
1632
- recentWin?: string
1633
- emailCount?: number
1634
- pageCount?: number
1635
- totalChars?: number
1636
- crawledAt?: string
1637
- extractedAt?: string
1638
- }
1639
- website?: {
1640
- missionVision?: string
1641
- uniqueAttributes?: string
1642
- coreOfferings?: string
1643
- targetAudience?: string
1644
- companyValues?: string
1645
- businessDescription?: string
1646
- recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
1647
- }
1648
- tomba?: {
1649
- waterfallEmail?: {
1650
- email: string
1651
- name?: string
1652
- title?: string
1653
- department?: string
1654
- } | null
1655
- genericEmail?: string | null
1656
- totalFound?: number
1657
- searchedAt?: string
1658
- }
1621
+ /**
1622
+ * Enrichment data collected for a company from various sources.
1623
+ */
1624
+ export interface CompanyEnrichmentData {
1625
+ googleMaps?: {
1626
+ placeId?: string
1627
+ totalScore?: number
1628
+ reviewsCount?: number
1629
+ address?: string
1630
+ phone?: string
1631
+ categoryName?: string
1632
+ googleMapsUrl?: string
1633
+ scrapedAt?: string
1634
+ }
1635
+ websiteCrawl?: {
1636
+ companyDescription?: string
1637
+ services?: string[]
1638
+ specialties?: string[]
1639
+ staff?: Array<{ name: string; title?: string; email?: string }>
1640
+ automationGaps?: string[]
1641
+ targetAudience?: string
1642
+ category?: string
1643
+ segment?: string
1644
+ recentWin?: string
1645
+ emailCount?: number
1646
+ pageCount?: number
1647
+ totalChars?: number
1648
+ crawledAt?: string
1649
+ extractedAt?: string
1650
+ }
1651
+ website?: {
1652
+ missionVision?: string
1653
+ uniqueAttributes?: string
1654
+ coreOfferings?: string
1655
+ targetAudience?: string
1656
+ companyValues?: string
1657
+ businessDescription?: string
1658
+ recentPosts?: Array<{ date?: string; title?: string; summary?: string; aiInsight?: string }>
1659
+ }
1660
+ tomba?: {
1661
+ waterfallEmail?: {
1662
+ email: string
1663
+ name?: string
1664
+ title?: string
1665
+ department?: string
1666
+ } | null
1667
+ genericEmail?: string | null
1668
+ totalFound?: number
1669
+ searchedAt?: string
1670
+ }
1659
1671
  }
1660
1672
  ```
1661
1673
 
1662
1674
  ### `ContactEnrichmentData`
1663
1675
 
1664
1676
  ```typescript
1665
- /**
1666
- * Enrichment data collected for a contact from various sources.
1667
- */
1668
- export interface ContactEnrichmentData {
1669
- linkedin?: {
1670
- summary?: string
1671
- pastExperience?: string
1672
- education?: string
1673
- activity?: Array<{ date?: string; content?: string }>
1674
- }
1677
+ /**
1678
+ * Enrichment data collected for a contact from various sources.
1679
+ */
1680
+ export interface ContactEnrichmentData {
1681
+ linkedin?: {
1682
+ summary?: string
1683
+ pastExperience?: string
1684
+ education?: string
1685
+ activity?: Array<{ date?: string; content?: string }>
1686
+ }
1675
1687
  }
1676
1688
  ```
1677
1689
 
1678
1690
  ### `AcqList`
1679
1691
 
1680
1692
  ```typescript
1681
- export interface AcqList {
1682
- id: string
1683
- organizationId: string
1684
- name: string
1685
- description: string | null
1686
- batchIds: string[]
1687
- instantlyCampaignId: string | null
1688
- status: ListStatus
1689
- scrapingConfig: ScrapingConfig
1690
- icp: IcpRubric
1691
- pipelineConfig: PipelineConfig
1692
- metadata: AcqListMetadata
1693
- launchedAt: Date | null
1694
- completedAt: Date | null
1695
- createdAt: Date
1693
+ export interface AcqList {
1694
+ id: string
1695
+ organizationId: string
1696
+ name: string
1697
+ description: string | null
1698
+ batchIds: string[]
1699
+ instantlyCampaignId: string | null
1700
+ status: ListStatus
1701
+ scrapingConfig: ScrapingConfig
1702
+ icp: IcpRubric
1703
+ pipelineConfig: PipelineConfig
1704
+ metadata: AcqListMetadata
1705
+ launchedAt: Date | null
1706
+ completedAt: Date | null
1707
+ createdAt: Date
1696
1708
  }
1697
1709
  ```
1698
1710
 
1699
1711
  ### `AcqCompany`
1700
1712
 
1701
1713
  ```typescript
1702
- /**
1703
- * Company record in the acquisition database.
1704
- * Contains enriched company data from various sources.
1705
- * Transformed from AcqCompanyRow with camelCase properties.
1706
- */
1707
- export interface AcqCompany {
1708
- id: string
1709
- organizationId: string
1710
- name: string
1711
- domain: string | null
1712
- linkedinUrl: string | null
1713
- website: string | null
1714
- numEmployees: number | null
1715
- foundedYear: number | null
1716
- locationCity: string | null
1717
- locationState: string | null
1718
- category: string | null
1719
- categoryPain: string | null
1720
- segment: string | null
1721
- pipelineStatus: CompanyPipelineStatus | null
1722
- enrichmentData: CompanyEnrichmentData | null
1723
- source: string | null
1724
- batchId: string | null
1725
- status: 'active' | 'invalid'
1726
- verticalResearch: string | null
1727
- /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1728
- qualificationScore: number | null
1729
- /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1730
- qualificationSignals: Record<string, unknown> | null
1731
- /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1732
- qualificationRubricKey: string | null
1733
- createdAt: Date
1734
- updatedAt: Date
1714
+ /**
1715
+ * Company record in the acquisition database.
1716
+ * Contains enriched company data from various sources.
1717
+ * Transformed from AcqCompanyRow with camelCase properties.
1718
+ */
1719
+ export interface AcqCompany {
1720
+ id: string
1721
+ organizationId: string
1722
+ name: string
1723
+ domain: string | null
1724
+ linkedinUrl: string | null
1725
+ website: string | null
1726
+ numEmployees: number | null
1727
+ foundedYear: number | null
1728
+ locationCity: string | null
1729
+ locationState: string | null
1730
+ category: string | null
1731
+ categoryPain: string | null
1732
+ segment: string | null
1733
+ pipelineStatus: CompanyPipelineStatus | null
1734
+ enrichmentData: CompanyEnrichmentData | null
1735
+ source: string | null
1736
+ batchId: string | null
1737
+ status: 'active' | 'invalid'
1738
+ verticalResearch: string | null
1739
+ /** Track A: flat qualification score (null until a scoring rubric is defined). Added by W1 migration. */
1740
+ qualificationScore: number | null
1741
+ /** Track A: flat qualification signals jsonb preserving the result payload shape. Added by W1 migration. */
1742
+ qualificationSignals: Record<string, unknown> | null
1743
+ /** Track A: key identifying the rubric used for qualification. Added by W1 migration. */
1744
+ qualificationRubricKey: string | null
1745
+ createdAt: Date
1746
+ updatedAt: Date
1735
1747
  }
1736
1748
  ```
1737
1749
 
1738
1750
  ### `AcqContact`
1739
1751
 
1740
1752
  ```typescript
1741
- /**
1742
- * Contact record in the acquisition database.
1743
- * Contains enriched contact data and personalization content.
1744
- * Transformed from AcqContactRow with camelCase properties.
1745
- */
1746
- export interface AcqContact {
1747
- id: string
1748
- organizationId: string
1749
- companyId: string | null
1750
- email: string
1751
- emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1752
- firstName: string | null
1753
- lastName: string | null
1754
- linkedinUrl: string | null
1755
- title: string | null
1756
- headline: string | null
1757
- filterReason: string | null
1758
- openingLine: string | null
1759
- source: string | null
1760
- sourceId: string | null
1761
- pipelineStatus: ContactPipelineStatus | null
1762
- enrichmentData: ContactEnrichmentData | null
1763
- /** Attio Person record ID - set when contact responds and is added to CRM */
1764
- attioPersonId: string | null
1765
- batchId: string | null
1766
- status: 'active' | 'invalid'
1767
- createdAt: Date
1768
- updatedAt: Date
1753
+ /**
1754
+ * Contact record in the acquisition database.
1755
+ * Contains enriched contact data and personalization content.
1756
+ * Transformed from AcqContactRow with camelCase properties.
1757
+ */
1758
+ export interface AcqContact {
1759
+ id: string
1760
+ organizationId: string
1761
+ companyId: string | null
1762
+ email: string
1763
+ emailValid: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN' | null
1764
+ firstName: string | null
1765
+ lastName: string | null
1766
+ linkedinUrl: string | null
1767
+ title: string | null
1768
+ headline: string | null
1769
+ filterReason: string | null
1770
+ openingLine: string | null
1771
+ source: string | null
1772
+ sourceId: string | null
1773
+ pipelineStatus: ContactPipelineStatus | null
1774
+ enrichmentData: ContactEnrichmentData | null
1775
+ /** Attio Person record ID - set when contact responds and is added to CRM */
1776
+ attioPersonId: string | null
1777
+ batchId: string | null
1778
+ status: 'active' | 'invalid'
1779
+ createdAt: Date
1780
+ updatedAt: Date
1769
1781
  }
1770
1782
  ```
1771
1783
 
1772
1784
  ### `ListTelemetry`
1773
1785
 
1774
1786
  ```typescript
1775
- /**
1776
- * Live-scan aggregate telemetry for a single list, computed on demand from
1777
- * the list junction tables and current contact deliverability state.
1778
- * `stageCounts` are attempted counts from list-row processing_state.
1779
- */
1780
- export interface ListTelemetry {
1781
- listId: string
1782
- totalCompanies: number
1783
- totalContacts: number
1784
- stageCounts: {
1785
- populated: number
1786
- extracted: number
1787
- qualified: number
1788
- discovered: number
1789
- verified: number
1790
- personalized: number
1791
- uploaded: number
1792
- }
1793
- deliverability: {
1794
- valid: number
1795
- risky: number
1796
- invalid: number
1797
- unknown: number
1798
- bounced: number
1799
- }
1800
- /** Reserved -- active workflow IDs associated with this list. */
1801
- activeWorkflows?: string[]
1787
+ /**
1788
+ * Live-scan aggregate telemetry for a single list, computed on demand from
1789
+ * the list junction tables and current contact deliverability state.
1790
+ * `stageCounts` are attempted counts from list-row processing_state.
1791
+ */
1792
+ export interface ListTelemetry {
1793
+ listId: string
1794
+ totalCompanies: number
1795
+ totalContacts: number
1796
+ stageCounts: {
1797
+ populated: number
1798
+ extracted: number
1799
+ qualified: number
1800
+ discovered: number
1801
+ verified: number
1802
+ personalized: number
1803
+ uploaded: number
1804
+ }
1805
+ deliverability: {
1806
+ valid: number
1807
+ risky: number
1808
+ invalid: number
1809
+ unknown: number
1810
+ bounced: number
1811
+ }
1812
+ /** Reserved -- active workflow IDs associated with this list. */
1813
+ activeWorkflows?: string[]
1802
1814
  }
1803
1815
  ```
1804
1816
 
1805
1817
  ### `ListStageCountsSchema`
1806
1818
 
1807
1819
  ```typescript
1808
- export const ListStageCountsSchema = z.object({
1809
- // Attempted counts by canonical lead-gen stage. The detailed status
1810
- // distribution lives on ListProgress; telemetry keeps the overview payload small.
1811
- stageCounts: z.object({
1812
- populated: z.number().int(),
1813
- extracted: z.number().int(),
1814
- qualified: z.number().int(),
1815
- discovered: z.number().int(),
1816
- verified: z.number().int(),
1817
- personalized: z.number().int(),
1818
- uploaded: z.number().int()
1819
- }),
1820
- deliverability: z.object({
1821
- valid: z.number().int(),
1822
- risky: z.number().int(),
1823
- invalid: z.number().int(),
1824
- unknown: z.number().int(),
1825
- bounced: z.number().int()
1826
- })
1820
+ export const ListStageCountsSchema = z.object({
1821
+ // Attempted counts by canonical lead-gen stage. The detailed status
1822
+ // distribution lives on ListProgress; telemetry keeps the overview payload small.
1823
+ stageCounts: z.object({
1824
+ populated: z.number().int(),
1825
+ extracted: z.number().int(),
1826
+ qualified: z.number().int(),
1827
+ discovered: z.number().int(),
1828
+ verified: z.number().int(),
1829
+ personalized: z.number().int(),
1830
+ uploaded: z.number().int()
1831
+ }),
1832
+ deliverability: z.object({
1833
+ valid: z.number().int(),
1834
+ risky: z.number().int(),
1835
+ invalid: z.number().int(),
1836
+ unknown: z.number().int(),
1837
+ bounced: z.number().int()
1838
+ })
1827
1839
  })
1828
1840
  ```
1829
1841
 
1830
1842
  ### `ListTelemetrySchema`
1831
1843
 
1832
1844
  ```typescript
1833
- export const ListTelemetrySchema = z.object({
1834
- listId: UuidSchema,
1835
- totalCompanies: z.number().int(),
1836
- totalContacts: z.number().int(),
1837
- stageCounts: ListStageCountsSchema.shape.stageCounts,
1838
- deliverability: ListStageCountsSchema.shape.deliverability,
1839
- activeWorkflows: z.array(z.string()).optional()
1845
+ export const ListTelemetrySchema = z.object({
1846
+ listId: UuidSchema,
1847
+ totalCompanies: z.number().int(),
1848
+ totalContacts: z.number().int(),
1849
+ stageCounts: ListStageCountsSchema.shape.stageCounts,
1850
+ deliverability: ListStageCountsSchema.shape.deliverability,
1851
+ activeWorkflows: z.array(z.string()).optional()
1840
1852
  })
1841
1853
  ```
1842
1854
 
1843
1855
  ### `ListIdParamsSchema`
1844
1856
 
1845
1857
  ```typescript
1846
- export const ListIdParamsSchema = z.object({
1847
- listId: UuidSchema
1858
+ export const ListIdParamsSchema = z.object({
1859
+ listId: UuidSchema
1848
1860
  })
1849
1861
  ```
1850
1862
 
1851
1863
  ### `CreateListRequestSchema`
1852
1864
 
1853
1865
  ```typescript
1854
- export const CreateListRequestSchema = z
1855
- .object({
1856
- name: z.string().trim().min(1).max(255),
1857
- description: z.string().trim().nullable().optional(),
1858
- status: ListStatusSchema.optional(),
1859
- buildTemplateId: ProspectingBuildTemplateIdSchema.optional(),
1860
- scrapingConfig: ScrapingConfigSchema.optional(),
1861
- icp: IcpRubricSchema.optional(),
1862
- pipelineConfig: PipelineConfigSchema.optional()
1863
- })
1866
+ export const CreateListRequestSchema = z
1867
+ .object({
1868
+ name: z.string().trim().min(1).max(255),
1869
+ description: z.string().trim().nullable().optional(),
1870
+ status: ListStatusSchema.optional(),
1871
+ buildTemplateId: ProspectingBuildTemplateIdSchema.optional(),
1872
+ scrapingConfig: ScrapingConfigSchema.optional(),
1873
+ icp: IcpRubricSchema.optional(),
1874
+ pipelineConfig: PipelineConfigSchema.optional()
1875
+ })
1864
1876
  .strict()
1865
1877
  ```
1866
1878
 
1867
1879
  ### `UpdateListRequestSchema`
1868
1880
 
1869
1881
  ```typescript
1870
- export const UpdateListRequestSchema = z
1871
- .object({
1872
- name: z.string().trim().min(1).max(255).optional(),
1873
- description: z.string().trim().nullable().optional(),
1874
- batchIds: z.array(z.string()).optional(),
1875
- buildTemplateId: ProspectingBuildTemplateIdSchema.optional(),
1876
- confirmBuildTemplateChange: z.literal(true).optional()
1877
- })
1878
- .strict()
1879
- .refine(
1880
- (data) =>
1881
- data.name !== undefined ||
1882
- data.description !== undefined ||
1883
- data.batchIds !== undefined ||
1884
- data.buildTemplateId !== undefined,
1885
- {
1886
- message: 'At least one field (name, description, batchIds, or buildTemplateId) must be provided'
1887
- }
1888
- )
1889
- .refine((data) => data.buildTemplateId === undefined || data.confirmBuildTemplateChange === true, {
1890
- message: 'confirmBuildTemplateChange must be true when changing buildTemplateId',
1891
- path: ['confirmBuildTemplateChange']
1882
+ export const UpdateListRequestSchema = z
1883
+ .object({
1884
+ name: z.string().trim().min(1).max(255).optional(),
1885
+ description: z.string().trim().nullable().optional(),
1886
+ batchIds: z.array(z.string()).optional(),
1887
+ buildTemplateId: ProspectingBuildTemplateIdSchema.optional(),
1888
+ confirmBuildTemplateChange: z.literal(true).optional()
1889
+ })
1890
+ .strict()
1891
+ .refine(
1892
+ (data) =>
1893
+ data.name !== undefined ||
1894
+ data.description !== undefined ||
1895
+ data.batchIds !== undefined ||
1896
+ data.buildTemplateId !== undefined,
1897
+ {
1898
+ message: 'At least one field (name, description, batchIds, or buildTemplateId) must be provided'
1899
+ }
1900
+ )
1901
+ .refine((data) => data.buildTemplateId === undefined || data.confirmBuildTemplateChange === true, {
1902
+ message: 'confirmBuildTemplateChange must be true when changing buildTemplateId',
1903
+ path: ['confirmBuildTemplateChange']
1892
1904
  })
1893
1905
  ```
1894
1906
 
1895
1907
  ### `UpdateListConfigRequestSchema`
1896
1908
 
1897
1909
  ```typescript
1898
- /**
1899
- * Partial patch for the three jsonb config columns. UI sends only the edited
1900
- * subtree; server writes the field as-is (no deep merge — each column is
1901
- * replaced atomically when present in the patch).
1902
- */
1910
+ /**
1911
+ * Partial patch for the three jsonb config columns. UI sends only the edited
1912
+ * subtree; server writes the field as-is (no deep merge — each column is
1913
+ * replaced atomically when present in the patch).
1914
+ */
1903
1915
  export const UpdateListConfigRequestSchema = z
1904
1916
  .object({
1905
1917
  scrapingConfig: ScrapingConfigSchema.partial().optional(),
@@ -1907,84 +1919,78 @@ export const UpdateListConfigRequestSchema = z
1907
1919
  pipelineConfig: PipelineConfigSchema.partial().optional()
1908
1920
  })
1909
1921
  .strict()
1910
- .refine(
1911
- (data) =>
1912
- data.scrapingConfig !== undefined ||
1913
- data.icp !== undefined ||
1914
- data.pipelineConfig !== undefined,
1915
- {
1916
- message: 'At least one of scrapingConfig, icp, or pipelineConfig must be provided'
1917
- }
1918
- )
1922
+ .refine((data) => data.scrapingConfig !== undefined || data.icp !== undefined || data.pipelineConfig !== undefined, {
1923
+ message: 'At least one of scrapingConfig, icp, or pipelineConfig must be provided'
1924
+ })
1919
1925
  ```
1920
1926
 
1921
1927
  ### `AddCompaniesToListRequestSchema`
1922
1928
 
1923
1929
  ```typescript
1924
- export const AddCompaniesToListRequestSchema = z
1925
- .object({
1926
- companyIds: z.array(UuidSchema).min(1).max(1000)
1927
- })
1930
+ export const AddCompaniesToListRequestSchema = z
1931
+ .object({
1932
+ companyIds: z.array(UuidSchema).min(1).max(1000)
1933
+ })
1928
1934
  .strict()
1929
1935
  ```
1930
1936
 
1931
1937
  ### `RemoveCompaniesFromListRequestSchema`
1932
1938
 
1933
1939
  ```typescript
1934
- export const RemoveCompaniesFromListRequestSchema = z
1935
- .object({
1936
- companyIds: z.array(UuidSchema).min(1).max(1000)
1937
- })
1940
+ export const RemoveCompaniesFromListRequestSchema = z
1941
+ .object({
1942
+ companyIds: z.array(UuidSchema).min(1).max(1000)
1943
+ })
1938
1944
  .strict()
1939
1945
  ```
1940
1946
 
1941
1947
  ### `AddContactsToListRequestSchema`
1942
1948
 
1943
1949
  ```typescript
1944
- export const AddContactsToListRequestSchema = z
1945
- .object({
1946
- contactIds: z.array(UuidSchema).min(1).max(1000)
1947
- })
1950
+ export const AddContactsToListRequestSchema = z
1951
+ .object({
1952
+ contactIds: z.array(UuidSchema).min(1).max(1000)
1953
+ })
1948
1954
  .strict()
1949
1955
  ```
1950
1956
 
1951
1957
  ### `RecordListExecutionRequestSchema`
1952
1958
 
1953
1959
  ```typescript
1954
- export const RecordListExecutionRequestSchema = z
1955
- .object({
1956
- executionId: UuidSchema,
1957
- configSnapshot: z.record(z.string(), z.unknown()).optional()
1958
- })
1960
+ export const RecordListExecutionRequestSchema = z
1961
+ .object({
1962
+ executionId: UuidSchema,
1963
+ configSnapshot: z.record(z.string(), z.unknown()).optional()
1964
+ })
1959
1965
  .strict()
1960
1966
  ```
1961
1967
 
1962
1968
  ### `AcqListResponseSchema`
1963
1969
 
1964
1970
  ```typescript
1965
- /**
1966
- * Single list as returned by /api/acquisition/lists/:id etc.
1967
- * Camel-cased domain shape matching AcqList in types.ts.
1968
- */
1969
- export const AcqListResponseSchema = z.object({
1970
- id: z.string(),
1971
- organizationId: z.string(),
1972
- name: z.string(),
1973
- description: z.string().nullable(),
1974
- batchIds: z.array(z.string()),
1975
- instantlyCampaignId: z.string().nullable(),
1976
- /** Lifecycle status (draft | enriching | launched | closing | archived). */
1977
- status: ListStatusSchema,
1978
- metadata: AcqListMetadataSchema,
1979
- launchedAt: z.string().nullable(),
1980
- completedAt: z.string().nullable(),
1981
- createdAt: z.string(),
1982
- /** Scraping criteria stored as jsonb on the row. */
1983
- scrapingConfig: ScrapingConfigSchema,
1984
- /** ICP / qualification rubric stored as jsonb on the row. */
1985
- icp: IcpRubricSchema,
1986
- /** Pipeline presentation contract stored as jsonb on the row. */
1987
- pipelineConfig: PipelineConfigSchema
1971
+ /**
1972
+ * Single list as returned by /api/acquisition/lists/:id etc.
1973
+ * Camel-cased domain shape matching AcqList in types.ts.
1974
+ */
1975
+ export const AcqListResponseSchema = z.object({
1976
+ id: z.string(),
1977
+ organizationId: z.string(),
1978
+ name: z.string(),
1979
+ description: z.string().nullable(),
1980
+ batchIds: z.array(z.string()),
1981
+ instantlyCampaignId: z.string().nullable(),
1982
+ /** Lifecycle status (draft | enriching | launched | closing | archived). */
1983
+ status: ListStatusSchema,
1984
+ metadata: AcqListMetadataSchema,
1985
+ launchedAt: z.string().nullable(),
1986
+ completedAt: z.string().nullable(),
1987
+ createdAt: z.string(),
1988
+ /** Scraping criteria stored as jsonb on the row. */
1989
+ scrapingConfig: ScrapingConfigSchema,
1990
+ /** ICP / qualification rubric stored as jsonb on the row. */
1991
+ icp: IcpRubricSchema,
1992
+ /** Pipeline presentation contract stored as jsonb on the row. */
1993
+ pipelineConfig: PipelineConfigSchema
1988
1994
  })
1989
1995
  ```
1990
1996
 
@@ -2009,13 +2015,13 @@ export const ListTelemetryListResponseSchema = z.array(ListTelemetrySchema)
2009
2015
  ### `ListExecutionSummarySchema`
2010
2016
 
2011
2017
  ```typescript
2012
- /**
2013
- * Row from acq_list_executions joined with the execution summary,
2014
- * shaped for the /lists/:id/executions response.
2015
- */
2016
- export const ListExecutionSummarySchema = z.object({
2017
- executionId: z.string(),
2018
- resourceId: z.string(),
2018
+ /**
2019
+ * Row from acq_list_executions joined with the execution summary,
2020
+ * shaped for the /lists/:id/executions response.
2021
+ */
2022
+ export const ListExecutionSummarySchema = z.object({
2023
+ executionId: z.string(),
2024
+ resourceId: z.string(),
2019
2025
  status: z.string(),
2020
2026
  createdAt: z.string(),
2021
2027
  completedAt: z.string().nullable(),
@@ -2051,282 +2057,282 @@ export const AcqEmailValidSchema = z.enum(['VALID', 'INVALID', 'RISKY', 'UNKNOWN
2051
2057
  ### `CompanyIdParamsSchema`
2052
2058
 
2053
2059
  ```typescript
2054
- export const CompanyIdParamsSchema = z.object({
2055
- companyId: UuidSchema
2060
+ export const CompanyIdParamsSchema = z.object({
2061
+ companyId: UuidSchema
2056
2062
  })
2057
2063
  ```
2058
2064
 
2059
2065
  ### `ContactIdParamsSchema`
2060
2066
 
2061
2067
  ```typescript
2062
- export const ContactIdParamsSchema = z.object({
2063
- contactId: UuidSchema
2068
+ export const ContactIdParamsSchema = z.object({
2069
+ contactId: UuidSchema
2064
2070
  })
2065
2071
  ```
2066
2072
 
2067
2073
  ### `ListCompaniesQuerySchema`
2068
2074
 
2069
2075
  ```typescript
2070
- export const ListCompaniesQuerySchema = z
2071
- .object({
2072
- search: z.string().trim().min(1).max(200).optional(),
2073
- listId: UuidSchema.optional(),
2074
- domain: z.string().trim().min(1).max(255).optional(),
2075
- website: z.string().trim().min(1).max(2048).optional(),
2076
- segment: z.string().trim().min(1).max(255).optional(),
2077
- category: z.string().trim().min(1).max(255).optional(),
2078
- batchId: z.string().trim().min(1).max(255).optional(),
2079
- status: AcqCompanyStatusSchema.optional(),
2080
- includeAll: QueryBooleanSchema.optional(),
2081
- limit: z.coerce.number().int().min(1).max(5000).default(50),
2082
- offset: z.coerce.number().int().min(0).default(0)
2083
- })
2076
+ export const ListCompaniesQuerySchema = z
2077
+ .object({
2078
+ search: z.string().trim().min(1).max(200).optional(),
2079
+ listId: UuidSchema.optional(),
2080
+ domain: z.string().trim().min(1).max(255).optional(),
2081
+ website: z.string().trim().min(1).max(2048).optional(),
2082
+ segment: z.string().trim().min(1).max(255).optional(),
2083
+ category: z.string().trim().min(1).max(255).optional(),
2084
+ batchId: z.string().trim().min(1).max(255).optional(),
2085
+ status: AcqCompanyStatusSchema.optional(),
2086
+ includeAll: QueryBooleanSchema.optional(),
2087
+ limit: z.coerce.number().int().min(1).max(5000).default(50),
2088
+ offset: z.coerce.number().int().min(0).default(0)
2089
+ })
2084
2090
  .strict()
2085
2091
  ```
2086
2092
 
2087
2093
  ### `ListContactsQuerySchema`
2088
2094
 
2089
2095
  ```typescript
2090
- export const ListContactsQuerySchema = z
2091
- .object({
2092
- search: z.string().trim().min(1).max(200).optional(),
2093
- listId: UuidSchema.optional(),
2094
- openingLineIsNull: QueryBooleanSchema.optional(),
2095
- batchId: z.string().trim().min(1).max(255).optional(),
2096
- contactStatus: AcqContactStatusSchema.optional(),
2097
- limit: z.coerce.number().int().min(1).max(5000).default(5000),
2098
- offset: z.coerce.number().int().min(0).default(0)
2099
- })
2096
+ export const ListContactsQuerySchema = z
2097
+ .object({
2098
+ search: z.string().trim().min(1).max(200).optional(),
2099
+ listId: UuidSchema.optional(),
2100
+ openingLineIsNull: QueryBooleanSchema.optional(),
2101
+ batchId: z.string().trim().min(1).max(255).optional(),
2102
+ contactStatus: AcqContactStatusSchema.optional(),
2103
+ limit: z.coerce.number().int().min(1).max(5000).default(5000),
2104
+ offset: z.coerce.number().int().min(0).default(0)
2105
+ })
2100
2106
  .strict()
2101
2107
  ```
2102
2108
 
2103
2109
  ### `CreateCompanyRequestSchema`
2104
2110
 
2105
2111
  ```typescript
2106
- export const CreateCompanyRequestSchema = z
2107
- .object({
2108
- name: z.string().trim().min(1).max(255),
2109
- domain: z.string().trim().min(1).max(255).optional(),
2110
- linkedinUrl: z.string().trim().url().optional(),
2111
- website: z.string().trim().url().optional(),
2112
- numEmployees: z.number().int().min(0).optional(),
2113
- foundedYear: z.number().int().optional(),
2114
- locationCity: z.string().trim().min(1).max(255).optional(),
2115
- locationState: z.string().trim().min(1).max(255).optional(),
2116
- category: z.string().trim().min(1).max(255).optional(),
2117
- source: z.string().trim().min(1).max(255).optional(),
2118
- batchId: z.string().trim().min(1).max(255).optional(),
2119
- verticalResearch: z.string().trim().min(1).max(5000).optional()
2120
- })
2112
+ export const CreateCompanyRequestSchema = z
2113
+ .object({
2114
+ name: z.string().trim().min(1).max(255),
2115
+ domain: z.string().trim().min(1).max(255).optional(),
2116
+ linkedinUrl: z.string().trim().url().optional(),
2117
+ website: z.string().trim().url().optional(),
2118
+ numEmployees: z.number().int().min(0).optional(),
2119
+ foundedYear: z.number().int().optional(),
2120
+ locationCity: z.string().trim().min(1).max(255).optional(),
2121
+ locationState: z.string().trim().min(1).max(255).optional(),
2122
+ category: z.string().trim().min(1).max(255).optional(),
2123
+ source: z.string().trim().min(1).max(255).optional(),
2124
+ batchId: z.string().trim().min(1).max(255).optional(),
2125
+ verticalResearch: z.string().trim().min(1).max(5000).optional()
2126
+ })
2121
2127
  .strict()
2122
2128
  ```
2123
2129
 
2124
2130
  ### `UpdateCompanyRequestSchema`
2125
2131
 
2126
2132
  ```typescript
2127
- export const UpdateCompanyRequestSchema = z
2128
- .object({
2129
- name: z.string().trim().min(1).max(255).optional(),
2130
- domain: z.string().trim().min(1).max(255).optional(),
2131
- linkedinUrl: z.string().trim().url().optional(),
2132
- website: z.string().trim().url().optional(),
2133
- numEmployees: z.number().int().min(0).optional(),
2134
- foundedYear: z.number().int().optional(),
2135
- locationCity: z.string().trim().min(1).max(255).optional(),
2136
- locationState: z.string().trim().min(1).max(255).optional(),
2137
- category: z.string().trim().min(1).max(255).optional(),
2138
- segment: z.string().trim().min(1).max(255).optional(),
2139
- pipelineStatus: z.record(z.string(), z.unknown()).optional(),
2140
- enrichmentData: z.record(z.string(), z.unknown()).optional(),
2141
- source: z.string().trim().min(1).max(255).optional(),
2142
- batchId: z.string().trim().min(1).max(255).optional(),
2143
- status: AcqCompanyStatusSchema.optional(),
2144
- verticalResearch: z.string().trim().min(1).max(5000).nullable().optional()
2145
- })
2146
- .strict()
2147
- .refine(
2148
- (data) =>
2149
- data.name !== undefined ||
2150
- data.domain !== undefined ||
2151
- data.linkedinUrl !== undefined ||
2152
- data.website !== undefined ||
2153
- data.numEmployees !== undefined ||
2154
- data.foundedYear !== undefined ||
2155
- data.locationCity !== undefined ||
2156
- data.locationState !== undefined ||
2157
- data.category !== undefined ||
2158
- data.segment !== undefined ||
2159
- data.pipelineStatus !== undefined ||
2160
- data.enrichmentData !== undefined ||
2161
- data.source !== undefined ||
2162
- data.batchId !== undefined ||
2163
- data.status !== undefined ||
2164
- data.verticalResearch !== undefined,
2165
- {
2166
- message: 'At least one field must be provided'
2167
- }
2133
+ export const UpdateCompanyRequestSchema = z
2134
+ .object({
2135
+ name: z.string().trim().min(1).max(255).optional(),
2136
+ domain: z.string().trim().min(1).max(255).optional(),
2137
+ linkedinUrl: z.string().trim().url().optional(),
2138
+ website: z.string().trim().url().optional(),
2139
+ numEmployees: z.number().int().min(0).optional(),
2140
+ foundedYear: z.number().int().optional(),
2141
+ locationCity: z.string().trim().min(1).max(255).optional(),
2142
+ locationState: z.string().trim().min(1).max(255).optional(),
2143
+ category: z.string().trim().min(1).max(255).optional(),
2144
+ segment: z.string().trim().min(1).max(255).optional(),
2145
+ pipelineStatus: z.record(z.string(), z.unknown()).optional(),
2146
+ enrichmentData: z.record(z.string(), z.unknown()).optional(),
2147
+ source: z.string().trim().min(1).max(255).optional(),
2148
+ batchId: z.string().trim().min(1).max(255).optional(),
2149
+ status: AcqCompanyStatusSchema.optional(),
2150
+ verticalResearch: z.string().trim().min(1).max(5000).nullable().optional()
2151
+ })
2152
+ .strict()
2153
+ .refine(
2154
+ (data) =>
2155
+ data.name !== undefined ||
2156
+ data.domain !== undefined ||
2157
+ data.linkedinUrl !== undefined ||
2158
+ data.website !== undefined ||
2159
+ data.numEmployees !== undefined ||
2160
+ data.foundedYear !== undefined ||
2161
+ data.locationCity !== undefined ||
2162
+ data.locationState !== undefined ||
2163
+ data.category !== undefined ||
2164
+ data.segment !== undefined ||
2165
+ data.pipelineStatus !== undefined ||
2166
+ data.enrichmentData !== undefined ||
2167
+ data.source !== undefined ||
2168
+ data.batchId !== undefined ||
2169
+ data.status !== undefined ||
2170
+ data.verticalResearch !== undefined,
2171
+ {
2172
+ message: 'At least one field must be provided'
2173
+ }
2168
2174
  )
2169
2175
  ```
2170
2176
 
2171
2177
  ### `CreateContactRequestSchema`
2172
2178
 
2173
2179
  ```typescript
2174
- export const CreateContactRequestSchema = z
2175
- .object({
2176
- email: z.string().trim().email(),
2177
- companyId: UuidSchema.optional(),
2178
- firstName: z.string().trim().min(1).max(255).optional(),
2179
- lastName: z.string().trim().min(1).max(255).optional(),
2180
- linkedinUrl: z.string().trim().url().optional(),
2181
- title: z.string().trim().min(1).max(255).optional(),
2182
- source: z.string().trim().min(1).max(255).optional(),
2183
- sourceId: z.string().trim().min(1).max(255).optional(),
2184
- batchId: z.string().trim().min(1).max(255).optional()
2185
- })
2180
+ export const CreateContactRequestSchema = z
2181
+ .object({
2182
+ email: z.string().trim().email(),
2183
+ companyId: UuidSchema.optional(),
2184
+ firstName: z.string().trim().min(1).max(255).optional(),
2185
+ lastName: z.string().trim().min(1).max(255).optional(),
2186
+ linkedinUrl: z.string().trim().url().optional(),
2187
+ title: z.string().trim().min(1).max(255).optional(),
2188
+ source: z.string().trim().min(1).max(255).optional(),
2189
+ sourceId: z.string().trim().min(1).max(255).optional(),
2190
+ batchId: z.string().trim().min(1).max(255).optional()
2191
+ })
2186
2192
  .strict()
2187
2193
  ```
2188
2194
 
2189
2195
  ### `UpdateContactRequestSchema`
2190
2196
 
2191
2197
  ```typescript
2192
- export const UpdateContactRequestSchema = z
2193
- .object({
2194
- companyId: UuidSchema.optional(),
2195
- emailValid: AcqEmailValidSchema.optional(),
2196
- firstName: z.string().trim().min(1).max(255).optional(),
2197
- lastName: z.string().trim().min(1).max(255).optional(),
2198
- linkedinUrl: z.string().trim().url().optional(),
2199
- title: z.string().trim().min(1).max(255).optional(),
2200
- headline: z.string().trim().min(1).max(5000).optional(),
2201
- filterReason: z.string().trim().min(1).max(5000).optional(),
2202
- openingLine: z.string().trim().min(1).max(5000).optional(),
2203
- pipelineStatus: z.record(z.string(), z.unknown()).optional(),
2204
- enrichmentData: z.record(z.string(), z.unknown()).optional(),
2205
- status: AcqContactStatusSchema.optional()
2206
- })
2207
- .strict()
2208
- .refine(
2209
- (data) =>
2210
- data.companyId !== undefined ||
2211
- data.emailValid !== undefined ||
2212
- data.firstName !== undefined ||
2213
- data.lastName !== undefined ||
2214
- data.linkedinUrl !== undefined ||
2215
- data.title !== undefined ||
2216
- data.headline !== undefined ||
2217
- data.filterReason !== undefined ||
2218
- data.openingLine !== undefined ||
2219
- data.pipelineStatus !== undefined ||
2220
- data.enrichmentData !== undefined ||
2221
- data.status !== undefined,
2222
- {
2223
- message: 'At least one field must be provided'
2224
- }
2198
+ export const UpdateContactRequestSchema = z
2199
+ .object({
2200
+ companyId: UuidSchema.optional(),
2201
+ emailValid: AcqEmailValidSchema.optional(),
2202
+ firstName: z.string().trim().min(1).max(255).optional(),
2203
+ lastName: z.string().trim().min(1).max(255).optional(),
2204
+ linkedinUrl: z.string().trim().url().optional(),
2205
+ title: z.string().trim().min(1).max(255).optional(),
2206
+ headline: z.string().trim().min(1).max(5000).optional(),
2207
+ filterReason: z.string().trim().min(1).max(5000).optional(),
2208
+ openingLine: z.string().trim().min(1).max(5000).optional(),
2209
+ pipelineStatus: z.record(z.string(), z.unknown()).optional(),
2210
+ enrichmentData: z.record(z.string(), z.unknown()).optional(),
2211
+ status: AcqContactStatusSchema.optional()
2212
+ })
2213
+ .strict()
2214
+ .refine(
2215
+ (data) =>
2216
+ data.companyId !== undefined ||
2217
+ data.emailValid !== undefined ||
2218
+ data.firstName !== undefined ||
2219
+ data.lastName !== undefined ||
2220
+ data.linkedinUrl !== undefined ||
2221
+ data.title !== undefined ||
2222
+ data.headline !== undefined ||
2223
+ data.filterReason !== undefined ||
2224
+ data.openingLine !== undefined ||
2225
+ data.pipelineStatus !== undefined ||
2226
+ data.enrichmentData !== undefined ||
2227
+ data.status !== undefined,
2228
+ {
2229
+ message: 'At least one field must be provided'
2230
+ }
2225
2231
  )
2226
2232
  ```
2227
2233
 
2228
2234
  ### `AcqCompanyResponseSchema`
2229
2235
 
2230
2236
  ```typescript
2231
- export const AcqCompanyResponseSchema = z.object({
2232
- id: z.string(),
2233
- organizationId: z.string(),
2234
- name: z.string(),
2235
- domain: z.string().nullable(),
2236
- linkedinUrl: z.string().nullable(),
2237
- website: z.string().nullable(),
2238
- numEmployees: z.number().nullable(),
2239
- foundedYear: z.number().nullable(),
2240
- locationCity: z.string().nullable(),
2241
- locationState: z.string().nullable(),
2242
- category: z.string().nullable(),
2243
- categoryPain: z.string().nullable(),
2244
- segment: z.string().nullable(),
2245
- pipelineStatus: z.record(z.string(), z.unknown()).nullable(),
2246
- enrichmentData: z.record(z.string(), z.unknown()).nullable(),
2247
- source: z.string().nullable(),
2248
- batchId: z.string().nullable(),
2249
- status: AcqCompanyStatusSchema,
2250
- contactCount: z.number().int().min(0),
2251
- verticalResearch: z.string().nullable(),
2252
- createdAt: z.string(),
2253
- updatedAt: z.string()
2237
+ export const AcqCompanyResponseSchema = z.object({
2238
+ id: z.string(),
2239
+ organizationId: z.string(),
2240
+ name: z.string(),
2241
+ domain: z.string().nullable(),
2242
+ linkedinUrl: z.string().nullable(),
2243
+ website: z.string().nullable(),
2244
+ numEmployees: z.number().nullable(),
2245
+ foundedYear: z.number().nullable(),
2246
+ locationCity: z.string().nullable(),
2247
+ locationState: z.string().nullable(),
2248
+ category: z.string().nullable(),
2249
+ categoryPain: z.string().nullable(),
2250
+ segment: z.string().nullable(),
2251
+ pipelineStatus: z.record(z.string(), z.unknown()).nullable(),
2252
+ enrichmentData: z.record(z.string(), z.unknown()).nullable(),
2253
+ source: z.string().nullable(),
2254
+ batchId: z.string().nullable(),
2255
+ status: AcqCompanyStatusSchema,
2256
+ contactCount: z.number().int().min(0),
2257
+ verticalResearch: z.string().nullable(),
2258
+ createdAt: z.string(),
2259
+ updatedAt: z.string()
2254
2260
  })
2255
2261
  ```
2256
2262
 
2257
2263
  ### `AcqCompanyListResponseSchema`
2258
2264
 
2259
2265
  ```typescript
2260
- export const AcqCompanyListResponseSchema = z.object({
2261
- data: z.array(AcqCompanyResponseSchema),
2262
- total: z.number().int(),
2263
- limit: z.number().int(),
2264
- offset: z.number().int()
2266
+ export const AcqCompanyListResponseSchema = z.object({
2267
+ data: z.array(AcqCompanyResponseSchema),
2268
+ total: z.number().int(),
2269
+ limit: z.number().int(),
2270
+ offset: z.number().int()
2265
2271
  })
2266
2272
  ```
2267
2273
 
2268
2274
  ### `AcqCompanyFacetsResponseSchema`
2269
2275
 
2270
2276
  ```typescript
2271
- export const AcqCompanyFacetsResponseSchema = z.object({
2272
- segments: z.array(z.string()),
2273
- categories: z.array(z.string()),
2274
- statuses: z.array(AcqCompanyStatusSchema)
2277
+ export const AcqCompanyFacetsResponseSchema = z.object({
2278
+ segments: z.array(z.string()),
2279
+ categories: z.array(z.string()),
2280
+ statuses: z.array(AcqCompanyStatusSchema)
2275
2281
  })
2276
2282
  ```
2277
2283
 
2278
2284
  ### `AcqContactCompanySummarySchema`
2279
2285
 
2280
2286
  ```typescript
2281
- export const AcqContactCompanySummarySchema = z.object({
2282
- id: z.string(),
2283
- name: z.string(),
2284
- domain: z.string().nullable(),
2285
- website: z.string().nullable(),
2286
- linkedinUrl: z.string().nullable(),
2287
- segment: z.string().nullable(),
2288
- category: z.string().nullable(),
2289
- status: AcqCompanyStatusSchema
2287
+ export const AcqContactCompanySummarySchema = z.object({
2288
+ id: z.string(),
2289
+ name: z.string(),
2290
+ domain: z.string().nullable(),
2291
+ website: z.string().nullable(),
2292
+ linkedinUrl: z.string().nullable(),
2293
+ segment: z.string().nullable(),
2294
+ category: z.string().nullable(),
2295
+ status: AcqCompanyStatusSchema
2290
2296
  })
2291
2297
  ```
2292
2298
 
2293
2299
  ### `AcqContactResponseSchema`
2294
2300
 
2295
2301
  ```typescript
2296
- export const AcqContactResponseSchema = z.object({
2297
- id: z.string(),
2298
- organizationId: z.string(),
2299
- companyId: z.string().nullable(),
2300
- email: z.string(),
2301
- emailValid: AcqEmailValidSchema.nullable(),
2302
- firstName: z.string().nullable(),
2303
- lastName: z.string().nullable(),
2304
- linkedinUrl: z.string().nullable(),
2305
- title: z.string().nullable(),
2306
- headline: z.string().nullable(),
2307
- filterReason: z.string().nullable(),
2308
- openingLine: z.string().nullable(),
2309
- source: z.string().nullable(),
2310
- sourceId: z.string().nullable(),
2311
- pipelineStatus: z.record(z.string(), z.unknown()).nullable(),
2312
- enrichmentData: z.record(z.string(), z.unknown()).nullable(),
2313
- attioPersonId: z.string().nullable(),
2314
- batchId: z.string().nullable(),
2315
- status: AcqContactStatusSchema,
2316
- company: AcqContactCompanySummarySchema.nullable().optional(),
2317
- createdAt: z.string(),
2318
- updatedAt: z.string()
2302
+ export const AcqContactResponseSchema = z.object({
2303
+ id: z.string(),
2304
+ organizationId: z.string(),
2305
+ companyId: z.string().nullable(),
2306
+ email: z.string(),
2307
+ emailValid: AcqEmailValidSchema.nullable(),
2308
+ firstName: z.string().nullable(),
2309
+ lastName: z.string().nullable(),
2310
+ linkedinUrl: z.string().nullable(),
2311
+ title: z.string().nullable(),
2312
+ headline: z.string().nullable(),
2313
+ filterReason: z.string().nullable(),
2314
+ openingLine: z.string().nullable(),
2315
+ source: z.string().nullable(),
2316
+ sourceId: z.string().nullable(),
2317
+ pipelineStatus: z.record(z.string(), z.unknown()).nullable(),
2318
+ enrichmentData: z.record(z.string(), z.unknown()).nullable(),
2319
+ attioPersonId: z.string().nullable(),
2320
+ batchId: z.string().nullable(),
2321
+ status: AcqContactStatusSchema,
2322
+ company: AcqContactCompanySummarySchema.nullable().optional(),
2323
+ createdAt: z.string(),
2324
+ updatedAt: z.string()
2319
2325
  })
2320
2326
  ```
2321
2327
 
2322
2328
  ### `AcqContactListResponseSchema`
2323
2329
 
2324
2330
  ```typescript
2325
- export const AcqContactListResponseSchema = z.object({
2326
- data: z.array(AcqContactResponseSchema),
2327
- total: z.number().int(),
2328
- limit: z.number().int(),
2329
- offset: z.number().int()
2331
+ export const AcqContactListResponseSchema = z.object({
2332
+ data: z.array(AcqContactResponseSchema),
2333
+ total: z.number().int(),
2334
+ limit: z.number().int(),
2335
+ offset: z.number().int()
2330
2336
  })
2331
2337
  ```
2332
2338
 
@@ -2339,226 +2345,226 @@ export const AcqArtifactOwnerKindSchema = z.enum(['company', 'contact', 'deal',
2339
2345
  ### `ListArtifactsQuerySchema`
2340
2346
 
2341
2347
  ```typescript
2342
- export const ListArtifactsQuerySchema = z
2343
- .object({
2344
- ownerKind: AcqArtifactOwnerKindSchema,
2345
- ownerId: UuidSchema
2346
- })
2348
+ export const ListArtifactsQuerySchema = z
2349
+ .object({
2350
+ ownerKind: AcqArtifactOwnerKindSchema,
2351
+ ownerId: UuidSchema
2352
+ })
2347
2353
  .strict()
2348
2354
  ```
2349
2355
 
2350
2356
  ### `CreateArtifactRequestSchema`
2351
2357
 
2352
2358
  ```typescript
2353
- export const CreateArtifactRequestSchema = z
2354
- .object({
2355
- ownerKind: AcqArtifactOwnerKindSchema,
2356
- ownerId: UuidSchema,
2357
- kind: z.string().trim().min(1).max(255),
2358
- content: z.record(z.string(), z.unknown()),
2359
- sourceExecutionId: UuidSchema.optional()
2360
- })
2359
+ export const CreateArtifactRequestSchema = z
2360
+ .object({
2361
+ ownerKind: AcqArtifactOwnerKindSchema,
2362
+ ownerId: UuidSchema,
2363
+ kind: z.string().trim().min(1).max(255),
2364
+ content: z.record(z.string(), z.unknown()),
2365
+ sourceExecutionId: UuidSchema.optional()
2366
+ })
2361
2367
  .strict()
2362
2368
  ```
2363
2369
 
2364
2370
  ### `AcqArtifactResponseSchema`
2365
2371
 
2366
2372
  ```typescript
2367
- export const AcqArtifactResponseSchema = z.object({
2368
- id: z.string(),
2369
- organizationId: z.string(),
2370
- ownerKind: z.string(),
2371
- ownerId: z.string(),
2372
- kind: z.string(),
2373
- content: z.record(z.string(), z.unknown()),
2374
- sourceExecutionId: z.string().nullable(),
2375
- createdBy: z.string().nullable(),
2376
- createdAt: z.string(),
2377
- version: z.number().int()
2373
+ export const AcqArtifactResponseSchema = z.object({
2374
+ id: z.string(),
2375
+ organizationId: z.string(),
2376
+ ownerKind: z.string(),
2377
+ ownerId: z.string(),
2378
+ kind: z.string(),
2379
+ content: z.record(z.string(), z.unknown()),
2380
+ sourceExecutionId: z.string().nullable(),
2381
+ createdBy: z.string().nullable(),
2382
+ createdAt: z.string(),
2383
+ version: z.number().int()
2378
2384
  })
2379
2385
  ```
2380
2386
 
2381
2387
  ### `AcqArtifactListResponseSchema`
2382
2388
 
2383
2389
  ```typescript
2384
- export const AcqArtifactListResponseSchema = z.object({
2385
- artifacts: z.array(AcqArtifactResponseSchema)
2390
+ export const AcqArtifactListResponseSchema = z.object({
2391
+ artifacts: z.array(AcqArtifactResponseSchema)
2386
2392
  })
2387
2393
  ```
2388
2394
 
2389
2395
  ### `ListMembersQuerySchema`
2390
2396
 
2391
2397
  ```typescript
2392
- export const ListMembersQuerySchema = z
2393
- .object({
2394
- limit: z.coerce.number().int().min(1).max(500).default(50),
2395
- offset: z.coerce.number().int().min(0).default(0)
2396
- })
2398
+ export const ListMembersQuerySchema = z
2399
+ .object({
2400
+ limit: z.coerce.number().int().min(1).max(500).default(50),
2401
+ offset: z.coerce.number().int().min(0).default(0)
2402
+ })
2397
2403
  .strict()
2398
2404
  ```
2399
2405
 
2400
2406
  ### `MemberIdParamsSchema`
2401
2407
 
2402
2408
  ```typescript
2403
- export const MemberIdParamsSchema = z.object({
2404
- memberId: UuidSchema
2409
+ export const MemberIdParamsSchema = z.object({
2410
+ memberId: UuidSchema
2405
2411
  })
2406
2412
  ```
2407
2413
 
2408
2414
  ### `AcqListMemberContactSummarySchema`
2409
2415
 
2410
2416
  ```typescript
2411
- export const AcqListMemberContactSummarySchema = z.object({
2412
- id: z.string(),
2413
- email: z.string(),
2414
- firstName: z.string().nullable(),
2415
- lastName: z.string().nullable(),
2416
- title: z.string().nullable(),
2417
- linkedinUrl: z.string().nullable(),
2418
- companyId: z.string().nullable()
2417
+ export const AcqListMemberContactSummarySchema = z.object({
2418
+ id: z.string(),
2419
+ email: z.string(),
2420
+ firstName: z.string().nullable(),
2421
+ lastName: z.string().nullable(),
2422
+ title: z.string().nullable(),
2423
+ linkedinUrl: z.string().nullable(),
2424
+ companyId: z.string().nullable()
2419
2425
  })
2420
2426
  ```
2421
2427
 
2422
2428
  ### `AcqListMemberResponseSchema`
2423
2429
 
2424
2430
  ```typescript
2425
- export const AcqListMemberResponseSchema = z.object({
2426
- id: z.string(),
2427
- listId: z.string(),
2428
- contactId: z.string(),
2429
- pipelineKey: z.string(),
2430
- stageKey: z.string(),
2431
- stateKey: z.string(),
2432
- activityLog: z.unknown(),
2433
- addedAt: z.string(),
2434
- addedBy: z.string().nullable(),
2435
- sourceExecutionId: z.string().nullable(),
2436
- contact: AcqListMemberContactSummarySchema.nullable()
2431
+ export const AcqListMemberResponseSchema = z.object({
2432
+ id: z.string(),
2433
+ listId: z.string(),
2434
+ contactId: z.string(),
2435
+ pipelineKey: z.string(),
2436
+ stageKey: z.string(),
2437
+ stateKey: z.string(),
2438
+ activityLog: z.unknown(),
2439
+ addedAt: z.string(),
2440
+ addedBy: z.string().nullable(),
2441
+ sourceExecutionId: z.string().nullable(),
2442
+ contact: AcqListMemberContactSummarySchema.nullable()
2437
2443
  })
2438
2444
  ```
2439
2445
 
2440
2446
  ### `AcqListMembersResponseSchema`
2441
2447
 
2442
2448
  ```typescript
2443
- export const AcqListMembersResponseSchema = z.object({
2444
- members: z.array(AcqListMemberResponseSchema)
2449
+ export const AcqListMembersResponseSchema = z.object({
2450
+ members: z.array(AcqListMemberResponseSchema)
2445
2451
  })
2446
2452
  ```
2447
2453
 
2448
2454
  ### `ListCompanyIdParamsSchema`
2449
2455
 
2450
2456
  ```typescript
2451
- export const ListCompanyIdParamsSchema = z.object({
2452
- listCompanyId: UuidSchema
2457
+ export const ListCompanyIdParamsSchema = z.object({
2458
+ listCompanyId: UuidSchema
2453
2459
  })
2454
2460
  ```
2455
2461
 
2456
2462
  ### `AcqListCompanyResponseSchema`
2457
2463
 
2458
2464
  ```typescript
2459
- export const AcqListCompanyResponseSchema = z.object({
2460
- id: z.string(),
2461
- listId: z.string(),
2462
- companyId: z.string(),
2463
- pipelineKey: z.string(),
2464
- stageKey: z.string(),
2465
- stateKey: z.string(),
2466
- activityLog: z.unknown(),
2467
- addedAt: z.string(),
2468
- addedBy: z.string().nullable(),
2469
- sourceExecutionId: z.string().nullable()
2465
+ export const AcqListCompanyResponseSchema = z.object({
2466
+ id: z.string(),
2467
+ listId: z.string(),
2468
+ companyId: z.string(),
2469
+ pipelineKey: z.string(),
2470
+ stageKey: z.string(),
2471
+ stateKey: z.string(),
2472
+ activityLog: z.unknown(),
2473
+ addedAt: z.string(),
2474
+ addedBy: z.string().nullable(),
2475
+ sourceExecutionId: z.string().nullable()
2470
2476
  })
2471
2477
  ```
2472
2478
 
2473
2479
  ### `AcqCompanySchemas`
2474
2480
 
2475
2481
  ```typescript
2476
- export const AcqCompanySchemas = {
2477
- CompanyIdParams: CompanyIdParamsSchema,
2478
- ListCompaniesQuery: ListCompaniesQuerySchema,
2479
- CreateCompanyRequest: CreateCompanyRequestSchema,
2480
- UpdateCompanyRequest: UpdateCompanyRequestSchema,
2481
- AcqCompanyResponse: AcqCompanyResponseSchema,
2482
- AcqCompanyListResponse: AcqCompanyListResponseSchema,
2483
- AcqCompanyFacetsResponse: AcqCompanyFacetsResponseSchema
2482
+ export const AcqCompanySchemas = {
2483
+ CompanyIdParams: CompanyIdParamsSchema,
2484
+ ListCompaniesQuery: ListCompaniesQuerySchema,
2485
+ CreateCompanyRequest: CreateCompanyRequestSchema,
2486
+ UpdateCompanyRequest: UpdateCompanyRequestSchema,
2487
+ AcqCompanyResponse: AcqCompanyResponseSchema,
2488
+ AcqCompanyListResponse: AcqCompanyListResponseSchema,
2489
+ AcqCompanyFacetsResponse: AcqCompanyFacetsResponseSchema
2484
2490
  }
2485
2491
  ```
2486
2492
 
2487
2493
  ### `AcqContactSchemas`
2488
2494
 
2489
2495
  ```typescript
2490
- export const AcqContactSchemas = {
2491
- ContactIdParams: ContactIdParamsSchema,
2492
- ListContactsQuery: ListContactsQuerySchema,
2493
- CreateContactRequest: CreateContactRequestSchema,
2494
- UpdateContactRequest: UpdateContactRequestSchema,
2495
- AcqContactResponse: AcqContactResponseSchema,
2496
- AcqContactListResponse: AcqContactListResponseSchema
2496
+ export const AcqContactSchemas = {
2497
+ ContactIdParams: ContactIdParamsSchema,
2498
+ ListContactsQuery: ListContactsQuerySchema,
2499
+ CreateContactRequest: CreateContactRequestSchema,
2500
+ UpdateContactRequest: UpdateContactRequestSchema,
2501
+ AcqContactResponse: AcqContactResponseSchema,
2502
+ AcqContactListResponse: AcqContactListResponseSchema
2497
2503
  }
2498
2504
  ```
2499
2505
 
2500
2506
  ### `AcqListSchemas`
2501
2507
 
2502
2508
  ```typescript
2503
- export const AcqListSchemas = {
2504
- // Params
2505
- ListIdParams: ListIdParamsSchema,
2506
-
2507
- // Primitives (for UI / tests)
2508
- ListStatus: ListStatusSchema,
2509
- ScrapingConfig: ScrapingConfigSchema,
2510
- IcpRubric: IcpRubricSchema,
2511
- PipelineConfig: PipelineConfigSchema,
2512
- PipelineStage: PipelineStageSchema,
2513
- BuildPlanSnapshot: BuildPlanSnapshotSchema,
2514
- BuildPlanSnapshotStep: BuildPlanSnapshotStepSchema,
2515
- AcqListMetadata: AcqListMetadataSchema,
2516
- ProcessingStageStatus: ProcessingStageStatusSchema,
2517
- ListStageCounts: ListStageCountsSchema,
2518
- ListTelemetry: ListTelemetrySchema,
2519
-
2520
- // Requests
2521
- CreateListRequest: CreateListRequestSchema,
2522
- UpdateListRequest: UpdateListRequestSchema,
2523
- UpdateListStatusRequest: UpdateListStatusRequestSchema,
2524
- UpdateListConfigRequest: UpdateListConfigRequestSchema,
2525
- AddCompaniesToListRequest: AddCompaniesToListRequestSchema,
2526
- RemoveCompaniesFromListRequest: RemoveCompaniesFromListRequestSchema,
2527
- AddContactsToListRequest: AddContactsToListRequestSchema,
2528
- RecordListExecutionRequest: RecordListExecutionRequestSchema,
2529
-
2530
- // Responses
2531
- AcqListResponse: AcqListResponseSchema,
2532
- AcqListListResponse: AcqListListResponseSchema,
2533
- ListTelemetryResponse: ListTelemetryResponseSchema,
2534
- ListTelemetryListResponse: ListTelemetryListResponseSchema,
2535
- ListExecutionsResponse: ListExecutionsResponseSchema,
2536
- ListProgressResponse: ListProgressResponseSchema
2509
+ export const AcqListSchemas = {
2510
+ // Params
2511
+ ListIdParams: ListIdParamsSchema,
2512
+
2513
+ // Primitives (for UI / tests)
2514
+ ListStatus: ListStatusSchema,
2515
+ ScrapingConfig: ScrapingConfigSchema,
2516
+ IcpRubric: IcpRubricSchema,
2517
+ PipelineConfig: PipelineConfigSchema,
2518
+ PipelineStage: PipelineStageSchema,
2519
+ BuildPlanSnapshot: BuildPlanSnapshotSchema,
2520
+ BuildPlanSnapshotStep: BuildPlanSnapshotStepSchema,
2521
+ AcqListMetadata: AcqListMetadataSchema,
2522
+ ProcessingStageStatus: ProcessingStageStatusSchema,
2523
+ ListStageCounts: ListStageCountsSchema,
2524
+ ListTelemetry: ListTelemetrySchema,
2525
+
2526
+ // Requests
2527
+ CreateListRequest: CreateListRequestSchema,
2528
+ UpdateListRequest: UpdateListRequestSchema,
2529
+ UpdateListStatusRequest: UpdateListStatusRequestSchema,
2530
+ UpdateListConfigRequest: UpdateListConfigRequestSchema,
2531
+ AddCompaniesToListRequest: AddCompaniesToListRequestSchema,
2532
+ RemoveCompaniesFromListRequest: RemoveCompaniesFromListRequestSchema,
2533
+ AddContactsToListRequest: AddContactsToListRequestSchema,
2534
+ RecordListExecutionRequest: RecordListExecutionRequestSchema,
2535
+
2536
+ // Responses
2537
+ AcqListResponse: AcqListResponseSchema,
2538
+ AcqListListResponse: AcqListListResponseSchema,
2539
+ ListTelemetryResponse: ListTelemetryResponseSchema,
2540
+ ListTelemetryListResponse: ListTelemetryListResponseSchema,
2541
+ ListExecutionsResponse: ListExecutionsResponseSchema,
2542
+ ListProgressResponse: ListProgressResponseSchema
2537
2543
  }
2538
2544
  ```
2539
2545
 
2540
2546
  ### `AcqSubstrateSchemas`
2541
2547
 
2542
2548
  ```typescript
2543
- export const AcqSubstrateSchemas = {
2544
- // Artifacts
2545
- ListArtifactsQuery: ListArtifactsQuerySchema,
2546
- CreateArtifactRequest: CreateArtifactRequestSchema,
2547
- AcqArtifactResponse: AcqArtifactResponseSchema,
2548
- AcqArtifactListResponse: AcqArtifactListResponseSchema,
2549
-
2550
- // List members
2551
- ListMembersQuery: ListMembersQuerySchema,
2552
- MemberIdParams: MemberIdParamsSchema,
2553
- AcqListMemberResponse: AcqListMemberResponseSchema,
2554
- AcqListMembersResponse: AcqListMembersResponseSchema,
2555
-
2556
- // List companies
2557
- ListCompanyIdParams: ListCompanyIdParamsSchema,
2558
- AcqListCompanyResponse: AcqListCompanyResponseSchema,
2559
-
2560
- // Transition (shared with deals — TransitionItemRequestSchema)
2561
- TransitionItemRequest: TransitionItemRequestSchema
2549
+ export const AcqSubstrateSchemas = {
2550
+ // Artifacts
2551
+ ListArtifactsQuery: ListArtifactsQuerySchema,
2552
+ CreateArtifactRequest: CreateArtifactRequestSchema,
2553
+ AcqArtifactResponse: AcqArtifactResponseSchema,
2554
+ AcqArtifactListResponse: AcqArtifactListResponseSchema,
2555
+
2556
+ // List members
2557
+ ListMembersQuery: ListMembersQuerySchema,
2558
+ MemberIdParams: MemberIdParamsSchema,
2559
+ AcqListMemberResponse: AcqListMemberResponseSchema,
2560
+ AcqListMembersResponse: AcqListMembersResponseSchema,
2561
+
2562
+ // List companies
2563
+ ListCompanyIdParams: ListCompanyIdParamsSchema,
2564
+ AcqListCompanyResponse: AcqListCompanyResponseSchema,
2565
+
2566
+ // Transition (shared with deals — TransitionItemRequestSchema)
2567
+ TransitionItemRequest: TransitionItemRequestSchema
2562
2568
  }
2563
2569
  ```
2564
2570
 
@@ -3321,6 +3327,7 @@ export const OrgKnowledgeNodeSchema = z.object({
3321
3327
  kind: OrgKnowledgeKindSchema,
3322
3328
  title: z.string().trim().min(1).max(200),
3323
3329
  summary: z.string().trim().min(1).max(1000),
3330
+ icon: IconNameSchema.optional(),
3324
3331
  /** Raw MDX string. Phase 2 will introduce a structured block format. */
3325
3332
  body: z.string().trim().min(1),
3326
3333
  /**