@spec0/sdk-public-platform 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/core/ApiError.js +5 -1
- package/dist/generated/core/ApiError.js.map +1 -1
- package/dist/generated/core/ApiRequestOptions.js +2 -1
- package/dist/generated/core/ApiResult.js +2 -1
- package/dist/generated/core/CancelablePromise.js +7 -2
- package/dist/generated/core/CancelablePromise.js.map +1 -1
- package/dist/generated/core/OpenAPI.js +4 -1
- package/dist/generated/core/OpenAPI.js.map +1 -1
- package/dist/generated/core/request.js +65 -46
- package/dist/generated/core/request.js.map +1 -1
- package/dist/generated/index.d.ts +6 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +24 -8
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/AiSearchRequestV1.js +2 -1
- package/dist/generated/models/AiSearchResponseV1.js +2 -1
- package/dist/generated/models/ApiNamePath.js +2 -1
- package/dist/generated/models/AuthError.js +2 -1
- package/dist/generated/models/CiConfigResponseV1.d.ts +11 -0
- package/dist/generated/models/CiConfigResponseV1.d.ts.map +1 -0
- package/dist/generated/models/CiConfigResponseV1.js +3 -0
- package/dist/generated/models/CiConfigResponseV1.js.map +1 -0
- package/dist/generated/models/CreateMockRequestV1.js +2 -1
- package/dist/generated/models/CreateMockResponseV1.js +2 -1
- package/dist/generated/models/MockItemV1.js +2 -1
- package/dist/generated/models/OrgSlugPath.js +2 -1
- package/dist/generated/models/OrgSummaryResponseV1.d.ts +13 -0
- package/dist/generated/models/OrgSummaryResponseV1.d.ts.map +1 -0
- package/dist/generated/models/OrgSummaryResponseV1.js +3 -0
- package/dist/generated/models/OrgSummaryResponseV1.js.map +1 -0
- package/dist/generated/models/Problem.js +2 -1
- package/dist/generated/models/PublicApiIdPath.js +2 -1
- package/dist/generated/models/PublicApiListItem.js +2 -1
- package/dist/generated/models/PublicApiMetaV1.js +2 -1
- package/dist/generated/models/PublicPublishRequestV1.js +2 -1
- package/dist/generated/models/PublicPublishResponseV1.js +2 -1
- package/dist/generated/models/PutSpectralRulesetRequestV1.js +2 -1
- package/dist/generated/models/SpecDiffResponseV1.js +2 -1
- package/dist/generated/models/SpecVersionListItemV1.js +2 -1
- package/dist/generated/models/SpectralRulesetResponseV1.js +2 -1
- package/dist/generated/models/StatusResponseV1.js +2 -1
- package/dist/generated/models/SyncStatusResponseV1.js +2 -1
- package/dist/generated/models/TeamPublishRequestV1.d.ts +53 -0
- package/dist/generated/models/TeamPublishRequestV1.d.ts.map +1 -0
- package/dist/generated/models/TeamPublishRequestV1.js +3 -0
- package/dist/generated/models/TeamPublishRequestV1.js.map +1 -0
- package/dist/generated/models/TeamPublishResponseV1.d.ts +30 -0
- package/dist/generated/models/TeamPublishResponseV1.d.ts.map +1 -0
- package/dist/generated/models/TeamPublishResponseV1.js +3 -0
- package/dist/generated/models/TeamPublishResponseV1.js.map +1 -0
- package/dist/generated/models/VersionDiffResponseV1.js +2 -1
- package/dist/generated/models/Visibility.js +2 -1
- package/dist/generated/models/VisibilityUpdateRequestV1.js +2 -1
- package/dist/generated/services/PublicApisService.d.ts +19 -0
- package/dist/generated/services/PublicApisService.d.ts.map +1 -1
- package/dist/generated/services/PublicApisService.js +41 -7
- package/dist/generated/services/PublicApisService.js.map +1 -1
- package/dist/generated/services/PublicCiService.d.ts +21 -0
- package/dist/generated/services/PublicCiService.d.ts.map +1 -0
- package/dist/generated/services/PublicCiService.js +33 -0
- package/dist/generated/services/PublicCiService.js.map +1 -0
- package/dist/generated/services/PublicMocksService.js +9 -5
- package/dist/generated/services/PublicMocksService.js.map +1 -1
- package/dist/generated/services/PublicOrgsService.d.ts +14 -0
- package/dist/generated/services/PublicOrgsService.d.ts.map +1 -0
- package/dist/generated/services/PublicOrgsService.js +27 -0
- package/dist/generated/services/PublicOrgsService.js.map +1 -0
- package/dist/generated/services/PublicRegistryService.js +11 -7
- package/dist/generated/services/PublicRegistryService.js.map +1 -1
- package/dist/generated/services/PublicSpecsService.js +10 -6
- package/dist/generated/services/PublicSpecsService.js.map +1 -1
- package/dist/generated/services/PublicSpectralService.js +9 -5
- package/dist/generated/services/PublicSpectralService.js.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
- package/src/generated/index.ts +6 -0
- package/src/generated/models/CiConfigResponseV1.ts +15 -0
- package/src/generated/models/OrgSummaryResponseV1.ts +17 -0
- package/src/generated/models/TeamPublishRequestV1.ts +57 -0
- package/src/generated/models/TeamPublishResponseV1.ts +34 -0
- package/src/generated/services/PublicApisService.ts +36 -0
- package/src/generated/services/PublicCiService.ts +45 -0
- package/src/generated/services/PublicOrgsService.ts +28 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublicSpectralService = void 0;
|
|
4
|
+
const OpenAPI_1 = require("../core/OpenAPI");
|
|
5
|
+
const request_1 = require("../core/request");
|
|
6
|
+
class PublicSpectralService {
|
|
4
7
|
/**
|
|
5
8
|
* Get the calling org's Spectral ruleset
|
|
6
9
|
* @returns SpectralRulesetResponseV1 Current ruleset
|
|
7
10
|
* @throws ApiError
|
|
8
11
|
*/
|
|
9
12
|
static getSpectralRuleset() {
|
|
10
|
-
return
|
|
13
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
11
14
|
method: 'GET',
|
|
12
15
|
url: '/api/v1/public/spectral/ruleset',
|
|
13
16
|
errors: {
|
|
@@ -23,7 +26,7 @@ export class PublicSpectralService {
|
|
|
23
26
|
* @throws ApiError
|
|
24
27
|
*/
|
|
25
28
|
static putSpectralRuleset({ requestBody, }) {
|
|
26
|
-
return
|
|
29
|
+
return (0, request_1.request)(OpenAPI_1.OpenAPI, {
|
|
27
30
|
method: 'PUT',
|
|
28
31
|
url: '/api/v1/public/spectral/ruleset',
|
|
29
32
|
body: requestBody,
|
|
@@ -36,4 +39,5 @@ export class PublicSpectralService {
|
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
}
|
|
42
|
+
exports.PublicSpectralService = PublicSpectralService;
|
|
39
43
|
//# sourceMappingURL=PublicSpectralService.js.map
|
|
@@ -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,6CAA0C;AAC1C,6CAAuD;AACvD,MAAa,qBAAqB;IAChC;;;;OAIG;IACI,MAAM,CAAC,kBAAkB;QAC9B,OAAO,IAAA,iBAAS,EAAC,iBAAO,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,iBAAS,EAAC,iBAAO,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;AAvCD,sDAuCC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
17
|
// Generated entry — re-exports the openapi-typescript-codegen output.
|
|
2
|
-
|
|
18
|
+
__exportStar(require("./generated"), exports);
|
|
3
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,8CAA4B"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spec0/sdk-public-platform",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
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
|
-
"type": "module",
|
|
7
6
|
"main": "./dist/index.js",
|
|
8
|
-
"module": "./dist/index.js",
|
|
9
7
|
"types": "./dist/index.d.ts",
|
|
10
8
|
"exports": {
|
|
11
9
|
".": {
|
|
12
10
|
"types": "./dist/index.d.ts",
|
|
13
|
-
"
|
|
11
|
+
"default": "./dist/index.js"
|
|
14
12
|
}
|
|
15
13
|
},
|
|
16
14
|
"files": [
|
package/src/generated/index.ts
CHANGED
|
@@ -11,10 +11,12 @@ export type { AiSearchRequestV1 } from './models/AiSearchRequestV1';
|
|
|
11
11
|
export type { AiSearchResponseV1 } from './models/AiSearchResponseV1';
|
|
12
12
|
export type { ApiNamePath } from './models/ApiNamePath';
|
|
13
13
|
export type { AuthError } from './models/AuthError';
|
|
14
|
+
export type { CiConfigResponseV1 } from './models/CiConfigResponseV1';
|
|
14
15
|
export type { CreateMockRequestV1 } from './models/CreateMockRequestV1';
|
|
15
16
|
export type { CreateMockResponseV1 } from './models/CreateMockResponseV1';
|
|
16
17
|
export type { MockItemV1 } from './models/MockItemV1';
|
|
17
18
|
export type { OrgSlugPath } from './models/OrgSlugPath';
|
|
19
|
+
export type { OrgSummaryResponseV1 } from './models/OrgSummaryResponseV1';
|
|
18
20
|
export type { Problem } from './models/Problem';
|
|
19
21
|
export type { PublicApiIdPath } from './models/PublicApiIdPath';
|
|
20
22
|
export type { PublicApiListItem } from './models/PublicApiListItem';
|
|
@@ -27,12 +29,16 @@ export type { SpectralRulesetResponseV1 } from './models/SpectralRulesetResponse
|
|
|
27
29
|
export type { SpecVersionListItemV1 } from './models/SpecVersionListItemV1';
|
|
28
30
|
export type { StatusResponseV1 } from './models/StatusResponseV1';
|
|
29
31
|
export type { SyncStatusResponseV1 } from './models/SyncStatusResponseV1';
|
|
32
|
+
export type { TeamPublishRequestV1 } from './models/TeamPublishRequestV1';
|
|
33
|
+
export type { TeamPublishResponseV1 } from './models/TeamPublishResponseV1';
|
|
30
34
|
export type { VersionDiffResponseV1 } from './models/VersionDiffResponseV1';
|
|
31
35
|
export type { Visibility } from './models/Visibility';
|
|
32
36
|
export type { VisibilityUpdateRequestV1 } from './models/VisibilityUpdateRequestV1';
|
|
33
37
|
|
|
34
38
|
export { PublicApisService } from './services/PublicApisService';
|
|
39
|
+
export { PublicCiService } from './services/PublicCiService';
|
|
35
40
|
export { PublicMocksService } from './services/PublicMocksService';
|
|
41
|
+
export { PublicOrgsService } from './services/PublicOrgsService';
|
|
36
42
|
export { PublicRegistryService } from './services/PublicRegistryService';
|
|
37
43
|
export { PublicSpecsService } from './services/PublicSpecsService';
|
|
38
44
|
export { PublicSpectralService } from './services/PublicSpectralService';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type CiConfigResponseV1 = {
|
|
6
|
+
/**
|
|
7
|
+
* Ready-to-use GitHub Actions workflow YAML.
|
|
8
|
+
*/
|
|
9
|
+
workflowYaml?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Suggested file path for the workflow.
|
|
12
|
+
*/
|
|
13
|
+
filePath?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Org-level resource counts and current plan.
|
|
7
|
+
*/
|
|
8
|
+
export type OrgSummaryResponseV1 = {
|
|
9
|
+
apiCount?: number;
|
|
10
|
+
mockServerCount?: number;
|
|
11
|
+
teamCount?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Current plan id (e.g. `free`, `pro`).
|
|
14
|
+
*/
|
|
15
|
+
plan?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* Request body for publishing a team-scoped private API. Mirrors the shape of the
|
|
7
|
+
* legacy `CliPublishRequest` (operationId `publishCliSpec`) consumed by `spec0 push`.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export type TeamPublishRequestV1 = {
|
|
11
|
+
/**
|
|
12
|
+
* Existing API id. Optional — slug-based upsert by (org, `name`) is preferred.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
apiId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* API name (kebab-case). If omitted, derived from the basename of `specFilePath`
|
|
18
|
+
* (e.g. `api/payment-api.yaml` → `payment-api`).
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
name?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Team UUID OR slug. When omitted, the API is placed in the org's
|
|
24
|
+
* "Unassigned APIs" team.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
team?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Semver version to publish (MAJOR.MINOR.PATCH). If omitted, the version is
|
|
30
|
+
* extracted from `info.version` in the spec. Ignored when `semver` is true.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
version?: string;
|
|
34
|
+
/**
|
|
35
|
+
* OpenAPI document content (YAML or JSON).
|
|
36
|
+
*/
|
|
37
|
+
openapiSpec: string;
|
|
38
|
+
/**
|
|
39
|
+
* Git commit SHA of the spec file. Used as the primary change detector. If
|
|
40
|
+
* unchanged since last publish, the request is treated as a no-op.
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
gitSha?: string;
|
|
44
|
+
githubRepo?: string;
|
|
45
|
+
githubBranch?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Path to the spec file in the repository. Used to derive API name when `name` is omitted.
|
|
48
|
+
*/
|
|
49
|
+
specFilePath?: string;
|
|
50
|
+
/**
|
|
51
|
+
* If true, the backend runs oasdiff to classify the change and auto-computes
|
|
52
|
+
* the next semver tag (PATCH / NON_BREAKING / BREAKING).
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
semver?: boolean;
|
|
56
|
+
};
|
|
57
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
export type TeamPublishResponseV1 = {
|
|
6
|
+
apiId?: string;
|
|
7
|
+
specRecordId?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
/**
|
|
10
|
+
* True if a new API entity was created.
|
|
11
|
+
*/
|
|
12
|
+
created?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* True if a new version snapshot was created.
|
|
15
|
+
*/
|
|
16
|
+
versionCreated?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* True if the gitSha matched the last published SHA.
|
|
19
|
+
*/
|
|
20
|
+
noChanges?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* True when spec changed but `info.version` did not.
|
|
23
|
+
*/
|
|
24
|
+
versionUnchanged?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Human-readable hint shown when `versionUnchanged` is true.
|
|
27
|
+
*/
|
|
28
|
+
versionUnchangedHint?: string;
|
|
29
|
+
apiName?: string;
|
|
30
|
+
teamName?: string;
|
|
31
|
+
orgSlug?: string;
|
|
32
|
+
registryUrl?: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
@@ -6,6 +6,8 @@ import type { PublicApiListItem } from '../models/PublicApiListItem';
|
|
|
6
6
|
import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1';
|
|
7
7
|
import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1';
|
|
8
8
|
import type { PublicPublishResponseV1 } from '../models/PublicPublishResponseV1';
|
|
9
|
+
import type { TeamPublishRequestV1 } from '../models/TeamPublishRequestV1';
|
|
10
|
+
import type { TeamPublishResponseV1 } from '../models/TeamPublishResponseV1';
|
|
9
11
|
import type { VisibilityUpdateRequestV1 } from '../models/VisibilityUpdateRequestV1';
|
|
10
12
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
11
13
|
import { OpenAPI } from '../core/OpenAPI';
|
|
@@ -55,6 +57,40 @@ export class PublicApisService {
|
|
|
55
57
|
},
|
|
56
58
|
});
|
|
57
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Publish or update a team-scoped private API
|
|
62
|
+
* Publishes a design-time OpenAPI spec to a team-scoped private API. Distinct from
|
|
63
|
+
* `POST /api/v1/public/apis`, which writes to the org-level customer-facing public
|
|
64
|
+
* registry. This endpoint is what the `spec0 push` CLI command targets.
|
|
65
|
+
*
|
|
66
|
+
* - If `apiId` is provided: update that API's metadata/spec and publish a new version.
|
|
67
|
+
* - If `apiId` is omitted: upsert by (org, `name`); create a new API when none exists.
|
|
68
|
+
* - `team` accepts a UUID or slug; when omitted the API lands in the org's
|
|
69
|
+
* "Unassigned APIs" team.
|
|
70
|
+
*
|
|
71
|
+
* @returns TeamPublishResponseV1 Publish result
|
|
72
|
+
* @throws ApiError
|
|
73
|
+
*/
|
|
74
|
+
public static publishTeamApi({
|
|
75
|
+
requestBody,
|
|
76
|
+
}: {
|
|
77
|
+
requestBody: TeamPublishRequestV1,
|
|
78
|
+
}): CancelablePromise<TeamPublishResponseV1> {
|
|
79
|
+
return __request(OpenAPI, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
url: '/api/v1/public/apis/team',
|
|
82
|
+
body: requestBody,
|
|
83
|
+
mediaType: 'application/json',
|
|
84
|
+
errors: {
|
|
85
|
+
400: `Bad request`,
|
|
86
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
87
|
+
403: `Token does not carry the required scope`,
|
|
88
|
+
404: `Resource not found (or not visible to the calling org)`,
|
|
89
|
+
409: `Breaking change detected in same major version (when oasdiff is enabled and \`semver\` is not set)`,
|
|
90
|
+
422: `Validation error (bad semver or API name format)`,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
58
94
|
/**
|
|
59
95
|
* Update visibility for a public API
|
|
60
96
|
* @returns PublicApiMetaV1 Updated visibility
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
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';
|
|
9
|
+
export class PublicCiService {
|
|
10
|
+
/**
|
|
11
|
+
* Generate a GitHub Actions workflow for `spec0 publish`
|
|
12
|
+
* Returns a ready-to-use GitHub Actions workflow YAML that runs `spec0 publish`
|
|
13
|
+
* only when the specified spec file changes.
|
|
14
|
+
*
|
|
15
|
+
* @returns CiConfigResponseV1 CI config
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
public static generateCiConfig({
|
|
19
|
+
specFilePath,
|
|
20
|
+
apiName,
|
|
21
|
+
branch = 'main',
|
|
22
|
+
}: {
|
|
23
|
+
specFilePath: string,
|
|
24
|
+
/**
|
|
25
|
+
* API name to embed in the generated workflow. Falls back to spec filename basename if omitted.
|
|
26
|
+
*/
|
|
27
|
+
apiName?: string,
|
|
28
|
+
branch?: string,
|
|
29
|
+
}): CancelablePromise<CiConfigResponseV1> {
|
|
30
|
+
return __request(OpenAPI, {
|
|
31
|
+
method: 'GET',
|
|
32
|
+
url: '/api/v1/public/ci/config',
|
|
33
|
+
query: {
|
|
34
|
+
'specFilePath': specFilePath,
|
|
35
|
+
'apiName': apiName,
|
|
36
|
+
'branch': branch,
|
|
37
|
+
},
|
|
38
|
+
errors: {
|
|
39
|
+
400: `Bad request`,
|
|
40
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
41
|
+
403: `Token does not carry the required scope`,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
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';
|
|
9
|
+
export class PublicOrgsService {
|
|
10
|
+
/**
|
|
11
|
+
* Org-level resource counts and current plan
|
|
12
|
+
* Returns counts of APIs, mock servers, and teams in the calling token's org,
|
|
13
|
+
* plus the org's current plan. Useful for CLI status/dashboard views.
|
|
14
|
+
*
|
|
15
|
+
* @returns OrgSummaryResponseV1 Org summary
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
public static getOrgSummary(): CancelablePromise<OrgSummaryResponseV1> {
|
|
19
|
+
return __request(OpenAPI, {
|
|
20
|
+
method: 'GET',
|
|
21
|
+
url: '/api/v1/public/orgs/summary',
|
|
22
|
+
errors: {
|
|
23
|
+
401: `Missing, invalid, expired, or revoked token`,
|
|
24
|
+
403: `Token does not carry the required scope`,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|