@spec0/sdk-public-platform 1.3.1 → 1.4.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/dist/generated/models/PublicPublishRequestV1.d.ts +22 -16
- package/dist/generated/models/PublicPublishRequestV1.d.ts.map +1 -1
- package/dist/generated/models/TeamPublishRequestV1.d.ts +19 -4
- package/dist/generated/models/TeamPublishRequestV1.d.ts.map +1 -1
- package/dist/generated/services/PublicApisService.d.ts +52 -0
- package/dist/generated/services/PublicApisService.d.ts.map +1 -1
- package/dist/generated/services/PublicApisService.js +84 -0
- package/dist/generated/services/PublicApisService.js.map +1 -1
- package/dist/generated/services/PublicMocksService.d.ts +5 -0
- package/dist/generated/services/PublicMocksService.d.ts.map +1 -1
- package/dist/generated/services/PublicMocksService.js +5 -0
- package/dist/generated/services/PublicMocksService.js.map +1 -1
- package/dist/generated/services/PublicRegistryService.d.ts +22 -0
- package/dist/generated/services/PublicRegistryService.d.ts.map +1 -1
- package/dist/generated/services/PublicRegistryService.js +22 -0
- package/dist/generated/services/PublicRegistryService.js.map +1 -1
- package/dist/generated/services/PublicSpecsService.d.ts +7 -0
- package/dist/generated/services/PublicSpecsService.d.ts.map +1 -1
- package/dist/generated/services/PublicSpecsService.js +7 -0
- package/dist/generated/services/PublicSpecsService.js.map +1 -1
- package/dist/generated/services/PublicSpectralService.d.ts +5 -0
- package/dist/generated/services/PublicSpectralService.d.ts.map +1 -1
- package/dist/generated/services/PublicSpectralService.js +5 -0
- package/dist/generated/services/PublicSpectralService.js.map +1 -1
- package/dist/generated/services/PublicTeamsService.d.ts +5 -0
- package/dist/generated/services/PublicTeamsService.d.ts.map +1 -1
- package/dist/generated/services/PublicTeamsService.js +5 -0
- package/dist/generated/services/PublicTeamsService.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/models/PublicPublishRequestV1.ts +22 -16
- package/src/generated/models/TeamPublishRequestV1.ts +19 -4
- package/src/generated/services/PublicApisService.ts +99 -0
- package/src/generated/services/PublicMocksService.ts +5 -0
- package/src/generated/services/PublicRegistryService.ts +22 -0
- package/src/generated/services/PublicSpecsService.ts +7 -0
- package/src/generated/services/PublicSpectralService.ts +5 -0
- package/src/generated/services/PublicTeamsService.ts +5 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Visibility } from './Visibility.js';
|
|
2
2
|
/**
|
|
3
|
-
* Provide
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Provide `version` (explicit pin) and/or `semver` (auto-bump PATCH). When both
|
|
4
|
+
* are omitted, the server falls through to `info.version` from the spec, then
|
|
5
|
+
* the `0.1.0` default. `version` accepts arbitrary strings (semver, sha-prefixed
|
|
6
|
+
* tags, calendar tags, UUIDs) — see ADR-0026.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
export type PublicPublishRequestV1 = {
|
|
@@ -22,24 +22,30 @@ export type PublicPublishRequestV1 = {
|
|
|
22
22
|
description?: string;
|
|
23
23
|
visibility?: Visibility;
|
|
24
24
|
/**
|
|
25
|
-
* Explicit
|
|
26
|
-
*
|
|
25
|
+
* Explicit version tag for this publish. Accepts arbitrary strings — semver,
|
|
26
|
+
* sha-prefixed tags (e.g. "staging-abc1234"), calendar tags (e.g. "v2026-Q3"),
|
|
27
|
+
* UUIDs, etc. The registry stores what you pass; uniqueness is enforced per
|
|
28
|
+
* API. When set together with `semver`, `version` wins.
|
|
27
29
|
*
|
|
28
30
|
*/
|
|
29
31
|
version?: string;
|
|
30
32
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* versioning policy, breaking changes create a new API rather than
|
|
37
|
-
* bumping the major version. Mutually exclusive with `version`.
|
|
38
|
-
* Resolution and version-row insert are wrapped in a single
|
|
39
|
-
* transaction with a pessimistic lock on the api row, so concurrent
|
|
40
|
-
* publishes serialise cleanly.
|
|
33
|
+
* If true and the previous stored version is a valid semver, increment the
|
|
34
|
+
* PATCH component atomically (1.2.3 → 1.2.4). If the previous version is not
|
|
35
|
+
* a valid semver, or this is the first publish, falls through to the
|
|
36
|
+
* resolution order — `info.version` from the spec, then `0.1.0`. No spec
|
|
37
|
+
* parsing, no oasdiff classification — see ADR-0026.
|
|
41
38
|
*
|
|
42
39
|
*/
|
|
40
|
+
semver?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Deprecated. Pass `semver: true` instead. The server ignores this field
|
|
43
|
+
* since ADR-0026 unified version-bump semantics; it is kept in the schema
|
|
44
|
+
* so old clients sending `versionBump=PATCH|MINOR` continue to parse
|
|
45
|
+
* cleanly. New code should not set it.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
43
49
|
versionBump?: 'MINOR' | 'PATCH';
|
|
44
50
|
/**
|
|
45
51
|
* Full OpenAPI spec content (YAML or JSON)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicPublishRequestV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/PublicPublishRequestV1.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB
|
|
1
|
+
{"version":3,"file":"PublicPublishRequestV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/PublicPublishRequestV1.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -22,8 +22,11 @@ export type TeamPublishRequestV1 = {
|
|
|
22
22
|
*/
|
|
23
23
|
team?: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* Explicit version tag for this publish. Accepts arbitrary strings — semver
|
|
26
|
+
* ("1.2.3"), sha-prefixed tags ("staging-abc1234"), calendar tags
|
|
27
|
+
* ("v2026-Q3"), UUIDs, etc. If omitted and `semver` is not set, falls through
|
|
28
|
+
* to `info.version` from the spec, then the `0.1.0` default. When set
|
|
29
|
+
* together with `semver`, `version` wins. See ADR-0026.
|
|
27
30
|
*
|
|
28
31
|
*/
|
|
29
32
|
version?: string;
|
|
@@ -44,10 +47,22 @@ export type TeamPublishRequestV1 = {
|
|
|
44
47
|
*/
|
|
45
48
|
specFilePath?: string;
|
|
46
49
|
/**
|
|
47
|
-
* If true
|
|
48
|
-
*
|
|
50
|
+
* If true and the previous stored version is a valid semver, increment the
|
|
51
|
+
* PATCH component atomically (1.2.3 → 1.2.4). If the previous version is not
|
|
52
|
+
* a valid semver, or this is the first publish, falls through to the
|
|
53
|
+
* resolution order — `version` flag, then `info.version` from the spec, then
|
|
54
|
+
* `0.1.0`. No spec parsing, no oasdiff — see ADR-0026.
|
|
49
55
|
*
|
|
50
56
|
*/
|
|
51
57
|
semver?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Operator-supplied changelog prose for this version. When non-blank,
|
|
60
|
+
* becomes the version's `changelog_text` with `changelogSource = MANUAL`
|
|
61
|
+
* and the async AI listener skips generation. Powers the dashboard's
|
|
62
|
+
* Edit-API form (title + description combined) and the future
|
|
63
|
+
* `spec0 push --release-notes` flag.
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
releaseNotes?: string;
|
|
52
67
|
};
|
|
53
68
|
//# sourceMappingURL=TeamPublishRequestV1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamPublishRequestV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/TeamPublishRequestV1.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd
|
|
1
|
+
{"version":3,"file":"TeamPublishRequestV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/TeamPublishRequestV1.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { PublicApiListItem } from '../models/PublicApiListItem.js';
|
|
|
3
3
|
import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1.js';
|
|
4
4
|
import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1.js';
|
|
5
5
|
import type { PublicPublishResponseV1 } from '../models/PublicPublishResponseV1.js';
|
|
6
|
+
import type { SpecVersionListItemV1 } from '../models/SpecVersionListItemV1.js';
|
|
6
7
|
import type { TeamPublishRequestV1 } from '../models/TeamPublishRequestV1.js';
|
|
7
8
|
import type { TeamPublishResponseV1 } from '../models/TeamPublishResponseV1.js';
|
|
8
9
|
import type { VisibilityUpdateRequestV1 } from '../models/VisibilityUpdateRequestV1.js';
|
|
@@ -71,8 +72,59 @@ export declare class PublicApisService {
|
|
|
71
72
|
static deleteTeamApi({ apiId, }: {
|
|
72
73
|
apiId: string;
|
|
73
74
|
}): CancelablePromise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Fetch the latest spec body for a team-scoped private API
|
|
77
|
+
* Returns the OpenAPI document content (YAML or JSON, as published) for the latest
|
|
78
|
+
* version of a team-scoped private API. Mirrors the public-registry equivalent
|
|
79
|
+
* (`GET /api/v1/public/registry/{orgSlug}/{apiName}`) but resolves the API by its
|
|
80
|
+
* internal UUID so callers can target private APIs without a public org slug.
|
|
81
|
+
*
|
|
82
|
+
* Authorization stack:
|
|
83
|
+
* - scope: `read:specs`
|
|
84
|
+
* - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
|
|
85
|
+
* cross-team isolation collapse to 404 to avoid leaking existence).
|
|
86
|
+
*
|
|
87
|
+
* Backs `spec0 pull --team` (issue #149).
|
|
88
|
+
*
|
|
89
|
+
* @returns string OpenAPI spec content for the latest published version
|
|
90
|
+
* @throws ApiError
|
|
91
|
+
*/
|
|
92
|
+
static getTeamApiSpec({ apiId, }: {
|
|
93
|
+
apiId: string;
|
|
94
|
+
}): CancelablePromise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* List published versions of a team-scoped private API
|
|
97
|
+
* Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions` for the
|
|
98
|
+
* team-scoped surface. Returns the version history ordered by `publishedAt` desc.
|
|
99
|
+
* Cross-org / cross-team callers see 404 (same ABAC v2 collapse used by the spec body
|
|
100
|
+
* endpoint).
|
|
101
|
+
*
|
|
102
|
+
* @returns SpecVersionListItemV1 Version history
|
|
103
|
+
* @throws ApiError
|
|
104
|
+
*/
|
|
105
|
+
static listTeamApiVersions({ apiId, }: {
|
|
106
|
+
apiId: string;
|
|
107
|
+
}): CancelablePromise<Array<SpecVersionListItemV1>>;
|
|
108
|
+
/**
|
|
109
|
+
* Fetch a specific tagged version of a team-scoped private API
|
|
110
|
+
* Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions/{tag}` for the
|
|
111
|
+
* team-scoped surface. Returns the OpenAPI document content for the requested tag.
|
|
112
|
+
* Cross-org / cross-team callers see 404; unknown tag also 404.
|
|
113
|
+
*
|
|
114
|
+
* @returns string OpenAPI spec content for the requested version
|
|
115
|
+
* @throws ApiError
|
|
116
|
+
*/
|
|
117
|
+
static getTeamApiSpecByTag({ apiId, tag, }: {
|
|
118
|
+
apiId: string;
|
|
119
|
+
tag: string;
|
|
120
|
+
}): CancelablePromise<string>;
|
|
74
121
|
/**
|
|
75
122
|
* Update visibility for a public API
|
|
123
|
+
* Toggle a public API between `PRIVATE`, `UNLISTED`, and `PUBLISHED` without
|
|
124
|
+
* republishing its spec. Visibility controls whether the API and its versions are
|
|
125
|
+
* readable through the unauthenticated public registry; the spec content itself is
|
|
126
|
+
* untouched. Callable by any token in the owning org that holds `write:apis`.
|
|
127
|
+
*
|
|
76
128
|
* @returns PublicApiMetaV1 Updated visibility
|
|
77
129
|
* @throws ApiError
|
|
78
130
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicApisService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,iBAAiB;IAC5B;;;;;OAKG;WACW,cAAc,IAAI,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAU3E;;;;;;;;OAQG;WACW,gBAAgB,CAAC,EAC7B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,sBAAsB,CAAC;KACrC,GAAG,iBAAiB,CAAC,uBAAuB,CAAC;IAe9C;;;;;;;;;;OAUG;WACW,YAAY,IAAI,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAUzE;;;;;;;;;;;;;OAaG;WACW,cAAc,CAAC,EAC3B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,oBAAoB,CAAC;KACnC,GAAG,iBAAiB,CAAC,qBAAqB,CAAC;IAgB5C;;;;;;;;;;;OAWG;WACW,aAAa,CAAC,EAC1B,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB,CAAC,IAAI,CAAC;IAc3B
|
|
1
|
+
{"version":3,"file":"PublicApisService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,iBAAiB;IAC5B;;;;;OAKG;WACW,cAAc,IAAI,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAU3E;;;;;;;;OAQG;WACW,gBAAgB,CAAC,EAC7B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,sBAAsB,CAAC;KACrC,GAAG,iBAAiB,CAAC,uBAAuB,CAAC;IAe9C;;;;;;;;;;OAUG;WACW,YAAY,IAAI,iBAAiB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAUzE;;;;;;;;;;;;;OAaG;WACW,cAAc,CAAC,EAC3B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,oBAAoB,CAAC;KACnC,GAAG,iBAAiB,CAAC,qBAAqB,CAAC;IAgB5C;;;;;;;;;;;OAWG;WACW,aAAa,CAAC,EAC1B,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB,CAAC,IAAI,CAAC;IAc3B;;;;;;;;;;;;;;;;OAgBG;WACW,cAAc,CAAC,EAC3B,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAc7B;;;;;;;;;OASG;WACW,mBAAmB,CAAC,EAChC,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAcnD;;;;;;;;OAQG;WACW,mBAAmB,CAAC,EAChC,KAAK,EACL,GAAG,GACJ,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAe7B;;;;;;;;;OASG;WACW,yBAAyB,CAAC,EACtC,WAAW,EACX,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,yBAAyB,CAAC;KACxC,GAAG,iBAAiB,CAAC,eAAe,CAAC;IAgBtC;;;;;;;OAOG;WACW,eAAe,CAAC,EAC5B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,MAAM,CAAC;KACrB,GAAG,iBAAiB,CAAC,IAAI,CAAC;CAc5B"}
|
|
@@ -121,8 +121,92 @@ class PublicApisService {
|
|
|
121
121
|
},
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Fetch the latest spec body for a team-scoped private API
|
|
126
|
+
* Returns the OpenAPI document content (YAML or JSON, as published) for the latest
|
|
127
|
+
* version of a team-scoped private API. Mirrors the public-registry equivalent
|
|
128
|
+
* (`GET /api/v1/public/registry/{orgSlug}/{apiName}`) but resolves the API by its
|
|
129
|
+
* internal UUID so callers can target private APIs without a public org slug.
|
|
130
|
+
*
|
|
131
|
+
* Authorization stack:
|
|
132
|
+
* - scope: `read:specs`
|
|
133
|
+
* - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
|
|
134
|
+
* cross-team isolation collapse to 404 to avoid leaking existence).
|
|
135
|
+
*
|
|
136
|
+
* Backs `spec0 pull --team` (issue #149).
|
|
137
|
+
*
|
|
138
|
+
* @returns string OpenAPI spec content for the latest published version
|
|
139
|
+
* @throws ApiError
|
|
140
|
+
*/
|
|
141
|
+
static getTeamApiSpec({ apiId, }) {
|
|
142
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
143
|
+
method: 'GET',
|
|
144
|
+
url: '/api/v1/public/apis/team/{apiId}/spec',
|
|
145
|
+
path: {
|
|
146
|
+
'apiId': apiId,
|
|
147
|
+
},
|
|
148
|
+
errors: {
|
|
149
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
150
|
+
403: `Token does not carry the required scope`,
|
|
151
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* List published versions of a team-scoped private API
|
|
157
|
+
* Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions` for the
|
|
158
|
+
* team-scoped surface. Returns the version history ordered by `publishedAt` desc.
|
|
159
|
+
* Cross-org / cross-team callers see 404 (same ABAC v2 collapse used by the spec body
|
|
160
|
+
* endpoint).
|
|
161
|
+
*
|
|
162
|
+
* @returns SpecVersionListItemV1 Version history
|
|
163
|
+
* @throws ApiError
|
|
164
|
+
*/
|
|
165
|
+
static listTeamApiVersions({ apiId, }) {
|
|
166
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
167
|
+
method: 'GET',
|
|
168
|
+
url: '/api/v1/public/apis/team/{apiId}/versions',
|
|
169
|
+
path: {
|
|
170
|
+
'apiId': apiId,
|
|
171
|
+
},
|
|
172
|
+
errors: {
|
|
173
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
174
|
+
403: `Token does not carry the required scope`,
|
|
175
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Fetch a specific tagged version of a team-scoped private API
|
|
181
|
+
* Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions/{tag}` for the
|
|
182
|
+
* team-scoped surface. Returns the OpenAPI document content for the requested tag.
|
|
183
|
+
* Cross-org / cross-team callers see 404; unknown tag also 404.
|
|
184
|
+
*
|
|
185
|
+
* @returns string OpenAPI spec content for the requested version
|
|
186
|
+
* @throws ApiError
|
|
187
|
+
*/
|
|
188
|
+
static getTeamApiSpecByTag({ apiId, tag, }) {
|
|
189
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
190
|
+
method: 'GET',
|
|
191
|
+
url: '/api/v1/public/apis/team/{apiId}/versions/{tag}',
|
|
192
|
+
path: {
|
|
193
|
+
'apiId': apiId,
|
|
194
|
+
'tag': tag,
|
|
195
|
+
},
|
|
196
|
+
errors: {
|
|
197
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
198
|
+
403: `Token does not carry the required scope`,
|
|
199
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
}
|
|
124
203
|
/**
|
|
125
204
|
* Update visibility for a public API
|
|
205
|
+
* Toggle a public API between `PRIVATE`, `UNLISTED`, and `PUBLISHED` without
|
|
206
|
+
* republishing its spec. Visibility controls whether the API and its versions are
|
|
207
|
+
* readable through the unauthenticated public registry; the spec content itself is
|
|
208
|
+
* untouched. Callable by any token in the owning org that holds `write:apis`.
|
|
209
|
+
*
|
|
126
210
|
* @returns PublicApiMetaV1 Updated visibility
|
|
127
211
|
* @throws ApiError
|
|
128
212
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicApisService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PublicApisService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,6 +5,11 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
5
5
|
export declare class PublicMocksService {
|
|
6
6
|
/**
|
|
7
7
|
* List mock servers for the calling org
|
|
8
|
+
* Returns every mock server owned by the calling token's org, with the parent API
|
|
9
|
+
* id/name and the mock's base URL. Backs the `spec0 mock list` CLI command and is
|
|
10
|
+
* the discovery surface SDK consumers use before deciding whether to point a
|
|
11
|
+
* client at a mock vs. a real environment.
|
|
12
|
+
*
|
|
8
13
|
* @returns MockItemV1 Mock servers
|
|
9
14
|
* @throws ApiError
|
|
10
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicMocksService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicMocksService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,kBAAkB;IAC7B
|
|
1
|
+
{"version":3,"file":"PublicMocksService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicMocksService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,kBAAkB;IAC7B;;;;;;;;;OASG;WACW,eAAe,IAAI,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAUrE;;;;;;;OAOG;WACW,gBAAgB,CAAC,EAC7B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,mBAAmB,CAAC;KAClC,GAAG,iBAAiB,CAAC,oBAAoB,CAAC;IAc3C;;;;;;;;OAQG;WACW,gBAAgB,CAAC,EAC7B,YAAY,GACb,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;KACtB,GAAG,iBAAiB,CAAC,IAAI,CAAC;CAc5B"}
|
|
@@ -6,6 +6,11 @@ const request_js_1 = require("../core/request.js");
|
|
|
6
6
|
class PublicMocksService {
|
|
7
7
|
/**
|
|
8
8
|
* List mock servers for the calling org
|
|
9
|
+
* Returns every mock server owned by the calling token's org, with the parent API
|
|
10
|
+
* id/name and the mock's base URL. Backs the `spec0 mock list` CLI command and is
|
|
11
|
+
* the discovery surface SDK consumers use before deciding whether to point a
|
|
12
|
+
* client at a mock vs. a real environment.
|
|
13
|
+
*
|
|
9
14
|
* @returns MockItemV1 Mock servers
|
|
10
15
|
* @throws ApiError
|
|
11
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicMocksService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicMocksService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,kBAAkB;IAC7B
|
|
1
|
+
{"version":3,"file":"PublicMocksService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicMocksService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,kBAAkB;IAC7B;;;;;;;;;OASG;IACI,MAAM,CAAC,eAAe;QAC3B,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,sBAAsB;YAC3B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,gBAAgB,CAAC,EAC7B,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,sBAAsB;YAC3B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,gBAAgB,CAAC,EAC7B,YAAY,GAGb;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,qCAAqC;YAC1C,IAAI,EAAE;gBACJ,cAAc,EAAE,YAAY;aAC7B;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA1ED,gDA0EC"}
|
|
@@ -5,6 +5,11 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
5
5
|
export declare class PublicRegistryService {
|
|
6
6
|
/**
|
|
7
7
|
* Fetch latest published spec
|
|
8
|
+
* Returns the raw OpenAPI document of the most recently published version of the
|
|
9
|
+
* API, addressed by its org slug and API name. This is the canonical entry point
|
|
10
|
+
* for SDK generators and the `spec0 pull` CLI command — it short-circuits the
|
|
11
|
+
* version-listing round-trip when the caller just wants "the current spec".
|
|
12
|
+
*
|
|
8
13
|
* @returns string OpenAPI spec content
|
|
9
14
|
* @throws ApiError
|
|
10
15
|
*/
|
|
@@ -14,6 +19,12 @@ export declare class PublicRegistryService {
|
|
|
14
19
|
}): CancelablePromise<string>;
|
|
15
20
|
/**
|
|
16
21
|
* List version history
|
|
22
|
+
* Returns every published version of the API in reverse-chronological order,
|
|
23
|
+
* including the SemVer tag, git SHA recorded at publish, publish timestamp, and a
|
|
24
|
+
* flag indicating whether breaking changes were detected against the previous
|
|
25
|
+
* version. The spec content itself is not inlined — fetch individual versions with
|
|
26
|
+
* `GET /versions/{tag}`.
|
|
27
|
+
*
|
|
17
28
|
* @returns SpecVersionListItemV1 Version history
|
|
18
29
|
* @throws ApiError
|
|
19
30
|
*/
|
|
@@ -23,6 +34,11 @@ export declare class PublicRegistryService {
|
|
|
23
34
|
}): CancelablePromise<Array<SpecVersionListItemV1>>;
|
|
24
35
|
/**
|
|
25
36
|
* Fetch a specific spec version
|
|
37
|
+
* Returns the immutable OpenAPI document published under the given SemVer tag.
|
|
38
|
+
* Use this when a consumer needs to pin to a specific contract — e.g. CI
|
|
39
|
+
* regenerating SDKs from `1.2.3` even after `1.3.0` ships. Returns 404 if either
|
|
40
|
+
* the API or that specific tag does not exist.
|
|
41
|
+
*
|
|
26
42
|
* @returns string OpenAPI spec content for the requested version
|
|
27
43
|
* @throws ApiError
|
|
28
44
|
*/
|
|
@@ -33,6 +49,12 @@ export declare class PublicRegistryService {
|
|
|
33
49
|
}): CancelablePromise<string>;
|
|
34
50
|
/**
|
|
35
51
|
* Semantic search over the calling org's APIs
|
|
52
|
+
* Natural-language search across the calling org's API titles, descriptions, and
|
|
53
|
+
* operation summaries, backed by the RAG service. Results are ranked by semantic
|
|
54
|
+
* similarity to `query` and capped at `maxResults` (default 10). Scope is
|
|
55
|
+
* org-internal — the token's org is the only corpus searched; there is no
|
|
56
|
+
* cross-org discovery on this endpoint.
|
|
57
|
+
*
|
|
36
58
|
* @returns AiSearchResponseV1 Search results
|
|
37
59
|
* @throws ApiError
|
|
38
60
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicRegistryService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicRegistryService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,qBAAqB;IAChC
|
|
1
|
+
{"version":3,"file":"PublicRegistryService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicRegistryService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,qBAAqB;IAChC;;;;;;;;;OASG;WACW,mBAAmB,CAAC,EAChC,OAAO,EACP,OAAO,GACR,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAe7B;;;;;;;;;;OAUG;WACW,sBAAsB,CAAC,EACnC,OAAO,EACP,OAAO,GACR,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAenD;;;;;;;;;OASG;WACW,kBAAkB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,GAAG,GACJ,EAAE;QACD,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;KACb,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAgB7B;;;;;;;;;;OAUG;WACW,gBAAgB,CAAC,EAC7B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,iBAAiB,CAAC;KAChC,GAAG,iBAAiB,CAAC,kBAAkB,CAAC;CAa1C"}
|
|
@@ -6,6 +6,11 @@ const request_js_1 = require("../core/request.js");
|
|
|
6
6
|
class PublicRegistryService {
|
|
7
7
|
/**
|
|
8
8
|
* Fetch latest published spec
|
|
9
|
+
* Returns the raw OpenAPI document of the most recently published version of the
|
|
10
|
+
* API, addressed by its org slug and API name. This is the canonical entry point
|
|
11
|
+
* for SDK generators and the `spec0 pull` CLI command — it short-circuits the
|
|
12
|
+
* version-listing round-trip when the caller just wants "the current spec".
|
|
13
|
+
*
|
|
9
14
|
* @returns string OpenAPI spec content
|
|
10
15
|
* @throws ApiError
|
|
11
16
|
*/
|
|
@@ -26,6 +31,12 @@ class PublicRegistryService {
|
|
|
26
31
|
}
|
|
27
32
|
/**
|
|
28
33
|
* List version history
|
|
34
|
+
* Returns every published version of the API in reverse-chronological order,
|
|
35
|
+
* including the SemVer tag, git SHA recorded at publish, publish timestamp, and a
|
|
36
|
+
* flag indicating whether breaking changes were detected against the previous
|
|
37
|
+
* version. The spec content itself is not inlined — fetch individual versions with
|
|
38
|
+
* `GET /versions/{tag}`.
|
|
39
|
+
*
|
|
29
40
|
* @returns SpecVersionListItemV1 Version history
|
|
30
41
|
* @throws ApiError
|
|
31
42
|
*/
|
|
@@ -46,6 +57,11 @@ class PublicRegistryService {
|
|
|
46
57
|
}
|
|
47
58
|
/**
|
|
48
59
|
* Fetch a specific spec version
|
|
60
|
+
* Returns the immutable OpenAPI document published under the given SemVer tag.
|
|
61
|
+
* Use this when a consumer needs to pin to a specific contract — e.g. CI
|
|
62
|
+
* regenerating SDKs from `1.2.3` even after `1.3.0` ships. Returns 404 if either
|
|
63
|
+
* the API or that specific tag does not exist.
|
|
64
|
+
*
|
|
49
65
|
* @returns string OpenAPI spec content for the requested version
|
|
50
66
|
* @throws ApiError
|
|
51
67
|
*/
|
|
@@ -67,6 +83,12 @@ class PublicRegistryService {
|
|
|
67
83
|
}
|
|
68
84
|
/**
|
|
69
85
|
* Semantic search over the calling org's APIs
|
|
86
|
+
* Natural-language search across the calling org's API titles, descriptions, and
|
|
87
|
+
* operation summaries, backed by the RAG service. Results are ranked by semantic
|
|
88
|
+
* similarity to `query` and capped at `maxResults` (default 10). Scope is
|
|
89
|
+
* org-internal — the token's org is the only corpus searched; there is no
|
|
90
|
+
* cross-org discovery on this endpoint.
|
|
91
|
+
*
|
|
70
92
|
* @returns AiSearchResponseV1 Search results
|
|
71
93
|
* @throws ApiError
|
|
72
94
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicRegistryService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicRegistryService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,qBAAqB;IAChC
|
|
1
|
+
{"version":3,"file":"PublicRegistryService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicRegistryService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,qBAAqB;IAChC;;;;;;;;;OASG;IACI,MAAM,CAAC,mBAAmB,CAAC,EAChC,OAAO,EACP,OAAO,GAIR;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,6CAA6C;YAClD,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE,OAAO;aACnB;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;;;OAUG;IACI,MAAM,CAAC,sBAAsB,CAAC,EACnC,OAAO,EACP,OAAO,GAIR;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,sDAAsD;YAC3D,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE,OAAO;aACnB;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;;OASG;IACI,MAAM,CAAC,kBAAkB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,GAAG,GAKJ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,4DAA4D;YACjE,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE,OAAO;gBAClB,KAAK,EAAE,GAAG;aACX;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;;;OAUG;IACI,MAAM,CAAC,gBAAgB,CAAC,EAC7B,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,gCAAgC;YACrC,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA9HD,sDA8HC"}
|
|
@@ -23,6 +23,13 @@ export declare class PublicSpecsService {
|
|
|
23
23
|
}): CancelablePromise<SpecDiffResponseV1>;
|
|
24
24
|
/**
|
|
25
25
|
* Diff two published versions of an API
|
|
26
|
+
* Compares two already-published versions of the same API (addressed by `apiId` +
|
|
27
|
+
* `fromTag` + `toTag`) and returns the oasdiff-backed structured changelog plus a
|
|
28
|
+
* breaking-change list. Lighter-weight than the multipart `/specs/diff` endpoint
|
|
29
|
+
* because the caller doesn't have to upload either spec — the backend reads them
|
|
30
|
+
* from its own version history. Returns 503 if the oasdiff service is disabled in
|
|
31
|
+
* this deployment.
|
|
32
|
+
*
|
|
26
33
|
* @returns VersionDiffResponseV1 Diff result
|
|
27
34
|
* @throws ApiError
|
|
28
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicSpecsService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicSpecsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,kBAAkB;IAC7B;;;;;OAKG;WACW,SAAS,CAAC,EACtB,QAAQ,GACT,EAAE;QACD,QAAQ,EAAE;YACR;;eAEG;YACH,IAAI,EAAE,IAAI,CAAC;YACX;;eAEG;YACH,QAAQ,EAAE,IAAI,CAAC;SAChB,CAAC;KACH,GAAG,iBAAiB,CAAC,kBAAkB,CAAC;IAazC
|
|
1
|
+
{"version":3,"file":"PublicSpecsService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicSpecsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,kBAAkB;IAC7B;;;;;OAKG;WACW,SAAS,CAAC,EACtB,QAAQ,GACT,EAAE;QACD,QAAQ,EAAE;YACR;;eAEG;YACH,IAAI,EAAE,IAAI,CAAC;YACX;;eAEG;YACH,QAAQ,EAAE,IAAI,CAAC;SAChB,CAAC;KACH,GAAG,iBAAiB,CAAC,kBAAkB,CAAC;IAazC;;;;;;;;;;;OAWG;WACW,cAAc,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB,CAAC,qBAAqB,CAAC;IAiB5C;;;;;;;OAOG;WACW,aAAa,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,iBAAiB,CAAC,oBAAoB,CAAC;CAiB5C"}
|
|
@@ -25,6 +25,13 @@ class PublicSpecsService {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Diff two published versions of an API
|
|
28
|
+
* Compares two already-published versions of the same API (addressed by `apiId` +
|
|
29
|
+
* `fromTag` + `toTag`) and returns the oasdiff-backed structured changelog plus a
|
|
30
|
+
* breaking-change list. Lighter-weight than the multipart `/specs/diff` endpoint
|
|
31
|
+
* because the caller doesn't have to upload either spec — the backend reads them
|
|
32
|
+
* from its own version history. Returns 503 if the oasdiff service is disabled in
|
|
33
|
+
* this deployment.
|
|
34
|
+
*
|
|
28
35
|
* @returns VersionDiffResponseV1 Diff result
|
|
29
36
|
* @throws ApiError
|
|
30
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicSpecsService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicSpecsService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,kBAAkB;IAC7B;;;;;OAKG;IACI,MAAM,CAAC,SAAS,CAAC,EACtB,QAAQ,GAYT;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,2BAA2B;YAChC,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,qBAAqB;YAChC,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,gDAAgD;aACtD;SACF,CAAC,CAAC;IACL,CAAC;IACD
|
|
1
|
+
{"version":3,"file":"PublicSpecsService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicSpecsService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,kBAAkB;IAC7B;;;;;OAKG;IACI,MAAM,CAAC,SAAS,CAAC,EACtB,QAAQ,GAYT;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,2BAA2B;YAChC,QAAQ,EAAE,QAAQ;YAClB,SAAS,EAAE,qBAAqB;YAChC,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,gDAAgD;aACtD;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,cAAc,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,KAAK,GAKN;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC;YACxC,KAAK,EAAE;gBACL,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,OAAO;gBAClB,OAAO,EAAE,KAAK;aACf;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;gBAC7D,GAAG,EAAE,6BAA6B;aACnC;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,aAAa,CAAC,EAC1B,MAAM,EACN,KAAK,EACL,IAAI,GAKL;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,kCAAkC;YACvC,KAAK,EAAE;gBACL,QAAQ,EAAE,MAAM;gBAChB,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI;aACb;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAvGD,gDAuGC"}
|
|
@@ -5,6 +5,11 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
5
5
|
export declare class PublicSpectralService {
|
|
6
6
|
/**
|
|
7
7
|
* Get the calling org's Spectral ruleset
|
|
8
|
+
* Returns the org's custom Spectral ruleset YAML, or an empty string when the org
|
|
9
|
+
* has not configured one. The CLI fetches this on every `spec0 lint` invocation so
|
|
10
|
+
* lint behaviour stays consistent between local dev and CI. Built-in rulesets are
|
|
11
|
+
* applied regardless of whether a custom ruleset is set.
|
|
12
|
+
*
|
|
8
13
|
* @returns SpectralRulesetResponseV1 Current ruleset
|
|
9
14
|
* @throws ApiError
|
|
10
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicSpectralService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicSpectralService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,qBAAqB;IAChC
|
|
1
|
+
{"version":3,"file":"PublicSpectralService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicSpectralService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,qBAAqB;IAChC;;;;;;;;;OASG;WACW,kBAAkB,IAAI,iBAAiB,CAAC,yBAAyB,CAAC;IAUhF;;;;;OAKG;WACW,kBAAkB,CAAC,EAC/B,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,2BAA2B,CAAC;KAC1C,GAAG,iBAAiB,CAAC,gBAAgB,CAAC;CAaxC"}
|
|
@@ -6,6 +6,11 @@ const request_js_1 = require("../core/request.js");
|
|
|
6
6
|
class PublicSpectralService {
|
|
7
7
|
/**
|
|
8
8
|
* Get the calling org's Spectral ruleset
|
|
9
|
+
* Returns the org's custom Spectral ruleset YAML, or an empty string when the org
|
|
10
|
+
* has not configured one. The CLI fetches this on every `spec0 lint` invocation so
|
|
11
|
+
* lint behaviour stays consistent between local dev and CI. Built-in rulesets are
|
|
12
|
+
* applied regardless of whether a custom ruleset is set.
|
|
13
|
+
*
|
|
9
14
|
* @returns SpectralRulesetResponseV1 Current ruleset
|
|
10
15
|
* @throws ApiError
|
|
11
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicSpectralService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicSpectralService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,qBAAqB;IAChC
|
|
1
|
+
{"version":3,"file":"PublicSpectralService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicSpectralService.ts"],"names":[],"mappings":";;;AAQA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,qBAAqB;IAChC;;;;;;;;;OASG;IACI,MAAM,CAAC,kBAAkB;QAC9B,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,iCAAiC;YACtC,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,kBAAkB,CAAC,EAC/B,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,iCAAiC;YACtC,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,qDAAqD;gBAC1D,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,sDA4CC"}
|
|
@@ -4,6 +4,11 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
|
4
4
|
export declare class PublicTeamsService {
|
|
5
5
|
/**
|
|
6
6
|
* List teams for the calling org
|
|
7
|
+
* Returns every team in the calling token's org with its id, name, and
|
|
8
|
+
* description. Use this to resolve a team slug or human-readable name to the UUID
|
|
9
|
+
* expected by other endpoints (e.g. `team` on team-API publish, or `teamId` on
|
|
10
|
+
* delete). Scope is org-internal — teams in other orgs are never returned.
|
|
11
|
+
*
|
|
7
12
|
* @returns TeamV1 Teams in the calling org
|
|
8
13
|
* @throws ApiError
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTeamsService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicTeamsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,kBAAkB;IAC7B
|
|
1
|
+
{"version":3,"file":"PublicTeamsService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicTeamsService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,qBAAa,kBAAkB;IAC7B;;;;;;;;;OASG;WACW,SAAS,IAAI,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAU3D;;;;;;;OAOG;WACW,UAAU,CAAC,EACvB,WAAW,GACZ,EAAE;QACD,WAAW,EAAE,mBAAmB,CAAC;KAClC,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAa7B;;;;;;;;OAQG;WACW,UAAU,CAAC,EACvB,MAAM,GACP,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,iBAAiB,CAAC,IAAI,CAAC;CAe5B"}
|
|
@@ -6,6 +6,11 @@ const request_js_1 = require("../core/request.js");
|
|
|
6
6
|
class PublicTeamsService {
|
|
7
7
|
/**
|
|
8
8
|
* List teams for the calling org
|
|
9
|
+
* Returns every team in the calling token's org with its id, name, and
|
|
10
|
+
* description. Use this to resolve a team slug or human-readable name to the UUID
|
|
11
|
+
* expected by other endpoints (e.g. `team` on team-API publish, or `teamId` on
|
|
12
|
+
* delete). Scope is org-internal — teams in other orgs are never returned.
|
|
13
|
+
*
|
|
9
14
|
* @returns TeamV1 Teams in the calling org
|
|
10
15
|
* @throws ApiError
|
|
11
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTeamsService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicTeamsService.ts"],"names":[],"mappings":";;;AAOA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,kBAAkB;IAC7B
|
|
1
|
+
{"version":3,"file":"PublicTeamsService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicTeamsService.ts"],"names":[],"mappings":";;;AAOA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,kBAAkB;IAC7B;;;;;;;;;OASG;IACI,MAAM,CAAC,SAAS;QACrB,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,sBAAsB;YAC3B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU,CAAC,EACvB,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,sBAAsB;YAC3B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,UAAU,CAAC,EACvB,MAAM,GAGP;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,+BAA+B;YACpC,IAAI,EAAE;gBACJ,QAAQ,EAAE,MAAM;aACjB;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;gBAC7D,GAAG,EAAE,uDAAuD;aAC7D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AA1ED,gDA0EC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spec0/sdk-public-platform",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "TypeScript SDK for Spec0's public API surface (https://app.spec0.io). Generated from the OpenAPI spec published at spec0/spec0-platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
import type { Visibility } from './Visibility.js';
|
|
6
6
|
/**
|
|
7
|
-
* Provide
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Provide `version` (explicit pin) and/or `semver` (auto-bump PATCH). When both
|
|
8
|
+
* are omitted, the server falls through to `info.version` from the spec, then
|
|
9
|
+
* the `0.1.0` default. `version` accepts arbitrary strings (semver, sha-prefixed
|
|
10
|
+
* tags, calendar tags, UUIDs) — see ADR-0026.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
export type PublicPublishRequestV1 = {
|
|
@@ -26,24 +26,30 @@ export type PublicPublishRequestV1 = {
|
|
|
26
26
|
description?: string;
|
|
27
27
|
visibility?: Visibility;
|
|
28
28
|
/**
|
|
29
|
-
* Explicit
|
|
30
|
-
*
|
|
29
|
+
* Explicit version tag for this publish. Accepts arbitrary strings — semver,
|
|
30
|
+
* sha-prefixed tags (e.g. "staging-abc1234"), calendar tags (e.g. "v2026-Q3"),
|
|
31
|
+
* UUIDs, etc. The registry stores what you pass; uniqueness is enforced per
|
|
32
|
+
* API. When set together with `semver`, `version` wins.
|
|
31
33
|
*
|
|
32
34
|
*/
|
|
33
35
|
version?: string;
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* versioning policy, breaking changes create a new API rather than
|
|
41
|
-
* bumping the major version. Mutually exclusive with `version`.
|
|
42
|
-
* Resolution and version-row insert are wrapped in a single
|
|
43
|
-
* transaction with a pessimistic lock on the api row, so concurrent
|
|
44
|
-
* publishes serialise cleanly.
|
|
37
|
+
* If true and the previous stored version is a valid semver, increment the
|
|
38
|
+
* PATCH component atomically (1.2.3 → 1.2.4). If the previous version is not
|
|
39
|
+
* a valid semver, or this is the first publish, falls through to the
|
|
40
|
+
* resolution order — `info.version` from the spec, then `0.1.0`. No spec
|
|
41
|
+
* parsing, no oasdiff classification — see ADR-0026.
|
|
45
42
|
*
|
|
46
43
|
*/
|
|
44
|
+
semver?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Deprecated. Pass `semver: true` instead. The server ignores this field
|
|
47
|
+
* since ADR-0026 unified version-bump semantics; it is kept in the schema
|
|
48
|
+
* so old clients sending `versionBump=PATCH|MINOR` continue to parse
|
|
49
|
+
* cleanly. New code should not set it.
|
|
50
|
+
*
|
|
51
|
+
* @deprecated
|
|
52
|
+
*/
|
|
47
53
|
versionBump?: 'MINOR' | 'PATCH';
|
|
48
54
|
/**
|
|
49
55
|
* Full OpenAPI spec content (YAML or JSON)
|
|
@@ -26,8 +26,11 @@ export type TeamPublishRequestV1 = {
|
|
|
26
26
|
*/
|
|
27
27
|
team?: string;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* Explicit version tag for this publish. Accepts arbitrary strings — semver
|
|
30
|
+
* ("1.2.3"), sha-prefixed tags ("staging-abc1234"), calendar tags
|
|
31
|
+
* ("v2026-Q3"), UUIDs, etc. If omitted and `semver` is not set, falls through
|
|
32
|
+
* to `info.version` from the spec, then the `0.1.0` default. When set
|
|
33
|
+
* together with `semver`, `version` wins. See ADR-0026.
|
|
31
34
|
*
|
|
32
35
|
*/
|
|
33
36
|
version?: string;
|
|
@@ -48,10 +51,22 @@ export type TeamPublishRequestV1 = {
|
|
|
48
51
|
*/
|
|
49
52
|
specFilePath?: string;
|
|
50
53
|
/**
|
|
51
|
-
* If true
|
|
52
|
-
*
|
|
54
|
+
* If true and the previous stored version is a valid semver, increment the
|
|
55
|
+
* PATCH component atomically (1.2.3 → 1.2.4). If the previous version is not
|
|
56
|
+
* a valid semver, or this is the first publish, falls through to the
|
|
57
|
+
* resolution order — `version` flag, then `info.version` from the spec, then
|
|
58
|
+
* `0.1.0`. No spec parsing, no oasdiff — see ADR-0026.
|
|
53
59
|
*
|
|
54
60
|
*/
|
|
55
61
|
semver?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Operator-supplied changelog prose for this version. When non-blank,
|
|
64
|
+
* becomes the version's `changelog_text` with `changelogSource = MANUAL`
|
|
65
|
+
* and the async AI listener skips generation. Powers the dashboard's
|
|
66
|
+
* Edit-API form (title + description combined) and the future
|
|
67
|
+
* `spec0 push --release-notes` flag.
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
releaseNotes?: string;
|
|
56
71
|
};
|
|
57
72
|
|
|
@@ -7,6 +7,7 @@ import type { PublicApiListItem } from '../models/PublicApiListItem.js';
|
|
|
7
7
|
import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1.js';
|
|
8
8
|
import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1.js';
|
|
9
9
|
import type { PublicPublishResponseV1 } from '../models/PublicPublishResponseV1.js';
|
|
10
|
+
import type { SpecVersionListItemV1 } from '../models/SpecVersionListItemV1.js';
|
|
10
11
|
import type { TeamPublishRequestV1 } from '../models/TeamPublishRequestV1.js';
|
|
11
12
|
import type { TeamPublishResponseV1 } from '../models/TeamPublishResponseV1.js';
|
|
12
13
|
import type { VisibilityUpdateRequestV1 } from '../models/VisibilityUpdateRequestV1.js';
|
|
@@ -143,8 +144,106 @@ export class PublicApisService {
|
|
|
143
144
|
},
|
|
144
145
|
});
|
|
145
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Fetch the latest spec body for a team-scoped private API
|
|
149
|
+
* Returns the OpenAPI document content (YAML or JSON, as published) for the latest
|
|
150
|
+
* version of a team-scoped private API. Mirrors the public-registry equivalent
|
|
151
|
+
* (`GET /api/v1/public/registry/{orgSlug}/{apiName}`) but resolves the API by its
|
|
152
|
+
* internal UUID so callers can target private APIs without a public org slug.
|
|
153
|
+
*
|
|
154
|
+
* Authorization stack:
|
|
155
|
+
* - scope: `read:specs`
|
|
156
|
+
* - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
|
|
157
|
+
* cross-team isolation collapse to 404 to avoid leaking existence).
|
|
158
|
+
*
|
|
159
|
+
* Backs `spec0 pull --team` (issue #149).
|
|
160
|
+
*
|
|
161
|
+
* @returns string OpenAPI spec content for the latest published version
|
|
162
|
+
* @throws ApiError
|
|
163
|
+
*/
|
|
164
|
+
public static getTeamApiSpec({
|
|
165
|
+
apiId,
|
|
166
|
+
}: {
|
|
167
|
+
apiId: string,
|
|
168
|
+
}): CancelablePromise<string> {
|
|
169
|
+
return __request(OpenAPI, {
|
|
170
|
+
method: 'GET',
|
|
171
|
+
url: '/api/v1/public/apis/team/{apiId}/spec',
|
|
172
|
+
path: {
|
|
173
|
+
'apiId': apiId,
|
|
174
|
+
},
|
|
175
|
+
errors: {
|
|
176
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
177
|
+
403: `Token does not carry the required scope`,
|
|
178
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* List published versions of a team-scoped private API
|
|
184
|
+
* Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions` for the
|
|
185
|
+
* team-scoped surface. Returns the version history ordered by `publishedAt` desc.
|
|
186
|
+
* Cross-org / cross-team callers see 404 (same ABAC v2 collapse used by the spec body
|
|
187
|
+
* endpoint).
|
|
188
|
+
*
|
|
189
|
+
* @returns SpecVersionListItemV1 Version history
|
|
190
|
+
* @throws ApiError
|
|
191
|
+
*/
|
|
192
|
+
public static listTeamApiVersions({
|
|
193
|
+
apiId,
|
|
194
|
+
}: {
|
|
195
|
+
apiId: string,
|
|
196
|
+
}): CancelablePromise<Array<SpecVersionListItemV1>> {
|
|
197
|
+
return __request(OpenAPI, {
|
|
198
|
+
method: 'GET',
|
|
199
|
+
url: '/api/v1/public/apis/team/{apiId}/versions',
|
|
200
|
+
path: {
|
|
201
|
+
'apiId': apiId,
|
|
202
|
+
},
|
|
203
|
+
errors: {
|
|
204
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
205
|
+
403: `Token does not carry the required scope`,
|
|
206
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Fetch a specific tagged version of a team-scoped private API
|
|
212
|
+
* Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions/{tag}` for the
|
|
213
|
+
* team-scoped surface. Returns the OpenAPI document content for the requested tag.
|
|
214
|
+
* Cross-org / cross-team callers see 404; unknown tag also 404.
|
|
215
|
+
*
|
|
216
|
+
* @returns string OpenAPI spec content for the requested version
|
|
217
|
+
* @throws ApiError
|
|
218
|
+
*/
|
|
219
|
+
public static getTeamApiSpecByTag({
|
|
220
|
+
apiId,
|
|
221
|
+
tag,
|
|
222
|
+
}: {
|
|
223
|
+
apiId: string,
|
|
224
|
+
tag: string,
|
|
225
|
+
}): CancelablePromise<string> {
|
|
226
|
+
return __request(OpenAPI, {
|
|
227
|
+
method: 'GET',
|
|
228
|
+
url: '/api/v1/public/apis/team/{apiId}/versions/{tag}',
|
|
229
|
+
path: {
|
|
230
|
+
'apiId': apiId,
|
|
231
|
+
'tag': tag,
|
|
232
|
+
},
|
|
233
|
+
errors: {
|
|
234
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
235
|
+
403: `Token does not carry the required scope`,
|
|
236
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
}
|
|
146
240
|
/**
|
|
147
241
|
* Update visibility for a public API
|
|
242
|
+
* Toggle a public API between `PRIVATE`, `UNLISTED`, and `PUBLISHED` without
|
|
243
|
+
* republishing its spec. Visibility controls whether the API and its versions are
|
|
244
|
+
* readable through the unauthenticated public registry; the spec content itself is
|
|
245
|
+
* untouched. Callable by any token in the owning org that holds `write:apis`.
|
|
246
|
+
*
|
|
148
247
|
* @returns PublicApiMetaV1 Updated visibility
|
|
149
248
|
* @throws ApiError
|
|
150
249
|
*/
|
|
@@ -11,6 +11,11 @@ import { request as __request } from '../core/request.js';
|
|
|
11
11
|
export class PublicMocksService {
|
|
12
12
|
/**
|
|
13
13
|
* List mock servers for the calling org
|
|
14
|
+
* Returns every mock server owned by the calling token's org, with the parent API
|
|
15
|
+
* id/name and the mock's base URL. Backs the `spec0 mock list` CLI command and is
|
|
16
|
+
* the discovery surface SDK consumers use before deciding whether to point a
|
|
17
|
+
* client at a mock vs. a real environment.
|
|
18
|
+
*
|
|
14
19
|
* @returns MockItemV1 Mock servers
|
|
15
20
|
* @throws ApiError
|
|
16
21
|
*/
|
|
@@ -11,6 +11,11 @@ import { request as __request } from '../core/request.js';
|
|
|
11
11
|
export class PublicRegistryService {
|
|
12
12
|
/**
|
|
13
13
|
* Fetch latest published spec
|
|
14
|
+
* Returns the raw OpenAPI document of the most recently published version of the
|
|
15
|
+
* API, addressed by its org slug and API name. This is the canonical entry point
|
|
16
|
+
* for SDK generators and the `spec0 pull` CLI command — it short-circuits the
|
|
17
|
+
* version-listing round-trip when the caller just wants "the current spec".
|
|
18
|
+
*
|
|
14
19
|
* @returns string OpenAPI spec content
|
|
15
20
|
* @throws ApiError
|
|
16
21
|
*/
|
|
@@ -37,6 +42,12 @@ export class PublicRegistryService {
|
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
44
|
* List version history
|
|
45
|
+
* Returns every published version of the API in reverse-chronological order,
|
|
46
|
+
* including the SemVer tag, git SHA recorded at publish, publish timestamp, and a
|
|
47
|
+
* flag indicating whether breaking changes were detected against the previous
|
|
48
|
+
* version. The spec content itself is not inlined — fetch individual versions with
|
|
49
|
+
* `GET /versions/{tag}`.
|
|
50
|
+
*
|
|
40
51
|
* @returns SpecVersionListItemV1 Version history
|
|
41
52
|
* @throws ApiError
|
|
42
53
|
*/
|
|
@@ -63,6 +74,11 @@ export class PublicRegistryService {
|
|
|
63
74
|
}
|
|
64
75
|
/**
|
|
65
76
|
* Fetch a specific spec version
|
|
77
|
+
* Returns the immutable OpenAPI document published under the given SemVer tag.
|
|
78
|
+
* Use this when a consumer needs to pin to a specific contract — e.g. CI
|
|
79
|
+
* regenerating SDKs from `1.2.3` even after `1.3.0` ships. Returns 404 if either
|
|
80
|
+
* the API or that specific tag does not exist.
|
|
81
|
+
*
|
|
66
82
|
* @returns string OpenAPI spec content for the requested version
|
|
67
83
|
* @throws ApiError
|
|
68
84
|
*/
|
|
@@ -92,6 +108,12 @@ export class PublicRegistryService {
|
|
|
92
108
|
}
|
|
93
109
|
/**
|
|
94
110
|
* Semantic search over the calling org's APIs
|
|
111
|
+
* Natural-language search across the calling org's API titles, descriptions, and
|
|
112
|
+
* operation summaries, backed by the RAG service. Results are ranked by semantic
|
|
113
|
+
* similarity to `query` and capped at `maxResults` (default 10). Scope is
|
|
114
|
+
* org-internal — the token's org is the only corpus searched; there is no
|
|
115
|
+
* cross-org discovery on this endpoint.
|
|
116
|
+
*
|
|
95
117
|
* @returns AiSearchResponseV1 Search results
|
|
96
118
|
* @throws ApiError
|
|
97
119
|
*/
|
|
@@ -43,6 +43,13 @@ export class PublicSpecsService {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Diff two published versions of an API
|
|
46
|
+
* Compares two already-published versions of the same API (addressed by `apiId` +
|
|
47
|
+
* `fromTag` + `toTag`) and returns the oasdiff-backed structured changelog plus a
|
|
48
|
+
* breaking-change list. Lighter-weight than the multipart `/specs/diff` endpoint
|
|
49
|
+
* because the caller doesn't have to upload either spec — the backend reads them
|
|
50
|
+
* from its own version history. Returns 503 if the oasdiff service is disabled in
|
|
51
|
+
* this deployment.
|
|
52
|
+
*
|
|
46
53
|
* @returns VersionDiffResponseV1 Diff result
|
|
47
54
|
* @throws ApiError
|
|
48
55
|
*/
|
|
@@ -11,6 +11,11 @@ import { request as __request } from '../core/request.js';
|
|
|
11
11
|
export class PublicSpectralService {
|
|
12
12
|
/**
|
|
13
13
|
* Get the calling org's Spectral ruleset
|
|
14
|
+
* Returns the org's custom Spectral ruleset YAML, or an empty string when the org
|
|
15
|
+
* has not configured one. The CLI fetches this on every `spec0 lint` invocation so
|
|
16
|
+
* lint behaviour stays consistent between local dev and CI. Built-in rulesets are
|
|
17
|
+
* applied regardless of whether a custom ruleset is set.
|
|
18
|
+
*
|
|
14
19
|
* @returns SpectralRulesetResponseV1 Current ruleset
|
|
15
20
|
* @throws ApiError
|
|
16
21
|
*/
|
|
@@ -10,6 +10,11 @@ import { request as __request } from '../core/request.js';
|
|
|
10
10
|
export class PublicTeamsService {
|
|
11
11
|
/**
|
|
12
12
|
* List teams for the calling org
|
|
13
|
+
* Returns every team in the calling token's org with its id, name, and
|
|
14
|
+
* description. Use this to resolve a team slug or human-readable name to the UUID
|
|
15
|
+
* expected by other endpoints (e.g. `team` on team-API publish, or `teamId` on
|
|
16
|
+
* delete). Scope is org-internal — teams in other orgs are never returned.
|
|
17
|
+
*
|
|
13
18
|
* @returns TeamV1 Teams in the calling org
|
|
14
19
|
* @throws ApiError
|
|
15
20
|
*/
|