بنقرة واحدة
getting-started
Use when storing and validating multilingual text in NestJS apis with TypeORM and class-validator.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when storing and validating multilingual text in NestJS apis with TypeORM and class-validator.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when scanning NestJS providers with DiscoveryService-backed utilities.
Use when working with the @wisemen/nestjs-custom-fields package — developer-defined custom fields in NestJS with TypeORM persistence and runtime validation. Covers registering the CustomFieldDefinition entity, authoring definitions with customFieldDefinition(), storing resolved values via @CustomFieldValueColumn(), exposing them through CustomFieldValueDto / @IsCustomFields(), and validating submissions with CustomFieldDefinitionsRepository + validateCustomFieldValues(). Use this whenever a task involves custom field definitions, CustomFieldValue columns, custom-field DTOs, or tenant-scoped field definitions, even if the package is not named explicitly.
Use when defining Typesense collections, collectors, and search queries in NestJS APIs.
Generate PDFs through API2PDF in NestJS. Use when converting HTML or URLs to PDFs in apis.
Use when configuring NATS messaging, subscribers, or the simple NatsClient in NestJS applications.
Use when writing tests for NestJS api packages with custom expect matchers, domain events, or transactional TypeORM use cases.
| name | getting-started |
| description | Use when storing and validating multilingual text in NestJS apis with TypeORM and class-validator. |
Use LocalizedString when a field needs multiple translations. Use LocalizedStringDto in DTOs, @IsLocalizedString(...) to validate languages, and @LocalizedStringColumn() to persist the value as jsonb.
import { ApiProperty } from '@nestjs/swagger'
import { Entity, PrimaryGeneratedColumn } from 'typeorm'
import { IsLocalizedString, LocalizedString, LocalizedStringColumn, LocalizedStringDto, initLocalizedString } from '@wisemen/localized-string'
initLocalizedString({
currentLocale: () => 'en', // Replace with your own context-dependent locale resolver.
missingTranslationBehavior: 'empty'
})
export class CreateProductDto {
@ApiProperty({ type: LocalizedStringDto })
@IsLocalizedString({
requiredLanguages: ['en', 'fr']
})
name: LocalizedStringDto
}
@Entity()
export class Product {
@PrimaryGeneratedColumn()
id: number
@LocalizedStringColumn()
name: LocalizedString
}
const product = new Product()
product.name = dto.name.parse()
const label = product.name.translate('nl', {
fallbackLocales: ['en']
})