Skip to content

Commit 9c2fd55

Browse files
author
Jens Kürten
committed
homogenize linked/attached parts and documents
1 parent 98aa0b8 commit 9c2fd55

10 files changed

+20
-20
lines changed

csfunctions/events/document_create_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class DocumentCreateCheckData(BaseModel):
1111
documents: list[Document] = Field(..., description="List of documents that are about to be created")
12-
linked_parts: list[Part] = Field(..., description="List of parts that belong to the documents")
12+
parts: list[Part] = Field(..., description="List of parts that belong to the documents")
1313

1414

1515
class DocumentCreateCheckEvent(BaseEvent):

csfunctions/events/document_field_calculation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class DocumentFieldCalculationData(BaseModel):
1111
document: Document = Field(..., description="Current state of the document")
1212
action: Literal["create", "modify", "copy", "index"] = Field(..., description="Action being performed")
13-
linked_parts: list[Part] = Field(..., description="Parts that belong to the document")
13+
parts: list[Part] = Field(..., description="Parts that belong to the document")
1414

1515

1616
class DocumentFieldCalculationEvent(BaseEvent):

csfunctions/events/document_modify_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class DocumentModifyCheckData(BaseModel):
1111
documents: list[Document] = Field(..., description="List of documents that are about to be modified")
12-
linked_parts: list[Part] = Field(..., description="List of parts that belong to the documents")
12+
parts: list[Part] = Field(..., description="List of parts that belong to the documents")
1313

1414

1515
class DocumentModifyCheckEvent(BaseEvent):

csfunctions/events/document_release_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class DocumentReleaseCheckData(BaseModel):
1212
documents: list[Document] = Field(..., description="List of documents that will be released.")
13-
attached_parts: list[Part] = Field(..., description="List of parts that belong to the documents")
13+
parts: list[Part] = Field(..., description="List of parts that belong to the documents")
1414
dialog_data: DocumentReleasedDialogData
1515

1616

csfunctions/events/engineering_change_release_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99

1010
class EngineeringChangeReleaseCheckData(BaseModel):
11-
attached_documents: list[Document] = Field(..., description="List of included documents.")
12-
attached_parts: list[Part] = Field(..., description="List of included parts.")
11+
documents: list[Document] = Field(..., description="List of included documents.")
12+
parts: list[Part] = Field(..., description="List of included parts.")
1313
engineering_changes: list[EngineeringChange] = Field(
1414
..., description="List of engineering changes that will be released."
1515
)

csfunctions/events/part_create_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class PartCreateCheckData(BaseModel):
1111
parts: list[Part] = Field(..., description="List of parts that are about to be created")
12-
linked_documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
12+
documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
1313

1414

1515
class PartCreateCheckEvent(BaseEvent):

csfunctions/events/part_field_calculation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class PartFieldCalculationData(BaseModel):
1111
part: Part = Field(..., description="Current state of the part")
1212
action: Literal["create", "modify", "copy", "index"] = Field(..., description="Action being performed")
1313

14-
linked_documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
14+
documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
1515

1616

1717
class PartFieldCalculationEvent(BaseEvent):

csfunctions/events/part_modify_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class PartModifyCheckData(BaseModel):
1111
parts: list[Part] = Field(..., description="List of parts that are about to be modified")
12-
linked_documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
12+
documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
1313

1414

1515
class PartModifyCheckEvent(BaseEvent):

csfunctions/events/part_release_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class PartReleaseCheckData(BaseModel):
1212
parts: list[Part] = Field(..., description="List of parts that will be released.")
13-
attached_documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
13+
documents: list[Document] = Field(..., description="List of documents that are referenced by the parts.")
1414
dialog_data: PartReleasedDialogData
1515

1616

