@lax-wp/editor 0.4.13 → 0.4.15-beta.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 +25 -0
- package/dist/api/audit.d.ts +79 -0
- package/dist/api/derivedRulebook.d.ts +470 -0
- package/dist/api/documentVersions.d.ts +519 -0
- package/dist/api/effectiveRules.d.ts +372 -0
- package/dist/api/methodology.d.ts +62 -0
- package/dist/api/playbook.d.ts +604 -0
- package/dist/api/promotions.d.ts +1432 -0
- package/dist/api/r1.d.ts +1097 -0
- package/dist/api/r1.fixtures.d.ts +111 -0
- package/dist/api/redlineJobs.d.ts +377 -0
- package/dist/api/redlineStream.d.ts +2979 -0
- package/dist/api/redlines.d.ts +504 -0
- package/dist/api/regsync.d.ts +2355 -0
- package/dist/api/ruleAuthoring.d.ts +305 -0
- package/dist/api/ruleBuilder.d.ts +1009 -0
- package/dist/api/ruleOverrides.d.ts +31 -0
- package/dist/api/ruleStats.d.ts +84 -0
- package/dist/api/rulesCatalog.d.ts +234 -0
- package/dist/api/versions.d.ts +76 -0
- package/dist/api/workspace.d.ts +41 -0
- package/dist/components/EditorSidebar.d.ts +4 -1
- package/dist/components/audit/AuditView.d.ts +8 -0
- package/dist/components/capturededits/AddAsRuleModal.d.ts +8 -0
- package/dist/components/capturededits/CapturedEditCard.d.ts +15 -0
- package/dist/components/capturededits/CapturedEditsTray.d.ts +4 -0
- package/dist/components/capturededits/capturedEditIntent.d.ts +23 -0
- package/dist/components/common/EscDropdown.d.ts +2 -0
- package/dist/components/compliance/MethodologyPanel.d.ts +14 -0
- package/dist/components/compliance/RegSyncPanel.d.ts +18 -0
- package/dist/components/compliance/index.d.ts +8 -0
- package/dist/components/compliance/primitives.d.ts +41 -0
- package/dist/components/documents/DocumentVersionHistory.d.ts +12 -0
- package/dist/components/documents/documentDiff.d.ts +68 -0
- package/dist/components/documents/index.d.ts +4 -0
- package/dist/components/flowdown/FlowdownPanel.d.ts +28 -0
- package/dist/components/flowdown/FlowdownRowCard.d.ts +27 -0
- package/dist/components/flowdown/flowdownModel.d.ts +150 -0
- package/dist/components/history/PlaybookVersionHistory.d.ts +10 -0
- package/dist/components/history/versionDiff.d.ts +14 -0
- package/dist/components/playbook/AllPlaybooksView.d.ts +41 -0
- package/dist/components/playbook/DerivedRulebookView.d.ts +9 -0
- package/dist/components/playbook/DraftedRulePreview.d.ts +17 -0
- package/dist/components/playbook/EffectiveRulesView.d.ts +11 -0
- package/dist/components/playbook/NewRuleDrawer.d.ts +11 -0
- package/dist/components/playbook/PlaybookCard.d.ts +13 -0
- package/dist/components/playbook/PlaybookPage.d.ts +29 -0
- package/dist/components/playbook/PlaybookPanel.d.ts +73 -0
- package/dist/components/playbook/PromotionSuggestions.d.ts +1 -0
- package/dist/components/playbook/ReprioritizeDialog.d.ts +16 -0
- package/dist/components/playbook/RuleDetail.d.ts +27 -0
- package/dist/components/playbook/RuleEditorFields.d.ts +42 -0
- package/dist/components/playbook/RuleEditorModal.d.ts +27 -0
- package/dist/components/playbook/RulePerformancePanel.d.ts +4 -0
- package/dist/components/playbook/RuleRow.d.ts +26 -0
- package/dist/components/playbook/ThisDocumentView.d.ts +45 -0
- package/dist/components/playbook/ViewTabs.d.ts +8 -0
- package/dist/components/playbook/index.d.ts +14 -0
- package/dist/components/playbook/predicateSummary.d.ts +10 -0
- package/dist/components/playbook/primitives.d.ts +82 -0
- package/dist/components/playbook/useFocusTrap.d.ts +6 -0
- package/dist/components/playbook/usePlaybookData.d.ts +161 -0
- package/dist/components/playbook/usePlaybookLabel.d.ts +18 -0
- package/dist/components/r1/ApprovalPanel.d.ts +10 -0
- package/dist/components/r1/CandidateRuleCard.d.ts +8 -0
- package/dist/components/r1/ExecSummaryPanel.d.ts +23 -0
- package/dist/components/r1/PrimeUploadPanel.d.ts +8 -0
- package/dist/components/r1/ReviewStartControls.d.ts +24 -0
- package/dist/components/r1/ReviewSummaryTab.d.ts +38 -0
- package/dist/components/r1/index.d.ts +13 -0
- package/dist/components/r1/primitives.d.ts +59 -0
- package/dist/components/redline/AiReviewPanel.d.ts +194 -0
- package/dist/components/redline/RedlineHoverCard.d.ts +13 -0
- package/dist/components/redline/RedlineItem.d.ts +12 -0
- package/dist/components/redline/ReviewCard.d.ts +49 -0
- package/dist/components/redline/index.d.ts +6 -0
- package/dist/components/redline/reviewItems.d.ts +49 -0
- package/dist/components/redline/reviewPrefs.d.ts +18 -0
- package/dist/components/redline/useRunScopedCards.d.ts +16 -0
- package/dist/components/rulebuilder/AuthorForms.d.ts +28 -0
- package/dist/components/rulebuilder/CandidateQueue.d.ts +21 -0
- package/dist/components/rulebuilder/DraftPane.d.ts +12 -0
- package/dist/components/rulebuilder/RuleBuilderPanel.d.ts +6 -0
- package/dist/components/rulebuilder/RuleCard.d.ts +16 -0
- package/dist/components/rulebuilder/TestBench.d.ts +10 -0
- package/dist/components/rulebuilder/VocabularyPanel.d.ts +26 -0
- package/dist/components/rulebuilder/index.d.ts +13 -0
- package/dist/components/rulebuilder/primitives.d.ts +54 -0
- package/dist/components/rulebuilder/useRuleBuilder.d.ts +291 -0
- package/dist/components/sidebar/ExpandableSidebar.d.ts +2 -0
- package/dist/components/sidebar/WorkspaceRetentionPanel.d.ts +18 -0
- package/dist/components/sidebar/content/TrackChangesContent.d.ts +8 -0
- package/dist/components/sidebar/content/anonymization-page/PIIAnonymization.d.ts +1 -1
- package/dist/components/sidebar/content/anonymization-page/PiiIdleView.d.ts +12 -0
- package/dist/components/sidebar/content/anonymization-page/PiiRecoveryView.d.ts +16 -0
- package/dist/components/sidebar/content/anonymization-page/PiiSummaryView.d.ts +34 -0
- package/dist/components/sidebar/content/anonymization-page/PiiUnavailableView.d.ts +1 -0
- package/dist/components/sidebar/content/anonymization-page/RestoreConfirmDialog.d.ts +9 -0
- package/dist/components/sidebar/content/anonymization-page/anonymizationUtils.d.ts +38 -17
- package/dist/components/sidebar/content/anonymization-page/piiVault.d.ts +18 -0
- package/dist/components/sidebar/content/index.d.ts +0 -1
- package/dist/components/toolbar/AutocompletionToggle.d.ts +1 -0
- package/dist/components/trackChanges/TrackChangesCards.d.ts +1 -0
- package/dist/components/trackChanges/index.d.ts +2 -0
- package/dist/components/trackChanges/utils.d.ts +5 -0
- package/dist/config/EditorConfig.d.ts +197 -73
- package/dist/constants/Extensions.d.ts +12 -0
- package/dist/constants/playbook.d.ts +108 -0
- package/dist/contexts/CapturedEditsContext.d.ts +56 -0
- package/dist/contexts/EditorShellContext.d.ts +4 -1
- package/dist/editor.css +1 -1
- package/dist/extensions/AnonymizedText.d.ts +31 -2
- package/dist/extensions/VariableText.d.ts +20 -0
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/plugins/CapturedEditsPlugin.d.ts +90 -0
- package/dist/extensions/plugins/MarkHighlightPlugin.d.ts +0 -1
- package/dist/extensions/plugins/RedlinePlugin.d.ts +9 -0
- package/dist/extensions/redline/changeTypes.d.ts +70 -0
- package/dist/extensions/redline/constants.d.ts +25 -0
- package/dist/extensions/redline/engine/blockNodes.d.ts +31 -0
- package/dist/extensions/redline/engine/clipboard.d.ts +16 -0
- package/dist/extensions/redline/engine/deletion.d.ts +34 -0
- package/dist/extensions/redline/engine/formatSplit.d.ts +16 -0
- package/dist/extensions/redline/engine/insertion.d.ts +26 -0
- package/dist/extensions/redline/engine/predicates.d.ts +73 -0
- package/dist/extensions/redline/engine/textReplace.d.ts +19 -0
- package/dist/extensions/redline/id.d.ts +7 -0
- package/dist/extensions/redline/index.d.ts +36 -0
- package/dist/extensions/redline/plugin.d.ts +34 -0
- package/dist/extensions/redline/query/scan.d.ts +52 -0
- package/dist/extensions/redline/review/applyChange.d.ts +25 -0
- package/dist/extensions/redline/review/index.d.ts +1 -0
- package/dist/extensions/redline/review/nodeResolvers.d.ts +29 -0
- package/dist/extensions/redline/review/pairedNodes.d.ts +38 -0
- package/dist/extensions/redline/review/structuralRevert.d.ts +20 -0
- package/dist/extensions/redline/review/textResolver.d.ts +9 -0
- package/dist/extensions/redline/schema/marks.d.ts +65 -0
- package/dist/extensions/redline/schema/shared.d.ts +34 -0
- package/dist/extensions/redline/session.d.ts +71 -0
- package/dist/extensions/redline/types.d.ts +24 -0
- package/dist/extensions/trackedChanges/TrackedChanges.d.ts +64 -0
- package/dist/extensions/trackedChanges/constants.d.ts +34 -0
- package/dist/extensions/trackedChanges/engine.d.ts +32 -0
- package/dist/extensions/trackedChanges/index.d.ts +13 -0
- package/dist/extensions/trackedChanges/marks.d.ts +20 -0
- package/dist/extensions/trackedChanges/normalize.d.ts +2 -0
- package/dist/extensions/trackedChanges/plugin.d.ts +32 -0
- package/dist/extensions/trackedChanges/query.d.ts +3 -0
- package/dist/extensions/trackedChanges/review.d.ts +34 -0
- package/dist/extensions/trackedChanges/types.d.ts +72 -0
- package/dist/extensions/trackedChanges/utils.d.ts +20 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -0
- package/dist/hooks/useRedlineHover.d.ts +17 -0
- package/dist/hooks/useRedlineReview.d.ts +83 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.es.js +38491 -22189
- package/dist/index.umd.js +224 -125
- package/dist/utils/cdts.d.ts +37 -0
- package/dist/utils/groundingAdapter.d.ts +36 -0
- package/package.json +39 -33
package/dist/api/r1.d.ts
ADDED
|
@@ -0,0 +1,1097 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* R1 API module — prime-contract flowdown derivation, candidate-rule
|
|
3
|
+
* approval, and provenance-aware review contracts.
|
|
4
|
+
*
|
|
5
|
+
* ALL R1 HTTP lives here (same boundary rules as api/playbook.ts): every
|
|
6
|
+
* response is zod-validated, components never fetch directly. The module
|
|
7
|
+
* ships with a `mode: "mock" | "real"` switch — mock (default) serves the
|
|
8
|
+
* fixture dataset from api/r1.fixtures.ts with realistic async behavior;
|
|
9
|
+
* flipping to "real" re-points every call at `${baseUrl}` without touching
|
|
10
|
+
* any component.
|
|
11
|
+
*
|
|
12
|
+
* Real mode speaks the FROZEN playbook-engine wire (docs/R1_WIRE_FREEZE.md
|
|
13
|
+
* + api/{derive,approvals}.go on the backend). The exported domain shapes
|
|
14
|
+
* below stay the component contract; the wire* schemas mirror the backend
|
|
15
|
+
* exactly and adapters map wire -> domain. Real-mode endpoints:
|
|
16
|
+
*
|
|
17
|
+
* POST /v1/playbooks/derived/{prime}/upload (multipart, 202)
|
|
18
|
+
* GET /v1/playbooks/derived/{prime}/jobs/{id}/status
|
|
19
|
+
* POST /v1/playbooks/derived/{prime}/jobs/{id}/retry (202)
|
|
20
|
+
* GET /v1/playbooks/derived/{prime}/rules ({rulebook,version,rules})
|
|
21
|
+
* GET /v1/playbooks/derived/{prime}/status
|
|
22
|
+
* POST /v1/playbooks/derived/{prime}/rules/{ruleID}/approve ({etag})
|
|
23
|
+
* POST /v1/playbooks/derived/{prime}/rules/{ruleID}/reject ({etag})
|
|
24
|
+
* POST /v1/playbooks/derived/{prime}/rules/{ruleID}/edit ({etag,body})
|
|
25
|
+
* POST /v1/playbooks/derived/{prime}/rules/bulk-approve ({rules:[{rule_id,etag}]})
|
|
26
|
+
*
|
|
27
|
+
* GET /v1/reviews/{id}/summary (see below)
|
|
28
|
+
*/
|
|
29
|
+
import { z } from "zod";
|
|
30
|
+
/** Tri-modal classification of a derived flowdown obligation. */
|
|
31
|
+
export declare const candidateClassificationSchema: z.ZodEnum<["mandatory", "conditionally_mandatory", "discretionary"]>;
|
|
32
|
+
/** Provenance carried by findings / fired rules. */
|
|
33
|
+
export declare const provenanceSchema: z.ZodObject<{
|
|
34
|
+
/** "prime" → derived from the uploaded prime contract; "cdts" → workspace chain. */
|
|
35
|
+
source: z.ZodEnum<["prime", "cdts"]>;
|
|
36
|
+
prime_contract_id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
/** e.g. "Prime §7.4.2" */
|
|
38
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
39
|
+
/** Verbatim source excerpt shown on badge click-through. */
|
|
40
|
+
source_excerpt: z.ZodOptional<z.ZodString>;
|
|
41
|
+
/** Rule fired but is ignored — superseded by a regulatory clause. */
|
|
42
|
+
superseded_by_regulatory: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
44
|
+
/** "prime" → derived from the uploaded prime contract; "cdts" → workspace chain. */
|
|
45
|
+
source: z.ZodEnum<["prime", "cdts"]>;
|
|
46
|
+
prime_contract_id: z.ZodOptional<z.ZodString>;
|
|
47
|
+
/** e.g. "Prime §7.4.2" */
|
|
48
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
49
|
+
/** Verbatim source excerpt shown on badge click-through. */
|
|
50
|
+
source_excerpt: z.ZodOptional<z.ZodString>;
|
|
51
|
+
/** Rule fired but is ignored — superseded by a regulatory clause. */
|
|
52
|
+
superseded_by_regulatory: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
54
|
+
/** "prime" → derived from the uploaded prime contract; "cdts" → workspace chain. */
|
|
55
|
+
source: z.ZodEnum<["prime", "cdts"]>;
|
|
56
|
+
prime_contract_id: z.ZodOptional<z.ZodString>;
|
|
57
|
+
/** e.g. "Prime §7.4.2" */
|
|
58
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
59
|
+
/** Verbatim source excerpt shown on badge click-through. */
|
|
60
|
+
source_excerpt: z.ZodOptional<z.ZodString>;
|
|
61
|
+
/** Rule fired but is ignored — superseded by a regulatory clause. */
|
|
62
|
+
superseded_by_regulatory: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
64
|
+
/** Suggestion position texts (preferred / fallback / walkaway). */
|
|
65
|
+
export declare const positionsSchema: z.ZodObject<{
|
|
66
|
+
preferred: z.ZodString;
|
|
67
|
+
fallback: z.ZodOptional<z.ZodString>;
|
|
68
|
+
walkaway: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
70
|
+
preferred: z.ZodString;
|
|
71
|
+
fallback: z.ZodOptional<z.ZodString>;
|
|
72
|
+
walkaway: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
74
|
+
preferred: z.ZodString;
|
|
75
|
+
fallback: z.ZodOptional<z.ZodString>;
|
|
76
|
+
walkaway: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
78
|
+
export declare const derivationJobSchema: z.ZodObject<{
|
|
79
|
+
job_id: z.ZodString;
|
|
80
|
+
prime_contract_id: z.ZodOptional<z.ZodString>;
|
|
81
|
+
file_name: z.ZodOptional<z.ZodString>;
|
|
82
|
+
status: z.ZodEnum<["queued", "running", "failed", "complete"]>;
|
|
83
|
+
/** failed only: whether a retry can succeed (transient vs structural). */
|
|
84
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
error: z.ZodOptional<z.ZodString>;
|
|
86
|
+
/** running only: 0..1 */
|
|
87
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
90
|
+
candidate_rule_count: z.ZodNumber;
|
|
91
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
92
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
94
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
95
|
+
candidate_rule_count: z.ZodNumber;
|
|
96
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
97
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
99
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
100
|
+
candidate_rule_count: z.ZodNumber;
|
|
101
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
102
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
104
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
105
|
+
job_id: z.ZodString;
|
|
106
|
+
prime_contract_id: z.ZodOptional<z.ZodString>;
|
|
107
|
+
file_name: z.ZodOptional<z.ZodString>;
|
|
108
|
+
status: z.ZodEnum<["queued", "running", "failed", "complete"]>;
|
|
109
|
+
/** failed only: whether a retry can succeed (transient vs structural). */
|
|
110
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
error: z.ZodOptional<z.ZodString>;
|
|
112
|
+
/** running only: 0..1 */
|
|
113
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
116
|
+
candidate_rule_count: z.ZodNumber;
|
|
117
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
118
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
120
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
121
|
+
candidate_rule_count: z.ZodNumber;
|
|
122
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
123
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
125
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
126
|
+
candidate_rule_count: z.ZodNumber;
|
|
127
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
128
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
130
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
131
|
+
job_id: z.ZodString;
|
|
132
|
+
prime_contract_id: z.ZodOptional<z.ZodString>;
|
|
133
|
+
file_name: z.ZodOptional<z.ZodString>;
|
|
134
|
+
status: z.ZodEnum<["queued", "running", "failed", "complete"]>;
|
|
135
|
+
/** failed only: whether a retry can succeed (transient vs structural). */
|
|
136
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
error: z.ZodOptional<z.ZodString>;
|
|
138
|
+
/** running only: 0..1 */
|
|
139
|
+
progress: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
142
|
+
candidate_rule_count: z.ZodNumber;
|
|
143
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
144
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
146
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
147
|
+
candidate_rule_count: z.ZodNumber;
|
|
148
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
149
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
151
|
+
derived_playbook_id: z.ZodOptional<z.ZodString>;
|
|
152
|
+
candidate_rule_count: z.ZodNumber;
|
|
153
|
+
/** true → clean result: no flowdown obligations detected (not an error). */
|
|
154
|
+
zero_obligations: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
156
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
157
|
+
export declare const candidateRuleSchema: z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
playbook_id: z.ZodString;
|
|
160
|
+
/** Verbatim prime-contract excerpt the rule was derived from. */
|
|
161
|
+
verbatim_excerpt: z.ZodString;
|
|
162
|
+
/** e.g. "Prime §7.4.2" */
|
|
163
|
+
section_citation: z.ZodString;
|
|
164
|
+
classification: z.ZodEnum<["mandatory", "conditionally_mandatory", "discretionary"]>;
|
|
165
|
+
generated_rule_text: z.ZodString;
|
|
166
|
+
rationale: z.ZodString;
|
|
167
|
+
status: z.ZodEnum<["pending", "approved", "rejected"]>;
|
|
168
|
+
/** Set when the approver edited the generated text before approving. */
|
|
169
|
+
approved_text: z.ZodOptional<z.ZodString>;
|
|
170
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
172
|
+
id: z.ZodString;
|
|
173
|
+
playbook_id: z.ZodString;
|
|
174
|
+
/** Verbatim prime-contract excerpt the rule was derived from. */
|
|
175
|
+
verbatim_excerpt: z.ZodString;
|
|
176
|
+
/** e.g. "Prime §7.4.2" */
|
|
177
|
+
section_citation: z.ZodString;
|
|
178
|
+
classification: z.ZodEnum<["mandatory", "conditionally_mandatory", "discretionary"]>;
|
|
179
|
+
generated_rule_text: z.ZodString;
|
|
180
|
+
rationale: z.ZodString;
|
|
181
|
+
status: z.ZodEnum<["pending", "approved", "rejected"]>;
|
|
182
|
+
/** Set when the approver edited the generated text before approving. */
|
|
183
|
+
approved_text: z.ZodOptional<z.ZodString>;
|
|
184
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
playbook_id: z.ZodString;
|
|
188
|
+
/** Verbatim prime-contract excerpt the rule was derived from. */
|
|
189
|
+
verbatim_excerpt: z.ZodString;
|
|
190
|
+
/** e.g. "Prime §7.4.2" */
|
|
191
|
+
section_citation: z.ZodString;
|
|
192
|
+
classification: z.ZodEnum<["mandatory", "conditionally_mandatory", "discretionary"]>;
|
|
193
|
+
generated_rule_text: z.ZodString;
|
|
194
|
+
rationale: z.ZodString;
|
|
195
|
+
status: z.ZodEnum<["pending", "approved", "rejected"]>;
|
|
196
|
+
/** Set when the approver edited the generated text before approving. */
|
|
197
|
+
approved_text: z.ZodOptional<z.ZodString>;
|
|
198
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
200
|
+
export declare const rulebookStatusSchema: z.ZodObject<{
|
|
201
|
+
playbook_id: z.ZodString;
|
|
202
|
+
total: z.ZodNumber;
|
|
203
|
+
disposed: z.ZodNumber;
|
|
204
|
+
/** Active only when all candidates are disposed. */
|
|
205
|
+
active: z.ZodBoolean;
|
|
206
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
207
|
+
playbook_id: z.ZodString;
|
|
208
|
+
total: z.ZodNumber;
|
|
209
|
+
disposed: z.ZodNumber;
|
|
210
|
+
/** Active only when all candidates are disposed. */
|
|
211
|
+
active: z.ZodBoolean;
|
|
212
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
213
|
+
playbook_id: z.ZodString;
|
|
214
|
+
total: z.ZodNumber;
|
|
215
|
+
disposed: z.ZodNumber;
|
|
216
|
+
/** Active only when all candidates are disposed. */
|
|
217
|
+
active: z.ZodBoolean;
|
|
218
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
219
|
+
export declare const reviewSummarySchema: z.ZodObject<{
|
|
220
|
+
by_provenance: z.ZodObject<{
|
|
221
|
+
prime: z.ZodNumber;
|
|
222
|
+
cdts: z.ZodNumber;
|
|
223
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
224
|
+
prime: z.ZodNumber;
|
|
225
|
+
cdts: z.ZodNumber;
|
|
226
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
227
|
+
prime: z.ZodNumber;
|
|
228
|
+
cdts: z.ZodNumber;
|
|
229
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
230
|
+
by_severity: z.ZodObject<{
|
|
231
|
+
high: z.ZodNumber;
|
|
232
|
+
medium: z.ZodNumber;
|
|
233
|
+
low: z.ZodNumber;
|
|
234
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
235
|
+
high: z.ZodNumber;
|
|
236
|
+
medium: z.ZodNumber;
|
|
237
|
+
low: z.ZodNumber;
|
|
238
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
239
|
+
high: z.ZodNumber;
|
|
240
|
+
medium: z.ZodNumber;
|
|
241
|
+
low: z.ZodNumber;
|
|
242
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
243
|
+
missing_flowdown_count: z.ZodNumber;
|
|
244
|
+
escalation_count: z.ZodNumber;
|
|
245
|
+
suppressed_count: z.ZodNumber;
|
|
246
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
247
|
+
by_provenance: z.ZodObject<{
|
|
248
|
+
prime: z.ZodNumber;
|
|
249
|
+
cdts: z.ZodNumber;
|
|
250
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
251
|
+
prime: z.ZodNumber;
|
|
252
|
+
cdts: z.ZodNumber;
|
|
253
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
254
|
+
prime: z.ZodNumber;
|
|
255
|
+
cdts: z.ZodNumber;
|
|
256
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
257
|
+
by_severity: z.ZodObject<{
|
|
258
|
+
high: z.ZodNumber;
|
|
259
|
+
medium: z.ZodNumber;
|
|
260
|
+
low: z.ZodNumber;
|
|
261
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
262
|
+
high: z.ZodNumber;
|
|
263
|
+
medium: z.ZodNumber;
|
|
264
|
+
low: z.ZodNumber;
|
|
265
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
266
|
+
high: z.ZodNumber;
|
|
267
|
+
medium: z.ZodNumber;
|
|
268
|
+
low: z.ZodNumber;
|
|
269
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
270
|
+
missing_flowdown_count: z.ZodNumber;
|
|
271
|
+
escalation_count: z.ZodNumber;
|
|
272
|
+
suppressed_count: z.ZodNumber;
|
|
273
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
274
|
+
by_provenance: z.ZodObject<{
|
|
275
|
+
prime: z.ZodNumber;
|
|
276
|
+
cdts: z.ZodNumber;
|
|
277
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
278
|
+
prime: z.ZodNumber;
|
|
279
|
+
cdts: z.ZodNumber;
|
|
280
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
281
|
+
prime: z.ZodNumber;
|
|
282
|
+
cdts: z.ZodNumber;
|
|
283
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
284
|
+
by_severity: z.ZodObject<{
|
|
285
|
+
high: z.ZodNumber;
|
|
286
|
+
medium: z.ZodNumber;
|
|
287
|
+
low: z.ZodNumber;
|
|
288
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
289
|
+
high: z.ZodNumber;
|
|
290
|
+
medium: z.ZodNumber;
|
|
291
|
+
low: z.ZodNumber;
|
|
292
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
293
|
+
high: z.ZodNumber;
|
|
294
|
+
medium: z.ZodNumber;
|
|
295
|
+
low: z.ZodNumber;
|
|
296
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
297
|
+
missing_flowdown_count: z.ZodNumber;
|
|
298
|
+
escalation_count: z.ZodNumber;
|
|
299
|
+
suppressed_count: z.ZodNumber;
|
|
300
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
301
|
+
export type CandidateClassification = z.infer<typeof candidateClassificationSchema>;
|
|
302
|
+
export type R1Provenance = z.infer<typeof provenanceSchema>;
|
|
303
|
+
export type SuggestionPositions = z.infer<typeof positionsSchema>;
|
|
304
|
+
export type DerivationJob = z.infer<typeof derivationJobSchema>;
|
|
305
|
+
export type CandidateRule = z.infer<typeof candidateRuleSchema>;
|
|
306
|
+
export type RulebookStatus = z.infer<typeof rulebookStatusSchema>;
|
|
307
|
+
export type ReviewSummary = z.infer<typeof reviewSummarySchema>;
|
|
308
|
+
/** Counterparty type chosen on review start. */
|
|
309
|
+
export type CounterpartyType = "commercial_sub" | "noncommercial" | "unknown";
|
|
310
|
+
/**
|
|
311
|
+
* FROZEN EvaluateRequest extension — merged into the existing evaluate/stream
|
|
312
|
+
* request body by the caller (useRedlineReview / redlineStream stay untouched
|
|
313
|
+
* until the backend lands; this type is the contract).
|
|
314
|
+
*/
|
|
315
|
+
export interface R1EvaluateExtras {
|
|
316
|
+
/** Approved prime-derived playbooks to review against. */
|
|
317
|
+
derived_playbook_ids: string[];
|
|
318
|
+
counterparty_type: CounterpartyType;
|
|
319
|
+
/** Workspace-level GovCon mode flag. */
|
|
320
|
+
govcon_mode?: boolean;
|
|
321
|
+
}
|
|
322
|
+
/** derivationJobDTO (upload answers a subset: job_id/prime_contract_id/state). */
|
|
323
|
+
export declare const wireDerivationJobSchema: z.ZodObject<{
|
|
324
|
+
job_id: z.ZodString;
|
|
325
|
+
prime_contract_id: z.ZodString;
|
|
326
|
+
state: z.ZodEnum<["queued", "running", "failed", "complete"]>;
|
|
327
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
328
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
+
error: z.ZodOptional<z.ZodString>;
|
|
330
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
331
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
332
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
rules: z.ZodNumber;
|
|
334
|
+
extracted_count: z.ZodNumber;
|
|
335
|
+
faithfulness_rejections: z.ZodNumber;
|
|
336
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
337
|
+
rules: z.ZodNumber;
|
|
338
|
+
extracted_count: z.ZodNumber;
|
|
339
|
+
faithfulness_rejections: z.ZodNumber;
|
|
340
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
341
|
+
rules: z.ZodNumber;
|
|
342
|
+
extracted_count: z.ZodNumber;
|
|
343
|
+
faithfulness_rejections: z.ZodNumber;
|
|
344
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
345
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
346
|
+
job_id: z.ZodString;
|
|
347
|
+
prime_contract_id: z.ZodString;
|
|
348
|
+
state: z.ZodEnum<["queued", "running", "failed", "complete"]>;
|
|
349
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
error: z.ZodOptional<z.ZodString>;
|
|
352
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
353
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
354
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
rules: z.ZodNumber;
|
|
356
|
+
extracted_count: z.ZodNumber;
|
|
357
|
+
faithfulness_rejections: z.ZodNumber;
|
|
358
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
359
|
+
rules: z.ZodNumber;
|
|
360
|
+
extracted_count: z.ZodNumber;
|
|
361
|
+
faithfulness_rejections: z.ZodNumber;
|
|
362
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
363
|
+
rules: z.ZodNumber;
|
|
364
|
+
extracted_count: z.ZodNumber;
|
|
365
|
+
faithfulness_rejections: z.ZodNumber;
|
|
366
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
367
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
368
|
+
job_id: z.ZodString;
|
|
369
|
+
prime_contract_id: z.ZodString;
|
|
370
|
+
state: z.ZodEnum<["queued", "running", "failed", "complete"]>;
|
|
371
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
372
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
373
|
+
error: z.ZodOptional<z.ZodString>;
|
|
374
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
375
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
376
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
377
|
+
rules: z.ZodNumber;
|
|
378
|
+
extracted_count: z.ZodNumber;
|
|
379
|
+
faithfulness_rejections: z.ZodNumber;
|
|
380
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
381
|
+
rules: z.ZodNumber;
|
|
382
|
+
extracted_count: z.ZodNumber;
|
|
383
|
+
faithfulness_rejections: z.ZodNumber;
|
|
384
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
385
|
+
rules: z.ZodNumber;
|
|
386
|
+
extracted_count: z.ZodNumber;
|
|
387
|
+
faithfulness_rejections: z.ZodNumber;
|
|
388
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
389
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
390
|
+
/** contracts.Rule JSON carried in derivedRuleDTO.body (fields we consume). */
|
|
391
|
+
export declare const wireRuleBodySchema: z.ZodObject<{
|
|
392
|
+
id: z.ZodString;
|
|
393
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
394
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
395
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
396
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
397
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
399
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
400
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
401
|
+
source: z.ZodOptional<z.ZodString>;
|
|
402
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
403
|
+
id: z.ZodString;
|
|
404
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
405
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
406
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
407
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
408
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
410
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
411
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
412
|
+
source: z.ZodOptional<z.ZodString>;
|
|
413
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
414
|
+
id: z.ZodString;
|
|
415
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
416
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
417
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
418
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
419
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
421
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
422
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
423
|
+
source: z.ZodOptional<z.ZodString>;
|
|
424
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
425
|
+
/** derivedRuleDTO. */
|
|
426
|
+
export declare const wireDerivedRuleSchema: z.ZodObject<{
|
|
427
|
+
rule_id: z.ZodString;
|
|
428
|
+
clause_ref: z.ZodString;
|
|
429
|
+
rulebook_version: z.ZodNumber;
|
|
430
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
431
|
+
etag: z.ZodNumber;
|
|
432
|
+
body: z.ZodObject<{
|
|
433
|
+
id: z.ZodString;
|
|
434
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
435
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
436
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
437
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
438
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
439
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
440
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
441
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
442
|
+
source: z.ZodOptional<z.ZodString>;
|
|
443
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
444
|
+
id: z.ZodString;
|
|
445
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
446
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
447
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
448
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
449
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
451
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
452
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
453
|
+
source: z.ZodOptional<z.ZodString>;
|
|
454
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
455
|
+
id: z.ZodString;
|
|
456
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
457
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
458
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
459
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
460
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
461
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
462
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
463
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
464
|
+
source: z.ZodOptional<z.ZodString>;
|
|
465
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
466
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
467
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
468
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
469
|
+
rule_id: z.ZodString;
|
|
470
|
+
clause_ref: z.ZodString;
|
|
471
|
+
rulebook_version: z.ZodNumber;
|
|
472
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
473
|
+
etag: z.ZodNumber;
|
|
474
|
+
body: z.ZodObject<{
|
|
475
|
+
id: z.ZodString;
|
|
476
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
477
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
478
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
479
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
480
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
482
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
483
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
484
|
+
source: z.ZodOptional<z.ZodString>;
|
|
485
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
486
|
+
id: z.ZodString;
|
|
487
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
488
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
489
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
490
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
491
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
492
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
493
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
494
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
495
|
+
source: z.ZodOptional<z.ZodString>;
|
|
496
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
497
|
+
id: z.ZodString;
|
|
498
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
499
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
500
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
501
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
502
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
503
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
504
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
505
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
506
|
+
source: z.ZodOptional<z.ZodString>;
|
|
507
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
508
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
509
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
510
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
511
|
+
rule_id: z.ZodString;
|
|
512
|
+
clause_ref: z.ZodString;
|
|
513
|
+
rulebook_version: z.ZodNumber;
|
|
514
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
515
|
+
etag: z.ZodNumber;
|
|
516
|
+
body: z.ZodObject<{
|
|
517
|
+
id: z.ZodString;
|
|
518
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
519
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
520
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
521
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
522
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
523
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
524
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
525
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
526
|
+
source: z.ZodOptional<z.ZodString>;
|
|
527
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
528
|
+
id: z.ZodString;
|
|
529
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
530
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
531
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
532
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
533
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
534
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
535
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
536
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
537
|
+
source: z.ZodOptional<z.ZodString>;
|
|
538
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
539
|
+
id: z.ZodString;
|
|
540
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
541
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
542
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
543
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
544
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
545
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
546
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
547
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
548
|
+
source: z.ZodOptional<z.ZodString>;
|
|
549
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
550
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
551
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
552
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
553
|
+
/** derivedRulebookDTO (also the bulk-approve response). */
|
|
554
|
+
export declare const wireRulebookSchema: z.ZodObject<{
|
|
555
|
+
prime_contract_id: z.ZodString;
|
|
556
|
+
latest_version: z.ZodNumber;
|
|
557
|
+
active_version: z.ZodNumber;
|
|
558
|
+
status: z.ZodString;
|
|
559
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
560
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
561
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
562
|
+
prime_contract_id: z.ZodString;
|
|
563
|
+
latest_version: z.ZodNumber;
|
|
564
|
+
active_version: z.ZodNumber;
|
|
565
|
+
status: z.ZodString;
|
|
566
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
567
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
568
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
569
|
+
prime_contract_id: z.ZodString;
|
|
570
|
+
latest_version: z.ZodNumber;
|
|
571
|
+
active_version: z.ZodNumber;
|
|
572
|
+
status: z.ZodString;
|
|
573
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
574
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
575
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
576
|
+
/** GET .../rules envelope. */
|
|
577
|
+
export declare const wireRuleListSchema: z.ZodObject<{
|
|
578
|
+
rulebook: z.ZodObject<{
|
|
579
|
+
prime_contract_id: z.ZodString;
|
|
580
|
+
latest_version: z.ZodNumber;
|
|
581
|
+
active_version: z.ZodNumber;
|
|
582
|
+
status: z.ZodString;
|
|
583
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
584
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
585
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
586
|
+
prime_contract_id: z.ZodString;
|
|
587
|
+
latest_version: z.ZodNumber;
|
|
588
|
+
active_version: z.ZodNumber;
|
|
589
|
+
status: z.ZodString;
|
|
590
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
591
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
592
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
593
|
+
prime_contract_id: z.ZodString;
|
|
594
|
+
latest_version: z.ZodNumber;
|
|
595
|
+
active_version: z.ZodNumber;
|
|
596
|
+
status: z.ZodString;
|
|
597
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
598
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
599
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
600
|
+
version: z.ZodNumber;
|
|
601
|
+
rules: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
602
|
+
rule_id: z.ZodString;
|
|
603
|
+
clause_ref: z.ZodString;
|
|
604
|
+
rulebook_version: z.ZodNumber;
|
|
605
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
606
|
+
etag: z.ZodNumber;
|
|
607
|
+
body: z.ZodObject<{
|
|
608
|
+
id: z.ZodString;
|
|
609
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
610
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
611
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
612
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
613
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
614
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
615
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
616
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
617
|
+
source: z.ZodOptional<z.ZodString>;
|
|
618
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
619
|
+
id: z.ZodString;
|
|
620
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
621
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
622
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
623
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
624
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
625
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
626
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
627
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
628
|
+
source: z.ZodOptional<z.ZodString>;
|
|
629
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
630
|
+
id: z.ZodString;
|
|
631
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
632
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
633
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
634
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
635
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
636
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
637
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
638
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
639
|
+
source: z.ZodOptional<z.ZodString>;
|
|
640
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
641
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
642
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
643
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
644
|
+
rule_id: z.ZodString;
|
|
645
|
+
clause_ref: z.ZodString;
|
|
646
|
+
rulebook_version: z.ZodNumber;
|
|
647
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
648
|
+
etag: z.ZodNumber;
|
|
649
|
+
body: z.ZodObject<{
|
|
650
|
+
id: z.ZodString;
|
|
651
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
652
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
653
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
654
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
655
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
657
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
658
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
659
|
+
source: z.ZodOptional<z.ZodString>;
|
|
660
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
661
|
+
id: z.ZodString;
|
|
662
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
663
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
664
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
665
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
666
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
667
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
668
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
669
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
670
|
+
source: z.ZodOptional<z.ZodString>;
|
|
671
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
672
|
+
id: z.ZodString;
|
|
673
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
674
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
675
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
676
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
677
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
678
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
679
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
680
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
681
|
+
source: z.ZodOptional<z.ZodString>;
|
|
682
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
683
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
684
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
685
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
686
|
+
rule_id: z.ZodString;
|
|
687
|
+
clause_ref: z.ZodString;
|
|
688
|
+
rulebook_version: z.ZodNumber;
|
|
689
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
690
|
+
etag: z.ZodNumber;
|
|
691
|
+
body: z.ZodObject<{
|
|
692
|
+
id: z.ZodString;
|
|
693
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
694
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
695
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
696
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
697
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
698
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
699
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
700
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
701
|
+
source: z.ZodOptional<z.ZodString>;
|
|
702
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
703
|
+
id: z.ZodString;
|
|
704
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
705
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
706
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
707
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
708
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
709
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
710
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
711
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
712
|
+
source: z.ZodOptional<z.ZodString>;
|
|
713
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
714
|
+
id: z.ZodString;
|
|
715
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
716
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
717
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
718
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
719
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
720
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
721
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
722
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
723
|
+
source: z.ZodOptional<z.ZodString>;
|
|
724
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
725
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
726
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
727
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
728
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
729
|
+
rulebook: z.ZodObject<{
|
|
730
|
+
prime_contract_id: z.ZodString;
|
|
731
|
+
latest_version: z.ZodNumber;
|
|
732
|
+
active_version: z.ZodNumber;
|
|
733
|
+
status: z.ZodString;
|
|
734
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
735
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
736
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
737
|
+
prime_contract_id: z.ZodString;
|
|
738
|
+
latest_version: z.ZodNumber;
|
|
739
|
+
active_version: z.ZodNumber;
|
|
740
|
+
status: z.ZodString;
|
|
741
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
742
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
743
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
744
|
+
prime_contract_id: z.ZodString;
|
|
745
|
+
latest_version: z.ZodNumber;
|
|
746
|
+
active_version: z.ZodNumber;
|
|
747
|
+
status: z.ZodString;
|
|
748
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
749
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
750
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
751
|
+
version: z.ZodNumber;
|
|
752
|
+
rules: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
753
|
+
rule_id: z.ZodString;
|
|
754
|
+
clause_ref: z.ZodString;
|
|
755
|
+
rulebook_version: z.ZodNumber;
|
|
756
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
757
|
+
etag: z.ZodNumber;
|
|
758
|
+
body: z.ZodObject<{
|
|
759
|
+
id: z.ZodString;
|
|
760
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
761
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
762
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
763
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
764
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
765
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
766
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
767
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
768
|
+
source: z.ZodOptional<z.ZodString>;
|
|
769
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
770
|
+
id: z.ZodString;
|
|
771
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
772
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
773
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
774
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
775
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
776
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
777
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
778
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
779
|
+
source: z.ZodOptional<z.ZodString>;
|
|
780
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
781
|
+
id: z.ZodString;
|
|
782
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
783
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
784
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
785
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
786
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
787
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
788
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
789
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
790
|
+
source: z.ZodOptional<z.ZodString>;
|
|
791
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
792
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
793
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
794
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
795
|
+
rule_id: z.ZodString;
|
|
796
|
+
clause_ref: z.ZodString;
|
|
797
|
+
rulebook_version: z.ZodNumber;
|
|
798
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
799
|
+
etag: z.ZodNumber;
|
|
800
|
+
body: z.ZodObject<{
|
|
801
|
+
id: z.ZodString;
|
|
802
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
803
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
804
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
805
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
806
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
807
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
808
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
809
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
810
|
+
source: z.ZodOptional<z.ZodString>;
|
|
811
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
812
|
+
id: z.ZodString;
|
|
813
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
814
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
815
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
816
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
817
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
818
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
819
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
820
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
821
|
+
source: z.ZodOptional<z.ZodString>;
|
|
822
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
823
|
+
id: z.ZodString;
|
|
824
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
825
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
826
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
827
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
828
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
829
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
830
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
831
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
832
|
+
source: z.ZodOptional<z.ZodString>;
|
|
833
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
834
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
835
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
836
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
837
|
+
rule_id: z.ZodString;
|
|
838
|
+
clause_ref: z.ZodString;
|
|
839
|
+
rulebook_version: z.ZodNumber;
|
|
840
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
841
|
+
etag: z.ZodNumber;
|
|
842
|
+
body: z.ZodObject<{
|
|
843
|
+
id: z.ZodString;
|
|
844
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
845
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
846
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
847
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
848
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
849
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
850
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
851
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
852
|
+
source: z.ZodOptional<z.ZodString>;
|
|
853
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
854
|
+
id: z.ZodString;
|
|
855
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
856
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
857
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
858
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
859
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
860
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
861
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
862
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
863
|
+
source: z.ZodOptional<z.ZodString>;
|
|
864
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
865
|
+
id: z.ZodString;
|
|
866
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
867
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
868
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
869
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
870
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
871
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
872
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
873
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
874
|
+
source: z.ZodOptional<z.ZodString>;
|
|
875
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
876
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
877
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
878
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
879
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
880
|
+
rulebook: z.ZodObject<{
|
|
881
|
+
prime_contract_id: z.ZodString;
|
|
882
|
+
latest_version: z.ZodNumber;
|
|
883
|
+
active_version: z.ZodNumber;
|
|
884
|
+
status: z.ZodString;
|
|
885
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
886
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
887
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
888
|
+
prime_contract_id: z.ZodString;
|
|
889
|
+
latest_version: z.ZodNumber;
|
|
890
|
+
active_version: z.ZodNumber;
|
|
891
|
+
status: z.ZodString;
|
|
892
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
893
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
894
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
895
|
+
prime_contract_id: z.ZodString;
|
|
896
|
+
latest_version: z.ZodNumber;
|
|
897
|
+
active_version: z.ZodNumber;
|
|
898
|
+
status: z.ZodString;
|
|
899
|
+
bundle_hash: z.ZodOptional<z.ZodString>;
|
|
900
|
+
counts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
901
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
902
|
+
version: z.ZodNumber;
|
|
903
|
+
rules: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
904
|
+
rule_id: z.ZodString;
|
|
905
|
+
clause_ref: z.ZodString;
|
|
906
|
+
rulebook_version: z.ZodNumber;
|
|
907
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
908
|
+
etag: z.ZodNumber;
|
|
909
|
+
body: z.ZodObject<{
|
|
910
|
+
id: z.ZodString;
|
|
911
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
912
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
913
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
914
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
915
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
916
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
917
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
918
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
919
|
+
source: z.ZodOptional<z.ZodString>;
|
|
920
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
921
|
+
id: z.ZodString;
|
|
922
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
923
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
924
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
925
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
926
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
927
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
928
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
929
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
930
|
+
source: z.ZodOptional<z.ZodString>;
|
|
931
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
932
|
+
id: z.ZodString;
|
|
933
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
934
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
935
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
936
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
937
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
938
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
939
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
940
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
941
|
+
source: z.ZodOptional<z.ZodString>;
|
|
942
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
943
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
944
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
945
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
946
|
+
rule_id: z.ZodString;
|
|
947
|
+
clause_ref: z.ZodString;
|
|
948
|
+
rulebook_version: z.ZodNumber;
|
|
949
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
950
|
+
etag: z.ZodNumber;
|
|
951
|
+
body: z.ZodObject<{
|
|
952
|
+
id: z.ZodString;
|
|
953
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
954
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
955
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
956
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
957
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
958
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
959
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
960
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
961
|
+
source: z.ZodOptional<z.ZodString>;
|
|
962
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
963
|
+
id: z.ZodString;
|
|
964
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
965
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
966
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
967
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
968
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
969
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
970
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
971
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
972
|
+
source: z.ZodOptional<z.ZodString>;
|
|
973
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
974
|
+
id: z.ZodString;
|
|
975
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
976
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
977
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
978
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
979
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
980
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
981
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
982
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
983
|
+
source: z.ZodOptional<z.ZodString>;
|
|
984
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
985
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
986
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
987
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
988
|
+
rule_id: z.ZodString;
|
|
989
|
+
clause_ref: z.ZodString;
|
|
990
|
+
rulebook_version: z.ZodNumber;
|
|
991
|
+
state: z.ZodEnum<["draft", "in_review", "approved", "rejected"]>;
|
|
992
|
+
etag: z.ZodNumber;
|
|
993
|
+
body: z.ZodObject<{
|
|
994
|
+
id: z.ZodString;
|
|
995
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
996
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
997
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
998
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
999
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
1000
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
1002
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1004
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1005
|
+
id: z.ZodString;
|
|
1006
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
1009
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
1010
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
1011
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
1013
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
1014
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1015
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1016
|
+
id: z.ZodString;
|
|
1017
|
+
playbook_id: z.ZodOptional<z.ZodString>;
|
|
1018
|
+
verbatim_excerpt: z.ZodOptional<z.ZodString>;
|
|
1019
|
+
suggested_text: z.ZodOptional<z.ZodString>;
|
|
1020
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
1021
|
+
mandatory: z.ZodOptional<z.ZodBoolean>;
|
|
1022
|
+
default_severity: z.ZodOptional<z.ZodString>;
|
|
1023
|
+
prime_section_ref: z.ZodOptional<z.ZodString>;
|
|
1024
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1027
|
+
disposed_by: z.ZodOptional<z.ZodString>;
|
|
1028
|
+
disposed_at: z.ZodOptional<z.ZodString>;
|
|
1029
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
1030
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1031
|
+
export type R1ApiErrorKind = "network" | "http" | "parse" | "forbidden" | "conflict" | "not_found";
|
|
1032
|
+
export declare class R1ApiError extends Error {
|
|
1033
|
+
readonly kind: R1ApiErrorKind;
|
|
1034
|
+
readonly status?: number;
|
|
1035
|
+
constructor(kind: R1ApiErrorKind, message: string, status?: number);
|
|
1036
|
+
}
|
|
1037
|
+
export interface R1ApiConfig {
|
|
1038
|
+
/** "mock" (default) serves fixtures; "real" hits `${baseUrl}` endpoints. */
|
|
1039
|
+
mode?: "mock" | "real";
|
|
1040
|
+
/** Service base URL, e.g. https://host/api/v1/lax-ai-legal-editor */
|
|
1041
|
+
baseUrl?: string;
|
|
1042
|
+
/** Returns the bearer token (sync or async); omitted → no auth header. */
|
|
1043
|
+
getAuthToken?: () => string | undefined | Promise<string | undefined>;
|
|
1044
|
+
workspaceId?: string;
|
|
1045
|
+
/** Shown as the disposing identity on the approval screen. */
|
|
1046
|
+
approver?: string;
|
|
1047
|
+
/** Mock latency in ms (0 in tests). */
|
|
1048
|
+
mockDelayMs?: number;
|
|
1049
|
+
}
|
|
1050
|
+
/** Configure once from the consumer (lax-web-portal) or panel props. */
|
|
1051
|
+
export declare const configureR1Api: (next: R1ApiConfig) => void;
|
|
1052
|
+
/** The identity stamped on dispositions — shown on the approval screen. */
|
|
1053
|
+
export declare const r1Approver: () => string;
|
|
1054
|
+
/** Test/demo hook: reset mock state to the pristine fixture dataset (also
|
|
1055
|
+
* clears the real-mode job/candidate indexes). */
|
|
1056
|
+
export declare const resetR1Mock: () => void;
|
|
1057
|
+
export declare const uploadPrimeContract: (file: File, primeContractId?: string) => Promise<DerivationJob>;
|
|
1058
|
+
export declare const getDerivationJob: (jobId: string) => Promise<DerivationJob>;
|
|
1059
|
+
export declare const retryDerivationJob: (jobId: string) => Promise<DerivationJob>;
|
|
1060
|
+
export declare const listCandidateRules: (playbookId: string) => Promise<CandidateRule[]>;
|
|
1061
|
+
/** Approve a candidate; pass `editedText` when the approver edited the rule.
|
|
1062
|
+
* Real mode: an edit is its own endpoint (POST .../edit bumps the etag),
|
|
1063
|
+
* then the approve lands at the bumped etag. */
|
|
1064
|
+
export declare const approveCandidateRule: (candidateId: string, editedText?: string) => Promise<CandidateRule>;
|
|
1065
|
+
export declare const rejectCandidateRule: (candidateId: string) => Promise<CandidateRule>;
|
|
1066
|
+
export declare const bulkApproveCandidateRules: (playbookId: string, candidateIds: string[]) => Promise<CandidateRule[]>;
|
|
1067
|
+
export declare const getRulebookStatus: (playbookId: string) => Promise<RulebookStatus>;
|
|
1068
|
+
/**
|
|
1069
|
+
* GET /v1/reviews/{id}/summary. The backend serves the run summary the stream
|
|
1070
|
+
* transport recorded, so it only answers once the review's `done` frame has
|
|
1071
|
+
* landed. Unknown id and cross-workspace id are both 404 by design (the store
|
|
1072
|
+
* is workspace-keyed) — both surface here as R1ApiError kind "not_found".
|
|
1073
|
+
*
|
|
1074
|
+
* The live path does not need this call: the SSE `summary` frame carries the
|
|
1075
|
+
* same counters, and the endpoint's flattened fields are pure arithmetic over
|
|
1076
|
+
* them (see reviewSummaryFromStream). Use it to re-fetch a summary whose
|
|
1077
|
+
* stream is no longer in hand.
|
|
1078
|
+
*/
|
|
1079
|
+
export declare const getReviewSummary: (reviewId: string) => Promise<ReviewSummary>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Adapts the stream's `summary` frame to the ExecSummaryPanel contract using
|
|
1082
|
+
* exactly the derivation the endpoint applies server-side (redlining/api
|
|
1083
|
+
* summary.go): by_provenance/by_severity are buckets of the run's
|
|
1084
|
+
* finding_provenance/severity_mix maps, the three *_count fields are renames.
|
|
1085
|
+
*
|
|
1086
|
+
* Those maps are sparse on the wire — a real run reports finding_provenance
|
|
1087
|
+
* `{cdts,lane,model}` with no `prime` key at all — so every lookup defaults to
|
|
1088
|
+
* 0. Note `lane`/`model` have no bucket in by_provenance: prime + cdts is not
|
|
1089
|
+
* the run's total finding count and must not be presented as one.
|
|
1090
|
+
*/
|
|
1091
|
+
export declare const reviewSummaryFromStream: (payload: {
|
|
1092
|
+
severity_mix?: Record<string, number>;
|
|
1093
|
+
finding_provenance?: Record<string, number>;
|
|
1094
|
+
missing_flowdowns?: number;
|
|
1095
|
+
escalations?: number;
|
|
1096
|
+
suppressed?: number;
|
|
1097
|
+
}) => ReviewSummary;
|