pyrus-api 2.4.0 → 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.
- package/build/cjs/index.cjs +1 -2
- package/build/esm/index.js +1 -2
- package/build/types/index.d.ts +23 -7
- package/package.json +1 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -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) {
|
package/build/esm/index.js
CHANGED
|
@@ -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) {
|
package/build/types/index.d.ts
CHANGED
|
@@ -547,16 +547,17 @@ declare module "pyrus-api" {
|
|
|
547
547
|
fields?: FormField[];
|
|
548
548
|
};
|
|
549
549
|
export type HTTPMethod = "GET" | "POST" | "PUT" | "DELETE";
|
|
550
|
-
export type
|
|
550
|
+
export type IdRequired = {
|
|
551
551
|
id: number;
|
|
552
552
|
};
|
|
553
|
-
export type
|
|
554
|
-
id: number;
|
|
555
|
-
} | {
|
|
553
|
+
export type CodeRequired = {
|
|
556
554
|
code: string;
|
|
557
555
|
};
|
|
558
|
-
export type
|
|
559
|
-
export type
|
|
556
|
+
export type ById = IdRequired;
|
|
557
|
+
export type IdOrCodeRequired = IdRequired | CodeRequired;
|
|
558
|
+
export type FormFieldCommon = FormFieldAuthor | FormFieldCatalog | FormFieldCheckmark | FormFieldCreateDate | FormFieldDate | FormFieldDueDate | FormFieldDueDateTime | FormFieldEmail | FormFieldFile | FormFieldFlag | FormFieldFormLink | FormFieldMoney | FormFieldMultipleChoice | FormFieldNewFile | FormFieldNote | FormFieldNumber | FormFieldPerson | FormFieldPhone | FormFieldProject | FormFieldStatus | FormFieldStep | FormFieldTable | FormFieldText | FormFieldTime | FormFieldTitle;
|
|
559
|
+
export type FormField = FormFieldCommon & IdRequired;
|
|
560
|
+
export type FormFieldIdentified = FormFieldCommon & IdOrCodeRequired;
|
|
560
561
|
const ChannelType: {
|
|
561
562
|
readonly Email: "email";
|
|
562
563
|
readonly Telegram: "telegram";
|
|
@@ -932,6 +933,12 @@ declare module "pyrus-api" {
|
|
|
932
933
|
* default: 50
|
|
933
934
|
*/
|
|
934
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;
|
|
935
942
|
};
|
|
936
943
|
export type CreateListRequest = {
|
|
937
944
|
parent_id?: number;
|
|
@@ -957,11 +964,20 @@ declare module "pyrus-api" {
|
|
|
957
964
|
external_id?: number;
|
|
958
965
|
is_private?: boolean;
|
|
959
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
|
+
};
|
|
960
976
|
class ListsApi extends BaseApi {
|
|
961
977
|
protected _moduleSubPath: Endpoints;
|
|
962
978
|
getAll(): Promise<ListsResponse>;
|
|
963
979
|
getTasksInList(listId: number, request?: TaskListRequest): Promise<TaskListResponse>;
|
|
964
|
-
getInbox(request?: InboxRequest): Promise<
|
|
980
|
+
getInbox(request?: InboxRequest): Promise<InboxResponse>;
|
|
965
981
|
create(request: CreateListRequest): Promise<PlainTaskList>;
|
|
966
982
|
get(request: ById): Promise<TaskList>;
|
|
967
983
|
delete(request: ById): Promise<void>;
|