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,59 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface ClientContactsTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
readonly image_thumb_large?: string;
|
|
7
|
+
readonly image_thumb_medium?: string;
|
|
8
|
+
readonly image_thumb_small?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ClientContactsTypeUpdate {
|
|
11
|
+
name?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
mobile?: string;
|
|
14
|
+
phone?: string;
|
|
15
|
+
fax?: string;
|
|
16
|
+
skype?: string;
|
|
17
|
+
notes?: string;
|
|
18
|
+
position?: string;
|
|
19
|
+
is_main?: boolean;
|
|
20
|
+
access?: boolean;
|
|
21
|
+
client_id?: number;
|
|
22
|
+
password?: string;
|
|
23
|
+
}
|
|
24
|
+
export type ClientContactsTypeResponse = Merge<ClientContactsTypeUpdate, Merge<ClientContactsTypeRead, {
|
|
25
|
+
image: string | null;
|
|
26
|
+
phone: string | null;
|
|
27
|
+
position: string | null;
|
|
28
|
+
skype: string | null;
|
|
29
|
+
}>>;
|
|
30
|
+
export interface ClientContactsTypeCreate extends ClientContactsTypeUpdate {
|
|
31
|
+
name: string;
|
|
32
|
+
client_id: number;
|
|
33
|
+
}
|
|
34
|
+
export interface ClientContactsTypeFilter {
|
|
35
|
+
id?: number;
|
|
36
|
+
created_on?: string;
|
|
37
|
+
updated_on?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
email?: string;
|
|
40
|
+
mobile?: string;
|
|
41
|
+
phone?: string;
|
|
42
|
+
fax?: string;
|
|
43
|
+
skype?: string;
|
|
44
|
+
is_main?: boolean;
|
|
45
|
+
access?: boolean;
|
|
46
|
+
client_id?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ClientContactsFilterCondition extends ClientContactsTypeFilter {
|
|
49
|
+
_custom?: {
|
|
50
|
+
[k: string]: {
|
|
51
|
+
key?: Extract<keyof ClientContactsTypeFilter, string>;
|
|
52
|
+
operator?: FilterOperator;
|
|
53
|
+
value: string | number | boolean | null | number[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface ClientContactsListConfig extends GenericListConfig {
|
|
58
|
+
filter?: ClientContactsFilterCondition;
|
|
59
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { ClientsListConfig, ClientTypeCreate, ClientTypeResponse, ClientTypeUpdate } from "./types";
|
|
4
|
+
export interface ClientsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<ClientTypeResponse | null>;
|
|
6
|
+
list: (config?: ClientsListConfig) => Promise<ClientTypeResponse[]>;
|
|
7
|
+
create: (d: ClientTypeCreate) => Promise<ClientTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: ClientTypeUpdate) => Promise<ClientTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Clients extends AbstractResource implements ClientsHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<ClientTypeResponse | null>;
|
|
14
|
+
list: (config?: ClientsListConfig) => Promise<ClientTypeResponse[]>;
|
|
15
|
+
create: (data: ClientTypeCreate) => Promise<ClientTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: ClientTypeUpdate) => Promise<ClientTypeResponse | 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.Clients = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Clients extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'clients');
|
|
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.Clients = Clients;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface ClientTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly active: boolean;
|
|
5
|
+
readonly created_on: string;
|
|
6
|
+
readonly updated_on: string;
|
|
7
|
+
readonly image_thumb_large?: string;
|
|
8
|
+
readonly image_thumb_medium?: string;
|
|
9
|
+
readonly image_thumb_small?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ClientTypeUpdate {
|
|
12
|
+
name?: string;
|
|
13
|
+
address?: string;
|
|
14
|
+
city?: string;
|
|
15
|
+
postal_code?: string;
|
|
16
|
+
country?: string;
|
|
17
|
+
state?: string;
|
|
18
|
+
phone?: string;
|
|
19
|
+
fax?: string;
|
|
20
|
+
email?: string;
|
|
21
|
+
website?: string;
|
|
22
|
+
fiscal_information?: string;
|
|
23
|
+
image?: string;
|
|
24
|
+
}
|
|
25
|
+
export type ClientTypeResponse = Merge<ClientTypeRead, Merge<ClientTypeUpdate, {
|
|
26
|
+
additional_privileges: any[];
|
|
27
|
+
address?: string | null;
|
|
28
|
+
city?: string | null;
|
|
29
|
+
country?: string | null;
|
|
30
|
+
email?: string | null;
|
|
31
|
+
fax?: string | null;
|
|
32
|
+
fiscal_information?: string | null;
|
|
33
|
+
image?: string | null;
|
|
34
|
+
phone?: string | null;
|
|
35
|
+
postal_code?: string | null;
|
|
36
|
+
state?: string | null;
|
|
37
|
+
website?: string | null;
|
|
38
|
+
}>>;
|
|
39
|
+
export interface ClientTypeCreate extends ClientTypeUpdate {
|
|
40
|
+
name: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ClientTypeFilter {
|
|
43
|
+
id?: number;
|
|
44
|
+
active?: boolean;
|
|
45
|
+
created_on?: string;
|
|
46
|
+
updated_on?: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
address?: string | null;
|
|
49
|
+
city?: string | null;
|
|
50
|
+
country?: string | null;
|
|
51
|
+
email?: string | null;
|
|
52
|
+
fax?: string | null;
|
|
53
|
+
fiscal_information?: string | null;
|
|
54
|
+
image?: string | null;
|
|
55
|
+
phone?: string | null;
|
|
56
|
+
postal_code?: string | null;
|
|
57
|
+
state?: string | null;
|
|
58
|
+
website?: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface ClientFilterCondition extends ClientTypeFilter {
|
|
61
|
+
_custom?: {
|
|
62
|
+
[k: string]: {
|
|
63
|
+
key?: Extract<keyof ClientTypeFilter, string>;
|
|
64
|
+
operator?: FilterOperator;
|
|
65
|
+
value: string | number | boolean | null | number[];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface ClientsListConfig extends GenericListConfig {
|
|
70
|
+
filter?: ClientFilterCondition;
|
|
71
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { CommentsListConfig, CommentsTypeCreate, CommentsTypeResponse, CommentsTypeUpdate } from "./types";
|
|
4
|
+
export interface CommentsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<CommentsTypeResponse | null>;
|
|
6
|
+
list: (config?: CommentsListConfig) => Promise<CommentsTypeResponse[]>;
|
|
7
|
+
create: (d: CommentsTypeCreate) => Promise<CommentsTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: CommentsTypeUpdate) => Promise<CommentsTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Comments extends AbstractResource implements CommentsHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<CommentsTypeResponse | null>;
|
|
14
|
+
list: (config?: CommentsListConfig) => Promise<CommentsTypeResponse[]>;
|
|
15
|
+
create: (data: CommentsTypeCreate) => Promise<CommentsTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: CommentsTypeUpdate) => Promise<CommentsTypeResponse | 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.Comments = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Comments extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'comments');
|
|
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.Comments = Comments;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { ThreadsListConfig, ThreadsTypeResponse } from "./types";
|
|
4
|
+
export interface ThreadsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<ThreadsTypeResponse | null>;
|
|
6
|
+
list: (config?: ThreadsListConfig) => Promise<ThreadsTypeResponse[]>;
|
|
7
|
+
}
|
|
8
|
+
export declare class Threads extends AbstractResource implements ThreadsHandler {
|
|
9
|
+
constructor(auth: AuthInterface);
|
|
10
|
+
get: (id: number) => Promise<{
|
|
11
|
+
readonly id: number;
|
|
12
|
+
readonly created_on: string;
|
|
13
|
+
readonly updated_on: string;
|
|
14
|
+
readonly task_id: number | null;
|
|
15
|
+
readonly project_id: number;
|
|
16
|
+
readonly discussion_id: number | null;
|
|
17
|
+
readonly file_id: number | null;
|
|
18
|
+
} | null>;
|
|
19
|
+
list: (config?: ThreadsListConfig) => Promise<{
|
|
20
|
+
readonly id: number;
|
|
21
|
+
readonly created_on: string;
|
|
22
|
+
readonly updated_on: string;
|
|
23
|
+
readonly task_id: number | null;
|
|
24
|
+
readonly project_id: number;
|
|
25
|
+
readonly discussion_id: number | null;
|
|
26
|
+
readonly file_id: number | null;
|
|
27
|
+
}[]>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.Threads = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Threads extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'threads');
|
|
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
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Threads = Threads;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Threads = exports.Comments = void 0;
|
|
4
|
+
var Comments_1 = require("./Comments");
|
|
5
|
+
Object.defineProperty(exports, "Comments", { enumerable: true, get: function () { return Comments_1.Comments; } });
|
|
6
|
+
var Threads_1 = require("./Threads");
|
|
7
|
+
Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return Threads_1.Threads; } });
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from '../../types';
|
|
2
|
+
export interface CommentsTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
readonly thread_id: number;
|
|
7
|
+
readonly user_id: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CommentsTypeUpdate {
|
|
10
|
+
content: string;
|
|
11
|
+
}
|
|
12
|
+
export type CommentsTypeResponse = Merge<CommentsTypeUpdate, Merge<CommentsTypeRead, {}>>;
|
|
13
|
+
interface CommentsTypeCreateWithThread extends CommentsTypeUpdate {
|
|
14
|
+
thread_id: number;
|
|
15
|
+
}
|
|
16
|
+
interface CommentsTypeCreateWithTask extends CommentsTypeUpdate {
|
|
17
|
+
task_id: number;
|
|
18
|
+
}
|
|
19
|
+
interface CommentsTypeCreateWithDiscussion extends CommentsTypeUpdate {
|
|
20
|
+
discussion_id: number;
|
|
21
|
+
}
|
|
22
|
+
interface CommentsTypeCreateWithFile extends CommentsTypeUpdate {
|
|
23
|
+
file_id: number;
|
|
24
|
+
}
|
|
25
|
+
export type CommentsTypeCreate = CommentsTypeCreateWithThread | CommentsTypeCreateWithTask | CommentsTypeCreateWithDiscussion | CommentsTypeCreateWithFile;
|
|
26
|
+
export interface CommentsTypeFilter {
|
|
27
|
+
id?: number;
|
|
28
|
+
thread_id?: number;
|
|
29
|
+
user_id?: number;
|
|
30
|
+
created_on?: string;
|
|
31
|
+
updated_on?: string;
|
|
32
|
+
content?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CommentsFilterCondition extends CommentsTypeFilter {
|
|
35
|
+
_custom?: {
|
|
36
|
+
[k: string]: {
|
|
37
|
+
key?: Extract<keyof CommentsTypeFilter, string>;
|
|
38
|
+
operator?: FilterOperator;
|
|
39
|
+
value: string | number | boolean | null | number[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface CommentsListConfig extends GenericListConfig {
|
|
44
|
+
filter?: CommentsFilterCondition;
|
|
45
|
+
}
|
|
46
|
+
export interface ThreadsTypeRead {
|
|
47
|
+
readonly id: number;
|
|
48
|
+
readonly created_on: string;
|
|
49
|
+
readonly updated_on: string;
|
|
50
|
+
readonly project_id: number;
|
|
51
|
+
readonly discussion_id: number | null;
|
|
52
|
+
readonly task_id: number | null;
|
|
53
|
+
readonly file_id: number | null;
|
|
54
|
+
}
|
|
55
|
+
export type ThreadsTypeResponse = Merge<ThreadsTypeRead, {}>;
|
|
56
|
+
export interface ThreadsTypeFilter {
|
|
57
|
+
id?: number;
|
|
58
|
+
created_on?: string;
|
|
59
|
+
updated_on?: string;
|
|
60
|
+
project_id?: number;
|
|
61
|
+
discussion_id?: number;
|
|
62
|
+
task_id?: number;
|
|
63
|
+
file_id?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface ThreadsFilterCondition extends ThreadsTypeFilter {
|
|
66
|
+
_custom?: {
|
|
67
|
+
[k: string]: {
|
|
68
|
+
key?: Extract<keyof ThreadsTypeFilter, string>;
|
|
69
|
+
operator?: FilterOperator;
|
|
70
|
+
value: string | number | boolean | null | number[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface ThreadsListConfig extends GenericListConfig {
|
|
75
|
+
filter?: ThreadsFilterCondition;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { CompanyTypeResponse, CompanyTypeUpdate } from "./types";
|
|
4
|
+
export interface CompanyHandler extends AbstractResourceInterface {
|
|
5
|
+
get: () => Promise<CompanyTypeResponse | null>;
|
|
6
|
+
update: (data: CompanyTypeUpdate) => Promise<CompanyTypeResponse | null>;
|
|
7
|
+
}
|
|
8
|
+
export declare class Company extends AbstractResource implements CompanyHandler {
|
|
9
|
+
constructor(auth: AuthInterface);
|
|
10
|
+
get: () => Promise<CompanyTypeResponse | null>;
|
|
11
|
+
update: (data: CompanyTypeUpdate) => Promise<CompanyTypeResponse | null>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.Company = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Company extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'company');
|
|
17
|
+
this.get = () => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return (yield this.baseGet(null));
|
|
19
|
+
});
|
|
20
|
+
this.update = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return (yield this.baseUpdate(null, data));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.Company = Company;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Merge } from "../../types";
|
|
2
|
+
export interface CompanyTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
readonly image_thumb_large?: string;
|
|
7
|
+
readonly image_thumb_medium?: string;
|
|
8
|
+
readonly image_thumb_small?: string;
|
|
9
|
+
readonly account_type: string;
|
|
10
|
+
readonly max_users: number;
|
|
11
|
+
readonly current_users: number;
|
|
12
|
+
readonly max_projects: number | null;
|
|
13
|
+
readonly current_projects: number;
|
|
14
|
+
readonly max_invoices: number;
|
|
15
|
+
readonly current_invoices: number;
|
|
16
|
+
}
|
|
17
|
+
export interface CompanyTypeUpdate {
|
|
18
|
+
name?: string;
|
|
19
|
+
address?: string;
|
|
20
|
+
phone?: string;
|
|
21
|
+
email?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
fiscal_information?: string;
|
|
24
|
+
country?: string;
|
|
25
|
+
image?: string;
|
|
26
|
+
timezone?: string;
|
|
27
|
+
default_currency?: string;
|
|
28
|
+
default_price_per_hour?: string;
|
|
29
|
+
apply_tax_to_expenses?: string;
|
|
30
|
+
tax_on_tax?: string;
|
|
31
|
+
currency_position?: "left" | "right";
|
|
32
|
+
next_invoice_number?: number;
|
|
33
|
+
next_estimate_number?: number;
|
|
34
|
+
online_payments?: number;
|
|
35
|
+
date_format?: "Y-m-d" | "d/m/Y" | "m/d/Y" | "d.m.Y";
|
|
36
|
+
time_format?: "H:i" | "h:i";
|
|
37
|
+
decimal_sep?: string;
|
|
38
|
+
thousands_sep?: string;
|
|
39
|
+
week_start?: "0" | "1" | "2" | "3" | "4" | "5" | "6";
|
|
40
|
+
workday_start?: string;
|
|
41
|
+
workday_end?: string;
|
|
42
|
+
working_days?: string;
|
|
43
|
+
}
|
|
44
|
+
export type CompanyTypeResponse = Merge<CompanyTypeUpdate, Merge<CompanyTypeRead, {}>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { DiscussionsListConfig, DiscussionsTypeCreate, DiscussionsTypeResponse, DiscussionsTypeUpdate } from "./types";
|
|
4
|
+
export interface DiscussionsHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<DiscussionsTypeResponse | null>;
|
|
6
|
+
list: (config?: DiscussionsListConfig) => Promise<DiscussionsTypeResponse[]>;
|
|
7
|
+
create: (d: DiscussionsTypeCreate) => Promise<DiscussionsTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: DiscussionsTypeUpdate) => Promise<DiscussionsTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class Discussions extends AbstractResource implements DiscussionsHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<DiscussionsTypeResponse | null>;
|
|
14
|
+
list: (config?: DiscussionsListConfig) => Promise<DiscussionsTypeResponse[]>;
|
|
15
|
+
create: (data: DiscussionsTypeCreate) => Promise<DiscussionsTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: DiscussionsTypeUpdate) => Promise<DiscussionsTypeResponse | 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.Discussions = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class Discussions extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'discussions');
|
|
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.Discussions = Discussions;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FilterOperator, GenericListConfig, Merge } from "../../types";
|
|
2
|
+
export interface DiscussionsTypeRead {
|
|
3
|
+
readonly id: number;
|
|
4
|
+
readonly created_on: string;
|
|
5
|
+
readonly updated_on: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DiscussionsTypeUpdate {
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
project_id?: number;
|
|
11
|
+
user_id?: number;
|
|
12
|
+
}
|
|
13
|
+
export type DiscussionsTypeResponse = Merge<DiscussionsTypeUpdate, Merge<DiscussionsTypeRead, {
|
|
14
|
+
name: string;
|
|
15
|
+
project_id: number;
|
|
16
|
+
description: string | null;
|
|
17
|
+
user_id: number;
|
|
18
|
+
comments_count: number;
|
|
19
|
+
}>>;
|
|
20
|
+
export interface DiscussionsTypeCreate extends DiscussionsTypeUpdate {
|
|
21
|
+
name: string;
|
|
22
|
+
project_id: number;
|
|
23
|
+
}
|
|
24
|
+
export interface DiscussionsTypeFilter {
|
|
25
|
+
id?: number;
|
|
26
|
+
created_on?: string;
|
|
27
|
+
updated_on?: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
user_id?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface DiscussionsFilterCondition extends DiscussionsTypeFilter {
|
|
33
|
+
_custom?: {
|
|
34
|
+
[k: string]: {
|
|
35
|
+
key?: Extract<keyof DiscussionsTypeFilter, string>;
|
|
36
|
+
operator?: FilterOperator;
|
|
37
|
+
value: string | number | boolean | null | number[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface DiscussionsListConfig extends GenericListConfig {
|
|
42
|
+
filter?: DiscussionsFilterCondition;
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AbstractResource, AbstractResourceInterface } from '../../abstract';
|
|
2
|
+
import { AuthInterface } from "../../types";
|
|
3
|
+
import { TimeEntriesListConfig, TimeEntriesTypeCreate, TimeEntriesTypeResponse, TimeEntriesTypeUpdate } from "./types";
|
|
4
|
+
export interface TimeEntriesHandler extends AbstractResourceInterface {
|
|
5
|
+
get: (id: number) => Promise<TimeEntriesTypeResponse | null>;
|
|
6
|
+
list: (config?: TimeEntriesListConfig) => Promise<TimeEntriesTypeResponse[]>;
|
|
7
|
+
create: (d: TimeEntriesTypeCreate) => Promise<TimeEntriesTypeResponse | null>;
|
|
8
|
+
update: (id: number, data: TimeEntriesTypeUpdate) => Promise<TimeEntriesTypeResponse | null>;
|
|
9
|
+
delete: (id: number) => Promise<boolean>;
|
|
10
|
+
}
|
|
11
|
+
export declare class TimeEntries extends AbstractResource implements TimeEntriesHandler {
|
|
12
|
+
constructor(auth: AuthInterface);
|
|
13
|
+
get: (id: number) => Promise<TimeEntriesTypeResponse | null>;
|
|
14
|
+
list: (config?: TimeEntriesListConfig) => Promise<TimeEntriesTypeResponse[]>;
|
|
15
|
+
create: (data: TimeEntriesTypeCreate) => Promise<TimeEntriesTypeResponse | null>;
|
|
16
|
+
update: (id: number, data: TimeEntriesTypeUpdate) => Promise<TimeEntriesTypeResponse | null>;
|
|
17
|
+
delete: (id: number) => Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.TimeEntries = void 0;
|
|
13
|
+
const abstract_1 = require("../../abstract");
|
|
14
|
+
class TimeEntries extends abstract_1.AbstractResource {
|
|
15
|
+
constructor(auth) {
|
|
16
|
+
super(auth, 'entries');
|
|
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
|
+
const validConfig = !!config &&
|
|
22
|
+
config.filter &&
|
|
23
|
+
(config.filter.project_id ||
|
|
24
|
+
config.filter.client_id ||
|
|
25
|
+
config.filter.task_id ||
|
|
26
|
+
config.filter.user_id ||
|
|
27
|
+
(config.filter.time_interval &&
|
|
28
|
+
Array.isArray(config.filter.time_interval) &&
|
|
29
|
+
config.filter.time_interval.length === 2));
|
|
30
|
+
if (!validConfig) {
|
|
31
|
+
console.log('Entry list requires at least one valid filter condition');
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
return (yield this.baseList(config));
|
|
35
|
+
});
|
|
36
|
+
this.create = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
return (yield this.baseCreate(data));
|
|
38
|
+
});
|
|
39
|
+
this.update = (id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return (yield this.baseUpdate(id, data));
|
|
41
|
+
});
|
|
42
|
+
this.delete = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return yield this.baseDelete(id);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.TimeEntries = TimeEntries;
|