docs/reference/events.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The event is triggered before any field calculations are performed.
1818
|Attribute|Type|Description|
1919
|-|-|-|
2020
|documents| list[[Document](objects.md#document)]|List of documents that are about to be created.|
21-
|linked_parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.|
21+
|parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.|
2222

2323
## DocumentModifyCheckEvent
2424
`csfunctions.events.DocumentModifyCheckEvent`
@@ -37,7 +37,7 @@ The event is triggered before any field calculations are performed.
3737
|Attribute|Type|Description|
3838
|-|-|-|
3939
|documents| list[[Document](objects.md#document)]|List of documents that are about to be modified.|
40-
|linked_parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.|
40+
|parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.|
4141

4242

4343
## DocumentReleaseCheckEvent
@@ -57,7 +57,7 @@ Be aware that the document is not released yet and the release might still be ab
5757
|Attribute|Type|Description|
5858
|-|-|-|
5959
|documents| list[[Document](objects.md#document)]|List of documents that will be released.|
60-
|attached_parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.|
60+
|parts| list[[Part](objects.md#part)]|List of parts that belong to the documents.|
6161
|dialog_data|DocumentReleaseDialogData|Contents of the dialog.|
6262

6363
**DocumentReleaseCheckDialogData:**
@@ -106,7 +106,7 @@ The event expects a DataResponse containing a dictionary of field names and thei
106106
|-|-|-|
107107
|document|[Document](objects.md#document)|Current state of the document|
108108
|action|Literal["create", "modify", "copy", "index"]|Action being performed|
109-
|linked_parts|list[[Part](objects.md#part)]|Parts that belong to the document|
109+
|parts|list[[Part](objects.md#part)]|Parts that belong to the document|
110110

111111

112112

@@ -127,8 +127,8 @@ Be aware that the engineering change is not released yet and the release might s
127127
|Attribute|Type|Description|
128128
|-|-|-|
129129
|engineering_changes| list[[EngineeringChange](objects.md#engineeringchange)]|List of engineering changes that will be released.|
130-
|attached_documents| list[[Document](objects.md#document)]|List of included documents.|
131-
|attached_parts| list[[Part](objects.md#part)]|List of included parts.|
130+
|documents| list[[Document](objects.md#document)]|List of included documents.|
131+
|parts| list[[Part](objects.md#part)]|List of included parts.|
132132

133133

134134
## EngineeringChangeReleasedEvent
@@ -163,7 +163,7 @@ The event is triggered before any field calculations are performed.
163163
|Attribute|Type|Description|
164164
|-|-|-|
165165
|parts| list[[Part](objects.md#part)]|List of parts that are about to be created.|
166-
|linked_documents| list[[Document](objects.md#document)]|List of documents that are referenced by the parts.|
166+
|documents| list[[Document](objects.md#document)]|List of documents that are referenced by the parts.|
167167

168168
## PartModifyCheckEvent
169169
`csfunctions.events.PartModifyCheckEvent`
@@ -182,7 +182,7 @@ The event is triggered before any field calculations are performed.
182182
|Attribute|Type|Description|
183183
|-|-|-|
184184
|parts| list[[Part](objects.md#part)]|List of parts that are about to be modified.|
185-
|linked_documents| list[[Document](objects.md#document)]|List of documents that are referenced by the parts.|
185+
|documents| list[[Document](objects.md#document)]|List of documents that are referenced by the parts.|
186186

187187
## PartReleaseCheckEvent
188188
`csfunctions.events.PartReleaseCheckEvent`
@@ -201,7 +201,7 @@ Be aware that the part is not released yet and the release might still be aborte
201201
|Attribute|Type|Description|
202202
|-|-|-|
203203
|parts| list[[Part](objects.md#part)]|List of parts that will released.|
204-
|attached_documents| list[[Document](objects.md#document)]|List of documents that belong to the released parts.|
204+
|documents| list[[Document](objects.md#document)]|List of documents that belong to the released parts.|
205205
|dialog_data|PartReleaseDialogData|Contents of the dialog.|
206206

207207
**PartReleaseCheckDialogData:**
@@ -250,7 +250,7 @@ The event expects a DataResponse containing a dictionary of field names and thei
250250
|-|-|-|
251251
|part|[Part](objects.md#part)|Current state of the part|
252252
|action|Literal["create", "modify", "copy", "index"]|Action being performed|
253-
|linked_documents| list[[Document](objects.md#document)]|List of documents that belong to the part|
253+
|documents| list[[Document](objects.md#document)]|List of documents that belong to the part|
254254

255255

256256
## WorkflowTaskTriggerEvent

0 commit comments

Comments
 (0)