@kommerz/ts-client 1.182.1 → 1.183.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/OffersApi.d.ts +11 -0
- package/dist/apis/OffersApi.js +46 -0
- package/dist/models/InvoiceDto.d.ts +7 -0
- package/dist/models/InvoiceDto.js +3 -0
- package/dist/models/SkontoDto.d.ts +37 -0
- package/dist/models/SkontoDto.js +54 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
package/dist/apis/OffersApi.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export interface DeleteOfferRequest {
|
|
|
19
19
|
export interface DownloadOfferRequest {
|
|
20
20
|
id: string;
|
|
21
21
|
}
|
|
22
|
+
export interface DuplicateOfferRequest {
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
22
25
|
export interface FinalizeOfferRequest {
|
|
23
26
|
id: string;
|
|
24
27
|
}
|
|
@@ -66,6 +69,14 @@ export declare class OffersApi extends runtime.BaseAPI {
|
|
|
66
69
|
* download offer
|
|
67
70
|
*/
|
|
68
71
|
downloadOffer(requestParameters: DownloadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
|
|
72
|
+
/**
|
|
73
|
+
* get offer dto prepared as a template for a new offer
|
|
74
|
+
*/
|
|
75
|
+
duplicateOfferRaw(requestParameters: DuplicateOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OfferDto>>;
|
|
76
|
+
/**
|
|
77
|
+
* get offer dto prepared as a template for a new offer
|
|
78
|
+
*/
|
|
79
|
+
duplicateOffer(requestParameters: DuplicateOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OfferDto>;
|
|
69
80
|
/**
|
|
70
81
|
* finalize offer
|
|
71
82
|
*/
|
package/dist/apis/OffersApi.js
CHANGED
|
@@ -211,6 +211,52 @@ var OffersApi = /** @class */ (function (_super) {
|
|
|
211
211
|
});
|
|
212
212
|
});
|
|
213
213
|
};
|
|
214
|
+
/**
|
|
215
|
+
* get offer dto prepared as a template for a new offer
|
|
216
|
+
*/
|
|
217
|
+
OffersApi.prototype.duplicateOfferRaw = function (requestParameters, initOverrides) {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
219
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
220
|
+
return __generator(this, function (_a) {
|
|
221
|
+
switch (_a.label) {
|
|
222
|
+
case 0:
|
|
223
|
+
if (requestParameters['id'] == null) {
|
|
224
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling duplicateOffer().');
|
|
225
|
+
}
|
|
226
|
+
queryParameters = {};
|
|
227
|
+
headerParameters = {};
|
|
228
|
+
urlPath = "/ui/offers/v1/{id}/duplicate";
|
|
229
|
+
urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
|
|
230
|
+
return [4 /*yield*/, this.request({
|
|
231
|
+
path: urlPath,
|
|
232
|
+
method: 'GET',
|
|
233
|
+
headers: headerParameters,
|
|
234
|
+
query: queryParameters,
|
|
235
|
+
}, initOverrides)];
|
|
236
|
+
case 1:
|
|
237
|
+
response = _a.sent();
|
|
238
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.OfferDtoFromJSON)(jsonValue); })];
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* get offer dto prepared as a template for a new offer
|
|
245
|
+
*/
|
|
246
|
+
OffersApi.prototype.duplicateOffer = function (requestParameters, initOverrides) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
248
|
+
var response;
|
|
249
|
+
return __generator(this, function (_a) {
|
|
250
|
+
switch (_a.label) {
|
|
251
|
+
case 0: return [4 /*yield*/, this.duplicateOfferRaw(requestParameters, initOverrides)];
|
|
252
|
+
case 1:
|
|
253
|
+
response = _a.sent();
|
|
254
|
+
return [4 /*yield*/, response.value()];
|
|
255
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
};
|
|
214
260
|
/**
|
|
215
261
|
* finalize offer
|
|
216
262
|
*/
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
11
|
import type { InvoiceItemDto } from './InvoiceItemDto';
|
|
12
|
+
import type { SkontoDto } from './SkontoDto';
|
|
12
13
|
import type { InvoiceTextFieldsDto } from './InvoiceTextFieldsDto';
|
|
13
14
|
import type { AmountDto } from './AmountDto';
|
|
14
15
|
import type { AddressDto } from './AddressDto';
|
|
@@ -194,6 +195,12 @@ export interface InvoiceDto {
|
|
|
194
195
|
* @memberof InvoiceDto
|
|
195
196
|
*/
|
|
196
197
|
facturX?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* cash discount terms (Skonto), each granting a percentage discount when paid within the given days after the invoice date
|
|
200
|
+
* @type {Array<SkontoDto>}
|
|
201
|
+
* @memberof InvoiceDto
|
|
202
|
+
*/
|
|
203
|
+
skonto?: Array<SkontoDto>;
|
|
197
204
|
}
|
|
198
205
|
/**
|
|
199
206
|
* Check if a given object implements the InvoiceDto interface.
|
|
@@ -18,6 +18,7 @@ exports.InvoiceDtoFromJSONTyped = InvoiceDtoFromJSONTyped;
|
|
|
18
18
|
exports.InvoiceDtoToJSON = InvoiceDtoToJSON;
|
|
19
19
|
exports.InvoiceDtoToJSONTyped = InvoiceDtoToJSONTyped;
|
|
20
20
|
var InvoiceItemDto_1 = require("./InvoiceItemDto");
|
|
21
|
+
var SkontoDto_1 = require("./SkontoDto");
|
|
21
22
|
var InvoiceTextFieldsDto_1 = require("./InvoiceTextFieldsDto");
|
|
22
23
|
var AmountDto_1 = require("./AmountDto");
|
|
23
24
|
var AddressDto_1 = require("./AddressDto");
|
|
@@ -72,6 +73,7 @@ function InvoiceDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
72
73
|
'type': json['type'] == null ? undefined : (0, InvoiceType_1.InvoiceTypeFromJSON)(json['type']),
|
|
73
74
|
'showGross': json['showGross'] == null ? undefined : json['showGross'],
|
|
74
75
|
'facturX': json['facturX'] == null ? undefined : json['facturX'],
|
|
76
|
+
'skonto': json['skonto'] == null ? undefined : (json['skonto'].map(SkontoDto_1.SkontoDtoFromJSON)),
|
|
75
77
|
};
|
|
76
78
|
}
|
|
77
79
|
function InvoiceDtoToJSON(json) {
|
|
@@ -101,5 +103,6 @@ function InvoiceDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
101
103
|
'type': (0, InvoiceType_1.InvoiceTypeToJSON)(value['type']),
|
|
102
104
|
'showGross': value['showGross'],
|
|
103
105
|
'facturX': value['facturX'],
|
|
106
|
+
'skonto': value['skonto'] == null ? undefined : (value['skonto'].map(SkontoDto_1.SkontoDtoToJSON)),
|
|
104
107
|
};
|
|
105
108
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
* @interface SkontoDto
|
|
15
|
+
*/
|
|
16
|
+
export interface SkontoDto {
|
|
17
|
+
/**
|
|
18
|
+
* number of days after the invoice date within which the cash discount applies
|
|
19
|
+
* @type {number}
|
|
20
|
+
* @memberof SkontoDto
|
|
21
|
+
*/
|
|
22
|
+
days: number;
|
|
23
|
+
/**
|
|
24
|
+
* cash discount in percent (more than 0 up to 100)
|
|
25
|
+
* @type {number}
|
|
26
|
+
* @memberof SkontoDto
|
|
27
|
+
*/
|
|
28
|
+
percent: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SkontoDto interface.
|
|
32
|
+
*/
|
|
33
|
+
export declare function instanceOfSkontoDto(value: object): value is SkontoDto;
|
|
34
|
+
export declare function SkontoDtoFromJSON(json: any): SkontoDto;
|
|
35
|
+
export declare function SkontoDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkontoDto;
|
|
36
|
+
export declare function SkontoDtoToJSON(json: any): SkontoDto;
|
|
37
|
+
export declare function SkontoDtoToJSONTyped(value?: SkontoDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
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.instanceOfSkontoDto = instanceOfSkontoDto;
|
|
16
|
+
exports.SkontoDtoFromJSON = SkontoDtoFromJSON;
|
|
17
|
+
exports.SkontoDtoFromJSONTyped = SkontoDtoFromJSONTyped;
|
|
18
|
+
exports.SkontoDtoToJSON = SkontoDtoToJSON;
|
|
19
|
+
exports.SkontoDtoToJSONTyped = SkontoDtoToJSONTyped;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the SkontoDto interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfSkontoDto(value) {
|
|
24
|
+
if (!('days' in value) || value['days'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('percent' in value) || value['percent'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function SkontoDtoFromJSON(json) {
|
|
31
|
+
return SkontoDtoFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function SkontoDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'days': json['days'],
|
|
39
|
+
'percent': json['percent'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function SkontoDtoToJSON(json) {
|
|
43
|
+
return SkontoDtoToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function SkontoDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
46
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'days': value['days'],
|
|
52
|
+
'percent': value['percent'],
|
|
53
|
+
};
|
|
54
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -255,6 +255,7 @@ export * from './RegisterUserDto';
|
|
|
255
255
|
export * from './RoleDto';
|
|
256
256
|
export * from './RunWorkflowRequest';
|
|
257
257
|
export * from './ShareOfferDto';
|
|
258
|
+
export * from './SkontoDto';
|
|
258
259
|
export * from './SortDirection';
|
|
259
260
|
export * from './StatisticsDataEntry';
|
|
260
261
|
export * from './StatisticsDefinitionDto';
|
package/dist/models/index.js
CHANGED
|
@@ -273,6 +273,7 @@ __exportStar(require("./RegisterUserDto"), exports);
|
|
|
273
273
|
__exportStar(require("./RoleDto"), exports);
|
|
274
274
|
__exportStar(require("./RunWorkflowRequest"), exports);
|
|
275
275
|
__exportStar(require("./ShareOfferDto"), exports);
|
|
276
|
+
__exportStar(require("./SkontoDto"), exports);
|
|
276
277
|
__exportStar(require("./SortDirection"), exports);
|
|
277
278
|
__exportStar(require("./StatisticsDataEntry"), exports);
|
|
278
279
|
__exportStar(require("./StatisticsDefinitionDto"), exports);
|