pyrus-api 2.4.1 → 2.5.0

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.
@@ -675,8 +675,7 @@ class ListsApi extends BaseApi {
675
675
  }
676
676
  get(request) {
677
677
  return __awaiter(this, void 0, void 0, function* () {
678
- return yield this.fetchApi((yield this.getModulePath()) +
679
- `/${request.id}`, "GET");
678
+ return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "GET");
680
679
  });
681
680
  }
682
681
  delete(request) {
@@ -673,8 +673,7 @@ class ListsApi extends BaseApi {
673
673
  }
674
674
  get(request) {
675
675
  return __awaiter(this, void 0, void 0, function* () {
676
- return yield this.fetchApi((yield this.getModulePath()) +
677
- `/${request.id}`, "GET");
676
+ return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "GET");
678
677
  });
679
678
  }
680
679
  delete(request) {
@@ -933,6 +933,12 @@ declare module "pyrus-api" {
933
933
  * default: 50
934
934
  */
935
935
  item_count: number;
936
+ /**
937
+ * The maximum number of tasks in a single task group
938
+ * @remarks
939
+ * default: 50
940
+ */
941
+ group_item_count: number;
936
942
  };
937
943
  export type CreateListRequest = {
938
944
  parent_id?: number;
@@ -958,11 +964,20 @@ declare module "pyrus-api" {
958
964
  external_id?: number;
959
965
  is_private?: boolean;
960
966
  };
967
+ export type TaskGroup = {
968
+ id: number;
969
+ name: string;
970
+ has_more: boolean;
971
+ tasks: TaskHeader[];
972
+ };
973
+ export type InboxResponse = TaskListResponse & {
974
+ task_groups: TaskGroup[];
975
+ };
961
976
  class ListsApi extends BaseApi {
962
977
  protected _moduleSubPath: Endpoints;
963
978
  getAll(): Promise<ListsResponse>;
964
979
  getTasksInList(listId: number, request?: TaskListRequest): Promise<TaskListResponse>;
965
- getInbox(request?: InboxRequest): Promise<TaskListResponse>;
980
+ getInbox(request?: InboxRequest): Promise<InboxResponse>;
966
981
  create(request: CreateListRequest): Promise<PlainTaskList>;
967
982
  get(request: ById): Promise<TaskList>;
968
983
  delete(request: ById): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyrus-api",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "Pyrus API client for TypeScript",
5
5
  "repository": {
6
6
  "type": "git",