@spec0/sdk-public-platform 1.9.0 → 1.11.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.
Files changed (33) hide show
  1. package/dist/generated/index.d.ts +3 -0
  2. package/dist/generated/index.d.ts.map +1 -1
  3. package/dist/generated/index.js.map +1 -1
  4. package/dist/generated/models/ApiConsumerCountV1.d.ts +19 -0
  5. package/dist/generated/models/ApiConsumerCountV1.d.ts.map +1 -0
  6. package/dist/generated/models/ApiConsumerCountV1.js +3 -0
  7. package/dist/generated/models/ApiConsumerCountV1.js.map +1 -0
  8. package/dist/generated/models/EnvTargetV1.d.ts +34 -0
  9. package/dist/generated/models/EnvTargetV1.d.ts.map +1 -0
  10. package/dist/generated/models/EnvTargetV1.js +3 -0
  11. package/dist/generated/models/EnvTargetV1.js.map +1 -0
  12. package/dist/generated/models/MockItemV1.d.ts +8 -0
  13. package/dist/generated/models/MockItemV1.d.ts.map +1 -1
  14. package/dist/generated/models/RefreshMockResponseV1.d.ts +26 -0
  15. package/dist/generated/models/RefreshMockResponseV1.d.ts.map +1 -0
  16. package/dist/generated/models/RefreshMockResponseV1.js +3 -0
  17. package/dist/generated/models/RefreshMockResponseV1.js.map +1 -0
  18. package/dist/generated/services/PublicApisService.d.ts +61 -0
  19. package/dist/generated/services/PublicApisService.d.ts.map +1 -1
  20. package/dist/generated/services/PublicApisService.js +81 -0
  21. package/dist/generated/services/PublicApisService.js.map +1 -1
  22. package/dist/generated/services/PublicMocksService.d.ts +24 -0
  23. package/dist/generated/services/PublicMocksService.d.ts.map +1 -1
  24. package/dist/generated/services/PublicMocksService.js +34 -0
  25. package/dist/generated/services/PublicMocksService.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/generated/index.ts +3 -0
  28. package/src/generated/models/ApiConsumerCountV1.ts +23 -0
  29. package/src/generated/models/EnvTargetV1.ts +38 -0
  30. package/src/generated/models/MockItemV1.ts +8 -0
  31. package/src/generated/models/RefreshMockResponseV1.ts +30 -0
  32. package/src/generated/services/PublicApisService.ts +91 -0
  33. package/src/generated/services/PublicMocksService.ts +39 -0
@@ -4,12 +4,14 @@ export { OpenAPI } from './core/OpenAPI.js';
4
4
  export type { OpenAPIConfig } from './core/OpenAPI.js';
5
5
  export type { AiSearchRequestV1 } from './models/AiSearchRequestV1.js';
6
6
  export type { AiSearchResponseV1 } from './models/AiSearchResponseV1.js';
7
+ export type { ApiConsumerCountV1 } from './models/ApiConsumerCountV1.js';
7
8
  export type { ApiNamePath } from './models/ApiNamePath.js';
8
9
  export type { ApiTeamListItemV1 } from './models/ApiTeamListItemV1.js';
9
10
  export type { AuthError } from './models/AuthError.js';
10
11
  export type { CiConfigResponseV1 } from './models/CiConfigResponseV1.js';
11
12
  export type { CreateMockRequestV1 } from './models/CreateMockRequestV1.js';
12
13
  export type { CreateMockResponseV1 } from './models/CreateMockResponseV1.js';
14
+ export type { EnvTargetV1 } from './models/EnvTargetV1.js';
13
15
  export type { GovernanceWarningV1 } from './models/GovernanceWarningV1.js';
14
16
  export type { MockItemV1 } from './models/MockItemV1.js';
15
17
  export type { OrgSlugPath } from './models/OrgSlugPath.js';
@@ -21,6 +23,7 @@ export type { PublicApiMetaV1 } from './models/PublicApiMetaV1.js';
21
23
  export type { PublicPublishRequestV1 } from './models/PublicPublishRequestV1.js';
22
24
  export type { PublicPublishResponseV1 } from './models/PublicPublishResponseV1.js';
23
25
  export type { PutSpectralRulesetRequestV1 } from './models/PutSpectralRulesetRequestV1.js';
26
+ export type { RefreshMockResponseV1 } from './models/RefreshMockResponseV1.js';
24
27
  export type { SpecDiffResponseV1 } from './models/SpecDiffResponseV1.js';
25
28
  export type { SpectralRulesetResponseV1 } from './models/SpectralRulesetResponseV1.js';
