@lenne.tech/nest-server 11.22.0 → 11.22.1

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.
@@ -0,0 +1,79 @@
1
+ # Framework Compatibility for Claude Code
2
+
3
+ This document defines the maintenance obligations that ensure Claude Code can effectively work with `@lenne.tech/nest-server` in consuming projects.
4
+
5
+ ## Architecture Overview
6
+
7
+ The framework ships documentation alongside source code so that Claude Code can read it from `node_modules/`. Three layers work together:
8
+
9
+ 1. **npm package** ships `CLAUDE.md`, `FRAMEWORK-API.md`, `.claude/rules/`, `docs/`, `migration-guides/`
10
+ 2. **Consuming project** `CLAUDE.md` points Claude to read `node_modules/@lenne.tech/nest-server/`
11
+ 3. **Claude Code plugin** (`lt-dev`) detects nest-server and injects concrete source paths via hooks
12
+
13
+ ## Maintenance Obligations
14
+
15
+ ### When Adding/Changing Interfaces in `server-options.interface.ts`
16
+
17
+ 1. `FRAMEWORK-API.md` is auto-generated during `pnpm run build` via `scripts/generate-framework-api.ts`
18
+ 2. Verify the generated output includes the new interface and all fields
19
+ 3. Add JSDoc with `@default` tags for all config fields — these appear in the API reference
20
+
21
+ ### When Adding New Core Modules (`src/core/modules/`)
22
+
23
+ 1. Create `README.md` and `INTEGRATION-CHECKLIST.md` in the module directory
24
+ 2. The generator script automatically picks up new modules for the "Core Modules" table
25
+ 3. If the module has `forRoot()` config, add the interface to `server-options.interface.ts`
26
+ 4. Run `pnpm run build` to regenerate `FRAMEWORK-API.md`
27
+
28
+ ### When Changing CrudService Methods
29
+
30
+ 1. Add JSDoc to new methods — the generator extracts the first line as description
31
+ 2. Run `pnpm run build` to regenerate `FRAMEWORK-API.md`
32
+ 3. If the method signature pattern changes (standard/Force/Raw), update the "Variants" note
33
+
34
+ ### When Changing `CoreModule.forRoot()` Signatures
35
+
36
+ 1. Ensure JSDoc is complete on the new overload
37
+ 2. Run `pnpm run build` to regenerate `FRAMEWORK-API.md`
38
+ 3. If adding a new parameter, update the consuming project template (`nest-server-starter/CLAUDE.md`)
39
+
40
+ ### When Releasing New Versions
41
+
42
+ 1. Run `pnpm run build` — this regenerates `FRAMEWORK-API.md` with the new version number
43
+ 2. The file is included in the npm package via `package.json` `files` array
44
+ 3. Migration guides are separate (see `.claude/rules/migration-guides.md`)
45
+
46
+ ## Files Shipped with npm Package
47
+
48
+ | File | Purpose | Auto-Updated |
49
+ |------|---------|:------------:|
50
+ | `CLAUDE.md` | Framework rules, architecture, debugging guide | Manual |
51
+ | `FRAMEWORK-API.md` | Compact API reference (interfaces, methods) | Yes (`pnpm run build`) |
52
+ | `.claude/rules/*.md` | 12 rule files covering all aspects | Manual |
53
+ | `docs/REQUEST-LIFECYCLE.md` | Complete request lifecycle | Manual |
54
+ | `migration-guides/*.md` | Version migration guides | Per release |
55
+
56
+ ## Generator Script
57
+
58
+ `scripts/generate-framework-api.ts` extracts via ts-morph:
59
+ - `CoreModule.forRoot()` overload signatures
60
+ - All config interfaces (`IServerOptions`, `IBetterAuth`, `IMultiTenancy`, etc.)
61
+ - `ServiceOptions` interface
62
+ - `CrudService` public method signatures
63
+ - Core module listing with documentation status
64
+
65
+ Run manually: `npx tsx scripts/generate-framework-api.ts`
66
+
67
+ ## Cross-Repository Dependencies
68
+
69
+ This framework compatibility strategy spans multiple repositories:
70
+
71
+ | Repository | Role |
72
+ |-----------|------|
73
+ | `nest-server` | Ships documentation with npm package (this repo) |
74
+ | `nest-server-starter` | `CLAUDE.md` points Claude to `node_modules/` source |
75
+ | `nuxt-extensions` | Same pattern: `CLAUDE.md` shipped with npm package |
76
+ | `nuxt-base-starter` | `CLAUDE.md` points Claude to nuxt-extensions source |
77
+ | `claude-code/plugins/lt-dev` | Hooks detect frameworks, Skills reference source paths |
78
+
79
+ The full strategy document is maintained in the claude-code plugin repository.
package/CLAUDE.md CHANGED
@@ -22,6 +22,7 @@ The following documents must be kept up to date when making changes that affect
22
22
  | `docs/REQUEST-LIFECYCLE.md` | Adding/changing decorators, interceptors, guards, pipes, middleware, plugins, services, modules, or the request/response flow |
