shred-api-client 2.4.3 → 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 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;
@@ -2120,12 +2125,17 @@ type Goal = z.infer<typeof GoalSchema>;
2120
2125
 
2121
2126
  interface IAPI$3 {
2122
2127
  getGoals: (context: Context) => Promise<Goal[]>;
2128
+ getEditorGoals: (context: Context, editorId: string) => Promise<Goal[]>;
2123
2129
  }
2124
2130
  declare const Endpoints$2: {
2125
2131
  GetGoals: {
2126
2132
  uri: string;
2127
2133
  method: string;
2128
2134
  };
2135
+ GetEditorGoals: {
2136
+ uri: string;
2137
+ method: string;
2138
+ };
2129
2139
  };
2130
2140
 
2131
2141
  type index$4_DailyMilestone = DailyMilestone;
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(
@@ -5528,7 +5541,8 @@ var GoalSchema = external_exports.object({
5528
5541
 
5529
5542
  // src/model/goal/Goal.api.ts
5530
5543
  var Endpoints4 = {
5531
- GetGoals: { uri: `/projects/goals/list/`, method: "GET" }
5544
+ GetGoals: { uri: `/projects/goals/list/`, method: "GET" },
5545
+ GetEditorGoals: { uri: `/projects/goals/:editorId/list/`, method: "GET" }
5532
5546
  };
5533
5547
 
5534
5548
  // src/api/Goal.api.ts
@@ -5537,6 +5551,18 @@ var GoalAPI = class {
5537
5551
  this.env = env;
5538
5552
  this.clientHTTP = new HTTPClient();
5539
5553
  }
5554
+ async getEditorGoals(context, editorId) {
5555
+ const endpointData = Endpoints4.GetEditorGoals;
5556
+ const endpoint = endpointData.uri.replace(":editorId", editorId);
5557
+ const data = await this.clientHTTP.makeRequest(
5558
+ this.env,
5559
+ endpoint,
5560
+ endpointData.method,
5561
+ null,
5562
+ context
5563
+ );
5564
+ return data;
5565
+ }
5540
5566
  async getGoals(context) {
5541
5567
  const endpointData = Endpoints4.GetGoals;
5542
5568
  const data = await this.clientHTTP.makeRequest(