@saasicat/nest 0.7.0 → 0.9.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/admin/index.cjs +262 -7
- package/dist/admin/index.d.cts +6 -4
- package/dist/admin/index.d.ts +6 -4
- package/dist/admin/index.js +12 -4
- package/dist/{admin-manifest.service-Cp6uwvmt.d.cts → admin-manifest.service-BMeSLRW4.d.ts} +1 -1
- package/dist/{admin-manifest.service-UGgzR1x-.d.ts → admin-manifest.service-StAQe6QO.d.cts} +1 -1
- package/dist/admin-resources.module-BybEjZs-.d.cts +40 -0
- package/dist/admin-resources.module-CUCLlUAi.d.ts +40 -0
- package/dist/billing/index.cjs +3 -1
- package/dist/billing/index.d.cts +5 -287
- package/dist/billing/index.d.ts +5 -287
- package/dist/billing/index.js +5 -8
- package/dist/catalog/index.d.cts +4 -101
- package/dist/catalog/index.d.ts +4 -101
- package/dist/catalog/index.js +12 -10
- package/dist/catalog.module-BKObceo0.d.ts +103 -0
- package/dist/catalog.module-Dw2Hrbyu.d.cts +103 -0
- package/dist/{chunk-U6HT27J7.js → chunk-3M6VLT5N.js} +257 -6
- package/dist/chunk-7K5PT2LX.js +211 -0
- package/dist/{chunk-RZU4HIAN.js → chunk-GW2I3JZD.js} +25 -22
- package/dist/{chunk-6LP7CDS2.js → chunk-HXAWPPFW.js} +10 -5
- package/dist/chunk-OFBDEO45.js +755 -0
- package/dist/{chunk-5DDCSGZC.js → chunk-PBQRPDO2.js} +142 -354
- package/dist/{chunk-SD3TT2BR.js → chunk-WGVTXSYW.js} +1 -1
- package/dist/{chunk-A2QBXDJC.js → chunk-ZZMAHX22.js} +343 -16
- package/dist/{enforce-quota.interceptor-Dj1Kusr5.d.ts → enforce-quota.interceptor-B3CL5MSw.d.ts} +94 -12
- package/dist/{enforce-quota.interceptor-cv7r80VM.d.cts → enforce-quota.interceptor-SqrQVF91.d.cts} +94 -12
- package/dist/entitlement/index.cjs +1 -0
- package/dist/entitlement/index.d.cts +3 -1
- package/dist/entitlement/index.d.ts +3 -1
- package/dist/entitlement/index.js +1 -2
- package/dist/index.cjs +3503 -2811
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +75 -61
- package/dist/module-B5m080F0.d.ts +39 -0
- package/dist/module-DeH_Jkcq.d.cts +39 -0
- package/dist/platform/index.cjs +11113 -971
- package/dist/platform/index.d.cts +41 -7
- package/dist/platform/index.d.ts +41 -7
- package/dist/platform/index.js +26 -6
- package/dist/promo/index.cjs +530 -5
- package/dist/promo/index.d.cts +47 -30
- package/dist/promo/index.d.ts +47 -30
- package/dist/promo/index.js +9 -1
- package/dist/{service-DX8KbGXl.d.cts → service-DlhMnYjW.d.cts} +1 -1
- package/dist/{service-DX8KbGXl.d.ts → service-DlhMnYjW.d.ts} +1 -1
- package/dist/subscription-bundles.module-BQmoozm5.d.ts +291 -0
- package/dist/subscription-bundles.module-DCpV-Pb5.d.cts +291 -0
- package/dist/testing/index.cjs +11101 -973
- package/dist/testing/index.d.cts +9 -4
- package/dist/testing/index.d.ts +9 -4
- package/dist/testing/index.js +10 -4
- package/package.json +4 -4
- package/dist/admin-manifest.config-DyrQNT7M.d.cts +0 -10
- package/dist/admin-manifest.config-DyrQNT7M.d.ts +0 -10
- package/dist/chunk-52UTQRD3.js +0 -326
- package/dist/chunk-Q53N43LQ.js +0 -13
- /package/dist/{chunk-2FR6ZL7R.js → chunk-HWGIMNWR.js} +0 -0
package/dist/admin/index.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var admin_exports = {};
|
|
33
33
|
__export(admin_exports, {
|
|
34
34
|
ADMIN_MANIFEST_CONFIG: () => ADMIN_MANIFEST_CONFIG,
|
|
35
|
+
ADMIN_RESOURCES_PORT_TOKEN: () => ADMIN_RESOURCES_PORT_TOKEN,
|
|
35
36
|
ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN: () => ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
36
37
|
AUDIT_PORT_TOKEN: () => AUDIT_PORT_TOKEN,
|
|
37
38
|
AUDIT_STATS_PORT_TOKEN: () => AUDIT_STATS_PORT_TOKEN,
|
|
@@ -41,6 +42,8 @@ __export(admin_exports, {
|
|
|
41
42
|
AdminManifestService: () => AdminManifestService,
|
|
42
43
|
AdminModule: () => AdminModule,
|
|
43
44
|
AdminPublicBootController: () => AdminPublicBootController,
|
|
45
|
+
AdminResourcesModule: () => AdminResourcesModule,
|
|
46
|
+
AdminResourcesService: () => AdminResourcesService,
|
|
44
47
|
AdminStatsController: () => AdminStatsController,
|
|
45
48
|
AdminStatsModule: () => AdminStatsModule,
|
|
46
49
|
AdminStatsService: () => AdminStatsService,
|
|
@@ -54,7 +57,8 @@ __export(admin_exports, {
|
|
|
54
57
|
RLS_BYPASS_PORT_TOKEN: () => RLS_BYPASS_PORT_TOKEN,
|
|
55
58
|
RequireMfa: () => RequireMfa,
|
|
56
59
|
SUBSCRIPTION_STATS_PORT_TOKEN: () => SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
57
|
-
SuperAdminGuard: () => SuperAdminGuard
|
|
60
|
+
SuperAdminGuard: () => SuperAdminGuard,
|
|
61
|
+
SuspendTenantDto: () => SuspendTenantDto
|
|
58
62
|
});
|
|
59
63
|
module.exports = __toCommonJS(admin_exports);
|
|
60
64
|
|
|
@@ -444,6 +448,7 @@ var AdminModule = class _AdminModule {
|
|
|
444
448
|
return {
|
|
445
449
|
module: _AdminModule,
|
|
446
450
|
global: options.global ?? false,
|
|
451
|
+
imports: options.imports ?? [],
|
|
447
452
|
providers,
|
|
448
453
|
exports: [
|
|
449
454
|
MFA_PORT_TOKEN,
|
|
@@ -688,7 +693,7 @@ var PLATFORM_CORE_MANIFEST_CONTRIBUTION = {
|
|
|
688
693
|
// section is deliberately curated:
|
|
689
694
|
// Overview: dashboard
|
|
690
695
|
// Product catalog: discovery → bundles → plans →
|
|
691
|
-
//
|
|
696
|
+
// marketingCatalog → promoCodes
|
|
692
697
|
// (promoCodes is appended by the app contributions
|
|
693
698
|
// and therefore lands at the end of the section)
|
|
694
699
|
// Customers: tenants → users → pilots
|
|
@@ -716,10 +721,6 @@ var PLATFORM_CORE_MANIFEST_CONTRIBUTION = {
|
|
|
716
721
|
enabled: true,
|
|
717
722
|
requiredCapability: "plans.read"
|
|
718
723
|
},
|
|
719
|
-
planVersions: {
|
|
720
|
-
enabled: true,
|
|
721
|
-
requiredCapability: "plans.read"
|
|
722
|
-
},
|
|
723
724
|
// SPEC_V2 §11.1 M3 — marketing catalog (locale pivot).
|
|
724
725
|
// Apps that market a public catalog set
|
|
725
726
|
// `marketingProjections.read = true`.
|
|
@@ -1249,9 +1250,260 @@ var AdminStatsModule = class _AdminStatsModule {
|
|
|
1249
1250
|
AdminStatsModule = _ts_decorate12([
|
|
1250
1251
|
(0, import_common12.Module)({})
|
|
1251
1252
|
], AdminStatsModule);
|
|
1253
|
+
|
|
1254
|
+
// src/admin/admin-resources.module.ts
|
|
1255
|
+
var import_common13 = require("@nestjs/common");
|
|
1256
|
+
var import_class_validator = require("class-validator");
|
|
1257
|
+
function _ts_decorate13(decorators, target, key, desc) {
|
|
1258
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1259
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1260
|
+
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;
|
|
1261
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1262
|
+
}
|
|
1263
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
1264
|
+
function _ts_metadata10(k, v) {
|
|
1265
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
1266
|
+
}
|
|
1267
|
+
__name(_ts_metadata10, "_ts_metadata");
|
|
1268
|
+
function _ts_param10(paramIndex, decorator) {
|
|
1269
|
+
return function(target, key) {
|
|
1270
|
+
decorator(target, key, paramIndex);
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
__name(_ts_param10, "_ts_param");
|
|
1274
|
+
var ADMIN_RESOURCES_PORT_TOKEN = /* @__PURE__ */ Symbol.for("saas-platform/AdminResourcesPort");
|
|
1275
|
+
var SuspendTenantDto = class {
|
|
1276
|
+
static {
|
|
1277
|
+
__name(this, "SuspendTenantDto");
|
|
1278
|
+
}
|
|
1279
|
+
reason;
|
|
1280
|
+
};
|
|
1281
|
+
_ts_decorate13([
|
|
1282
|
+
(0, import_class_validator.IsOptional)(),
|
|
1283
|
+
(0, import_class_validator.IsString)(),
|
|
1284
|
+
(0, import_class_validator.MaxLength)(500),
|
|
1285
|
+
_ts_metadata10("design:type", String)
|
|
1286
|
+
], SuspendTenantDto.prototype, "reason", void 0);
|
|
1287
|
+
var AdminResourcesService = class {
|
|
1288
|
+
static {
|
|
1289
|
+
__name(this, "AdminResourcesService");
|
|
1290
|
+
}
|
|
1291
|
+
resources;
|
|
1292
|
+
audit;
|
|
1293
|
+
constructor(resources, audit) {
|
|
1294
|
+
this.resources = resources;
|
|
1295
|
+
this.audit = audit;
|
|
1296
|
+
}
|
|
1297
|
+
listTenants(filter) {
|
|
1298
|
+
return this.resources.listTenants(filter);
|
|
1299
|
+
}
|
|
1300
|
+
async getTenantDetail(slug) {
|
|
1301
|
+
const tenant = await this.resources.getTenantDetail(slug);
|
|
1302
|
+
if (!tenant) throw new import_common13.NotFoundException(`Tenant ${slug} not found`);
|
|
1303
|
+
return tenant;
|
|
1304
|
+
}
|
|
1305
|
+
listUsers(filter) {
|
|
1306
|
+
return this.resources.listUsers(filter);
|
|
1307
|
+
}
|
|
1308
|
+
listAudit(filter) {
|
|
1309
|
+
return this.resources.listAudit(filter);
|
|
1310
|
+
}
|
|
1311
|
+
listSubscriptions() {
|
|
1312
|
+
return this.resources.listSubscriptions();
|
|
1313
|
+
}
|
|
1314
|
+
suspendTenant(slug, reason, actor) {
|
|
1315
|
+
return this.setTenantActive(slug, false, "PAST_DUE", actor, {
|
|
1316
|
+
action: "TENANT_SUSPEND",
|
|
1317
|
+
reason: reason ?? ""
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
reactivateTenant(slug, actor) {
|
|
1321
|
+
return this.setTenantActive(slug, true, "ACTIVE", actor, {
|
|
1322
|
+
action: "TENANT_REACTIVATE",
|
|
1323
|
+
reason: ""
|
|
1324
|
+
});
|
|
1325
|
+
}
|
|
1326
|
+
async setTenantActive(slug, active, subscriptionStatus, actor, audit) {
|
|
1327
|
+
const result = await this.resources.setTenantActive(slug, active, subscriptionStatus);
|
|
1328
|
+
if (!result) throw new import_common13.NotFoundException(`Tenant ${slug} not found`);
|
|
1329
|
+
await this.audit.log({
|
|
1330
|
+
actor,
|
|
1331
|
+
entity: "Tenant",
|
|
1332
|
+
entityId: result.id,
|
|
1333
|
+
action: audit.action,
|
|
1334
|
+
changes: {
|
|
1335
|
+
slug,
|
|
1336
|
+
reason: audit.reason
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
return result;
|
|
1340
|
+
}
|
|
1341
|
+
};
|
|
1342
|
+
AdminResourcesService = _ts_decorate13([
|
|
1343
|
+
(0, import_common13.Injectable)(),
|
|
1344
|
+
_ts_param10(0, (0, import_common13.Inject)(ADMIN_RESOURCES_PORT_TOKEN)),
|
|
1345
|
+
_ts_param10(1, (0, import_common13.Inject)(AdminAuditService)),
|
|
1346
|
+
_ts_metadata10("design:type", Function),
|
|
1347
|
+
_ts_metadata10("design:paramtypes", [
|
|
1348
|
+
typeof AdminResourcesPort === "undefined" ? Object : AdminResourcesPort,
|
|
1349
|
+
typeof AdminAuditService === "undefined" ? Object : AdminAuditService
|
|
1350
|
+
])
|
|
1351
|
+
], AdminResourcesService);
|
|
1352
|
+
function actorFromRequest(request) {
|
|
1353
|
+
const userId = request.user?.id ?? request.user?.userId ?? "unknown";
|
|
1354
|
+
return {
|
|
1355
|
+
userId,
|
|
1356
|
+
email: request.user?.email ?? `${userId}@unknown`,
|
|
1357
|
+
source: "web",
|
|
1358
|
+
context: request.user?.sessionId ?? "unknown"
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
__name(actorFromRequest, "actorFromRequest");
|
|
1362
|
+
function buildAdminResourcesController(guards) {
|
|
1363
|
+
let GeneratedAdminResourcesController = class GeneratedAdminResourcesController {
|
|
1364
|
+
static {
|
|
1365
|
+
__name(this, "GeneratedAdminResourcesController");
|
|
1366
|
+
}
|
|
1367
|
+
resources;
|
|
1368
|
+
constructor(resources) {
|
|
1369
|
+
this.resources = resources;
|
|
1370
|
+
}
|
|
1371
|
+
listTenants(query) {
|
|
1372
|
+
return this.resources.listTenants(query);
|
|
1373
|
+
}
|
|
1374
|
+
getTenant(slug) {
|
|
1375
|
+
return this.resources.getTenantDetail(slug);
|
|
1376
|
+
}
|
|
1377
|
+
suspendTenant(request, slug, dto) {
|
|
1378
|
+
return this.resources.suspendTenant(slug, dto.reason, actorFromRequest(request));
|
|
1379
|
+
}
|
|
1380
|
+
reactivateTenant(request, slug) {
|
|
1381
|
+
return this.resources.reactivateTenant(slug, actorFromRequest(request));
|
|
1382
|
+
}
|
|
1383
|
+
listUsers(query) {
|
|
1384
|
+
return this.resources.listUsers(query);
|
|
1385
|
+
}
|
|
1386
|
+
listAudit(query) {
|
|
1387
|
+
return this.resources.listAudit({
|
|
1388
|
+
actor: query.actor,
|
|
1389
|
+
action: query.action,
|
|
1390
|
+
entity: query.entity,
|
|
1391
|
+
since: query.since,
|
|
1392
|
+
limit: query.limit ? Number.parseInt(query.limit, 10) : void 0
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
listSubscriptions() {
|
|
1396
|
+
return this.resources.listSubscriptions();
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
_ts_decorate13([
|
|
1400
|
+
(0, import_common13.Get)("tenants"),
|
|
1401
|
+
_ts_param10(0, (0, import_common13.Query)()),
|
|
1402
|
+
_ts_metadata10("design:type", Function),
|
|
1403
|
+
_ts_metadata10("design:paramtypes", [
|
|
1404
|
+
Object
|
|
1405
|
+
]),
|
|
1406
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1407
|
+
], GeneratedAdminResourcesController.prototype, "listTenants", null);
|
|
1408
|
+
_ts_decorate13([
|
|
1409
|
+
(0, import_common13.Get)("tenants/:slug"),
|
|
1410
|
+
_ts_param10(0, (0, import_common13.Param)("slug")),
|
|
1411
|
+
_ts_metadata10("design:type", Function),
|
|
1412
|
+
_ts_metadata10("design:paramtypes", [
|
|
1413
|
+
String
|
|
1414
|
+
]),
|
|
1415
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1416
|
+
], GeneratedAdminResourcesController.prototype, "getTenant", null);
|
|
1417
|
+
_ts_decorate13([
|
|
1418
|
+
(0, import_common13.Post)("tenants/:slug/suspend"),
|
|
1419
|
+
_ts_param10(0, (0, import_common13.Req)()),
|
|
1420
|
+
_ts_param10(1, (0, import_common13.Param)("slug")),
|
|
1421
|
+
_ts_param10(2, (0, import_common13.Body)()),
|
|
1422
|
+
_ts_metadata10("design:type", Function),
|
|
1423
|
+
_ts_metadata10("design:paramtypes", [
|
|
1424
|
+
typeof AdminRequest === "undefined" ? Object : AdminRequest,
|
|
1425
|
+
String,
|
|
1426
|
+
typeof SuspendTenantDto === "undefined" ? Object : SuspendTenantDto
|
|
1427
|
+
]),
|
|
1428
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1429
|
+
], GeneratedAdminResourcesController.prototype, "suspendTenant", null);
|
|
1430
|
+
_ts_decorate13([
|
|
1431
|
+
(0, import_common13.Post)("tenants/:slug/reactivate"),
|
|
1432
|
+
_ts_param10(0, (0, import_common13.Req)()),
|
|
1433
|
+
_ts_param10(1, (0, import_common13.Param)("slug")),
|
|
1434
|
+
_ts_metadata10("design:type", Function),
|
|
1435
|
+
_ts_metadata10("design:paramtypes", [
|
|
1436
|
+
typeof AdminRequest === "undefined" ? Object : AdminRequest,
|
|
1437
|
+
String
|
|
1438
|
+
]),
|
|
1439
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1440
|
+
], GeneratedAdminResourcesController.prototype, "reactivateTenant", null);
|
|
1441
|
+
_ts_decorate13([
|
|
1442
|
+
(0, import_common13.Get)("users"),
|
|
1443
|
+
_ts_param10(0, (0, import_common13.Query)()),
|
|
1444
|
+
_ts_metadata10("design:type", Function),
|
|
1445
|
+
_ts_metadata10("design:paramtypes", [
|
|
1446
|
+
Object
|
|
1447
|
+
]),
|
|
1448
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1449
|
+
], GeneratedAdminResourcesController.prototype, "listUsers", null);
|
|
1450
|
+
_ts_decorate13([
|
|
1451
|
+
(0, import_common13.Get)("audit"),
|
|
1452
|
+
_ts_param10(0, (0, import_common13.Query)()),
|
|
1453
|
+
_ts_metadata10("design:type", Function),
|
|
1454
|
+
_ts_metadata10("design:paramtypes", [
|
|
1455
|
+
Object
|
|
1456
|
+
]),
|
|
1457
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1458
|
+
], GeneratedAdminResourcesController.prototype, "listAudit", null);
|
|
1459
|
+
_ts_decorate13([
|
|
1460
|
+
(0, import_common13.Get)("subscriptions"),
|
|
1461
|
+
_ts_metadata10("design:type", Function),
|
|
1462
|
+
_ts_metadata10("design:paramtypes", []),
|
|
1463
|
+
_ts_metadata10("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1464
|
+
], GeneratedAdminResourcesController.prototype, "listSubscriptions", null);
|
|
1465
|
+
GeneratedAdminResourcesController = _ts_decorate13([
|
|
1466
|
+
(0, import_common13.Controller)("admin"),
|
|
1467
|
+
(0, import_common13.UseGuards)(...guards),
|
|
1468
|
+
_ts_param10(0, (0, import_common13.Inject)(AdminResourcesService)),
|
|
1469
|
+
_ts_metadata10("design:type", Function),
|
|
1470
|
+
_ts_metadata10("design:paramtypes", [
|
|
1471
|
+
typeof AdminResourcesService === "undefined" ? Object : AdminResourcesService
|
|
1472
|
+
])
|
|
1473
|
+
], GeneratedAdminResourcesController);
|
|
1474
|
+
return GeneratedAdminResourcesController;
|
|
1475
|
+
}
|
|
1476
|
+
__name(buildAdminResourcesController, "buildAdminResourcesController");
|
|
1477
|
+
var AdminResourcesModule = class _AdminResourcesModule {
|
|
1478
|
+
static {
|
|
1479
|
+
__name(this, "AdminResourcesModule");
|
|
1480
|
+
}
|
|
1481
|
+
static forRoot(options) {
|
|
1482
|
+
return {
|
|
1483
|
+
module: _AdminResourcesModule,
|
|
1484
|
+
global: options.global ?? false,
|
|
1485
|
+
imports: options.imports ?? [],
|
|
1486
|
+
controllers: [
|
|
1487
|
+
buildAdminResourcesController(options.guards)
|
|
1488
|
+
],
|
|
1489
|
+
providers: [
|
|
1490
|
+
asProvider(ADMIN_RESOURCES_PORT_TOKEN, options.resources),
|
|
1491
|
+
AdminResourcesService
|
|
1492
|
+
],
|
|
1493
|
+
exports: [
|
|
1494
|
+
ADMIN_RESOURCES_PORT_TOKEN,
|
|
1495
|
+
AdminResourcesService
|
|
1496
|
+
]
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
AdminResourcesModule = _ts_decorate13([
|
|
1501
|
+
(0, import_common13.Module)({})
|
|
1502
|
+
], AdminResourcesModule);
|
|
1252
1503
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1253
1504
|
0 && (module.exports = {
|
|
1254
1505
|
ADMIN_MANIFEST_CONFIG,
|
|
1506
|
+
ADMIN_RESOURCES_PORT_TOKEN,
|
|
1255
1507
|
ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
1256
1508
|
AUDIT_PORT_TOKEN,
|
|
1257
1509
|
AUDIT_STATS_PORT_TOKEN,
|
|
@@ -1261,6 +1513,8 @@ AdminStatsModule = _ts_decorate12([
|
|
|
1261
1513
|
AdminManifestService,
|
|
1262
1514
|
AdminModule,
|
|
1263
1515
|
AdminPublicBootController,
|
|
1516
|
+
AdminResourcesModule,
|
|
1517
|
+
AdminResourcesService,
|
|
1264
1518
|
AdminStatsController,
|
|
1265
1519
|
AdminStatsModule,
|
|
1266
1520
|
AdminStatsService,
|
|
@@ -1274,5 +1528,6 @@ AdminStatsModule = _ts_decorate12([
|
|
|
1274
1528
|
RLS_BYPASS_PORT_TOKEN,
|
|
1275
1529
|
RequireMfa,
|
|
1276
1530
|
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
1277
|
-
SuperAdminGuard
|
|
1531
|
+
SuperAdminGuard,
|
|
1532
|
+
SuspendTenantDto
|
|
1278
1533
|
});
|
package/dist/admin/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CanActivate, ExecutionContext, NestInterceptor, CallHandler,
|
|
1
|
+
import { CanActivate, ExecutionContext, NestInterceptor, CallHandler, Type, DynamicModule, ForwardReference, FactoryProvider, Provider } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
3
|
import { MfaPort, RlsBypassPort, AuditPort, PublicBootResponse, ManifestContribution, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/types';
|
|
4
4
|
export { A as AdminAuditService } from '../admin-audit.service-9IqXMlZm.cjs';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { P as ProviderSpec } from '../di-CcNeq9v-.cjs';
|
|
7
|
-
import { A as AdminManifestConfig } from '../admin-
|
|
8
|
-
export { a as ADMIN_MANIFEST_CONFIG } from '../admin-
|
|
9
|
-
export { A as AdminManifestService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN } from '../admin-manifest.service-
|
|
7
|
+
import { A as AdminManifestConfig } from '../admin-resources.module-BybEjZs-.cjs';
|
|
8
|
+
export { a as ADMIN_MANIFEST_CONFIG, b as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, S as SuspendTenantDto } from '../admin-resources.module-BybEjZs-.cjs';
|
|
9
|
+
export { A as AdminManifestService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN } from '../admin-manifest.service-StAQe6QO.cjs';
|
|
10
10
|
|
|
11
11
|
declare const MFA_PORT_TOKEN: unique symbol;
|
|
12
12
|
declare const AUDIT_PORT_TOKEN: unique symbol;
|
|
@@ -75,6 +75,8 @@ interface AdminModuleOptions {
|
|
|
75
75
|
mfaPort: ProviderSpec<MfaPort>;
|
|
76
76
|
auditPort: ProviderSpec<AuditPort>;
|
|
77
77
|
rlsBypassPort: ProviderSpec<RlsBypassPort>;
|
|
78
|
+
/** Modules required by adapter factory `inject` tokens. */
|
|
79
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
78
80
|
/** Register the module globally — default `false`. */
|
|
79
81
|
global?: boolean;
|
|
80
82
|
}
|
package/dist/admin/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CanActivate, ExecutionContext, NestInterceptor, CallHandler,
|
|
1
|
+
import { CanActivate, ExecutionContext, NestInterceptor, CallHandler, Type, DynamicModule, ForwardReference, FactoryProvider, Provider } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
3
|
import { MfaPort, RlsBypassPort, AuditPort, PublicBootResponse, ManifestContribution, SubscriptionStatsPort, PromoCodeStatsPort, AuditStatsPort, SubscriptionStatsSnapshot, PromoCodeStatsSnapshot, AuditStatsSnapshot } from '@saasicat/types';
|
|
4
4
|
export { A as AdminAuditService } from '../admin-audit.service-9IqXMlZm.js';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import { P as ProviderSpec } from '../di-CcNeq9v-.js';
|
|
7
|
-
import { A as AdminManifestConfig } from '../admin-
|
|
8
|
-
export { a as ADMIN_MANIFEST_CONFIG } from '../admin-
|
|
9
|
-
export { A as AdminManifestService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN } from '../admin-manifest.service-
|
|
7
|
+
import { A as AdminManifestConfig } from '../admin-resources.module-CUCLlUAi.js';
|
|
8
|
+
export { a as ADMIN_MANIFEST_CONFIG, b as ADMIN_RESOURCES_PORT_TOKEN, c as AdminResourcesModule, d as AdminResourcesModuleOptions, e as AdminResourcesService, S as SuspendTenantDto } from '../admin-resources.module-CUCLlUAi.js';
|
|
9
|
+
export { A as AdminManifestService, P as PLATFORM_CORE_CONTRIBUTION_TOKEN } from '../admin-manifest.service-BMeSLRW4.js';
|
|
10
10
|
|
|
11
11
|
declare const MFA_PORT_TOKEN: unique symbol;
|
|
12
12
|
declare const AUDIT_PORT_TOKEN: unique symbol;
|
|
@@ -75,6 +75,8 @@ interface AdminModuleOptions {
|
|
|
75
75
|
mfaPort: ProviderSpec<MfaPort>;
|
|
76
76
|
auditPort: ProviderSpec<AuditPort>;
|
|
77
77
|
rlsBypassPort: ProviderSpec<RlsBypassPort>;
|
|
78
|
+
/** Modules required by adapter factory `inject` tokens. */
|
|
79
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
78
80
|
/** Register the module globally — default `false`. */
|
|
79
81
|
global?: boolean;
|
|
80
82
|
}
|
package/dist/admin/index.js
CHANGED
|
@@ -6,22 +6,26 @@ import {
|
|
|
6
6
|
AdminStatsService,
|
|
7
7
|
PROMO_CODE_STATS_PORT_TOKEN,
|
|
8
8
|
SUBSCRIPTION_STATS_PORT_TOKEN
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-WGVTXSYW.js";
|
|
10
10
|
import {
|
|
11
11
|
ADMIN_MANIFEST_CONFIG,
|
|
12
|
+
ADMIN_RESOURCES_PORT_TOKEN,
|
|
12
13
|
AdminBypassRlsInterceptor,
|
|
13
14
|
AdminManifestModule,
|
|
14
15
|
AdminManifestService,
|
|
15
16
|
AdminModule,
|
|
16
17
|
AdminPublicBootController,
|
|
18
|
+
AdminResourcesModule,
|
|
19
|
+
AdminResourcesService,
|
|
17
20
|
MfaGuard,
|
|
18
21
|
MfaService,
|
|
19
22
|
PLATFORM_CORE_CONTRIBUTION_TOKEN,
|
|
20
23
|
PLATFORM_CORE_MANIFEST_CONTRIBUTION,
|
|
21
24
|
REQUIRE_MFA_KEY,
|
|
22
25
|
RequireMfa,
|
|
23
|
-
SuperAdminGuard
|
|
24
|
-
|
|
26
|
+
SuperAdminGuard,
|
|
27
|
+
SuspendTenantDto
|
|
28
|
+
} from "../chunk-3M6VLT5N.js";
|
|
25
29
|
import {
|
|
26
30
|
AUDIT_PORT_TOKEN,
|
|
27
31
|
AdminAuditService,
|
|
@@ -32,6 +36,7 @@ import "../chunk-SABTXESR.js";
|
|
|
32
36
|
import "../chunk-SHUYVCID.js";
|
|
33
37
|
export {
|
|
34
38
|
ADMIN_MANIFEST_CONFIG,
|
|
39
|
+
ADMIN_RESOURCES_PORT_TOKEN,
|
|
35
40
|
ADMIN_STATS_AUDIT_WINDOW_DAYS_TOKEN,
|
|
36
41
|
AUDIT_PORT_TOKEN,
|
|
37
42
|
AUDIT_STATS_PORT_TOKEN,
|
|
@@ -41,6 +46,8 @@ export {
|
|
|
41
46
|
AdminManifestService,
|
|
42
47
|
AdminModule,
|
|
43
48
|
AdminPublicBootController,
|
|
49
|
+
AdminResourcesModule,
|
|
50
|
+
AdminResourcesService,
|
|
44
51
|
AdminStatsController,
|
|
45
52
|
AdminStatsModule,
|
|
46
53
|
AdminStatsService,
|
|
@@ -54,5 +61,6 @@ export {
|
|
|
54
61
|
RLS_BYPASS_PORT_TOKEN,
|
|
55
62
|
RequireMfa,
|
|
56
63
|
SUBSCRIPTION_STATS_PORT_TOKEN,
|
|
57
|
-
SuperAdminGuard
|
|
64
|
+
SuperAdminGuard,
|
|
65
|
+
SuspendTenantDto
|
|
58
66
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ManifestContribution, AdminManifest } from '@saasicat/types';
|
|
2
|
-
import { A as AdminManifestConfig } from './admin-
|
|
2
|
+
import { A as AdminManifestConfig } from './admin-resources.module-CUCLlUAi.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DI token for the platform core contribution. When `AdminManifestModule` is
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ManifestContribution, AdminManifest } from '@saasicat/types';
|
|
2
|
-
import { A as AdminManifestConfig } from './admin-
|
|
2
|
+
import { A as AdminManifestConfig } from './admin-resources.module-BybEjZs-.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* DI token for the platform core contribution. When `AdminManifestModule` is
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AdminManifest, AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, AdminActor, AdminTenantStateResult } from '@saasicat/types';
|
|
2
|
+
import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
|
|
3
|
+
import { P as ProviderSpec } from './di-CcNeq9v-.cjs';
|
|
4
|
+
import { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.cjs';
|
|
5
|
+
|
|
6
|
+
declare const ADMIN_MANIFEST_CONFIG: unique symbol;
|
|
7
|
+
interface AdminManifestConfig {
|
|
8
|
+
project: AdminManifest['project'];
|
|
9
|
+
build: Omit<AdminManifest['build'], 'manifestHash'>;
|
|
10
|
+
planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const ADMIN_RESOURCES_PORT_TOKEN: unique symbol;
|
|
14
|
+
declare class SuspendTenantDto {
|
|
15
|
+
reason?: string;
|
|
16
|
+
}
|
|
17
|
+
declare class AdminResourcesService {
|
|
18
|
+
private readonly resources;
|
|
19
|
+
private readonly audit;
|
|
20
|
+
constructor(resources: AdminResourcesPort, audit: AdminAuditService);
|
|
21
|
+
listTenants(filter: AdminTenantListFilter): Promise<AdminTenantListRow[]>;
|
|
22
|
+
getTenantDetail(slug: string): Promise<AdminTenantDetail>;
|
|
23
|
+
listUsers(filter: AdminUserListFilter): Promise<AdminUserListRow[]>;
|
|
24
|
+
listAudit(filter: AdminAuditListFilter): Promise<AuditEntry[]>;
|
|
25
|
+
listSubscriptions(): Promise<AdminSubscriptionListRow[]>;
|
|
26
|
+
suspendTenant(slug: string, reason: string | undefined, actor: AdminActor): Promise<AdminTenantStateResult>;
|
|
27
|
+
reactivateTenant(slug: string, actor: AdminActor): Promise<AdminTenantStateResult>;
|
|
28
|
+
private setTenantActive;
|
|
29
|
+
}
|
|
30
|
+
interface AdminResourcesModuleOptions {
|
|
31
|
+
resources: ProviderSpec<AdminResourcesPort>;
|
|
32
|
+
guards: Array<Type<CanActivate>>;
|
|
33
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
34
|
+
global?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare class AdminResourcesModule {
|
|
37
|
+
static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { type AdminManifestConfig as A, SuspendTenantDto as S, ADMIN_MANIFEST_CONFIG as a, ADMIN_RESOURCES_PORT_TOKEN as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AdminManifest, AdminResourcesPort, AdminTenantListFilter, AdminTenantListRow, AdminTenantDetail, AdminUserListFilter, AdminUserListRow, AdminAuditListFilter, AuditEntry, AdminSubscriptionListRow, AdminActor, AdminTenantStateResult } from '@saasicat/types';
|
|
2
|
+
import { Type, CanActivate, DynamicModule, ForwardReference } from '@nestjs/common';
|
|
3
|
+
import { P as ProviderSpec } from './di-CcNeq9v-.js';
|
|
4
|
+
import { A as AdminAuditService } from './admin-audit.service-9IqXMlZm.js';
|
|
5
|
+
|
|
6
|
+
declare const ADMIN_MANIFEST_CONFIG: unique symbol;
|
|
7
|
+
interface AdminManifestConfig {
|
|
8
|
+
project: AdminManifest['project'];
|
|
9
|
+
build: Omit<AdminManifest['build'], 'manifestHash'>;
|
|
10
|
+
planCatalogSnapshot: AdminManifest['planCatalogSnapshot'];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const ADMIN_RESOURCES_PORT_TOKEN: unique symbol;
|
|
14
|
+
declare class SuspendTenantDto {
|
|
15
|
+
reason?: string;
|
|
16
|
+
}
|
|
17
|
+
declare class AdminResourcesService {
|
|
18
|
+
private readonly resources;
|
|
19
|
+
private readonly audit;
|
|
20
|
+
constructor(resources: AdminResourcesPort, audit: AdminAuditService);
|
|
21
|
+
listTenants(filter: AdminTenantListFilter): Promise<AdminTenantListRow[]>;
|
|
22
|
+
getTenantDetail(slug: string): Promise<AdminTenantDetail>;
|
|
23
|
+
listUsers(filter: AdminUserListFilter): Promise<AdminUserListRow[]>;
|
|
24
|
+
listAudit(filter: AdminAuditListFilter): Promise<AuditEntry[]>;
|
|
25
|
+
listSubscriptions(): Promise<AdminSubscriptionListRow[]>;
|
|
26
|
+
suspendTenant(slug: string, reason: string | undefined, actor: AdminActor): Promise<AdminTenantStateResult>;
|
|
27
|
+
reactivateTenant(slug: string, actor: AdminActor): Promise<AdminTenantStateResult>;
|
|
28
|
+
private setTenantActive;
|
|
29
|
+
}
|
|
30
|
+
interface AdminResourcesModuleOptions {
|
|
31
|
+
resources: ProviderSpec<AdminResourcesPort>;
|
|
32
|
+
guards: Array<Type<CanActivate>>;
|
|
33
|
+
imports?: Array<Type<unknown> | DynamicModule | Promise<DynamicModule> | ForwardReference>;
|
|
34
|
+
global?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare class AdminResourcesModule {
|
|
37
|
+
static forRoot(options: AdminResourcesModuleOptions): DynamicModule;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { type AdminManifestConfig as A, SuspendTenantDto as S, ADMIN_MANIFEST_CONFIG as a, ADMIN_RESOURCES_PORT_TOKEN as b, AdminResourcesModule as c, type AdminResourcesModuleOptions as d, AdminResourcesService as e };
|
package/dist/billing/index.cjs
CHANGED
|
@@ -1970,6 +1970,7 @@ var EntitlementModule = class _EntitlementModule {
|
|
|
1970
1970
|
return {
|
|
1971
1971
|
module: _EntitlementModule,
|
|
1972
1972
|
global: options.global ?? false,
|
|
1973
|
+
imports: options.imports ?? [],
|
|
1973
1974
|
providers,
|
|
1974
1975
|
exports: [
|
|
1975
1976
|
EntitlementService,
|
|
@@ -4340,7 +4341,8 @@ var TenantBillingModule = class _TenantBillingModule {
|
|
|
4340
4341
|
] : [],
|
|
4341
4342
|
...hasContractFreeze ? [
|
|
4342
4343
|
CONTRACT_FREEZE_PORT_TOKEN
|
|
4343
|
-
] : []
|
|
4344
|
+
] : [],
|
|
4345
|
+
...options.extraExports ?? []
|
|
4344
4346
|
]
|
|
4345
4347
|
};
|
|
4346
4348
|
}
|