@nathapp/nestjs-notify 1.0.0 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nestjs-notify",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Notification management with templates, preferences and delivery strategies for NestJS",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && tsc -p tsconfig.json",
@@ -24,23 +24,23 @@
24
24
  "lib": "lib"
25
25
  },
26
26
  "dependencies": {
27
- "@nathapp/nestjs-tenant": "1.0.0",
28
- "@nathapp/nestjs-data": "^3.3.0 || ^4.0.2",
29
- "@nathapp/nestjs-common": "^3.3.0 || ^4.0.2",
27
+ "@nathapp/nestjs-tenant": "1.1.0",
28
+ "@nathapp/nestjs-data": "^3.3.0 || ^4.0.3",
29
+ "@nathapp/nestjs-common": "^3.3.0 || ^4.0.3",
30
30
  "handlebars": "^4.7.8",
31
- "@nathapp/nestjs-queue": "^3.3.0 || ^4.0.2"
31
+ "@nathapp/nestjs-queue": "^3.3.0 || ^4.0.3"
32
32
  },
33
33
  "devDependencies": {
34
- "@nathapp/nestjs-cache": "^4.0.2",
34
+ "@nathapp/nestjs-cache": "^4.0.3",
35
35
  "eslint": "^8.57.0",
36
36
  "typescript": "^5"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@nestjs/common": "^11.0.0 || ^12.1.0",
40
40
  "@nestjs/core": "^11.0.0 || ^12.1.0",
41
- "@nathapp/nestjs-cache": "^3.3.0 || ^4.0.2",
42
- "@nathapp/nestjs-common": "^3.3.0 || ^4.0.2",
43
- "@nathapp/nestjs-notification": "^3.3.0 || ^4.0.2",
41
+ "@nathapp/nestjs-cache": "^3.3.0 || ^4.0.3",
42
+ "@nathapp/nestjs-common": "^3.3.0 || ^4.0.3",
43
+ "@nathapp/nestjs-notification": "^3.3.0 || ^4.0.3",
44
44
  "@nestjs/event-emitter": "^3.0.0 || ^12.0.0"
45
45
  },
