From 2ca64dfad49ffa395c8b83fba95f0602e00ae2b2 Mon Sep 17 00:00:00 2001 From: rig-bot Date: Thu, 23 May 2024 12:22:43 +0000 Subject: [PATCH] push latest version of APIs --- api/v1/capsule/service_connect.ts | 22 ++- api/v1/capsule/service_pb.ts | 217 ++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+), 1 deletion(-) diff --git a/api/v1/capsule/service_connect.ts b/api/v1/capsule/service_connect.ts index 9087dea..605cef3 100644 --- a/api/v1/capsule/service_connect.ts +++ b/api/v1/capsule/service_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { AbortRolloutRequest, AbortRolloutResponse, CapsuleMetricsRequest, CapsuleMetricsResponse, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, DeployRequest, DeployResponse, ExecuteRequest, ExecuteResponse, GetCustomInstanceMetricsRequest, GetCustomInstanceMetricsResponse, GetInstanceStatusRequest, GetInstanceStatusResponse, GetJobExecutionsRequest, GetJobExecutionsResponse, GetRequest, GetResponse, GetRolloutRequest, GetRolloutResponse, GetStatusRequest, GetStatusResponse, ListEventsRequest, ListEventsResponse, ListInstancesRequest, ListInstancesResponse, ListInstanceStatusesRequest, ListInstanceStatusesResponse, ListRequest, ListResponse, ListRolloutsRequest, ListRolloutsResponse, LogsRequest, LogsResponse, RestartInstanceRequest, RestartInstanceResponse, StopRolloutRequest, StopRolloutResponse, UpdateRequest, UpdateResponse } from "./service_pb.js"; +import { AbortRolloutRequest, AbortRolloutResponse, ApplyCapsuleSpecRequest, ApplyCapsuleSpecResponse, CapsuleMetricsRequest, CapsuleMetricsResponse, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, DeployRequest, DeployResponse, ExecuteRequest, ExecuteResponse, GetCustomInstanceMetricsRequest, GetCustomInstanceMetricsResponse, GetInstanceStatusRequest, GetInstanceStatusResponse, GetJobExecutionsRequest, GetJobExecutionsResponse, GetRequest, GetResponse, GetRevisionRequest, GetRevisionResponse, GetRolloutRequest, GetRolloutResponse, GetStatusRequest, GetStatusResponse, ListEventsRequest, ListEventsResponse, ListInstancesRequest, ListInstancesResponse, ListInstanceStatusesRequest, ListInstanceStatusesResponse, ListRequest, ListResponse, ListRolloutsRequest, ListRolloutsResponse, LogsRequest, LogsResponse, RestartInstanceRequest, RestartInstanceResponse, StopRolloutRequest, StopRolloutResponse, UpdateRequest, UpdateResponse } from "./service_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -94,6 +94,17 @@ export const Service = { O: DeployResponse, kind: MethodKind.Unary, }, + /** + * Applies a Capsule spec in an environment which will be rolled out + * + * @generated from rpc api.v1.capsule.Service.ApplyCapsuleSpec + */ + applyCapsuleSpec: { + name: "ApplyCapsuleSpec", + I: ApplyCapsuleSpecRequest, + O: ApplyCapsuleSpecResponse, + kind: MethodKind.Unary, + }, /** * Lists all instances for the capsule. * @@ -245,6 +256,15 @@ export const Service = { O: GetStatusResponse, kind: MethodKind.Unary, }, + /** + * @generated from rpc api.v1.capsule.Service.GetRevision + */ + getRevision: { + name: "GetRevision", + I: GetRevisionRequest, + O: GetRevisionResponse, + kind: MethodKind.Unary, + }, } } as const; diff --git a/api/v1/capsule/service_pb.ts b/api/v1/capsule/service_pb.ts index 9920acc..44c6fd0 100644 --- a/api/v1/capsule/service_pb.ts +++ b/api/v1/capsule/service_pb.ts @@ -7,10 +7,13 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM import { Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; import { Status } from "./status_pb.js"; import { Capsule, Update } from "./capsule_pb.js"; +import { Revision, SetRevision } from "./revision_pb.js"; import { Log } from "./log_pb.js"; import { Pagination } from "../../../model/common_pb.js"; import { Change } from "./change_pb.js"; import { Rollout, RolloutConfig } from "./rollout_pb.js"; +import { CapsuleSpec } from "../../../platform/v1/generated_pb.js"; +import { Fingerprint } from "../../../model/revision_pb.js"; import { Instance } from "./instance_pb.js"; import { Status as Status$1 } from "./instance/status_pb.js"; import { Event } from "./event_pb.js"; @@ -603,6 +606,16 @@ export class GetResponse extends Message { */ capsule?: Capsule; + /** + * @generated from field: api.v1.capsule.SetRevision revision = 2; + */ + revision?: SetRevision; + + /** + * @generated from field: map environment_revisions = 3; + */ + environmentRevisions: { [key: string]: Revision } = {}; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -612,6 +625,8 @@ export class GetResponse extends Message { static readonly typeName = "api.v1.capsule.GetResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "capsule", kind: "message", T: Capsule }, + { no: 2, name: "revision", kind: "message", T: SetRevision }, + { no: 3, name: "environment_revisions", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: Revision} }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetResponse { @@ -1201,6 +1216,110 @@ export class DeployResponse extends Message { } } +/** + * @generated from message api.v1.capsule.ApplyCapsuleSpecRequest + */ +export class ApplyCapsuleSpecRequest extends Message { + /** + * @generated from field: platform.v1.CapsuleSpec spec = 1; + */ + spec?: CapsuleSpec; + + /** + * @generated from field: string project_id = 2; + */ + projectId = ""; + + /** + * @generated from field: string environment_id = 3; + */ + environmentId = ""; + + /** + * @generated from field: string capsule_id = 4; + */ + capsuleId = ""; + + /** + * @generated from field: model.Fingerprint current_fingerprint = 5; + */ + currentFingerprint?: Fingerprint; + + /** + * @generated from field: bool dry_run = 6; + */ + dryRun = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.capsule.ApplyCapsuleSpecRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "spec", kind: "message", T: CapsuleSpec }, + { no: 2, name: "project_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "environment_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "capsule_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "current_fingerprint", kind: "message", T: Fingerprint }, + { no: 6, name: "dry_run", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ApplyCapsuleSpecRequest { + return new ApplyCapsuleSpecRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ApplyCapsuleSpecRequest { + return new ApplyCapsuleSpecRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ApplyCapsuleSpecRequest { + return new ApplyCapsuleSpecRequest().fromJsonString(jsonString, options); + } + + static equals(a: ApplyCapsuleSpecRequest | PlainMessage | undefined, b: ApplyCapsuleSpecRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ApplyCapsuleSpecRequest, a, b); + } +} + +/** + * @generated from message api.v1.capsule.ApplyCapsuleSpecResponse + */ +export class ApplyCapsuleSpecResponse extends Message { + /** + * @generated from field: model.Fingerprint fingerprint = 1; + */ + fingerprint?: Fingerprint; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.capsule.ApplyCapsuleSpecResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "fingerprint", kind: "message", T: Fingerprint }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ApplyCapsuleSpecResponse { + return new ApplyCapsuleSpecResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ApplyCapsuleSpecResponse { + return new ApplyCapsuleSpecResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ApplyCapsuleSpecResponse { + return new ApplyCapsuleSpecResponse().fromJsonString(jsonString, options); + } + + static equals(a: ApplyCapsuleSpecResponse | PlainMessage | undefined, b: ApplyCapsuleSpecResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ApplyCapsuleSpecResponse, a, b); + } +} + /** * List instances request. * @@ -1850,6 +1969,11 @@ export class GetRolloutResponse extends Message { */ rollout?: Rollout; + /** + * @generated from field: api.v1.capsule.Revision revision = 2; + */ + revision?: Revision; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1859,6 +1983,7 @@ export class GetRolloutResponse extends Message { static readonly typeName = "api.v1.capsule.GetRolloutResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "rollout", kind: "message", T: Rollout }, + { no: 2, name: "revision", kind: "message", T: Revision }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetRolloutResponse { @@ -2596,3 +2721,95 @@ export class GetJobExecutionsResponse extends Message } } +/** + * @generated from message api.v1.capsule.GetRevisionRequest + */ +export class GetRevisionRequest extends Message { + /** + * @generated from field: string project_id = 1; + */ + projectId = ""; + + /** + * @generated from field: string environment_id = 2; + */ + environmentId = ""; + + /** + * @generated from field: string capsule_id = 3; + */ + capsuleId = ""; + + /** + * @generated from field: model.Fingerprint fingerprint = 4; + */ + fingerprint?: Fingerprint; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.capsule.GetRevisionRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "project_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "environment_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "capsule_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "fingerprint", kind: "message", T: Fingerprint }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetRevisionRequest { + return new GetRevisionRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetRevisionRequest { + return new GetRevisionRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetRevisionRequest { + return new GetRevisionRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetRevisionRequest | PlainMessage | undefined, b: GetRevisionRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetRevisionRequest, a, b); + } +} + +/** + * @generated from message api.v1.capsule.GetRevisionResponse + */ +export class GetRevisionResponse extends Message { + /** + * @generated from field: api.v1.capsule.Revision revision = 1; + */ + revision?: Revision; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "api.v1.capsule.GetRevisionResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "revision", kind: "message", T: Revision }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetRevisionResponse { + return new GetRevisionResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetRevisionResponse { + return new GetRevisionResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetRevisionResponse { + return new GetRevisionResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetRevisionResponse | PlainMessage | undefined, b: GetRevisionResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetRevisionResponse, a, b); + } +} +