diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/CreateApiKeyCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/CreateApiKeyCommand.cs index c4758e088dc..625bf7069a4 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/CreateApiKeyCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/CreateApiKeyCommand.cs @@ -65,7 +65,7 @@ private async Task ExecuteAsync( } var choice = await console.PromptAsync( - "Do you want to create the API key scoped to an API or the whole workspace?", + Prompts.CreateApiKeyScope, ["Api", "Workspace"], cancellationToken); @@ -76,7 +76,7 @@ private async Task ExecuteAsync( apiId = await console.PromptForApiIdAsync( apisClient, workspaceId, - "For which API do you want to create an API key?", + Prompts.SelectApiForCreateApiKey, cancellationToken); } } diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/DeleteApiKeyCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/DeleteApiKeyCommand.cs index 44fd6e254b5..8533da72c07 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/DeleteApiKeyCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/DeleteApiKeyCommand.cs @@ -43,7 +43,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you really want to delete API key with ID '{keyId}'?", + Prompts.ConfirmDeleteApiKey(keyId), cancellationToken); if (!confirmed) diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/DeleteApiCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/DeleteApiCommand.cs index 5cc4949a0a3..3232b5e197c 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/DeleteApiCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/DeleteApiCommand.cs @@ -49,7 +49,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you really want to delete API {apiName.AsHighlight()}", + Prompts.ConfirmDeleteApi(apiName.AsHighlight()), cancellationToken); if (!confirmed) diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/SetApiSettingsCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/SetApiSettingsCommand.cs index da3b1e326f9..eb7012eab16 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/SetApiSettingsCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Apis/SetApiSettingsCommand.cs @@ -50,14 +50,14 @@ private static async Task ExecuteAsync( .ConfirmAsync( parseResult, Opt.Instance, - "Treat dangerous changes as breaking?", + Prompts.TreatDangerousChangesAsBreaking, ct); var allowBreakingSchemaChanges = await console .ConfirmAsync( parseResult, Opt.Instance, - "Allow breaking schema changes when no client breaks?", + Prompts.AllowBreakingSchemaChanges, ct); await using var activity = console.StartActivity( diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/CreateClientCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/CreateClientCommand.cs index 3d9624b5c5e..fbe998b33c5 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/CreateClientCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/CreateClientCommand.cs @@ -45,7 +45,7 @@ private static async Task ExecuteAsync( parseResult.AssertHasAuthentication(sessionService); var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to create a client?", + Prompts.SelectApiForCreateClient, parseResult, apisClient, sessionService, diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DeleteClientCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DeleteClientCommand.cs index b727e1b30b1..b94a20fc992 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DeleteClientCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DeleteClientCommand.cs @@ -39,7 +39,7 @@ private static async Task ExecuteAsync( parseResult.AssertHasAuthentication(sessionService); - const string clientMessage = "Which client do you want to delete?"; + const string clientMessage = Prompts.DeleteClient; var clientId = parseResult.GetRequiredValueIfNotInteractive(Opt.Instance, console); @@ -50,7 +50,7 @@ private static async Task ExecuteAsync( var apiId = await console.PromptForApiIdAsync( apisClient, workspaceId, - "For which API do you want to delete a client?", + Prompts.SelectApiForDeleteClient, cancellationToken); var selectedClient = await SelectClientPrompt @@ -72,7 +72,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you want to delete the client with ID {clientId}?".EscapeMarkup(), + Prompts.ConfirmDeleteClient(clientId).EscapeMarkup(), cancellationToken); if (!confirmed) diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientCommand.cs index 6f7660e6d26..a106f4105e3 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientCommand.cs @@ -40,7 +40,7 @@ private static async Task ExecuteAsync( var cursor = parseResult.GetValue(Opt.Instance); var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to list the clients?", + Prompts.SelectApiForListClients, parseResult, apisClient, sessionService, diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientPublishedVersionsCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientPublishedVersionsCommand.cs index 24427d57325..a1b176b44cb 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientPublishedVersionsCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientPublishedVersionsCommand.cs @@ -70,7 +70,7 @@ private static async Task RenderInteractiveAsync( if (clientId is null) { var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to list client versions?", + Prompts.SelectApiForListClientVersions, parseResult, apisClient, sessionService, ct); var selectedClient = await SelectClientPrompt diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientVersionsCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientVersionsCommand.cs index 7004ce0d619..fbf06ab85fe 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientVersionsCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientVersionsCommand.cs @@ -62,7 +62,7 @@ private static async Task RenderInteractiveAsync( if (clientId is null) { var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to list client versions?", + Prompts.SelectApiForListClientVersions, parseResult, apisClient, sessionService, ct); var selectedClient = await SelectClientPrompt diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Login/LoginCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Login/LoginCommand.cs index a97b04b25e8..0c9575842bc 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Login/LoginCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Login/LoginCommand.cs @@ -87,7 +87,7 @@ await sessionService.SelectWorkspaceAsync( var paginationContainer = PaginationContainer.CreateConnectionData(client.SelectWorkspacesAsync); var selected = await PagedSelectionPrompt .New(paginationContainer) - .Title("Which workspace do you want to use as your default?".AsQuestion()) + .Title(Prompts.SelectDefaultWorkspace.AsQuestion()) .UseConverter(x => x.Name) .RenderAsync(console, cancellationToken); @@ -100,7 +100,7 @@ await sessionService.SelectWorkspaceAsync( new Workspace(selected.Id, selected.Name), cancellationToken); - console.MarkupLine($"(Workspace: [green]{selected.Name.EscapeMarkup()}[/])"); + console.OkQuestion(Prompts.SelectDefaultWorkspace, selected.Name); return ExitCodes.Success; } diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/CreateMcpFeatureCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/CreateMcpFeatureCollectionCommand.cs index 0dbe28fb8d9..353d07b5d92 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/CreateMcpFeatureCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/CreateMcpFeatureCollectionCommand.cs @@ -44,7 +44,7 @@ private static async Task ExecuteAsync( parseResult.AssertHasAuthentication(sessionService); - var apiId = await console.GetOrPromptForApiIdAsync("For which API do you want to create an MCP Feature Collection?", parseResult, apisClient, sessionService, cancellationToken); + var apiId = await console.GetOrPromptForApiIdAsync(Prompts.SelectApiForCreateMcpFeatureCollection, parseResult, apisClient, sessionService, cancellationToken); var name = await console .PromptAsync("Name", defaultValue: null, parseResult, Opt.Instance, cancellationToken); diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs index 00ed0a70e91..5da23062fff 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs @@ -47,12 +47,12 @@ private static async Task ExecuteAsync( var apiId = await console.PromptForApiIdAsync( apisClient, workspaceId, - "For which API do you want to delete an MCP Feature Collection?", + Prompts.SelectApiForDeleteMcpFeatureCollection, cancellationToken); var selectedMcpFeatureCollection = await SelectMcpFeatureCollectionPrompt .New(client, apiId) - .Title("Which MCP Feature Collection do you want to delete?") + .Title(Prompts.DeleteMcpFeatureCollection) .RenderAsync(console, cancellationToken) ?? throw new ExitException("You did not select an MCP Feature Collection!"); mcpFeatureCollectionId = selectedMcpFeatureCollection.Id; @@ -62,7 +62,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you want to delete the MCP Feature Collection with the ID {mcpFeatureCollectionId}?" + Prompts.ConfirmDeleteMcpFeatureCollection(mcpFeatureCollectionId) .EscapeMarkup(), cancellationToken); diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs index 1be3e31dffc..53889cf91e2 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs @@ -55,7 +55,7 @@ private static async Task RenderInteractiveAsync( string? cursor, CancellationToken ct) { - var apiId = await console.GetOrPromptForApiIdAsync("For which API do you want to list the MCP Feature Collections?", parseResult, apisClient, sessionService, ct); + var apiId = await console.GetOrPromptForApiIdAsync(Prompts.SelectApiForListMcpFeatureCollections, parseResult, apisClient, sessionService, ct); var container = PaginationContainer .CreateConnectionData(async (after, first, token) => diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/CreateMockCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/CreateMockCommand.cs index b8b636ea2c6..06092e8fb7a 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/CreateMockCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/CreateMockCommand.cs @@ -61,7 +61,7 @@ private static async Task ExecuteAsync( parseResult.GetRequiredValue(Opt.Instance); var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to create a mock schema?", + Prompts.SelectApiForCreateMockSchema, parseResult, apisClient, sessionService, diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/ListMockCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/ListMockCommand.cs index 6b1db0bd0e1..9976ebd5cee 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/ListMockCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/ListMockCommand.cs @@ -55,7 +55,7 @@ private static async Task RenderInteractiveAsync( string? cursor, CancellationToken ct) { - var apiId = await console.GetOrPromptForApiIdAsync("For which API do you want to list the mock schemas?", parseResult, apisClient, sessionService, ct); + var apiId = await console.GetOrPromptForApiIdAsync(Prompts.SelectApiForListMockSchemas, parseResult, apisClient, sessionService, ct); var container = PaginationContainer .CreateConnectionData((after, first, token) => diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/CreateOpenApiCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/CreateOpenApiCollectionCommand.cs index 3cc33b3c3f6..46296121a3c 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/CreateOpenApiCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/CreateOpenApiCollectionCommand.cs @@ -44,7 +44,7 @@ private static async Task ExecuteAsync( parseResult.AssertHasAuthentication(sessionService); - var apiId = await console.GetOrPromptForApiIdAsync("For which API do you want to create an OpenAPI collection?", parseResult, apisClient, sessionService, cancellationToken); + var apiId = await console.GetOrPromptForApiIdAsync(Prompts.SelectApiForCreateOpenApiCollection, parseResult, apisClient, sessionService, cancellationToken); var name = await console .PromptAsync("Name", defaultValue: null, parseResult, Opt.Instance, cancellationToken); diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs index 3d9b8f1949b..a37ec61fce1 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs @@ -47,12 +47,12 @@ private static async Task ExecuteAsync( var apiId = await console.PromptForApiIdAsync( apisClient, workspaceId, - "For which API do you want to delete an OpenAPI collection?", + Prompts.SelectApiForDeleteOpenApiCollection, cancellationToken); var selectedOpenApiCollection = await SelectOpenApiCollectionPrompt .New(client, apiId) - .Title("Which OpenAPI collection do you want to delete?") + .Title(Prompts.DeleteOpenApiCollection) .RenderAsync(console, cancellationToken) ?? throw new ExitException("You did not select an OpenAPI collection!"); openApiCollectionId = selectedOpenApiCollection.Id; @@ -62,7 +62,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you want to delete the OpenAPI collection with the ID {openApiCollectionId}?" + Prompts.ConfirmDeleteOpenApiCollection(openApiCollectionId) .EscapeMarkup(), cancellationToken); diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs index 2a067aff50e..8149049a1d0 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs @@ -61,7 +61,7 @@ private static async Task RenderInteractiveAsync( string? cursor, CancellationToken ct) { - var apiId = await console.GetOrPromptForApiIdAsync("For which API do you want to list the OpenAPI collections?", parseResult, apisClient, sessionService, ct); + var apiId = await console.GetOrPromptForApiIdAsync(Prompts.SelectApiForListOpenApiCollections, parseResult, apisClient, sessionService, ct); var container = PaginationContainer .CreateConnectionData(async (after, first, token) => diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommand.cs index a7fde5255d3..5cfa5323e48 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommand.cs @@ -42,7 +42,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you really want to delete PAT with ID {patId}", + Prompts.ConfirmRevokePersonalAccessToken(patId), cancellationToken); if (!confirmed) diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/DeleteStageCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/DeleteStageCommand.cs index 8ed84454226..1296d2c12bc 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/DeleteStageCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/DeleteStageCommand.cs @@ -45,7 +45,7 @@ private static async Task ExecuteAsync( parseResult.AssertHasAuthentication(sessionService); var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to force delete a stage?", + Prompts.SelectApiForForceDeleteStage, parseResult, apisClient, sessionService, @@ -57,7 +57,7 @@ private static async Task ExecuteAsync( if (!force) { var confirmed = await console.ConfirmAsync( - $"Do you really want to force delete stage {stageName.AsHighlight()}", + Prompts.ConfirmDeleteStage(stageName.AsHighlight()), cancellationToken); if (!confirmed) diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/EditStagesCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/EditStagesCommand.cs index e9dff895029..88f0f9ec3a6 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/EditStagesCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/EditStagesCommand.cs @@ -51,7 +51,7 @@ private static async Task ExecuteAsync( parseResult.AssertHasAuthentication(sessionService); var apiId = await console.GetOrPromptForApiIdAsync( - "For which API do you want to edit the stages?", + Prompts.SelectApiForEditStages, parseResult, apisClient, sessionService, diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/ListStagesCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/ListStagesCommand.cs index f70118fc705..e613499622c 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/ListStagesCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Stages/ListStagesCommand.cs @@ -53,7 +53,7 @@ private static async Task RenderInteractiveAsync( IResultHolder resultHolder, CancellationToken ct) { - var apiId = await console.GetOrPromptForApiIdAsync("For which API do you want to display the clients?", parseResult, apisClient, sessionService, ct); + var apiId = await console.GetOrPromptForApiIdAsync(Prompts.SelectApiForDisplayClients, parseResult, apisClient, sessionService, ct); var stages = await client.ListStagesAsync(apiId, ct) ?? []; diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/CreateWorkspaceCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/CreateWorkspaceCommand.cs index 84a171e3510..0f50d82080c 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/CreateWorkspaceCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/CreateWorkspaceCommand.cs @@ -45,7 +45,7 @@ private static async Task ExecuteAsync( .ConfirmAsync( parseResult, Opt.Instance, - "Set as default workspace?", + Prompts.SetAsDefaultWorkspace, ct); await using (var activity = console.StartActivity( diff --git a/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/SetDefaultWorkspaceCommand.cs b/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/SetDefaultWorkspaceCommand.cs index 2ac02e1ef92..62cbeeeeef8 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/SetDefaultWorkspaceCommand.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/SetDefaultWorkspaceCommand.cs @@ -61,7 +61,7 @@ private static async Task ExecuteAsync( var selected = await PagedSelectionPrompt .New(paginationContainer) - .Title("Which workspace do you want to use as your default?".AsQuestion()) + .Title(Prompts.SelectDefaultWorkspace.AsQuestion()) .UseConverter(x => x.Name) .RenderAsync(console, cancellationToken); @@ -73,7 +73,7 @@ private static async Task ExecuteAsync( var selectedWorkspace = new Workspace(selected.Id, selected.Name); await sessionService.SelectWorkspaceAsync(selectedWorkspace, cancellationToken); - console.OkQuestion("Which workspace do you want to use as your default?", selectedWorkspace.Name); + console.OkQuestion(Prompts.SelectDefaultWorkspace, selectedWorkspace.Name); return ExitCodes.Success; } diff --git a/src/Nitro/CommandLine/src/CommandLine/Prompts.cs b/src/Nitro/CommandLine/src/CommandLine/Prompts.cs new file mode 100644 index 00000000000..be1642d2854 --- /dev/null +++ b/src/Nitro/CommandLine/src/CommandLine/Prompts.cs @@ -0,0 +1,95 @@ +namespace ChilliCream.Nitro.CommandLine; + +internal static class Prompts +{ + public const string DeleteClient = "Which client do you want to delete?"; + + public const string DeleteMcpFeatureCollection = + "Which MCP Feature Collection do you want to delete?"; + + public const string DeleteOpenApiCollection = + "Which OpenAPI collection do you want to delete?"; + + public const string SelectDefaultWorkspace = + "Which workspace do you want to use as your default?"; + + public const string CreateApiKeyScope = + "Do you want to create the API key scoped to an API or the whole workspace?"; + + public const string TreatDangerousChangesAsBreaking = + "Treat dangerous changes as breaking?"; + + public const string AllowBreakingSchemaChanges = + "Allow breaking schema changes when no client breaks?"; + + public const string SetAsDefaultWorkspace = "Set as default workspace?"; + + public const string SelectApiForCreateMockSchema = + "For which API do you want to create a mock schema?"; + + public const string SelectApiForListMockSchemas = + "For which API do you want to list the mock schemas?"; + + public const string SelectApiForDeleteClient = + "For which API do you want to delete a client?"; + + public const string SelectApiForCreateClient = + "For which API do you want to create a client?"; + + public const string SelectApiForListClientVersions = + "For which API do you want to list client versions?"; + + public const string SelectApiForListClients = + "For which API do you want to list the clients?"; + + public const string SelectApiForEditStages = + "For which API do you want to edit the stages?"; + + public const string SelectApiForForceDeleteStage = + "For which API do you want to force delete a stage?"; + + public const string SelectApiForDisplayClients = + "For which API do you want to display the clients?"; + + public const string SelectApiForCreateApiKey = + "For which API do you want to create an API key?"; + + public const string SelectApiForDeleteMcpFeatureCollection = + "For which API do you want to delete an MCP Feature Collection?"; + + public const string SelectApiForListMcpFeatureCollections = + "For which API do you want to list the MCP Feature Collections?"; + + public const string SelectApiForCreateMcpFeatureCollection = + "For which API do you want to create an MCP Feature Collection?"; + + public const string SelectApiForDeleteOpenApiCollection = + "For which API do you want to delete an OpenAPI collection?"; + + public const string SelectApiForListOpenApiCollections = + "For which API do you want to list the OpenAPI collections?"; + + public const string SelectApiForCreateOpenApiCollection = + "For which API do you want to create an OpenAPI collection?"; + + public static string ConfirmDeleteApiKey(string keyId) + => $"Do you really want to delete API key with ID '{keyId}'?"; + + public static string ConfirmDeleteApi(string apiName) + => $"Do you really want to delete API {apiName}"; + + public static string ConfirmDeleteStage(string stageName) + => $"Do you really want to force delete stage {stageName}"; + + public static string ConfirmRevokePersonalAccessToken(string patId) + => $"Do you really want to delete PAT with ID {patId}"; + + public static string ConfirmDeleteClient(string clientId) + => $"Do you want to delete the client with ID {clientId}?"; + + public static string ConfirmDeleteMcpFeatureCollection(string id) + => $"Do you want to delete the MCP Feature Collection with the ID {id}?"; + + public static string ConfirmDeleteOpenApiCollection(string id) + => $"Do you want to delete the OpenAPI collection with the ID {id}?"; +}