@nhtio/lucid-resourceful 0.1.0-master-1a63c078 → 0.1.0-master-c2c013d9
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/index.cjs +39 -9
- package/index.cjs.map +1 -1
- package/index.mjs +39 -9
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/private/decorators.d.ts +1 -1
- package/private/utils.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nhtio/lucid-resourceful",
|
|
3
|
-
"version": "0.1.0-master-
|
|
3
|
+
"version": "0.1.0-master-c2c013d9",
|
|
4
4
|
"description": "A decorator-driven AdonisJS library that lets you annotate Lucid ORM models with metadata to automatically generate CRUD controllers, validation rules, OpenAPI schemas, and a unified query interface.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Jak Giveon <jak@nht.io>",
|
package/private/decorators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LucidModel, ColumnOptions, ComputedOptions } from '@adonisjs/lucid/types/model';
|
|
2
2
|
import type { HasOne, ManyToMany, HasManyThrough, ManyToManyRelationOptions, RelationOptions, ThroughRelationOptions } from '@adonisjs/lucid/types/relations';
|
|
3
3
|
import type { ResourcefulColumnDefinition, ResourcefulComputedAccessorDefinition, ResourcefulRelationshipDefinition, AnySchema, StringSchema, DateSchema, BinarySchema, NumberSchema, BooleanSchema, ObjectSchema, ArraySchema, ResourcefulPropertySchema } from '@nhtio/lucid-resourceful/types';
|
|
4
4
|
/**
|
package/private/utils.d.ts
CHANGED
|
@@ -8,3 +8,7 @@ export declare const isString: (value: unknown) => value is string;
|
|
|
8
8
|
* Checks if a value is a function
|
|
9
9
|
*/
|
|
10
10
|
export declare const isFunction: (value: unknown) => value is Function;
|
|
11
|
+
/**
|
|
12
|
+
* Prepares and returns fields in a consistent format based on the input type and primary key.
|
|
13
|
+
*/
|
|
14
|
+
export declare const prepareFields: <T>(fields: unknown, primaryKey: string) => T;
|