nexus-backend 1.0.5 → 1.0.6
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 +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +10380 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10407 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Request, Response, NextFunction } from 'express';
|
|
2
2
|
import NodeCache from 'node-cache';
|
|
3
3
|
import { Resend } from 'resend';
|
|
4
|
+
import multer from 'multer';
|
|
4
5
|
|
|
5
6
|
interface SuccessResponse<T = any> {
|
|
6
7
|
success: true;
|
|
@@ -109,4 +110,10 @@ declare class Mailer {
|
|
|
109
110
|
sendMail(options: EmailOptions): Promise<boolean>;
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
declare const uploader: {
|
|
114
|
+
upload: multer.Multer;
|
|
115
|
+
uploadToNexusCloud: (file: Express.Multer.File | undefined, label: string) => Promise<string | undefined>;
|
|
116
|
+
getNexusDownloadUrl: (fileId: string) => Promise<string>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export { ApiError, BadRequestError, Cache, type EmailOptions, type ErrorResponse, ForbiddenError, Mailer, type MailerConfig, type MongoConfig, NotFoundError, type SuccessResponse, UnauthorizedError, ValidationError, cacheMemory, connectMongoDb, errorHandler as errorMiddleware, errorResponse, random, requiredEnv, successResponse, uploader };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Request, Response, NextFunction } from 'express';
|
|
2
2
|
import NodeCache from 'node-cache';
|
|
3
3
|
import { Resend } from 'resend';
|
|
4
|
+
import multer from 'multer';
|
|
4
5
|
|
|
5
6
|
interface SuccessResponse<T = any> {
|
|
6
7
|
success: true;
|
|
@@ -109,4 +110,10 @@ declare class Mailer {
|
|
|
109
110
|
sendMail(options: EmailOptions): Promise<boolean>;
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
declare const uploader: {
|
|
114
|
+
upload: multer.Multer;
|
|
115
|
+
uploadToNexusCloud: (file: Express.Multer.File | undefined, label: string) => Promise<string | undefined>;
|
|
116
|
+
getNexusDownloadUrl: (fileId: string) => Promise<string>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export { ApiError, BadRequestError, Cache, type EmailOptions, type ErrorResponse, ForbiddenError, Mailer, type MailerConfig, type MongoConfig, NotFoundError, type SuccessResponse, UnauthorizedError, ValidationError, cacheMemory, connectMongoDb, errorHandler as errorMiddleware, errorResponse, random, requiredEnv, successResponse, uploader };
|