@solidxai/core 0.1.9-beta.2 → 0.1.9-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/otp-authentication.controller.js.map +1 -1
- package/dist/controllers/setting.controller.js +2 -2
- package/dist/controllers/setting.controller.js.map +1 -1
- package/dist/dtos/create-field-metadata.dto.js +1 -2
- package/dist/dtos/create-field-metadata.dto.js.map +1 -1
- package/dist/entities/user.entity.d.ts.map +1 -1
- package/dist/entities/user.entity.js +1 -0
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +1 -29
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +1 -0
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/setting.service.d.ts +1 -1
- package/dist/services/setting.service.d.ts.map +1 -1
- package/dist/services/setting.service.js +2 -2
- package/dist/services/setting.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +0 -10
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +0 -1
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/package.json +1 -1
- package/src/controllers/otp-authentication.controller.ts +2 -2
- package/src/controllers/setting.controller.ts +2 -2
- package/src/dtos/create-field-metadata.dto.ts +1 -1
- package/src/entities/user.entity.ts +1 -0
- package/src/seeders/seed-data/solid-core-metadata.json +1 -29
- package/src/services/authentication.service.ts +1 -0
- package/src/services/setting.service.ts +2 -2
- package/src/services/settings/default-settings-provider.service.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otp-authentication.controller.js","sourceRoot":"","sources":["../../src/controllers/otp-authentication.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA8F;AAC9F,6CAA0C;AAE1C,iEAAoD;AACpD,qEAAwD;AACxD,qEAA+D;AAC/D,6DAAuD;AACvD,6DAAuD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ACR,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,aAAI,EAAC,eAAe,CAAC;kCADZ,mBAAU,CAAC,EAAE;IAGlB,WAAA,IAAA,YAAG,EAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAY,sCAAgB;;+DAatC;sCA7CQ,2BAA2B;IALvC,IAAA,qBAAI,EAAC,yBAAQ,CAAC,IAAI,CAAC;IACnB,IAAA,mBAAU,EAAC,SAAS,CAAC;IACrB,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAIwB,8CAAqB;GADtD,2BAA2B,CAgDvC","sourcesContent":["import { Body, Controller, HttpCode, HttpStatus, Post, Res, UseGuards } from '@nestjs/common';\nimport { ApiTags } from '@nestjs/swagger';\nimport { Response } from 'express';\nimport { Auth } from '../decorators/auth.decorator';\nimport { Public } from '../decorators/public.decorator';\nimport { OTPConfirmOTPDto } from '../dtos/otp-confirm-otp.dto';\nimport { OTPSignInDto } from '../dtos/otp-sign-in.dto';\nimport { OTPSignUpDto } from '../dtos/otp-sign-up.dto';\nimport { AuthType } from '../enums/auth-type.enum';\nimport { AuthenticationService } from '../services/authentication.service';\n// import { ThrottlerGuard, SkipThrottle } from '@nestjs/throttler';\n\n\n@Auth(AuthType.None)\n@Controller('iam/otp')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\nexport class OTPAuthenticationController {\n constructor(private readonly authService: AuthenticationService) { }\n\n @Public()\n @Post('register/initiate')\n initiateRegistration(@Body() signUpDto: OTPSignUpDto) {\n return this.authService.otpInitiateRegistration(signUpDto)
|
|
1
|
+
{"version":3,"file":"otp-authentication.controller.js","sourceRoot":"","sources":["../../src/controllers/otp-authentication.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA8F;AAC9F,6CAA0C;A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I,GAAE,CAAA;;qCAAY,8BAAY;;gEAE5C;AAKK;IAHL,IAAA,yBAAM,GAAE;IACR,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,aAAI,EAAC,eAAe,CAAC;kCADZ,mBAAU,CAAC,EAAE;IAGlB,WAAA,IAAA,YAAG,EAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;IAC1B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAY,sCAAgB;;+DAatC;sCA7CQ,2BAA2B;IALvC,IAAA,qBAAI,EAAC,yBAAQ,CAAC,IAAI,CAAC;IACnB,IAAA,mBAAU,EAAC,SAAS,CAAC;IACrB,IAAA,iBAAO,EAAC,YAAY,CAAC;qCAIwB,8CAAqB;GADtD,2BAA2B,CAgDvC","sourcesContent":["import { Body, Controller, HttpCode, HttpStatus, Post, Res, UseGuards } from '@nestjs/common';\nimport { ApiTags } from '@nestjs/swagger';\nimport { Response } from 'express';\nimport { Auth } from '../decorators/auth.decorator';\nimport { Public } from '../decorators/public.decorator';\nimport { OTPConfirmOTPDto } from '../dtos/otp-confirm-otp.dto';\nimport { OTPSignInDto } from '../dtos/otp-sign-in.dto';\nimport { OTPSignUpDto } from '../dtos/otp-sign-up.dto';\nimport { AuthType } from '../enums/auth-type.enum';\nimport { AuthenticationService } from '../services/authentication.service';\n// import { ThrottlerGuard, SkipThrottle } from '@nestjs/throttler';\n\n\n@Auth(AuthType.None)\n@Controller('iam/otp')\n@ApiTags(\"Solid Core\")\n// @UseGuards(ThrottlerGuard)\n// @SkipThrottle({ login: false, short: true, burst: true, sustained: true }) //Enable the login throttle only\nexport class OTPAuthenticationController {\n constructor(private readonly authService: AuthenticationService) { }\n\n @Public()\n @Post('register/initiate')\n initiateRegistration(@Body() signUpDto: OTPSignUpDto) {\n return this.authService.otpInitiateRegistration(signUpDto);\n }\n\n @Public()\n @HttpCode(HttpStatus.OK)\n @Post('register/confirm')\n async confirmRegistration(\n @Res({ passthrough: true }) response: Response,\n @Body() signInDto: OTPConfirmOTPDto\n ) {\n // This means that we are passing the token back in plain text. \n // This is less secure. \n return this.authService.otpConfirmRegistration(signInDto);\n }\n\n @Public()\n @Post('login/initiate')\n initiateLogin(@Body() signInDto: OTPSignInDto) {\n return this.authService.otpInitiateLogin(signInDto);\n }\n\n @Public()\n @HttpCode(HttpStatus.OK) // by default @Post does 201, we wanted 200 - hence using @HttpCode(HttpStatus.OK)\n @Post('login/confirm')\n async confirmLogin(\n @Res({ passthrough: true }) response: Response,\n @Body() signInDto: OTPConfirmOTPDto\n ) {\n // This means that we are passing the token back in plain text. \n // This is less secure. \n return this.authService.otpConfirmLogin(signInDto);\n\n // This means we are setting the token as a http only cookie.\n // const accessToken = await this.authService.signIn(signInDto);\n // response.cookie('accessToken', accessToken, {\n // secure: true,\n // httpOnly: true,\n // sameSite: true,\n // });\n }\n\n\n}\n"]}
|
|
@@ -36,10 +36,10 @@ let SettingController = class SettingController {
|
|
|
36
36
|
return this.service.updateSettings(settings, files);
|
|
37
37
|
}
|
|
38
38
|
async wrapSettings() {
|
|
39
|
-
return this.service.
|
|
39
|
+
return this.service.getNonEncryptedSystemAdminReadonlyAndAboveSettings();
|
|
40
40
|
}
|
|
41
41
|
async getAllSettings() {
|
|
42
|
-
return this.service.
|
|
42
|
+
return this.service.getNonEncryptedSystemAdminReadonlyAndAboveSettings();
|
|
43
43
|
}
|
|
44
44
|
getMcpUrl(query, solidRequestContext) {
|
|
45
45
|
return this.service.getMcpUrl(query, solidRequestContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setting.controller.js","sourceRoot":"","sources":["../../src/controllers/setting.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwH;AACxH,+DAA+D;AAC/D,6CAAmE;AACnE,qEAAyD;AACzD,mGAA8F;AAC9F,iFAA4E;AAE5E,iEAA6D;AAItD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,YAA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A,IAAA,cAAK,GAAE,CAAA;IAAc,WAAA,IAAA,8DAA4B,GAAE,CAAA;;6CAAsB,kDAAsB;;kDAGzG;4BA3CU,iBAAiB;IAF7B,IAAA,iBAAO,EAAC,YAAY,CAAC;IACrB,IAAA,mBAAU,EAAC,SAAS,CAAC;qCAEkB,gCAAc;GADzC,iBAAiB,CA6C7B","sourcesContent":["import { BadRequestException, Body, Controller, Get, Put, Query, UploadedFiles, UseInterceptors } from '@nestjs/common';\nimport { AnyFilesInterceptor } from \"@nestjs/platform-express\";\nimport { ApiBearerAuth, ApiQuery, ApiTags } from '@nestjs/swagger';\nimport { Public } from 'src/decorators/public.decorator';\nimport { SolidRequestContextDecorator } from 'src/decorators/solid-request-context.decorator';\nimport { SolidRequestContextDto } from 'src/dtos/solid-request-context.dto';\nimport { CreateSettingDto } from '../dtos/create-setting.dto';\nimport { SettingService } from '../services/setting.service';\n\n@ApiTags('Solid Core')\n@Controller('setting')\nexport class SettingController {\n constructor(private readonly service: SettingService) { }\n\n /**\n * Important to keep this method just above the @Put(':id') definition that follows as otherwise it will conflict. \n * \n * @param body \n * @param files \n * @returns \n */\n @ApiBearerAuth(\"jwt\")\n @Put('/bulk')\n @UseInterceptors(AnyFilesInterceptor())\n async updateSettings(@Body() body: any, @UploadedFiles() files: Array<Express.Multer.File>) {\n let settings: CreateSettingDto[] = [];\n\n try {\n settings = typeof body.settings === 'string' ? JSON.parse(body.settings) : body.settings;\n } catch (e) {\n throw new BadRequestException('Invalid settings payload');\n }\n return this.service.updateSettings(settings, files);\n }\n\n @Get('/wrapped')\n @Public()\n async wrapSettings() {\n return this.service.getNonEncryptedSystemAdminReadonlyAndAboveSettings();\n }\n\n @ApiBearerAuth(\"jwt\")\n @Get()\n async getAllSettings() {\n return this.service.getNonEncryptedSystemAdminReadonlyAndAboveSettings();\n }\n\n @ApiBearerAuth(\"jwt\")\n @ApiQuery({ name: 'showHeader', required: false, type: String })\n @ApiQuery({ name: 'inListView', required: false, type: String })\n @Get('/get-mcp-url')\n getMcpUrl(@Query() query: any, @SolidRequestContextDecorator() solidRequestContext: SolidRequestContextDto) {\n return this.service.getMcpUrl(query, solidRequestContext);\n\n }\n\n}\n"]}
|
|
@@ -162,7 +162,7 @@ class ComputedFieldTriggerConfig {
|
|
|
162
162
|
exports.ComputedFieldTriggerConfig = ComputedFieldTriggerConfig;
|
|
163
163
|
class CreateFieldMetadataDto {
|
|
164
164
|
static _OPENAPI_METADATA_FACTORY() {
|
|
165
|
-
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, type: () => Object, enum: exports.ALL_ORM_TYPES }, 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]
|
|
165
|
+
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, type: () => Object, enum: exports.ALL_ORM_TYPES }, 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] }, 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 }, isPrimaryKey: { required: false, type: () => Boolean } };
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
exports.CreateFieldMetadataDto = CreateFieldMetadataDto;
|
|
@@ -359,7 +359,6 @@ __decorate([
|
|
|
359
359
|
(0, swagger_1.ApiProperty)({ description: 'Static values for selection. Only for type=selectionStatic', }),
|
|
360
360
|
(0, class_validator_1.IsArray)(),
|
|
361
361
|
(0, class_validator_1.IsString)({ each: true }),
|
|
362
|
-
(0, class_validator_1.Matches)(/^[\w\s\d\-\/]+:[\w\s\-\/]+$/, { each: true }),
|
|
363
362
|
(0, class_validator_1.IsOptional)(),
|
|
364
363
|
__metadata("design:type", Array)
|
|
365
364
|
], CreateFieldMetadataDto.prototype, "selectionStaticValues", 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;AAC9C,yDAAoD;AAEpD,qDAUyB;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;IAC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C;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;AAK7B;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sCAAsC,GAAG,CAAC;IACrE,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;AAKvB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sBAAsB,GAAG,CAAC;IACrD,IAAA,2BAAS,GAAE;;4DACW","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { Transform, Type } from 'class-transformer';\n\nimport {\n IsArray,\n IsBoolean,\n IsEnum,\n IsIn,\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 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 simplejson = 'simple-json'\n}\n\nexport enum MSSQLType {\n int = \"int\",\n bigint = \"bigint\",\n decimal = \"decimal\",\n numeric = \"numeric\",\n varchar = \"varchar\",\n nvarchar = \"nvarchar\",\n simplejson = \"simple-json\",\n text = \"text\",\n bit = \"bit\",\n date = \"date\",\n datetime = \"datetime\",\n datetime2 = \"datetime2\",\n time = \"time\",\n uniqueidentifier = \"uniqueidentifier\"\n}\n\nexport const ALL_ORM_TYPES = [\n ...Object.values(PSQLType),\n ...Object.values(MSSQLType),\n ...Object.values(MySQLType),\n] as const;\n\nexport type OrmType = typeof ALL_ORM_TYPES[number];\n\n// export type OrmType = PSQLType | MySQLType | MSSQLType;\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 @IsIn(ALL_ORM_TYPES)\n @IsOptional()\n readonly ormType: OrmType;\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 @ApiProperty({ description: 'Enable Audit Tracking for this field', })\n @IsOptional()\n @IsBoolean()\n enableAuditTracking?: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Is MultiSelect Field', })\n @IsBoolean()\n isMultiSelect: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Is Primary Key Field', })\n @IsBoolean()\n isPrimaryKey?: 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,qDAUyB;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,SA4BX;AA5BD,WAAY,SAAS;IAEnB,wBAAW,CAAA;IACX,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IAIjB,gCAAmB,CAAA;IAEnB,+BAAkB,CAAA;IAClB,sCAAyB,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AAU,GAAE;IACZ,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sBAAsB,GAAG,CAAC;IACrD,IAAA,2BAAS,GAAE;;4DACW","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { Transform, Type } from 'class-transformer';\n\nimport {\n IsArray,\n IsBoolean,\n IsEnum,\n IsIn,\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 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 simplejson = 'simple-json'\n}\n\nexport enum MSSQLType {\n int = \"int\",\n bigint = \"bigint\",\n decimal = \"decimal\",\n numeric = \"numeric\",\n varchar = \"varchar\",\n nvarchar = \"nvarchar\",\n simplejson = \"simple-json\",\n text = \"text\",\n bit = \"bit\",\n date = \"date\",\n datetime = \"datetime\",\n datetime2 = \"datetime2\",\n time = \"time\",\n uniqueidentifier = \"uniqueidentifier\"\n}\n\nexport const ALL_ORM_TYPES = [\n ...Object.values(PSQLType),\n ...Object.values(MSSQLType),\n ...Object.values(MySQLType),\n] as const;\n\nexport type OrmType = typeof ALL_ORM_TYPES[number];\n\n// export type OrmType = PSQLType | MySQLType | MSSQLType;\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 @IsIn(ALL_ORM_TYPES)\n @IsOptional()\n readonly ormType: OrmType;\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 @ApiProperty({ description: 'Enable Audit Tracking for this field', })\n @IsOptional()\n @IsBoolean()\n enableAuditTracking?: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Is MultiSelect Field', })\n @IsBoolean()\n isMultiSelect: boolean;\n\n @IsOptional()\n @ApiProperty({ description: 'Is Primary Key Field', })\n @IsBoolean()\n isPrimaryKey?: boolean;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAG7D,qBAGa,IAAK,SAAQ,YAAY;IAGlC,QAAQ,EAAE,MAAM,CAAC;IAKjB,QAAQ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B,EAAE,CAAC;IAIrC,cAAc,EAAE,MAAM,CAAC;IAIvB,qBAAqB,EAAE,MAAM,CAAC;IAI9B,UAAU,EAAE,IAAI,CAAC;IAIjB,mBAAmB,EAAE,MAAM,CAAK;IAGhC,MAAM,EAAE,GAAG,CAAC;IAIZ,0BAA0B,EAAE,OAAO,CAAS;IAI5C,OAAO,EAAE,UAAU,EAAE,CAAC;CAEzB"}
|
|
@@ -190,6 +190,7 @@ __decorate([
|
|
|
190
190
|
], User.prototype, "isAllowedToGenerateApiKeys", void 0);
|
|
191
191
|
__decorate([
|
|
192
192
|
(0, typeorm_1.OneToMany)(() => user_api_key_entity_1.UserApiKey, key => key.user),
|
|
193
|
+
(0, class_transformer_1.Expose)(),
|
|
193
194
|
__metadata("design:type", Array)
|
|
194
195
|
], User.prototype, "apiKeys", void 0);
|
|
195
196
|
exports.User = User = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAoG;AACpG,iEAAiE;AACjE,2EAAyE;AACzE,+DAA6D;AAC7D,yDAAoD;AAK7C,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,4BAAY;IAA/B;;QA0BH,wBAAmB,GAAY,IAAI,CAAC;QAIpC,sBAAiB,GAAW,OAAO,CAAC;QAoBpC,WAAM,GAAY,IAAI,CAAC;QAyFvB,wBAAmB,GAAW,CAAC,CAAC;QAOhC,+BAA0B,GAAY,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAoG;AACpG,iEAAiE;AACjE,2EAAyE;AACzE,+DAA6D;AAC7D,yDAAoD;AAK7C,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,4BAAY;IAA/B;;QA0BH,wB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;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDACN;AAI9B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACf,IAAI;wCAAC;AAIjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iDACJ;AAGhC;IADC,IAAA,0BAAM,GAAE;;oCACG;AAIZ;IAFC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,IAAA,0BAAM,GAAE;;wDACmC;AAI5C;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAU,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;IAC5C,IAAA,0BAAM,GAAE;;qCACa;eAtJb,IAAI;IAHhB,IAAA,gBAAM,EAAC,SAAS,CAAC;IACjB,IAAA,0BAAgB,EAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;IAChF,IAAA,2BAAO,GAAE;GACG,IAAI,CAwJhB","sourcesContent":["import { CommonEntity } from \"src/entities/common.entity\"\nimport { Entity, Column, Index, JoinTable, ManyToMany, OneToMany, TableInheritance } from \"typeorm\";\nimport { RoleMetadata } from 'src/entities/role-metadata.entity';\nimport { UserViewMetadata } from 'src/entities/user-view-metadata.entity'\nimport { UserApiKey } from 'src/entities/user-api-key.entity'\nimport { Exclude, Expose } from \"class-transformer\";\n\n@Entity(\"ss_user\")\n@TableInheritance({ column: { type: \"varchar\", name: \"type\", default: \"User\" } })\n@Exclude()\nexport class User extends CommonEntity {\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n fullName: string;\n\n @Index({ unique: true })\n @Column({ type: \"varchar\" })\n @Expose()\n username: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n email: string;\n\n @Index()\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n mobile: string;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n password: string;\n\n @Column({ nullable: true, default: true })\n @Expose()\n forcePasswordChange: boolean = true;\n\n @Column({ type: \"varchar\", default: \"local\" })\n // don't send to client\n lastLoginProvider: string = \"local\";\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client (test)\n accessCode: string;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n googleAccessToken: string;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n googleId: string;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n googleProfilePicture: string;\n\n @Column({ default: true })\n @Expose()\n active: boolean = true;\n\n @Column({ nullable: true })\n // don't send to client\n forgotPasswordConfirmedAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n verificationTokenOnForgotPassword: string;\n\n @Column({ nullable: true })\n // don't send to client\n verificationTokenOnForgotPasswordExpiresAt: Date;\n\n @Column({ nullable: true })\n // don't send to client\n emailVerifiedOnRegistrationAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n emailVerificationTokenOnRegistration: string;\n\n @Column({ nullable: true })\n // don't send to client\n emailVerificationTokenOnRegistrationExpiresAt: Date;\n\n @Column({ nullable: true })\n // don't send to client\n mobileVerifiedOnRegistrationAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n mobileVerificationTokenOnRegistration: string;\n\n @Column({ nullable: true })\n // don't send to client\n mobileVerificationTokenOnRegistrationExpiresAt: Date;\n\n @Column({ nullable: true })\n // don't send to client\n emailVerifiedOnLoginAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n emailVerificationTokenOnLogin: string;\n\n @Column({ nullable: true })\n // don't send to client\n emailVerificationTokenOnLoginExpiresAt: Date;\n\n @Column({ nullable: true })\n // don't send to client\n mobileVerifiedOnLoginAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n // don't send to client\n mobileVerificationTokenOnLogin: string;\n\n @Column({ nullable: true })\n // don't send to client\n mobileVerificationTokenOnLoginExpiresAt: Date;\n\n @Column({ type: \"varchar\", nullable: true })\n @Expose()\n customPayload: string;\n\n @ManyToMany(() => RoleMetadata, roleMetadata => roleMetadata.users, { cascade: true })\n @JoinTable()\n @Expose()\n roles: RoleMetadata[];\n\n @OneToMany(() => UserViewMetadata, userViewMetadata => userViewMetadata.user, { cascade: true })\n // don't send to client\n userViewMetadata: UserViewMetadata[];\n\n // dont send to client\n @Column({ type: \"varchar\", default: \"bcrypt\" })\n passwordScheme: string;\n\n // dont send to client\n @Column({ type: \"int\", default: 1 })\n passwordSchemeVersion: number;\n\n // dont send to client\n @Column({ nullable: true })\n rehashedAt: Date;\n\n // dont send to client\n @Column({ type: \"int\", default: 0 })\n failedLoginAttempts: number = 0;\n\n @Expose()\n _media: any;\n\n @Column({ default: false })\n @Expose()\n isAllowedToGenerateApiKeys: boolean = false;\n\n @OneToMany(() => UserApiKey, key => key.user)\n @Expose()\n apiKeys: UserApiKey[];\n\n}"]}
|
|
@@ -6433,19 +6433,6 @@
|
|
|
6433
6433
|
"moduleUserKey": "solid-core",
|
|
6434
6434
|
"modelUserKey": "setting"
|
|
6435
6435
|
},
|
|
6436
|
-
{
|
|
6437
|
-
"displayName": "Ai settings Action",
|
|
6438
|
-
"name": "aiSettings-action",
|
|
6439
|
-
"type": "custom",
|
|
6440
|
-
"domain": "",
|
|
6441
|
-
"context": "",
|
|
6442
|
-
"customComponent": "/admin/core/solid-core/settings/ai-settings",
|
|
6443
|
-
"customIsModal": true,
|
|
6444
|
-
"serverEndpoint": "",
|
|
6445
|
-
"viewUserKey": "",
|
|
6446
|
-
"moduleUserKey": "solid-core",
|
|
6447
|
-
"modelUserKey": "setting"
|
|
6448
|
-
},
|
|
6449
6436
|
{
|
|
6450
6437
|
"displayName": "Misc Action",
|
|
6451
6438
|
"name": "miscSettings-action",
|
|
@@ -6954,18 +6941,10 @@
|
|
|
6954
6941
|
"moduleUserKey": "solid-core",
|
|
6955
6942
|
"parentMenuItemUserKey": "settings-menu-item"
|
|
6956
6943
|
},
|
|
6957
|
-
{
|
|
6958
|
-
"displayName": "Ai Settings",
|
|
6959
|
-
"name": "aiSettings-menu-item",
|
|
6960
|
-
"sequenceNumber": 3,
|
|
6961
|
-
"actionUserKey": "aiSettings-action",
|
|
6962
|
-
"moduleUserKey": "solid-core",
|
|
6963
|
-
"parentMenuItemUserKey": "settings-menu-item"
|
|
6964
|
-
},
|
|
6965
6944
|
{
|
|
6966
6945
|
"displayName": "Misc",
|
|
6967
6946
|
"name": "miscSettings-menu-item",
|
|
6968
|
-
"sequenceNumber":
|
|
6947
|
+
"sequenceNumber": 3,
|
|
6969
6948
|
"actionUserKey": "miscSettings-action",
|
|
6970
6949
|
"moduleUserKey": "solid-core",
|
|
6971
6950
|
"parentMenuItemUserKey": "settings-menu-item"
|
|
@@ -11476,13 +11455,6 @@
|
|
|
11476
11455
|
"label": "Auth Pages Layout"
|
|
11477
11456
|
}
|
|
11478
11457
|
},
|
|
11479
|
-
{
|
|
11480
|
-
"type": "field",
|
|
11481
|
-
"attrs": {
|
|
11482
|
-
"name": "authPagesTheme",
|
|
11483
|
-
"label": "Auth Pages Theme"
|
|
11484
|
-
}
|
|
11485
|
-
},
|
|
11486
11458
|
{
|
|
11487
11459
|
"type": "field",
|
|
11488
11460
|
"attrs": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.service.d.ts","sourceRoot":"","sources":["../../src/services/authentication.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAY5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMzC,OAAO,EAAE,aAAa,EAAE,MAAM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YAkDnE,0BAA0B;IA4ClC,qBAAqB,CAAC,wBAAwB,EAAE,wBAAwB;;;;;;;YA8ChE,2BAA2B;IA4CnC,cAAc,CAAC,IAAI,EAAE,IAAI;;;;IAazB,mBAAmB,CAAC,IAAI,EAAE,IAAI;IAe9B,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,oBAAoB,CAAC,EAAE,MAAM;IAa9D,aAAa,CAAC,eAAe,EAAE,eAAe;;;;YAmDtC,SAAS;IAqBjB,uBAAuB,CAAC,IAAI,EAAE,IAAI;IAkBlC,iBAAiB,CAAC,UAAU,EAAE,MAAM;;;;;;;;;;;YAqC5B,iCAAiC;IAK/C,OAAO,CAAC,mBAAmB;YAOb,uBAAuB;YAMvB,mBAAmB;IAa3B,MAAM,CAAC,YAAY,EAAE,MAAM;;;IAuC3B,YAAY,CAAC,MAAM,EAAE,MAAM;IAS3B,EAAE,CAAC,UAAU,EAAE,cAAc;;;;;;;;;;IA8B7B,eAAe,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAajG,eAAe,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;CASrC"}
|
|
@@ -310,6 +310,7 @@ let AuthenticationService = AuthenticationService_1 = class AuthenticationServic
|
|
|
310
310
|
let user = existingUser;
|
|
311
311
|
if ((0, class_validator_1.isEmpty)(user)) {
|
|
312
312
|
user = this.createUser(signUpDto);
|
|
313
|
+
user.active = false;
|
|
313
314
|
await this.assignRegistrationOtp(validationSource, user);
|
|
314
315
|
await this.userRepository.save(user);
|
|
315
316
|
await this.userService.addRoleToUser(user.username, this.settingService.getConfigValue('defaultRole'));
|