26
29
  export type { SpecVersionListItemV1 } from './models/SpecVersionListItemV1.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAA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A8C;AAArC,uGAAA,QAAQ,OAAA;AACjB,oEAA6E;AAApE,yHAAA,iBAAiB,OAAA;AAAE,mHAAA,WAAW,OAAA;AACvC,gDAA4C;AAAnC,qGAAA,OAAO,OAAA;AAmChB,wEAAoE;AAA3D,yHAAA,iBAAiB,OAAA;AAC1B,oEAAgE;AAAvD,qHAAA,eAAe,OAAA;AACxB,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA;AAC3B,wEAAoE;AAA3D,yHAAA,iBAAiB,OAAA;AAC1B,gFAA4E;AAAnE,iIAAA,qBAAqB,OAAA;AAC9B,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA;AAC3B,gFAA4E;AAAnE,iIAAA,qBAAqB,OAAA;AAC9B,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";;;AAAA,+DAA+D;AAC/D,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,kDAA8C;AAArC,uGAAA,QAAQ,OAAA;AACjB,oEAA6E;AAApE,yHAAA,iBAAiB,OAAA;AAAE,mHAAA,WAAW,OAAA;AACvC,gDAA4C;AAAnC,qGAAA,OAAO,OAAA;AAsChB,wEAAoE;AAA3D,yHAAA,iBAAiB,OAAA;AAC1B,oEAAgE;AAAvD,qHAAA,eAAe,OAAA;AACxB,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA;AAC3B,wEAAoE;AAA3D,yHAAA,iBAAiB,OAAA;AAC1B,gFAA4E;AAAnE,iIAAA,qBAAqB,OAAA;AAC9B,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA;AAC3B,gFAA4E;AAAnE,iIAAA,qBAAqB,OAAA;AAC9B,0EAAsE;AAA7D,2HAAA,kBAAkB,OAAA"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * How many consumers depend on an API. Counts only — never names. Who consumes an
