shred-api-client 2.4.3 → 2.4.4

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