From 463119eebfbf16631b40812c297a5153f918612e Mon Sep 17 00:00:00 2001 From: Engineering Date: Thu, 1 Aug 2024 12:10:59 +0000 Subject: [PATCH] Updated to SDP v0.18.4-318-g2712d72 --- ... => apikeys-ApiKeyService_connectquery.ts} | 4 +- .../{apikey_connect.ts => apikeys_connect.ts} | 4 +- .../{apikey_pb.ts => apikeys_pb.ts} | 2 +- ...onfig-ConfigurationService_connectquery.ts | 52 +++- src/__generated__/config_connect.ts | 37 ++- src/__generated__/config_pb.ts | 262 ++++++++++++++++++ 6 files changed, 354 insertions(+), 7 deletions(-) rename src/__generated__/{apikey-ApiKeyService_connectquery.ts => apikeys-ApiKeyService_connectquery.ts} (95%) rename src/__generated__/{apikey_connect.ts => apikeys_connect.ts} (96%) rename src/__generated__/{apikey_pb.ts => apikeys_pb.ts} (99%) diff --git a/src/__generated__/apikey-ApiKeyService_connectquery.ts b/src/__generated__/apikeys-ApiKeyService_connectquery.ts similarity index 95% rename from src/__generated__/apikey-ApiKeyService_connectquery.ts rename to src/__generated__/apikeys-ApiKeyService_connectquery.ts index c30f21d..9755c4b 100644 --- a/src/__generated__/apikey-ApiKeyService_connectquery.ts +++ b/src/__generated__/apikeys-ApiKeyService_connectquery.ts @@ -1,10 +1,10 @@ // @generated by protoc-gen-connect-query v1.4.1 with parameter "target=ts,import_extension=.ts" -// @generated from file apikey.proto (package apikeys, syntax proto3) +// @generated from file apikeys.proto (package apikeys, syntax proto3) /* eslint-disable */ // @ts-nocheck import { MethodKind } from "@bufbuild/protobuf"; -import { CreateAPIKeyRequest, CreateAPIKeyResponse, DeleteAPIKeyRequest, DeleteAPIKeyResponse, ExchangeKeyForTokenRequest, ExchangeKeyForTokenResponse, GetAPIKeyRequest, GetAPIKeyResponse, ListAPIKeysRequest, ListAPIKeysResponse, UpdateAPIKeyRequest, UpdateAPIKeyResponse } from "./apikey_pb.ts"; +import { CreateAPIKeyRequest, CreateAPIKeyResponse, DeleteAPIKeyRequest, DeleteAPIKeyResponse, ExchangeKeyForTokenRequest, ExchangeKeyForTokenResponse, GetAPIKeyRequest, GetAPIKeyResponse, ListAPIKeysRequest, ListAPIKeysResponse, UpdateAPIKeyRequest, UpdateAPIKeyResponse } from "./apikeys_pb.ts"; /** * Creates an API key, pending access token generation from Auth0. The key diff --git a/src/__generated__/apikey_connect.ts b/src/__generated__/apikeys_connect.ts similarity index 96% rename from src/__generated__/apikey_connect.ts rename to src/__generated__/apikeys_connect.ts index 2b72ccb..e543097 100644 --- a/src/__generated__/apikey_connect.ts +++ b/src/__generated__/apikeys_connect.ts @@ -1,9 +1,9 @@ // @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts,import_extension=.ts" -// @generated from file apikey.proto (package apikeys, syntax proto3) +// @generated from file apikeys.proto (package apikeys, syntax proto3) /* eslint-disable */ // @ts-nocheck -import { CreateAPIKeyRequest, CreateAPIKeyResponse, DeleteAPIKeyRequest, DeleteAPIKeyResponse, ExchangeKeyForTokenRequest, ExchangeKeyForTokenResponse, GetAPIKeyRequest, GetAPIKeyResponse, ListAPIKeysRequest, ListAPIKeysResponse, UpdateAPIKeyRequest, UpdateAPIKeyResponse } from "./apikey_pb.ts"; +import { CreateAPIKeyRequest, CreateAPIKeyResponse, DeleteAPIKeyRequest, DeleteAPIKeyResponse, ExchangeKeyForTokenRequest, ExchangeKeyForTokenResponse, GetAPIKeyRequest, GetAPIKeyResponse, ListAPIKeysRequest, ListAPIKeysResponse, UpdateAPIKeyRequest, UpdateAPIKeyResponse } from "./apikeys_pb.ts"; import { MethodKind } from "@bufbuild/protobuf"; /** diff --git a/src/__generated__/apikey_pb.ts b/src/__generated__/apikeys_pb.ts similarity index 99% rename from src/__generated__/apikey_pb.ts rename to src/__generated__/apikeys_pb.ts index d577c61..664a809 100644 --- a/src/__generated__/apikey_pb.ts +++ b/src/__generated__/apikeys_pb.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=.ts" -// @generated from file apikey.proto (package apikeys, syntax proto3) +// @generated from file apikeys.proto (package apikeys, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/src/__generated__/config-ConfigurationService_connectquery.ts b/src/__generated__/config-ConfigurationService_connectquery.ts index 61b8eb7..9c25c58 100644 --- a/src/__generated__/config-ConfigurationService_connectquery.ts +++ b/src/__generated__/config-ConfigurationService_connectquery.ts @@ -4,7 +4,7 @@ // @ts-nocheck import { MethodKind } from "@bufbuild/protobuf"; -import { GetAccountConfigRequest, GetAccountConfigResponse, UpdateAccountConfigRequest, UpdateAccountConfigResponse } from "./config_pb.ts"; +import { CreateHcpConfigRequest, CreateHcpConfigResponse, DeleteHcpConfigRequest, DeleteHcpConfigResponse, GetAccountConfigRequest, GetAccountConfigResponse, GetHcpConfigRequest, GetHcpConfigResponse, UpdateAccountConfigRequest, UpdateAccountConfigResponse } from "./config_pb.ts"; /** * Get the account config for the user's account @@ -37,3 +37,53 @@ export const updateAccountConfig = { typeName: "config.ConfigurationService" } } as const; + +/** + * Create a new HCP Terraform config for the user's account. This follows + * the same flow as CreateAPIKey, to create a new API key that is then used + * for the HCP Terraform endpoint URL. + * + * @generated from rpc config.ConfigurationService.CreateHcpConfig + */ +export const createHcpConfig = { + localName: "createHcpConfig", + name: "CreateHcpConfig", + kind: MethodKind.Unary, + I: CreateHcpConfigRequest, + O: CreateHcpConfigResponse, + service: { + typeName: "config.ConfigurationService" + } +} as const; + +/** + * Get the existing HCP Terraform config for the user's account. + * + * @generated from rpc config.ConfigurationService.GetHcpConfig + */ +export const getHcpConfig = { + localName: "getHcpConfig", + name: "GetHcpConfig", + kind: MethodKind.Unary, + I: GetHcpConfigRequest, + O: GetHcpConfigResponse, + service: { + typeName: "config.ConfigurationService" + } +} as const; + +/** + * Remove the existing HCP Terraform config from the user's account. + * + * @generated from rpc config.ConfigurationService.DeleteHcpConfig + */ +export const deleteHcpConfig = { + localName: "deleteHcpConfig", + name: "DeleteHcpConfig", + kind: MethodKind.Unary, + I: DeleteHcpConfigRequest, + O: DeleteHcpConfigResponse, + service: { + typeName: "config.ConfigurationService" + } +} as const; diff --git a/src/__generated__/config_connect.ts b/src/__generated__/config_connect.ts index 57b335e..638ef4a 100644 --- a/src/__generated__/config_connect.ts +++ b/src/__generated__/config_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { GetAccountConfigRequest, GetAccountConfigResponse, UpdateAccountConfigRequest, UpdateAccountConfigResponse } from "./config_pb.ts"; +import { CreateHcpConfigRequest, CreateHcpConfigResponse, DeleteHcpConfigRequest, DeleteHcpConfigResponse, GetAccountConfigRequest, GetAccountConfigResponse, GetHcpConfigRequest, GetHcpConfigResponse, UpdateAccountConfigRequest, UpdateAccountConfigResponse } from "./config_pb.ts"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -36,6 +36,41 @@ export const ConfigurationService = { O: UpdateAccountConfigResponse, kind: MethodKind.Unary, }, + /** + * Create a new HCP Terraform config for the user's account. This follows + * the same flow as CreateAPIKey, to create a new API key that is then used + * for the HCP Terraform endpoint URL. + * + * @generated from rpc config.ConfigurationService.CreateHcpConfig + */ + createHcpConfig: { + name: "CreateHcpConfig", + I: CreateHcpConfigRequest, + O: CreateHcpConfigResponse, + kind: MethodKind.Unary, + }, + /** + * Get the existing HCP Terraform config for the user's account. + * + * @generated from rpc config.ConfigurationService.GetHcpConfig + */ + getHcpConfig: { + name: "GetHcpConfig", + I: GetHcpConfigRequest, + O: GetHcpConfigResponse, + kind: MethodKind.Unary, + }, + /** + * Remove the existing HCP Terraform config from the user's account. + * + * @generated from rpc config.ConfigurationService.DeleteHcpConfig + */ + deleteHcpConfig: { + name: "DeleteHcpConfig", + I: DeleteHcpConfigRequest, + O: DeleteHcpConfigResponse, + kind: MethodKind.Unary, + }, } } as const; diff --git a/src/__generated__/config_pb.ts b/src/__generated__/config_pb.ts index 266a37b..664002a 100644 --- a/src/__generated__/config_pb.ts +++ b/src/__generated__/config_pb.ts @@ -5,6 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; +import { CreateAPIKeyResponse } from "./apikeys_pb.ts"; /** * The config that is used when calculating the blast radius for a change, this @@ -301,3 +302,264 @@ export class UpdateAccountConfigResponse extends Message { + /** + * The URL that the user should be redirected to after the whole process is + * over. This should be a page in the frontend, probably the HCP Terraform + * Integration page. + * + * @generated from field: string finalFrontendRedirect = 1; + */ + finalFrontendRedirect = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.CreateHcpConfigRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "finalFrontendRedirect", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateHcpConfigRequest { + return new CreateHcpConfigRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateHcpConfigRequest { + return new CreateHcpConfigRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateHcpConfigRequest { + return new CreateHcpConfigRequest().fromJsonString(jsonString, options); + } + + static equals(a: CreateHcpConfigRequest | PlainMessage | undefined, b: CreateHcpConfigRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateHcpConfigRequest, a, b); + } +} + +/** + * @generated from message config.CreateHcpConfigResponse + */ +export class CreateHcpConfigResponse extends Message { + /** + * @generated from field: config.HcpConfig config = 1; + */ + config?: HcpConfig; + + /** + * @generated from field: apikeys.CreateAPIKeyResponse apiKey = 2; + */ + apiKey?: CreateAPIKeyResponse; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.CreateHcpConfigResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "config", kind: "message", T: HcpConfig }, + { no: 2, name: "apiKey", kind: "message", T: CreateAPIKeyResponse }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateHcpConfigResponse { + return new CreateHcpConfigResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateHcpConfigResponse { + return new CreateHcpConfigResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateHcpConfigResponse { + return new CreateHcpConfigResponse().fromJsonString(jsonString, options); + } + + static equals(a: CreateHcpConfigResponse | PlainMessage | undefined, b: CreateHcpConfigResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateHcpConfigResponse, a, b); + } +} + +/** + * @generated from message config.HcpConfig + */ +export class HcpConfig extends Message { + /** + * the Endpoint URL for the HCP Run Task configuration + * + * @generated from field: string endpoint = 1; + */ + endpoint = ""; + + /** + * the HMAC secret for the HCP Run Task configuration + * + * @generated from field: string secret = 2; + */ + secret = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.HcpConfig"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "secret", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): HcpConfig { + return new HcpConfig().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): HcpConfig { + return new HcpConfig().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): HcpConfig { + return new HcpConfig().fromJsonString(jsonString, options); + } + + static equals(a: HcpConfig | PlainMessage | undefined, b: HcpConfig | PlainMessage | undefined): boolean { + return proto3.util.equals(HcpConfig, a, b); + } +} + +/** + * @generated from message config.GetHcpConfigRequest + */ +export class GetHcpConfigRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.GetHcpConfigRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetHcpConfigRequest { + return new GetHcpConfigRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetHcpConfigRequest { + return new GetHcpConfigRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetHcpConfigRequest { + return new GetHcpConfigRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetHcpConfigRequest | PlainMessage | undefined, b: GetHcpConfigRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetHcpConfigRequest, a, b); + } +} + +/** + * @generated from message config.GetHcpConfigResponse + */ +export class GetHcpConfigResponse extends Message { + /** + * @generated from field: config.HcpConfig config = 1; + */ + config?: HcpConfig; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.GetHcpConfigResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "config", kind: "message", T: HcpConfig }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetHcpConfigResponse { + return new GetHcpConfigResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetHcpConfigResponse { + return new GetHcpConfigResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetHcpConfigResponse { + return new GetHcpConfigResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetHcpConfigResponse | PlainMessage | undefined, b: GetHcpConfigResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetHcpConfigResponse, a, b); + } +} + +/** + * @generated from message config.DeleteHcpConfigRequest + */ +export class DeleteHcpConfigRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.DeleteHcpConfigRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteHcpConfigRequest { + return new DeleteHcpConfigRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteHcpConfigRequest { + return new DeleteHcpConfigRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeleteHcpConfigRequest { + return new DeleteHcpConfigRequest().fromJsonString(jsonString, options); + } + + static equals(a: DeleteHcpConfigRequest | PlainMessage | undefined, b: DeleteHcpConfigRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(DeleteHcpConfigRequest, a, b); + } +} + +/** + * @generated from message config.DeleteHcpConfigResponse + */ +export class DeleteHcpConfigResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "config.DeleteHcpConfigResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteHcpConfigResponse { + return new DeleteHcpConfigResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteHcpConfigResponse { + return new DeleteHcpConfigResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeleteHcpConfigResponse { + return new DeleteHcpConfigResponse().fromJsonString(jsonString, options); + } + + static equals(a: DeleteHcpConfigResponse | PlainMessage | undefined, b: DeleteHcpConfigResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(DeleteHcpConfigResponse, a, b); + } +} +