@fabrika/control-contract 0.0.22 → 0.0.23
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/package.json +3 -3
- package/src/index.ts +19 -5
- package/src/rpc.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/control-contract",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typecheck": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@fabrika/app": "^0.0.
|
|
28
|
-
"@fabrika/provider-contract": "^0.0.
|
|
27
|
+
"@fabrika/app": "^0.0.23",
|
|
28
|
+
"@fabrika/provider-contract": "^0.0.23"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/index.ts
CHANGED
|
@@ -55,10 +55,6 @@ export interface GitHubSourceConnectionUnavailableDto extends GitHubSourceConnec
|
|
|
55
55
|
readonly state: 'unavailable'
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export interface GitHubSourceConnectionAdoptionRequiredDto extends GitHubSourceConnectionBaseDto {
|
|
59
|
-
readonly state: 'adoption-required'
|
|
60
|
-
}
|
|
61
|
-
|
|
62
58
|
export interface GitHubSourceConnectionSetupPendingDto extends GitHubSourceConnectionBaseDto {
|
|
63
59
|
readonly state: 'setup-pending'
|
|
64
60
|
readonly connectionId: string
|
|
@@ -136,7 +132,6 @@ export interface GitHubSourceConnectionRepairRequiredDto extends GitHubSourceCon
|
|
|
136
132
|
export type GitHubSourceConnectionStatusDto =
|
|
137
133
|
| GitHubSourceConnectionAnonymousDto
|
|
138
134
|
| GitHubSourceConnectionUnavailableDto
|
|
139
|
-
| GitHubSourceConnectionAdoptionRequiredDto
|
|
140
135
|
| GitHubSourceConnectionSetupPendingDto
|
|
141
136
|
| GitHubSourceConnectionInstallationRequiredDto
|
|
142
137
|
| GitHubSourceConnectionConnectedDto
|
|
@@ -242,7 +237,14 @@ export interface DeploymentNamespaceDto {
|
|
|
242
237
|
exclusiveAppId: string | null
|
|
243
238
|
target: ProviderEnvelopeDto
|
|
244
239
|
state: DeploymentNamespaceState
|
|
240
|
+
/**
|
|
241
|
+
* The last lifecycle failure, redacted and bounded, with its class in `lastErrorCode`: a stable
|
|
242
|
+
* identifier — a provider error code such as `insufficientPermissions`, or `internal` when the cause
|
|
243
|
+
* was not a typed provider failure — so a console can tell two failures apart without matching prose.
|
|
244
|
+
* A row written before the codes existed carries a message and no code.
|
|
245
|
+
*/
|
|
245
246
|
lastError: string | null
|
|
247
|
+
lastErrorCode: string | null
|
|
246
248
|
createdAt: number
|
|
247
249
|
}
|
|
248
250
|
|
|
@@ -266,6 +268,8 @@ export interface AdoptDeploymentNamespaceRequest {
|
|
|
266
268
|
export interface DeploymentNamespaceFactDto {
|
|
267
269
|
readonly label: string
|
|
268
270
|
readonly value: string
|
|
271
|
+
/** Set when the value names a LIVE provider resource that outlives the namespace row (see removal). */
|
|
272
|
+
readonly resource?: boolean
|
|
269
273
|
}
|
|
270
274
|
|
|
271
275
|
export interface DeploymentNamespacePresentationDto {
|
|
@@ -291,6 +295,16 @@ export interface DeploymentNamespaceListResponse {
|
|
|
291
295
|
operator: DeploymentNamespaceOperatorDto | null
|
|
292
296
|
}
|
|
293
297
|
|
|
298
|
+
/**
|
|
299
|
+
* What removal leaves behind. Fabrika deletes no provider resource: it holds OWNER on the projects it
|
|
300
|
+
* creates ([ADR-0034](../../../docs/decisions/0034-the-control-plane-creates-the-projects-it-owns.md)),
|
|
301
|
+
* so deleting one is a destructive act on live state that stays with the operator. The removed row is
|
|
302
|
+
* returned whole — its provider target and presentation name what is now unowned.
|
|
303
|
+
*/
|
|
304
|
+
export interface RemoveDeploymentNamespaceResponse {
|
|
305
|
+
readonly removed: DeploymentNamespaceDetailDto
|
|
306
|
+
}
|
|
307
|
+
|
|
294
308
|
export interface PlanDeploymentNamespaceRequest {
|
|
295
309
|
id: string
|
|
296
310
|
env: string
|
package/src/rpc.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
PutAppVarRequest,
|
|
21
21
|
RegisterAppRequest,
|
|
22
22
|
RegisterAppResponse,
|
|
23
|
+
RemoveDeploymentNamespaceResponse,
|
|
23
24
|
RunDto,
|
|
24
25
|
RunLogResponse,
|
|
25
26
|
RunTailResponse,
|
|
@@ -107,7 +108,6 @@ export interface GitHubSourceConnectionRpcContract {
|
|
|
107
108
|
status: RpcProcedure<void, GitHubSourceConnectionStatusDto>
|
|
108
109
|
list: RpcProcedure<GitHubSourceConnectionListInput, GitHubSourceConnectionListResponse>
|
|
109
110
|
start: RpcProcedure<StartGitHubSourceConnectionRequest, StartGitHubSourceConnectionResponse>
|
|
110
|
-
adoptExisting: RpcProcedure<void, GitHubSourceConnectionStatusDto>
|
|
111
111
|
verifyInstallation: RpcProcedure<GitHubSourceConnectionInput, GitHubSourceConnectionStatusDto>
|
|
112
112
|
repair: RpcProcedure<GitHubSourceConnectionInput, GitHubSourceConnectionStatusDto>
|
|
113
113
|
reconcile: RpcProcedure<GitHubSourceConnectionInput, GitHubSourceConnectionStatusDto>
|
|
@@ -150,6 +150,8 @@ export interface ControlRpcContract {
|
|
|
150
150
|
create: RpcProcedure<CreateDeploymentNamespaceRequest, DeploymentNamespaceDetailDto>
|
|
151
151
|
adopt: RpcProcedure<AdoptNamespaceInput, DeploymentNamespaceDetailDto>
|
|
152
152
|
reconcile: RpcProcedure<NamespaceIdInput, DeploymentNamespaceDetailDto>
|
|
153
|
+
/** Free a namespace id. Refused while any app environment is registered in it (backlog 73). */
|
|
154
|
+
remove: RpcProcedure<NamespaceIdInput, RemoveDeploymentNamespaceResponse>
|
|
153
155
|
}
|
|
154
156
|
runs: {
|
|
155
157
|
list: RpcProcedure<RunListInput, CursorList<RunDto>>
|