@vritti/api-sdk 0.0.6 → 0.0.7
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.cjs +512 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +446 -2
- package/dist/index.d.ts +446 -2
- package/dist/index.js +491 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -32,19 +32,39 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var index_exports = {};
|
|
33
33
|
__export(index_exports, {
|
|
34
34
|
AuthConfigModule: () => AuthConfigModule,
|
|
35
|
+
BadGatewayException: () => BadGatewayException,
|
|
36
|
+
BadRequestException: () => BadRequestException,
|
|
37
|
+
BaseFieldException: () => BaseFieldException,
|
|
38
|
+
ConflictException: () => ConflictException,
|
|
35
39
|
CsrfGuard: () => CsrfGuard,
|
|
36
40
|
DatabaseModule: () => DatabaseModule,
|
|
41
|
+
ForbiddenException: () => ForbiddenException2,
|
|
42
|
+
GoneException: () => GoneException,
|
|
37
43
|
HttpExceptionFilter: () => HttpExceptionFilter,
|
|
38
44
|
HttpModule: () => HttpModule,
|
|
45
|
+
InternalServerErrorException: () => InternalServerErrorException3,
|
|
46
|
+
MethodNotAllowedException: () => MethodNotAllowedException,
|
|
47
|
+
NotAcceptableException: () => NotAcceptableException,
|
|
48
|
+
NotFoundException: () => NotFoundException,
|
|
49
|
+
NotImplementedException: () => NotImplementedException,
|
|
39
50
|
Onboarding: () => Onboarding,
|
|
51
|
+
PayloadTooLargeException: () => PayloadTooLargeException,
|
|
40
52
|
PrimaryBaseRepository: () => PrimaryBaseRepository,
|
|
41
53
|
PrimaryDatabaseService: () => PrimaryDatabaseService,
|
|
42
54
|
Public: () => Public,
|
|
55
|
+
RequestTimeoutException: () => RequestTimeoutException,
|
|
56
|
+
ServiceUnavailableException: () => ServiceUnavailableException,
|
|
43
57
|
Tenant: () => Tenant,
|
|
44
58
|
TenantBaseRepository: () => TenantBaseRepository,
|
|
45
59
|
TenantContextService: () => TenantContextService,
|
|
46
60
|
TenantDatabaseService: () => TenantDatabaseService,
|
|
47
|
-
|
|
61
|
+
TooManyRequestsException: () => TooManyRequestsException,
|
|
62
|
+
UnauthorizedException: () => UnauthorizedException4,
|
|
63
|
+
UnprocessableEntityException: () => UnprocessableEntityException,
|
|
64
|
+
UnsupportedMediaTypeException: () => UnsupportedMediaTypeException,
|
|
65
|
+
ValidationException: () => ValidationException,
|
|
66
|
+
VrittiAuthGuard: () => VrittiAuthGuard,
|
|
67
|
+
getHttpStatusTitle: () => getHttpStatusTitle
|
|
48
68
|
});
|
|
49
69
|
module.exports = __toCommonJS(index_exports);
|
|
50
70
|
|
|
@@ -2036,21 +2056,511 @@ var HttpExceptionFilter = class _HttpExceptionFilter {
|
|
|
2036
2056
|
HttpExceptionFilter = _ts_decorate13([
|
|
2037
2057
|
(0, import_common18.Catch)()
|
|
2038
2058
|
], HttpExceptionFilter);
|
|
2059
|
+
|
|
2060
|
+
// src/filters/http-exception.filter.ts
|
|
2061
|
+
var import_common19 = require("@nestjs/common");
|
|
2062
|
+
function _ts_decorate14(decorators, target, key, desc) {
|
|
2063
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2064
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2065
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2066
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2067
|
+
}
|
|
2068
|
+
__name(_ts_decorate14, "_ts_decorate");
|
|
2069
|
+
function getHttpStatusTitle(status) {
|
|
2070
|
+
const enumKey = Object.entries(import_common19.HttpStatus).find(([key, value]) => value === status && isNaN(Number(key)))?.[0];
|
|
2071
|
+
if (!enumKey) {
|
|
2072
|
+
return "Error";
|
|
2073
|
+
}
|
|
2074
|
+
return enumKey.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
2075
|
+
}
|
|
2076
|
+
__name(getHttpStatusTitle, "getHttpStatusTitle");
|
|
2077
|
+
var HttpExceptionFilter2 = class _HttpExceptionFilter {
|
|
2078
|
+
static {
|
|
2079
|
+
__name(this, "HttpExceptionFilter");
|
|
2080
|
+
}
|
|
2081
|
+
logger = new import_common19.Logger(_HttpExceptionFilter.name);
|
|
2082
|
+
catch(exception, host) {
|
|
2083
|
+
const ctx = host.switchToHttp();
|
|
2084
|
+
const response = ctx.getResponse();
|
|
2085
|
+
let status = import_common19.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
2086
|
+
let errors = [];
|
|
2087
|
+
let detail = "Internal server error";
|
|
2088
|
+
if (exception instanceof import_common19.HttpException) {
|
|
2089
|
+
status = exception.getStatus();
|
|
2090
|
+
const exceptionResponse = exception.getResponse();
|
|
2091
|
+
if (typeof exceptionResponse === "object" && exceptionResponse !== null) {
|
|
2092
|
+
const responseObj = exceptionResponse;
|
|
2093
|
+
if (responseObj.errors && Array.isArray(responseObj.errors)) {
|
|
2094
|
+
errors = responseObj.errors;
|
|
2095
|
+
detail = responseObj.detail || exception.message;
|
|
2096
|
+
} else if (responseObj.message && Array.isArray(responseObj.message)) {
|
|
2097
|
+
errors = responseObj.message.map((msg) => {
|
|
2098
|
+
if (typeof msg === "object" && msg.property && msg.constraints) {
|
|
2099
|
+
return {
|
|
2100
|
+
field: msg.property,
|
|
2101
|
+
message: Object.values(msg.constraints)[0]
|
|
2102
|
+
};
|
|
2103
|
+
}
|
|
2104
|
+
return {
|
|
2105
|
+
message: typeof msg === "string" ? msg : JSON.stringify(msg)
|
|
2106
|
+
};
|
|
2107
|
+
});
|
|
2108
|
+
detail = "Validation failed";
|
|
2109
|
+
} else if (responseObj.message) {
|
|
2110
|
+
errors = [
|
|
2111
|
+
{
|
|
2112
|
+
message: Array.isArray(responseObj.message) ? responseObj.message.join(", ") : responseObj.message
|
|
2113
|
+
}
|
|
2114
|
+
];
|
|
2115
|
+
detail = responseObj.error || exception.message;
|
|
2116
|
+
}
|
|
2117
|
+
} else if (typeof exceptionResponse === "string") {
|
|
2118
|
+
errors = [
|
|
2119
|
+
{
|
|
2120
|
+
message: exceptionResponse
|
|
2121
|
+
}
|
|
2122
|
+
];
|
|
2123
|
+
detail = exceptionResponse;
|
|
2124
|
+
}
|
|
2125
|
+
} else {
|
|
2126
|
+
this.logger.error("Unexpected error:", exception);
|
|
2127
|
+
errors = [
|
|
2128
|
+
{
|
|
2129
|
+
message: "An unexpected error occurred"
|
|
2130
|
+
}
|
|
2131
|
+
];
|
|
2132
|
+
}
|
|
2133
|
+
const problemDetails = {
|
|
2134
|
+
title: getHttpStatusTitle(status),
|
|
2135
|
+
status,
|
|
2136
|
+
detail,
|
|
2137
|
+
errors
|
|
2138
|
+
};
|
|
2139
|
+
response.status(status).send(problemDetails);
|
|
2140
|
+
}
|
|
2141
|
+
};
|
|
2142
|
+
HttpExceptionFilter2 = _ts_decorate14([
|
|
2143
|
+
(0, import_common19.Catch)()
|
|
2144
|
+
], HttpExceptionFilter2);
|
|
2145
|
+
|
|
2146
|
+
// src/exceptions/base-field.exception.ts
|
|
2147
|
+
var import_common20 = require("@nestjs/common");
|
|
2148
|
+
var BaseFieldException = class extends import_common20.HttpException {
|
|
2149
|
+
static {
|
|
2150
|
+
__name(this, "BaseFieldException");
|
|
2151
|
+
}
|
|
2152
|
+
constructor(statusOrMessageOrErrors, messageOrStatus, statusOrDetail, detail) {
|
|
2153
|
+
let errors;
|
|
2154
|
+
let httpStatus;
|
|
2155
|
+
let finalDetail;
|
|
2156
|
+
if (Array.isArray(statusOrMessageOrErrors)) {
|
|
2157
|
+
errors = statusOrMessageOrErrors;
|
|
2158
|
+
httpStatus = messageOrStatus || import_common20.HttpStatus.BAD_REQUEST;
|
|
2159
|
+
finalDetail = typeof statusOrDetail === "string" ? statusOrDetail : void 0;
|
|
2160
|
+
} else if (typeof statusOrMessageOrErrors === "string" && typeof messageOrStatus === "string") {
|
|
2161
|
+
errors = [
|
|
2162
|
+
{
|
|
2163
|
+
field: statusOrMessageOrErrors,
|
|
2164
|
+
message: messageOrStatus
|
|
2165
|
+
}
|
|
2166
|
+
];
|
|
2167
|
+
httpStatus = statusOrDetail;
|
|
2168
|
+
finalDetail = detail;
|
|
2169
|
+
} else if (typeof statusOrMessageOrErrors === "string") {
|
|
2170
|
+
errors = [
|
|
2171
|
+
{
|
|
2172
|
+
message: statusOrMessageOrErrors
|
|
2173
|
+
}
|
|
2174
|
+
];
|
|
2175
|
+
httpStatus = messageOrStatus;
|
|
2176
|
+
finalDetail = typeof statusOrDetail === "string" ? statusOrDetail : void 0;
|
|
2177
|
+
} else {
|
|
2178
|
+
errors = [
|
|
2179
|
+
{
|
|
2180
|
+
message: "An error occurred"
|
|
2181
|
+
}
|
|
2182
|
+
];
|
|
2183
|
+
httpStatus = statusOrMessageOrErrors;
|
|
2184
|
+
finalDetail = void 0;
|
|
2185
|
+
}
|
|
2186
|
+
const response = finalDetail !== void 0 ? {
|
|
2187
|
+
errors,
|
|
2188
|
+
detail: finalDetail
|
|
2189
|
+
} : {
|
|
2190
|
+
errors
|
|
2191
|
+
};
|
|
2192
|
+
super(response, httpStatus);
|
|
2193
|
+
}
|
|
2194
|
+
};
|
|
2195
|
+
|
|
2196
|
+
// src/exceptions/bad-request.exception.ts
|
|
2197
|
+
var import_common21 = require("@nestjs/common");
|
|
2198
|
+
var BadRequestException = class extends BaseFieldException {
|
|
2199
|
+
static {
|
|
2200
|
+
__name(this, "BadRequestException");
|
|
2201
|
+
}
|
|
2202
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2203
|
+
if (Array.isArray(messageOrField)) {
|
|
2204
|
+
super(messageOrField, import_common21.HttpStatus.BAD_REQUEST, fieldMessageOrDetail);
|
|
2205
|
+
} else if (detail !== void 0) {
|
|
2206
|
+
super(messageOrField, fieldMessageOrDetail, import_common21.HttpStatus.BAD_REQUEST, detail);
|
|
2207
|
+
} else if (fieldMessageOrDetail) {
|
|
2208
|
+
super(messageOrField, fieldMessageOrDetail, import_common21.HttpStatus.BAD_REQUEST);
|
|
2209
|
+
} else {
|
|
2210
|
+
super(messageOrField, import_common21.HttpStatus.BAD_REQUEST);
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2214
|
+
|
|
2215
|
+
// src/exceptions/unauthorized.exception.ts
|
|
2216
|
+
var import_common22 = require("@nestjs/common");
|
|
2217
|
+
var UnauthorizedException4 = class extends BaseFieldException {
|
|
2218
|
+
static {
|
|
2219
|
+
__name(this, "UnauthorizedException");
|
|
2220
|
+
}
|
|
2221
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2222
|
+
if (Array.isArray(messageOrField)) {
|
|
2223
|
+
super(messageOrField, import_common22.HttpStatus.UNAUTHORIZED, fieldMessageOrDetail);
|
|
2224
|
+
} else if (detail !== void 0) {
|
|
2225
|
+
super(messageOrField, fieldMessageOrDetail, import_common22.HttpStatus.UNAUTHORIZED, detail);
|
|
2226
|
+
} else if (fieldMessageOrDetail) {
|
|
2227
|
+
super(messageOrField, fieldMessageOrDetail, import_common22.HttpStatus.UNAUTHORIZED);
|
|
2228
|
+
} else {
|
|
2229
|
+
super(messageOrField, import_common22.HttpStatus.UNAUTHORIZED);
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
};
|
|
2233
|
+
|
|
2234
|
+
// src/exceptions/forbidden.exception.ts
|
|
2235
|
+
var import_common23 = require("@nestjs/common");
|
|
2236
|
+
var ForbiddenException2 = class extends BaseFieldException {
|
|
2237
|
+
static {
|
|
2238
|
+
__name(this, "ForbiddenException");
|
|
2239
|
+
}
|
|
2240
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2241
|
+
if (Array.isArray(messageOrField)) {
|
|
2242
|
+
super(messageOrField, import_common23.HttpStatus.FORBIDDEN, fieldMessageOrDetail);
|
|
2243
|
+
} else if (detail !== void 0) {
|
|
2244
|
+
super(messageOrField, fieldMessageOrDetail, import_common23.HttpStatus.FORBIDDEN, detail);
|
|
2245
|
+
} else if (fieldMessageOrDetail) {
|
|
2246
|
+
super(messageOrField, fieldMessageOrDetail, import_common23.HttpStatus.FORBIDDEN);
|
|
2247
|
+
} else {
|
|
2248
|
+
super(messageOrField, import_common23.HttpStatus.FORBIDDEN);
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
};
|
|
2252
|
+
|
|
2253
|
+
// src/exceptions/not-found.exception.ts
|
|
2254
|
+
var import_common24 = require("@nestjs/common");
|
|
2255
|
+
var NotFoundException = class extends BaseFieldException {
|
|
2256
|
+
static {
|
|
2257
|
+
__name(this, "NotFoundException");
|
|
2258
|
+
}
|
|
2259
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2260
|
+
if (Array.isArray(messageOrField)) {
|
|
2261
|
+
super(messageOrField, import_common24.HttpStatus.NOT_FOUND, fieldMessageOrDetail);
|
|
2262
|
+
} else if (detail !== void 0) {
|
|
2263
|
+
super(messageOrField, fieldMessageOrDetail, import_common24.HttpStatus.NOT_FOUND, detail);
|
|
2264
|
+
} else if (fieldMessageOrDetail) {
|
|
2265
|
+
super(messageOrField, fieldMessageOrDetail, import_common24.HttpStatus.NOT_FOUND);
|
|
2266
|
+
} else {
|
|
2267
|
+
super(messageOrField, import_common24.HttpStatus.NOT_FOUND);
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
};
|
|
2271
|
+
|
|
2272
|
+
// src/exceptions/conflict.exception.ts
|
|
2273
|
+
var import_common25 = require("@nestjs/common");
|
|
2274
|
+
var ConflictException = class extends BaseFieldException {
|
|
2275
|
+
static {
|
|
2276
|
+
__name(this, "ConflictException");
|
|
2277
|
+
}
|
|
2278
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2279
|
+
if (Array.isArray(messageOrField)) {
|
|
2280
|
+
super(messageOrField, import_common25.HttpStatus.CONFLICT, fieldMessageOrDetail);
|
|
2281
|
+
} else if (detail !== void 0) {
|
|
2282
|
+
super(messageOrField, fieldMessageOrDetail, import_common25.HttpStatus.CONFLICT, detail);
|
|
2283
|
+
} else if (fieldMessageOrDetail) {
|
|
2284
|
+
super(messageOrField, fieldMessageOrDetail, import_common25.HttpStatus.CONFLICT);
|
|
2285
|
+
} else {
|
|
2286
|
+
super(messageOrField, import_common25.HttpStatus.CONFLICT);
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
};
|
|
2290
|
+
|
|
2291
|
+
// src/exceptions/internal-server-error.exception.ts
|
|
2292
|
+
var import_common26 = require("@nestjs/common");
|
|
2293
|
+
var InternalServerErrorException3 = class extends BaseFieldException {
|
|
2294
|
+
static {
|
|
2295
|
+
__name(this, "InternalServerErrorException");
|
|
2296
|
+
}
|
|
2297
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2298
|
+
if (Array.isArray(messageOrField)) {
|
|
2299
|
+
super(messageOrField, import_common26.HttpStatus.INTERNAL_SERVER_ERROR, fieldMessageOrDetail);
|
|
2300
|
+
} else if (detail !== void 0) {
|
|
2301
|
+
super(messageOrField, fieldMessageOrDetail, import_common26.HttpStatus.INTERNAL_SERVER_ERROR, detail);
|
|
2302
|
+
} else if (fieldMessageOrDetail) {
|
|
2303
|
+
super(messageOrField, fieldMessageOrDetail, import_common26.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
2304
|
+
} else {
|
|
2305
|
+
super(messageOrField, import_common26.HttpStatus.INTERNAL_SERVER_ERROR);
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
};
|
|
2309
|
+
|
|
2310
|
+
// src/exceptions/validation.exception.ts
|
|
2311
|
+
var import_common27 = require("@nestjs/common");
|
|
2312
|
+
var ValidationException = class extends BaseFieldException {
|
|
2313
|
+
static {
|
|
2314
|
+
__name(this, "ValidationException");
|
|
2315
|
+
}
|
|
2316
|
+
constructor(errors, detail) {
|
|
2317
|
+
super(errors, import_common27.HttpStatus.BAD_REQUEST, detail);
|
|
2318
|
+
}
|
|
2319
|
+
};
|
|
2320
|
+
|
|
2321
|
+
// src/exceptions/unprocessable-entity.exception.ts
|
|
2322
|
+
var import_common28 = require("@nestjs/common");
|
|
2323
|
+
var UnprocessableEntityException = class extends BaseFieldException {
|
|
2324
|
+
static {
|
|
2325
|
+
__name(this, "UnprocessableEntityException");
|
|
2326
|
+
}
|
|
2327
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2328
|
+
if (Array.isArray(messageOrField)) {
|
|
2329
|
+
super(messageOrField, import_common28.HttpStatus.UNPROCESSABLE_ENTITY, fieldMessageOrDetail);
|
|
2330
|
+
} else if (detail !== void 0) {
|
|
2331
|
+
super(messageOrField, fieldMessageOrDetail, import_common28.HttpStatus.UNPROCESSABLE_ENTITY, detail);
|
|
2332
|
+
} else if (fieldMessageOrDetail) {
|
|
2333
|
+
super(messageOrField, fieldMessageOrDetail, import_common28.HttpStatus.UNPROCESSABLE_ENTITY);
|
|
2334
|
+
} else {
|
|
2335
|
+
super(messageOrField, import_common28.HttpStatus.UNPROCESSABLE_ENTITY);
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
};
|
|
2339
|
+
|
|
2340
|
+
// src/exceptions/too-many-requests.exception.ts
|
|
2341
|
+
var import_common29 = require("@nestjs/common");
|
|
2342
|
+
var TooManyRequestsException = class extends BaseFieldException {
|
|
2343
|
+
static {
|
|
2344
|
+
__name(this, "TooManyRequestsException");
|
|
2345
|
+
}
|
|
2346
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2347
|
+
if (Array.isArray(messageOrField)) {
|
|
2348
|
+
super(messageOrField, import_common29.HttpStatus.TOO_MANY_REQUESTS, fieldMessageOrDetail);
|
|
2349
|
+
} else if (detail !== void 0) {
|
|
2350
|
+
super(messageOrField, fieldMessageOrDetail, import_common29.HttpStatus.TOO_MANY_REQUESTS, detail);
|
|
2351
|
+
} else if (fieldMessageOrDetail) {
|
|
2352
|
+
super(messageOrField, fieldMessageOrDetail, import_common29.HttpStatus.TOO_MANY_REQUESTS);
|
|
2353
|
+
} else {
|
|
2354
|
+
super(messageOrField, import_common29.HttpStatus.TOO_MANY_REQUESTS);
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
};
|
|
2358
|
+
|
|
2359
|
+
// src/exceptions/service-unavailable.exception.ts
|
|
2360
|
+
var import_common30 = require("@nestjs/common");
|
|
2361
|
+
var ServiceUnavailableException = class extends BaseFieldException {
|
|
2362
|
+
static {
|
|
2363
|
+
__name(this, "ServiceUnavailableException");
|
|
2364
|
+
}
|
|
2365
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2366
|
+
if (Array.isArray(messageOrField)) {
|
|
2367
|
+
super(messageOrField, import_common30.HttpStatus.SERVICE_UNAVAILABLE, fieldMessageOrDetail);
|
|
2368
|
+
} else if (detail !== void 0) {
|
|
2369
|
+
super(messageOrField, fieldMessageOrDetail, import_common30.HttpStatus.SERVICE_UNAVAILABLE, detail);
|
|
2370
|
+
} else if (fieldMessageOrDetail) {
|
|
2371
|
+
super(messageOrField, fieldMessageOrDetail, import_common30.HttpStatus.SERVICE_UNAVAILABLE);
|
|
2372
|
+
} else {
|
|
2373
|
+
super(messageOrField, import_common30.HttpStatus.SERVICE_UNAVAILABLE);
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
};
|
|
2377
|
+
|
|
2378
|
+
// src/exceptions/method-not-allowed.exception.ts
|
|
2379
|
+
var import_common31 = require("@nestjs/common");
|
|
2380
|
+
var MethodNotAllowedException = class extends BaseFieldException {
|
|
2381
|
+
static {
|
|
2382
|
+
__name(this, "MethodNotAllowedException");
|
|
2383
|
+
}
|
|
2384
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2385
|
+
if (Array.isArray(messageOrField)) {
|
|
2386
|
+
super(messageOrField, import_common31.HttpStatus.METHOD_NOT_ALLOWED, fieldMessageOrDetail);
|
|
2387
|
+
} else if (detail !== void 0) {
|
|
2388
|
+
super(messageOrField, fieldMessageOrDetail, import_common31.HttpStatus.METHOD_NOT_ALLOWED, detail);
|
|
2389
|
+
} else if (fieldMessageOrDetail) {
|
|
2390
|
+
super(messageOrField, fieldMessageOrDetail, import_common31.HttpStatus.METHOD_NOT_ALLOWED);
|
|
2391
|
+
} else {
|
|
2392
|
+
super(messageOrField, import_common31.HttpStatus.METHOD_NOT_ALLOWED);
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2397
|
+
// src/exceptions/gone.exception.ts
|
|
2398
|
+
var import_common32 = require("@nestjs/common");
|
|
2399
|
+
var GoneException = class extends BaseFieldException {
|
|
2400
|
+
static {
|
|
2401
|
+
__name(this, "GoneException");
|
|
2402
|
+
}
|
|
2403
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2404
|
+
if (Array.isArray(messageOrField)) {
|
|
2405
|
+
super(messageOrField, import_common32.HttpStatus.GONE, fieldMessageOrDetail);
|
|
2406
|
+
} else if (detail !== void 0) {
|
|
2407
|
+
super(messageOrField, fieldMessageOrDetail, import_common32.HttpStatus.GONE, detail);
|
|
2408
|
+
} else if (fieldMessageOrDetail) {
|
|
2409
|
+
super(messageOrField, fieldMessageOrDetail, import_common32.HttpStatus.GONE);
|
|
2410
|
+
} else {
|
|
2411
|
+
super(messageOrField, import_common32.HttpStatus.GONE);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2416
|
+
// src/exceptions/not-acceptable.exception.ts
|
|
2417
|
+
var import_common33 = require("@nestjs/common");
|
|
2418
|
+
var NotAcceptableException = class extends BaseFieldException {
|
|
2419
|
+
static {
|
|
2420
|
+
__name(this, "NotAcceptableException");
|
|
2421
|
+
}
|
|
2422
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2423
|
+
if (Array.isArray(messageOrField)) {
|
|
2424
|
+
super(messageOrField, import_common33.HttpStatus.NOT_ACCEPTABLE, fieldMessageOrDetail);
|
|
2425
|
+
} else if (detail !== void 0) {
|
|
2426
|
+
super(messageOrField, fieldMessageOrDetail, import_common33.HttpStatus.NOT_ACCEPTABLE, detail);
|
|
2427
|
+
} else if (fieldMessageOrDetail) {
|
|
2428
|
+
super(messageOrField, fieldMessageOrDetail, import_common33.HttpStatus.NOT_ACCEPTABLE);
|
|
2429
|
+
} else {
|
|
2430
|
+
super(messageOrField, import_common33.HttpStatus.NOT_ACCEPTABLE);
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
};
|
|
2434
|
+
|
|
2435
|
+
// src/exceptions/request-timeout.exception.ts
|
|
2436
|
+
var import_common34 = require("@nestjs/common");
|
|
2437
|
+
var RequestTimeoutException = class extends BaseFieldException {
|
|
2438
|
+
static {
|
|
2439
|
+
__name(this, "RequestTimeoutException");
|
|
2440
|
+
}
|
|
2441
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2442
|
+
if (Array.isArray(messageOrField)) {
|
|
2443
|
+
super(messageOrField, import_common34.HttpStatus.REQUEST_TIMEOUT, fieldMessageOrDetail);
|
|
2444
|
+
} else if (detail !== void 0) {
|
|
2445
|
+
super(messageOrField, fieldMessageOrDetail, import_common34.HttpStatus.REQUEST_TIMEOUT, detail);
|
|
2446
|
+
} else if (fieldMessageOrDetail) {
|
|
2447
|
+
super(messageOrField, fieldMessageOrDetail, import_common34.HttpStatus.REQUEST_TIMEOUT);
|
|
2448
|
+
} else {
|
|
2449
|
+
super(messageOrField, import_common34.HttpStatus.REQUEST_TIMEOUT);
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
};
|
|
2453
|
+
|
|
2454
|
+
// src/exceptions/payload-too-large.exception.ts
|
|
2455
|
+
var import_common35 = require("@nestjs/common");
|
|
2456
|
+
var PayloadTooLargeException = class extends BaseFieldException {
|
|
2457
|
+
static {
|
|
2458
|
+
__name(this, "PayloadTooLargeException");
|
|
2459
|
+
}
|
|
2460
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2461
|
+
if (Array.isArray(messageOrField)) {
|
|
2462
|
+
super(messageOrField, import_common35.HttpStatus.PAYLOAD_TOO_LARGE, fieldMessageOrDetail);
|
|
2463
|
+
} else if (detail !== void 0) {
|
|
2464
|
+
super(messageOrField, fieldMessageOrDetail, import_common35.HttpStatus.PAYLOAD_TOO_LARGE, detail);
|
|
2465
|
+
} else if (fieldMessageOrDetail) {
|
|
2466
|
+
super(messageOrField, fieldMessageOrDetail, import_common35.HttpStatus.PAYLOAD_TOO_LARGE);
|
|
2467
|
+
} else {
|
|
2468
|
+
super(messageOrField, import_common35.HttpStatus.PAYLOAD_TOO_LARGE);
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
// src/exceptions/unsupported-media-type.exception.ts
|
|
2474
|
+
var import_common36 = require("@nestjs/common");
|
|
2475
|
+
var UnsupportedMediaTypeException = class extends BaseFieldException {
|
|
2476
|
+
static {
|
|
2477
|
+
__name(this, "UnsupportedMediaTypeException");
|
|
2478
|
+
}
|
|
2479
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2480
|
+
if (Array.isArray(messageOrField)) {
|
|
2481
|
+
super(messageOrField, import_common36.HttpStatus.UNSUPPORTED_MEDIA_TYPE, fieldMessageOrDetail);
|
|
2482
|
+
} else if (detail !== void 0) {
|
|
2483
|
+
super(messageOrField, fieldMessageOrDetail, import_common36.HttpStatus.UNSUPPORTED_MEDIA_TYPE, detail);
|
|
2484
|
+
} else if (fieldMessageOrDetail) {
|
|
2485
|
+
super(messageOrField, fieldMessageOrDetail, import_common36.HttpStatus.UNSUPPORTED_MEDIA_TYPE);
|
|
2486
|
+
} else {
|
|
2487
|
+
super(messageOrField, import_common36.HttpStatus.UNSUPPORTED_MEDIA_TYPE);
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
};
|
|
2491
|
+
|
|
2492
|
+
// src/exceptions/not-implemented.exception.ts
|
|
2493
|
+
var import_common37 = require("@nestjs/common");
|
|
2494
|
+
var NotImplementedException = class extends BaseFieldException {
|
|
2495
|
+
static {
|
|
2496
|
+
__name(this, "NotImplementedException");
|
|
2497
|
+
}
|
|
2498
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2499
|
+
if (Array.isArray(messageOrField)) {
|
|
2500
|
+
super(messageOrField, import_common37.HttpStatus.NOT_IMPLEMENTED, fieldMessageOrDetail);
|
|
2501
|
+
} else if (detail !== void 0) {
|
|
2502
|
+
super(messageOrField, fieldMessageOrDetail, import_common37.HttpStatus.NOT_IMPLEMENTED, detail);
|
|
2503
|
+
} else if (fieldMessageOrDetail) {
|
|
2504
|
+
super(messageOrField, fieldMessageOrDetail, import_common37.HttpStatus.NOT_IMPLEMENTED);
|
|
2505
|
+
} else {
|
|
2506
|
+
super(messageOrField, import_common37.HttpStatus.NOT_IMPLEMENTED);
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
// src/exceptions/bad-gateway.exception.ts
|
|
2512
|
+
var import_common38 = require("@nestjs/common");
|
|
2513
|
+
var BadGatewayException = class extends BaseFieldException {
|
|
2514
|
+
static {
|
|
2515
|
+
__name(this, "BadGatewayException");
|
|
2516
|
+
}
|
|
2517
|
+
constructor(messageOrField, fieldMessageOrDetail, detail) {
|
|
2518
|
+
if (Array.isArray(messageOrField)) {
|
|
2519
|
+
super(messageOrField, import_common38.HttpStatus.BAD_GATEWAY, fieldMessageOrDetail);
|
|
2520
|
+
} else if (detail !== void 0) {
|
|
2521
|
+
super(messageOrField, fieldMessageOrDetail, import_common38.HttpStatus.BAD_GATEWAY, detail);
|
|
2522
|
+
} else if (fieldMessageOrDetail) {
|
|
2523
|
+
super(messageOrField, fieldMessageOrDetail, import_common38.HttpStatus.BAD_GATEWAY);
|
|
2524
|
+
} else {
|
|
2525
|
+
super(messageOrField, import_common38.HttpStatus.BAD_GATEWAY);
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
};
|
|
2039
2529
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2040
2530
|
0 && (module.exports = {
|
|
2041
2531
|
AuthConfigModule,
|
|
2532
|
+
BadGatewayException,
|
|
2533
|
+
BadRequestException,
|
|
2534
|
+
BaseFieldException,
|
|
2535
|
+
ConflictException,
|
|
2042
2536
|
CsrfGuard,
|
|
2043
2537
|
DatabaseModule,
|
|
2538
|
+
ForbiddenException,
|
|
2539
|
+
GoneException,
|
|
2044
2540
|
HttpExceptionFilter,
|
|
2045
2541
|
HttpModule,
|
|
2542
|
+
InternalServerErrorException,
|
|
2543
|
+
MethodNotAllowedException,
|
|
2544
|
+
NotAcceptableException,
|
|
2545
|
+
NotFoundException,
|
|
2546
|
+
NotImplementedException,
|
|
2046
2547
|
Onboarding,
|
|
2548
|
+
PayloadTooLargeException,
|
|
2047
2549
|
PrimaryBaseRepository,
|
|
2048
2550
|
PrimaryDatabaseService,
|
|
2049
2551
|
Public,
|
|
2552
|
+
RequestTimeoutException,
|
|
2553
|
+
ServiceUnavailableException,
|
|
2050
2554
|
Tenant,
|
|
2051
2555
|
TenantBaseRepository,
|
|
2052
2556
|
TenantContextService,
|
|
2053
2557
|
TenantDatabaseService,
|
|
2054
|
-
|
|
2558
|
+
TooManyRequestsException,
|
|
2559
|
+
UnauthorizedException,
|
|
2560
|
+
UnprocessableEntityException,
|
|
2561
|
+
UnsupportedMediaTypeException,
|
|
2562
|
+
ValidationException,
|
|
2563
|
+
VrittiAuthGuard,
|
|
2564
|
+
getHttpStatusTitle
|
|
2055
2565
|
});
|
|
2056
2566
|
//# sourceMappingURL=index.cjs.map
|