feat(foundation): Wave 3 integrity/persistence/build fixes
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* src/types/source.ts
|
||||
* =====================
|
||||
* 0pt.source.schema.v1 — a registered upstream data source (a database, a
|
||||
* crawlable web domain, an API, a file drop, …). Owned by SourceService
|
||||
* (src/services/source-service.ts); referenced by SourceRatePolicy
|
||||
* (src/types/source-rate-policy.ts) and by the synchronous query path
|
||||
* (src/services/source-query-service.ts), which reads `source_type` +
|
||||
* `adapter_id` to decide whether a Source is queryable.
|
||||
*
|
||||
* `adapter_id` is the seam that lets a "database" source name the concrete
|
||||
* driver 0pt should use for it (today only "fabric_onelake_sql" is wired on
|
||||
* the synchronous path — see source-query-service.ts).
|
||||
*/
|
||||
export type SourceType = "database" | "file" | "web" | "api" | "stream" | "manual";
|
||||
export type SourceStatus = "active" | "paused" | "archived";
|
||||
|
||||
export interface Source {
|
||||
source_id: string;
|
||||
tenant_id: string;
|
||||
project_id: string;
|
||||
source_type: SourceType;
|
||||
name: string;
|
||||
/** Concrete driver id for this source, e.g. "fabric_onelake_sql". Optional: not every source is directly queryable. */
|
||||
adapter_id?: string;
|
||||
description?: string;
|
||||
status: SourceStatus;
|
||||
correlation_id?: string;
|
||||
created_at: string;
|
||||
updated_at?: string;
|
||||
created_by?: string;
|
||||
}
|
||||
|
||||
export interface CreateSourceInput {
|
||||
source_id: string;
|
||||
tenant_id: string;
|
||||
project_id: string;
|
||||
source_type: SourceType;
|
||||
name: string;
|
||||
adapter_id?: string;
|
||||
description?: string;
|
||||
status?: SourceStatus;
|
||||
correlation_id?: string;
|
||||
created_by?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user