@vritti/api-sdk 0.2.7 → 0.2.9
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 +74 -502
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -82
- package/dist/index.d.ts +2 -82
- package/dist/index.js +54 -473
- package/dist/index.js.map +1 -1
- package/dist/migrate.cjs +88 -0
- package/dist/migrate.cjs.map +1 -0
- package/dist/migrate.d.cts +7 -0
- package/dist/migrate.d.ts +7 -0
- package/dist/migrate.js +63 -0
- package/dist/migrate.js.map +1 -0
- package/dist/nats.cjs +519 -0
- package/dist/nats.cjs.map +1 -0
- package/dist/nats.d.cts +85 -0
- package/dist/nats.d.ts +85 -0
- package/dist/nats.js +486 -0
- package/dist/nats.js.map +1 -0
- package/package.json +21 -1
package/dist/index.js
CHANGED
|
@@ -4641,85 +4641,6 @@ HttpExceptionFilter = _ts_decorate30([
|
|
|
4641
4641
|
Catch()
|
|
4642
4642
|
], HttpExceptionFilter);
|
|
4643
4643
|
|
|
4644
|
-
// src/filters/rpc-problem-exception.filter.ts
|
|
4645
|
-
import { Catch as Catch2, HttpStatus as HttpStatus22, Logger as Logger14 } from "@nestjs/common";
|
|
4646
|
-
import { RpcException } from "@nestjs/microservices";
|
|
4647
|
-
import { throwError } from "rxjs";
|
|
4648
|
-
function _ts_decorate31(decorators, target, key, desc3) {
|
|
4649
|
-
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
4650
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
4651
|
-
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;
|
|
4652
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4653
|
-
}
|
|
4654
|
-
__name(_ts_decorate31, "_ts_decorate");
|
|
4655
|
-
var RpcProblemExceptionFilter = class _RpcProblemExceptionFilter {
|
|
4656
|
-
static {
|
|
4657
|
-
__name(this, "RpcProblemExceptionFilter");
|
|
4658
|
-
}
|
|
4659
|
-
logger = new Logger14(_RpcProblemExceptionFilter.name);
|
|
4660
|
-
catch(exception, _host) {
|
|
4661
|
-
const translatedPgError = tryTranslatePgError(exception);
|
|
4662
|
-
if (translatedPgError) exception = translatedPgError;
|
|
4663
|
-
if (exception instanceof RpcException) {
|
|
4664
|
-
return throwError(() => exception.getError());
|
|
4665
|
-
}
|
|
4666
|
-
if (this.isHttpException(exception)) {
|
|
4667
|
-
const status = exception.getStatus();
|
|
4668
|
-
const response = exception.getResponse();
|
|
4669
|
-
return throwError(() => this.toProblemPayload(response, status));
|
|
4670
|
-
}
|
|
4671
|
-
if (exception instanceof Error) {
|
|
4672
|
-
const cause = exception.cause;
|
|
4673
|
-
const causeMessage = cause instanceof Error ? cause.message : void 0;
|
|
4674
|
-
const causeStack = cause instanceof Error ? cause.stack : void 0;
|
|
4675
|
-
this.logger.error(causeMessage ?? exception.message, causeStack ?? exception.stack);
|
|
4676
|
-
if (cause && cause !== exception) {
|
|
4677
|
-
this.logger.error(`Wrapped by: ${exception.message}`);
|
|
4678
|
-
}
|
|
4679
|
-
return throwError(() => this.toProblemPayload({
|
|
4680
|
-
type: "about:blank",
|
|
4681
|
-
detail: causeMessage ?? exception.message,
|
|
4682
|
-
errors: []
|
|
4683
|
-
}, HttpStatus22.INTERNAL_SERVER_ERROR));
|
|
4684
|
-
}
|
|
4685
|
-
this.logger.error(`Unhandled non-error exception: ${JSON.stringify(exception)}`);
|
|
4686
|
-
return throwError(() => this.toProblemPayload({
|
|
4687
|
-
type: "about:blank",
|
|
4688
|
-
detail: "An unexpected error occurred",
|
|
4689
|
-
errors: []
|
|
4690
|
-
}, HttpStatus22.INTERNAL_SERVER_ERROR));
|
|
4691
|
-
}
|
|
4692
|
-
toProblemPayload(response, status) {
|
|
4693
|
-
if (typeof response === "string") {
|
|
4694
|
-
return {
|
|
4695
|
-
type: "about:blank",
|
|
4696
|
-
detail: response,
|
|
4697
|
-
message: response,
|
|
4698
|
-
errors: [],
|
|
4699
|
-
status,
|
|
4700
|
-
statusCode: status
|
|
4701
|
-
};
|
|
4702
|
-
}
|
|
4703
|
-
const obj = response ?? {};
|
|
4704
|
-
const detail = typeof obj.detail === "string" ? obj.detail : "Request failed";
|
|
4705
|
-
return {
|
|
4706
|
-
type: typeof obj.type === "string" ? obj.type : "about:blank",
|
|
4707
|
-
label: typeof obj.label === "string" ? obj.label : void 0,
|
|
4708
|
-
detail,
|
|
4709
|
-
message: detail,
|
|
4710
|
-
errors: Array.isArray(obj.errors) ? obj.errors : [],
|
|
4711
|
-
status,
|
|
4712
|
-
statusCode: status
|
|
4713
|
-
};
|
|
4714
|
-
}
|
|
4715
|
-
isHttpException(error) {
|
|
4716
|
-
return error instanceof Error && typeof error.getStatus === "function" && typeof error.getResponse === "function";
|
|
4717
|
-
}
|
|
4718
|
-
};
|
|
4719
|
-
RpcProblemExceptionFilter = _ts_decorate31([
|
|
4720
|
-
Catch2()
|
|
4721
|
-
], RpcProblemExceptionFilter);
|
|
4722
|
-
|
|
4723
4644
|
// src/logger/interceptors/http-logger.interceptor.ts
|
|
4724
4645
|
import { Injectable as Injectable12, Optional as Optional2 } from "@nestjs/common";
|
|
4725
4646
|
import { catchError, tap } from "rxjs/operators";
|
|
@@ -4763,13 +4684,13 @@ function addCorrelationIdToResponse(reply, correlationId, headerName = DEFAULT_C
|
|
|
4763
4684
|
__name(addCorrelationIdToResponse, "addCorrelationIdToResponse");
|
|
4764
4685
|
|
|
4765
4686
|
// src/logger/services/logger.service.ts
|
|
4766
|
-
function
|
|
4687
|
+
function _ts_decorate31(decorators, target, key, desc3) {
|
|
4767
4688
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
4768
4689
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
4769
4690
|
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;
|
|
4770
4691
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4771
4692
|
}
|
|
4772
|
-
__name(
|
|
4693
|
+
__name(_ts_decorate31, "_ts_decorate");
|
|
4773
4694
|
function _ts_metadata24(k, v) {
|
|
4774
4695
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4775
4696
|
}
|
|
@@ -4971,7 +4892,7 @@ ${trace}`;
|
|
|
4971
4892
|
return childLogger;
|
|
4972
4893
|
}
|
|
4973
4894
|
};
|
|
4974
|
-
LoggerService =
|
|
4895
|
+
LoggerService = _ts_decorate31([
|
|
4975
4896
|
Injectable11(),
|
|
4976
4897
|
_ts_param9(0, Optional()),
|
|
4977
4898
|
_ts_param9(1, Optional()),
|
|
@@ -4983,13 +4904,13 @@ LoggerService = _ts_decorate32([
|
|
|
4983
4904
|
], LoggerService);
|
|
4984
4905
|
|
|
4985
4906
|
// src/logger/interceptors/http-logger.interceptor.ts
|
|
4986
|
-
function
|
|
4907
|
+
function _ts_decorate32(decorators, target, key, desc3) {
|
|
4987
4908
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
4988
4909
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
4989
4910
|
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;
|
|
4990
4911
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4991
4912
|
}
|
|
4992
|
-
__name(
|
|
4913
|
+
__name(_ts_decorate32, "_ts_decorate");
|
|
4993
4914
|
function _ts_metadata25(k, v) {
|
|
4994
4915
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4995
4916
|
}
|
|
@@ -5103,7 +5024,7 @@ var HttpLoggerInterceptor = class {
|
|
|
5103
5024
|
}
|
|
5104
5025
|
}
|
|
5105
5026
|
};
|
|
5106
|
-
HttpLoggerInterceptor =
|
|
5027
|
+
HttpLoggerInterceptor = _ts_decorate32([
|
|
5107
5028
|
Injectable12(),
|
|
5108
5029
|
_ts_param10(1, Optional2()),
|
|
5109
5030
|
_ts_metadata25("design:type", Function),
|
|
@@ -5114,17 +5035,17 @@ HttpLoggerInterceptor = _ts_decorate33([
|
|
|
5114
5035
|
], HttpLoggerInterceptor);
|
|
5115
5036
|
|
|
5116
5037
|
// src/logger/logger.module.ts
|
|
5117
|
-
import { Global as Global5, Logger as
|
|
5038
|
+
import { Global as Global5, Logger as Logger14, Module as Module7 } from "@nestjs/common";
|
|
5118
5039
|
|
|
5119
5040
|
// src/logger/middleware/correlation-id.middleware.ts
|
|
5120
5041
|
import { Injectable as Injectable13 } from "@nestjs/common";
|
|
5121
|
-
function
|
|
5042
|
+
function _ts_decorate33(decorators, target, key, desc3) {
|
|
5122
5043
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5123
5044
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5124
5045
|
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;
|
|
5125
5046
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5126
5047
|
}
|
|
5127
|
-
__name(
|
|
5048
|
+
__name(_ts_decorate33, "_ts_decorate");
|
|
5128
5049
|
function _ts_metadata26(k, v) {
|
|
5129
5050
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5130
5051
|
}
|
|
@@ -5165,7 +5086,7 @@ var CorrelationIdMiddleware = class {
|
|
|
5165
5086
|
}
|
|
5166
5087
|
}
|
|
5167
5088
|
};
|
|
5168
|
-
CorrelationIdMiddleware =
|
|
5089
|
+
CorrelationIdMiddleware = _ts_decorate33([
|
|
5169
5090
|
Injectable13(),
|
|
5170
5091
|
_ts_metadata26("design:type", Function),
|
|
5171
5092
|
_ts_metadata26("design:paramtypes", [
|
|
@@ -5174,13 +5095,13 @@ CorrelationIdMiddleware = _ts_decorate34([
|
|
|
5174
5095
|
], CorrelationIdMiddleware);
|
|
5175
5096
|
|
|
5176
5097
|
// src/logger/logger.module.ts
|
|
5177
|
-
function
|
|
5098
|
+
function _ts_decorate34(decorators, target, key, desc3) {
|
|
5178
5099
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5179
5100
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5180
5101
|
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;
|
|
5181
5102
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5182
5103
|
}
|
|
5183
|
-
__name(
|
|
5104
|
+
__name(_ts_decorate34, "_ts_decorate");
|
|
5184
5105
|
var LOGGER_MODULE_OPTIONS = Symbol("LOGGER_MODULE_OPTIONS");
|
|
5185
5106
|
var DEFAULT_LOGGER_OPTIONS = {
|
|
5186
5107
|
provider: "winston",
|
|
@@ -5257,9 +5178,9 @@ function mergeWithDefaults2(options = {}) {
|
|
|
5257
5178
|
__name(mergeWithDefaults2, "mergeWithDefaults");
|
|
5258
5179
|
function createDefaultLoggerProvider(options) {
|
|
5259
5180
|
return {
|
|
5260
|
-
provide:
|
|
5181
|
+
provide: Logger14,
|
|
5261
5182
|
useFactory: /* @__PURE__ */ __name(() => {
|
|
5262
|
-
const logger = new
|
|
5183
|
+
const logger = new Logger14();
|
|
5263
5184
|
if (options.level) {
|
|
5264
5185
|
const levels = getLevelsUpTo(options.level);
|
|
5265
5186
|
logger.setLogLevels?.(levels);
|
|
@@ -5289,7 +5210,7 @@ function createLoggerProviders(options = {}) {
|
|
|
5289
5210
|
inject: [
|
|
5290
5211
|
LOGGER_MODULE_OPTIONS,
|
|
5291
5212
|
{
|
|
5292
|
-
token:
|
|
5213
|
+
token: Logger14,
|
|
5293
5214
|
optional: true
|
|
5294
5215
|
}
|
|
5295
5216
|
]
|
|
@@ -5368,10 +5289,10 @@ var LoggerModule = class _LoggerModule {
|
|
|
5368
5289
|
...asyncProviders,
|
|
5369
5290
|
// Default logger provider
|
|
5370
5291
|
{
|
|
5371
|
-
provide:
|
|
5292
|
+
provide: Logger14,
|
|
5372
5293
|
useFactory: /* @__PURE__ */ __name((opts) => {
|
|
5373
5294
|
if (opts.provider === "default") {
|
|
5374
|
-
const logger = new
|
|
5295
|
+
const logger = new Logger14();
|
|
5375
5296
|
if (opts.level) {
|
|
5376
5297
|
const levels = getLevelsUpTo(opts.level);
|
|
5377
5298
|
logger.setLogLevels?.(levels);
|
|
@@ -5393,7 +5314,7 @@ var LoggerModule = class _LoggerModule {
|
|
|
5393
5314
|
inject: [
|
|
5394
5315
|
LOGGER_MODULE_OPTIONS,
|
|
5395
5316
|
{
|
|
5396
|
-
token:
|
|
5317
|
+
token: Logger14,
|
|
5397
5318
|
optional: true
|
|
5398
5319
|
}
|
|
5399
5320
|
]
|
|
@@ -5492,344 +5413,13 @@ var LoggerModule = class _LoggerModule {
|
|
|
5492
5413
|
throw new Error("LoggerModule.forRootAsync() requires one of: useFactory, useClass, or useExisting");
|
|
5493
5414
|
}
|
|
5494
5415
|
};
|
|
5495
|
-
LoggerModule =
|
|
5416
|
+
LoggerModule = _ts_decorate34([
|
|
5496
5417
|
Global5(),
|
|
5497
5418
|
Module7({})
|
|
5498
5419
|
], LoggerModule);
|
|
5499
5420
|
|
|
5500
|
-
// src/nats/decorators/nats-headers.decorator.ts
|
|
5501
|
-
import { createParamDecorator as createParamDecorator11, InternalServerErrorException as InternalServerErrorException3 } from "@nestjs/common";
|
|
5502
|
-
|
|
5503
|
-
// src/nats/nats-context.ts
|
|
5504
|
-
var NATS_HEADER_KEYS = {
|
|
5505
|
-
ORG_ID: "x-org-id",
|
|
5506
|
-
USER_ID: "x-user-id",
|
|
5507
|
-
BU_ID: "x-bu-id",
|
|
5508
|
-
BU_TIMEZONE: "x-bu-timezone",
|
|
5509
|
-
BU_CURRENCY_CODE: "x-bu-currency-code",
|
|
5510
|
-
BU_ANCESTOR_IDS: "x-bu-ancestor-ids",
|
|
5511
|
-
BU_DESCENDANT_IDS: "x-bu-descendant-ids"
|
|
5512
|
-
};
|
|
5513
|
-
function getHeader(headers, key) {
|
|
5514
|
-
if (!headers) return void 0;
|
|
5515
|
-
if (typeof headers.get === "function") {
|
|
5516
|
-
const val = headers.get(key);
|
|
5517
|
-
return Array.isArray(val) ? val[0] : val;
|
|
5518
|
-
}
|
|
5519
|
-
return headers[key];
|
|
5520
|
-
}
|
|
5521
|
-
__name(getHeader, "getHeader");
|
|
5522
|
-
function parseNatsHeaders(headers) {
|
|
5523
|
-
if (!headers) return null;
|
|
5524
|
-
const orgId = getHeader(headers, NATS_HEADER_KEYS.ORG_ID);
|
|
5525
|
-
const userId = getHeader(headers, NATS_HEADER_KEYS.USER_ID);
|
|
5526
|
-
const buId = getHeader(headers, NATS_HEADER_KEYS.BU_ID);
|
|
5527
|
-
if (!orgId || !userId || !buId) return null;
|
|
5528
|
-
return {
|
|
5529
|
-
orgId,
|
|
5530
|
-
userId,
|
|
5531
|
-
buId,
|
|
5532
|
-
buTimezone: getHeader(headers, NATS_HEADER_KEYS.BU_TIMEZONE) || "UTC",
|
|
5533
|
-
buCurrencyCode: getHeader(headers, NATS_HEADER_KEYS.BU_CURRENCY_CODE) || "",
|
|
5534
|
-
buAncestorIds: JSON.parse(getHeader(headers, NATS_HEADER_KEYS.BU_ANCESTOR_IDS) || "[]"),
|
|
5535
|
-
buDescendantIds: JSON.parse(getHeader(headers, NATS_HEADER_KEYS.BU_DESCENDANT_IDS) || "[]")
|
|
5536
|
-
};
|
|
5537
|
-
}
|
|
5538
|
-
__name(parseNatsHeaders, "parseNatsHeaders");
|
|
5539
|
-
|
|
5540
|
-
// src/nats/decorators/nats-headers.decorator.ts
|
|
5541
|
-
var RpcNatsHeaders = createParamDecorator11((_data, ctx) => {
|
|
5542
|
-
const rpcCtx = ctx.switchToRpc().getContext();
|
|
5543
|
-
return parseNatsHeaders(rpcCtx.getHeaders());
|
|
5544
|
-
});
|
|
5545
|
-
var RpcBuId = createParamDecorator11((_data, ctx) => {
|
|
5546
|
-
const rpcCtx = ctx.switchToRpc().getContext();
|
|
5547
|
-
const headers = parseNatsHeaders(rpcCtx.getHeaders());
|
|
5548
|
-
if (!headers?.buId) throw new InternalServerErrorException3("Missing buId in NATS headers.");
|
|
5549
|
-
return headers.buId;
|
|
5550
|
-
});
|
|
5551
|
-
var RpcBuCurrencyCode = createParamDecorator11((_data, ctx) => {
|
|
5552
|
-
const rpcCtx = ctx.switchToRpc().getContext();
|
|
5553
|
-
const headers = parseNatsHeaders(rpcCtx.getHeaders());
|
|
5554
|
-
if (!headers?.buCurrencyCode) throw new InternalServerErrorException3("Missing buCurrencyCode in NATS headers.");
|
|
5555
|
-
return headers.buCurrencyCode;
|
|
5556
|
-
});
|
|
5557
|
-
|
|
5558
|
-
// src/nats/nats-client.module.ts
|
|
5559
|
-
import { Global as Global6, Logger as Logger16, Module as Module8 } from "@nestjs/common";
|
|
5560
|
-
import { ConfigModule as ConfigModule5, ConfigService as ConfigService6 } from "@nestjs/config";
|
|
5561
|
-
import { ClientProxyFactory, Transport } from "@nestjs/microservices";
|
|
5562
|
-
|
|
5563
|
-
// src/nats/constants.ts
|
|
5564
|
-
var NATS_MODULE_OPTIONS = Symbol("NATS_MODULE_OPTIONS");
|
|
5565
|
-
var NATS_CONTEXT_RESOLVER = Symbol("NATS_CONTEXT_RESOLVER");
|
|
5566
|
-
|
|
5567
|
-
// src/nats/nats-client.service.ts
|
|
5568
|
-
import { Inject as Inject7, Injectable as Injectable14, Scope as Scope3 } from "@nestjs/common";
|
|
5569
|
-
import { REQUEST as REQUEST2 } from "@nestjs/core";
|
|
5570
|
-
import { NatsRecordBuilder } from "@nestjs/microservices";
|
|
5571
|
-
import { headers as natsHeaders } from "nats";
|
|
5572
|
-
function _ts_decorate36(decorators, target, key, desc3) {
|
|
5573
|
-
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5574
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5575
|
-
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;
|
|
5576
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5577
|
-
}
|
|
5578
|
-
__name(_ts_decorate36, "_ts_decorate");
|
|
5579
|
-
function _ts_metadata27(k, v) {
|
|
5580
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5581
|
-
}
|
|
5582
|
-
__name(_ts_metadata27, "_ts_metadata");
|
|
5583
|
-
function _ts_param11(paramIndex, decorator) {
|
|
5584
|
-
return function(target, key) {
|
|
5585
|
-
decorator(target, key, paramIndex);
|
|
5586
|
-
};
|
|
5587
|
-
}
|
|
5588
|
-
__name(_ts_param11, "_ts_param");
|
|
5589
|
-
var NATS_CLIENTS = Symbol("NATS_CLIENTS");
|
|
5590
|
-
var NatsClientService = class {
|
|
5591
|
-
static {
|
|
5592
|
-
__name(this, "NatsClientService");
|
|
5593
|
-
}
|
|
5594
|
-
request;
|
|
5595
|
-
contextResolver;
|
|
5596
|
-
clients;
|
|
5597
|
-
cachedContext = null;
|
|
5598
|
-
constructor(request, contextResolver, clients) {
|
|
5599
|
-
this.request = request;
|
|
5600
|
-
this.contextResolver = contextResolver;
|
|
5601
|
-
this.clients = clients;
|
|
5602
|
-
}
|
|
5603
|
-
// Sends a message to a named microservice with NatsHeaders as NATS headers
|
|
5604
|
-
async send(service, cmd, data) {
|
|
5605
|
-
const client = this.clients.get(service);
|
|
5606
|
-
if (!client) {
|
|
5607
|
-
throw new Error(`NATS service "${service}" is not registered. Available: [${[
|
|
5608
|
-
...this.clients.keys()
|
|
5609
|
-
].join(", ")}]`);
|
|
5610
|
-
}
|
|
5611
|
-
if (!this.cachedContext) {
|
|
5612
|
-
const sessionInfo = this.request.sessionInfo;
|
|
5613
|
-
if (!sessionInfo) {
|
|
5614
|
-
throw new Error("No sessionInfo on request \u2014 is the auth guard active?");
|
|
5615
|
-
}
|
|
5616
|
-
this.cachedContext = await this.contextResolver(sessionInfo);
|
|
5617
|
-
}
|
|
5618
|
-
const headers = contextToHeaders(this.cachedContext);
|
|
5619
|
-
const record = new NatsRecordBuilder(data ?? {}).setHeaders(headers).build();
|
|
5620
|
-
return client.send({
|
|
5621
|
-
cmd
|
|
5622
|
-
}, record).toPromise();
|
|
5623
|
-
}
|
|
5624
|
-
};
|
|
5625
|
-
NatsClientService = _ts_decorate36([
|
|
5626
|
-
Injectable14({
|
|
5627
|
-
scope: Scope3.REQUEST
|
|
5628
|
-
}),
|
|
5629
|
-
_ts_param11(0, Inject7(REQUEST2)),
|
|
5630
|
-
_ts_param11(1, Inject7(NATS_CONTEXT_RESOLVER)),
|
|
5631
|
-
_ts_param11(2, Inject7(NATS_CLIENTS)),
|
|
5632
|
-
_ts_metadata27("design:type", Function),
|
|
5633
|
-
_ts_metadata27("design:paramtypes", [
|
|
5634
|
-
typeof FastifyRequest === "undefined" ? Object : FastifyRequest,
|
|
5635
|
-
typeof ContextResolverFn === "undefined" ? Object : ContextResolverFn,
|
|
5636
|
-
typeof Map === "undefined" ? Object : Map
|
|
5637
|
-
])
|
|
5638
|
-
], NatsClientService);
|
|
5639
|
-
function contextToHeaders(ctx) {
|
|
5640
|
-
const hdrs = natsHeaders();
|
|
5641
|
-
hdrs.set(NATS_HEADER_KEYS.ORG_ID, ctx.orgId);
|
|
5642
|
-
hdrs.set(NATS_HEADER_KEYS.USER_ID, ctx.userId);
|
|
5643
|
-
hdrs.set(NATS_HEADER_KEYS.BU_ID, ctx.buId);
|
|
5644
|
-
hdrs.set(NATS_HEADER_KEYS.BU_TIMEZONE, ctx.buTimezone);
|
|
5645
|
-
hdrs.set(NATS_HEADER_KEYS.BU_CURRENCY_CODE, ctx.buCurrencyCode);
|
|
5646
|
-
hdrs.set(NATS_HEADER_KEYS.BU_ANCESTOR_IDS, JSON.stringify(ctx.buAncestorIds));
|
|
5647
|
-
hdrs.set(NATS_HEADER_KEYS.BU_DESCENDANT_IDS, JSON.stringify(ctx.buDescendantIds));
|
|
5648
|
-
return hdrs;
|
|
5649
|
-
}
|
|
5650
|
-
__name(contextToHeaders, "contextToHeaders");
|
|
5651
|
-
|
|
5652
|
-
// src/nats/nats-microservice-client.service.ts
|
|
5653
|
-
import { Inject as Inject8, Injectable as Injectable15 } from "@nestjs/common";
|
|
5654
|
-
import { NatsRecordBuilder as NatsRecordBuilder2 } from "@nestjs/microservices";
|
|
5655
|
-
function _ts_decorate37(decorators, target, key, desc3) {
|
|
5656
|
-
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5657
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5658
|
-
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;
|
|
5659
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5660
|
-
}
|
|
5661
|
-
__name(_ts_decorate37, "_ts_decorate");
|
|
5662
|
-
function _ts_metadata28(k, v) {
|
|
5663
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5664
|
-
}
|
|
5665
|
-
__name(_ts_metadata28, "_ts_metadata");
|
|
5666
|
-
function _ts_param12(paramIndex, decorator) {
|
|
5667
|
-
return function(target, key) {
|
|
5668
|
-
decorator(target, key, paramIndex);
|
|
5669
|
-
};
|
|
5670
|
-
}
|
|
5671
|
-
__name(_ts_param12, "_ts_param");
|
|
5672
|
-
var NATS_MS_CLIENTS = Symbol("NATS_MS_CLIENTS");
|
|
5673
|
-
var NatsMicroserviceClientService = class {
|
|
5674
|
-
static {
|
|
5675
|
-
__name(this, "NatsMicroserviceClientService");
|
|
5676
|
-
}
|
|
5677
|
-
clients;
|
|
5678
|
-
constructor(clients) {
|
|
5679
|
-
this.clients = clients;
|
|
5680
|
-
}
|
|
5681
|
-
// Forwards a message to another microservice with NatsHeaders
|
|
5682
|
-
async send(service, cmd, natsHeaders2, data) {
|
|
5683
|
-
const client = this.clients.get(service);
|
|
5684
|
-
if (!client) {
|
|
5685
|
-
throw new Error(`NATS service "${service}" is not registered. Available: [${[
|
|
5686
|
-
...this.clients.keys()
|
|
5687
|
-
].join(", ")}]`);
|
|
5688
|
-
}
|
|
5689
|
-
const headers = {
|
|
5690
|
-
[NATS_HEADER_KEYS.ORG_ID]: natsHeaders2.orgId,
|
|
5691
|
-
[NATS_HEADER_KEYS.USER_ID]: natsHeaders2.userId,
|
|
5692
|
-
[NATS_HEADER_KEYS.BU_ID]: natsHeaders2.buId,
|
|
5693
|
-
[NATS_HEADER_KEYS.BU_TIMEZONE]: natsHeaders2.buTimezone,
|
|
5694
|
-
[NATS_HEADER_KEYS.BU_ANCESTOR_IDS]: JSON.stringify(natsHeaders2.buAncestorIds),
|
|
5695
|
-
[NATS_HEADER_KEYS.BU_DESCENDANT_IDS]: JSON.stringify(natsHeaders2.buDescendantIds)
|
|
5696
|
-
};
|
|
5697
|
-
const record = new NatsRecordBuilder2(data ?? {}).setHeaders(headers).build();
|
|
5698
|
-
return client.send({
|
|
5699
|
-
cmd
|
|
5700
|
-
}, record).toPromise();
|
|
5701
|
-
}
|
|
5702
|
-
};
|
|
5703
|
-
NatsMicroserviceClientService = _ts_decorate37([
|
|
5704
|
-
Injectable15(),
|
|
5705
|
-
_ts_param12(0, Inject8(NATS_MS_CLIENTS)),
|
|
5706
|
-
_ts_metadata28("design:type", Function),
|
|
5707
|
-
_ts_metadata28("design:paramtypes", [
|
|
5708
|
-
typeof Map === "undefined" ? Object : Map
|
|
5709
|
-
])
|
|
5710
|
-
], NatsMicroserviceClientService);
|
|
5711
|
-
|
|
5712
|
-
// src/nats/nats-client.module.ts
|
|
5713
|
-
function _ts_decorate38(decorators, target, key, desc3) {
|
|
5714
|
-
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5715
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5716
|
-
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;
|
|
5717
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5718
|
-
}
|
|
5719
|
-
__name(_ts_decorate38, "_ts_decorate");
|
|
5720
|
-
var NATS_MS_OPTIONS = Symbol("NATS_MS_OPTIONS");
|
|
5721
|
-
var NatsClientModule = class _NatsClientModule {
|
|
5722
|
-
static {
|
|
5723
|
-
__name(this, "NatsClientModule");
|
|
5724
|
-
}
|
|
5725
|
-
static logger = new Logger16(_NatsClientModule.name);
|
|
5726
|
-
static allClients = [];
|
|
5727
|
-
async onModuleDestroy() {
|
|
5728
|
-
await Promise.all(_NatsClientModule.allClients.map((c) => c.close()));
|
|
5729
|
-
_NatsClientModule.allClients = [];
|
|
5730
|
-
}
|
|
5731
|
-
// Builds a Map of named NATS ClientProxy instances
|
|
5732
|
-
static buildClients(options, natsUrl) {
|
|
5733
|
-
const clients = /* @__PURE__ */ new Map();
|
|
5734
|
-
for (const svc of options.services) {
|
|
5735
|
-
const proxy = ClientProxyFactory.create({
|
|
5736
|
-
transport: Transport.NATS,
|
|
5737
|
-
options: {
|
|
5738
|
-
servers: [
|
|
5739
|
-
natsUrl
|
|
5740
|
-
]
|
|
5741
|
-
}
|
|
5742
|
-
});
|
|
5743
|
-
clients.set(svc.name, proxy);
|
|
5744
|
-
_NatsClientModule.allClients.push(proxy);
|
|
5745
|
-
_NatsClientModule.logger.log(`Registered NATS client: ${svc.name} \u2192 ${natsUrl}`);
|
|
5746
|
-
}
|
|
5747
|
-
return clients;
|
|
5748
|
-
}
|
|
5749
|
-
// Gateway mode — request-scoped, resolves context from sessionInfo via callback
|
|
5750
|
-
static forRoot(asyncOptions) {
|
|
5751
|
-
const optionsProvider = {
|
|
5752
|
-
provide: NATS_MODULE_OPTIONS,
|
|
5753
|
-
useFactory: asyncOptions.useFactory,
|
|
5754
|
-
inject: asyncOptions.inject || []
|
|
5755
|
-
};
|
|
5756
|
-
const resolverProvider = {
|
|
5757
|
-
provide: NATS_CONTEXT_RESOLVER,
|
|
5758
|
-
useFactory: /* @__PURE__ */ __name((options) => options.contextResolver, "useFactory"),
|
|
5759
|
-
inject: [
|
|
5760
|
-
NATS_MODULE_OPTIONS
|
|
5761
|
-
]
|
|
5762
|
-
};
|
|
5763
|
-
const clientsProvider = {
|
|
5764
|
-
provide: NATS_CLIENTS,
|
|
5765
|
-
useFactory: /* @__PURE__ */ __name((options, config) => {
|
|
5766
|
-
const natsUrl = options.natsUrl ?? config.get("NATS_URL", "nats://localhost:4222");
|
|
5767
|
-
return _NatsClientModule.buildClients(options, natsUrl);
|
|
5768
|
-
}, "useFactory"),
|
|
5769
|
-
inject: [
|
|
5770
|
-
NATS_MODULE_OPTIONS,
|
|
5771
|
-
ConfigService6
|
|
5772
|
-
]
|
|
5773
|
-
};
|
|
5774
|
-
return {
|
|
5775
|
-
module: _NatsClientModule,
|
|
5776
|
-
imports: [
|
|
5777
|
-
ConfigModule5,
|
|
5778
|
-
...asyncOptions.imports ?? []
|
|
5779
|
-
],
|
|
5780
|
-
providers: [
|
|
5781
|
-
optionsProvider,
|
|
5782
|
-
resolverProvider,
|
|
5783
|
-
clientsProvider,
|
|
5784
|
-
NatsClientService
|
|
5785
|
-
],
|
|
5786
|
-
exports: [
|
|
5787
|
-
NatsClientService
|
|
5788
|
-
]
|
|
5789
|
-
};
|
|
5790
|
-
}
|
|
5791
|
-
// Microservice mode — singleton, forwards context from incoming NATS payload
|
|
5792
|
-
static forMicroservice(asyncOptions) {
|
|
5793
|
-
const optionsProvider = {
|
|
5794
|
-
provide: NATS_MS_OPTIONS,
|
|
5795
|
-
useFactory: asyncOptions.useFactory,
|
|
5796
|
-
inject: asyncOptions.inject || []
|
|
5797
|
-
};
|
|
5798
|
-
const clientsProvider = {
|
|
5799
|
-
provide: NATS_MS_CLIENTS,
|
|
5800
|
-
useFactory: /* @__PURE__ */ __name((options, config) => {
|
|
5801
|
-
const natsUrl = options.natsUrl ?? config.get("NATS_URL", "nats://localhost:4222");
|
|
5802
|
-
return _NatsClientModule.buildClients(options, natsUrl);
|
|
5803
|
-
}, "useFactory"),
|
|
5804
|
-
inject: [
|
|
5805
|
-
NATS_MS_OPTIONS,
|
|
5806
|
-
ConfigService6
|
|
5807
|
-
]
|
|
5808
|
-
};
|
|
5809
|
-
return {
|
|
5810
|
-
module: _NatsClientModule,
|
|
5811
|
-
imports: [
|
|
5812
|
-
ConfigModule5,
|
|
5813
|
-
...asyncOptions.imports ?? []
|
|
5814
|
-
],
|
|
5815
|
-
providers: [
|
|
5816
|
-
optionsProvider,
|
|
5817
|
-
clientsProvider,
|
|
5818
|
-
NatsMicroserviceClientService
|
|
5819
|
-
],
|
|
5820
|
-
exports: [
|
|
5821
|
-
NatsMicroserviceClientService
|
|
5822
|
-
]
|
|
5823
|
-
};
|
|
5824
|
-
}
|
|
5825
|
-
};
|
|
5826
|
-
NatsClientModule = _ts_decorate38([
|
|
5827
|
-
Global6(),
|
|
5828
|
-
Module8({})
|
|
5829
|
-
], NatsClientModule);
|
|
5830
|
-
|
|
5831
5421
|
// src/root/root.module.ts
|
|
5832
|
-
import { Module as
|
|
5422
|
+
import { Module as Module8 } from "@nestjs/common";
|
|
5833
5423
|
|
|
5834
5424
|
// src/root/controllers/app.controller.ts
|
|
5835
5425
|
import { Controller as Controller3, Get as Get2 } from "@nestjs/common";
|
|
@@ -5850,14 +5440,14 @@ function ApiHealthCheck() {
|
|
|
5850
5440
|
__name(ApiHealthCheck, "ApiHealthCheck");
|
|
5851
5441
|
|
|
5852
5442
|
// src/root/services/app.service.ts
|
|
5853
|
-
import { Injectable as
|
|
5854
|
-
function
|
|
5443
|
+
import { Injectable as Injectable14 } from "@nestjs/common";
|
|
5444
|
+
function _ts_decorate35(decorators, target, key, desc3) {
|
|
5855
5445
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5856
5446
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5857
5447
|
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;
|
|
5858
5448
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5859
5449
|
}
|
|
5860
|
-
__name(
|
|
5450
|
+
__name(_ts_decorate35, "_ts_decorate");
|
|
5861
5451
|
var AppService = class {
|
|
5862
5452
|
static {
|
|
5863
5453
|
__name(this, "AppService");
|
|
@@ -5867,22 +5457,22 @@ var AppService = class {
|
|
|
5867
5457
|
return `Hello World!`;
|
|
5868
5458
|
}
|
|
5869
5459
|
};
|
|
5870
|
-
AppService =
|
|
5871
|
-
|
|
5460
|
+
AppService = _ts_decorate35([
|
|
5461
|
+
Injectable14()
|
|
5872
5462
|
], AppService);
|
|
5873
5463
|
|
|
5874
5464
|
// src/root/controllers/app.controller.ts
|
|
5875
|
-
function
|
|
5465
|
+
function _ts_decorate36(decorators, target, key, desc3) {
|
|
5876
5466
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5877
5467
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5878
5468
|
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;
|
|
5879
5469
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5880
5470
|
}
|
|
5881
|
-
__name(
|
|
5882
|
-
function
|
|
5471
|
+
__name(_ts_decorate36, "_ts_decorate");
|
|
5472
|
+
function _ts_metadata27(k, v) {
|
|
5883
5473
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5884
5474
|
}
|
|
5885
|
-
__name(
|
|
5475
|
+
__name(_ts_metadata27, "_ts_metadata");
|
|
5886
5476
|
var AppController = class {
|
|
5887
5477
|
static {
|
|
5888
5478
|
__name(this, "AppController");
|
|
@@ -5896,25 +5486,25 @@ var AppController = class {
|
|
|
5896
5486
|
return this.appService.getHello();
|
|
5897
5487
|
}
|
|
5898
5488
|
};
|
|
5899
|
-
|
|
5489
|
+
_ts_decorate36([
|
|
5900
5490
|
Get2(),
|
|
5901
5491
|
Public(),
|
|
5902
5492
|
ApiHealthCheck(),
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5493
|
+
_ts_metadata27("design:type", Function),
|
|
5494
|
+
_ts_metadata27("design:paramtypes", []),
|
|
5495
|
+
_ts_metadata27("design:returntype", String)
|
|
5906
5496
|
], AppController.prototype, "getHello", null);
|
|
5907
|
-
AppController =
|
|
5497
|
+
AppController = _ts_decorate36([
|
|
5908
5498
|
ApiTags3("Health"),
|
|
5909
5499
|
Controller3(),
|
|
5910
|
-
|
|
5911
|
-
|
|
5500
|
+
_ts_metadata27("design:type", Function),
|
|
5501
|
+
_ts_metadata27("design:paramtypes", [
|
|
5912
5502
|
typeof AppService === "undefined" ? Object : AppService
|
|
5913
5503
|
])
|
|
5914
5504
|
], AppController);
|
|
5915
5505
|
|
|
5916
5506
|
// src/root/controllers/csrf.controller.ts
|
|
5917
|
-
import { Controller as Controller4, Get as Get3, HttpCode as HttpCode3, HttpStatus as
|
|
5507
|
+
import { Controller as Controller4, Get as Get3, HttpCode as HttpCode3, HttpStatus as HttpStatus22, Res } from "@nestjs/common";
|
|
5918
5508
|
import { ApiTags as ApiTags4 } from "@nestjs/swagger";
|
|
5919
5509
|
|
|
5920
5510
|
// src/root/docs/csrf.docs.ts
|
|
@@ -5945,23 +5535,23 @@ function ApiGetCsrfToken() {
|
|
|
5945
5535
|
__name(ApiGetCsrfToken, "ApiGetCsrfToken");
|
|
5946
5536
|
|
|
5947
5537
|
// src/root/controllers/csrf.controller.ts
|
|
5948
|
-
function
|
|
5538
|
+
function _ts_decorate37(decorators, target, key, desc3) {
|
|
5949
5539
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5950
5540
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
5951
5541
|
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;
|
|
5952
5542
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5953
5543
|
}
|
|
5954
|
-
__name(
|
|
5955
|
-
function
|
|
5544
|
+
__name(_ts_decorate37, "_ts_decorate");
|
|
5545
|
+
function _ts_metadata28(k, v) {
|
|
5956
5546
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
5957
5547
|
}
|
|
5958
|
-
__name(
|
|
5959
|
-
function
|
|
5548
|
+
__name(_ts_metadata28, "_ts_metadata");
|
|
5549
|
+
function _ts_param11(paramIndex, decorator) {
|
|
5960
5550
|
return function(target, key) {
|
|
5961
5551
|
decorator(target, key, paramIndex);
|
|
5962
5552
|
};
|
|
5963
5553
|
}
|
|
5964
|
-
__name(
|
|
5554
|
+
__name(_ts_param11, "_ts_param");
|
|
5965
5555
|
var CsrfController = class {
|
|
5966
5556
|
static {
|
|
5967
5557
|
__name(this, "CsrfController");
|
|
@@ -5974,40 +5564,40 @@ var CsrfController = class {
|
|
|
5974
5564
|
};
|
|
5975
5565
|
}
|
|
5976
5566
|
};
|
|
5977
|
-
|
|
5567
|
+
_ts_decorate37([
|
|
5978
5568
|
Get3("token"),
|
|
5979
5569
|
Public(),
|
|
5980
|
-
HttpCode3(
|
|
5570
|
+
HttpCode3(HttpStatus22.OK),
|
|
5981
5571
|
ApiGetCsrfToken(),
|
|
5982
|
-
|
|
5572
|
+
_ts_param11(0, Res({
|
|
5983
5573
|
passthrough: true
|
|
5984
5574
|
})),
|
|
5985
|
-
|
|
5986
|
-
|
|
5575
|
+
_ts_metadata28("design:type", Function),
|
|
5576
|
+
_ts_metadata28("design:paramtypes", [
|
|
5987
5577
|
typeof FastifyReply === "undefined" ? Object : FastifyReply
|
|
5988
5578
|
]),
|
|
5989
|
-
|
|
5579
|
+
_ts_metadata28("design:returntype", Object)
|
|
5990
5580
|
], CsrfController.prototype, "getToken", null);
|
|
5991
|
-
CsrfController =
|
|
5581
|
+
CsrfController = _ts_decorate37([
|
|
5992
5582
|
ApiTags4("CSRF"),
|
|
5993
5583
|
Controller4("csrf")
|
|
5994
5584
|
], CsrfController);
|
|
5995
5585
|
|
|
5996
5586
|
// src/root/root.module.ts
|
|
5997
|
-
function
|
|
5587
|
+
function _ts_decorate38(decorators, target, key, desc3) {
|
|
5998
5588
|
var c = arguments.length, r = c < 3 ? target : desc3 === null ? desc3 = Object.getOwnPropertyDescriptor(target, key) : desc3, d;
|
|
5999
5589
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc3);
|
|
6000
5590
|
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;
|
|
6001
5591
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6002
5592
|
}
|
|
6003
|
-
__name(
|
|
5593
|
+
__name(_ts_decorate38, "_ts_decorate");
|
|
6004
5594
|
var RootModule = class {
|
|
6005
5595
|
static {
|
|
6006
5596
|
__name(this, "RootModule");
|
|
6007
5597
|
}
|
|
6008
5598
|
};
|
|
6009
|
-
RootModule =
|
|
6010
|
-
|
|
5599
|
+
RootModule = _ts_decorate38([
|
|
5600
|
+
Module8({
|
|
6011
5601
|
controllers: [
|
|
6012
5602
|
AppController,
|
|
6013
5603
|
CsrfController
|
|
@@ -6277,10 +5867,6 @@ export {
|
|
|
6277
5867
|
LoggerModule,
|
|
6278
5868
|
LoggerService,
|
|
6279
5869
|
MethodNotAllowedException,
|
|
6280
|
-
NATS_HEADER_KEYS,
|
|
6281
|
-
NatsClientModule,
|
|
6282
|
-
NatsClientService,
|
|
6283
|
-
NatsMicroserviceClientService,
|
|
6284
5870
|
NotAcceptableException,
|
|
6285
5871
|
NotFoundException,
|
|
6286
5872
|
NotImplementedException,
|
|
@@ -6296,10 +5882,6 @@ export {
|
|
|
6296
5882
|
RequestTimeoutException,
|
|
6297
5883
|
RequireSession,
|
|
6298
5884
|
RootModule,
|
|
6299
|
-
RpcBuCurrencyCode,
|
|
6300
|
-
RpcBuId,
|
|
6301
|
-
RpcNatsHeaders,
|
|
6302
|
-
RpcProblemExceptionFilter,
|
|
6303
5885
|
SKIP_CSRF_KEY,
|
|
6304
5886
|
SUPPORTED_CURRENCIES,
|
|
6305
5887
|
SelectOptionsQueryDto,
|
|
@@ -6338,7 +5920,6 @@ export {
|
|
|
6338
5920
|
minorToMajor,
|
|
6339
5921
|
normalizePhoneNumber,
|
|
6340
5922
|
parseExpiryToMs,
|
|
6341
|
-
parseNatsHeaders,
|
|
6342
5923
|
runWithCorrelationContext,
|
|
6343
5924
|
updateCorrelationContext,
|
|
6344
5925
|
verifyTokenHash
|