shred-api-client 2.4.4 → 2.4.5
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.d.ts +5 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1918,6 +1918,7 @@ interface IAPI$4 {
|
|
|
1918
1918
|
start: (context: Context) => Promise<boolean>;
|
|
1919
1919
|
sendToApproval: (context: Context, projectId: string, data: SendToApproval) => Promise<boolean>;
|
|
1920
1920
|
approve: (context: Context, projectId: string, data: Approve) => Promise<boolean>;
|
|
1921
|
+
assign: (context: Context, editorId: string, projectId: string) => Promise<boolean>;
|
|
1921
1922
|
deny: (context: Context, projectId: string, denyFeedback: string, categories?: string[]) => Promise<boolean>;
|
|
1922
1923
|
unschedule: (context: Context, projectId: string) => Promise<boolean>;
|
|
1923
1924
|
rollback: (context: Context, projectId: string) => Promise<boolean>;
|
|
@@ -1989,6 +1990,10 @@ declare const Endpoints$3: {
|
|
|
1989
1990
|
uri: string;
|
|
1990
1991
|
method: string;
|
|
1991
1992
|
};
|
|
1993
|
+
Assign: {
|
|
1994
|
+
uri: string;
|
|
1995
|
+
method: string;
|
|
1996
|
+
};
|
|
1992
1997
|
GetUserHistory: {
|
|
1993
1998
|
uri: string;
|
|
1994
1999
|
method: string;
|
package/dist/index.js
CHANGED
|
@@ -5078,6 +5078,7 @@ var Endpoints3 = {
|
|
|
5078
5078
|
Unschedule: { uri: "/projects/:projectId/unschedule/", method: "POST" },
|
|
5079
5079
|
Rollback: { uri: "/projects/:projectId/rollback/", method: "POST" },
|
|
5080
5080
|
Deny: { uri: "/projects/:projectId/deny/", method: "POST" },
|
|
5081
|
+
Assign: { uri: "/projects/:projectId/assign/", method: "POST" },
|
|
5081
5082
|
GetUserHistory: { uri: "/projects/user/:userId/history/", method: "GET" },
|
|
5082
5083
|
GetPoolSize: { uri: "/projects/pool/size/", method: "GET" }
|
|
5083
5084
|
};
|
|
@@ -5321,6 +5322,18 @@ var ProjectAPI = class {
|
|
|
5321
5322
|
this.env = env;
|
|
5322
5323
|
this.clientHTTP = new HTTPClient();
|
|
5323
5324
|
}
|
|
5325
|
+
async assign(ctx, editorId, pId) {
|
|
5326
|
+
const endpointData = Endpoints3.Assign;
|
|
5327
|
+
const endpoint = endpointData.uri.replace(":projectId", pId);
|
|
5328
|
+
const data = await this.clientHTTP.makeRequest(
|
|
5329
|
+
this.env,
|
|
5330
|
+
endpoint,
|
|
5331
|
+
endpointData.method,
|
|
5332
|
+
{ editor: editorId },
|
|
5333
|
+
ctx
|
|
5334
|
+
);
|
|
5335
|
+
return data.success;
|
|
5336
|
+
}
|
|
5324
5337
|
async getPoolSize(context) {
|
|
5325
5338
|
const endpointData = Endpoints3.GetPoolSize;
|
|
5326
5339
|
const data = await this.clientHTTP.makeRequest(
|