@meridianjs/types 0.1.2 → 0.1.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.
package/dist/index.d.mts CHANGED
@@ -164,6 +164,20 @@ interface IQuery {
164
164
  data: T[];
165
165
  }>;
166
166
  }
167
+ interface IStorageProvider {
168
+ /** Upload a file buffer to the given sub-directory. Returns the public URL and storage key. */
169
+ upload(file: {
170
+ buffer: Buffer;
171
+ originalname: string;
172
+ mimetype: string;
173
+ size: number;
174
+ }, subDir: string): Promise<{
175
+ url: string;
176
+ key: string;
177
+ }>;
178
+ /** Delete a file by its public URL or storage key. */
179
+ delete(urlOrKey: string): Promise<void>;
180
+ }
167
181
  interface PluginRegistrationContext {
168
182
  container: MeridianContainer;
169
183
  pluginOptions: Record<string, unknown>;
@@ -171,4 +185,4 @@ interface PluginRegistrationContext {
171
185
  }
172
186
  type PluginRegisterFn = (ctx: PluginRegistrationContext) => Promise<void>;
173
187
 
174
- export type { AdminConfig, AuthenticatedUser, EventMessage, IEventBus, ILogger, IModuleService, IQuery, IScheduler, 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 };
188
+ export type { AdminConfig, AuthenticatedUser, EventMessage, 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
@@ -164,6 +164,20 @@ interface IQuery {
164
164
  data: T[];
165
165
  }>;
166
166
  }
167
+ interface IStorageProvider {
168
+ /** Upload a file buffer to the given sub-directory. Returns the public URL and storage key. */
169
+ upload(file: {
170
+ buffer: Buffer;
171
+ originalname: string;
172
+ mimetype: string;
173
+ size: number;
174
+ }, subDir: string): Promise<{
175
+ url: string;
176
+ key: string;
177
+ }>;
178
+ /** Delete a file by its public URL or storage key. */
179
+ delete(urlOrKey: string): Promise<void>;
180
+ }
167
181
  interface PluginRegistrationContext {
168
182
  container: MeridianContainer;
169
183
  pluginOptions: Record<string, unknown>;
@@ -171,4 +185,4 @@ interface PluginRegistrationContext {
171
185
  }
172
186
  type PluginRegisterFn = (ctx: PluginRegistrationContext) => Promise<void>;
173
187
 
174
- export type { AdminConfig, AuthenticatedUser, EventMessage, IEventBus, ILogger, IModuleService, IQuery, IScheduler, 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 };
188
+ export type { AdminConfig, AuthenticatedUser, EventMessage, 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.2",
3
+ "version": "0.1.3",
4
4
  "description": "Shared TypeScript types and interfaces for Meridian",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",