shred-api-client 1.14.0 → 1.14.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.
@@ -12,6 +12,7 @@ declare class ProjectAPI implements ProjectAPISchema {
12
12
  list(context: Context, query: Query): Promise<Project[]>;
13
13
  deny(ctx: Context, pId: string, denyFB: string, categories?: string[]): Promise<boolean>;
14
14
  unschedule(context: Context, projectId: string): Promise<boolean>;
15
+ rollback(context: Context, projectId: string): Promise<boolean>;
15
16
  start(context: Context, projectId: string): Promise<boolean>;
16
17
  approve(ctx: Context, pId: string, approve: Approve): Promise<boolean>;
17
18
  sendToApproval(context: Context, projectId: string, approval: SendToApproval): Promise<boolean>;
@@ -50,6 +50,12 @@ class ProjectAPI {
50
50
  const data = await this.clientHTTP.makeRequest(this.env, endpoint, endpointData.method, null, context);
51
51
  return data.success;
52
52
  }
53
+ async rollback(context, projectId) {
54
+ const endpointData = Project_schema_1.ProjectEndpoints.Rollback;
55
+ const endpoint = endpointData.uri.replace(":projectId", projectId);
56
+ const data = await this.clientHTTP.makeRequest(this.env, endpoint, endpointData.method, null, context);
57
+ return data.success;
58
+ }
53
59
  async start(context, projectId) {
54
60
  const endpointData = Project_schema_1.ProjectEndpoints.StartEdition;
55
61
  const endpoint = endpointData.uri.replace(":projectId", projectId);
@@ -26,6 +26,7 @@ interface ProjectAPISchema {
26
26
  approve: (context: Context, projectId: string, data: Approve) => Promise<boolean>;
27
27
  deny: (context: Context, projectId: string, denyFeedback: string, categories?: string[]) => Promise<boolean>;
28
28
  unschedule: (context: Context, projectId: string) => Promise<boolean>;
29
+ rollback: (context: Context, projectId: string) => Promise<boolean>;
29
30
  }
30
31
  declare const ProjectEndpoints: {
31
32
  List: {
@@ -64,6 +65,10 @@ declare const ProjectEndpoints: {
64
65
  uri: string;
65
66
  method: string;
66
67
  };
68
+ Rollback: {
69
+ uri: string;
70
+ method: string;
71
+ };
67
72
  Deny: {
68
73
  uri: string;
69
74
  method: string;
@@ -38,6 +38,10 @@ const ProjectEndpoints = {
38
38
  uri: "/projects/:projectId/unschedule/",
39
39
  method: "POST",
40
40
  },
41
+ Rollback: {
42
+ uri: "/projects/:projectId/rollback/",
43
+ method: "POST",
44
+ },
41
45
  Deny: {
42
46
  uri: "/projects/:projectId/deny/",
43
47
  method: "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shred-api-client",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "API Client for Shred",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",