Class UploadReceipt

java.lang.Object
io.quarkus.hibernate.orm.panache.PanacheEntityBase
ai.pipeline.connector.intake.entity.UploadReceipt

@Entity public class UploadReceipt extends io.quarkus.hibernate.orm.panache.PanacheEntityBase
Per-document intake status, keyed by doc_id. A projection of the intake lifecycle event stream — DocumentAccepted, DocumentRejected, DocumentError — written by the receipt projector, never on the upload hot path, and read by the status lookup. Carries only what the events provide; the signed token carries the account scope.

Database table: upload_receipts.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Client-safe outcome code for REJECTED/ERROR (e.g.
     
     
     
    The platform doc_id ({datasourceId}:{uuid}).
    Support-quotable trace id; set only for ERROR.
    static final int
    Max storable doc_id length — matches the upload_receipts.doc_id column.
    Client-safe human-readable summary for REJECTED/ERROR; never upstream/internal text.
     
    One of UploadState: ACCEPTED, REJECTED, ERROR.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class io.quarkus.hibernate.orm.panache.PanacheEntityBase

    count, count, count, count, delete, delete, delete, delete, deleteAll, deleteById, find, find, find, find, find, find, findAll, findAll, findById, findById, findByIdOptional, findByIdOptional, findByIds, flush, getEntityManager, getSession, isPersistent, list, list, list, list, list, list, listAll, listAll, persist, persist, persist, persist, persistAndFlush, stream, stream, stream, stream, stream, stream, streamAll, streamAll, update, update, update

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MAX_DOC_ID_LENGTH

      public static final int MAX_DOC_ID_LENGTH
      Max storable doc_id length — matches the upload_receipts.doc_id column. Upload surfaces reject a longer (client-supplied) doc_id at the boundary so an unprojectable id can never be accepted (which would leave status stuck at PENDING forever).
      See Also:
    • docId

      public String docId
      The platform doc_id ({datasourceId}:{uuid}).
    • datasourceId

      public String datasourceId
    • sourceDocId

      public String sourceDocId
    • crawlId

      public String crawlId
    • state

      public String state
      One of UploadState: ACCEPTED, REJECTED, ERROR.
    • code

      public String code
      Client-safe outcome code for REJECTED/ERROR (e.g. INVALID_REQUEST, UPSTREAM_ERROR); null for ACCEPTED.
    • errorId

      public String errorId
      Support-quotable trace id; set only for ERROR. Indexed for support lookup.
    • message

      public String message
      Client-safe human-readable summary for REJECTED/ERROR; never upstream/internal text.
    • createdAt

      public OffsetDateTime createdAt
    • updatedAt

      public OffsetDateTime updatedAt
  • Constructor Details

    • UploadReceipt

      public UploadReceipt()