Skip to content

Commit 79524bc

Browse files
committed
Move EQ Mode to separate file, clean up spec
1 parent 434279c commit 79524bc

File tree

2 files changed

+149
-96
lines changed

2 files changed

+149
-96
lines changed

model/analysis/eq.smithy

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
$version: "2"
2+
3+
namespace equaliq.eq
4+
5+
use equaliq#TermsList
6+
use equaliq#StringList
7+
use equaliq#EmptyStructure
8+
use equaliq#Url
9+
10+
// EQ Mode Structures
11+
12+
structure EqSection {
13+
@documentation("deprecation path (v0.5)")
14+
terms: TermsList
15+
16+
//v1 version
17+
eqModeData: EQModeData
18+
}
19+
20+
// Special Contract Structures (only the stable ones)
21+
enum EqCardKey {
22+
MONEY_RECEIVED = "moneyYouReceive"
23+
OWNERSHIP = "whatYouOwn"
24+
RESPONSIBILITES = "whatYoureResponsibleFor"
25+
DURATION = "howLongThisDealLasts"
26+
LEGAL = "risksCostsLegalStuff"
27+
}
28+
29+
structure EqMoneyCard {
30+
@required
31+
majorNumber: String,
32+
33+
paidAfterList: StringList,
34+
}
35+
36+
structure EqOwnershipCard {
37+
@required
38+
ownershipTerms: SimpleTermDescriptionList,
39+
}
40+
41+
structure EqResponsibilitesCard {
42+
@required
43+
resposibilites: SimpleTermDescriptionList
44+
}
45+
46+
enum DurationType {
47+
FIXED = "fixed"
48+
INDEFINITE = "indefinite"
49+
RENEWABLE = "renewable"
50+
OTHER = "other"
51+
}
52+
53+
structure EqDurationCard {
54+
@required
55+
durationType: DurationType
56+
57+
durationText: String
58+
59+
durationDetails: SimpleTermDescriptionList
60+
}
61+
62+
structure EqLegalCard {
63+
@required
64+
risks: String
65+
66+
@required
67+
costs: String
68+
69+
@required
70+
legal: String
71+
}
72+
73+
union EqCardUniqueData {
74+
MONEY_RECEIVED: EqMoneyCard
75+
OWNERSHIP: EqOwnershipCard
76+
RESPONSIBILITES: EqResponsibilitesCard
77+
DURATION: EqDurationCard
78+
LEGAL: EqLegalCard
79+
EMPTY: EmptyStructure
80+
}
81+
82+
// EQMode data structure - matches the eqmode field in seniSpecialData
83+
map EQModeData {
84+
key: EqCardKey
85+
value: EQModeCard
86+
}
87+
88+
enum EqCardType {
89+
@documentation("v0")
90+
A = "A"
91+
92+
@documentation("v1")
93+
B = "B"
94+
}
95+
96+
// Individual EQMode card
97+
structure EQModeCard {
98+
@required
99+
id: EqCardKey
100+
101+
@required
102+
title: String
103+
104+
@required
105+
type: EqCardType
106+
107+
@required
108+
cardUniqueData: EqCardUniqueData
109+
110+
@documentation("Deprecated, use subTitle Instead")
111+
eqTitle: String
112+
subTitle: String
113+
114+
@documentation("Deprecated, this should be in the in a custom subtype")
115+
totalAdvance: String
116+
117+
@documentation("Deprecated, this should be in the in a custom subtype")
118+
items: EQModeItemList
119+
120+
@documentation("Deprecated, use the ttsSrcUrl")
121+
audioSrc: String
122+
123+
ttsSrcUrl: Url
124+
}
125+
126+
@documentation("Deprecated")
127+
list EQModeItemList {
128+
member: EQModeItem
129+
}
130+
131+
@documentation("Deprecated")
132+
structure EQModeItem {
133+
title: String
134+
value: String
135+
}
136+
137+
structure SimpleTermDescription {
138+
@required
139+
title: String,
140+
141+
@required
142+
description: String,
143+
}
144+
145+
list SimpleTermDescriptionList {
146+
member: SimpleTermDescription
147+
}

model/contracts.smithy

Lines changed: 2 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ $version: "2"
22

33
namespace equaliq
44

5+
use equaliq.eq#EqSection
6+
57
// Contract structures
68

79
string ContractId with [UuidLikeMixin]
@@ -29,13 +31,6 @@ enum ContractVariableType {
2931
INTERNAL_CITATION = "internal_citation"
3032
}
3133

32-
structure EqSection {
33-
@documentation("deprecation path (v0.5)")
34-
terms: TermsList
35-
36-
//v1 version
37-
eqModeData: EQModeData
38-
}
3934

4035
structure IqSection {
4136
@documentation("deprecation path (v0.5)")
@@ -469,95 +464,6 @@ structure QA {
469464
answer: String
470465
}
471466

472-
// Special Contract Structures (only the stable ones)
473-
enum EqCardKey {
474-
MONEY_RECEIVED = "moneyYouReceive"
475-
OWNERSHIP = "whatYouOwn"
476-
RESPONSIBILITES = "whatYoureResponsibleFor"
477-
DURATION = "howLongThisDealLasts"
478-
LEGAL = "risksCostsLegalStuff"
479-
}
480-
481-
// TODO Gwyn fill out these card structures
482-
structure EqMoneyCard {
483-
majorNumber: String,
484-
}
485-
486-
structure EqOwnershipCard {
487-
}
488-
489-
structure EqResponsibilitesCard {
490-
}
491-
492-
structure EqDurationCard {
493-
durationText: String,
494-
endDate: String,
495-
}
496-
497-
structure EqLegalCard {
498-
}
499-
500-
union EqCardUniqueData {
501-
MONEY_RECEIVED: EqMoneyCard
502-
OWNERSHIP: EqOwnershipCard
503-
RESPONSIBILITES: EqResponsibilitesCard
504-
DURATION: EqDurationCard
505-
LEGAL: EqLegalCard
506-
EMPTY: EmptyStructure
507-
}
508-
509-
// EQMode data structure - matches the eqmode field in seniSpecialData
510-
map EQModeData {
511-
key: EqCardKey
512-
value: EQModeCard
513-
}
514-
515-
enum EqCardType {
516-
@documentation("v0")
517-
A = "A"
518-
519-
@documentation("v1")
520-
B = "B"
521-
}
522-
523-
// Individual EQMode card
524-
structure EQModeCard {
525-
@required
526-
id: EqCardKey
527-
528-
@required
529-
title: String
530-
531-
@required
532-
type: EqCardType
533-
534-
@required
535-
cardUniqueData: EqCardUniqueData
536-
537-
@documentation("Deprecated, use subTitle Instead")
538-
eqTitle: String
539-
subTitle: String
540-
541-
@documentation("Deprecated, this should be in the in a custom subtype")
542-
totalAdvance: String
543-
544-
@documentation("Deprecated, this should be in the in a custom subtype")
545-
items: EQModeItemList
546-
547-
@documentation("Deprecated, use the ttsSrcUrl")
548-
audioSrc: String
549-
550-
ttsSrcUrl: Url
551-
}
552-
@documentation("Deprecated")
553-
list EQModeItemList {
554-
member: EQModeItem
555-
}
556-
@documentation("Deprecated")
557-
structure EQModeItem {
558-
title: String
559-
value: String
560-
}
561467

562468
// Sections structure - matches the sections field in seniSpecialData
563469
list SpecialContractSectionsList {

0 commit comments

Comments
 (0)