@saasicat/nest 0.14.0 → 0.15.0
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/_entries.cjs +1464 -1334
- package/dist/admin/index.d.cts +8 -6
- package/dist/admin/index.d.ts +8 -6
- package/dist/admin/index.js +13 -12
- package/dist/{admin-resources.module-Cms8MY6h.d.ts → admin-resources.module-BY5r_1MG.d.ts} +29 -3
- package/dist/{admin-resources.module-BZN_yBFj.d.cts → admin-resources.module-DGgGSdzN.d.cts} +29 -3
- package/dist/{admin-stats.module-15ac5KY3.d.ts → admin-stats.service-Db2exT_d.d.ts} +2 -23
- package/dist/{admin-stats.module-v4SVvWzj.d.cts → admin-stats.service-HUZIU448.d.cts} +2 -23
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +3 -2
- package/dist/catalog/index.js +3 -2
- package/dist/checkout-offer/index.d.cts +2 -1
- package/dist/checkout-offer/index.d.ts +2 -1
- package/dist/checkout-offer/index.js +2 -1
- package/dist/checkout-offer.module-Ca3_TieR.d.ts +39 -0
- package/dist/checkout-offer.module-DmlpPevf.d.cts +39 -0
- package/dist/{checkout-offer.module-Y0hDOVrq.d.ts → checkout-offer.service-BX51dljL.d.cts} +1 -37
- package/dist/{checkout-offer.module-ZYF5IsDY.d.cts → checkout-offer.service-BX51dljL.d.ts} +1 -37
- package/dist/{chunk-2PNX2QL2.js → chunk-32EMXPU2.js} +1 -0
- package/dist/{chunk-RKVY775D.js → chunk-5KH2O4SF.js} +5 -1
- package/dist/{chunk-TXDH4FUA.js → chunk-7RRWI5LH.js} +1 -1
- package/dist/chunk-EWPF57AG.js +13 -0
- package/dist/{chunk-HBFU5AN3.js → chunk-GJBXOCRZ.js} +4 -0
- package/dist/{chunk-IRWZC3GC.js → chunk-GLLCB4BP.js} +4 -0
- package/dist/{chunk-33TP26MR.js → chunk-P3DP6GJE.js} +4 -0
- package/dist/{chunk-FVT7KTUI.js → chunk-PLJEAUFU.js} +275 -61
- package/dist/{chunk-I2EKGQUG.js → chunk-YITTE646.js} +462 -82
- package/dist/chunk-YSC46BGM.js +21 -0
- package/dist/define-saasicat-CeDBX9ji.d.cts +46 -0
- package/dist/define-saasicat-Rc0rXrYG.d.ts +46 -0
- package/dist/enforce-quota.interceptor-CmbWX39L.d.ts +60 -0
- package/dist/enforce-quota.interceptor-DMw-bPyk.d.cts +60 -0
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +33 -18
- package/dist/platform/index.d.cts +12 -16
- package/dist/platform/index.d.ts +12 -16
- package/dist/platform/index.js +24 -25
- package/dist/promo/index.js +2 -1
- package/dist/{enforce-quota.interceptor-Dse3jSpU.d.cts → saas-platform.module-D3rUTiho.d.cts} +69 -62
- package/dist/{enforce-quota.interceptor-DMEvL-bE.d.ts → saas-platform.module-DLhoqKNA.d.ts} +69 -62
- package/dist/subscription-contract/index.d.cts +1 -1
- package/dist/subscription-contract/index.d.ts +1 -1
- package/dist/subscription-contract/index.js +1 -1
- package/dist/{subscription-contract.module-CG9fPKAr.d.cts → subscription-contract.module-B2uNvUJL.d.cts} +3 -1
- package/dist/{subscription-contract.module-CVebZzHR.d.ts → subscription-contract.module-edyhBr4n.d.ts} +3 -1
- package/dist/{subscription-bundle-preview.service-BgQ776mv.d.ts → tenant-billing.controller-BwZRnJ3q.d.ts} +105 -105
- package/dist/{subscription-bundle-preview.service-B4Ye8L2F.d.cts → tenant-billing.controller-CG4CaFUP.d.cts} +105 -105
- package/dist/testing/index.d.cts +6 -3
- package/dist/testing/index.d.ts +6 -3
- package/dist/testing/index.js +8 -6
- package/package.json +3 -3
- package/dist/chunk-LZHLGUQI.js +0 -190
- package/dist/chunk-WJ6BMDL3.js +0 -313
- package/dist/setup.service-BPwJ7My_.d.cts +0 -45
- package/dist/setup.service-D2mrdDDB.d.ts +0 -45
|
@@ -12,6 +12,9 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
AdminAuditService
|
|
14
14
|
} from "./chunk-E56W4U2P.js";
|
|
15
|
+
import {
|
|
16
|
+
SaaSiCatPublicRoute
|
|
17
|
+
} from "./chunk-YSC46BGM.js";
|
|
15
18
|
import {
|
|
16
19
|
asProvider
|
|
17
20
|
} from "./chunk-SABTXESR.js";
|
|
@@ -254,6 +257,7 @@ _ts_decorate4([
|
|
|
254
257
|
], PromoCodePublicController.prototype, "preview", null);
|
|
255
258
|
PromoCodePublicController = _ts_decorate4([
|
|
256
259
|
Controller("billing/promo"),
|
|
260
|
+
SaaSiCatPublicRoute(),
|
|
257
261
|
_ts_param2(0, Inject2(PromoCodesService)),
|
|
258
262
|
_ts_metadata3("design:type", Function),
|
|
259
263
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AdminAuditService
|
|
10
10
|
} from "./chunk-E56W4U2P.js";
|
|
11
|
+
import {
|
|
12
|
+
SaaSiCatPublicRoute
|
|
13
|
+
} from "./chunk-YSC46BGM.js";
|
|
11
14
|
import {
|
|
12
15
|
DiscoveryScanner
|
|
13
16
|
} from "./chunk-Z3FWN3HJ.js";
|
|
@@ -2607,6 +2610,7 @@ function buildPublicMarketingCatalogController(guards, projectKey, currency, vat
|
|
|
2607
2610
|
], GeneratedPublicMarketingCatalogController.prototype, "getCatalog", null);
|
|
2608
2611
|
GeneratedPublicMarketingCatalogController = _ts_decorate14([
|
|
2609
2612
|
Controller4("public/marketing-catalog"),
|
|
2613
|
+
SaaSiCatPublicRoute(),
|
|
2610
2614
|
UseGuards4(...guards),
|
|
2611
2615
|
_ts_param11(0, Inject11(PublicMarketingCatalogService)),
|
|
2612
2616
|
_ts_metadata14("design:type", Function),
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
MFA_PORT_TOKEN,
|
|
5
5
|
RLS_BYPASS_PORT_TOKEN
|
|
6
6
|
} from "./chunk-E56W4U2P.js";
|
|
7
|
+
import {
|
|
8
|
+
SaaSiCatPublicRoute
|
|
9
|
+
} from "./chunk-YSC46BGM.js";
|
|
7
10
|
import {
|
|
8
11
|
asProvider
|
|
9
12
|
} from "./chunk-SABTXESR.js";
|
|
@@ -523,6 +526,7 @@ _ts_decorate7([
|
|
|
523
526
|
], AdminPublicBootController.prototype, "getBoot", null);
|
|
524
527
|
AdminPublicBootController = _ts_decorate7([
|
|
525
528
|
Controller("admin"),
|
|
529
|
+
SaaSiCatPublicRoute(),
|
|
526
530
|
_ts_param5(0, Inject5(ADMIN_MANIFEST_CONFIG)),
|
|
527
531
|
_ts_metadata5("design:type", Function),
|
|
528
532
|
_ts_metadata5("design:paramtypes", [
|
|
@@ -926,9 +930,14 @@ AdminManifestModule = _ts_decorate8([
|
|
|
926
930
|
Module2({})
|
|
927
931
|
], AdminManifestModule);
|
|
928
932
|
|
|
929
|
-
// src/admin/admin-
|
|
930
|
-
|
|
931
|
-
|
|
933
|
+
// src/admin/admin-stats.tokens.ts
|
|
934
|
+
var SUBSCRIPTION_STATS_PORT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/SubscriptionStatsPort");
|
|
935
|
+
var PROMO_CODE_STATS_PORT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/PromoCodeStatsPort");
|
|
936
|
+
var AUDIT_STATS_PORT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/AuditStatsPort");
|
|
937
|
+
var ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/AdminStatsAuditWindowDays");
|
|
938
|
+
|
|
939
|
+
// src/admin/admin-stats.service.ts
|
|
940
|
+
import { Inject as Inject7, Injectable as Injectable6, Optional as Optional2 } from "@nestjs/common";
|
|
932
941
|
function _ts_decorate9(decorators, target, key, desc) {
|
|
933
942
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
934
943
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -946,6 +955,203 @@ function _ts_param7(paramIndex, decorator) {
|
|
|
946
955
|
};
|
|
947
956
|
}
|
|
948
957
|
__name(_ts_param7, "_ts_param");
|
|
958
|
+
var DAY_MS = 864e5;
|
|
959
|
+
var DEFAULT_AUDIT_WINDOW_DAYS = 7;
|
|
960
|
+
var AdminStatsService = class {
|
|
961
|
+
static {
|
|
962
|
+
__name(this, "AdminStatsService");
|
|
963
|
+
}
|
|
964
|
+
subscriptions;
|
|
965
|
+
promos;
|
|
966
|
+
audit;
|
|
967
|
+
auditWindowDays;
|
|
968
|
+
constructor(subscriptions, promos, audit, auditWindowDays = DEFAULT_AUDIT_WINDOW_DAYS) {
|
|
969
|
+
this.subscriptions = subscriptions;
|
|
970
|
+
this.promos = promos;
|
|
971
|
+
this.audit = audit;
|
|
972
|
+
this.auditWindowDays = auditWindowDays;
|
|
973
|
+
}
|
|
974
|
+
async getSnapshot() {
|
|
975
|
+
const since = new Date(Date.now() - this.auditWindowDays * DAY_MS);
|
|
976
|
+
const [subscriptions, promos, auditCount] = await Promise.all([
|
|
977
|
+
this.subscriptions.getStats(),
|
|
978
|
+
this.promos.getStats(),
|
|
979
|
+
this.audit.countSince(since)
|
|
980
|
+
]);
|
|
981
|
+
return {
|
|
982
|
+
subscriptions,
|
|
983
|
+
promos,
|
|
984
|
+
audit: {
|
|
985
|
+
countLastNDays: auditCount,
|
|
986
|
+
nDays: this.auditWindowDays
|
|
987
|
+
}
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
AdminStatsService = _ts_decorate9([
|
|
992
|
+
Injectable6(),
|
|
993
|
+
_ts_param7(0, Inject7(SUBSCRIPTION_STATS_PORT_TOKEN)),
|
|
994
|
+
_ts_param7(1, Inject7(PROMO_CODE_STATS_PORT_TOKEN)),
|
|
995
|
+
_ts_param7(2, Inject7(AUDIT_STATS_PORT_TOKEN)),
|
|
996
|
+
_ts_param7(3, Optional2()),
|
|
997
|
+
_ts_param7(3, Inject7(ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN)),
|
|
998
|
+
_ts_metadata7("design:type", Function),
|
|
999
|
+
_ts_metadata7("design:paramtypes", [
|
|
1000
|
+
typeof SubscriptionStatsPort === "undefined" ? Object : SubscriptionStatsPort,
|
|
1001
|
+
typeof PromoCodeStatsPort === "undefined" ? Object : PromoCodeStatsPort,
|
|
1002
|
+
typeof AuditStatsPort === "undefined" ? Object : AuditStatsPort,
|
|
1003
|
+
Number
|
|
1004
|
+
])
|
|
1005
|
+
], AdminStatsService);
|
|
1006
|
+
|
|
1007
|
+
// src/admin/admin-stats.controller.ts
|
|
1008
|
+
import { Controller as Controller3, Get as Get3, Inject as Inject8, UseGuards as UseGuards2 } from "@nestjs/common";
|
|
1009
|
+
function _ts_decorate10(decorators, target, key, desc) {
|
|
1010
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1011
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1012
|
+
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;
|
|
1013
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1014
|
+
}
|
|
1015
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
1016
|
+
function _ts_metadata8(k, v) {
|
|
1017
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1018
|
+
}
|
|
1019
|
+
__name(_ts_metadata8, "_ts_metadata");
|
|
1020
|
+
function _ts_param8(paramIndex, decorator) {
|
|
1021
|
+
return function(target, key) {
|
|
1022
|
+
decorator(target, key, paramIndex);
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
__name(_ts_param8, "_ts_param");
|
|
1026
|
+
var AdminStatsController = class {
|
|
1027
|
+
static {
|
|
1028
|
+
__name(this, "AdminStatsController");
|
|
1029
|
+
}
|
|
1030
|
+
stats;
|
|
1031
|
+
// Explicit @Inject instead of type reflection: tsup/esbuild do not emit
|
|
1032
|
+
// `design:paramtypes` metadata, so Nest could otherwise not resolve the
|
|
1033
|
+
// service type at the constructor.
|
|
1034
|
+
constructor(stats) {
|
|
1035
|
+
this.stats = stats;
|
|
1036
|
+
}
|
|
1037
|
+
async getDashboardSnapshot() {
|
|
1038
|
+
return this.stats.getSnapshot();
|
|
1039
|
+
}
|
|
1040
|
+
};
|
|
1041
|
+
_ts_decorate10([
|
|
1042
|
+
Get3("dashboard"),
|
|
1043
|
+
_ts_metadata8("design:type", Function),
|
|
1044
|
+
_ts_metadata8("design:paramtypes", []),
|
|
1045
|
+
_ts_metadata8("design:returntype", Promise)
|
|
1046
|
+
], AdminStatsController.prototype, "getDashboardSnapshot", null);
|
|
1047
|
+
AdminStatsController = _ts_decorate10([
|
|
1048
|
+
Controller3("admin/stats"),
|
|
1049
|
+
UseGuards2(SuperAdminGuard),
|
|
1050
|
+
_ts_param8(0, Inject8(AdminStatsService)),
|
|
1051
|
+
_ts_metadata8("design:type", Function),
|
|
1052
|
+
_ts_metadata8("design:paramtypes", [
|
|
1053
|
+
typeof AdminStatsService === "undefined" ? Object : AdminStatsService
|
|
1054
|
+
])
|
|
1055
|
+
], AdminStatsController);
|
|
1056
|
+
function buildAdminStatsController(guards) {
|
|
1057
|
+
let GeneratedAdminStatsController = class GeneratedAdminStatsController {
|
|
1058
|
+
static {
|
|
1059
|
+
__name(this, "GeneratedAdminStatsController");
|
|
1060
|
+
}
|
|
1061
|
+
stats;
|
|
1062
|
+
constructor(stats) {
|
|
1063
|
+
this.stats = stats;
|
|
1064
|
+
}
|
|
1065
|
+
async getDashboardSnapshot() {
|
|
1066
|
+
return this.stats.getSnapshot();
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1069
|
+
_ts_decorate10([
|
|
1070
|
+
Get3("dashboard"),
|
|
1071
|
+
_ts_metadata8("design:type", Function),
|
|
1072
|
+
_ts_metadata8("design:paramtypes", []),
|
|
1073
|
+
_ts_metadata8("design:returntype", Promise)
|
|
1074
|
+
], GeneratedAdminStatsController.prototype, "getDashboardSnapshot", null);
|
|
1075
|
+
GeneratedAdminStatsController = _ts_decorate10([
|
|
1076
|
+
Controller3("admin/stats"),
|
|
1077
|
+
UseGuards2(...guards),
|
|
1078
|
+
_ts_param8(0, Inject8(AdminStatsService)),
|
|
1079
|
+
_ts_metadata8("design:type", Function),
|
|
1080
|
+
_ts_metadata8("design:paramtypes", [
|
|
1081
|
+
typeof AdminStatsService === "undefined" ? Object : AdminStatsService
|
|
1082
|
+
])
|
|
1083
|
+
], GeneratedAdminStatsController);
|
|
1084
|
+
return GeneratedAdminStatsController;
|
|
1085
|
+
}
|
|
1086
|
+
__name(buildAdminStatsController, "buildAdminStatsController");
|
|
1087
|
+
|
|
1088
|
+
// src/admin/admin-stats.module.ts
|
|
1089
|
+
import { Module as Module3 } from "@nestjs/common";
|
|
1090
|
+
function _ts_decorate11(decorators, target, key, desc) {
|
|
1091
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1092
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1093
|
+
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;
|
|
1094
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1095
|
+
}
|
|
1096
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
1097
|
+
var AdminStatsModule = class _AdminStatsModule {
|
|
1098
|
+
static {
|
|
1099
|
+
__name(this, "AdminStatsModule");
|
|
1100
|
+
}
|
|
1101
|
+
static forRoot(options) {
|
|
1102
|
+
const providers = [
|
|
1103
|
+
asProvider(SUBSCRIPTION_STATS_PORT_TOKEN, options.subscriptionStatsPort),
|
|
1104
|
+
asProvider(PROMO_CODE_STATS_PORT_TOKEN, options.promoCodeStatsPort),
|
|
1105
|
+
asProvider(AUDIT_STATS_PORT_TOKEN, options.auditStatsPort),
|
|
1106
|
+
AdminStatsService,
|
|
1107
|
+
SuperAdminGuard
|
|
1108
|
+
];
|
|
1109
|
+
if (options.auditWindowDays !== void 0) {
|
|
1110
|
+
providers.push({
|
|
1111
|
+
provide: ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
1112
|
+
useValue: options.auditWindowDays
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
if (options.extraProviders) providers.push(...options.extraProviders);
|
|
1116
|
+
return {
|
|
1117
|
+
module: _AdminStatsModule,
|
|
1118
|
+
global: options.global ?? false,
|
|
1119
|
+
imports: options.imports ?? [],
|
|
1120
|
+
controllers: [
|
|
1121
|
+
options.guards ? buildAdminStatsController(options.guards) : AdminStatsController
|
|
1122
|
+
],
|
|
1123
|
+
providers,
|
|
1124
|
+
exports: [
|
|
1125
|
+
AdminStatsService,
|
|
1126
|
+
SuperAdminGuard
|
|
1127
|
+
]
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
AdminStatsModule = _ts_decorate11([
|
|
1132
|
+
Module3({})
|
|
1133
|
+
], AdminStatsModule);
|
|
1134
|
+
|
|
1135
|
+
// src/admin/admin-resources.module.ts
|
|
1136
|
+
import { Body, Controller as Controller4, Get as Get4, Inject as Inject9, Injectable as Injectable7, Module as Module4, NotFoundException, Param, Post as Post2, Query, Req, UseGuards as UseGuards3 } from "@nestjs/common";
|
|
1137
|
+
import { IsOptional, IsString, MaxLength } from "class-validator";
|
|
1138
|
+
function _ts_decorate12(decorators, target, key, desc) {
|
|
1139
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1140
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1141
|
+
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;
|
|
1142
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1143
|
+
}
|
|
1144
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
1145
|
+
function _ts_metadata9(k, v) {
|
|
1146
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1147
|
+
}
|
|
1148
|
+
__name(_ts_metadata9, "_ts_metadata");
|
|
1149
|
+
function _ts_param9(paramIndex, decorator) {
|
|
1150
|
+
return function(target, key) {
|
|
1151
|
+
decorator(target, key, paramIndex);
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
__name(_ts_param9, "_ts_param");
|
|
949
1155
|
var ADMIN_RESOURCES_PORT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/AdminResourcesPort");
|
|
950
1156
|
var SuspendTenantDto = class {
|
|
951
1157
|
static {
|
|
@@ -953,11 +1159,11 @@ var SuspendTenantDto = class {
|
|
|
953
1159
|
}
|
|
954
1160
|
reason;
|
|
955
1161
|
};
|
|
956
|
-
|
|
1162
|
+
_ts_decorate12([
|
|
957
1163
|
IsOptional(),
|
|
958
1164
|
IsString(),
|
|
959
1165
|
MaxLength(500),
|
|
960
|
-
|
|
1166
|
+
_ts_metadata9("design:type", String)
|
|
961
1167
|
], SuspendTenantDto.prototype, "reason", void 0);
|
|
962
1168
|
var AdminResourcesService = class {
|
|
963
1169
|
static {
|
|
@@ -1014,12 +1220,12 @@ var AdminResourcesService = class {
|
|
|
1014
1220
|
return result;
|
|
1015
1221
|
}
|
|
1016
1222
|
};
|
|
1017
|
-
AdminResourcesService =
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1223
|
+
AdminResourcesService = _ts_decorate12([
|
|
1224
|
+
Injectable7(),
|
|
1225
|
+
_ts_param9(0, Inject9(ADMIN_RESOURCES_PORT_TOKEN)),
|
|
1226
|
+
_ts_param9(1, Inject9(AdminAuditService)),
|
|
1227
|
+
_ts_metadata9("design:type", Function),
|
|
1228
|
+
_ts_metadata9("design:paramtypes", [
|
|
1023
1229
|
typeof AdminResourcesPort === "undefined" ? Object : AdminResourcesPort,
|
|
1024
1230
|
typeof AdminAuditService === "undefined" ? Object : AdminAuditService
|
|
1025
1231
|
])
|
|
@@ -1071,78 +1277,78 @@ function buildAdminResourcesController(guards) {
|
|
|
1071
1277
|
return this.resources.listSubscriptions();
|
|
1072
1278
|
}
|
|
1073
1279
|
};
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1280
|
+
_ts_decorate12([
|
|
1281
|
+
Get4("tenants"),
|
|
1282
|
+
_ts_param9(0, Query()),
|
|
1283
|
+
_ts_metadata9("design:type", Function),
|
|
1284
|
+
_ts_metadata9("design:paramtypes", [
|
|
1079
1285
|
Object
|
|
1080
1286
|
]),
|
|
1081
|
-
|
|
1287
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1082
1288
|
], GeneratedAdminResourcesController.prototype, "listTenants", null);
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1289
|
+
_ts_decorate12([
|
|
1290
|
+
Get4("tenants/:slug"),
|
|
1291
|
+
_ts_param9(0, Param("slug")),
|
|
1292
|
+
_ts_metadata9("design:type", Function),
|
|
1293
|
+
_ts_metadata9("design:paramtypes", [
|
|
1088
1294
|
String
|
|
1089
1295
|
]),
|
|
1090
|
-
|
|
1296
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1091
1297
|
], GeneratedAdminResourcesController.prototype, "getTenant", null);
|
|
1092
|
-
|
|
1298
|
+
_ts_decorate12([
|
|
1093
1299
|
Post2("tenants/:slug/suspend"),
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1300
|
+
_ts_param9(0, Req()),
|
|
1301
|
+
_ts_param9(1, Param("slug")),
|
|
1302
|
+
_ts_param9(2, Body()),
|
|
1303
|
+
_ts_metadata9("design:type", Function),
|
|
1304
|
+
_ts_metadata9("design:paramtypes", [
|
|
1099
1305
|
typeof AdminRequest === "undefined" ? Object : AdminRequest,
|
|
1100
1306
|
String,
|
|
1101
1307
|
typeof SuspendTenantDto === "undefined" ? Object : SuspendTenantDto
|
|
1102
1308
|
]),
|
|
1103
|
-
|
|
1309
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1104
1310
|
], GeneratedAdminResourcesController.prototype, "suspendTenant", null);
|
|
1105
|
-
|
|
1311
|
+
_ts_decorate12([
|
|
1106
1312
|
Post2("tenants/:slug/reactivate"),
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1313
|
+
_ts_param9(0, Req()),
|
|
1314
|
+
_ts_param9(1, Param("slug")),
|
|
1315
|
+
_ts_metadata9("design:type", Function),
|
|
1316
|
+
_ts_metadata9("design:paramtypes", [
|
|
1111
1317
|
typeof AdminRequest === "undefined" ? Object : AdminRequest,
|
|
1112
1318
|
String
|
|
1113
1319
|
]),
|
|
1114
|
-
|
|
1320
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1115
1321
|
], GeneratedAdminResourcesController.prototype, "reactivateTenant", null);
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1322
|
+
_ts_decorate12([
|
|
1323
|
+
Get4("users"),
|
|
1324
|
+
_ts_param9(0, Query()),
|
|
1325
|
+
_ts_metadata9("design:type", Function),
|
|
1326
|
+
_ts_metadata9("design:paramtypes", [
|
|
1121
1327
|
Object
|
|
1122
1328
|
]),
|
|
1123
|
-
|
|
1329
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1124
1330
|
], GeneratedAdminResourcesController.prototype, "listUsers", null);
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1331
|
+
_ts_decorate12([
|
|
1332
|
+
Get4("audit"),
|
|
1333
|
+
_ts_param9(0, Query()),
|
|
1334
|
+
_ts_metadata9("design:type", Function),
|
|
1335
|
+
_ts_metadata9("design:paramtypes", [
|
|
1130
1336
|
Object
|
|
1131
1337
|
]),
|
|
1132
|
-
|
|
1338
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1133
1339
|
], GeneratedAdminResourcesController.prototype, "listAudit", null);
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1340
|
+
_ts_decorate12([
|
|
1341
|
+
Get4("subscriptions"),
|
|
1342
|
+
_ts_metadata9("design:type", Function),
|
|
1343
|
+
_ts_metadata9("design:paramtypes", []),
|
|
1344
|
+
_ts_metadata9("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1139
1345
|
], GeneratedAdminResourcesController.prototype, "listSubscriptions", null);
|
|
1140
|
-
GeneratedAdminResourcesController =
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1346
|
+
GeneratedAdminResourcesController = _ts_decorate12([
|
|
1347
|
+
Controller4("admin"),
|
|
1348
|
+
UseGuards3(...guards),
|
|
1349
|
+
_ts_param9(0, Inject9(AdminResourcesService)),
|
|
1350
|
+
_ts_metadata9("design:type", Function),
|
|
1351
|
+
_ts_metadata9("design:paramtypes", [
|
|
1146
1352
|
typeof AdminResourcesService === "undefined" ? Object : AdminResourcesService
|
|
1147
1353
|
])
|
|
1148
1354
|
], GeneratedAdminResourcesController);
|
|
@@ -1172,8 +1378,8 @@ var AdminResourcesModule = class _AdminResourcesModule {
|
|
|
1172
1378
|
};
|
|
1173
1379
|
}
|
|
1174
1380
|
};
|
|
1175
|
-
AdminResourcesModule =
|
|
1176
|
-
|
|
1381
|
+
AdminResourcesModule = _ts_decorate12([
|
|
1382
|
+
Module4({})
|
|
1177
1383
|
], AdminResourcesModule);
|
|
1178
1384
|
|
|
1179
1385
|
export {
|
|
@@ -1190,6 +1396,14 @@ export {
|
|
|
1190
1396
|
AdminPublicBootController,
|
|
1191
1397
|
PLATFORM_CORE_MANIFEST_CONTRIBUTION,
|
|
1192
1398
|
AdminManifestModule,
|
|
1399
|
+
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
1400
|
+
PROMO_CODE_STATS_PORT_TOKEN,
|
|
1401
|
+
AUDIT_STATS_PORT_TOKEN,
|
|
1402
|
+
ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
1403
|
+
AdminStatsService,
|
|
1404
|
+
AdminStatsController,
|
|
1405
|
+
buildAdminStatsController,
|
|
1406
|
+
AdminStatsModule,
|
|
1193
1407
|
ADMIN_RESOURCES_PORT_TOKEN,
|
|
1194
1408
|
SuspendTenantDto,
|
|
1195
1409
|
AdminResourcesService,
|