tines 0.0.295 → 0.0.296
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 +19 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3834,6 +3834,13 @@ var DESCRIBERS = {
|
|
|
3834
3834
|
"workflow.created": (ev, p) => [text(`${action(ev.type)} workflow`), name(p.name)],
|
|
3835
3835
|
"workflow.updated": (ev, p) => [text(`${action(ev.type)} workflow`), name(p.name)],
|
|
3836
3836
|
"workflow.deleted": (ev, p) => [text(`${action(ev.type)} workflow`), name(p.name)],
|
|
3837
|
+
"workflow.run_scope_changed": (_ev, p) => [
|
|
3838
|
+
text("set run scope of"),
|
|
3839
|
+
name(p.state_name),
|
|
3840
|
+
text("in workflow"),
|
|
3841
|
+
name(p.name),
|
|
3842
|
+
text(`to ${String(p.run_scope)}`)
|
|
3843
|
+
],
|
|
3837
3844
|
"api_key.created": (_ev, p) => [text("created API key"), name(p.name)],
|
|
3838
3845
|
"api_key.permissions_updated": (_ev, p) => [
|
|
3839
3846
|
text("updated permissions for API key"),
|
|
@@ -4207,6 +4214,12 @@ function createApiClient(options) {
|
|
|
4207
4214
|
createWorkflow: (body) => request("POST", "/api/v1/workflows", body),
|
|
4208
4215
|
getWorkflow: (id2) => get(`/api/v1/workflows/${id2}`),
|
|
4209
4216
|
updateWorkflow: (id2, body) => request("PATCH", `/api/v1/workflows/${id2}`, body),
|
|
4217
|
+
/** Browser-session only: API keys are refused. */
|
|
4218
|
+
setStateRunScope: (workflowId, stateId, runScope) => request(
|
|
4219
|
+
"PUT",
|
|
4220
|
+
`/api/v1/workflows/${workflowId}/states/${stateId}/run-scope`,
|
|
4221
|
+
{ run_scope: runScope }
|
|
4222
|
+
),
|
|
4210
4223
|
deleteWorkflow: (id2, body) => request("DELETE", `/api/v1/workflows/${id2}`, body),
|
|
4211
4224
|
// Issues
|
|
4212
4225
|
listIssues: (filters = {}) => get(`/api/v1/issues${query(filters)}`),
|
|
@@ -7998,15 +8011,18 @@ function register3(program3) {
|
|
|
7998
8011
|
);
|
|
7999
8012
|
if (!transition)
|
|
8000
8013
|
throw new Error(`No current transition named "${action2}"; refresh the issue`);
|
|
8001
|
-
const permission = await api.getIssueConsent(issue.id)
|
|
8002
|
-
|
|
8014
|
+
const permission = await api.getIssueConsent(issue.id).catch((err) => {
|
|
8015
|
+
if (err instanceof ApiError && err.code === "run_key_forbidden") return null;
|
|
8016
|
+
throw err;
|
|
8017
|
+
});
|
|
8018
|
+
request = permission ? {
|
|
8003
8019
|
transition_id: transition.transition_id,
|
|
8004
8020
|
expected_state_id: permission.issue_state.id,
|
|
8005
8021
|
expected_decision_revision: permission.issue_state.decision_revision,
|
|
8006
8022
|
expected_workflow_revision: permission.issue_state.workflow_revision,
|
|
8007
8023
|
expected_consent_revision: permission.my_agents.revision,
|
|
8008
8024
|
expected_consent_epoch: permission.my_agents.epoch
|
|
8009
|
-
};
|
|
8025
|
+
} : { transition_id: transition.transition_id };
|
|
8010
8026
|
}
|
|
8011
8027
|
}
|
|
8012
8028
|
const moved = await api.transitionIssue(issue.id, request);
|