@meridianjs/types 0.1.1 → 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
@@ -2,6 +2,7 @@ interface MeridianContainer {
2
2
  resolve<T = unknown>(token: string): T;
3
3
  register(registrations: Record<string, unknown>): void;
4
4
  createScope(): MeridianContainer;
5
+ dispose?(): Promise<void>;
5
6
  }
6
7
  interface ModuleDefinition {
7
8
  key: string;
@@ -108,6 +109,7 @@ interface AuthenticatedUser {
108
109
  id: string;
109
110
  workspaceId: string;
110
111
  roles: string[];
112
+ permissions: string[];
111
113
  }
112
114
  interface MeridianRequestBase {
113
115
  scope: MeridianContainer;
@@ -162,6 +164,20 @@ interface IQuery {
162
164
  data: T[];
163
165
  }>;
164
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
+ }
165
181
  interface PluginRegistrationContext {
166
182
  container: MeridianContainer;
167
183
  pluginOptions: Record<string, unknown>;
@@ -169,4 +185,4 @@ interface PluginRegistrationContext {
169
185
  }
170
186
  type PluginRegisterFn = (ctx: PluginRegistrationContext) => Promise<void>;
171
187
 
172
- 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
@@ -2,6 +2,7 @@ interface MeridianContainer {
2
2
  resolve<T = unknown>(token: string): T;
3
3
  register(registrations: Record<string, unknown>): void;
4
4
  createScope(): MeridianContainer;
5
+ dispose?(): Promise<void>;
5
6
  }
6
7
  interface ModuleDefinition {
7
8
  key: string;
@@ -108,6 +109,7 @@ interface AuthenticatedUser {
108
109
  id: string;
109
110
  workspaceId: string;
110
111
  roles: string[];
112
+ permissions: string[];
111
113
  }
112
114
  interface MeridianRequestBase {
113
115
  scope: MeridianContainer;
@@ -162,6 +164,20 @@ interface IQuery {
162
164
  data: T[];
163
165
  }>;
164
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
+ }
165
181
  interface PluginRegistrationContext {
166
182
  container: MeridianContainer;
167
183
  pluginOptions: Record<string, unknown>;
@@ -169,4 +185,4 @@ interface PluginRegistrationContext {
169
185
  }
170
186
  type PluginRegisterFn = (ctx: PluginRegistrationContext) => Promise<void>;
171
187
 
172
- 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.1",
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",