@solidstarters/solid-core 1.2.128 → 1.2.130

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.
Files changed (42) hide show
  1. package/dist/dtos/create-field-metadata.dto.d.ts +1 -1
  2. package/dist/dtos/create-field-metadata.dto.d.ts.map +1 -1
  3. package/dist/dtos/create-field-metadata.dto.js +11 -2
  4. package/dist/dtos/create-field-metadata.dto.js.map +1 -1
  5. package/dist/entities/field-metadata.entity.d.ts +1 -1
  6. package/dist/entities/field-metadata.entity.d.ts.map +1 -1
  7. package/dist/entities/field-metadata.entity.js +1 -1
  8. package/dist/entities/field-metadata.entity.js.map +1 -1
  9. package/dist/filters/http-exception.filter.d.ts +2 -0
  10. package/dist/filters/http-exception.filter.d.ts.map +1 -1
  11. package/dist/filters/http-exception.filter.js +17 -16
  12. package/dist/filters/http-exception.filter.js.map +1 -1
  13. package/dist/helpers/schematic.service.js +1 -1
  14. package/dist/helpers/schematic.service.js.map +1 -1
  15. package/dist/helpers/solid-registry.d.ts.map +1 -1
  16. package/dist/helpers/solid-registry.js.map +1 -1
  17. package/dist/seeders/seed-data/solid-core-metadata.json +16 -3
  18. package/dist/services/field-metadata.service.d.ts.map +1 -1
  19. package/dist/services/field-metadata.service.js.map +1 -1
  20. package/dist/services/model-metadata.service.d.ts +1 -0
  21. package/dist/services/model-metadata.service.d.ts.map +1 -1
  22. package/dist/services/model-metadata.service.js +15 -3
  23. package/dist/services/model-metadata.service.js.map +1 -1
  24. package/dist/solid-core.module.d.ts.map +1 -1
  25. package/dist/solid-core.module.js +5 -0
  26. package/dist/solid-core.module.js.map +1 -1
  27. package/dist/subscribers/computed-entity-field.subscriber.d.ts +6 -4
  28. package/dist/subscribers/computed-entity-field.subscriber.d.ts.map +1 -1
  29. package/dist/subscribers/computed-entity-field.subscriber.js +28 -23
  30. package/dist/subscribers/computed-entity-field.subscriber.js.map +1 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
  33. package/src/dtos/create-field-metadata.dto.ts +4 -2
  34. package/src/entities/field-metadata.entity.ts +1 -1
  35. package/src/filters/http-exception.filter.ts +16 -15
  36. package/src/helpers/schematic.service.ts +1 -1
  37. package/src/helpers/solid-registry.ts +0 -10
  38. package/src/seeders/seed-data/solid-core-metadata.json +16 -3
  39. package/src/services/field-metadata.service.ts +1 -1
  40. package/src/services/model-metadata.service.ts +21 -23
  41. package/src/solid-core.module.ts +6 -0
  42. package/src/subscribers/computed-entity-field.subscriber.ts +45 -35
@@ -106,7 +106,7 @@ export declare enum ComputedFieldTriggerOperation {
106
106
  beforeRemove = "before-delete",
107
107
  afterRemove = "after-delete"
108
108
  }
109
- export interface ComputedFieldTriggerConfig {
109
+ export declare class ComputedFieldTriggerConfig {
110
110
  moduleName: string;
111
111
  modelName: string;
112
112
  operations: ComputedFieldTriggerOperation[];
@@ -1 +1 @@
1
- {"version":3,"file":"create-field-metadata.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/create-field-metadata.dto.ts"],"names":[],"mappings":"AAaA,oBAAY,qBAAqB;IAC/B,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,cAAc;IAExB,GAAG,QAAQ;IACX,MAAM,WAAW;IAGjB,OAAO,YAAY;IAGnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,IAAI,SAAS;IAGb,OAAO,YAAY;IAGnB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAE/B,KAAK,UAAU;IACf,QAAQ,aAAa;IAGrB,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IAErC,QAAQ,aAAa;IAErB,IAAI,SAAS;CACd;AAED,oBAAY,OA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AC;IAKxB,cAAc,EAAE,MAAM,CAAC;IAKvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAKhC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAUrC,YAAY,EAAE,YAAY,CAAC;IAK3B,2BAA2B,EAAE,MAAM,CAAC;IAKpC,qBAAqB,EAAE,OAAO,CAAC;IAK/B,eAAe,EAAE,WAAW,CAAC;IAI7B,uBAAuB,EAAE,MAAM,CAAC;IAIhC,wBAAwB,EAAE,MAAM,CAAC;IAIjC,yBAAyB,EAAE,OAAO,CAAC;IAKnC,wBAAwB,EAAE,MAAM,CAAC;IAQjC,wBAAwB,EAAE,MAAM,CAAC;IAKjC,4BAA4B,EAAE,MAAM,CAAC;IAOrC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAKhC,kBAAkB,EAAE,kBAAkB,CAAC;IAKvC,0BAA0B,EAAE,MAAM,CAAC;IAKnC,8BAA8B,EAAE,MAAM,CAAC;IAKvC,sBAAsB,EAAE,sBAAsB,CAAC;IAK/C,0BAA0B,EAAE,0BAA0B,EAAE,CAAC;IAMzD,IAAI,EAAE,MAAM,CAAC;IAKb,QAAQ,EAAE,OAAO,CAAC;IAKlB,kBAAkB,EAAE,OAAO,CAAC;IAK5B,UAAU,EAAE,MAAM,CAAA;IAKlB,yBAAyB,EAAE,MAAM,CAAA;IAKjC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAK3B,qBAAqB,EAAE,MAAM,CAAA;IAI7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAK9B,aAAa,EAAE,OAAO,CAAC;CACxB"}
@@ -9,9 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreateFieldMetadataDto = exports.ComputedFieldTriggerOperation = exports.ComputedFieldValueType = exports.SelectionValueType = exports.CascadeType = exports.RelationType = exports.MediaType = exports.DecryptWhenType = exports.EncryptionType = exports.PSQLType = exports.MySQLType = exports.OrmType = exports.SolidFieldType = exports.RelationFieldsCommand = void 0;
12
+ exports.CreateFieldMetadataDto = exports.ComputedFieldTriggerConfig = exports.ComputedFieldTriggerOperation = exports.ComputedFieldValueType = exports.SelectionValueType = exports.CascadeType = exports.RelationType = exports.MediaType = exports.DecryptWhenType = exports.EncryptionType = exports.PSQLType = exports.MySQLType = exports.OrmType = exports.SolidFieldType = exports.RelationFieldsCommand = void 0;
13
13
  const openapi = require("@nestjs/swagger");
14
14
  const swagger_1 = require("@nestjs/swagger");
15
+ const class_transformer_1 = require("class-transformer");
15
16
  const class_validator_1 = require("class-validator");
16
17
  var RelationFieldsCommand;
17
18
  (function (RelationFieldsCommand) {
@@ -134,9 +135,15 @@ var ComputedFieldTriggerOperation;
134
135
  ComputedFieldTriggerOperation["beforeRemove"] = "before-delete";
135
136
  ComputedFieldTriggerOperation["afterRemove"] = "after-delete";
136
137
  })(ComputedFieldTriggerOperation || (exports.ComputedFieldTriggerOperation = ComputedFieldTriggerOperation = {}));
138
+ class ComputedFieldTriggerConfig {
139
+ static _OPENAPI_METADATA_FACTORY() {
140
+ return { moduleName: { required: true, type: () => String }, modelName: { required: true, type: () => String }, operations: { required: true, enum: require("./create-field-metadata.dto").ComputedFieldTriggerOperation, isArray: true } };
141
+ }
142
+ }
143
+ exports.ComputedFieldTriggerConfig = ComputedFieldTriggerConfig;
137
144
  class CreateFieldMetadataDto {
138
145
  static _OPENAPI_METADATA_FACTORY() {
139
- return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, description: { required: true, type: () => String }, type: { required: true, enum: require("./create-field-metadata.dto").SolidFieldType }, modelId: { required: true, type: () => Number }, ormType: { required: true, enum: require("./create-field-metadata.dto").PSQLType }, length: { required: true, type: () => Number }, defaultValue: { required: true, type: () => String }, regexPattern: { required: true, type: () => String }, regexPatternNotMatchingErrorMsg: { required: true, type: () => String }, required: { required: true, type: () => Boolean }, unique: { required: true, type: () => Boolean }, encrypt: { required: true, type: () => Boolean }, encryptionType: { required: true, enum: require("./create-field-metadata.dto").EncryptionType }, decryptWhen: { required: true, enum: require("./create-field-metadata.dto").DecryptWhenType }, index: { required: true, type: () => Boolean }, max: { required: true, type: () => Number }, min: { required: true, type: () => Number }, private: { required: true, type: () => Boolean }, mediaTypes: { required: true, enum: require("./create-field-metadata.dto").MediaType, isArray: true }, mediaMaxSizeKb: { required: true, type: () => Number }, mediaStorageProviderId: { required: false, type: () => Number }, mediaStorageProviderUserKey: { required: false, type: () => String }, relationType: { required: true, enum: require("./create-field-metadata.dto").RelationType }, relationCoModelSingularName: { required: true, type: () => String }, relationCreateInverse: { required: true, type: () => Boolean }, relationCascade: { required: true, enum: require("./create-field-metadata.dto").CascadeType }, relationModelModuleName: { required: true, type: () => String }, relationCoModelFieldName: { required: true, type: () => String }, isRelationManyToManyOwner: { required: true, type: () => Boolean }, relationFieldFixedFilter: { required: true, type: () => String }, selectionDynamicProvider: { required: true, type: () => String }, selectionDynamicProviderCtxt: { required: true, type: () => String }, selectionStaticValues: { required: true, type: () => [String], pattern: "/^[\\w\\s\\d-]+:[\\w\\s-]+$/" }, selectionValueType: { required: true, enum: require("./create-field-metadata.dto").SelectionValueType }, computedFieldValueProvider: { required: true, type: () => String }, computedFieldValueProviderCtxt: { required: true, type: () => String }, computedFieldValueType: { required: true, enum: require("./create-field-metadata.dto").ComputedFieldValueType }, computedFieldTriggerConfig: { required: true, type: () => [Object] }, uuid: { required: true, type: () => String }, isSystem: { required: true, type: () => Boolean }, isMarkedForRemoval: { required: true, type: () => Boolean }, columnName: { required: true, type: () => String }, relationCoModelColumnName: { required: true, type: () => String }, isUserKey: { required: true, type: () => Boolean }, relationJoinTableName: { required: true, type: () => String }, enableAuditTracking: { required: false, type: () => Boolean }, isMultiSelect: { required: true, type: () => Boolean } };
146
+ return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, description: { required: true, type: () => String }, type: { required: true, enum: require("./create-field-metadata.dto").SolidFieldType }, modelId: { required: true, type: () => Number }, ormType: { required: true, enum: require("./create-field-metadata.dto").PSQLType }, length: { required: true, type: () => Number }, defaultValue: { required: true, type: () => String }, regexPattern: { required: true, type: () => String }, regexPatternNotMatchingErrorMsg: { required: true, type: () => String }, required: { required: true, type: () => Boolean }, unique: { required: true, type: () => Boolean }, encrypt: { required: true, type: () => Boolean }, encryptionType: { required: true, enum: require("./create-field-metadata.dto").EncryptionType }, decryptWhen: { required: true, enum: require("./create-field-metadata.dto").DecryptWhenType }, index: { required: true, type: () => Boolean }, max: { required: true, type: () => Number }, min: { required: true, type: () => Number }, private: { required: true, type: () => Boolean }, mediaTypes: { required: true, enum: require("./create-field-metadata.dto").MediaType, isArray: true }, mediaMaxSizeKb: { required: true, type: () => Number }, mediaStorageProviderId: { required: false, type: () => Number }, mediaStorageProviderUserKey: { required: false, type: () => String }, relationType: { required: true, enum: require("./create-field-metadata.dto").RelationType }, relationCoModelSingularName: { required: true, type: () => String }, relationCreateInverse: { required: true, type: () => Boolean }, relationCascade: { required: true, enum: require("./create-field-metadata.dto").CascadeType }, relationModelModuleName: { required: true, type: () => String }, relationCoModelFieldName: { required: true, type: () => String }, isRelationManyToManyOwner: { required: true, type: () => Boolean }, relationFieldFixedFilter: { required: true, type: () => String }, selectionDynamicProvider: { required: true, type: () => String }, selectionDynamicProviderCtxt: { required: true, type: () => String }, selectionStaticValues: { required: true, type: () => [String], pattern: "/^[\\w\\s\\d-]+:[\\w\\s-]+$/" }, selectionValueType: { required: true, enum: require("./create-field-metadata.dto").SelectionValueType }, computedFieldValueProvider: { required: true, type: () => String }, computedFieldValueProviderCtxt: { required: true, type: () => String }, computedFieldValueType: { required: true, enum: require("./create-field-metadata.dto").ComputedFieldValueType }, computedFieldTriggerConfig: { required: true, type: () => [require("./create-field-metadata.dto").ComputedFieldTriggerConfig] }, uuid: { required: true, type: () => String }, isSystem: { required: true, type: () => Boolean }, isMarkedForRemoval: { required: true, type: () => Boolean }, columnName: { required: true, type: () => String }, relationCoModelColumnName: { required: true, type: () => String }, isUserKey: { required: true, type: () => Boolean }, relationJoinTableName: { required: true, type: () => String }, enableAuditTracking: { required: false, type: () => Boolean }, isMultiSelect: { required: true, type: () => Boolean } };
140
147
  }
