@ccci/micro-server 1.1.3 → 1.1.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.ts +1 -0
- package/dist/index.js +104100 -66614
- package/dist/types/RedisTypes.d.ts +48 -0
- package/package.json +8 -3
- package/dist/decorators/Endpoints.d.ts +0 -12
- package/dist/types/ApplicationOptionType.d.ts +0 -36
- package/dist/types/AttachmentMetadataTypes.d.ts +0 -23
- package/dist/types/BaseControllerTypes.d.ts +0 -42
- package/dist/types/BaseModelTypes.d.ts +0 -41
- package/dist/types/BaseRouterTypes.d.ts +0 -9
- package/dist/types/BaseSocketType.d.ts +0 -6
- package/dist/types/BrokerType.d.ts +0 -13
- package/dist/types/NotificationTypes.d.ts +0 -9
- package/dist/types/UploadedFileType.d.ts +0 -11
- package/dist/utils/ApplicationServer.d.ts +0 -30
- package/dist/utils/BaseAuthenticatorModel.d.ts +0 -7
- package/dist/utils/BaseConsumer.d.ts +0 -44
- package/dist/utils/BaseController.d.ts +0 -97
- package/dist/utils/BaseControllerHelper.d.ts +0 -27
- package/dist/utils/BaseKafka.d.ts +0 -37
- package/dist/utils/BaseModel.d.ts +0 -44
- package/dist/utils/BaseProducer.d.ts +0 -42
- package/dist/utils/BaseRouter.d.ts +0 -91
- package/dist/utils/BaseSocketHandler.d.ts +0 -37
- package/dist/utils/DatabaseConnector.d.ts +0 -26
- package/dist/utils/ErrorHandler.d.ts +0 -5
- package/dist/utils/IBaseModel.d.ts +0 -9
- package/dist/utils/Logger.d.ts +0 -8
- package/dist/utils/Mailer.d.ts +0 -23
- package/dist/utils/Mixins.d.ts +0 -39
- package/dist/utils/PushNotifier.d.ts +0 -19
- package/dist/utils/RouterFactory.d.ts +0 -12
- package/dist/utils/ServeKafka.d.ts +0 -16
- package/dist/utils/TokenGenerator.d.ts +0 -11
- package/dist/utils/Uploader.d.ts +0 -33
- package/dist/utils/WebSocketServer.d.ts +0 -29
- package/dist/utils/uploader-s3.d.ts +0 -68
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { Request, Response, NextFunction, Router } from 'express';
|
|
2
|
-
import BaseController from './BaseController';
|
|
3
|
-
import { Mappings } from '../types/BaseRouterTypes';
|
|
4
|
-
export default class BaseRouter<T extends BaseController> {
|
|
5
|
-
grantPublicAccess: boolean;
|
|
6
|
-
controller: T;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param {Controller} controller
|
|
10
|
-
*/
|
|
11
|
-
constructor(controller: T);
|
|
12
|
-
/**
|
|
13
|
-
* @description GET route
|
|
14
|
-
* @param {Request} req
|
|
15
|
-
* @param {Response} res
|
|
16
|
-
* @param {NextFunction} next
|
|
17
|
-
*/
|
|
18
|
-
get(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* @description GET ARCHIVES route
|
|
21
|
-
* @param {Request} req
|
|
22
|
-
* @param {Response} res
|
|
23
|
-
* @param {NextFunction} next
|
|
24
|
-
*/
|
|
25
|
-
archives(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* @description POST route
|
|
28
|
-
* @param {Request} req
|
|
29
|
-
* @param {Response} res
|
|
30
|
-
* @param {NextFunction} next
|
|
31
|
-
*/
|
|
32
|
-
post(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* @description GET route (/:id)
|
|
35
|
-
* @param {HttpRequest} req
|
|
36
|
-
* @param {HttpResponse} res
|
|
37
|
-
* @param {*} next
|
|
38
|
-
*/
|
|
39
|
-
getId(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* @description PUT route (/:id)
|
|
42
|
-
* @param {HttpRequest} req
|
|
43
|
-
* @param {HttpResponse} res
|
|
44
|
-
* @param {*} next
|
|
45
|
-
*/
|
|
46
|
-
update(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @param req
|
|
50
|
-
* @param res
|
|
51
|
-
* @param next
|
|
52
|
-
*/
|
|
53
|
-
delete(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @param req
|
|
57
|
-
* @param res
|
|
58
|
-
* @param next
|
|
59
|
-
*/
|
|
60
|
-
restore(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
61
|
-
/**
|
|
62
|
-
* /count route
|
|
63
|
-
* @param req
|
|
64
|
-
* @param res
|
|
65
|
-
* @param next
|
|
66
|
-
*/
|
|
67
|
-
count(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
68
|
-
/**
|
|
69
|
-
* /stats get count by group
|
|
70
|
-
* @param req
|
|
71
|
-
* @param res
|
|
72
|
-
* @param next
|
|
73
|
-
*/
|
|
74
|
-
stats(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* @description default mappings that will be inherited across all router class
|
|
77
|
-
* @returns {Array} mappings
|
|
78
|
-
*/
|
|
79
|
-
getMapping: () => Mappings[];
|
|
80
|
-
/**
|
|
81
|
-
* @description additional mappings placeholder, designed to be overriden
|
|
82
|
-
* @returns {Array} mappings
|
|
83
|
-
*/
|
|
84
|
-
getAdditionalMapping: () => Mappings[];
|
|
85
|
-
/**
|
|
86
|
-
* @description create the express router
|
|
87
|
-
* @returns {Router} router
|
|
88
|
-
*/
|
|
89
|
-
getRoutes(): Router;
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=BaseRouter.d.ts.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="bun-types" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="bun-types" />
|
|
4
|
-
import type { Server, ServerWebSocket } from 'bun';
|
|
5
|
-
export default class BaseSocketHandler {
|
|
6
|
-
static channel: string;
|
|
7
|
-
static server: Server;
|
|
8
|
-
static websocket: ServerWebSocket;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param req {Request}
|
|
12
|
-
* @param server {Server}
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
upgrade(req: Request, server: Server): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @param ws {ServerWebSocket}
|
|
19
|
-
* @param message {String}
|
|
20
|
-
*/
|
|
21
|
-
accept(ws: ServerWebSocket, message: string): Promise<void>;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param ws {ServerWebSocket}
|
|
25
|
-
*/
|
|
26
|
-
connect(ws: ServerWebSocket): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @param ws {ServerWebSocket}
|
|
30
|
-
* @param code {number}
|
|
31
|
-
* @param reason {reason}
|
|
32
|
-
*/
|
|
33
|
-
disconnect(ws: ServerWebSocket, code: number, reason: string): Promise<void>;
|
|
34
|
-
getInstance(): ServerWebSocket;
|
|
35
|
-
static parse(url: String): any;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=BaseSocketHandler.d.ts.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Model, ModelStatic, Sequelize } from "sequelize";
|
|
2
|
-
export default class DatabaseConnector {
|
|
3
|
-
private static connections;
|
|
4
|
-
private static connection;
|
|
5
|
-
private static rootDir;
|
|
6
|
-
constructor(path: string);
|
|
7
|
-
/**
|
|
8
|
-
* Initializes the database connection
|
|
9
|
-
* @param path
|
|
10
|
-
*/
|
|
11
|
-
static init(): Promise<Array<Sequelize>>;
|
|
12
|
-
static checkConnection(connection: Sequelize): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param path root dir (__dirname)
|
|
16
|
-
*/
|
|
17
|
-
initializeModels(): Promise<void>;
|
|
18
|
-
getConnections(): Array<Sequelize>;
|
|
19
|
-
static getConnection(): Sequelize;
|
|
20
|
-
connect(connection: Sequelize): Promise<void>;
|
|
21
|
-
static getModel(modelName: string): ModelStatic<Model>;
|
|
22
|
-
static sync(modelName: string, force?: boolean, alter?: boolean): Promise<void>;
|
|
23
|
-
static syncAll(force?: boolean, alter?: boolean): Promise<void>;
|
|
24
|
-
static disconnect(): void;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=DatabaseConnector.d.ts.map
|
package/dist/utils/Logger.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default class Logger {
|
|
2
|
-
static info(message: string, details?: any): void;
|
|
3
|
-
static error(error: Error): void;
|
|
4
|
-
static warn(message: string): void;
|
|
5
|
-
static debug(message: string, details?: any): void;
|
|
6
|
-
static table(data: object[]): void;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=Logger.d.ts.map
|
package/dist/utils/Mailer.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ApplicationOptionType } from '..';
|
|
2
|
-
interface MailInterface {
|
|
3
|
-
from?: string;
|
|
4
|
-
to: string | string[];
|
|
5
|
-
cc?: string | string[];
|
|
6
|
-
bcc?: string | string[];
|
|
7
|
-
subject: string;
|
|
8
|
-
text?: string;
|
|
9
|
-
html: string;
|
|
10
|
-
}
|
|
11
|
-
export default class Mailer {
|
|
12
|
-
private static instance;
|
|
13
|
-
private transporter;
|
|
14
|
-
private sender;
|
|
15
|
-
private LOCAL_DIR;
|
|
16
|
-
static getInstance(): Mailer;
|
|
17
|
-
connect(options: ApplicationOptionType): Promise<void>;
|
|
18
|
-
hasValidConfig(options: ApplicationOptionType): boolean;
|
|
19
|
-
sendMail(options: MailInterface, template?: string, values?: any): Promise<void>;
|
|
20
|
-
findTemplate(name: string): Promise<unknown>;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=Mailer.d.ts.map
|
package/dist/utils/Mixins.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retrieves the MIME type for a given file name based on its extension.
|
|
3
|
-
* @param fileName - The name of the file to extract the MIME type for.
|
|
4
|
-
* @returns The MIME type if found, or null if not found.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getMimeType: (fileName: string) => string | null;
|
|
7
|
-
/**
|
|
8
|
-
* Extracts numeric IDs from a string in the format [Name:ID].
|
|
9
|
-
* @param input - The input string containing IDs in the format [Name:ID].
|
|
10
|
-
* @returns An array of extracted numeric IDs.
|
|
11
|
-
*/
|
|
12
|
-
export declare const extractIds: (input: string) => number[];
|
|
13
|
-
/**
|
|
14
|
-
* Decrypts an encoded string using a salt.
|
|
15
|
-
* @param salt - The salt used for decryption.
|
|
16
|
-
* @param encoded - The encoded string to decrypt.
|
|
17
|
-
* @returns The decrypted string.
|
|
18
|
-
*/
|
|
19
|
-
export declare const decrypt: (salt: string, encoded: string) => string;
|
|
20
|
-
/**
|
|
21
|
-
* Encrypts a plain text string using a salt.
|
|
22
|
-
* @param salt - The salt used for encryption.
|
|
23
|
-
* @param text - The plain text string to encrypt.
|
|
24
|
-
* @returns The encrypted string in hexadecimal format.
|
|
25
|
-
*/
|
|
26
|
-
export declare const encrypt: (salt: string, text: string) => string;
|
|
27
|
-
/**
|
|
28
|
-
* Returns the start and end dates of the current week.
|
|
29
|
-
* The week starts on Monday (00:00:00.000) and ends on Sunday (23:59:59.999).
|
|
30
|
-
*
|
|
31
|
-
* @returns An object containing:
|
|
32
|
-
* - `startOfWeek`: Date representing the beginning of the current week (Monday at midnight).
|
|
33
|
-
* - `endOfWeek`: Date representing the end of the current week (Sunday at 23:59:59.999).
|
|
34
|
-
*/
|
|
35
|
-
export declare const getCurrentWeek: () => {
|
|
36
|
-
startOfWeek: Date;
|
|
37
|
-
endOfWeek: Date;
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=Mixins.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { NotificationType, NotificationOptions } from '@/types/NotificationTypes';
|
|
2
|
-
import admin from 'firebase-admin';
|
|
3
|
-
import { BatchResponse } from 'firebase-admin/lib/messaging/messaging-api';
|
|
4
|
-
export default class PushNotifier {
|
|
5
|
-
static FirebaseAdmin: typeof admin;
|
|
6
|
-
static instance: number;
|
|
7
|
-
private static rootDir;
|
|
8
|
-
constructor(path: string);
|
|
9
|
-
/**
|
|
10
|
-
* Initiate sending push notifications
|
|
11
|
-
* @param tokens firebase user tokens
|
|
12
|
-
* @param message message to send
|
|
13
|
-
* @param metadata
|
|
14
|
-
* @param options
|
|
15
|
-
*/
|
|
16
|
-
static sendNotifications(tokens: Array<string>, message: NotificationType, metadata?: any, options?: NotificationOptions): Promise<BatchResponse | undefined>;
|
|
17
|
-
static sendNotification(token: string, message: NotificationType, metadata?: any, options?: NotificationOptions): Promise<string | undefined>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=PushNotifier.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Application, Request, Response, NextFunction } from 'express';
|
|
2
|
-
export default class RouterFactory {
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param app express application instance
|
|
6
|
-
* @param pathName root path of the application
|
|
7
|
-
* @param folderName path of the routers (default: routes)
|
|
8
|
-
*/
|
|
9
|
-
static init(app: Application, pathName: string, folderName?: string, context?: string): Promise<void>;
|
|
10
|
-
static authenticate(req: Request, res: Response, next: NextFunction, grantPublicAccess?: boolean): Response<any, Record<string, any>> | undefined;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=RouterFactory.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { KafkaConfig } from "kafkajs";
|
|
2
|
-
export declare class ServeKafka {
|
|
3
|
-
private consumerPath;
|
|
4
|
-
private producerPath;
|
|
5
|
-
private config;
|
|
6
|
-
constructor(config: KafkaConfig, consumerPath?: string, producerPath?: string);
|
|
7
|
-
/**
|
|
8
|
-
* Starts all consumers by dynamically importing and initializing consumer classes.
|
|
9
|
-
*/
|
|
10
|
-
startConsumers(): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Starts all producers by dynamically importing and initializing producer classes.
|
|
13
|
-
*/
|
|
14
|
-
startProducers(): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=ServeKafka.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Request } from 'express';
|
|
2
|
-
import { RequestUserType } from '../types/BaseModelTypes';
|
|
3
|
-
/**
|
|
4
|
-
* generate jwt token from the payload
|
|
5
|
-
* @param payload
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare function generate(payload: object): string;
|
|
9
|
-
export declare function verify(token: string, secret?: string): RequestUserType;
|
|
10
|
-
export declare function decode(val: string | Request): RequestUserType;
|
|
11
|
-
//# sourceMappingURL=TokenGenerator.d.ts.map
|
package/dist/utils/Uploader.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { UploadedFile } from 'express-fileupload';
|
|
2
|
-
import * as minio from 'minio';
|
|
3
|
-
import { ApplicationOptionType } from '..';
|
|
4
|
-
import { UploadedFileType } from '@/types/UploadedFileType';
|
|
5
|
-
import { RemoveOptions } from 'minio';
|
|
6
|
-
export default class Uploader {
|
|
7
|
-
static client: minio.Client;
|
|
8
|
-
constructor();
|
|
9
|
-
/**
|
|
10
|
-
* Initializes the minIO client instance
|
|
11
|
-
*/
|
|
12
|
-
static init(options: ApplicationOptionType): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* checks .env variables if properly configured
|
|
15
|
-
*/
|
|
16
|
-
static hasValidConfig(options: ApplicationOptionType): boolean;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param bucket {string} The bucket name in minIO
|
|
20
|
-
* @param dir {string} The directory where the files are stored
|
|
21
|
-
* @param uploads {Array<UploadedFile> | UploadedFile} file(s) to be uploaded
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
static upload(bucket: string, dir: string, uploads: Array<UploadedFile> | UploadedFile): Promise<Array<UploadedFileType> | UploadedFileType>;
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param bucket {string} bucket name
|
|
28
|
-
* @param file {string} file directory
|
|
29
|
-
*/
|
|
30
|
-
preview(bucket: string, file: string): Promise<void>;
|
|
31
|
-
static delete(bucketName: string, objectName: string, removeOpts?: RemoveOptions): Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=Uploader.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="bun-types" />
|
|
2
|
-
/// <reference types="bun-types" />
|
|
3
|
-
import { ServerWebSocket } from 'bun';
|
|
4
|
-
import BaseSocketHandler from './BaseSocketHandler';
|
|
5
|
-
export default class WebSocketServer {
|
|
6
|
-
static socketHandlers: Array<{
|
|
7
|
-
path: string;
|
|
8
|
-
handler: BaseSocketHandler;
|
|
9
|
-
}>;
|
|
10
|
-
static init(port: number | undefined, dir: string, folder?: string): Array<{
|
|
11
|
-
path: string;
|
|
12
|
-
handler: BaseSocketHandler;
|
|
13
|
-
}>;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @returns
|
|
17
|
-
*/
|
|
18
|
-
static getSocketHandlers(): Array<{
|
|
19
|
-
path: string;
|
|
20
|
-
handler: BaseSocketHandler;
|
|
21
|
-
}>;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param path
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
static getHandler(path: string): ServerWebSocket | null;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=WebSocketServer.d.ts.map
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ApplicationOptionType } from "@/types/ApplicationOptionType";
|
|
3
|
-
import { S3, DeleteObjectRequest } from "@aws-sdk/client-s3";
|
|
4
|
-
import { AttachmentMetadataType } from "@/types/AttachmentMetadataTypes";
|
|
5
|
-
export default class UploaderS3 {
|
|
6
|
-
static client: S3;
|
|
7
|
-
static uploadSessions: Record<string, string>;
|
|
8
|
-
/**
|
|
9
|
-
* Initializes the S3 client instance
|
|
10
|
-
*/
|
|
11
|
-
static init(options: ApplicationOptionType): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Validates configuration options
|
|
14
|
-
*/
|
|
15
|
-
static hasValidConfig(options: ApplicationOptionType): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Lists all available S3 buckets
|
|
18
|
-
*/
|
|
19
|
-
static listBuckets(): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Starts a new multipart upload session
|
|
22
|
-
* @param bucketName S3 bucket name
|
|
23
|
-
* @param key Key for the object in S3
|
|
24
|
-
*/
|
|
25
|
-
static startMultipartUpload(bucketName: string, key: string): Promise<string>;
|
|
26
|
-
/**
|
|
27
|
-
* Uploads a file part to S3
|
|
28
|
-
* @param bucketName S3 bucket name
|
|
29
|
-
* @param key Key for the object in S3
|
|
30
|
-
* @param uploadId Multipart upload session ID
|
|
31
|
-
* @param partNumber Part number for the upload
|
|
32
|
-
* @param chunk Chunk of the file to upload
|
|
33
|
-
*/
|
|
34
|
-
static uploadPart(bucketName: string, key: string, uploadId: string, partNumber: number, chunk: Buffer): Promise<string | null>;
|
|
35
|
-
/**
|
|
36
|
-
* Completes a multipart upload
|
|
37
|
-
* @param bucketName S3 bucket name
|
|
38
|
-
* @param key Key for the object in S3
|
|
39
|
-
* @param uploadId Multipart upload session ID
|
|
40
|
-
* @param parts List of uploaded parts
|
|
41
|
-
*/
|
|
42
|
-
static completeMultipartUpload(bucketName: string, key: string, uploadId: string, parts: {
|
|
43
|
-
PartNumber: number;
|
|
44
|
-
ETag: string;
|
|
45
|
-
}[]): Promise<AttachmentMetadataType>;
|
|
46
|
-
/**
|
|
47
|
-
* Aborts a multipart upload
|
|
48
|
-
* @param bucketName S3 bucket name
|
|
49
|
-
* @param key Key for the object in S3
|
|
50
|
-
* @param uploadId Multipart upload session ID
|
|
51
|
-
*/
|
|
52
|
-
static abortMultipartUpload(bucketName: string, key: string, uploadId: string): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Directly uploads a file to S3 without chunking
|
|
55
|
-
* @param bucketName S3 bucket name
|
|
56
|
-
* @param key Key for the object in S3
|
|
57
|
-
* @param fileContent The content of the file to upload
|
|
58
|
-
* @param contentType The MIME type of the file
|
|
59
|
-
*/
|
|
60
|
-
static uploadFile(bucketName: string, key: string, fileContent: Buffer | Uint8Array | Blob | string, contentType: string): Promise<AttachmentMetadataType>;
|
|
61
|
-
/**
|
|
62
|
-
* Deletes all incomplete multipart uploads in the specified bucket
|
|
63
|
-
* @param bucketName S3 bucket name
|
|
64
|
-
*/
|
|
65
|
-
static deleteIncompleteUploads(bucketName: string): Promise<void>;
|
|
66
|
-
static deleteFile(request: DeleteObjectRequest): Promise<void>;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=uploader-s3.d.ts.map
|