@aiquants/governance-drizzle 0.1.1
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/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +789 -0
- package/dist/index.d.ts +789 -0
- package/dist/index.js +1 -0
- package/package.json +84 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {mssqlSchema,nvarchar,datetime2,bigint,datetimeoffset,tinyint,primaryKey,customType,bit}from'drizzle-orm/mssql-core';var o=mssqlSchema("dbo");var A=o.table("td_document_authority",{id:bigint("id",{mode:"number"}).identity().notNull(),tenantId:nvarchar("tenant_id",{length:64}).$type().notNull(),metadataId:bigint("metadata_id",{mode:"number"}).notNull(),authorityTier:tinyint("authority_tier").$type().notNull(),policyCategory:nvarchar("policy_category",{length:50}).notNull(),validFrom:datetimeoffset("valid_from",{precision:7}).notNull(),validUntil:datetimeoffset("valid_until",{precision:7}),txCreatedAt:datetimeoffset("tx_created_at",{precision:7}).notNull(),txSupersededAt:datetimeoffset("tx_superseded_at",{precision:7}),replacesMetadataId:bigint("replaces_metadata_id",{mode:"number"}),supersededByMetadataId:bigint("superseded_by_metadata_id",{mode:"number"}),approvalStatus:nvarchar("approval_status",{length:20}).$type().notNull(),createdAt:datetime2("created_at",{precision:7}).notNull(),createdBy:nvarchar("created_by",{length:100}).notNull(),updatedAt:datetime2("updated_at",{precision:7}).notNull(),updatedBy:nvarchar("updated_by",{length:100}).notNull()},t=>[primaryKey({name:"PK_td_document_authority",columns:[t.id]})]);var _=customType({dataType(){return "nvarchar(max)"},toDriver(t){return t==null?null:typeof t=="string"?t:JSON.stringify(t)},fromDriver(t){return t==null||t===""?null:typeof t!="string"?t:JSON.parse(t)}}),i=t=>_(t).$type();var B=o.table("td_governance_golden_benchmark",{id:bigint("id",{mode:"number"}).identity().notNull(),tenantId:nvarchar("tenant_id",{length:64}).$type().notNull(),caseId:nvarchar("case_id",{length:64}).notNull(),queryText:nvarchar("query_text",{length:"max"}).notNull(),category:nvarchar("category",{length:32}).notNull(),expectedChunkUidsJson:i("expected_chunk_uids_json").notNull(),expectedAnswerKeywordsJson:i("expected_answer_keywords_json"),confidentialityLevel:nvarchar("confidentiality_level",{length:20}).$type().notNull(),isActive:bit("is_active").notNull(),createdAt:datetime2("created_at",{precision:7}).notNull(),createdBy:nvarchar("created_by",{length:100}).notNull(),updatedAt:datetime2("updated_at",{precision:7}).notNull(),updatedBy:nvarchar("updated_by",{length:100}).notNull()},t=>[primaryKey({name:"PK_td_governance_golden_benchmark",columns:[t.id]})]);var q=o.table("td_policy_conflicts",{id:bigint("id",{mode:"number"}).identity().notNull(),tenantId:nvarchar("tenant_id",{length:64}).$type().notNull(),sourceMetadataId:bigint("source_metadata_id",{mode:"number"}).notNull(),targetMetadataId:bigint("target_metadata_id",{mode:"number"}).notNull(),conflictSummary:nvarchar("conflict_summary",{length:1e3}).notNull(),detectedRuleDiff:i("detected_rule_diff"),severity:nvarchar("severity",{length:20}).$type().notNull(),resolutionStatus:nvarchar("resolution_status",{length:20}).$type().notNull(),arbitrationDecision:nvarchar("arbitration_decision",{length:"max"}),resolvedBy:nvarchar("resolved_by",{length:100}),createdAt:datetime2("created_at",{precision:7}).notNull(),createdBy:nvarchar("created_by",{length:100}).notNull(),updatedAt:datetime2("updated_at",{precision:7}).notNull(),updatedBy:nvarchar("updated_by",{length:100}).notNull()},t=>[primaryKey({name:"PK_td_policy_conflicts",columns:[t.id]})]);export{A as TdDocumentAuthority,B as TdGovernanceGoldenBenchmark,q as TdPolicyConflicts,o as dbo,i as mssqlJson};
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aiquants/governance-drizzle",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Drizzle ORM (mssql) models and types for enterprise knowledge governance (document authority, policy conflicts, golden benchmarks).",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"drizzle",
|
|
7
|
+
"mssql",
|
|
8
|
+
"governance",
|
|
9
|
+
"authority",
|
|
10
|
+
"policy-conflicts",
|
|
11
|
+
"golden-benchmark",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": "AI Quants",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/fehde-k/aiquants.git",
|
|
19
|
+
"directory": "packages/governance-drizzle"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/fehde-k/aiquants/tree/main/packages/governance-drizzle#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/fehde-k/aiquants/issues"
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./dist/index.cjs",
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"require": {
|
|
37
|
+
"types": "./dist/index.d.cts",
|
|
38
|
+
"default": "./dist/index.cjs"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"README.md",
|
|
45
|
+
"LICENSE"
|
|
46
|
+
],
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@aiquants/enrichment-core": "0.1.1",
|
|
49
|
+
"@aiquants/governance-core": "0.1.0",
|
|
50
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
51
|
+
"drizzle-orm": "1.0.0-rc.4",
|
|
52
|
+
"rimraf": "^6.1.2",
|
|
53
|
+
"tsup": "^8.5.1",
|
|
54
|
+
"typescript": "^5.9.3",
|
|
55
|
+
"vitest": "^4.1.8"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@aiquants/enrichment-core": "^0.1.1",
|
|
59
|
+
"@aiquants/governance-core": "^0.1.0",
|
|
60
|
+
"drizzle-orm": ">=1.0.0-beta.4 <2.0.0"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=18.0.0",
|
|
64
|
+
"pnpm": ">=8.0.0"
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsup && node ../../.config/scripts/strip-dts-comments.mjs dist",
|
|
71
|
+
"build:watch": "tsup --watch",
|
|
72
|
+
"dev": "tsup --watch",
|
|
73
|
+
"publish:patch": "pnpm run build && pnpm run typecheck && pnpm run --if-present test && pnpm version patch --no-git-tag-version --no-git-checks && pnpm publish --no-git-checks",
|
|
74
|
+
"publish:minor": "pnpm run build && pnpm run typecheck && pnpm run --if-present test && pnpm version minor --no-git-tag-version --no-git-checks && pnpm publish --no-git-checks",
|
|
75
|
+
"publish:major": "pnpm run build && pnpm run typecheck && pnpm run --if-present test && pnpm version major --no-git-tag-version --no-git-checks && pnpm publish --no-git-checks",
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"clean": "rimraf dist",
|
|
78
|
+
"lint": "biome lint src/ tests/",
|
|
79
|
+
"check": "biome check src/ tests/",
|
|
80
|
+
"check:fix": "biome check --write src/ tests/",
|
|
81
|
+
"test": "vitest run",
|
|
82
|
+
"test:coverage": "vitest run --coverage"
|
|
83
|
+
}
|
|
84
|
+
}
|