141
148
  }
142
149
  exports.CreateFieldMetadataDto = CreateFieldMetadataDto;
@@ -362,6 +369,8 @@ __decorate([
362
369
  __metadata("design:type", String)
363
370
  ], CreateFieldMetadataDto.prototype, "computedFieldValueType", void 0);
364
371
  __decorate([
372
+ (0, class_validator_1.IsArray)(),
373
+ (0, class_transformer_1.Type)(() => ComputedFieldTriggerConfig),
365
374
  (0, class_validator_1.IsOptional)(),
366
375
  __metadata("design:type", Array)
367
376
  ], CreateFieldMetadataDto.prototype, "computedFieldTriggerConfig", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"create-field-metadata.dto.js","sourceRoot":"","sources":["../../src/dtos/create-field-metadata.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAG9C,qDASyB;AACzB,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,oCAAW,CAAA;IACX,wCAAe,CAAA;IACf,sCAAa,CAAA;IACb,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;AACnB,CAAC,EARW,qBAAqB,qCAArB,qBAAqB,QAQhC;AAED,IAAY,cAuCX;AAvCD,WAAY,cAAc;IAExB,6BAAW,CAAA;IACX,mCAAiB,CAAA;IAGjB,qCAAmB,CAAA;IAGnB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;IACrB,+BAAa,CAAA;IAGb,qCAAmB,CAAA;IAGnB,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,+BAAa,CAAA;IAGb,uCAAqB,CAAA;IAGrB,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAE/B,iCAAe,CAAA;IACf,uCAAqB,CAAA;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AAE,4HAA4H,GAAG,CAAC;IAC3J,IAAA,2BAAS,GAAE;;wDACM;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,4DAA4D,GAAG,CAAC;IAC3F,IAAA,2BAAS,GAAE;;kEACgB;AAK5B;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sBAAsB,GAAG,CAAC;IACrD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACK;AAKlB;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,uCAAuC,GAAG,CAAC;IACtE,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACoB;AAKxB;IAHR,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;IAC3C,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;yDACe;AAK3B;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mCAAmC,GAAG,CAAC;IAClE,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qEACgB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;mEACkB;AAK9B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sBAAsB,GAAG,CAAC;IACrD,IAAA,2BAAS,GAAE;;6DACW","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { Transform } from 'class-transformer';\n\nimport {\n IsArray,\n IsBoolean,\n IsEnum,\n IsInt,\n IsOptional,\n IsString,\n Matches,\n ValidateIf\n} from 'class-validator';\nexport enum RelationFieldsCommand {\n set = \"set\",\n clear = \"clear\",\n link = \"link\",\n unlink = \"unlink\",\n create = \"create\",\n update = \"update\",\n delete = \"delete\"\n}\n\nexport enum SolidFieldType {\n // numeric types\n int = 'int',\n bigint = 'bigint',\n // float = 'float',\n // double = 'double',\n decimal = 'decimal',\n\n // text types\n shortText = 'shortText',\n longtext = 'longText',\n richText = 'richText',\n json = 'json',\n\n // boolean types\n boolean = 'boolean',\n\n // date\n date = 'date',\n datetime = 'datetime',\n time = 'time',\n\n // relation\n relation = 'relation',\n\n // media\n mediaSingle = 'mediaSingle',\n mediaMultiple = 'mediaMultiple',\n\n email = 'email',\n password = 'password',\n\n // selection\n selectionStatic = 'selectionStatic',\n selectionDynamic = 'selectionDynamic',\n\n computed = 'computed',\n\n uuid = 'uuid'\n}\n\nexport enum OrmType {\n MySQLType,\n}\n\nexport enum MySQLType { //FIXME Currently this type is being used in the definition, Need to use OrmType instead\n // Numeric types\n int = 'int',\n decimal = 'decimal',\n double = 'double',\n\n // Text types\n // fieldType=shortText\n varchar = 'varchar',\n // fieldType=longText\n text = 'shortText',\n mediumtext = 'mediumtext',\n longtext = 'longtext',\n\n // Boolean types\n // fieldType=boolean\n bool = 'bool',\n boolean = 'boolean',\n\n //Date Types\n date = 'date',\n datetime = 'datetime',\n timestamp = 'timestamp',\n time = 'time',\n\n // Other types\n json = 'json',\n\n}\n\nexport enum PSQLType { //FIXME Currently this type is being used in the definition, Need to use OrmType instead\n // Numeric types\n integer = 'integer',\n decimal = 'decimal',\n bigint = 'bigint',\n\n // Text types\n varchar = 'varchar',\n text = 'text',\n\n // Boolean types\n boolean = 'boolean',\n\n // Date types\n timestamp = 'timestamp',\n timestamptz = 'timestamptz',\n time = 'time',\n date = 'date',\n\n // Other types\n json = 'json',\n jsonb = 'jsonb',\n}\n\n\nexport enum EncryptionType {\n aes128 = 'aes-128',\n aes256 = 'aes-256',\n}\n\nexport enum DecryptWhenType {\n beforeTransit = 'before-transit',\n afterTransit = 'after-transit',\n}\n\nexport enum MediaType {\n image = 'image',\n audio = 'audio',\n video = 'video',\n // document = 'document',\n file = 'file',\n}\n\nexport enum RelationType {\n manyToOne = 'many-to-one',\n manyTomany = 'many-to-many',\n oneToMany = 'one-to-many',\n}\n\nexport enum CascadeType {\n setNull = 'set null',\n restrict = 'restrict',\n cascade = 'cascade',\n}\n\n// export enum MediaStorageProviderType {\n// database = 'database',\n// file = 'file',\n// s3 = 's3',\n// }\n\nexport enum SelectionValueType {\n string = 'string',\n int = 'int',\n}\n\nexport enum ComputedFieldValueType {\n string = 'string',\n int = 'int',\n decimal = 'decimal',\n boolean = 'boolean',\n date = 'date',\n datetime = 'datetime',\n}\n\nexport enum ComputedFieldTriggerOperation {\n beforeInsert = \"before-insert\",\n afterInsert = \"after-insert\",\n beforeUpdate = \"before-update\",\n afterUpdate = \"after-update\",\n beforeRemove = \"before-delete\",\n afterRemove = \"after-delete\",\n}\n\nexport interface ComputedFieldTriggerConfig {\n moduleName: string; // Name of the module where the computed field is defined\n modelName: string;\n operations: ComputedFieldTriggerOperation[]; // List of operations where this computed field should be triggered\n}\n\nexport class CreateFieldMetadataDto {\n @ApiProperty({ description: 'Name of your field, this is also the name of the column or attribute', })\n // @Matches(/[a-z]+(_[a-z]+)*/, { message: 'Field name should follow snake case conventions only with all lower case.', })\n @IsString()\n name: string;\n\n @ApiProperty({ description: 'Display name of your field' })\n @IsString()\n readonly displayName: string;\n\n\n @ApiProperty({ description: 'Description of your field' })\n @IsOptional()\n @IsString()\n readonly description: string;\n\n // @ApiProperty({ description: \"Help text associated with this field\" })\n // @IsString()\n // readonly helpText: string;\n\n @ApiProperty({ description: 'Field can have types' })\n @IsEnum(SolidFieldType)\n readonly type: SolidFieldType;\n\n @ApiProperty({ description: 'Related model id' })\n @IsInt()\n @IsOptional()\n readonly modelId: number;\n\n //For all types of fields\n @ApiProperty({ description: 'Field can have orm types specific to your database', })\n @IsEnum(PSQLType)\n @IsOptional()\n readonly ormType: PSQLType;\n\n @ApiProperty({ description: 'Length of the field. Only for type=text' })\n @IsInt()\n @IsOptional()\n readonly length: number;\n\n @ApiProperty({ description: 'Default value of the field' })\n @IsString()\n @IsOptional()\n readonly defaultValue: string;\n\n @ApiProperty({ description: 'Format regex pattern for the field. Only for type=text, longText, email, password', })\n @IsString()\n @IsOptional()\n readonly regexPattern: string;\n\n @ApiProperty({ description: 'If the regex pattern matching fails, then what is the error message to be displayed', })\n @IsString()\n @IsOptional()\n readonly regexPatternNotMatchingErrorMsg: string;\n\n @ApiProperty({ description: 'Is the field mandatory?' })\n @IsBoolean()\n readonly required: boolean;\n\n @ApiProperty({ description: 'Is the field value unique?' })\n @IsBoolean()\n @IsOptional()\n readonly unique: boolean;\n\n @ApiProperty({ description: 'Is the field symmetric encrypted?' })\n @IsBoolean()\n readonly encrypt: boolean;\n\n @ApiProperty({ description: 'Type of encryption. Only if encrypt=true' })\n @IsEnum(EncryptionType)\n @IsOptional()\n readonly encryptionType: EncryptionType;\n\n //Pending\n @ApiProperty({ description: 'At what point do we want to decrypt the data? Only if encrypt=true', })\n @IsEnum(DecryptWhenType)\n @IsOptional()\n decryptWhen: DecryptWhenType;\n\n @ApiProperty({ description: 'Is the field indexed? For all types, except:richText, longText', })\n @IsBoolean()\n index: boolean;\n\n @ApiProperty({ description: 'for text fields, this is length. for numeric fields, this is the range of values allowed. Only for type=shortText,longText,richText,json,int,decimal,date,dateTime,time', })\n @IsInt()\n @IsOptional()\n max: number;\n\n @ApiProperty({ description: 'for text fields, this is length. for numeric fields, this is the range of values allowed. Only for type=shortText,longText,richText,json,int,decimal,date,dateTime,time', })\n @IsInt()\n @IsOptional()\n min: number;\n\n @ApiProperty({ description: 'Is the field private?' })\n @IsBoolean()\n private: boolean;\n\n @ApiProperty({ description: 'Allowed media types for the field. Only for type=mediaSingle,mediaMultiple', })\n @IsEnum(MediaType, { each: true })\n @IsOptional()\n mediaTypes: MediaType[];\n\n @ApiProperty({ description: 'Maximum size of the media in KB. Only for type=mediaSingle,mediaMultiple', })\n @IsInt()\n @IsOptional()\n mediaMaxSizeKb: number;\n\n @ApiProperty({ description: 'Configured Media storage provider. Only for type=mediaSingle,mediaMultiple', })\n @IsInt()\n @IsOptional()\n mediaStorageProviderId?: number;\n\n @ApiProperty({ description: 'Configured Media storage provider. Only for type=mediaSingle,mediaMultiple. When you need to specify the storage provider by name.', })\n @IsInt()\n @IsOptional()\n mediaStorageProviderUserKey?: string;\n\n // @ApiProperty({ description: 'Is the media embedded in the entity table? Only for type=mediaSingle', })\n // @IsBoolean()\n // @IsOptional()\n // mediaEmbedded: boolean;\n\n @ApiProperty({ description: 'Relation Type. Only for type=relation' })\n @IsEnum(RelationType)\n @IsOptional()\n relationType: RelationType;\n\n @ApiProperty({ description: 'Related model for the relation. Only for type=relation' })\n @IsString()\n @IsOptional()\n relationCoModelSingularName: string;\n\n @ApiProperty({ description: 'Create inverse relation. Only for type=relation', })\n @IsBoolean()\n @IsOptional()\n relationCreateInverse: boolean;\n\n @ApiProperty({ description: 'Cascade type. Only for type=relation' })\n @IsEnum(CascadeType)\n @IsOptional()\n relationCascade: CascadeType;\n\n @ApiProperty({ description: 'Related field module. Only required for type=relation, if the related field belongs to a different module' })\n @IsOptional()\n relationModelModuleName: string;\n\n @ApiProperty({ description: 'Related field module. Only required for type=relation and relationType=many-to-many, i.e if the related many to many field belongs to a different model' })\n @IsOptional()\n relationCoModelFieldName: string;\n\n @ApiProperty({ description: 'Only for type=relation, many-to-many. This field is used to set the owner of the many-to-many relation' })\n @IsOptional()\n isRelationManyToManyOwner: boolean;\n\n\n @ApiProperty({ description: 'Only for type=relation, many-to-many. This field is used to store fixed filters that needs to applied on related model' })\n @IsOptional()\n relationFieldFixedFilter: string;\n\n @ApiProperty({\n description:\n 'Dynamic provider for selection. Only for type=selectionDynamic',\n })\n @IsString()\n @IsOptional()\n selectionDynamicProvider: string;\n\n @ApiProperty({ description: 'Dynamic provider Context. Only for type=selectionDynamic', })\n @IsString()\n @IsOptional()\n selectionDynamicProviderCtxt: string;\n\n @ApiProperty({ description: 'Static values for selection. Only for type=selectionStatic', })\n @IsArray()\n @IsString({ each: true })\n @Matches(/^[\\w\\s\\d-]+:[\\w\\s-]+$/, { each: true })\n @IsOptional()\n selectionStaticValues: string[];\n\n @ApiProperty({ description: 'Type of value for selection. Applicable for type=selectionStatic,selectionDynamic', })\n @IsEnum(SelectionValueType)\n @IsOptional()\n selectionValueType: SelectionValueType;\n\n @ApiProperty({ description: 'Computed Field Value Provider. Only for type=computed', })\n @IsString()\n @IsOptional()\n computedFieldValueProvider: string;\n\n @ApiProperty({ description: 'Computed Field Value Provider Context. Only for type=computed', })\n @IsString()\n @IsOptional()\n computedFieldValueProviderCtxt: string;\n\n @ApiProperty({ description: 'Computed field value type. Only for type=computed', })\n @IsEnum(ComputedFieldValueType)\n @IsOptional()\n computedFieldValueType: ComputedFieldValueType;\n\n @IsOptional()\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[];\n\n @IsOptional()\n @ApiProperty({ description: 'Uuid.', })\n @IsString()\n @IsOptional()\n uuid: string;\n\n @IsOptional()\n @ApiProperty({ description: 'System fields are not included in the code generation, the assumption being that system fields have manually written code.', })\n @IsBoolean()\n isSystem: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Marked for removal, this is used to soft delete the field.', })\n @IsBoolean()\n isMarkedForRemoval: boolean;\n\n @ApiProperty({ description: 'Column Name of Field', })\n @IsString()\n @IsOptional()\n columnName: string\n\n @ApiProperty({ description: 'Relation CoModel Column Name of Field', })\n @IsString()\n @IsOptional()\n relationCoModelColumnName: string\n\n @ApiProperty({ description: \"Is User Key\" })\n @IsOptional()\n @IsBoolean()\n readonly isUserKey: boolean\n\n @ApiProperty({ description: 'Relation Join Table Name of Field', })\n @IsString()\n @IsOptional()\n relationJoinTableName: string\n\n @IsOptional()\n @IsBoolean()\n enableAuditTracking?: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Is MultiSelect Field', })\n @IsBoolean()\n isMultiSelect: boolean;\n}"]}
