Skip to content

Commit b8794f0

Browse files
committed
Add ContractVariable structure and ContractVariableType enum
- Define ContractVariableType enum with four types: eq_term, discovered_term, external_term, internal_citation - Add ContractVariable structure with fields for contract term analysis including name, type, id, value, level, confidence, position, context, variations, and citations - Expose both types through ExposedTypes for TypeScript generation
1 parent ddeb99e commit b8794f0

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

model/equaliq.smithy

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ service EqualIQ {
3636
// When changing APIs, we sometimes want to expose unified types that aren't directly tied to any API.
3737
structure ExposedTypes {
3838
QASectionsList: QASectionsList
39+
ContractVariable: ContractVariable
40+
ContractVariableType: ContractVariableType
3941
}
4042

4143
// This API is used simply to expose types
@@ -102,6 +104,13 @@ enum SignContractResult {
102104
FAILURE
103105
}
104106

107+
enum ContractVariableType {
108+
EQ_TERM = "eq_term"
109+
DISCOVERED_TERM = "discovered_term"
110+
EXTERNAL_TERM = "external_term"
111+
INTERNAL_CITATION = "internal_citation"
112+
}
113+
105114
// Contract operations
106115
@http(method: "POST", uri: "/getContract")
107116
operation GetContract {
@@ -625,6 +634,41 @@ structure FixedTermValue {
625634
condition: String
626635
}
627636

637+
// Contract variable structures
638+
639+
structure ContractVariable {
640+
@required
641+
name: String
642+
643+
@required
644+
type: ContractVariableType
645+
646+
// unique identifier for markup tags
647+
id: String
648+
649+
// the definition/explanation for this variable
650+
value: String
651+
652+
// 1-10 difficulty level (external terms only)
653+
level: Integer
654+
655+
confidence: Float
656+
657+
// character position
658+
firstOccurrence: Integer
659+
660+
// surrounding text
661+
context: String
662+
663+
// alternative forms
664+
variations: StringList
665+
666+
// for internal citations
667+
referencedSection: String
668+
669+
// where the term is defined (e.g., "Section 7(ii)(c)(I)") - for EQ_TERM and DISCOVERED_TERM only
670+
definitionCitation: String
671+
}
628672

629673
// Common structures
630674
document Document

0 commit comments

Comments
 (0)