@_linked/core 1.2.1 → 2.0.0-next.20260310082533

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.
Files changed (169) hide show
  1. package/CHANGELOG.md +117 -6
  2. package/README.md +209 -14
  3. package/lib/cjs/index.d.ts +10 -2
  4. package/lib/cjs/index.js +33 -8
  5. package/lib/cjs/index.js.map +1 -1
  6. package/lib/cjs/interfaces/IQuadStore.d.ts +1 -1
  7. package/lib/cjs/package.d.ts +1 -1
  8. package/lib/cjs/queries/CreateBuilder.d.ts +38 -0
  9. package/lib/cjs/queries/CreateBuilder.js +100 -0
  10. package/lib/cjs/queries/CreateBuilder.js.map +1 -0
  11. package/lib/cjs/queries/CreateQuery.d.ts +3 -3
  12. package/lib/cjs/queries/CreateQuery.js.map +1 -1
  13. package/lib/cjs/queries/DeleteBuilder.d.ts +39 -0
  14. package/lib/cjs/queries/DeleteBuilder.js +85 -0
  15. package/lib/cjs/queries/DeleteBuilder.js.map +1 -0
  16. package/lib/cjs/queries/DeleteQuery.d.ts +3 -3
  17. package/lib/cjs/queries/DeleteQuery.js.map +1 -1
  18. package/lib/cjs/queries/FieldSet.d.ts +203 -0
  19. package/lib/cjs/queries/FieldSet.js +533 -0
  20. package/lib/cjs/queries/FieldSet.js.map +1 -0
  21. package/lib/cjs/queries/IRDesugar.d.ts +13 -8
  22. package/lib/cjs/queries/IRDesugar.js +143 -132
  23. package/lib/cjs/queries/IRDesugar.js.map +1 -1
  24. package/lib/cjs/queries/IRLower.js +1 -0
  25. package/lib/cjs/queries/IRLower.js.map +1 -1
  26. package/lib/cjs/queries/IntermediateRepresentation.d.ts +1 -0
  27. package/lib/cjs/queries/MutationQuery.d.ts +1 -1
  28. package/lib/cjs/queries/MutationQuery.js +1 -6
  29. package/lib/cjs/queries/MutationQuery.js.map +1 -1
  30. package/lib/cjs/queries/PropertyPath.d.ts +38 -0
  31. package/lib/cjs/queries/PropertyPath.js +82 -0
  32. package/lib/cjs/queries/PropertyPath.js.map +1 -0
  33. package/lib/cjs/queries/ProxiedPathBuilder.d.ts +14 -0
  34. package/lib/cjs/queries/ProxiedPathBuilder.js +29 -0
  35. package/lib/cjs/queries/ProxiedPathBuilder.js.map +1 -0
  36. package/lib/cjs/queries/QueryBuilder.d.ts +141 -0
  37. package/lib/cjs/queries/QueryBuilder.js +334 -0
  38. package/lib/cjs/queries/QueryBuilder.js.map +1 -0
  39. package/lib/cjs/queries/SelectQuery.d.ts +60 -134
  40. package/lib/cjs/queries/SelectQuery.js +67 -526
  41. package/lib/cjs/queries/SelectQuery.js.map +1 -1
  42. package/lib/cjs/queries/UpdateBuilder.d.ts +37 -0
  43. package/lib/cjs/queries/UpdateBuilder.js +84 -0
  44. package/lib/cjs/queries/UpdateBuilder.js.map +1 -0
  45. package/lib/cjs/queries/UpdateQuery.d.ts +3 -3
  46. package/lib/cjs/queries/UpdateQuery.js.map +1 -1
  47. package/lib/cjs/queries/WhereCondition.d.ts +18 -0
  48. package/lib/cjs/queries/WhereCondition.js +3 -0
  49. package/lib/cjs/queries/WhereCondition.js.map +1 -0
  50. package/lib/cjs/queries/queryDispatch.d.ts +20 -0
  51. package/lib/cjs/queries/queryDispatch.js +15 -0
  52. package/lib/cjs/queries/queryDispatch.js.map +1 -0
  53. package/lib/cjs/queries/resolveShape.d.ts +10 -0
  54. package/lib/cjs/queries/resolveShape.js +23 -0
  55. package/lib/cjs/queries/resolveShape.js.map +1 -0
  56. package/lib/cjs/shapes/SHACL.js +7 -5
  57. package/lib/cjs/shapes/SHACL.js.map +1 -1
  58. package/lib/cjs/shapes/Shape.d.ts +33 -52
  59. package/lib/cjs/shapes/Shape.js +36 -50
  60. package/lib/cjs/shapes/Shape.js.map +1 -1
  61. package/lib/cjs/sparql/SparqlAlgebra.d.ts +6 -1
  62. package/lib/cjs/sparql/algebraToString.js +10 -0
  63. package/lib/cjs/sparql/algebraToString.js.map +1 -1
  64. package/lib/cjs/sparql/irToAlgebra.js +6 -2
  65. package/lib/cjs/sparql/irToAlgebra.js.map +1 -1
  66. package/lib/cjs/test-helpers/query-capture-store.d.ts +8 -2
  67. package/lib/cjs/test-helpers/query-capture-store.js +80 -34
  68. package/lib/cjs/test-helpers/query-capture-store.js.map +1 -1
  69. package/lib/cjs/test-helpers/query-fixtures.d.ts +564 -3045
  70. package/lib/cjs/test-helpers/query-fixtures.js +59 -18
  71. package/lib/cjs/test-helpers/query-fixtures.js.map +1 -1
  72. package/lib/cjs/test-helpers/test-utils.d.ts +18 -0
  73. package/lib/cjs/test-helpers/test-utils.js +47 -0
  74. package/lib/cjs/test-helpers/test-utils.js.map +1 -0
  75. package/lib/cjs/utils/LinkedStorage.d.ts +3 -4
  76. package/lib/cjs/utils/LinkedStorage.js +12 -6
  77. package/lib/cjs/utils/LinkedStorage.js.map +1 -1
  78. package/lib/cjs/utils/Package.d.ts +8 -8
  79. package/lib/cjs/utils/Package.js.map +1 -1
  80. package/lib/cjs/utils/ShapeClass.d.ts +2 -2
  81. package/lib/cjs/utils/ShapeClass.js +4 -22
  82. package/lib/cjs/utils/ShapeClass.js.map +1 -1
  83. package/lib/esm/index.d.ts +10 -2
  84. package/lib/esm/index.js +25 -4
  85. package/lib/esm/index.js.map +1 -1
  86. package/lib/esm/interfaces/IQuadStore.d.ts +1 -1
  87. package/lib/esm/package.d.ts +1 -1
  88. package/lib/esm/queries/CreateBuilder.d.ts +38 -0
  89. package/lib/esm/queries/CreateBuilder.js +96 -0
  90. package/lib/esm/queries/CreateBuilder.js.map +1 -0
  91. package/lib/esm/queries/CreateQuery.d.ts +3 -3
  92. package/lib/esm/queries/CreateQuery.js.map +1 -1
  93. package/lib/esm/queries/DeleteBuilder.d.ts +39 -0
  94. package/lib/esm/queries/DeleteBuilder.js +81 -0
  95. package/lib/esm/queries/DeleteBuilder.js.map +1 -0
  96. package/lib/esm/queries/DeleteQuery.d.ts +3 -3
  97. package/lib/esm/queries/DeleteQuery.js.map +1 -1
  98. package/lib/esm/queries/FieldSet.d.ts +203 -0
  99. package/lib/esm/queries/FieldSet.js +529 -0
  100. package/lib/esm/queries/FieldSet.js.map +1 -0
  101. package/lib/esm/queries/IRDesugar.d.ts +13 -8
  102. package/lib/esm/queries/IRDesugar.js +143 -132
  103. package/lib/esm/queries/IRDesugar.js.map +1 -1
  104. package/lib/esm/queries/IRLower.js +1 -0
  105. package/lib/esm/queries/IRLower.js.map +1 -1
  106. package/lib/esm/queries/IntermediateRepresentation.d.ts +1 -0
  107. package/lib/esm/queries/MutationQuery.d.ts +1 -1
  108. package/lib/esm/queries/MutationQuery.js +1 -6
  109. package/lib/esm/queries/MutationQuery.js.map +1 -1
  110. package/lib/esm/queries/PropertyPath.d.ts +38 -0
  111. package/lib/esm/queries/PropertyPath.js +77 -0
  112. package/lib/esm/queries/PropertyPath.js.map +1 -0
  113. package/lib/esm/queries/ProxiedPathBuilder.d.ts +14 -0
  114. package/lib/esm/queries/ProxiedPathBuilder.js +26 -0
  115. package/lib/esm/queries/ProxiedPathBuilder.js.map +1 -0
  116. package/lib/esm/queries/QueryBuilder.d.ts +141 -0
  117. package/lib/esm/queries/QueryBuilder.js +330 -0
  118. package/lib/esm/queries/QueryBuilder.js.map +1 -0
  119. package/lib/esm/queries/SelectQuery.d.ts +60 -134
  120. package/lib/esm/queries/SelectQuery.js +61 -515
  121. package/lib/esm/queries/SelectQuery.js.map +1 -1
  122. package/lib/esm/queries/UpdateBuilder.d.ts +37 -0
  123. package/lib/esm/queries/UpdateBuilder.js +80 -0
  124. package/lib/esm/queries/UpdateBuilder.js.map +1 -0
  125. package/lib/esm/queries/UpdateQuery.d.ts +3 -3
  126. package/lib/esm/queries/UpdateQuery.js.map +1 -1
  127. package/lib/esm/queries/WhereCondition.d.ts +18 -0
  128. package/lib/esm/queries/WhereCondition.js +2 -0
  129. package/lib/esm/queries/WhereCondition.js.map +1 -0
  130. package/lib/esm/queries/queryDispatch.d.ts +20 -0
  131. package/lib/esm/queries/queryDispatch.js +11 -0
  132. package/lib/esm/queries/queryDispatch.js.map +1 -0
  133. package/lib/esm/queries/resolveShape.d.ts +10 -0
  134. package/lib/esm/queries/resolveShape.js +20 -0
  135. package/lib/esm/queries/resolveShape.js.map +1 -0
  136. package/lib/esm/shapes/SHACL.js +7 -5
  137. package/lib/esm/shapes/SHACL.js.map +1 -1
  138. package/lib/esm/shapes/Shape.d.ts +33 -52
  139. package/lib/esm/shapes/Shape.js +36 -47
  140. package/lib/esm/shapes/Shape.js.map +1 -1
  141. package/lib/esm/sparql/SparqlAlgebra.d.ts +6 -1
  142. package/lib/esm/sparql/algebraToString.js +10 -0
  143. package/lib/esm/sparql/algebraToString.js.map +1 -1
  144. package/lib/esm/sparql/irToAlgebra.js +6 -2
  145. package/lib/esm/sparql/irToAlgebra.js.map +1 -1
  146. package/lib/esm/test-helpers/query-capture-store.d.ts +8 -2
  147. package/lib/esm/test-helpers/query-capture-store.js +45 -33
  148. package/lib/esm/test-helpers/query-capture-store.js.map +1 -1
  149. package/lib/esm/test-helpers/query-fixtures.d.ts +564 -3045
  150. package/lib/esm/test-helpers/query-fixtures.js +59 -18
  151. package/lib/esm/test-helpers/query-fixtures.js.map +1 -1
  152. package/lib/esm/test-helpers/test-utils.d.ts +18 -0
  153. package/lib/esm/test-helpers/test-utils.js +41 -0
  154. package/lib/esm/test-helpers/test-utils.js.map +1 -0
  155. package/lib/esm/utils/LinkedStorage.d.ts +3 -4
  156. package/lib/esm/utils/LinkedStorage.js +12 -6
  157. package/lib/esm/utils/LinkedStorage.js.map +1 -1
  158. package/lib/esm/utils/Package.d.ts +8 -8
  159. package/lib/esm/utils/Package.js.map +1 -1
  160. package/lib/esm/utils/ShapeClass.d.ts +2 -2
  161. package/lib/esm/utils/ShapeClass.js +4 -22
  162. package/lib/esm/utils/ShapeClass.js.map +1 -1
  163. package/package.json +1 -1
  164. package/lib/cjs/queries/QueryParser.d.ts +0 -17
  165. package/lib/cjs/queries/QueryParser.js +0 -55
  166. package/lib/cjs/queries/QueryParser.js.map +0 -1
  167. package/lib/esm/queries/QueryParser.d.ts +0 -17
  168. package/lib/esm/queries/QueryParser.js +0 -51
  169. package/lib/esm/queries/QueryParser.js.map +0 -1
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateBuilder = void 0;
4
+ const resolveShape_js_1 = require("./resolveShape.js");
5
+ const CreateQuery_js_1 = require("./CreateQuery.js");
6
+ const queryDispatch_js_1 = require("./queryDispatch.js");
7
+ /**
8
+ * An immutable, fluent builder for create mutations.
9
+ *
10
+ * Every mutation method returns a new CreateBuilder — the original is never modified.
11
+ *
12
+ * Implements PromiseLike so mutations execute on `await`:
13
+ * ```ts
14
+ * const result = await CreateBuilder.from(Person).set({name: 'Alice'});
15
+ * ```
16
+ *
17
+ * Internally delegates to CreateQueryFactory for IR generation.
18
+ */
19
+ class CreateBuilder {
20
+ constructor(init) {
21
+ this._shape = init.shape;
22
+ this._data = init.data;
23
+ this._fixedId = init.fixedId;
24
+ }
25
+ clone(overrides = {}) {
26
+ return new CreateBuilder(Object.assign({ shape: this._shape, data: this._data, fixedId: this._fixedId }, overrides));
27
+ }
28
+ // ---------------------------------------------------------------------------
29
+ // Static constructors
30
+ // ---------------------------------------------------------------------------
31
+ /**
32
+ * Create a CreateBuilder for the given shape.
33
+ */
34
+ static from(shape) {
35
+ const resolved = (0, resolveShape_js_1.resolveShape)(shape);
36
+ return new CreateBuilder({ shape: resolved });
37
+ }
38
+ // ---------------------------------------------------------------------------
39
+ // Fluent API
40
+ // ---------------------------------------------------------------------------
41
+ /** Set the data for the entity to create. */
42
+ set(data) {
43
+ return this.clone({ data });
44
+ }
45
+ /** Pre-assign a node ID for the created entity. */
46
+ withId(id) {
47
+ return this.clone({ fixedId: id });
48
+ }
49
+ // ---------------------------------------------------------------------------
50
+ // Build & execute
51
+ // ---------------------------------------------------------------------------
52
+ /** Build the IR mutation. Throws if no data was set via .set(). */
53
+ build() {
54
+ if (!this._data) {
55
+ throw new Error('CreateBuilder requires .set(data) before .build(). Specify what to create.');
56
+ }
57
+ const data = this._data;
58
+ // Validate that required properties (minCount >= 1) are present in data
59
+ const shapeObj = this._shape.shape;
60
+ if (shapeObj) {
61
+ const requiredProps = shapeObj
62
+ .getUniquePropertyShapes()
63
+ .filter((ps) => ps.minCount && ps.minCount >= 1);
64
+ const dataKeys = new Set(Object.keys(data));
65
+ const missing = requiredProps
66
+ .filter((ps) => !dataKeys.has(ps.label))
67
+ .map((ps) => ps.label);
68
+ if (missing.length > 0) {
69
+ throw new Error(`Missing required fields for '${shapeObj.label || shapeObj.id}': ${missing.join(', ')}`);
70
+ }
71
+ }
72
+ // TODO: Full data validation against the shape (type checking, maxCount, nested shapes, etc.)
73
+ // Inject __id if fixedId is set
74
+ const dataWithId = this._fixedId
75
+ ? Object.assign(Object.assign({}, data), { __id: this._fixedId }) : data;
76
+ const factory = new CreateQuery_js_1.CreateQueryFactory(this._shape, dataWithId);
77
+ return factory.build();
78
+ }
79
+ /** Execute the mutation. */
80
+ exec() {
81
+ return (0, queryDispatch_js_1.getQueryDispatch)().createQuery(this.build());
82
+ }
83
+ // ---------------------------------------------------------------------------
84
+ // Promise interface
85
+ // ---------------------------------------------------------------------------
86
+ then(onfulfilled, onrejected) {
87
+ return this.exec().then(onfulfilled, onrejected);
88
+ }
89
+ catch(onrejected) {
90
+ return this.then().catch(onrejected);
91
+ }
92
+ finally(onfinally) {
93
+ return this.then().finally(onfinally);
94
+ }
95
+ get [Symbol.toStringTag]() {
96
+ return 'CreateBuilder';
97
+ }
98
+ }
99
+ exports.CreateBuilder = CreateBuilder;
100
+ //# sourceMappingURL=CreateBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateBuilder.js","sourceRoot":"","sources":["../../../src/queries/CreateBuilder.ts"],"names":[],"mappings":";;;AACA,uDAA+C;AAE/C,qDAAiF;AACjF,yDAAoD;AAWpD;;;;;;;;;;;GAWG;AACH,MAAa,aAAa;IAOxB,YAAoB,IAA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AuE;QAEvE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CACH,UAAqE;QAErE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,CAAC,SAA+B;QACrC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AAvHD,sCAuHC"}
@@ -1,4 +1,4 @@
1
- import { Shape } from '../shapes/Shape.js';
1
+ import { Shape, ShapeConstructor } from '../shapes/Shape.js';
2
2
  import { AddId, NodeDescriptionValue, UpdatePartial } from './QueryFactory.js';
