@contractspec/example.versioned-knowledge-base 1.44.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/.turbo/turbo-build$colon$bundle.log +47 -0
- package/.turbo/turbo-build.log +48 -0
- package/CHANGELOG.md +161 -0
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/versioned-knowledge-base.docblock.d.ts +1 -0
- package/dist/docs/versioned-knowledge-base.docblock.js +31 -0
- package/dist/docs/versioned-knowledge-base.docblock.js.map +1 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.js +3 -0
- package/dist/entities/models.d.ts +139 -0
- package/dist/entities/models.d.ts.map +1 -0
- package/dist/entities/models.js +151 -0
- package/dist/entities/models.js.map +1 -0
- package/dist/events.d.ts +63 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +124 -0
- package/dist/events.js.map +1 -0
- package/dist/example.d.ts +36 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +42 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/memory.handlers.d.ts +78 -0
- package/dist/handlers/memory.handlers.d.ts.map +1 -0
- package/dist/handlers/memory.handlers.js +104 -0
- package/dist/handlers/memory.handlers.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +11 -0
- package/dist/operations/index.d.ts +2 -0
- package/dist/operations/index.js +3 -0
- package/dist/operations/kb.d.ts +267 -0
- package/dist/operations/kb.d.ts.map +1 -0
- package/dist/operations/kb.js +256 -0
- package/dist/operations/kb.js.map +1 -0
- package/dist/versioned-knowledge-base.feature.d.ts +7 -0
- package/dist/versioned-knowledge-base.feature.d.ts.map +1 -0
- package/dist/versioned-knowledge-base.feature.js +68 -0
- package/dist/versioned-knowledge-base.feature.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +74 -0
- package/src/docs/index.ts +1 -0
- package/src/docs/versioned-knowledge-base.docblock.ts +29 -0
- package/src/entities/index.ts +1 -0
- package/src/entities/models.ts +75 -0
- package/src/events.ts +102 -0
- package/src/example.ts +27 -0
- package/src/handlers/index.ts +1 -0
- package/src/handlers/memory.handlers.test.ts +81 -0
- package/src/handlers/memory.handlers.ts +217 -0
- package/src/index.ts +13 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/kb.ts +201 -0
- package/src/versioned-knowledge-base.feature.ts +34 -0
- package/tsconfig.json +19 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +17 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
$ tsdown
|
|
2
|
+
[34mℹ[39m tsdown [2mv0.18.3[22m powered by rolldown [2mv1.0.0-beta.57[22m
|
|
3
|
+
[34mℹ[39m config file: [4m/home/runner/work/contractspec/contractspec/packages/examples/versioned-knowledge-base/tsdown.config.js[24m
|
|
4
|
+
[34mℹ[39m entry: [34msrc/events.ts, src/example.ts, src/index.ts, src/versioned-knowledge-base.feature.ts, src/docs/index.ts, src/docs/versioned-knowledge-base.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/index.ts, src/handlers/memory.handlers.ts, src/operations/index.ts, src/operations/kb.ts[39m
|
|
5
|
+
[34mℹ[39m target: [34mesnext[39m
|
|
6
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
7
|
+
[34mℹ[39m Build start
|
|
8
|
+
[34mℹ[39m Cleaning 41 files
|
|
9
|
+
[34mℹ[39m [2mdist/[22m[1moperations/kb.js[22m [2m6.43 kB[22m [2m│ gzip: 1.57 kB[22m
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1mhandlers/memory.handlers.js[22m [2m3.50 kB[22m [2m│ gzip: 1.21 kB[22m
|
|
11
|
+
[34mℹ[39m [2mdist/[22m[1mentities/models.js[22m [2m3.38 kB[22m [2m│ gzip: 0.68 kB[22m
|
|
12
|
+
[34mℹ[39m [2mdist/[22m[1mevents.js[22m [2m3.13 kB[22m [2m│ gzip: 0.67 kB[22m
|
|
13
|
+
[34mℹ[39m [2mdist/[22m[1mdocs/versioned-knowledge-base.docblock.js[22m [2m1.52 kB[22m [2m│ gzip: 0.66 kB[22m
|
|
14
|
+
[34mℹ[39m [2mdist/[22m[1mversioned-knowledge-base.feature.js[22m [2m1.19 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
15
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m1.16 kB[22m [2m│ gzip: 0.35 kB[22m
|
|
16
|
+
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m0.89 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
17
|
+
[34mℹ[39m [2mdist/[22m[1moperations/index.js[22m [2m0.29 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
18
|
+
[34mℹ[39m [2mdist/[22m[1mentities/index.js[22m [2m0.21 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
19
|
+
[34mℹ[39m [2mdist/[22m[1mhandlers/index.js[22m [2m0.14 kB[22m [2m│ gzip: 0.09 kB[22m
|
|
20
|
+
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.05 kB[22m [2m│ gzip: 0.07 kB[22m
|
|
21
|
+
[34mℹ[39m [2mdist/[22moperations/kb.js.map [2m9.48 kB[22m [2m│ gzip: 2.10 kB[22m
|
|
22
|
+
[34mℹ[39m [2mdist/[22mhandlers/memory.handlers.js.map [2m8.62 kB[22m [2m│ gzip: 2.48 kB[22m
|
|
23
|
+
[34mℹ[39m [2mdist/[22mentities/models.js.map [2m5.08 kB[22m [2m│ gzip: 1.01 kB[22m
|
|
24
|
+
[34mℹ[39m [2mdist/[22mevents.js.map [2m4.70 kB[22m [2m│ gzip: 0.98 kB[22m
|
|
25
|
+
[34mℹ[39m [2mdist/[22mdocs/versioned-knowledge-base.docblock.js.map [2m2.02 kB[22m [2m│ gzip: 0.84 kB[22m
|
|
26
|
+
[34mℹ[39m [2mdist/[22mversioned-knowledge-base.feature.js.map [2m1.92 kB[22m [2m│ gzip: 0.72 kB[22m
|
|
27
|
+
[34mℹ[39m [2mdist/[22mexample.js.map [2m1.27 kB[22m [2m│ gzip: 0.63 kB[22m
|
|
28
|
+
[34mℹ[39m [2mdist/[22mhandlers/memory.handlers.d.ts.map [2m1.17 kB[22m [2m│ gzip: 0.53 kB[22m
|
|
29
|
+
[34mℹ[39m [2mdist/[22moperations/kb.d.ts.map [2m1.11 kB[22m [2m│ gzip: 0.39 kB[22m
|
|
30
|
+
[34mℹ[39m [2mdist/[22mentities/models.d.ts.map [2m0.69 kB[22m [2m│ gzip: 0.32 kB[22m
|
|
31
|
+
[34mℹ[39m [2mdist/[22mevents.d.ts.map [2m0.67 kB[22m [2m│ gzip: 0.28 kB[22m
|
|
32
|
+
[34mℹ[39m [2mdist/[22mversioned-knowledge-base.feature.d.ts.map [2m0.18 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
33
|
+
[34mℹ[39m [2mdist/[22mexample.d.ts.map [2m0.14 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
34
|
+
[34mℹ[39m [2mdist/[22m[32m[1moperations/kb.d.ts[22m[39m [2m7.75 kB[22m [2m│ gzip: 0.64 kB[22m
|
|
35
|
+
[34mℹ[39m [2mdist/[22m[32m[1mentities/models.d.ts[22m[39m [2m3.88 kB[22m [2m│ gzip: 0.52 kB[22m
|
|
36
|
+
[34mℹ[39m [2mdist/[22m[32m[1mevents.d.ts[22m[39m [2m2.14 kB[22m [2m│ gzip: 0.39 kB[22m
|
|
37
|
+
[34mℹ[39m [2mdist/[22m[32m[1mhandlers/memory.handlers.d.ts[22m[39m [2m1.94 kB[22m [2m│ gzip: 0.61 kB[22m
|
|
38
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m1.18 kB[22m [2m│ gzip: 0.35 kB[22m
|
|
39
|
+
[34mℹ[39m [2mdist/[22m[32m[1mexample.d.ts[22m[39m [2m1.14 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
40
|
+
[34mℹ[39m [2mdist/[22m[32m[1mversioned-knowledge-base.feature.d.ts[22m[39m [2m0.30 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
41
|
+
[34mℹ[39m [2mdist/[22m[32m[1moperations/index.d.ts[22m[39m [2m0.29 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
42
|
+
[34mℹ[39m [2mdist/[22m[32m[1mentities/index.d.ts[22m[39m [2m0.21 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
43
|
+
[34mℹ[39m [2mdist/[22m[32m[1mhandlers/index.d.ts[22m[39m [2m0.20 kB[22m [2m│ gzip: 0.10 kB[22m
|
|
44
|
+
[34mℹ[39m [2mdist/[22m[32m[1mdocs/index.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
45
|
+
[34mℹ[39m [2mdist/[22m[32m[1mdocs/versioned-knowledge-base.docblock.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
46
|
+
[34mℹ[39m 37 files, total: 78.00 kB
|
|
47
|
+
[32m✔[39m Build complete in [32m20769ms[39m
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
$ bun build:types && bun build:bundle
|
|
2
|
+
$ tsc --noEmit
|
|
3
|
+
$ tsdown
|
|
4
|
+
[34mℹ[39m tsdown [2mv0.18.3[22m powered by rolldown [2mv1.0.0-beta.57[22m
|
|
5
|
+
[34mℹ[39m config file: [4m/home/runner/work/contractspec/contractspec/packages/examples/versioned-knowledge-base/tsdown.config.js[24m
|
|
6
|
+
[34mℹ[39m entry: [34msrc/events.ts, src/example.ts, src/index.ts, src/versioned-knowledge-base.feature.ts, src/docs/index.ts, src/docs/versioned-knowledge-base.docblock.ts, src/entities/index.ts, src/entities/models.ts, src/handlers/index.ts, src/handlers/memory.handlers.ts, src/operations/index.ts, src/operations/kb.ts[39m
|
|
7
|
+
[34mℹ[39m target: [34mesnext[39m
|
|
8
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
|
+
[34mℹ[39m Build start
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1moperations/kb.js[22m [2m6.43 kB[22m [2m│ gzip: 1.57 kB[22m
|
|
11
|
+
[34mℹ[39m [2mdist/[22m[1mhandlers/memory.handlers.js[22m [2m3.50 kB[22m [2m│ gzip: 1.21 kB[22m
|
|
12
|
+
[34mℹ[39m [2mdist/[22m[1mentities/models.js[22m [2m3.38 kB[22m [2m│ gzip: 0.68 kB[22m
|
|
13
|
+
[34mℹ[39m [2mdist/[22m[1mevents.js[22m [2m3.13 kB[22m [2m│ gzip: 0.67 kB[22m
|
|
14
|
+
[34mℹ[39m [2mdist/[22m[1mdocs/versioned-knowledge-base.docblock.js[22m [2m1.52 kB[22m [2m│ gzip: 0.66 kB[22m
|
|
15
|
+
[34mℹ[39m [2mdist/[22m[1mversioned-knowledge-base.feature.js[22m [2m1.19 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
16
|
+
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m1.16 kB[22m [2m│ gzip: 0.35 kB[22m
|
|
17
|
+
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m0.89 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
18
|
+
[34mℹ[39m [2mdist/[22m[1moperations/index.js[22m [2m0.29 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
19
|
+
[34mℹ[39m [2mdist/[22m[1mentities/index.js[22m [2m0.21 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
20
|
+
[34mℹ[39m [2mdist/[22m[1mhandlers/index.js[22m [2m0.14 kB[22m [2m│ gzip: 0.09 kB[22m
|
|
21
|
+
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.05 kB[22m [2m│ gzip: 0.07 kB[22m
|
|
22
|
+
[34mℹ[39m [2mdist/[22moperations/kb.js.map [2m9.48 kB[22m [2m│ gzip: 2.10 kB[22m
|
|
23
|
+
[34mℹ[39m [2mdist/[22mhandlers/memory.handlers.js.map [2m8.62 kB[22m [2m│ gzip: 2.48 kB[22m
|
|
24
|
+
[34mℹ[39m [2mdist/[22mentities/models.js.map [2m5.08 kB[22m [2m│ gzip: 1.01 kB[22m
|
|
25
|
+
[34mℹ[39m [2mdist/[22mevents.js.map [2m4.70 kB[22m [2m│ gzip: 0.98 kB[22m
|
|
26
|
+
[34mℹ[39m [2mdist/[22mdocs/versioned-knowledge-base.docblock.js.map [2m2.02 kB[22m [2m│ gzip: 0.84 kB[22m
|
|
27
|
+
[34mℹ[39m [2mdist/[22mversioned-knowledge-base.feature.js.map [2m1.92 kB[22m [2m│ gzip: 0.72 kB[22m
|
|
28
|
+
[34mℹ[39m [2mdist/[22mexample.js.map [2m1.27 kB[22m [2m│ gzip: 0.63 kB[22m
|
|
29
|
+
[34mℹ[39m [2mdist/[22mhandlers/memory.handlers.d.ts.map [2m1.17 kB[22m [2m│ gzip: 0.53 kB[22m
|
|
30
|
+
[34mℹ[39m [2mdist/[22moperations/kb.d.ts.map [2m1.11 kB[22m [2m│ gzip: 0.39 kB[22m
|
|
31
|
+
[34mℹ[39m [2mdist/[22mentities/models.d.ts.map [2m0.69 kB[22m [2m│ gzip: 0.32 kB[22m
|
|
32
|
+
[34mℹ[39m [2mdist/[22mevents.d.ts.map [2m0.67 kB[22m [2m│ gzip: 0.28 kB[22m
|
|
33
|
+
[34mℹ[39m [2mdist/[22mversioned-knowledge-base.feature.d.ts.map [2m0.18 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
34
|
+
[34mℹ[39m [2mdist/[22mexample.d.ts.map [2m0.14 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
35
|
+
[34mℹ[39m [2mdist/[22m[32m[1moperations/kb.d.ts[22m[39m [2m7.68 kB[22m [2m│ gzip: 0.63 kB[22m
|
|
36
|
+
[34mℹ[39m [2mdist/[22m[32m[1mentities/models.d.ts[22m[39m [2m3.88 kB[22m [2m│ gzip: 0.52 kB[22m
|
|
37
|
+
[34mℹ[39m [2mdist/[22m[32m[1mevents.d.ts[22m[39m [2m2.15 kB[22m [2m│ gzip: 0.39 kB[22m
|
|
38
|
+
[34mℹ[39m [2mdist/[22m[32m[1mhandlers/memory.handlers.d.ts[22m[39m [2m1.94 kB[22m [2m│ gzip: 0.61 kB[22m
|
|
39
|
+
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m1.18 kB[22m [2m│ gzip: 0.35 kB[22m
|
|
40
|
+
[34mℹ[39m [2mdist/[22m[32m[1mexample.d.ts[22m[39m [2m1.14 kB[22m [2m│ gzip: 0.46 kB[22m
|
|
41
|
+
[34mℹ[39m [2mdist/[22m[32m[1mversioned-knowledge-base.feature.d.ts[22m[39m [2m0.30 kB[22m [2m│ gzip: 0.18 kB[22m
|
|
42
|
+
[34mℹ[39m [2mdist/[22m[32m[1moperations/index.d.ts[22m[39m [2m0.29 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
43
|
+
[34mℹ[39m [2mdist/[22m[32m[1mentities/index.d.ts[22m[39m [2m0.21 kB[22m [2m│ gzip: 0.11 kB[22m
|
|
44
|
+
[34mℹ[39m [2mdist/[22m[32m[1mhandlers/index.d.ts[22m[39m [2m0.20 kB[22m [2m│ gzip: 0.10 kB[22m
|
|
45
|
+
[34mℹ[39m [2mdist/[22m[32m[1mdocs/index.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
46
|
+
[34mℹ[39m [2mdist/[22m[32m[1mdocs/versioned-knowledge-base.docblock.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
47
|
+
[34mℹ[39m 37 files, total: 77.94 kB
|
|
48
|
+
[32m✔[39m Build complete in [32m22347ms[39m
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# @contractspec/example.versioned-knowledge-base
|
|
2
|
+
|
|
3
|
+
## 1.44.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5f3a868: chore: isolate branding to contractspec.io
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [5f3a868]
|
|
12
|
+
- @contractspec/lib.contracts@1.44.0
|
|
13
|
+
- @contractspec/lib.schema@1.44.0
|
|
14
|
+
|
|
15
|
+
## 1.43.4
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 9216062: fix: cross-platform compatibility
|
|
20
|
+
- Updated dependencies [9216062]
|
|
21
|
+
- @contractspec/lib.contracts@1.43.4
|
|
22
|
+
- @contractspec/lib.schema@1.43.3
|
|
23
|
+
|
|
24
|
+
## 1.43.3
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 24d9759: improve documentation
|
|
29
|
+
- Updated dependencies [24d9759]
|
|
30
|
+
- @contractspec/lib.contracts@1.43.3
|
|
31
|
+
- @contractspec/lib.schema@1.43.2
|
|
32
|
+
|
|
33
|
+
## 1.43.2
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- e147271: fix: improve stability
|
|
38
|
+
- Updated dependencies [e147271]
|
|
39
|
+
- @contractspec/lib.contracts@1.43.2
|
|
40
|
+
- @contractspec/lib.schema@1.43.1
|
|
41
|
+
|
|
42
|
+
## 1.43.1
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [f28fdad]
|
|
47
|
+
- @contractspec/lib.contracts@1.43.1
|
|
48
|
+
|
|
49
|
+
## 1.43.0
|
|
50
|
+
|
|
51
|
+
### Minor Changes
|
|
52
|
+
|
|
53
|
+
- 042d072: feat: schema declaration using json schema, including zod
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- Updated dependencies [042d072]
|
|
58
|
+
- @contractspec/lib.contracts@1.43.0
|
|
59
|
+
- @contractspec/lib.schema@1.43.0
|
|
60
|
+
|
|
61
|
+
## 1.42.10
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- 1e6a0f1: fix: mcp server
|
|
66
|
+
- Updated dependencies [1e6a0f1]
|
|
67
|
+
- @contractspec/lib.contracts@1.42.10
|
|
68
|
+
- @contractspec/lib.schema@1.42.10
|
|
69
|
+
|
|
70
|
+
## 1.42.9
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- 9281db7: fix ModelRegistry
|
|
75
|
+
- Updated dependencies [9281db7]
|
|
76
|
+
- @contractspec/lib.contracts@1.42.9
|
|
77
|
+
- @contractspec/lib.schema@1.42.9
|
|
78
|
+
|
|
79
|
+
## 1.42.8
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- e07b5ac: fix
|
|
84
|
+
- Updated dependencies [e07b5ac]
|
|
85
|
+
- @contractspec/lib.contracts@1.42.8
|
|
86
|
+
- @contractspec/lib.schema@1.42.8
|
|
87
|
+
|
|
88
|
+
## 1.42.7
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- e9b575d: fix release
|
|
93
|
+
- Updated dependencies [e9b575d]
|
|
94
|
+
- @contractspec/lib.contracts@1.42.7
|
|
95
|
+
- @contractspec/lib.schema@1.42.7
|
|
96
|
+
|
|
97
|
+
## 1.42.6
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- 1500242: fix tooling
|
|
102
|
+
- Updated dependencies [1500242]
|
|
103
|
+
- @contractspec/lib.contracts@1.42.6
|
|
104
|
+
- @contractspec/lib.schema@1.42.6
|
|
105
|
+
|
|
106
|
+
## 1.42.5
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- 1299719: fix vscode
|
|
111
|
+
- Updated dependencies [1299719]
|
|
112
|
+
- @contractspec/lib.contracts@1.42.5
|
|
113
|
+
- @contractspec/lib.schema@1.42.5
|
|
114
|
+
|
|
115
|
+
## 1.42.4
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- ac28b99: fix: generate from openapi
|
|
120
|
+
- Updated dependencies [ac28b99]
|
|
121
|
+
- @contractspec/lib.contracts@1.42.4
|
|
122
|
+
- @contractspec/lib.schema@1.42.4
|
|
123
|
+
|
|
124
|
+
## 1.42.3
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- 3f5d015: fix(tooling): cicd
|
|
129
|
+
- Updated dependencies [3f5d015]
|
|
130
|
+
- @contractspec/lib.contracts@1.42.3
|
|
131
|
+
- @contractspec/lib.schema@1.42.3
|
|
132
|
+
|
|
133
|
+
## 1.42.2
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- 1f9ac4c: fix
|
|
138
|
+
- Updated dependencies [1f9ac4c]
|
|
139
|
+
- @contractspec/lib.contracts@1.42.2
|
|
140
|
+
- @contractspec/lib.schema@1.42.2
|
|
141
|
+
|
|
142
|
+
## 1.42.1
|
|
143
|
+
|
|
144
|
+
### Patch Changes
|
|
145
|
+
|
|
146
|
+
- f043995: Fix release
|
|
147
|
+
- Updated dependencies [f043995]
|
|
148
|
+
- @contractspec/lib.contracts@1.42.1
|
|
149
|
+
- @contractspec/lib.schema@1.42.1
|
|
150
|
+
|
|
151
|
+
## 1.42.0
|
|
152
|
+
|
|
153
|
+
### Minor Changes
|
|
154
|
+
|
|
155
|
+
- 8eefd9c: initial release
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- Updated dependencies [8eefd9c]
|
|
160
|
+
- @contractspec/lib.contracts@1.42.0
|
|
161
|
+
- @contractspec/lib.schema@1.42.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chaman Ventures, SASU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# `@contractspec/example.versioned-knowledge-base`
|
|
2
|
+
|
|
3
|
+
Website: https://contractspec.io/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Spec-first example demonstrating a **curated, versioned knowledge base**:
|
|
7
|
+
|
|
8
|
+
- Raw **source documents** are immutable and referenced by hash.
|
|
9
|
+
- Curated **rules** are versioned, reviewable, and must cite sources.
|
|
10
|
+
- Published **KB snapshots** contain only **approved** rule versions.
|
|
11
|
+
- Assistant answers reference a **snapshot id** for traceability.
|
|
12
|
+
|
|
13
|
+
## Contracts
|
|
14
|
+
|
|
15
|
+
- `kb.ingestSource(docMeta, fileRef) -> SourceDocument`
|
|
16
|
+
- `kb.upsertRuleVersion(ruleId, content, sourceRefs) -> RuleVersion (draft)`
|
|
17
|
+
- `kb.approveRuleVersion(ruleVersionId, approver) -> RuleVersion (approved)`
|
|
18
|
+
- `kb.publishSnapshot(jurisdiction, asOfDate) -> KBSnapshot`
|
|
19
|
+
- `kb.search(snapshotId, query) -> results (ruleVersionIds + citations)`
|
|
20
|
+
|
|
21
|
+
## Running tests
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
bun test
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./versioned-knowledge-base.docblock.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
2
|
+
|
|
3
|
+
//#region src/docs/versioned-knowledge-base.docblock.ts
|
|
4
|
+
registerDocBlocks([{
|
|
5
|
+
id: "docs.examples.versioned-knowledge-base.goal",
|
|
6
|
+
title: "Versioned Knowledge Base — Goal",
|
|
7
|
+
summary: "Curated KB with immutable sources, versioned rules, and published snapshots referenced by answers.",
|
|
8
|
+
kind: "goal",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/versioned-knowledge-base/goal",
|
|
11
|
+
tags: [
|
|
12
|
+
"knowledge",
|
|
13
|
+
"versioning",
|
|
14
|
+
"snapshots",
|
|
15
|
+
"traceability"
|
|
16
|
+
],
|
|
17
|
+
body: `## Why it matters
|
|
18
|
+
- Separates raw sources from curated knowledge.\n- Ensures assistant answers cite a published snapshot.\n- Makes change review and safe regeneration possible.\n\n## Core invariants\n- Sources are immutable and content-addressed (hash).\n- Rule versions must cite at least one source.\n- Snapshots include only approved rule versions.`
|
|
19
|
+
}, {
|
|
20
|
+
id: "docs.examples.versioned-knowledge-base.reference",
|
|
21
|
+
title: "Versioned Knowledge Base — Reference",
|
|
22
|
+
summary: "Entities, contracts, and events for the versioned KB example.",
|
|
23
|
+
kind: "reference",
|
|
24
|
+
visibility: "public",
|
|
25
|
+
route: "/docs/examples/versioned-knowledge-base",
|
|
26
|
+
tags: ["knowledge", "reference"],
|
|
27
|
+
body: `## Contracts\n- kb.ingestSource\n- kb.upsertRuleVersion\n- kb.approveRuleVersion\n- kb.publishSnapshot\n- kb.search\n\n## Events\n- kb.source.ingested\n- kb.ruleVersion.created\n- kb.ruleVersion.approved\n- kb.snapshot.published`
|
|
28
|
+
}]);
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//# sourceMappingURL=versioned-knowledge-base.docblock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-knowledge-base.docblock.js","names":[],"sources":["../../src/docs/versioned-knowledge-base.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst docBlocks: DocBlock[] = [\n {\n id: 'docs.examples.versioned-knowledge-base.goal',\n title: 'Versioned Knowledge Base — Goal',\n summary:\n 'Curated KB with immutable sources, versioned rules, and published snapshots referenced by answers.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/versioned-knowledge-base/goal',\n tags: ['knowledge', 'versioning', 'snapshots', 'traceability'],\n body: `## Why it matters\n- Separates raw sources from curated knowledge.\\n- Ensures assistant answers cite a published snapshot.\\n- Makes change review and safe regeneration possible.\\n\\n## Core invariants\\n- Sources are immutable and content-addressed (hash).\\n- Rule versions must cite at least one source.\\n- Snapshots include only approved rule versions.`,\n },\n {\n id: 'docs.examples.versioned-knowledge-base.reference',\n title: 'Versioned Knowledge Base — Reference',\n summary: 'Entities, contracts, and events for the versioned KB example.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/versioned-knowledge-base',\n tags: ['knowledge', 'reference'],\n body: `## Contracts\\n- kb.ingestSource\\n- kb.upsertRuleVersion\\n- kb.approveRuleVersion\\n- kb.publishSnapshot\\n- kb.search\\n\\n## Events\\n- kb.source.ingested\\n- kb.ruleVersion.created\\n- kb.ruleVersion.approved\\n- kb.snapshot.published`,\n },\n];\n\nregisterDocBlocks(docBlocks);\n"],"mappings":";;;AA4BA,kBAzB8B,CAC5B;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAa;EAAc;EAAa;EAAe;CAC9D,MAAM;;CAEP,EACD;CACE,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,aAAa,YAAY;CAChC,MAAM;CACP,CACF,CAE2B"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema15 from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/entities/models.d.ts
|
|
4
|
+
declare const SourceDocumentModel: _contractspec_lib_schema15.SchemaModel<{
|
|
5
|
+
id: {
|
|
6
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
jurisdiction: {
|
|
10
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
authority: {
|
|
14
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
title: {
|
|
18
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
fetchedAt: {
|
|
22
|
+
type: _contractspec_lib_schema15.FieldType<Date, string>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
hash: {
|
|
26
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
27
|
+
isOptional: false;
|
|
28
|
+
};
|
|
29
|
+
fileId: {
|
|
30
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
declare const SourceRefModel: _contractspec_lib_schema15.SchemaModel<{
|
|
35
|
+
sourceDocumentId: {
|
|
36
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
37
|
+
isOptional: false;
|
|
38
|
+
};
|
|
39
|
+
excerpt: {
|
|
40
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
41
|
+
isOptional: true;
|
|
42
|
+
};
|
|
43
|
+
}>;
|
|
44
|
+
declare const RuleModel: _contractspec_lib_schema15.SchemaModel<{
|
|
45
|
+
id: {
|
|
46
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
47
|
+
isOptional: false;
|
|
48
|
+
};
|
|
49
|
+
jurisdiction: {
|
|
50
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
51
|
+
isOptional: false;
|
|
52
|
+
};
|
|
53
|
+
topicKey: {
|
|
54
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
55
|
+
isOptional: false;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
declare const RuleVersionModel: _contractspec_lib_schema15.SchemaModel<{
|
|
59
|
+
id: {
|
|
60
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
61
|
+
isOptional: false;
|
|
62
|
+
};
|
|
63
|
+
ruleId: {
|
|
64
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
65
|
+
isOptional: false;
|
|
66
|
+
};
|
|
67
|
+
jurisdiction: {
|
|
68
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
69
|
+
isOptional: false;
|
|
70
|
+
};
|
|
71
|
+
topicKey: {
|
|
72
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
73
|
+
isOptional: false;
|
|
74
|
+
};
|
|
75
|
+
version: {
|
|
76
|
+
type: _contractspec_lib_schema15.FieldType<number, number>;
|
|
77
|
+
isOptional: false;
|
|
78
|
+
};
|
|
79
|
+
content: {
|
|
80
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
81
|
+
isOptional: false;
|
|
82
|
+
};
|
|
83
|
+
sourceRefs: {
|
|
84
|
+
type: _contractspec_lib_schema15.SchemaModel<{
|
|
85
|
+
sourceDocumentId: {
|
|
86
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
87
|
+
isOptional: false;
|
|
88
|
+
};
|
|
89
|
+
excerpt: {
|
|
90
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
91
|
+
isOptional: true;
|
|
92
|
+
};
|
|
93
|
+
}>;
|
|
94
|
+
isArray: true;
|
|
95
|
+
isOptional: false;
|
|
96
|
+
};
|
|
97
|
+
status: {
|
|
98
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
99
|
+
isOptional: false;
|
|
100
|
+
};
|
|
101
|
+
approvedBy: {
|
|
102
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
103
|
+
isOptional: true;
|
|
104
|
+
};
|
|
105
|
+
approvedAt: {
|
|
106
|
+
type: _contractspec_lib_schema15.FieldType<Date, string>;
|
|
107
|
+
isOptional: true;
|
|
108
|
+
};
|
|
109
|
+
createdAt: {
|
|
110
|
+
type: _contractspec_lib_schema15.FieldType<Date, string>;
|
|
111
|
+
isOptional: false;
|
|
112
|
+
};
|
|
113
|
+
}>;
|
|
114
|
+
declare const KBSnapshotModel: _contractspec_lib_schema15.SchemaModel<{
|
|
115
|
+
id: {
|
|
116
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
117
|
+
isOptional: false;
|
|
118
|
+
};
|
|
119
|
+
jurisdiction: {
|
|
120
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
121
|
+
isOptional: false;
|
|
122
|
+
};
|
|
123
|
+
asOfDate: {
|
|
124
|
+
type: _contractspec_lib_schema15.FieldType<Date, string>;
|
|
125
|
+
isOptional: false;
|
|
126
|
+
};
|
|
127
|
+
includedRuleVersionIds: {
|
|
128
|
+
type: _contractspec_lib_schema15.FieldType<string, string>;
|
|
129
|
+
isArray: true;
|
|
130
|
+
isOptional: false;
|
|
131
|
+
};
|
|
132
|
+
publishedAt: {
|
|
133
|
+
type: _contractspec_lib_schema15.FieldType<Date, string>;
|
|
134
|
+
isOptional: false;
|
|
135
|
+
};
|
|
136
|
+
}>;
|
|
137
|
+
//#endregion
|
|
138
|
+
export { KBSnapshotModel, RuleModel, RuleVersionModel, SourceDocumentModel, SourceRefModel };
|
|
139
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","names":[],"sources":["../../src/entities/models.ts"],"sourcesContent":[],"mappings":";;;cAEa,gDAAmB;;UAa9B,0BAAA,CAAA;IAbW,UAAA,EAAA,KAAA;EAaX,CAAA;;;;;;;;;EAb8B,KAAA,EAAA;IAenB,IAAA,sCAUX,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;IAVyB,IAAA,sCAAA,KAAA,EAAA,MAAA,CAAA;IAYd,UASX,EAAA,KAAA;EAAA,CAAA;;;;EAToB,CAAA;EAWT,MAAA,EAAA;IAiBX,IAAA,sCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;cAxCW,2CAAc;;UAUzB,0BAAA,CAAA;;;;;;;;cAEW,sCAAS;;IAWO,IAAA,EAF3B,0BAAA,CAAA,SAE2B,CAAA,MAAA,EAAA,MAAA,CAAA;IAmBhB,UAAA,EAAA,KAeX;EAAA,CAAA;;;;;;;;EAf0B,CAAA;;cAnBf,6CAAgB;;UAiB3B,0BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,4CAAe;;UAe1B,0BAAA,CAAA"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/entities/models.ts
|
|
4
|
+
const SourceDocumentModel = defineSchemaModel({
|
|
5
|
+
name: "SourceDocument",
|
|
6
|
+
description: "Immutable raw source document metadata referencing a stored file.",
|
|
7
|
+
fields: {
|
|
8
|
+
id: {
|
|
9
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
10
|
+
isOptional: false
|
|
11
|
+
},
|
|
12
|
+
jurisdiction: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
authority: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
+
isOptional: false
|
|
23
|
+
},
|
|
24
|
+
fetchedAt: {
|
|
25
|
+
type: ScalarTypeEnum.DateTime(),
|
|
26
|
+
isOptional: false
|
|
27
|
+
},
|
|
28
|
+
hash: {
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
+
isOptional: false
|
|
31
|
+
},
|
|
32
|
+
fileId: {
|
|
33
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
34
|
+
isOptional: false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const SourceRefModel = defineSchemaModel({
|
|
39
|
+
name: "SourceRef",
|
|
40
|
+
description: "Reference to a source document used to justify a rule version.",
|
|
41
|
+
fields: {
|
|
42
|
+
sourceDocumentId: {
|
|
43
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
44
|
+
isOptional: false
|
|
45
|
+
},
|
|
46
|
+
excerpt: {
|
|
47
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
48
|
+
isOptional: true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const RuleModel = defineSchemaModel({
|
|
53
|
+
name: "Rule",
|
|
54
|
+
description: "Curated rule (stable identity) with topic + jurisdiction scope.",
|
|
55
|
+
fields: {
|
|
56
|
+
id: {
|
|
57
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
58
|
+
isOptional: false
|
|
59
|
+
},
|
|
60
|
+
jurisdiction: {
|
|
61
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
62
|
+
isOptional: false
|
|
63
|
+
},
|
|
64
|
+
topicKey: {
|
|
65
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
66
|
+
isOptional: false
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const RuleVersionModel = defineSchemaModel({
|
|
71
|
+
name: "RuleVersion",
|
|
72
|
+
description: "A versioned rule content with source references and approval status.",
|
|
73
|
+
fields: {
|
|
74
|
+
id: {
|
|
75
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
76
|
+
isOptional: false
|
|
77
|
+
},
|
|
78
|
+
ruleId: {
|
|
79
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
80
|
+
isOptional: false
|
|
81
|
+
},
|
|
82
|
+
jurisdiction: {
|
|
83
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
84
|
+
isOptional: false
|
|
85
|
+
},
|
|
86
|
+
topicKey: {
|
|
87
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
88
|
+
isOptional: false
|
|
89
|
+
},
|
|
90
|
+
version: {
|
|
91
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
92
|
+
isOptional: false
|
|
93
|
+
},
|
|
94
|
+
content: {
|
|
95
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
96
|
+
isOptional: false
|
|
97
|
+
},
|
|
98
|
+
sourceRefs: {
|
|
99
|
+
type: SourceRefModel,
|
|
100
|
+
isArray: true,
|
|
101
|
+
isOptional: false
|
|
102
|
+
},
|
|
103
|
+
status: {
|
|
104
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
105
|
+
isOptional: false
|
|
106
|
+
},
|
|
107
|
+
approvedBy: {
|
|
108
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
109
|
+
isOptional: true
|
|
110
|
+
},
|
|
111
|
+
approvedAt: {
|
|
112
|
+
type: ScalarTypeEnum.DateTime(),
|
|
113
|
+
isOptional: true
|
|
114
|
+
},
|
|
115
|
+
createdAt: {
|
|
116
|
+
type: ScalarTypeEnum.DateTime(),
|
|
117
|
+
isOptional: false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
const KBSnapshotModel = defineSchemaModel({
|
|
122
|
+
name: "KBSnapshot",
|
|
123
|
+
description: "Published KB snapshot (as-of) referencing approved rule versions.",
|
|
124
|
+
fields: {
|
|
125
|
+
id: {
|
|
126
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
127
|
+
isOptional: false
|
|
128
|
+
},
|
|
129
|
+
jurisdiction: {
|
|
130
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
131
|
+
isOptional: false
|
|
132
|
+
},
|
|
133
|
+
asOfDate: {
|
|
134
|
+
type: ScalarTypeEnum.DateTime(),
|
|
135
|
+
isOptional: false
|
|
136
|
+
},
|
|
137
|
+
includedRuleVersionIds: {
|
|
138
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
139
|
+
isArray: true,
|
|
140
|
+
isOptional: false
|
|
141
|
+
},
|
|
142
|
+
publishedAt: {
|
|
143
|
+
type: ScalarTypeEnum.DateTime(),
|
|
144
|
+
isOptional: false
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
//#endregion
|
|
150
|
+
export { KBSnapshotModel, RuleModel, RuleVersionModel, SourceDocumentModel, SourceRefModel };
|
|
151
|
+
//# sourceMappingURL=models.js.map
|