@stacksjs/orm 0.71.2 → 0.72.0
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/define-model.d.ts +3 -1
- package/dist/index.js +19 -19
- package/dist/routes.js +1 -1
- package/package.json +4 -4
package/dist/define-model.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { createTaggableMethods } from './traits/taggable';
|
|
|
7
7
|
import { createTwoFactorMethods } from './traits/two-factor';
|
|
8
8
|
import { type OrmModelDefinition as BQBModelDefinition, type OrmModelStatic } from '@stacksjs/query-builder';
|
|
9
9
|
import type { ApiMiddleware, DashboardModelOptions } from '@stacksjs/types';
|
|
10
|
+
import type { BelongsToForeignKeys } from './model-types';
|
|
10
11
|
import type { Faker } from '@stacksjs/faker';
|
|
11
12
|
import type { InferRelationNames } from '@stacksjs/query-builder';
|
|
12
13
|
import type { Validator } from '@stacksjs/validation';
|
|
@@ -202,7 +203,8 @@ declare type QueryDefinition<TDef extends ModelDefinition> = TDef
|
|
|
202
203
|
& QueryTraits<TDef>;
|
|
203
204
|
declare type QueryModel<TDef extends ModelDefinition> = OrmModelStatic<QueryDefinition<TDef>>;
|
|
204
205
|
declare type ModelWriteData<TDef extends ModelDefinition> = Parameters<QueryModel<TDef>['create']>[0];
|
|
205
|
-
declare type ModelForceWriteData<TDef extends ModelDefinition> = Parameters<ReturnType<QueryModel<TDef>['make']>['forceFill']>[0]
|
|
206
|
+
declare type ModelForceWriteData<TDef extends ModelDefinition> = Parameters<ReturnType<QueryModel<TDef>['make']>['forceFill']>[0]
|
|
207
|
+
& Partial<BelongsToForeignKeys<QueryDefinition<TDef>>>;
|
|
206
208
|
/**
|
|
207
209
|
* Stacks-enhanced model definition.
|
|
208
210
|
*
|