shred-api-client 2.0.5 → 2.0.6
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.
|
@@ -6,6 +6,7 @@ declare class ProjectAPI implements Project.IAPI {
|
|
|
6
6
|
private env;
|
|
7
7
|
private clientHTTP;
|
|
8
8
|
constructor(env: Environment);
|
|
9
|
+
getUserHistory(context: Context, userId: string): Promise<Core.APIResponse<Project.Entity>>;
|
|
9
10
|
find(context: Context, projectId: string): Promise<Project.Entity>;
|
|
10
11
|
create(context: Context, createData: Project.ProjectCreation): Promise<Project.Entity>;
|
|
11
12
|
review(ctx: Context, pId: string, revision: string): Promise<boolean>;
|
package/dist/api/Project.api.js
CHANGED
|
@@ -34,6 +34,12 @@ class ProjectAPI {
|
|
|
34
34
|
this.env = env;
|
|
35
35
|
this.clientHTTP = new HTTPClient_1.default();
|
|
36
36
|
}
|
|
37
|
+
async getUserHistory(context, userId) {
|
|
38
|
+
const endpointData = Project.Endpoints.GetUserHistory;
|
|
39
|
+
const endpoint = endpointData.uri.replace(":userId", userId);
|
|
40
|
+
const data = await this.clientHTTP.makeRequest(this.env, endpoint, endpointData.method, null, context);
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
37
43
|
async find(context, projectId) {
|
|
38
44
|
const endpointData = Project.Endpoints.FindOne;
|
|
39
45
|
const endpoint = endpointData.uri.replace(":projectId", projectId);
|
|
@@ -13,6 +13,7 @@ export interface IAPI {
|
|
|
13
13
|
deny: (context: Context, projectId: string, denyFeedback: string, categories?: string[]) => Promise<boolean>;
|
|
14
14
|
unschedule: (context: Context, projectId: string) => Promise<boolean>;
|
|
15
15
|
rollback: (context: Context, projectId: string) => Promise<boolean>;
|
|
16
|
+
getUserHistory: (context: Context, userId: string) => Promise<Core.APIResponse<Project>>;
|
|
16
17
|
}
|
|
17
18
|
export declare const Endpoints: {
|
|
18
19
|
List: {
|
|
@@ -63,4 +64,8 @@ export declare const Endpoints: {
|
|
|
63
64
|
uri: string;
|
|
64
65
|
method: string;
|
|
65
66
|
};
|
|
67
|
+
GetUserHistory: {
|
|
68
|
+
uri: string;
|
|
69
|
+
method: string;
|
|
70
|
+
};
|
|
66
71
|
};
|
|
@@ -17,4 +17,5 @@ exports.Endpoints = {
|
|
|
17
17
|
Unschedule: { uri: "/projects/:projectId/unschedule/", method: "POST" },
|
|
18
18
|
Rollback: { uri: "/projects/:projectId/rollback/", method: "POST" },
|
|
19
19
|
Deny: { uri: "/projects/:projectId/deny/", method: "POST" },
|
|
20
|
+
GetUserHistory: { uri: "/projects/user/:userId/history/", method: "GET" },
|
|
20
21
|
};
|