{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/debridge-com/json-schema/debridge-com-order-lite-dto-schema.json",
  "title": "OrderLiteDTO",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/debridge-com-orders-api-openapi.yml#/components/schemas/OrderLiteDTO",
  "type": "object",
  "properties": {
    "orderId": {
      "oneOf": [
        {
          "$ref": "#/$defs/StringPropertyDTO"
        },
        {
          "$ref": "#/$defs/TransactionHashPropertyDto"
        }
      ],
      "description": "Unique identifier of the order"
    },
    "creationTimestamp": {
      "type": "integer",
      "description": "Timestamp of this event's CreatedOrderSrcEvent's block\\slot",
      "format": "int64"
    },
    "state": {
      "$ref": "#/$defs/OrderState"
    },
    "externalCallState": {
      "$ref": "#/$defs/ExternalCallState"
    },
    "makerOrderNonce": {
      "type": "integer",
      "description": "Consecutive unique number of the order for given user in given chain",
      "format": "int64"
    },
    "makerSrc": {
      "$ref": "#/$defs/AddressPropertyDTO"
    },
    "giveOffer": {
      "$ref": "#/$defs/OfferDTO"
    },
    "receiverDst": {
      "$ref": "#/$defs/AddressPropertyDTO"
    },
    "takeOffer": {
      "$ref": "#/$defs/OfferDTO"
    },
    "givePatchAuthoritySrc": {
      "$ref": "#/$defs/AddressPropertyDTO"
    },
    "orderAuthorityAddressDst": {
      "$ref": "#/$defs/AddressPropertyDTO"
    },
    "allowedTakerDst": {
      "$ref": "#/$defs/AddressPropertyDTO"
    },
    "allowedCancelBeneficiarySrc": {
      "$ref": "#/$defs/AddressPropertyDTO"
    },
    "externalCallData": {
      "oneOf": [
        {
          "$ref": "#/$defs/StringPropertyDTO"
        },
        {
          "$ref": "#/$defs/TransactionHashPropertyDto"
        }
      ],
      "description": "External call data"
    },
    "extcallExecutionProgress": {
      "$ref": "#/$defs/ExtcallExecutionProgressDTO"
    },
    "rawOrderMetadataHex": {
      "type": [
        "string",
        "null"
      ],
      "description": "Order metadata in hex format"
    },
    "referralCode": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Referral program code",
      "format": "int32"
    },
    "orderCreationTransactionHash": {
      "$ref": "#/$defs/TransactionHashPropertyDto"
    },
    "orderFulfilledTransactionHash": {
      "$ref": "#/$defs/TransactionHashPropertyDto"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AddressPropertyDTO": {
      "type": "object",
      "properties": {
        "Base64Value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Binary representation of the property value",
          "format": "byte"
        },
        "bytesArrayValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "Bytes array representation of the value",
          "readOnly": true
        },
        "stringValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "String representation of the property value",
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "ExtcallExecutionProgressDTO": {
      "type": "object",
      "properties": {
        "executedInstructionsCount": {
          "type": "integer",
          "description": "Indicates how many\nExternalCall instructions were executed\nat the time the event occurred",
          "format": "int32"
        },
        "totalInstructionsCount": {
          "type": "integer",
          "description": "Total number of instructions in the ExternalCall",
          "format": "int32"
        },
        "status": {
          "$ref": "#/$defs/ExternalCallExecutionStatus"
        }
      },
      "additionalProperties": false,
      "description": "Describes progress of ExternalCall execution"
    },
    "ExternalCallExecutionStatus": {
      "enum": [
        "Executed",
        "FailedToExecute",
        "Canceled"
      ],
      "type": "string"
    },
    "ExternalCallState": {
      "enum": [
        "NoExtCall",
        "AwaitingOrderFulfillment",
        "AwaitingExecution",
        "Executing",
        "Completed",
        "Failed",
        "Cancelled",
        "OrderCancelled"
      ],
      "type": "string"
    },
    "IntPropertyDTO": {
      "type": "object",
      "properties": {
        "bytesValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "Binary representation of the property value",
          "format": "byte"
        },
        "bytesArrayValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "Bytes array representation of the value",
          "readOnly": true
        },
        "bigIntegerValue": {
          "type": [
            "number",
            "null"
          ],
          "description": "Integer representation of the property value",
          "format": "int64",
          "readOnly": true
        },
        "stringValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "String representation of the property value",
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "OfferDTO": {
      "type": "object",
      "properties": {
        "chainId": {
          "$ref": "#/$defs/IntPropertyDTO"
        },
        "tokenAddress": {
          "$ref": "#/$defs/AddressPropertyDTO"
        },
        "amount": {
          "$ref": "#/$defs/IntPropertyDTO"
        }
      },
      "additionalProperties": false,
      "description": "Info about an offer"
    },
    "OrderState": {
      "enum": [
        "None",
        "Created",
        "Fulfilled",
        "SentUnlock",
        "OrderCancelled",
        "SentOrderCancel",
        "ClaimedUnlock",
        "ClaimedOrderCancel"
      ],
      "type": "string"
    },
    "StringPropertyDTO": {
      "type": "object",
      "properties": {
        "bytesValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "Binary representation of the property value",
          "format": "byte"
        },
        "bytesArrayValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "Bytes array representation of the value",
          "readOnly": true
        },
        "stringValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "String representation of the property value",
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "TransactionHashPropertyDto": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/StringPropertyDTO"
        }
      ],
      "properties": {
        "stringValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "String representation of the transaction hash value",
          "readOnly": true
        }
      },
      "additionalProperties": false,
      "description": "Transaction Hash property"
    }
  }
}