@thescaffold/ntx-apps-bridge 0.0.10
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/README.md +1 -0
- package/api/attribute/attribute.controller.d.ts +24 -0
- package/api/attribute/attribute.controller.js +43 -0
- package/api/attribute/attribute.controller.js.map +1 -0
- package/api/attribute/attribute.module.d.ts +2 -0
- package/api/attribute/attribute.module.js +27 -0
- package/api/attribute/attribute.module.js.map +1 -0
- package/api/attribute/attribute.service.d.ts +21 -0
- package/api/attribute/attribute.service.js +85 -0
- package/api/attribute/attribute.service.js.map +1 -0
- package/api/attribute/dto/create-attribute.dto.d.ts +8 -0
- package/api/attribute/dto/create-attribute.dto.js +48 -0
- package/api/attribute/dto/create-attribute.dto.js.map +1 -0
- package/api/attribute/dto/update-attribute.dto.d.ts +8 -0
- package/api/attribute/dto/update-attribute.dto.js +49 -0
- package/api/attribute/dto/update-attribute.dto.js.map +1 -0
- package/api/attribute/entities/attribute.entity.d.ts +12 -0
- package/api/attribute/entities/attribute.entity.js +62 -0
- package/api/attribute/entities/attribute.entity.js.map +1 -0
- package/api/attribute/index.d.ts +6 -0
- package/api/attribute/index.js +23 -0
- package/api/attribute/index.js.map +1 -0
- package/api/datacenter/datacenter.controller.d.ts +68 -0
- package/api/datacenter/datacenter.controller.js +146 -0
- package/api/datacenter/datacenter.controller.js.map +1 -0
- package/api/datacenter/datacenter.module.d.ts +2 -0
- package/api/datacenter/datacenter.module.js +40 -0
- package/api/datacenter/datacenter.module.js.map +1 -0
- package/api/datacenter/datacenter.service.d.ts +17 -0
- package/api/datacenter/datacenter.service.js +54 -0
- package/api/datacenter/datacenter.service.js.map +1 -0
- package/api/datacenter/dto/create-datacenter.dto.d.ts +33 -0
- package/api/datacenter/dto/create-datacenter.dto.js +160 -0
- package/api/datacenter/dto/create-datacenter.dto.js.map +1 -0
- package/api/datacenter/dto/update-datacenter.dto.d.ts +3 -0
- package/api/datacenter/dto/update-datacenter.dto.js +8 -0
- package/api/datacenter/dto/update-datacenter.dto.js.map +1 -0
- package/api/datacenter/entities/datacenter.entity.d.ts +23 -0
- package/api/datacenter/entities/datacenter.entity.js +96 -0
- package/api/datacenter/entities/datacenter.entity.js.map +1 -0
- package/api/datacenter/index.d.ts +6 -0
- package/api/datacenter/index.js +23 -0
- package/api/datacenter/index.js.map +1 -0
- package/api/license/dto/create-license.dto.d.ts +8 -0
- package/api/license/dto/create-license.dto.js +49 -0
- package/api/license/dto/create-license.dto.js.map +1 -0
- package/api/license/dto/update-license.dto.d.ts +8 -0
- package/api/license/dto/update-license.dto.js +49 -0
- package/api/license/dto/update-license.dto.js.map +1 -0
- package/api/license/entities/license.entity.d.ts +15 -0
- package/api/license/entities/license.entity.js +83 -0
- package/api/license/entities/license.entity.js.map +1 -0
- package/api/license/index.d.ts +6 -0
- package/api/license/index.js +23 -0
- package/api/license/index.js.map +1 -0
- package/api/license/license.controller.d.ts +20 -0
- package/api/license/license.controller.js +41 -0
- package/api/license/license.controller.js.map +1 -0
- package/api/license/license.module.d.ts +2 -0
- package/api/license/license.module.js +27 -0
- package/api/license/license.module.js.map +1 -0
- package/api/license/license.service.d.ts +17 -0
- package/api/license/license.service.js +48 -0
- package/api/license/license.service.js.map +1 -0
- package/api/license-type/dto/create-license-type.dto.d.ts +14 -0
- package/api/license-type/dto/create-license-type.dto.js +87 -0
- package/api/license-type/dto/create-license-type.dto.js.map +1 -0
- package/api/license-type/dto/update-license-type.dto.d.ts +14 -0
- package/api/license-type/dto/update-license-type.dto.js +90 -0
- package/api/license-type/dto/update-license-type.dto.js.map +1 -0
- package/api/license-type/entities/license-type.entity.d.ts +17 -0
- package/api/license-type/entities/license-type.entity.js +130 -0
- package/api/license-type/entities/license-type.entity.js.map +1 -0
- package/api/license-type/index.d.ts +6 -0
- package/api/license-type/index.js +23 -0
- package/api/license-type/index.js.map +1 -0
- package/api/license-type/license-type.controller.d.ts +28 -0
- package/api/license-type/license-type.controller.js +83 -0
- package/api/license-type/license-type.controller.js.map +1 -0
- package/api/license-type/license-type.module.d.ts +2 -0
- package/api/license-type/license-type.module.js +30 -0
- package/api/license-type/license-type.module.js.map +1 -0
- package/api/license-type/license-type.service.d.ts +13 -0
- package/api/license-type/license-type.service.js +46 -0
- package/api/license-type/license-type.service.js.map +1 -0
- package/api/plan/dto/create-plan.dto.d.ts +8 -0
- package/api/plan/dto/create-plan.dto.js +49 -0
- package/api/plan/dto/create-plan.dto.js.map +1 -0
- package/api/plan/dto/update-plan.dto.d.ts +8 -0
- package/api/plan/dto/update-plan.dto.js +49 -0
- package/api/plan/dto/update-plan.dto.js.map +1 -0
- package/api/plan/entities/plan.entity.d.ts +11 -0
- package/api/plan/entities/plan.entity.js +57 -0
- package/api/plan/entities/plan.entity.js.map +1 -0
- package/api/plan/index.d.ts +6 -0
- package/api/plan/index.js +23 -0
- package/api/plan/index.js.map +1 -0
- package/api/plan/plan.controller.d.ts +20 -0
- package/api/plan/plan.controller.js +41 -0
- package/api/plan/plan.controller.js.map +1 -0
- package/api/plan/plan.module.d.ts +2 -0
- package/api/plan/plan.module.js +27 -0
- package/api/plan/plan.module.js.map +1 -0
- package/api/plan/plan.service.d.ts +17 -0
- package/api/plan/plan.service.js +50 -0
- package/api/plan/plan.service.js.map +1 -0
- package/api/plan-type/dto/create-plan-type.dto.d.ts +15 -0
- package/api/plan-type/dto/create-plan-type.dto.js +92 -0
- package/api/plan-type/dto/create-plan-type.dto.js.map +1 -0
- package/api/plan-type/dto/update-plan-type.dto.d.ts +15 -0
- package/api/plan-type/dto/update-plan-type.dto.js +96 -0
- package/api/plan-type/dto/update-plan-type.dto.js.map +1 -0
- package/api/plan-type/entities/plan-type.entity.d.ts +20 -0
- package/api/plan-type/entities/plan-type.entity.js +140 -0
- package/api/plan-type/entities/plan-type.entity.js.map +1 -0
- package/api/plan-type/index.d.ts +6 -0
- package/api/plan-type/index.js +23 -0
- package/api/plan-type/index.js.map +1 -0
- package/api/plan-type/plan-type.controller.d.ts +25 -0
- package/api/plan-type/plan-type.controller.js +49 -0
- package/api/plan-type/plan-type.controller.js.map +1 -0
- package/api/plan-type/plan-type.module.d.ts +2 -0
- package/api/plan-type/plan-type.module.js +30 -0
- package/api/plan-type/plan-type.module.js.map +1 -0
- package/api/plan-type/plan-type.service.d.ts +17 -0
- package/api/plan-type/plan-type.service.js +48 -0
- package/api/plan-type/plan-type.service.js.map +1 -0
- package/api/preference/dto/create-preference.dto.d.ts +8 -0
- package/api/preference/dto/create-preference.dto.js +48 -0
- package/api/preference/dto/create-preference.dto.js.map +1 -0
- package/api/preference/dto/update-preference.dto.d.ts +8 -0
- package/api/preference/dto/update-preference.dto.js +49 -0
- package/api/preference/dto/update-preference.dto.js.map +1 -0
- package/api/preference/entities/preference.entity.d.ts +12 -0
- package/api/preference/entities/preference.entity.js +62 -0
- package/api/preference/entities/preference.entity.js.map +1 -0
- package/api/preference/index.d.ts +6 -0
- package/api/preference/index.js +23 -0
- package/api/preference/index.js.map +1 -0
- package/api/preference/preference.controller.d.ts +24 -0
- package/api/preference/preference.controller.js +43 -0
- package/api/preference/preference.controller.js.map +1 -0
- package/api/preference/preference.module.d.ts +2 -0
- package/api/preference/preference.module.js +27 -0
- package/api/preference/preference.module.js.map +1 -0
- package/api/preference/preference.service.d.ts +21 -0
- package/api/preference/preference.service.js +83 -0
- package/api/preference/preference.service.js.map +1 -0
- package/api/server/dto/create-server.dto.d.ts +7 -0
- package/api/server/dto/create-server.dto.js +45 -0
- package/api/server/dto/create-server.dto.js.map +1 -0
- package/api/server/dto/update-server.dto.d.ts +7 -0
- package/api/server/dto/update-server.dto.js +48 -0
- package/api/server/dto/update-server.dto.js.map +1 -0
- package/api/server/entities/server.entity.d.ts +10 -0
- package/api/server/entities/server.entity.js +55 -0
- package/api/server/entities/server.entity.js.map +1 -0
- package/api/server/index.d.ts +5 -0
- package/api/server/index.js +22 -0
- package/api/server/index.js.map +1 -0
- package/api/server/server.controller.d.ts +23 -0
- package/api/server/server.controller.js +41 -0
- package/api/server/server.controller.js.map +1 -0
- package/api/server/server.module.d.ts +2 -0
- package/api/server/server.module.js +30 -0
- package/api/server/server.module.js.map +1 -0
- package/api/server/server.service.d.ts +17 -0
- package/api/server/server.service.js +48 -0
- package/api/server/server.service.js.map +1 -0
- package/api/user/dto/create-user.dto.d.ts +7 -0
- package/api/user/dto/create-user.dto.js +40 -0
- package/api/user/dto/create-user.dto.js.map +1 -0
- package/api/user/dto/update-user.dto.d.ts +7 -0
- package/api/user/dto/update-user.dto.js +40 -0
- package/api/user/dto/update-user.dto.js.map +1 -0
- package/api/user/entities/user.entity.d.ts +16 -0
- package/api/user/entities/user.entity.js +81 -0
- package/api/user/entities/user.entity.js.map +1 -0
- package/api/user/index.d.ts +5 -0
- package/api/user/index.js +22 -0
- package/api/user/index.js.map +1 -0
- package/api/user/user.controller.d.ts +22 -0
- package/api/user/user.controller.js +40 -0
- package/api/user/user.controller.js.map +1 -0
- package/api/user/user.module.d.ts +2 -0
- package/api/user/user.module.js +27 -0
- package/api/user/user.module.js.map +1 -0
- package/api/user/user.service.d.ts +17 -0
- package/api/user/user.service.js +48 -0
- package/api/user/user.service.js.map +1 -0
- package/api/webhook/dto/create-webhook.dto.d.ts +7 -0
- package/api/webhook/dto/create-webhook.dto.js +45 -0
- package/api/webhook/dto/create-webhook.dto.js.map +1 -0
- package/api/webhook/dto/update-webhook.dto.d.ts +7 -0
- package/api/webhook/dto/update-webhook.dto.js +48 -0
- package/api/webhook/dto/update-webhook.dto.js.map +1 -0
- package/api/webhook/entities/webhook.entity.d.ts +12 -0
- package/api/webhook/entities/webhook.entity.js +59 -0
- package/api/webhook/entities/webhook.entity.js.map +1 -0
- package/api/webhook/index.d.ts +6 -0
- package/api/webhook/index.js +23 -0
- package/api/webhook/index.js.map +1 -0
- package/api/webhook/webhook.controller.d.ts +24 -0
- package/api/webhook/webhook.controller.js +43 -0
- package/api/webhook/webhook.controller.js.map +1 -0
- package/api/webhook/webhook.module.d.ts +2 -0
- package/api/webhook/webhook.module.js +30 -0
- package/api/webhook/webhook.module.js.map +1 -0
- package/api/webhook/webhook.service.d.ts +17 -0
- package/api/webhook/webhook.service.js +48 -0
- package/api/webhook/webhook.service.js.map +1 -0
- package/api/webhook-log/dto/create-webhook-log.dto.d.ts +9 -0
- package/api/webhook-log/dto/create-webhook-log.dto.js +56 -0
- package/api/webhook-log/dto/create-webhook-log.dto.js.map +1 -0
- package/api/webhook-log/dto/update-webhook-log.dto.d.ts +9 -0
- package/api/webhook-log/dto/update-webhook-log.dto.js +60 -0
- package/api/webhook-log/dto/update-webhook-log.dto.js.map +1 -0
- package/api/webhook-log/entities/webhook-log.entity.d.ts +11 -0
- package/api/webhook-log/entities/webhook-log.entity.js +57 -0
- package/api/webhook-log/entities/webhook-log.entity.js.map +1 -0
- package/api/webhook-log/index.d.ts +6 -0
- package/api/webhook-log/index.js +23 -0
- package/api/webhook-log/index.js.map +1 -0
- package/api/webhook-log/webhook-log.controller.d.ts +19 -0
- package/api/webhook-log/webhook-log.controller.js +40 -0
- package/api/webhook-log/webhook-log.controller.js.map +1 -0
- package/api/webhook-log/webhook-log.module.d.ts +2 -0
- package/api/webhook-log/webhook-log.module.js +27 -0
- package/api/webhook-log/webhook-log.module.js.map +1 -0
- package/api/webhook-log/webhook-log.service.d.ts +17 -0
- package/api/webhook-log/webhook-log.service.js +48 -0
- package/api/webhook-log/webhook-log.service.js.map +1 -0
- package/app.config.d.ts +45 -0
- package/app.config.js +70 -0
- package/app.config.js.map +1 -0
- package/app.controller.d.ts +31 -0
- package/app.controller.js +128 -0
- package/app.controller.js.map +1 -0
- package/app.dto.d.ts +0 -0
- package/app.dto.js +1 -0
- package/app.dto.js.map +1 -0
- package/app.module.d.ts +2 -0
- package/app.module.js +96 -0
- package/app.module.js.map +1 -0
- package/app.service.d.ts +3 -0
- package/app.service.js +20 -0
- package/app.service.js.map +1 -0
- package/index.d.ts +29 -0
- package/index.js +68 -0
- package/index.js.map +1 -0
- package/migrations/1760356231511-BridgeAttribute.d.ts +5 -0
- package/migrations/1760356231511-BridgeAttribute.js +33 -0
- package/migrations/1760356231511-BridgeAttribute.js.map +1 -0
- package/migrations/1760356231581-BridgeDatacenter.d.ts +5 -0
- package/migrations/1760356231581-BridgeDatacenter.js +36 -0
- package/migrations/1760356231581-BridgeDatacenter.js.map +1 -0
- package/migrations/1760356231653-BridgeLicense.d.ts +5 -0
- package/migrations/1760356231653-BridgeLicense.js +37 -0
- package/migrations/1760356231653-BridgeLicense.js.map +1 -0
- package/migrations/1760356231723-BridgeLicenseType.d.ts +5 -0
- package/migrations/1760356231723-BridgeLicenseType.js +44 -0
- package/migrations/1760356231723-BridgeLicenseType.js.map +1 -0
- package/migrations/1760356231827-BridgePlan.d.ts +5 -0
- package/migrations/1760356231827-BridgePlan.js +30 -0
- package/migrations/1760356231827-BridgePlan.js.map +1 -0
- package/migrations/1760356231972-BridgePlanType.d.ts +5 -0
- package/migrations/1760356231972-BridgePlanType.js +47 -0
- package/migrations/1760356231972-BridgePlanType.js.map +1 -0
- package/migrations/1760356232047-BridgePreference.d.ts +5 -0
- package/migrations/1760356232047-BridgePreference.js +33 -0
- package/migrations/1760356232047-BridgePreference.js.map +1 -0
- package/migrations/1760356232120-BridgeServer.d.ts +5 -0
- package/migrations/1760356232120-BridgeServer.js +33 -0
- package/migrations/1760356232120-BridgeServer.js.map +1 -0
- package/migrations/1760356232195-BridgeUser.d.ts +5 -0
- package/migrations/1760356232195-BridgeUser.js +34 -0
- package/migrations/1760356232195-BridgeUser.js.map +1 -0
- package/migrations/1760356232265-BridgeWebhook.d.ts +5 -0
- package/migrations/1760356232265-BridgeWebhook.js +32 -0
- package/migrations/1760356232265-BridgeWebhook.js.map +1 -0
- package/migrations/1760356232333-BridgeWebhookLog.d.ts +5 -0
- package/migrations/1760356232333-BridgeWebhookLog.js +29 -0
- package/migrations/1760356232333-BridgeWebhookLog.js.map +1 -0
- package/migrations/1760357588527-BridgeLicenseTypeData.d.ts +5 -0
- package/migrations/1760357588527-BridgeLicenseTypeData.js +262 -0
- package/migrations/1760357588527-BridgeLicenseTypeData.js.map +1 -0
- package/migrations/index.d.ts +2 -0
- package/migrations/index.js +30 -0
- package/migrations/index.js.map +1 -0
- package/package.json +18 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DatacenterController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
15
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
16
|
+
const app_config_1 = require("../../app.config");
|
|
17
|
+
const license_1 = require("../license");
|
|
18
|
+
const license_type_1 = require("../license-type");
|
|
19
|
+
const plan_type_1 = require("../plan-type");
|
|
20
|
+
const preference_1 = require("../preference");
|
|
21
|
+
const webhook_1 = require("../webhook");
|
|
22
|
+
const datacenter_service_1 = require("./datacenter.service");
|
|
23
|
+
const create_datacenter_dto_1 = require("./dto/create-datacenter.dto");
|
|
24
|
+
const update_datacenter_dto_1 = require("./dto/update-datacenter.dto");
|
|
25
|
+
const datacenter_entity_1 = require("./entities/datacenter.entity");
|
|
26
|
+
let DatacenterController = class DatacenterController extends (0, ntx_core_1.CrudControllerFactory)(create_datacenter_dto_1.CreateDatacenterDto, update_datacenter_dto_1.UpdateDatacenterDto, datacenter_entity_1.Datacenter) {
|
|
27
|
+
constructor(datacenterService, languageService, mediaService, configService, markerService, licenseService, licenseTypeService, preferenceService, planTypeService, webhookService) {
|
|
28
|
+
super();
|
|
29
|
+
this.datacenterService = datacenterService;
|
|
30
|
+
this.languageService = languageService;
|
|
31
|
+
this.mediaService = mediaService;
|
|
32
|
+
this.configService = configService;
|
|
33
|
+
this.markerService = markerService;
|
|
34
|
+
this.licenseService = licenseService;
|
|
35
|
+
this.licenseTypeService = licenseTypeService;
|
|
36
|
+
this.preferenceService = preferenceService;
|
|
37
|
+
this.planTypeService = planTypeService;
|
|
38
|
+
this.webhookService = webhookService;
|
|
39
|
+
this.name = 'datacenter';
|
|
40
|
+
this.searchable = ['name', 'desc'];
|
|
41
|
+
this.service = this.datacenterService;
|
|
42
|
+
this.unique = ({ workspaceId, name }) => [
|
|
43
|
+
{ workspaceId, name },
|
|
44
|
+
];
|
|
45
|
+
this.morphRequest = (entity) => entity;
|
|
46
|
+
this.morphs = {
|
|
47
|
+
[ntx_core_1.CrudActionType.beforeCreate]: async (payload, context) => {
|
|
48
|
+
const { preference } = context;
|
|
49
|
+
const { user, client, workspace } = context;
|
|
50
|
+
const { name, desc, licenseType, preferences, planTypes, webhooks, amount, } = payload;
|
|
51
|
+
return {
|
|
52
|
+
userId: user.id,
|
|
53
|
+
clientId: client.id,
|
|
54
|
+
workspaceId: workspace.id,
|
|
55
|
+
name,
|
|
56
|
+
desc,
|
|
57
|
+
meta: {
|
|
58
|
+
licenseType,
|
|
59
|
+
preferences,
|
|
60
|
+
planTypes,
|
|
61
|
+
webhooks,
|
|
62
|
+
amount,
|
|
63
|
+
},
|
|
64
|
+
status: app_config_1.DatacenterStatusType.Pending,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
[ntx_core_1.CrudActionType.beforeUpdate]: async (payload, context) => {
|
|
68
|
+
const { preference } = context;
|
|
69
|
+
const { user, client, workspace } = context;
|
|
70
|
+
const { name, desc, licenseType, preferences, planTypes, webhooks, amount, } = payload;
|
|
71
|
+
return {
|
|
72
|
+
name,
|
|
73
|
+
desc,
|
|
74
|
+
meta: {
|
|
75
|
+
licenseType,
|
|
76
|
+
preferences,
|
|
77
|
+
planTypes,
|
|
78
|
+
webhooks,
|
|
79
|
+
amount,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
this.hooks = {
|
|
85
|
+
[ntx_core_1.CrudActionType.afterCreate]: async (entity, context, payload) => {
|
|
86
|
+
const { preference } = context;
|
|
87
|
+
const { user, client, workspace } = context;
|
|
88
|
+
await this.process(entity, context);
|
|
89
|
+
},
|
|
90
|
+
[ntx_core_1.CrudActionType.afterUpdate]: async (entity, context, payload) => {
|
|
91
|
+
const { preference } = context;
|
|
92
|
+
const { user, client, workspace } = context;
|
|
93
|
+
await this.process(entity, context);
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
async process(entity, context) {
|
|
98
|
+
const { meta } = entity;
|
|
99
|
+
const { licenseType, preferences, planTypes, webhooks, amount } = meta;
|
|
100
|
+
const allowedKeys = Object.values(app_config_1.UserAttributeKeyType).filter((item) => {
|
|
101
|
+
return isNaN(+item);
|
|
102
|
+
});
|
|
103
|
+
const type = app_config_1.DatacenterPreferenceType.Default;
|
|
104
|
+
await this.preferenceService.withContext(context).delete({
|
|
105
|
+
datacenterId: entity.id,
|
|
106
|
+
type,
|
|
107
|
+
});
|
|
108
|
+
for (let index = 0; index < (preferences === null || preferences === void 0 ? void 0 : preferences.length); index++) {
|
|
109
|
+
const preference = preferences[index];
|
|
110
|
+
const key = preference.key;
|
|
111
|
+
if (allowedKeys.includes(key)) {
|
|
112
|
+
await this.preferenceService.withContext(context).save(Object.assign({ datacenterId: entity.id, key,
|
|
113
|
+
type }, preference));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
await this.planTypeService.withContext(context).delete({
|
|
117
|
+
datacenterId: entity.id,
|
|
118
|
+
});
|
|
119
|
+
for (let index = 0; index < (planTypes === null || planTypes === void 0 ? void 0 : planTypes.length); index++) {
|
|
120
|
+
const planType = planTypes[index];
|
|
121
|
+
await this.planTypeService.withContext(context).save(Object.assign({ datacenterId: entity.id, key: planType.name.toLowerCase().replace(/\s+/g, '-') }, planType));
|
|
122
|
+
}
|
|
123
|
+
await this.webhookService.withContext(context).delete({
|
|
124
|
+
datacenterId: entity.id,
|
|
125
|
+
});
|
|
126
|
+
for (let index = 0; index < (webhooks === null || webhooks === void 0 ? void 0 : webhooks.length); index++) {
|
|
127
|
+
const webhook = webhooks[index];
|
|
128
|
+
await this.webhookService.withContext(context).save(Object.assign({ datacenterId: entity.id, type: 'POST', url: webhook.url }, webhook));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
exports.DatacenterController = DatacenterController;
|
|
133
|
+
exports.DatacenterController = DatacenterController = __decorate([
|
|
134
|
+
(0, common_1.Controller)('datacenter'),
|
|
135
|
+
__metadata("design:paramtypes", [datacenter_service_1.DatacenterService,
|
|
136
|
+
ntx_core_1.LanguageService,
|
|
137
|
+
ntx_core_1.MediaService,
|
|
138
|
+
config_1.ConfigService,
|
|
139
|
+
ntx_core_1.MarkerService,
|
|
140
|
+
license_1.LicenseService,
|
|
141
|
+
license_type_1.LicenseTypeService,
|
|
142
|
+
preference_1.PreferenceService,
|
|
143
|
+
plan_type_1.PlanTypeService,
|
|
144
|
+
webhook_1.WebhookService])
|
|
145
|
+
], DatacenterController);
|
|
146
|
+
//# sourceMappingURL=datacenter.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datacenter.controller.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/datacenter/datacenter.controller.ts"],"names":[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OAAO,CAAC,CAAC,IAAI,iBACjD,YAAY,EAAE,MAAM,CAAC,EAAE,EACvB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,OAAO,CAAC,GAAG,IACb,OAAO,EACV,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AArKY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,EAAC,YAAY,CAAC;qCAkGe,sCAAiB;QACjB,0BAAe;QAClB,uBAAY;QACX,sBAAa;QACf,wBAAa;QACZ,wBAAc;QACV,iCAAkB;QACnB,8BAAiB;QACnB,2BAAe;QAChB,wBAAc;GA1GtC,oBAAoB,CAqKhC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DatacenterModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
13
|
+
const license_1 = require("../license");
|
|
14
|
+
const license_type_1 = require("../license-type");
|
|
15
|
+
const plan_type_1 = require("../plan-type");
|
|
16
|
+
const preference_1 = require("../preference");
|
|
17
|
+
const webhook_1 = require("../webhook");
|
|
18
|
+
const datacenter_controller_1 = require("./datacenter.controller");
|
|
19
|
+
const datacenter_service_1 = require("./datacenter.service");
|
|
20
|
+
const datacenter_entity_1 = require("./entities/datacenter.entity");
|
|
21
|
+
let DatacenterModule = class DatacenterModule {
|
|
22
|
+
};
|
|
23
|
+
exports.DatacenterModule = DatacenterModule;
|
|
24
|
+
exports.DatacenterModule = DatacenterModule = __decorate([
|
|
25
|
+
(0, common_1.Module)({
|
|
26
|
+
imports: [
|
|
27
|
+
typeorm_1.TypeOrmModule.forFeature([datacenter_entity_1.Datacenter]),
|
|
28
|
+
ntx_core_1.ServicesModule,
|
|
29
|
+
license_1.LicenseModule,
|
|
30
|
+
license_type_1.LicenseTypeModule,
|
|
31
|
+
preference_1.PreferenceModule,
|
|
32
|
+
plan_type_1.PlanTypeModule,
|
|
33
|
+
webhook_1.WebhookModule,
|
|
34
|
+
],
|
|
35
|
+
controllers: [datacenter_controller_1.DatacenterController],
|
|
36
|
+
providers: [datacenter_service_1.DatacenterService, license_1.LicenseService],
|
|
37
|
+
exports: [datacenter_service_1.DatacenterService],
|
|
38
|
+
})
|
|
39
|
+
], DatacenterModule);
|
|
40
|
+
//# sourceMappingURL=datacenter.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datacenter.module.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/datacenter/datacenter.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAuD;AACvD,wCAA2D;AAC3D,kDAAoD;AACpD,4CAA8C;AAC9C,8CAAiD;AACjD,wCAA2C;AAC3C,mEAA+D;AAC/D,6DAAyD;AACzD,oEAA0D;AAgBnD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAd5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,CAAC,CAAC;YACtC,yBAAc;YACd,uBAAa;YACb,gCAAiB;YACjB,6BAAgB;YAChB,0BAAc;YACd,uBAAa;SACd;QACD,WAAW,EAAE,CAAC,4CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,sCAAiB,EAAE,wBAAc,CAAC;QAC9C,OAAO,EAAE,CAAC,sCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { Datacenter } from './entities/datacenter.entity';
|
|
4
|
+
export declare class DatacenterService extends BaseRepository<Datacenter> {
|
|
5
|
+
protected readonly trackerService: TrackerService;
|
|
6
|
+
protected readonly configService: ConfigService;
|
|
7
|
+
protected readonly languageService: LanguageService;
|
|
8
|
+
protected readonly mediaService: MediaService;
|
|
9
|
+
protected [PermissionScopeType.Self]: {
|
|
10
|
+
userId: string;
|
|
11
|
+
}[];
|
|
12
|
+
protected [PermissionScopeType.Workspace]: {
|
|
13
|
+
workspaceId: string;
|
|
14
|
+
}[];
|
|
15
|
+
protected [PermissionScopeType.Global]: any[];
|
|
16
|
+
constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DatacenterService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const core_1 = require("@nestjs/core");
|
|
20
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
21
|
+
const datacenter_entity_1 = require("./entities/datacenter.entity");
|
|
22
|
+
let DatacenterService = class DatacenterService extends ntx_core_1.BaseRepository {
|
|
23
|
+
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
+
super(request, datacenter_entity_1.Datacenter);
|
|
25
|
+
this.trackerService = trackerService;
|
|
26
|
+
this.configService = configService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.mediaService = mediaService;
|
|
29
|
+
this[_a] = [
|
|
30
|
+
{
|
|
31
|
+
userId: 'user.id',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
this[_b] = [
|
|
35
|
+
{
|
|
36
|
+
workspaceId: 'workspace.id',
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
this[_c] = [];
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.DatacenterService = DatacenterService;
|
|
43
|
+
_a = ntx_core_1.PermissionScopeType.Self;
|
|
44
|
+
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
45
|
+
_c = ntx_core_1.PermissionScopeType.Global;
|
|
46
|
+
exports.DatacenterService = DatacenterService = __decorate([
|
|
47
|
+
(0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
|
|
48
|
+
__param(0, (0, common_1.Inject)(core_1.REQUEST)),
|
|
49
|
+
__metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
|
|
50
|
+
config_1.ConfigService,
|
|
51
|
+
ntx_core_1.LanguageService,
|
|
52
|
+
ntx_core_1.MediaService])
|
|
53
|
+
], DatacenterService);
|
|
54
|
+
//# sourceMappingURL=datacenter.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datacenter.service.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/datacenter/datacenter.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,oEAA0D;AAGnD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,yBAA0B;IAe/D,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,8BAAU,CAAC,CAAC;QALR,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAnBrC,QAA0B,GAAG;YACrC;gBACE,MAAM,EAAE,SAAS;aAClB;SACF,CAAC;QAEQ,QAA+B,GAAG;YAC1C;gBACE,WAAW,EAAE,cAAc;aAC5B;SACF,CAAC;QAEQ,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;CACF,CAAA;AAxBY,8CAAiB;KACjB,8BAAmB,CAAC,IAAI;KAMxB,8BAAmB,CAAC,SAAS;KAM7B,8BAAmB,CAAC,MAAM;4BAb1B,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAiBhC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GApBpC,iBAAiB,CAwB7B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DatacenterPreferenceKeyType, DatacenterPreferenceType } from '../../../app.config';
|
|
2
|
+
export declare class LicenseTypeDto {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class PreferenceDto {
|
|
6
|
+
key: DatacenterPreferenceKeyType;
|
|
7
|
+
value?: string;
|
|
8
|
+
type?: DatacenterPreferenceType;
|
|
9
|
+
}
|
|
10
|
+
export declare class PlanTypeDto {
|
|
11
|
+
name: string;
|
|
12
|
+
desc?: string;
|
|
13
|
+
detail?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
currency?: string;
|
|
16
|
+
daily?: number;
|
|
17
|
+
weekly?: number;
|
|
18
|
+
monthly: number;
|
|
19
|
+
yearly?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class WebhookDto {
|
|
22
|
+
url: string;
|
|
23
|
+
events?: string[];
|
|
24
|
+
}
|
|
25
|
+
export declare class CreateDatacenterDto {
|
|
26
|
+
name: string;
|
|
27
|
+
desc?: string;
|
|
28
|
+
licenseType: LicenseTypeDto;
|
|
29
|
+
preferences?: PreferenceDto[];
|
|
30
|
+
planTypes?: PlanTypeDto[];
|
|
31
|
+
webhooks?: WebhookDto[];
|
|
32
|
+
amount: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateDatacenterDto = exports.WebhookDto = exports.PlanTypeDto = exports.PreferenceDto = exports.LicenseTypeDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const app_config_1 = require("../../../app.config");
|
|
17
|
+
class LicenseTypeDto {
|
|
18
|
+
}
|
|
19
|
+
exports.LicenseTypeDto = LicenseTypeDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
(0, swagger_1.ApiProperty)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], LicenseTypeDto.prototype, "id", void 0);
|
|
25
|
+
class PreferenceDto {
|
|
26
|
+
}
|
|
27
|
+
exports.PreferenceDto = PreferenceDto;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsEnum)(app_config_1.DatacenterPreferenceKeyType),
|
|
30
|
+
(0, swagger_1.ApiProperty)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], PreferenceDto.prototype, "key", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], PreferenceDto.prototype, "value", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsEnum)(app_config_1.DatacenterPreferenceType),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], PreferenceDto.prototype, "type", void 0);
|
|
45
|
+
class PlanTypeDto {
|
|
46
|
+
}
|
|
47
|
+
exports.PlanTypeDto = PlanTypeDto;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], PlanTypeDto.prototype, "name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], PlanTypeDto.prototype, "desc", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], PlanTypeDto.prototype, "detail", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], PlanTypeDto.prototype, "type", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], PlanTypeDto.prototype, "currency", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsNumber)(),
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
81
|
+
__metadata("design:type", Number)
|
|
82
|
+
], PlanTypeDto.prototype, "daily", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsNumber)(),
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], PlanTypeDto.prototype, "weekly", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsNumber)(),
|
|
91
|
+
(0, swagger_1.ApiProperty)(),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], PlanTypeDto.prototype, "monthly", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.IsNumber)(),
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], PlanTypeDto.prototype, "yearly", void 0);
|
|
100
|
+
class WebhookDto {
|
|
101
|
+
}
|
|
102
|
+
exports.WebhookDto = WebhookDto;
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsString)(),
|
|
105
|
+
(0, swagger_1.ApiProperty)(),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], WebhookDto.prototype, "url", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
110
|
+
(0, class_validator_1.IsOptional)(),
|
|
111
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
112
|
+
__metadata("design:type", Array)
|
|
113
|
+
], WebhookDto.prototype, "events", void 0);
|
|
114
|
+
class CreateDatacenterDto {
|
|
115
|
+
}
|
|
116
|
+
exports.CreateDatacenterDto = CreateDatacenterDto;
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, class_validator_1.IsString)(),
|
|
119
|
+
(0, swagger_1.ApiProperty)(),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], CreateDatacenterDto.prototype, "name", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, class_validator_1.IsString)(),
|
|
124
|
+
(0, class_validator_1.IsOptional)(),
|
|
125
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], CreateDatacenterDto.prototype, "desc", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, class_validator_1.ValidateNested)(),
|
|
130
|
+
(0, class_transformer_1.Type)(() => LicenseTypeDto),
|
|
131
|
+
(0, swagger_1.ApiProperty)(),
|
|
132
|
+
__metadata("design:type", LicenseTypeDto)
|
|
133
|
+
], CreateDatacenterDto.prototype, "licenseType", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
136
|
+
(0, class_transformer_1.Type)(() => PreferenceDto),
|
|
137
|
+
(0, class_validator_1.IsOptional)(),
|
|
138
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
139
|
+
__metadata("design:type", Array)
|
|
140
|
+
], CreateDatacenterDto.prototype, "preferences", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
143
|
+
(0, class_transformer_1.Type)(() => PlanTypeDto),
|
|
144
|
+
(0, class_validator_1.IsOptional)(),
|
|
145
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
146
|
+
__metadata("design:type", Array)
|
|
147
|
+
], CreateDatacenterDto.prototype, "planTypes", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
150
|
+
(0, class_transformer_1.Type)(() => WebhookDto),
|
|
151
|
+
(0, class_validator_1.IsOptional)(),
|
|
152
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
153
|
+
__metadata("design:type", Array)
|
|
154
|
+
], CreateDatacenterDto.prototype, "webhooks", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, class_validator_1.IsNumber)(),
|
|
157
|
+
(0, swagger_1.ApiProperty)(),
|
|
158
|
+
__metadata("design:type", Number)
|
|
159
|
+
], CreateDatacenterDto.prototype, "amount", void 0);
|
|
160
|
+
//# sourceMappingURL=create-datacenter.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-datacenter.dto.js","sourceRoot":"","sources":["../../../../../../libs/bridge/src/api/datacenter/dto/create-datacenter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAyC;AACzC,qDAOyB;AACzB,oDAG6B;AAE7B,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;;0CACH;AAGb,MAAa,aAAa;CAczB;AAdD,sCAcC;AAXC;IAFC,IAAA,wBAAM,EAAC,wCAA2B,CAAC;IACnC,IAAA,qBAAW,GAAE;;0CACmB;AAKjC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;4CACP;AAKf;IAHC,IAAA,wBAAM,EAAC,qCAAwB,CAAC;IAChC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;2CACU;AAGlC,MAAa,WAAW;CA2CvB;AA3CD,kCA2CC;AAxCC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;yCACD;AAKb;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;yCACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;2CACN;AAKhB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;yCACR;AAKd;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;6CACJ;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E;IACZ,IAAA,6BAAmB,GAAE;;sDACI;AAM1B;IAJC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,UAAU,CAAC;IACtB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;qDACE;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;mDACC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateDatacenterDto = void 0;
|
|
4
|
+
const create_datacenter_dto_1 = require("./create-datacenter.dto");
|
|
5
|
+
class UpdateDatacenterDto extends create_datacenter_dto_1.CreateDatacenterDto {
|
|
6
|
+
}
|
|
7
|
+
exports.UpdateDatacenterDto = UpdateDatacenterDto;
|
|
8
|
+
//# sourceMappingURL=update-datacenter.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-datacenter.dto.js","sourceRoot":"","sources":["../../../../../../libs/bridge/src/api/datacenter/dto/update-datacenter.dto.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAE9D,MAAa,mBAAoB,SAAQ,2CAAmB;CAAG;AAA/D,kDAA+D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseEntity } from '@thescaffold/ntx-core';
|
|
2
|
+
import { License } from '../../license/entities/license.entity';
|
|
3
|
+
import { PlanType } from '../../plan-type/entities/plan-type.entity';
|
|
4
|
+
import { Preference } from '../../preference/entities/preference.entity';
|
|
5
|
+
import { Server } from '../../server/entities/server.entity';
|
|
6
|
+
import { User } from '../../user/entities/user.entity';
|
|
7
|
+
import { Webhook } from '../../webhook/entities/webhook.entity';
|
|
8
|
+
export declare class Datacenter extends BaseEntity {
|
|
9
|
+
userId: string;
|
|
10
|
+
clientId: string;
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
name: string;
|
|
13
|
+
desc?: string;
|
|
14
|
+
meta?: any;
|
|
15
|
+
status?: string;
|
|
16
|
+
licenseId?: string;
|
|
17
|
+
license?: License;
|
|
18
|
+
preferences?: Preference[];
|
|
19
|
+
users?: User[];
|
|
20
|
+
planTypes?: PlanType[];
|
|
21
|
+
servers?: Server[];
|
|
22
|
+
webhooks?: Webhook[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Datacenter = void 0;
|
|
13
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const license_entity_1 = require("../../license/entities/license.entity");
|
|
16
|
+
const plan_type_entity_1 = require("../../plan-type/entities/plan-type.entity");
|
|
17
|
+
const preference_entity_1 = require("../../preference/entities/preference.entity");
|
|
18
|
+
const server_entity_1 = require("../../server/entities/server.entity");
|
|
19
|
+
const user_entity_1 = require("../../user/entities/user.entity");
|
|
20
|
+
const webhook_entity_1 = require("../../webhook/entities/webhook.entity");
|
|
21
|
+
let Datacenter = class Datacenter extends ntx_core_1.BaseEntity {
|
|
22
|
+
};
|
|
23
|
+
exports.Datacenter = Datacenter;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Index)(),
|
|
26
|
+
(0, typeorm_1.Column)('char', { name: 'userId', length: 36 }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Datacenter.prototype, "userId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Index)(),
|
|
31
|
+
(0, typeorm_1.Column)('varchar', { name: 'clientId', length: 26 }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Datacenter.prototype, "clientId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Index)(),
|
|
36
|
+
(0, typeorm_1.Column)('char', { name: 'workspaceId', length: 36 }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Datacenter.prototype, "workspaceId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)('varchar', { name: 'name', length: 255 }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Datacenter.prototype, "name", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)('varchar', { name: 'desc', nullable: true, length: 255 }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Datacenter.prototype, "desc", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)('json', { name: 'meta', nullable: true }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], Datacenter.prototype, "meta", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Index)(),
|
|
53
|
+
(0, typeorm_1.Column)('varchar', { name: 'status', nullable: true, length: 26 }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], Datacenter.prototype, "status", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Index)(),
|
|
58
|
+
(0, typeorm_1.Column)('char', { name: 'licenseId', length: 36, nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], Datacenter.prototype, "licenseId", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.OneToOne)((type) => license_entity_1.License, (license) => license.datacenter, {
|
|
63
|
+
createForeignKeyConstraints: false,
|
|
64
|
+
}),
|
|
65
|
+
(0, typeorm_1.JoinColumn)(),
|
|
66
|
+
__metadata("design:type", license_entity_1.License)
|
|
67
|
+
], Datacenter.prototype, "license", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.OneToMany)((type) => preference_entity_1.Preference, (preference) => preference.datacenter),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], Datacenter.prototype, "preferences", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.OneToMany)((type) => user_entity_1.User, (user) => user.datacenter),
|
|
74
|
+
__metadata("design:type", Array)
|
|
75
|
+
], Datacenter.prototype, "users", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.OneToMany)((type) => plan_type_entity_1.PlanType, (type) => type.datacenter),
|
|
78
|
+
__metadata("design:type", Array)
|
|
79
|
+
], Datacenter.prototype, "planTypes", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.OneToMany)((type) => server_entity_1.Server, (server) => server.datacenter),
|
|
82
|
+
__metadata("design:type", Array)
|
|
83
|
+
], Datacenter.prototype, "servers", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, typeorm_1.OneToMany)((type) => webhook_entity_1.Webhook, (webhook) => webhook.datacenter),
|
|
86
|
+
__metadata("design:type", Array)
|
|
87
|
+
], Datacenter.prototype, "webhooks", void 0);
|
|
88
|
+
exports.Datacenter = Datacenter = __decorate([
|
|
89
|
+
(0, typeorm_1.Entity)({
|
|
90
|
+
name: 'BridgeDatacenters',
|
|
91
|
+
orderBy: {
|
|
92
|
+
createdAt: 'DESC',
|
|
93
|
+
},
|
|
94
|
+
})
|
|
95
|
+
], Datacenter);
|
|
96
|
+
//# sourceMappingURL=datacenter.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datacenter.entity.js","sourceRoot":"","sources":["../../../../../../libs/bridge/src/api/datacenter/entities/datacenter.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAOiB;AACjB,0EAAgE;AAChE,gFAAqE;AACrE,mFAAyE;AACzE,uEAA6D;AAC7D,iEAAuD;AACvD,0EAAgE;AAQzD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAU;CAkDzC,CAAA;AAlDY,gCAAU;AAGrB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;0CAChC;AAIf;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;4CACnC;AAIjB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;+CAChC;AAGpB;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCACpC;AAGb;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCACnD;AAGd;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACtC;AAIX;IAFC,IAAA,eAAK,GAAE;IACP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