@mastra/spanner 1.11.2-alpha.0 → 1.12.0-alpha.1

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.js CHANGED
@@ -10399,6 +10399,8 @@ function rowToSchedule(row) {
10399
10399
  if (transformed.metadata != null) schedule.metadata = transformed.metadata;
10400
10400
  if (transformed.owner_type != null) schedule.ownerType = String(transformed.owner_type);
10401
10401
  if (transformed.owner_id != null) schedule.ownerId = String(transformed.owner_id);
10402
+ if (transformed.run_at != null) schedule.runAt = Number(transformed.run_at);
10403
+ if (transformed.end_at != null) schedule.endAt = Number(transformed.end_at);
10402
10404
  return schedule;
10403
10405
  }
10404
10406
  function rowToTrigger(row) {
@@ -10450,6 +10452,11 @@ var SchedulesSpanner = class SchedulesSpanner extends SchedulesStorage {
10450
10452
  tableName: TABLE_SCHEDULES,
10451
10453
  schema: TABLE_SCHEMAS[TABLE_SCHEDULES]
10452
10454
  });
10455
+ await this.db.alterTable({
10456
+ tableName: TABLE_SCHEDULES,
10457
+ schema: TABLE_SCHEMAS[TABLE_SCHEDULES],
10458
+ ifNotExists: ["run_at", "end_at"]
10459
+ });
10453
10460
  await this.db.createTable({
10454
10461
  tableName: TABLE_SCHEDULE_TRIGGERS,
10455
10462
  schema: TABLE_SCHEMAS[TABLE_SCHEDULE_TRIGGERS]
@@ -10563,7 +10570,9 @@ var SchedulesSpanner = class SchedulesSpanner extends SchedulesStorage {
10563
10570
  updated_at: schedule.updatedAt,
10564
10571
  metadata: schedule.metadata ?? null,
10565
10572
  owner_type: schedule.ownerType ?? null,
10566
- owner_id: schedule.ownerId ?? null
10573
+ owner_id: schedule.ownerId ?? null,
10574
+ run_at: schedule.runAt ?? null,
10575
+ end_at: schedule.endAt ?? null
10567
10576
  },
10568
10577
  transaction: tx
10569
10578
  });
@@ -10696,6 +10705,8 @@ var SchedulesSpanner = class SchedulesSpanner extends SchedulesStorage {
10696
10705
  if ("metadata" in patch) data.metadata = patch.metadata ?? null;
10697
10706
  if ("ownerType" in patch) data.owner_type = patch.ownerType ?? null;
10698
10707
  if ("ownerId" in patch) data.owner_id = patch.ownerId ?? null;
10708
+ if ("runAt" in patch) data.run_at = patch.runAt ?? null;
10709
+ if ("endAt" in patch) data.end_at = patch.endAt ?? null;
10699
10710
  if (Object.keys(data).length === 0) {
10700
10711
  const existing = await this.getSchedule(id);
10701
10712
  if (!existing) throw new MastraError({