Skip to main content

luna.kernel.types

AddContractRequest Objects

class AddContractRequest(LunaBaseModel)

Model for a request to add a new contract.

  • contract_id: A unique identifier for the contract.
  • parameters: A dictionary of contract parameters with key-value pairs.
  • roles: A dictionary mapping role names to lists of participants' IDs.
  • linked_contracts: A dictionary mapping contract names to their respective contract IDs.

AddContractResponse Objects

class AddContractResponse(LunaBaseModel)

Model for the response to an add contract request.

  • state_data: The initial state data of the contract, or None if not applicable.
  • validation_errors: A list of validation errors that occurred, or None if none occurred.
  • errors: A list of general errors that occurred, or None if none occurred.
  • other_state_data: A dictionary containing the state data of other affected contracts, or None if none.

TickRequest Objects

class TickRequest(LunaBaseModel)

Model for a request to tick (advance) the state of a contract.

  • contract_id: The ID of the contract to be ticked.
  • tick_id: A unique identifier for this tick operation.
  • contract_clock_offset: The time offset for the tick operation, represented as a timedelta.

TickResponse Objects

class TickResponse(LunaBaseModel)

Model for the response to a tick request.

  • state_data: The updated runtime state data of the contract, or None if not applicable.
  • other_state_data: A dictionary containing the state data of other affected contracts, or None if none.
  • tick_data: Additional data related to the tick operation, or None if not applicable.
  • errors: A list of errors that occurred during the tick operation, or None if none occurred.

TemplateInfoRequest Objects

class TemplateInfoRequest(LunaBaseModel)

Model for a request to retrieve information about a specific template.

  • template_definition: The definition string of the template.
  • template_class_name: The class name of the template.

TemplateInfoResponse Objects

class TemplateInfoResponse(LunaBaseModel)

Model for the response to a template information request.

  • template_info: The detailed information about the template, or None if not applicable.
  • validation_errors: A list of validation errors, or None if none occurred.
  • errors: A list of other errors, or None if none occurred.

ProjectInfoRequest Objects

class ProjectInfoRequest(LunaBaseModel)

Model for a request to retrieve information about the templates in a project.

  • compressed_repository: Compressed repository

ProjectInfoResponse Objects

class ProjectInfoResponse(LunaBaseModel)

Model for the response to a project information request.

  • template_infos: The detailed information about the templates, or None if not applicable.
  • project_errors: Any errors related to analysing the project, or None if none occurred.
  • errors: A list of other errors, or None if none occurred.

ContractInfoRequest Objects

class ContractInfoRequest(LunaBaseModel)

Model for a request to get detailed information about a specific contract.

  • contract_id: The identifier of the contract.

ContractInfoResponse Objects

class ContractInfoResponse(LunaBaseModel)

Model for the response to a contract information request.

  • state: The detailed state information of the contract, or None if not applicable.
  • validation_errors: A list of validation errors, or None if none occurred.
  • errors: A list of other errors, or None if none occurred.

ValidateParametersRequest Objects

class ValidateParametersRequest(LunaBaseModel)

Model for a request to validate parameters of a contract or template.

  • contract_id: The identifier of the contract.
  • template_definition: The definition string of the template.
  • template_class_name (optional): The class name of the template.
  • parameters: A dictionary of parameters to be validated.

ValidateParametersResponse Objects

class ValidateParametersResponse(LunaBaseModel)

Model for the response to a validate parameters request.

  • validation_errors: A list of validation errors, or None if none occurred.
  • errors: A list of other errors, or None if none occurred.

PutEventRequest Objects

class PutEventRequest(LunaBaseModel)

Model for a request to put an event into a contract.

  • contract_id: The identifier of the contract.
  • event_name: The name of the event.
  • payload: A dictionary representing the payload of the event.

PutEventResponse Objects

class PutEventResponse(LunaBaseModel)

Model for the response to a put event request.

  • state_data: The updated runtime state data of the contract, or None if not applicable.
  • validation_errors: A list of validation errors related to the event, or None if none.
  • errors: A list of other errors, or None if none occurred.

LambdaRequest Objects

class LambdaRequest(LunaBaseModel)

Generic model for a lambda action request.

  • action: The type of action to be performed.
  • token: An optional authentication token.
  • api_url: The URL for the API to be called.
  • payload: A dictionary containing the payload for the action.

Action Objects

class Action()

Constants representing various action types for lambda requests.