Reference
Contracts reference
All 270 frozen dataclasses in core/contracts.py, grouped by section, with the modules that produce each contract and the modules that handle it.
Contents
This page lists every contract in src/cluster_erp/core/contracts.py: the frozen dataclasses that modules exchange through the EventBus. For each contract it gives the kind, the line, the modules that construct it, and the modules that handle it. How the bus delivers contracts is explained on event bus ; field lists are in the source file.
Scope and source
Defined in: src/cluster_erp/core/contracts.py
Count: 270 classes decorated with @dataclass(frozen=True (counted with grep -c "@dataclass(frozen=True"). Of these, 149 derive from Event (145 directly and 4 through _SubscriptionEvent), 118 derive from Query, and 3 are plain value types used inside DescribeAnalyticsFacts answers.
153 contracts have at least one handler. 117 have none. 38 have no producer found.
The columns were produced as follows:
Kind : the base class on the class line.
Line : the line of the class statement in src/cluster_erp/core/contracts.py.
Producers : the modules whose files contain a call Name( (a construction) in src/cluster_erp/modules, src/cluster_erp/server, src/cluster_erp/core, or src/cluster_erp/ai, excluding contracts.py. core and server name those folders. "(by name)" marks the subscription events, which src/cluster_erp/modules/subscriptions/customer_subscriptions/services.py:423-429 builds through getattr on the contracts module.
Consumers : the modules that pass the contract as the first argument of subscribe( or register_query_handler(, on the same line or the next line.
- means that nothing was found by that method.
Groups follow the section comments of contracts.py. A group name is the section where the class is declared, not necessarily the module that publishes it; the Producers column shows the real producer.
Party domain
Contract
Kind
Line
Producers
Consumers
PartyCreated
Event
24
parties
-
PartyUpdated
Event
31
parties
crm, procurement
PartyDeleted
Event
43
parties
crm, owned_organisations, procurement
PartyRoleSet
Event
48
crm, owned_organisations, procurement
parties
GetPartyById
Query
59
crm, fleet, intranet, inventory, procurement, products_and_services, purchasing_quotations, sales_orders
parties
GetAddressById
Query
64
procurement, sales_orders
parties
SearchParties
Query
73
intranet
parties
CountPartyChannels
Query
81
crm
parties
Organisation domain
Contract
Kind
Line
Producers
Consumers
OrganisationCreated
Event
95
owned_organisations
-
OrganisationUpdated
Event
102
owned_organisations
-
EmployeeAdded
Event
108
owned_organisations
-
GetOrganisationById
Query
115
production
owned_organisations
GetCompanyDefaultTimezone
Query
120
intranet, production
owned_organisations
EnsurePartyForOrganisation
Query
135
owned_organisations
parties
Product and service domain
Contract
Kind
Line
Producers
Consumers
ProductCreated
Event
149
products_and_services
-
ProductUpdated
Event
157
products_and_services
procurement
ProductStatusChanged
Event
163
products_and_services
-
ProductDeleted
Event
170
products_and_services
bom
RecordActivated
Event
177
records
owned_organisations, products_and_services
ServiceCreated
Event
191
products_and_services
-
GetProductById
Query
197
bom, inventory, nesting, procurement, production, products_and_services, sales_orders
products_and_services
CreateScaffoldIntermediate
Query
202
production
products_and_services
ValidateProductBreakdown
Query
219
core
products_and_services
GetProductDefaultBreakdown
Query
230
bom, procurement, production
products_and_services
GetBulkProductDefaultBreakdowns
Query
240
bom, procurement
products_and_services
IsProductManufacturable
Query
248
production
products_and_services
IsProductPurchasable
Query
253
-
products_and_services
IsProductSellable
Query
258
-
products_and_services
GetProductsByMaterialType
Query
263
-
products_and_services
Auth domain
Contract
Kind
Line
Producers
Consumers
ApprovalCompleted
Event
275
auth
documents
GetUserById
Query
283
-
auth
GetUserPermissions
Query
288
-
auth
GetApprovalChainForAction
Query
293
documents, intranet
auth
SubmitForApproval
Query
299
documents, intranet
auth
GetApprovalRequestById
Query
307
documents
auth
Document domain
Contract
Kind
Line
Producers
Consumers
DocumentCreated
Event
317
documents
-
DocumentVersionActivated
Event
322
documents
-
DocumentVersionSuperseded
Event
329
documents
-
ResolveDocumentVersionFile
Query
336
intranet
documents
Email domain
Contract
Kind
Line
Producers
Consumers
ResolveEntityEmails
Event
352
intranet, server
parties
CRM domain
Contract
Kind
Line
Producers
Consumers
CustomerCreated
Event
364
crm
parties
CustomerUpdated
Event
370
crm
-
GetCustomerById
Query
376
quotations, sales_orders
crm
RfqUpdated
Event
381
crm
-
RfqReceived
Event
387
crm
-
RfqAssigned
Event
394
crm
-
RfqPackageCompleted
Event
400
crm
-
RfqDeclined
Event
412
crm, quotations
-
RfqExpired
Event
418
crm
-
RfqWon
Event
423
crm
-
RfqLost
Event
428
crm
-
RfqReopened
Event
433
-
-
GetRfqById
Query
438
quotations, sales_orders
crm
GetRfqIdsByCustomer
Query
443
quotations
crm
GetCustomerPartById
Query
448
sales_orders
crm
GetCustomerPartsByCustomer
Query
453
-
crm
Quotation domain
Contract
Kind
Line
Producers
Consumers
QuoteCreated
Event
464
quotations
-
QuoteFeasibilityCompleted
Event
471
quotations
-
QuoteBomAttached
Event
476
quotations
-
QuoteCostingCompleted
Event
482
costing, quotations
-
QuoteMgmtApprovalRecorded
Event
488
quotations
-
QuoteSent
Event
494
quotations
-
QuoteWon
Event
500
quotations
-
QuoteLost
Event
506
quotations
-
QuoteExpired
Event
512
quotations
-
QuoteFeasibilityFailed
Event
517
quotations
-
QuoteReturnedToBom
Event
523
-
-
QuoteMgmtRejected
Event
528
-
-
QuoteRevised
Event
534
-
-
GetQuoteById
Query
541
sales_orders
quotations
GetQuoteLineItems
Query
546
sales_orders
quotations
ReferenceQuoteLines
Query
554
sales_orders
quotations
ReleaseQuoteLineReferences
Query
570
sales_orders
quotations
GetPurchasingQuotationById
Query
580
-
purchasing_quotations
CreateFollowOnFromSupplierQuotation
Query
585
purchasing_quotations
procurement
SupplierQuotationAwarded
Event
607
purchasing_quotations
procurement
GetInfoRecordPrice
Query
619
-
-
GetPurchaseRfqQuotations
Query
628
purchasing_quotations
procurement
Sales order domain
Contract
Kind
Line
Producers
Consumers
SalesOrderPoReceived
Event
644
sales_orders
projects
SalesOrderMismatchDetected
Event
650
sales_orders
-
SalesOrderRevisionRequested
Event
656
sales_orders
-
SalesOrderMatched
Event
661
sales_orders
-
SalesOrderOpened
Event
666
sales_orders
procurement
SalesOrderCancelled
Event
675
sales_orders
-
SalesOrderShipped
Event
681
sales_orders
-
SalesOrderDelivered
Event
686
sales_orders
-
SalesOrderClosed
Event
691
sales_orders
-
SalesOrderRevisionLimitReached
Event
696
-
-
SalesOrderOnHold
Event
702
-
-
SalesOrderResumed
Event
708
-
-
SalesOrderPartiallyShipped
Event
713
sales_orders
-
GetSalesOrderById
Query
719
nesting, projects
sales_orders
Project domain
Contract
Kind
Line
Producers
Consumers
ProjectCreated
Event
729
projects
sales_orders
ProjectKickoffCompleted
Event
737
projects
-
ProjectActionCreated
Event
742
projects
-
ProjectActionOverdue
Event
750
-
-
ProjectSchedulePublished
Event
757
projects
production
ProjectActivityChanged
Event
764
projects
-
ProjectScheduleShared
Event
776
projects
-
ProjectFixtureRequired
Event
782
projects
-
ProjectClosed
Event
791
projects
-
ProjectStatusChanged
Event
796
projects
-
GetProjectById
Query
803
sales_orders
projects
GetProjectMemberPartyIds
Query
808
intranet
projects
IsKickoffCompleted
Query
818
-
projects
Design and engineering domain
Contract
Kind
Line
Producers
Consumers
DesignCreated
Event
828
design_engineering
-
DesignApproved
Event
836
design_engineering
bom
DesignSuperseded
Event
844
design_engineering
-
EcnProposed
Event
851
design_engineering
-
EcnApproved
Event
859
design_engineering
-
EcnImplemented
Event
866
design_engineering
-
GetDesignById
Query
874
bom
design_engineering
IsDesignApproved
Query
879
-
design_engineering
BOM domain
Contract
Kind
Line
Producers
Consumers
BomDraftCreated
Event
889
bom
-
BomActivated
Event
897
bom
costing, procurement
BomVersionActivated
Event
904
bom
production
BomSuperseded
Event
921
bom
-
BomLaborUpdated
Event
928
-
-
BomItemAdded
Event
934
-
procurement
BomItemChanged
Event
941
bom
procurement
GetBomById
Query
947
production, sales_orders
bom
IsBomActive
Query
952
-
bom
Inventory domain
Contract
Kind
Line
Producers
Consumers
GoodsReceived
Event
962
inventory
procurement
GoodsIssued
Event
985
inventory
procurement
StockTransferred
Event
997
inventory
procurement
StockAdjusted
Event
1006
inventory
procurement
BatchCreated
Event
1016
inventory
-
GoodsMovementReversed
Event
1023
inventory
procurement
StockReserved
Event
1040
inventory
-
StockReservationConsumed
Event
1050
inventory
-
StockReservationCancelled
Event
1055
inventory
-
GetStockLevel
Query
1060
procurement
inventory
GrBlockedReceived
Event
1072
inventory
-
GrBlockedReleased
Event
1082
-
-
StockCategoryTransferred
Event
1090
inventory
procurement
ReturnedToVendor
Event
1100
inventory
-
ScrapPosted
Event
1110
inventory
-
UsageDecisionRecorded
Event
1119
inventory
-
GetBatchesByProduct
Query
1131
-
inventory
IsStockAvailable
Query
1137
-
inventory
GetBomVersionsUpdatedAt
Query
1149
procurement
bom
GetBomExplosion
Query
1158
costing, procurement, production
bom
GetBomMaterials
Query
1163
crm
bom
GetBomItemDisplay
Query
1171
production
bom
GetBomVersionDisplay
Query
1176
production
bom
ReserveStock
Query
1181
nesting
inventory
ConsumeReservation
Query
1195
nesting
inventory
CancelReservation
Query
1200
-
inventory
PostGoodsReceipt
Query
1205
nesting, procurement, production
inventory
PostGoodsIssue
Query
1227
fleet, nesting, production
inventory
Production domain
Contract
Kind
Line
Producers
Consumers
ProductionOrderCreated
Event
1251
production
procurement
ProductionOrderStatusChanged
Event
1259
production
-
GetProjectProductionSchedule
Query
1266
projects
production
GetProjectSalesDelivery
Query
1278
projects
sales_orders
GetProjectProductionEvm
Query
1286
projects
production
GetProjectProductionRollup
Query
1298
projects
production
GetPlannedOrdersForCapacity
Query
1309
production
procurement
CreateProductionOrderFromPlanned
Query
1319
procurement
production
CreateBomForProduct
Query
1334
sales_orders
bom
CreateProductionOrderForProject
Query
1356
projects
production
WorkOrderCompleted
Event
1375
production
-
ProductionOrderCompleted
Event
1386
production
procurement
ProductionOrderCancelled
Event
1393
production
-
ProductionOrderOnHold
Event
1399
production
-
MaterialConsumed
Event
1405
production
-
GetProductionOrderById
Query
1413
nesting
production
GetRoutingForProduct
Query
1418
production
production
Nesting domain
Contract
Kind
Line
Producers
Consumers
NestingCompleted
Event
1428
nesting
-
NestingApproved
Event
1437
nesting
-
NestingLowUtilizationAlert
Event
1443
-
-
GetNestingJobById
Query
1450
costing
nesting
NestingRemnantCreated
Event
1455
nesting
-
NestingRemnantConsumed
Event
1463
nesting
-
NestingRemnantScrapped
Event
1469
nesting
-
GetAvailableRemnants
Query
1475
-
nesting
NestingMaterialReserved
Event
1483
nesting
-
NestingMaterialConsumed
Event
1491
nesting
-
NestingScrapRecorded
Event
1498
nesting
-
NestingCostCalculated
Event
1506
nesting
costing
Costing domain
Contract
Kind
Line
Producers
Consumers
CostingCreated
Event
1520
costing
-
CostingCalculated
Event
1529
costing
-
CostingApproved
Event
1540
costing
-
CostingRejected
Event
1551
costing
-
CostingSuperseded
Event
1559
costing
-
LowMarginAlert
Event
1566
costing
-
CostingRateUpdated
Event
1576
costing
-
GetCostingById
Query
1585
quotations
costing
GetCostingByBomId
Query
1590
-
costing
GetActiveLaborRate
Query
1596
-
costing
GetActiveOverheadRates
Query
1603
-
costing
GetCostBreakdown
Query
1608
-
costing
Component allocation
Contract
Kind
Line
Producers
Consumers
GetComponentAllocations
Query
1618
bom
production
Procurement domain
Contract
Kind
Line
Producers
Consumers
PrCreated
Event
1629
procurement
-
PrApproved
Event
1636
procurement
-
PrCancelled
Event
1643
procurement
-
PoCreated
Event
1650
procurement
-
PoSent
Event
1658
procurement
-
PoAcknowledged
Event
1665
procurement
-
PoReceivedPartial
Event
1671
procurement
-
PoReceivedFull
Event
1680
procurement
-
PoDelayed
Event
1686
-
-
PoCancelled
Event
1694
procurement
-
MrpRunCompleted
Event
1701
procurement
-
MrpRunFailed
Event
1710
procurement
-
CriticalMaterialAlert
Event
1717
procurement
-
GetPurchaseOrderById
Query
1725
-
procurement
GetPurchaseRequestById
Query
1730
fleet
procurement
GetOpenPosForProduct
Query
1735
procurement
procurement
ReconcilePoReceiptReversal
Query
1740
inventory
procurement
GetOpenPoLinesForReceipt
Query
1755
procurement
procurement
GetCriticalMaterials
Query
1766
procurement
procurement
GetSubstitutesForProduct
Query
1771
procurement
procurement
GetProductVendors
Query
1776
-
products_and_services
GetProductPlanningData
Query
1781
bom, procurement
products_and_services
GetOpenSalesOrderDemand
Query
1788
procurement
sales_orders
GetOpenProductionDemand
Query
1795
procurement
production
GetProductionSupply
Query
1802
procurement
production
GetActiveBomVersionForProduct
Query
1809
bom, procurement, production
bom
GetActiveBomItemsForProduct
Query
1816
procurement
bom
GetBomScaffoldTree
Query
1825
production
bom
GetWarehouseById
Query
1868
procurement
inventory
GetBulkStockLevels
Query
1877
bom, procurement
inventory
GetConsumptionHistory
Query
1885
procurement
inventory
SetProductPlanningClassification
Query
1898
procurement
products_and_services
ApplyProductBufferZones
Query
1907
procurement
products_and_services
GetBatchExpirySchedule
Query
1917
procurement
inventory
GetProductionVersionsBulk
Query
1927
procurement
production
CheckProductionCapacity
Query
1940
procurement
production
GetPartUsageCounts
Query
1952
procurement, products_and_services
bom
GetBulkOpenPos
Query
1961
bom, procurement
procurement
GetBulkProductVendors
Query
1968
procurement
products_and_services
Working calendar domain
Contract
Kind
Line
Producers
Consumers
GetCalendarWindows
Query
1980
production
calendars
GetEffectiveWorkingCalendar
Query
1991
production
calendars
GetEffectiveWorkingCalendars
Query
2002
production
calendars
WorkingCalendarChanged
Event
2013
calendars
production
GetOwnerWorkingDays
Query
2026
intranet, procurement, projects, sales_orders
calendars
Analytics domain
Contract
Kind
Line
Producers
Consumers
DescribeAnalyticsFacts
Event
2060
analytics
fleet, inventory, parties, procurement, production, products_and_services, purchasing_quotations, quotations, sales_orders
AnalyticsDimension
value type
2076
analytics, fleet, inventory, parties, procurement, production, products_and_services, purchasing_quotations, quotations, sales_orders
-
AnalyticsMeasure
value type
2101
fleet, inventory, parties, procurement, production, products_and_services, purchasing_quotations, quotations, sales_orders
-
AnalyticsFactSet
value type
2126
fleet, inventory, parties, procurement, production, products_and_services, purchasing_quotations, quotations, sales_orders
-
Intranet domain
Contract
Kind
Line
Producers
Consumers
SendTransactionalEmail
Event
2163
intranet
mail
RetentionSweep
Event
2180
server
intranet
IntranetEventPublished
Event
2212
intranet
-
IntranetEventUpdated
Event
2229
intranet
-
IntranetEventCancelled
Event
2241
intranet
-
IntranetPostPublished
Event
2250
intranet
-
GetUpcomingIntranetEvents
Query
2262
-
intranet
GetPartyForEmployee
Query
2274
intranet, projects
owned_organisations
ListDirectoryEmployees
Query
2284
intranet
owned_organisations
GetTeamPartyIds
Query
2296
intranet
owned_organisations
Subscriptions
Contract
Kind
Line
Producers
Consumers
_SubscriptionEvent
Event
2318
-
-
SubscriptionActivated
Event (_SubscriptionEvent)
2335
subscriptions (by name)
-
SubscriptionRenewed
Event (_SubscriptionEvent)
2340
subscriptions (by name)
-
SubscriptionCancelled
Event (_SubscriptionEvent)
2345
subscriptions (by name)
-
SubscriptionExpired
Event (_SubscriptionEvent)
2350
subscriptions (by name)
-
GetSubscriptionPlanById
Query
2355
-
subscriptions
GetCustomerSubscriptionById
Query
2360
-
subscriptions
GetDocumentsForEntity
Query
2365
intranet
documents
Data-subject requests
Contract
Kind
Line
Producers
Consumers
CollectSubjectData
Event
2385
privacy
auth, crm, documents, intranet, logs, mail, owned_organisations, parties, procurement
GetPartyContactValues
Query
2402
privacy
parties
AnonymiseSubject
Event
2411
privacy
auth, crm, documents, intranet, logs, mail, owned_organisations, parties, procurement, server
The contracts below follow the data-subject section in the file and carry no section comment of their own.
Contract
Kind
Line
Producers
Consumers
DescribeDisplaySwitches
Event
2441
server
sales_orders
TenantFieldValuesChanged
Event
2452
core
-
DescribeFieldConsumers
Event
2470
server
bom, intranet, inventory, procurement, production, quotations, sales_orders
ConvertQuantity
Query
2484
sales_orders
products_and_services
GetUnitOfMeasure
Query
2496
sales_orders
products_and_services
GetPartyPrimaryAddress
Query
2503
sales_orders
parties
GetHeadquartersOrganisation
Query
2513
sales_orders
owned_organisations
FindUnitOfMeasure
Query
2520
sales_orders
products_and_services
GetCountryByCode
Query
2529
sales_orders
parties
Constraints and validation
Every contract is a frozen dataclass. Event and Query are declared frozen=True, kw_only=True, so every field is passed by keyword (src/cluster_erp/core/event_bus.py:24-32).
Every contract carries source_module and timestamp from Event (src/cluster_erp/core/event_bus.py:25-27).
A query type may have only one handler; registering a second raises DuplicateQueryHandlerError (src/cluster_erp/core/event_bus.py:73-79).
GetInfoRecordPrice is a query with no producer and no handler found (src/cluster_erp/core/contracts.py:619). Calling bus.query with it would raise QueryHandlerNotFoundError (src/cluster_erp/core/event_bus.py:98-101).
Contracts with no handler are delivered to nobody when emitted (src/cluster_erp/core/event_bus.py:85-87). Whether each of the 117 is reserved for future use is not determined from code.
Terms introduced
Term
Code identifier
Definition
Turkish term
Source
contract
core/contracts.py dataclass
A frozen dataclass that defines the payload of an event or query exchanged between modules.
sözleşme
src/cluster_erp/core/contracts.py:1-6
producer
none
A module that constructs a contract and passes it to emit or query.
üretici
src/cluster_erp/core/event_bus.py:83
consumer
none
A module that registers a handler for a contract.
tüketici
src/cluster_erp/core/event_bus.py:55
Related pages
Verified against commit 92f8051 on 2026-11-13.