@klerick/json-api-nestjs-shared 1.0.0-beta.5 → 1.0.0-beta.6
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 1.0.0-beta.6 (2026-01-23)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **json-api-nestjs-shared,json-api-nestjs:** im did mistake in commit msg ([56c483a](https://github.com/klerick/nestjs-json-api/commit/56c483a))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Alex H
|
|
10
|
+
|
|
1
11
|
## 1.0.0-beta.5 (2026-01-23)
|
|
2
12
|
|
|
3
13
|
### 🚀 Features
|
|
@@ -15,7 +15,8 @@ type FunctionKeys<E> = {
|
|
|
15
15
|
export type RelationKeys<E, IdKey extends string = 'id'> = {
|
|
16
16
|
[K in StringKeys<E>]: Exclude<E[K], null> extends never ? never : RelationCheck<Exclude<E[K], null>, IdKey> extends 1 ? K : never;
|
|
17
17
|
}[StringKeys<E>];
|
|
18
|
-
export type PropertyKeys<E, IdKey extends string = 'id'> = Exclude<StringKeys<E>, RelationKeys<E, IdKey> | FunctionKeys<E
|
|
18
|
+
export type PropertyKeys<E, IdKey extends string = 'id'> = Exclude<StringKeys<E>, RelationKeys<E, IdKey> | FunctionKeys<E>>;
|
|
19
|
+
export type AttrKeys<E, IdKey extends string = 'id'> = Exclude<PropertyKeys<E, IdKey>, IdKey>;
|
|
19
20
|
export type IsIterator<T> = T extends {
|
|
20
21
|
[Symbol.iterator](): Iterator<any>;
|
|
21
22
|
} ? 1 : 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttrKeys, RelationKeys, IsIterator, CastIteratorType } from './entity-type';
|
|
2
2
|
import { ValueOf } from './entity-type';
|
|
3
3
|
export type DebugMetaProps = Partial<{
|
|
4
4
|
time: number;
|
|
@@ -24,7 +24,7 @@ export type BaseLinks = {
|
|
|
24
24
|
links: Links;
|
|
25
25
|
};
|
|
26
26
|
export type Attributes<Entity extends object, IdKey extends string = 'id'> = {
|
|
27
|
-
[P in Exclude<
|
|
27
|
+
[P in Exclude<AttrKeys<Entity>, IdKey>]?: Entity[P];
|
|
28
28
|
};
|
|
29
29
|
export type BaseAttribute<Entity extends object, IdKey extends string = 'id'> = {
|
|
30
30
|
attributes?: Attributes<Entity, IdKey>;
|
|
@@ -15,7 +15,8 @@ type FunctionKeys<E> = {
|
|
|
15
15
|
export type RelationKeys<E, IdKey extends string = 'id'> = {
|
|
16
16
|
[K in StringKeys<E>]: Exclude<E[K], null> extends never ? never : RelationCheck<Exclude<E[K], null>, IdKey> extends 1 ? K : never;
|
|
17
17
|
}[StringKeys<E>];
|
|
18
|
-
export type PropertyKeys<E, IdKey extends string = 'id'> = Exclude<StringKeys<E>, RelationKeys<E, IdKey> | FunctionKeys<E
|
|
18
|
+
export type PropertyKeys<E, IdKey extends string = 'id'> = Exclude<StringKeys<E>, RelationKeys<E, IdKey> | FunctionKeys<E>>;
|
|
19
|
+
export type AttrKeys<E, IdKey extends string = 'id'> = Exclude<PropertyKeys<E, IdKey>, IdKey>;
|
|
19
20
|
export type IsIterator<T> = T extends {
|
|
20
21
|
[Symbol.iterator](): Iterator<any>;
|
|
21
22
|
} ? 1 : 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AttrKeys, RelationKeys, IsIterator, CastIteratorType } from './entity-type';
|
|
2
2
|
import { ValueOf } from './entity-type';
|
|
3
3
|
export type DebugMetaProps = Partial<{
|
|
4
4
|
time: number;
|
|
@@ -24,7 +24,7 @@ export type BaseLinks = {
|
|
|
24
24
|
links: Links;
|
|
25
25
|
};
|
|
26
26
|
export type Attributes<Entity extends object, IdKey extends string = 'id'> = {
|
|
27
|
-
[P in Exclude<
|
|
27
|
+
[P in Exclude<AttrKeys<Entity>, IdKey>]?: Entity[P];
|
|
28
28
|
};
|
|
29
29
|
export type BaseAttribute<Entity extends object, IdKey extends string = 'id'> = {
|
|
30
30
|
attributes?: Attributes<Entity, IdKey>;
|