node-paymo-api 0.0.3 → 0.0.5
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/.prettierrc +6 -0
- package/README.md +24 -1
- package/dist/abstract.d.ts +23 -0
- package/dist/abstract.js +210 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +18 -0
- package/dist/remote.d.ts +9 -0
- package/dist/remote.js +80 -0
- package/dist/resources/_template_/index.d.ts +18 -0
- package/dist/resources/_template_/index.js +34 -0
- package/dist/resources/_template_/types.d.ts +25 -0
- package/dist/resources/_template_/types.js +2 -0
- package/dist/resources/bookings/index.d.ts +18 -0
- package/dist/resources/bookings/index.js +49 -0
- package/dist/resources/bookings/types.d.ts +49 -0
- package/dist/resources/bookings/types.js +2 -0
- package/dist/resources/clientcontacts/index.d.ts +18 -0
- package/dist/resources/clientcontacts/index.js +34 -0
- package/dist/resources/clientcontacts/types.d.ts +59 -0
- package/dist/resources/clientcontacts/types.js +2 -0
- package/dist/resources/clients/index.d.ts +18 -0
- package/dist/resources/clients/index.js +34 -0
- package/dist/resources/clients/types.d.ts +71 -0
- package/dist/resources/clients/types.js +2 -0
- package/dist/resources/comments/Comments.d.ts +18 -0
- package/dist/resources/comments/Comments.js +34 -0
- package/dist/resources/comments/Threads.d.ts +28 -0
- package/dist/resources/comments/Threads.js +25 -0
- package/dist/resources/comments/index.d.ts +2 -0
- package/dist/resources/comments/index.js +7 -0
- package/dist/resources/comments/types.d.ts +77 -0
- package/dist/resources/comments/types.js +2 -0
- package/dist/resources/company/index.d.ts +12 -0
- package/dist/resources/company/index.js +25 -0
- package/dist/resources/company/types.d.ts +44 -0
- package/dist/resources/company/types.js +2 -0
- package/dist/resources/discussions/index.d.ts +18 -0
- package/dist/resources/discussions/index.js +34 -0
- package/dist/resources/discussions/types.d.ts +43 -0
- package/dist/resources/discussions/types.js +2 -0
- package/dist/resources/entries/index.d.ts +18 -0
- package/dist/resources/entries/index.js +47 -0
- package/dist/resources/entries/types.d.ts +53 -0
- package/dist/resources/entries/types.js +2 -0
- package/dist/resources/estimates/EstimateItem.d.ts +3 -0
- package/dist/resources/estimates/EstimateItem.js +5 -0
- package/dist/resources/estimates/Estimates.d.ts +18 -0
- package/dist/resources/estimates/Estimates.js +34 -0
- package/dist/resources/estimates/index.d.ts +2 -0
- package/dist/resources/estimates/index.js +7 -0
- package/dist/resources/estimates/types.d.ts +76 -0
- package/dist/resources/estimates/types.js +2 -0
- package/dist/resources/estimatetemplates/index.d.ts +18 -0
- package/dist/resources/estimatetemplates/index.js +34 -0
- package/dist/resources/estimatetemplates/types.d.ts +34 -0
- package/dist/resources/estimatetemplates/types.js +2 -0
- package/dist/resources/expenses/index.d.ts +18 -0
- package/dist/resources/expenses/index.js +34 -0
- package/dist/resources/expenses/types.d.ts +46 -0
- package/dist/resources/expenses/types.js +2 -0
- package/dist/resources/files/index.d.ts +18 -0
- package/dist/resources/files/index.js +45 -0
- package/dist/resources/files/types.d.ts +44 -0
- package/dist/resources/files/types.js +2 -0
- package/dist/resources/index.d.ts +117 -0
- package/dist/resources/index.js +200 -0
- package/dist/resources/invoices/InvoiceItem.d.ts +3 -0
- package/dist/resources/invoices/InvoiceItem.js +5 -0
- package/dist/resources/invoices/Invoices.d.ts +18 -0
- package/dist/resources/invoices/Invoices.js +34 -0
- package/dist/resources/invoices/index.d.ts +2 -0
- package/dist/resources/invoices/index.js +7 -0
- package/dist/resources/invoices/types.d.ts +87 -0
- package/dist/resources/invoices/types.js +2 -0
- package/dist/resources/invoicetemplates/index.d.ts +18 -0
- package/dist/resources/invoicetemplates/index.js +34 -0
- package/dist/resources/invoicetemplates/types.d.ts +34 -0
- package/dist/resources/invoicetemplates/types.js +2 -0
- package/dist/resources/milestones/index.d.ts +18 -0
- package/dist/resources/milestones/index.js +34 -0
- package/dist/resources/milestones/types.d.ts +40 -0
- package/dist/resources/milestones/types.js +2 -0
- package/dist/resources/projects/index.d.ts +20 -0
- package/dist/resources/projects/index.js +39 -0
- package/dist/resources/projects/types.d.ts +86 -0
- package/dist/resources/projects/types.js +14 -0
- package/dist/resources/projectstatuses/index.d.ts +18 -0
- package/dist/resources/projectstatuses/index.js +34 -0
- package/dist/resources/projectstatuses/types.d.ts +32 -0
- package/dist/resources/projectstatuses/types.js +2 -0
- package/dist/resources/projecttemplates/index.d.ts +18 -0
- package/dist/resources/projecttemplates/index.js +34 -0
- package/dist/resources/projecttemplates/types.d.ts +29 -0
- package/dist/resources/projecttemplates/types.js +2 -0
- package/dist/resources/reports/index.d.ts +18 -0
- package/dist/resources/reports/index.js +34 -0
- package/dist/resources/reports/types.d.ts +90 -0
- package/dist/resources/reports/types.js +2 -0
- package/dist/resources/sessions/index.d.ts +18 -0
- package/dist/resources/sessions/index.js +35 -0
- package/dist/resources/sessions/types.d.ts +28 -0
- package/dist/resources/sessions/types.js +2 -0
- package/dist/resources/tasklists/index.d.ts +18 -0
- package/dist/resources/tasklists/index.js +34 -0
- package/dist/resources/tasklists/types.d.ts +35 -0
- package/dist/resources/tasklists/types.js +2 -0
- package/dist/resources/tasks/index.d.ts +18 -0
- package/dist/resources/tasks/index.js +34 -0
- package/dist/resources/tasks/types.d.ts +64 -0
- package/dist/resources/tasks/types.js +2 -0
- package/dist/resources/users/index.d.ts +22 -0
- package/dist/resources/users/index.js +40 -0
- package/dist/resources/users/types.d.ts +86 -0
- package/dist/resources/users/types.js +2 -0
- package/dist/resources/usertasks/index.d.ts +18 -0
- package/dist/resources/usertasks/index.js +41 -0
- package/dist/resources/usertasks/types.d.ts +31 -0
- package/dist/resources/usertasks/types.js +2 -0
- package/dist/resources/workflows/index.d.ts +18 -0
- package/dist/resources/workflows/index.js +34 -0
- package/dist/resources/workflows/types.d.ts +31 -0
- package/dist/resources/workflows/types.js +2 -0
- package/dist/resources/workflowstatuses/index.d.ts +18 -0
- package/dist/resources/workflowstatuses/index.js +34 -0
- package/dist/resources/workflowstatuses/types.d.ts +35 -0
- package/dist/resources/workflowstatuses/types.js +2 -0
- package/dist/types.d.ts +25 -0
- package/dist/types.js +2 -0
- package/package.json +13 -3
- package/src/abstract.ts +220 -0
- package/src/index.ts +23 -0
- package/src/remote.ts +77 -0
- package/src/resources/_template_/index.ts +38 -0
- package/src/resources/_template_/types.ts +40 -0
- package/src/resources/bookings/index.ts +61 -0
- package/src/resources/bookings/types.ts +60 -0
- package/src/resources/clientcontacts/index.ts +38 -0
- package/src/resources/clientcontacts/types.ts +69 -0
- package/src/resources/clients/index.ts +38 -0
- package/src/resources/clients/types.ts +100 -0
- package/src/resources/comments/Comments.ts +38 -0
- package/src/resources/comments/Threads.ts +28 -0
- package/src/resources/comments/index.ts +2 -0
- package/src/resources/comments/types.ts +105 -0
- package/src/resources/company/index.ts +23 -0
- package/src/resources/company/types.ts +52 -0
- package/src/resources/discussions/index.ts +38 -0
- package/src/resources/discussions/types.ts +53 -0
- package/src/resources/entries/index.ts +52 -0
- package/src/resources/entries/types.ts +67 -0
- package/src/resources/estimates/EstimateItem.ts +6 -0
- package/src/resources/estimates/Estimates.ts +38 -0
- package/src/resources/estimates/index.ts +2 -0
- package/src/resources/estimates/types.ts +89 -0
- package/src/resources/estimatetemplates/index.ts +38 -0
- package/src/resources/estimatetemplates/types.ts +46 -0
- package/src/resources/expenses/index.ts +38 -0
- package/src/resources/expenses/types.ts +58 -0
- package/src/resources/files/index.ts +50 -0
- package/src/resources/files/types.ts +58 -0
- package/src/resources/index.ts +289 -0
- package/src/resources/invoices/InvoiceItem.ts +6 -0
- package/src/resources/invoices/Invoices.ts +38 -0
- package/src/resources/invoices/index.ts +2 -0
- package/src/resources/invoices/types.ts +102 -0
- package/src/resources/invoicetemplates/index.ts +38 -0
- package/src/resources/invoicetemplates/types.ts +46 -0
- package/src/resources/milestones/index.ts +38 -0
- package/src/resources/milestones/types.ts +52 -0
- package/src/resources/projects/index.ts +47 -0
- package/src/resources/projects/types.ts +134 -0
- package/src/resources/projectstatuses/index.ts +38 -0
- package/src/resources/projectstatuses/types.ts +44 -0
- package/src/resources/projecttemplates/index.ts +40 -0
- package/src/resources/projecttemplates/types.ts +43 -0
- package/src/resources/reports/index.ts +38 -0
- package/src/resources/reports/types.ts +104 -0
- package/src/resources/sessions/index.ts +39 -0
- package/src/resources/sessions/types.ts +43 -0
- package/src/resources/tasklists/index.ts +38 -0
- package/src/resources/tasklists/types.ts +48 -0
- package/src/resources/tasks/index.ts +38 -0
- package/src/resources/tasks/types.ts +76 -0
- package/src/resources/users/index.ts +48 -0
- package/src/resources/users/types.ts +124 -0
- package/src/resources/usertasks/index.ts +46 -0
- package/src/resources/usertasks/types.ts +43 -0
- package/src/resources/workflows/index.ts +38 -0
- package/src/resources/workflows/types.ts +43 -0
- package/src/resources/workflowstatuses/index.ts +38 -0
- package/src/resources/workflowstatuses/types.ts +47 -0
- package/src/types.ts +40 -0
- package/tsconfig.json +12 -0
- package/lib/index.ts +0 -6
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface ProjectTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly task_code_increment: number;
|
|
5
|
+
readonly created_on: string;
|
|
6
|
+
readonly updated_on: string;
|
|
7
|
+
readonly billing_type: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ProjectTypeUpdate {
|
|
10
|
+
name?: string;
|
|
11
|
+
client_id?: number;
|
|
12
|
+
code?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
status_id?: number;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
color?: string;
|
|
17
|
+
users?: number[];
|
|
18
|
+
managers?: number[];
|
|
19
|
+
billable?: boolean;
|
|
20
|
+
flat_billing?: boolean;
|
|
21
|
+
price_per_hour?: number;
|
|
22
|
+
price?: number;
|
|
23
|
+
estimated_price?: number | string;
|
|
24
|
+
hourly_billing_mode?: string;
|
|
25
|
+
budget_hours?: number;
|
|
26
|
+
adjustable_hours?: boolean;
|
|
27
|
+
invoiced?: boolean;
|
|
28
|
+
invoice_item_id?: number;
|
|
29
|
+
workflow_id?: number;
|
|
30
|
+
template_id?: number;
|
|
31
|
+
tasklists_order?: number[];
|
|
32
|
+
}
|
|
33
|
+
export type ProjectTypeResponse = Merge<ProjectTypeRead, Merge<ProjectTypeUpdate, {
|
|
34
|
+
description?: string | null;
|
|
35
|
+
color?: string | null;
|
|
36
|
+
price_per_hour?: number | null;
|
|
37
|
+
price?: number | null;
|
|
38
|
+
hourly_billing_mode?: string | null;
|
|
39
|
+
budget_hours?: number | null;
|
|
40
|
+
adjustable_hours?: boolean | null;
|
|
41
|
+
invoice_item_id?: number | null;
|
|
42
|
+
}>>;
|
|
43
|
+
export interface ProjectTypeCreate extends ProjectTypeUpdate {
|
|
44
|
+
name: string;
|
|
45
|
+
client_id: number;
|
|
46
|
+
}
|
|
47
|
+
export interface ProjectTypeFilter {
|
|
48
|
+
id?: number;
|
|
49
|
+
task_code_increment?: number;
|
|
50
|
+
created_on?: string;
|
|
51
|
+
updated_on?: string;
|
|
52
|
+
billing_type?: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
client_id?: number;
|
|
55
|
+
code?: string;
|
|
56
|
+
description?: string | null;
|
|
57
|
+
status_id?: number;
|
|
58
|
+
active?: boolean;
|
|
59
|
+
color?: string | null;
|
|
60
|
+
users?: number | number[];
|
|
61
|
+
managers?: number | number[];
|
|
62
|
+
billable?: boolean;
|
|
63
|
+
flat_billing?: boolean;
|
|
64
|
+
price_per_hour?: number | null;
|
|
65
|
+
price?: number | null;
|
|
66
|
+
estimated_price?: number | string;
|
|
67
|
+
hourly_billing_mode?: string | null;
|
|
68
|
+
budget_hours?: number | null;
|
|
69
|
+
adjustable_hours?: boolean;
|
|
70
|
+
invoiced?: boolean;
|
|
71
|
+
invoice_item_id?: number | null;
|
|
72
|
+
workflow_id?: number;
|
|
73
|
+
template_id?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface ProjectFilterCondition extends ProjectTypeFilter {
|
|
76
|
+
_custom?: {
|
|
77
|
+
[k: string]: {
|
|
78
|
+
key?: Extract<keyof ProjectTypeFilter, string>;
|
|
79
|
+
operator?: FilterOperator;
|
|
80
|
+
value: string | number | boolean | null | number[];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface ProjectsListConfig extends GenericListConfig {
|
|
85
|
+
filter?: ProjectFilterCondition;
|
|
86
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export type ProjectInclude =
|
|
4
|
+
// | 'client'
|
|
5
|
+
// | ClientChildrenInclude
|
|
6
|
+
// | 'projectstatus'
|
|
7
|
+
// | 'tasklists'
|
|
8
|
+
// | 'tasks'
|
|
9
|
+
// | 'tasks.entries'
|
|
10
|
+
// | 'milestones'
|
|
11
|
+
// | 'discussions'
|
|
12
|
+
// | 'files'
|
|
13
|
+
// | 'invoiceitem'
|
|
14
|
+
// | 'workflow'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { ProjectStatusesListConfig, ProjectStatusesTypeCreate, ProjectStatusesTypeResponse, ProjectStatusesTypeUpdate } from "./types";
|
|
4
|
+
export interface ProjectStatusesHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<ProjectStatusesTypeResponse | null>;
|
|
6
|
+
list: (config?: ProjectStatusesListConfig) => Promise<ProjectStatusesTypeResponse[]>;
|
|
7
|
+
create: (d: ProjectStatusesTypeCreate) => Promise<ProjectStatusesTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: ProjectStatusesTypeUpdate) => Promise<ProjectStatusesTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class ProjectStatuses extends AbstractResource implements ProjectStatusesHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<ProjectStatusesTypeResponse | null>;
|
|
14
|
+
list: (config?: ProjectStatusesListConfig) => Promise<ProjectStatusesTypeResponse[]>;
|
|
15
|
+
create: (data: ProjectStatusesTypeCreate) => Promise<ProjectStatusesTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: ProjectStatusesTypeUpdate) => Promise<ProjectStatusesTypeResponse | null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProjectStatuses = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class ProjectStatuses extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'projectstatuses');
|
|
17
|
+
this.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield this.baseGet(id));
|
|
19
|
+
});
|
|
20
|
+
this.list = (...args_1) => __awaiter(this, [...args_1], void 0, function* (config = {}) {
|
|
21
|
+
return (yield this.baseList(config));
|
|
22
|
+
});
|
|
23
|
+
this.create = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return (yield this.baseCreate(data));
|
|
25
|
+
});
|
|
26
|
+
this.update = (id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return (yield this.baseUpdate(id, data));
|
|
28
|
+
});
|
|
29
|
+
this.delete = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield this.baseDelete(id);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ProjectStatuses = ProjectStatuses;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface ProjectStatusesTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
readonly readonly: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ProjectStatusesTypeUpdate {
|
|
9
|
+
name?: string;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
seq?: number | null;
|
|
12
|
+
}
|
|
13
|
+
export type ProjectStatusesTypeResponse = Merge<ProjectStatusesTypeUpdate, Merge<ProjectStatusesTypeRead, {}>>;
|
|
14
|
+
export interface ProjectStatusesTypeCreate extends ProjectStatusesTypeUpdate {
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ProjectStatusesTypeFilter {
|
|
18
|
+
name?: string;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ProjectStatusesFilterCondition extends ProjectStatusesTypeFilter {
|
|
22
|
+
_custom?: {
|
|
23
|
+
[k: string]: {
|
|
24
|
+
key?: Extract<keyof ProjectStatusesTypeFilter, string>;
|
|
25
|
+
operator?: FilterOperator;
|
|
26
|
+
value: string | number | boolean | null | number[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface ProjectStatusesListConfig extends GenericListConfig {
|
|
31
|
+
filter?: ProjectStatusesFilterCondition;
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { ProjectTemplatesListConfig, ProjectTemplatesTypeCreate, ProjectTemplatesTypeResponse, ProjectTemplatesTypeUpdate } from "./types";
|
|
4
|
+
export interface ProjectTemplatesHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<ProjectTemplatesTypeResponse | null>;
|
|
6
|
+
list: (config?: ProjectTemplatesListConfig) => Promise<ProjectTemplatesTypeResponse[]>;
|
|
7
|
+
create: (d: ProjectTemplatesTypeCreate) => Promise<ProjectTemplatesTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: ProjectTemplatesTypeUpdate) => Promise<ProjectTemplatesTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class ProjectTemplates extends AbstractResource implements ProjectTemplatesHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<ProjectTemplatesTypeResponse | null>;
|
|
14
|
+
list: (config?: ProjectTemplatesListConfig) => Promise<ProjectTemplatesTypeResponse[]>;
|
|
15
|
+
create: (data: ProjectTemplatesTypeCreate) => Promise<ProjectTemplatesTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: ProjectTemplatesTypeUpdate) => Promise<ProjectTemplatesTypeResponse | null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProjectTemplates = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class ProjectTemplates extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'projecttemplates', 'project_templates');
|
|
17
|
+
this.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield this.baseGet(id));
|
|
19
|
+
});
|
|
20
|
+
this.list = (...args_1) => __awaiter(this, [...args_1], void 0, function* (config = {}) {
|
|
21
|
+
return (yield this.baseList(config));
|
|
22
|
+
});
|
|
23
|
+
this.create = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return (yield this.baseCreate(data));
|
|
25
|
+
});
|
|
26
|
+
this.update = (id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return (yield this.baseUpdate(id, data));
|
|
28
|
+
});
|
|
29
|
+
this.delete = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield this.baseDelete(id);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ProjectTemplates = ProjectTemplates;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface ProjectTemplatesTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ProjectTemplatesTypeUpdate {
|
|
8
|
+
name?: string;
|
|
9
|
+
}
|
|
10
|
+
export type ProjectTemplatesTypeResponse = Merge<ProjectTemplatesTypeUpdate, Merge<ProjectTemplatesTypeRead, {}>>;
|
|
11
|
+
export interface ProjectTemplatesTypeCreate extends ProjectTemplatesTypeUpdate {
|
|
12
|
+
name: string;
|
|
13
|
+
project_id?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ProjectTemplatesTypeFilter {
|
|
16
|
+
name?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ProjectTemplatesFilterCondition extends ProjectTemplatesTypeFilter {
|
|
19
|
+
_custom?: {
|
|
20
|
+
[k: string]: {
|
|
21
|
+
key?: Extract<keyof ProjectTemplatesTypeFilter, string>;
|
|
22
|
+
operator?: FilterOperator;
|
|
23
|
+
value: string | number | boolean | null | number[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface ProjectTemplatesListConfig extends GenericListConfig {
|
|
28
|
+
filter?: ProjectTemplatesFilterCondition;
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { ReportsListConfig, ReportsTypeCreate, ReportsTypeResponse, ReportsTypeUpdate } from "./types";
|
|
4
|
+
export interface ReportsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<ReportsTypeResponse | null>;
|
|
6
|
+
list: (config?: ReportsListConfig) => Promise<ReportsTypeResponse[]>;
|
|
7
|
+
create: (d: ReportsTypeCreate) => Promise<ReportsTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: ReportsTypeUpdate) => Promise<ReportsTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Reports extends AbstractResource implements ReportsHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<ReportsTypeResponse | null>;
|
|
14
|
+
list: (config?: ReportsListConfig) => Promise<ReportsTypeResponse[]>;
|
|
15
|
+
create: (data: ReportsTypeCreate) => Promise<ReportsTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: ReportsTypeUpdate) => Promise<ReportsTypeResponse | null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Reports = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Reports extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'reports');
|
|
17
|
+
this.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield this.baseGet(id));
|
|
19
|
+
});
|
|
20
|
+
this.list = (...args_1) => __awaiter(this, [...args_1], void 0, function* (config = {}) {
|
|
21
|
+
return (yield this.baseList(config));
|
|
22
|
+
});
|
|
23
|
+
this.create = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return (yield this.baseCreate(data));
|
|
25
|
+
});
|
|
26
|
+
this.update = (id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return (yield this.baseUpdate(id, data));
|
|
28
|
+
});
|
|
29
|
+
this.delete = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield this.baseDelete(id);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.Reports = Reports;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
type ReportsDateIntervals = 'today' | 'yesterday' | 'this_month' | 'last_month' | 'this_week' | 'last_week' | 'this_year' | 'last_year' | 'all_time';
|
|
3
|
+
interface ReportsIncludeOptions {
|
|
4
|
+
days?: boolean;
|
|
5
|
+
clients?: boolean;
|
|
6
|
+
users?: boolean;
|
|
7
|
+
projects?: boolean;
|
|
8
|
+
tasklists?: boolean;
|
|
9
|
+
tasks?: boolean;
|
|
10
|
+
billed?: boolean;
|
|
11
|
+
entries?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ReportsExtraOptions {
|
|
14
|
+
exclude_billed_entries?: boolean;
|
|
15
|
+
exclude_unbilled_entries?: boolean;
|
|
16
|
+
exclude_billable_tasks?: boolean;
|
|
17
|
+
exclude_nonbillable_tasks?: boolean;
|
|
18
|
+
exclude_flat_rate_tasks?: boolean;
|
|
19
|
+
exclude_flats?: boolean;
|
|
20
|
+
enable_time_rounding?: boolean;
|
|
21
|
+
rounding_step?: number;
|
|
22
|
+
display_charts?: boolean;
|
|
23
|
+
display_costs?: boolean;
|
|
24
|
+
display_entries_descriptions?: boolean;
|
|
25
|
+
display_seconds?: boolean;
|
|
26
|
+
display_tasks_codes?: boolean;
|
|
27
|
+
display_tasks_descriptions?: boolean;
|
|
28
|
+
display_tasks_complete_status?: boolean;
|
|
29
|
+
display_tasks_remaining_time_budgets?: boolean;
|
|
30
|
+
display_tasks_time_budget?: boolean;
|
|
31
|
+
display_projects_budgets?: boolean;
|
|
32
|
+
display_projects_codes?: boolean;
|
|
33
|
+
display_projects_descriptions?: boolean;
|
|
34
|
+
display_projects_remaining_budgets?: boolean;
|
|
35
|
+
display_users_positions?: boolean;
|
|
36
|
+
order?: Array<keyof ReportsIncludeOptions>;
|
|
37
|
+
}
|
|
38
|
+
export interface ReportsTypeRead {
|
|
39
|
+
readonly id: number;
|
|
40
|
+
readonly created_on: string;
|
|
41
|
+
readonly updated_on: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ReportsTypeUpdate {
|
|
44
|
+
name?: string;
|
|
45
|
+
user_id?: number;
|
|
46
|
+
type?: 'static' | 'live' | 'temp';
|
|
47
|
+
start_date?: string;
|
|
48
|
+
end_date?: string;
|
|
49
|
+
date_interval?: ReportsDateIntervals;
|
|
50
|
+
shared?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export type ReportsTypeResponse = Merge<ReportsTypeUpdate, Merge<ReportsTypeRead, {
|
|
53
|
+
info: any;
|
|
54
|
+
content?: {
|
|
55
|
+
items: any[];
|
|
56
|
+
};
|
|
57
|
+
permalink: string;
|
|
58
|
+
shared: boolean;
|
|
59
|
+
share_client_id?: number;
|
|
60
|
+
}>>;
|
|
61
|
+
export type ReportsTypeCreate = ReportsTypeCreateWithInterval | ReportsTypeCreateWithDates;
|
|
62
|
+
interface ReportsTypeCommon extends ReportsTypeUpdate {
|
|
63
|
+
projects?: number[] | 'all' | 'all_active' | 'all_archived' | string;
|
|
64
|
+
clients?: number[] | 'all' | 'all_active';
|
|
65
|
+
users?: number[] | 'all' | 'all_active' | 'all_archived';
|
|
66
|
+
include?: ReportsIncludeOptions;
|
|
67
|
+
extra?: ReportsExtraOptions;
|
|
68
|
+
}
|
|
69
|
+
interface ReportsTypeCreateWithInterval extends ReportsTypeCommon {
|
|
70
|
+
date_interval: ReportsDateIntervals;
|
|
71
|
+
}
|
|
72
|
+
interface ReportsTypeCreateWithDates extends ReportsTypeCommon {
|
|
73
|
+
start_date: string;
|
|
74
|
+
end_date: string;
|
|
75
|
+
}
|
|
76
|
+
export interface ReportsTypeFilter {
|
|
77
|
+
}
|
|
78
|
+
export interface ReportsFilterCondition extends ReportsTypeFilter {
|
|
79
|
+
_custom?: {
|
|
80
|
+
[k: string]: {
|
|
81
|
+
key?: Extract<keyof ReportsTypeFilter, string>;
|
|
82
|
+
operator?: FilterOperator;
|
|
83
|
+
value: string | number | boolean | null | number[];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface ReportsListConfig extends GenericListConfig {
|
|
88
|
+
filter?: ReportsFilterCondition;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { SessionsListConfig, SessionsTypeCreate, SessionsTypeResponse, SessionsTypeUpdate } from "./types";
|
|
4
|
+
export interface SessionsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<SessionsTypeResponse | null>;
|
|
6
|
+
list: (config?: SessionsListConfig) => Promise<SessionsTypeResponse[]>;
|
|
7
|
+
create: (d: SessionsTypeCreate) => Promise<SessionsTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: SessionsTypeUpdate) => Promise<SessionsTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Sessions extends AbstractResource implements SessionsHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<SessionsTypeResponse | null>;
|
|
14
|
+
list: (config?: SessionsListConfig) => Promise<SessionsTypeResponse[]>;
|
|
15
|
+
create: (data: SessionsTypeCreate) => Promise<SessionsTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: SessionsTypeUpdate) => Promise<null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Sessions = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Sessions extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'sessions');
|
|
17
|
+
this.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield this.baseGet(id));
|
|
19
|
+
});
|
|
20
|
+
this.list = (...args_1) => __awaiter(this, [...args_1], void 0, function* (config = {}) {
|
|
21
|
+
return (yield this.baseList(config));
|
|
22
|
+
});
|
|
23
|
+
this.create = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return (yield this.baseCreate(data));
|
|
25
|
+
});
|
|
26
|
+
// There is no update method for sessions. Create, List, Get, or Delete only
|
|
27
|
+
this.update = (id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return null;
|
|
29
|
+
});
|
|
30
|
+
this.delete = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
return yield this.baseDelete(id);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.Sessions = Sessions;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface SessionsTypeRead {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly ip: string;
|
|
5
|
+
readonly created_on: string;
|
|
6
|
+
readonly updated_on: string;
|
|
7
|
+
readonly expires_on: string;
|
|
8
|
+
readonly user_id: number;
|
|
9
|
+
}
|
|
10
|
+
export interface SessionsTypeUpdate {
|
|
11
|
+
}
|
|
12
|
+
export type SessionsTypeResponse = Merge<SessionsTypeUpdate, Merge<SessionsTypeRead, {}>>;
|
|
13
|
+
export interface SessionsTypeCreate {
|
|
14
|
+
}
|
|
15
|
+
export interface SessionsTypeFilter {
|
|
16
|
+
}
|
|
17
|
+
export interface SessionsFilterCondition extends SessionsTypeFilter {
|
|
18
|
+
_custom?: {
|
|
19
|
+
[k: string]: {
|
|
20
|
+
key?: Extract<keyof SessionsTypeFilter, string>;
|
|
21
|
+
operator?: FilterOperator;
|
|
22
|
+
value: string | number | boolean | null | number[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface SessionsListConfig extends GenericListConfig {
|
|
27
|
+
filter?: SessionsFilterCondition;
|
|
28
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { TaskListsListConfig, TaskListsTypeCreate, TaskListsTypeResponse, TaskListsTypeUpdate } from "./types";
|
|
4
|
+
export interface TaskListsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<TaskListsTypeResponse | null>;
|
|
6
|
+
list: (config?: TaskListsListConfig) => Promise<TaskListsTypeResponse[]>;
|
|
7
|
+
create: (d: TaskListsTypeCreate) => Promise<TaskListsTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: TaskListsTypeUpdate) => Promise<TaskListsTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class TaskLists extends AbstractResource implements TaskListsHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<TaskListsTypeResponse | null>;
|
|
14
|
+
list: (config?: TaskListsListConfig) => Promise<TaskListsTypeResponse[]>;
|
|
15
|
+
create: (data: TaskListsTypeCreate) => Promise<TaskListsTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: TaskListsTypeUpdate) => Promise<TaskListsTypeResponse | null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TaskLists = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class TaskLists extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'tasklists');
|
|
17
|
+
this.get = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield this.baseGet(id));
|
|
19
|
+
});
|
|
20
|
+
this.list = (...args_1) => __awaiter(this, [...args_1], void 0, function* (config = {}) {
|
|
21
|
+
return (yield this.baseList(config));
|
|
22
|
+
});
|
|
23
|
+
this.create = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return (yield this.baseCreate(data));
|
|
25
|
+
});
|
|
26
|
+
this.update = (id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return (yield this.baseUpdate(id, data));
|
|
28
|
+
});
|
|
29
|
+
this.delete = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return yield this.baseDelete(id);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.TaskLists = TaskLists;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from '../../types';
|
|
2
|
+
export interface TaskListsTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
readonly project_id: number;
|
|
7
|
+
}
|
|
8
|
+
export interface TaskListsTypeUpdate {
|
|
9
|
+
name?: string;
|
|
10
|
+
seq?: number | null;
|
|
11
|
+
milestone_id?: number;
|
|
12
|
+
tasks_order?: number[];
|
|
13
|
+
}
|
|
14
|
+
export type TaskListsTypeResponse = Merge<TaskListsTypeUpdate, Merge<TaskListsTypeRead, {}>>;
|
|
15
|
+
export interface TaskListsTypeCreate extends TaskListsTypeUpdate {
|
|
16
|
+
name: string;
|
|
17
|
+
project_id: number;
|
|
18
|
+
}
|
|
19
|
+
export interface TaskListsTypeFilter {
|
|
20
|
+
name?: string;
|
|
21
|
+
project_id?: number;
|
|
22
|
+
milestone_id?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface TaskListsFilterCondition extends TaskListsTypeFilter {
|
|
25
|
+
_custom?: {
|
|
26
|
+
[k: string]: {
|
|
27
|
+
key?: Extract<keyof TaskListsTypeFilter, string>;
|
|
28
|
+
operator?: FilterOperator;
|
|
29
|
+
value: string | number | boolean | null | number[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface TaskListsListConfig extends GenericListConfig {
|
|
34
|
+
filter?: TaskListsFilterCondition;
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { TasksListConfig, TasksTypeCreate, TasksTypeResponse, TasksTypeUpdate } from "./types";
|
|
4
|
+
export interface TasksHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<TasksTypeResponse | null>;
|
|
6
|
+
list: (config?: TasksListConfig) => Promise<TasksTypeResponse[]>;
|
|
7
|
+
create: (d: TasksTypeCreate) => Promise<TasksTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: TasksTypeUpdate) => Promise<TasksTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Tasks extends AbstractResource implements TasksHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<TasksTypeResponse | null>;
|
|
14
|
+
list: (config?: TasksListConfig) => Promise<TasksTypeResponse[]>;
|
|
15
|
+
create: (data: TasksTypeCreate) => Promise<TasksTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: TasksTypeUpdate) => Promise<TasksTypeResponse | null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|