UNPKG

@regacy-innovation/shared-services

Version:

Shared services for NestJS microservices

329 lines (328 loc) 12 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 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; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdeaDto = void 0; const class_validator_1 = require("class-validator"); const class_transformer_1 = require("class-transformer"); // ---------- Sub-DTOs ---------- class IdeaInfoDto { } __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaInfoDto.prototype, "name", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaInfoDto.prototype, "description", void 0); class AssetDto { } __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], AssetDto.prototype, "name", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], AssetDto.prototype, "description", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], AssetDto.prototype, "type", void 0); class MatchedGuideDto { } __decorate([ (0, class_validator_1.IsNumber)(), __metadata("design:type", Number) ], MatchedGuideDto.prototype, "score", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], MatchedGuideDto.prototype, "name", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], MatchedGuideDto.prototype, "description", void 0); class ReviewItemDto { } __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], ReviewItemDto.prototype, "materialName", void 0); __decorate([ (0, class_validator_1.IsNumber)(), __metadata("design:type", Number) ], ReviewItemDto.prototype, "score", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], ReviewItemDto.prototype, "explanation", void 0); __decorate([ (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => MatchedGuideDto), __metadata("design:type", MatchedGuideDto) ], ReviewItemDto.prototype, "matchedGuide", void 0); class IdeaReviewDto { } __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaReviewDto.prototype, "_id", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => ReviewItemDto), __metadata("design:type", Array) ], IdeaReviewDto.prototype, "reviews", void 0); __decorate([ (0, class_validator_1.IsNumber)(), __metadata("design:type", Number) ], IdeaReviewDto.prototype, "overallScore", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaReviewDto.prototype, "feedback", void 0); __decorate([ (0, class_validator_1.IsArray)(), (0, class_validator_1.IsString)({ each: true }), __metadata("design:type", Array) ], IdeaReviewDto.prototype, "recommendations", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaReviewDto.prototype, "ideaId", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaReviewDto.prototype, "createdAt", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaReviewDto.prototype, "updatedAt", void 0); class LandingPageDto { } __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], LandingPageDto.prototype, "_id", void 0); __decorate([ (0, class_validator_1.IsEnum)(['processing', 'error', 'done']), __metadata("design:type", String) ], LandingPageDto.prototype, "status", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", Object) ], LandingPageDto.prototype, "url", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], LandingPageDto.prototype, "ideaId", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], LandingPageDto.prototype, "createdAt", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], LandingPageDto.prototype, "updatedAt", void 0); // ---------- ThirdStep DTO ---------- class ThirdStepDto { } __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdStepOneResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdTwoStepResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdThreeStepResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdFourStepResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdFiveStepResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdSixStepResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdSevenResponse", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], ThirdStepDto.prototype, "thirdEightResponse", void 0); // ---------- Placeholder External Steps ---------- class FirstStep { } class SecondStep { } // ---------- Steps DTO ---------- class StepsDto { } __decorate([ (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => FirstStep), __metadata("design:type", Object) ], StepsDto.prototype, "firstStep", void 0); __decorate([ (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => SecondStep), __metadata("design:type", Object) ], StepsDto.prototype, "secondStep", void 0); __decorate([ (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => ThirdStepDto), __metadata("design:type", ThirdStepDto) ], StepsDto.prototype, "thirdStep", void 0); // ---------- Main Idea DTO ---------- class IdeaDto { } exports.IdeaDto = IdeaDto; __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "_id", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], IdeaDto.prototype, "imageUrls", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "ideaImagePrompt", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "sessionId", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => IdeaReviewDto), __metadata("design:type", IdeaReviewDto) ], IdeaDto.prototype, "reviewId", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => LandingPageDto), __metadata("design:type", LandingPageDto) ], IdeaDto.prototype, "landingPageId", void 0); __decorate([ (0, class_validator_1.IsObject)(), __metadata("design:type", Object) ], IdeaDto.prototype, "toyotaWhyWhy", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "stepIdentifier", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "name", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "client", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "clientDivision", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "ideaOwnerProfile", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "pestSummary", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "problems", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "solutions", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "solutionAndValues", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "keyMetrixes", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "values", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "customerSegments", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "channels", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "winnabilities", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "revenueStreams", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => IdeaInfoDto), __metadata("design:type", Array) ], IdeaDto.prototype, "costStructures", void 0); __decorate([ (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => AssetDto), __metadata("design:type", Array) ], IdeaDto.prototype, "assets", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "advantageAndAssets", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], IdeaDto.prototype, "marketSize", void 0); __decorate([ (0, class_validator_1.IsBoolean)(), __metadata("design:type", Boolean) ], IdeaDto.prototype, "isLove", void 0); __decorate([ (0, class_validator_1.IsBoolean)(), __metadata("design:type", Boolean) ], IdeaDto.prototype, "isHate", void 0); __decorate([ (0, class_validator_1.ValidateNested)(), (0, class_transformer_1.Type)(() => StepsDto), __metadata("design:type", StepsDto) ], IdeaDto.prototype, "steps", void 0);