@royalinvest/dto 0.55.0 → 0.55.2

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.
@@ -1,23 +1,29 @@
1
1
  import { UnitMeasurementEnum } from "./enum";
2
- import { BillingIntervalType } from "./billing";
2
+ import { BillingIntervalType, LocaleType, ProductType } from "./types";
3
3
  export interface ICheckout {
4
4
  plan_id: string;
5
- contract_id?: string;
6
- template_id?: string;
5
+ product_type: ProductType;
7
6
  email: string;
8
- language: string;
7
+ language: LocaleType;
9
8
  currency: string;
10
9
  items: ICheckoutItem[];
11
10
  is_subscription: boolean;
12
11
  billing_interval: BillingIntervalType;
13
12
  expires_at?: Date | null;
13
+ metadata?: ICheckoutMetadata;
14
14
  }
15
15
  export type ICheckoutItem = {
16
- id: string;
16
+ id?: string;
17
17
  name: string;
18
18
  description: string;
19
- cover_url: string;
19
+ cover_url?: string;
20
20
  price: number;
21
21
  quantity: number;
22
22
  unit_measurement: UnitMeasurementEnum;
23
23
  };
24
+ export interface ICheckoutMetadata {
25
+ contract_id?: string;
26
+ template_id?: string;
27
+ credit_check_request_id?: string;
28
+ [key: string]: string | number | boolean | undefined;
29
+ }
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from "./address";
2
2
  export * from "./auth";
3
3
  export * from "./balance";
4
4
  export * from "./base64Image";
5
- export * from "./billing";
6
5
  export * from "./ca";
7
6
  export * from "./capability";
8
7
  export * from "./category";
@@ -72,5 +71,6 @@ export * from "./state";
72
71
  export * from "./tableData";
73
72
  export * from "./template-variant";
74
73
  export * from "./template";
74
+ export * from "./types";
75
75
  export * from "./user";
76
76
  export * from "./yes-no";
package/dist/index.js CHANGED
@@ -18,7 +18,6 @@ __exportStar(require("./address"), exports);
18
18
  __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./balance"), exports);
20
20
  __exportStar(require("./base64Image"), exports);
21
- __exportStar(require("./billing"), exports);
22
21
  __exportStar(require("./ca"), exports);
23
22
  __exportStar(require("./capability"), exports);
24
23
  __exportStar(require("./category"), exports);
@@ -88,5 +87,6 @@ __exportStar(require("./state"), exports);
88
87
  __exportStar(require("./tableData"), exports);
89
88
  __exportStar(require("./template-variant"), exports);
90
89
  __exportStar(require("./template"), exports);
90
+ __exportStar(require("./types"), exports);
91
91
  __exportStar(require("./user"), exports);
92
92
  __exportStar(require("./yes-no"), exports);
@@ -0,0 +1,51 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ import { ReportTypeEnum } from "./enum";
1
2
  import { IPhysicalFileDetails } from "./physicalFileDetails";
2
3
  import { IPlaceholderCollection } from "./placeholderCollection";
3
4
  import { ISignaturePartyBasic } from "./signaturePartyBasic";
@@ -37,3 +38,10 @@ export interface IGeneratedInvoiceNotification {
37
38
  invoice_number: string;
38
39
  language: string;
39
40
  }
41
+ export interface IGeneratedReportNotification {
42
+ user_id: string;
43
+ report_id: string;
44
+ report_type: ReportTypeEnum;
45
+ blob_path: string;
46
+ language: string;
47
+ }
@@ -0,0 +1 @@
1
+ export type PaymentIntervalType = "month" | "year";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export type BillingIntervalType = "month" | "year" | "once";
2
+ export type ProductType = "lease_agreement" | "credit_check" | "rent_collection" | "investment_tool" | "storage";
3
+ export type LocaleType = "en" | "fr";
package/dist/types.js ADDED
@@ -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.55.0",
3
+ "version": "0.55.2",
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",