@sanity/workflow-engine-test 0.2.0 → 0.2.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.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -5172,16 +5172,16 @@ function createReadHelpers(scope) {
|
|
|
5172
5172
|
// ref. The slot id is conventionally "subject" but workflows may
|
|
5173
5173
|
// name it otherwise.
|
|
5174
5174
|
client.fetch(
|
|
5175
|
-
`*[_type == "
|
|
5175
|
+
`*[_type == "${workflowEngine.WORKFLOW_INSTANCE_TYPE}"
|
|
5176
5176
|
&& state[_type == "workflow.state.doc.ref" && id == $slot][0].value.id == $ref
|
|
5177
|
-
&&
|
|
5177
|
+
&& ${workflowEngine.tagScopeFilter()}] | order(startedAt asc)`,
|
|
5178
5178
|
{ ref: subjectRef, slot: slotId, engineTags: tags }
|
|
5179
5179
|
)
|
|
5180
5180
|
),
|
|
5181
5181
|
instancesByStage: async (workflowId, stageId, queryOptions) => {
|
|
5182
5182
|
const filter = queryOptions?.openOnly ? " && completedAt == null" : "";
|
|
5183
5183
|
return client.fetch(
|
|
5184
|
-
`*[_type == "
|
|
5184
|
+
`*[_type == "${workflowEngine.WORKFLOW_INSTANCE_TYPE}" && workflowId == $wf && currentStageId == $stage && ${workflowEngine.tagScopeFilter()}${filter}]
|
|
5185
5185
|
| order(startedAt asc)`,
|
|
5186
5186
|
{ wf: workflowId, stage: stageId, engineTags: tags }
|
|
5187
5187
|
);
|