1
+ {"version":3,"file":"create-field-metadata.dto.js","sourceRoot":"","sources":["../../src/dtos/create-field-metadata.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,yDAAoD;AAEpD,qDASyB;AACzB,IAAY,qBAQ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AE;IACZ,IAAA,2BAAS,GAAE;;yDACe;AAK3B;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mCAAmC,GAAG,CAAC;IAClE,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qEACgB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;mEACkB;AAK9B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sBAAsB,GAAG,CAAC;IACrD,IAAA,2BAAS,GAAE;;6DACW","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { Transform, Type } from 'class-transformer';\n\nimport {\n IsArray,\n IsBoolean,\n IsEnum,\n IsInt,\n IsOptional,\n IsString,\n Matches,\n ValidateIf\n} from 'class-validator';\nexport enum RelationFieldsCommand {\n set = \"set\",\n clear = \"clear\",\n link = \"link\",\n unlink = \"unlink\",\n create = \"create\",\n update = \"update\",\n delete = \"delete\"\n}\n\nexport enum SolidFieldType {\n // numeric types\n int = 'int',\n bigint = 'bigint',\n // float = 'float',\n // double = 'double',\n decimal = 'decimal',\n\n // text types\n shortText = 'shortText',\n longtext = 'longText',\n richText = 'richText',\n json = 'json',\n\n // boolean types\n boolean = 'boolean',\n\n // date\n date = 'date',\n datetime = 'datetime',\n time = 'time',\n\n // relation\n relation = 'relation',\n\n // media\n mediaSingle = 'mediaSingle',\n mediaMultiple = 'mediaMultiple',\n\n email = 'email',\n password = 'password',\n\n // selection\n selectionStatic = 'selectionStatic',\n selectionDynamic = 'selectionDynamic',\n\n computed = 'computed',\n\n uuid = 'uuid'\n}\n\nexport enum OrmType {\n MySQLType,\n}\n\nexport enum MySQLType { //FIXME Currently this type is being used in the definition, Need to use OrmType instead\n // Numeric types\n int = 'int',\n decimal = 'decimal',\n double = 'double',\n\n // Text types\n // fieldType=shortText\n varchar = 'varchar',\n // fieldType=longText\n text = 'shortText',\n mediumtext = 'mediumtext',\n longtext = 'longtext',\n\n // Boolean types\n // fieldType=boolean\n bool = 'bool',\n boolean = 'boolean',\n\n //Date Types\n date = 'date',\n datetime = 'datetime',\n timestamp = 'timestamp',\n time = 'time',\n\n // Other types\n json = 'json',\n\n}\n\nexport enum PSQLType { //FIXME Currently this type is being used in the definition, Need to use OrmType instead\n // Numeric types\n integer = 'integer',\n decimal = 'decimal',\n bigint = 'bigint',\n\n // Text types\n varchar = 'varchar',\n text = 'text',\n\n // Boolean types\n boolean = 'boolean',\n\n // Date types\n timestamp = 'timestamp',\n timestamptz = 'timestamptz',\n time = 'time',\n date = 'date',\n\n // Other types\n json = 'json',\n jsonb = 'jsonb',\n}\n\n\nexport enum EncryptionType {\n aes128 = 'aes-128',\n aes256 = 'aes-256',\n}\n\nexport enum DecryptWhenType {\n beforeTransit = 'before-transit',\n afterTransit = 'after-transit',\n}\n\nexport enum MediaType {\n image = 'image',\n audio = 'audio',\n video = 'video',\n // document = 'document',\n file = 'file',\n}\n\nexport enum RelationType {\n manyToOne = 'many-to-one',\n manyTomany = 'many-to-many',\n oneToMany = 'one-to-many',\n}\n\nexport enum CascadeType {\n setNull = 'set null',\n restrict = 'restrict',\n cascade = 'cascade',\n}\n\n// export enum MediaStorageProviderType {\n// database = 'database',\n// file = 'file',\n// s3 = 's3',\n// }\n\nexport enum SelectionValueType {\n string = 'string',\n int = 'int',\n}\n\nexport enum ComputedFieldValueType {\n string = 'string',\n int = 'int',\n decimal = 'decimal',\n boolean = 'boolean',\n date = 'date',\n datetime = 'datetime',\n}\n\nexport enum ComputedFieldTriggerOperation {\n beforeInsert = \"before-insert\",\n afterInsert = \"after-insert\",\n beforeUpdate = \"before-update\",\n afterUpdate = \"after-update\",\n beforeRemove = \"before-delete\",\n afterRemove = \"after-delete\",\n}\n\nexport class ComputedFieldTriggerConfig {\n moduleName: string; // Name of the module where the computed field is defined\n modelName: string;\n operations: ComputedFieldTriggerOperation[]; // List of operations where this computed field should be triggered\n}\n\nexport class CreateFieldMetadataDto {\n @ApiProperty({ description: 'Name of your field, this is also the name of the column or attribute', })\n // @Matches(/[a-z]+(_[a-z]+)*/, { message: 'Field name should follow snake case conventions only with all lower case.', })\n @IsString()\n name: string;\n\n @ApiProperty({ description: 'Display name of your field' })\n @IsString()\n readonly displayName: string;\n\n\n @ApiProperty({ description: 'Description of your field' })\n @IsOptional()\n @IsString()\n readonly description: string;\n\n // @ApiProperty({ description: \"Help text associated with this field\" })\n // @IsString()\n // readonly helpText: string;\n\n @ApiProperty({ description: 'Field can have types' })\n @IsEnum(SolidFieldType)\n readonly type: SolidFieldType;\n\n @ApiProperty({ description: 'Related model id' })\n @IsInt()\n @IsOptional()\n readonly modelId: number;\n\n //For all types of fields\n @ApiProperty({ description: 'Field can have orm types specific to your database', })\n @IsEnum(PSQLType)\n @IsOptional()\n readonly ormType: PSQLType;\n\n @ApiProperty({ description: 'Length of the field. Only for type=text' })\n @IsInt()\n @IsOptional()\n readonly length: number;\n\n @ApiProperty({ description: 'Default value of the field' })\n @IsString()\n @IsOptional()\n readonly defaultValue: string;\n\n @ApiProperty({ description: 'Format regex pattern for the field. Only for type=text, longText, email, password', })\n @IsString()\n @IsOptional()\n readonly regexPattern: string;\n\n @ApiProperty({ description: 'If the regex pattern matching fails, then what is the error message to be displayed', })\n @IsString()\n @IsOptional()\n readonly regexPatternNotMatchingErrorMsg: string;\n\n @ApiProperty({ description: 'Is the field mandatory?' })\n @IsBoolean()\n readonly required: boolean;\n\n @ApiProperty({ description: 'Is the field value unique?' })\n @IsBoolean()\n @IsOptional()\n readonly unique: boolean;\n\n @ApiProperty({ description: 'Is the field symmetric encrypted?' })\n @IsBoolean()\n readonly encrypt: boolean;\n\n @ApiProperty({ description: 'Type of encryption. Only if encrypt=true' })\n @IsEnum(EncryptionType)\n @IsOptional()\n readonly encryptionType: EncryptionType;\n\n //Pending\n @ApiProperty({ description: 'At what point do we want to decrypt the data? Only if encrypt=true', })\n @IsEnum(DecryptWhenType)\n @IsOptional()\n decryptWhen: DecryptWhenType;\n\n @ApiProperty({ description: 'Is the field indexed? For all types, except:richText, longText', })\n @IsBoolean()\n index: boolean;\n\n @ApiProperty({ description: 'for text fields, this is length. for numeric fields, this is the range of values allowed. Only for type=shortText,longText,richText,json,int,decimal,date,dateTime,time', })\n @IsInt()\n @IsOptional()\n max: number;\n\n @ApiProperty({ description: 'for text fields, this is length. for numeric fields, this is the range of values allowed. Only for type=shortText,longText,richText,json,int,decimal,date,dateTime,time', })\n @IsInt()\n @IsOptional()\n min: number;\n\n @ApiProperty({ description: 'Is the field private?' })\n @IsBoolean()\n private: boolean;\n\n @ApiProperty({ description: 'Allowed media types for the field. Only for type=mediaSingle,mediaMultiple', })\n @IsEnum(MediaType, { each: true })\n @IsOptional()\n mediaTypes: MediaType[];\n\n @ApiProperty({ description: 'Maximum size of the media in KB. Only for type=mediaSingle,mediaMultiple', })\n @IsInt()\n @IsOptional()\n mediaMaxSizeKb: number;\n\n @ApiProperty({ description: 'Configured Media storage provider. Only for type=mediaSingle,mediaMultiple', })\n @IsInt()\n @IsOptional()\n mediaStorageProviderId?: number;\n\n @ApiProperty({ description: 'Configured Media storage provider. Only for type=mediaSingle,mediaMultiple. When you need to specify the storage provider by name.', })\n @IsInt()\n @IsOptional()\n mediaStorageProviderUserKey?: string;\n\n // @ApiProperty({ description: 'Is the media embedded in the entity table? Only for type=mediaSingle', })\n // @IsBoolean()\n // @IsOptional()\n // mediaEmbedded: boolean;\n\n @ApiProperty({ description: 'Relation Type. Only for type=relation' })\n @IsEnum(RelationType)\n @IsOptional()\n relationType: RelationType;\n\n @ApiProperty({ description: 'Related model for the relation. Only for type=relation' })\n @IsString()\n @IsOptional()\n relationCoModelSingularName: string;\n\n @ApiProperty({ description: 'Create inverse relation. Only for type=relation', })\n @IsBoolean()\n @IsOptional()\n relationCreateInverse: boolean;\n\n @ApiProperty({ description: 'Cascade type. Only for type=relation' })\n @IsEnum(CascadeType)\n @IsOptional()\n relationCascade: CascadeType;\n\n @ApiProperty({ description: 'Related field module. Only required for type=relation, if the related field belongs to a different module' })\n @IsOptional()\n relationModelModuleName: string;\n\n @ApiProperty({ description: 'Related field module. Only required for type=relation and relationType=many-to-many, i.e if the related many to many field belongs to a different model' })\n @IsOptional()\n relationCoModelFieldName: string;\n\n @ApiProperty({ description: 'Only for type=relation, many-to-many. This field is used to set the owner of the many-to-many relation' })\n @IsOptional()\n isRelationManyToManyOwner: boolean;\n\n\n @ApiProperty({ description: 'Only for type=relation, many-to-many. This field is used to store fixed filters that needs to applied on related model' })\n @IsOptional()\n relationFieldFixedFilter: string;\n\n @ApiProperty({\n description:\n 'Dynamic provider for selection. Only for type=selectionDynamic',\n })\n @IsString()\n @IsOptional()\n selectionDynamicProvider: string;\n\n @ApiProperty({ description: 'Dynamic provider Context. Only for type=selectionDynamic', })\n @IsString()\n @IsOptional()\n selectionDynamicProviderCtxt: string;\n\n @ApiProperty({ description: 'Static values for selection. Only for type=selectionStatic', })\n @IsArray()\n @IsString({ each: true })\n @Matches(/^[\\w\\s\\d-]+:[\\w\\s-]+$/, { each: true })\n @IsOptional()\n selectionStaticValues: string[];\n\n @ApiProperty({ description: 'Type of value for selection. Applicable for type=selectionStatic,selectionDynamic', })\n @IsEnum(SelectionValueType)\n @IsOptional()\n selectionValueType: SelectionValueType;\n\n @ApiProperty({ description: 'Computed Field Value Provider. Only for type=computed', })\n @IsString()\n @IsOptional()\n computedFieldValueProvider: string;\n\n @ApiProperty({ description: 'Computed Field Value Provider Context. Only for type=computed', })\n @IsString()\n @IsOptional()\n computedFieldValueProviderCtxt: string;\n\n @ApiProperty({ description: 'Computed field value type. Only for type=computed', })\n @IsEnum(ComputedFieldValueType)\n @IsOptional()\n computedFieldValueType: ComputedFieldValueType;\n\n @IsArray()\n @Type(() => ComputedFieldTriggerConfig)\n @IsOptional()\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[];\n\n @IsOptional()\n @ApiProperty({ description: 'Uuid.', })\n @IsString()\n @IsOptional()\n uuid: string;\n\n @IsOptional()\n @ApiProperty({ description: 'System fields are not included in the code generation, the assumption being that system fields have manually written code.', })\n @IsBoolean()\n isSystem: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Marked for removal, this is used to soft delete the field.', })\n @IsBoolean()\n isMarkedForRemoval: boolean;\n\n @ApiProperty({ description: 'Column Name of Field', })\n @IsString()\n @IsOptional()\n columnName: string\n\n @ApiProperty({ description: 'Relation CoModel Column Name of Field', })\n @IsString()\n @IsOptional()\n relationCoModelColumnName: string\n\n @ApiProperty({ description: \"Is User Key\" })\n @IsOptional()\n @IsBoolean()\n readonly isUserKey: boolean\n\n @ApiProperty({ description: 'Relation Join Table Name of Field', })\n @IsString()\n @IsOptional()\n relationJoinTableName: string\n\n @IsOptional()\n @IsBoolean()\n enableAuditTracking?: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Is MultiSelect Field', })\n @IsBoolean()\n isMultiSelect: boolean;\n}"]}
@@ -1,7 +1,7 @@
1
+ import { ComputedFieldTriggerConfig } from "src/dtos/create-field-metadata.dto";
1
2
  import { CommonEntity } from "src/entities/common.entity";
