speedly 1.3.0 → 2.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/cjs/auth/auth2.d.ts +18 -0
- package/dist/cjs/auth/auth2.js +93 -0
- package/dist/cjs/config/init.d.ts +15 -0
- package/dist/cjs/config/init.js +58 -0
- package/dist/cjs/db/db.d.ts +65 -67
- package/dist/cjs/db/db.js +15 -30
- package/dist/cjs/document/index.d.ts +2 -0
- package/dist/cjs/document/index.js +7 -0
- package/dist/cjs/index.d.ts +3 -53
- package/dist/cjs/index.js +9 -22
- package/dist/cjs/kit/auth/auth.d.ts +3 -0
- package/dist/cjs/kit/auth/auth.js +38 -0
- package/dist/cjs/kit/auth/types.d.ts +19 -0
- package/dist/cjs/kit/auth/types.js +2 -0
- package/dist/cjs/kit/db/db.d.ts +182 -0
- package/dist/cjs/kit/db/db.js +594 -0
- package/dist/cjs/kit/db/utils.d.ts +3 -0
- package/dist/cjs/kit/db/utils.js +15 -0
- package/dist/cjs/kit/index.d.ts +5 -0
- package/dist/cjs/kit/index.js +14 -0
- package/dist/cjs/kit/uploader/uploader.d.ts +24 -0
- package/dist/cjs/kit/uploader/uploader.js +148 -0
- package/dist/cjs/kit/validator/validator.d.ts +9 -0
- package/dist/cjs/kit/validator/validator.js +36 -0
- package/dist/cjs/model/index.d.ts +2 -0
- package/dist/cjs/model/index.js +8 -0
- package/dist/cjs/model/translation.d.ts +24 -6
- package/dist/cjs/modules/index.d.ts +2 -0
- package/dist/cjs/modules/index.js +8 -0
- package/dist/cjs/modules/translation/translation.routes.js +12 -8
- package/dist/cjs/util/index.d.ts +2 -0
- package/dist/cjs/util/index.js +8 -0
- package/dist/cjs/util/makeOptional.js +17 -7
- package/dist/cjs/yup.config.d.ts +2 -0
- package/dist/cjs/yup.config.js +24 -0
- package/dist/esm/config/init.d.ts +15 -0
- package/dist/esm/config/init.js +58 -0
- package/dist/esm/db/db.d.ts +65 -67
- package/dist/esm/db/db.js +15 -30
- package/dist/esm/document/index.d.ts +2 -0
- package/dist/esm/document/index.js +7 -0
- package/dist/esm/index.d.ts +3 -53
- package/dist/esm/index.js +9 -22
- package/dist/esm/kit/auth/auth.d.ts +3 -0
- package/dist/esm/kit/auth/auth.js +38 -0
- package/dist/esm/kit/auth/types.d.ts +19 -0
- package/dist/esm/kit/auth/types.js +2 -0
- package/dist/esm/kit/db/db.d.ts +182 -0
- package/dist/esm/kit/db/db.js +594 -0
- package/dist/esm/kit/db/utils.d.ts +3 -0
- package/dist/esm/kit/db/utils.js +15 -0
- package/dist/esm/kit/index.d.ts +5 -0
- package/dist/esm/kit/index.js +14 -0
- package/dist/esm/kit/uploader/uploader.d.ts +24 -0
- package/dist/esm/kit/uploader/uploader.js +148 -0
- package/dist/esm/kit/validator/validator.d.ts +9 -0
- package/dist/esm/kit/validator/validator.js +36 -0
- package/dist/esm/model/index.d.ts +2 -0
- package/dist/esm/model/index.js +8 -0
- package/dist/esm/model/translation.d.ts +24 -6
- package/dist/esm/modules/index.d.ts +2 -0
- package/dist/esm/modules/index.js +8 -0
- package/dist/esm/modules/translation/translation.routes.js +12 -8
- package/dist/esm/util/index.d.ts +2 -0
- package/dist/esm/util/index.js +8 -0
- package/dist/esm/util/makeOptional.js +17 -7
- package/package.json +1 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { Request, Response, NextFunction } from "express";
|
|
2
|
+
declare module "express-serve-static-core" {
|
|
3
|
+
interface Request {
|
|
4
|
+
document?: any;
|
|
5
|
+
user?: any;
|
|
6
|
+
}
|
|
7
|
+
interface Response {
|
|
8
|
+
logger?: (message: string, details?: any) => void;
|
|
9
|
+
success?: (statusCode: number, body: any) => void;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
type ConfigsType = {
|
|
13
|
+
dbType?: string;
|
|
14
|
+
path?: string;
|
|
15
|
+
dbEnv?: string;
|
|
16
|
+
type: "internal" | "external";
|
|
17
|
+
pagination?: {
|
|
18
|
+
quantity?: number;
|
|
19
|
+
detailed?: boolean;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
declare const db: (collectionName: string, config?: ConfigsType) => {
|
|
25
|
+
find: (match?: {}) => {
|
|
26
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
27
|
+
select(value: string | {
|
|
28
|
+
[key: string]: -1 | 1;
|
|
29
|
+
}): /*elided*/ any;
|
|
30
|
+
sort(value: string | {
|
|
31
|
+
[key: string]: -1 | 1;
|
|
32
|
+
}): /*elided*/ any;
|
|
33
|
+
skip(value: number): /*elided*/ any;
|
|
34
|
+
limit(value: number): /*elided*/ any;
|
|
35
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
36
|
+
};
|
|
37
|
+
create: (body?: {}) => {
|
|
38
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
39
|
+
select(value: string | {
|
|
40
|
+
[key: string]: -1 | 1;
|
|
41
|
+
}): /*elided*/ any;
|
|
42
|
+
sort(value: string | {
|
|
43
|
+
[key: string]: -1 | 1;
|
|
44
|
+
}): /*elided*/ any;
|
|
45
|
+
skip(value: number): /*elided*/ any;
|
|
46
|
+
limit(value: number): /*elided*/ any;
|
|
47
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
48
|
+
};
|
|
49
|
+
updateOne: (match?: {}, body?: {}) => {
|
|
50
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
51
|
+
select(value: string | {
|
|
52
|
+
[key: string]: -1 | 1;
|
|
53
|
+
}): /*elided*/ any;
|
|
54
|
+
sort(value: string | {
|
|
55
|
+
[key: string]: -1 | 1;
|
|
56
|
+
}): /*elided*/ any;
|
|
57
|
+
skip(value: number): /*elided*/ any;
|
|
58
|
+
limit(value: number): /*elided*/ any;
|
|
59
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
60
|
+
};
|
|
61
|
+
updateMany: (match?: {}, body?: {}) => {
|
|
62
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
63
|
+
select(value: string | {
|
|
64
|
+
[key: string]: -1 | 1;
|
|
65
|
+
}): /*elided*/ any;
|
|
66
|
+
sort(value: string | {
|
|
67
|
+
[key: string]: -1 | 1;
|
|
68
|
+
}): /*elided*/ any;
|
|
69
|
+
skip(value: number): /*elided*/ any;
|
|
70
|
+
limit(value: number): /*elided*/ any;
|
|
71
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
72
|
+
};
|
|
73
|
+
deleteOne: (match?: {}) => {
|
|
74
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
75
|
+
select(value: string | {
|
|
76
|
+
[key: string]: -1 | 1;
|
|
77
|
+
}): /*elided*/ any;
|
|
78
|
+
sort(value: string | {
|
|
79
|
+
[key: string]: -1 | 1;
|
|
80
|
+
}): /*elided*/ any;
|
|
81
|
+
skip(value: number): /*elided*/ any;
|
|
82
|
+
limit(value: number): /*elided*/ any;
|
|
83
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
84
|
+
};
|
|
85
|
+
deleteMany: (match?: {}) => {
|
|
86
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
87
|
+
select(value: string | {
|
|
88
|
+
[key: string]: -1 | 1;
|
|
89
|
+
}): /*elided*/ any;
|
|
90
|
+
sort(value: string | {
|
|
91
|
+
[key: string]: -1 | 1;
|
|
92
|
+
}): /*elided*/ any;
|
|
93
|
+
skip(value: number): /*elided*/ any;
|
|
94
|
+
limit(value: number): /*elided*/ any;
|
|
95
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
96
|
+
};
|
|
97
|
+
findOne: (match?: {}) => {
|
|
98
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
99
|
+
select(value: string | {
|
|
100
|
+
[key: string]: -1 | 1;
|
|
101
|
+
}): /*elided*/ any;
|
|
102
|
+
sort(value: string | {
|
|
103
|
+
[key: string]: -1 | 1;
|
|
104
|
+
}): /*elided*/ any;
|
|
105
|
+
skip(value: number): /*elided*/ any;
|
|
106
|
+
limit(value: number): /*elided*/ any;
|
|
107
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
108
|
+
};
|
|
109
|
+
findOneAndUpdate: (match?: {}, body?: {}) => {
|
|
110
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
111
|
+
select(value: string | {
|
|
112
|
+
[key: string]: -1 | 1;
|
|
113
|
+
}): /*elided*/ any;
|
|
114
|
+
sort(value: string | {
|
|
115
|
+
[key: string]: -1 | 1;
|
|
116
|
+
}): /*elided*/ any;
|
|
117
|
+
skip(value: number): /*elided*/ any;
|
|
118
|
+
limit(value: number): /*elided*/ any;
|
|
119
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
120
|
+
};
|
|
121
|
+
aggregate: (pipeline?: never[]) => {
|
|
122
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
123
|
+
select(value: string | {
|
|
124
|
+
[key: string]: -1 | 1;
|
|
125
|
+
}): /*elided*/ any;
|
|
126
|
+
sort(value: string | {
|
|
127
|
+
[key: string]: -1 | 1;
|
|
128
|
+
}): /*elided*/ any;
|
|
129
|
+
skip(value: number): /*elided*/ any;
|
|
130
|
+
limit(value: number): /*elided*/ any;
|
|
131
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
132
|
+
};
|
|
133
|
+
findOneAndDelete: (match?: {}) => {
|
|
134
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
135
|
+
select(value: string | {
|
|
136
|
+
[key: string]: -1 | 1;
|
|
137
|
+
}): /*elided*/ any;
|
|
138
|
+
sort(value: string | {
|
|
139
|
+
[key: string]: -1 | 1;
|
|
140
|
+
}): /*elided*/ any;
|
|
141
|
+
skip(value: number): /*elided*/ any;
|
|
142
|
+
limit(value: number): /*elided*/ any;
|
|
143
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
144
|
+
};
|
|
145
|
+
findById: (id?: string) => {
|
|
146
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
147
|
+
select(value: string | {
|
|
148
|
+
[key: string]: -1 | 1;
|
|
149
|
+
}): /*elided*/ any;
|
|
150
|
+
sort(value: string | {
|
|
151
|
+
[key: string]: -1 | 1;
|
|
152
|
+
}): /*elided*/ any;
|
|
153
|
+
skip(value: number): /*elided*/ any;
|
|
154
|
+
limit(value: number): /*elided*/ any;
|
|
155
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
156
|
+
};
|
|
157
|
+
findByIdAndUpdate: (id?: string, body?: {}) => {
|
|
158
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
159
|
+
select(value: string | {
|
|
160
|
+
[key: string]: -1 | 1;
|
|
161
|
+
}): /*elided*/ any;
|
|
162
|
+
sort(value: string | {
|
|
163
|
+
[key: string]: -1 | 1;
|
|
164
|
+
}): /*elided*/ any;
|
|
165
|
+
skip(value: number): /*elided*/ any;
|
|
166
|
+
limit(value: number): /*elided*/ any;
|
|
167
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
168
|
+
};
|
|
169
|
+
findByIdAndDelete: (id?: string) => {
|
|
170
|
+
(req: Request, res: Response, next: NextFunction): Promise<void>;
|
|
171
|
+
select(value: string | {
|
|
172
|
+
[key: string]: -1 | 1;
|
|
173
|
+
}): /*elided*/ any;
|
|
174
|
+
sort(value: string | {
|
|
175
|
+
[key: string]: -1 | 1;
|
|
176
|
+
}): /*elided*/ any;
|
|
177
|
+
skip(value: number): /*elided*/ any;
|
|
178
|
+
limit(value: number): /*elided*/ any;
|
|
179
|
+
populate(value: string | object | (string | object)[]): /*elided*/ any;
|
|
180
|
+
};
|
|
181
|
+
} | undefined;
|
|
182
|
+
export default db;
|