@mastra/spanner 1.11.2-alpha.0 → 1.12.0

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.
@@ -3,7 +3,7 @@ name: mastra-spanner
3
3
  description: Documentation for @mastra/spanner. Use when working with @mastra/spanner APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/spanner"
6
- version: "1.11.2-alpha.0"
6
+ version: "1.12.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -18,9 +18,5 @@ Read the individual reference documents for detailed explanations and code examp
18
18
 
19
19
  - [Google Cloud Spanner](references/integrations-databases-spanner.md) - Persist Mastra data in Google Cloud Spanner with strong consistency, GoogleSQL schemas, emulator support, initialization, and direct database access.
20
20
 
21
- ### Reference
22
-
23
- - [Reference: Storage retention (prune)](references/reference-storage-retention.md) - prune() deletes rows. It caps growth and is safe to run against large tables (batched, bounded, resumable, cancellable).
24
-
25
21
 
26
22
  Read [assets/SOURCE_MAP.json](assets/SOURCE_MAP.json) for source code references.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.11.2-alpha.0",
2
+ "version": "1.12.0",
3
3
  "package": "@mastra/spanner",
4
4
  "exports": {
5
5
  "AgentsSpanner": {
@@ -65,47 +65,47 @@
65
65
  "SPANNER_DOMAIN_KEYS": {
66
66
  "types": "dist/storage/index.d.ts",
67
67
  "implementation": "dist/index.js",
68
- "line": 13889
68
+ "line": 13900
69
69
  },
70
70
  "SchedulesSpanner": {
71
71
  "types": "dist/storage/domains/schedules/index.d.ts",
72
72
  "implementation": "dist/index.js",
73
- "line": 10430
73
+ "line": 10432
74
74
  },
75
75
  "ScorerDefinitionsSpanner": {
76
76
  "types": "dist/storage/domains/scorer-definitions/index.d.ts",
77
77
  "implementation": "dist/index.js",
78
- "line": 10882
78
+ "line": 10893
79
79
  },
80
80
  "ScoresSpanner": {
81
81
  "types": "dist/storage/domains/scores/index.d.ts",
82
82
  "implementation": "dist/index.js",
83
- "line": 11495
83
+ "line": 11506
84
84
  },
85
85
  "SkillsSpanner": {
86
86
  "types": "dist/storage/domains/skills/index.d.ts",
87
87
  "implementation": "dist/index.js",
88
- "line": 11763
88
+ "line": 11774
89
89
  },
90
90
  "SpannerStore": {
91
91
  "types": "dist/storage/index.d.ts",
92
92
  "implementation": "dist/index.js",
93
- "line": 13928
93
+ "line": 13939
94
94
  },
95
95
  "WorkflowDefinitionsSpanner": {
96
96
  "types": "dist/storage/domains/workflow-definitions/index.d.ts",
97
97
  "implementation": "dist/index.js",
98
- "line": 12407
98
+ "line": 12418
99
99
  },
100
100
  "WorkflowsSpanner": {
101
101
  "types": "dist/storage/domains/workflows/index.d.ts",
102
102
  "implementation": "dist/index.js",
103
- "line": 12581
103
+ "line": 12592
104
104
  },
105
105
  "WorkspacesSpanner": {
106
106
  "types": "dist/storage/domains/workspaces/index.d.ts",
107
107
  "implementation": "dist/index.js",
108
- "line": 13278
108
+ "line": 13289
109
109
  }
110
110
  },
111
111
  "modules": {}
package/dist/index.cjs CHANGED
@@ -10400,6 +10400,8 @@ function rowToSchedule(row) {
10400
10400
  if (transformed.metadata != null) schedule.metadata = transformed.metadata;
10401
10401
  if (transformed.owner_type != null) schedule.ownerType = String(transformed.owner_type);
10402
10402
  if (transformed.owner_id != null) schedule.ownerId = String(transformed.owner_id);
10403
+ if (transformed.run_at != null) schedule.runAt = Number(transformed.run_at);
10404
+ if (transformed.end_at != null) schedule.endAt = Number(transformed.end_at);
10403
10405
  return schedule;
10404
10406
  }
10405
10407
  function rowToTrigger(row) {
@@ -10451,6 +10453,11 @@ var SchedulesSpanner = class SchedulesSpanner extends _mastra_core_storage.Sched
10451
10453
  tableName: _mastra_core_storage.TABLE_SCHEDULES,
10452
10454
  schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULES]
10453
10455
  });
10456
+ await this.db.alterTable({
10457
+ tableName: _mastra_core_storage.TABLE_SCHEDULES,
10458
+ schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULES],
10459
+ ifNotExists: ["run_at", "end_at"]
10460
+ });
10454
10461
  await this.db.createTable({
10455
10462
  tableName: _mastra_core_storage.TABLE_SCHEDULE_TRIGGERS,
10456
10463
  schema: _mastra_core_storage.TABLE_SCHEMAS[_mastra_core_storage.TABLE_SCHEDULE_TRIGGERS]
@@ -10564,7 +10571,9 @@ var SchedulesSpanner = class SchedulesSpanner extends _mastra_core_storage.Sched
10564
10571
  updated_at: schedule.updatedAt,
10565
10572
  metadata: schedule.metadata ?? null,
10566
10573
  owner_type: schedule.ownerType ?? null,
10567
- owner_id: schedule.ownerId ?? null
10574
+ owner_id: schedule.ownerId ?? null,
10575
+ run_at: schedule.runAt ?? null,
10576
+ end_at: schedule.endAt ?? null
10568
10577
  },
10569
10578
  transaction: tx
10570
10579
  });
@@ -10697,6 +10706,8 @@ var SchedulesSpanner = class SchedulesSpanner extends _mastra_core_storage.Sched
10697
10706
  if ("metadata" in patch) data.metadata = patch.metadata ?? null;
10698
10707
  if ("ownerType" in patch) data.owner_type = patch.ownerType ?? null;
10699
10708
  if ("ownerId" in patch) data.owner_id = patch.ownerId ?? null;
10709
+ if ("runAt" in patch) data.run_at = patch.runAt ?? null;
10710
+ if ("endAt" in patch) data.end_at = patch.endAt ?? null;
10700
10711
  if (Object.keys(data).length === 0) {
10701
10712
  const existing = await this.getSchedule(id);
10702
10713
  if (!existing) throw new _mastra_core_error.MastraError({