2
3
  import { MediaStorageProviderMetadata } from "./media-storage-provider-metadata.entity";
3
4
  import { ModelMetadata } from "./model-metadata.entity";
4
- import { ComputedFieldTriggerConfig } from "src/dtos/create-field-metadata.dto";
5
5
  export declare class FieldMetadata extends CommonEntity {
6
6
  name: string;
7
7
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"field-metadata.entity.d.ts","sourceRoot":"","sources":["../../src/entities/field-metadata.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,qBACa,aAAc,SAAQ,YAAY;IAI3C,IAAI,EAAE,MAAM,CAAC;IAGb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AC;IAGrB,cAAc,EAAE,MAAM,CAAC;IAIvB,oBAAoB,EAAE,4BAA4B,CAAC;IAMnD,YAAY,EAAE,MAAM,CAAC;IAGrB,2BAA2B,EAAE,MAAM,CAAC;IAGpC,qBAAqB,EAAE,OAAO,CAAC;IAG/B,eAAe,EAAE,MAAM,CAAC;IAGxB,uBAAuB,EAAE,MAAM,CAAC;IAIhC,wBAAwB,EAAE,MAAM,CAAC;IAGjC,yBAAyB,EAAE,OAAO,CAAC;IAMnC,wBAAwB,EAAE,MAAM,CAAC;IAGjC,wBAAwB,EAAE,MAAM,CAAC;IAGjC,4BAA4B,EAAE,MAAM,CAAC;IAGrC,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAGhC,kBAAkB,EAAE,MAAM,CAAY;IAMtC,0BAA0B,EAAE,MAAM,CAAC;IAGnC,8BAA8B,EAAE,MAAM,CAAC;IAGvC,sBAAsB,EAAE,MAAM,CAAC;IAG/B,0BAA0B,EAAE,0BAA0B,EAAE,CAAC;IAGzD,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,OAAO,CAAC;IAGlB,kBAAkB,EAAE,OAAO,CAAC;IAG5B,UAAU,EAAE,MAAM,CAAC;IAGnB,yBAAyB,EAAE,MAAM,CAAC;IAGlC,SAAS,EAAE,OAAO,CAAC;IAGnB,qBAAqB,EAAE,MAAM,CAAC;IAG9B,mBAAmB,EAAE,OAAO,CAAC;IAG7B,aAAa,EAAE,OAAO,CAAC;CAC1B"}
@@ -21,7 +21,7 @@ let FieldMetadata = class FieldMetadata extends common_entity_1.CommonEntity {
21
21
  this.selectionValueType = 'string';
22
22
  }
23
23
  static _OPENAPI_METADATA_FACTORY() {
24
- return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, description: { required: true, type: () => String }, type: { required: true, type: () => String }, ormType: { required: true, type: () => String }, model: { required: true, type: () => require("./model-metadata.entity").ModelMetadata }, defaultValue: { required: true, type: () => String }, regexPattern: { required: true, type: () => String }, regexPatternNotMatchingErrorMsg: { required: true, type: () => String }, required: { required: true, type: () => Boolean }, unique: { required: true, type: () => Boolean }, encrypt: { required: true, type: () => Boolean }, encryptionType: { required: true, type: () => String }, decryptWhen: { required: true, type: () => String }, index: { required: true, type: () => Boolean }, length: { required: true, type: () => Number }, max: { required: true, type: () => Number }, min: { required: true, type: () => Number }, private: { required: true, type: () => Boolean }, mediaTypes: { required: true, type: () => [String] }, mediaMaxSizeKb: { required: true, type: () => Number }, mediaStorageProvider: { required: true, type: () => require("./media-storage-provider-metadata.entity").MediaStorageProviderMetadata }, relationType: { required: true, type: () => String }, relationCoModelSingularName: { required: true, type: () => String }, relationCreateInverse: { required: true, type: () => Boolean }, relationCascade: { required: true, type: () => String }, relationModelModuleName: { required: true, type: () => String }, relationCoModelFieldName: { required: true, type: () => String }, isRelationManyToManyOwner: { required: true, type: () => Boolean }, relationFieldFixedFilter: { required: true, type: () => String }, selectionDynamicProvider: { required: true, type: () => String }, selectionDynamicProviderCtxt: { required: true, type: () => String }, selectionStaticValues: { required: true, type: () => [String] }, selectionValueType: { required: true, type: () => String, default: "string" }, computedFieldValueProvider: { required: true, type: () => String }, computedFieldValueProviderCtxt: { required: true, type: () => String }, computedFieldValueType: { required: true, type: () => String }, computedFieldTriggerConfig: { required: true, type: () => [Object] }, uuid: { required: true, type: () => String }, isSystem: { required: true, type: () => Boolean }, isMarkedForRemoval: { required: true, type: () => Boolean }, columnName: { required: true, type: () => String }, relationCoModelColumnName: { required: true, type: () => String }, isUserKey: { required: true, type: () => Boolean }, relationJoinTableName: { required: true, type: () => String }, enableAuditTracking: { required: true, type: () => Boolean }, isMultiSelect: { required: true, type: () => Boolean } };
24
+ return { name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, description: { required: true, type: () => String }, type: { required: true, type: () => String }, ormType: { required: true, type: () => String }, model: { required: true, type: () => require("./model-metadata.entity").ModelMetadata }, defaultValue: { required: true, type: () => String }, regexPattern: { required: true, type: () => String }, regexPatternNotMatchingErrorMsg: { required: true, type: () => String }, required: { required: true, type: () => Boolean }, unique: { required: true, type: () => Boolean }, encrypt: { required: true, type: () => Boolean }, encryptionType: { required: true, type: () => String }, decryptWhen: { required: true, type: () => String }, index: { required: true, type: () => Boolean }, length: { required: true, type: () => Number }, max: { required: true, type: () => Number }, min: { required: true, type: () => Number }, private: { required: true, type: () => Boolean }, mediaTypes: { required: true, type: () => [String] }, mediaMaxSizeKb: { required: true, type: () => Number }, mediaStorageProvider: { required: true, type: () => require("./media-storage-provider-metadata.entity").MediaStorageProviderMetadata }, relationType: { required: true, type: () => String }, relationCoModelSingularName: { required: true, type: () => String }, relationCreateInverse: { required: true, type: () => Boolean }, relationCascade: { required: true, type: () => String }, relationModelModuleName: { required: true, type: () => String }, relationCoModelFieldName: { required: true, type: () => String }, isRelationManyToManyOwner: { required: true, type: () => Boolean }, relationFieldFixedFilter: { required: true, type: () => String }, selectionDynamicProvider: { required: true, type: () => String }, selectionDynamicProviderCtxt: { required: true, type: () => String }, selectionStaticValues: { required: true, type: () => [String] }, selectionValueType: { required: true, type: () => String, default: "string" }, computedFieldValueProvider: { required: true, type: () => String }, computedFieldValueProviderCtxt: { required: true, type: () => String }, computedFieldValueType: { required: true, type: () => String }, computedFieldTriggerConfig: { required: true, type: () => [require("../dtos/create-field-metadata.dto").ComputedFieldTriggerConfig] }, uuid: { required: true, type: () => String }, isSystem: { required: true, type: () => Boolean }, isMarkedForRemoval: { required: true, type: () => Boolean }, columnName: { required: true, type: () => String }, relationCoModelColumnName: { required: true, type: () => String }, isUserKey: { required: true, type: () => Boolean }, relationJoinTableName: { required: true, type: () => String }, enableAuditTracking: { required: true, type: () => Boolean }, isMultiSelect: { required: true, type: () => Boolean } };
25
25
  }
