Skip to content

Commit bbb7cec

Browse files
committed
fix: Drop support for IntegrationLegacyReply
1 parent 73d2819 commit bbb7cec

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

packages/dsw-document-worker/dsw/document_worker/model/context.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -804,22 +804,17 @@ class IntegrationReply(Reply):
804804

805805
def __init__(self, *, path: str, created_at: datetime.datetime,
806806
created_by: SimpleAuthor | None, value: str, value_type: str,
807-
item_id: str | None, raw: typing.Any | None = None):
807+
raw: typing.Any | None = None):
808808
super().__init__(
809809
path=path,
810810
created_at=created_at,
811811
created_by=created_by,
812812
reply_type='IntegrationReply',
813813
)
814814
self.value_type = value_type
815-
self.item_id = item_id
816815
self.raw = raw
817816
self.value = value
818817

819-
@property
820-
def id(self) -> str | None:
821-
return self.item_id
822-
823818
@property
824819
def is_plain(self) -> bool:
825820
return self.value_type == 'PlainType'
@@ -849,7 +844,6 @@ def load(path: str, data: dict, **options):
849844
created_by=SimpleAuthor.load(data['createdBy'], **options),
850845
value_type=data['value']['value']['type'],
851846
value=data['value']['value'].get('value', ''),
852-
item_id=data['value']['value'].get('id'),
853847
raw=data['value']['value'].get('raw'),
854848
)
855849

packages/dsw-document-worker/dsw/document_worker/templates/extraction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def _visit_integration_question(self, key: str, question: dc.IntegrationQuestion
135135
else:
136136
self._objects[key][a_key] = {
137137
'_value': reply.value,
138-
'_id': reply.id,
139138
'_raw': reply.raw,
140139
'_path': path,
141140
}

packages/dsw-models/dsw/models/project/replies.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ class PlainIntegrationReplyType(BaseIntegrationReplyType):
1717
content: str
1818

1919

20-
class IntegrationLegacyReplyType(BaseIntegrationReplyType):
21-
type: typing.Literal['LegacyType'] = 'LegacyType'
22-
id: str | None
23-
value: str
24-
25-
2620
class IntegrationReplyType(BaseModel):
2721
type: typing.Literal['IntegrationType'] = 'IntegrationType'
2822
value: str
@@ -31,7 +25,6 @@ class IntegrationReplyType(BaseModel):
3125

3226
IntegrationReply = typing.Annotated[
3327
PlainIntegrationReplyType |
34-
IntegrationLegacyReplyType |
3528
IntegrationReplyType,
3629
pydantic.Field(discriminator='type'),
3730
]

0 commit comments

Comments
 (0)