@sealant/api-contracts-next 0.40.0-next.789 → 0.40.0-next.791
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.
|
@@ -171,6 +171,14 @@ export declare const stopResourceInstanceRequestSchema: Schema.Struct<{
|
|
|
171
171
|
readonly by: Schema.String;
|
|
172
172
|
}>;
|
|
173
173
|
export type StopResourceInstanceRequest = typeof stopResourceInstanceRequestSchema.Type;
|
|
174
|
+
/** Bind irreversible deletion to an observed instance, even if its application key is reused. */
|
|
175
|
+
export declare const purgeResourceInstanceRequestSchema: Schema.Struct<{
|
|
176
|
+
readonly expectedInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
177
|
+
}>;
|
|
178
|
+
export declare const resourceInstancePurgeResultSchema: Schema.Struct<{
|
|
179
|
+
readonly kind: Schema.Literals<readonly ["purged", "already-purged"]>;
|
|
180
|
+
}>;
|
|
181
|
+
export type ResourceInstancePurgeResult = typeof resourceInstancePurgeResultSchema.Type;
|
|
174
182
|
export declare const resourceInstanceSchema: Schema.Struct<{
|
|
175
183
|
/** Stable caller-only endpoint; absent on workspace instances. */
|
|
176
184
|
readonly endpoint: Schema.optional<Schema.Struct<{
|
|
@@ -294,6 +302,12 @@ declare const ResourceInstanceArchivedError_base: Schema.Class<ResourceInstanceA
|
|
|
294
302
|
/** The key names an archived instance: it stays archived, and its volumes are kept. */
|
|
295
303
|
export declare class ResourceInstanceArchivedError extends ResourceInstanceArchivedError_base {
|
|
296
304
|
}
|
|
305
|
+
declare const ResourceInstancePurgeRefusedError_base: Schema.Class<ResourceInstancePurgeRefusedError, Schema.TaggedStruct<"ResourceInstancePurgeRefusedError", {
|
|
306
|
+
readonly message: Schema.String;
|
|
307
|
+
}>, import("effect/Cause").YieldableError>;
|
|
308
|
+
/** Purge requires a caller-owned, stopped instance with the expected identity. */
|
|
309
|
+
export declare class ResourceInstancePurgeRefusedError extends ResourceInstancePurgeRefusedError_base {
|
|
310
|
+
}
|
|
297
311
|
declare const ResourceInstanceAliasTakenError_base: Schema.Class<ResourceInstanceAliasTakenError, Schema.TaggedStruct<"ResourceInstanceAliasTakenError", {
|
|
298
312
|
readonly message: Schema.String;
|
|
299
313
|
}>, import("effect/Cause").YieldableError>;
|
|
@@ -557,7 +571,14 @@ export declare const ResourceInstancesGroup: HttpApiGroup.HttpApiGroup<"resource
|
|
|
557
571
|
readonly dockerName: Schema.String;
|
|
558
572
|
}>>;
|
|
559
573
|
}>>;
|
|
560
|
-
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceSpecRefusedError | typeof ResourceRuntimeUnsupportedError | typeof ResourceInstanceBusyError | typeof ResourceInstanceBudgetError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
574
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceSpecRefusedError | typeof ResourceRuntimeUnsupportedError | typeof ResourceInstanceBusyError | typeof ResourceInstanceBudgetError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"purgeResourceInstance", "POST", "/:resourceDomainId/instances/:key/purge", Schema.toCodecStringTree<Schema.Struct<{
|
|
575
|
+
readonly resourceDomainId: Schema.String;
|
|
576
|
+
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
577
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
578
|
+
readonly expectedInstanceId: Schema.brand<Schema.String, "ResourceInstanceId">;
|
|
579
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
580
|
+
readonly kind: Schema.Literals<readonly ["purged", "already-purged"]>;
|
|
581
|
+
}>>, Schema.toCodecJson<typeof ResourceDomainForbiddenError | typeof ResourceDomainNotFoundError | typeof ResourceDomainInternalServerError | typeof ResourceInstanceSpecRefusedError | typeof ResourceRuntimeUnsupportedError | typeof ResourceInstancePurgeRefusedError | typeof ResourceInstanceBusyError | typeof ResourceInstanceBudgetError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stopResourceInstance", "POST", "/:resourceDomainId/instances/:key/stop", Schema.toCodecStringTree<Schema.Struct<{
|
|
561
582
|
readonly resourceDomainId: Schema.String;
|
|
562
583
|
readonly key: Schema.brand<Schema.String, "ResourceInstanceKey">;
|
|
563
584
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -205,6 +205,13 @@ export const stopResourceInstanceRequestSchema = Schema.Struct({
|
|
|
205
205
|
/** The application's words for who stopped it (Mend: a display name). */
|
|
206
206
|
by: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(200)),
|
|
207
207
|
});
|
|
208
|
+
/** Bind irreversible deletion to an observed instance, even if its application key is reused. */
|
|
209
|
+
export const purgeResourceInstanceRequestSchema = Schema.Struct({
|
|
210
|
+
expectedInstanceId: ResourceInstanceId,
|
|
211
|
+
});
|
|
212
|
+
export const resourceInstancePurgeResultSchema = Schema.Struct({
|
|
213
|
+
kind: Schema.Literals(["purged", "already-purged"]),
|
|
214
|
+
});
|
|
208
215
|
const Timestamp = Schema.String;
|
|
209
216
|
export const resourceInstanceSchema = Schema.Struct({
|
|
210
217
|
/** Stable caller-only endpoint; absent on workspace instances. */
|
|
@@ -270,6 +277,9 @@ export class ResourceRuntimeUnsupportedError extends Schema.TaggedError()("Resou
|
|
|
270
277
|
/** The key names an archived instance: it stays archived, and its volumes are kept. */
|
|
271
278
|
export class ResourceInstanceArchivedError extends Schema.TaggedError()("ResourceInstanceArchivedError", { message: Schema.String }, { httpApiStatus: 409 }) {
|
|
272
279
|
}
|
|
280
|
+
/** Purge requires a caller-owned, stopped instance with the expected identity. */
|
|
281
|
+
export class ResourceInstancePurgeRefusedError extends Schema.TaggedError()("ResourceInstancePurgeRefusedError", { message: Schema.String }, { httpApiStatus: 409 }) {
|
|
282
|
+
}
|
|
273
283
|
/** Another instance that is not archived answers to this alias for the same worktree key. */
|
|
274
284
|
export class ResourceInstanceAliasTakenError extends Schema.TaggedError()("ResourceInstanceAliasTakenError", { message: Schema.String }, { httpApiStatus: 409 }) {
|
|
275
285
|
}
|
|
@@ -348,6 +358,12 @@ export const ResourceInstancesGroup = HttpApiGroup.make("resourceInstances")
|
|
|
348
358
|
volumes: Schema.Array(resourceInstanceArchivedVolumeSchema),
|
|
349
359
|
}),
|
|
350
360
|
error: [...baseErrors, ResourceInstanceNotFoundError, ResourceRuntimeUnsupportedError],
|
|
361
|
+
}))
|
|
362
|
+
.add(HttpApiEndpoint.post("purgeResourceInstance", "/:resourceDomainId/instances/:key/purge", {
|
|
363
|
+
params: instanceParams,
|
|
364
|
+
payload: purgeResourceInstanceRequestSchema,
|
|
365
|
+
success: resourceInstancePurgeResultSchema,
|
|
366
|
+
error: [...baseErrors, ResourceInstancePurgeRefusedError],
|
|
351
367
|
}))
|
|
352
368
|
.add(HttpApiEndpoint.put("linkResourceWorkspace", "/:resourceDomainId/workspace-links/:workspaceId", {
|
|
353
369
|
params: Schema.Struct({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sealant/api-contracts-next",
|
|
3
|
-
"version": "0.40.0-next.
|
|
3
|
+
"version": "0.40.0-next.791",
|
|
4
4
|
"description": "Contract-first HTTP API definitions for Sealant services",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"effect": "^4.0.5"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "b18cfe790bde2ec8f715311c5fa21ac1b2a8e68e",
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
}
|