Fosi Fossil Service
Small teams. Open source. Built on Fossil.

IaC / SwiftFlow

High-performance WMS with wave picking, smart routing, and real-time inventory visibility.

Public | Owner: IaC | Default branch: trunk | Last update: 2026-10-23 14:37

Artifact 073c3beb20bdff2f7bfa65fcdf300950439222854e14b713b75f0d2d9e3bc759:


import database.{type DbError}
import ql361api.{type ApiError}

pub type SyncReport {
  SyncReport(
    entity: String,
    trigger: String,
    fetched: Int,
    upserted: Int,
    cursor: String,
  )
}

pub type SyncError {
  SyncBusy
  SyncNotConfigured
  SyncQl361(ApiError)
  SyncDb(DbError)
  SyncRejected(String)
}

pub fn describe(error: SyncError) -> String {
  case error {
    SyncBusy -> "已有同类同步正在进行"
    SyncNotConfigured -> "未配置 QL361_USERNAME 或 QL361_PASSWORD"
    SyncQl361(err) -> ql361api.describe_ql361_error(err)
    SyncDb(database.DbError(message)) -> message
    SyncRejected(message) -> message
  }
}

Clone

You can clone this repository with the following command:

fossil clone https://fosi.dev/IaC/SwiftFlow

Contribute

The best way to contribute is through e-mail. See the project documentation for more details.