@klerick/json-api-nestjs-shared 1.0.0-beta.8 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,41 @@
1
+ ## 1.1.0 (2026-10-10)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **json-api-nestjs-sdk,json-api-nestjs-shared:** surface the meta a response carries ([2a5be7d](https://github.com/klerick/nestjs-json-api/commit/2a5be7d))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Alex H
10
+ - Claude Opus 5 (1M context)
11
+
12
+ # 1.0.0 (2026-09-12)
13
+
14
+ ### 🚀 Features
15
+
16
+ - **json-api-nestjs-shared:** add command to generate mjs package.json for ESM support in dist folder ([2b3083d](https://github.com/klerick/nestjs-json-api/commit/2b3083d))
17
+ - **json-api-nestjs-shared,json-api-nestjs:** im did mistake in commit msg ([56c483a](https://github.com/klerick/nestjs-json-api/commit/56c483a))
18
+ - **json-api-nestjs-shared:** enhance type utilities with `UnwrapReference`, `FunctionKeys`, and refine `PropertyKeys` logic ([d864270](https://github.com/klerick/nestjs-json-api/commit/d864270))
19
+ - **json-api-nestjs-shared:** fix after update nx ([e4ef59f](https://github.com/klerick/nestjs-json-api/commit/e4ef59f))
20
+ - **json-api-nestjs-shared:** fix after update nx ([4c7a42d](https://github.com/klerick/nestjs-json-api/commit/4c7a42d))
21
+ - **json-api-nestjs,json-api-nestjs-microorm,json-api-nestjs-sdk,json-api-nestjs-shared,json-api-nestjs-typeorm:** up nestjs ([77c7bf4](https://github.com/klerick/nestjs-json-api/commit/77c7bf4))
22
+ - **json-api-nestjs,json-api-nestjs-microorm,json-api-nestjs-sdk,json-api-nestjs-shared,json-api-nestjs-typeorm:** up nestjs ([42b6b82](https://github.com/klerick/nestjs-json-api/commit/42b6b82))
23
+ - **json-api-nestjs,json-api-nestjs-microorm,json-api-nestjs-sdk,json-api-nestjs-shared,json-api-nestjs-typeorm:** up nestjs ([4c559e2](https://github.com/klerick/nestjs-json-api/commit/4c559e2))
24
+ - **json-api-nestjs-shared:** Use new structure ([4359ac7](https://github.com/klerick/nestjs-json-api/commit/4359ac7))
25
+ - **json-api-nestjs-shared:** Use shared type from separate package ([1a1c859](https://github.com/klerick/nestjs-json-api/commit/1a1c859))
26
+ - **json-api-nestjs:** Microro orm ([4696f51](https://github.com/klerick/nestjs-json-api/commit/4696f51))
27
+
28
+ ### 🩹 Fixes
29
+
30
+ - **json-api-nestjs-microorm,json-api-nestjs-shared,json-api-nestjs-sdk,nestjs-json-rpc,nestjs-json-rpc-sdk:** correct published manifests ([4078057](https://github.com/klerick/nestjs-json-api/commit/4078057))
31
+ - **json-api-nestjs-shared,json-api-nestjs-sdk,nestjs-json-rpc-sdk:** emit spec-compliant ESM ([a962eeb](https://github.com/klerick/nestjs-json-api/commit/a962eeb))
32
+ - **json-api-nestjs-shared:** refine `RelationCheck` type logic to handle nested promises and exclude undefined types ([d5c1ea7](https://github.com/klerick/nestjs-json-api/commit/d5c1ea7))
33
+
34
+ ### ❤️ Thank You
35
+
36
+ - Alex H
37
+ - Claude Opus 5 (1M context)
38
+
1
39
  ## 1.0.0-beta.8 (2026-08-13)
2
40
 
3
41
  ### 🩹 Fixes
@@ -48,6 +48,14 @@ export type Include<Entity, IdKey extends string = 'id'> = ValueOf<{
48
48
  export type BaseIncluded<Entity extends object, IdKey extends string = 'id'> = {
49
49
  included?: Include<Entity, IdKey>[];
50
50
  };
51
- export type ResourceData<Entity extends object, IdKey extends string = 'id'> = MainData & BaseAttribute<Entity, IdKey> & BaseRelationships<Entity, IdKey> & BaseLinks;
51
+ /**
52
+ * A resource object MAY carry its own `meta` (JSON:API 1.1 section 7.2),
53
+ * describing that one resource rather than the response. Optional, so a
54
+ * document without it is unchanged.
55
+ */
56
+ export type BaseResourceMeta<ResourceMetaType = Record<string, unknown>> = {
57
+ meta?: ResourceMetaType;
58
+ };
59
+ export type ResourceData<Entity extends object, IdKey extends string = 'id', ResourceMetaType = Record<string, unknown>> = MainData & BaseAttribute<Entity, IdKey> & BaseRelationships<Entity, IdKey> & BaseResourceMeta<ResourceMetaType> & BaseLinks;
52
60
  export type ResourceObject<Entity extends object, Type extends 'object' | 'array' = 'object', ExtendBase = null, IdKey extends string = 'id'> = BaseMeta<Type, ExtendBase> & BaseResourceData<Entity, Type, IdKey> & BaseIncluded<Entity, IdKey>;
53
61
  export type ResourceObjectRelationships<Entity extends object, IdKey extends string, Rel extends RelationKeys<Entity, IdKey>> = BaseMeta & BaseMainData<Entity, IdKey, Rel>;
@@ -48,6 +48,14 @@ export type Include<Entity, IdKey extends string = 'id'> = ValueOf<{
48
48
  export type BaseIncluded<Entity extends object, IdKey extends string = 'id'> = {
49
49
  included?: Include<Entity, IdKey>[];
50
50
  };
51
- export type ResourceData<Entity extends object, IdKey extends string = 'id'> = MainData & BaseAttribute<Entity, IdKey> & BaseRelationships<Entity, IdKey> & BaseLinks;
51
+ /**
52
+ * A resource object MAY carry its own `meta` (JSON:API 1.1 section 7.2),
53
+ * describing that one resource rather than the response. Optional, so a
54
+ * document without it is unchanged.
55
+ */
56
+ export type BaseResourceMeta<ResourceMetaType = Record<string, unknown>> = {
57
+ meta?: ResourceMetaType;
58
+ };
59
+ export type ResourceData<Entity extends object, IdKey extends string = 'id', ResourceMetaType = Record<string, unknown>> = MainData & BaseAttribute<Entity, IdKey> & BaseRelationships<Entity, IdKey> & BaseResourceMeta<ResourceMetaType> & BaseLinks;
52
60
  export type ResourceObject<Entity extends object, Type extends 'object' | 'array' = 'object', ExtendBase = null, IdKey extends string = 'id'> = BaseMeta<Type, ExtendBase> & BaseResourceData<Entity, Type, IdKey> & BaseIncluded<Entity, IdKey>;
53
61
  export type ResourceObjectRelationships<Entity extends object, IdKey extends string, Rel extends RelationKeys<Entity, IdKey>> = BaseMeta & BaseMainData<Entity, IdKey, Rel>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klerick/json-api-nestjs-shared",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.1.0",
4
4
  "description": "Shared Helper for JsonApi Plugin for NestJs",
5
5
  "keywords": [
6
6
  "nestjs",