@royalinvest/dto 0.61.3 → 0.63.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/README.md CHANGED
@@ -1,41 +1,72 @@
1
- # How to Contribute to NPM Packages
1
+ # NPM Packages
2
2
 
3
- ## Configuring the Remote URL
3
+ This project contains shared **NPM packages** for RoyalInvest (e.g., DTOs, utilities).
4
+ Packages are written in **TypeScript** and published to the company’s NPM organization.
4
5
 
5
- To configure the remote NPM registry URL, use the following command:
6
+ ---
6
7
 
8
+ ## Getting Started
7
9
 
8
- Replace `<your_auth_token>` with the token generated from the NPM website.
10
+ ### 1. Configure NPM registry
9
11
 
10
- ## Access Token
12
+ To authenticate with the NPM registry, configure your `.npmrc` file:
11
13
 
12
- You can generate the `_authToken` by visiting [npmjs.com](https://www.npmjs.com/).
13
- For access to the company's NPM account, contact the administrator to either request a token or obtain access to generate a new one.
14
+ ```bash
15
+ npm config set //registry.npmjs.org/:_authToken=<your_auth_token>
16
+ ```
14
17
 
15
- ## NPM Packages
18
+ Replace `<your_auth_token>` with a token from [npmjs.com](https://www.npmjs.com/).
19
+ For access to the company’s account, request a token from the administrator.
16
20
 
17
- You can view the company's public NPM packages here:
18
- [Company NPM Packages](https://www.npmjs.com/settings/royalinvest/packages)
21
+ ---
22
+
23
+ ## Company Packages
24
+
25
+ You can view all published packages here:
26
+ [RoyalInvest NPM Packages](https://www.npmjs.com/settings/royalinvest/packages)
27
+
28
+ ---
19
29
 
20
30
  ## Creating a New Package
21
31
 
22
- To create a new NPM package:
23
- - Add a new directory.
24
- - Ensure that it includes the same `tsconfig.json` and `package.json` configuration as found in the `dto` package.
32
+ 1. Create a new directory under `npm-package/`.
33
+ 2. Add:
34
+ - `package.json` (copy structure from `dto/package.json`).
35
+ - `tsconfig.json` (same as in existing packages).
36
+ 3. Implement your code in `src/`.
37
+
38
+ Each package should follow the same conventions for consistency.
39
+
40
+ ---
41
+
42
+ ## Building a Package
43
+
44
+ Run the build command inside the package directory:
45
+
46
+ ```bash
47
+ npm run build
48
+ ```
49
+
50
+ Check the `scripts` section in `dto/package.json` for an example configuration.
25
51
 
26
- ## Building the NPM Package
52
+ ---
27
53
 
28
- To build the NPM package, run the following command. Refer to `dto/package.json` for configuration details:
54
+ ## Versioning
29
55
 
56
+ We follow **Semantic Versioning (SemVer)**:
30
57
 
31
- ## Versioning a Package
58
+ - **MAJOR** incompatible API changes
59
+ - **MINOR** – add functionality in a backward-compatible manner
60
+ - **PATCH** – backward-compatible bug fixes
32
61
 
33
- Follow Semantic Versioning (SemVer) standards for package versioning.
34
- Versioning should be updated manually by modifying the version number in the `package.json` file.
62
+ Update the version number manually in `package.json` before publishing.
35
63
 
36
- ## Publishing a Package
64
+ ---
37
65
 
38
- Use the following command to publish a new package:
66
+ ## Publishing
39
67
 
68
+ To publish a package to the NPM registry:
40
69
 
41
- The current scope is set to `public` by default in the `package.json` file, making all packages publicly accessible.
70
+ ```bash
71
+ npm publish --access public
72
+ ```
package/dist/index.d.ts CHANGED
@@ -36,9 +36,6 @@ export * from "./lease";
36
36
  export * from "./leaseNoticeRule";
37
37
  export * from "./leaseSaveTypeEnum";
38
38
  export * from "./list-response";
39
- export * from "./messageBrokerEvent";
40
- export * from "./messageGenerate";
41
- export * from "./messageNotification";
42
39
  export * from "./noticeRule";
43
40
  export * from "./notification";
44
41
  export * from "./party";
package/dist/index.js CHANGED
@@ -52,9 +52,6 @@ __exportStar(require("./lease"), exports);
52
52
  __exportStar(require("./leaseNoticeRule"), exports);
53
53
  __exportStar(require("./leaseSaveTypeEnum"), exports);
54
54
  __exportStar(require("./list-response"), exports);
55
- __exportStar(require("./messageBrokerEvent"), exports);
56
- __exportStar(require("./messageGenerate"), exports);
57
- __exportStar(require("./messageNotification"), exports);
58
55
  __exportStar(require("./noticeRule"), exports);
59
56
  __exportStar(require("./notification"), exports);
60
57
  __exportStar(require("./party"), exports);
@@ -1,3 +1,6 @@
1
1
  export * from "./producer";
2
2
  export * from "./consumer";
3
3
  export * from "./constants";
4
+ export * from "./messageBrokerEvent";
5
+ export * from "./messageGenerate";
6
+ export * from "./messageNotification";
@@ -17,3 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./producer"), exports);
18
18
  __exportStar(require("./consumer"), exports);
19
19
  __exportStar(require("./constants"), exports);
20
+ __exportStar(require("./messageBrokerEvent"), exports);
21
+ __exportStar(require("./messageGenerate"), exports);
22
+ __exportStar(require("./messageNotification"), exports);
@@ -0,0 +1,5 @@
1
+ export interface IMessageBrokerEvent<TPayload> {
2
+ http_request_id: string;
3
+ user_id: string;
4
+ payload: TPayload;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,54 @@
1
+ import { LeaseTypeEnum } from "../enum";
2
+ import { ICertificateFormData } from "../certificateFormData";
3
+ import { IContractParty } from "../contractParty";
4
+ import { IDocumentDrawingInstructions } from "../documentDrawingInstructions";
5
+ import { IFileMetadata } from "../fileMetadata";
6
+ import { ISignaturePartySigned } from "../signaturePartySigned";
7
+ import { IInvoiceRenderData } from "../invoiceRenderData";
8
+ import { ICreditCheckReportData } from "../creditCheckReport";
9
+ export interface IMessageGenerate {
10
+ contract_id: string;
11
+ details: JSON;
12
+ template_variant_file_name: string;
13
+ template_variant_name: string;
14
+ template_variant_language: string;
15
+ template_variant_mime_type: string;
16
+ template_variant_id: string;
17
+ template_name: LeaseTypeEnum;
18
+ file_id?: string;
19
+ isEdit?: boolean;
20
+ contract_parties?: IContractParty[];
21
+ drawing_instructions?: IDocumentDrawingInstructions;
22
+ metadata?: IFileMetadata;
23
+ }
24
+ export interface IMessageGenerateSigned {
25
+ party: ISignaturePartySigned;
26
+ generate_hash?: boolean;
27
+ }
28
+ export interface IMessageGenerateVoided {
29
+ contract_id: string;
30
+ file_id: string;
31
+ file_name: string;
32
+ notify_party_email: boolean;
33
+ generate_hash?: boolean;
34
+ }
35
+ export interface IMessageGenerateCertificate {
36
+ file_id: string;
37
+ blob_path: string;
38
+ form_data: ICertificateFormData;
39
+ form_instructions: JSON;
40
+ language: string;
41
+ }
42
+ export interface IMessageGenerateInvoice {
43
+ billing_id: string;
44
+ blob_path: string;
45
+ invoice_number: string;
46
+ language: string;
47
+ data: IInvoiceRenderData;
48
+ }
49
+ export interface IMessageGenerateCreditCheckReport {
50
+ report_data: ICreditCheckReportData;
51
+ subject_id: string;
52
+ blob_path: string;
53
+ language: string;
54
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,42 @@
1
+ import { IPhysicalFileDetails } from "../physicalFileDetails";
2
+ import { IPlaceholderCollection } from "../placeholderCollection";
3
+ import { ISignaturePartyBasic } from "../signaturePartyBasic";
4
+ export interface IGeneratedNotification {
5
+ contract_id: string;
6
+ file_name: string;
7
+ file_language: string;
8
+ mime_type: string;
9
+ template_name: string;
10
+ template_variant_id: string;
11
+ file_id?: string;
12
+ isEdit?: boolean;
13
+ generated_placeholders?: IPlaceholderCollection;
14
+ generated_file_details?: IPhysicalFileDetails;
15
+ }
16
+ export interface ISignedNotification {
17
+ file_id: string;
18
+ party: ISignaturePartyBasic;
19
+ generated_file_details?: IPhysicalFileDetails;
20
+ }
21
+ export interface IVoidedNotification {
22
+ file_id: string;
23
+ contract_id: string;
24
+ notify_party_email: boolean;
25
+ generated_file_details?: IPhysicalFileDetails;
26
+ }
27
+ export interface IGeneratedCertificateNotification {
28
+ file_id: string;
29
+ blob_path: string;
30
+ }
31
+ export interface IGeneratedInvoiceNotification {
32
+ billing_id: string;
33
+ blob_path: string;
34
+ invoice_number: string;
35
+ language: string;
36
+ }
37
+ export interface IGeneratedCreditCheckReportNotification {
38
+ subject_id: string;
39
+ blob_path: string;
40
+ hash: string;
41
+ language: string;
42
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import { PartyTypeEnum } from "./enum";
2
+ import { SignatureMethodType } from "./signature-party";
2
3
  export interface ISignConfirmation {
3
4
  code: string;
4
5
  signatureId: string;
@@ -11,4 +12,5 @@ export interface ISignConfirmation {
11
12
  party_email: string;
12
13
  party_role: PartyTypeEnum;
13
14
  user_id?: string;
15
+ signatureMethod?: SignatureMethodType;
14
16
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./signaturePartyChangeRequest";
2
2
  export * from "./signaturePartySignView";
3
+ export * from "./signatureMethodType";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./signaturePartyChangeRequest"), exports);
18
18
  __exportStar(require("./signaturePartySignView"), exports);
19
+ __exportStar(require("./signatureMethodType"), exports);
@@ -0,0 +1 @@
1
+ export type SignatureMethodType = "drawn" | "system-generated" | "uploaded";
@@ -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.61.3",
3
+ "version": "0.63.0",
4
4
  "description": "Data Transfer Objects (DTOs) to carry data between frontend and backend processes.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",