@farthershore/client 0.6.0 → 0.8.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 +38 -2
- package/LICENSE +21 -0
- package/README.md +10 -10
- package/dist/index.js +326 -59
- package/dist/types/api.generated.d.ts +105 -25
- package/dist/types/generated/schemas.d.ts +147 -16
- package/dist/types/operations/audit-notifications.d.ts +4 -0
- package/dist/types/operations/auth.d.ts +193 -0
- package/dist/types/operations/backends.d.ts +76 -21
- package/dist/types/operations/businesses.d.ts +48 -0
- package/dist/types/operations/consumers.d.ts +108 -0
- package/dist/types/operations/define.d.ts +1 -1
- package/dist/types/operations/index.d.ts +493 -26
- package/dist/types/operations/organizations.d.ts +7 -0
- package/dist/types/operations/platform.d.ts +6 -6
- package/dist/types/operations/webhooks.d.ts +64 -2
- package/dist/types/surface-types.d.ts +1 -1
- package/dist/types/surface.d.ts +1 -1
- package/dist/types/types.d.ts +20 -6
- package/dist/types/version.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
# Changelog — @farthershore/client
|
|
2
2
|
|
|
3
|
+
## [0.8.0] - 2026-11-21
|
|
4
|
+
|
|
5
|
+
- **Breaking:** runtime tokens are now secret keys. `runtimeTokens.read`, `.mint`, `.rotate` and `.revoke` are replaced by the same operations under `secretKeys`, on the `/secret-keys` routes, with no old-name aliases.
|
|
6
|
+
- Backend, key and webhook operations accept and return an explicit scope (all, production, non-production or one environment).
|
|
7
|
+
|
|
8
|
+
## [0.7.0] - 2026-11-20
|
|
9
|
+
|
|
10
|
+
- Add `organizations.sellerDetails.read`: the seller details (legal name, support email, postal address and optional support URL) every business in the organization shows its customers, read from the organization's Stripe account, and where they stand (`not_connected`, `incomplete` or `complete`).
|
|
11
|
+
- Add `personalData.export` to download your own personal data as JSON, and `account.erasure.read` to follow your account deletion through to completion. Deleting the account itself stays a dashboard action.
|
|
12
|
+
- Add `consumers.data.export` to export one customer's data for a business as JSON, and `consumers.data.erasure.read` to read the status of that customer's data erasure.
|
|
13
|
+
- Add `platform.legal.read` to read whether the platform's current legal documents have been accepted.
|
|
14
|
+
|
|
3
15
|
## [0.6.0] - 2026-11-18
|
|
4
16
|
|
|
5
17
|
- Use `/agent/v1/whoami` for credential validation; the retired `/management/whoami` endpoint is no longer supported.
|
|
6
18
|
|
|
7
|
-
## [Unreleased]
|
|
8
|
-
|
|
9
19
|
- **Breaking:** Removed `businesses.rollback`; the retired publish workflow cannot produce a valid rollback target. Recover a Business contract through a reviewed repository fix and a new release.
|
|
10
20
|
|
|
11
21
|
- Stop frontend build waits on supersession and keep the awaited build identity fixed, including when it is missing from a status response.
|
|
12
22
|
|
|
23
|
+
## [0.6.0] - 2026-11-10
|
|
24
|
+
|
|
25
|
+
- **Breaking:** Rename `runtimeTokens` to `secretKeys`, operation keys and permissions to `secret_key`, REST routes to `/secret-keys`, and exported `RuntimeToken*` types to `SecretKey*`. No old-name aliases or old-server fallback remain.
|
|
26
|
+
|
|
27
|
+
### Added — scoped backend connections
|
|
28
|
+
|
|
29
|
+
- Backend deployment and runtime key requests accept explicit environment
|
|
30
|
+
scopes. Bind responses include the managed receiver and one-time default key;
|
|
31
|
+
bootstrap contracts describe the key's accepted environments.
|
|
32
|
+
- Webhook operations accept event subscription patterns and expose delivery
|
|
33
|
+
diagnostics through the updated typed responses.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- `webhooks.delivery.redeliver({ businessId, webhookId, deliveryId })` sends
|
|
38
|
+
one delivery again with the same `webhook-id`.
|
|
39
|
+
- `webhooks.redeliver({ businessId, webhookId, since, until? })` sends every
|
|
40
|
+
failed or dead delivery created in `[since, until)` again and returns
|
|
41
|
+
`{ data: { redelivered } }`.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- `WebhookEndpoint.disabledAt` is replaced by **`pausedAt`**: endpoints are no
|
|
46
|
+
longer disabled after repeated failures; they pause after a day of failed
|
|
47
|
+
deliveries and resume on their own. Requires the matching platform release.
|
|
48
|
+
|
|
13
49
|
## [0.5.0] - 2026-11-09
|
|
14
50
|
|
|
15
51
|
- **Breaking:** `businesses.rollback` takes `publishId` and returns
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Farther Shore
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @farthershore/client
|
|
2
2
|
|
|
3
3
|
The Farther Shore API client that the `farthershore` CLI runs on: a
|
|
4
|
-
namespaced, typed operation surface (`fs.
|
|
4
|
+
namespaced, typed operation surface (`fs.secretKeys.revoke(…)`) over an
|
|
5
5
|
authenticated `fetch` transport with exact retry and outcome semantics,
|
|
6
6
|
pluggable credential sources, and typed errors.
|
|
7
7
|
|
|
8
|
-
> **Status: `0.
|
|
8
|
+
> **Status: `0.8.0`.** Pre-1.0: minor releases may include breaking changes.
|
|
9
9
|
> Every response is typed. Responses are generated
|
|
10
10
|
> from the platform's zod schemas (through the API's OpenAPI components), so a
|
|
11
11
|
> field exists in a type exactly when the server sends it.
|
|
@@ -38,7 +38,7 @@ const fs = createFartherShore({
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
const businesses = await fs.businesses.list();
|
|
41
|
-
const revoked = await fs.
|
|
41
|
+
const revoked = await fs.secretKeys.revoke({ businessId, tokenId });
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
## The namespaced API
|
|
@@ -60,8 +60,8 @@ On preview-capable methods, literal `{ dryRun: true }` resolves to
|
|
|
60
60
|
resolves to the union, so check `"dryRun" in result` before using the result.
|
|
61
61
|
`W` is the preview payload, which can differ from the write result.
|
|
62
62
|
|
|
63
|
-
The namespace path comes from the operation key (`
|
|
64
|
-
`fs.
|
|
63
|
+
The namespace path comes from the operation key (`secret_key.revoke` →
|
|
64
|
+
`fs.secretKeys.revoke`). The namespaces:
|
|
65
65
|
|
|
66
66
|
| Namespace | Covers |
|
|
67
67
|
| -------------------- | --------------------------------------------------------------------------------------- |
|
|
@@ -87,7 +87,7 @@ The namespace path comes from the operation key (`runtime_token.revoke` →
|
|
|
87
87
|
| `fs.platform` | Denial explanations, dependents, resource counts, workflow replay/rollback previews |
|
|
88
88
|
| `fs.portal` | Subscriber plane (consumer credentials): service accounts, usage limits |
|
|
89
89
|
| `fs.promoCodes` | Promo codes |
|
|
90
|
-
| `fs.
|
|
90
|
+
| `fs.secretKeys` | Secret keys: read, mint, rotate, revoke |
|
|
91
91
|
| `fs.usage` | Usage |
|
|
92
92
|
| `fs.variables` | Write-only business variables and their asynchronous operations |
|
|
93
93
|
| `fs.webhooks` | Webhook endpoints, test/trigger, secret rotation, event types, deliveries |
|
|
@@ -95,12 +95,12 @@ The namespace path comes from the operation key (`runtime_token.revoke` →
|
|
|
95
95
|
Each method carries static metadata as `method.meta`:
|
|
96
96
|
|
|
97
97
|
```ts
|
|
98
|
-
fs.
|
|
99
|
-
// { path: "
|
|
98
|
+
fs.secretKeys.revoke.meta;
|
|
99
|
+
// { path: "secretKeys.revoke", op: "secret_key.revoke",
|
|
100
100
|
// summary, description, sideEffect: "write", destructive: true,
|
|
101
101
|
// oneTimeSecret: false, preview: false,
|
|
102
|
-
// reconcile: { op: "
|
|
103
|
-
// maxPageSize: null, permission: "
|
|
102
|
+
// reconcile: { op: "secret_key.read" }, pagination: null,
|
|
103
|
+
// maxPageSize: null, permission: "secret_key:revoke" }
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
Portal-plane methods have no opKey; they declare the same safety and paging
|