@solidstarters/solid-core 1.2.129 → 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.
@@ -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,OAAO;IACjB,SAAS,IAAA;CACV;AAED,oBAAY,SAAS;IAEnB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,MAAM,WAAW;IAIjB,OAAO,YAAY;IAEnB,IAAI,cAAc;IAClB,UAAU,eAAe;IACzB,QAAQ,aAAa;IAIrB,IAAI,SAAS;IACb,OAAO,YAAY;IAGnB,IAA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Ae,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;IAGrB,qDAAmC,CAAA;IACnC,uDAAqC,CAAA;IAErC,uCAAqB,CAAA;IAErB,+BAAa,CAAA;AACf,CAAC,EAvCW,cAAc,8BAAd,cAAc,QAuCzB;AAED,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,+CAAS,CAAA;AACX,CAAC,EAFW,OAAO,uBAAP,OAAO,QAElB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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,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,cAuC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;;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,WAAW,EAAE,MAAM,CAAC;IAGpB,WAAW,EAAE,MAAM,CAAC;IAIpB,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAKhB,KAAK,EAAE,aAAa,CAAC;IAGrB,YAAY,EAAE,MAAM,CAAC;IAGrB,YAAY,EAAE,MAAM,CAAC;IAGrB,+BA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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,qCAAuE;AACvE,qGAAwF;AACxF,mEAAwD;AAIjD,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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C,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,gBAAM,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC3B;AAIpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ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C,EAAE,IAAI,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;iEACxB;AAGzD;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yDACC;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC7B;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEAChC;AAGlC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDAC7B;AAGnB;IADC,IAAA,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 { 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 +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,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ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