@spec0/sdk-public-platform 1.2.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/core/ApiError.d.ts +2 -2
- package/dist/generated/core/ApiError.d.ts.map +1 -1
- package/dist/generated/core/OpenAPI.d.ts +1 -1
- package/dist/generated/core/OpenAPI.d.ts.map +1 -1
- package/dist/generated/core/request.d.ts +5 -5
- package/dist/generated/core/request.d.ts.map +1 -1
- package/dist/generated/core/request.js +5 -5
- package/dist/generated/core/request.js.map +1 -1
- package/dist/generated/index.d.ts +42 -42
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +23 -23
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/PublicApiListItem.d.ts +1 -1
- package/dist/generated/models/PublicApiListItem.d.ts.map +1 -1
- package/dist/generated/models/PublicApiMetaV1.d.ts +1 -1
- package/dist/generated/models/PublicApiMetaV1.d.ts.map +1 -1
- package/dist/generated/models/PublicPublishRequestV1.d.ts +23 -17
- 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/models/VisibilityUpdateRequestV1.d.ts +1 -1
- package/dist/generated/models/VisibilityUpdateRequestV1.d.ts.map +1 -1
- package/dist/generated/services/PublicApisService.d.ts +61 -9
- package/dist/generated/services/PublicApisService.d.ts.map +1 -1
- package/dist/generated/services/PublicApisService.js +93 -9
- package/dist/generated/services/PublicApisService.js.map +1 -1
- package/dist/generated/services/PublicCiService.d.ts +2 -2
- package/dist/generated/services/PublicCiService.d.ts.map +1 -1
- package/dist/generated/services/PublicCiService.js +3 -3
- package/dist/generated/services/PublicCiService.js.map +1 -1
- package/dist/generated/services/PublicMocksService.d.ts +9 -4
- package/dist/generated/services/PublicMocksService.d.ts.map +1 -1
- package/dist/generated/services/PublicMocksService.js +10 -5
- package/dist/generated/services/PublicMocksService.js.map +1 -1
- package/dist/generated/services/PublicOrgsService.d.ts +2 -2
- package/dist/generated/services/PublicOrgsService.d.ts.map +1 -1
- package/dist/generated/services/PublicOrgsService.js +3 -3
- package/dist/generated/services/PublicOrgsService.js.map +1 -1
- package/dist/generated/services/PublicRegistryService.d.ts +26 -4
- package/dist/generated/services/PublicRegistryService.d.ts.map +1 -1
- package/dist/generated/services/PublicRegistryService.js +28 -6
- package/dist/generated/services/PublicRegistryService.js.map +1 -1
- package/dist/generated/services/PublicSpecsService.d.ts +11 -4
- package/dist/generated/services/PublicSpecsService.d.ts.map +1 -1
- package/dist/generated/services/PublicSpecsService.js +12 -5
- package/dist/generated/services/PublicSpecsService.js.map +1 -1
- package/dist/generated/services/PublicSpectralService.d.ts +9 -4
- package/dist/generated/services/PublicSpectralService.d.ts.map +1 -1
- package/dist/generated/services/PublicSpectralService.js +9 -4
- package/dist/generated/services/PublicSpectralService.js.map +1 -1
- package/dist/generated/services/PublicTeamsService.d.ts +8 -3
- package/dist/generated/services/PublicTeamsService.d.ts.map +1 -1
- package/dist/generated/services/PublicTeamsService.js +10 -5
- package/dist/generated/services/PublicTeamsService.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/src/generated/core/ApiError.ts +2 -2
- package/src/generated/core/OpenAPI.ts +1 -1
- package/src/generated/core/request.ts +6 -6
- package/src/generated/index.ts +42 -42
- package/src/generated/models/PublicApiListItem.ts +1 -1
- package/src/generated/models/PublicApiMetaV1.ts +1 -1
- package/src/generated/models/PublicPublishRequestV1.ts +23 -17
- package/src/generated/models/TeamPublishRequestV1.ts +19 -4
- package/src/generated/models/VisibilityUpdateRequestV1.ts +1 -1
- package/src/generated/services/PublicApisService.ts +110 -11
- package/src/generated/services/PublicCiService.ts +4 -4
- package/src/generated/services/PublicMocksService.ts +11 -6
- package/src/generated/services/PublicOrgsService.ts +4 -4
- package/src/generated/services/PublicRegistryService.ts +28 -6
- package/src/generated/services/PublicSpecsService.ts +13 -6
- package/src/generated/services/PublicSpectralService.ts +11 -6
- package/src/generated/services/PublicTeamsService.ts +10 -5
- package/src/index.ts +1 -1
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PublicSpectralService = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const OpenAPI_js_1 = require("../core/OpenAPI.js");
|
|
5
|
+
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
|
*/
|
|
12
17
|
static getSpectralRuleset() {
|
|
13
|
-
return (0,
|
|
18
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
14
19
|
method: 'GET',
|
|
15
20
|
url: '/api/v1/public/spectral/ruleset',
|
|
16
21
|
errors: {
|
|
@@ -26,7 +31,7 @@ class PublicSpectralService {
|
|
|
26
31
|
* @throws ApiError
|
|
27
32
|
*/
|
|
28
33
|
static putSpectralRuleset({ requestBody, }) {
|
|
29
|
-
return (0,
|
|
34
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
30
35
|
method: 'PUT',
|
|
31
36
|
url: '/api/v1/public/spectral/ruleset',
|
|
32
37
|
body: requestBody,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicSpectralService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicSpectralService.ts"],"names":[],"mappings":";;;AAQA,
|
|
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"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import type { TeamCreateRequestV1 } from '../models/TeamCreateRequestV1';
|
|
2
|
-
import type { TeamV1 } from '../models/TeamV1';
|
|
3
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
1
|
+
import type { TeamCreateRequestV1 } from '../models/TeamCreateRequestV1.js';
|
|
2
|
+
import type { TeamV1 } from '../models/TeamV1.js';
|
|
3
|
+
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
|
|
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"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PublicTeamsService = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const OpenAPI_js_1 = require("../core/OpenAPI.js");
|
|
5
|
+
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
|
*/
|
|
12
17
|
static listTeams() {
|
|
13
|
-
return (0,
|
|
18
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
14
19
|
method: 'GET',
|
|
15
20
|
url: '/api/v1/public/teams',
|
|
16
21
|
errors: {
|
|
@@ -28,7 +33,7 @@ class PublicTeamsService {
|
|
|
28
33
|
* @throws ApiError
|
|
29
34
|
*/
|
|
30
35
|
static createTeam({ requestBody, }) {
|
|
31
|
-
return (0,
|
|
36
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
32
37
|
method: 'POST',
|
|
33
38
|
url: '/api/v1/public/teams',
|
|
34
39
|
body: requestBody,
|
|
@@ -50,7 +55,7 @@ class PublicTeamsService {
|
|
|
50
55
|
* @throws ApiError
|
|
51
56
|
*/
|
|
52
57
|
static deleteTeam({ teamId, }) {
|
|
53
|
-
return (0,
|
|
58
|
+
return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
|
|
54
59
|
method: 'DELETE',
|
|
55
60
|
url: '/api/v1/public/teams/{teamId}',
|
|
56
61
|
path: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTeamsService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicTeamsService.ts"],"names":[],"mappings":";;;AAOA,
|
|
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/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./generated";
|
|
1
|
+
export * from "./generated/index.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// Generated entry — re-exports the openapi-typescript-codegen output.
|
|
18
|
-
__exportStar(require("./generated"), exports);
|
|
18
|
+
__exportStar(require("./generated/index.js"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAsE;AACtE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAsE;AACtE,uDAAqC"}
|
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",
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
"build": "tsc -p tsconfig.json",
|
|
31
31
|
"clean": "rm -rf dist src/generated",
|
|
32
32
|
"prepack": "npm run clean && npm run generate && npm run build",
|
|
33
|
+
"smoke": "node scripts/smoke.mjs",
|
|
34
|
+
"prepublishOnly": "npm run smoke",
|
|
33
35
|
"verify": "npm run generate && npm run build"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
6
|
-
import type { ApiResult } from './ApiResult';
|
|
5
|
+
import type { ApiRequestOptions } from './ApiRequestOptions.js';
|
|
6
|
+
import type { ApiResult } from './ApiResult.js';
|
|
7
7
|
|
|
8
8
|
export class ApiError extends Error {
|
|
9
9
|
public readonly url: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
5
|
+
import type { ApiRequestOptions } from './ApiRequestOptions.js';
|
|
6
6
|
|
|
7
7
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
8
8
|
type Headers = Record<string, string>;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import { ApiError } from './ApiError';
|
|
6
|
-
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
7
|
-
import type { ApiResult } from './ApiResult';
|
|
8
|
-
import { CancelablePromise } from './CancelablePromise';
|
|
9
|
-
import type { OnCancel } from './CancelablePromise';
|
|
10
|
-
import type { OpenAPIConfig } from './OpenAPI';
|
|
5
|
+
import { ApiError } from './ApiError.js';
|
|
6
|
+
import type { ApiRequestOptions } from './ApiRequestOptions.js';
|
|
7
|
+
import type { ApiResult } from './ApiResult.js';
|
|
8
|
+
import { CancelablePromise } from './CancelablePromise.js';
|
|
9
|
+
import type { OnCancel } from './CancelablePromise.js';
|
|
10
|
+
import type { OpenAPIConfig } from './OpenAPI.js';
|
|
11
11
|
|
|
12
12
|
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
|
13
13
|
return value !== undefined && value !== null;
|
package/src/generated/index.ts
CHANGED
|
@@ -2,47 +2,47 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
export { ApiError } from './core/ApiError';
|
|
6
|
-
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
7
|
-
export { OpenAPI } from './core/OpenAPI';
|
|
8
|
-
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
5
|
+
export { ApiError } from './core/ApiError.js';
|
|
6
|
+
export { CancelablePromise, CancelError } from './core/CancelablePromise.js';
|
|
7
|
+
export { OpenAPI } from './core/OpenAPI.js';
|
|
8
|
+
export type { OpenAPIConfig } from './core/OpenAPI.js';
|
|
9
9
|
|
|
10
|
-
export type { AiSearchRequestV1 } from './models/AiSearchRequestV1';
|
|
11
|
-
export type { AiSearchResponseV1 } from './models/AiSearchResponseV1';
|
|
12
|
-
export type { ApiNamePath } from './models/ApiNamePath';
|
|
13
|
-
export type { ApiTeamListItemV1 } from './models/ApiTeamListItemV1';
|
|
14
|
-
export type { AuthError } from './models/AuthError';
|
|
15
|
-
export type { CiConfigResponseV1 } from './models/CiConfigResponseV1';
|
|
16
|
-
export type { CreateMockRequestV1 } from './models/CreateMockRequestV1';
|
|
17
|
-
export type { CreateMockResponseV1 } from './models/CreateMockResponseV1';
|
|
18
|
-
export type { MockItemV1 } from './models/MockItemV1';
|
|
19
|
-
export type { OrgSlugPath } from './models/OrgSlugPath';
|
|
20
|
-
export type { OrgSummaryResponseV1 } from './models/OrgSummaryResponseV1';
|
|
21
|
-
export type { Problem } from './models/Problem';
|
|
22
|
-
export type { PublicApiIdPath } from './models/PublicApiIdPath';
|
|
23
|
-
export type { PublicApiListItem } from './models/PublicApiListItem';
|
|
24
|
-
export type { PublicApiMetaV1 } from './models/PublicApiMetaV1';
|
|
25
|
-
export type { PublicPublishRequestV1 } from './models/PublicPublishRequestV1';
|
|
26
|
-
export type { PublicPublishResponseV1 } from './models/PublicPublishResponseV1';
|
|
27
|
-
export type { PutSpectralRulesetRequestV1 } from './models/PutSpectralRulesetRequestV1';
|
|
28
|
-
export type { SpecDiffResponseV1 } from './models/SpecDiffResponseV1';
|
|
29
|
-
export type { SpectralRulesetResponseV1 } from './models/SpectralRulesetResponseV1';
|
|
30
|
-
export type { SpecVersionListItemV1 } from './models/SpecVersionListItemV1';
|
|
31
|
-
export type { StatusResponseV1 } from './models/StatusResponseV1';
|
|
32
|
-
export type { SyncStatusResponseV1 } from './models/SyncStatusResponseV1';
|
|
33
|
-
export type { TeamCreateRequestV1 } from './models/TeamCreateRequestV1';
|
|
34
|
-
export type { TeamPublishRequestV1 } from './models/TeamPublishRequestV1';
|
|
35
|
-
export type { TeamPublishResponseV1 } from './models/TeamPublishResponseV1';
|
|
36
|
-
export type { TeamV1 } from './models/TeamV1';
|
|
37
|
-
export type { VersionDiffResponseV1 } from './models/VersionDiffResponseV1';
|
|
38
|
-
export type { Visibility } from './models/Visibility';
|
|
39
|
-
export type { VisibilityUpdateRequestV1 } from './models/VisibilityUpdateRequestV1';
|
|
10
|
+
export type { AiSearchRequestV1 } from './models/AiSearchRequestV1.js';
|
|
11
|
+
export type { AiSearchResponseV1 } from './models/AiSearchResponseV1.js';
|
|
12
|
+
export type { ApiNamePath } from './models/ApiNamePath.js';
|
|
13
|
+
export type { ApiTeamListItemV1 } from './models/ApiTeamListItemV1.js';
|
|
14
|
+
export type { AuthError } from './models/AuthError.js';
|
|
15
|
+
export type { CiConfigResponseV1 } from './models/CiConfigResponseV1.js';
|
|
16
|
+
export type { CreateMockRequestV1 } from './models/CreateMockRequestV1.js';
|
|
17
|
+
export type { CreateMockResponseV1 } from './models/CreateMockResponseV1.js';
|
|
18
|
+
export type { MockItemV1 } from './models/MockItemV1.js';
|
|
19
|
+
export type { OrgSlugPath } from './models/OrgSlugPath.js';
|
|
20
|
+
export type { OrgSummaryResponseV1 } from './models/OrgSummaryResponseV1.js';
|
|
21
|
+
export type { Problem } from './models/Problem.js';
|
|
22
|
+
export type { PublicApiIdPath } from './models/PublicApiIdPath.js';
|
|
23
|
+
export type { PublicApiListItem } from './models/PublicApiListItem.js';
|
|
24
|
+
export type { PublicApiMetaV1 } from './models/PublicApiMetaV1.js';
|
|
25
|
+
export type { PublicPublishRequestV1 } from './models/PublicPublishRequestV1.js';
|
|
26
|
+
export type { PublicPublishResponseV1 } from './models/PublicPublishResponseV1.js';
|
|
27
|
+
export type { PutSpectralRulesetRequestV1 } from './models/PutSpectralRulesetRequestV1.js';
|
|
28
|
+
export type { SpecDiffResponseV1 } from './models/SpecDiffResponseV1.js';
|
|
29
|
+
export type { SpectralRulesetResponseV1 } from './models/SpectralRulesetResponseV1.js';
|
|
30
|
+
export type { SpecVersionListItemV1 } from './models/SpecVersionListItemV1.js';
|
|
31
|
+
export type { StatusResponseV1 } from './models/StatusResponseV1.js';
|
|
32
|
+
export type { SyncStatusResponseV1 } from './models/SyncStatusResponseV1.js';
|
|
33
|
+
export type { TeamCreateRequestV1 } from './models/TeamCreateRequestV1.js';
|
|
34
|
+
export type { TeamPublishRequestV1 } from './models/TeamPublishRequestV1.js';
|
|
35
|
+
export type { TeamPublishResponseV1 } from './models/TeamPublishResponseV1.js';
|
|
36
|
+
export type { TeamV1 } from './models/TeamV1.js';
|
|
37
|
+
export type { VersionDiffResponseV1 } from './models/VersionDiffResponseV1.js';
|
|
38
|
+
export type { Visibility } from './models/Visibility.js';
|
|
39
|
+
export type { VisibilityUpdateRequestV1 } from './models/VisibilityUpdateRequestV1.js';
|
|
40
40
|
|
|
41
|
-
export { PublicApisService } from './services/PublicApisService';
|
|
42
|
-
export { PublicCiService } from './services/PublicCiService';
|
|
43
|
-
export { PublicMocksService } from './services/PublicMocksService';
|
|
44
|
-
export { PublicOrgsService } from './services/PublicOrgsService';
|
|
45
|
-
export { PublicRegistryService } from './services/PublicRegistryService';
|
|
46
|
-
export { PublicSpecsService } from './services/PublicSpecsService';
|
|
47
|
-
export { PublicSpectralService } from './services/PublicSpectralService';
|
|
48
|
-
export { PublicTeamsService } from './services/PublicTeamsService';
|
|
41
|
+
export { PublicApisService } from './services/PublicApisService.js';
|
|
42
|
+
export { PublicCiService } from './services/PublicCiService.js';
|
|
43
|
+
export { PublicMocksService } from './services/PublicMocksService.js';
|
|
44
|
+
export { PublicOrgsService } from './services/PublicOrgsService.js';
|
|
45
|
+
export { PublicRegistryService } from './services/PublicRegistryService.js';
|
|
46
|
+
export { PublicSpecsService } from './services/PublicSpecsService.js';
|
|
47
|
+
export { PublicSpectralService } from './services/PublicSpectralService.js';
|
|
48
|
+
export { PublicTeamsService } from './services/PublicTeamsService.js';
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { Visibility } from './Visibility';
|
|
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
|
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { ApiTeamListItemV1 } from '../models/ApiTeamListItemV1';
|
|
6
|
-
import type { PublicApiListItem } from '../models/PublicApiListItem';
|
|
7
|
-
import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1';
|
|
8
|
-
import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1';
|
|
9
|
-
import type { PublicPublishResponseV1 } from '../models/PublicPublishResponseV1';
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
5
|
+
import type { ApiTeamListItemV1 } from '../models/ApiTeamListItemV1.js';
|
|
6
|
+
import type { PublicApiListItem } from '../models/PublicApiListItem.js';
|
|
7
|
+
import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1.js';
|
|
8
|
+
import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1.js';
|
|
9
|
+
import type { PublicPublishResponseV1 } from '../models/PublicPublishResponseV1.js';
|
|
10
|
+
import type { SpecVersionListItemV1 } from '../models/SpecVersionListItemV1.js';
|
|
11
|
+
import type { TeamPublishRequestV1 } from '../models/TeamPublishRequestV1.js';
|
|
12
|
+
import type { TeamPublishResponseV1 } from '../models/TeamPublishResponseV1.js';
|
|
13
|
+
import type { VisibilityUpdateRequestV1 } from '../models/VisibilityUpdateRequestV1.js';
|
|
14
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
15
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
16
|
+
import { request as __request } from '../core/request.js';
|
|
16
17
|
export class PublicApisService {
|
|
17
18
|
/**
|
|
18
19
|
* List public APIs for the calling org
|
|
@@ -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
|
*/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { CiConfigResponseV1 } from '../models/CiConfigResponseV1';
|
|
6
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
7
|
-
import { OpenAPI } from '../core/OpenAPI';
|
|
8
|
-
import { request as __request } from '../core/request';
|
|
5
|
+
import type { CiConfigResponseV1 } from '../models/CiConfigResponseV1.js';
|
|
6
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
7
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
8
|
+
import { request as __request } from '../core/request.js';
|
|
9
9
|
export class PublicCiService {
|
|
10
10
|
/**
|
|
11
11
|
* Generate a GitHub Actions workflow for `spec0 publish`
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { CreateMockRequestV1 } from '../models/CreateMockRequestV1';
|
|
6
|
-
import type { CreateMockResponseV1 } from '../models/CreateMockResponseV1';
|
|
7
|
-
import type { MockItemV1 } from '../models/MockItemV1';
|
|
8
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
9
|
-
import { OpenAPI } from '../core/OpenAPI';
|
|
10
|
-
import { request as __request } from '../core/request';
|
|
5
|
+
import type { CreateMockRequestV1 } from '../models/CreateMockRequestV1.js';
|
|
6
|
+
import type { CreateMockResponseV1 } from '../models/CreateMockResponseV1.js';
|
|
7
|
+
import type { MockItemV1 } from '../models/MockItemV1.js';
|
|
8
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
9
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
10
|
+
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
|
*/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
-
import type { OrgSummaryResponseV1 } from '../models/OrgSummaryResponseV1';
|
|
6
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
7
|
-
import { OpenAPI } from '../core/OpenAPI';
|
|
8
|
-
import { request as __request } from '../core/request';
|
|
5
|
+
import type { OrgSummaryResponseV1 } from '../models/OrgSummaryResponseV1.js';
|
|
6
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
7
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
8
|
+
import { request as __request } from '../core/request.js';
|
|
9
9
|
export class PublicOrgsService {
|
|
10
10
|
/**
|
|
11
11
|
* Org-level resource counts and current plan
|