@versionone/agility-sdk 1.0.0-alpha.5 → 1.0.0-alpha.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 +32 -12
- package/README.md +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.0.0-alpha.
|
|
3
|
+
## 1.0.0-alpha.6
|
|
4
|
+
|
|
5
|
+
- The generated model is refreshed from meta.v1 26.3.2.13 (was
|
|
6
|
+
26.3.1.13): no type, attribute, flag or operation changed between the
|
|
7
|
+
two; only the version stamp moved.
|
|
8
|
+
|
|
9
|
+
### Breaking
|
|
10
|
+
|
|
11
|
+
- **Node 22 or later** (`engines.node` is `>=22`, was `>=18`), and `dist`
|
|
12
|
+
is now built for Node 22+ (tsup's `target` was `node18`). Node 18
|
|
13
|
+
reached end of life in April 2025 and Node 20 in April 2026; neither
|
|
14
|
+
gets security fixes. CI tests the maintained LTS lines, 22, 24 and 26,
|
|
15
|
+
so a consumer on 18 or 20 was already untested. (The chat-bot consumer
|
|
16
|
+
runs 24 and the CLI consumer requires 22; the browser app consumer
|
|
17
|
+
does not run on Node.)
|
|
18
|
+
|
|
19
|
+
## 1.0.0-alpha.5
|
|
4
20
|
|
|
5
21
|
### Added
|
|
6
22
|
|
|
7
|
-
- **Conditional schema reads** (
|
|
23
|
+
- **Conditional schema reads** (for a browser app consumer). meta.v1 sends one
|
|
8
24
|
strong ETag for the whole schema (`"26.3.1.13.<stamp>"`, the same on
|
|
9
25
|
the document, a type and an attribute) and honours `If-None-Match` with
|
|
10
26
|
a 304. `client.meta.read({ ifNoneMatch })` and `readType(token, {
|
|
@@ -13,7 +29,7 @@
|
|
|
13
29
|
the smallest resource. `TypeCache.etag` remembers the tag the loaded
|
|
14
30
|
types came with, and `client.schema.revalidate()` asks the server in
|
|
15
31
|
one small read and drops the loaded types only when the tag moved —
|
|
16
|
-
what
|
|
32
|
+
what a browser app's metamodel store does by hand. Transport: a request with
|
|
17
33
|
`acceptNotModified` resolves to undefined on a 304 after `onResponse`
|
|
18
34
|
sees it.
|
|
19
35
|
|
|
@@ -23,24 +39,28 @@
|
|
|
23
39
|
defaults to 1, was 0): a GET, a query.v1 read or a guarded batch that
|
|
24
40
|
says so, after a network failure or a 5xx, 150 ms later. A plain write
|
|
25
41
|
is never resent, as before. Pass `retries: 0` for the old behaviour.
|
|
26
|
-
(
|
|
42
|
+
(a CLI consumer: the doc promised a retry the default never made.) A 429 counts
|
|
27
43
|
as transient like a 5xx — the instance throttles per token — and a
|
|
28
44
|
Retry-After is honoured when sent, up to 30 s.
|
|
29
45
|
- **A rejected query's `details` are the exceptions alone**
|
|
30
46
|
(`{ type, message }[]`, exported as `QueryRejection`), not query.v1's
|
|
31
|
-
whole error document; `message` is unchanged. (
|
|
47
|
+
whole error document; `message` is unchanged. (a CLI consumer: a formatter that
|
|
32
48
|
printed details printed a JSON document.)
|
|
33
49
|
- **`CommandFailureDetail.echoed` is not enumerable**: still readable on
|
|
34
50
|
every failure for a corrected resend, but a serialised failure (a
|
|
35
51
|
receipt, a log line, a bot's result) carries index, message and
|
|
36
|
-
violation only. (
|
|
52
|
+
violation only. (chat-bot and CLI consumers: re-mapping failures to keep results
|
|
37
53
|
small.)
|
|
54
|
+
- **The committed `metamodel.json` names no instance**: every `href` is
|
|
55
|
+
spelled from `/meta.v1/` (`scripts/download-metamodel.mjs` rewrites
|
|
56
|
+
them on a pull). The generated types are unchanged; nothing in the SDK
|
|
57
|
+
reads an href.
|
|
38
58
|
|
|
39
59
|
## 1.0.0-alpha.4 — what the three adoptions asked for
|
|
40
60
|
|
|
41
61
|
### Added
|
|
42
62
|
|
|
43
|
-
- **Two narrow rest-1 paths** (
|
|
63
|
+
- **Two narrow rest-1 paths** (for a browser app consumer): `client.data.operate(oid,
|
|
44
64
|
op)` runs an operation for its result — api/asset performs a Copy but
|
|
45
65
|
reports only the source; rest-1 answers the copy's OID — and
|
|
46
66
|
`client.copy(oid)` is that for Copy. `client.data.template(type, {
|
|
@@ -58,9 +78,9 @@
|
|
|
58
78
|
module `fields`.
|
|
59
79
|
- **`client.urls.asset` takes an asset Number** as well as an OID
|
|
60
80
|
(`assetdetail.v1?Number=S-01001`): the readable form a CLI prints and a
|
|
61
|
-
chat message shows (
|
|
81
|
+
chat message shows (a CLI consumer, a chat-bot consumer).
|
|
62
82
|
- **`Outcome.requestId`**: the server's id for a batch, worth logging
|
|
63
|
-
(
|
|
83
|
+
(a chat-bot consumer). Null for an outcome merged from several sends.
|
|
64
84
|
- `outcomeOf` tolerating a partial envelope is now a stated contract
|
|
65
85
|
with a test: consumers' fakes may send only the fields they need.
|
|
66
86
|
|
|
@@ -68,7 +88,7 @@
|
|
|
68
88
|
|
|
69
89
|
- `parseViolation`: `tag` is null for the token spelling
|
|
70
90
|
(`Violation'Invalid'Epic.Scope`); it was the token, which is not a loc-2
|
|
71
|
-
tag (
|
|
91
|
+
tag (a CLI consumer).
|
|
72
92
|
- `CHANGELOG.md` ships in the npm package.
|
|
73
93
|
- Doc notes: `kind: "usage"` means nothing was sent (status 0), so an
|
|
74
94
|
error formatter should not blame the server; `client.query`'s resend
|
|
@@ -86,9 +106,9 @@
|
|
|
86
106
|
Alpha releases may break between versions. Every breaking change is listed
|
|
87
107
|
here with the one-line migration a consumer applies. A renamed export keeps
|
|
88
108
|
its old name as a `@deprecated` alias for one alpha and is removed in the
|
|
89
|
-
next; `1.0.0` follows
|
|
109
|
+
next; `1.0.0` follows the browser app consumer's adoption, and semver after that.
|
|
90
110
|
|
|
91
|
-
## 1.0.0-alpha.3 — the breaking batch
|
|
111
|
+
## 1.0.0-alpha.3 — the breaking batch
|
|
92
112
|
|
|
93
113
|
### Breaking
|
|
94
114
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @versionone/agility-sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the Digital.ai Agility (formerly VersionOne) API. It works in Node (ESM or CommonJS) and the browser, ships its own types, and has no runtime dependencies.
|
|
3
|
+
TypeScript SDK for the Digital.ai Agility (formerly VersionOne) API. It works in Node 22 or later (ESM or CommonJS) and the browser, ships its own types, and has no runtime dependencies.
|
|
4
4
|
|
|
5
5
|
Not to be confused with `v1sdk`, the 2.x JavaScript SDK: this is a new API, not a compatible successor.
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ npm install @versionone/agility-sdk@alpha
|
|
|
15
15
|
```ts
|
|
16
16
|
import { AgilityApiClient } from "@versionone/agility-sdk";
|
|
17
17
|
|
|
18
|
-
const client = new AgilityApiClient({ baseUrl: "https://
|
|
18
|
+
const client = new AgilityApiClient({ baseUrl: "https://agility.example.com/MyInstance", accessToken: process.env.V1_ACCESS_TOKEN });
|
|
19
19
|
const stories = await client.query({ from: "Story", select: ["Name", "Estimate"], page: { size: 10, start: 0 } });
|
|
20
20
|
// stories[0].Estimate is a number | null; stories[0].Nmae does not compile
|
|
21
21
|
```
|
|
@@ -35,7 +35,7 @@ npm test
|
|
|
35
35
|
- `npm run typecheck` - run TypeScript type checks
|
|
36
36
|
- `npm run verify` - run typecheck + build + tests
|
|
37
37
|
- `npm run test` - run unit tests
|
|
38
|
-
- `npm run download:metamodel -- <baseAgilityUrl>` - refresh `metamodel.json` from an instance on the current release (instance-specific definitions stripped; `--raw` keeps them), then `npm run generate:types`. The cleanest source is a dev instance on a blank database (
|
|
38
|
+
- `npm run download:metamodel -- <baseAgilityUrl>` - refresh `metamodel.json` from an instance on the current release (instance-specific definitions stripped; `--raw` keeps them), then `npm run generate:types`. The cleanest source is a dev instance on a blank database (the product's dev tooling has a task for that); a hosted instance on the release gives the same file. The generated model is from meta.v1 **26.3.2.13** (hosted, 2026-11-14)
|
|
39
39
|
|
|
40
40
|
## Public API
|
|
41
41
|
|
|
@@ -112,6 +112,8 @@ an approval, so a pushed tag waits for a maintainer before it stages. A
|
|
|
112
112
|
package must exist before it can be linked, so the very first version was
|
|
113
113
|
published once by hand by an `@versionone` org member.
|
|
114
114
|
|
|
115
|
-
##
|
|
115
|
+
## Contributing
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
Run `npm run verify` (typecheck, build, tests) before opening a pull request.
|
|
118
|
+
This repository is public: `CONTRIBUTING.md` says what may be committed
|
|
119
|
+
here and where working plans and consumer hand-offs live instead.
|