4
4
from __future__ import annotations
5
5
6
6
from enum import Enum
7
- from typing import Any , Dict , List , Optional
7
+ from typing import Any , Dict , List , Optional , Union
8
8
9
9
from pydantic import BaseModel , Field , RootModel
10
10
@@ -65,6 +65,53 @@ class DeleteContractResponseContent(BaseModel):
65
65
success : bool
66
66
67
67
68
+ class EQModeItem (BaseModel ):
69
+ title : Optional [str ] = None
70
+ value : Optional [str ] = None
71
+
72
+
73
+ class EmptyStructure (BaseModel ):
74
+ pass
75
+
76
+
77
+ class EqCardKey (Enum ):
78
+ moneyYouReceive = 'moneyYouReceive'
79
+ whatYouOwn = 'whatYouOwn'
80
+ whatYoureResponsibleFor = 'whatYoureResponsibleFor'
81
+ howLongThisDealLasts = 'howLongThisDealLasts'
82
+ risksCostsLegalStuff = 'risksCostsLegalStuff'
83
+
84
+
85
+ class EqCardType (Enum ):
86
+ A = 'A'
87
+ B = 'B'
88
+
89
+
90
+ class EqCardUniqueData6 (BaseModel ):
91
+ EMPTY : EmptyStructure
92
+
93
+
94
+ class EqDurationCard (BaseModel ):
95
+ durationText : Optional [str ] = None
96
+ endDate : Optional [str ] = None
97
+
98
+
99
+ class EqLegalCard (BaseModel ):
100
+ pass
101
+
102
+
103
+ class EqMoneyCard (BaseModel ):
104
+ majorNumber : Optional [str ] = None
105
+
106
+
107
+ class EqOwnershipCard (BaseModel ):
108
+ pass
109
+
110
+
111
+ class EqResponsibilitesCard (BaseModel ):
112
+ pass
113
+
114
+
68
115
class FixedTermValue (BaseModel ):
69
116
unit : str
70
117
value : str
@@ -278,8 +325,46 @@ class ContractVariable(BaseModel):
278
325
definitionCitation : Optional [str ] = None
279
326
280
327
281
- class EqSection (BaseModel ):
282
- terms : Optional [List [Term ]] = None
328
+ class EqCardUniqueData1 (BaseModel ):
329
+ MONEY_RECEIVED : EqMoneyCard
330
+
331
+
332
+ class EqCardUniqueData2 (BaseModel ):
333
+ OWNERSHIP : EqOwnershipCard
334
+
335
+
336
+ class EqCardUniqueData3 (BaseModel ):
337
+ RESPONSIBILITES : EqResponsibilitesCard
338
+
339
+
340
+ class EqCardUniqueData4 (BaseModel ):
341
+ DURATION : EqDurationCard
342
+
343
+
344
+ class EqCardUniqueData5 (BaseModel ):
345
+ LEGAL : EqLegalCard
346
+
347
+
348
+ class EqCardUniqueData (
349
+ RootModel [
350
+ Union [
351
+ EqCardUniqueData1 ,
352
+ EqCardUniqueData2 ,
353
+ EqCardUniqueData3 ,
354
+ EqCardUniqueData4 ,
355
+ EqCardUniqueData5 ,
356
+ EqCardUniqueData6 ,
357
+ ]
358
+ ]
359
+ ):
360
+ root : Union [
361
+ EqCardUniqueData1 ,
362
+ EqCardUniqueData2 ,
363
+ EqCardUniqueData3 ,
364
+ EqCardUniqueData4 ,
365
+ EqCardUniqueData5 ,
366
+ EqCardUniqueData6 ,
367
+ ]
283
368
284
369
285
370
class ExposeTypesResponseContent (BaseModel ):
@@ -299,15 +384,17 @@ class GetProfileResponseContent(BaseModel):
299
384
300
385
class GetTTSURLsResponseContent (BaseModel ):
301
386
contractId : str = Field (..., pattern = '^[A-Za-z0-9-]+$' )
302
- tts_presigned_urls : TTSPresignedUrlMap
387
+ ttsSrcUrl : TTSPresignedUrlMap
303
388
304
389
305
390
class GetUploadURLResponseContent (BaseModel ):
306
391
url_info : PresignedPostData
307
392
308
393
309
394
class IqSection (BaseModel ):
310
- qa_sections : Optional [List [QASection ]] = None
395
+ qa_sections : Optional [List [QASection ]] = Field (
396
+ None , description = 'deprecation path (v0.5)'
397
+ )
311
398
312
399
313
400
class ListContractsResponseContent (BaseModel ):
@@ -329,12 +416,38 @@ class ShareContractResponseContent(BaseModel):
329
416
invalidRemoves : Optional [List [InvalidRemove ]] = None
330
417
331
418
419
+ class EQModeCard (BaseModel ):
420
+ id : EqCardKey
421
+ title : str
422
+ type : EqCardType
423
+ cardUniqueData : EqCardUniqueData
424
+ eqTitle : Optional [str ] = Field (None , description = 'Deprecated, use subTitle Instead' )
425
+ subTitle : Optional [str ] = None
426
+ totalAdvance : Optional [str ] = Field (
427
+ None , description = 'Deprecated, this should be in the in a custom subtype'
428
+ )
429
+ items : Optional [List [EQModeItem ]] = Field (
430
+ None , description = 'Deprecated, this should be in the in a custom subtype'
431
+ )
432
+ audioSrc : Optional [str ] = Field (None , description = 'Deprecated, use the ttsSrcUrl' )
433
+ ttsSrcUrl : Optional [str ] = None
434
+
435
+
436
+ class EQModeData (RootModel [Optional [Dict [str , EQModeCard ]]]):
437
+ root : Optional [Dict [str , EQModeCard ]] = None
438
+
439
+
440
+ class EqSection (BaseModel ):
441
+ terms : Optional [List [Term ]] = Field (None , description = 'deprecation path (v0.5)' )
442
+ eqModeData : Optional [EQModeData ] = None
443
+
444
+
332
445
class GetContractResponseContent (BaseModel ):
333
446
contractId : str = Field (..., pattern = '^[A-Za-z0-9-]+$' )
334
447
name : str
335
448
type : ContractType
336
- terms : Optional [List [Term ]] = None
337
- qa_sections : Optional [str ] = None
449
+ terms : Optional [List [Term ]] = Field ( None , description = 'deprecation path (v0)' )
450
+ qa_sections : Optional [str ] = Field ( None , description = 'deprecation path (v0)' )
338
451
eq_section : Optional [EqSection ] = None
339
452
iq_section : Optional [IqSection ] = None
340
453
isOwner : bool
0 commit comments