@dudousxd/nestjs-durable-store-mikro-orm 0.33.5 → 0.33.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2016,6 +2016,27 @@ var MikroOrmStateStore = class _MikroOrmStateStore {
2016
2016
  });
2017
2017
  return entity ? fromCheckpointEntity(entity) : void 0;
2018
2018
  }
2019
+ async hasCheckpoints(runId, fromSeq, toSeq, statuses) {
2020
+ if (statuses.length === 0) return false;
2021
+ const row = await this.fork().findOne(StepCheckpointEntity, {
2022
+ runId,
2023
+ seq: {
2024
+ $gte: fromSeq,
2025
+ $lte: toSeq
2026
+ },
2027
+ status: {
2028
+ $in: statuses
2029
+ }
2030
+ }, {
2031
+ fields: [
2032
+ "seq"
2033
+ ],
2034
+ orderBy: {
2035
+ seq: "desc"
2036
+ }
2037
+ });
2038
+ return row !== null;
2039
+ }
2019
2040
  async countCheckpoints(runId, fromSeq, toSeq, statuses) {
2020
2041
  if (statuses.length === 0) return 0;
2021
2042
  return this.fork().count(StepCheckpointEntity, {