shred-api-client 2.9.5 → 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;
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);