3
+ * API is org-governance information that belongs to the dashboard's consumers view,
4
+ * with the permissions and approval flow that go with it.
5
+ *
6
+ */
7
+ export type ApiConsumerCountV1 = {
8
+ /**
9
+ * Every grant on this API, whatever its status. A pending grant is a real
10
+ * consumer awaiting a decision, so it counts here rather than being hidden.
11
+ *
12
+ */
13
+ total: number;
14
+ /**
15
+ * Grants in `APPROVED` — consumers that can actually call the API today.
16
+ */
17
+ approved: number;
18
+ };
19
+ //# sourceMappingURL=ApiConsumerCountV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiConsumerCountV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/ApiConsumerCountV1.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ApiConsumerCountV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiConsumerCountV1.js","sourceRoot":"","sources":["../../../src/generated/models/ApiConsumerCountV1.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * One environment an API is deployed to: a destination and what's live there.
3
+ * Carries no variables, credentials or custom metadata.
4
+ *
5
+ */
6
+ export type EnvTargetV1 = {
7
+ /**
8
+ * The environment's name, as the organisation defined it — unique within the
9
+ * org, and the whole of its meaning. There is deliberately no kind or
10
+ * classification alongside it: that would be a second source of truth for the
11
+ * same fact, free to disagree with the name the org actually typed.
12
+ *
13
+ */
14
+ name?: string;
15
+ /**
16
+ * Absolute and already resolved. Where an environment's URL is derived from the
17
+ * spec's `servers` block, templated variables are expanded before storage, so a
18
+ * client never has to resolve a template itself.
19
+ *
20
+ */
21
+ url?: string;
22
+ /**
23
+ * The spec version live in this environment, or null if nothing has been
24
+ * published to or promoted into it. A client holding a different version can
25
+ * say so, instead of reporting the difference as contract drift.
26
+ *
27
+ */
28
+ currentVersion?: string | null;
29
+ /**
30
+ * When this environment's configuration for the API last changed.
31
+ */
32
+ updatedAt?: string | null;
33
+ };
34
+ //# sourceMappingURL=EnvTargetV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnvTargetV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/EnvTargetV1.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EnvTargetV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnvTargetV1.js","sourceRoot":"","sources":["../../../src/generated/models/EnvTargetV1.ts"],"names":[],"mappings":""}
@@ -1,4 +1,12 @@
1
1
  export type MockItemV1 = {
2
+ /**
3
+ * The spec version this mock is currently serving. May lag the API's latest
4
+ * published version — a mock is bound to the snapshot it was built from
5
+ * until refreshed. Clients use this to distinguish version skew from real
6
+ * contract drift.
7
+ *
8
+ */
9
+ specVersion?: string | null;
2
10
  mockServerId?: string;
3
11
  apiId?: string;
4
12
  apiName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"MockItemV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/MockItemV1.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"MockItemV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/MockItemV1.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,26 @@
1
+ export type RefreshMockResponseV1 = {
2
+ /**
3
+ * Unchanged by a refresh — the public handle is stable.
4
+ */
5
+ mockServerId?: string;
6
+ /**
7
+ * The spec version the mock now serves.
8
+ */
9
+ specVersion?: string | null;
10
+ /**
11
+ * False when the mock already served the current spec.
12
+ */
13
+ refreshed?: boolean;
14
+ /**
15
+ * Hand-written variants re-created on the rebuilt mock.
16
+ */
17
+ customVariantsCarriedOver?: number;
18
+ /**
19
+ * Hand-written variants that could not be carried over because their
20
+ * operation no longer exists in the spec. Reported rather than silently
21
+ * discarded.
22
+ *
23
+ */
24
+ customVariantsDropped?: Array<string>;
25
+ };
26
+ //# sourceMappingURL=RefreshMockResponseV1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefreshMockResponseV1.d.ts","sourceRoot":"","sources":["../../../src/generated/models/RefreshMockResponseV1.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RefreshMockResponseV1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefreshMockResponseV1.js","sourceRoot":"","sources":["../../../src/generated/models/RefreshMockResponseV1.ts"],"names":[],"mappings":""}
@@ -1,4 +1,6 @@
1
+ import type { ApiConsumerCountV1 } from '../models/ApiConsumerCountV1.js';
1
2
  import type { ApiTeamListItemV1 } from '../models/ApiTeamListItemV1.js';
3
+ import type { EnvTargetV1 } from '../models/EnvTargetV1.js';
2
4
  import type { PublicApiListItem } from '../models/PublicApiListItem.js';
3
5
  import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1.js';
4
6
  import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1.js';
@@ -92,6 +94,65 @@ export declare class PublicApisService {
92
94
  static getTeamApiSpec({ apiId, }: {
93
95
  apiId: string;
94
96
  }): CancelablePromise<string>;
97
+ /**
98
+ * List the environments an API is deployed to
99
+ * Where this API actually runs — the URLs the platform already knows, so a client
100
+ * doesn't have to ask a developer to type them.
101
+ *
102
+ * **Targets, not client environments.** These are destinations: an environment's
103
+ * name and the URL it serves at. They carry no variables, tokens or secrets, and
104
+ * clients must not treat them as a place to put any. Per-API custom metadata
105
+ * (`envMetadata` on the internal surface) is free-form and may hold credentials in
106
+ * existing orgs, so it is deliberately **not** returned here.
107
+ *
108
+ * Environments are whatever the organisation defined, named however they named
109
+ * them, and the name is the whole of their meaning. There is no classification
110
+ * field: this endpoint reports what exists, it does not interpret it.
111
+ *
112
+ * Returned in the organisation's promotion order — the same order the dashboard
113
+ * lays them out in, so the two surfaces agree.
114
+ *
115
+ * Choosing a destination is the developer's, so a client should present these and
116
+ * let one be picked rather than picking on their behalf.
117
+ *
118
+ * Authorization stack:
119
+ * - scope: `read:apis`
120
+ * - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
121
+ * cross-team isolation collapse to 404 to avoid leaking existence).
122
+ *
123
+ * @returns EnvTargetV1 Environments configured for this API, in the org's promotion order
124
+ * @throws ApiError
125
+ */
126
+ static listTeamApiEnvironments({ apiId, }: {
127
+ apiId: string;
128
+ }): CancelablePromise<Array<EnvTargetV1>>;
129
+ /**
130
+ * How many consumers depend on an API
131
+ * The blast-radius number: how many teams and services hold a grant on this API,
132
+ * and how many of those grants are approved. It answers "if I change this, does
133
+ * anyone else care?" — the question worth asking *before* editing a contract.
134
+ *
135
+ * **Counts, not a roster.** Who consumes what is org-governance information with
136
+ * its own screen, approval flow and permissions in the dashboard; restating a
137
+ * slice of it here would create a second, staler place to read it. A client that
138
+ * needs the detail should link a person to the dashboard, which this count is
139
+ * sized to prompt.
140
+ *
141
+ * `total` counts every grant regardless of status; `approved` counts only those in
142
+ * `APPROVED`. A pending grant is a real consumer waiting on a decision, so it is
143
+ * deliberately included in the total rather than hidden.
144
+ *
145
+ * Authorization stack:
146
+ * - scope: `read:apis`
147
+ * - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
148
+ * cross-team isolation collapse to 404 to avoid leaking existence).
149
+ *
150
+ * @returns ApiConsumerCountV1 Consumer counts for this API
151
+ * @throws ApiError
152
+ */
153
+ static getTeamApiConsumerCount({ apiId, }: {
154
+ apiId: string;
155
+ }): CancelablePromise<ApiConsumerCountV1>;
95
156
  /**
96
157
  * List published versions of a team-scoped private API
97
158
  * Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions` for the
@@ -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,MA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C;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"}
1
+ {"version":3,"file":"PublicApisService.d.ts","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,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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f,GAAG,iBAAiB,CAAC,kBAAkB,CAAC;IAczC;;;;;;;;;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"}
@@ -152,6 +152,87 @@ class PublicApisService {
152
152
  },
153
153
  });
154
154
  }
155
+ /**
156
+ * List the environments an API is deployed to
157
+ * Where this API actually runs — the URLs the platform already knows, so a client
158
+ * doesn't have to ask a developer to type them.
159
+ *
160
+ * **Targets, not client environments.** These are destinations: an environment's
161
+ * name and the URL it serves at. They carry no variables, tokens or secrets, and
162
+ * clients must not treat them as a place to put any. Per-API custom metadata
163
+ * (`envMetadata` on the internal surface) is free-form and may hold credentials in
164
+ * existing orgs, so it is deliberately **not** returned here.
165
+ *
166
+ * Environments are whatever the organisation defined, named however they named
167
+ * them, and the name is the whole of their meaning. There is no classification
168
+ * field: this endpoint reports what exists, it does not interpret it.
169
+ *
170
+ * Returned in the organisation's promotion order — the same order the dashboard
171
+ * lays them out in, so the two surfaces agree.
172
+ *
173
+ * Choosing a destination is the developer's, so a client should present these and
174
+ * let one be picked rather than picking on their behalf.
175
+ *
176
+ * Authorization stack:
177
+ * - scope: `read:apis`
178
+ * - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
179
+ * cross-team isolation collapse to 404 to avoid leaking existence).
180
+ *
181
+ * @returns EnvTargetV1 Environments configured for this API, in the org's promotion order
182
+ * @throws ApiError
183
+ */
184
+ static listTeamApiEnvironments({ apiId, }) {
185
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
186
+ method: 'GET',
187
+ url: '/api/v1/public/apis/team/{apiId}/environments',
188
+ path: {
189
+ 'apiId': apiId,
190
+ },
191
+ errors: {
192
+ 401: `Missing, invalid, expired, or revoked token`,
193
+ 403: `Token does not carry the required scope`,
194
+ 404: `Resource not found (or not visible to the calling org)`,
195
+ },
196
+ });
197
+ }
198
+ /**
199
+ * How many consumers depend on an API
200
+ * The blast-radius number: how many teams and services hold a grant on this API,
201
+ * and how many of those grants are approved. It answers "if I change this, does
202
+ * anyone else care?" — the question worth asking *before* editing a contract.
203
+ *
204
+ * **Counts, not a roster.** Who consumes what is org-governance information with
205
+ * its own screen, approval flow and permissions in the dashboard; restating a
206
+ * slice of it here would create a second, staler place to read it. A client that
207
+ * needs the detail should link a person to the dashboard, which this count is
208
+ * sized to prompt.
209
+ *
210
+ * `total` counts every grant regardless of status; `approved` counts only those in
211
+ * `APPROVED`. A pending grant is a real consumer waiting on a decision, so it is
212
+ * deliberately included in the total rather than hidden.
213
+ *
214
+ * Authorization stack:
215
+ * - scope: `read:apis`
216
+ * - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
217
+ * cross-team isolation collapse to 404 to avoid leaking existence).
218
+ *
219
+ * @returns ApiConsumerCountV1 Consumer counts for this API
220
+ * @throws ApiError
221
+ */
222
+ static getTeamApiConsumerCount({ apiId, }) {
223
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
224
+ method: 'GET',
225
+ url: '/api/v1/public/apis/team/{apiId}/consumers',
226
+ path: {
227
+ 'apiId': apiId,
228
+ },
229
+ errors: {
230
+ 401: `Missing, invalid, expired, or revoked token`,
231
+ 403: `Token does not carry the required scope`,
232
+ 404: `Resource not found (or not visible to the calling org)`,
233
+ },
234
+ });
235
+ }
155
236
  /**
156
237
  * List published versions of a team-scoped private API
157
238
  * Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions` for the
@@ -1 +1 @@
1
- {"version":3,"file":"PublicApisService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":";;;AAcA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,iBAAiB;IAC5B;;;;;OAKG;IACI,MAAM,CAAC,cAAc;QAC1B,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,qBAAqB;YAC1B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,gBAAgB,CAAC,EAC7B,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,qBAAqB;YAC1B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,0EAA0E;gBAC/E,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;;;OAUG;IACI,MAAM,CAAC,YAAY;QACxB,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,0BAA0B;YAC/B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAA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AAI,EAAE;gBACJ,aAAa,EAAE,WAAW;aAC3B;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAzRD,8CAyRC"}
1
+ {"version":3,"file":"PublicApisService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicApisService.ts"],"names":[],"mappings":";;;AAgBA,mDAA6C;AAC7C,mDAA0D;AAC1D,MAAa,iBAAiB;IAC5B;;;;;OAKG;IACI,MAAM,CAAC,cAAc;QAC1B,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,qBAAqB;YAC1B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,gBAAgB,CAAC,EAC7B,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,qBAAqB;YAC1B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,aAAa;gBAClB,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,0EAA0E;gBAC/E,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;;;;OAUG;IACI,MAAM,CAAC,YAAY;QACxB,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,0BAA0B;YAC/B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;aAC/C;SACF,CAAC,CAAC;IACL,CA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X;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,yBAAyB,CAAC,EACtC,WAAW,EACX,WAAW,GAIZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,8CAA8C;YACnD,IAAI,EAAE;gBACJ,aAAa,EAAE,WAAW;aAC3B;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;IACD;;;;;;;OAOG;IACI,MAAM,CAAC,eAAe,CAAC,EAC5B,WAAW,GAGZ;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,mCAAmC;YACxC,IAAI,EAAE;gBACJ,aAAa,EAAE,WAAW;aAC3B;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,6CAA6C;gBAClD,GAAG,EAAE,yCAAyC;gBAC9C,GAAG,EAAE,wDAAwD;aAC9D;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAlXD,8CAkXC"}
@@ -1,6 +1,7 @@
1
1
  import type { CreateMockRequestV1 } from '../models/CreateMockRequestV1.js';
2
2
  import type { CreateMockResponseV1 } from '../models/CreateMockResponseV1.js';
3
3
  import type { MockItemV1 } from '../models/MockItemV1.js';
4
+ import type { RefreshMockResponseV1 } from '../models/RefreshMockResponseV1.js';
4
5
  import type { CancelablePromise } from '../core/CancelablePromise.js';
5
6
  export declare class PublicMocksService {
6
7
  /**
@@ -25,6 +26,29 @@ export declare class PublicMocksService {
25
26
  static createPublicMock({ requestBody, }: {
26
27
  requestBody: CreateMockRequestV1;
27
28
  }): CancelablePromise<CreateMockResponseV1>;
29
+ /**
30
+ * Re-provision a mock against its API's latest published spec
31
+ * A mock is bound to the spec snapshot it was created from, so publishing a new
32
+ * version of an API leaves its mock serving the previous contract. This rebuilds
33
+ * it against the API's current spec.
34
+ *
35
+ * The mock's **public id, URL and API key are unchanged** — those are what CI
36
+ * configs and clients already hold. Auto-generated variants are replaced with
37
+ * ones correct for the new spec; hand-written variants are carried over where
38
+ * their operation still exists, and the ones that couldn't be are listed in the
39
+ * response rather than silently dropped.
40
+ *
41
+ * Idempotent: refreshing a mock that already serves the current spec reports
42
+ * `refreshed: false` and changes nothing.
43
+ *
44
+ * Cross-org returns 404, not 403, so the existence of a mock is not leaked.
45
+ *
46
+ * @returns RefreshMockResponseV1 Refresh outcome
47
+ * @throws ApiError
48
+ */
49
+ static refreshPublicMock({ mockServerId, }: {
50
+ mockServerId: string;
51
+ }): CancelablePromise<RefreshMockResponseV1>;
28
52
  /**
29
53
  * Delete a mock server owned by the calling org
30
54
  * Hard-deletes the mock server and removes its association with the parent API.
@@ -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;;;;;;;;;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"}
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,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,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;;;;;;;;;;;;;;;;;;;OAmBG;WACW,iBAAiB,CAAC,EAC9B,YAAY,GACb,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;KACtB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC;IAc5C;;;;;;;;OAQG;WACW,gBAAgB,CAAC,EAC7B,YAAY,GACb,EAAE;QACD,YAAY,EAAE,MAAM,CAAC;KACtB,GAAG,iBAAiB,CAAC,IAAI,CAAC;CAc5B"}
@@ -46,6 +46,40 @@ class PublicMocksService {
46
46
  },
47
47
  });
48
48
  }
49
+ /**
50
+ * Re-provision a mock against its API's latest published spec
51
+ * A mock is bound to the spec snapshot it was created from, so publishing a new
52
+ * version of an API leaves its mock serving the previous contract. This rebuilds
53
+ * it against the API's current spec.
54
+ *
55
+ * The mock's **public id, URL and API key are unchanged** — those are what CI
56
+ * configs and clients already hold. Auto-generated variants are replaced with
57
+ * ones correct for the new spec; hand-written variants are carried over where
58
+ * their operation still exists, and the ones that couldn't be are listed in the
59
+ * response rather than silently dropped.
60
+ *
61
+ * Idempotent: refreshing a mock that already serves the current spec reports
62
+ * `refreshed: false` and changes nothing.
63
+ *
64
+ * Cross-org returns 404, not 403, so the existence of a mock is not leaked.
65
+ *
66
+ * @returns RefreshMockResponseV1 Refresh outcome
67
+ * @throws ApiError
68
+ */
69
+ static refreshPublicMock({ mockServerId, }) {
70
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
71
+ method: 'POST',
72
+ url: '/api/v1/public/mocks/{mockServerId}/refresh',
73
+ path: {
74
+ 'mockServerId': mockServerId,
75
+ },
76
+ errors: {
77
+ 401: `Missing, invalid, expired, or revoked token`,
78
+ 403: `Token does not carry the required scope`,
79
+ 404: `Resource not found (or not visible to the calling org)`,
80
+ },
81
+ });
82
+ }
49
83
  /**
50
84
  * Delete a mock server owned by the calling org
51
85
  * Hard-deletes the mock server and removes its association with the parent API.
@@ -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;;;;;;;;;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"}
1
+ {"version":3,"file":"PublicMocksService.js","sourceRoot":"","sources":["../../../src/generated/services/PublicMocksService.ts"],"names":[],"mappings":";;;AASA,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;;;;;;;;;;;;;;;;;;;OAmBG;IACI,MAAM,CAAC,iBAAiB,CAAC,EAC9B,YAAY,GAGb;QACC,OAAO,IAAA,oBAAS,EAAC,oBAAO,EAAE;YACxB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,6CAA6C;YAClD,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;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;AAhHD,gDAgHC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spec0/sdk-public-platform",
3
- "version": "1.9.0",
3
+ "version": "1.11.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",
@@ -9,12 +9,14 @@ export type { OpenAPIConfig } from './core/OpenAPI.js';
9
9
 
10
10
  export type { AiSearchRequestV1 } from './models/AiSearchRequestV1.js';
11
11
  export type { AiSearchResponseV1 } from './models/AiSearchResponseV1.js';
12
+ export type { ApiConsumerCountV1 } from './models/ApiConsumerCountV1.js';
12
13
  export type { ApiNamePath } from './models/ApiNamePath.js';
13
14
  export type { ApiTeamListItemV1 } from './models/ApiTeamListItemV1.js';
14
15
  export type { AuthError } from './models/AuthError.js';
15
16
  export type { CiConfigResponseV1 } from './models/CiConfigResponseV1.js';
16
17
  export type { CreateMockRequestV1 } from './models/CreateMockRequestV1.js';
17
18
  export type { CreateMockResponseV1 } from './models/CreateMockResponseV1.js';
19
+ export type { EnvTargetV1 } from './models/EnvTargetV1.js';
18
20
  export type { GovernanceWarningV1 } from './models/GovernanceWarningV1.js';
19
21
  export type { MockItemV1 } from './models/MockItemV1.js';
20
22
  export type { OrgSlugPath } from './models/OrgSlugPath.js';
@@ -26,6 +28,7 @@ export type { PublicApiMetaV1 } from './models/PublicApiMetaV1.js';
26
28
  export type { PublicPublishRequestV1 } from './models/PublicPublishRequestV1.js';
27
29
  export type { PublicPublishResponseV1 } from './models/PublicPublishResponseV1.js';
28
30
  export type { PutSpectralRulesetRequestV1 } from './models/PutSpectralRulesetRequestV1.js';
31
+ export type { RefreshMockResponseV1 } from './models/RefreshMockResponseV1.js';
29
32
  export type { SpecDiffResponseV1 } from './models/SpecDiffResponseV1.js';
30
33
  export type { SpectralRulesetResponseV1 } from './models/SpectralRulesetResponseV1.js';
31
34
  export type { SpecVersionListItemV1 } from './models/SpecVersionListItemV1.js';
@@ -0,0 +1,23 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * How many consumers depend on an API. Counts only — never names. Who consumes an
7
+ * API is org-governance information that belongs to the dashboard's consumers view,
8
+ * with the permissions and approval flow that go with it.
9
+ *
10
+ */
11
+ export type ApiConsumerCountV1 = {
12
+ /**
13
+ * Every grant on this API, whatever its status. A pending grant is a real
14
+ * consumer awaiting a decision, so it counts here rather than being hidden.
15
+ *
16
+ */
17
+ total: number;
18
+ /**
19
+ * Grants in `APPROVED` — consumers that can actually call the API today.
20
+ */
21
+ approved: number;
22
+ };
23
+
@@ -0,0 +1,38 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * One environment an API is deployed to: a destination and what's live there.
7
+ * Carries no variables, credentials or custom metadata.
8
+ *
9
+ */
10
+ export type EnvTargetV1 = {
11
+ /**
12
+ * The environment's name, as the organisation defined it — unique within the
13
+ * org, and the whole of its meaning. There is deliberately no kind or
14
+ * classification alongside it: that would be a second source of truth for the
15
+ * same fact, free to disagree with the name the org actually typed.
16
+ *
17
+ */
18
+ name?: string;
19
+ /**
20
+ * Absolute and already resolved. Where an environment's URL is derived from the
21
+ * spec's `servers` block, templated variables are expanded before storage, so a
22
+ * client never has to resolve a template itself.
23
+ *
24
+ */
25
+ url?: string;
26
+ /**
27
+ * The spec version live in this environment, or null if nothing has been
28
+ * published to or promoted into it. A client holding a different version can
29
+ * say so, instead of reporting the difference as contract drift.
30
+ *
31
+ */
32
+ currentVersion?: string | null;
33
+ /**
34
+ * When this environment's configuration for the API last changed.
35
+ */
36
+ updatedAt?: string | null;
37
+ };
38
+
@@ -3,6 +3,14 @@
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
5
  export type MockItemV1 = {
6
+ /**
7
+ * The spec version this mock is currently serving. May lag the API's latest
8
+ * published version — a mock is bound to the snapshot it was built from
9
+ * until refreshed. Clients use this to distinguish version skew from real
10
+ * contract drift.
11
+ *
12
+ */
13
+ specVersion?: string | null;
6
14
  mockServerId?: string;
7
15
  apiId?: string;
8
16
  apiName?: string;
@@ -0,0 +1,30 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export type RefreshMockResponseV1 = {
6
+ /**
7
+ * Unchanged by a refresh — the public handle is stable.
8
+ */
9
+ mockServerId?: string;
10
+ /**
11
+ * The spec version the mock now serves.
12
+ */
13
+ specVersion?: string | null;
14
+ /**
15
+ * False when the mock already served the current spec.
16
+ */
17
+ refreshed?: boolean;
18
+ /**
19
+ * Hand-written variants re-created on the rebuilt mock.
20
+ */
21
+ customVariantsCarriedOver?: number;
22
+ /**
23
+ * Hand-written variants that could not be carried over because their
24
+ * operation no longer exists in the spec. Reported rather than silently
25
+ * discarded.
26
+ *
27
+ */
28
+ customVariantsDropped?: Array<string>;
29
+ };
30
+
@@ -2,7 +2,9 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { ApiConsumerCountV1 } from '../models/ApiConsumerCountV1.js';
5
6
  import type { ApiTeamListItemV1 } from '../models/ApiTeamListItemV1.js';
7
+ import type { EnvTargetV1 } from '../models/EnvTargetV1.js';
6
8
  import type { PublicApiListItem } from '../models/PublicApiListItem.js';
7
9
  import type { PublicApiMetaV1 } from '../models/PublicApiMetaV1.js';
8
10
  import type { PublicPublishRequestV1 } from '../models/PublicPublishRequestV1.js';
@@ -179,6 +181,95 @@ export class PublicApisService {
179
181
  },
180
182
  });
