@rentnerproxy/app-contracts 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +32 -2
- package/contracts.schema.json +4007 -0
- package/dist/Types/contract.types.d.ts +15 -0
- package/dist/Types/contract.types.js +1 -0
- package/dist/catalog.d.ts +352 -0
- package/dist/catalog.js +54 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.js +66 -0
- package/dist/http-operations.d.ts +333 -0
- package/dist/http-operations.generated.d.ts +299 -0
- package/dist/http-operations.generated.js +300 -0
- package/dist/http-operations.js +17 -0
- package/dist/http.d.ts +127 -0
- package/dist/http.js +142 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/manifest.d.ts +90 -0
- package/dist/manifest.js +106 -0
- package/dist/platform-api.d.ts +282 -0
- package/dist/platform-api.js +287 -0
- package/dist/primitives.d.ts +33 -0
- package/dist/primitives.js +87 -0
- package/dist/provider-api.d.ts +221 -0
- package/dist/provider-api.js +227 -0
- package/dist/publication.d.ts +410 -0
- package/dist/publication.js +50 -0
- package/dist/runtime.d.ts +75 -0
- package/dist/runtime.js +88 -0
- package/dist/schemas.d.ts +926 -0
- package/dist/schemas.js +114 -0
- package/dist/ui-bridge.d.ts +81 -0
- package/dist/ui-bridge.js +92 -0
- package/dist/validation.d.ts +784 -0
- package/dist/validation.js +245 -0
- package/dist/wire.d.ts +31 -0
- package/dist/wire.js +54 -0
- package/fixtures.json +1094 -0
- package/http-fixtures.json +829 -0
- package/openapi.json +2557 -0
- package/package.json +56 -5
- package/protocol-fixtures.json +1804 -0
- package/upstream-probe-fixtures.json +852 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import type { ProtocolDocumentName } from './Types/contract.types.ts';
|
|
2
|
+
export type HttpSocket = 'app.sock' | 'core.sock';
|
|
3
|
+
export type HttpMethod = 'GET' | 'POST';
|
|
4
|
+
export declare const rpcLimits: Readonly<{
|
|
5
|
+
readonly maxJsonBytes: 1048576;
|
|
6
|
+
readonly maxJsonDepth: 64;
|
|
7
|
+
readonly maxListEntries: 100;
|
|
8
|
+
readonly defaultDeadlineMs: 10000;
|
|
9
|
+
readonly maxDeadlineMs: 30000;
|
|
10
|
+
}>;
|
|
11
|
+
/** The protocol document that admits each path parameter value. */
|
|
12
|
+
export declare const pathParameterSchemas: Readonly<{
|
|
13
|
+
readonly operationId: 'RecordId';
|
|
14
|
+
readonly providerId: 'RecordId';
|
|
15
|
+
readonly secretId: 'RecordId';
|
|
16
|
+
readonly incidentKey: 'RecordId';
|
|
17
|
+
readonly domain: 'LegacyHandoffDomain';
|
|
18
|
+
}>;
|
|
19
|
+
export type HttpPathParameter = keyof typeof pathParameterSchemas;
|
|
20
|
+
export interface HttpOperationDefinition {
|
|
21
|
+
socket: HttpSocket;
|
|
22
|
+
method: HttpMethod;
|
|
23
|
+
path: `/${string}`;
|
|
24
|
+
summary: string;
|
|
25
|
+
status: 200 | 202 | 204;
|
|
26
|
+
pathParameter?: HttpPathParameter;
|
|
27
|
+
idempotencyKey?: true;
|
|
28
|
+
resumeCursor?: true;
|
|
29
|
+
request?: ProtocolDocumentName;
|
|
30
|
+
response?: ProtocolDocumentName;
|
|
31
|
+
event?: ProtocolDocumentName;
|
|
32
|
+
description?: string;
|
|
33
|
+
failures?: Record<number, string>;
|
|
34
|
+
}
|
|
35
|
+
export declare const httpOperations: Readonly<{
|
|
36
|
+
readonly getAppHealth: {
|
|
37
|
+
readonly failures: {
|
|
38
|
+
readonly "503": "The app is unhealthy.";
|
|
39
|
+
};
|
|
40
|
+
readonly method: "GET";
|
|
41
|
+
readonly path: "/app/v1/health";
|
|
42
|
+
readonly response: "AppHealth";
|
|
43
|
+
readonly socket: "app.sock";
|
|
44
|
+
readonly status: 200;
|
|
45
|
+
readonly summary: "Check app process health";
|
|
46
|
+
};
|
|
47
|
+
readonly getAppReadiness: {
|
|
48
|
+
readonly failures: {
|
|
49
|
+
readonly "503": "The app or its required context is unavailable.";
|
|
50
|
+
};
|
|
51
|
+
readonly method: "GET";
|
|
52
|
+
readonly path: "/app/v1/ready";
|
|
53
|
+
readonly response: "AppReadiness";
|
|
54
|
+
readonly socket: "app.sock";
|
|
55
|
+
readonly status: 200;
|
|
56
|
+
readonly summary: "Check readiness for the negotiated generation";
|
|
57
|
+
};
|
|
58
|
+
readonly activateApp: {
|
|
59
|
+
readonly idempotencyKey: true;
|
|
60
|
+
readonly method: "POST";
|
|
61
|
+
readonly path: "/app/v1/lifecycle/activate";
|
|
62
|
+
readonly socket: "app.sock";
|
|
63
|
+
readonly status: 204;
|
|
64
|
+
readonly summary: "Activate the prepared app generation";
|
|
65
|
+
};
|
|
66
|
+
readonly drainApp: {
|
|
67
|
+
readonly idempotencyKey: true;
|
|
68
|
+
readonly method: "POST";
|
|
69
|
+
readonly path: "/app/v1/lifecycle/drain";
|
|
70
|
+
readonly socket: "app.sock";
|
|
71
|
+
readonly status: 204;
|
|
72
|
+
readonly summary: "Drain the active app generation";
|
|
73
|
+
};
|
|
74
|
+
readonly deactivateApp: {
|
|
75
|
+
readonly idempotencyKey: true;
|
|
76
|
+
readonly method: "POST";
|
|
77
|
+
readonly path: "/app/v1/lifecycle/deactivate";
|
|
78
|
+
readonly socket: "app.sock";
|
|
79
|
+
readonly status: 204;
|
|
80
|
+
readonly summary: "Deactivate the drained app generation";
|
|
81
|
+
};
|
|
82
|
+
readonly callAppApi: {
|
|
83
|
+
readonly description: "The authenticated gateway verifies current user and resource access, then validates the request and result against the installed package API for this operation ID.";
|
|
84
|
+
readonly idempotencyKey: true;
|
|
85
|
+
readonly method: "POST";
|
|
86
|
+
readonly path: "/app/v1/api/{operationId}";
|
|
87
|
+
readonly pathParameter: "operationId";
|
|
88
|
+
readonly request: "AppApiPayload";
|
|
89
|
+
readonly response: "AppApiPayload";
|
|
90
|
+
readonly socket: "app.sock";
|
|
91
|
+
readonly status: 200;
|
|
92
|
+
readonly summary: "Invoke an app-owned operation declared by the package";
|
|
93
|
+
};
|
|
94
|
+
readonly invokeAppProvider: {
|
|
95
|
+
readonly description: "The broker derives the provider from the active registration. Its profile, operation discriminants and resource identities must match the invocation and result. Accepted long-running provider work may carry a durable Operation.";
|
|
96
|
+
readonly idempotencyKey: true;
|
|
97
|
+
readonly method: "POST";
|
|
98
|
+
readonly path: "/app/v1/providers/{providerId}";
|
|
99
|
+
readonly pathParameter: "providerId";
|
|
100
|
+
readonly request: "ProviderRequest";
|
|
101
|
+
readonly response: "ProviderResult";
|
|
102
|
+
readonly socket: "app.sock";
|
|
103
|
+
readonly status: 200;
|
|
104
|
+
readonly summary: "Invoke a negotiated provider operation";
|
|
105
|
+
};
|
|
106
|
+
readonly getPlatformContext: {
|
|
107
|
+
readonly description: "An authenticated candidate generation may read its own context while preparing for readiness. Other operations require an active generation and current authorization.";
|
|
108
|
+
readonly method: "GET";
|
|
109
|
+
readonly path: "/platform/v1/context";
|
|
110
|
+
readonly response: "PlatformContext";
|
|
111
|
+
readonly socket: "core.sock";
|
|
112
|
+
readonly status: 200;
|
|
113
|
+
readonly summary: "Read the verified installation context";
|
|
114
|
+
};
|
|
115
|
+
readonly checkAuthorization: {
|
|
116
|
+
readonly method: "POST";
|
|
117
|
+
readonly path: "/platform/v1/authorization";
|
|
118
|
+
readonly request: "AuthorizationRequest";
|
|
119
|
+
readonly response: "AuthorizationResult";
|
|
120
|
+
readonly socket: "core.sock";
|
|
121
|
+
readonly status: 200;
|
|
122
|
+
readonly summary: "Check current resource authorization";
|
|
123
|
+
};
|
|
124
|
+
readonly listProxyHosts: {
|
|
125
|
+
readonly method: "POST";
|
|
126
|
+
readonly path: "/platform/v1/proxy-hosts/query";
|
|
127
|
+
readonly request: "ProxyHostQuery";
|
|
128
|
+
readonly response: "ProxyHostPage";
|
|
129
|
+
readonly socket: "core.sock";
|
|
130
|
+
readonly status: 200;
|
|
131
|
+
readonly summary: "List proxy hosts within current grants";
|
|
132
|
+
};
|
|
133
|
+
readonly updateOwnedProxyHost: {
|
|
134
|
+
readonly description: "The platform controls ownership and configuration. Recheck current ownership, grants and revision before applying; conflicts preserve the currently applied proxy configuration.";
|
|
135
|
+
readonly idempotencyKey: true;
|
|
136
|
+
readonly method: "POST";
|
|
137
|
+
readonly path: "/platform/v1/proxy-hosts/owned";
|
|
138
|
+
readonly request: "OwnedProxyHostChange";
|
|
139
|
+
readonly response: "Operation";
|
|
140
|
+
readonly socket: "core.sock";
|
|
141
|
+
readonly status: 202;
|
|
142
|
+
readonly summary: "Apply a revision-checked change to an app-owned host";
|
|
143
|
+
};
|
|
144
|
+
readonly probeUpstream: {
|
|
145
|
+
readonly method: "POST";
|
|
146
|
+
readonly path: "/platform/v1/diagnostics/upstream";
|
|
147
|
+
readonly request: "UpstreamProbe";
|
|
148
|
+
readonly response: "UpstreamProbeResult";
|
|
149
|
+
readonly socket: "core.sock";
|
|
150
|
+
readonly status: 200;
|
|
151
|
+
readonly summary: "Run a bounded probe of an authorized proxy host upstream";
|
|
152
|
+
};
|
|
153
|
+
readonly probeUpstreams: {
|
|
154
|
+
readonly description: "Requires diagnostics.upstream.probe.v2. Each probe returns the stage result that built-in host monitoring classifies, so an app can classify it the same way. A probe the platform cannot run returns an explicit outcome instead of failing the batch.";
|
|
155
|
+
readonly method: "POST";
|
|
156
|
+
readonly path: "/platform/v1/diagnostics/upstream/batch";
|
|
157
|
+
readonly request: "UpstreamProbeBatch";
|
|
158
|
+
readonly response: "UpstreamProbeBatchResult";
|
|
159
|
+
readonly socket: "core.sock";
|
|
160
|
+
readonly status: 200;
|
|
161
|
+
readonly summary: "Probe authorized proxy host upstreams with monitoring-class admission";
|
|
162
|
+
};
|
|
163
|
+
readonly publishNotification: {
|
|
164
|
+
readonly idempotencyKey: true;
|
|
165
|
+
readonly method: "POST";
|
|
166
|
+
readonly path: "/platform/v1/notifications";
|
|
167
|
+
readonly request: "AppNotification";
|
|
168
|
+
readonly socket: "core.sock";
|
|
169
|
+
readonly status: 204;
|
|
170
|
+
readonly summary: "Publish an app-owned notification";
|
|
171
|
+
};
|
|
172
|
+
readonly setIncident: {
|
|
173
|
+
readonly description: "Requires notifications.incidents.manage.v1. The incident key is app-chosen and stays the same while the incident lasts. The platform deduplicates incidents per installation and key, and resolves the open incidents of an installation that stops, loses the grant or is removed.";
|
|
174
|
+
readonly failures: {
|
|
175
|
+
readonly "404": "The resource is unavailable to this installation.";
|
|
176
|
+
readonly "409": "The category is not declared, or the idempotency key was used for a different change.";
|
|
177
|
+
};
|
|
178
|
+
readonly idempotencyKey: true;
|
|
179
|
+
readonly method: "POST";
|
|
180
|
+
readonly path: "/platform/v1/incidents/{incidentKey}";
|
|
181
|
+
readonly pathParameter: "incidentKey";
|
|
182
|
+
readonly request: "AppIncidentChange";
|
|
183
|
+
readonly socket: "core.sock";
|
|
184
|
+
readonly status: 204;
|
|
185
|
+
readonly summary: "Open, update or resolve an app incident in platform notifications";
|
|
186
|
+
};
|
|
187
|
+
readonly recordAuditEvent: {
|
|
188
|
+
readonly description: "The platform supplies app, installation, actor and timestamp provenance from authenticated context.";
|
|
189
|
+
readonly idempotencyKey: true;
|
|
190
|
+
readonly method: "POST";
|
|
191
|
+
readonly path: "/platform/v1/audit-events";
|
|
192
|
+
readonly request: "AppAuditEvent";
|
|
193
|
+
readonly socket: "core.sock";
|
|
194
|
+
readonly status: 204;
|
|
195
|
+
readonly summary: "Record an app-owned audit event";
|
|
196
|
+
};
|
|
197
|
+
readonly readSecret: {
|
|
198
|
+
readonly failures: {
|
|
199
|
+
readonly "404": "The secret is unavailable to this installation.";
|
|
200
|
+
};
|
|
201
|
+
readonly method: "GET";
|
|
202
|
+
readonly path: "/platform/v1/secrets/{secretId}";
|
|
203
|
+
readonly pathParameter: "secretId";
|
|
204
|
+
readonly response: "AppSecret";
|
|
205
|
+
readonly socket: "core.sock";
|
|
206
|
+
readonly status: 200;
|
|
207
|
+
readonly summary: "Read a secret assigned to this app installation";
|
|
208
|
+
};
|
|
209
|
+
readonly getProvider: {
|
|
210
|
+
readonly failures: {
|
|
211
|
+
readonly "404": "The provider is unavailable to this installation.";
|
|
212
|
+
};
|
|
213
|
+
readonly method: "GET";
|
|
214
|
+
readonly path: "/platform/v1/providers/{providerId}";
|
|
215
|
+
readonly pathParameter: "providerId";
|
|
216
|
+
readonly response: "ProviderRegistration";
|
|
217
|
+
readonly socket: "core.sock";
|
|
218
|
+
readonly status: 200;
|
|
219
|
+
readonly summary: "Read an authorized provider registration";
|
|
220
|
+
};
|
|
221
|
+
readonly getOperation: {
|
|
222
|
+
readonly failures: {
|
|
223
|
+
readonly "404": "The operation is unavailable to this installation.";
|
|
224
|
+
};
|
|
225
|
+
readonly method: "GET";
|
|
226
|
+
readonly path: "/platform/v1/operations/{operationId}";
|
|
227
|
+
readonly pathParameter: "operationId";
|
|
228
|
+
readonly response: "Operation";
|
|
229
|
+
readonly socket: "core.sock";
|
|
230
|
+
readonly status: 200;
|
|
231
|
+
readonly summary: "Read an authorized durable operation";
|
|
232
|
+
};
|
|
233
|
+
readonly cancelOperation: {
|
|
234
|
+
readonly failures: {
|
|
235
|
+
readonly "404": "The operation is unavailable to this installation.";
|
|
236
|
+
};
|
|
237
|
+
readonly idempotencyKey: true;
|
|
238
|
+
readonly method: "POST";
|
|
239
|
+
readonly path: "/platform/v1/operations/{operationId}/cancel";
|
|
240
|
+
readonly pathParameter: "operationId";
|
|
241
|
+
readonly response: "Operation";
|
|
242
|
+
readonly socket: "core.sock";
|
|
243
|
+
readonly status: 202;
|
|
244
|
+
readonly summary: "Request cancellation of an authorized operation";
|
|
245
|
+
};
|
|
246
|
+
readonly subscribeToEvents: {
|
|
247
|
+
readonly description: "The SSE id is the resume cursor. Events are at least once. Deduplicate by the data event ID. Recheck active generation, grants, resource visibility, and delegation at delivery. Close the stream when subscription authority expires or is revoked.";
|
|
248
|
+
readonly event: "PlatformEvent";
|
|
249
|
+
readonly failures: {
|
|
250
|
+
readonly "410": "The cursor expired. Perform a full authorized resynchronization.";
|
|
251
|
+
};
|
|
252
|
+
readonly method: "GET";
|
|
253
|
+
readonly path: "/platform/v1/events";
|
|
254
|
+
readonly resumeCursor: true;
|
|
255
|
+
readonly socket: "core.sock";
|
|
256
|
+
readonly status: 200;
|
|
257
|
+
readonly summary: "Resume the permission-filtered durable stream";
|
|
258
|
+
};
|
|
259
|
+
readonly getLegacyHandoff: {
|
|
260
|
+
readonly description: "A legacy feature domain equals a provider profile. Every handoff operation acts only for the active generation of the calling installation. The state platform means the platform still owns the domain. The state exported means this installation is importing a fixed export. The state committed means this installation owns the domain.";
|
|
261
|
+
readonly failures: {
|
|
262
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
263
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
264
|
+
readonly "409": "Another installation holds the domain.";
|
|
265
|
+
};
|
|
266
|
+
readonly method: "GET";
|
|
267
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}";
|
|
268
|
+
readonly pathParameter: "domain";
|
|
269
|
+
readonly response: "LegacyHandoffStatus";
|
|
270
|
+
readonly socket: "core.sock";
|
|
271
|
+
readonly status: 200;
|
|
272
|
+
readonly summary: "Read the handoff state of a built-in feature domain";
|
|
273
|
+
};
|
|
274
|
+
readonly beginLegacyHandoff: {
|
|
275
|
+
readonly description: "Begin fences the platform writers of the domain and fixes one export of its configuration, credentials and history as ordered parts. While the export is open, repeating begin returns exported with the same digest and part count, so an interrupted import resumes. After commit, begin returns committed with the same digest and no part count.";
|
|
276
|
+
readonly failures: {
|
|
277
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
278
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
279
|
+
readonly "409": "Another installation holds the domain, or the idempotency key conflicts.";
|
|
280
|
+
};
|
|
281
|
+
readonly idempotencyKey: true;
|
|
282
|
+
readonly method: "POST";
|
|
283
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}/begin";
|
|
284
|
+
readonly pathParameter: "domain";
|
|
285
|
+
readonly response: "LegacyHandoffBeginResult";
|
|
286
|
+
readonly socket: "core.sock";
|
|
287
|
+
readonly status: 200;
|
|
288
|
+
readonly summary: "Fence platform writers and fix a built-in feature export";
|
|
289
|
+
};
|
|
290
|
+
readonly readLegacyHandoffPart: {
|
|
291
|
+
readonly description: "Read every sequence with 0 <= sequence < partCount and import each part durably before commit. An export with no parts needs no reads. The digest binds each read to the export that begin fixed, so a read never returns a part of a replaced export. A serialized part is at most 262144 bytes.";
|
|
292
|
+
readonly failures: {
|
|
293
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
294
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
295
|
+
readonly "404": "No export exists for this installation, or the sequence is not below the part count.";
|
|
296
|
+
readonly "409": "Another installation holds the domain, or the digest differs from the current export.";
|
|
297
|
+
readonly "503": "The stored part is unreadable. The platform must abort the handoff and export again.";
|
|
298
|
+
};
|
|
299
|
+
readonly method: "POST";
|
|
300
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}/parts";
|
|
301
|
+
readonly pathParameter: "domain";
|
|
302
|
+
readonly request: "LegacyHandoffPartRequest";
|
|
303
|
+
readonly response: "LegacyHandoffPart";
|
|
304
|
+
readonly socket: "core.sock";
|
|
305
|
+
readonly status: 200;
|
|
306
|
+
readonly summary: "Read one part of the fixed built-in feature export";
|
|
307
|
+
};
|
|
308
|
+
readonly commitLegacyHandoff: {
|
|
309
|
+
readonly description: "Commit exactly the digest that begin returned, after every part is imported durably. Commit retires the platform state once and transfers ownership to this installation. The result state is committed. Repeating commit with the same digest returns committed.";
|
|
310
|
+
readonly failures: {
|
|
311
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
312
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
313
|
+
readonly "404": "No export exists for this installation.";
|
|
314
|
+
readonly "409": "Another installation holds the domain, the digest differs from the export, or the idempotency key conflicts.";
|
|
315
|
+
};
|
|
316
|
+
readonly idempotencyKey: true;
|
|
317
|
+
readonly method: "POST";
|
|
318
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}/commit";
|
|
319
|
+
readonly pathParameter: "domain";
|
|
320
|
+
readonly request: "LegacyHandoffCommit";
|
|
321
|
+
readonly response: "LegacyHandoffCommitResult";
|
|
322
|
+
readonly socket: "core.sock";
|
|
323
|
+
readonly status: 200;
|
|
324
|
+
readonly summary: "Commit an imported built-in feature export";
|
|
325
|
+
};
|
|
326
|
+
}>;
|
|
327
|
+
export type HttpOperationName = keyof typeof httpOperations;
|
|
328
|
+
type KnownOperation = (typeof httpOperations)[HttpOperationName];
|
|
329
|
+
type OperationSchemas = {
|
|
330
|
+
[Field in 'request' | 'response' | 'event']?: Extract<KnownOperation, Record<Field, ProtocolDocumentName>>[Field];
|
|
331
|
+
};
|
|
332
|
+
export declare function httpOperation(name: HttpOperationName): HttpOperationDefinition & OperationSchemas;
|
|
333
|
+
export {};
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
export declare const generatedRpcLimits: {
|
|
2
|
+
readonly maxJsonBytes: 1048576;
|
|
3
|
+
readonly maxJsonDepth: 64;
|
|
4
|
+
readonly maxListEntries: 100;
|
|
5
|
+
readonly defaultDeadlineMs: 10000;
|
|
6
|
+
readonly maxDeadlineMs: 30000;
|
|
7
|
+
};
|
|
8
|
+
export declare const generatedHttpOperations: {
|
|
9
|
+
readonly getAppHealth: {
|
|
10
|
+
readonly failures: {
|
|
11
|
+
readonly "503": "The app is unhealthy.";
|
|
12
|
+
};
|
|
13
|
+
readonly method: "GET";
|
|
14
|
+
readonly path: "/app/v1/health";
|
|
15
|
+
readonly response: "AppHealth";
|
|
16
|
+
readonly socket: "app.sock";
|
|
17
|
+
readonly status: 200;
|
|
18
|
+
readonly summary: "Check app process health";
|
|
19
|
+
};
|
|
20
|
+
readonly getAppReadiness: {
|
|
21
|
+
readonly failures: {
|
|
22
|
+
readonly "503": "The app or its required context is unavailable.";
|
|
23
|
+
};
|
|
24
|
+
readonly method: "GET";
|
|
25
|
+
readonly path: "/app/v1/ready";
|
|
26
|
+
readonly response: "AppReadiness";
|
|
27
|
+
readonly socket: "app.sock";
|
|
28
|
+
readonly status: 200;
|
|
29
|
+
readonly summary: "Check readiness for the negotiated generation";
|
|
30
|
+
};
|
|
31
|
+
readonly activateApp: {
|
|
32
|
+
readonly idempotencyKey: true;
|
|
33
|
+
readonly method: "POST";
|
|
34
|
+
readonly path: "/app/v1/lifecycle/activate";
|
|
35
|
+
readonly socket: "app.sock";
|
|
36
|
+
readonly status: 204;
|
|
37
|
+
readonly summary: "Activate the prepared app generation";
|
|
38
|
+
};
|
|
39
|
+
readonly drainApp: {
|
|
40
|
+
readonly idempotencyKey: true;
|
|
41
|
+
readonly method: "POST";
|
|
42
|
+
readonly path: "/app/v1/lifecycle/drain";
|
|
43
|
+
readonly socket: "app.sock";
|
|
44
|
+
readonly status: 204;
|
|
45
|
+
readonly summary: "Drain the active app generation";
|
|
46
|
+
};
|
|
47
|
+
readonly deactivateApp: {
|
|
48
|
+
readonly idempotencyKey: true;
|
|
49
|
+
readonly method: "POST";
|
|
50
|
+
readonly path: "/app/v1/lifecycle/deactivate";
|
|
51
|
+
readonly socket: "app.sock";
|
|
52
|
+
readonly status: 204;
|
|
53
|
+
readonly summary: "Deactivate the drained app generation";
|
|
54
|
+
};
|
|
55
|
+
readonly callAppApi: {
|
|
56
|
+
readonly description: "The authenticated gateway verifies current user and resource access, then validates the request and result against the installed package API for this operation ID.";
|
|
57
|
+
readonly idempotencyKey: true;
|
|
58
|
+
readonly method: "POST";
|
|
59
|
+
readonly path: "/app/v1/api/{operationId}";
|
|
60
|
+
readonly pathParameter: "operationId";
|
|
61
|
+
readonly request: "AppApiPayload";
|
|
62
|
+
readonly response: "AppApiPayload";
|
|
63
|
+
readonly socket: "app.sock";
|
|
64
|
+
readonly status: 200;
|
|
65
|
+
readonly summary: "Invoke an app-owned operation declared by the package";
|
|
66
|
+
};
|
|
67
|
+
readonly invokeAppProvider: {
|
|
68
|
+
readonly description: "The broker derives the provider from the active registration. Its profile, operation discriminants and resource identities must match the invocation and result. Accepted long-running provider work may carry a durable Operation.";
|
|
69
|
+
readonly idempotencyKey: true;
|
|
70
|
+
readonly method: "POST";
|
|
71
|
+
readonly path: "/app/v1/providers/{providerId}";
|
|
72
|
+
readonly pathParameter: "providerId";
|
|
73
|
+
readonly request: "ProviderRequest";
|
|
74
|
+
readonly response: "ProviderResult";
|
|
75
|
+
readonly socket: "app.sock";
|
|
76
|
+
readonly status: 200;
|
|
77
|
+
readonly summary: "Invoke a negotiated provider operation";
|
|
78
|
+
};
|
|
79
|
+
readonly getPlatformContext: {
|
|
80
|
+
readonly description: "An authenticated candidate generation may read its own context while preparing for readiness. Other operations require an active generation and current authorization.";
|
|
81
|
+
readonly method: "GET";
|
|
82
|
+
readonly path: "/platform/v1/context";
|
|
83
|
+
readonly response: "PlatformContext";
|
|
84
|
+
readonly socket: "core.sock";
|
|
85
|
+
readonly status: 200;
|
|
86
|
+
readonly summary: "Read the verified installation context";
|
|
87
|
+
};
|
|
88
|
+
readonly checkAuthorization: {
|
|
89
|
+
readonly method: "POST";
|
|
90
|
+
readonly path: "/platform/v1/authorization";
|
|
91
|
+
readonly request: "AuthorizationRequest";
|
|
92
|
+
readonly response: "AuthorizationResult";
|
|
93
|
+
readonly socket: "core.sock";
|
|
94
|
+
readonly status: 200;
|
|
95
|
+
readonly summary: "Check current resource authorization";
|
|
96
|
+
};
|
|
97
|
+
readonly listProxyHosts: {
|
|
98
|
+
readonly method: "POST";
|
|
99
|
+
readonly path: "/platform/v1/proxy-hosts/query";
|
|
100
|
+
readonly request: "ProxyHostQuery";
|
|
101
|
+
readonly response: "ProxyHostPage";
|
|
102
|
+
readonly socket: "core.sock";
|
|
103
|
+
readonly status: 200;
|
|
104
|
+
readonly summary: "List proxy hosts within current grants";
|
|
105
|
+
};
|
|
106
|
+
readonly updateOwnedProxyHost: {
|
|
107
|
+
readonly description: "The platform controls ownership and configuration. Recheck current ownership, grants and revision before applying; conflicts preserve the currently applied proxy configuration.";
|
|
108
|
+
readonly idempotencyKey: true;
|
|
109
|
+
readonly method: "POST";
|
|
110
|
+
readonly path: "/platform/v1/proxy-hosts/owned";
|
|
111
|
+
readonly request: "OwnedProxyHostChange";
|
|
112
|
+
readonly response: "Operation";
|
|
113
|
+
readonly socket: "core.sock";
|
|
114
|
+
readonly status: 202;
|
|
115
|
+
readonly summary: "Apply a revision-checked change to an app-owned host";
|
|
116
|
+
};
|
|
117
|
+
readonly probeUpstream: {
|
|
118
|
+
readonly method: "POST";
|
|
119
|
+
readonly path: "/platform/v1/diagnostics/upstream";
|
|
120
|
+
readonly request: "UpstreamProbe";
|
|
121
|
+
readonly response: "UpstreamProbeResult";
|
|
122
|
+
readonly socket: "core.sock";
|
|
123
|
+
readonly status: 200;
|
|
124
|
+
readonly summary: "Run a bounded probe of an authorized proxy host upstream";
|
|
125
|
+
};
|
|
126
|
+
readonly probeUpstreams: {
|
|
127
|
+
readonly description: "Requires diagnostics.upstream.probe.v2. Each probe returns the stage result that built-in host monitoring classifies, so an app can classify it the same way. A probe the platform cannot run returns an explicit outcome instead of failing the batch.";
|
|
128
|
+
readonly method: "POST";
|
|
129
|
+
readonly path: "/platform/v1/diagnostics/upstream/batch";
|
|
130
|
+
readonly request: "UpstreamProbeBatch";
|
|
131
|
+
readonly response: "UpstreamProbeBatchResult";
|
|
132
|
+
readonly socket: "core.sock";
|
|
133
|
+
readonly status: 200;
|
|
134
|
+
readonly summary: "Probe authorized proxy host upstreams with monitoring-class admission";
|
|
135
|
+
};
|
|
136
|
+
readonly publishNotification: {
|
|
137
|
+
readonly idempotencyKey: true;
|
|
138
|
+
readonly method: "POST";
|
|
139
|
+
readonly path: "/platform/v1/notifications";
|
|
140
|
+
readonly request: "AppNotification";
|
|
141
|
+
readonly socket: "core.sock";
|
|
142
|
+
readonly status: 204;
|
|
143
|
+
readonly summary: "Publish an app-owned notification";
|
|
144
|
+
};
|
|
145
|
+
readonly setIncident: {
|
|
146
|
+
readonly description: "Requires notifications.incidents.manage.v1. The incident key is app-chosen and stays the same while the incident lasts. The platform deduplicates incidents per installation and key, and resolves the open incidents of an installation that stops, loses the grant or is removed.";
|
|
147
|
+
readonly failures: {
|
|
148
|
+
readonly "404": "The resource is unavailable to this installation.";
|
|
149
|
+
readonly "409": "The category is not declared, or the idempotency key was used for a different change.";
|
|
150
|
+
};
|
|
151
|
+
readonly idempotencyKey: true;
|
|
152
|
+
readonly method: "POST";
|
|
153
|
+
readonly path: "/platform/v1/incidents/{incidentKey}";
|
|
154
|
+
readonly pathParameter: "incidentKey";
|
|
155
|
+
readonly request: "AppIncidentChange";
|
|
156
|
+
readonly socket: "core.sock";
|
|
157
|
+
readonly status: 204;
|
|
158
|
+
readonly summary: "Open, update or resolve an app incident in platform notifications";
|
|
159
|
+
};
|
|
160
|
+
readonly recordAuditEvent: {
|
|
161
|
+
readonly description: "The platform supplies app, installation, actor and timestamp provenance from authenticated context.";
|
|
162
|
+
readonly idempotencyKey: true;
|
|
163
|
+
readonly method: "POST";
|
|
164
|
+
readonly path: "/platform/v1/audit-events";
|
|
165
|
+
readonly request: "AppAuditEvent";
|
|
166
|
+
readonly socket: "core.sock";
|
|
167
|
+
readonly status: 204;
|
|
168
|
+
readonly summary: "Record an app-owned audit event";
|
|
169
|
+
};
|
|
170
|
+
readonly readSecret: {
|
|
171
|
+
readonly failures: {
|
|
172
|
+
readonly "404": "The secret is unavailable to this installation.";
|
|
173
|
+
};
|
|
174
|
+
readonly method: "GET";
|
|
175
|
+
readonly path: "/platform/v1/secrets/{secretId}";
|
|
176
|
+
readonly pathParameter: "secretId";
|
|
177
|
+
readonly response: "AppSecret";
|
|
178
|
+
readonly socket: "core.sock";
|
|
179
|
+
readonly status: 200;
|
|
180
|
+
readonly summary: "Read a secret assigned to this app installation";
|
|
181
|
+
};
|
|
182
|
+
readonly getProvider: {
|
|
183
|
+
readonly failures: {
|
|
184
|
+
readonly "404": "The provider is unavailable to this installation.";
|
|
185
|
+
};
|
|
186
|
+
readonly method: "GET";
|
|
187
|
+
readonly path: "/platform/v1/providers/{providerId}";
|
|
188
|
+
readonly pathParameter: "providerId";
|
|
189
|
+
readonly response: "ProviderRegistration";
|
|
190
|
+
readonly socket: "core.sock";
|
|
191
|
+
readonly status: 200;
|
|
192
|
+
readonly summary: "Read an authorized provider registration";
|
|
193
|
+
};
|
|
194
|
+
readonly getOperation: {
|
|
195
|
+
readonly failures: {
|
|
196
|
+
readonly "404": "The operation is unavailable to this installation.";
|
|
197
|
+
};
|
|
198
|
+
readonly method: "GET";
|
|
199
|
+
readonly path: "/platform/v1/operations/{operationId}";
|
|
200
|
+
readonly pathParameter: "operationId";
|
|
201
|
+
readonly response: "Operation";
|
|
202
|
+
readonly socket: "core.sock";
|
|
203
|
+
readonly status: 200;
|
|
204
|
+
readonly summary: "Read an authorized durable operation";
|
|
205
|
+
};
|
|
206
|
+
readonly cancelOperation: {
|
|
207
|
+
readonly failures: {
|
|
208
|
+
readonly "404": "The operation is unavailable to this installation.";
|
|
209
|
+
};
|
|
210
|
+
readonly idempotencyKey: true;
|
|
211
|
+
readonly method: "POST";
|
|
212
|
+
readonly path: "/platform/v1/operations/{operationId}/cancel";
|
|
213
|
+
readonly pathParameter: "operationId";
|
|
214
|
+
readonly response: "Operation";
|
|
215
|
+
readonly socket: "core.sock";
|
|
216
|
+
readonly status: 202;
|
|
217
|
+
readonly summary: "Request cancellation of an authorized operation";
|
|
218
|
+
};
|
|
219
|
+
readonly subscribeToEvents: {
|
|
220
|
+
readonly description: "The SSE id is the resume cursor. Events are at least once. Deduplicate by the data event ID. Recheck active generation, grants, resource visibility, and delegation at delivery. Close the stream when subscription authority expires or is revoked.";
|
|
221
|
+
readonly event: "PlatformEvent";
|
|
222
|
+
readonly failures: {
|
|
223
|
+
readonly "410": "The cursor expired. Perform a full authorized resynchronization.";
|
|
224
|
+
};
|
|
225
|
+
readonly method: "GET";
|
|
226
|
+
readonly path: "/platform/v1/events";
|
|
227
|
+
readonly resumeCursor: true;
|
|
228
|
+
readonly socket: "core.sock";
|
|
229
|
+
readonly status: 200;
|
|
230
|
+
readonly summary: "Resume the permission-filtered durable stream";
|
|
231
|
+
};
|
|
232
|
+
readonly getLegacyHandoff: {
|
|
233
|
+
readonly description: "A legacy feature domain equals a provider profile. Every handoff operation acts only for the active generation of the calling installation. The state platform means the platform still owns the domain. The state exported means this installation is importing a fixed export. The state committed means this installation owns the domain.";
|
|
234
|
+
readonly failures: {
|
|
235
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
236
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
237
|
+
readonly "409": "Another installation holds the domain.";
|
|
238
|
+
};
|
|
239
|
+
readonly method: "GET";
|
|
240
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}";
|
|
241
|
+
readonly pathParameter: "domain";
|
|
242
|
+
readonly response: "LegacyHandoffStatus";
|
|
243
|
+
readonly socket: "core.sock";
|
|
244
|
+
readonly status: 200;
|
|
245
|
+
readonly summary: "Read the handoff state of a built-in feature domain";
|
|
246
|
+
};
|
|
247
|
+
readonly beginLegacyHandoff: {
|
|
248
|
+
readonly description: "Begin fences the platform writers of the domain and fixes one export of its configuration, credentials and history as ordered parts. While the export is open, repeating begin returns exported with the same digest and part count, so an interrupted import resumes. After commit, begin returns committed with the same digest and no part count.";
|
|
249
|
+
readonly failures: {
|
|
250
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
251
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
252
|
+
readonly "409": "Another installation holds the domain, or the idempotency key conflicts.";
|
|
253
|
+
};
|
|
254
|
+
readonly idempotencyKey: true;
|
|
255
|
+
readonly method: "POST";
|
|
256
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}/begin";
|
|
257
|
+
readonly pathParameter: "domain";
|
|
258
|
+
readonly response: "LegacyHandoffBeginResult";
|
|
259
|
+
readonly socket: "core.sock";
|
|
260
|
+
readonly status: 200;
|
|
261
|
+
readonly summary: "Fence platform writers and fix a built-in feature export";
|
|
262
|
+
};
|
|
263
|
+
readonly readLegacyHandoffPart: {
|
|
264
|
+
readonly description: "Read every sequence with 0 <= sequence < partCount and import each part durably before commit. An export with no parts needs no reads. The digest binds each read to the export that begin fixed, so a read never returns a part of a replaced export. A serialized part is at most 262144 bytes.";
|
|
265
|
+
readonly failures: {
|
|
266
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
267
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
268
|
+
readonly "404": "No export exists for this installation, or the sequence is not below the part count.";
|
|
269
|
+
readonly "409": "Another installation holds the domain, or the digest differs from the current export.";
|
|
270
|
+
readonly "503": "The stored part is unreadable. The platform must abort the handoff and export again.";
|
|
271
|
+
};
|
|
272
|
+
readonly method: "POST";
|
|
273
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}/parts";
|
|
274
|
+
readonly pathParameter: "domain";
|
|
275
|
+
readonly request: "LegacyHandoffPartRequest";
|
|
276
|
+
readonly response: "LegacyHandoffPart";
|
|
277
|
+
readonly socket: "core.sock";
|
|
278
|
+
readonly status: 200;
|
|
279
|
+
readonly summary: "Read one part of the fixed built-in feature export";
|
|
280
|
+
};
|
|
281
|
+
readonly commitLegacyHandoff: {
|
|
282
|
+
readonly description: "Commit exactly the digest that begin returned, after every part is imported durably. Commit retires the platform state once and transfers ownership to this installation. The result state is committed. Repeating commit with the same digest returns committed.";
|
|
283
|
+
readonly failures: {
|
|
284
|
+
readonly "401": "The credential is invalid, or the generation or its lease is no longer current.";
|
|
285
|
+
readonly "403": "The manifest does not declare the domain as a provider profile, or the installation lacks the provider grant for it.";
|
|
286
|
+
readonly "404": "No export exists for this installation.";
|
|
287
|
+
readonly "409": "Another installation holds the domain, the digest differs from the export, or the idempotency key conflicts.";
|
|
288
|
+
};
|
|
289
|
+
readonly idempotencyKey: true;
|
|
290
|
+
readonly method: "POST";
|
|
291
|
+
readonly path: "/platform/v1/legacy-handoffs/{domain}/commit";
|
|
292
|
+
readonly pathParameter: "domain";
|
|
293
|
+
readonly request: "LegacyHandoffCommit";
|
|
294
|
+
readonly response: "LegacyHandoffCommitResult";
|
|
295
|
+
readonly socket: "core.sock";
|
|
296
|
+
readonly status: 200;
|
|
297
|
+
readonly summary: "Commit an imported built-in feature export";
|
|
298
|
+
};
|
|
299
|
+
};
|