@kommerz/ts-client 1.183.0 → 1.184.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.
@@ -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, InvoiceValidationResult, KommerzPageable, MarkInvoiceAsPaidRequest } from '../models/index';
12
+ import type { GetAllInvoices200Response, InvoiceDto, InvoicePortalShareConfigDto, InvoiceValidationResult, KommerzPageable, MarkInvoiceAsPaidRequest, ShareInvoiceDto } 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
  }
@@ -37,6 +37,10 @@ export interface MarkInvoiceAsPaidOperationRequest {
37
37
  markInvoiceAsPaidRequest: MarkInvoiceAsPaidRequest;
38
38
  force?: boolean;
39
39
  }
40
+ export interface ShareInvoiceRequest {
41
+ id: string;
42
+ invoicePortalShareConfigDto: InvoicePortalShareConfigDto;
43
+ }
40
44
  export interface UpdateInvoiceRequest {
41
45
  id: string;
42
46
  invoiceDto: Omit<InvoiceDto, 'id' | 'version' | 'finalized' | 'dueDate' | 'invoiceDate' | 'invoiceNumber' | 'total' | 'paidTotal' | 'paidAt' | 'paidBy' | 'fileId'>;
@@ -113,6 +117,14 @@ export declare class InvoicesApi extends runtime.BaseAPI {
113
117
  * mark Invoice as paid
114
118
  */
115
119
  markInvoiceAsPaid(requestParameters: MarkInvoiceAsPaidOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvoiceDto>;
120
+ /**
121
+ * send invoice via email
122
+ */
123
+ shareInvoiceRaw(requestParameters: ShareInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ShareInvoiceDto>>;
124
+ /**
125
+ * send invoice via email
126
+ */
127
+ shareInvoice(requestParameters: ShareInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ShareInvoiceDto>;
116
128
  /**
117
129
  * Update an invoice
118
130
  */
@@ -454,6 +454,57 @@ var InvoicesApi = /** @class */ (function (_super) {
454
454
  });
455
455
  });
456
456
  };
457
+ /**
458
+ * send invoice via email
459
+ */
460
+ InvoicesApi.prototype.shareInvoiceRaw = function (requestParameters, initOverrides) {
461
+ return __awaiter(this, void 0, void 0, function () {
462
+ var queryParameters, headerParameters, urlPath, response;
463
+ return __generator(this, function (_a) {
464
+ switch (_a.label) {
465
+ case 0:
466
+ if (requestParameters['id'] == null) {
467
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling shareInvoice().');
468
+ }
469
+ if (requestParameters['invoicePortalShareConfigDto'] == null) {
470
+ throw new runtime.RequiredError('invoicePortalShareConfigDto', 'Required parameter "invoicePortalShareConfigDto" was null or undefined when calling shareInvoice().');
471
+ }
472
+ queryParameters = {};
473
+ headerParameters = {};
474
+ headerParameters['Content-Type'] = 'application/json';
475
+ urlPath = "/ui/invoices/v1/{id}/share";
476
+ urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
477
+ return [4 /*yield*/, this.request({
478
+ path: urlPath,
479
+ method: 'POST',
480
+ headers: headerParameters,
481
+ query: queryParameters,
482
+ body: (0, index_1.InvoicePortalShareConfigDtoToJSON)(requestParameters['invoicePortalShareConfigDto']),
483
+ }, initOverrides)];
484
+ case 1:
485
+ response = _a.sent();
486
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ShareInvoiceDtoFromJSON)(jsonValue); })];
487
+ }
488
+ });
489
+ });
490
+ };
491
+ /**
492
+ * send invoice via email
493
+ */
494
+ InvoicesApi.prototype.shareInvoice = function (requestParameters, initOverrides) {
495
+ return __awaiter(this, void 0, void 0, function () {
496
+ var response;
497
+ return __generator(this, function (_a) {
498
+ switch (_a.label) {
499
+ case 0: return [4 /*yield*/, this.shareInvoiceRaw(requestParameters, initOverrides)];
500
+ case 1:
501
+ response = _a.sent();
502
+ return [4 /*yield*/, response.value()];
503
+ case 2: return [2 /*return*/, _a.sent()];
504
+ }
505
+ });
506
+ });
507
+ };
457
508
  /**
458
509
  * Update an invoice
459
510
  */
@@ -29,6 +29,8 @@ export declare const ActivityType: {
29
29
  readonly Added: "Added";
30
30
  readonly Removed: "Removed";
31
31
  readonly Moved: "Moved";
32
+ readonly DeliveryFailed: "DeliveryFailed";
33
+ readonly Sent: "Sent";
32
34
  };
