diff --git a/csfunctions/events/__init__.py b/csfunctions/events/__init__.py index a7326a8..2429600 100644 --- a/csfunctions/events/__init__.py +++ b/csfunctions/events/__init__.py @@ -3,6 +3,14 @@ from pydantic import Field from .bom_item_field_calculation import BOMItemFieldCalculationData, BOMItemFieldCalculationEvent +from .change_order_release_check import ChangeOrderReleaseCheckData, ChangeOrderReleaseCheckEvent +from .change_order_released import ChangeOrderReleasedData, ChangeOrderReleasedEvent +from .change_order_status_change_check import ChangeOrderStatusChangeCheckData, ChangeOrderStatusChangeCheckEvent +from .change_order_status_changed import ChangeOrderStatusChangedData, ChangeOrderStatusChangedEvent +from .change_request_release_check import ChangeRequestReleaseCheckData, ChangeRequestReleaseCheckEvent +from .change_request_released import ChangeRequestReleasedData, ChangeRequestReleasedEvent +from .change_request_status_change_check import ChangeRequestStatusChangeCheckData, ChangeRequestStatusChangeCheckEvent +from .change_request_status_changed import ChangeRequestStatusChangedData, ChangeRequestStatusChangedEvent from .custom_operations import ( CustomOperationDocumentData, CustomOperationDocumentEvent, @@ -45,6 +53,14 @@ | EngineeringChangeReleaseCheckEvent | EngineeringChangeStatusChangedEvent | EngineeringChangeStatusChangeCheckEvent + | ChangeOrderReleasedEvent + | ChangeOrderReleaseCheckEvent + | ChangeOrderStatusChangedEvent + | ChangeOrderStatusChangeCheckEvent + | ChangeRequestReleasedEvent + | ChangeRequestReleaseCheckEvent + | ChangeRequestStatusChangedEvent + | ChangeRequestStatusChangeCheckEvent | WorkflowTaskTriggerEvent | DocumentCreateCheckEvent | DocumentModifyCheckEvent @@ -68,6 +84,14 @@ | EngineeringChangeReleaseCheckData | EngineeringChangeStatusChangedData | EngineeringChangeStatusChangeCheckData + | ChangeOrderReleasedData + | ChangeOrderReleaseCheckData + | ChangeOrderStatusChangedData + | ChangeOrderStatusChangeCheckData + | ChangeRequestReleasedData + | ChangeRequestReleaseCheckData + | ChangeRequestStatusChangedData + | ChangeRequestStatusChangeCheckData | WorkflowTaskTriggerEventData | DocumentCreateCheckData | DocumentModifyCheckData @@ -89,6 +113,16 @@ "DummyEvent", "EngineeringChangeReleasedEvent", "EngineeringChangeReleaseCheckEvent", + "EngineeringChangeStatusChangedEvent", + "EngineeringChangeStatusChangeCheckEvent", + "ChangeOrderReleasedEvent", + "ChangeOrderReleaseCheckEvent", + "ChangeOrderStatusChangedEvent", + "ChangeOrderStatusChangeCheckEvent", + "ChangeRequestReleasedEvent", + "ChangeRequestReleaseCheckEvent", + "ChangeRequestStatusChangedEvent", + "ChangeRequestStatusChangeCheckEvent", "WorkflowTaskTriggerEvent", "DocumentReleasedData", "DocumentReleaseCheckData", @@ -102,6 +136,14 @@ "EngineeringChangeReleaseCheckData", "EngineeringChangeStatusChangedData", "EngineeringChangeStatusChangeCheckData", + "ChangeOrderReleasedData", + "ChangeOrderReleaseCheckData", + "ChangeOrderStatusChangedData", + "ChangeOrderStatusChangeCheckData", + "ChangeRequestReleasedData", + "ChangeRequestReleaseCheckData", + "ChangeRequestStatusChangedData", + "ChangeRequestStatusChangeCheckData", "WorkflowTaskTriggerEventData", "DocumentReleasedDialogData", "PartReleasedDialogData", diff --git a/csfunctions/events/base.py b/csfunctions/events/base.py index 7d40a6e..2134469 100644 --- a/csfunctions/events/base.py +++ b/csfunctions/events/base.py @@ -22,6 +22,14 @@ class EventNames(str, Enum): PART_MODIFY_CHECK = "part_modify_check" ENGINEERING_CHANGE_STATUS_CHANGED = "engineering_change_status_changed" ENGINEERING_CHANGE_STATUS_CHANGE_CHECK = "engineering_change_status_change_check" + CHANGE_ORDER_RELEASED = "change_order_released" + CHANGE_ORDER_RELEASE_CHECK = "change_order_release_check" + CHANGE_ORDER_STATUS_CHANGED = "change_order_status_changed" + CHANGE_ORDER_STATUS_CHANGE_CHECK = "change_order_status_change_check" + CHANGE_REQUEST_RELEASED = "change_request_released" + CHANGE_REQUEST_RELEASE_CHECK = "change_request_release_check" + CHANGE_REQUEST_STATUS_CHANGED = "change_request_status_changed" + CHANGE_REQUEST_STATUS_CHANGE_CHECK = "change_request_status_change_check" CUSTOM_OPERATION_DOCUMENT = "custom_operation_document" CUSTOM_OPERATION_PART = "custom_operation_part" diff --git a/csfunctions/events/change_order_release_check.py b/csfunctions/events/change_order_release_check.py new file mode 100644 index 0000000..f5fce08 --- /dev/null +++ b/csfunctions/events/change_order_release_check.py @@ -0,0 +1,18 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeOrder, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeOrderReleaseCheckData(BaseModel): + documents: list[Document] = Field(..., description="List of included documents.") + parts: list[Part] = Field(..., description="List of included parts.") + change_orders: list[ChangeOrder] = Field(..., description="List of change orders that will be released.") + + +class ChangeOrderReleaseCheckEvent(BaseEvent): + name: Literal[EventNames.CHANGE_ORDER_RELEASE_CHECK] = EventNames.CHANGE_ORDER_RELEASE_CHECK + data: ChangeOrderReleaseCheckData diff --git a/csfunctions/events/change_order_released.py b/csfunctions/events/change_order_released.py new file mode 100644 index 0000000..6c74b02 --- /dev/null +++ b/csfunctions/events/change_order_released.py @@ -0,0 +1,18 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeOrder, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeOrderReleasedData(BaseModel): + documents: list[Document] = Field(..., description="List of included documents.") + parts: list[Part] = Field(..., description="List of included parts.") + change_orders: list[ChangeOrder] = Field(..., description="List of change orders that were released.") + + +class ChangeOrderReleasedEvent(BaseEvent): + name: Literal[EventNames.CHANGE_ORDER_RELEASED] = EventNames.CHANGE_ORDER_RELEASED + data: ChangeOrderReleasedData diff --git a/csfunctions/events/change_order_status_change_check.py b/csfunctions/events/change_order_status_change_check.py new file mode 100644 index 0000000..ea73770 --- /dev/null +++ b/csfunctions/events/change_order_status_change_check.py @@ -0,0 +1,19 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeOrder, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeOrderStatusChangeCheckData(BaseModel): + change_order: ChangeOrder = Field(..., description="The change order that will have its status modified") + target_status: int = Field(..., description="The target status of the change order") + documents: list[Document] = Field(..., description="List of documents attached to the change order") + parts: list[Part] = Field(..., description="List of parts attached to the change order") + + +class ChangeOrderStatusChangeCheckEvent(BaseEvent): + name: Literal[EventNames.CHANGE_ORDER_STATUS_CHANGE_CHECK] = EventNames.CHANGE_ORDER_STATUS_CHANGE_CHECK + data: ChangeOrderStatusChangeCheckData diff --git a/csfunctions/events/change_order_status_changed.py b/csfunctions/events/change_order_status_changed.py new file mode 100644 index 0000000..375ceb0 --- /dev/null +++ b/csfunctions/events/change_order_status_changed.py @@ -0,0 +1,19 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeOrder, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeOrderStatusChangedData(BaseModel): + change_order: ChangeOrder = Field(..., description="The change order that had its status modified") + prev_status: int = Field(..., description="The previous status of the change order") + documents: list[Document] = Field(..., description="List of documents attached to the change order") + parts: list[Part] = Field(..., description="List of parts attached to the change order") + + +class ChangeOrderStatusChangedEvent(BaseEvent): + name: Literal[EventNames.CHANGE_ORDER_STATUS_CHANGED] = EventNames.CHANGE_ORDER_STATUS_CHANGED + data: ChangeOrderStatusChangedData diff --git a/csfunctions/events/change_request_release_check.py b/csfunctions/events/change_request_release_check.py new file mode 100644 index 0000000..2051fbf --- /dev/null +++ b/csfunctions/events/change_request_release_check.py @@ -0,0 +1,18 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeRequest, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeRequestReleaseCheckData(BaseModel): + documents: list[Document] = Field(..., description="List of included documents.") + parts: list[Part] = Field(..., description="List of included parts.") + change_requests: list[ChangeRequest] = Field(..., description="List of change requests that will be released.") + + +class ChangeRequestReleaseCheckEvent(BaseEvent): + name: Literal[EventNames.CHANGE_REQUEST_RELEASE_CHECK] = EventNames.CHANGE_REQUEST_RELEASE_CHECK + data: ChangeRequestReleaseCheckData diff --git a/csfunctions/events/change_request_released.py b/csfunctions/events/change_request_released.py new file mode 100644 index 0000000..5662267 --- /dev/null +++ b/csfunctions/events/change_request_released.py @@ -0,0 +1,18 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeRequest, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeRequestReleasedData(BaseModel): + documents: list[Document] = Field(..., description="List of included documents.") + parts: list[Part] = Field(..., description="List of included parts.") + change_requests: list[ChangeRequest] = Field(..., description="List of change requests that were released.") + + +class ChangeRequestReleasedEvent(BaseEvent): + name: Literal[EventNames.CHANGE_REQUEST_RELEASED] = EventNames.CHANGE_REQUEST_RELEASED + data: ChangeRequestReleasedData diff --git a/csfunctions/events/change_request_status_change_check.py b/csfunctions/events/change_request_status_change_check.py new file mode 100644 index 0000000..c45ff83 --- /dev/null +++ b/csfunctions/events/change_request_status_change_check.py @@ -0,0 +1,19 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeRequest, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeRequestStatusChangeCheckData(BaseModel): + change_request: ChangeRequest = Field(..., description="The change request that will have its status modified") + target_status: int = Field(..., description="The target status of the change request") + documents: list[Document] = Field(..., description="List of documents attached to the change request") + parts: list[Part] = Field(..., description="List of parts attached to the change request") + + +class ChangeRequestStatusChangeCheckEvent(BaseEvent): + name: Literal[EventNames.CHANGE_REQUEST_STATUS_CHANGE_CHECK] = EventNames.CHANGE_REQUEST_STATUS_CHANGE_CHECK + data: ChangeRequestStatusChangeCheckData diff --git a/csfunctions/events/change_request_status_changed.py b/csfunctions/events/change_request_status_changed.py new file mode 100644 index 0000000..19e1c38 --- /dev/null +++ b/csfunctions/events/change_request_status_changed.py @@ -0,0 +1,19 @@ +from typing import Literal + +from pydantic import BaseModel, Field + +from csfunctions.objects import ChangeRequest, Document, Part + +from .base import BaseEvent, EventNames + + +class ChangeRequestStatusChangedData(BaseModel): + change_request: ChangeRequest = Field(..., description="The change request that had its status modified") + prev_status: int = Field(..., description="The previous status of the change request") + documents: list[Document] = Field(..., description="List of documents attached to the change request") + parts: list[Part] = Field(..., description="List of parts attached to the change request") + + +class ChangeRequestStatusChangedEvent(BaseEvent): + name: Literal[EventNames.CHANGE_REQUEST_STATUS_CHANGED] = EventNames.CHANGE_REQUEST_STATUS_CHANGED + data: ChangeRequestStatusChangedData diff --git a/csfunctions/events/workflow_task_trigger.py b/csfunctions/events/workflow_task_trigger.py index be66a2f..2bdf0c0 100644 --- a/csfunctions/events/workflow_task_trigger.py +++ b/csfunctions/events/workflow_task_trigger.py @@ -2,7 +2,7 @@ from pydantic import BaseModel, Field -from csfunctions.objects import Briefcase, Document, EngineeringChange, Part, Workflow +from csfunctions.objects import Briefcase, ChangeOrder, ChangeRequest, Document, EngineeringChange, Part, Workflow from .base import BaseEvent, EventNames @@ -14,6 +14,8 @@ class WorkflowTaskTriggerEventData(BaseModel): engineering_changes: list[EngineeringChange] = Field( [], description="List of engineering changes attached to the workflow." ) + change_orders: list[ChangeOrder] = Field([], description="List of change orders attached to the workflow.") + change_requests: list[ChangeRequest] = Field([], description="List of change requests attached to the workflow.") briefcases: list[Briefcase] = Field([], description="List of briefcases attached to the workflow.") diff --git a/csfunctions/objects/__init__.py b/csfunctions/objects/__init__.py index d1222de..0538009 100644 --- a/csfunctions/objects/__init__.py +++ b/csfunctions/objects/__init__.py @@ -6,7 +6,7 @@ from .briefcase import Briefcase from .classification import ObjectPropertyValue from .document import CADDocument, Document -from .engineering_change import EngineeringChange +from .engineering_change import Change, ChangeOrder, ChangeRequest, EngineeringChange from .file import File from .part import BOMItem, Material, Part from .person import Person @@ -18,6 +18,8 @@ | Part | File | EngineeringChange + | ChangeOrder + | ChangeRequest | Material | BOMItem | ObjectPropertyValue @@ -34,6 +36,9 @@ "Part", "File", "EngineeringChange", + "Change", + "ChangeOrder", + "ChangeRequest", "Material", "BOMItem", "ObjectPropertyValue", diff --git a/csfunctions/objects/base.py b/csfunctions/objects/base.py index ceb7eb1..df28f9f 100644 --- a/csfunctions/objects/base.py +++ b/csfunctions/objects/base.py @@ -14,6 +14,8 @@ class ObjectType(str, Enum): PART = "part" FILE = "file" ENGINEERING_CHANGE = "engineering_change" + CHANGE_ORDER = "change_order" + CHANGE_REQUEST = "change_request" MATERIAL = "material" BOM_ITEM = "bom_item" OBJECT_PROPERTY_VALUE = "object_property_value" diff --git a/csfunctions/objects/briefcase.py b/csfunctions/objects/briefcase.py index a9b4f83..dfe71c5 100644 --- a/csfunctions/objects/briefcase.py +++ b/csfunctions/objects/briefcase.py @@ -4,7 +4,7 @@ from .base import BaseObject, ObjectType from .document import Document -from .engineering_change import EngineeringChange +from .engineering_change import ChangeOrder, ChangeRequest, EngineeringChange from .part import Part if TYPE_CHECKING: @@ -13,7 +13,8 @@ class Briefcase(BaseObject): """ - Briefcases are used by Workflows and can contain parts, documents or engineering changes. + Briefcases are used by Workflows and can contain parts, documents, engineering changes, + change orders or change requests. """ object_type: Literal[ObjectType.BRIEFCASE] = ObjectType.BRIEFCASE @@ -25,15 +26,21 @@ class Briefcase(BaseObject): engineering_change_ids: list[str] = Field( [], description="List of engineering change IDs in this Briefcase. (cdb_ec_id)" ) + change_order_ids: list[str] = Field([], description="List of change order IDs in this Briefcase. (cs_eco_id)") + change_request_ids: list[str] = Field([], description="List of change request IDs in this Briefcase. (cs_eco_id)") parts: list[Part] = Field([], exclude=True) documents: list[Document] = Field([], exclude=True) engineering_changes: list[EngineeringChange] = Field([], exclude=True) + change_orders: list[ChangeOrder] = Field([], exclude=True) + change_requests: list[ChangeRequest] = Field([], exclude=True) def link_objects(self, data: "EventData"): parts = getattr(data, "parts", None) documents = getattr(data, "documents", None) engineering_changes = getattr(data, "engineering_changes", None) + change_orders = getattr(data, "change_orders", None) + change_requests = getattr(data, "change_requests", None) if parts and self.part_ids: self._link_parts(parts) @@ -41,6 +48,10 @@ def link_objects(self, data: "EventData"): self._link_documents(documents) if engineering_changes and self.engineering_change_ids: self._link_engineering_changes(engineering_changes) + if change_orders and self.change_order_ids: + self._link_change_orders(change_orders) + if change_requests and self.change_request_ids: + self._link_change_requests(change_requests) def _link_parts(self, parts: list["Part"]): for part in parts: @@ -59,3 +70,13 @@ def _link_engineering_changes(self, engineering_changes: list["EngineeringChange and engineering_change not in self.engineering_changes ): self.engineering_changes.append(engineering_change) + + def _link_change_orders(self, change_orders: list["ChangeOrder"]): + for change_order in change_orders: + if change_order.cs_eco_id in self.change_order_ids and change_order not in self.change_orders: + self.change_orders.append(change_order) + + def _link_change_requests(self, change_requests: list["ChangeRequest"]): + for change_request in change_requests: + if change_request.cs_eco_id in self.change_request_ids and change_request not in self.change_requests: + self.change_requests.append(change_request) diff --git a/csfunctions/objects/engineering_change.py b/csfunctions/objects/engineering_change.py index 7cdc855..59f18bc 100644 --- a/csfunctions/objects/engineering_change.py +++ b/csfunctions/objects/engineering_change.py @@ -105,3 +105,105 @@ def _link_accompanying_documents(self, accompanying_documents: list["Document"]) and document not in self.accompanying_documents ): self.accompanying_documents.append(document) + + +class Change(BaseObject): + """ + Base class for changes of the ECM module (change orders and change requests). + Use the concrete subclasses :class:`ChangeOrder` and :class:`ChangeRequest`. + """ + + cs_eco_id: str = Field(..., description="Engineering Change Order ID") + cdb_project_id: str | None = Field("", description="Project ID") + end_time_plan: datetime | None = Field(None, description="Planned end time") + status: int = Field(..., description="Status") + title: str | None = Field("", description="Title") + cdb_object_id: str | None = Field(None, description="Object ID") + change_type: str | None = Field(None, description="Change Type") + + c_department: str | None = Field("", description="Department") + cs_ecm_change_description: str | None = Field("", description="Description") + c_event: str | None = Field("", description="Event") + change_reason: str | None = Field("", description="Reason") + c_source: str | None = Field("", description="Source") + + part_ids: list[str] = Field([], description="List of part IDs, that were changed. (teilenummer@t_index)") + document_ids: list[str] = Field([], description="List of document IDs, that were changed. (z_nummer@z_index)") + + affected_part_ids: list[str] = Field( + [], description="List of part IDs, that were planned to be changed. (teilenummer@t_index)" + ) + affected_document_ids: list[str] = Field( + [], description="List of document IDs, that were planned to be changed. (z_nummer@z_index)" + ) + accompanying_document_ids: list[str] = Field( + [], description="List of document IDs, that accompany the change. (z_nummer@z_index)" + ) + + parts: list[Part] = Field([], exclude=True) + documents: list[Document] = Field([], exclude=True) + + affected_parts: list[Part] = Field([], exclude=True) + affected_documents: list[Document] = Field([], exclude=True) + + accompanying_documents: list[Document] = Field([], exclude=True) + + cdb_cpersno: str | None = Field("", description="Created by") + cdb_cdate: datetime | None = Field(None, description="Created on") + cdb_mpersno: str = Field("", description="Last Modified by") + cdb_mdate: datetime | None = Field(None, description="Last Modified on") + + def link_objects(self, data: "EventData"): + parts = getattr(data, "parts", None) + documents = getattr(data, "documents", None) + + if parts and self.part_ids: + self._link_parts(parts) + if parts and self.affected_part_ids: + self._link_affected_parts(parts) + + if documents and self.document_ids: + self._link_documents(documents) + if documents and self.affected_document_ids: + self._link_affected_documents(documents) + if documents and self.accompanying_document_ids: + self._link_accompanying_documents(documents) + + def _link_parts(self, parts: list["Part"]): + for part in parts: + if f"{part.teilenummer}@{part.t_index}" in self.part_ids and part not in self.parts: + self.parts.append(part) + + def _link_documents(self, documents: list["Document"]): + for document in documents: + if f"{document.z_nummer}@{document.z_index}" in self.document_ids and document not in self.documents: + self.documents.append(document) + + def _link_affected_parts(self, affected_parts: list["Part"]): + for part in affected_parts: + if f"{part.teilenummer}@{part.t_index}" in self.affected_part_ids and part not in self.affected_parts: + self.affected_parts.append(part) + + def _link_affected_documents(self, affected_documents: list["Document"]): + for document in affected_documents: + if ( + f"{document.z_nummer}@{document.z_index}" in self.affected_document_ids + and document not in self.affected_documents + ): + self.affected_documents.append(document) + + def _link_accompanying_documents(self, accompanying_documents: list["Document"]): + for document in accompanying_documents: + if ( + f"{document.z_nummer}@{document.z_index}" in self.accompanying_document_ids + and document not in self.accompanying_documents + ): + self.accompanying_documents.append(document) + + +class ChangeOrder(Change): + object_type: Literal[ObjectType.CHANGE_ORDER] = ObjectType.CHANGE_ORDER + + +class ChangeRequest(Change): + object_type: Literal[ObjectType.CHANGE_REQUEST] = ObjectType.CHANGE_REQUEST diff --git a/json_schemas/request.json b/json_schemas/request.json index d121c07..4be7f5e 100644 --- a/json_schemas/request.json +++ b/json_schemas/request.json @@ -1838,7 +1838,7 @@ "type": "object" }, "Briefcase": { - "description": "Briefcases are used by Workflows and can contain parts, documents or engineering changes.", + "description": "Briefcases are used by Workflows and can contain parts, documents, engineering changes,\nchange orders or change requests.", "properties": { "object_type": { "const": "briefcase", @@ -1891,35 +1891,1127 @@ "title": "Engineering Change Ids", "type": "array" }, + "change_order_ids": { + "default": [], + "description": "List of change order IDs in this Briefcase. (cs_eco_id)", + "items": { + "type": "string" + }, + "title": "Change Order Ids", + "type": "array" + }, + "change_request_ids": { + "default": [], + "description": "List of change request IDs in this Briefcase. (cs_eco_id)", + "items": { + "type": "string" + }, + "title": "Change Request Ids", + "type": "array" + }, + "parts": { + "default": [], + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + }, + "documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "engineering_changes": { + "default": [], + "items": { + "$ref": "#/$defs/EngineeringChange" + }, + "title": "Engineering Changes", + "type": "array" + }, + "change_orders": { + "default": [], + "items": { + "$ref": "#/$defs/ChangeOrder" + }, + "title": "Change Orders", + "type": "array" + }, + "change_requests": { + "default": [], + "items": { + "$ref": "#/$defs/ChangeRequest" + }, + "title": "Change Requests", + "type": "array" + } + }, + "required": [ + "cdb_object_id" + ], + "title": "Briefcase", + "type": "object" + }, + "ChangeOrder": { + "properties": { + "object_type": { + "const": "change_order", + "default": "change_order", + "title": "Object Type", + "type": "string" + }, + "cs_eco_id": { + "description": "Engineering Change Order ID", + "title": "Cs Eco Id", + "type": "string" + }, + "cdb_project_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Project ID", + "title": "Cdb Project Id" + }, + "end_time_plan": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Planned end time", + "title": "End Time Plan" + }, + "status": { + "description": "Status", + "title": "Status", + "type": "integer" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Title", + "title": "Title" + }, + "cdb_object_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Object ID", + "title": "Cdb Object Id" + }, + "change_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Change Type", + "title": "Change Type" + }, + "c_department": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Department", + "title": "C Department" + }, + "cs_ecm_change_description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Description", + "title": "Cs Ecm Change Description" + }, + "c_event": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Event", + "title": "C Event" + }, + "change_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Reason", + "title": "Change Reason" + }, + "c_source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Source", + "title": "C Source" + }, + "part_ids": { + "default": [], + "description": "List of part IDs, that were changed. (teilenummer@t_index)", + "items": { + "type": "string" + }, + "title": "Part Ids", + "type": "array" + }, + "document_ids": { + "default": [], + "description": "List of document IDs, that were changed. (z_nummer@z_index)", + "items": { + "type": "string" + }, + "title": "Document Ids", + "type": "array" + }, + "affected_part_ids": { + "default": [], + "description": "List of part IDs, that were planned to be changed. (teilenummer@t_index)", + "items": { + "type": "string" + }, + "title": "Affected Part Ids", + "type": "array" + }, + "affected_document_ids": { + "default": [], + "description": "List of document IDs, that were planned to be changed. (z_nummer@z_index)", + "items": { + "type": "string" + }, + "title": "Affected Document Ids", + "type": "array" + }, + "accompanying_document_ids": { + "default": [], + "description": "List of document IDs, that accompany the change. (z_nummer@z_index)", + "items": { + "type": "string" + }, + "title": "Accompanying Document Ids", + "type": "array" + }, + "parts": { + "default": [], + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + }, + "documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "affected_parts": { + "default": [], + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Affected Parts", + "type": "array" + }, + "affected_documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Affected Documents", + "type": "array" + }, + "accompanying_documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Accompanying Documents", + "type": "array" + }, + "cdb_cpersno": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Created by", + "title": "Cdb Cpersno" + }, + "cdb_cdate": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Created on", + "title": "Cdb Cdate" + }, + "cdb_mpersno": { + "default": "", + "description": "Last Modified by", + "title": "Cdb Mpersno", + "type": "string" + }, + "cdb_mdate": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Last Modified on", + "title": "Cdb Mdate" + } + }, + "required": [ + "cs_eco_id", + "status" + ], + "title": "ChangeOrder", + "type": "object" + }, + "ChangeOrderReleaseCheckData": { + "properties": { + "documents": { + "description": "List of included documents.", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "parts": { + "description": "List of included parts.", + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + }, + "change_orders": { + "description": "List of change orders that will be released.", + "items": { + "$ref": "#/$defs/ChangeOrder" + }, + "title": "Change Orders", + "type": "array" + } + }, + "required": [ + "documents", + "parts", + "change_orders" + ], + "title": "ChangeOrderReleaseCheckData", + "type": "object" + }, + "ChangeOrderReleaseCheckEvent": { + "properties": { + "name": { + "const": "change_order_release_check", + "default": "change_order_release_check", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeOrderReleaseCheckData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeOrderReleaseCheckEvent", + "type": "object" + }, + "ChangeOrderReleasedData": { + "properties": { + "documents": { + "description": "List of included documents.", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "parts": { + "description": "List of included parts.", + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + }, + "change_orders": { + "description": "List of change orders that were released.", + "items": { + "$ref": "#/$defs/ChangeOrder" + }, + "title": "Change Orders", + "type": "array" + } + }, + "required": [ + "documents", + "parts", + "change_orders" + ], + "title": "ChangeOrderReleasedData", + "type": "object" + }, + "ChangeOrderReleasedEvent": { + "properties": { + "name": { + "const": "change_order_released", + "default": "change_order_released", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeOrderReleasedData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeOrderReleasedEvent", + "type": "object" + }, + "ChangeOrderStatusChangeCheckData": { + "properties": { + "change_order": { + "$ref": "#/$defs/ChangeOrder", + "description": "The change order that will have its status modified" + }, + "target_status": { + "description": "The target status of the change order", + "title": "Target Status", + "type": "integer" + }, + "documents": { + "description": "List of documents attached to the change order", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "parts": { + "description": "List of parts attached to the change order", + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + } + }, + "required": [ + "change_order", + "target_status", + "documents", + "parts" + ], + "title": "ChangeOrderStatusChangeCheckData", + "type": "object" + }, + "ChangeOrderStatusChangeCheckEvent": { + "properties": { + "name": { + "const": "change_order_status_change_check", + "default": "change_order_status_change_check", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeOrderStatusChangeCheckData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeOrderStatusChangeCheckEvent", + "type": "object" + }, + "ChangeOrderStatusChangedData": { + "properties": { + "change_order": { + "$ref": "#/$defs/ChangeOrder", + "description": "The change order that had its status modified" + }, + "prev_status": { + "description": "The previous status of the change order", + "title": "Prev Status", + "type": "integer" + }, + "documents": { + "description": "List of documents attached to the change order", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "parts": { + "description": "List of parts attached to the change order", + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + } + }, + "required": [ + "change_order", + "prev_status", + "documents", + "parts" + ], + "title": "ChangeOrderStatusChangedData", + "type": "object" + }, + "ChangeOrderStatusChangedEvent": { + "properties": { + "name": { + "const": "change_order_status_changed", + "default": "change_order_status_changed", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeOrderStatusChangedData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeOrderStatusChangedEvent", + "type": "object" + }, + "ChangeRequest": { + "properties": { + "object_type": { + "const": "change_request", + "default": "change_request", + "title": "Object Type", + "type": "string" + }, + "cs_eco_id": { + "description": "Engineering Change Order ID", + "title": "Cs Eco Id", + "type": "string" + }, + "cdb_project_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Project ID", + "title": "Cdb Project Id" + }, + "end_time_plan": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Planned end time", + "title": "End Time Plan" + }, + "status": { + "description": "Status", + "title": "Status", + "type": "integer" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Title", + "title": "Title" + }, + "cdb_object_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Object ID", + "title": "Cdb Object Id" + }, + "change_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Change Type", + "title": "Change Type" + }, + "c_department": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Department", + "title": "C Department" + }, + "cs_ecm_change_description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Description", + "title": "Cs Ecm Change Description" + }, + "c_event": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Event", + "title": "C Event" + }, + "change_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Reason", + "title": "Change Reason" + }, + "c_source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Source", + "title": "C Source" + }, + "part_ids": { + "default": [], + "description": "List of part IDs, that were changed. (teilenummer@t_index)", + "items": { + "type": "string" + }, + "title": "Part Ids", + "type": "array" + }, + "document_ids": { + "default": [], + "description": "List of document IDs, that were changed. (z_nummer@z_index)", + "items": { + "type": "string" + }, + "title": "Document Ids", + "type": "array" + }, + "affected_part_ids": { + "default": [], + "description": "List of part IDs, that were planned to be changed. (teilenummer@t_index)", + "items": { + "type": "string" + }, + "title": "Affected Part Ids", + "type": "array" + }, + "affected_document_ids": { + "default": [], + "description": "List of document IDs, that were planned to be changed. (z_nummer@z_index)", + "items": { + "type": "string" + }, + "title": "Affected Document Ids", + "type": "array" + }, + "accompanying_document_ids": { + "default": [], + "description": "List of document IDs, that accompany the change. (z_nummer@z_index)", + "items": { + "type": "string" + }, + "title": "Accompanying Document Ids", + "type": "array" + }, + "parts": { + "default": [], + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + }, + "documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "affected_parts": { + "default": [], + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Affected Parts", + "type": "array" + }, + "affected_documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Affected Documents", + "type": "array" + }, + "accompanying_documents": { + "default": [], + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Accompanying Documents", + "type": "array" + }, + "cdb_cpersno": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": "", + "description": "Created by", + "title": "Cdb Cpersno" + }, + "cdb_cdate": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Created on", + "title": "Cdb Cdate" + }, + "cdb_mpersno": { + "default": "", + "description": "Last Modified by", + "title": "Cdb Mpersno", + "type": "string" + }, + "cdb_mdate": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Last Modified on", + "title": "Cdb Mdate" + } + }, + "required": [ + "cs_eco_id", + "status" + ], + "title": "ChangeRequest", + "type": "object" + }, + "ChangeRequestReleaseCheckData": { + "properties": { + "documents": { + "description": "List of included documents.", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, "parts": { - "default": [], + "description": "List of included parts.", "items": { "$ref": "#/$defs/Part" }, "title": "Parts", "type": "array" }, + "change_requests": { + "description": "List of change requests that will be released.", + "items": { + "$ref": "#/$defs/ChangeRequest" + }, + "title": "Change Requests", + "type": "array" + } + }, + "required": [ + "documents", + "parts", + "change_requests" + ], + "title": "ChangeRequestReleaseCheckData", + "type": "object" + }, + "ChangeRequestReleaseCheckEvent": { + "properties": { + "name": { + "const": "change_request_release_check", + "default": "change_request_release_check", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeRequestReleaseCheckData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeRequestReleaseCheckEvent", + "type": "object" + }, + "ChangeRequestReleasedData": { + "properties": { "documents": { - "default": [], + "description": "List of included documents.", "items": { "$ref": "#/$defs/Document" }, "title": "Documents", "type": "array" }, - "engineering_changes": { - "default": [], + "parts": { + "description": "List of included parts.", "items": { - "$ref": "#/$defs/EngineeringChange" + "$ref": "#/$defs/Part" }, - "title": "Engineering Changes", + "title": "Parts", + "type": "array" + }, + "change_requests": { + "description": "List of change requests that were released.", + "items": { + "$ref": "#/$defs/ChangeRequest" + }, + "title": "Change Requests", "type": "array" } }, "required": [ - "cdb_object_id" + "documents", + "parts", + "change_requests" ], - "title": "Briefcase", + "title": "ChangeRequestReleasedData", + "type": "object" + }, + "ChangeRequestReleasedEvent": { + "properties": { + "name": { + "const": "change_request_released", + "default": "change_request_released", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeRequestReleasedData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeRequestReleasedEvent", + "type": "object" + }, + "ChangeRequestStatusChangeCheckData": { + "properties": { + "change_request": { + "$ref": "#/$defs/ChangeRequest", + "description": "The change request that will have its status modified" + }, + "target_status": { + "description": "The target status of the change request", + "title": "Target Status", + "type": "integer" + }, + "documents": { + "description": "List of documents attached to the change request", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "parts": { + "description": "List of parts attached to the change request", + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + } + }, + "required": [ + "change_request", + "target_status", + "documents", + "parts" + ], + "title": "ChangeRequestStatusChangeCheckData", + "type": "object" + }, + "ChangeRequestStatusChangeCheckEvent": { + "properties": { + "name": { + "const": "change_request_status_change_check", + "default": "change_request_status_change_check", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeRequestStatusChangeCheckData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeRequestStatusChangeCheckEvent", + "type": "object" + }, + "ChangeRequestStatusChangedData": { + "properties": { + "change_request": { + "$ref": "#/$defs/ChangeRequest", + "description": "The change request that had its status modified" + }, + "prev_status": { + "description": "The previous status of the change request", + "title": "Prev Status", + "type": "integer" + }, + "documents": { + "description": "List of documents attached to the change request", + "items": { + "$ref": "#/$defs/Document" + }, + "title": "Documents", + "type": "array" + }, + "parts": { + "description": "List of parts attached to the change request", + "items": { + "$ref": "#/$defs/Part" + }, + "title": "Parts", + "type": "array" + } + }, + "required": [ + "change_request", + "prev_status", + "documents", + "parts" + ], + "title": "ChangeRequestStatusChangedData", + "type": "object" + }, + "ChangeRequestStatusChangedEvent": { + "properties": { + "name": { + "const": "change_request_status_changed", + "default": "change_request_status_changed", + "title": "Name", + "type": "string" + }, + "event_id": { + "description": "unique identifier", + "title": "Event Id", + "type": "string" + }, + "data": { + "$ref": "#/$defs/ChangeRequestStatusChangedData" + } + }, + "required": [ + "event_id", + "data" + ], + "title": "ChangeRequestStatusChangedEvent", "type": "object" }, "CustomOperationDocumentData": { @@ -9897,6 +10989,24 @@ "title": "Engineering Changes", "type": "array" }, + "change_orders": { + "default": [], + "description": "List of change orders attached to the workflow.", + "items": { + "$ref": "#/$defs/ChangeOrder" + }, + "title": "Change Orders", + "type": "array" + }, + "change_requests": { + "default": [], + "description": "List of change requests attached to the workflow.", + "items": { + "$ref": "#/$defs/ChangeRequest" + }, + "title": "Change Requests", + "type": "array" + }, "briefcases": { "default": [], "description": "List of briefcases attached to the workflow.", @@ -9923,6 +11033,14 @@ "discriminator": { "mapping": { "bom_item_field_calculation": "#/$defs/BOMItemFieldCalculationEvent", + "change_order_release_check": "#/$defs/ChangeOrderReleaseCheckEvent", + "change_order_released": "#/$defs/ChangeOrderReleasedEvent", + "change_order_status_change_check": "#/$defs/ChangeOrderStatusChangeCheckEvent", + "change_order_status_changed": "#/$defs/ChangeOrderStatusChangedEvent", + "change_request_release_check": "#/$defs/ChangeRequestReleaseCheckEvent", + "change_request_released": "#/$defs/ChangeRequestReleasedEvent", + "change_request_status_change_check": "#/$defs/ChangeRequestStatusChangeCheckEvent", + "change_request_status_changed": "#/$defs/ChangeRequestStatusChangedEvent", "custom_operation_document": "#/$defs/CustomOperationDocumentEvent", "custom_operation_part": "#/$defs/CustomOperationPartEvent", "document_create_check": "#/$defs/DocumentCreateCheckEvent", @@ -9985,6 +11103,30 @@ { "$ref": "#/$defs/EngineeringChangeStatusChangeCheckEvent" }, + { + "$ref": "#/$defs/ChangeOrderReleasedEvent" + }, + { + "$ref": "#/$defs/ChangeOrderReleaseCheckEvent" + }, + { + "$ref": "#/$defs/ChangeOrderStatusChangedEvent" + }, + { + "$ref": "#/$defs/ChangeOrderStatusChangeCheckEvent" + }, + { + "$ref": "#/$defs/ChangeRequestReleasedEvent" + }, + { + "$ref": "#/$defs/ChangeRequestReleaseCheckEvent" + }, + { + "$ref": "#/$defs/ChangeRequestStatusChangedEvent" + }, + { + "$ref": "#/$defs/ChangeRequestStatusChangeCheckEvent" + }, { "$ref": "#/$defs/WorkflowTaskTriggerEvent" },