Skip to content

Commit 409b2b2

Browse files
committed
add deleteWorkflow, bump version
1 parent 9dc1014 commit 409b2b2

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

@types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ export declare interface StackSession extends Session {
506506

507507
export declare interface WorkflowSession extends Session {
508508
readWorkflow(workflowId: string, callback?: ResultCb<TypedID>): Promise<TypedID>
509+
deleteWorkflow(workflowId: string, callback?: ResultCb<TypedID>): Promise<TypedID>
509510
queryWorkflows(query: Object, pagination?: Pagination, callback?: ResultCb<Rows<TypedID>>): Promise<Rows<TypedID>>
510511
queryWorkflowTasks(query: Object, pagination?: Pagination, callback?: ResultCb<Rows<TypedID>>): Promise<Rows<TypedID>>
511512
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudcms",
3-
"version": "0.2.20",
3+
"version": "0.2.21",
44
"repository": {
55
"type": "git",
66
"url": "git://github.com/gitana/cloudcms-javascript-driver.git"

src/session/default/methods/workflow.js

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ module.exports = function(Session)
99
return this.get("/workflow/instances/" + workflowId, {}, callback);
1010
}
1111

12+
deleteWorkflow(workflowId)
13+
{
14+
var callback = this.extractOptionalCallback(arguments);
15+
16+
return this.del("/workflow/instances/" + workflowId, {}, callback);
17+
}
18+
1219
queryWorkflows(query, pagination)
1320
{
1421
var callback = this.extractOptionalCallback(arguments);
@@ -22,6 +29,8 @@ module.exports = function(Session)
2229

2330
return this.post("/workflow/tasks/query", pagination, query, callback);
2431
}
32+
33+
2534
}
2635

2736
return WorkflowSession;

0 commit comments

Comments
 (0)