shred-api-client 1.13.2 → 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;
@@ -91,12 +96,6 @@ interface Style {
91
96
  label: string;
92
97
  }
93
98
  export declare const Styles: Style[];
94
- type DenyFeedback = {
95
- timestamp: number;
96
- feedback: string;
97
- resolved: boolean;
98
- categories?: string[];
99
- };
100
99
  type TimelineItem = {
101
100
  status: Status;
102
101
  title: string;
@@ -118,20 +117,9 @@ type Project = {
118
117
  userId: string;
119
118
  assets?: Asset[];
120
119
  expirationTimestamp: number;
121
- timeline?: TimelineItem[];
122
- approveTimestamp?: number;
123
- sentToApproveTimestamp?: number;
120
+ timeline: TimelineItem[];
124
121
  submitTimestamp: number;
125
- editTimestamp?: number;
126
- completeTimestamp?: number;
127
- revisedAt?: number;
128
- scheduledAt?: number;
129
- scheduledTime?: number;
130
- revision?: string;
131
- canRevision: boolean;
132
- denyFeedback?: DenyFeedback[];
133
- approvedBy?: string;
134
- status: Status;
135
122
  tenantId?: string;
123
+ status: Status;
136
124
  };
137
125
  export { Project, ProjectAPISchema, ProjectEndpoints, TimelineItem };
@@ -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.13.2",
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",