@simtlix/simfinity-js-client 1.1.0 → 3.19.1

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/README.md CHANGED
@@ -1,6 +1,21 @@
1
+ [![Simfinity.js — Define once. Build beyond. GraphQL, MongoDB, PostgreSQL, and optional MCP.](https://raw.githubusercontent.com/simtlix/simfinity.js/master/.github/assets/readme-cover.png)](https://simtlix.github.io/simfinity.js/)
2
+
1
3
  # @simtlix/simfinity-js-client
2
4
 
3
- Introspection-driven GraphQL client for [simfinity-js](https://github.com/simtlix/simfinity.js) APIs. It discovers your schema at runtime via introspection and exposes a chainable query builder, CRUD helpers, aggregate queries, state-machine transitions, schema metadata access, mutation input transformation, and more — no code generation required.
5
+ [![npm version](https://img.shields.io/npm/v/@simtlix/simfinity-js-client.svg)](https://www.npmjs.com/package/@simtlix/simfinity-js-client)
6
+ [![Node.js](https://img.shields.io/node/v/@simtlix/simfinity-js-client.svg)](https://nodejs.org/)
7
+ [![License](https://img.shields.io/npm/l/@simtlix/simfinity-js-client.svg)](https://github.com/simtlix/simfinity.js/blob/master/LICENSE)
8
+ [![Documentation](https://img.shields.io/badge/docs-simtlix.github.io-2563eb.svg)](https://simtlix.github.io/simfinity.js/)
9
+
10
+ Introspection-driven GraphQL client for [Simfinity.js](https://simtlix.github.io/simfinity.js/) APIs. It discovers your schema at runtime via introspection and exposes a chainable query builder, CRUD helpers, aggregate queries, state-machine transitions, schema metadata access, mutation input transformation, and more — no code generation required.
11
+
12
+ > Since 3.19.0, the client is maintained in the Simfinity monorepo and follows its aligned release version. Existing valid 1.1 JavaScript calls remain supported.
13
+
14
+ **[Documentation](https://simtlix.github.io/simfinity.js/)** ·
15
+ **[JavaScript client guide](https://simtlix.github.io/simfinity.js/guide/client.html)** ·
16
+ **[Client descriptor](https://simtlix.github.io/simfinity.js/reference/client-descriptor.html)** ·
17
+ **[Example app](https://simtlix.github.io/simfinity.js/resources/barber.html)** ·
18
+ **[Releases](https://github.com/simtlix/simfinity.js/releases)**
4
19
 
5
20
  ## Installation
6
21
 
@@ -41,7 +56,7 @@ Creates a new client instance pointing at the given GraphQL endpoint.
41
56
 
42
57
  ### `client.init()`
43
58
 
44
- Runs an introspection query against the endpoint and builds internal registries of types, queries, and mutations — including Simfinity-specific field extensions (relation metadata, state machine flags, read-only markers). **Must be called before any other method.**
59
+ By default, runs an extended introspection query against the endpoint and builds internal registries of types, queries, and mutations — including Simfinity-specific field extensions (relation metadata, state machine flags, read-only markers). **Must be called before any other method.**
45
60
 
46
61
  ### Schema Inspection
47
62
 
@@ -71,7 +86,7 @@ const results = await client.find('serie')
71
86
 
72
87
  #### `.where(field, operator, value [, value2])`
73
88
 
74
- Filter by a scalar field. Supported operators depend on the server schema (e.g. `EQ`, `NE`, `GT`, `LT`, `GTE`, `LTE`, `BETWEEN`, `LIKE`, `NIN`).
89
+ Filter by a scalar field. Supported operators depend on the server schema (e.g. `EQ`, `NE`, `GT`, `LT`, `GTE`, `LTE`, `BTW`, `LIKE`, `NIN`).
75
90
 
76
91
  #### `.where(field, terms)`
77
92
 
@@ -480,7 +495,7 @@ client.getAvailableTransitions('season');
480
495
 
481
496
  ## Examples
482
497
 
483
- See [`examples/demo.js`](examples/demo.js) for a comprehensive walkthrough covering all features: schema discovery, filtering, joins, pagination, sorting, CRUD, state machine transitions, aggregates, raw queries, schema metadata, selection set building, entity resolution, input transformation, collection deltas, parent queries, FK search, and response extensions.
498
+ See [`examples/demo.js`](https://github.com/simtlix/simfinity.js/blob/master/packages/client/examples/demo.js) for a comprehensive walkthrough covering all features: schema discovery, filtering, joins, pagination, sorting, CRUD, state machine transitions, aggregates, raw queries, schema metadata, selection set building, entity resolution, input transformation, collection deltas, parent queries, FK search, and response extensions.
484
499
 
485
500
  ```bash
486
501
  GRAPHQL_ENDPOINT=http://localhost:3000/graphql npm run demo
@@ -488,4 +503,20 @@ GRAPHQL_ENDPOINT=http://localhost:3000/graphql npm run demo
488
503
 
489
504
  ## License
490
505
 
491
- [Apache-2.0](LICENSE)
506
+ [Apache-2.0](https://github.com/simtlix/simfinity.js/blob/master/LICENSE)
507
+
508
+ ## Source provenance
509
+
510
+ Imported from simtlix/simfinity-js-client commit `32d9c5bf7264cd3ecddcd3441bffea3b21566cb0` (1.1.0), under its Apache-2.0 license.
511
+
512
+ ## Monorepo additions
513
+
514
+ See the [JavaScript client guide](https://simtlix.github.io/simfinity.js/guide/client.html) for the complete current API and both-engine setup. The client remains dependency-free and browser compatible.
515
+
516
+ - Constructor options add mutually exclusive `descriptor` and `descriptorEndpoint`, injected `fetch`, `introspection: 'extended' | 'standard'`, and asynchronous `prepareHeaders`. Descriptor mode never introspects; use it when the server disables introspection. `getDescriptor()` returns the loaded descriptor or null.
517
+ - `query(name, args?, fields?)` executes exact query roots, including scalar and abstract outputs. `findView(name, params?)` returns a normal list builder, while `getViews(typeName?)` lists descriptor-classified views. Canonical lists are not replaced by views.
518
+ - List and aggregate builders accept `.where(field, filterObject)` and `.filter(group)` for `valuePath`, `ANY`/`ALL`/`NONE` and `$parent`. Operators come from the schema, including text, emptiness, `CONTAINS_ALL` and `IIN`; the server still gates engine support. `collectionArgs(path, args)` applies variables to selected nested collections, separately from legacy parent filtering. Aliased paths use response names.
519
+ - Transformed updates/actions preserve required managed versions. `delete(type, id, fields?, { version })` supplies the protected delete precondition. `transformInput` adds `preserveEmpty`, `includeCollections` and concrete `inputType` opt-ins. Collection delta transformation keeps `{ id, version }` for protected deletions and IDs for unprotected deletions.
520
+ - `transaction(operations, fields?, { name }?)` sends one generated transaction mutation, preserving reference tokens and explicit versions. Descriptor mode discovers its root; introspection mode requires the exact configured name. Errors preserve all `graphQLErrors` extensions, including transaction positions. Writes are never retried by this client.
521
+
522
+ Version 3.19.0 starts the client's aligned monorepo release policy, preserving the package name and existing valid 1.1 JavaScript calls. Releases use this repository's Release Simfinity workflow with npm Trusted Publishing and verified archives in both registries.
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@simtlix/simfinity-js-client",
3
- "version": "1.1.0",
3
+ "version": "3.19.1",
4
4
  "description": "Introspection-driven GraphQL client for simfinity-js APIs",
5
5
  "type": "module",
6
- "main": "src/SimfinityClient.js",
6
+ "main": "./src/SimfinityClient.js",
7
7
  "exports": {
8
- ".": "./src/SimfinityClient.js"
8
+ ".": {
9
+ "types": "./types/index.d.ts",
10
+ "default": "./src/SimfinityClient.js"
11
+ }
9
12
  },
10
13
  "scripts": {
11
14
  "demo": "node examples/demo.js"
@@ -19,11 +22,20 @@
19
22
  ],
20
23
  "author": "Multiscreen Technology Group - SimTLiX SRL",
21
24
  "license": "Apache-2.0",
25
+ "homepage": "https://simtlix.github.io/simfinity.js/guide/client.html",
22
26
  "repository": {
23
27
  "type": "git",
24
- "url": "https://github.com/simtlix/simfinity-js-client"
28
+ "url": "https://github.com/simtlix/simfinity.js",
29
+ "directory": "packages/client"
25
30
  },
26
31
  "engines": {
27
- "node": ">=18.0.0"
28
- }
32
+ "node": ">=18.18.0"
33
+ },
34
+ "files": [
35
+ "src",
36
+ "types",
37
+ "README.md",
38
+ "LICENSE"
39
+ ],
40
+ "types": "./types/index.d.ts"
29
41
  }