bexio 3.6.2 → 3.8.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/coverage/block-navigation.js +87 -0
- package/coverage/index.html +32 -32
- package/coverage/prettify.js +2 -0
- package/coverage/sorter.js +210 -0
- package/jest-html-reporters-attach/jest_html_reporters/index.js +3 -0
- package/jest-html-reporters-attach/jest_html_reporters/result.js +1 -0
- package/junit.xml +313 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/interfaces/InvoicesStatic.d.ts +8 -1
- package/lib/interfaces/InvoicesStatic.js.map +1 -1
- package/lib/interfaces/PositionsStatic.d.ts +46 -0
- package/lib/interfaces/PositionsStatic.js +3 -0
- package/lib/interfaces/PositionsStatic.js.map +1 -0
- package/lib/resources/DefaultPositions.d.ts +33 -0
- package/lib/resources/DefaultPositions.js +61 -0
- package/lib/resources/DefaultPositions.js.map +1 -0
- package/lib/resources/Invoices.d.ts +57 -1
- package/lib/resources/Invoices.js +83 -1
- package/lib/resources/Invoices.js.map +1 -1
- package/lib/resources/ItemPositions.d.ts +33 -0
- package/lib/resources/ItemPositions.js +61 -0
- package/lib/resources/ItemPositions.js.map +1 -0
- package/lib/resources/Orders.d.ts +28 -0
- package/lib/resources/Orders.js +51 -0
- package/lib/resources/Orders.js.map +1 -1
- package/lib/resources/TextPositions.d.ts +33 -0
- package/lib/resources/TextPositions.js +61 -0
- package/lib/resources/TextPositions.js.map +1 -0
- package/lib/tests/DefaultPositions.test.d.ts +1 -0
- package/lib/tests/DefaultPositions.test.js +22 -0
- package/lib/tests/DefaultPositions.test.js.map +1 -0
- package/lib/tests/Invoices.test.js +75 -4
- package/lib/tests/Invoices.test.js.map +1 -1
- package/lib/tests/ItemPositions.test.d.ts +1 -0
- package/lib/tests/ItemPositions.test.js +22 -0
- package/lib/tests/ItemPositions.test.js.map +1 -0
- package/lib/tests/Orders.test.js +116 -0
- package/lib/tests/Orders.test.js.map +1 -1
- package/lib/tests/TextPositions.test.d.ts +1 -0
- package/lib/tests/TextPositions.test.js +22 -0
- package/lib/tests/TextPositions.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare namespace PositionsStatic {
|
|
2
|
+
type KbDocumentType = "kb_invoice" | "kb_offer" | "kb_order";
|
|
3
|
+
interface DefaultPositionCreate {
|
|
4
|
+
amount: string;
|
|
5
|
+
amount_reserved: string;
|
|
6
|
+
amount_open: string;
|
|
7
|
+
amount_completed: string;
|
|
8
|
+
unit_id: number;
|
|
9
|
+
account_id: number;
|
|
10
|
+
tax_id: number;
|
|
11
|
+
text: string;
|
|
12
|
+
unit_price: string;
|
|
13
|
+
discount_in_percent: string | null;
|
|
14
|
+
is_optional: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface DefaultPosition extends Omit<DefaultPositionCreate, "unit_price"> {
|
|
17
|
+
id: number;
|
|
18
|
+
unit_name: string;
|
|
19
|
+
tax_value: string;
|
|
20
|
+
position_total: string;
|
|
21
|
+
unit_price: string | null;
|
|
22
|
+
pos: string;
|
|
23
|
+
internal_pos: number;
|
|
24
|
+
type: "KbPositionCustom";
|
|
25
|
+
parent_id: number | null;
|
|
26
|
+
}
|
|
27
|
+
interface ItemPositionCreate extends DefaultPositionCreate {
|
|
28
|
+
article_id: number;
|
|
29
|
+
}
|
|
30
|
+
interface ItemPosition extends Omit<DefaultPosition, "type"> {
|
|
31
|
+
article_id: number;
|
|
32
|
+
type: "KbPositionArticle";
|
|
33
|
+
}
|
|
34
|
+
interface TextPositionCreate {
|
|
35
|
+
text: string;
|
|
36
|
+
show_pos_nr: boolean;
|
|
37
|
+
}
|
|
38
|
+
interface TextPosition extends TextPositionCreate {
|
|
39
|
+
id: number;
|
|
40
|
+
pos: string | null;
|
|
41
|
+
internal_pos: number;
|
|
42
|
+
is_optional: boolean;
|
|
43
|
+
type: "KbPositionText";
|
|
44
|
+
parent_id: number | null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PositionsStatic.js","sourceRoot":"","sources":["../../src/interfaces/PositionsStatic.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import BaseCrud from "./BaseCrud";
|
|
2
|
+
import { PositionsStatic } from "../interfaces/PositionsStatic";
|
|
3
|
+
import { BaseStatic } from "../interfaces/BaseStatic";
|
|
4
|
+
export default class DefaultPositions extends BaseCrud<PositionsStatic.DefaultPosition, PositionsStatic.DefaultPosition, {}, {}, PositionsStatic.DefaultPositionCreate, {}> {
|
|
5
|
+
constructor(apiToken: string, documentType: PositionsStatic.KbDocumentType, documentId: number);
|
|
6
|
+
/**
|
|
7
|
+
* Not implemented by Bexio yet
|
|
8
|
+
*
|
|
9
|
+
* @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
|
|
10
|
+
* @param {BaseStatic.BaseOptions} [options]
|
|
11
|
+
* @returns {Promise<Array<{}>>}
|
|
12
|
+
* @memberof DefaultPositions
|
|
13
|
+
*/
|
|
14
|
+
search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<{}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Not implemented by Bexio yet
|
|
17
|
+
*
|
|
18
|
+
* @param {number} id
|
|
19
|
+
* @param {{}} ressource
|
|
20
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
21
|
+
* @memberof DefaultPositions
|
|
22
|
+
*/
|
|
23
|
+
overwrite(id: number, ressource: {}): Promise<PositionsStatic.DefaultPosition>;
|
|
24
|
+
/**
|
|
25
|
+
* Not implemented by Bexio yet
|
|
26
|
+
*
|
|
27
|
+
* @param {number} id
|
|
28
|
+
* @param {Partial<{}>} ressource
|
|
29
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
30
|
+
* @memberof DefaultPositions
|
|
31
|
+
*/
|
|
32
|
+
edit(id: number, ressource: Partial<{}>): Promise<PositionsStatic.DefaultPosition>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const BaseCrud_1 = __importDefault(require("./BaseCrud"));
|
|
16
|
+
class DefaultPositions extends BaseCrud_1.default {
|
|
17
|
+
constructor(apiToken, documentType, documentId) {
|
|
18
|
+
super(apiToken, `/2.0/${documentType}/${documentId}/kb_position_custom`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Not implemented by Bexio yet
|
|
22
|
+
*
|
|
23
|
+
* @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
|
|
24
|
+
* @param {BaseStatic.BaseOptions} [options]
|
|
25
|
+
* @returns {Promise<Array<{}>>}
|
|
26
|
+
* @memberof DefaultPositions
|
|
27
|
+
*/
|
|
28
|
+
search(searchOptions, options) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
throw new Error("not implemented by Bexio yet");
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Not implemented by Bexio yet
|
|
35
|
+
*
|
|
36
|
+
* @param {number} id
|
|
37
|
+
* @param {{}} ressource
|
|
38
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
39
|
+
* @memberof DefaultPositions
|
|
40
|
+
*/
|
|
41
|
+
overwrite(id, ressource) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
throw new Error("not implemented by Bexio yet");
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Not implemented by Bexio yet
|
|
48
|
+
*
|
|
49
|
+
* @param {number} id
|
|
50
|
+
* @param {Partial<{}>} ressource
|
|
51
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
52
|
+
* @memberof DefaultPositions
|
|
53
|
+
*/
|
|
54
|
+
edit(id, ressource) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
throw new Error("not implemented by Bexio yet");
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.default = DefaultPositions;
|
|
61
|
+
//# sourceMappingURL=DefaultPositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultPositions.js","sourceRoot":"","sources":["../../src/resources/DefaultPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0DAAkC;AAIlC,MAAqB,gBAAiB,SAAQ,kBAO7C;IACC,YACE,QAAgB,EAChB,YAA4C,EAC5C,UAAkB;QAElB,KAAK,CACH,QAAQ,EACR,QAAQ,YAAY,IAAI,UAAU,qBAAqB,CACxD,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACU,MAAM,CACjB,aAAoD,EACpD,OAAgC;;YAEhC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,SAAS,CACpB,EAAU,EACV,SAAa;;YAEb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,IAAI,CACf,EAAU,EACV,SAAsB;;YAEtB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;CACF;AA/DD,mCA+DC"}
|
|
@@ -1,9 +1,38 @@
|
|
|
1
1
|
import BaseCrud from "./BaseCrud";
|
|
2
2
|
import { InvoicesStatic } from "../interfaces/InvoicesStatic";
|
|
3
|
+
import { PositionsStatic } from "../interfaces/PositionsStatic";
|
|
3
4
|
export default class Invoices extends BaseCrud<InvoicesStatic.Invoice, InvoicesStatic.Invoice, InvoicesStatic.Invoice, InvoicesStatic.InvoiceSearchParameters, InvoicesStatic.InvoiceCreate, InvoicesStatic.InvoiceOverwrite> {
|
|
4
5
|
constructor(apiToken: string);
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Send an invoice by email.
|
|
8
|
+
*
|
|
9
|
+
* @param {number} id
|
|
10
|
+
* @param {Partial<InvoicesStatic.InvoiceSend>} ressource
|
|
11
|
+
* @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
|
|
12
|
+
* @memberof Invoices
|
|
13
|
+
*/
|
|
14
|
+
send(id: number, ressource: Partial<InvoicesStatic.InvoiceSend>): Promise<InvoicesStatic.InvoiceSentAnswer>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `send` instead.
|
|
17
|
+
*/
|
|
18
|
+
sent(id: number, ressource: Partial<InvoicesStatic.InvoiceSend>): Promise<InvoicesStatic.InvoiceSentAnswer>;
|
|
6
19
|
cancel(id: number): Promise<InvoicesStatic.InvoiceCancelled>;
|
|
20
|
+
/**
|
|
21
|
+
* Issue an invoice. The invoice must be in the draft status.
|
|
22
|
+
*
|
|
23
|
+
* @param {number} id
|
|
24
|
+
* @returns {Promise<InvoicesStatic.InvoiceIssued>}
|
|
25
|
+
* @memberof Invoices
|
|
26
|
+
*/
|
|
27
|
+
issue(id: number): Promise<InvoicesStatic.InvoiceIssued>;
|
|
28
|
+
/**
|
|
29
|
+
* Mark an invoice as sent.
|
|
30
|
+
*
|
|
31
|
+
* @param {number} id
|
|
32
|
+
* @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
|
|
33
|
+
* @memberof Invoices
|
|
34
|
+
*/
|
|
35
|
+
markAsSent(id: number): Promise<InvoicesStatic.InvoiceSentAnswer>;
|
|
7
36
|
/**
|
|
8
37
|
* revert a Invoice issue
|
|
9
38
|
*
|
|
@@ -44,4 +73,31 @@ export default class Invoices extends BaseCrud<InvoicesStatic.Invoice, InvoicesS
|
|
|
44
73
|
* @memberof Invoices
|
|
45
74
|
*/
|
|
46
75
|
deletePayment(invoiceId: number, paymentId: number): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a default position for an invoice
|
|
78
|
+
*
|
|
79
|
+
* @param {number} invoiceId
|
|
80
|
+
* @param {PositionsStatic.DefaultPositionCreate} position
|
|
81
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
82
|
+
* @memberof Invoices
|
|
83
|
+
*/
|
|
84
|
+
createDefaultPosition(invoiceId: number, position: PositionsStatic.DefaultPositionCreate): Promise<PositionsStatic.DefaultPosition>;
|
|
85
|
+
/**
|
|
86
|
+
* Create an item position for an invoice
|
|
87
|
+
*
|
|
88
|
+
* @param {number} invoiceId
|
|
89
|
+
* @param {PositionsStatic.ItemPositionCreate} position
|
|
90
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
91
|
+
* @memberof Invoices
|
|
92
|
+
*/
|
|
93
|
+
createItemPosition(invoiceId: number, position: PositionsStatic.ItemPositionCreate): Promise<PositionsStatic.ItemPosition>;
|
|
94
|
+
/**
|
|
95
|
+
* Create a text position for an invoice
|
|
96
|
+
*
|
|
97
|
+
* @param {number} invoiceId
|
|
98
|
+
* @param {PositionsStatic.TextPositionCreate} position
|
|
99
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
100
|
+
* @memberof Invoices
|
|
101
|
+
*/
|
|
102
|
+
createTextPosition(invoiceId: number, position: PositionsStatic.TextPositionCreate): Promise<PositionsStatic.TextPosition>;
|
|
47
103
|
}
|
|
@@ -13,20 +13,63 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const BaseCrud_1 = __importDefault(require("./BaseCrud"));
|
|
16
|
+
const DefaultPositions_1 = __importDefault(require("./DefaultPositions"));
|
|
17
|
+
const ItemPositions_1 = __importDefault(require("./ItemPositions"));
|
|
18
|
+
const TextPositions_1 = __importDefault(require("./TextPositions"));
|
|
16
19
|
class Invoices extends BaseCrud_1.default {
|
|
17
20
|
constructor(apiToken) {
|
|
18
21
|
super(apiToken, "/2.0/kb_invoice");
|
|
19
22
|
}
|
|
20
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Send an invoice by email.
|
|
25
|
+
*
|
|
26
|
+
* @param {number} id
|
|
27
|
+
* @param {Partial<InvoicesStatic.InvoiceSend>} ressource
|
|
28
|
+
* @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
|
|
29
|
+
* @memberof Invoices
|
|
30
|
+
*/
|
|
31
|
+
send(id, ressource) {
|
|
21
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
33
|
return this.request("POST", `${this.apiEndpoint}/${id}/send`, undefined, ressource);
|
|
23
34
|
});
|
|
24
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use `send` instead.
|
|
38
|
+
*/
|
|
39
|
+
sent(id, ressource) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return this.send(id, ressource);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
25
44
|
cancel(id) {
|
|
26
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
46
|
return this.request("POST", `${this.apiEndpoint}/${id}/cancel`);
|
|
28
47
|
});
|
|
29
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Issue an invoice. The invoice must be in the draft status.
|
|
51
|
+
*
|
|
52
|
+
* @param {number} id
|
|
53
|
+
* @returns {Promise<InvoicesStatic.InvoiceIssued>}
|
|
54
|
+
* @memberof Invoices
|
|
55
|
+
*/
|
|
56
|
+
issue(id) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return this.request("POST", `${this.apiEndpoint}/${id}/issue`);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Mark an invoice as sent.
|
|
63
|
+
*
|
|
64
|
+
* @param {number} id
|
|
65
|
+
* @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
|
|
66
|
+
* @memberof Invoices
|
|
67
|
+
*/
|
|
68
|
+
markAsSent(id) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
return this.request("POST", `${this.apiEndpoint}/${id}/mark_as_sent`);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
30
73
|
/**
|
|
31
74
|
* revert a Invoice issue
|
|
32
75
|
*
|
|
@@ -88,6 +131,45 @@ class Invoices extends BaseCrud_1.default {
|
|
|
88
131
|
return this.request("DELETE", `${this.apiEndpoint}/${invoiceId.toString()}/payment/${paymentId.toString()}`);
|
|
89
132
|
});
|
|
90
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Create a default position for an invoice
|
|
136
|
+
*
|
|
137
|
+
* @param {number} invoiceId
|
|
138
|
+
* @param {PositionsStatic.DefaultPositionCreate} position
|
|
139
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
140
|
+
* @memberof Invoices
|
|
141
|
+
*/
|
|
142
|
+
createDefaultPosition(invoiceId, position) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
return new DefaultPositions_1.default(this.apiToken, "kb_invoice", invoiceId).create(position);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Create an item position for an invoice
|
|
149
|
+
*
|
|
150
|
+
* @param {number} invoiceId
|
|
151
|
+
* @param {PositionsStatic.ItemPositionCreate} position
|
|
152
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
153
|
+
* @memberof Invoices
|
|
154
|
+
*/
|
|
155
|
+
createItemPosition(invoiceId, position) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
return new ItemPositions_1.default(this.apiToken, "kb_invoice", invoiceId).create(position);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Create a text position for an invoice
|
|
162
|
+
*
|
|
163
|
+
* @param {number} invoiceId
|
|
164
|
+
* @param {PositionsStatic.TextPositionCreate} position
|
|
165
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
166
|
+
* @memberof Invoices
|
|
167
|
+
*/
|
|
168
|
+
createTextPosition(invoiceId, position) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
return new TextPositions_1.default(this.apiToken, "kb_invoice", invoiceId).create(position);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
91
173
|
}
|
|
92
174
|
exports.default = Invoices;
|
|
93
175
|
//# sourceMappingURL=Invoices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Invoices.js","sourceRoot":"","sources":["../../src/resources/Invoices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,0DAAkC;AAGlC,MAAqB,QAAS,SAAQ,kBAOrC;IACC,YAAY,QAAgB;QAC1B,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IACrC,CAAC;
|
|
1
|
+
{"version":3,"file":"Invoices.js","sourceRoot":"","sources":["../../src/resources/Invoices.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import BaseCrud from "./BaseCrud";
|
|
2
|
+
import { PositionsStatic } from "../interfaces/PositionsStatic";
|
|
3
|
+
import { BaseStatic } from "../interfaces/BaseStatic";
|
|
4
|
+
export default class ItemPositions extends BaseCrud<PositionsStatic.ItemPosition, PositionsStatic.ItemPosition, {}, {}, PositionsStatic.ItemPositionCreate, {}> {
|
|
5
|
+
constructor(apiToken: string, documentType: PositionsStatic.KbDocumentType, documentId: number);
|
|
6
|
+
/**
|
|
7
|
+
* Not implemented by Bexio yet
|
|
8
|
+
*
|
|
9
|
+
* @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
|
|
10
|
+
* @param {BaseStatic.BaseOptions} [options]
|
|
11
|
+
* @returns {Promise<Array<{}>>}
|
|
12
|
+
* @memberof ItemPositions
|
|
13
|
+
*/
|
|
14
|
+
search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<{}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Not implemented by Bexio yet
|
|
17
|
+
*
|
|
18
|
+
* @param {number} id
|
|
19
|
+
* @param {{}} ressource
|
|
20
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
21
|
+
* @memberof ItemPositions
|
|
22
|
+
*/
|
|
23
|
+
overwrite(id: number, ressource: {}): Promise<PositionsStatic.ItemPosition>;
|
|
24
|
+
/**
|
|
25
|
+
* Not implemented by Bexio yet
|
|
26
|
+
*
|
|
27
|
+
* @param {number} id
|
|
28
|
+
* @param {Partial<{}>} ressource
|
|
29
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
30
|
+
* @memberof ItemPositions
|
|
31
|
+
*/
|
|
32
|
+
edit(id: number, ressource: Partial<{}>): Promise<PositionsStatic.ItemPosition>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const BaseCrud_1 = __importDefault(require("./BaseCrud"));
|
|
16
|
+
class ItemPositions extends BaseCrud_1.default {
|
|
17
|
+
constructor(apiToken, documentType, documentId) {
|
|
18
|
+
super(apiToken, `/2.0/${documentType}/${documentId}/kb_position_article`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Not implemented by Bexio yet
|
|
22
|
+
*
|
|
23
|
+
* @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
|
|
24
|
+
* @param {BaseStatic.BaseOptions} [options]
|
|
25
|
+
* @returns {Promise<Array<{}>>}
|
|
26
|
+
* @memberof ItemPositions
|
|
27
|
+
*/
|
|
28
|
+
search(searchOptions, options) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
throw new Error("not implemented by Bexio yet");
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Not implemented by Bexio yet
|
|
35
|
+
*
|
|
36
|
+
* @param {number} id
|
|
37
|
+
* @param {{}} ressource
|
|
38
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
39
|
+
* @memberof ItemPositions
|
|
40
|
+
*/
|
|
41
|
+
overwrite(id, ressource) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
throw new Error("not implemented by Bexio yet");
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Not implemented by Bexio yet
|
|
48
|
+
*
|
|
49
|
+
* @param {number} id
|
|
50
|
+
* @param {Partial<{}>} ressource
|
|
51
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
52
|
+
* @memberof ItemPositions
|
|
53
|
+
*/
|
|
54
|
+
edit(id, ressource) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
throw new Error("not implemented by Bexio yet");
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.default = ItemPositions;
|
|
61
|
+
//# sourceMappingURL=ItemPositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemPositions.js","sourceRoot":"","sources":["../../src/resources/ItemPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0DAAkC;AAIlC,MAAqB,aAAc,SAAQ,kBAO1C;IACC,YACE,QAAgB,EAChB,YAA4C,EAC5C,UAAkB;QAElB,KAAK,CACH,QAAQ,EACR,QAAQ,YAAY,IAAI,UAAU,sBAAsB,CACzD,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACU,MAAM,CACjB,aAAoD,EACpD,OAAgC;;YAEhC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,SAAS,CACpB,EAAU,EACV,SAAa;;YAEb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,IAAI,CACf,EAAU,EACV,SAAsB;;YAEtB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;CACF;AA/DD,gCA+DC"}
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import { OrdersStatic } from "./../interfaces/OrdersStatic";
|
|
2
2
|
import BaseCrud from "./BaseCrud";
|
|
3
|
+
import { PositionsStatic } from "../interfaces/PositionsStatic";
|
|
3
4
|
export default class Orders extends BaseCrud<OrdersStatic.OrderSmall, OrdersStatic.OrderFull, OrdersStatic.OrderSmall, OrdersStatic.OrderSearchParameters, OrdersStatic.OrderCreate, OrdersStatic.OrderCreate> {
|
|
4
5
|
constructor(apiToken: string);
|
|
6
|
+
/**
|
|
7
|
+
* Create a default position for an order
|
|
8
|
+
*
|
|
9
|
+
* @param {number} orderId
|
|
10
|
+
* @param {PositionsStatic.DefaultPositionCreate} position
|
|
11
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
12
|
+
* @memberof Orders
|
|
13
|
+
*/
|
|
14
|
+
createDefaultPosition(orderId: number, position: PositionsStatic.DefaultPositionCreate): Promise<PositionsStatic.DefaultPosition>;
|
|
15
|
+
/**
|
|
16
|
+
* Create an item position for an order
|
|
17
|
+
*
|
|
18
|
+
* @param {number} orderId
|
|
19
|
+
* @param {PositionsStatic.ItemPositionCreate} position
|
|
20
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
21
|
+
* @memberof Orders
|
|
22
|
+
*/
|
|
23
|
+
createItemPosition(orderId: number, position: PositionsStatic.ItemPositionCreate): Promise<PositionsStatic.ItemPosition>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a text position for an order
|
|
26
|
+
*
|
|
27
|
+
* @param {number} orderId
|
|
28
|
+
* @param {PositionsStatic.TextPositionCreate} position
|
|
29
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
30
|
+
* @memberof Orders
|
|
31
|
+
*/
|
|
32
|
+
createTextPosition(orderId: number, position: PositionsStatic.TextPositionCreate): Promise<PositionsStatic.TextPosition>;
|
|
5
33
|
}
|
package/lib/resources/Orders.js
CHANGED
|
@@ -1,13 +1,64 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
5
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
15
|
const BaseCrud_1 = __importDefault(require("./BaseCrud"));
|
|
16
|
+
const DefaultPositions_1 = __importDefault(require("./DefaultPositions"));
|
|
17
|
+
const ItemPositions_1 = __importDefault(require("./ItemPositions"));
|
|
18
|
+
const TextPositions_1 = __importDefault(require("./TextPositions"));
|
|
7
19
|
class Orders extends BaseCrud_1.default {
|
|
8
20
|
constructor(apiToken) {
|
|
9
21
|
super(apiToken, "/2.0/kb_order");
|
|
10
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Create a default position for an order
|
|
25
|
+
*
|
|
26
|
+
* @param {number} orderId
|
|
27
|
+
* @param {PositionsStatic.DefaultPositionCreate} position
|
|
28
|
+
* @returns {Promise<PositionsStatic.DefaultPosition>}
|
|
29
|
+
* @memberof Orders
|
|
30
|
+
*/
|
|
31
|
+
createDefaultPosition(orderId, position) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return new DefaultPositions_1.default(this.apiToken, "kb_order", orderId).create(position);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Create an item position for an order
|
|
38
|
+
*
|
|
39
|
+
* @param {number} orderId
|
|
40
|
+
* @param {PositionsStatic.ItemPositionCreate} position
|
|
41
|
+
* @returns {Promise<PositionsStatic.ItemPosition>}
|
|
42
|
+
* @memberof Orders
|
|
43
|
+
*/
|
|
44
|
+
createItemPosition(orderId, position) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return new ItemPositions_1.default(this.apiToken, "kb_order", orderId).create(position);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Create a text position for an order
|
|
51
|
+
*
|
|
52
|
+
* @param {number} orderId
|
|
53
|
+
* @param {PositionsStatic.TextPositionCreate} position
|
|
54
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
55
|
+
* @memberof Orders
|
|
56
|
+
*/
|
|
57
|
+
createTextPosition(orderId, position) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return new TextPositions_1.default(this.apiToken, "kb_order", orderId).create(position);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
11
62
|
}
|
|
12
63
|
exports.default = Orders;
|
|
13
64
|
//# sourceMappingURL=Orders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Orders.js","sourceRoot":"","sources":["../../src/resources/Orders.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Orders.js","sourceRoot":"","sources":["../../src/resources/Orders.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,0DAAkC;AAElC,0EAAkD;AAClD,oEAA4C;AAC5C,oEAA4C;AAE5C,MAAqB,MAAO,SAAQ,kBAOnC;IACC,YAAY,QAAgB;QAC1B,KAAK,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;;OAOG;IACU,qBAAqB,CAChC,OAAe,EACf,QAA+C;;YAE/C,OAAO,IAAI,0BAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,MAAM,CACpE,QAAQ,CACT,CAAC;QACJ,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,kBAAkB,CAC7B,OAAe,EACf,QAA4C;;YAE5C,OAAO,IAAI,uBAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,MAAM,CACjE,QAAQ,CACT,CAAC;QACJ,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,kBAAkB,CAC7B,OAAe,EACf,QAA4C;;YAE5C,OAAO,IAAI,uBAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,MAAM,CACjE,QAAQ,CACT,CAAC;QACJ,CAAC;KAAA;CACF;AA9DD,yBA8DC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import BaseCrud from "./BaseCrud";
|
|
2
|
+
import { PositionsStatic } from "../interfaces/PositionsStatic";
|
|
3
|
+
import { BaseStatic } from "../interfaces/BaseStatic";
|
|
4
|
+
export default class TextPositions extends BaseCrud<PositionsStatic.TextPosition, PositionsStatic.TextPosition, {}, {}, PositionsStatic.TextPositionCreate, {}> {
|
|
5
|
+
constructor(apiToken: string, documentType: PositionsStatic.KbDocumentType, documentId: number);
|
|
6
|
+
/**
|
|
7
|
+
* Not implemented by Bexio yet
|
|
8
|
+
*
|
|
9
|
+
* @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
|
|
10
|
+
* @param {BaseStatic.BaseOptions} [options]
|
|
11
|
+
* @returns {Promise<Array<{}>>}
|
|
12
|
+
* @memberof TextPositions
|
|
13
|
+
*/
|
|
14
|
+
search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<{}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Not implemented by Bexio yet
|
|
17
|
+
*
|
|
18
|
+
* @param {number} id
|
|
19
|
+
* @param {{}} ressource
|
|
20
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
21
|
+
* @memberof TextPositions
|
|
22
|
+
*/
|
|
23
|
+
overwrite(id: number, ressource: {}): Promise<PositionsStatic.TextPosition>;
|
|
24
|
+
/**
|
|
25
|
+
* Not implemented by Bexio yet
|
|
26
|
+
*
|
|
27
|
+
* @param {number} id
|
|
28
|
+
* @param {Partial<{}>} ressource
|
|
29
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
30
|
+
* @memberof TextPositions
|
|
31
|
+
*/
|
|
32
|
+
edit(id: number, ressource: Partial<{}>): Promise<PositionsStatic.TextPosition>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const BaseCrud_1 = __importDefault(require("./BaseCrud"));
|
|
16
|
+
class TextPositions extends BaseCrud_1.default {
|
|
17
|
+
constructor(apiToken, documentType, documentId) {
|
|
18
|
+
super(apiToken, `/2.0/${documentType}/${documentId}/kb_position_text`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Not implemented by Bexio yet
|
|
22
|
+
*
|
|
23
|
+
* @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
|
|
24
|
+
* @param {BaseStatic.BaseOptions} [options]
|
|
25
|
+
* @returns {Promise<Array<{}>>}
|
|
26
|
+
* @memberof TextPositions
|
|
27
|
+
*/
|
|
28
|
+
search(searchOptions, options) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
throw new Error("not implemented by Bexio yet");
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Not implemented by Bexio yet
|
|
35
|
+
*
|
|
36
|
+
* @param {number} id
|
|
37
|
+
* @param {{}} ressource
|
|
38
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
39
|
+
* @memberof TextPositions
|
|
40
|
+
*/
|
|
41
|
+
overwrite(id, ressource) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
throw new Error("not implemented by Bexio yet");
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Not implemented by Bexio yet
|
|
48
|
+
*
|
|
49
|
+
* @param {number} id
|
|
50
|
+
* @param {Partial<{}>} ressource
|
|
51
|
+
* @returns {Promise<PositionsStatic.TextPosition>}
|
|
52
|
+
* @memberof TextPositions
|
|
53
|
+
*/
|
|
54
|
+
edit(id, ressource) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
throw new Error("not implemented by Bexio yet");
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.default = TextPositions;
|
|
61
|
+
//# sourceMappingURL=TextPositions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextPositions.js","sourceRoot":"","sources":["../../src/resources/TextPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0DAAkC;AAIlC,MAAqB,aAAc,SAAQ,kBAO1C;IACC,YACE,QAAgB,EAChB,YAA4C,EAC5C,UAAkB;QAElB,KAAK,CACH,QAAQ,EACR,QAAQ,YAAY,IAAI,UAAU,mBAAmB,CACtD,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACU,MAAM,CACjB,aAAoD,EACpD,OAAgC;;YAEhC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,SAAS,CACpB,EAAU,EACV,SAAa;;YAEb,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;IAED;;;;;;;OAOG;IACU,IAAI,CACf,EAAU,EACV,SAAsB;;YAEtB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;KAAA;CACF;AA/DD,gCA+DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|