@royalinvest/dto 0.74.7 → 0.76.1

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,72 +1,72 @@
1
- # NPM Packages
2
-
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.
5
-
6
- ---
7
-
8
- ## Getting Started
9
-
10
- ### 1. Configure NPM registry
11
-
12
- To authenticate with the NPM registry, configure your `.npmrc` file:
13
-
14
- ```bash
15
- npm config set //registry.npmjs.org/:_authToken=<your_auth_token>
16
- ```
17
-
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.
20
-
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
- ---
29
-
30
- ## Creating a New Package
31
-
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.
51
-
52
- ---
53
-
54
- ## Versioning
55
-
56
- We follow **Semantic Versioning (SemVer)**:
57
-
58
- - **MAJOR** – incompatible API changes
59
- - **MINOR** – add functionality in a backward-compatible manner
60
- - **PATCH** – backward-compatible bug fixes
61
-
62
- Update the version number manually in `package.json` before publishing.
63
-
64
- ---
65
-
66
- ## Publishing
67
-
68
- To publish a package to the NPM registry:
69
-
70
- ```bash
71
- npm publish --access public
1
+ # NPM Packages
2
+
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.
5
+
6
+ ---
7
+
8
+ ## Getting Started
9
+
10
+ ### 1. Configure NPM registry
11
+
12
+ To authenticate with the NPM registry, configure your `.npmrc` file:
13
+
14
+ ```bash
15
+ npm config set //registry.npmjs.org/:_authToken=<your_auth_token>
16
+ ```
17
+
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.
20
+
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
+ ---
29
+
30
+ ## Creating a New Package
31
+
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.
51
+
52
+ ---
53
+
54
+ ## Versioning
55
+
56
+ We follow **Semantic Versioning (SemVer)**:
57
+
58
+ - **MAJOR** – incompatible API changes
59
+ - **MINOR** – add functionality in a backward-compatible manner
60
+ - **PATCH** – backward-compatible bug fixes
61
+
62
+ Update the version number manually in `package.json` before publishing.
63
+
64
+ ---
65
+
66
+ ## Publishing
67
+
68
+ To publish a package to the NPM registry:
69
+
70
+ ```bash
71
+ npm publish --access public
72
72
  ```
@@ -0,0 +1,63 @@
1
+ import { IContractParty } from "./contractParty";
2
+ import { TBureau } from "./credit-check";
3
+ import { ActivityStatusEnum, ActivityTypeEnum, CurrencyEnum, RentCycleEnum, ServiceTypeEnum } from "./enum";
4
+ export interface ILeaseActivityFeedData {
5
+ address?: string;
6
+ amount?: number | null;
7
+ start_date?: string | null;
8
+ end_date?: string | null;
9
+ file_id?: string | null;
10
+ file_name?: string | null;
11
+ file_size_in_kb?: number | null;
12
+ file_page_count?: number | null;
13
+ parties?: IContractParty[];
14
+ }
15
+ export interface ITenantScreeningActivityFeedData {
16
+ address?: string;
17
+ bureau: TBureau;
18
+ first_name?: string | null;
19
+ last_name?: string | null;
20
+ amount?: number | null;
21
+ currency?: CurrencyEnum | null;
22
+ rent_cycle?: RentCycleEnum | null;
23
+ subject_id?: string | null;
24
+ }
25
+ export interface IRentCollectionActivityFeedData {
26
+ address?: string;
27
+ first_name?: string | null;
28
+ last_name?: string | null;
29
+ amount?: number | null;
30
+ currency?: CurrencyEnum | null;
31
+ rent_cycle?: RentCycleEnum | null;
32
+ start_date?: string | null;
33
+ end_date?: string | null;
34
+ payment_date?: string | null;
35
+ payment_method?: string | null;
36
+ invoice_id?: string | null;
37
+ invoice_number?: string | null;
38
+ }
39
+ export type TActivityFeedCategory = ServiceTypeEnum.SCREENING_QUESTIONNAIRE | ServiceTypeEnum.CREDIT_CHECK | ServiceTypeEnum.LEASE_AGREEMENT | ServiceTypeEnum.RENT_COLLECTION;
40
+ export type TActivityFeedData = ILeaseActivityFeedData | ITenantScreeningActivityFeedData | IRentCollectionActivityFeedData;
41
+ export interface IActivityFeedListItem {
42
+ id: string;
43
+ category: TActivityFeedCategory;
44
+ activity_type: ActivityTypeEnum;
45
+ status: ActivityStatusEnum | null;
46
+ entity_id: string;
47
+ data: TActivityFeedData;
48
+ occurred_at: string;
49
+ }
50
+ export type IActivityFeedCategoryCounts = {
51
+ all: number;
52
+ } & Record<TActivityFeedCategory, number>;
53
+ export interface IActivityFeedListResponse {
54
+ items: IActivityFeedListItem[];
55
+ counts: IActivityFeedCategoryCounts;
56
+ cursor: string | null;
57
+ has_more: boolean;
58
+ }
59
+ export interface IActivityFeedQuery {
60
+ category?: TActivityFeedCategory;
61
+ cursor?: string;
62
+ limit?: number;
63
+ }
@@ -0,0 +1,17 @@
1
+ export declare enum ActivityStatusEnum {
2
+ PENDING = "pending",
3
+ PROCESSING = "processing",
4
+ COMPLETED = "completed",
5
+ FAILED = "failed",
6
+ PAUSED = "paused"
7
+ }
8
+ export declare enum ActivityTypeEnum {
9
+ LEASE_PREPARE = "lease.prepare",
10
+ LEASE_SIGN = "lease.sign",
11
+ LEASE_VOIDED = "lease.voided",
12
+ TENANT_SCREENING_SETUP = "tenant_screening.setup",
13
+ TENANT_SCREENING_CONSENT = "tenant_screening.consent",
14
+ TENANT_SCREENING_REPORT = "tenant_screening.report",
15
+ RENT_PAYMENT_SETUP = "rent_payment.setup",
16
+ RENT_PAYMENT_RECEIVED = "rent_payment.received"
17
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivityTypeEnum = exports.ActivityStatusEnum = void 0;
4
+ var ActivityStatusEnum;
5
+ (function (ActivityStatusEnum) {
6
+ ActivityStatusEnum["PENDING"] = "pending";
7
+ ActivityStatusEnum["PROCESSING"] = "processing";
8
+ ActivityStatusEnum["COMPLETED"] = "completed";
9
+ ActivityStatusEnum["FAILED"] = "failed";
10
+ ActivityStatusEnum["PAUSED"] = "paused";
11
+ })(ActivityStatusEnum || (exports.ActivityStatusEnum = ActivityStatusEnum = {}));
12
+ var ActivityTypeEnum;
13
+ (function (ActivityTypeEnum) {
14
+ // Lease
15
+ ActivityTypeEnum["LEASE_PREPARE"] = "lease.prepare";
16
+ ActivityTypeEnum["LEASE_SIGN"] = "lease.sign";
17
+ ActivityTypeEnum["LEASE_VOIDED"] = "lease.voided";
18
+ // Tenant Screening (credit check and screening questionnaire)
19
+ ActivityTypeEnum["TENANT_SCREENING_SETUP"] = "tenant_screening.setup";
20
+ ActivityTypeEnum["TENANT_SCREENING_CONSENT"] = "tenant_screening.consent";
21
+ ActivityTypeEnum["TENANT_SCREENING_REPORT"] = "tenant_screening.report";
22
+ // Rent collection
23
+ ActivityTypeEnum["RENT_PAYMENT_SETUP"] = "rent_payment.setup";
24
+ ActivityTypeEnum["RENT_PAYMENT_RECEIVED"] = "rent_payment.received";
25
+ })(ActivityTypeEnum || (exports.ActivityTypeEnum = ActivityTypeEnum = {}));
@@ -1,6 +1,8 @@
1
1
  export * from "./country";
2
2
  export * from "./currency";
3
3
  export * from "./cycle";
4
+ export * from "./activityFeed";
5
+ export * from "./serviceType";
4
6
  export declare enum PartyTypeEnum {
5
7
  default = "",
6
8
  lessor = "lessor",
@@ -18,6 +18,8 @@ exports.UnitMeasurementEnum = exports.BulkPurchaseSourceTypeEnum = exports.TextA
18
18
  __exportStar(require("./country"), exports);
19
19
  __exportStar(require("./currency"), exports);
20
20
  __exportStar(require("./cycle"), exports);
21
+ __exportStar(require("./activityFeed"), exports);
22
+ __exportStar(require("./serviceType"), exports);
21
23
  var PartyTypeEnum;
22
24
  (function (PartyTypeEnum) {
23
25
  PartyTypeEnum["default"] = "";
@@ -0,0 +1,7 @@
1
+ export declare enum ServiceTypeEnum {
2
+ LEASE_AGREEMENT = "lease_agreement",
3
+ CREDIT_CHECK = "credit_check",
4
+ RENT_COLLECTION = "rent_collection",
5
+ STORAGE = "storage",
6
+ SCREENING_QUESTIONNAIRE = "screening_questionnaire"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceTypeEnum = void 0;
4
+ var ServiceTypeEnum;
5
+ (function (ServiceTypeEnum) {
6
+ ServiceTypeEnum["LEASE_AGREEMENT"] = "lease_agreement";
7
+ ServiceTypeEnum["CREDIT_CHECK"] = "credit_check";
8
+ ServiceTypeEnum["RENT_COLLECTION"] = "rent_collection";
9
+ ServiceTypeEnum["STORAGE"] = "storage";
10
+ ServiceTypeEnum["SCREENING_QUESTIONNAIRE"] = "screening_questionnaire";
11
+ })(ServiceTypeEnum || (exports.ServiceTypeEnum = ServiceTypeEnum = {}));
@@ -0,0 +1 @@
1
+ export type UILanguage = "en" | "fr" | "de" | "es" | "nl";
package/dist/index.d.ts CHANGED
@@ -80,3 +80,4 @@ export * from "./usa";
80
80
  export * from "./user";
81
81
  export * from "./utils";
82
82
  export * from "./yes-no";
83
+ export * from "./activityFeed";
package/dist/index.js CHANGED
@@ -96,3 +96,4 @@ __exportStar(require("./usa"), exports);
96
96
  __exportStar(require("./user"), exports);
97
97
  __exportStar(require("./utils"), exports);
98
98
  __exportStar(require("./yes-no"), exports);
99
+ __exportStar(require("./activityFeed"), exports);
@@ -1,5 +1,5 @@
1
1
  import client from "prom-client";
2
2
  export declare const leaseAgreementsCreated: client.Counter<string>;
3
3
  export declare const documentsSigned: client.Counter<string>;
4
- export declare const creditChecksPerformed: client.Counter<"status" | "bureau">;
5
- export declare const creditCheckProcessingDuration: client.Histogram<"queue" | "bureau">;
4
+ export declare const creditChecksPerformed: client.Counter<"bureau" | "status">;
5
+ export declare const creditCheckProcessingDuration: client.Histogram<"bureau" | "queue">;
@@ -2,8 +2,8 @@ import client from "prom-client";
2
2
  export declare const register: client.Registry<"text/plain; version=0.0.4; charset=utf-8">;
3
3
  export declare const apiRequests: client.Counter<"method" | "route" | "status">;
4
4
  export declare const apiRequestDuration: client.Histogram<"method" | "route" | "status">;
5
- export declare const messagesReceived: client.Counter<"queue" | "routingKey" | "bureau">;
6
- export declare const messagesProcessed: client.Counter<"queue" | "routingKey" | "bureau">;
7
- export declare const messagesFailed: client.Counter<"queue" | "routingKey" | "bureau" | "exchange">;
8
- export declare const messageRetries: client.Counter<"queue" | "routingKey" | "bureau" | "exchange">;
9
- export declare const messagesPublished: client.Counter<"routingKey" | "bureau" | "exchange">;
5
+ export declare const messagesReceived: client.Counter<"bureau" | "queue" | "routingKey">;
6
+ export declare const messagesProcessed: client.Counter<"bureau" | "queue" | "routingKey">;
7
+ export declare const messagesFailed: client.Counter<"bureau" | "queue" | "routingKey" | "exchange">;
8
+ export declare const messageRetries: client.Counter<"bureau" | "queue" | "routingKey" | "exchange">;
9
+ export declare const messagesPublished: client.Counter<"bureau" | "routingKey" | "exchange">;
@@ -131,4 +131,13 @@ export declare const RABBITMQ_EXCHANGES: {
131
131
  readonly email_automation: "email_automation";
132
132
  };
133
133
  };
134
+ readonly activity_feed: {
135
+ readonly name: "ACTIVITY_FEED_EXCHANGE";
136
+ readonly keys: {
137
+ readonly upsert: "activity_feed.upsert";
138
+ };
139
+ readonly queues: {
140
+ readonly activity_feed: "activity_feed_queue";
141
+ };
142
+ };
134
143
  };
@@ -135,4 +135,13 @@ exports.RABBITMQ_EXCHANGES = {
135
135
  email_automation: "email_automation",
136
136
  },
137
137
  },
138
+ activity_feed: {
139
+ name: "ACTIVITY_FEED_EXCHANGE",
140
+ keys: {
141
+ upsert: "activity_feed.upsert",
142
+ },
143
+ queues: {
144
+ activity_feed: "activity_feed_queue",
145
+ },
146
+ },
138
147
  };
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
- {
2
- "name": "@royalinvest/dto",
3
- "version": "0.74.7",
4
- "description": "Data Transfer Objects (DTOs) to carry data between frontend and backend processes.",
5
- "main": "./dist/index.js",
6
- "types": "./dist/index.d.ts",
7
- "module": "./dist/index.js",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "require": "./dist/index.js",
12
- "import": "./dist/index.js"
13
- },
14
- "./backend": {
15
- "types": "./dist/backend.d.ts",
16
- "require": "./dist/backend.js",
17
- "import": "./dist/backend.js"
18
- },
19
- "./credit-check": {
20
- "types": "./dist/credit-check/index.d.ts",
21
- "require": "./dist/credit-check/index.js",
22
- "import": "./dist/credit-check/index.js"
23
- },
24
- "./enum": {
25
- "types": "./dist/enum/index.d.ts",
26
- "require": "./dist/enum/index.js",
27
- "import": "./dist/enum/index.js"
28
- }
29
- },
30
- "repository": {
31
- "type": "git",
32
- "url": "git@ssh.dev.azure.com:v3/royalinvest/royalinvest/npm-package"
33
- },
34
- "files": [
35
- "dist"
36
- ],
37
- "publishConfig": {
38
- "access": "public"
39
- },
40
- "scripts": {
41
- "build": "npx tsc",
42
- "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
43
- "lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"",
44
- "prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
45
- "prettier:check": "npx prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
46
- "clear-all": "rm -rf node_modules .next out dist build",
47
- "re-start": "rm -rf node_modules .next out dist build && npm install && npm run dev",
48
- "re-build": "rm -rf node_modules .next out dist build && npm install && npm run build",
49
- "prepublishOnly": "npm run build",
50
- "test": "echo \"Not implemented yet\""
51
- },
52
- "lint-staged": {
53
- "src/**/*.{js,jsx,ts,tsx}": [
54
- "prettier --write",
55
- "eslint --fix",
56
- "git add"
57
- ]
58
- },
59
- "prettier": {
60
- "tabWidth": 2,
61
- "useTabs": false,
62
- "singleQuote": false,
63
- "printWidth": 120
64
- },
65
- "author": "Samos Technologies Inc.",
66
- "license": "ISC",
67
- "devDependencies": {
68
- "@eslint/js": "^9.11.1",
69
- "@types/amqplib": "^0.10.6",
70
- "@types/node": "^24.1.0",
71
- "eslint": "^9.11.1",
72
- "eslint-plugin-react": "^7.37.0",
73
- "globals": "^15.9.0",
74
- "husky": "^8.0.0",
75
- "lint-staged": "^15.2.10",
76
- "prettier": "^3.3.3",
77
- "typescript-eslint": "^8.7.0"
78
- },
79
- "dependencies": {
80
- "amqplib": "^0.10.3",
81
- "dayjs": "^1.11.19",
82
- "prom-client": "^15.1.3"
83
- },
84
- "peerDependencies": {
85
- "pino": "^9.7.0",
86
- "pino-pretty": "^13.0.0"
87
- }
88
- }
1
+ {
2
+ "name": "@royalinvest/dto",
3
+ "version": "0.76.1",
4
+ "description": "Data Transfer Objects (DTOs) to carry data between frontend and backend processes.",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "module": "./dist/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.js",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./backend": {
15
+ "types": "./dist/backend.d.ts",
16
+ "require": "./dist/backend.js",
17
+ "import": "./dist/backend.js"
18
+ },
19
+ "./credit-check": {
20
+ "types": "./dist/credit-check/index.d.ts",
21
+ "require": "./dist/credit-check/index.js",
22
+ "import": "./dist/credit-check/index.js"
23
+ },
24
+ "./enum": {
25
+ "types": "./dist/enum/index.d.ts",
26
+ "require": "./dist/enum/index.js",
27
+ "import": "./dist/enum/index.js"
28
+ }
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git@ssh.dev.azure.com:v3/royalinvest/royalinvest/npm-package"
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "scripts": {
41
+ "build": "npx tsc",
42
+ "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
43
+ "lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"",
44
+ "prettier": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
45
+ "prettier:check": "npx prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
46
+ "clear-all": "rm -rf node_modules .next out dist build",
47
+ "re-start": "rm -rf node_modules .next out dist build && npm install && npm run dev",
48
+ "re-build": "rm -rf node_modules .next out dist build && npm install && npm run build",
49
+ "prepublishOnly": "npm run build",
50
+ "test": "echo \"Not implemented yet\""
51
+ },
52
+ "lint-staged": {
53
+ "src/**/*.{js,jsx,ts,tsx}": [
54
+ "prettier --write",
55
+ "eslint --fix",
56
+ "git add"
57
+ ]
58
+ },
59
+ "prettier": {
60
+ "tabWidth": 2,
61
+ "useTabs": false,
62
+ "singleQuote": false,
63
+ "printWidth": 120
64
+ },
65
+ "author": "Samos Technologies Inc.",
66
+ "license": "ISC",
67
+ "devDependencies": {
68
+ "@eslint/js": "^9.11.1",
69
+ "@types/amqplib": "^0.10.6",
70
+ "@types/node": "^24.1.0",
71
+ "eslint": "^9.11.1",
72
+ "eslint-plugin-react": "^7.37.0",
73
+ "globals": "^15.9.0",
74
+ "husky": "^8.0.0",
75
+ "lint-staged": "^15.2.10",
76
+ "prettier": "^3.3.3",
77
+ "typescript-eslint": "^8.7.0"
78
+ },
79
+ "dependencies": {
80
+ "amqplib": "^0.10.3",
81
+ "dayjs": "^1.11.19",
82
+ "prom-client": "^15.1.3"
83
+ },
84
+ "peerDependencies": {
85
+ "pino": "^9.7.0",
86
+ "pino-pretty": "^13.0.0"
87
+ }
88
+ }
package/dist/billing.d.ts DELETED
@@ -1 +0,0 @@
1
- export type BillingIntervalType = "month" | "year" | "once";
@@ -1,8 +0,0 @@
1
- import { IContractParty } from "./contractParty";
2
- import { IProperty } from "./property";
3
- export interface IProcessContractNotification {
4
- user_id: string;
5
- contract_id: string;
6
- parties?: IContractParty[];
7
- property?: IProperty;
8
- }
package/dist/payment.d.ts DELETED
@@ -1 +0,0 @@
1
- export type PaymentIntervalType = "month" | "year";
package/dist/payment.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export interface ISignatureInitials {
2
- initials: string;
3
- signature: string;
4
- timestamp: string;
5
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes
@@ -1 +0,0 @@
1
- "use strict";
File without changes