@fleetless/sdk 1.0.0 → 2.0.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 ADDED
@@ -0,0 +1,101 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@fleetless/sdk`. The format follows Keep a Changelog; the versions follow semver.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [2.0.0] — 2026-09-04
8
+
9
+ The first release since 1.0.0, and it is a breaking one. The entries below are
10
+ the **complete** difference in the published surface, established by unpacking
11
+ `@fleetless/sdk@1.0.0` from npm and diffing its bundled `dist/index.d.ts`
12
+ against this tree's, declaration by declaration — not read off the commit log.
13
+ Everything not named here is byte-identical between the two builds.
14
+
15
+ ### Removed
16
+
17
+ - **`client.auth.register(email, password)` and
18
+ `client.auth.confirmRegistration(token)`.** Self-registration through the SDK
19
+ is gone, with no successor. The org-central identity redesign removed per-app
20
+ user pools: users belong to one pool per organisation and a group grows by
21
+ invitation (or, once the federation work lands, by OIDC just-in-time
22
+ provisioning). There is no client-side sign-up call any more, and the routes
23
+ behind both methods no longer exist.
24
+ - **`client.auth.requestPasswordReset(email)` and
25
+ `client.auth.confirmPasswordReset(token, newPassword)`.** Same reason: the
26
+ routes are gone. Link the user to the platform's hosted reset page instead —
27
+ `client.auth.passwordResetUrl()` builds the URL, and nothing about it is a
28
+ network call.
29
+ - **The exported types `MailStatus` and `ClientRegisterResponse`**, which
30
+ described `register()`'s result and went with it.
31
+ - **The error code `not_a_member`**, from `FleetlessErrorCode` and from
32
+ `ERROR_CODES`. No route emits it any more. Removing a member of a
33
+ string-literal union is a *compile-time* break for an exhaustive `switch` on
34
+ `error.code` and for any `error.code === 'not_a_member'` comparison.
35
+
36
+ ### Changed
37
+
38
+ - **`CameraDescriptor.snapshot_interval_ms` is now
39
+ `CameraDescriptor.snapshot_interval_seconds`.** This is a rename **and a unit
40
+ change**: the value is now seconds, so it is a thousand times smaller than
41
+ the field it replaces. Following the compile error by renaming the property
42
+ and nothing else silently gives you the wrong number — divide by 1000 as
43
+ well, or read the field as the seconds it now is.
44
+ - **`UrdfCompleteness.missing` is no longer `string[]`.** It is now
45
+ `{ uri: string; element: 'mesh' | 'texture' }[]`, so a caller can tell a
46
+ missing mesh from a missing texture instead of reporting every gap as a
47
+ mesh. `UrdfSceneResources.missing` (returned by `assets.prepareUrdfScene`)
48
+ carries the same change; it is now typed as `UrdfCompleteness['missing']`.
49
+ If you only want the URIs: `missing.map((m) => m.uri)`.
50
+ - **`client.auth.logout()` returns `LogoutResult`** rather than an inline
51
+ `{ revoked: boolean }`. Additive in practice — `.revoked` is unchanged — but
52
+ the result now also carries `idp_logout`, five separable facts about the
53
+ session at the identity provider: `redirect` (with the URL to send the
54
+ browser to), `not_federated`, `unsupported_by_idp`, `hint_unavailable`,
55
+ `session_unknown`, or `null` when there was no response to report. Only
56
+ `not_federated` means the user is fully signed out. The type is exported, so
57
+ it can be named.
58
+ - Types and bundled contract values follow the platform's contracts at the
59
+ release's pin.
60
+
61
+ ### Added
62
+
63
+ - **`client.grants`**, an end user's own record of the OAuth clients they have
64
+ authorized: `list()` returns `ConsentGrantSummary[]`, `revoke(clientId)`
65
+ returns `ConsentRevokeResponse` and takes one grant back without touching the
66
+ others. `GrantsApi`, `ConsentGrantSummary` and `ConsentRevokeResponse` are
67
+ exported.
68
+ - **`client.auth.passwordResetUrl(): string`** — the hosted password-reset page
69
+ for every user of the platform, served by the cloud. A pure string builder,
70
+ no request; it is what replaces the two removed reset methods.
71
+ - **`client.assets.syncStatus(robotId, syncId)`** — the state of one asset sync
72
+ run: how far it has got, and what it could not resolve or upload.
73
+ - **`AssetListResponse.active_sync`** — the sync currently running for the
74
+ robot, or `null`. Nullable, and always present.
75
+ - **`ClientIdentity.act`** (optional) — `{ admin_user_id: string }`, the admin
76
+ actually driving when the session is an impersonation. Absent on an ordinary
77
+ session, which is not the same fact as an unknown actor.
78
+ - **`LogoutResult`** — exported; see `logout()` above.
79
+ - **Eight error codes** in `FleetlessErrorCode` / `ERROR_CODES`:
80
+ `unknown_slug`, `capability_required`, `last_owner`, `group_not_deletable`,
81
+ `group_in_use`, `target_state_conflict`, `mcp_access_denied`,
82
+ `signup_closed`.
83
+ - **Licence (MIT) and package metadata.** The tarball now carries `LICENSE`
84
+ and `CHANGELOG.md`, and the manifest an SPDX id, author, homepage, bugs
85
+ address and keywords. Every version from this one on is published by the
86
+ repository's own pipeline from a release tag; `npm publish` by hand is
87
+ retired.
88
+
89
+ ### Fixed
90
+
91
+ - **A CommonJS consumer can type the package.** The `exports` map offered
92
+ `require` a JavaScript entry point but only ever an ESM `.d.ts` beside it,
93
+ so under `node16`/`nodenext` resolution TypeScript refused the require with
94
+ `TS1479` — the runtime worked, the types did not. Each condition now carries
95
+ its own declarations (`dist/index.d.ts` for `import`, `dist/index.d.cts` for
96
+ `require`), and `pnpm test:pack` typechecks both against the packed tarball.
97
+ Present in 1.0.0.
98
+
99
+ ## [1.0.0] — 2026-08-18
100
+
101
+ First published version.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dehne Robotik GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.