Skip to main content

luna.common.types

LunaBaseModel Objects

class LunaBaseModel(BaseModel)

Base model class for Pydantic in Luna, providing a standard structure for all models.

Error Objects

class Error(BaseModel)

Model class for representing error messages, providing a standardized way to communicate errors.

AuditEventType Objects

@enum.unique
class AuditEventType(str, enum.Enum)

Enumeration of various audit event types, such as clause evaluation or event emission.

AuditEntry Objects

class AuditEntry(LunaBaseModel)

Model class for audit log entries, capturing event details like type, context, and timestamp.

RuntimeStateVariableData Objects

class RuntimeStateVariableData(LunaBaseModel)

Represents a runtime state variable's data, including its value and associated timestamp.

RuntimeStateEvaluatedClauseData Objects

class RuntimeStateEvaluatedClauseData(LunaBaseModel)

Represents the data of an evaluated clause in runtime state, including output and value datetime.

EventDataData Objects

class EventDataData(LunaBaseModel)

Represents event data, including event name and payload.

payload_str

str version of the payload for displaying to the user

publish_at

the date the event should be published at

EventStateData Objects

class EventStateData(LunaBaseModel)

Represents the state of an event, including executed by clause details.

EventInstanceData Objects

class EventInstanceData(LunaBaseModel)

Represents an instance of an event, including its unique identifier, data, state, and value datetime.

RuntimeStateData Objects

class RuntimeStateData(LunaBaseModel)

Class representing the data diff a contract generated during runtime.

InitialStateData Objects

class InitialStateData(LunaBaseModel)

Represents the first state data of a new contract with the initial parameters.

StateInfo Objects

class StateInfo(LunaBaseModel)

Snapshot of the state for displaying purposes. Represents a snapshot overview of the state at a given time. This object only contains bounded fields.

ValidationError Objects

class ValidationError(LunaBaseModel)

Model class for validation errors.

field

If the error pertains to a specific field

ParameterInfo Objects

class ParameterInfo(LunaBaseModel)

Information model for contract parameters.

RoleInfo Objects

class RoleInfo(LunaBaseModel)

Information model for contract roles.

VariableInfo Objects

class VariableInfo(LunaBaseModel)

Information model for contract variables.

ConnectionInfo Objects

class ConnectionInfo(LunaBaseModel)

Information model for contract connections.

ConstantInfo Objects

class ConstantInfo(LunaBaseModel)

Information model for contract constants.

ClauseConfigInfo Objects

class ClauseConfigInfo(LunaBaseModel)

Configuration info for contract clauses.

ClauseInfo Objects

class ClauseInfo(LunaBaseModel)

Information model for contract clauses. Contains details about the clause's configuration, including its name, initialization status, description, occurrence limits, event triggers, and arguments.

LinkedTemplateInfo Objects

class LinkedTemplateInfo(LunaBaseModel)

Provides summary information for linked templates. Includes the name of the link, the template's unique identifier, and other relevant details.

EventInfo Objects

class EventInfo(LunaBaseModel)

Information model for events. Captures the event's name, payload details, and a list of clauses that use this event.

SecretInfo Objects

class SecretInfo(LunaBaseModel)

Model for contract secrets. Contains the name of the secret, used for accessing sensitive data within a contract.

ParticipantDetailInfo Objects

class ParticipantDetailInfo(LunaBaseModel)

Model for participant details info

TemplateInfo Objects

class TemplateInfo(LunaBaseModel)

Comprehensive information model for contract templates. Includes details about the template's class name, linked templates, parameters, roles, variables, clauses, events, and secrets.

FileTreeFile Objects

class FileTreeFile(LunaBaseModel)

A File in a FileTree

LinkedContractSummary Objects

class LinkedContractSummary(LunaBaseModel)

Summary view of a contract with basic info. Includes the contract's identifier, template name, template ID, link name, and status.

ContractOutput Objects

class ContractOutput(LunaBaseModel)

Model for outputs generated during contract execution. Captures the type of output, associated message, event ID, clause, and the timestamp.

TickData Objects

class TickData(LunaBaseModel)

Model for representing additional data generated during a contract tick. Includes a list of contract outputs.

append

def append(other: Self) -> None

Append another TickData object to the current object. Useful for aggregating outputs from multiple contract executions.