33
35
  export type ActivityType = typeof ActivityType[keyof typeof ActivityType];
34
36
  export declare function instanceOfActivityType(value: any): boolean;
@@ -38,7 +38,9 @@ exports.ActivityType = {
38
38
  Uploaded: 'Uploaded',
39
39
  Added: 'Added',
40
40
  Removed: 'Removed',
41
- Moved: 'Moved'
41
+ Moved: 'Moved',
42
+ DeliveryFailed: 'DeliveryFailed',
43
+ Sent: 'Sent'
42
44
  };
43
45
  function instanceOfActivityType(value) {
44
46
  for (var key in exports.ActivityType) {
@@ -14,6 +14,7 @@
14
14
  */
15
15
  export declare const DesignTemplateType: {
16
16
  readonly Invoice: "INVOICE";
17
+ readonly InvoiceEmail: "INVOICE_EMAIL";
17
18
  readonly Offer: "OFFER";
18
19
  readonly OfferEmail: "OFFER_EMAIL";
19
20
  readonly Writing: "WRITING";
@@ -24,6 +24,7 @@ exports.DesignTemplateTypeToJSONTyped = DesignTemplateTypeToJSONTyped;
24
24
  */
25
25
  exports.DesignTemplateType = {
26
26
  Invoice: 'INVOICE',
27
+ InvoiceEmail: 'INVOICE_EMAIL',
27
28
  Offer: 'OFFER',
28
29
  OfferEmail: 'OFFER_EMAIL',
29
30
  Writing: 'WRITING',
@@ -0,0 +1,55 @@
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 InvoicePortalShareConfigDto
15
+ */
16
+ export interface InvoicePortalShareConfigDto {
17
+ /**
18
+ *
19
+ * @type {string}
20
+ * @memberof InvoicePortalShareConfigDto
21
+ */
22
+ recipientEmailAddress?: string;
23
+ /**
24
+ * email subject
25
+ * @type {string}
26
+ * @memberof InvoicePortalShareConfigDto
27
+ */
28
+ subject?: string;
29
+ /**
30
+ * body part that will be put into the template
31
+ * @type {string}
32
+ * @memberof InvoicePortalShareConfigDto
33
+ */
34
+ bodyTemplate?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof InvoicePortalShareConfigDto
39
+ */
40
+ designTemplateId?: string;
41
+ /**
42
+ *
43
+ * @type {Array<string>}
44
+ * @memberof InvoicePortalShareConfigDto
45
+ */
46
+ attachmentIds?: Array<string>;
47
+ }
48
+ /**
49
+ * Check if a given object implements the InvoicePortalShareConfigDto interface.
50
+ */
51
+ export declare function instanceOfInvoicePortalShareConfigDto(value: object): value is InvoicePortalShareConfigDto;
52
+ export declare function InvoicePortalShareConfigDtoFromJSON(json: any): InvoicePortalShareConfigDto;
53
+ export declare function InvoicePortalShareConfigDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoicePortalShareConfigDto;
54
+ export declare function InvoicePortalShareConfigDtoToJSON(json: any): InvoicePortalShareConfigDto;
55
+ export declare function InvoicePortalShareConfigDtoToJSONTyped(value?: InvoicePortalShareConfigDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,56 @@
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.instanceOfInvoicePortalShareConfigDto = instanceOfInvoicePortalShareConfigDto;
16
+ exports.InvoicePortalShareConfigDtoFromJSON = InvoicePortalShareConfigDtoFromJSON;
17
+ exports.InvoicePortalShareConfigDtoFromJSONTyped = InvoicePortalShareConfigDtoFromJSONTyped;
18
+ exports.InvoicePortalShareConfigDtoToJSON = InvoicePortalShareConfigDtoToJSON;
19
+ exports.InvoicePortalShareConfigDtoToJSONTyped = InvoicePortalShareConfigDtoToJSONTyped;
20
+ /**
21
+ * Check if a given object implements the InvoicePortalShareConfigDto interface.
22
+ */
23
+ function instanceOfInvoicePortalShareConfigDto(value) {
24
+ return true;
25
+ }
26
+ function InvoicePortalShareConfigDtoFromJSON(json) {
27
+ return InvoicePortalShareConfigDtoFromJSONTyped(json, false);
28
+ }
29
+ function InvoicePortalShareConfigDtoFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'recipientEmailAddress': json['recipientEmailAddress'] == null ? undefined : json['recipientEmailAddress'],
35
+ 'subject': json['subject'] == null ? undefined : json['subject'],
36
+ 'bodyTemplate': json['bodyTemplate'] == null ? undefined : json['bodyTemplate'],
37
+ 'designTemplateId': json['designTemplateId'] == null ? undefined : json['designTemplateId'],
38
+ 'attachmentIds': json['attachmentIds'] == null ? undefined : json['attachmentIds'],
39
+ };
40
+ }
41
+ function InvoicePortalShareConfigDtoToJSON(json) {
42
+ return InvoicePortalShareConfigDtoToJSONTyped(json, false);
43
+ }
44
+ function InvoicePortalShareConfigDtoToJSONTyped(value, ignoreDiscriminator) {
45
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'recipientEmailAddress': value['recipientEmailAddress'],
51
+ 'subject': value['subject'],
52
+ 'bodyTemplate': value['bodyTemplate'],
53
+ 'designTemplateId': value['designTemplateId'],
54
+ 'attachmentIds': value['attachmentIds'],
55
+ };
56
+ }
@@ -19,6 +19,7 @@ export declare const NotifierIdType: {
19
19
  readonly UserOnline: "USER_ONLINE";
20
20
  readonly UserMentioned: "USER_MENTIONED";
21
21
  readonly JobUpdate: "JOB_UPDATE";
22
+ readonly InvoiceDeliveryProblem: "INVOICE_DELIVERY_PROBLEM";
22
23
  };
23
24
  export type NotifierIdType = typeof NotifierIdType[keyof typeof NotifierIdType];
24
25
  export declare function instanceOfNotifierIdType(value: any): boolean;
@@ -28,7 +28,8 @@ exports.NotifierIdType = {
28
28
  IncompleteTimetrackingPresenceEntry: 'INCOMPLETE_TIMETRACKING_PRESENCE_ENTRY',
29
29
  UserOnline: 'USER_ONLINE',
30
30
  UserMentioned: 'USER_MENTIONED',
31
- JobUpdate: 'JOB_UPDATE'
31
+ JobUpdate: 'JOB_UPDATE',
32
+ InvoiceDeliveryProblem: 'INVOICE_DELIVERY_PROBLEM'
32
33
  };
33
34
  function instanceOfNotifierIdType(value) {
34
35
  for (var key in exports.NotifierIdType) {
@@ -0,0 +1,39 @@
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 { InvoiceDto } from './InvoiceDto';
12
+ import type { EmailDto } from './EmailDto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ShareInvoiceDto
17
+ */
18
+ export interface ShareInvoiceDto {
19
+ /**
20
+ *
21
+ * @type {InvoiceDto}
22
+ * @memberof ShareInvoiceDto
23
+ */
24
+ invoice?: InvoiceDto;
25
+ /**
26
+ *
27
+ * @type {EmailDto}
28
+ * @memberof ShareInvoiceDto
29
+ */
30
+ email?: EmailDto;
31
+ }
32
+ /**
33
+ * Check if a given object implements the ShareInvoiceDto interface.
34
+ */
35
+ export declare function instanceOfShareInvoiceDto(value: object): value is ShareInvoiceDto;
36
+ export declare function ShareInvoiceDtoFromJSON(json: any): ShareInvoiceDto;
37
+ export declare function ShareInvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareInvoiceDto;
38
+ export declare function ShareInvoiceDtoToJSON(json: any): ShareInvoiceDto;
39
+ export declare function ShareInvoiceDtoToJSONTyped(value?: ShareInvoiceDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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.instanceOfShareInvoiceDto = instanceOfShareInvoiceDto;
16
+ exports.ShareInvoiceDtoFromJSON = ShareInvoiceDtoFromJSON;
17
+ exports.ShareInvoiceDtoFromJSONTyped = ShareInvoiceDtoFromJSONTyped;
18
+ exports.ShareInvoiceDtoToJSON = ShareInvoiceDtoToJSON;
19
+ exports.ShareInvoiceDtoToJSONTyped = ShareInvoiceDtoToJSONTyped;
20
+ var InvoiceDto_1 = require("./InvoiceDto");
21
+ var EmailDto_1 = require("./EmailDto");
22
+ /**
23
+ * Check if a given object implements the ShareInvoiceDto interface.
24
+ */
25
+ function instanceOfShareInvoiceDto(value) {
26
+ return true;
27
+ }
28
+ function ShareInvoiceDtoFromJSON(json) {
29
+ return ShareInvoiceDtoFromJSONTyped(json, false);
30
+ }
31
+ function ShareInvoiceDtoFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'invoice': json['invoice'] == null ? undefined : (0, InvoiceDto_1.InvoiceDtoFromJSON)(json['invoice']),
37
+ 'email': json['email'] == null ? undefined : (0, EmailDto_1.EmailDtoFromJSON)(json['email']),
38
+ };
39
+ }
40
+ function ShareInvoiceDtoToJSON(json) {
41
+ return ShareInvoiceDtoToJSONTyped(json, false);
42
+ }
43
+ function ShareInvoiceDtoToJSONTyped(value, ignoreDiscriminator) {
44
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'invoice': (0, InvoiceDto_1.InvoiceDtoToJSON)(value['invoice']),
50
+ 'email': (0, EmailDto_1.EmailDtoToJSON)(value['email']),
51
+ };
52
+ }
@@ -17,6 +17,8 @@ export declare const TextModuleType: {
17
17
  readonly InvoiceIntro: "INVOICE_INTRO";
18
18
  readonly InvoiceOutro: "INVOICE_OUTRO";
19
19
  readonly InvoiceSmallBusiness: "INVOICE_SMALL_BUSINESS";
20
+ readonly InvoiceEmailSubject: "INVOICE_EMAIL_SUBJECT";
21
+ readonly InvoiceEmailBody: "INVOICE_EMAIL_BODY";
20
22
  readonly OfferSubject: "OFFER_SUBJECT";
21
23
  readonly OfferIntro: "OFFER_INTRO";
22
24
  readonly OfferOutro: "OFFER_OUTRO";
@@ -27,6 +27,8 @@ exports.TextModuleType = {
27
27
  InvoiceIntro: 'INVOICE_INTRO',
28
28
  InvoiceOutro: 'INVOICE_OUTRO',
29
29
  InvoiceSmallBusiness: 'INVOICE_SMALL_BUSINESS',
30
+ InvoiceEmailSubject: 'INVOICE_EMAIL_SUBJECT',
31
+ InvoiceEmailBody: 'INVOICE_EMAIL_BODY',
30
32
  OfferSubject: 'OFFER_SUBJECT',
31
33
  OfferIntro: 'OFFER_INTRO',
32
34
  OfferOutro: 'OFFER_OUTRO',
@@ -197,6 +197,7 @@ export * from './InternalWorkflowProcessStopRequestDto';
197
197
  export * from './InvoiceConfigDto';
198
198
  export * from './InvoiceDto';
199
199
  export * from './InvoiceItemDto';
200
+ export * from './InvoicePortalShareConfigDto';
200
201
  export * from './InvoiceTaxItemDto';
201
202
  export * from './InvoiceTextFieldsDto';
202
203
  export * from './InvoiceType';
@@ -254,6 +255,7 @@ export * from './ReferenceDto';
254
255
  export * from './RegisterUserDto';
255
256
  export * from './RoleDto';
256
257
  export * from './RunWorkflowRequest';
258
+ export * from './ShareInvoiceDto';
257
259
  export * from './ShareOfferDto';
258
260
  export * from './SkontoDto';
259
261
  export * from './SortDirection';
@@ -215,6 +215,7 @@ __exportStar(require("./InternalWorkflowProcessStopRequestDto"), exports);
215
215
  __exportStar(require("./InvoiceConfigDto"), exports);
216
216
  __exportStar(require("./InvoiceDto"), exports);
217
217
  __exportStar(require("./InvoiceItemDto"), exports);
218
+ __exportStar(require("./InvoicePortalShareConfigDto"), exports);
218
219
  __exportStar(require("./InvoiceTaxItemDto"), exports);
219
220
  __exportStar(require("./InvoiceTextFieldsDto"), exports);
220
221
  __exportStar(require("./InvoiceType"), exports);
@@ -272,6 +273,7 @@ __exportStar(require("./ReferenceDto"), exports);
272
273
  __exportStar(require("./RegisterUserDto"), exports);
273
274
  __exportStar(require("./RoleDto"), exports);
274
275
  __exportStar(require("./RunWorkflowRequest"), exports);
276
+ __exportStar(require("./ShareInvoiceDto"), exports);
275
277
  __exportStar(require("./ShareOfferDto"), exports);
276
278
  __exportStar(require("./SkontoDto"), exports);
277
279
  __exportStar(require("./SortDirection"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kommerz/ts-client",
3
- "version": "1.183.0",
3
+ "version": "1.184.0",
4
4
  "description": "Typescript client for Kommerz API",
5
5
  "author": "Kommerz.App",
6
6
  "license": "MIT",