@aiquants/enrichment-drizzle 0.2.2 → 0.3.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/README.md +26 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1079 -4
- package/dist/index.d.ts +1079 -4
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bigint as V,bit as ve,datetime2 as j,float as H,int as g,nvarchar as d,primaryKey as Ae}from"drizzle-orm/mssql-core";import{mssqlSchema as xe}from"drizzle-orm/mssql-core";var t=xe("dbo");import{sql as L}from"drizzle-orm";import{customType as D}from"drizzle-orm/mssql-core";var Se=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,a=D({dataType(){return"uniqueidentifier"},toDriver(e){return e},fromDriver(e){if(typeof e!="string"||!Se.test(e))throw new TypeError(`uniqueidentifier column returned ${JSON.stringify(e)}, which is not a GUID.`);return e.toLowerCase()}}),B=32,J=`binary(${B})`,$e=/^[0-9a-f]{64}$/,O=D({dataType(){return J},toDriver(e){if(typeof e!="string"||!$e.test(e))throw new TypeError(`A SHA-256 column takes 64 lowercase hexadecimal digits, not ${JSON.stringify(e)}.`);return L`convert(${L.raw(J)}, ${e}, 2)`},fromDriver(e){if(!(e instanceof Uint8Array)||e.byteLength!==B)throw new TypeError(`A SHA-256 column returned ${e instanceof Uint8Array?`${e.byteLength} bytes`:typeof e}, not ${B} bytes.`);return Array.from(e,Te=>Te.toString(16).padStart(2,"0")).join("")}}),Pe=D({dataType(){return"nvarchar(max)"},toDriver(e){return e==null?null:typeof e=="string"?e:JSON.stringify(e)},fromDriver(e){return e==null||e===""?null:typeof e!="string"?e:JSON.parse(e)}}),n=e=>Pe(e).$type();var Rt=t.table("td_file_chunk",{id:V("id",{mode:"number"}).identity().notNull(),tenantId:d("tenant_id",{length:64}).$type().notNull(),chunkUid:a("chunk_uid").notNull(),parentChunkUid:a("parent_chunk_uid").notNull(),metadataId:V("metadata_id",{mode:"number"}).notNull(),fileUri:d("file_uri",{length:2048}).$type().notNull(),revision:g("revision").notNull(),chunkIndex:g("chunk_index").notNull(),breadcrumbs:d("breadcrumbs",{length:2048}).notNull(),clauseIdentifier:d("clause_identifier",{length:128}),searchText:d("search_text",{length:"max"}).notNull(),citationText:d("citation_text",{length:"max"}).notNull(),chunkHash:d("chunk_hash",{length:64}).notNull(),tokenCount:g("token_count").notNull(),charStart:g("char_start").notNull(),charEnd:g("char_end").notNull(),pageNumber:g("page_number"),sheetName:d("sheet_name",{length:256}),slideIndex:g("slide_index"),startSec:H("start_sec"),endSec:H("end_sec"),isDeleted:ve("is_deleted").notNull(),createdAt:j("created_at",{precision:7}).notNull(),createdBy:d("created_by",{length:100}).notNull(),updatedAt:j("updated_at",{precision:7}).notNull(),updatedBy:d("updated_by",{length:100}).notNull()},e=>[Ae({name:"PK_td_file_chunk",columns:[e.id]})]);import{bigint as Q,datetime2 as G,int as Y,nvarchar as h,primaryKey as Re}from"drizzle-orm/mssql-core";var Bt=t.table("td_file_chunk_parent",{id:Q("id",{mode:"number"}).identity().notNull(),tenantId:h("tenant_id",{length:64}).$type().notNull(),parentChunkUid:a("parent_chunk_uid").notNull(),metadataId:Q("metadata_id",{mode:"number"}).notNull(),fileUri:h("file_uri",{length:2048}).$type().notNull(),revision:Y("revision").notNull(),sectionTitle:h("section_title",{length:512}).notNull(),breadcrumbs:h("breadcrumbs",{length:2048}).notNull(),fullContent:h("full_content",{length:"max"}).notNull(),charLength:Y("char_length").notNull(),createdAt:G("created_at",{precision:7}).notNull(),createdBy:h("created_by",{length:100}).notNull(),updatedAt:G("updated_at",{precision:7}).notNull(),updatedBy:h("updated_by",{length:100}).notNull()},e=>[Re({name:"PK_td_file_chunk_parent",columns:[e.id]})]);import{bigint as z,bit as ke,datetime2 as A,int as Fe,nvarchar as m,primaryKey as Ce}from"drizzle-orm/mssql-core";var Mt=t.table("td_file_enrichment",{id:z("id",{mode:"number"}).identity().notNull(),tenantId:m("tenant_id",{length:64}).$type().notNull(),metadataId:z("metadata_id",{mode:"number"}).notNull(),extractedText:m("extracted_text",{length:"max"}),extractedTextMime:m("extracted_text_mime",{length:255}),extractedTextSource:m("extracted_text_source",{length:16}).$type(),extractedPageOffsets:n("extracted_page_offsets"),isTruncated:ke("is_truncated").notNull(),aiSummary:m("ai_summary",{length:"max"}),structuredData:n("structured_data"),tags:n("tags"),syncStatus:m("sync_status",{length:20}).$type().notNull(),chunkCount:Fe("chunk_count"),lastError:m("last_error",{length:2e3}),vectorIndexedAt:A("vector_indexed_at",{precision:7}),graphIndexedAt:A("graph_indexed_at",{precision:7}),createdAt:A("created_at",{precision:7}).notNull(),createdBy:m("created_by",{length:100}).notNull(),updatedAt:A("updated_at",{precision:7}).notNull(),updatedBy:m("updated_by",{length:100}).notNull()},e=>[Ce({name:"PK_td_file_enrichment",columns:[e.id]})]);import{bigint as X,datetime2 as W,decimal as Ke,nvarchar as R,primaryKey as Be}from"drizzle-orm/mssql-core";var Ot=t.table("td_file_label_map",{tenantId:R("tenant_id",{length:64}).$type().notNull(),metadataId:X("metadata_id",{mode:"number"}).notNull(),labelId:X("label_id",{mode:"number"}).notNull(),assignedBy:R("assigned_by",{length:32}).notNull(),confidenceScore:Ke("confidence_score",{precision:3,scale:2,mode:"number"}).notNull(),createdAt:W("created_at",{precision:7}).notNull(),createdBy:R("created_by",{length:100}).notNull(),updatedAt:W("updated_at",{precision:7}).notNull(),updatedBy:R("updated_by",{length:100}).notNull()},e=>[Be({name:"PK_td_file_label_map",columns:[e.tenantId,e.metadataId,e.labelId]})]);import{sql as De}from"drizzle-orm";import{bigint as E,binary as Ee,bit as q,datetime2 as k,int as U,nvarchar as r,primaryKey as qe}from"drizzle-orm/mssql-core";var Yt=t.table("td_file_metadata",{id:E("id",{mode:"number"}).identity().notNull(),tenantId:r("tenant_id",{length:64}).$type().notNull(),parentMetadataId:E("parent_metadata_id",{mode:"number"}),fileUri:r("file_uri",{length:2048}).$type().notNull(),fileUriHash:Ee("file_uri_hash",{length:32}).generatedAlwaysAs(De`CONVERT(binary(32), HASHBYTES('SHA2_256', file_uri))`,{mode:"persisted"}),fileId:r("file_id",{length:255}),revision:U("revision").notNull(),revisionId:r("revision_id",{length:255}),isCurrent:q("is_current").notNull(),isDeleted:q("is_deleted").notNull(),isDerived:q("is_derived").notNull(),deletedAt:k("deleted_at",{precision:7}),deletedBy:r("deleted_by",{length:100}),fileName:r("file_name",{length:255}).notNull(),filePath:r("file_path",{length:4e3}).notNull(),folderPath:r("folder_path",{length:4e3}),confidentialityLevel:r("confidentiality_level",{length:20}).$type().notNull(),departmentId:U("department_id"),fileSize:E("file_size",{mode:"number"}).notNull(),mimeType:r("mime_type",{length:255}).notNull(),assetType:r("asset_type",{length:50}),assetIndex:U("asset_index"),boundingBox:n("bounding_box"),fileHash:r("file_hash",{length:64}),mtime:k("mtime",{precision:7}).notNull(),createdAt:k("created_at",{precision:7}).notNull(),createdBy:r("created_by",{length:100}).notNull(),updatedAt:k("updated_at",{precision:7}).notNull(),updatedBy:r("updated_by",{length:100}).notNull()},e=>[qe({name:"PK_td_file_metadata",columns:[e.id]})]);import{bigint as Z,datetime2 as ee,float as Ue,int as M,nvarchar as $,primaryKey as Me}from"drizzle-orm/mssql-core";var en=t.table("td_file_ocr_results",{id:Z("id",{mode:"number"}).identity().notNull(),tenantId:$("tenant_id",{length:64}).$type().notNull(),metadataId:Z("metadata_id",{mode:"number"}).notNull(),engineName:$("engine_name",{length:50}).notNull(),extractedText:$("extracted_text",{length:"max"}),boundingBoxes:n("bounding_boxes"),confidence:Ue("confidence"),executionTimeMs:M("execution_time_ms").notNull(),pagesRead:M("pages_read"),pagesTotal:M("pages_total"),pageOffsets:n("page_offsets"),createdAt:ee("created_at",{precision:7}).notNull(),createdBy:$("created_by",{length:100}).notNull(),updatedAt:ee("updated_at",{precision:7}).notNull(),updatedBy:$("updated_by",{length:100}).notNull()},e=>[Me({name:"PK_td_file_ocr_results",columns:[e.id]})]);import{bigint as te,bit as we,datetime2 as ne,int as ie,nvarchar as u,primaryKey as Le}from"drizzle-orm/mssql-core";var ln=t.table("td_file_pipeline_run",{id:te("id",{mode:"number"}).identity().notNull(),tenantId:u("tenant_id",{length:64}).$type().notNull(),metadataId:te("metadata_id",{mode:"number"}).notNull(),revision:ie("revision").notNull(),runUid:a("run_uid").notNull(),jobId:u("job_id",{length:255}).notNull(),attempt:ie("attempt").notNull(),triggerKind:u("trigger_kind",{length:20}).$type().notNull(),documentKind:u("document_kind",{length:20}).notNull(),flowKey:u("flow_key",{length:40}).notNull(),status:u("status",{length:20}).$type().notNull(),retryScheduled:we("retry_scheduled").notNull().default(!1),failedStepKey:u("failed_step_key",{length:40}),errorMessage:u("error_message",{length:2e3}),requestedBy:u("requested_by",{length:255}).notNull(),startedAt:ne("started_at",{precision:7}).notNull(),finishedAt:ne("finished_at",{precision:7})},e=>[Le({name:"PK_td_file_pipeline_run",columns:[e.id]})]);import{bigint as F,datetime2 as re,int as l,nvarchar as o,primaryKey as Je}from"drizzle-orm/mssql-core";var un=t.table("td_file_pipeline_step",{id:F("id",{mode:"number"}).identity().notNull(),tenantId:o("tenant_id",{length:64}).$type().notNull(),runId:F("run_id",{mode:"number"}).notNull(),sequence:l("sequence").notNull(),stepKey:o("step_key",{length:40}).notNull(),targetMetadataId:F("target_metadata_id",{mode:"number"}).notNull(),status:o("status",{length:20}).$type().notNull(),skipReason:o("skip_reason",{length:255}),provider:o("provider",{length:64}),modelName:o("model_name",{length:255}),engineName:o("engine_name",{length:50}),promptKey:o("prompt_key",{length:128}),promptVersion:l("prompt_version"),strategyId:F("strategy_id",{mode:"number"}),collectionName:o("collection_name",{length:128}),embeddingModel:o("embedding_model",{length:255}),bodySource:o("body_source",{length:20}).$type(),inputChars:l("input_chars"),outputChars:l("output_chars"),pagesRead:l("pages_read"),pagesTotal:l("pages_total"),chunkCount:l("chunk_count"),pointsUpserted:l("points_upserted"),graphNodes:l("graph_nodes"),durationMs:l("duration_ms"),httpStatus:l("http_status"),errorCode:o("error_code",{length:64}),errorMessage:o("error_message",{length:2e3}),detail:n("detail"),startedAt:re("started_at",{precision:7}).notNull(),finishedAt:re("finished_at",{precision:7})},e=>[Je({name:"PK_td_file_pipeline_step",columns:[e.id]})]);import{bigint as w,int as oe,nvarchar as s,primaryKey as Oe}from"drizzle-orm/mssql-core";var gn=t.table("td_integrity_audit_finding",{id:w("id",{mode:"number"}).identity().notNull(),runId:w("run_id",{mode:"number"}).notNull(),tenantId:s("tenant_id",{length:64}).$type().notNull(),store:s("store",{length:10}).$type().notNull(),scopeKey:s("scope_key",{length:400}).notNull(),itemClass:s("item_class",{length:30}).$type().notNull(),sequence:oe("sequence").notNull(),itemKey:s("item_key",{length:2100}).notNull(),metadataId:w("metadata_id",{mode:"number"}),fileUri:s("file_uri",{length:2048}),revision:oe("revision"),observed:n("observed").notNull(),repairOutcome:s("repair_outcome",{length:20}).$type(),repairErrorClass:s("repair_error_class",{length:200}),repairSkipReason:s("repair_skip_reason",{length:30}).$type()},e=>[Oe({name:"PK_td_integrity_audit_finding",columns:[e.id]})]);import{bigint as I,datetime2 as Ve,nvarchar as y,primaryKey as je}from"drizzle-orm/mssql-core";var Nn=t.table("td_integrity_audit_quantity",{id:I("id",{mode:"number"}).identity().notNull(),runId:I("run_id",{mode:"number"}).notNull(),tenantId:y("tenant_id",{length:64}).$type().notNull(),store:y("store",{length:10}).$type().notNull(),scopeKey:y("scope_key",{length:400}).notNull(),scopeRole:y("scope_role",{length:20}).$type().notNull(),itemClass:y("item_class",{length:30}).$type().notNull(),unit:y("unit",{length:10}).$type().notNull(),disposition:y("disposition",{length:20}).$type().notNull(),repairAction:y("repair_action",{length:10}).$type().notNull(),itemCount:I("item_count",{mode:"number"}),unmeasuredReason:y("unmeasured_reason",{length:400}),measuredAt:Ve("measured_at",{precision:7}),repairedCount:I("repaired_count",{mode:"number"}),repairFailedCount:I("repair_failed_count",{mode:"number"}),repairSkippedCount:I("repair_skipped_count",{mode:"number"})},e=>[je({name:"PK_td_integrity_audit_quantity",columns:[e.id]})]);import{bigint as P,datetime2 as C,int as He,nvarchar as p,primaryKey as Qe}from"drizzle-orm/mssql-core";var $n=t.table("td_integrity_audit_run",{id:P("id",{mode:"number"}).identity().notNull(),runUid:a("run_uid").notNull(),tenantId:p("tenant_id",{length:64}).$type().notNull(),mode:p("mode",{length:10}).$type().notNull(),status:p("status",{length:20}).$type().notNull(),requestedBy:p("requested_by",{length:100}).notNull(),executor:p("executor",{length:200}).notNull(),startedAt:C("started_at",{precision:7}).notNull(),heartbeatAt:C("heartbeat_at",{precision:7}).notNull(),finishedAt:C("finished_at",{precision:7}),phase:p("phase",{length:20}).$type(),phaseScope:p("phase_scope",{length:400}),phaseDone:P("phase_done",{mode:"number"}),phaseTotal:P("phase_total",{mode:"number"}),cancelRequestedAt:C("cancel_requested_at",{precision:7}),cancelRequestedBy:p("cancel_requested_by",{length:100}),verdict:p("verdict",{length:20}).$type(),errorClass:p("error_class",{length:200}),basisRunUid:a("basis_run_uid"),storeFingerprint:O("store_fingerprint").notNull(),tombstoneRetentionDays:He("tombstone_retention_days").notNull(),reprojectDocuments:P("reproject_documents",{mode:"number"}),reprojectRebuildDocuments:P("reproject_rebuild_documents",{mode:"number"})},e=>[Qe({name:"PK_td_integrity_audit_run",columns:[e.id]})]);import{bigint as Ge,bit as le,datetime2 as ae,nvarchar as f,primaryKey as Ye}from"drizzle-orm/mssql-core";var Rn=t.table("tm_confidentiality_capability_policy",{id:Ge("id",{mode:"number"}).identity().notNull(),tenantId:f("tenant_id",{length:64}).$type().notNull(),confidentialityLevel:f("confidentiality_level",{length:20}).notNull(),capability:f("capability",{length:32}).notNull(),isEnabled:le("is_enabled").notNull(),allowCloudProvider:le("allow_cloud_provider").notNull(),promptKey:f("prompt_key",{length:64}),description:f("description",{length:256}),updatedBy:f("updated_by",{length:100}).notNull(),updatedAt:ae("updated_at",{precision:7}).notNull(),createdAt:ae("created_at",{precision:7}).notNull(),createdBy:f("created_by",{length:100}).notNull()},e=>[Ye({name:"PK_tm_confidentiality_capability_policy",columns:[e.id]})]);import{bigint as de,bit as ze,datetime2 as pe,int as me,nvarchar as K,primaryKey as Xe}from"drizzle-orm/mssql-core";var Bn=t.table("tm_enrichment_classification_rule",{id:de("id",{mode:"number"}).identity().notNull(),tenantId:K("tenant_id",{length:64}).$type().notNull(),strategyId:de("strategy_id",{mode:"number"}).notNull(),priority:me("priority").notNull(),ruleName:K("rule_name",{length:128}).notNull(),matchConditionsJson:n("match_conditions_json").notNull(),assignedDepartmentId:me("assigned_department_id"),isActive:ze("is_active").notNull(),createdAt:pe("created_at",{precision:7}).notNull(),updatedAt:pe("updated_at",{precision:7}).notNull(),createdBy:K("created_by",{length:100}).notNull(),updatedBy:K("updated_by",{length:100}).notNull()},e=>[Xe({name:"PK_tm_enrichment_classification_rule",columns:[e.id]})]);import{bigint as We,bit as Ze,datetime2 as ue,nvarchar as T,primaryKey as et}from"drizzle-orm/mssql-core";var Un=t.table("tm_enrichment_domain",{id:We("id",{mode:"number"}).identity().notNull(),tenantId:T("tenant_id",{length:64}).$type().notNull(),domainKey:T("domain_key",{length:64}).$type().notNull(),displayName:T("display_name",{length:128}).notNull(),description:T("description",{length:512}),isActive:Ze("is_active").notNull(),createdAt:ue("created_at",{precision:7}).notNull(),updatedAt:ue("updated_at",{precision:7}).notNull(),createdBy:T("created_by",{length:100}).notNull(),updatedBy:T("updated_by",{length:100}).notNull()},e=>[et({name:"PK_tm_enrichment_domain",columns:[e.id]})]);import{bigint as se,bit as x,datetime2 as ye,int as tt,nvarchar as i,primaryKey as nt}from"drizzle-orm/mssql-core";var On=t.table("tm_enrichment_strategy",{id:se("id",{mode:"number"}).identity().notNull(),tenantId:i("tenant_id",{length:64}).$type().notNull(),domainId:se("domain_id",{mode:"number"}).notNull(),strategyName:i("strategy_name",{length:128}).notNull(),systemPrompt:i("system_prompt",{length:"max"}).notNull(),chunkingStrategy:i("chunking_strategy",{length:32}).$type().notNull(),modelProvider:i("model_provider",{length:32}).$type().notNull(),modelRoutingPolicy:i("model_routing_policy",{length:32}).notNull(),mcpToolsJson:n("mcp_tools_json"),modelName:i("model_name",{length:64}).notNull(),modelParametersJson:n("model_parameters_json").notNull(),enableSummaryGeneration:x("enable_summary_generation").notNull(),enableStructuredExtraction:x("enable_structured_extraction").notNull(),enableVectorIndexing:x("enable_vector_indexing").notNull(),enableGraphIndexing:x("enable_graph_indexing").notNull(),enableAssetExtraction:x("enable_asset_extraction").notNull(),targetVectorCollection:i("target_vector_collection",{length:128}).notNull(),vectorDimension:tt("vector_dimension").notNull(),vectorDistanceMetric:i("vector_distance_metric",{length:16}).$type().notNull(),vectorIndexingLogic:i("vector_indexing_logic",{length:50}).notNull(),targetGraphDatabase:i("target_graph_database",{length:64}).notNull(),targetGraphDomainLabel:i("target_graph_domain_label",{length:64}),searchFederationDomainsJson:n("search_federation_domains_json"),embeddingModel:i("embedding_model",{length:255}).notNull(),embeddingProvider:i("embedding_provider",{length:32}).$type().notNull(),embeddingBaseUrl:i("embedding_base_url",{length:512}),embeddingApiKeyEnv:i("embedding_api_key_env",{length:128}),embeddingQueryPrefix:i("embedding_query_prefix",{length:256}).notNull(),embeddingPassagePrefix:i("embedding_passage_prefix",{length:256}).notNull(),variantKey:i("variant_key",{length:64}).notNull(),isActive:x("is_active").notNull(),createdAt:ye("created_at",{precision:7}).notNull(),updatedAt:ye("updated_at",{precision:7}).notNull(),createdBy:i("created_by",{length:100}).notNull(),updatedBy:i("updated_by",{length:100}).notNull()},e=>[nt({name:"PK_tm_enrichment_strategy",columns:[e.id]})]);import{bigint as it,bit as ce,datetime2 as _e,nvarchar as b,primaryKey as rt}from"drizzle-orm/mssql-core";var Qn=t.table("tm_label_definition",{id:it("id",{mode:"number"}).identity().notNull(),tenantId:b("tenant_id",{length:64}).$type().notNull(),labelKey:b("label_key",{length:64}).notNull(),labelCategory:b("label_category",{length:32}).notNull(),displayName:b("display_name",{length:128}).notNull(),colorCode:b("color_code",{length:16}),isInheritable:ce("is_inheritable").notNull(),isActive:ce("is_active").notNull(),createdAt:_e("created_at",{precision:7}).notNull(),updatedAt:_e("updated_at",{precision:7}).notNull(),createdBy:b("created_by",{length:100}).notNull(),updatedBy:b("updated_by",{length:100}).notNull()},e=>[rt({name:"PK_tm_label_definition",columns:[e.id]})]);import{bigint as ot,bit as lt,datetime2 as ge,int as at,nvarchar as c,primaryKey as dt}from"drizzle-orm/mssql-core";var Wn=t.table("tm_prompt_template",{id:ot("id",{mode:"number"}).identity().notNull(),tenantId:c("tenant_id",{length:64}).$type().notNull(),promptKey:c("prompt_key",{length:64}).notNull(),promptVersion:at("prompt_version").notNull(),systemPrompt:c("system_prompt",{length:"max"}).notNull(),userPromptTemplate:c("user_prompt_template",{length:"max"}),inputVariablesJson:n("input_variables_json"),modelProvider:c("model_provider",{length:32}).$type().notNull(),modelName:c("model_name",{length:64}).notNull(),modelParametersJson:n("model_parameters_json").notNull(),isActive:lt("is_active").notNull(),updatedBy:c("updated_by",{length:100}).notNull(),updatedAt:ge("updated_at",{precision:7}).notNull(),createdAt:ge("created_at",{precision:7}).notNull(),createdBy:c("created_by",{length:100}).notNull()},e=>[dt({name:"PK_tm_prompt_template",columns:[e.id]})]);import{bigint as pt,bit as he,datetime2 as fe,nvarchar as v,primaryKey as mt}from"drizzle-orm/mssql-core";var ni=t.table("tm_system_feature_flag",{id:pt("id",{mode:"number"}).identity().notNull(),tenantId:v("tenant_id",{length:64}).$type().notNull(),featureKey:v("feature_key",{length:64}).notNull(),isEnabled:he("is_enabled").notNull(),description:v("description",{length:256}),circuitBreakerEnabled:he("circuit_breaker_enabled").notNull(),updatedBy:v("updated_by",{length:100}).notNull(),updatedAt:fe("updated_at",{precision:7}).notNull(),createdAt:fe("created_at",{precision:7}).notNull(),createdBy:v("created_by",{length:100}).notNull()},e=>[mt({name:"PK_tm_system_feature_flag",columns:[e.id]})]);import{bigint as ut,bit as st,datetime2 as be,nvarchar as _,primaryKey as yt}from"drizzle-orm/mssql-core";var li=t.table("tm_system_parameter",{id:ut("id",{mode:"number"}).identity().notNull(),tenantId:_("tenant_id",{length:64}).$type().notNull(),paramCategory:_("param_category",{length:32}).notNull(),paramKey:_("param_key",{length:64}).notNull(),paramValue:_("param_value",{length:"max"}).notNull(),dataType:_("data_type",{length:16}).notNull(),description:_("description",{length:256}),isEncrypted:st("is_encrypted").notNull(),updatedBy:_("updated_by",{length:100}).notNull(),updatedAt:be("updated_at",{precision:7}).notNull(),createdAt:be("created_at",{precision:7}).notNull(),createdBy:_("created_by",{length:100}).notNull()},e=>[yt({name:"PK_tm_system_parameter",columns:[e.id]})]);import{bigint as ct,bit as _t,datetime2 as Ne,nvarchar as S,primaryKey as gt}from"drizzle-orm/mssql-core";var mi=t.table("tm_transcription_reference",{id:ct("id",{mode:"number"}).identity().notNull(),tenantId:S("tenant_id",{length:64}).$type().notNull(),domainKey:S("domain_key",{length:64}),fileUri:S("file_uri",{length:2048}).notNull(),isActive:_t("is_active").notNull(),description:S("description",{length:400}),updatedBy:S("updated_by",{length:100}).notNull(),updatedAt:Ne("updated_at",{precision:7}).notNull(),createdAt:Ne("created_at",{precision:7}).notNull(),createdBy:S("created_by",{length:100}).notNull()},e=>[gt({name:"PK_tm_transcription_reference",columns:[e.id]})]);import{bigint as ht,bit as ft,datetime2 as Ie,float as bt,nvarchar as N,primaryKey as Nt}from"drizzle-orm/mssql-core";var ci=t.table("tm_transcription_vocabulary",{id:ht("id",{mode:"number"}).identity().notNull(),tenantId:N("tenant_id",{length:64}).$type().notNull(),domainKey:N("domain_key",{length:64}),term:N("term",{length:200}).notNull(),reading:N("reading",{length:200}),boost:bt("boost"),isActive:ft("is_active").notNull(),description:N("description",{length:400}),updatedBy:N("updated_by",{length:100}).notNull(),updatedAt:Ie("updated_at",{precision:7}).notNull(),createdAt:Ie("created_at",{precision:7}).notNull(),createdBy:N("created_by",{length:100}).notNull()},e=>[Nt({name:"PK_tm_transcription_vocabulary",columns:[e.id]})]);export{Rt as TdFileChunk,Bt as TdFileChunkParent,Mt as TdFileEnrichment,Ot as TdFileLabelMap,Yt as TdFileMetadata,en as TdFileOcrResults,ln as TdFilePipelineRun,un as TdFilePipelineStep,gn as TdIntegrityAuditFinding,Nn as TdIntegrityAuditQuantity,$n as TdIntegrityAuditRun,Rn as TmConfidentialityCapabilityPolicy,Bn as TmEnrichmentClassificationRule,Un as TmEnrichmentDomain,On as TmEnrichmentStrategy,Qn as TmLabelDefinition,Wn as TmPromptTemplate,ni as TmSystemFeatureFlag,li as TmSystemParameter,mi as TmTranscriptionReference,ci as TmTranscriptionVocabulary,t as dbo,n as mssqlJson,O as sha256Binary,a as uniqueidentifier};
|
|
1
|
+
import{bigint as z,bit as Ee,datetime2 as Y,float as X,int as f,nvarchar as u,primaryKey as qe}from"drizzle-orm/mssql-core";import{mssqlSchema as ke}from"drizzle-orm/mssql-core";var t=ke("dbo");import{sql as Q}from"drizzle-orm";import{customType as L}from"drizzle-orm/mssql-core";var De=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,p=L({dataType(){return"uniqueidentifier"},toDriver(e){return e},fromDriver(e){if(typeof e!="string"||!De.test(e))throw new TypeError(`uniqueidentifier column returned ${JSON.stringify(e)}, which is not a GUID.`);return e.toLowerCase()}}),M=32,G=`binary(${M})`,Ke=/^[0-9a-f]{64}$/,a=L({dataType(){return G},toDriver(e){if(typeof e!="string"||!Ke.test(e))throw new TypeError(`A SHA-256 column takes 64 lowercase hexadecimal digits, not ${JSON.stringify(e)}.`);return Q`convert(${Q.raw(G)}, ${e}, 2)`},fromDriver(e){if(!(e instanceof Uint8Array)||e.byteLength!==M)throw new TypeError(`A SHA-256 column returned ${e instanceof Uint8Array?`${e.byteLength} bytes`:typeof e}, not ${M} bytes.`);return Array.from(e,Re=>Re.toString(16).padStart(2,"0")).join("")}}),Be=L({dataType(){return"nvarchar(max)"},toDriver(e){return e==null?null:typeof e=="string"?e:JSON.stringify(e)},fromDriver(e){return e==null||e===""?null:typeof e!="string"?e:JSON.parse(e)}}),n=e=>Be(e).$type();var Xt=t.table("td_file_chunk",{id:z("id",{mode:"number"}).identity().notNull(),tenantId:u("tenant_id",{length:64}).$type().notNull(),chunkUid:p("chunk_uid").notNull(),parentChunkUid:p("parent_chunk_uid").notNull(),metadataId:z("metadata_id",{mode:"number"}).notNull(),fileUri:u("file_uri",{length:2048}).$type().notNull(),revision:f("revision").notNull(),chunkIndex:f("chunk_index").notNull(),breadcrumbs:u("breadcrumbs",{length:2048}).notNull(),clauseIdentifier:u("clause_identifier",{length:128}),searchText:u("search_text",{length:"max"}).notNull(),citationText:u("citation_text",{length:"max"}).notNull(),chunkHash:u("chunk_hash",{length:64}).notNull(),tokenCount:f("token_count").notNull(),charStart:f("char_start").notNull(),charEnd:f("char_end").notNull(),pageNumber:f("page_number"),sheetName:u("sheet_name",{length:256}),slideIndex:f("slide_index"),startSec:X("start_sec"),endSec:X("end_sec"),isDeleted:Ee("is_deleted").notNull(),createdAt:Y("created_at",{precision:7}).notNull(),createdBy:u("created_by",{length:100}).notNull(),updatedAt:Y("updated_at",{precision:7}).notNull(),updatedBy:u("updated_by",{length:100}).notNull()},e=>[qe({name:"PK_td_file_chunk",columns:[e.id]})]);import{bigint as W,datetime2 as Z,int as ee,nvarchar as b,primaryKey as Ue}from"drizzle-orm/mssql-core";var nn=t.table("td_file_chunk_parent",{id:W("id",{mode:"number"}).identity().notNull(),tenantId:b("tenant_id",{length:64}).$type().notNull(),parentChunkUid:p("parent_chunk_uid").notNull(),metadataId:W("metadata_id",{mode:"number"}).notNull(),fileUri:b("file_uri",{length:2048}).$type().notNull(),revision:ee("revision").notNull(),sectionTitle:b("section_title",{length:512}).notNull(),breadcrumbs:b("breadcrumbs",{length:2048}).notNull(),fullContent:b("full_content",{length:"max"}).notNull(),charLength:ee("char_length").notNull(),createdAt:Z("created_at",{precision:7}).notNull(),createdBy:b("created_by",{length:100}).notNull(),updatedAt:Z("updated_at",{precision:7}).notNull(),updatedBy:b("updated_by",{length:100}).notNull()},e=>[Ue({name:"PK_td_file_chunk_parent",columns:[e.id]})]);import{sql as Me}from"drizzle-orm";import{bigint as Le,datetime2 as Oe,int as te,nvarchar as we,primaryKey as Ve,varbinary as je}from"drizzle-orm/mssql-core";var pn=t.table("td_file_content_object",{id:Le("id",{mode:"number"}).identity().notNull(),tenantId:we("tenant_id",{length:64}).$type().notNull(),objectSha256:a("object_sha256").notNull(),payload:je("payload",{length:"max"}).notNull(),byteLength:te("byte_length").notNull(),storedLength:te("stored_length").notNull(),createdAt:Oe("created_at",{precision:7}).notNull().default(Me`sysutcdatetime()`)},e=>[Ve({name:"PK_td_file_content_object",columns:[e.id]})]);import{bigint as ne,bit as Je,datetime2 as D,int as He,nvarchar as s,primaryKey as Qe}from"drizzle-orm/mssql-core";var yn=t.table("td_file_enrichment",{id:ne("id",{mode:"number"}).identity().notNull(),tenantId:s("tenant_id",{length:64}).$type().notNull(),metadataId:ne("metadata_id",{mode:"number"}).notNull(),extractedText:s("extracted_text",{length:"max"}),extractedTextMime:s("extracted_text_mime",{length:255}),extractedTextSource:s("extracted_text_source",{length:16}).$type(),extractedPageOffsets:n("extracted_page_offsets"),isTruncated:Je("is_truncated").notNull(),aiSummary:s("ai_summary",{length:"max"}),structuredData:n("structured_data"),tags:n("tags"),syncStatus:s("sync_status",{length:20}).$type().notNull(),chunkCount:He("chunk_count"),lastError:s("last_error",{length:2e3}),vectorIndexedAt:D("vector_indexed_at",{precision:7}),graphIndexedAt:D("graph_indexed_at",{precision:7}),createdAt:D("created_at",{precision:7}).notNull(),createdBy:s("created_by",{length:100}).notNull(),updatedAt:D("updated_at",{precision:7}).notNull(),updatedBy:s("updated_by",{length:100}).notNull()},e=>[Qe({name:"PK_td_file_enrichment",columns:[e.id]})]);import{bigint as ie,datetime2 as re,decimal as Ge,nvarchar as K,primaryKey as ze}from"drizzle-orm/mssql-core";var fn=t.table("td_file_label_map",{tenantId:K("tenant_id",{length:64}).$type().notNull(),metadataId:ie("metadata_id",{mode:"number"}).notNull(),labelId:ie("label_id",{mode:"number"}).notNull(),assignedBy:K("assigned_by",{length:32}).notNull(),confidenceScore:Ge("confidence_score",{precision:3,scale:2,mode:"number"}).notNull(),createdAt:re("created_at",{precision:7}).notNull(),createdBy:K("created_by",{length:100}).notNull(),updatedAt:re("updated_at",{precision:7}).notNull(),updatedBy:K("updated_by",{length:100}).notNull()},e=>[ze({name:"PK_td_file_label_map",columns:[e.tenantId,e.metadataId,e.labelId]})]);import{sql as Ye}from"drizzle-orm";import{bigint as O,binary as Xe,bit as w,datetime2 as B,int as V,nvarchar as o,primaryKey as We}from"drizzle-orm/mssql-core";var xn=t.table("td_file_metadata",{id:O("id",{mode:"number"}).identity().notNull(),tenantId:o("tenant_id",{length:64}).$type().notNull(),parentMetadataId:O("parent_metadata_id",{mode:"number"}),fileUri:o("file_uri",{length:2048}).$type().notNull(),fileUriHash:Xe("file_uri_hash",{length:32}).generatedAlwaysAs(Ye`CONVERT(binary(32), HASHBYTES('SHA2_256', file_uri))`,{mode:"persisted"}),fileId:o("file_id",{length:255}),revision:V("revision").notNull(),revisionId:o("revision_id",{length:255}),isCurrent:w("is_current").notNull(),isDeleted:w("is_deleted").notNull(),isDerived:w("is_derived").notNull(),deletedAt:B("deleted_at",{precision:7}),deletedBy:o("deleted_by",{length:100}),fileName:o("file_name",{length:255}).notNull(),filePath:o("file_path",{length:4e3}).notNull(),folderPath:o("folder_path",{length:4e3}),confidentialityLevel:o("confidentiality_level",{length:20}).$type().notNull(),departmentId:V("department_id"),fileSize:O("file_size",{mode:"number"}).notNull(),mimeType:o("mime_type",{length:255}).notNull(),assetType:o("asset_type",{length:50}),assetIndex:V("asset_index"),boundingBox:n("bounding_box"),fileHash:o("file_hash",{length:64}),mtime:B("mtime",{precision:7}).notNull(),createdAt:B("created_at",{precision:7}).notNull(),createdBy:o("created_by",{length:100}).notNull(),updatedAt:B("updated_at",{precision:7}).notNull(),updatedBy:o("updated_by",{length:100}).notNull()},e=>[We({name:"PK_td_file_metadata",columns:[e.id]})]);import{bigint as oe,datetime2 as le,float as Ze,int as j,nvarchar as A,primaryKey as et}from"drizzle-orm/mssql-core";var Pn=t.table("td_file_ocr_results",{id:oe("id",{mode:"number"}).identity().notNull(),tenantId:A("tenant_id",{length:64}).$type().notNull(),metadataId:oe("metadata_id",{mode:"number"}).notNull(),engineName:A("engine_name",{length:50}).notNull(),extractedText:A("extracted_text",{length:"max"}),boundingBoxes:n("bounding_boxes"),confidence:Ze("confidence"),executionTimeMs:j("execution_time_ms").notNull(),pagesRead:j("pages_read"),pagesTotal:j("pages_total"),pageOffsets:n("page_offsets"),createdAt:le("created_at",{precision:7}).notNull(),createdBy:A("created_by",{length:100}).notNull(),updatedAt:le("updated_at",{precision:7}).notNull(),updatedBy:A("updated_by",{length:100}).notNull()},e=>[et({name:"PK_td_file_ocr_results",columns:[e.id]})]);import{bigint as ae,bit as tt,datetime2 as de,int as pe,nvarchar as c,primaryKey as nt}from"drizzle-orm/mssql-core";var Kn=t.table("td_file_pipeline_run",{id:ae("id",{mode:"number"}).identity().notNull(),tenantId:c("tenant_id",{length:64}).$type().notNull(),metadataId:ae("metadata_id",{mode:"number"}).notNull(),revision:pe("revision").notNull(),runUid:p("run_uid").notNull(),jobId:c("job_id",{length:255}).notNull(),attempt:pe("attempt").notNull(),triggerKind:c("trigger_kind",{length:20}).$type().notNull(),documentKind:c("document_kind",{length:20}).notNull(),flowKey:c("flow_key",{length:40}).notNull(),status:c("status",{length:20}).$type().notNull(),retryScheduled:tt("retry_scheduled").notNull().default(!1),failedStepKey:c("failed_step_key",{length:40}),errorMessage:c("error_message",{length:2e3}),requestedBy:c("requested_by",{length:255}).notNull(),startedAt:de("started_at",{precision:7}).notNull(),finishedAt:de("finished_at",{precision:7})},e=>[nt({name:"PK_td_file_pipeline_run",columns:[e.id]})]);import{bigint as E,datetime2 as ue,int as d,nvarchar as l,primaryKey as it}from"drizzle-orm/mssql-core";var Mn=t.table("td_file_pipeline_step",{id:E("id",{mode:"number"}).identity().notNull(),tenantId:l("tenant_id",{length:64}).$type().notNull(),runId:E("run_id",{mode:"number"}).notNull(),sequence:d("sequence").notNull(),stepKey:l("step_key",{length:40}).notNull(),targetMetadataId:E("target_metadata_id",{mode:"number"}).notNull(),status:l("status",{length:20}).$type().notNull(),skipReason:l("skip_reason",{length:255}),provider:l("provider",{length:64}),modelName:l("model_name",{length:255}),engineName:l("engine_name",{length:50}),promptKey:l("prompt_key",{length:128}),promptVersion:d("prompt_version"),strategyId:E("strategy_id",{mode:"number"}),collectionName:l("collection_name",{length:128}),embeddingModel:l("embedding_model",{length:255}),bodySource:l("body_source",{length:20}).$type(),inputChars:d("input_chars"),outputChars:d("output_chars"),pagesRead:d("pages_read"),pagesTotal:d("pages_total"),chunkCount:d("chunk_count"),pointsUpserted:d("points_upserted"),graphNodes:d("graph_nodes"),durationMs:d("duration_ms"),httpStatus:d("http_status"),errorCode:l("error_code",{length:64}),errorMessage:l("error_message",{length:2e3}),detail:n("detail"),startedAt:ue("started_at",{precision:7}).notNull(),finishedAt:ue("finished_at",{precision:7})},e=>[it({name:"PK_td_file_pipeline_step",columns:[e.id]})]);import{sql as me}from"drizzle-orm";import{bigint as P,binary as rt,bit as ot,datetime2 as J,int as C,nvarchar as r,primaryKey as lt,smallint as at}from"drizzle-orm/mssql-core";var Jn=t.table("td_file_state",{id:P("id",{mode:"number"}).identity().notNull(),tenantId:r("tenant_id",{length:64}).$type().notNull(),fileUri:r("file_uri",{length:2048}).$type().notNull(),fileUriHash:rt("file_uri_hash",{length:32}).generatedAlwaysAs(me`CONVERT(binary(32), HASHBYTES('SHA2_256', file_uri))`,{mode:"persisted"}),stateSeq:C("state_seq").notNull(),previousStateId:P("previous_state_id",{mode:"number"}),metadataId:P("metadata_id",{mode:"number"}).notNull(),revision:C("revision").notNull(),revisionId:r("revision_id",{length:255}),causeKind:r("cause_kind",{length:20}).$type().notNull(),runId:P("run_id",{mode:"number"}),runOutcome:r("run_outcome",{length:20}).$type(),settledAt:J("settled_at",{precision:7}).notNull(),actor:r("actor",{length:255}).notNull(),origin:r("origin",{length:200}).notNull(),confidentialityLevel:r("confidentiality_level",{length:20}).$type().notNull(),departmentId:C("department_id"),folderPath:r("folder_path",{length:4e3}),documentCreatedBy:r("document_created_by",{length:100}).notNull(),fileName:r("file_name",{length:255}).notNull(),filePath:r("file_path",{length:4e3}).notNull(),fileId:r("file_id",{length:255}),fileSize:P("file_size",{mode:"number"}).notNull(),mimeType:r("mime_type",{length:255}).notNull(),fileHash:r("file_hash",{length:64}),mtime:J("mtime",{precision:7}).notNull(),textSha256:a("text_sha256"),extractedTextMime:r("extracted_text_mime",{length:255}),extractedTextSource:r("extracted_text_source",{length:16}).$type(),isTruncated:ot("is_truncated").notNull(),pageOffsetsSha256:a("page_offsets_sha256"),summarySha256:a("summary_sha256"),structuredDataSha256:a("structured_data_sha256"),tags:n("tags"),labels:n("labels").notNull(),assets:n("assets").notNull(),chunkManifestSha256:a("chunk_manifest_sha256"),chunkCount:C("chunk_count").notNull(),stateDigest:a("state_digest").notNull(),diffEngineVersion:at("diff_engine_version"),changedFacetCount:C("changed_facet_count"),createdAt:J("created_at",{precision:7}).notNull().default(me`sysutcdatetime()`)},e=>[lt({name:"PK_td_file_state",columns:[e.id]})]);import{sql as dt}from"drizzle-orm";import{bigint as se,datetime2 as pt,int as N,nvarchar as ce,primaryKey as ut}from"drizzle-orm/mssql-core";var Yn=t.table("td_file_state_facet_change",{id:se("id",{mode:"number"}).identity().notNull(),tenantId:ce("tenant_id",{length:64}).$type().notNull(),stateId:se("state_id",{mode:"number"}).notNull(),facet:ce("facet",{length:24}).$type().notNull(),addedCount:N("added_count"),removedCount:N("removed_count"),modifiedCount:N("modified_count"),movedCount:N("moved_count"),unchangedCount:N("unchanged_count"),charsAdded:N("chars_added"),charsRemoved:N("chars_removed"),createdAt:pt("created_at",{precision:7}).notNull().default(dt`sysutcdatetime()`)},e=>[ut({name:"PK_td_file_state_facet_change",columns:[e.id]})]);import{bigint as H,int as ye,nvarchar as y,primaryKey as mt}from"drizzle-orm/mssql-core";var ti=t.table("td_integrity_audit_finding",{id:H("id",{mode:"number"}).identity().notNull(),runId:H("run_id",{mode:"number"}).notNull(),tenantId:y("tenant_id",{length:64}).$type().notNull(),store:y("store",{length:10}).$type().notNull(),scopeKey:y("scope_key",{length:400}).notNull(),itemClass:y("item_class",{length:30}).$type().notNull(),sequence:ye("sequence").notNull(),itemKey:y("item_key",{length:2100}).notNull(),metadataId:H("metadata_id",{mode:"number"}),fileUri:y("file_uri",{length:2048}),revision:ye("revision"),observed:n("observed").notNull(),repairOutcome:y("repair_outcome",{length:20}).$type(),repairErrorClass:y("repair_error_class",{length:200}),repairSkipReason:y("repair_skip_reason",{length:30}).$type()},e=>[mt({name:"PK_td_integrity_audit_finding",columns:[e.id]})]);import{bigint as x,datetime2 as st,nvarchar as _,primaryKey as ct}from"drizzle-orm/mssql-core";var oi=t.table("td_integrity_audit_quantity",{id:x("id",{mode:"number"}).identity().notNull(),runId:x("run_id",{mode:"number"}).notNull(),tenantId:_("tenant_id",{length:64}).$type().notNull(),store:_("store",{length:10}).$type().notNull(),scopeKey:_("scope_key",{length:400}).notNull(),scopeRole:_("scope_role",{length:20}).$type().notNull(),itemClass:_("item_class",{length:30}).$type().notNull(),unit:_("unit",{length:10}).$type().notNull(),disposition:_("disposition",{length:20}).$type().notNull(),repairAction:_("repair_action",{length:10}).$type().notNull(),itemCount:x("item_count",{mode:"number"}),unmeasuredReason:_("unmeasured_reason",{length:400}),measuredAt:st("measured_at",{precision:7}),repairedCount:x("repaired_count",{mode:"number"}),repairFailedCount:x("repair_failed_count",{mode:"number"}),repairSkippedCount:x("repair_skipped_count",{mode:"number"})},e=>[ct({name:"PK_td_integrity_audit_quantity",columns:[e.id]})]);import{bigint as R,datetime2 as q,int as yt,nvarchar as m,primaryKey as _t}from"drizzle-orm/mssql-core";var ui=t.table("td_integrity_audit_run",{id:R("id",{mode:"number"}).identity().notNull(),runUid:p("run_uid").notNull(),tenantId:m("tenant_id",{length:64}).$type().notNull(),mode:m("mode",{length:10}).$type().notNull(),status:m("status",{length:20}).$type().notNull(),requestedBy:m("requested_by",{length:100}).notNull(),executor:m("executor",{length:200}).notNull(),startedAt:q("started_at",{precision:7}).notNull(),heartbeatAt:q("heartbeat_at",{precision:7}).notNull(),finishedAt:q("finished_at",{precision:7}),phase:m("phase",{length:20}).$type(),phaseScope:m("phase_scope",{length:400}),phaseDone:R("phase_done",{mode:"number"}),phaseTotal:R("phase_total",{mode:"number"}),cancelRequestedAt:q("cancel_requested_at",{precision:7}),cancelRequestedBy:m("cancel_requested_by",{length:100}),verdict:m("verdict",{length:20}).$type(),errorClass:m("error_class",{length:200}),basisRunUid:p("basis_run_uid"),storeFingerprint:a("store_fingerprint").notNull(),tombstoneRetentionDays:yt("tombstone_retention_days").notNull(),reprojectDocuments:R("reproject_documents",{mode:"number"}),reprojectRebuildDocuments:R("reproject_rebuild_documents",{mode:"number"})},e=>[_t({name:"PK_td_integrity_audit_run",columns:[e.id]})]);import{bigint as gt,bit as _e,datetime2 as ge,nvarchar as I,primaryKey as ht}from"drizzle-orm/mssql-core";var yi=t.table("tm_confidentiality_capability_policy",{id:gt("id",{mode:"number"}).identity().notNull(),tenantId:I("tenant_id",{length:64}).$type().notNull(),confidentialityLevel:I("confidentiality_level",{length:20}).notNull(),capability:I("capability",{length:32}).notNull(),isEnabled:_e("is_enabled").notNull(),allowCloudProvider:_e("allow_cloud_provider").notNull(),promptKey:I("prompt_key",{length:64}),description:I("description",{length:256}),updatedBy:I("updated_by",{length:100}).notNull(),updatedAt:ge("updated_at",{precision:7}).notNull(),createdAt:ge("created_at",{precision:7}).notNull(),createdBy:I("created_by",{length:100}).notNull()},e=>[ht({name:"PK_tm_confidentiality_capability_policy",columns:[e.id]})]);import{bigint as he,bit as ft,datetime2 as fe,int as be,nvarchar as U,primaryKey as bt}from"drizzle-orm/mssql-core";var bi=t.table("tm_enrichment_classification_rule",{id:he("id",{mode:"number"}).identity().notNull(),tenantId:U("tenant_id",{length:64}).$type().notNull(),strategyId:he("strategy_id",{mode:"number"}).notNull(),priority:be("priority").notNull(),ruleName:U("rule_name",{length:128}).notNull(),matchConditionsJson:n("match_conditions_json").notNull(),assignedDepartmentId:be("assigned_department_id"),isActive:ft("is_active").notNull(),createdAt:fe("created_at",{precision:7}).notNull(),updatedAt:fe("updated_at",{precision:7}).notNull(),createdBy:U("created_by",{length:100}).notNull(),updatedBy:U("updated_by",{length:100}).notNull()},e=>[bt({name:"PK_tm_enrichment_classification_rule",columns:[e.id]})]);import{bigint as Nt,bit as It,datetime2 as Ne,nvarchar as $,primaryKey as Tt}from"drizzle-orm/mssql-core";var Si=t.table("tm_enrichment_domain",{id:Nt("id",{mode:"number"}).identity().notNull(),tenantId:$("tenant_id",{length:64}).$type().notNull(),domainKey:$("domain_key",{length:64}).$type().notNull(),displayName:$("display_name",{length:128}).notNull(),description:$("description",{length:512}),isActive:It("is_active").notNull(),createdAt:Ne("created_at",{precision:7}).notNull(),updatedAt:Ne("updated_at",{precision:7}).notNull(),createdBy:$("created_by",{length:100}).notNull(),updatedBy:$("updated_by",{length:100}).notNull()},e=>[Tt({name:"PK_tm_enrichment_domain",columns:[e.id]})]);import{bigint as Ie,bit as v,datetime2 as Te,int as St,nvarchar as i,primaryKey as xt}from"drizzle-orm/mssql-core";var Ai=t.table("tm_enrichment_strategy",{id:Ie("id",{mode:"number"}).identity().notNull(),tenantId:i("tenant_id",{length:64}).$type().notNull(),domainId:Ie("domain_id",{mode:"number"}).notNull(),strategyName:i("strategy_name",{length:128}).notNull(),systemPrompt:i("system_prompt",{length:"max"}).notNull(),chunkingStrategy:i("chunking_strategy",{length:32}).$type().notNull(),modelProvider:i("model_provider",{length:32}).$type().notNull(),modelRoutingPolicy:i("model_routing_policy",{length:32}).notNull(),mcpToolsJson:n("mcp_tools_json"),modelName:i("model_name",{length:64}).notNull(),modelParametersJson:n("model_parameters_json").notNull(),enableSummaryGeneration:v("enable_summary_generation").notNull(),enableStructuredExtraction:v("enable_structured_extraction").notNull(),enableVectorIndexing:v("enable_vector_indexing").notNull(),enableGraphIndexing:v("enable_graph_indexing").notNull(),enableAssetExtraction:v("enable_asset_extraction").notNull(),targetVectorCollection:i("target_vector_collection",{length:128}).notNull(),vectorDimension:St("vector_dimension").notNull(),vectorDistanceMetric:i("vector_distance_metric",{length:16}).$type().notNull(),vectorIndexingLogic:i("vector_indexing_logic",{length:50}).notNull(),targetGraphDatabase:i("target_graph_database",{length:64}).notNull(),targetGraphDomainLabel:i("target_graph_domain_label",{length:64}),searchFederationDomainsJson:n("search_federation_domains_json"),embeddingModel:i("embedding_model",{length:255}).notNull(),embeddingProvider:i("embedding_provider",{length:32}).$type().notNull(),embeddingBaseUrl:i("embedding_base_url",{length:512}),embeddingApiKeyEnv:i("embedding_api_key_env",{length:128}),embeddingQueryPrefix:i("embedding_query_prefix",{length:256}).notNull(),embeddingPassagePrefix:i("embedding_passage_prefix",{length:256}).notNull(),variantKey:i("variant_key",{length:64}).notNull(),isActive:v("is_active").notNull(),createdAt:Te("created_at",{precision:7}).notNull(),updatedAt:Te("updated_at",{precision:7}).notNull(),createdBy:i("created_by",{length:100}).notNull(),updatedBy:i("updated_by",{length:100}).notNull()},e=>[xt({name:"PK_tm_enrichment_strategy",columns:[e.id]})]);import{bigint as $t,bit as Se,datetime2 as xe,nvarchar as T,primaryKey as vt}from"drizzle-orm/mssql-core";var ki=t.table("tm_label_definition",{id:$t("id",{mode:"number"}).identity().notNull(),tenantId:T("tenant_id",{length:64}).$type().notNull(),labelKey:T("label_key",{length:64}).notNull(),labelCategory:T("label_category",{length:32}).notNull(),displayName:T("display_name",{length:128}).notNull(),colorCode:T("color_code",{length:16}),isInheritable:Se("is_inheritable").notNull(),isActive:Se("is_active").notNull(),createdAt:xe("created_at",{precision:7}).notNull(),updatedAt:xe("updated_at",{precision:7}).notNull(),createdBy:T("created_by",{length:100}).notNull(),updatedBy:T("updated_by",{length:100}).notNull()},e=>[vt({name:"PK_tm_label_definition",columns:[e.id]})]);import{bigint as Ft,bit as At,datetime2 as $e,int as Pt,nvarchar as g,primaryKey as Ct}from"drizzle-orm/mssql-core";var qi=t.table("tm_prompt_template",{id:Ft("id",{mode:"number"}).identity().notNull(),tenantId:g("tenant_id",{length:64}).$type().notNull(),promptKey:g("prompt_key",{length:64}).notNull(),promptVersion:Pt("prompt_version").notNull(),systemPrompt:g("system_prompt",{length:"max"}).notNull(),userPromptTemplate:g("user_prompt_template",{length:"max"}),inputVariablesJson:n("input_variables_json"),modelProvider:g("model_provider",{length:32}).$type().notNull(),modelName:g("model_name",{length:64}).notNull(),modelParametersJson:n("model_parameters_json").notNull(),isActive:At("is_active").notNull(),updatedBy:g("updated_by",{length:100}).notNull(),updatedAt:$e("updated_at",{precision:7}).notNull(),createdAt:$e("created_at",{precision:7}).notNull(),createdBy:g("created_by",{length:100}).notNull()},e=>[Ct({name:"PK_tm_prompt_template",columns:[e.id]})]);import{bigint as Rt,bit as ve,datetime2 as Fe,nvarchar as k,primaryKey as kt}from"drizzle-orm/mssql-core";var Oi=t.table("tm_system_feature_flag",{id:Rt("id",{mode:"number"}).identity().notNull(),tenantId:k("tenant_id",{length:64}).$type().notNull(),featureKey:k("feature_key",{length:64}).notNull(),isEnabled:ve("is_enabled").notNull(),description:k("description",{length:256}),circuitBreakerEnabled:ve("circuit_breaker_enabled").notNull(),updatedBy:k("updated_by",{length:100}).notNull(),updatedAt:Fe("updated_at",{precision:7}).notNull(),createdAt:Fe("created_at",{precision:7}).notNull(),createdBy:k("created_by",{length:100}).notNull()},e=>[kt({name:"PK_tm_system_feature_flag",columns:[e.id]})]);import{bigint as Dt,bit as Kt,datetime2 as Ae,nvarchar as h,primaryKey as Bt}from"drizzle-orm/mssql-core";var Ji=t.table("tm_system_parameter",{id:Dt("id",{mode:"number"}).identity().notNull(),tenantId:h("tenant_id",{length:64}).$type().notNull(),paramCategory:h("param_category",{length:32}).notNull(),paramKey:h("param_key",{length:64}).notNull(),paramValue:h("param_value",{length:"max"}).notNull(),dataType:h("data_type",{length:16}).notNull(),description:h("description",{length:256}),isEncrypted:Kt("is_encrypted").notNull(),updatedBy:h("updated_by",{length:100}).notNull(),updatedAt:Ae("updated_at",{precision:7}).notNull(),createdAt:Ae("created_at",{precision:7}).notNull(),createdBy:h("created_by",{length:100}).notNull()},e=>[Bt({name:"PK_tm_system_parameter",columns:[e.id]})]);import{bigint as Et,bit as qt,datetime2 as Pe,nvarchar as F,primaryKey as Ut}from"drizzle-orm/mssql-core";var zi=t.table("tm_transcription_reference",{id:Et("id",{mode:"number"}).identity().notNull(),tenantId:F("tenant_id",{length:64}).$type().notNull(),domainKey:F("domain_key",{length:64}),fileUri:F("file_uri",{length:2048}).notNull(),isActive:qt("is_active").notNull(),description:F("description",{length:400}),updatedBy:F("updated_by",{length:100}).notNull(),updatedAt:Pe("updated_at",{precision:7}).notNull(),createdAt:Pe("created_at",{precision:7}).notNull(),createdBy:F("created_by",{length:100}).notNull()},e=>[Ut({name:"PK_tm_transcription_reference",columns:[e.id]})]);import{bigint as Mt,bit as Lt,datetime2 as Ce,float as Ot,nvarchar as S,primaryKey as wt}from"drizzle-orm/mssql-core";var Zi=t.table("tm_transcription_vocabulary",{id:Mt("id",{mode:"number"}).identity().notNull(),tenantId:S("tenant_id",{length:64}).$type().notNull(),domainKey:S("domain_key",{length:64}),term:S("term",{length:200}).notNull(),reading:S("reading",{length:200}),boost:Ot("boost"),isActive:Lt("is_active").notNull(),description:S("description",{length:400}),updatedBy:S("updated_by",{length:100}).notNull(),updatedAt:Ce("updated_at",{precision:7}).notNull(),createdAt:Ce("created_at",{precision:7}).notNull(),createdBy:S("created_by",{length:100}).notNull()},e=>[wt({name:"PK_tm_transcription_vocabulary",columns:[e.id]})]);export{Xt as TdFileChunk,nn as TdFileChunkParent,pn as TdFileContentObject,yn as TdFileEnrichment,fn as TdFileLabelMap,xn as TdFileMetadata,Pn as TdFileOcrResults,Kn as TdFilePipelineRun,Mn as TdFilePipelineStep,Jn as TdFileState,Yn as TdFileStateFacetChange,ti as TdIntegrityAuditFinding,oi as TdIntegrityAuditQuantity,ui as TdIntegrityAuditRun,yi as TmConfidentialityCapabilityPolicy,bi as TmEnrichmentClassificationRule,Si as TmEnrichmentDomain,Ai as TmEnrichmentStrategy,ki as TmLabelDefinition,qi as TmPromptTemplate,Oi as TmSystemFeatureFlag,Ji as TmSystemParameter,zi as TmTranscriptionReference,Zi as TmTranscriptionVocabulary,t as dbo,n as mssqlJson,a as sha256Binary,p as uniqueidentifier};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/enrichment-drizzle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Drizzle ORM (mssql) models and types for storage metadata AI enrichment, chunks, system configurations, and the tri-store integrity audit's records.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"drizzle",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"LICENSE"
|
|
41
41
|
],
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@aiquants/enrichment-core": "0.
|
|
43
|
+
"@aiquants/enrichment-core": "0.4.0",
|
|
44
44
|
"@vitest/coverage-v8": "^4.1.8",
|
|
45
45
|
"drizzle-orm": "1.0.0-rc.4",
|
|
46
46
|
"rimraf": "^6.1.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"vitest": "^4.1.8"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@aiquants/enrichment-core": "^0.
|
|
52
|
+
"@aiquants/enrichment-core": "^0.4.0",
|
|
53
53
|
"drizzle-orm": ">=1.0.0-beta.4 <2.0.0"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|