@royalinvest/dto 0.42.1 → 0.44.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.
@@ -29,8 +29,6 @@ export interface sections extends IAddress {
29
29
  service_daytime_phone_number: string;
30
30
  service_other_phone_number: string;
31
31
  service_fax_number_for_service: string;
32
- service_email: string;
33
- service_other_email: string;
34
32
  agreement_start: Date | null;
35
33
  agreement_start_day?: string;
36
34
  agreement_start_month?: string;
@@ -0,0 +1,13 @@
1
+ export interface IPaginatedResponse<T> {
2
+ total_count: number;
3
+ next_cursor: string;
4
+ data: T[];
5
+ }
6
+ export interface IContractUsage {
7
+ id: string;
8
+ created_at: Date;
9
+ template_name: string;
10
+ language: string;
11
+ cover_image_name: string;
12
+ cover_image_name_mime_type: string;
13
+ }
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export * from "./file";
20
20
  export * from "./fileCertificate";
21
21
  export * from "./fileMetadata";
22
22
  export * from "./fileView";
23
- export * from "./invoiceFormData";
23
+ export * from "./invoiceRenderData";
24
24
  export * from "./key-value";
25
25
  export * from "./layout";
26
26
  export * from "./lease-details";
@@ -58,7 +58,9 @@ export * from "./signaturePartySigned";
58
58
  export * from "./signAudit";
59
59
  export * from "./sort";
60
60
  export * from "./state";
61
+ export * from "./tableData";
61
62
  export * from "./template-variant";
62
63
  export * from "./template";
63
64
  export * from "./user";
64
65
  export * from "./yes-no";
66
+ export * from "./contractUsage";
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ __exportStar(require("./file"), exports);
36
36
  __exportStar(require("./fileCertificate"), exports);
37
37
  __exportStar(require("./fileMetadata"), exports);
38
38
  __exportStar(require("./fileView"), exports);
39
- __exportStar(require("./invoiceFormData"), exports);
39
+ __exportStar(require("./invoiceRenderData"), exports);
40
40
  __exportStar(require("./key-value"), exports);
41
41
  __exportStar(require("./layout"), exports);
42
42
  __exportStar(require("./lease-details"), exports);
@@ -74,7 +74,9 @@ __exportStar(require("./signaturePartySigned"), exports);
74
74
  __exportStar(require("./signAudit"), exports);
75
75
  __exportStar(require("./sort"), exports);
76
76
  __exportStar(require("./state"), exports);
77
+ __exportStar(require("./tableData"), exports);
77
78
  __exportStar(require("./template-variant"), exports);
78
79
  __exportStar(require("./template"), exports);
79
80
  __exportStar(require("./user"), exports);
80
81
  __exportStar(require("./yes-no"), exports);
82
+ __exportStar(require("./contractUsage"), exports);
@@ -0,0 +1,23 @@
1
+ import { TableData } from "./tableData";
2
+ export interface IInvoiceRenderData {
3
+ title: string;
4
+ details: IInvoiceRenderField[][];
5
+ contacts: IInvoiceRenderField[];
6
+ items_table: IInvoiceRenderItemsTable;
7
+ subtotal: IInvoiceRenderField;
8
+ taxes: IInvoiceRenderField[];
9
+ total: IInvoiceRenderField;
10
+ message: string[];
11
+ }
12
+ export interface IInvoiceRenderField {
13
+ label: string;
14
+ value: string;
15
+ other_values?: string[];
16
+ }
17
+ export type IInvoiceRenderItemsTable = TableData<IInvoiceItem>;
18
+ export interface IInvoiceItem {
19
+ description: string[];
20
+ quantity: string;
21
+ unit_price: string;
22
+ total_price: string;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,7 +4,7 @@ import { IContractParty } from "./contractParty";
4
4
  import { IDocumentDrawingInstructions } from "./documentDrawingInstructions";
5
5
  import { IFileMetadata } from "./fileMetadata";
6
6
  import { ISignaturePartySigned } from "./signaturePartySigned";
7
- import { IInvoiceFormData } from "./invoiceFormData";
7
+ import { IInvoiceRenderData } from "./invoiceRenderData";
8
8
  export interface IMessageGenerate {
9
9
  contract_id: string;
10
10
  details: JSON;
@@ -42,7 +42,9 @@ export interface IMessageGenerateCertificate {
42
42
  }
43
43
  export interface IMessageGenerateInvoice {
44
44
  user_id: string;
45
+ billing_id: string;
45
46
  blob_path: string;
46
- form_data: IInvoiceFormData;
47
+ invoice_number: string;
47
48
  language: string;
49
+ data: IInvoiceRenderData;
48
50
  }
@@ -32,13 +32,8 @@ export interface IGeneratedCertificateNotification {
32
32
  }
33
33
  export interface IGeneratedInvoiceNotification {
34
34
  user_id: string;
35
- invoice_number: string;
36
- stripe_session_id: string;
37
- stripe_transaction_id: string;
35
+ billing_id: string;
38
36
  blob_path: string;
39
- currency: string;
40
- total_amount: string;
41
- last4_digits: string;
42
- payment_method: string;
37
+ invoice_number: string;
43
38
  language: string;
44
39
  }
@@ -0,0 +1,8 @@
1
+ export interface TableData<T> {
2
+ headers: {
3
+ label: string;
4
+ item_path: string;
5
+ ratio: number;
6
+ }[];
7
+ items: T[];
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royalinvest/dto",
3
- "version": "0.42.1",
3
+ "version": "0.44.0",
4
4
  "description": "Data Transfer Objects (DTOs) to carry data between frontend and backend processes.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -1,51 +0,0 @@
1
- export interface IInvoiceContact {
2
- name: string;
3
- address: string;
4
- city: string;
5
- postal: string;
6
- country: string;
7
- phone?: string;
8
- email: string;
9
- website?: string;
10
- }
11
- export interface IInvoiceField {
12
- label: string;
13
- value: string | number | IInvoiceContact | null;
14
- }
15
- export interface IInvoiceTable<T> {
16
- headers: string[];
17
- items: T[];
18
- }
19
- export interface IInvoiceItem {
20
- description: string;
21
- quantity: number;
22
- unit_price: string;
23
- total_price: string;
24
- }
25
- export interface ITax {
26
- description: string;
27
- rate: string;
28
- amount: string;
29
- }
30
- export interface IPaymentInfo {
31
- message: IInvoiceField;
32
- support: IInvoiceField;
33
- }
34
- export interface IInvoiceFormData {
35
- invoice_number: IInvoiceField;
36
- currency: string;
37
- date: IInvoiceField;
38
- status: IInvoiceField;
39
- company_info: IInvoiceField;
40
- customer_info: IInvoiceField;
41
- tax_registration_numbers: IInvoiceField[];
42
- items_table: IInvoiceTable<IInvoiceItem>;
43
- taxes_table: IInvoiceTable<ITax>;
44
- subtotal: IInvoiceField;
45
- total: IInvoiceField;
46
- payment_info: IPaymentInfo;
47
- payment_method: IInvoiceField;
48
- last4_digits: IInvoiceField;
49
- stripe_transaction_id: string;
50
- stripe_session_id: string;
51
- }
File without changes