@kommerz/ts-client 1.176.0 → 1.177.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/dist/apis/InvoicesApi.d.ts +12 -1
- package/dist/apis/InvoicesApi.js +46 -0
- package/dist/models/InvoiceDto.d.ts +6 -0
- package/dist/models/InvoiceDto.js +2 -0
- package/dist/models/InvoiceValidationCheck.d.ts +38 -0
- package/dist/models/InvoiceValidationCheck.js +64 -0
- package/dist/models/InvoiceValidationResult.d.ts +32 -0
- package/dist/models/InvoiceValidationResult.js +49 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
11
|
import * as runtime from '../runtime';
|
|
12
|
-
import type { GetAllInvoices200Response, InvoiceDto, KommerzPageable, MarkInvoiceAsPaidRequest } from '../models/index';
|
|
12
|
+
import type { GetAllInvoices200Response, InvoiceDto, InvoiceValidationResult, KommerzPageable, MarkInvoiceAsPaidRequest } from '../models/index';
|
|
13
13
|
export interface CreateInvoiceRequest {
|
|
14
14
|
invoiceDto: Omit<InvoiceDto, 'id' | 'version' | 'finalized' | 'dueDate' | 'invoiceDate' | 'invoiceNumber' | 'total' | 'paidTotal' | 'paidAt' | 'paidBy' | 'fileId'>;
|
|
15
15
|
}
|
|
@@ -42,6 +42,9 @@ export interface UpdateInvoiceRequest {
|
|
|
42
42
|
invoiceDto: Omit<InvoiceDto, 'id' | 'version' | 'finalized' | 'dueDate' | 'invoiceDate' | 'invoiceNumber' | 'total' | 'paidTotal' | 'paidAt' | 'paidBy' | 'fileId'>;
|
|
43
43
|
force?: boolean;
|
|
44
44
|
}
|
|
45
|
+
export interface ValidateInvoiceRequest {
|
|
46
|
+
id: string;
|
|
47
|
+
}
|
|
45
48
|
/**
|
|
46
49
|
*
|
|
47
50
|
*/
|
|
@@ -118,4 +121,12 @@ export declare class InvoicesApi extends runtime.BaseAPI {
|
|
|
118
121
|
* Update an invoice
|
|
119
122
|
*/
|
|
120
123
|
updateInvoice(requestParameters: UpdateInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvoiceDto>;
|
|
124
|
+
/**
|
|
125
|
+
* validate invoice
|
|
126
|
+
*/
|
|
127
|
+
validateInvoiceRaw(requestParameters: ValidateInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvoiceValidationResult>>;
|
|
128
|
+
/**
|
|
129
|
+
* validate invoice
|
|
130
|
+
*/
|
|
131
|
+
validateInvoice(requestParameters: ValidateInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvoiceValidationResult>;
|
|
121
132
|
}
|
package/dist/apis/InvoicesApi.js
CHANGED
|
@@ -508,6 +508,52 @@ var InvoicesApi = /** @class */ (function (_super) {
|
|
|
508
508
|
});
|
|
509
509
|
});
|
|
510
510
|
};
|
|
511
|
+
/**
|
|
512
|
+
* validate invoice
|
|
513
|
+
*/
|
|
514
|
+
InvoicesApi.prototype.validateInvoiceRaw = function (requestParameters, initOverrides) {
|
|
515
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
516
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
517
|
+
return __generator(this, function (_a) {
|
|
518
|
+
switch (_a.label) {
|
|
519
|
+
case 0:
|
|
520
|
+
if (requestParameters['id'] == null) {
|
|
521
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling validateInvoice().');
|
|
522
|
+
}
|
|
523
|
+
queryParameters = {};
|
|
524
|
+
headerParameters = {};
|
|
525
|
+
urlPath = "/ui/invoices/v1/{id}/validate";
|
|
526
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
527
|
+
return [4 /*yield*/, this.request({
|
|
528
|
+
path: urlPath,
|
|
529
|
+
method: 'POST',
|
|
530
|
+
headers: headerParameters,
|
|
531
|
+
query: queryParameters,
|
|
532
|
+
}, initOverrides)];
|
|
533
|
+
case 1:
|
|
534
|
+
response = _a.sent();
|
|
535
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.InvoiceValidationResultFromJSON)(jsonValue); })];
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* validate invoice
|
|
542
|
+
*/
|
|
543
|
+
InvoicesApi.prototype.validateInvoice = function (requestParameters, initOverrides) {
|
|
544
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
545
|
+
var response;
|
|
546
|
+
return __generator(this, function (_a) {
|
|
547
|
+
switch (_a.label) {
|
|
548
|
+
case 0: return [4 /*yield*/, this.validateInvoiceRaw(requestParameters, initOverrides)];
|
|
549
|
+
case 1:
|
|
550
|
+
response = _a.sent();
|
|
551
|
+
return [4 /*yield*/, response.value()];
|
|
552
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
});
|
|
556
|
+
};
|
|
511
557
|
return InvoicesApi;
|
|
512
558
|
}(runtime.BaseAPI));
|
|
513
559
|
exports.InvoicesApi = InvoicesApi;
|
|
@@ -188,6 +188,12 @@ export interface InvoiceDto {
|
|
|
188
188
|
* @memberof InvoiceDto
|
|
189
189
|
*/
|
|
190
190
|
showGross?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* whether the invoice is issued as a factur-X/ZUGFeRD e-invoice; only then the additional fields the German business rules demand are required, defaults to false
|
|
193
|
+
* @type {boolean}
|
|
194
|
+
* @memberof InvoiceDto
|
|
195
|
+
*/
|
|
196
|
+
facturX?: boolean;
|
|
191
197
|
}
|
|
192
198
|
/**
|
|
193
199
|
* Check if a given object implements the InvoiceDto interface.
|
|
@@ -71,6 +71,7 @@ function InvoiceDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
71
71
|
'referencedInvoiceId': json['referencedInvoiceId'] == null ? undefined : json['referencedInvoiceId'],
|
|
72
72
|
'type': json['type'] == null ? undefined : (0, InvoiceType_1.InvoiceTypeFromJSON)(json['type']),
|
|
73
73
|
'showGross': json['showGross'] == null ? undefined : json['showGross'],
|
|
74
|
+
'facturX': json['facturX'] == null ? undefined : json['facturX'],
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
function InvoiceDtoToJSON(json) {
|
|
@@ -99,5 +100,6 @@ function InvoiceDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
99
100
|
'referencedInvoiceId': value['referencedInvoiceId'],
|
|
100
101
|
'type': (0, InvoiceType_1.InvoiceTypeToJSON)(value['type']),
|
|
101
102
|
'showGross': value['showGross'],
|
|
103
|
+
'facturX': value['facturX'],
|
|
102
104
|
};
|
|
103
105
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kommerz API Specification
|
|
3
|
+
* API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
|
|
4
|
+
*
|
|
5
|
+
* Contact: info@kommerz.app
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
*/
|
|
15
|
+
export declare const InvoiceValidationCheck: {
|
|
16
|
+
readonly TenantName: "TENANT_NAME";
|
|
17
|
+
readonly TenantZipCode: "TENANT_ZIP_CODE";
|
|
18
|
+
readonly TenantCity: "TENANT_CITY";
|
|
19
|
+
readonly TenantCountry: "TENANT_COUNTRY";
|
|
20
|
+
readonly TenantTaxIdentifier: "TENANT_TAX_IDENTIFIER";
|
|
21
|
+
readonly TenantPhoneNumber: "TENANT_PHONE_NUMBER";
|
|
22
|
+
readonly TenantEmail: "TENANT_EMAIL";
|
|
23
|
+
readonly TenantIban: "TENANT_IBAN";
|
|
24
|
+
readonly CustomerName: "CUSTOMER_NAME";
|
|
25
|
+
readonly CustomerZipCode: "CUSTOMER_ZIP_CODE";
|
|
26
|
+
readonly CustomerCity: "CUSTOMER_CITY";
|
|
27
|
+
readonly CustomerCountry: "CUSTOMER_COUNTRY";
|
|
28
|
+
readonly CustomerEmail: "CUSTOMER_EMAIL";
|
|
29
|
+
readonly ReferencedInvoice: "REFERENCED_INVOICE";
|
|
30
|
+
readonly DiscountReason: "DISCOUNT_REASON";
|
|
31
|
+
readonly SmallBusinessNote: "SMALL_BUSINESS_NOTE";
|
|
32
|
+
};
|
|
33
|
+
export type InvoiceValidationCheck = typeof InvoiceValidationCheck[keyof typeof InvoiceValidationCheck];
|
|
34
|
+
export declare function instanceOfInvoiceValidationCheck(value: any): boolean;
|
|
35
|
+
export declare function InvoiceValidationCheckFromJSON(json: any): InvoiceValidationCheck;
|
|
36
|
+
export declare function InvoiceValidationCheckFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceValidationCheck;
|
|
37
|
+
export declare function InvoiceValidationCheckToJSON(value?: InvoiceValidationCheck | null): any;
|
|
38
|
+
export declare function InvoiceValidationCheckToJSONTyped(value: any, ignoreDiscriminator: boolean): InvoiceValidationCheck;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Kommerz API Specification
|
|
6
|
+
* API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
|
|
7
|
+
*
|
|
8
|
+
* Contact: info@kommerz.app
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.InvoiceValidationCheck = void 0;
|
|
16
|
+
exports.instanceOfInvoiceValidationCheck = instanceOfInvoiceValidationCheck;
|
|
17
|
+
exports.InvoiceValidationCheckFromJSON = InvoiceValidationCheckFromJSON;
|
|
18
|
+
exports.InvoiceValidationCheckFromJSONTyped = InvoiceValidationCheckFromJSONTyped;
|
|
19
|
+
exports.InvoiceValidationCheckToJSON = InvoiceValidationCheckToJSON;
|
|
20
|
+
exports.InvoiceValidationCheckToJSONTyped = InvoiceValidationCheckToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.InvoiceValidationCheck = {
|
|
26
|
+
TenantName: 'TENANT_NAME',
|
|
27
|
+
TenantZipCode: 'TENANT_ZIP_CODE',
|
|
28
|
+
TenantCity: 'TENANT_CITY',
|
|
29
|
+
TenantCountry: 'TENANT_COUNTRY',
|
|
30
|
+
TenantTaxIdentifier: 'TENANT_TAX_IDENTIFIER',
|
|
31
|
+
TenantPhoneNumber: 'TENANT_PHONE_NUMBER',
|
|
32
|
+
TenantEmail: 'TENANT_EMAIL',
|
|
33
|
+
TenantIban: 'TENANT_IBAN',
|
|
34
|
+
CustomerName: 'CUSTOMER_NAME',
|
|
35
|
+
CustomerZipCode: 'CUSTOMER_ZIP_CODE',
|
|
36
|
+
CustomerCity: 'CUSTOMER_CITY',
|
|
37
|
+
CustomerCountry: 'CUSTOMER_COUNTRY',
|
|
38
|
+
CustomerEmail: 'CUSTOMER_EMAIL',
|
|
39
|
+
ReferencedInvoice: 'REFERENCED_INVOICE',
|
|
40
|
+
DiscountReason: 'DISCOUNT_REASON',
|
|
41
|
+
SmallBusinessNote: 'SMALL_BUSINESS_NOTE'
|
|
42
|
+
};
|
|
43
|
+
function instanceOfInvoiceValidationCheck(value) {
|
|
44
|
+
for (var key in exports.InvoiceValidationCheck) {
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(exports.InvoiceValidationCheck, key)) {
|
|
46
|
+
if (exports.InvoiceValidationCheck[key] === value) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
function InvoiceValidationCheckFromJSON(json) {
|
|
54
|
+
return InvoiceValidationCheckFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function InvoiceValidationCheckFromJSONTyped(json, ignoreDiscriminator) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
function InvoiceValidationCheckToJSON(value) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
function InvoiceValidationCheckToJSONTyped(value, ignoreDiscriminator) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kommerz API Specification
|
|
3
|
+
* API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
|
|
4
|
+
*
|
|
5
|
+
* Contact: info@kommerz.app
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
import type { InvoiceValidationCheck } from './InvoiceValidationCheck';
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface InvoiceValidationResult
|
|
16
|
+
*/
|
|
17
|
+
export interface InvoiceValidationResult {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {Array<InvoiceValidationCheck>}
|
|
21
|
+
* @memberof InvoiceValidationResult
|
|
22
|
+
*/
|
|
23
|
+
failedChecks?: Array<InvoiceValidationCheck>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the InvoiceValidationResult interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfInvoiceValidationResult(value: object): value is InvoiceValidationResult;
|
|
29
|
+
export declare function InvoiceValidationResultFromJSON(json: any): InvoiceValidationResult;
|
|
30
|
+
export declare function InvoiceValidationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceValidationResult;
|
|
31
|
+
export declare function InvoiceValidationResultToJSON(json: any): InvoiceValidationResult;
|
|
32
|
+
export declare function InvoiceValidationResultToJSONTyped(value?: InvoiceValidationResult | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Kommerz API Specification
|
|
6
|
+
* API specification for Kommerz Services. - /ui/ for services consumed by the frontend - /intern/ for internal administration endpoints - /extern/ for services consumed by external services - /stats/ for monitoring endpoints - /actuator/ for health endpoints (e.g. /actuator/health ) All endpoints are postfixed with a version number.
|
|
7
|
+
*
|
|
8
|
+
* Contact: info@kommerz.app
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.instanceOfInvoiceValidationResult = instanceOfInvoiceValidationResult;
|
|
16
|
+
exports.InvoiceValidationResultFromJSON = InvoiceValidationResultFromJSON;
|
|
17
|
+
exports.InvoiceValidationResultFromJSONTyped = InvoiceValidationResultFromJSONTyped;
|
|
18
|
+
exports.InvoiceValidationResultToJSON = InvoiceValidationResultToJSON;
|
|
19
|
+
exports.InvoiceValidationResultToJSONTyped = InvoiceValidationResultToJSONTyped;
|
|
20
|
+
var InvoiceValidationCheck_1 = require("./InvoiceValidationCheck");
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the InvoiceValidationResult interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfInvoiceValidationResult(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function InvoiceValidationResultFromJSON(json) {
|
|
28
|
+
return InvoiceValidationResultFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function InvoiceValidationResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'failedChecks': json['failedChecks'] == null ? undefined : (json['failedChecks'].map(InvoiceValidationCheck_1.InvoiceValidationCheckFromJSON)),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function InvoiceValidationResultToJSON(json) {
|
|
39
|
+
return InvoiceValidationResultToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function InvoiceValidationResultToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'failedChecks': value['failedChecks'] == null ? undefined : (value['failedChecks'].map(InvoiceValidationCheck_1.InvoiceValidationCheckToJSON)),
|
|
48
|
+
};
|
|
49
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -188,6 +188,8 @@ export * from './InvoiceItemDto';
|
|
|
188
188
|
export * from './InvoiceTaxItemDto';
|
|
189
189
|
export * from './InvoiceTextFieldsDto';
|
|
190
190
|
export * from './InvoiceType';
|
|
191
|
+
export * from './InvoiceValidationCheck';
|
|
192
|
+
export * from './InvoiceValidationResult';
|
|
191
193
|
export * from './JobDto';
|
|
192
194
|
export * from './KanbanBoardDto';
|
|
193
195
|
export * from './KanbanCardDto';
|
package/dist/models/index.js
CHANGED
|
@@ -206,6 +206,8 @@ __exportStar(require("./InvoiceItemDto"), exports);
|
|
|
206
206
|
__exportStar(require("./InvoiceTaxItemDto"), exports);
|
|
207
207
|
__exportStar(require("./InvoiceTextFieldsDto"), exports);
|
|
208
208
|
__exportStar(require("./InvoiceType"), exports);
|
|
209
|
+
__exportStar(require("./InvoiceValidationCheck"), exports);
|
|
210
|
+
__exportStar(require("./InvoiceValidationResult"), exports);
|
|
209
211
|
__exportStar(require("./JobDto"), exports);
|
|
210
212
|
__exportStar(require("./KanbanBoardDto"), exports);
|
|
211
213
|
__exportStar(require("./KanbanCardDto"), exports);
|