@elevasis/core 0.15.1 → 0.16.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.
Files changed (68) hide show
  1. package/dist/index.d.ts +1662 -23
  2. package/dist/index.js +171 -24
  3. package/dist/organization-model/index.d.ts +1662 -23
  4. package/dist/organization-model/index.js +171 -24
  5. package/dist/test-utils/index.d.ts +711 -10
  6. package/dist/test-utils/index.js +159 -16
  7. package/package.json +7 -3
  8. package/src/__tests__/publish.test.ts +14 -13
  9. package/src/__tests__/template-core-compatibility.test.ts +4 -4
  10. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +305 -201
  11. package/src/auth/multi-tenancy/index.ts +3 -0
  12. package/src/auth/multi-tenancy/theme-presets.ts +45 -0
  13. package/src/auth/multi-tenancy/types.ts +57 -83
  14. package/src/auth/multi-tenancy/users/api-schemas.ts +165 -194
  15. package/src/business/acquisition/activity-events.ts +1 -1
  16. package/src/business/acquisition/api-schemas.ts +1196 -1177
  17. package/src/business/acquisition/crm-state-actions.test.ts +139 -139
  18. package/src/business/acquisition/types.ts +381 -390
  19. package/src/business/crm/api-schemas.ts +40 -0
  20. package/src/business/crm/index.ts +1 -0
  21. package/src/business/deals/api-schemas.ts +79 -0
  22. package/src/business/deals/index.ts +1 -0
  23. package/src/business/projects/types.ts +124 -88
  24. package/src/execution/core/runner-types.ts +61 -80
  25. package/src/execution/engine/tools/integration/server/adapters/gmail/gmail-tools.ts +105 -104
  26. package/src/execution/engine/tools/integration/server/adapters/instantly/instantly-tools.ts +1474 -1473
  27. package/src/execution/engine/tools/integration/server/adapters/millionverifier/millionverifier-tools.ts +103 -102
  28. package/src/execution/engine/tools/integration/server/adapters/signature-api/signature-api-tools.ts +182 -179
  29. package/src/execution/engine/tools/integration/server/adapters/stripe/stripe-tools.ts +310 -309
  30. package/src/execution/engine/tools/integration/tool.ts +255 -253
  31. package/src/execution/engine/tools/lead-service-types.ts +895 -894
  32. package/src/execution/engine/tools/messages.ts +43 -0
  33. package/src/execution/engine/tools/platform/acquisition/types.ts +2 -1
  34. package/src/execution/engine/tools/platform/email/types.ts +97 -96
  35. package/src/execution/engine/tools/types.ts +234 -233
  36. package/src/execution/engine/workflow/types.ts +195 -193
  37. package/src/execution/external/api-schemas.ts +40 -0
  38. package/src/execution/external/index.ts +1 -0
  39. package/src/knowledge/README.md +32 -0
  40. package/src/knowledge/__tests__/queries.test.ts +504 -0
  41. package/src/knowledge/format.ts +99 -0
  42. package/src/knowledge/index.ts +5 -0
  43. package/src/knowledge/queries.ts +256 -0
  44. package/src/organization-model/__tests__/defaults.test.ts +172 -172
  45. package/src/organization-model/__tests__/foundation.test.ts +7 -7
  46. package/src/organization-model/__tests__/icons.test.ts +27 -0
  47. package/src/organization-model/__tests__/knowledge.test.ts +214 -0
  48. package/src/organization-model/contracts.ts +17 -15
  49. package/src/organization-model/defaults.ts +74 -19
  50. package/src/organization-model/domains/knowledge.ts +53 -0
  51. package/src/organization-model/domains/navigation.ts +416 -399
  52. package/src/organization-model/domains/shared.ts +6 -5
  53. package/src/organization-model/foundation.ts +10 -6
  54. package/src/organization-model/graph/build.ts +209 -182
  55. package/src/organization-model/graph/schema.ts +37 -34
  56. package/src/organization-model/graph/types.ts +47 -31
  57. package/src/organization-model/icons.ts +81 -0
  58. package/src/organization-model/index.ts +8 -3
  59. package/src/organization-model/organization-model.mdx +1 -1
  60. package/src/organization-model/published.ts +103 -86
  61. package/src/organization-model/schema.ts +90 -85
  62. package/src/organization-model/types.ts +40 -33
  63. package/src/platform/index.ts +23 -27
  64. package/src/platform/registry/index.ts +0 -4
  65. package/src/platform/registry/resource-registry.ts +0 -77
  66. package/src/platform/registry/serialized-types.ts +148 -219
  67. package/src/platform/registry/stats-types.ts +60 -60
  68. package/src/reference/_generated/contracts.md +1265 -1154