3
3
  import { MutationQueryFactory } from './MutationQuery.js';
4
4
  import { IRCreateMutation } from './IntermediateRepresentation.js';
@@ -9,9 +9,9 @@ import { IRCreateMutation } from './IntermediateRepresentation.js';
9
9
  export type CreateQuery = IRCreateMutation;
10
10
  export type CreateResponse<U> = AddId<U, true>;
11
11
  export declare class CreateQueryFactory<ShapeType extends Shape, U extends UpdatePartial<ShapeType>> extends MutationQueryFactory {
12
- shapeClass: typeof Shape;
12
+ shapeClass: ShapeConstructor<ShapeType>;
13
13
  readonly id: string;
14
14
  readonly description: NodeDescriptionValue;
15
- constructor(shapeClass: typeof Shape, updateObjectOrFn: U);
15
+ constructor(shapeClass: ShapeConstructor<ShapeType>, updateObjectOrFn: U);
16
16
  build(): CreateQuery;
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CreateQuery.js","sourceRoot":"","sources":["../../../src/queries/CreateQuery.ts"],"names":[],"mappings":";;;AAEA,yDAAwD;AAExD,mDAA+D;AAU/D,MAAa,kBAGX,SAAQ,uCAAoB;IAI5B,YACS,UAAwB,EAC/B,gBAAmB;QAEnB,KAAK,EAAE,CAAC;QAHD,eAAU,GAAV,UAAU,CAAc;QAI/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB,CACzC,gBAAgB,EAChB,IAAI,CAAC,UAAU,CAAC,KAAK,EACrB,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK;QACH,OAAO,IAAA,8CAA8B,EAAC;YACpC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK;YAC5B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,gDAyBC"}
1
+ {"version":3,"file":"CreateQuery.js","sourceRoot":"","sources":["../../../src/queries/CreateQuery.ts"],"names":[],"mappings":";;;AAEA,yDAAwD;AAExD,mDAA+D;AAU/D,MAAa,kBAGX,SAAQ,uCAAoB;IAI5B,YACS,UAAuC,EAC9C,gBAAmB;QAEnB,KAAK,EAAE,CAAC;QAHD,eAAU,GAAV,UAAU,CAA6B;QAI9C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB,CACzC,gBAAgB,EAChB,IAAI,CAAC,UAAU,CAAC,KAAK,EACrB,IAAI,CACL,CAAC;IACJ,CAAC;IAED,KAAK;QACH,OAAO,IAAA,8CAA8B,EAAC;YACpC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK;YAC5B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,gDAyBC"}
@@ -0,0 +1,39 @@
1
+ import { Shape, ShapeConstructor } from '../shapes/Shape.js';
2
+ import { DeleteQuery, DeleteResponse } from './DeleteQuery.js';
3
+ import { NodeId } from './MutationQuery.js';
4
+ /**
5
+ * An immutable, fluent builder for delete mutations.
6
+ *
7
+ * Implements PromiseLike so mutations execute on `await`:
8
+ * ```ts
9
+ * const result = await DeleteBuilder.from(Person).for({id: '...'});
10
+ * ```
11
+ *
12
+ * Internally delegates to DeleteQueryFactory for IR generation.
13
+ */
14
+ export declare class DeleteBuilder<S extends Shape = Shape> implements PromiseLike<DeleteResponse>, Promise<DeleteResponse> {
15
+ private readonly _shape;
16
+ private readonly _ids?;
17
+ private constructor();
18
+ private clone;
19
+ /**
20
+ * Create a DeleteBuilder for the given shape.
21
+ *
22
+ * Optionally accepts IDs inline for backwards compatibility:
23
+ * ```ts
24
+ * DeleteBuilder.from(Person).for({id: '...'}) // preferred
25
+ * DeleteBuilder.from(Person, {id: '...'}) // also supported
26
+ * ```
27
+ */
28
+ static from<S extends Shape>(shape: ShapeConstructor<S> | string, ids?: NodeId | NodeId[]): DeleteBuilder<S>;
29
+ /** Specify the target IDs to delete. */
30
+ for(ids: NodeId | NodeId[]): DeleteBuilder<S>;
31
+ /** Build the IR mutation. Throws if no IDs were specified via .for(). */
32
+ build(): DeleteQuery;
33
+ /** Execute the mutation. */
34
+ exec(): Promise<DeleteResponse>;
35
+ then<TResult1 = DeleteResponse, TResult2 = never>(onfulfilled?: ((value: DeleteResponse) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
36
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<DeleteResponse | TResult>;
37
+ finally(onfinally?: (() => void) | null): Promise<DeleteResponse>;
38
+ get [Symbol.toStringTag](): string;
39
+ }
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteBuilder = void 0;
4
+ const resolveShape_js_1 = require("./resolveShape.js");
5
+ const DeleteQuery_js_1 = require("./DeleteQuery.js");
6
+ const queryDispatch_js_1 = require("./queryDispatch.js");
7
+ /**
8
+ * An immutable, fluent builder for delete mutations.
9
+ *
10
+ * Implements PromiseLike so mutations execute on `await`:
11
+ * ```ts
12
+ * const result = await DeleteBuilder.from(Person).for({id: '...'});
13
+ * ```
14
+ *
15
+ * Internally delegates to DeleteQueryFactory for IR generation.
16
+ */
17
+ class DeleteBuilder {
18
+ constructor(init) {
19
+ this._shape = init.shape;
20
+ this._ids = init.ids;
21
+ }
22
+ clone(overrides = {}) {
23
+ return new DeleteBuilder(Object.assign({ shape: this._shape, ids: this._ids }, overrides));
24
+ }
25
+ // ---------------------------------------------------------------------------
26
+ // Static constructors
27
+ // ---------------------------------------------------------------------------
28
+ /**
29
+ * Create a DeleteBuilder for the given shape.
30
+ *
31
+ * Optionally accepts IDs inline for backwards compatibility:
32
+ * ```ts
33
+ * DeleteBuilder.from(Person).for({id: '...'}) // preferred
34
+ * DeleteBuilder.from(Person, {id: '...'}) // also supported
35
+ * ```
36
+ */
37
+ static from(shape, ids) {
38
+ const resolved = (0, resolveShape_js_1.resolveShape)(shape);
39
+ if (ids !== undefined) {
40
+ const idsArray = Array.isArray(ids) ? ids : [ids];
41
+ return new DeleteBuilder({ shape: resolved, ids: idsArray });
42
+ }
43
+ return new DeleteBuilder({ shape: resolved });
44
+ }
45
+ // ---------------------------------------------------------------------------
46
+ // Fluent API
47
+ // ---------------------------------------------------------------------------
48
+ /** Specify the target IDs to delete. */
49
+ for(ids) {
50
+ const idsArray = Array.isArray(ids) ? ids : [ids];
51
+ return this.clone({ ids: idsArray });
52
+ }
53
+ // ---------------------------------------------------------------------------
54
+ // Build & execute
55
+ // ---------------------------------------------------------------------------
56
+ /** Build the IR mutation. Throws if no IDs were specified via .for(). */
57
+ build() {
58
+ if (!this._ids || this._ids.length === 0) {
59
+ throw new Error('DeleteBuilder requires at least one ID to delete. Specify targets with .for(ids).');
60
+ }
61
+ const factory = new DeleteQuery_js_1.DeleteQueryFactory(this._shape, this._ids);
62
+ return factory.build();
63
+ }
64
+ /** Execute the mutation. */
65
+ exec() {
66
+ return (0, queryDispatch_js_1.getQueryDispatch)().deleteQuery(this.build());
67
+ }
68
+ // ---------------------------------------------------------------------------
69
+ // Promise interface
70
+ // ---------------------------------------------------------------------------
71
+ then(onfulfilled, onrejected) {
72
+ return this.exec().then(onfulfilled, onrejected);
73
+ }
74
+ catch(onrejected) {
75
+ return this.then().catch(onrejected);
76
+ }
77
+ finally(onfinally) {
78
+ return this.then().finally(onfinally);
79
+ }
80
+ get [Symbol.toStringTag]() {
81
+ return 'DeleteBuilder';
82
+ }
83
+ }
84
+ exports.DeleteBuilder = DeleteBuilder;
85
+ //# sourceMappingURL=DeleteBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeleteBuilder.js","sourceRoot":"","sources":["../../../src/queries/DeleteBuilder.ts"],"names":[],"mappings":";;;AACA,uDAA+C;AAC/C,qDAAiF;AAEjF,yDAAoD;AAUpD;;;;;;;;;GASG;AACH,MAAa,aAAa;IAMxB,YAAoB,IAA0B;QAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,YAA2C,EAAE;QACzD,OAAO,IAAI,aAAa,iBACtB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,GAAG,EAAE,IAAI,CAAC,IAAI,IACX,SAAS,EACZ,CAAC;IACL,CAAC;IAED,8EAA8E;IAC9E,sBAAsB;IACtB,8EAA8E;IAE9E;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,CACT,KAAmC,EACnC,GAAuB;QAEvB,MAAM,QAAQ,GAAG,IAAA,8BAAY,EAAI,KAAK,CAAC,CAAC;QACxC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAClD,OAAO,IAAI,aAAa,CAAI,EAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAC,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,IAAI,aAAa,CAAI,EAAC,KAAK,EAAE,QAA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IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QACtB,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AArGD,sCAqGC"}
@@ -1,4 +1,4 @@
1
- import { Shape } from '../shapes/Shape.js';
1
+ import { Shape, ShapeConstructor } from '../shapes/Shape.js';
2
2
  import { NodeReferenceValue, UpdatePartial } from './QueryFactory.js';
3
3
  import { MutationQueryFactory, NodeId } from './MutationQuery.js';
4
4
  import { IRDeleteMutation } from './IntermediateRepresentation.js';
@@ -26,9 +26,9 @@ export type DeleteResponse = {
26
26
  errors?: Record<string, string>;
27
27
  };
28
28
  export declare class DeleteQueryFactory<ShapeType extends Shape, U extends UpdatePartial<ShapeType>> extends MutationQueryFactory {
29
- shapeClass: typeof Shape;
29
+ shapeClass: ShapeConstructor<ShapeType>;
30
30
  readonly id: string;
31
31
  readonly ids: NodeReferenceValue[];
32
- constructor(shapeClass: typeof Shape, ids: NodeId[] | NodeId);
32
+ constructor(shapeClass: ShapeConstructor<ShapeType>, ids: NodeId[] | NodeId);
33
33
  build(): DeleteQuery;
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteQuery.js","sourceRoot":"","sources":["../../../src/queries/DeleteQuery.ts"],"names":[],"mappings":";;;AAEA,yDAAgE;AAEhE,mDAA+D;AA2B/D,MAAa,kBAGX,SAAQ,uCAAoB;IAI5B,YACS,UAAwB,EAC/B,GAAsB;QAEtB,KAAK,EAAE,CAAC;QAHD,eAAU,GAAV,UAAU,CAAc;QAI/B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK;QACH,OAAO,IAAA,8CAA8B,EAAC;YACpC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK;YAC5B,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;IACL,CAAC;CACF;AArBD,gDAqBC"}
1
+ {"version":3,"file":"DeleteQuery.js","sourceRoot":"","sources":["../../../src/queries/DeleteQuery.ts"],"names":[],"mappings":";;;AAEA,yDAAgE;AAEhE,mDAA+D;AA2B/D,MAAa,kBAGX,SAAQ,uCAAoB;IAI5B,YACS,UAAuC,EAC9C,GAAsB;QAEtB,KAAK,EAAE,CAAC;QAHD,eAAU,GAAV,UAAU,CAA6B;QAI9C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK;QACH,OAAO,IAAA,8CAA8B,EAAC;YACpC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK;YAC5B,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;IACL,CAAC;CACF;AArBD,gDAqBC"}
@@ -0,0 +1,203 @@
1
+ import type { NodeShape, PropertyShape } from '../shapes/SHACL.js';
2
+ import type { Shape, ShapeConstructor } from '../shapes/Shape.js';
3
+ import { PropertyPath } from './PropertyPath.js';
4
+ import type { WherePath } from './SelectQuery.js';
5
+ type QueryBuilderObjectLike = {
6
+ property?: PropertyShape;
7
+ subject?: QueryBuilderObjectLike;
8
+ wherePath?: unknown;
9
+ };
10
+ /**
11
+ * A single entry in a FieldSet: a property path with optional alias, scoped filter,
12
+ * sub-selection, aggregation, and custom key.
13
+ */
14
+ export type FieldSetEntry = {
15
+ path: PropertyPath;
16
+ alias?: string;
17
+ scopedFilter?: WherePath;
18
+ /** Nested object selection — the user explicitly selected sub-fields (e.g. `p.friends.select(...)`) */
19
+ subSelect?: FieldSet;
20
+ aggregation?: 'count';
21
+ customKey?: string;
22
+ evaluation?: {
23
+ method: string;
24
+ wherePath: any;
25
+ };
26
+ /** Component preload composition — the FieldSet comes from a linked component's own query,
27
+ * merged in via `preloadFor()`. Distinct from subSelect which is a user-authored nested query. */
28
+ preloadSubSelect?: FieldSet;
29
+ };
30
+ /**
31
+ * Input types accepted by FieldSet construction methods.
32
+ *
33
+ * - `string` — resolved via walkPropertyPath (dot-separated)
34
+ * - `PropertyPath` — used directly
35
+ * - `FieldSet` — merged in
36
+ * - `Record<string, string[] | FieldSet>` — nested fields
37
+ */
38
+ export type FieldSetInput = string | PropertyPath | FieldSet | Record<string, string[] | FieldSet>;
39
+ /** JSON representation of a FieldSet field entry. */
40
+ export type FieldSetFieldJSON = {
41
+ path: string;
42
+ as?: string;
43
+ subSelect?: FieldSetJSON;
44
+ aggregation?: string;
45
+ customKey?: string;
46
+ evaluation?: {
47
+ method: string;
48
+ wherePath: any;
49
+ };
50
+ };
51
+ /** JSON representation of a FieldSet. */
52
+ export type FieldSetJSON = {
53
+ shape: string;
54
+ fields: FieldSetFieldJSON[];
55
+ };
56
+ /**
57
+ * An immutable, composable collection of property paths for a shape.
58
+ *
59
+ * FieldSet describes which properties to select, independent of
60
+ * how the query is built. It integrates with QueryBuilder via
61
+ * `.select(fieldSet)`.
62
+ *
63
+ * Every mutation method returns a new FieldSet — the original is never modified.
64
+ */
65
+ export declare class FieldSet<R = any, Source = any> {
66
+ readonly shape: NodeShape;
67
+ readonly entries: readonly FieldSetEntry[];
68
+ /** Phantom field — carries the callback response type for conditional type inference. */
69
+ readonly __response: R;
70
+ /** Phantom field — carries the source context (QueryShapeSet/QueryShape) for conditional type inference. */
71
+ readonly __source: Source;
72
+ /**
73
+ * For sub-select FieldSets: the raw callback return value (proxy trace objects).
74
+ * Stored so conditional types can extract the response type.
75
+ */
76
+ readonly traceResponse?: R;
77
+ /**
78
+ * For sub-select FieldSets: the parent property segments leading to this sub-select.
79
+ */
80
+ readonly parentSegments?: PropertyShape[];
81
+ /**
82
+ * For sub-select FieldSets: the shape class (ShapeType) of the sub-select's target.
83
+ */
84
+ readonly shapeType?: any;
85
+ private constructor();
86
+ /**
87
+ * Create a FieldSet for the given shape with the specified fields.
88
+ *
89
+ * Accepts a ShapeClass (e.g. Person), NodeShape, or shape IRI string.
90
+ * Fields can be string paths, PropertyPath instances, nested objects,
91
+ * or a callback receiving a proxy for dot-access.
92
+ */
93
+ static for<S extends Shape>(shape: ShapeConstructor<S>, fields: FieldSetInput[]): FieldSet<any>;
94
+ static for<S extends Shape, R>(shape: ShapeConstructor<S>, fn: (p: any) => R): FieldSet<R>;
95
+ static for(shape: NodeShape | string, fields: FieldSetInput[]): FieldSet<any>;
96
+ static for(shape: NodeShape | string, fn: (p: any) => any): FieldSet<any>;
97
+ /**
98
+ * Create a typed FieldSet for a sub-select. Traces the callback through the proxy,
99
+ * stores parentSegments and traceResponse for runtime compatibility, and preserves
100
+ * R and Source generics for conditional type inference.
101
+ */
102
+ static forSubSelect<R, Source>(shapeClass: any, fn: (p: any) => R, parentSegments: PropertyShape[]): FieldSet<R, Source>;
103
+ /**
104
+ * Create a FieldSet containing all decorated properties of the shape.
105
+ *
106
+ * @param opts.depth Controls how deep to include nested shape properties:
107
+ * - `depth=1` (default): this level only — properties of the root shape.
108
+ * - `depth=0`: throws — use a node reference instead.
109
+ * - `depth>1`: recursively includes nested shape properties up to the given depth.
110
+ */
111
+ static all<S extends Shape>(shape: ShapeConstructor<S>, opts?: {
112
+ depth?: number;
113
+ }): FieldSet;
114
+ static all(shape: NodeShape | string, opts?: {
115
+ depth?: number;
116
+ }): FieldSet;
117
+ /**
118
+ * Recursive helper for all(). Tracks visited shape IDs to prevent infinite loops
119
+ * from circular shape references.
120
+ */
121
+ private static allForShape;
122
+ /**
123
+ * Merge multiple FieldSets into one, deduplicating by path equality.
124
+ * All FieldSets must share the same root shape.
125
+ */
126
+ static merge(sets: FieldSet[]): FieldSet;
127
+ /** Returns a new FieldSet with only the given fields. */
128
+ select(fields: FieldSetInput[]): FieldSet;
129
+ /** Returns a new FieldSet with additional entries. */
130
+ add(fields: FieldSetInput[]): FieldSet;
131
+ /** Returns a new FieldSet without entries matching the given labels. */
132
+ remove(labels: string[]): FieldSet;
133
+ /** Synonym for replacing all entries — returns a new FieldSet with only the given fields. */
134
+ set(fields: FieldSetInput[]): FieldSet;
135
+ /** Returns a new FieldSet keeping only entries matching the given labels. */
136
+ pick(labels: string[]): FieldSet;
137
+ /** Returns all PropertyPaths in this FieldSet. */
138
+ paths(): PropertyPath[];
139
+ /** Returns terminal property labels of all entries. */
140
+ labels(): string[];
141
+ /**
142
+ * Serialize this FieldSet to a plain JSON object.
143
+ * Shape is identified by its IRI, paths by dot-separated labels.
144
+ */
145
+ toJSON(): FieldSetJSON;
146
+ /**
147
+ * Reconstruct a FieldSet from a JSON object.
148
+ * Resolves shape IRI via getShapeClass() and paths via walkPropertyPath().
149
+ */
150
+ static fromJSON(json: FieldSetJSON): FieldSet;
151
+ /**
152
+ * Resolves any of the accepted shape input types to a NodeShape and optional ShapeClass.
153
+ * Accepts: ShapeConstructor (class with .shape), NodeShape, or IRI string.
154
+ */
155
+ private static resolveShapeInput;
156
+ /** @deprecated Use resolveShapeInput instead. Kept for fromJSON which only passes NodeShape|string. */
157
+ private static resolveShape;
158
+ private static resolveInputs;
159
+ /**
160
+ * Trace fields using the full ProxiedPathBuilder proxy (createProxiedPathBuilder).
161
+ * Handles nested paths, where conditions, aggregations, and sub-selects.
162
+ */
163
+ private static traceFieldsWithProxy;
164
+ /**
165
+ * Convert a single proxy trace result (QueryBuilderObject, SetSize, or FieldSet sub-select)
166
+ * into a FieldSetEntry.
167
+ */
168
+ private static convertTraceResult;
169
+ /**
170
+ * Walk a QueryBuilderObject-like chain (via .subject) collecting PropertyShape segments
171
+ * from leaf to root, then reverse to get root-to-leaf order.
172
+ */
173
+ static collectPropertySegments(obj: QueryBuilderObjectLike): PropertyShape[];
174
+ /**
175
+ * Extract a FieldSet from a component-like object for preload composition.
176
+ *
177
+ * Supports multiple component interfaces:
178
+ * - `.fields` as a FieldSet directly
179
+ * - `.query` as a FieldSet, QueryBuilder (duck-typed via .fields()), or
180
+ * Record<string, QueryBuilder> (e.g. `{person: PersonQuery}`)
181
+ */
182
+ static extractComponentFieldSet(component: any): FieldSet | undefined;
183
+ /**
184
+ * Internal factory that bypasses the private constructor for use by static methods.
185
+ */
186
+ private static createInternal;
187
+ /**
188
+ * Create a FieldSet from raw entries. Used by QueryBuilder to merge preload entries.
189
+ */
190
+ static createFromEntries(shape: NodeShape, entries: FieldSetEntry[]): FieldSet;
191
+ /**
192
+ * Extract FieldSetEntry[] from a sub-query's traceResponse.
193
+ * Public alias for use by lightweight sub-select wrappers.
194
+ */
195
+ static extractSubSelectEntriesPublic(rootShape: NodeShape, traceResponse: any): FieldSetEntry[];
196
+ /**
197
+ * Extract FieldSetEntry[] from a sub-select's traceResponse.
198
+ * The traceResponse is the result of calling the sub-query callback with a proxy,
199
+ * containing QueryBuilderObjects, arrays, custom objects, etc.
200
+ */
201
+ private static extractSubSelectEntries;
202
+ }
203
+ export {};