@thescaffold/ntx-apps-bridge 0.2.21 → 0.2.31
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/api/license/dto/create-license.dto.d.ts +30 -4
- package/api/license/dto/create-license.dto.js +128 -13
- package/api/license/dto/create-license.dto.js.map +1 -1
- package/api/license/dto/update-license.dto.d.ts +2 -7
- package/api/license/dto/update-license.dto.js +2 -43
- package/api/license/dto/update-license.dto.js.map +1 -1
- package/api/license/entities/license.entity.d.ts +9 -2
- package/api/license/entities/license.entity.js +37 -12
- package/api/license/entities/license.entity.js.map +1 -1
- package/api/license/license.controller.d.ts +43 -5
- package/api/license/license.controller.js +141 -5
- package/api/license/license.controller.js.map +1 -1
- package/api/license/license.module.js +14 -2
- package/api/license/license.module.js.map +1 -1
- package/api/license/license.service.d.ts +2 -2
- package/api/license/license.service.js +2 -4
- package/api/license/license.service.js.map +1 -1
- package/api/license-type/entities/license-type.entity.js +7 -8
- package/api/license-type/entities/license-type.entity.js.map +1 -1
- package/api/license-type/license-type.controller.d.ts +6 -2
- package/api/license-type/license-type.controller.js +2 -2
- package/api/license-type/license-type.controller.js.map +1 -1
- package/api/plan-type/dto/create-plan-type.dto.d.ts +1 -1
- package/api/plan-type/dto/create-plan-type.dto.js +1 -1
- package/api/plan-type/dto/create-plan-type.dto.js.map +1 -1
- package/api/plan-type/dto/update-plan-type.dto.d.ts +1 -1
- package/api/plan-type/dto/update-plan-type.dto.js +1 -1
- package/api/plan-type/dto/update-plan-type.dto.js.map +1 -1
- package/api/plan-type/entities/plan-type.entity.d.ts +3 -5
- package/api/plan-type/entities/plan-type.entity.js +13 -19
- package/api/plan-type/entities/plan-type.entity.js.map +1 -1
- package/api/plan-type/plan-type.controller.d.ts +2 -2
- package/api/plan-type/plan-type.controller.js +1 -3
- package/api/plan-type/plan-type.controller.js.map +1 -1
- package/api/plan-type/plan-type.service.d.ts +2 -2
- package/api/plan-type/plan-type.service.js +2 -2
- package/api/plan-type/plan-type.service.js.map +1 -1
- package/api/preference/dto/create-preference.dto.d.ts +3 -3
- package/api/preference/dto/create-preference.dto.js +3 -3
- package/api/preference/dto/create-preference.dto.js.map +1 -1
- package/api/preference/dto/update-preference.dto.d.ts +3 -3
- package/api/preference/dto/update-preference.dto.js +3 -3
- package/api/preference/dto/update-preference.dto.js.map +1 -1
- package/api/preference/entities/preference.entity.d.ts +6 -6
- package/api/preference/entities/preference.entity.js +12 -12
- package/api/preference/entities/preference.entity.js.map +1 -1
- package/api/preference/preference.controller.d.ts +4 -4
- package/api/preference/preference.controller.js +2 -2
- package/api/preference/preference.controller.js.map +1 -1
- package/api/preference/preference.service.d.ts +5 -5
- package/api/preference/preference.service.js +6 -6
- package/api/preference/preference.service.js.map +1 -1
- package/api/webhook/dto/create-webhook.dto.d.ts +1 -1
- package/api/webhook/dto/create-webhook.dto.js +1 -1
- package/api/webhook/dto/create-webhook.dto.js.map +1 -1
- package/api/webhook/dto/update-webhook.dto.d.ts +1 -1
- package/api/webhook/dto/update-webhook.dto.js +1 -1
- package/api/webhook/dto/update-webhook.dto.js.map +1 -1
- package/api/webhook/entities/webhook.entity.d.ts +3 -3
- package/api/webhook/entities/webhook.entity.js +10 -10
- package/api/webhook/entities/webhook.entity.js.map +1 -1
- package/api/webhook/webhook.controller.d.ts +2 -2
- package/api/webhook/webhook.controller.js +2 -2
- package/api/webhook/webhook.controller.js.map +1 -1
- package/api/webhook/webhook.service.d.ts +2 -2
- package/api/webhook/webhook.service.js +2 -2
- package/api/webhook/webhook.service.js.map +1 -1
- package/api/webhook-log/entities/webhook-log.entity.js +6 -6
- package/api/webhook-log/entities/webhook-log.entity.js.map +1 -1
- package/app.config.d.ts +5 -10
- package/app.config.js +13 -21
- package/app.config.js.map +1 -1
- package/app.controller.d.ts +1 -3
- package/app.controller.js +18 -30
- package/app.controller.js.map +1 -1
- package/app.module.js +0 -30
- package/app.module.js.map +1 -1
- package/index.d.ts +2 -6
- package/index.js +0 -10
- package/index.js.map +1 -1
- package/migrations/1760356231653-BridgeLicense.js +29 -22
- package/migrations/1760356231653-BridgeLicense.js.map +1 -1
- package/migrations/1760356231723-BridgeLicenseType.js +35 -29
- package/migrations/1760356231723-BridgeLicenseType.js.map +1 -1
- package/migrations/1760356231972-BridgePlanType.js +31 -31
- package/migrations/1760356231972-BridgePlanType.js.map +1 -1
- package/migrations/1760356232047-BridgePreference.js +18 -17
- package/migrations/1760356232047-BridgePreference.js.map +1 -1
- package/migrations/1760356232265-BridgeWebhook.js +16 -16
- package/migrations/1760356232265-BridgeWebhook.js.map +1 -1
- package/migrations/1760356232333-BridgeWebhookLog.js +14 -13
- package/migrations/1760356232333-BridgeWebhookLog.js.map +1 -1
- package/migrations/index.d.ts +2 -2
- package/migrations/index.js +0 -12
- package/migrations/index.js.map +1 -1
- package/package.json +42 -13
- package/pkg/index.d.ts +1 -0
- package/{api/user → pkg}/index.js +1 -5
- package/pkg/index.js.map +1 -0
- package/pkg/utils/functions.d.ts +2 -0
- package/pkg/utils/functions.js +15 -0
- package/pkg/utils/functions.js.map +1 -0
- package/pkg/utils/index.d.ts +1 -0
- package/{api/server → pkg/utils}/index.js +1 -5
- package/pkg/utils/index.js.map +1 -0
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/api/attribute/attribute.controller.d.ts +0 -24
- package/api/attribute/attribute.controller.js +0 -43
- package/api/attribute/attribute.controller.js.map +0 -1
- package/api/attribute/attribute.module.d.ts +0 -2
- package/api/attribute/attribute.module.js +0 -27
- package/api/attribute/attribute.module.js.map +0 -1
- package/api/attribute/attribute.service.d.ts +0 -21
- package/api/attribute/attribute.service.js +0 -85
- package/api/attribute/attribute.service.js.map +0 -1
- package/api/attribute/dto/create-attribute.dto.d.ts +0 -8
- package/api/attribute/dto/create-attribute.dto.js +0 -48
- package/api/attribute/dto/create-attribute.dto.js.map +0 -1
- package/api/attribute/dto/update-attribute.dto.d.ts +0 -8
- package/api/attribute/dto/update-attribute.dto.js +0 -49
- package/api/attribute/dto/update-attribute.dto.js.map +0 -1
- package/api/attribute/entities/attribute.entity.d.ts +0 -12
- package/api/attribute/entities/attribute.entity.js +0 -62
- package/api/attribute/entities/attribute.entity.js.map +0 -1
- package/api/attribute/index.d.ts +0 -6
- package/api/attribute/index.js +0 -23
- package/api/attribute/index.js.map +0 -1
- package/api/datacenter/datacenter.controller.d.ts +0 -68
- package/api/datacenter/datacenter.controller.js +0 -146
- package/api/datacenter/datacenter.controller.js.map +0 -1
- package/api/datacenter/datacenter.module.d.ts +0 -2
- package/api/datacenter/datacenter.module.js +0 -40
- package/api/datacenter/datacenter.module.js.map +0 -1
- package/api/datacenter/datacenter.service.d.ts +0 -17
- package/api/datacenter/datacenter.service.js +0 -54
- package/api/datacenter/datacenter.service.js.map +0 -1
- package/api/datacenter/dto/create-datacenter.dto.d.ts +0 -33
- package/api/datacenter/dto/create-datacenter.dto.js +0 -160
- package/api/datacenter/dto/create-datacenter.dto.js.map +0 -1
- package/api/datacenter/dto/update-datacenter.dto.d.ts +0 -3
- package/api/datacenter/dto/update-datacenter.dto.js +0 -8
- package/api/datacenter/dto/update-datacenter.dto.js.map +0 -1
- package/api/datacenter/entities/datacenter.entity.d.ts +0 -23
- package/api/datacenter/entities/datacenter.entity.js +0 -96
- package/api/datacenter/entities/datacenter.entity.js.map +0 -1
- package/api/datacenter/index.d.ts +0 -6
- package/api/datacenter/index.js +0 -23
- package/api/datacenter/index.js.map +0 -1
- package/api/plan/dto/create-plan.dto.d.ts +0 -8
- package/api/plan/dto/create-plan.dto.js +0 -49
- package/api/plan/dto/create-plan.dto.js.map +0 -1
- package/api/plan/dto/update-plan.dto.d.ts +0 -8
- package/api/plan/dto/update-plan.dto.js +0 -49
- package/api/plan/dto/update-plan.dto.js.map +0 -1
- package/api/plan/entities/plan.entity.d.ts +0 -11
- package/api/plan/entities/plan.entity.js +0 -57
- package/api/plan/entities/plan.entity.js.map +0 -1
- package/api/plan/index.d.ts +0 -6
- package/api/plan/index.js +0 -23
- package/api/plan/index.js.map +0 -1
- package/api/plan/plan.controller.d.ts +0 -20
- package/api/plan/plan.controller.js +0 -41
- package/api/plan/plan.controller.js.map +0 -1
- package/api/plan/plan.module.d.ts +0 -2
- package/api/plan/plan.module.js +0 -27
- package/api/plan/plan.module.js.map +0 -1
- package/api/plan/plan.service.d.ts +0 -17
- package/api/plan/plan.service.js +0 -50
- package/api/plan/plan.service.js.map +0 -1
- package/api/server/dto/create-server.dto.d.ts +0 -7
- package/api/server/dto/create-server.dto.js +0 -45
- package/api/server/dto/create-server.dto.js.map +0 -1
- package/api/server/dto/update-server.dto.d.ts +0 -7
- package/api/server/dto/update-server.dto.js +0 -48
- package/api/server/dto/update-server.dto.js.map +0 -1
- package/api/server/entities/server.entity.d.ts +0 -10
- package/api/server/entities/server.entity.js +0 -55
- package/api/server/entities/server.entity.js.map +0 -1
- package/api/server/index.d.ts +0 -5
- package/api/server/index.js.map +0 -1
- package/api/server/server.controller.d.ts +0 -23
- package/api/server/server.controller.js +0 -41
- package/api/server/server.controller.js.map +0 -1
- package/api/server/server.module.d.ts +0 -2
- package/api/server/server.module.js +0 -30
- package/api/server/server.module.js.map +0 -1
- package/api/server/server.service.d.ts +0 -17
- package/api/server/server.service.js +0 -48
- package/api/server/server.service.js.map +0 -1
- package/api/user/dto/create-user.dto.d.ts +0 -7
- package/api/user/dto/create-user.dto.js +0 -40
- package/api/user/dto/create-user.dto.js.map +0 -1
- package/api/user/dto/update-user.dto.d.ts +0 -7
- package/api/user/dto/update-user.dto.js +0 -40
- package/api/user/dto/update-user.dto.js.map +0 -1
- package/api/user/entities/user.entity.d.ts +0 -16
- package/api/user/entities/user.entity.js +0 -81
- package/api/user/entities/user.entity.js.map +0 -1
- package/api/user/index.d.ts +0 -5
- package/api/user/index.js.map +0 -1
- package/api/user/user.controller.d.ts +0 -22
- package/api/user/user.controller.js +0 -40
- package/api/user/user.controller.js.map +0 -1
- package/api/user/user.module.d.ts +0 -2
- package/api/user/user.module.js +0 -27
- package/api/user/user.module.js.map +0 -1
- package/api/user/user.service.d.ts +0 -17
- package/api/user/user.service.js +0 -48
- package/api/user/user.service.js.map +0 -1
- package/migrations/1760356231511-BridgeAttribute.d.ts +0 -5
- package/migrations/1760356231511-BridgeAttribute.js +0 -33
- package/migrations/1760356231511-BridgeAttribute.js.map +0 -1
- package/migrations/1760356231581-BridgeDatacenter.d.ts +0 -5
- package/migrations/1760356231581-BridgeDatacenter.js +0 -36
- package/migrations/1760356231581-BridgeDatacenter.js.map +0 -1
- package/migrations/1760356231827-BridgePlan.d.ts +0 -5
- package/migrations/1760356231827-BridgePlan.js +0 -30
- package/migrations/1760356231827-BridgePlan.js.map +0 -1
- package/migrations/1760356232120-BridgeServer.d.ts +0 -5
- package/migrations/1760356232120-BridgeServer.js +0 -33
- package/migrations/1760356232120-BridgeServer.js.map +0 -1
- package/migrations/1760356232195-BridgeUser.d.ts +0 -5
- package/migrations/1760356232195-BridgeUser.js +0 -34
- package/migrations/1760356232195-BridgeUser.js.map +0 -1
- package/migrations/1760357588527-BridgeLicenseTypeData.d.ts +0 -5
- package/migrations/1760357588527-BridgeLicenseTypeData.js +0 -262
- package/migrations/1760357588527-BridgeLicenseTypeData.js.map +0 -1
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { LanguageService, MediaService } from '@thescaffold/ntx-core';
|
|
2
|
-
import { AttributeService } from './attribute.service';
|
|
3
|
-
import { CreateAttributeDto } from './dto/create-attribute.dto';
|
|
4
|
-
import { UpdateAttributeDto } from './dto/update-attribute.dto';
|
|
5
|
-
import { Attribute } from './entities/attribute.entity';
|
|
6
|
-
declare const AttributeController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<Attribute, CreateAttributeDto, UpdateAttributeDto>>;
|
|
7
|
-
export declare class AttributeController extends AttributeController_base {
|
|
8
|
-
private readonly attributeService;
|
|
9
|
-
protected readonly languageService: LanguageService;
|
|
10
|
-
protected readonly mediaService: MediaService;
|
|
11
|
-
protected name: string;
|
|
12
|
-
protected searchable: string[];
|
|
13
|
-
protected service: AttributeService;
|
|
14
|
-
protected unique: ({ userId, type, key }: Attribute) => {
|
|
15
|
-
userId: string;
|
|
16
|
-
type: import("../..").UserAttributeType;
|
|
17
|
-
key: import("../..").UserAttributeKeyType;
|
|
18
|
-
}[];
|
|
19
|
-
protected morphRequest: (entity: Attribute) => Attribute;
|
|
20
|
-
protected morphs: {};
|
|
21
|
-
protected hooks: {};
|
|
22
|
-
constructor(attributeService: AttributeService, languageService: LanguageService, mediaService: MediaService);
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
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.AttributeController = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
15
|
-
const attribute_service_1 = require("./attribute.service");
|
|
16
|
-
const create_attribute_dto_1 = require("./dto/create-attribute.dto");
|
|
17
|
-
const update_attribute_dto_1 = require("./dto/update-attribute.dto");
|
|
18
|
-
const attribute_entity_1 = require("./entities/attribute.entity");
|
|
19
|
-
let AttributeController = class AttributeController extends (0, ntx_core_1.CrudControllerFactory)(create_attribute_dto_1.CreateAttributeDto, update_attribute_dto_1.UpdateAttributeDto, attribute_entity_1.Attribute) {
|
|
20
|
-
constructor(attributeService, languageService, mediaService) {
|
|
21
|
-
super();
|
|
22
|
-
this.attributeService = attributeService;
|
|
23
|
-
this.languageService = languageService;
|
|
24
|
-
this.mediaService = mediaService;
|
|
25
|
-
this.name = 'attribute';
|
|
26
|
-
this.searchable = ['value'];
|
|
27
|
-
this.service = this.attributeService;
|
|
28
|
-
this.unique = ({ userId, type, key }) => [
|
|
29
|
-
{ userId, type, key },
|
|
30
|
-
];
|
|
31
|
-
this.morphRequest = (entity) => entity;
|
|
32
|
-
this.morphs = {};
|
|
33
|
-
this.hooks = {};
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.AttributeController = AttributeController;
|
|
37
|
-
exports.AttributeController = AttributeController = __decorate([
|
|
38
|
-
(0, common_1.Controller)('attribute'),
|
|
39
|
-
__metadata("design:paramtypes", [attribute_service_1.AttributeService,
|
|
40
|
-
ntx_core_1.LanguageService,
|
|
41
|
-
ntx_core_1.MediaService])
|
|
42
|
-
], AttributeController);
|
|
43
|
-
//# sourceMappingURL=attribute.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.controller.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/attribute/attribute.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAI+B;AAC/B,2DAAuD;AACvD,qEAAgE;AAChE,qEAAgE;AAChE,kEAAwD;AAGjD,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,IAAA,gCAAqB,EAI5D,yCAAkB,EAAE,yCAAkB,EAAE,4BAAS,CAAC;IAWlD,YACmB,gBAAkC,EAChC,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,qBAAgB,GAAhB,gBAAgB,CAAkB;QAChC,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAbrC,SAAI,GAAG,WAAW,CAAC;QACnB,eAAU,GAAG,CAAC,OAAO,CAAC,CAAC;QACvB,YAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAChC,WAAM,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAa,EAAE,EAAE,CAAC;YACvD,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE;SACtB,CAAC;QACQ,iBAAY,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,MAAM,CAAC;QAC7C,WAAM,GAAG,EAAE,CAAC;QACZ,UAAK,GAAG,EAAE,CAAC;IAQrB,CAAC;CACF,CAAA;AAtBY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,EAAC,WAAW,CAAC;qCAiBe,oCAAgB;QACf,0BAAe;QAClB,uBAAY;GAlBpC,mBAAmB,CAsB/B"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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.AttributeModule = 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 attribute_controller_1 = require("./attribute.controller");
|
|
14
|
-
const attribute_service_1 = require("./attribute.service");
|
|
15
|
-
const attribute_entity_1 = require("./entities/attribute.entity");
|
|
16
|
-
let AttributeModule = class AttributeModule {
|
|
17
|
-
};
|
|
18
|
-
exports.AttributeModule = AttributeModule;
|
|
19
|
-
exports.AttributeModule = AttributeModule = __decorate([
|
|
20
|
-
(0, common_1.Module)({
|
|
21
|
-
imports: [typeorm_1.TypeOrmModule.forFeature([attribute_entity_1.Attribute]), ntx_core_1.ServicesModule],
|
|
22
|
-
controllers: [attribute_controller_1.AttributeController],
|
|
23
|
-
providers: [attribute_service_1.AttributeService],
|
|
24
|
-
exports: [attribute_service_1.AttributeService],
|
|
25
|
-
})
|
|
26
|
-
], AttributeModule);
|
|
27
|
-
//# sourceMappingURL=attribute.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.module.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/attribute/attribute.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAuD;AACvD,iEAA6D;AAC7D,2DAAuD;AACvD,kEAAwD;AAQjD,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAN3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,4BAAS,CAAC,CAAC,EAAE,yBAAc,CAAC;QAChE,WAAW,EAAE,CAAC,0CAAmB,CAAC;QAClC,SAAS,EAAE,CAAC,oCAAgB,CAAC;QAC7B,OAAO,EAAE,CAAC,oCAAgB,CAAC;KAC5B,CAAC;GACW,eAAe,CAAG"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
-
import { UserAttributeKeyType, UserAttributeType } from '../../app.config';
|
|
4
|
-
import { Attribute } from './entities/attribute.entity';
|
|
5
|
-
export declare class AttributeService extends BaseRepository<Attribute> {
|
|
6
|
-
protected readonly trackerService: TrackerService;
|
|
7
|
-
protected readonly configService: ConfigService;
|
|
8
|
-
protected readonly languageService: LanguageService;
|
|
9
|
-
protected readonly mediaService: MediaService;
|
|
10
|
-
protected [PermissionScopeType.Self]: {
|
|
11
|
-
'user.datacenter.userId': string;
|
|
12
|
-
}[];
|
|
13
|
-
protected [PermissionScopeType.Workspace]: {
|
|
14
|
-
'user.datacenter.workspaceId': string;
|
|
15
|
-
}[];
|
|
16
|
-
protected [PermissionScopeType.Global]: any[];
|
|
17
|
-
constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
|
|
18
|
-
getOne(type: UserAttributeType, key: UserAttributeKeyType, userId: string): Promise<string>;
|
|
19
|
-
getAll(userId: string): Promise<{}>;
|
|
20
|
-
getSome(filter: Partial<Attribute>[]): Promise<{}>;
|
|
21
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
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.AttributeService = 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 attribute_entity_1 = require("./entities/attribute.entity");
|
|
22
|
-
let AttributeService = class AttributeService extends ntx_core_1.BaseRepository {
|
|
23
|
-
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
-
super(request, attribute_entity_1.Attribute);
|
|
25
|
-
this.trackerService = trackerService;
|
|
26
|
-
this.configService = configService;
|
|
27
|
-
this.languageService = languageService;
|
|
28
|
-
this.mediaService = mediaService;
|
|
29
|
-
this[_a] = [
|
|
30
|
-
{ 'user.datacenter.userId': 'user.id' },
|
|
31
|
-
];
|
|
32
|
-
this[_b] = [
|
|
33
|
-
{ 'user.datacenter.workspaceId': 'workspace.id' },
|
|
34
|
-
];
|
|
35
|
-
this[_c] = [];
|
|
36
|
-
}
|
|
37
|
-
async getOne(type, key, userId) {
|
|
38
|
-
const attribute = await this.withContext({}).findOne({
|
|
39
|
-
select: ['id', 'value'],
|
|
40
|
-
where: [{ userId, type, key }],
|
|
41
|
-
});
|
|
42
|
-
return attribute === null || attribute === void 0 ? void 0 : attribute.value;
|
|
43
|
-
}
|
|
44
|
-
async getAll(userId) {
|
|
45
|
-
const attributes = await this.withContext({}).find({
|
|
46
|
-
select: ['id', 'value', 'type', 'key'],
|
|
47
|
-
where: [{ userId }],
|
|
48
|
-
});
|
|
49
|
-
return attributes === null || attributes === void 0 ? void 0 : attributes.reduce((prev, curr) => {
|
|
50
|
-
const { type, key, value } = curr;
|
|
51
|
-
if (!prev[type]) {
|
|
52
|
-
prev[type] = {};
|
|
53
|
-
}
|
|
54
|
-
prev[type][key] = value;
|
|
55
|
-
return prev;
|
|
56
|
-
}, {});
|
|
57
|
-
}
|
|
58
|
-
async getSome(filter) {
|
|
59
|
-
const attributes = await this.withContext({}).find({
|
|
60
|
-
select: ['id', 'value', 'type', 'key'],
|
|
61
|
-
where: filter,
|
|
62
|
-
});
|
|
63
|
-
return attributes.reduce((prev, curr) => {
|
|
64
|
-
const { type, key, value } = curr;
|
|
65
|
-
if (!prev[type]) {
|
|
66
|
-
prev[type] = {};
|
|
67
|
-
}
|
|
68
|
-
prev[type][key] = value;
|
|
69
|
-
return prev;
|
|
70
|
-
}, {});
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
exports.AttributeService = AttributeService;
|
|
74
|
-
_a = ntx_core_1.PermissionScopeType.Self;
|
|
75
|
-
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
76
|
-
_c = ntx_core_1.PermissionScopeType.Global;
|
|
77
|
-
exports.AttributeService = AttributeService = __decorate([
|
|
78
|
-
(0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
|
|
79
|
-
__param(0, (0, common_1.Inject)(core_1.REQUEST)),
|
|
80
|
-
__metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
|
|
81
|
-
config_1.ConfigService,
|
|
82
|
-
ntx_core_1.LanguageService,
|
|
83
|
-
ntx_core_1.MediaService])
|
|
84
|
-
], AttributeService);
|
|
85
|
-
//# sourceMappingURL=attribute.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.service.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/attribute/attribute.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAE/B,kEAAwD;AAGjD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,yBAAyB;IAW7D,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,4BAAS,CAAC,CAAC;QALP,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAfrC,QAA0B,GAAG;YACrC,EAAE,wBAAwB,EAAE,SAAS,EAAE;SACxC,CAAC;QAEQ,QAA+B,GAAG;YAC1C,EAAE,6BAA6B,EAAE,cAAc,EAAE;SAClD,CAAC;QAEQ,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,IAAuB,EACvB,GAAyB,EACzB,MAAc;QAEd,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;YACnD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;YACvB,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;SAC/B,CAAC,CAAC;QAEH,OAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC;YACjD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;YACtC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;SACpB,CAAC,CAAC;QAEH,OAAO,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;YACvC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YAClB,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAA4B;QACxC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC;YACjD,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;YACtC,KAAK,EAAE,MAAa;SACrB,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;YACtC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;YAClB,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACxB,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;CACF,CAAA;AAjEY,4CAAgB;KAChB,8BAAmB,CAAC,IAAI;KAIxB,8BAAmB,CAAC,SAAS;KAI7B,8BAAmB,CAAC,MAAM;2BAT1B,gBAAgB;IAD5B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAahC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GAhBpC,gBAAgB,CAiE5B"}
|
|
@@ -1,48 +0,0 @@
|
|
|
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.CreateAttributeDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const app_config_1 = require("../../../app.config");
|
|
16
|
-
class CreateAttributeDto {
|
|
17
|
-
}
|
|
18
|
-
exports.CreateAttributeDto = CreateAttributeDto;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, class_validator_1.IsEnum)(app_config_1.UserAttributeKeyType),
|
|
21
|
-
(0, swagger_1.ApiProperty)(),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], CreateAttributeDto.prototype, "key", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, class_validator_1.IsString)(),
|
|
26
|
-
(0, class_validator_1.IsOptional)(),
|
|
27
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], CreateAttributeDto.prototype, "value", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, class_validator_1.IsEnum)(app_config_1.UserAttributeType),
|
|
32
|
-
(0, class_validator_1.IsOptional)(),
|
|
33
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], CreateAttributeDto.prototype, "type", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsObject)(),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], CreateAttributeDto.prototype, "meta", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsString)(),
|
|
44
|
-
(0, class_validator_1.IsOptional)(),
|
|
45
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], CreateAttributeDto.prototype, "status", void 0);
|
|
48
|
-
//# sourceMappingURL=create-attribute.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-attribute.dto.js","sourceRoot":"","sources":["../../../../../../libs/bridge/src/api/attribute/dto/create-attribute.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAyE;AACzE,oDAA8E;AAE9E,MAAa,kBAAkB;CAwB9B;AAxBD,gDAwBC;AArBC;IAFC,IAAA,wBAAM,EAAC,iCAAoB,CAAC;IAC5B,IAAA,qBAAW,GAAE;;+CACY;AAK1B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACP;AAKf;IAHC,IAAA,wBAAM,EAAC,8BAAiB,CAAC;IACzB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACG;AAKzB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACX;AAKX;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;kDACN"}
|
|
@@ -1,49 +0,0 @@
|
|
|
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.UpdateAttributeDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const app_config_1 = require("../../../app.config");
|
|
16
|
-
class UpdateAttributeDto {
|
|
17
|
-
}
|
|
18
|
-
exports.UpdateAttributeDto = UpdateAttributeDto;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, class_validator_1.IsEnum)(app_config_1.UserAttributeKeyType),
|
|
21
|
-
(0, class_validator_1.IsOptional)(),
|
|
22
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], UpdateAttributeDto.prototype, "key", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, class_validator_1.IsString)(),
|
|
27
|
-
(0, class_validator_1.IsOptional)(),
|
|
28
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], UpdateAttributeDto.prototype, "value", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsEnum)(app_config_1.UserAttributeType),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
35
|
-
__metadata("design:type", Number)
|
|
36
|
-
], UpdateAttributeDto.prototype, "type", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsObject)(),
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
41
|
-
__metadata("design:type", Object)
|
|
42
|
-
], UpdateAttributeDto.prototype, "meta", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, class_validator_1.IsString)(),
|
|
45
|
-
(0, class_validator_1.IsOptional)(),
|
|
46
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], UpdateAttributeDto.prototype, "status", void 0);
|
|
49
|
-
//# sourceMappingURL=update-attribute.dto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-attribute.dto.js","sourceRoot":"","sources":["../../../../../../libs/bridge/src/api/attribute/dto/update-attribute.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,qDAAyE;AACzE,oDAA8E;AAE9E,MAAa,kBAAkB;CAyB9B;AAzBD,gDAyBC;AArBC;IAHC,IAAA,wBAAM,EAAC,iCAAoB,CAAC;IAC5B,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;+CACK;AAK3B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACP;AAKf;IAHC,IAAA,wBAAM,EAAC,8BAAiB,CAAC;IACzB,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACG;AAKzB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACX;AAKX;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;kDACN"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from '@thescaffold/ntx-core';
|
|
2
|
-
import { UserAttributeKeyType, UserAttributeType } from '../../../app.config';
|
|
3
|
-
import { User } from '../../user/entities/user.entity';
|
|
4
|
-
export declare class Attribute extends BaseEntity {
|
|
5
|
-
userId: string;
|
|
6
|
-
user?: User;
|
|
7
|
-
key: UserAttributeKeyType;
|
|
8
|
-
value?: string;
|
|
9
|
-
type?: UserAttributeType;
|
|
10
|
-
meta?: any;
|
|
11
|
-
status?: string;
|
|
12
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
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.Attribute = void 0;
|
|
13
|
-
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const app_config_1 = require("../../../app.config");
|
|
16
|
-
const user_entity_1 = require("../../user/entities/user.entity");
|
|
17
|
-
let Attribute = class Attribute extends ntx_core_1.BaseEntity {
|
|
18
|
-
};
|
|
19
|
-
exports.Attribute = Attribute;
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, typeorm_1.Index)(),
|
|
22
|
-
(0, typeorm_1.Column)('char', { name: 'userId', length: 36 }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], Attribute.prototype, "userId", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.ManyToOne)((type) => user_entity_1.User, (user) => user.attributes, {
|
|
27
|
-
createForeignKeyConstraints: false,
|
|
28
|
-
}),
|
|
29
|
-
__metadata("design:type", user_entity_1.User)
|
|
30
|
-
], Attribute.prototype, "user", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, typeorm_1.Index)(),
|
|
33
|
-
(0, typeorm_1.Column)('varchar', { name: 'key', length: 52 }),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], Attribute.prototype, "key", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)('varchar', { name: 'value', nullable: true, length: 255 }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], Attribute.prototype, "value", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Index)(),
|
|
42
|
-
(0, typeorm_1.Column)('varchar', { name: 'type', nullable: true, length: 26 }),
|
|
43
|
-
__metadata("design:type", Number)
|
|
44
|
-
], Attribute.prototype, "type", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)('json', { name: 'meta', nullable: true }),
|
|
47
|
-
__metadata("design:type", Object)
|
|
48
|
-
], Attribute.prototype, "meta", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Index)(),
|
|
51
|
-
(0, typeorm_1.Column)('varchar', { name: 'status', nullable: true, length: 26 }),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], Attribute.prototype, "status", void 0);
|
|
54
|
-
exports.Attribute = Attribute = __decorate([
|
|
55
|
-
(0, typeorm_1.Entity)({
|
|
56
|
-
name: 'BridgeAttributes',
|
|
57
|
-
orderBy: {
|
|
58
|
-
createdAt: 'DESC',
|
|
59
|
-
},
|
|
60
|
-
})
|
|
61
|
-
], Attribute);
|
|
62
|
-
//# sourceMappingURL=attribute.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attribute.entity.js","sourceRoot":"","sources":["../../../../../../libs/bridge/src/api/attribute/entities/attribute.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAA2D;AAC3D,oDAA8E;AAC9E,iEAAuD;AAQhD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,qBAAU;CA2BxC,CAAA;AA3BY,8BAAS;AAGpB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;yCAChC;AAKf;IAHC,IAAA,mBAAS,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE;QACpD,2BAA2B,EAAE,KAAK;KACnC,CAAC;8BACK,kBAAI;uCAAC;AAIZ;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;sCACrB;AAG1B;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCACnD;AAIf;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uCACvC;AAGzB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACtC;AAIX;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;yCAClD;oBA1BL,SAAS;IANrB,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE;YACP,SAAS,EAAE,MAAM;SAClB;KACF,CAAC;GACW,SAAS,CA2BrB"}
|
package/api/attribute/index.d.ts
DELETED
package/api/attribute/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./attribute.controller"), exports);
|
|
18
|
-
__exportStar(require("./attribute.module"), exports);
|
|
19
|
-
__exportStar(require("./attribute.service"), exports);
|
|
20
|
-
__exportStar(require("./dto/create-attribute.dto"), exports);
|
|
21
|
-
__exportStar(require("./dto/update-attribute.dto"), exports);
|
|
22
|
-
__exportStar(require("./entities/attribute.entity"), exports);
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/bridge/src/api/attribute/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,qDAAmC;AACnC,sDAAoC;AACpC,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ConfigService } from '@nestjs/config';
|
|
2
|
-
import { LanguageService, MarkerService, MediaService } from '@thescaffold/ntx-core';
|
|
3
|
-
import { DatacenterStatusType } from '../../app.config';
|
|
4
|
-
import { LicenseService } from '../license';
|
|
5
|
-
import { LicenseTypeService } from '../license-type';
|
|
6
|
-
import { PlanTypeService } from '../plan-type';
|
|
7
|
-
import { PreferenceService } from '../preference';
|
|
8
|
-
import { WebhookService } from '../webhook';
|
|
9
|
-
import { DatacenterService } from './datacenter.service';
|
|
10
|
-
import { CreateDatacenterDto } from './dto/create-datacenter.dto';
|
|
11
|
-
import { UpdateDatacenterDto } from './dto/update-datacenter.dto';
|
|
12
|
-
import { Datacenter } from './entities/datacenter.entity';
|
|
13
|
-
declare const DatacenterController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<Datacenter, CreateDatacenterDto, UpdateDatacenterDto>>;
|
|
14
|
-
export declare class DatacenterController extends DatacenterController_base {
|
|
15
|
-
private readonly datacenterService;
|
|
16
|
-
protected readonly languageService: LanguageService;
|
|
17
|
-
protected readonly mediaService: MediaService;
|
|
18
|
-
protected readonly configService: ConfigService;
|
|
19
|
-
private readonly markerService;
|
|
20
|
-
private readonly licenseService;
|
|
21
|
-
private readonly licenseTypeService;
|
|
22
|
-
private readonly preferenceService;
|
|
23
|
-
private readonly planTypeService;
|
|
24
|
-
private readonly webhookService;
|
|
25
|
-
protected name: string;
|
|
26
|
-
protected searchable: string[];
|
|
27
|
-
protected service: DatacenterService;
|
|
28
|
-
protected unique: ({ workspaceId, name }: Datacenter) => {
|
|
29
|
-
workspaceId: string;
|
|
30
|
-
name: string;
|
|
31
|
-
}[];
|
|
32
|
-
protected morphRequest: (entity: Datacenter) => Datacenter;
|
|
33
|
-
protected morphs: {
|
|
34
|
-
beforeCreate: (payload: CreateDatacenterDto, context: any) => Promise<{
|
|
35
|
-
userId: any;
|
|
36
|
-
clientId: any;
|
|
37
|
-
workspaceId: any;
|
|
38
|
-
name: string;
|
|
39
|
-
desc: string;
|
|
40
|
-
meta: {
|
|
41
|
-
licenseType: import("./dto/create-datacenter.dto").LicenseTypeDto;
|
|
42
|
-
preferences: import("./dto/create-datacenter.dto").PreferenceDto[];
|
|
43
|
-
planTypes: import("./dto/create-datacenter.dto").PlanTypeDto[];
|
|
44
|
-
webhooks: import("./dto/create-datacenter.dto").WebhookDto[];
|
|
45
|
-
amount: number;
|
|
46
|
-
};
|
|
47
|
-
status: DatacenterStatusType;
|
|
48
|
-
}>;
|
|
49
|
-
beforeUpdate: (payload: UpdateDatacenterDto, context: any) => Promise<{
|
|
50
|
-
name: string;
|
|
51
|
-
desc: string;
|
|
52
|
-
meta: {
|
|
53
|
-
licenseType: import("./dto/create-datacenter.dto").LicenseTypeDto;
|
|
54
|
-
preferences: import("./dto/create-datacenter.dto").PreferenceDto[];
|
|
55
|
-
planTypes: import("./dto/create-datacenter.dto").PlanTypeDto[];
|
|
56
|
-
webhooks: import("./dto/create-datacenter.dto").WebhookDto[];
|
|
57
|
-
amount: number;
|
|
58
|
-
};
|
|
59
|
-
}>;
|
|
60
|
-
};
|
|
61
|
-
protected hooks: {
|
|
62
|
-
afterCreate: (entity: Datacenter, context: any, payload: any) => Promise<void>;
|
|
63
|
-
afterUpdate: (entity: Datacenter, context: any, payload: any) => Promise<void>;
|
|
64
|
-
};
|
|
65
|
-
constructor(datacenterService: DatacenterService, languageService: LanguageService, mediaService: MediaService, configService: ConfigService, markerService: MarkerService, licenseService: LicenseService, licenseTypeService: LicenseTypeService, preferenceService: PreferenceService, planTypeService: PlanTypeService, webhookService: WebhookService);
|
|
66
|
-
private process;
|
|
67
|
-
}
|
|
68
|
-
export {};
|