181
183
  }
184
+ /**
185
+ * List the environments an API is deployed to
186
+ * Where this API actually runs — the URLs the platform already knows, so a client
187
+ * doesn't have to ask a developer to type them.
188
+ *
189
+ * **Targets, not client environments.** These are destinations: an environment's
190
+ * name and the URL it serves at. They carry no variables, tokens or secrets, and
191
+ * clients must not treat them as a place to put any. Per-API custom metadata
192
+ * (`envMetadata` on the internal surface) is free-form and may hold credentials in
193
+ * existing orgs, so it is deliberately **not** returned here.
194
+ *
195
+ * Environments are whatever the organisation defined, named however they named
196
+ * them, and the name is the whole of their meaning. There is no classification
197
+ * field: this endpoint reports what exists, it does not interpret it.
198
+ *
199
+ * Returned in the organisation's promotion order — the same order the dashboard
200
+ * lays them out in, so the two surfaces agree.
201
+ *
202
+ * Choosing a destination is the developer's, so a client should present these and
203
+ * let one be picked rather than picking on their behalf.
204
+ *
205
+ * Authorization stack:
206
+ * - scope: `read:apis`
207
+ * - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
208
+ * cross-team isolation collapse to 404 to avoid leaking existence).
209
+ *
210
+ * @returns EnvTargetV1 Environments configured for this API, in the org's promotion order
211
+ * @throws ApiError
212
+ */
213
+ public static listTeamApiEnvironments({
214
+ apiId,
215
+ }: {
216
+ apiId: string,
217
+ }): CancelablePromise<Array<EnvTargetV1>> {
218
+ return __request(OpenAPI, {
219
+ method: 'GET',
220
+ url: '/api/v1/public/apis/team/{apiId}/environments',
221
+ path: {
222
+ 'apiId': apiId,
223
+ },
224
+ errors: {
225
+ 401: `Missing, invalid, expired, or revoked token`,
226
+ 403: `Token does not carry the required scope`,
227
+ 404: `Resource not found (or not visible to the calling org)`,
228
+ },
229
+ });
230
+ }
231
+ /**
232
+ * How many consumers depend on an API
233
+ * The blast-radius number: how many teams and services hold a grant on this API,
234
+ * and how many of those grants are approved. It answers "if I change this, does
235
+ * anyone else care?" — the question worth asking *before* editing a contract.
236
+ *
237
+ * **Counts, not a roster.** Who consumes what is org-governance information with
238
+ * its own screen, approval flow and permissions in the dashboard; restating a
239
+ * slice of it here would create a second, staler place to read it. A client that
240
+ * needs the detail should link a person to the dashboard, which this count is
241
+ * sized to prompt.
242
+ *
243
+ * `total` counts every grant regardless of status; `approved` counts only those in
244
+ * `APPROVED`. A pending grant is a real consumer waiting on a decision, so it is
245
+ * deliberately included in the total rather than hidden.
246
+ *
247
+ * Authorization stack:
248
+ * - scope: `read:apis`
249
+ * - ABAC v2: caller must be permitted to `view` the API resource (cross-org and
250
+ * cross-team isolation collapse to 404 to avoid leaking existence).
251
+ *
252
+ * @returns ApiConsumerCountV1 Consumer counts for this API
253
+ * @throws ApiError
254
+ */
255
+ public static getTeamApiConsumerCount({
256
+ apiId,
257
+ }: {
258
+ apiId: string,
259
+ }): CancelablePromise<ApiConsumerCountV1> {
260
+ return __request(OpenAPI, {
261
+ method: 'GET',
262
+ url: '/api/v1/public/apis/team/{apiId}/consumers',
263
+ path: {
264
+ 'apiId': apiId,
265
+ },
266
+ errors: {
267
+ 401: `Missing, invalid, expired, or revoked token`,
268
+ 403: `Token does not carry the required scope`,
269
+ 404: `Resource not found (or not visible to the calling org)`,
270
+ },
271
+ });
272
+ }
182
273
  /**
183
274
  * List published versions of a team-scoped private API
184
275
  * Mirrors `GET /api/v1/public/registry/{orgSlug}/{apiName}/versions` for the
@@ -5,6 +5,7 @@
5
5
  import type { CreateMockRequestV1 } from '../models/CreateMockRequestV1.js';
6
6
  import type { CreateMockResponseV1 } from '../models/CreateMockResponseV1.js';
7
7
  import type { MockItemV1 } from '../models/MockItemV1.js';
8
+ import type { RefreshMockResponseV1 } from '../models/RefreshMockResponseV1.js';
8
9
  import type { CancelablePromise } from '../core/CancelablePromise.js';
9
10
  import { OpenAPI } from '../core/OpenAPI.js';
10
11
  import { request as __request } from '../core/request.js';
@@ -55,6 +56,44 @@ export class PublicMocksService {
55
56
  },
56
57
  });
57
58
  }
59
+ /**
60
+ * Re-provision a mock against its API's latest published spec
61
+ * A mock is bound to the spec snapshot it was created from, so publishing a new
62
+ * version of an API leaves its mock serving the previous contract. This rebuilds
63
+ * it against the API's current spec.
64
+ *
65
+ * The mock's **public id, URL and API key are unchanged** — those are what CI
66
+ * configs and clients already hold. Auto-generated variants are replaced with
67
+ * ones correct for the new spec; hand-written variants are carried over where
68
+ * their operation still exists, and the ones that couldn't be are listed in the
69
+ * response rather than silently dropped.
70
+ *
71
+ * Idempotent: refreshing a mock that already serves the current spec reports
72
+ * `refreshed: false` and changes nothing.
73
+ *
74
+ * Cross-org returns 404, not 403, so the existence of a mock is not leaked.
75
+ *
76
+ * @returns RefreshMockResponseV1 Refresh outcome
77
+ * @throws ApiError
78
+ */
79
+ public static refreshPublicMock({
80
+ mockServerId,
81
+ }: {
82
+ mockServerId: string,
83
+ }): CancelablePromise<RefreshMockResponseV1> {
84
+ return __request(OpenAPI, {
85
+ method: 'POST',
86
+ url: '/api/v1/public/mocks/{mockServerId}/refresh',
87
+ path: {
88
+ 'mockServerId': mockServerId,
89
+ },
90
+ errors: {
91
+ 401: `Missing, invalid, expired, or revoked token`,
92
+ 403: `Token does not carry the required scope`,
93
+ 404: `Resource not found (or not visible to the calling org)`,
94
+ },
95
+ });
96
+ }
58
97
  /**
59
98
  * Delete a mock server owned by the calling org
60
99
  * Hard-deletes the mock server and removes its association with the parent API.