@schorts/shared-kernel 2.3.3 → 2.3.4

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 CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.3.4] - 2025-10-11
9
+
10
+ ### Changed
11
+
12
+ - Allow partial attributes in the `create` and `update` methods of the `JSONAPIConnector`.
13
+
8
14
  ## [2.3.3] - 2025-10-11
9
15
 
10
16
  ### Added
@@ -9,12 +9,12 @@ export declare class JSONAPIConnector {
9
9
  findMany<EntityAttributes>(url: URL, criteria?: Criteria, include?: string[]): Promise<JSONAPIList<EntityAttributes>>;
10
10
  create<EntityAttributes>(url: URL, payload: {
11
11
  type: string;
12
- attributes: Omit<EntityAttributes, "id">;
12
+ attributes: Omit<Partial<EntityAttributes>, "id">;
13
13
  }): Promise<JSONAPISingle<EntityAttributes>>;
14
14
  update<EntityAttributes>(url: URL, payload: {
15
15
  id: string;
16
16
  type: string;
17
- attributes: Omit<EntityAttributes, "id">;
17
+ attributes: Omit<Partial<EntityAttributes>, "id">;
18
18
  }): Promise<JSONAPISingle<EntityAttributes>>;
19
19
  delete<EntityAttributes>(url: URL): Promise<JSONAPISingle<EntityAttributes>>;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"json-api-connector.d.ts","sourceRoot":"","sources":["../../../src/json-api/json-api-connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qB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AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,gBAAgB;IACf,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,YAAY;IAEhC,OAAO,CAAC,gBAAgB,EAC5B,GAAG,EAAE,GAAG,EACR,QAAQ,CAAC,EAAE,QAAQ,EACnB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAMrC,QAAQ,CAAC,gBAAgB,EAC7B,GAAG,EAAE,GAAG,EACR,QAAQ,CAAC,EAAE,QAAQ,EACnB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAMnC,MAAM,CAAC,gBAAgB,EAC3B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,CAAC;KACnD,GACA,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAIrC,MAAM,CAAC,gBAAgB,EAC3B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,CAAC;KACnD,GACA,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAIrC,MAAM,CAAC,gBAAgB,EAC3B,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAG5C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schorts/shared-kernel",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more — designed to be framework-agnostic and highly extensible.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -31,7 +31,7 @@ export class JSONAPIConnector {
31
31
  url: URL,
32
32
  payload: {
33
33
  type: string;
34
- attributes: Omit<EntityAttributes, "id">;
34
+ attributes: Omit<Partial<EntityAttributes>, "id">;
35
35
  }
36
36
  ): Promise<JSONAPISingle<EntityAttributes>> {
37
37
  return this.http.post(url, { data: payload });
@@ -42,7 +42,7 @@ export class JSONAPIConnector {
42
42
  payload: {
43
43
  id: string;
44
44
  type: string;
45
- attributes: Omit<EntityAttributes, "id">;
45
+ attributes: Omit<Partial<EntityAttributes>, "id">;
46
46
  }
47
47
  ): Promise<JSONAPISingle<EntityAttributes>> {
48
48
  return this.http.patch(url, { data: payload });