@meridianjs/types 0.1.6 → 0.1.8

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 ADDED
@@ -0,0 +1,101 @@
1
+ # @meridianjs/types
2
+
3
+ Shared TypeScript interfaces and types for the MeridianJS ecosystem. This package is a pure type declaration library — no runtime code, no dependencies.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @meridianjs/types
9
+ ```
10
+
11
+ ## Overview
12
+
13
+ All public contracts between MeridianJS packages live here. Consuming packages import from `@meridianjs/types` rather than from each other, keeping the dependency graph flat and preventing circular imports.
14
+
15
+ ## Exported Types
16
+
17
+ ### Container & DI
18
+
19
+ ```typescript
20
+ import type { MeridianContainer } from "@meridianjs/types"
21
+
22
+ // The DI container interface — resolve tokens, register values, create child scopes
23
+ interface MeridianContainer {
24
+ resolve<T = unknown>(token: string): T
25
+ register(registrations: Record<string, unknown>): void
26
+ createScope(): MeridianContainer
27
+ dispose?(): Promise<void>
28
+ }
29
+ ```
30
+
31
+ ### Module System
32
+
33
+ ```typescript
34
+ import type { ModuleDefinition, LoaderFn, LoaderOptions, LinkableConfig } from "@meridianjs/types"
35
+ ```
36
+
37
+ ### Configuration
38
+
39
+ ```typescript
40
+ import type { MeridianConfig, ProjectConfig, ModuleConfig, PluginConfig } from "@meridianjs/types"
41
+ ```
42
+
43
+ ### Event Bus
44
+
45
+ ```typescript
46
+ import type { IEventBus, EventMessage, SubscriberFn, SubscriberArgs, SubscriberConfig } from "@meridianjs/types"
47
+ ```
48
+
49
+ ### Scheduler
50
+
51
+ ```typescript
52
+ import type { IScheduler, ScheduledJobConfig } from "@meridianjs/types"
53
+ ```
54
+
55
+ ### HTTP / Auth
56
+
57
+ ```typescript
58
+ import type { AuthenticatedUser, MeridianRequestBase } from "@meridianjs/types"
59
+
60
+ // JWT payload shape attached to req.user
61
+ interface AuthenticatedUser {
62
+ id: string
63
+ workspaceId: string
64
+ roles: string[]
65
+ permissions: string[]
66
+ }
67
+ ```
68
+
69
+ ### Logger
70
+
71
+ ```typescript
72
+ import type { ILogger } from "@meridianjs/types"
73
+ ```
74
+
75
+ ### Domain Enums
76
+
77
+ ```typescript
78
+ import type {
79
+ IssueType, // "bug" | "feature" | "task" | "epic" | "story"
80
+ IssuePriority, // "urgent" | "high" | "medium" | "low" | "none"
81
+ SprintStatus, // "planned" | "active" | "completed"
82
+ ProjectVisibility,
83
+ WorkspacePlan,
84
+ } from "@meridianjs/types"
85
+ ```
86
+
87
+ ### Storage & Email
88
+
89
+ ```typescript
90
+ import type { IStorageProvider, IEmailService, EmailSendOptions } from "@meridianjs/types"
91
+ ```
92
+
93
+ ### Plugin System
94
+
95
+ ```typescript
96
+ import type { PluginRegistrationContext, PluginRegisterFn } from "@meridianjs/types"
97
+ ```
98
+
99
+ ## License
100
+
101
+ MIT
package/dist/index.d.mts CHANGED
@@ -54,6 +54,7 @@ interface ModuleConfig {
54
54
  interface PluginConfig {
55
55
  resolve: string;
56
56
  options?: Record<string, unknown>;
57
+ disableSubscribers?: string[];
57
58
  }
58
59
  interface AdminConfig {
59
60
  disable?: boolean;
@@ -189,6 +190,15 @@ interface EmailSendOptions {
189
190
  interface IEmailService {
190
191
  send(options: EmailSendOptions): Promise<void>;
191
192
  }
193
+ interface EmailTemplateOverride {
194
+ subject?: string;
195
+ text?: string;
196
+ html?: string;
197
+ }
198
+ interface IEmailTemplateService {
199
+ /** Return an override object for the given event + contextual data, or null to use defaults. */
200
+ render(event: string, data: unknown): EmailTemplateOverride | null;
201
+ }
192
202
  interface PluginRegistrationContext {
193
203
  container: MeridianContainer;
194
204
  pluginOptions: Record<string, unknown>;
@@ -196,4 +206,4 @@ interface PluginRegistrationContext {
196
206
  }
197
207
  type PluginRegisterFn = (ctx: PluginRegistrationContext) => Promise<void>;
198
208
 
199
- export type { AdminConfig, AuthenticatedUser, EmailSendOptions, EventMessage, IEmailService, IEventBus, ILogger, IModuleService, IQuery, IScheduler, IStorageProvider, IssuePriority, IssueStatus, IssueType, LinkDefinition, LinkEndpoint, LinkableConfig, LinkableEntry, LoaderFn, LoaderOptions, MeridianConfig, MeridianContainer, MeridianRequestBase, ModuleConfig, ModuleDefinition, NotificationChannel, PluginConfig, PluginRegisterFn, PluginRegistrationContext, ProjectConfig, ProjectStatus, ProjectVisibility, QueryGraphOptions, ScheduledJobConfig, ScheduledJobFn, SprintStatus, StepConfig, StepContext, SubscriberArgs, SubscriberConfig, SubscriberFn, TeamRole, WorkerMode, WorkflowConfig, WorkspacePlan };
209
+ export type { AdminConfig, AuthenticatedUser, EmailSendOptions, EmailTemplateOverride, EventMessage, IEmailService, IEmailTemplateService, IEventBus, ILogger, IModuleService, IQuery, IScheduler, IStorageProvider, IssuePriority, IssueStatus, IssueType, LinkDefinition, LinkEndpoint, LinkableConfig, LinkableEntry, LoaderFn, LoaderOptions, MeridianConfig, MeridianContainer, MeridianRequestBase, ModuleConfig, ModuleDefinition, NotificationChannel, PluginConfig, PluginRegisterFn, PluginRegistrationContext, ProjectConfig, ProjectStatus, ProjectVisibility, QueryGraphOptions, ScheduledJobConfig, ScheduledJobFn, SprintStatus, StepConfig, StepContext, SubscriberArgs, SubscriberConfig, SubscriberFn, TeamRole, WorkerMode, WorkflowConfig, WorkspacePlan };
package/dist/index.d.ts CHANGED
@@ -54,6 +54,7 @@ interface ModuleConfig {
54
54
  interface PluginConfig {
55
55
  resolve: string;
56
56
  options?: Record<string, unknown>;
57
+ disableSubscribers?: string[];
57
58
  }
58
59
  interface AdminConfig {
59
60
  disable?: boolean;
@@ -189,6 +190,15 @@ interface EmailSendOptions {
189
190
  interface IEmailService {
190
191
  send(options: EmailSendOptions): Promise<void>;
191
192
  }
193
+ interface EmailTemplateOverride {
194
+ subject?: string;
195
+ text?: string;
196
+ html?: string;
197
+ }
198
+ interface IEmailTemplateService {
199
+ /** Return an override object for the given event + contextual data, or null to use defaults. */
200
+ render(event: string, data: unknown): EmailTemplateOverride | null;
201
+ }
192
202
  interface PluginRegistrationContext {
193
203
  container: MeridianContainer;
194
204
  pluginOptions: Record<string, unknown>;
@@ -196,4 +206,4 @@ interface PluginRegistrationContext {
196
206
  }
197
207
  type PluginRegisterFn = (ctx: PluginRegistrationContext) => Promise<void>;
198
208
 
199
- export type { AdminConfig, AuthenticatedUser, EmailSendOptions, EventMessage, IEmailService, IEventBus, ILogger, IModuleService, IQuery, IScheduler, IStorageProvider, IssuePriority, IssueStatus, IssueType, LinkDefinition, LinkEndpoint, LinkableConfig, LinkableEntry, LoaderFn, LoaderOptions, MeridianConfig, MeridianContainer, MeridianRequestBase, ModuleConfig, ModuleDefinition, NotificationChannel, PluginConfig, PluginRegisterFn, PluginRegistrationContext, ProjectConfig, ProjectStatus, ProjectVisibility, QueryGraphOptions, ScheduledJobConfig, ScheduledJobFn, SprintStatus, StepConfig, StepContext, SubscriberArgs, SubscriberConfig, SubscriberFn, TeamRole, WorkerMode, WorkflowConfig, WorkspacePlan };
209
+ export type { AdminConfig, AuthenticatedUser, EmailSendOptions, EmailTemplateOverride, EventMessage, IEmailService, IEmailTemplateService, IEventBus, ILogger, IModuleService, IQuery, IScheduler, IStorageProvider, IssuePriority, IssueStatus, IssueType, LinkDefinition, LinkEndpoint, LinkableConfig, LinkableEntry, LoaderFn, LoaderOptions, MeridianConfig, MeridianContainer, MeridianRequestBase, ModuleConfig, ModuleDefinition, NotificationChannel, PluginConfig, PluginRegisterFn, PluginRegistrationContext, ProjectConfig, ProjectStatus, ProjectVisibility, QueryGraphOptions, ScheduledJobConfig, ScheduledJobFn, SprintStatus, StepConfig, StepContext, SubscriberArgs, SubscriberConfig, SubscriberFn, TeamRole, WorkerMode, WorkflowConfig, WorkspacePlan };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridianjs/types",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Shared TypeScript types and interfaces for Meridian",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",