From 7e2494c5de03f35082e582bf9310051d0a116696 Mon Sep 17 00:00:00 2001 From: rig-bot Date: Mon, 17 Jun 2024 08:50:14 +0000 Subject: [PATCH] push latest version of APIs --- api/v1/capsule/rollout_pb.ts | 28 ++++---- model/git_pb.ts | 130 +++++++++++++++++++++++++++++++++++ model/revision_pb.ts | 7 ++ 3 files changed, 150 insertions(+), 15 deletions(-) diff --git a/api/v1/capsule/rollout_pb.ts b/api/v1/capsule/rollout_pb.ts index e757716..1fed3ff 100644 --- a/api/v1/capsule/rollout_pb.ts +++ b/api/v1/capsule/rollout_pb.ts @@ -10,9 +10,7 @@ import { CapsuleSpec } from "../../../platform/v1/generated_pb.js"; import { Author } from "../../../model/author_pb.js"; import { Change, ContainerSettings, HorizontalScale, Network } from "./change_pb.js"; import { CronJob } from "./job_pb.js"; -import { Revision } from "../project/revision_pb.js"; -import { Revision as Revision$1 } from "../environment/revision_pb.js"; -import { Revision as Revision$2, SetRevision } from "./revision_pb.js"; +import { RevisionMetadata } from "../../../model/revision_pb.js"; /** * @generated from enum api.v1.capsule.EventType @@ -286,24 +284,24 @@ export class ConfigFile extends Message { */ export class Revisions extends Message { /** - * @generated from field: api.v1.project.Revision project = 1; + * @generated from field: repeated model.RevisionMetadata projects = 1; */ - project?: Revision; + projects: RevisionMetadata[] = []; /** - * @generated from field: api.v1.environment.Revision environment = 2; + * @generated from field: repeated model.RevisionMetadata environments = 2; */ - environment?: Revision$1; + environments: RevisionMetadata[] = []; /** - * @generated from field: api.v1.capsule.SetRevision capsule_set = 3; + * @generated from field: repeated model.RevisionMetadata capsule_sets = 3; */ - capsuleSet?: SetRevision; + capsuleSets: RevisionMetadata[] = []; /** - * @generated from field: api.v1.capsule.Revision capsule = 4; + * @generated from field: repeated model.RevisionMetadata capsules = 4; */ - capsule?: Revision$2; + capsules: RevisionMetadata[] = []; constructor(data?: PartialMessage) { super(); @@ -313,10 +311,10 @@ export class Revisions extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "api.v1.capsule.Revisions"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "project", kind: "message", T: Revision }, - { no: 2, name: "environment", kind: "message", T: Revision$1 }, - { no: 3, name: "capsule_set", kind: "message", T: SetRevision }, - { no: 4, name: "capsule", kind: "message", T: Revision$2 }, + { no: 1, name: "projects", kind: "message", T: RevisionMetadata, repeated: true }, + { no: 2, name: "environments", kind: "message", T: RevisionMetadata, repeated: true }, + { no: 3, name: "capsule_sets", kind: "message", T: RevisionMetadata, repeated: true }, + { no: 4, name: "capsules", kind: "message", T: RevisionMetadata, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Revisions { diff --git a/model/git_pb.ts b/model/git_pb.ts index 7537c3e..361a346 100644 --- a/model/git_pb.ts +++ b/model/git_pb.ts @@ -7,6 +7,38 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialM import { Message, proto3 } from "@bufbuild/protobuf"; import { EnvironmentFilter } from "./environment_pb.js"; +/** + * @generated from enum model.GitProvider + */ +export enum GitProvider { + /** + * @generated from enum value: GIT_PROVIDER_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: GIT_PROVIDER_GITHUB = 1; + */ + GITHUB = 1, + + /** + * @generated from enum value: GIT_PROVIDER_GITLAB = 2; + */ + GITLAB = 2, + + /** + * @generated from enum value: GIT_PROVIDER_BITBUCKET = 3; + */ + BITBUCKET = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(GitProvider) +proto3.util.setEnumType(GitProvider, "model.GitProvider", [ + { no: 0, name: "GIT_PROVIDER_UNSPECIFIED" }, + { no: 1, name: "GIT_PROVIDER_GITHUB" }, + { no: 2, name: "GIT_PROVIDER_GITLAB" }, + { no: 3, name: "GIT_PROVIDER_BITBUCKET" }, +]); + /** * @generated from message model.GitStore */ @@ -74,3 +106,101 @@ export class GitStore extends Message { } } +/** + * @generated from message model.Commit + */ +export class Commit extends Message { + /** + * @generated from field: model.GitProvider provider = 1; + */ + provider = GitProvider.UNSPECIFIED; + + /** + * @generated from field: string repository = 2; + */ + repository = ""; + + /** + * @generated from field: string commit_id = 3; + */ + commitId = ""; + + /** + * @generated from field: string url = 4; + */ + url = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "model.Commit"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "provider", kind: "enum", T: proto3.getEnumType(GitProvider) }, + { no: 2, name: "repository", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "commit_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Commit { + return new Commit().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Commit { + return new Commit().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Commit { + return new Commit().fromJsonString(jsonString, options); + } + + static equals(a: Commit | PlainMessage | undefined, b: Commit | PlainMessage | undefined): boolean { + return proto3.util.equals(Commit, a, b); + } +} + +/** + * @generated from message model.GitChange + */ +export class GitChange extends Message { + /** + * @generated from field: model.Commit commit = 1; + */ + commit?: Commit; + + /** + * @generated from field: repeated string paths = 2; + */ + paths: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "model.GitChange"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "commit", kind: "message", T: Commit }, + { no: 2, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GitChange { + return new GitChange().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GitChange { + return new GitChange().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GitChange { + return new GitChange().fromJsonString(jsonString, options); + } + + static equals(a: GitChange | PlainMessage | undefined, b: GitChange | PlainMessage | undefined): boolean { + return proto3.util.equals(GitChange, a, b); + } +} + diff --git a/model/revision_pb.ts b/model/revision_pb.ts index 76a9b22..c4a53ff 100644 --- a/model/revision_pb.ts +++ b/model/revision_pb.ts @@ -6,6 +6,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, Timestamp } from "@bufbuild/protobuf"; import { Author } from "./author_pb.js"; +import { GitChange } from "./git_pb.js"; /** * @generated from message model.RevisionMetadata @@ -31,6 +32,11 @@ export class RevisionMetadata extends Message { */ fingerprint?: Fingerprint; + /** + * @generated from field: model.GitChange git_change = 5; + */ + gitChange?: GitChange; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -43,6 +49,7 @@ export class RevisionMetadata extends Message { { no: 2, name: "updated_at", kind: "message", T: Timestamp }, { no: 3, name: "updated_by", kind: "message", T: Author }, { no: 4, name: "fingerprint", kind: "message", T: Fingerprint }, + { no: 5, name: "git_change", kind: "message", T: GitChange }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): RevisionMetadata {