26
26
  };
27
27
  exports.FieldMetadata = FieldMetadata;
@@ -1 +1 @@
1
- {"version":3,"file":"field-metadata.entity.js","sourceRoot":"","sources":["../../src/entities/field-metadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qC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AA,gBAAM,EAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DAC/B;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0DAC7B;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDAC5B;wBA5Jd,aAAa;IADzB,IAAA,gBAAM,EAAC,mBAAmB,CAAC;GACf,aAAa,CA6JzB","sourcesContent":["import { CommonEntity } from \"src/entities/common.entity\";\nimport { Column, Entity, Index, JoinColumn, ManyToOne } from \"typeorm\";\nimport { MediaStorageProviderMetadata } from \"./media-storage-provider-metadata.entity\";\nimport { ModelMetadata } from \"./model-metadata.entity\";\nimport { ComputedFieldTriggerConfig } from \"src/dtos/create-field-metadata.dto\";\n\n@Entity(\"ss_field_metadata\")\nexport class FieldMetadata extends CommonEntity {\n\n // @Index({ unique: true })\n @Column({ name: \"name\" })\n name: string;\n\n @Column({ name: \"display_name\" })\n displayName: string;\n\n @Column({ name: \"decription\", nullable: true })\n description: string;\n\n /** int, char etc... */\n @Column({ name: 'type' })\n type: string;\n\n @Column({ name: 'orm_type', nullable: true })\n ormType: string;\n\n @Index()\n @ManyToOne(() => ModelMetadata, (model) => model.fields, { onDelete: 'CASCADE' })\n @JoinColumn({ name: 'model_id', referencedColumnName: 'id' })\n model: ModelMetadata;\n\n @Column({ name: 'default_value', nullable: true })\n defaultValue: string;\n\n @Column({ name: 'regex_pattern', nullable: true })\n regexPattern: string;\n\n @Column({ name: 'regex_pattern_not_maching_error_msg', nullable: true })\n regexPatternNotMatchingErrorMsg: string;\n\n @Column({ name: \"required\", default: false })\n required: boolean;\n\n @Column({ name: \"unique\", default: false })\n unique: boolean;\n\n @Column({ name: \"encrypt\", default: false })\n encrypt: boolean;\n\n @Column({ name: 'encryption_type', nullable: true })\n encryptionType: string;\n\n @Column({ name: 'decrypt_when', nullable: true })\n decryptWhen: string;\n\n @Column({ name: \"index\", default: false })\n index: boolean;\n\n @Column({ name: 'length', nullable: true })\n length: number;\n\n @Column({ name: 'max', nullable: true })\n max: number;\n\n @Column({ name: 'min', nullable: true })\n min: number;\n\n @Column({ name: \"private\", default: false })\n private: boolean;\n\n @Column(\"json\", { name: 'media_types', nullable: true })\n mediaTypes: string[];\n\n @Column({ name: 'media_max_size_kb', nullable: true })\n mediaMaxSizeKb: number;\n\n @ManyToOne(() => MediaStorageProviderMetadata, { onDelete: 'SET NULL' })\n @JoinColumn({ name: 'media_storage_provider_id' })\n mediaStorageProvider: MediaStorageProviderMetadata;\n\n // @Column({ name: 'media_embedded', default: true })\n // mediaEmbedded: boolean;\n\n @Column({ name: 'relation_type', nullable: true })\n relationType: string;\n\n @Column({ name: 'relation_model_singular_name', nullable: true })\n relationCoModelSingularName: string;\n\n @Column({ name: \"relation_create_inverse\", default: false })\n relationCreateInverse: boolean;\n\n @Column({ name: \"relation_cascade\", nullable: true })\n relationCascade: string;\n\n @Column({ name: 'relation_model_module_name', nullable: true })\n relationModelModuleName: string;\n\n // This field will be used to set the inverse field name in the related model e.g required for many to many relation\n @Column({ name: 'relation_model_field_name', nullable: true })\n relationCoModelFieldName: string;\n\n @Column({ name: 'is_relation_many_to_many_owner', nullable: true })\n isRelationManyToManyOwner: boolean;\n\n // We can store a filter json like this {\"fieldName\": ${someVarWhichWillComeFromParentModel... or can be hard coded...}}\n // {\"type\": \"INDUSTRY\"} .... Eg. static fixedFilter \n // {\"country_id\", \"${country}\"} ... Eg. dynamic fixedFilter \n @Column({ name: 'relation_field_fixed_filter', nullable: true })\n relationFieldFixedFilter: string;\n\n @Column({ name: 'selection_dynamic_provider', nullable: true })\n selectionDynamicProvider: string;\n\n @Column({ name: 'selection_dynamic_provider_ctxt', nullable: true })\n selectionDynamicProviderCtxt: string;\n\n @Column({ name: 'selection_static_values', nullable: true, type: 'simple-array' })\n selectionStaticValues: string[];\n\n @Column({ name: 'selection_value_type', nullable: true, type: 'text' }) // text type cannot have a default value\n selectionValueType: string = 'string';\n\n // @Column({ name: \"computed\", default: false })\n // computed: boolean;\n\n @Column({ name: 'computed_field_value_provider', nullable: true })\n computedFieldValueProvider: string;\n\n @Column({ name: 'computed_field_value_provider_ctxt', nullable: true })\n computedFieldValueProviderCtxt: string;\n\n @Column({ name: 'computed_field_value_type', nullable: true })\n computedFieldValueType: string;\n\n @Column({ name: 'computed_field_trigger_config', nullable: true, type: 'jsonb' })\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[];\n\n @Column({ name: 'uuid', nullable: true })\n uuid: string;\n\n @Column({ default: false })\n isSystem: boolean;\n\n @Column({ default: false })\n isMarkedForRemoval: boolean;\n\n @Column({ name: 'column_name', nullable: true })\n columnName: string;\n\n @Column({ name: 'relation_co_model_column_name', nullable: true })\n relationCoModelColumnName: string;\n\n @Column({ name: \"is_user_key\", default: false })\n isUserKey: boolean;\n\n @Column({ name: 'relation_join_table_name', nullable: true })\n relationJoinTableName: string;\n\n @Column({ name: 'enable_audit_tracking', default: false })\n enableAuditTracking: boolean;\n\n @Column({ name: \"is_multiSelect\", default: false })\n isMultiSelect: boolean;\n}"]}
1
+ {"version":3,"file":"field-metadata.entity.js","sourceRoot":"","sources":["../../src/entities/field-metadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mDAA0D;AAC1D,qCAAuE;AACvE,qGAAwF;AACxF,mEAAwD;AAGjD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAY;IAAxC;;QAkHH,uBAAkB,GAAW,QAAQ,CAAC;KA2CzC;;;;CAAA,CAAA;AA7JY,sCAAa;AAItB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;kDACb;AAGpB;IADC,IAAA,gBA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BAAmB,CAAC;GACf,aAAa,CA6JzB","sourcesContent":["import { ComputedFieldTriggerConfig } from \"src/dtos/create-field-metadata.dto\";\nimport { CommonEntity } from \"src/entities/common.entity\";\nimport { Column, Entity, Index, JoinColumn, ManyToOne } from \"typeorm\";\nimport { MediaStorageProviderMetadata } from \"./media-storage-provider-metadata.entity\";\nimport { ModelMetadata } from \"./model-metadata.entity\";\n\n@Entity(\"ss_field_metadata\")\nexport class FieldMetadata extends CommonEntity {\n\n // @Index({ unique: true })\n @Column({ name: \"name\" })\n name: string;\n\n @Column({ name: \"display_name\" })\n displayName: string;\n\n @Column({ name: \"decription\", nullable: true })\n description: string;\n\n /** int, char etc... */\n @Column({ name: 'type' })\n type: string;\n\n @Column({ name: 'orm_type', nullable: true })\n ormType: string;\n\n @Index()\n @ManyToOne(() => ModelMetadata, (model) => model.fields, { onDelete: 'CASCADE' })\n @JoinColumn({ name: 'model_id', referencedColumnName: 'id' })\n model: ModelMetadata;\n\n @Column({ name: 'default_value', nullable: true })\n defaultValue: string;\n\n @Column({ name: 'regex_pattern', nullable: true })\n regexPattern: string;\n\n @Column({ name: 'regex_pattern_not_maching_error_msg', nullable: true })\n regexPatternNotMatchingErrorMsg: string;\n\n @Column({ name: \"required\", default: false })\n required: boolean;\n\n @Column({ name: \"unique\", default: false })\n unique: boolean;\n\n @Column({ name: \"encrypt\", default: false })\n encrypt: boolean;\n\n @Column({ name: 'encryption_type', nullable: true })\n encryptionType: string;\n\n @Column({ name: 'decrypt_when', nullable: true })\n decryptWhen: string;\n\n @Column({ name: \"index\", default: false })\n index: boolean;\n\n @Column({ name: 'length', nullable: true })\n length: number;\n\n @Column({ name: 'max', nullable: true })\n max: number;\n\n @Column({ name: 'min', nullable: true })\n min: number;\n\n @Column({ name: \"private\", default: false })\n private: boolean;\n\n @Column(\"json\", { name: 'media_types', nullable: true })\n mediaTypes: string[];\n\n @Column({ name: 'media_max_size_kb', nullable: true })\n mediaMaxSizeKb: number;\n\n @ManyToOne(() => MediaStorageProviderMetadata, { onDelete: 'SET NULL' })\n @JoinColumn({ name: 'media_storage_provider_id' })\n mediaStorageProvider: MediaStorageProviderMetadata;\n\n // @Column({ name: 'media_embedded', default: true })\n // mediaEmbedded: boolean;\n\n @Column({ name: 'relation_type', nullable: true })\n relationType: string;\n\n @Column({ name: 'relation_model_singular_name', nullable: true })\n relationCoModelSingularName: string;\n\n @Column({ name: \"relation_create_inverse\", default: false })\n relationCreateInverse: boolean;\n\n @Column({ name: \"relation_cascade\", nullable: true })\n relationCascade: string;\n\n @Column({ name: 'relation_model_module_name', nullable: true })\n relationModelModuleName: string;\n\n // This field will be used to set the inverse field name in the related model e.g required for many to many relation\n @Column({ name: 'relation_model_field_name', nullable: true })\n relationCoModelFieldName: string;\n\n @Column({ name: 'is_relation_many_to_many_owner', nullable: true })\n isRelationManyToManyOwner: boolean;\n\n // We can store a filter json like this {\"fieldName\": ${someVarWhichWillComeFromParentModel... or can be hard coded...}}\n // {\"type\": \"INDUSTRY\"} .... Eg. static fixedFilter \n // {\"country_id\", \"${country}\"} ... Eg. dynamic fixedFilter \n @Column({ name: 'relation_field_fixed_filter', nullable: true })\n relationFieldFixedFilter: string;\n\n @Column({ name: 'selection_dynamic_provider', nullable: true })\n selectionDynamicProvider: string;\n\n @Column({ name: 'selection_dynamic_provider_ctxt', nullable: true })\n selectionDynamicProviderCtxt: string;\n\n @Column({ name: 'selection_static_values', nullable: true, type: 'simple-array' })\n selectionStaticValues: string[];\n\n @Column({ name: 'selection_value_type', nullable: true, type: 'text' }) // text type cannot have a default value\n selectionValueType: string = 'string';\n\n // @Column({ name: \"computed\", default: false })\n // computed: boolean;\n\n @Column({ name: 'computed_field_value_provider', nullable: true })\n computedFieldValueProvider: string;\n\n @Column({ name: 'computed_field_value_provider_ctxt', nullable: true })\n computedFieldValueProviderCtxt: string;\n\n @Column({ name: 'computed_field_value_type', nullable: true })\n computedFieldValueType: string;\n\n @Column({ name: 'computed_field_trigger_config', nullable: true, type: 'jsonb' })\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[];\n\n @Column({ name: 'uuid', nullable: true })\n uuid: string;\n\n @Column({ default: false })\n isSystem: boolean;\n\n @Column({ default: false })\n isMarkedForRemoval: boolean;\n\n @Column({ name: 'column_name', nullable: true })\n columnName: string;\n\n @Column({ name: 'relation_co_model_column_name', nullable: true })\n relationCoModelColumnName: string;\n\n @Column({ name: \"is_user_key\", default: false })\n isUserKey: boolean;\n\n @Column({ name: 'relation_join_table_name', nullable: true })\n relationJoinTableName: string;\n\n @Column({ name: 'enable_audit_tracking', default: false })\n enableAuditTracking: boolean;\n\n @Column({ name: \"is_multiSelect\", default: false })\n isMultiSelect: boolean;\n}"]}
@@ -1,6 +1,8 @@
1
1
  import { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
2
2
  export declare class HttpExceptionFilter implements ExceptionFilter {
3
3
  private readonly logger;
4
+ constructor();
4
5
  catch(exception: any, host: ArgumentsHost): void;
6
+ private getErrorJson;
5
7
  }
6
8
  //# sourceMappingURL=http-exception.filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-exception.filter.d.ts","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAI/E,qBACa,mBAAoB,YAAW,eAAe;IACvD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;IAE/D,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;CA6B5C"}
1
+ {"version":3,"file":"http-exception.filter.d.ts","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAS,aAAa,EAAsB,MAAM,gBAAgB,CAAC;AAI3F,qBAEa,mBAAoB,YAAW,eAAe;IACvD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;;IAM/D,KAAK,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;IAiBzC,OAAO,CAAC,YAAY;CAQvB"}
@@ -5,6 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
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
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
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
+ };
8
11
  var HttpExceptionFilter_1;
9
12
  Object.defineProperty(exports, "__esModule", { value: true });
10
13
  exports.HttpExceptionFilter = void 0;
@@ -13,6 +16,7 @@ const logging_interceptor_1 = require("../interceptors/logging.interceptor");
13
16
  let HttpExceptionFilter = HttpExceptionFilter_1 = class HttpExceptionFilter {
14
17
  constructor() {
15
18
  this.logger = new common_1.Logger(HttpExceptionFilter_1.name);
19
+ this.logger.debug('HttpExceptionFilter initialized');
16
20
  }
17
21
  catch(exception, host) {
18
22
  const ctx = host.switchToHttp();
@@ -23,25 +27,22 @@ let HttpExceptionFilter = HttpExceptionFilter_1 = class HttpExceptionFilter {
23
27
  const { method, url } = request;
24
28
  this.logger.error(`[${status || 500} ${logging_interceptor_1.HttpStatusCodeMessages[status] || 'Internal Server Error'}] ${method} ${url} - ${message}`);
25
29
  this.logger.error(exception.stack || 'No stack trace available');
26
- if (exception.response) {
27
- response.status(status).json({
28
- ...exception.response,
29
- error: message,
30
- data: {}
31
- });
32
- }
33
- else {
34
- response.status(status).json({
35
- statusCode: status,
36
- message: [message],
37
- error: message,
38
- data: {}
39
- });
40
- }
30
+ const errorJson = this.getErrorJson(status, message, exception.response);
31
+ response.status(status).json(errorJson);
32
+ }
33
+ getErrorJson(status, message, additionalErrorData = {}) {
34
+ return {
35
+ statusCode: status,
36
+ message: [message],
37
+ error: logging_interceptor_1.HttpStatusCodeMessages[status] || 'Internal Server Error',
38
+ data: additionalErrorData
39
+ };
41
40
  }
42
41
  };
43
42
  exports.HttpExceptionFilter = HttpExceptionFilter;
44
43
  exports.HttpExceptionFilter = HttpExceptionFilter = HttpExceptionFilter_1 = __decorate([
45
- (0, common_1.Catch)()
44
+ (0, common_1.Catch)(),
45
+ (0, common_1.Injectable)(),
46
+ __metadata("design:paramtypes", [])
46
47
  ], HttpExceptionFilter);
47
48
  //# sourceMappingURL=http-exception.filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-exception.filter.js","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+E;AAE/E,6EAA6E;AAGtE,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAAzB;QACc,WAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IA+BnE,CAAC;IA7BG,KAAK,CAAC,SAAc,EAAE,IAAmB;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAC7C,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,IAAI,GAAG,CAAC;QACvC,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,IAAI,uBAAuB,CAAC;QAC7D,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;QAGhC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,4CAAsB,CAAC,MAAM,CAAC,IAAI,uBAAuB,KAAK,MAAM,IAAI,GAAG,MAAM,OAAO,EAAE,CAAC,CAAC;QACnI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,IAAI,0BAA0B,CAAC,CAAC;QAGjE,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;YACrB,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;gBACzB,GAAG,SAAS,CAAC,QAAQ;gBACrB,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;QACP,CAAC;aACI,CAAC;YACF,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;gBACzB,UAAU,EAAE,MAAM;gBAClB,OAAO,EAAE,CAAC,OAAO,CAAC;gBAClB,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAA;AAhCY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,cAAK,GAAE;GACK,mBAAmB,CAgC/B","sourcesContent":["import { ExceptionFilter, Catch, ArgumentsHost, Logger } from '@nestjs/common';\nimport { Response } from 'express';\nimport { HttpStatusCodeMessages } from '../interceptors/logging.interceptor';\n\n@Catch()\nexport class HttpExceptionFilter implements ExceptionFilter {\n private readonly logger = new Logger(HttpExceptionFilter.name);\n\n catch(exception: any, host: ArgumentsHost) {\n const ctx = host.switchToHttp();\n const response = ctx.getResponse<Response>();\n const request = ctx.getRequest();\n const status = exception.status || 500;\n const message = exception.message || 'Internal server error';\n const { method, url } = request;\n\n // Log the error here\n this.logger.error(`[${status || 500} ${HttpStatusCodeMessages[status] || 'Internal Server Error'}] ${method} ${url} - ${message}`);\n this.logger.error(exception.stack || 'No stack trace available');\n\n // Send the response to the client\n if (exception.response) {\n response.status(status).json({\n ...exception.response,\n error: message,\n data: {}\n });\n }\n else {\n response.status(status).json({\n statusCode: status,\n message: [message],\n error: message,\n data: {}\n });\n }\n }\n}"]}
1
+ {"version":3,"file":"http-exception.filter.js","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAA2F;AAE3F,6EAA6E;AAItE,IAAM,mBAAmB,2BAAzB,MAAM,m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AAC;CACJ,CAAA;AAhCY,kDAAmB;8BAAnB,mBAAmB;IAF/B,IAAA,cAAK,GAAE;IACP,IAAA,mBAAU,GAAE;;GACA,mBAAmB,CAgC/B","sourcesContent":["import { ExceptionFilter, Catch, ArgumentsHost, Logger, Injectable } from '@nestjs/common';\nimport { Response } from 'express';\nimport { HttpStatusCodeMessages } from '../interceptors/logging.interceptor';\n\n@Catch()\n@Injectable()\nexport class HttpExceptionFilter implements ExceptionFilter {\n private readonly logger = new Logger(HttpExceptionFilter.name);\n\n constructor() {\n this.logger.debug('HttpExceptionFilter initialized');\n } \n\n catch(exception: any, host: ArgumentsHost) {\n const ctx = host.switchToHttp();\n const response = ctx.getResponse<Response>();\n const request = ctx.getRequest();\n const status = exception.status || 500;\n const message = exception.message || 'Internal server error';\n const { method, url } = request;\n\n // Log the error here\n this.logger.error(`[${status || 500} ${HttpStatusCodeMessages[status] || 'Internal Server Error'}] ${method} ${url} - ${message}`);\n this.logger.error(exception.stack || 'No stack trace available');\n\n // Send the response to the client\n const errorJson = this.getErrorJson(status, message, exception.response);\n response.status(status).json(errorJson);\n }\n\n private getErrorJson(status: number|string, message: string, additionalErrorData: unknown = {}): any {\n return {\n statusCode: status,\n message: [message],\n error: HttpStatusCodeMessages[status] || 'Internal Server Error',\n data: additionalErrorData\n }\n }\n}"]}
@@ -60,7 +60,7 @@ let SchematicService = SchematicService_1 = class SchematicService {
60
60
  return !this.solidRegistry.getCommonEntityKeys().includes(field.name);
61
61
  })
62
62
  .map((field) => {
63
- return `--fields='${JSON.stringify(field)}'`;
63
+ return `--fields='${JSON.stringify(field).replace(/'/g, "\\'")}'`;
64
64
  })
65
65
  .join(' ');
66
66
  const schematicCommand = modelCommand + ' ' + fieldCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"schematic.service.js","sourceRoot":"","sources":["../../src/helpers/schematic.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uDAAmD;AACnD,mCAAmC;AAEnC,q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,gBAAgB,CAAC,CAAC;YACxD,OAAO,gBAAgB,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF,CAAA;AA5EY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAIkC,gCAAc,EAAkC,8BAAa;GAH/F,gBAAgB,CA4E5B","sourcesContent":["import { Injectable, Logger } from '@nestjs/common';\nimport { CommandService } from './command.service';\nimport { snakeCase } from \"lodash\";\nimport { CommonEntity } from 'src/entities/common.entity';\nimport { SolidRegistry } from './solid-registry';\n\nexport const ADD_MODULE_COMMAND = 'add-module';\nexport type GenerateModuleOptions = {\n module: string;\n};\ntype FieldOptions = {\n module: string;\n model: string;\n moduleDisplayName: string;\n table?: string;\n dataSource: string;\n fields: any[]; //FIXME This type can be improved\n modelEnableSoftDelete?: boolean;\n parentModel?: string; \n parentModule?: string;\n draftPublishWorkflowEnabled?: boolean;\n};\nexport const REMOVE_FIELDS_COMMAND = 'remove-fields';\nexport const REFRESH_MODEL_COMMAND = 'refresh-model';\n\n//TODO Rename to CodeBuilder service\n@Injectable()\nexport class SchematicService {\n private readonly logger = new Logger(SchematicService.name);\n private readonly SCHEMATIC_PROJECT = '@solidstarters/solid-code-builder';\n constructor(private readonly commandService: CommandService, private readonly solidRegistry: SolidRegistry) { }\n\n async executeSchematicCommand(\n command: string,\n options: GenerateModuleOptions | FieldOptions,\n debug = false,\n ): Promise<string> {\n return await this.commandService.executeCommand(\n this.generateSchematicCommand(command, options, debug),\n );\n }\n\n private generateSchematicCommand(\n command: string,\n options: GenerateModuleOptions | FieldOptions,\n debug: boolean,\n ): string {\n const baseCommand = `schematics ${this.SCHEMATIC_PROJECT}:${command} --debug=${debug}`;\n if (\n command === REMOVE_FIELDS_COMMAND ||\n command === REFRESH_MODEL_COMMAND\n ) {\n const fieldOptions = options as FieldOptions;\n let modelCommand = `${baseCommand} --module=${fieldOptions.module} --model=${fieldOptions.model}`;\n if (fieldOptions.moduleDisplayName) {\n modelCommand += ` --module-display-name=${snakeCase(fieldOptions.moduleDisplayName)}`;\n }\n\n if (fieldOptions.table) {\n modelCommand += ` --table=${fieldOptions.table}`;\n }\n\n if (fieldOptions.dataSource) {\n modelCommand += ` --data-source=${fieldOptions.dataSource}`;\n }\n\n if (fieldOptions.modelEnableSoftDelete) {\n modelCommand += ` --model-enable-soft-delete=${fieldOptions.modelEnableSoftDelete}`;\n }\n\n if (fieldOptions.parentModel) {\n modelCommand += ` --parent-model=${fieldOptions.parentModel}`;\n }\n if (fieldOptions.parentModule) {\n modelCommand += ` --parent-module=${fieldOptions.parentModule}`;\n }\n\n if (fieldOptions.draftPublishWorkflowEnabled) {\n modelCommand += ` --draft-publish-workflow-enabled=${fieldOptions.draftPublishWorkflowEnabled}`;\n }\n \n let fieldCommand = fieldOptions.fields\n .filter((field) => {\n return !this.solidRegistry.getCommonEntityKeys().includes(field.name);\n })\n .map((field) => {\n return `--fields='${JSON.stringify(field)}'`;\n })\n .join(' ');\n const schematicCommand = modelCommand + ' ' + fieldCommand;\n // console.log('schematicCommand', schematicCommand);\n return schematicCommand;\n } else if (command === ADD_MODULE_COMMAND) {\n const moduleOptions = options as GenerateModuleOptions;\n // console.log('moduleOptions', moduleOptions);\n const schematicCommand = ` ${baseCommand} --module=${moduleOptions.module}`;\n // console.log('schematicCommand', schematicCommand);\n this.logger.debug('schematicCommand', schematicCommand);\n return schematicCommand;\n } else {\n throw new Error('Schematic command not supported.');\n }\n }\n}\n"]}
1
+ {"version":3,"file":"schematic.service.js","sourceRoot":"","sources":["../../src/helpers/schematic.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uDAAmD;AACnD,mCAAmC;AAEnC,qDAAiD;AAEpC,QAAA,kBAAkB,GAAG,YAAY,CAAC;AAgBlC,QAAA,qBAAqB,GAAG,eAAe,CAAC;AACxC,QAAA,qBAAqB,GAAG,e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ACN,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF,CAAA;AA5EY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAIkC,gCAAc,EAAkC,8BAAa;GAH/F,gBAAgB,CA4E5B","sourcesContent":["import { Injectable, Logger } from '@nestjs/common';\nimport { CommandService } from './command.service';\nimport { snakeCase } from \"lodash\";\nimport { CommonEntity } from 'src/entities/common.entity';\nimport { SolidRegistry } from './solid-registry';\n\nexport const ADD_MODULE_COMMAND = 'add-module';\nexport type GenerateModuleOptions = {\n module: string;\n};\ntype FieldOptions = {\n module: string;\n model: string;\n moduleDisplayName: string;\n table?: string;\n dataSource: string;\n fields: any[]; //FIXME This type can be improved\n modelEnableSoftDelete?: boolean;\n parentModel?: string; \n parentModule?: string;\n draftPublishWorkflowEnabled?: boolean;\n};\nexport const REMOVE_FIELDS_COMMAND = 'remove-fields';\nexport const REFRESH_MODEL_COMMAND = 'refresh-model';\n\n//TODO Rename to CodeBuilder service\n@Injectable()\nexport class SchematicService {\n private readonly logger = new Logger(SchematicService.name);\n private readonly SCHEMATIC_PROJECT = '@solidstarters/solid-code-builder';\n constructor(private readonly commandService: CommandService, private readonly solidRegistry: SolidRegistry) { }\n\n async executeSchematicCommand(\n command: string,\n options: GenerateModuleOptions | FieldOptions,\n debug = false,\n ): Promise<string> {\n return await this.commandService.executeCommand(\n this.generateSchematicCommand(command, options, debug),\n );\n }\n\n private generateSchematicCommand(\n command: string,\n options: GenerateModuleOptions | FieldOptions,\n debug: boolean,\n ): string {\n const baseCommand = `schematics ${this.SCHEMATIC_PROJECT}:${command} --debug=${debug}`;\n if (\n command === REMOVE_FIELDS_COMMAND ||\n command === REFRESH_MODEL_COMMAND\n ) {\n const fieldOptions = options as FieldOptions;\n let modelCommand = `${baseCommand} --module=${fieldOptions.module} --model=${fieldOptions.model}`;\n if (fieldOptions.moduleDisplayName) {\n modelCommand += ` --module-display-name=${snakeCase(fieldOptions.moduleDisplayName)}`;\n }\n\n if (fieldOptions.table) {\n modelCommand += ` --table=${fieldOptions.table}`;\n }\n\n if (fieldOptions.dataSource) {\n modelCommand += ` --data-source=${fieldOptions.dataSource}`;\n }\n\n if (fieldOptions.modelEnableSoftDelete) {\n modelCommand += ` --model-enable-soft-delete=${fieldOptions.modelEnableSoftDelete}`;\n }\n\n if (fieldOptions.parentModel) {\n modelCommand += ` --parent-model=${fieldOptions.parentModel}`;\n }\n if (fieldOptions.parentModule) {\n modelCommand += ` --parent-module=${fieldOptions.parentModule}`;\n }\n\n if (fieldOptions.draftPublishWorkflowEnabled) {\n modelCommand += ` --draft-publish-workflow-enabled=${fieldOptions.draftPublishWorkflowEnabled}`;\n }\n \n let fieldCommand = fieldOptions.fields\n .filter((field) => {\n return !this.solidRegistry.getCommonEntityKeys().includes(field.name);\n })\n .map((field) => {\n return `--fields='${JSON.stringify(field).replace(/'/g, \"\\\\'\")}'`;\n })\n .join(' ');\n const schematicCommand = modelCommand + ' ' + fieldCommand;\n // console.log('schematicCommand', schematicCommand);\n return schematicCommand;\n } else if (command === ADD_MODULE_COMMAND) {\n const moduleOptions = options as GenerateModuleOptions;\n // console.log('moduleOptions', moduleOptions);\n const schematicCommand = ` ${baseCommand} --module=${moduleOptions.module}`;\n // console.log('schematicCommand', schematicCommand);\n this.logger.debug('schematicCommand', schematicCommand);\n return schematicCommand;\n } else {\n throw new Error('Schematic command not supported.');\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"solid-registry.d.ts","sourceRoot":"","sources":["../../src/helpers/solid-registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;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,CAAC;CAEF,CAAA;AA1JY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CA0JzB","sourcesContent":["import { Injectable } from '@nestjs/common';\nimport { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';\nimport { ComputedFieldTriggerConfig, ComputedFieldValueType } from 'src/dtos/create-field-metadata.dto';\nimport { CommonEntity } from 'src/entities/common.entity';\nimport { Locale } from 'src/entities/locale.entity';\nimport { SecurityRule } from 'src/entities/security-rule.entity';\nimport { IScheduledJob } from 'src/services/scheduled-jobs/scheduled-job.interface';\nimport { ISelectionProvider, ISelectionProviderContext } from \"../interfaces\";\n\ntype ControllerMetadata = {\n name: string;\n methods: string[];\n};\n\nexport enum RESERVED_SOLID_KEYWORDS {\n moduleMetadata = \"moduleMetadata\",\n modelMetadata = \"modelMetadata\",\n fieldMetadata = \"fieldMetadata\",\n dataSource = \"dataSource\",\n repository = \"repository\",\n entityManager = \"entityManager\",\n actionMetadata = \"actionMetadata\",\n emailAttachment = \"emailAttachment\",\n emailTemplate = \"emailTemplate\",\n listOfValues = \"listOfValues\",\n mediaStorageProvider = \"mediaStorageProvider\",\n media = \"media\",\n menuItemMetadata = \"menuItemMetadata\",\n mqMessageQueue = \"mqMessageQueue\",\n mqMessage = \"mqMessage\",\n permissionMetadata = \"permissionMetadata\",\n roleMetadata = \"roleMetadata\",\n securityRule = \"securityRule\",\n setting = \"setting\",\n smsTemplate = \"smsTemplate\",\n userPasswordHistory = \"userPasswordHistory\",\n userMetadata = \"userMetadata\",\n user = \"user\",\n locale = \"locale\"\n}\n\nexport interface ComputedFieldMetadata<TContext = any> {\n moduleName: string; // Name of the module where the computed field is defined\n modelName: string; // Name of the model where the computed field is defined\n fieldName: string; // Name of the field that is computed\n computedFieldValueType: ComputedFieldValueType; // Type of the computed field value (e.g., string, number, etc.)\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[]; // JSON stringified object containing the trigger configuration\n // Example: '{\"models\": [\"User\", \"Product\"], \"operations\": [\"create\", \"update\"]}'\n computedFieldValueProviderName: string; // Name of the provider that computes the field value\n // Example: '{\"contextKey\": \"contextValue\"}'\n computedFieldValueProviderCtxt: TContext; // Context for the computed field value\n}\n\n@Injectable()\nexport class SolidRegistry {\n private seeders: Set<InstanceWrapper> = new Set();\n private scheduledJobProviders: Set<InstanceWrapper> = new Set();\n private selectionProviders: Set<InstanceWrapper> = new Set();\n private computedFieldProviders: Set<InstanceWrapper> = new Set();\n private solidDatabaseModules: Set<InstanceWrapper> = new Set();\n private controllers: Set<ControllerMetadata> = new Set();\n private modules: Set<InstanceWrapper> = new Set();\n private securityRules: SecurityRule[] = [];\n private locales: Locale[] = [];\n private computedFieldMetadata: ComputedFieldMetadata[] = [];\n\n registerController(name: string, methodNames: string[]): void {\n this.controllers.add({ name: name, methods: methodNames });\n }\n\n registerControllers(controllers: Set<ControllerMetadata>): void {\n this.controllers = controllers;\n }\n\n registerSeeder(seeder: InstanceWrapper): void {\n this.seeders.add(seeder);\n }\n\n registerSelectionProvider(selectionProvider: InstanceWrapper): void {\n this.selectionProviders.add(selectionProvider);\n }\n\n registerComputedFieldProvider(computedFieldProvider: InstanceWrapper): void {\n this.computedFieldProviders.add(computedFieldProvider);\n }\n\n registerScheduledJobProvider(scheduledJobProvider: InstanceWrapper): void {\n this.scheduledJobProviders.add(scheduledJobProvider);\n }\n\n registerSolidDatabaseModule(solidDatabaseModule: InstanceWrapper): void {\n this.solidDatabaseModules.add(solidDatabaseModule);\n }\n\n registerModules(modules: InstanceWrapper[]): void {\n this.modules = new Set(modules);\n }\n\n getSeeders(): Array<InstanceWrapper> {\n return Array.from(this.seeders);\n }\n\n getControllers(): ControllerMetadata[] {\n return Array.from(this.controllers);\n }\n\n getSelectionProviders(): Array<InstanceWrapper> {\n return Array.from(this.selectionProviders);\n }\n\n getSelectionProviderInstance<T extends ISelectionProviderContext>(name: string): ISelectionProvider<T> {\n const selectionProviders = this.getSelectionProviders();\n\n for (let i = 0; i < selectionProviders.length; i++) {\n const selectionProvider = selectionProviders[i];\n if (selectionProvider.instance.name() === name) {\n return selectionProvider.instance;\n }\n }\n }\n\n getComputedFieldProviders(): Array<InstanceWrapper> {\n return Array.from(this.computedFieldProviders);\n }\n\n getScheduledJobProviders(): Array<InstanceWrapper> {\n return Array.from(this.scheduledJobProviders);\n }\n\n getScheduledJobProviderInstance(name: string): IScheduledJob {\n const scheduledJobProviders = this.getScheduledJobProviders();\n\n for (let i = 0; i < scheduledJobProviders.length; i++) {\n const scheduledJobProvider = scheduledJobProviders[i];\n if (scheduledJobProvider.name === name) {\n return scheduledJobProvider.instance;\n }\n }\n }\n \n getComputedFieldProvider(name: string): InstanceWrapper {\n const provider = this.getComputedFieldProviders().filter((provider) => provider.name === name).pop();\n if (!provider) {\n throw new Error(`Computed Field Provider with name ${name} not found`);\n }\n return provider\n }\n\n getSolidDatabaseModules(): Array<InstanceWrapper> {\n return Array.from(this.solidDatabaseModules);\n }\n\n getModules(): Array<InstanceWrapper> {\n return Array.from(this.modules);\n }\n\n getModule(name: string): InstanceWrapper {\n const module = this.getModules().filter((module) => module.name === name).pop();\n return module\n }\n\n registerSecurityRules(securityRules: SecurityRule[]) {\n this.securityRules = securityRules;\n }\n\n registerlocales(locales: Locale[]) {\n this.locales = locales;\n }\n\n registerComputedFieldMetadata(computedFieldMetadata: ComputedFieldMetadata[]) {\n this.computedFieldMetadata = computedFieldMetadata;\n }\n\n getComputedFieldMetadata(): ComputedFieldMetadata[] {\n return this.computedFieldMetadata;\n }\n\n //TODO:getlocales from locale model and return default locale where isDefault:true \n getDefaultLocale(): Locale | null {\n return this.locales.find(locale => locale.isDefault === true) || null;\n }\n\n getSecurityRules(modelSingularName: string, roleNames: string[] = []): SecurityRule[] {\n // If no role is provided, return all security rules for the model\n if (roleNames.length === 0) {\n return this.securityRules.filter((rule) => rule.modelMetadata.singularName === modelSingularName);\n }\n // If roles are provided, filter the security rules by model and roles\n return this.securityRules.filter((rule) => {\n return rule.modelMetadata.singularName === modelSingularName && roleNames.includes(rule.role.name);\n });\n }\n\n /**\n * @deprecated You can directly pass the entityName to typeORM, if you are using this just for doing operations against a particular entity.\n */\n // Returns the entity target class from the entity name\n // getEntityTarget(entityManager: EntityManager, entityName: string): any { //TODO Can be refactored to use this function from crud helper service\n // const entityMetadatas = entityManager.connection.entityMetadatas;\n // const entityMetadata = entityMetadatas.find(em => em.name === entityName);\n // return entityMetadata.target;\n // }\n\n getCommonEntityKeys(): (keyof CommonEntity)[] {\n return ['id', 'createdAt', 'updatedAt', 'deletedAt', 'createdBy', 'updatedBy', 'deletedTracker', 'localeName', 'defaultEntityLocaleId', 'publishedAt'];\n // return Reflect.getMetadataKeys(CommonEntity.prototype) as (keyof CommonEntity)[];\n }\n\n}"]}
1
+ {"version":3,"file":"solid-registry.js","sourceRoot":"","sources":["../../src/helpers/solid-registry.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAc5C,IAAY,uBAyBX;AAzBD,WAAY,uBAAuB;IACjC,4DAAiC,CAAA;IACjC,0DAA+B,CAAA;IAC/B,0DAA+B,CAAA;IAC/B,oDAAyB,CAAA;IACzB,oDAAyB,CAAA;IACzB,0DAA+B,CAAA;IAC/B,4DAAiC,CAAA;IACjC,8DAAmC,CAAA;IACnC,0DAA+B,CAAA;IAC/B,wDAA6B,CAAA;IAC7B,wEAA6C,CAAA;IAC7C,0CAAe,CAAA;IACf,gEAAqC,CAAA;IACrC,4DAAiC,CAAA;IACjC,kDAAuB,CAAA;IACvB,oEAAyC,CAAA;IACzC,wDAA6B,CAAA;IAC7B,wDAA6B,CAAA;IAC7B,8CAAmB,CAAA;IACnB,sDAA2B,CAAA;IAC3B,sEAA2C,CAAA;IAC3C,wDAA6B,CAAA;IAC7B,wCAAa,CAAA;IACb,4CAAiB,CAAA;AACnB,CAAC,EAzBW,uBAAuB,uCAAvB,uBAAuB,QAyBlC;AAeM,IAAM,aAAa,GAAnB,MAAM,aAAa;IAAnB;QACG,YAAO,GAAyB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;IACxE,CAAC;IAED,gBAAgB,CAAC,iBAAyB,EAAE,YAAsB,EAAE;QAElE,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,KAAK,iBAAiB,CAAC,CAAC;QACpG,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YACxC,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,KAAK,iBAAiB,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrG,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;QACjB,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,aAAa,CAAC,CAAC;IAEzJ,CAAC;CAEF,CAAA;AAhJY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAgJzB","sourcesContent":["import { Injectable } from '@nestjs/common';\nimport { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';\nimport { ComputedFieldTriggerConfig, ComputedFieldValueType } from 'src/dtos/create-field-metadata.dto';\nimport { CommonEntity } from 'src/entities/common.entity';\nimport { Locale } from 'src/entities/locale.entity';\nimport { SecurityRule } from 'src/entities/security-rule.entity';\nimport { IScheduledJob } from 'src/services/scheduled-jobs/scheduled-job.interface';\nimport { ISelectionProvider, ISelectionProviderContext } from \"../interfaces\";\n\ntype ControllerMetadata = {\n name: string;\n methods: string[];\n};\n\nexport enum RESERVED_SOLID_KEYWORDS {\n moduleMetadata = \"moduleMetadata\",\n modelMetadata = \"modelMetadata\",\n fieldMetadata = \"fieldMetadata\",\n dataSource = \"dataSource\",\n repository = \"repository\",\n entityManager = \"entityManager\",\n actionMetadata = \"actionMetadata\",\n emailAttachment = \"emailAttachment\",\n emailTemplate = \"emailTemplate\",\n listOfValues = \"listOfValues\",\n mediaStorageProvider = \"mediaStorageProvider\",\n media = \"media\",\n menuItemMetadata = \"menuItemMetadata\",\n mqMessageQueue = \"mqMessageQueue\",\n mqMessage = \"mqMessage\",\n permissionMetadata = \"permissionMetadata\",\n roleMetadata = \"roleMetadata\",\n securityRule = \"securityRule\",\n setting = \"setting\",\n smsTemplate = \"smsTemplate\",\n userPasswordHistory = \"userPasswordHistory\",\n userMetadata = \"userMetadata\",\n user = \"user\",\n locale = \"locale\"\n}\n\nexport interface ComputedFieldMetadata<TContext = any> {\n moduleName: string; // Name of the module where the computed field is defined\n modelName: string; // Name of the model where the computed field is defined\n fieldName: string; // Name of the field that is computed\n computedFieldValueType: ComputedFieldValueType; // Type of the computed field value (e.g., string, number, etc.)\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[]; // JSON stringified object containing the trigger configuration\n // Example: '{\"models\": [\"User\", \"Product\"], \"operations\": [\"create\", \"update\"]}'\n computedFieldValueProviderName: string; // Name of the provider that computes the field value\n // Example: '{\"contextKey\": \"contextValue\"}'\n computedFieldValueProviderCtxt: TContext; // Context for the computed field value\n}\n\n@Injectable()\nexport class SolidRegistry {\n private seeders: Set<InstanceWrapper> = new Set();\n private scheduledJobProviders: Set<InstanceWrapper> = new Set();\n private selectionProviders: Set<InstanceWrapper> = new Set();\n private computedFieldProviders: Set<InstanceWrapper> = new Set();\n private solidDatabaseModules: Set<InstanceWrapper> = new Set();\n private controllers: Set<ControllerMetadata> = new Set();\n private modules: Set<InstanceWrapper> = new Set();\n private securityRules: SecurityRule[] = [];\n private locales: Locale[] = [];\n private computedFieldMetadata: ComputedFieldMetadata[] = [];\n\n registerController(name: string, methodNames: string[]): void {\n this.controllers.add({ name: name, methods: methodNames });\n }\n\n registerControllers(controllers: Set<ControllerMetadata>): void {\n this.controllers = controllers;\n }\n\n registerSeeder(seeder: InstanceWrapper): void {\n this.seeders.add(seeder);\n }\n\n registerSelectionProvider(selectionProvider: InstanceWrapper): void {\n this.selectionProviders.add(selectionProvider);\n }\n\n registerComputedFieldProvider(computedFieldProvider: InstanceWrapper): void {\n this.computedFieldProviders.add(computedFieldProvider);\n }\n\n registerScheduledJobProvider(scheduledJobProvider: InstanceWrapper): void {\n this.scheduledJobProviders.add(scheduledJobProvider);\n }\n\n registerSolidDatabaseModule(solidDatabaseModule: InstanceWrapper): void {\n this.solidDatabaseModules.add(solidDatabaseModule);\n }\n\n registerModules(modules: InstanceWrapper[]): void {\n this.modules = new Set(modules);\n }\n\n getSeeders(): Array<InstanceWrapper> {\n return Array.from(this.seeders);\n }\n\n getControllers(): ControllerMetadata[] {\n return Array.from(this.controllers);\n }\n\n getSelectionProviders(): Array<InstanceWrapper> {\n return Array.from(this.selectionProviders);\n }\n\n getSelectionProviderInstance<T extends ISelectionProviderContext>(name: string): ISelectionProvider<T> {\n const selectionProviders = this.getSelectionProviders();\n\n for (let i = 0; i < selectionProviders.length; i++) {\n const selectionProvider = selectionProviders[i];\n if (selectionProvider.instance.name() === name) {\n return selectionProvider.instance;\n }\n }\n }\n\n getComputedFieldProviders(): Array<InstanceWrapper> {\n return Array.from(this.computedFieldProviders);\n }\n\n getScheduledJobProviders(): Array<InstanceWrapper> {\n return Array.from(this.scheduledJobProviders);\n }\n\n getScheduledJobProviderInstance(name: string): IScheduledJob {\n const scheduledJobProviders = this.getScheduledJobProviders();\n\n for (let i = 0; i < scheduledJobProviders.length; i++) {\n const scheduledJobProvider = scheduledJobProviders[i];\n if (scheduledJobProvider.name === name) {\n return scheduledJobProvider.instance;\n }\n }\n }\n \n getComputedFieldProvider(name: string): InstanceWrapper {\n const provider = this.getComputedFieldProviders().filter((provider) => provider.name === name).pop();\n if (!provider) {\n throw new Error(`Computed Field Provider with name ${name} not found`);\n }\n return provider\n }\n\n getSolidDatabaseModules(): Array<InstanceWrapper> {\n return Array.from(this.solidDatabaseModules);\n }\n\n getModules(): Array<InstanceWrapper> {\n return Array.from(this.modules);\n }\n\n getModule(name: string): InstanceWrapper {\n const module = this.getModules().filter((module) => module.name === name).pop();\n return module\n }\n\n registerSecurityRules(securityRules: SecurityRule[]) {\n this.securityRules = securityRules;\n }\n\n registerlocales(locales: Locale[]) {\n this.locales = locales;\n }\n\n registerComputedFieldMetadata(computedFieldMetadata: ComputedFieldMetadata[]) {\n this.computedFieldMetadata = computedFieldMetadata;\n }\n\n getComputedFieldMetadata(): ComputedFieldMetadata[] {\n return this.computedFieldMetadata;\n }\n\n //TODO:getlocales from locale model and return default locale where isDefault:true \n getDefaultLocale(): Locale | null {\n return this.locales.find(locale => locale.isDefault === true) || null;\n }\n\n getSecurityRules(modelSingularName: string, roleNames: string[] = []): SecurityRule[] {\n // If no role is provided, return all security rules for the model\n if (roleNames.length === 0) {\n return this.securityRules.filter((rule) => rule.modelMetadata.singularName === modelSingularName);\n }\n // If roles are provided, filter the security rules by model and roles\n return this.securityRules.filter((rule) => {\n return rule.modelMetadata.singularName === modelSingularName && roleNames.includes(rule.role.name);\n });\n }\n\n getCommonEntityKeys(): (keyof CommonEntity)[] {\n return ['id', 'createdAt', 'updatedAt', 'deletedAt', 'createdBy', 'updatedBy', 'deletedTracker', 'localeName', 'defaultEntityLocaleId', 'publishedAt'];\n // return Reflect.getMetadataKeys(CommonEntity.prototype) as (keyof CommonEntity)[];\n }\n\n}"]}
@@ -5050,7 +5050,8 @@
5050
5050
  "rowButtons": [
5051
5051
  {
5052
5052
  "attrs": {
5053
- "className": "pi pi-cog",
5053
+ "className": "p-button-text",
5054
+ "icon": "pi pi-cog",
5054
5055
  "label": "Generate Code",
5055
5056
  "action": "GenerateModuleCodeRowAction",
5056
5057
  "openInPopup": true,
@@ -5217,11 +5218,23 @@
5217
5218
  "truncateAfter": 50,
5218
5219
  "create": true,
5219
5220
  "edit": true,
5220
- "delete": true,
5221
+ "delete": false,
5221
5222
  "rowButtons": [
5222
5223
  {
5223
5224
  "attrs": {
5224
- "className": "pi pi-cog",
5225
+ "icon": "pi pi-trash",
5226
+ "className": "p-button-danger p-button-text",
5227
+ "label": "Delete",
5228
+ "action": "DeleteModelRowAction",
5229
+ "customComponentIsSystem": true,
5230
+ "actionInContextMenu": true,
5231
+ "openInPopup": true
5232
+ }
5233
+ },
5234
+ {
5235
+ "attrs": {
5236
+ "icon": "pi pi-cog",
5237
+ "className": "p-button-text",
5225
5238
  "label": "Generate Code",
5226
5239
  "action": "GenerateModelCodeRowAction",
5227
5240
  "customComponentIsSystem": true,
@@ -1 +1 @@
1
- {"version":3,"file":"field-metadata.service.d.ts","sourceRoot":"","sources":["../../src/services/field-metadata.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAyC,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAG/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAyB,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAsB,MAAM,SAAS,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAkG,sBAAsB,EAA8C,QAAQ,EAAoD,MAAM,mCAAmC,CAAC;AACnR,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,qBACa,oBAAqB,YAAW,sBAAsB;IAE3D,OAAO,CAAC,QAAQ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