@elevasis/core 0.20.0 → 0.22.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 +524 -6
- package/dist/index.js +417 -42
- package/dist/knowledge/index.d.ts +151 -1
- package/dist/organization-model/index.d.ts +524 -6
- package/dist/organization-model/index.js +417 -42
- package/dist/test-utils/index.d.ts +270 -1
- package/dist/test-utils/index.js +407 -41
- package/package.json +5 -5
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +501 -303
- package/src/auth/multi-tenancy/permissions.ts +20 -8
- package/src/business/README.md +2 -2
- package/src/business/acquisition/api-schemas.test.ts +198 -0
- package/src/business/acquisition/api-schemas.ts +250 -9
- package/src/business/acquisition/build-templates.test.ts +28 -0
- package/src/business/acquisition/build-templates.ts +20 -8
- package/src/business/acquisition/index.ts +12 -0
- package/src/business/acquisition/types.ts +6 -1
- package/src/business/clients/api-schemas.test.ts +115 -0
- package/src/business/clients/api-schemas.ts +158 -0
- package/src/business/clients/index.ts +1 -0
- package/src/business/deals/api-schemas.ts +8 -0
- package/src/business/index.ts +5 -2
- package/src/business/projects/types.ts +19 -0
- package/src/execution/engine/__tests__/fixtures/test-agents.ts +10 -8
- package/src/execution/engine/agent/core/__tests__/agent.test.ts +16 -12
- package/src/execution/engine/agent/core/__tests__/error-passthrough.test.ts +4 -3
- package/src/execution/engine/agent/core/types.ts +25 -15
- package/src/execution/engine/agent/index.ts +6 -4
- package/src/execution/engine/agent/reasoning/__tests__/request-builder.test.ts +24 -18
- package/src/execution/engine/index.ts +3 -0
- package/src/execution/engine/tools/integration/server/adapters/apify/apify-adapter.test.ts +55 -0
- package/src/execution/engine/tools/integration/server/adapters/apify/apify-adapter.ts +107 -41
- package/src/execution/engine/tools/integration/server/adapters/apollo/apollo-adapter.test.ts +48 -0
- package/src/execution/engine/tools/integration/server/adapters/apollo/apollo-adapter.ts +99 -0
- package/src/execution/engine/tools/integration/server/adapters/apollo/index.ts +1 -0
- package/src/execution/engine/tools/integration/server/adapters/clickup/clickup-adapter.test.ts +18 -0
- package/src/execution/engine/tools/integration/server/adapters/clickup/clickup-adapter.ts +194 -0
- package/src/execution/engine/tools/integration/server/adapters/clickup/index.ts +7 -0
- package/src/execution/engine/workflow/types.ts +7 -0
- package/src/integrations/credentials/api-schemas.ts +21 -2
- package/src/integrations/credentials/schemas.ts +200 -164
- package/src/organization-model/README.md +10 -3
- package/src/organization-model/__tests__/defaults.test.ts +6 -0
- package/src/organization-model/__tests__/domains/resources.test.ts +188 -0
- package/src/organization-model/__tests__/domains/roles.test.ts +402 -347
- package/src/organization-model/__tests__/domains/systems.test.ts +193 -0
- package/src/organization-model/__tests__/knowledge.test.ts +39 -0
- package/src/organization-model/__tests__/prospecting-ssot.test.ts +7 -4
- package/src/organization-model/__tests__/resolve.test.ts +1 -1
- package/src/organization-model/defaults.ts +24 -3
- package/src/organization-model/domains/knowledge.ts +3 -2
- package/src/organization-model/domains/prospecting.ts +182 -25
- package/src/organization-model/domains/resources.ts +88 -0
- package/src/organization-model/domains/roles.ts +93 -55
- package/src/organization-model/domains/sales.ts +24 -3
- package/src/organization-model/domains/systems.ts +46 -0
- package/src/organization-model/icons.ts +1 -0
- package/src/organization-model/index.ts +2 -0
- package/src/organization-model/organization-model.mdx +33 -14
- package/src/organization-model/published.ts +52 -1
- package/src/organization-model/schema.ts +121 -0
- package/src/organization-model/types.ts +46 -1
- package/src/platform/api/types.ts +38 -35
- package/src/platform/constants/versions.ts +1 -1
- package/src/platform/registry/__tests__/resource-registry.test.ts +2051 -2005
- package/src/platform/registry/__tests__/validation.test.ts +1343 -1086
- package/src/platform/registry/index.ts +14 -0
- package/src/platform/registry/resource-registry.ts +40 -2
- package/src/platform/registry/serialization.ts +241 -202
- package/src/platform/registry/serialized-types.ts +1 -0
- package/src/platform/registry/types.ts +411 -361
- package/src/platform/registry/validation.ts +743 -513
- package/src/projects/api-schemas.ts +290 -267
- package/src/reference/_generated/contracts.md +501 -303
- package/src/reference/glossary.md +8 -3
- package/src/server.ts +2 -0
- package/src/supabase/database.types.ts +121 -0
|
@@ -51,6 +51,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
|
|
|
51
51
|
"knowledge.reference": "knowledge.reference";
|
|
52
52
|
"feature.dashboard": "feature.dashboard";
|
|
53
53
|
"feature.calendar": "feature.calendar";
|
|
54
|
+
"feature.business": "feature.business";
|
|
54
55
|
"feature.sales": "feature.sales";
|
|
55
56
|
"feature.crm": "feature.crm";
|
|
56
57
|
"feature.finance": "feature.finance";
|
|
@@ -129,6 +130,7 @@ declare const OrganizationModelIconTokenSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
|
129
130
|
"knowledge.reference": "knowledge.reference";
|
|
130
131
|
"feature.dashboard": "feature.dashboard";
|
|
131
132
|
"feature.calendar": "feature.calendar";
|
|
133
|
+
"feature.business": "feature.business";
|
|
132
134
|
"feature.sales": "feature.sales";
|
|
133
135
|
"feature.crm": "feature.crm";
|
|
134
136
|
"feature.finance": "feature.finance";
|
|
@@ -205,6 +207,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
205
207
|
"knowledge.reference": "knowledge.reference";
|
|
206
208
|
"feature.dashboard": "feature.dashboard";
|
|
207
209
|
"feature.calendar": "feature.calendar";
|
|
210
|
+
"feature.business": "feature.business";
|
|
208
211
|
"feature.sales": "feature.sales";
|
|
209
212
|
"feature.crm": "feature.crm";
|
|
210
213
|
"feature.finance": "feature.finance";
|
|
@@ -306,6 +309,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
306
309
|
"knowledge.reference": "knowledge.reference";
|
|
307
310
|
"feature.dashboard": "feature.dashboard";
|
|
308
311
|
"feature.calendar": "feature.calendar";
|
|
312
|
+
"feature.business": "feature.business";
|
|
309
313
|
"feature.sales": "feature.sales";
|
|
310
314
|
"feature.crm": "feature.crm";
|
|
311
315
|
"feature.finance": "feature.finance";
|
|
@@ -398,6 +402,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
398
402
|
"knowledge.reference": "knowledge.reference";
|
|
399
403
|
"feature.dashboard": "feature.dashboard";
|
|
400
404
|
"feature.calendar": "feature.calendar";
|
|
405
|
+
"feature.business": "feature.business";
|
|
401
406
|
"feature.sales": "feature.sales";
|
|
402
407
|
"feature.crm": "feature.crm";
|
|
403
408
|
"feature.finance": "feature.finance";
|
|
@@ -487,6 +492,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
487
492
|
"knowledge.reference": "knowledge.reference";
|
|
488
493
|
"feature.dashboard": "feature.dashboard";
|
|
489
494
|
"feature.calendar": "feature.calendar";
|
|
495
|
+
"feature.business": "feature.business";
|
|
490
496
|
"feature.sales": "feature.sales";
|
|
491
497
|
"feature.crm": "feature.crm";
|
|
492
498
|
"feature.finance": "feature.finance";
|
|
@@ -560,6 +566,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
560
566
|
"knowledge.reference": "knowledge.reference";
|
|
561
567
|
"feature.dashboard": "feature.dashboard";
|
|
562
568
|
"feature.calendar": "feature.calendar";
|
|
569
|
+
"feature.business": "feature.business";
|
|
563
570
|
"feature.sales": "feature.sales";
|
|
564
571
|
"feature.crm": "feature.crm";
|
|
565
572
|
"feature.finance": "feature.finance";
|
|
@@ -634,6 +641,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
634
641
|
"knowledge.reference": "knowledge.reference";
|
|
635
642
|
"feature.dashboard": "feature.dashboard";
|
|
636
643
|
"feature.calendar": "feature.calendar";
|
|
644
|
+
"feature.business": "feature.business";
|
|
637
645
|
"feature.sales": "feature.sales";
|
|
638
646
|
"feature.crm": "feature.crm";
|
|
639
647
|
"feature.finance": "feature.finance";
|
|
@@ -705,6 +713,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
705
713
|
"knowledge.reference": "knowledge.reference";
|
|
706
714
|
"feature.dashboard": "feature.dashboard";
|
|
707
715
|
"feature.calendar": "feature.calendar";
|
|
716
|
+
"feature.business": "feature.business";
|
|
708
717
|
"feature.sales": "feature.sales";
|
|
709
718
|
"feature.crm": "feature.crm";
|
|
710
719
|
"feature.finance": "feature.finance";
|
|
@@ -764,11 +773,65 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
764
773
|
export: "export";
|
|
765
774
|
}>>;
|
|
766
775
|
stageKey: z.ZodString;
|
|
776
|
+
recordEntity: z.ZodOptional<z.ZodEnum<{
|
|
777
|
+
company: "company";
|
|
778
|
+
contact: "contact";
|
|
779
|
+
}>>;
|
|
780
|
+
recordsStageKey: z.ZodOptional<z.ZodString>;
|
|
781
|
+
recordSourceStageKey: z.ZodOptional<z.ZodString>;
|
|
767
782
|
dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
768
783
|
dependencyMode: z.ZodLiteral<"per-record-eligibility">;
|
|
769
784
|
capabilityKey: z.ZodString;
|
|
770
785
|
defaultBatchSize: z.ZodNumber;
|
|
771
786
|
maxBatchSize: z.ZodNumber;
|
|
787
|
+
recordColumns: z.ZodOptional<z.ZodObject<{
|
|
788
|
+
company: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
789
|
+
key: z.ZodString;
|
|
790
|
+
label: z.ZodString;
|
|
791
|
+
path: z.ZodString;
|
|
792
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
793
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
794
|
+
text: "text";
|
|
795
|
+
badge: "badge";
|
|
796
|
+
datetime: "datetime";
|
|
797
|
+
count: "count";
|
|
798
|
+
json: "json";
|
|
799
|
+
}>>;
|
|
800
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
801
|
+
}, z.core.$strip>>>;
|
|
802
|
+
contact: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
803
|
+
key: z.ZodString;
|
|
804
|
+
label: z.ZodString;
|
|
805
|
+
path: z.ZodString;
|
|
806
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
807
|
+
renderType: z.ZodOptional<z.ZodEnum<{
|
|
808
|
+
text: "text";
|
|
809
|
+
badge: "badge";
|
|
810
|
+
datetime: "datetime";
|
|
811
|
+
count: "count";
|
|
812
|
+
json: "json";
|
|
813
|
+
}>>;
|
|
814
|
+
badgeColor: z.ZodOptional<z.ZodString>;
|
|
815
|
+
}, z.core.$strip>>>;
|
|
816
|
+
}, z.core.$strip>>;
|
|
817
|
+
credentialRequirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
818
|
+
key: z.ZodString;
|
|
819
|
+
provider: z.ZodString;
|
|
820
|
+
credentialType: z.ZodEnum<{
|
|
821
|
+
"api-key": "api-key";
|
|
822
|
+
"api-key-secret": "api-key-secret";
|
|
823
|
+
oauth: "oauth";
|
|
824
|
+
"webhook-secret": "webhook-secret";
|
|
825
|
+
}>;
|
|
826
|
+
label: z.ZodString;
|
|
827
|
+
required: z.ZodBoolean;
|
|
828
|
+
selectionMode: z.ZodOptional<z.ZodEnum<{
|
|
829
|
+
single: "single";
|
|
830
|
+
multiple: "multiple";
|
|
831
|
+
}>>;
|
|
832
|
+
inputPath: z.ZodString;
|
|
833
|
+
verifyOnRun: z.ZodOptional<z.ZodBoolean>;
|
|
834
|
+
}, z.core.$strip>>>;
|
|
772
835
|
}, z.core.$strip>>;
|
|
773
836
|
}, z.core.$strip>>;
|
|
774
837
|
}, z.core.$strip>;
|
|
@@ -798,6 +861,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
798
861
|
"knowledge.reference": "knowledge.reference";
|
|
799
862
|
"feature.dashboard": "feature.dashboard";
|
|
800
863
|
"feature.calendar": "feature.calendar";
|
|
864
|
+
"feature.business": "feature.business";
|
|
801
865
|
"feature.sales": "feature.sales";
|
|
802
866
|
"feature.crm": "feature.crm";
|
|
803
867
|
"feature.finance": "feature.finance";
|
|
@@ -871,6 +935,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
871
935
|
"knowledge.reference": "knowledge.reference";
|
|
872
936
|
"feature.dashboard": "feature.dashboard";
|
|
873
937
|
"feature.calendar": "feature.calendar";
|
|
938
|
+
"feature.business": "feature.business";
|
|
874
939
|
"feature.sales": "feature.sales";
|
|
875
940
|
"feature.crm": "feature.crm";
|
|
876
941
|
"feature.finance": "feature.finance";
|
|
@@ -944,6 +1009,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
944
1009
|
"knowledge.reference": "knowledge.reference";
|
|
945
1010
|
"feature.dashboard": "feature.dashboard";
|
|
946
1011
|
"feature.calendar": "feature.calendar";
|
|
1012
|
+
"feature.business": "feature.business";
|
|
947
1013
|
"feature.sales": "feature.sales";
|
|
948
1014
|
"feature.crm": "feature.crm";
|
|
949
1015
|
"feature.finance": "feature.finance";
|
|
@@ -1076,7 +1142,26 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
1076
1142
|
title: z.ZodString;
|
|
1077
1143
|
responsibilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1078
1144
|
reportsToId: z.ZodOptional<z.ZodString>;
|
|
1079
|
-
heldBy: z.ZodOptional<z.
|
|
1145
|
+
heldBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1146
|
+
kind: z.ZodLiteral<"human">;
|
|
1147
|
+
userId: z.ZodString;
|
|
1148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1149
|
+
kind: z.ZodLiteral<"agent">;
|
|
1150
|
+
agentId: z.ZodString;
|
|
1151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1152
|
+
kind: z.ZodLiteral<"team">;
|
|
1153
|
+
memberIds: z.ZodArray<z.ZodString>;
|
|
1154
|
+
}, z.core.$strip>], "kind">, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1155
|
+
kind: z.ZodLiteral<"human">;
|
|
1156
|
+
userId: z.ZodString;
|
|
1157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1158
|
+
kind: z.ZodLiteral<"agent">;
|
|
1159
|
+
agentId: z.ZodString;
|
|
1160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1161
|
+
kind: z.ZodLiteral<"team">;
|
|
1162
|
+
memberIds: z.ZodArray<z.ZodString>;
|
|
1163
|
+
}, z.core.$strip>], "kind">>]>>;
|
|
1164
|
+
responsibleFor: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1080
1165
|
}, z.core.$strip>>>;
|
|
1081
1166
|
}, z.core.$strip>>;
|
|
1082
1167
|
goals: z.ZodDefault<z.ZodObject<{
|
|
@@ -1094,6 +1179,70 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
1094
1179
|
}, z.core.$strip>>>;
|
|
1095
1180
|
}, z.core.$strip>>>;
|
|
1096
1181
|
}, z.core.$strip>>;
|
|
1182
|
+
systems: z.ZodDefault<z.ZodObject<{
|
|
1183
|
+
systems: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1184
|
+
id: z.ZodString;
|
|
1185
|
+
title: z.ZodString;
|
|
1186
|
+
description: z.ZodString;
|
|
1187
|
+
kind: z.ZodEnum<{
|
|
1188
|
+
platform: "platform";
|
|
1189
|
+
product: "product";
|
|
1190
|
+
operational: "operational";
|
|
1191
|
+
diagnostic: "diagnostic";
|
|
1192
|
+
}>;
|
|
1193
|
+
responsibleRoleId: z.ZodOptional<z.ZodString>;
|
|
1194
|
+
governedByKnowledge: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1195
|
+
drivesGoals: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1196
|
+
status: z.ZodEnum<{
|
|
1197
|
+
active: "active";
|
|
1198
|
+
deprecated: "deprecated";
|
|
1199
|
+
archived: "archived";
|
|
1200
|
+
}>;
|
|
1201
|
+
}, z.core.$strip>>>;
|
|
1202
|
+
}, z.core.$strip>>;
|
|
1203
|
+
resources: z.ZodDefault<z.ZodObject<{
|
|
1204
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1205
|
+
id: z.ZodString;
|
|
1206
|
+
systemId: z.ZodString;
|
|
1207
|
+
ownerRoleId: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
status: z.ZodEnum<{
|
|
1209
|
+
active: "active";
|
|
1210
|
+
deprecated: "deprecated";
|
|
1211
|
+
archived: "archived";
|
|
1212
|
+
}>;
|
|
1213
|
+
kind: z.ZodLiteral<"workflow">;
|
|
1214
|
+
capabilityKey: z.ZodOptional<z.ZodString>;
|
|
1215
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1216
|
+
id: z.ZodString;
|
|
1217
|
+
systemId: z.ZodString;
|
|
1218
|
+
ownerRoleId: z.ZodOptional<z.ZodString>;
|
|
1219
|
+
status: z.ZodEnum<{
|
|
1220
|
+
active: "active";
|
|
1221
|
+
deprecated: "deprecated";
|
|
1222
|
+
archived: "archived";
|
|
1223
|
+
}>;
|
|
1224
|
+
kind: z.ZodLiteral<"agent">;
|
|
1225
|
+
agentKind: z.ZodEnum<{
|
|
1226
|
+
orchestrator: "orchestrator";
|
|
1227
|
+
specialist: "specialist";
|
|
1228
|
+
utility: "utility";
|
|
1229
|
+
system: "system";
|
|
1230
|
+
}>;
|
|
1231
|
+
actsAsRoleId: z.ZodOptional<z.ZodString>;
|
|
1232
|
+
sessionCapable: z.ZodBoolean;
|
|
1233
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1234
|
+
id: z.ZodString;
|
|
1235
|
+
systemId: z.ZodString;
|
|
1236
|
+
ownerRoleId: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
status: z.ZodEnum<{
|
|
1238
|
+
active: "active";
|
|
1239
|
+
deprecated: "deprecated";
|
|
1240
|
+
archived: "archived";
|
|
1241
|
+
}>;
|
|
1242
|
+
kind: z.ZodLiteral<"integration">;
|
|
1243
|
+
provider: z.ZodString;
|
|
1244
|
+
}, z.core.$strip>], "kind">>>;
|
|
1245
|
+
}, z.core.$strip>>;
|
|
1097
1246
|
statuses: z.ZodDefault<z.ZodObject<{
|
|
1098
1247
|
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1099
1248
|
id: z.ZodString;
|
|
@@ -1154,6 +1303,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
1154
1303
|
"knowledge.reference": "knowledge.reference";
|
|
1155
1304
|
"feature.dashboard": "feature.dashboard";
|
|
1156
1305
|
"feature.calendar": "feature.calendar";
|
|
1306
|
+
"feature.business": "feature.business";
|
|
1157
1307
|
"feature.sales": "feature.sales";
|
|
1158
1308
|
"feature.crm": "feature.crm";
|
|
1159
1309
|
"feature.finance": "feature.finance";
|