46
46
  "peerDependenciesMeta": {
package/AGENTS.md DELETED
@@ -1,73 +0,0 @@
1
- # Agent Instructions
2
-
3
- This file is auto-generated from `.nax/context.md`.
4
- DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
5
-
6
- These instructions apply to all AI coding agents in this project.
7
-
8
- ---
9
-
10
- ## Project Metadata
11
-
12
- > Auto-injected by `nax generate`
13
-
14
- **Project:** `@nathapp/nestjs-notify`
15
-
16
- **Language:** TypeScript
17
-
18
- **Key dependencies:** typescript
19
-
20
- ---
21
- # CLAUDE.md — @nathapp/nestjs-notify
22
-
23
- Notification management with templates, preferences and delivery strategies for NestJS. Management layer on top of `@nathapp/nestjs-notification` (which handles actual sending).
24
-
25
- ## Status: ✅ Complete (ADR-004 adopted)
26
-
27
- ## Directory Structure
28
-
29
- ```
30
- lib/
31
- ├── constant/tokens.ts — DI tokens
32
- ├── delivery/ — TODO: delivery strategies (immediate, batched, digest, fallback chain)
33
- ├── dto/ — TODO: DTOs for notification operations
34
- ├── event/ — TODO: domain events (NotificationSent, DeliveryFailed, etc.)
35
- ├── exception/ — TODO: NotifyExceptionCode enum
36
- ├── interface/
37
- │ ├── models/ — TODO: ITemplate, IPreference, IDeliveryLog
38
- │ ├── repositories/ — TODO: repository interfaces
39
- │ └── services/ — TODO: service interfaces
40
- ├── module/ — TODO: NotifyModule.register() / registerAsync()
41
- ├── service/ — TODO: DefaultNotifyService, DefaultTemplateService, etc.
42
- └── template/ — TODO: Handlebars template engine integration
43
- ```
44
-
45
- ## DI Tokens
46
-
47
- **Repositories**: `TEMPLATE_REPOSITORY`, `PREFERENCE_REPOSITORY`, `DELIVERY_LOG_REPOSITORY`
48
-
49
- **Services**: `NOTIFY_SERVICE`, `TEMPLATE_SERVICE`, `PREFERENCE_SERVICE`, `DELIVERY_SERVICE`, `DELIVERY_TRACKER`
50
-
51
- ## Dependencies
52
-
53
- - `@nathapp/nestjs-tenant` (workspace) — tenant context
54
- - `@nathapp/nestjs-common` ^3.0.0 — `AppException`
55
- - `@nathapp/nestjs-notification` ^3.0.0 — actual email/SMS/push sending
56
- - `@nestjs/event-emitter` — domain events
57
- - `handlebars` ^4.7.8 — template rendering
58
-
59
- ## Architecture Notes
60
-
61
- - **nestjs-notify** = management (templates, preferences, delivery tracking, retry/fallback)
62
- - **nestjs-notification** (existing) = transport (send email via SES, SMS via Twilio, push via FCM)
63
- - This package orchestrates WHEN and HOW to send; `nestjs-notification` handles the actual delivery
64
- - Template rendering uses Handlebars — consumers register templates with variables
65
- - Preferences: per-user, per-tenant channel preferences (email/SMS/push opt-in/out)
66
-
67
- ## ADR-004 Notes
68
-
69
- All three repository interfaces (`ITemplateRepository`, `IPreferenceRepository`, `IDeliveryLogRepository`) now extend `IRepository<Domain, string>` from `@nathapp/nestjs-data`. This aligns them with the platform-wide repository contract (tenant, iam, account).
70
-
71
- The tenant-guard pattern (ensuring tenant context before repository access) lives in `DefaultTemplateService` — it is not a separate guard class.
72
-
73
- **No transactional flows** are introduced in nestjs-notify. Notification delivery spans external I/O (email/SMS/push providers) which cannot participate in a DB transaction. Failed deliveries are routed through the DLQ (`DefaultDlqService`) and retried via queue (BullMQ/Kafka/RabbitMQ) — a queue-only durability pattern, not a transaction pattern.
package/CLAUDE.md DELETED
@@ -1,71 +0,0 @@
1
- # Project Context
2
-
3
- This file is auto-generated from `.nax/context.md`.
4
- DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
5
-
6
- ---
7
-
8
- ## Project Metadata
9
-
10
- > Auto-injected by `nax generate`
11
-
12
- **Project:** `@nathapp/nestjs-notify`
13
-
14
- **Language:** TypeScript
15
-
16
- **Key dependencies:** typescript
17
-
18
- ---
19
- # CLAUDE.md — @nathapp/nestjs-notify
20
-
21
- Notification management with templates, preferences and delivery strategies for NestJS. Management layer on top of `@nathapp/nestjs-notification` (which handles actual sending).
22
-
23
- ## Status: ✅ Complete (ADR-004 adopted)
24
-
25
- ## Directory Structure
26
-
27
- ```
28
- lib/
29
- ├── constant/tokens.ts — DI tokens
30
- ├── delivery/ — TODO: delivery strategies (immediate, batched, digest, fallback chain)
31
- ├── dto/ — TODO: DTOs for notification operations
32
- ├── event/ — TODO: domain events (NotificationSent, DeliveryFailed, etc.)
33
- ├── exception/ — TODO: NotifyExceptionCode enum
34
- ├── interface/
35
- │ ├── models/ — TODO: ITemplate, IPreference, IDeliveryLog
36
- │ ├── repositories/ — TODO: repository interfaces
37
- │ └── services/ — TODO: service interfaces
38
- ├── module/ — TODO: NotifyModule.register() / registerAsync()
39
- ├── service/ — TODO: DefaultNotifyService, DefaultTemplateService, etc.
40
- └── template/ — TODO: Handlebars template engine integration
41
- ```
42
-
43
- ## DI Tokens
44
-
45
- **Repositories**: `TEMPLATE_REPOSITORY`, `PREFERENCE_REPOSITORY`, `DELIVERY_LOG_REPOSITORY`
46
-
47
- **Services**: `NOTIFY_SERVICE`, `TEMPLATE_SERVICE`, `PREFERENCE_SERVICE`, `DELIVERY_SERVICE`, `DELIVERY_TRACKER`
48
-
49
- ## Dependencies
50
-
51
- - `@nathapp/nestjs-tenant` (workspace) — tenant context
52
- - `@nathapp/nestjs-common` ^3.0.0 — `AppException`
53
- - `@nathapp/nestjs-notification` ^3.0.0 — actual email/SMS/push sending
54
- - `@nestjs/event-emitter` — domain events
55
- - `handlebars` ^4.7.8 — template rendering
56
-
57
- ## Architecture Notes
58
-
59
- - **nestjs-notify** = management (templates, preferences, delivery tracking, retry/fallback)
60
- - **nestjs-notification** (existing) = transport (send email via SES, SMS via Twilio, push via FCM)
61
- - This package orchestrates WHEN and HOW to send; `nestjs-notification` handles the actual delivery
62
- - Template rendering uses Handlebars — consumers register templates with variables
63
- - Preferences: per-user, per-tenant channel preferences (email/SMS/push opt-in/out)
64
-
65
- ## ADR-004 Notes
66
-
67
- All three repository interfaces (`ITemplateRepository`, `IPreferenceRepository`, `IDeliveryLogRepository`) now extend `IRepository<Domain, string>` from `@nathapp/nestjs-data`. This aligns them with the platform-wide repository contract (tenant, iam, account).
68
-
69
- The tenant-guard pattern (ensuring tenant context before repository access) lives in `DefaultTemplateService` — it is not a separate guard class.
70
-
71
- **No transactional flows** are introduced in nestjs-notify. Notification delivery spans external I/O (email/SMS/push providers) which cannot participate in a DB transaction. Failed deliveries are routed through the DLQ (`DefaultDlqService`) and retried via queue (BullMQ/Kafka/RabbitMQ) — a queue-only durability pattern, not a transaction pattern.
package/GEMINI.md DELETED
@@ -1,71 +0,0 @@
1
- # Gemini CLI Context
2
-
3
- This file is auto-generated from `.nax/context.md`.
4
- DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
5
-
6
- ---
7
-
8
- ## Project Metadata
9
-
10
- > Auto-injected by `nax generate`
11
-
12
- **Project:** `@nathapp/nestjs-notify`
13
-
14
- **Language:** TypeScript
15
-
16
- **Key dependencies:** typescript
17
-
18
- ---
19
- # CLAUDE.md — @nathapp/nestjs-notify
20
-
21
- Notification management with templates, preferences and delivery strategies for NestJS. Management layer on top of `@nathapp/nestjs-notification` (which handles actual sending).
22
-
23
- ## Status: ✅ Complete (ADR-004 adopted)
24
-
25
- ## Directory Structure
26
-
27
- ```
28
- lib/
29
- ├── constant/tokens.ts — DI tokens
30
- ├── delivery/ — TODO: delivery strategies (immediate, batched, digest, fallback chain)
31
- ├── dto/ — TODO: DTOs for notification operations
32
- ├── event/ — TODO: domain events (NotificationSent, DeliveryFailed, etc.)
33
- ├── exception/ — TODO: NotifyExceptionCode enum
34
- ├── interface/
35
- │ ├── models/ — TODO: ITemplate, IPreference, IDeliveryLog
36
- │ ├── repositories/ — TODO: repository interfaces
37
- │ └── services/ — TODO: service interfaces
38
- ├── module/ — TODO: NotifyModule.register() / registerAsync()
39
- ├── service/ — TODO: DefaultNotifyService, DefaultTemplateService, etc.
40
- └── template/ — TODO: Handlebars template engine integration
41
- ```
42
-
43
- ## DI Tokens
44
-
45
- **Repositories**: `TEMPLATE_REPOSITORY`, `PREFERENCE_REPOSITORY`, `DELIVERY_LOG_REPOSITORY`
46
-
47
- **Services**: `NOTIFY_SERVICE`, `TEMPLATE_SERVICE`, `PREFERENCE_SERVICE`, `DELIVERY_SERVICE`, `DELIVERY_TRACKER`
48
-
49
- ## Dependencies
50
-
51
- - `@nathapp/nestjs-tenant` (workspace) — tenant context
52
- - `@nathapp/nestjs-common` ^3.0.0 — `AppException`
53
- - `@nathapp/nestjs-notification` ^3.0.0 — actual email/SMS/push sending
54
- - `@nestjs/event-emitter` — domain events
55
- - `handlebars` ^4.7.8 — template rendering
56
-
57
- ## Architecture Notes
58
-
59
- - **nestjs-notify** = management (templates, preferences, delivery tracking, retry/fallback)
60
- - **nestjs-notification** (existing) = transport (send email via SES, SMS via Twilio, push via FCM)
61
- - This package orchestrates WHEN and HOW to send; `nestjs-notification` handles the actual delivery
62
- - Template rendering uses Handlebars — consumers register templates with variables
63
- - Preferences: per-user, per-tenant channel preferences (email/SMS/push opt-in/out)
64
-
65
- ## ADR-004 Notes
66
-
67
- All three repository interfaces (`ITemplateRepository`, `IPreferenceRepository`, `IDeliveryLogRepository`) now extend `IRepository<Domain, string>` from `@nathapp/nestjs-data`. This aligns them with the platform-wide repository contract (tenant, iam, account).
68
-
69
- The tenant-guard pattern (ensuring tenant context before repository access) lives in `DefaultTemplateService` — it is not a separate guard class.
70
-
71
- **No transactional flows** are introduced in nestjs-notify. Notification delivery spans external I/O (email/SMS/push providers) which cannot participate in a DB transaction. Failed deliveries are routed through the DLQ (`DefaultDlqService`) and retried via queue (BullMQ/Kafka/RabbitMQ) — a queue-only durability pattern, not a transaction pattern.
package/codex.md DELETED
@@ -1,71 +0,0 @@
1
- # Codex Instructions
2
-
3
- This file is auto-generated from `.nax/context.md`.
4
- DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
5
-
6
- ---
7
-
8
- ## Project Metadata
9
-
10
- > Auto-injected by `nax generate`
11
-
12
- **Project:** `@nathapp/nestjs-notify`
13
-
14
- **Language:** TypeScript
15
-
16
- **Key dependencies:** typescript
17
-
18
- ---
19
- # CLAUDE.md — @nathapp/nestjs-notify
20
-
21
- Notification management with templates, preferences and delivery strategies for NestJS. Management layer on top of `@nathapp/nestjs-notification` (which handles actual sending).
22
-
23
- ## Status: ✅ Complete (ADR-004 adopted)
24
-
25
- ## Directory Structure
26
-
27
- ```
28
- lib/
29
- ├── constant/tokens.ts — DI tokens
30
- ├── delivery/ — TODO: delivery strategies (immediate, batched, digest, fallback chain)
31
- ├── dto/ — TODO: DTOs for notification operations
32
- ├── event/ — TODO: domain events (NotificationSent, DeliveryFailed, etc.)
33
- ├── exception/ — TODO: NotifyExceptionCode enum
34
- ├── interface/
35
- │ ├── models/ — TODO: ITemplate, IPreference, IDeliveryLog
36
- │ ├── repositories/ — TODO: repository interfaces
37
- │ └── services/ — TODO: service interfaces
38
- ├── module/ — TODO: NotifyModule.register() / registerAsync()
39
- ├── service/ — TODO: DefaultNotifyService, DefaultTemplateService, etc.
40
- └── template/ — TODO: Handlebars template engine integration
41
- ```
42
-
43
- ## DI Tokens
44
-
45
- **Repositories**: `TEMPLATE_REPOSITORY`, `PREFERENCE_REPOSITORY`, `DELIVERY_LOG_REPOSITORY`
46
-
47
- **Services**: `NOTIFY_SERVICE`, `TEMPLATE_SERVICE`, `PREFERENCE_SERVICE`, `DELIVERY_SERVICE`, `DELIVERY_TRACKER`
48
-
49
- ## Dependencies
50
-
51
- - `@nathapp/nestjs-tenant` (workspace) — tenant context
52
- - `@nathapp/nestjs-common` ^3.0.0 — `AppException`
53
- - `@nathapp/nestjs-notification` ^3.0.0 — actual email/SMS/push sending
54
- - `@nestjs/event-emitter` — domain events
55
- - `handlebars` ^4.7.8 — template rendering
56
-
57
- ## Architecture Notes
58
-
59
- - **nestjs-notify** = management (templates, preferences, delivery tracking, retry/fallback)
60
- - **nestjs-notification** (existing) = transport (send email via SES, SMS via Twilio, push via FCM)
61
- - This package orchestrates WHEN and HOW to send; `nestjs-notification` handles the actual delivery
62
- - Template rendering uses Handlebars — consumers register templates with variables
63
- - Preferences: per-user, per-tenant channel preferences (email/SMS/push opt-in/out)
64
-
65
- ## ADR-004 Notes
66
-
67
- All three repository interfaces (`ITemplateRepository`, `IPreferenceRepository`, `IDeliveryLogRepository`) now extend `IRepository<Domain, string>` from `@nathapp/nestjs-data`. This aligns them with the platform-wide repository contract (tenant, iam, account).
68
-
69
- The tenant-guard pattern (ensuring tenant context before repository access) lives in `DefaultTemplateService` — it is not a separate guard class.
70
-
71
- **No transactional flows** are introduced in nestjs-notify. Notification delivery spans external I/O (email/SMS/push providers) which cannot participate in a DB transaction. Failed deliveries are routed through the DLQ (`DefaultDlqService`) and retried via queue (BullMQ/Kafka/RabbitMQ) — a queue-only durability pattern, not a transaction pattern.