@fleetless/sdk 1.0.0 → 2.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,113 @@
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.1] — 2026-09-04
8
+
9
+ No code change; the published `dist/` is byte-identical to 2.0.0.
10
+
11
+ ### Changed
12
+
13
+ - The contact address in the README and in `package.json` (`author`,
14
+ `bugs`) is hello@fleetless.dev.
15
+ - The README's closing section states that the source repository is private
16
+ and takes no outside contributions; the `CONTRIBUTING.md` it linked to is
17
+ gone.
18
+
19
+ ## [2.0.0] — 2026-09-04
20
+
21
+ The first release since 1.0.0, and it is a breaking one. The entries below are
22
+ the **complete** difference in the published surface, established by unpacking
23
+ `@fleetless/sdk@1.0.0` from npm and diffing its bundled `dist/index.d.ts`
24
+ against this tree's, declaration by declaration — not read off the commit log.
25
+ Everything not named here is byte-identical between the two builds.
26
+
27
+ ### Removed
28
+
29
+ - **`client.auth.register(email, password)` and
30
+ `client.auth.confirmRegistration(token)`.** Self-registration through the SDK
31
+ is gone, with no successor. The org-central identity redesign removed per-app
32
+ user pools: users belong to one pool per organisation and a group grows by
33
+ invitation (or, once the federation work lands, by OIDC just-in-time
34
+ provisioning). There is no client-side sign-up call any more, and the routes
35
+ behind both methods no longer exist.
36
+ - **`client.auth.requestPasswordReset(email)` and
37
+ `client.auth.confirmPasswordReset(token, newPassword)`.** Same reason: the
38
+ routes are gone. Link the user to the platform's hosted reset page instead —
39
+ `client.auth.passwordResetUrl()` builds the URL, and nothing about it is a
40
+ network call.
41
+ - **The exported types `MailStatus` and `ClientRegisterResponse`**, which
42
+ described `register()`'s result and went with it.
43
+ - **The error code `not_a_member`**, from `FleetlessErrorCode` and from
44
+ `ERROR_CODES`. No route emits it any more. Removing a member of a
45
+ string-literal union is a *compile-time* break for an exhaustive `switch` on
46
+ `error.code` and for any `error.code === 'not_a_member'` comparison.
47
+
48
+ ### Changed
49
+
50
+ - **`CameraDescriptor.snapshot_interval_ms` is now
51
+ `CameraDescriptor.snapshot_interval_seconds`.** This is a rename **and a unit
52
+ change**: the value is now seconds, so it is a thousand times smaller than
53
+ the field it replaces. Following the compile error by renaming the property
54
+ and nothing else silently gives you the wrong number — divide by 1000 as
55
+ well, or read the field as the seconds it now is.
56
+ - **`UrdfCompleteness.missing` is no longer `string[]`.** It is now
57
+ `{ uri: string; element: 'mesh' | 'texture' }[]`, so a caller can tell a
58
+ missing mesh from a missing texture instead of reporting every gap as a
59
+ mesh. `UrdfSceneResources.missing` (returned by `assets.prepareUrdfScene`)
60
+ carries the same change; it is now typed as `UrdfCompleteness['missing']`.
61
+ If you only want the URIs: `missing.map((m) => m.uri)`.
62
+ - **`client.auth.logout()` returns `LogoutResult`** rather than an inline
63
+ `{ revoked: boolean }`. Additive in practice — `.revoked` is unchanged — but
64
+ the result now also carries `idp_logout`, five separable facts about the
65
+ session at the identity provider: `redirect` (with the URL to send the
66
+ browser to), `not_federated`, `unsupported_by_idp`, `hint_unavailable`,
67
+ `session_unknown`, or `null` when there was no response to report. Only
68
+ `not_federated` means the user is fully signed out. The type is exported, so
69
+ it can be named.
70
+ - Types and bundled contract values follow the platform's contracts at the
71
+ release's pin.
72
+
73
+ ### Added
74
+
75
+ - **`client.grants`**, an end user's own record of the OAuth clients they have
76
+ authorized: `list()` returns `ConsentGrantSummary[]`, `revoke(clientId)`
77
+ returns `ConsentRevokeResponse` and takes one grant back without touching the
78
+ others. `GrantsApi`, `ConsentGrantSummary` and `ConsentRevokeResponse` are
79
+ exported.
80
+ - **`client.auth.passwordResetUrl(): string`** — the hosted password-reset page
81
+ for every user of the platform, served by the cloud. A pure string builder,
82
+ no request; it is what replaces the two removed reset methods.
83
+ - **`client.assets.syncStatus(robotId, syncId)`** — the state of one asset sync
84
+ run: how far it has got, and what it could not resolve or upload.
85
+ - **`AssetListResponse.active_sync`** — the sync currently running for the
86
+ robot, or `null`. Nullable, and always present.
87
+ - **`ClientIdentity.act`** (optional) — `{ admin_user_id: string }`, the admin
88
+ actually driving when the session is an impersonation. Absent on an ordinary
89
+ session, which is not the same fact as an unknown actor.
90
+ - **`LogoutResult`** — exported; see `logout()` above.
91
+ - **Eight error codes** in `FleetlessErrorCode` / `ERROR_CODES`:
92
+ `unknown_slug`, `capability_required`, `last_owner`, `group_not_deletable`,
93
+ `group_in_use`, `target_state_conflict`, `mcp_access_denied`,
94
+ `signup_closed`.
95
+ - **Licence (MIT) and package metadata.** The tarball now carries `LICENSE`
96
+ and `CHANGELOG.md`, and the manifest an SPDX id, author, homepage, bugs
97
+ address and keywords. Every version from this one on is published by the
98
+ repository's own pipeline from a release tag; `npm publish` by hand is
99
+ retired.
100
+
101
+ ### Fixed
102
+
103
+ - **A CommonJS consumer can type the package.** The `exports` map offered
104
+ `require` a JavaScript entry point but only ever an ESM `.d.ts` beside it,
105
+ so under `node16`/`nodenext` resolution TypeScript refused the require with
106
+ `TS1479` — the runtime worked, the types did not. Each condition now carries
107
+ its own declarations (`dist/index.d.ts` for `import`, `dist/index.d.cts` for
108
+ `require`), and `pnpm test:pack` typechecks both against the packed tarball.
109
+ Present in 1.0.0.
110
+
111
+ ## [1.0.0] — 2026-08-18
112
+
113
+ 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.