Kind: Class
Source: atloria-monorepo/apps/cli/src/providers/api.provider.ts
API data provider Fetches from Atloria REST API
Implements: DataProvider
Methods
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(config: DataProviderConfig) | Promise<void> |
getProjectMetadata | getProjectMetadata() | Promise<ProjectMetadata> |
getEntities | getEntities() | Promise<Entity[]> |
getEntitiesByType | getEntitiesByType(type: string) | Promise<Entity[]> |
getEntityById | getEntityById(id: string) | `Promise<Entity |
getRelationships | getRelationships() | Promise<Relationship[]> |
getRelationshipsForEntity | getRelationshipsForEntity(entityId: string) | Promise<Relationship[]> |
saveParseResults | `saveParseResults(results: ParseResult[], project: DetectedProject, workflowSignals: WorkflowSignals, workflowOptions: { |
enableAiWorkflows?: boolean; aiModel?: string; forceWorkflowDiscovery?: boolean; }, businessContextText: string)` | `Promise<void>` |
| saveDocumentation | saveDocumentation(pages: Array<{ slug: string; title: string; description: string; type: string; content: string; order: number; parentSlug?: string; entityId?: string; }>, _navigation: Array<{ title: string; href: string; children?: Array<{ title: string; href: string }>; }>) | Promise<void> |
| destroy | destroy() | Promise<void> |
Where it refuses work
ApiProviderstops the work withErrorwhen!response.ok, in 2 places.ApiProviderstops the work withErrorwhen!config.apiUrl— “API URL is required for dynamic mode”.ApiProviderstops the work withErrorwhen!config.projectId— “Project ID is required for dynamic mode”.ApiProviderstops the work with an early return whenthis.entitiesCache.ApiProviderstops the work with an early return whenthis.relationshipsCache.
When something fails
ApiProviderhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?