shred-api-client 2.9.4 → 2.9.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.
package/dist/index.d.ts CHANGED
@@ -2205,6 +2205,9 @@ interface IAPI$7 {
2205
2205
  review: (context: Context, projectId: string, revision: string) => Promise<boolean>;
2206
2206
  cancel: (context: Context, projectId: string) => Promise<boolean>;
2207
2207
  list: (context: Context, query: QueryOptions<Project>) => Promise<Project[]>;
2208
+ getMine: (context: Context, query?: QueryOptions<Project>) => Promise<Project[]>;
2209
+ getAssigned: (context: Context, query?: QueryOptions<Project>) => Promise<Project[]>;
2210
+ getAll: (context: Context, query?: QueryOptions<Project>) => Promise<Project[]>;
2208
2211
  start: (context: Context) => Promise<boolean>;
2209
2212
  sendToApproval: (context: Context, projectId: string, data: SendToApproval) => Promise<boolean>;
2210
2213
  approve: (context: Context, projectId: string, data: Approve) => Promise<boolean>;
@@ -2229,6 +2232,18 @@ declare const Endpoints$6: {
2229
2232
  uri: string;
2230
2233
  method: string;
2231
2234
  };
2235
+ Mine: {
2236
+ uri: string;
2237
+ method: string;
2238
+ };
2239
+ Assigned: {
2240
+ uri: string;
2241
+ method: string;
2242
+ };
2243
+ All: {
2244
+ uri: string;
2245
+ method: string;
2246
+ };
2232
2247
  GetNext: {
2233
2248
  uri: string;
2234
2249
  method: string;
@@ -3432,8 +3447,6 @@ declare const Actions: {
3432
3447
  readonly PROJECT_REQUEST_REVIEW: "project.request_review";
3433
3448
  readonly PROJECT_RECORD_INTERACTION: "project.record_interaction";
3434
3449
  readonly PROJECT_CHECK_FREE_QUOTA: "project.check_free_quota";
3435
- readonly PROJECT_LIST_OWN: "project.list_own";
3436
- readonly PROJECT_VIEW_OWN: "project.view_own";
3437
3450
  readonly EDITOR_LIST: "editor.list";
3438
3451
  readonly EDITOR_GET: "editor.get";
3439
3452
  readonly GOAL_VIEW_OWN: "goal.view_own";
package/dist/index.js CHANGED
@@ -5179,6 +5179,9 @@ var ProjectSchema = external_exports.object({
5179
5179
  var Endpoints3 = {
5180
5180
  Reorder: { uri: "/projects/reorder/", method: "POST" },
5181
5181
  List: { uri: "/projects/list", method: "GET" },
5182
+ Mine: { uri: "/projects/mine", method: "GET" },
5183
+ Assigned: { uri: "/projects/assigned", method: "GET" },
5184
+ All: { uri: "/projects/all", method: "GET" },
5182
5185
  GetNext: { uri: "/projects/:userId/next", method: "GET" },
5183
5186
  CreateProject: { uri: "/projects/create", method: "POST" },
5184
5187
  FindOne: { uri: `/projects/:projectId/`, method: "GET" },
@@ -5560,6 +5563,25 @@ var ProjectAPI = class {
5560
5563
  );
5561
5564
  return data;
5562
5565
  }
5566
+ async getMine(context, query) {
5567
+ return this.fetchProjects(Endpoints3.Mine, context, query);
5568
+ }
5569
+ async getAssigned(context, query) {
5570
+ return this.fetchProjects(Endpoints3.Assigned, context, query);
5571
+ }
5572
+ async getAll(context, query) {
5573
+ return this.fetchProjects(Endpoints3.All, context, query);
5574
+ }
5575
+ async fetchProjects(endpointData, context, query) {
5576
+ const qs = query ? buildQueryString(query) : "";
5577
+ return this.clientHTTP.makeRequest(
5578
+ this.env,
5579
+ `${endpointData.uri}${qs}`,
5580
+ endpointData.method,
5581
+ null,
5582
+ context
5583
+ );
5584
+ }
5563
5585
  async deny(ctx, pId, denyFB, categories) {
5564
5586
  const endpointData = Endpoints3.Deny;
5565
5587
  const endpoint = endpointData.uri.replace(":projectId", pId);
@@ -6047,8 +6069,6 @@ var Actions = {
6047
6069
  PROJECT_REQUEST_REVIEW: "project.request_review",
6048
6070
  PROJECT_RECORD_INTERACTION: "project.record_interaction",
6049
6071
  PROJECT_CHECK_FREE_QUOTA: "project.check_free_quota",
6050
- PROJECT_LIST_OWN: "project.list_own",
6051
- PROJECT_VIEW_OWN: "project.view_own",
6052
6072
  // — Editors —
6053
6073
  EDITOR_LIST: "editor.list",
6054
6074
  EDITOR_GET: "editor.get",
@@ -6137,8 +6157,6 @@ var ActionCatalog = {
6137
6157
  [Actions.PROJECT_REQUEST_REVIEW]: { label: "Request a review on your own project", group: "Projects" },
6138
6158
  [Actions.PROJECT_RECORD_INTERACTION]: { label: "Record an interaction on your own project", group: "Projects" },
6139
6159
  [Actions.PROJECT_CHECK_FREE_QUOTA]: { label: "Check your own free-project quota", group: "Projects" },
6140
- [Actions.PROJECT_LIST_OWN]: { label: "List your own projects", group: "Projects" },
6141
- [Actions.PROJECT_VIEW_OWN]: { label: "View your own project", group: "Projects" },
6142
6160
  // Editors (staff)
6143
6161
  [Actions.EDITOR_LIST]: { label: "List all editors", group: "Editors" },
6144
6162
  [Actions.EDITOR_GET]: { label: "View any editor", group: "Editors" },