tiryaq-shared 1.3.2 → 1.3.3

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.
Files changed (2) hide show
  1. package/README.md +125 -125
  2. package/package.json +50 -50
package/README.md CHANGED
@@ -1,125 +1,125 @@
1
- # @tiryaq/shared
2
-
3
- [![npm version](https://badge.fury.io/js/%40tiryaq%2Fshared.svg)](https://badge.fury.io/js/%40tiryaq%2Fshared)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
-
6
- Shared TypeScript types, interfaces, and message patterns for Tiryaq healthcare microservices platform.
7
-
8
- ## 🚀 Installation
9
-
10
- ```bash
11
- npm install @tiryaq/shared
12
- ```
13
-
14
- ## 📖 Usage
15
-
16
- ### Import Types and Interfaces
17
-
18
- ```typescript
19
- import {
20
- User,
21
- Pharmacy,
22
- Appointment,
23
- ApiResponse
24
- } from '@tiryaq/shared';
25
-
26
- const user: User = {
27
- id: '123',
28
- email: 'patient@example.com',
29
- firstName: 'John',
30
- lastName: 'Doe',
31
- // ... other properties
32
- };
33
- ```
34
-
35
- ### Import Kafka Message Patterns
36
-
37
- ```typescript
38
- import { AUTH_PATTERNS, PHARMACY_PATTERNS } from '@tiryaq/shared';
39
-
40
- // In your NestJS microservice
41
- @MessagePattern(AUTH_PATTERNS.USER_REGISTER)
42
- async handleUserRegister(@Payload() data: RegisterUserDto) {
43
- // Handle user registration
44
- }
45
- ```
46
-
47
- ### Import Event Types
48
-
49
- ```typescript
50
- import {
51
- UserRegisteredEvent,
52
- OrderCreatedEvent,
53
- EVENT_PATTERNS
54
- } from '@tiryaq/shared';
55
-
56
- // Emit events
57
- const event: UserRegisteredEvent = {
58
- userId: user.id,
59
- email: user.email,
60
- firstName: user.firstName,
61
- lastName: user.lastName,
62
- timestamp: new Date()
63
- };
64
- ```
65
-
66
- ## 📋 Available Exports
67
-
68
- ### Core Entities
69
- - `User`, `UserAddress`
70
- - `Pharmacy`, `Medicine`, `PharmacyOrder`
71
- - `Doctor`, `Appointment`, `Prescription`
72
- - `Lab`, `LabTest`, `LabReport`
73
- - `Wallet`, `Transaction`, `PaymentCard`
74
-
75
- ### DTOs
76
- - `RegisterUserDto`, `LoginDto`
77
- - `CreateAddressDto`
78
- - `SearchQuery`, `SearchFilters`
79
-
80
- ### Message Patterns
81
- - `AUTH_PATTERNS` - Authentication service patterns
82
- - `PHARMACY_PATTERNS` - Pharmacy service patterns
83
- - `CONSULTATION_PATTERNS` - Consultation service patterns
84
- - `PAYMENT_PATTERNS` - Payment service patterns
85
- - `NOTIFICATION_PATTERNS` - Notification service patterns
86
-
87
- ### Event Types
88
- - `UserRegisteredEvent`
89
- - `OrderCreatedEvent`
90
- - `AppointmentBookedEvent`
91
- - `PaymentProcessedEvent`
92
-
93
- ### Utilities
94
- - `ApiResponse<T>` - Standard API response wrapper
95
- - `PaginatedResponse<T>` - Paginated response wrapper
96
- - `KAFKA_CONFIG` - Default Kafka configuration
97
- - `SERVICE_PORTS` - Service port mappings
98
-
99
- ## 🏗️ Architecture
100
-
101
- This package is designed for event-driven microservices architecture using:
102
-
103
- - **NestJS** - Node.js framework
104
- - **Kafka** - Event streaming platform
105
- - **TypeScript** - Type safety
106
- - **TypeORM** - Database ORM
107
-
108
- ## 🔄 Versioning
109
-
110
- We follow [Semantic Versioning](https://semver.org/):
111
-
112
- - `MAJOR.MINOR.PATCH`
113
- - Breaking changes increment MAJOR
114
- - New features increment MINOR
115
- - Bug fixes increment PATCH
116
-
117
- ## 📄 License
118
-
119
- This project is licensed under the MIT License.
120
-
121
- ## 🆘 Support
122
-
123
- - 📧 Email: team@tiryaq.com
124
- - 🐛 Issues: [GitHub Issues](https://github.com/tiryaq/shared/issues)
125
- - 📖 Docs: [Documentation](https://docs.tiryaq.com)
1
+ # @tiryaq/shared
2
+
3
+ [![npm version](https://badge.fury.io/js/%40tiryaq%2Fshared.svg)](https://badge.fury.io/js/%40tiryaq%2Fshared)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Shared TypeScript types, interfaces, and message patterns for Tiryaq healthcare microservices platform.
7
+
8
+ ## 🚀 Installation
9
+
10
+ ```bash
11
+ npm install @tiryaq/shared
12
+ ```
13
+
14
+ ## 📖 Usage
15
+
16
+ ### Import Types and Interfaces
17
+
18
+ ```typescript
19
+ import {
20
+ User,
21
+ Pharmacy,
22
+ Appointment,
23
+ ApiResponse
24
+ } from '@tiryaq/shared';
25
+
26
+ const user: User = {
27
+ id: '123',
28
+ email: 'patient@example.com',
29
+ firstName: 'John',
30
+ lastName: 'Doe',
31
+ // ... other properties
32
+ };
33
+ ```
34
+
35
+ ### Import Kafka Message Patterns
36
+
37
+ ```typescript
38
+ import { AUTH_PATTERNS, PHARMACY_PATTERNS } from '@tiryaq/shared';
39
+
40
+ // In your NestJS microservice
41
+ @MessagePattern(AUTH_PATTERNS.USER_REGISTER)
42
+ async handleUserRegister(@Payload() data: RegisterUserDto) {
43
+ // Handle user registration
44
+ }
45
+ ```
46
+
47
+ ### Import Event Types
48
+
49
+ ```typescript
50
+ import {
51
+ UserRegisteredEvent,
52
+ OrderCreatedEvent,
53
+ EVENT_PATTERNS
54
+ } from '@tiryaq/shared';
55
+
56
+ // Emit events
57
+ const event: UserRegisteredEvent = {
58
+ userId: user.id,
59
+ email: user.email,
60
+ firstName: user.firstName,
61
+ lastName: user.lastName,
62
+ timestamp: new Date()
63
+ };
64
+ ```
65
+
66
+ ## 📋 Available Exports
67
+
68
+ ### Core Entities
69
+ - `User`, `UserAddress`
70
+ - `Pharmacy`, `Medicine`, `PharmacyOrder`
71
+ - `Doctor`, `Appointment`, `Prescription`
72
+ - `Lab`, `LabTest`, `LabReport`
73
+ - `Wallet`, `Transaction`, `PaymentCard`
74
+
75
+ ### DTOs
76
+ - `RegisterUserDto`, `LoginDto`
77
+ - `CreateAddressDto`
78
+ - `SearchQuery`, `SearchFilters`
79
+
80
+ ### Message Patterns
81
+ - `AUTH_PATTERNS` - Authentication service patterns
82
+ - `PHARMACY_PATTERNS` - Pharmacy service patterns
83
+ - `CONSULTATION_PATTERNS` - Consultation service patterns
84
+ - `PAYMENT_PATTERNS` - Payment service patterns
85
+ - `NOTIFICATION_PATTERNS` - Notification service patterns
86
+
87
+ ### Event Types
88
+ - `UserRegisteredEvent`
89
+ - `OrderCreatedEvent`
90
+ - `AppointmentBookedEvent`
91
+ - `PaymentProcessedEvent`
92
+
93
+ ### Utilities
94
+ - `ApiResponse<T>` - Standard API response wrapper
95
+ - `PaginatedResponse<T>` - Paginated response wrapper
96
+ - `KAFKA_CONFIG` - Default Kafka configuration
97
+ - `SERVICE_PORTS` - Service port mappings
98
+
99
+ ## 🏗️ Architecture
100
+
101
+ This package is designed for event-driven microservices architecture using:
102
+
103
+ - **NestJS** - Node.js framework
104
+ - **Kafka** - Event streaming platform
105
+ - **TypeScript** - Type safety
106
+ - **TypeORM** - Database ORM
107
+
108
+ ## 🔄 Versioning
109
+
110
+ We follow [Semantic Versioning](https://semver.org/):
111
+
112
+ - `MAJOR.MINOR.PATCH`
113
+ - Breaking changes increment MAJOR
114
+ - New features increment MINOR
115
+ - Bug fixes increment PATCH
116
+
117
+ ## 📄 License
118
+
119
+ This project is licensed under the MIT License.
120
+
121
+ ## 🆘 Support
122
+
123
+ - 📧 Email: team@tiryaq.com
124
+ - 🐛 Issues: [GitHub Issues](https://github.com/tiryaq/shared/issues)
125
+ - 📖 Docs: [Documentation](https://docs.tiryaq.com)
package/package.json CHANGED
@@ -1,50 +1,50 @@
1
- {
2
- "name": "tiryaq-shared",
3
- "version": "1.3.2",
4
- "description": "Shared types, interfaces, and message patterns for Tiryaq healthcare microservices",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "build": "tsc",
9
- "clean": "rmdir /s /q dist 2>nul || echo \"dist folder cleaned\"",
10
- "dev": "tsc --watch",
11
- "prepublishOnly": "npm run clean && npm run build"
12
- },
13
- "keywords": [
14
- "tiryaq",
15
- "healthcare",
16
- "microservices",
17
- "types",
18
- "interfaces",
19
- "typescript",
20
- "kafka",
21
- "nestjs"
22
- ],
23
- "author": "Tiryaq Team",
24
- "license": "MIT",
25
- "files": [
26
- "dist/**/*",
27
- "README.md"
28
- ],
29
- "repository": {
30
- "type": "git",
31
- "url": "git+https://github.com/tiryaq/shared.git"
32
- },
33
- "devDependencies": {
34
- "@types/express": "^5.0.3",
35
- "@types/node": "^24.3.0",
36
- "typescript": "^5.9.2"
37
- },
38
- "publishConfig": {
39
- "access": "public"
40
- },
41
- "dependencies": {
42
- "@nestjs/common": "^11.1.6",
43
- "@nestjs/core": "^11.1.6",
44
- "@nestjs/microservices": "^11.1.6",
45
- "express": "^5.1.0",
46
- "reflect-metadata": "^0.2.2",
47
- "rxjs": "^7.8.2",
48
- "tiryaq-shared": "^1.2.11"
49
- }
50
- }
1
+ {
2
+ "name": "tiryaq-shared",
3
+ "version": "1.3.3",
4
+ "description": "Shared types, interfaces, and message patterns for Tiryaq healthcare microservices",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "clean": "rmdir /s /q dist 2>nul || echo \"dist folder cleaned\"",
10
+ "dev": "tsc --watch",
11
+ "prepublishOnly": "npm run clean && npm run build"
12
+ },
13
+ "keywords": [
14
+ "tiryaq",
15
+ "healthcare",
16
+ "microservices",
17
+ "types",
18
+ "interfaces",
19
+ "typescript",
20
+ "kafka",
21
+ "nestjs"
22
+ ],
23
+ "author": "Tiryaq Team",
24
+ "license": "MIT",
25
+ "files": [
26
+ "dist/**/*",
27
+ "README.md"
28
+ ],
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/tiryaq/shared.git"
32
+ },
33
+ "devDependencies": {
34
+ "@types/express": "^5.0.3",
35
+ "@types/node": "^24.3.0",
36
+ "typescript": "^5.9.2"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "dependencies": {
42
+ "@nestjs/common": "^11.1.6",
43
+ "@nestjs/core": "^11.1.6",
44
+ "@nestjs/microservices": "^11.1.6",
45
+ "express": "^5.1.0",
46
+ "reflect-metadata": "^0.2.2",
47
+ "rxjs": "^7.8.2",
48
+ "tiryaq-shared": "^1.2.11"
49
+ }
50
+ }