@tenonhq/dovetail-servicenow 0.0.41 → 0.0.42

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.
@@ -146,13 +146,20 @@ async function resolveScope(client, ref) {
146
146
  }
147
147
  return { sysId: sysId, name: name };
148
148
  }
149
- /** The step's record id in the /step_instances payload (`sys_id`, else `id`). */
149
+ /**
150
+ * The step's record id in the /step_instances payload. The live processflow
151
+ * payload carries it as `step_id` (verified on tenonworkstudio 2026-09-30 — no
152
+ * `sys_id` key at all); `sys_id` / `id` are kept as fallbacks for other shapes.
153
+ */
150
154
  function stepRecordId(step) {
151
- var id = (0, stepOps_1.readString)(step.sys_id);
152
- if (id) {
153
- return { key: "sys_id", id: id };
155
+ var keys = ["step_id", "sys_id", "id"];
156
+ for (var i = 0; i < keys.length; i++) {
157
+ var id = (0, stepOps_1.readString)(step[keys[i]]);
158
+ if (id) {
159
+ return { key: keys[i], id: id };
160
+ }
154
161
  }
155
- return { key: "id", id: (0, stepOps_1.readString)(step.id) };
162
+ return { key: "step_id", id: "" };
156
163
  }
157
164
  /**
158
165
  * Remap the SOURCE step graph onto the clone: each step's `action` → the new
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenonhq/dovetail-servicenow",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },