@farthershore/client 0.2.0 → 0.3.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 +10 -0
- package/README.md +1 -1
- package/dist/index.js +40 -1
- package/dist/types/api.generated.d.ts +8 -0
- package/dist/types/generated/schemas.d.ts +13 -0
- package/dist/types/operations/businesses.d.ts +14 -0
- package/dist/types/operations/index.d.ts +11 -0
- package/dist/types/types.d.ts +3 -0
- package/dist/types/version.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ All notable changes to the API client are documented here. This package
|
|
|
4
4
|
versions independently from the CLI and the other SDKs. Pre-1.0: minor versions
|
|
5
5
|
may include breaking changes.
|
|
6
6
|
|
|
7
|
+
## [0.3.0] - 2026-10-14
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `businesses.docs.validate({ businessId, env?, files })` checks docs files
|
|
12
|
+
(`docs/_index.yaml` and MDX pages) the way the pull request check does,
|
|
13
|
+
without publishing anything. It retries like a read and returns
|
|
14
|
+
`DocsValidateResponse` (`issues`, errors first, then notes with a
|
|
15
|
+
`severity`). New exported type: `DocsValidateResponse`.
|
|
16
|
+
|
|
7
17
|
## [0.2.0] - 2026-10-14
|
|
8
18
|
|
|
9
19
|
### Changed
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ namespaced, typed operation surface (`fs.runtimeTokens.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.3.0`.** Pre-1.0: minor releases may include breaking changes.
|
|
9
9
|
> Every response is typed. All but the publish-rollback receipt 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.
|
package/dist/index.js
CHANGED
|
@@ -1422,6 +1422,18 @@ var PLATFORM_OPERATION_DEFINITIONS = [
|
|
|
1422
1422
|
detail: "Use `farthershore validate --business <business>`; it builds deterministically and calls this manifest-compile endpoint for the server verdict."
|
|
1423
1423
|
}
|
|
1424
1424
|
},
|
|
1425
|
+
{
|
|
1426
|
+
key: "business.docs.validate",
|
|
1427
|
+
class: "operate",
|
|
1428
|
+
domain: "businesses",
|
|
1429
|
+
// Runs the PR bot's docs check on files sent in the request and returns
|
|
1430
|
+
// its issues. Stores nothing; a repeat is a fresh observation.
|
|
1431
|
+
sideEffect: "read",
|
|
1432
|
+
unavailable: {
|
|
1433
|
+
reason: "served_by_other_command",
|
|
1434
|
+
detail: "Use `farthershore validate --business <business>`; it sends your docs/ files and shows the same issues a pull request's Docs comment would."
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1425
1437
|
{ key: "business.read", class: "operate", domain: "businesses" },
|
|
1426
1438
|
{ key: "business.routes.read", class: "contract", domain: "businesses" },
|
|
1427
1439
|
{ key: "business.contract.read", class: "contract", domain: "businesses" },
|
|
@@ -1694,6 +1706,13 @@ var AGENT_OPERATION_AUTHORIZATIONS = {
|
|
|
1694
1706
|
permission: "business:compile",
|
|
1695
1707
|
targetKind: "business"
|
|
1696
1708
|
},
|
|
1709
|
+
// Same read-effect authority as the manifest dry run: both are halves of
|
|
1710
|
+
// `farthershore validate`. (`business:docs_update` is the write permission
|
|
1711
|
+
// that toggles docs, not a check.)
|
|
1712
|
+
"business.docs.validate": {
|
|
1713
|
+
permission: "business:compile",
|
|
1714
|
+
targetKind: "business"
|
|
1715
|
+
},
|
|
1697
1716
|
"business.delete": { permission: "business:delete", targetKind: "business" },
|
|
1698
1717
|
"business.docs.disable": {
|
|
1699
1718
|
permission: "business:docs_update",
|
|
@@ -3523,6 +3542,13 @@ var SPECS = {
|
|
|
3523
3542
|
oneTimeSecret: false,
|
|
3524
3543
|
preview: false
|
|
3525
3544
|
},
|
|
3545
|
+
"business.docs.validate": {
|
|
3546
|
+
summary: "Check docs files the way a pull request's docs check does",
|
|
3547
|
+
description: "Runs the same docs check a pull request gets on the docs/ files sent, and returns the issues its Docs comment would show. Nothing is saved or published; a repeat returns a fresh result.",
|
|
3548
|
+
destructive: false,
|
|
3549
|
+
oneTimeSecret: false,
|
|
3550
|
+
preview: false
|
|
3551
|
+
},
|
|
3526
3552
|
"manifest.apply": {
|
|
3527
3553
|
summary: "Apply a compiled business manifest (git-triggered)",
|
|
3528
3554
|
description: "The repo pipeline applies the compiled IR on a push/release through the same neutral apply service. `farthershore validate` runs the identical verdict locally WITHOUT applying; `farthershore apply-timeline list` shows what the platform applied.",
|
|
@@ -4584,6 +4610,19 @@ var businessOperations = {
|
|
|
4584
4610
|
readOnly(ctx)
|
|
4585
4611
|
)
|
|
4586
4612
|
}),
|
|
4613
|
+
// Check docs files (`docs/_index.yaml` + MDX pages) the way the PR check
|
|
4614
|
+
// does, without publishing anything. Read-only, so it retries like a read.
|
|
4615
|
+
// `issues` lists errors first; notes after them carry a `severity`.
|
|
4616
|
+
"businesses.docs.validate": operation({
|
|
4617
|
+
op: "business.docs.validate",
|
|
4618
|
+
run: (ctx, { businessId, env, files }) => send(
|
|
4619
|
+
ctx,
|
|
4620
|
+
"POST",
|
|
4621
|
+
withQuery(`${business(businessId)}/docs/validate`, { env }),
|
|
4622
|
+
{ files },
|
|
4623
|
+
readOnly(ctx)
|
|
4624
|
+
)
|
|
4625
|
+
}),
|
|
4587
4626
|
"businesses.brand.update": patchBusiness("brand.update"),
|
|
4588
4627
|
"businesses.brand.uploadAsset": operation({
|
|
4589
4628
|
op: "brand.update",
|
|
@@ -6104,7 +6143,7 @@ function diagnosticsOf(parsed) {
|
|
|
6104
6143
|
}
|
|
6105
6144
|
|
|
6106
6145
|
// src/version.ts
|
|
6107
|
-
var CLIENT_VERSION = "0.
|
|
6146
|
+
var CLIENT_VERSION = "0.3.0";
|
|
6108
6147
|
var CLIENT_PRODUCT = `@farthershore/client/${CLIENT_VERSION}`;
|
|
6109
6148
|
|
|
6110
6149
|
// src/transport.ts
|
|
@@ -421,6 +421,14 @@ export interface FartherShoreApi {
|
|
|
421
421
|
* Operation `business.docs.enable` · write · requires `business:docs_update` · reconcile an unknown outcome with `business.read`.
|
|
422
422
|
*/
|
|
423
423
|
readonly enable: Method<"businesses.docs.enable">;
|
|
424
|
+
/**
|
|
425
|
+
* Check docs files the way a pull request's docs check does
|
|
426
|
+
*
|
|
427
|
+
* Runs the same docs check a pull request gets on the docs/ files sent, and returns the issues its Docs comment would show. Nothing is saved or published; a repeat returns a fresh result.
|
|
428
|
+
*
|
|
429
|
+
* Operation `business.docs.validate` · read · requires `business:compile`.
|
|
430
|
+
*/
|
|
431
|
+
readonly validate: Method<"businesses.docs.validate">;
|
|
424
432
|
};
|
|
425
433
|
/**
|
|
426
434
|
* List businesses in the current org
|
|
@@ -2241,6 +2241,19 @@ export interface components {
|
|
|
2241
2241
|
/** Format: date-time */
|
|
2242
2242
|
createdAt: string;
|
|
2243
2243
|
};
|
|
2244
|
+
DocsCheckIssue: {
|
|
2245
|
+
code: string;
|
|
2246
|
+
message: string;
|
|
2247
|
+
file?: string;
|
|
2248
|
+
line?: number;
|
|
2249
|
+
column?: number;
|
|
2250
|
+
path?: string;
|
|
2251
|
+
/** @enum {string} */
|
|
2252
|
+
severity?: "warning" | "info";
|
|
2253
|
+
};
|
|
2254
|
+
DocsValidateResponse: {
|
|
2255
|
+
issues: components["schemas"]["DocsCheckIssue"][];
|
|
2256
|
+
};
|
|
2244
2257
|
EconomicAgreement: {
|
|
2245
2258
|
id: string;
|
|
2246
2259
|
environmentId: string | null;
|
|
@@ -3,6 +3,11 @@ import { type ListQuery, type RequestBody } from "./define.js";
|
|
|
3
3
|
type BusinessRef = {
|
|
4
4
|
businessId: string;
|
|
5
5
|
};
|
|
6
|
+
/** One docs file sent to `businesses.docs.validate`, by repo-relative path. */
|
|
7
|
+
export type DocsValidateFile = {
|
|
8
|
+
path: string;
|
|
9
|
+
content: string;
|
|
10
|
+
};
|
|
6
11
|
/** `env` selects a preview environment by name; omit it for production. */
|
|
7
12
|
type EnvScoped = BusinessRef & {
|
|
8
13
|
env?: string;
|
|
@@ -388,6 +393,15 @@ export declare const businessOperations: {
|
|
|
388
393
|
} | null;
|
|
389
394
|
economicChange: boolean;
|
|
390
395
|
}>;
|
|
396
|
+
"businesses.docs.validate": import("./define.js").OperationEntry<BusinessRef & {
|
|
397
|
+
env?: string;
|
|
398
|
+
} & {
|
|
399
|
+
files: readonly DocsValidateFile[];
|
|
400
|
+
}, {
|
|
401
|
+
issues: import("../generated/schemas.js").components["schemas"]["DocsCheckIssue"][];
|
|
402
|
+
}, {
|
|
403
|
+
issues: import("../generated/schemas.js").components["schemas"]["DocsCheckIssue"][];
|
|
404
|
+
}>;
|
|
391
405
|
"businesses.brand.update": import("./define.js").OperationEntry<BusinessRef & {
|
|
392
406
|
env?: string;
|
|
393
407
|
} & {
|
|
@@ -3392,6 +3392,17 @@ export declare const OPERATION_TABLE: {
|
|
|
3392
3392
|
} | null;
|
|
3393
3393
|
economicChange: boolean;
|
|
3394
3394
|
}>;
|
|
3395
|
+
"businesses.docs.validate": import("./define.js").OperationEntry<{
|
|
3396
|
+
businessId: string;
|
|
3397
|
+
} & {
|
|
3398
|
+
env?: string;
|
|
3399
|
+
} & {
|
|
3400
|
+
files: readonly import("./businesses.js").DocsValidateFile[];
|
|
3401
|
+
}, {
|
|
3402
|
+
issues: import("../generated/schemas.js").components["schemas"]["DocsCheckIssue"][];
|
|
3403
|
+
}, {
|
|
3404
|
+
issues: import("../generated/schemas.js").components["schemas"]["DocsCheckIssue"][];
|
|
3405
|
+
}>;
|
|
3395
3406
|
"businesses.brand.update": import("./define.js").OperationEntry<{
|
|
3396
3407
|
businessId: string;
|
|
3397
3408
|
} & {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -171,6 +171,9 @@ export type BulletinPostList = Schemas["BulletinPostList"];
|
|
|
171
171
|
export type AutomationRule = Schemas["AutomationRule"];
|
|
172
172
|
/** `automationRules.read`: one page, newest first. */
|
|
173
173
|
export type AutomationRuleList = Schemas["AutomationRuleList"];
|
|
174
|
+
/** `business.docs.validate`: the issues a pull request's Docs comment
|
|
175
|
+
* would show for the files sent (errors first, then notes). */
|
|
176
|
+
export type DocsValidateResponse = Schemas["DocsValidateResponse"];
|
|
174
177
|
/** `knowledge.*.read`: one page of the Knowledge Registry index. */
|
|
175
178
|
export type KnowledgeIndex = Schemas["KnowledgeIndex"];
|
|
176
179
|
/** `platform.resourceCounts.report`: the recorded count. */
|
package/dist/types/version.d.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* `package.json` by `version.test.ts` and checked in the built bundle by
|
|
4
4
|
* `scripts/check-pack.mjs`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const CLIENT_VERSION = "0.
|
|
6
|
+
export declare const CLIENT_VERSION = "0.3.0";
|
|
7
7
|
/** The `x-fs-client` product token for this package. */
|
|
8
|
-
export declare const CLIENT_PRODUCT = "@farthershore/client/0.
|
|
8
|
+
export declare const CLIENT_PRODUCT = "@farthershore/client/0.3.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farthershore/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Farther Shore API client: the authenticated HTTP transport, credential sources, and typed errors shared by the CLI and agent tooling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|