@sanity/workflow-engine-test 0.4.2 → 0.6.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.
package/dist/index.cjs CHANGED
@@ -5097,6 +5097,7 @@ function createEngineWrappers(scope, access, clock) {
5097
5097
  deployDefinitions: (args) => workflowEngine.workflow.deployDefinitions({ ...scope, ...args }),
5098
5098
  startInstance: (args) => workflowEngine.workflow.startInstance(withAccess(args)),
5099
5099
  fireAction: (args) => workflowEngine.workflow.fireAction(withAccess(args)),
5100
+ editField: (args) => workflowEngine.workflow.editField(withAccess(args)),
5100
5101
  completeEffect: (args) => workflowEngine.workflow.completeEffect(withAccess(args)),
5101
5102
  tick: (args) => workflowEngine.workflow.tick(withAccess(args)),
5102
5103
  evaluate: (args) => workflowEngine.workflow.evaluate(withAccess(args)),
@@ -5160,13 +5161,13 @@ function createReadHelpers(scope) {
5160
5161
  ...task !== void 0 ? { task } : {}
5161
5162
  }),
5162
5163
  instancesForSubject: async (subjectRef, entryName = "subject") => (
5163
- // Subjects live on a workflow-scope `doc.ref` state entry. Match
5164
+ // Subjects live on a workflow-scope `doc.ref` field entry. Match
5164
5165
  // instances whose entry's value.id equals the supplied ref. The
5165
5166
  // entry name is conventionally "subject" but workflows may name
5166
5167
  // it otherwise.
5167
5168
  client.fetch(
5168
5169
  `*[_type == "${workflowEngine.WORKFLOW_INSTANCE_TYPE}"
5169
- && state[_type == "doc.ref" && name == $entry][0].value.id == $ref
5170
+ && fields[_type == "doc.ref" && name == $entry][0].value.id == $ref
5170
5171
  && ${workflowEngine.tagScopeFilter()}] | order(startedAt asc)`,
5171
5172
  { ref: subjectRef, entry: entryName, tag }
5172
5173
  )