@@ -177,15 +177,41 @@ export type OrganizationModelObjective = z.infer<typeof ObjectiveSchema>
177
177
  export type OrganizationModelKeyResult = z.infer<typeof KeyResultSchema>
178
178
  ```
179
179
 
180
+ ### `OrganizationModelKnowledge`
181
+
182
+ ```typescript
183
+ export type OrganizationModelKnowledge = z.infer<typeof KnowledgeDomainSchema>
184
+ ```
185
+
186
+ ### `OrgKnowledgeNode`
187
+
188
+ ```typescript
189
+ export type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>
190
+ ```
191
+
192
+ ### `OrgKnowledgeKind`
193
+
194
+ ```typescript
195
+ export type OrgKnowledgeKind = z.infer<typeof OrgKnowledgeKindSchema>
196
+ ```
197
+
180
198
  ### `DeepPartial`
181
199
 
182
200
  ```typescript
183
- export type DeepPartial<T> =
201
+ export type DeepPartial<T> =
184
202
  T extends Array<infer U> ? Array<DeepPartial<U>> : T extends object ? { [K in keyof T]?: DeepPartial<T[K]> } : T
185
203
  ```
186
204
 
187
205
  ## Feature System
188
206
 
207
+ ### `ElevasisOrganizationModel`
208
+
209
+ ```typescript
210
+ export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
211
+ knowledge?: OrganizationModel['knowledge']
212
+ }
213
+ ```
214
+
189
215
  ### `FeatureSidebarComponent`
190
216
 
191
217
  ```typescript
@@ -324,7 +350,7 @@ export interface OrganizationGraphContextValue {
324
350
  ```typescript
325
351
  export interface ElevasisFeaturesProviderProps {
326
352
  features: FeatureModule[]
327
- organizationModel?: OrganizationModel
353
+ organizationModel?: ElevasisOrganizationModel
328
354
  timeRange?: TimeRange
329
355
  operationsApiUrl?: string
330
356
  operationsSSEManager?: SSEConnectionManagerLike
@@ -1874,16 +1900,22 @@ export const UpdateListRequestSchema = z
1874
1900
  * subtree; server writes the field as-is (no deep merge — each column is
1875
1901
  * replaced atomically when present in the patch).
1876
1902
  */
1877
- export const UpdateListConfigRequestSchema = z
1878
- .object({
1879
- scrapingConfig: ScrapingConfigSchema.partial().optional(),
1880
- icp: IcpRubricSchema.partial().optional(),
1881
- pipelineConfig: PipelineConfigSchema.partial().optional()
1882
- })
1883
- .strict()
1884
- .refine((data) => data.scrapingConfig !== undefined || data.icp !== undefined || data.pipelineConfig !== undefined, {
1885
- message: 'At least one of scrapingConfig, icp, or pipelineConfig must be provided'
1903
+ export const UpdateListConfigRequestSchema = z
1904
+ .object({
1905
+ scrapingConfig: ScrapingConfigSchema.partial().optional(),
1906
+ icp: IcpRubricSchema.partial().optional(),
1907
+ pipelineConfig: PipelineConfigSchema.partial().optional()
1886
1908
  })
1909
+ .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
+ )
1887
1919
  ```
1888
1920
 
1889
1921
  ### `AddCompaniesToListRequestSchema`
@@ -1984,10 +2016,11 @@ export const ListTelemetryListResponseSchema = z.array(ListTelemetrySchema)
1984
2016
  export const ListExecutionSummarySchema = z.object({
1985
2017
  executionId: z.string(),
1986
2018
  resourceId: z.string(),
1987
- status: z.string(),
1988
- createdAt: z.string(),
1989
- completedAt: z.string().nullable(),
1990
- durationMs: z.number().int().nullable()
2019
+ status: z.string(),
2020
+ createdAt: z.string(),
2021
+ completedAt: z.string().nullable(),
2022
+ durationMs: z.number().int().nullable(),
2023
+ input: z.unknown().nullable().optional()
1991
2024
  })
1992
2025
  ```
1993
2026
 
@@ -2710,39 +2743,39 @@ export const LEAD_GEN_PIPELINE_DEFINITIONS: Record<string, StatefulPipelineDefin
2710
2743
  ### `PaginationParams`
2711
2744
 
2712
2745
  ```typescript
2713
- export interface PaginationParams {
2714
- limit: number
2715
- offset: number
2746
+ export interface PaginationParams {
2747
+ limit: number
2748
+ offset: number
2716
2749
  }
2717
2750
  ```
2718
2751
 
2719
2752
  ### `PaginatedResult`
2720
2753
 
2721
2754
  ```typescript
2722
- export interface PaginatedResult<T> {
2723
- data: T[]
2724
- total: number
2725
- limit: number
2726
- offset: number
2755
+ export interface PaginatedResult<T> {
2756
+ data: T[]
2757
+ total: number
2758
+ limit: number
2759
+ offset: number
2727
2760
  }
2728
2761
  ```
2729
2762
 
2730
2763
  ### `CreateListParams`
2731
2764
 
2732
2765
  ```typescript
2733
- export interface CreateListParams {
2734
- organizationId: string
2735
- name: string
2736
- description?: string
2737
- type?: string
2738
- batchIds?: string[]
2766
+ export interface CreateListParams {
2767
+ organizationId: string
2768
+ name: string
2769
+ description?: string
2770
+ type?: string
2771
+ batchIds?: string[]
2739
2772
  instantlyCampaignId?: string
2740
2773
  status?: ListStatus
2741
2774
  buildTemplateId?: string
2742
2775
  metadata?: Record<string, unknown>
2743
2776
  scrapingConfig?: ScrapingConfig
2744
2777
  icp?: IcpRubric
2745
- pipelineConfig?: PipelineConfig
2778
+ pipelineConfig?: PipelineConfig
2746
2779
  }
2747
2780
  ```
2748
2781
 
@@ -2759,49 +2792,49 @@ export interface UpdateListParams {
2759
2792
  ### `CreateCompanyParams`
2760
2793
 
2761
2794
  ```typescript
2762
- export interface CreateCompanyParams {
2763
- organizationId: string
2764
- name: string
2765
- domain?: string
2766
- linkedinUrl?: string
2767
- website?: string
2768
- numEmployees?: number
2769
- foundedYear?: number
2770
- locationCity?: string
2771
- locationState?: string
2772
- category?: string
2773
- source?: string
2774
- batchId?: string
2775
- verticalResearch?: string
2795
+ export interface CreateCompanyParams {
2796
+ organizationId: string
2797
+ name: string
2798
+ domain?: string
2799
+ linkedinUrl?: string
2800
+ website?: string
2801
+ numEmployees?: number
2802
+ foundedYear?: number
2803
+ locationCity?: string
2804
+ locationState?: string
2805
+ category?: string
2806
+ source?: string
2807
+ batchId?: string
2808
+ verticalResearch?: string
2776
2809
  }
2777
2810
  ```
2778
2811
 
2779
2812
  ### `UpdateCompanyParams`
2780
2813
 
2781
2814
  ```typescript
2782
- export interface UpdateCompanyParams {
2783
- name?: string
2784
- domain?: string
2785
- linkedinUrl?: string
2786
- website?: string
2787
- numEmployees?: number
2788
- foundedYear?: number
2789
- locationCity?: string
2790
- locationState?: string
2791
- category?: string
2792
- segment?: string
2793
- pipelineStatus?: Record<string, unknown>
2794
- enrichmentData?: Record<string, unknown>
2795
- source?: string
2796
- batchId?: string
2797
- status?: 'active' | 'invalid'
2798
- verticalResearch?: string | null
2799
- /** Track A: flat qualification score column (null until a scoring rubric is defined) */
2800
- qualificationScore?: number | null
2801
- /** Track A: flat qualification signals jsonb — mirrors the former pipeline_status.qualification shape */
2802
- qualificationSignals?: Record<string, unknown> | null
2803
- /** Track A: key identifying the rubric used for qualification */
2804
- qualificationRubricKey?: string | null
2815
+ export interface UpdateCompanyParams {
2816
+ name?: string
2817
+ domain?: string
2818
+ linkedinUrl?: string
2819
+ website?: string
2820
+ numEmployees?: number
2821
+ foundedYear?: number
2822
+ locationCity?: string
2823
+ locationState?: string
2824
+ category?: string
2825
+ segment?: string
2826
+ pipelineStatus?: Record<string, unknown>
2827
+ enrichmentData?: Record<string, unknown>
2828
+ source?: string
2829
+ batchId?: string
2830
+ status?: 'active' | 'invalid'
2831
+ verticalResearch?: string | null
2832
+ /** Track A: flat qualification score column (null until a scoring rubric is defined) */
2833
+ qualificationScore?: number | null
2834
+ /** Track A: flat qualification signals jsonb — mirrors the former pipeline_status.qualification shape */
2835
+ qualificationSignals?: Record<string, unknown> | null
2836
+ /** Track A: key identifying the rubric used for qualification */
2837
+ qualificationRubricKey?: string | null
2805
2838
  }
2806
2839
  ```
2807
2840
 
@@ -2814,56 +2847,57 @@ export type UpsertCompanyParams = CreateCompanyParams
2814
2847
  ### `CompanyFilters`
2815
2848
 
2816
2849
  ```typescript
2817
- export interface CompanyFilters {
2818
- listId?: string // Filter to companies in a specific list (via acq_list_companies)
2819
- search?: string
2820
- domain?: string
2821
- website?: string
2822
- segment?: string
2823
- category?: string
2824
- pipelineStatus?: Record<string, unknown>
2825
- /** Exclude companies whose pipeline_status contains this value (PostgREST NOT contains) */
2826
- pipelineStatusNot?: Record<string, unknown>
2827
- batchId?: string
2828
- status?: 'active' | 'invalid'
2829
- includeAll?: boolean
2830
- excludeColumns?: Array<'enrichmentData' | 'pipelineStatus'>
2850
+ export interface CompanyFilters {
2851
+ listId?: string // Filter to companies in a specific list (via acq_list_companies)
2852
+ search?: string
2853
+ domain?: string
2854
+ website?: string
2855
+ segment?: string
2856
+ category?: string
2857
+ pipelineStatus?: Record<string, unknown>
2858
+ /** Exclude companies whose pipeline_status contains this value (PostgREST NOT contains) */
2859
+ pipelineStatusNot?: Record<string, unknown>
2860
+ batchId?: string
2861
+ status?: 'active' | 'invalid'
2862
+ includeAll?: boolean
2863
+ excludeColumns?: Array<'enrichmentData' | 'pipelineStatus'>
2864
+ limit?: number
2831
2865
  }
2832
2866
  ```
2833
2867
 
2834
2868
  ### `CreateContactParams`
2835
2869
 
2836
2870
  ```typescript
2837
- export interface CreateContactParams {
2838
- organizationId: string
2839
- email: string
2840
- companyId?: string
2841
- firstName?: string
2842
- lastName?: string
2843
- linkedinUrl?: string
2844
- title?: string
2845
- source?: string
2846
- sourceId?: string
2847
- batchId?: string
2871
+ export interface CreateContactParams {
2872
+ organizationId: string
2873
+ email: string
2874
+ companyId?: string
2875
+ firstName?: string
2876
+ lastName?: string
2877
+ linkedinUrl?: string
2878
+ title?: string
2879
+ source?: string
2880
+ sourceId?: string
2881
+ batchId?: string
2848
2882
  }
2849
2883
  ```
2850
2884
 
2851
2885
  ### `UpdateContactParams`
2852
2886
 
2853
2887
  ```typescript
2854
- export interface UpdateContactParams {
2855
- companyId?: string
2856
- emailValid?: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN'
2857
- firstName?: string
2858
- lastName?: string
2859
- linkedinUrl?: string
2860
- title?: string
2861
- headline?: string
2862
- filterReason?: string
2863
- openingLine?: string
2864
- pipelineStatus?: Record<string, unknown>
2865
- enrichmentData?: Record<string, unknown>
2866
- status?: 'active' | 'invalid'
2888
+ export interface UpdateContactParams {
2889
+ companyId?: string
2890
+ emailValid?: 'VALID' | 'INVALID' | 'RISKY' | 'UNKNOWN'
2891
+ firstName?: string
2892
+ lastName?: string
2893
+ linkedinUrl?: string
2894
+ title?: string
2895
+ headline?: string
2896
+ filterReason?: string
2897
+ openingLine?: string
2898
+ pipelineStatus?: Record<string, unknown>
2899
+ enrichmentData?: Record<string, unknown>
2900
+ status?: 'active' | 'invalid'
2867
2901
  }
2868
2902
  ```
2869
2903
 
@@ -2876,87 +2910,87 @@ export type UpsertContactParams = CreateContactParams
2876
2910
  ### `ContactFilters`
2877
2911
 
2878
2912
  ```typescript
2879
- export interface ContactFilters {
2880
- listId?: string // Filter to contacts in a specific list (via acq_list_members)
2881
- search?: string
2882
- openingLineIsNull?: boolean // Filter to contacts without personalization
2883
- pipelineStatus?: Record<string, unknown>
2884
- batchId?: string
2885
- contactStatus?: 'active' | 'invalid' // Filter by contact status (soft-delete flag)
2913
+ export interface ContactFilters {
2914
+ listId?: string // Filter to contacts in a specific list (via acq_list_members)
2915
+ search?: string
2916
+ openingLineIsNull?: boolean // Filter to contacts without personalization
2917
+ pipelineStatus?: Record<string, unknown>
2918
+ batchId?: string
2919
+ contactStatus?: 'active' | 'invalid' // Filter by contact status (soft-delete flag)
2886
2920
  }
2887
2921
  ```
2888
2922
 
2889
2923
  ### `UpsertSocialPostParams`
2890
2924
 
2891
2925
  ```typescript
2892
- export interface UpsertSocialPostParams {
2893
- organizationId: string
2894
- platform: string
2895
- platformPostId: string
2896
- authorName: string
2897
- authorUrl?: string | null
2898
- postTitle: string
2899
- postText: string
2900
- postUrl: string
2901
- engagementCount?: number
2902
- commentsCount?: number
2903
- postedAt: string
2904
- metadata?: Record<string, unknown>
2905
- relevanceScore?: number
2906
- matchedKeywords?: string[]
2907
- matchedQuery?: string | null
2908
- initialDraft?: string | null
2909
- finalResponse?: string | null
2910
- sourceCategory?: string | null
2926
+ export interface UpsertSocialPostParams {
2927
+ organizationId: string
2928
+ platform: string
2929
+ platformPostId: string
2930
+ authorName: string
2931
+ authorUrl?: string | null
2932
+ postTitle: string
2933
+ postText: string
2934
+ postUrl: string
2935
+ engagementCount?: number
2936
+ commentsCount?: number
2937
+ postedAt: string
2938
+ metadata?: Record<string, unknown>
2939
+ relevanceScore?: number
2940
+ matchedKeywords?: string[]
2941
+ matchedQuery?: string | null
2942
+ initialDraft?: string | null
2943
+ finalResponse?: string | null
2944
+ sourceCategory?: string | null
2911
2945
  }
2912
2946
  ```
2913
2947
 
2914
2948
  ### `UpsertSocialPostsParams`
2915
2949
 
2916
2950
  ```typescript
2917
- export interface UpsertSocialPostsParams {
2918
- organizationId: string
2919
- posts: Omit<UpsertSocialPostParams, 'organizationId'>[]
2951
+ export interface UpsertSocialPostsParams {
2952
+ organizationId: string
2953
+ posts: Omit<UpsertSocialPostParams, 'organizationId'>[]
2920
2954
  }
2921
2955
  ```
2922
2956
 
2923
2957
  ### `UpsertSocialPostsResult`
2924
2958
 
2925
2959
  ```typescript
2926
- export interface UpsertSocialPostsResult {
2927
- inserted: number
2928
- duplicatesSkipped: number
2960
+ export interface UpsertSocialPostsResult {
2961
+ inserted: number
2962
+ duplicatesSkipped: number
2929
2963
  }
2930
2964
  ```
2931
2965
 
2932
2966
  ### `AddContactsToListParams`
2933
2967
 
2934
2968
  ```typescript
2935
- export interface AddContactsToListParams {
2936
- organizationId: string
2937
- listId: string
2938
- contactIds: string[]
2969
+ export interface AddContactsToListParams {
2970
+ organizationId: string
2971
+ listId: string
2972
+ contactIds: string[]
2939
2973
  }
2940
2974
  ```
2941
2975
 
2942
2976
  ### `AddContactsToListResult`
2943
2977
 
2944
2978
  ```typescript
2945
- export interface AddContactsToListResult {
2946
- added: number
2947
- alreadyExisted: number
2979
+ export interface AddContactsToListResult {
2980
+ added: number
2981
+ alreadyExisted: number
2948
2982
  }
2949
2983
  ```
2950
2984
 
2951
2985
  ### `UpdateListConfigParams`
2952
2986
 
2953
2987
  ```typescript
2954
- export interface UpdateListConfigParams {
2955
- organizationId: string
2956
- listId: string
2957
- scrapingConfig?: ScrapingConfig
2958
- icp?: IcpRubric
2959
- pipelineConfig?: PipelineConfig
2988
+ export interface UpdateListConfigParams {
2989
+ organizationId: string
2990
+ listId: string
2991
+ scrapingConfig?: ScrapingConfig
2992
+ icp?: IcpRubric
2993
+ pipelineConfig?: PipelineConfig
2960
2994
  }
2961
2995
  ```
2962
2996
 
@@ -2989,117 +3023,117 @@ export interface UpdateContactStageParams {
2989
3023
  ### `AddCompaniesToListParams`
2990
3024
 
2991
3025
  ```typescript
2992
- export interface AddCompaniesToListParams {
2993
- organizationId: string
2994
- listId: string
2995
- companyIds: string[]
3026
+ export interface AddCompaniesToListParams {
3027
+ organizationId: string
3028
+ listId: string
3029
+ companyIds: string[]
2996
3030
  }
2997
3031
  ```
2998
3032
 
2999
3033
  ### `AddCompaniesToListResult`
3000
3034
 
3001
3035
  ```typescript
3002
- export interface AddCompaniesToListResult {
3003
- added: number
3004
- alreadyExisted: number
3036
+ export interface AddCompaniesToListResult {
3037
+ added: number
3038
+ alreadyExisted: number
3005
3039
  }
3006
3040
  ```
3007
3041
 
3008
3042
  ### `RemoveCompaniesFromListParams`
3009
3043
 
3010
3044
  ```typescript
3011
- export interface RemoveCompaniesFromListParams {
3012
- organizationId: string
3013
- listId: string
3014
- companyIds: string[]
3045
+ export interface RemoveCompaniesFromListParams {
3046
+ organizationId: string
3047
+ listId: string
3048
+ companyIds: string[]
3015
3049
  }
3016
3050
  ```
3017
3051
 
3018
3052
  ### `RemoveCompaniesFromListResult`
3019
3053
 
3020
3054
  ```typescript
3021
- export interface RemoveCompaniesFromListResult {
3022
- removed: number
3055
+ export interface RemoveCompaniesFromListResult {
3056
+ removed: number
3023
3057
  }
3024
3058
  ```
3025
3059
 
3026
3060
  ### `RecordListExecutionParams`
3027
3061
 
3028
3062
  ```typescript
3029
- export interface RecordListExecutionParams {
3030
- organizationId: string
3031
- listId: string
3032
- executionId: string
3033
- configSnapshot?: Record<string, unknown>
3063
+ export interface RecordListExecutionParams {
3064
+ organizationId: string
3065
+ listId: string
3066
+ executionId: string
3067
+ configSnapshot?: Record<string, unknown>
3034
3068
  }
3035
3069
  ```
3036
3070
 
3037
3071
  ### `ListExecutionSummary`
3038
3072
 
3039
3073
  ```typescript
3040
- export interface ListExecutionSummary {
3041
- executionId: string
3042
- resourceId: string
3043
- status: string
3044
- createdAt: string
3045
- completedAt: string | null
3046
- durationMs: number | null
3074
+ export interface ListExecutionSummary {
3075
+ executionId: string
3076
+ resourceId: string
3077
+ status: string
3078
+ createdAt: string
3079
+ completedAt: string | null
3080
+ durationMs: number | null
3047
3081
  }
3048
3082
  ```
3049
3083
 
3050
3084
  ### `BulkImportParams`
3051
3085
 
3052
3086
  ```typescript
3053
- export interface BulkImportParams {
3054
- organizationId: string
3055
- contacts: CreateContactParams[]
3056
- listId?: string
3087
+ export interface BulkImportParams {
3088
+ organizationId: string
3089
+ contacts: CreateContactParams[]
3090
+ listId?: string
3057
3091
  }
3058
3092
  ```
3059
3093
 
3060
3094
  ### `BulkImportResult`
3061
3095
 
3062
3096
  ```typescript
3063
- export interface BulkImportResult {
3064
- created: number
3065
- updated: number
3066
- errors: Array<{ email: string; error: string }>
3097
+ export interface BulkImportResult {
3098
+ created: number
3099
+ updated: number
3100
+ errors: Array<{ email: string; error: string }>
3067
3101
  }
3068
3102
  ```
3069
3103
 
3070
3104
  ### `BulkImportCompanyEntry`
3071
3105
 
3072
3106
  ```typescript
3073
- export interface BulkImportCompanyEntry {
3074
- name: string
3075
- domain: string
3076
- website?: string
3077
- locationCity?: string
3078
- locationState?: string
3079
- category?: string
3080
- source?: string
3081
- enrichmentData?: Record<string, unknown>
3082
- pipelineStatus?: Record<string, unknown>
3107
+ export interface BulkImportCompanyEntry {
3108
+ name: string
3109
+ domain: string
3110
+ website?: string
3111
+ locationCity?: string
3112
+ locationState?: string
3113
+ category?: string
3114
+ source?: string
3115
+ enrichmentData?: Record<string, unknown>
3116
+ pipelineStatus?: Record<string, unknown>
3083
3117
  }
3084
3118
  ```
3085
3119
 
3086
3120
  ### `BulkImportCompaniesParams`
3087
3121
 
3088
3122
  ```typescript
3089
- export interface BulkImportCompaniesParams {
3090
- organizationId: string
3091
- batchId: string
3092
- companies: BulkImportCompanyEntry[]
3123
+ export interface BulkImportCompaniesParams {
3124
+ organizationId: string
3125
+ batchId: string
3126
+ companies: BulkImportCompanyEntry[]
3093
3127
  }
3094
3128
  ```
3095
3129
 
3096
3130
  ### `BulkImportCompaniesResult`
3097
3131
 
3098
3132
  ```typescript
3099
- export interface BulkImportCompaniesResult {
3100
- created: number
3101
- skipped: number
3102
- errors: Array<{ companyName: string; error: string }>
3133
+ export interface BulkImportCompaniesResult {
3134
+ created: number
3135
+ skipped: number
3136
+ errors: Array<{ companyName: string; error: string }>
3103
3137
  }
3104
3138
  ```
3105
3139
 
@@ -3262,3 +3296,73 @@ export type ListToolMap = {
3262
3296
  }
3263
3297
  }
3264
3298
  ```
3299
+
3300
+ ## Knowledge Platform Primitives
3301
+
3302
+ ### `KnowledgeLinkSchema`
3303
+
3304
+ ```typescript
3305
+ export const KnowledgeLinkSchema = z.object({
3306
+ nodeId: NodeIdStringSchema
3307
+ })
3308
+ ```
3309
+
3310
+ ### `OrgKnowledgeKindSchema`
3311
+
3312
+ ```typescript
3313
+ export const OrgKnowledgeKindSchema = z.enum(['playbook', 'strategy', 'reference'])
3314
+ ```
3315
+
3316
+ ### `OrgKnowledgeNodeSchema`
3317
+
3318
+ ```typescript
3319
+ export const OrgKnowledgeNodeSchema = z.object({
3320
+ id: ModelIdSchema,
3321
+ kind: OrgKnowledgeKindSchema,
3322
+ title: z.string().trim().min(1).max(200),
3323
+ summary: z.string().trim().min(1).max(1000),
3324
+ /** Raw MDX string. Phase 2 will introduce a structured block format. */
3325
+ body: z.string().trim().min(1),
3326
+ /**
3327
+ * Graph links to other OM nodes this knowledge node governs.
3328
+ * Each link emits a `governs` edge: knowledge-node -> target node.
3329
+ */
3330
+ links: z.array(KnowledgeLinkSchema).default([]),
3331
+ /** Identifiers of the roles or members who own this knowledge node. */
3332
+ ownerIds: z.array(ModelIdSchema).default([]),
3333
+ /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
3334
+ updatedAt: z.string().trim().min(1).max(50)
3335
+ })
3336
+ ```
3337
+
3338
+ ### `KnowledgeDomainSchema`
3339
+
3340
+ ```typescript
3341
+ export const KnowledgeDomainSchema = z.object({
3342
+ nodes: z.array(OrgKnowledgeNodeSchema).default([])
3343
+ })
3344
+ ```
3345
+
3346
+ ### `OrgKnowledgeNode`
3347
+
3348
+ ```typescript
3349
+ export type OrgKnowledgeNode = z.infer<typeof OrgKnowledgeNodeSchema>
3350
+ ```
3351
+
3352
+ ### `OrgKnowledgeKind`
3353
+
3354
+ ```typescript
3355
+ export type OrgKnowledgeKind = z.infer<typeof OrgKnowledgeKindSchema>
3356
+ ```
3357
+
3358
+ ### `KnowledgeLink`
3359
+
3360
+ ```typescript
3361
+ export type KnowledgeLink = z.infer<typeof KnowledgeLinkSchema>
3362
+ ```
3363
+
3364
+ ### `KnowledgeDomain`
3365
+
3366
+ ```typescript
3367
+ export type KnowledgeDomain = z.infer<typeof KnowledgeDomainSchema>
3368
+ ```