23
23
  | `migration-guides/` | Releasing MINOR or MAJOR versions (see `.claude/rules/migration-guides.md`) |
24
24
  | `.claude/rules/configurable-features.md` | Adding new configurable features |
25
+ | `FRAMEWORK-API.md` | Auto-regenerated by `pnpm run build` — verify after adding interfaces, CrudService methods, or core modules |
25
26
 
26
27
  **Rule:** When a code change adds, removes, or modifies a feature listed in `docs/REQUEST-LIFECYCLE.md` (Features Overview, diagrams, decorator reference, configuration, etc.), update the document in the same commit or PR.
27
28
 
@@ -164,6 +165,7 @@ Detailed documentation in `.claude/rules/`:
164
165
  | `migration-guides.md` | Process for creating version migration guides |
165
166
  | `configurable-features.md` | Configuration patterns: "Presence implies enabled" and "Boolean shorthand" (`true` / `{}`) |
166
167
  | `package-management.md` | Fixed package versions only - no `^`, `~`, or ranges |
168
+ | `framework-compatibility.md` | Maintenance obligations for FRAMEWORK-API.md, shipped docs, cross-repo dependencies |
167
169
 
168
170
  ## In-Depth Documentation
169
171
 
@@ -0,0 +1,231 @@
1
+ # @lenne.tech/nest-server — Framework API Reference
2
+
3
+ > Auto-generated from source code on 2026-04-04 (v11.22.1)
4
+ > File: `FRAMEWORK-API.md` — compact, machine-readable API surface for Claude Code
5
+
6
+ ## CoreModule.forRoot()
7
+
8
+ - `CoreModule.forRoot(options: Partial<IServerOptions>, overrides?: ICoreModuleOverrides)`: `DynamicModule`
9
+ - ~~`CoreModule.forRoot(AuthService: any, AuthModule: any, options: Partial<IServerOptions>, overrides?: ICoreModuleOverrides)`: `DynamicModule`~~ *(deprecated)*
10
+
11
+ ## Configuration Interfaces
12
+
13
+ ### IServerOptions
14
+
15
+ - `appUrl?`: `string` — Base URL of the frontend/app application.
16
+ - `auth?`: `IAuth` — Authentication system configuration
17
+ - `automaticObjectIdFiltering?`: `boolean` — Automatically detect ObjectIds in string values in FilterQueries
18
+ - `baseUrl?`: `string` — Base URL of the API server.
19
+ - `betterAuth?`: `boolean | IBetterAuth` (default: `undefined (enabled with defaults)`) — Configuration for better-auth authentication framework.
20
+ - `brevo?`: `{ apiKey: string; exclude?: RegExp; sender: { email: string; name: string; }; }` — Configuration for Brevo
21
+ - `compression?`: `boolean | compression.CompressionOptions` — Whether to use the compression middleware package to enable gzip compression.
22
+ - `cookies?`: `boolean` — Whether to use cookies for authentication handling
23
+ - `cronJobs?`: `Record<string, string | false | 0 | CronJobConfigWithTimeZone<null, null> | C...` — Cron jobs configuration object with the name of the cron job function as key
24
+ - `email?`: `{ defaultSender?: { email?: string; name?: string; }; mailjet?: MailjetOption...` — SMTP and template configuration for sending emails
25
+ - `env?`: `string` — Environment
26
+ - `errorCode?`: `IErrorCode` — Configuration for the error code module
27
+ - `execAfterInit?`: `string` — Exec a command after server is initialized
28
+ - `filter?`: `{ maxLimit?: number; }` — Filter configuration and defaults
29
+ - `graphQl?`: `false | { driver?: ApolloDriverConfig; enableSubscriptionAuth?: boolean; maxC...` — Configuration of the GraphQL module
30
+ - `healthCheck?`: `{ configs?: { database?: { enabled?: boolean; key?: string; options?: Mongoos...` — Whether to activate health check endpoints
31
+ - `hostname?`: `string` — Hostname of the server
32
+ - `ignoreSelectionsForPopulate?`: `boolean` — Ignore selections in fieldSelection
33
+ - `jwt?`: `IJwt & JwtModuleOptions & { refresh?: IJwt & { renewal?: boolean; }; sameToke...` — Configuration of JavaScript Web Token (JWT) module
34
+ - `loadLocalConfig?`: `string | boolean` — Load local configuration
35
+ - `logExceptions?`: `boolean` — Log exceptions (for better debugging)
36
+ - `mongoose?`: `{ collation?: CollationOptions; modelDocumentation?: boolean; options?: Mongo...` — Configuration for Mongoose
37
+ - `multiTenancy?`: `IMultiTenancy` (default: `undefined (disabled)`) — Multi-tenancy configuration for tenant-based data isolation.
38
+ - `permissions?`: `boolean | IPermissions` (default: `undefined (disabled)`) — Permissions report module (development tool).
39
+ - `port?`: `number` — Port number of the server
40
+ - `security?`: `{ checkResponseInterceptor?: boolean | { checkObjectItself?: boolean; debug?:...` — Configuration for security pipes and interceptors
41
+ - `sha256?`: `boolean` — Whether to enable verification and automatic encryption for received passwords that are not in sha256 format
42
+ - `staticAssets?`: `{ options?: ServeStaticOptions; path?: string; }` — Configuration for useStaticAssets
43
+ - `systemSetup?`: `ISystemSetup` — System setup configuration for initial admin creation.
44
+ - `templates?`: `{ engine?: string; path?: string; }` — Templates
45
+ - `tus?`: `boolean | ITusConfig` — TUS resumable upload configuration.
46
+
47
+ ### IBetterAuth (type alias: IBetterAuthWithoutPasskey | IBetterAuthWithPasskey)
48
+
49
+ When `passkey` is enabled, `trustedOrigins` is required (compile-time enforcement).
50
+
51
+ - `passkey?`: `IBetterAuthPasskeyDisabled` — Passkey/WebAuthn configuration (DISABLED or not configured).
52
+ - `trustedOrigins?`: `string[]` — Trusted origins for CORS configuration.
53
+
54
+ ### IAuth
55
+
56
+ - `legacyEndpoints?`: `IAuthLegacyEndpoints` — Configuration for legacy auth endpoints
57
+ - `preventUserEnumeration?`: `boolean` (default: `false (backward compatible - specific error messages)`) — Prevent user enumeration via unified error messages
58
+ - `rateLimit?`: `IAuthRateLimit` (default: `{ enabled: false }`) — Rate limiting configuration for Legacy Auth endpoints
59
+
60
+ ### IMultiTenancy
61
+
62
+ - `enabled?`: `boolean` (default: `true (when config object is present)`) — Explicitly disable multi-tenancy even when config is present.
63
+ - `excludeSchemas?`: `string[]` — Model names (NOT collection names) to exclude from tenant filtering.
64
+ - `headerName?`: `string` (default: `'x-tenant-id'`) — Header name for tenant selection.
65
+ - `membershipModel?`: `string` (default: `'TenantMember'`) — Mongoose model name for the membership collection.
66
+ - `adminBypass?`: `boolean` (default: `true`) — Whether system admins (RoleEnum.ADMIN) bypass the membership check.
67
+ - `roleHierarchy?`: `Record<string, number>` (default: `{ member: 1, manager: 2, owner: 3 }`) — Custom role hierarchy for tenant membership roles.
68
+ - `cacheTtlMs?`: `number` (default: `30000 (30 seconds)`) — TTL in milliseconds for the tenant guard's in-memory membership cache.
69
+
70
+ ### IErrorCode
71
+
72
+ - `additionalErrorRegistry?`: `Record<string, { code: string; message: string; translations: { [locale: stri...` — Additional error registry to merge with core LTNS_* errors
73
+ - `autoRegister?`: `boolean` (default: `true`) — Automatically register the ErrorCodeModule in CoreModule
74
+
75
+ ### IJwt
76
+
77
+ - `privateKey?`: `string` — Private key
78
+ - `publicKey?`: `string` — Public key
79
+ - `secret?`: `string` — Secret to encrypt the JWT
80
+ - `secretOrKeyProvider?`: `(request: Record<string, any>, rawJwtToken: string, done: (err: any, secret: ...` — JWT Provider
81
+ - `secretOrPrivateKey?`: `string` — Alias of secret (for backwards compatibility)
82
+ - `signInOptions?`: `JwtSignOptions` — SignIn Options like expiresIn
83
+
84
+ ### ICoreModuleOverrides
85
+
86
+ - `betterAuth?`: `{ controller?: Type<any>; resolver?: Type<any>; }` — Override BetterAuth controller and/or resolver.
87
+ - `errorCode?`: `{ controller?: Type<any>; service?: Type<any>; }` — Override ErrorCode controller and/or service.
88
+
89
+ ### IBetterAuthPasskeyConfig
90
+
91
+ - `authenticatorAttachment?`: `"cross-platform" | "platform"` (default: `undefined (both allowed)`) — Authenticator attachment preference.
92
+ - `challengeStorage?`: `"cookie" | "database"` (default: `'database'`) — Where to store WebAuthn challenges.
93
+ - `challengeTtlSeconds?`: `number` (default: `300 (5 minutes)`) — TTL in seconds for database-stored challenges.
94
+ - `enabled?`: `boolean` (default: `true (when config block is present)`) — Whether passkey authentication is enabled.
95
+ - `origin?`: `string` — Origin URL for WebAuthn.
96
+ - `residentKey?`: `"discouraged" | "preferred" | "required"` (default: `'preferred'`) — Resident key (discoverable credential) requirement.
97
+ - `rpId?`: `string` — Relying Party ID (usually the domain without protocol).
98
+ - `rpName?`: `string` — Relying Party Name (displayed to users)
99
+ - `userVerification?`: `"discouraged" | "preferred" | "required"` (default: `'preferred'`) — User verification requirement.
100
+ - `webAuthnChallengeCookie?`: `string` (default: `'better-auth-passkey'`) — Custom cookie name for WebAuthn challenge storage.
101
+
102
+ ### IBetterAuthTwoFactorConfig
103
+
104
+ - `appName?`: `string` (default: `'Nest Server'`) — App name shown in authenticator apps.
105
+ - `enabled?`: `boolean` (default: `true (enabled by default when BetterAuth is active)`) — Whether 2FA is enabled.
106
+
107
+ ### IBetterAuthJwtConfig
108
+
109
+ - `enabled?`: `boolean` (default: `true (enabled by default when BetterAuth is active)`) — Whether JWT plugin is enabled.
110
+ - `expiresIn?`: `string` (default: `'15m'`) — JWT expiration time
111
+
112
+ ### IBetterAuthEmailVerificationConfig
113
+
114
+ - `autoSignInAfterVerification?`: `boolean` (default: `true`) — Whether to automatically sign in the user after email verification.
115
+ - `brevoTemplateId?`: `number` (default: `undefined (uses SMTP/EJS templates)`) — Brevo template ID for verification emails.
116
+ - `callbackURL?`: `string` (default: `undefined (backend-handled verification)`) — Frontend callback URL for email verification.
117
+ - `enabled?`: `boolean` (default: `true (enabled by default when BetterAuth is active)`) — Whether email verification is enabled.
118
+ - `expiresIn?`: `number` (default: `86400 (24 hours)`) — Time in seconds until the verification link expires.
119
+ - `locale?`: `string` (default: `'en'`) — Locale for the verification email template.
120
+ - `resendCooldownSeconds?`: `number` (default: `60`) — Cooldown in seconds between resend requests for the same email address.
121
+ - `template?`: `string` (default: `'email-verification'`) — Custom template name for the verification email.
122
+
123
+ ### IBetterAuthRateLimit
124
+
125
+ - `enabled?`: `boolean` (default: `false`) — Whether rate limiting is enabled
126
+ - `max?`: `number` (default: `10`) — Maximum number of requests within the time window
127
+ - `maxEntries?`: `number` (default: `10000`) — Maximum number of entries in the in-memory rate limit store.
128
+ - `message?`: `string` — Custom message when rate limit is exceeded
129
+ - `skipEndpoints?`: `string[]` — Endpoints to skip rate limiting entirely
130
+ - `strictEndpoints?`: `string[]` — Endpoints to apply stricter rate limiting (e.g., sign-in, sign-up)
131
+ - `windowSeconds?`: `number` — Time window in seconds
132
+
133
+ ### IBetterAuthSignUpChecksConfig
134
+
135
+ - `enabled?`: `boolean` (default: `true (enabled by default when BetterAuth is active)`) — Whether sign-up checks are enabled.
136
+ - `requiredFields?`: `string[]` (default: `['termsAndPrivacyAccepted']`) — Fields that must be provided and truthy during sign-up.
137
+
138
+ ### ServiceOptions
139
+
140
+ - `checkRights?`: `boolean`
141
+ - `collation?`: `CollationOptions`
142
+ - `create?`: `boolean`
143
+ - `currentUser?`: `{ [key: string]: any; id: string; roles?: string[]; }`
144
+ - `fieldSelection?`: `FieldSelection`
145
+ - `force?`: `boolean`
146
+ - `inputType?`: `new (...params: any[]) => any`
147
+ - `outputType?`: `new (...params: any[]) => any`
148
+ - `populate?`: `string | PopulateOptions | (string | PopulateOptions)[]`
149
+ - `prepareInput?`: `PrepareInputOptions`
150
+ - `prepareOutput?`: `PrepareOutputOptions`
151
+ - `processFieldSelection?`: `{ dbModel?: Model<any>; ignoreSelections?: boolean; model?: new (...args: any...`
152
+ - `pubSub?`: `boolean`
153
+ - `raw?`: `boolean`
154
+ - `roles?`: `string | string[]`
155
+ - `select?`: `string | string[] | Record<string, number | boolean | object>`
156
+ - `setCreateOrUpdateUserId?`: `boolean`
157
+
158
+ ## CrudService Methods
159
+
160
+ Base class for all services. Located at `src/core/common/services/crud.service.ts`.
161
+
162
+ Generic: `CrudService<Model, CreateInput, UpdateInput>`
163
+
164
+ - `async aggregate(pipeline: PipelineStage[], serviceOptions?: ServiceOptions & { aggregateOptions?: AggregateOptions; })`: `Promise<T>` — Aggregate
165
+ - `async aggregateForce(pipeline: PipelineStage[], serviceOptions?: ServiceOptions)`: `Promise<T>` — Aggregate without checks or restrictions
166
+ - `async aggregateRaw(pipeline: PipelineStage[], serviceOptions?: ServiceOptions)`: `Promise<T>` — Aggregate without checks, restrictions or preparations
167
+ - `async create(input: PlainObject<CreateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Create item
168
+ - `async createForce(input: PlainObject<CreateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Create item without checks or restrictions
169
+ - `async createRaw(input: PlainObject<CreateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Create item without checks, restrictions or preparations
170
+ - `distinct(property: string)`: `Promise<string[]>` — Get distinct values of a property
171
+ - `async get(id: string, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Get item by ID
172
+ - `async getForce(id: string, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Get item by ID without checks or restrictions
173
+ - `async getRaw(id: string, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Get item by ID without checks, restrictions or preparations
174
+ - `async find(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<Model[]>` — Get items via filter
175
+ - `async findForce(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<Model[]>` — Get items via filter without checks or restrictions
176
+ - `async findRaw(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<Model[]>` — Get items via filter without checks, restrictions or preparations
177
+ - `async findAndCount(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<{ items: Model[]; pagination: PaginationInfo; totalCount: number; }>` — Get items and total count via filter
178
+ - `async findAndCountForce(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<{ items: Model[]; pagination: PaginationInfo; totalCount: number; }>` — Get items and total count via filter without checks or restrictions
179
+ - `async findAndCountRaw(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<{ items: Model[]; pagination: PaginationInfo; totalCount: number; }>` — Get items and total count via filter without checks, restrictions or preparations
180
+ - `async findAndUpdate(filter: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., update: PlainObject<UpdateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model[]>` — Find and update
181
+ - `async findAndUpdateForce(filter: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., update: PlainObject<UpdateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model[]>` — Find and update without checks or restrictions
182
+ - `async findAndUpdateRaw(filter: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., update: PlainObject<UpdateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model[]>` — Find and update without checks, restrictions or preparations
183
+ - `async findOne(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; }, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Find one item via filter
184
+ - `async findOneForce(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<Model>` — Find one item via filter without checks or restrictions
185
+ - `async findOneRaw(filter?: FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryOptions; s..., serviceOptions?: ServiceOptions)`: `Promise<Model>` — Find one item via filter without checks, restrictions or preparations
186
+ - `getModel()`: `MongooseModel<Document<Types.ObjectId, any, any, Record<string, any>, {}> & M...` — Get service model to process queries directly
187
+ - `async read(input: string | FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryO..., serviceOptions?: ServiceOptions)`: `Promise<Model | Model[]>` — CRUD alias for get or find
188
+ - `async readForce(input: string | FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryO..., serviceOptions?: ServiceOptions)`: `Promise<Model | Model[]>` — CRUD alias for getForce or findForce
189
+ - `async readRaw(input: string | FilterArgs | { filterQuery?: QueryFilter<any>; queryOptions?: QueryO..., serviceOptions?: ServiceOptions)`: `Promise<Model | Model[]>` — CRUD alias for getRaw or findRaw
190
+ - `async update(id: string, input: PlainObject<UpdateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Update item via ID
191
+ - `async updateForce(id: string, input: PlainObject<UpdateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Update item via ID without checks or restrictions
192
+ - `async updateRaw(id: string, input: PlainObject<UpdateInput>, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Update item via ID without checks, restrictions or preparations
193
+ - `async delete(id: string, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Delete item via ID
194
+ - `async deleteForce(id: string, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Delete item via ID without checks or restrictions
195
+ - `async deleteRaw(id: string, serviceOptions?: ServiceOptions)`: `Promise<Model>` — Delete item via ID without checks, restrictions or preparations
196
+ - `async processQueryOrDocument(queryOrDocument: Document<Types.ObjectId, any, any, Record<string, any>, {}> | Document<Types...., serviceOptions?: ServiceOptions)`: `Promise<T>` — Execute, populate and map Mongoose query or document(s) with serviceOptions
197
+
198
+ **Variants:** Each method has three variants:
199
+ - `method()` — Standard: applies `securityCheck()`, respects permissions
200
+ - `methodForce()` — Bypasses `securityCheck()`, still applies input validation
201
+ - `methodRaw()` — Direct database access, no security or validation
202
+
203
+ ## Core Modules
204
+
205
+ | Module | Docs | Path |
206
+ |--------|------|------|
207
+ | `auth` | — | `src/core/modules/auth/` |
208
+ | `better-auth` | README, CHECKLIST | `src/core/modules/better-auth/` |
209
+ | `error-code` | CHECKLIST | `src/core/modules/error-code/` |
210
+ | `file` | README | `src/core/modules/file/` |
211
+ | `health-check` | — | `src/core/modules/health-check/` |
212
+ | `migrate` | README | `src/core/modules/migrate/` |
213
+ | `permissions` | README, CHECKLIST | `src/core/modules/permissions/` |
214
+ | `system-setup` | README, CHECKLIST | `src/core/modules/system-setup/` |
215
+ | `tenant` | README, CHECKLIST | `src/core/modules/tenant/` |
216
+ | `tus` | README, CHECKLIST | `src/core/modules/tus/` |
217
+ | `user` | — | `src/core/modules/user/` |
218
+
219
+ ## Key Source Files
220
+
221
+ | File | Purpose |
222
+ |------|---------|
223
+ | `src/core.module.ts` | CoreModule.forRoot() — module registration |
224
+ | `src/core/common/interfaces/server-options.interface.ts` | All config interfaces |
225
+ | `src/core/common/interfaces/service-options.interface.ts` | ServiceOptions interface |
226
+ | `src/core/common/services/crud.service.ts` | CrudService base class |
227
+ | `src/core/common/services/config.service.ts` | ConfigService (global) |
228
+ | `src/core/common/decorators/` | @Restricted, @Roles, @CurrentUser, @UnifiedField |
229
+ | `src/core/common/interceptors/` | CheckResponse, CheckSecurity, ResponseModel |
230
+ | `docs/REQUEST-LIFECYCLE.md` | Complete request lifecycle |
231
+ | `.claude/rules/` | Detailed rules for architecture, security, testing |
@@ -1,11 +1,7 @@
1
1
  import { CoreFileInfo } from '../../../core/modules/file/core-file-info.model';
2
2
  export declare class FileInfo extends CoreFileInfo {
3
3
  }
4
- export declare const FileInfoSchema: import("mongoose").Schema<FileInfo, import("mongoose").Model<FileInfo, any, any, any, import("mongoose").Document<unknown, any, FileInfo, any, import("mongoose").DefaultSchemaOptions> & FileInfo & Required<{
5
- _id: import("mongoose").Types.ObjectId;
6
- }> & {
7
- __v: number;
8
- }, any, FileInfo>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").DefaultSchemaOptions> & FileInfo & Required<{
4
+ export declare const FileInfoSchema: import("mongoose").Schema<FileInfo, import("mongoose").Model<FileInfo, any, any, any, any, any, FileInfo>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, FileInfo, import("mongoose").Document<unknown, {}, FileInfo, {}, import("mongoose").DefaultSchemaOptions> & FileInfo & Required<{
9
5
  _id: import("mongoose").Types.ObjectId;
10
6
  }> & {
11
7
  __v: number;
@@ -14,11 +14,7 @@ export declare class User extends CoreUserModel implements PersistenceModel {
14
14
  map(input: any): this;
15
15
  securityCheck(user: User, force?: boolean): this;
16
16
  }
17
- export declare const UserSchema: Schema<User, import("mongoose").Model<User, any, any, any, Document<unknown, any, User, any, import("mongoose").DefaultSchemaOptions> & User & Required<{
18
- _id: import("mongoose").Types.ObjectId;
19
- }> & {
20
- __v: number;
21
- }, any, User>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, User, Document<unknown, {}, User, {}, import("mongoose").DefaultSchemaOptions> & User & Required<{
17
+ export declare const UserSchema: Schema<User, import("mongoose").Model<User, any, any, any, any, any, User>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, User, Document<unknown, {}, User, {}, import("mongoose").DefaultSchemaOptions> & User & Required<{
22
18
  _id: import("mongoose").Types.ObjectId;
23
19
  }> & {
24
20
  __v: number;