From 518c26be686664426c7b4f7e1ddbd6b4ef36e276 Mon Sep 17 00:00:00 2001 From: Will Lo Date: Mon, 18 Nov 2024 11:55:27 -0800 Subject: [PATCH 1/2] update amazonq service api model --- .../codewhisperer/client/user-service-2.json | 49 +++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/packages/core/src/codewhisperer/client/user-service-2.json b/packages/core/src/codewhisperer/client/user-service-2.json index c3233bc8b6c..664f58fee12 100644 --- a/packages/core/src/codewhisperer/client/user-service-2.json +++ b/packages/core/src/codewhisperer/client/user-service-2.json @@ -2,11 +2,14 @@ "version": "2.0", "metadata": { "apiVersion": "2022-11-11", + "auth": ["smithy.api#httpBearerAuth"], "endpointPrefix": "amazoncodewhispererservice", "jsonVersion": "1.0", "protocol": "json", + "protocols": ["json"], "serviceFullName": "Amazon CodeWhisperer", "serviceId": "CodeWhispererRuntime", + "signatureVersion": "bearer", "signingName": "amazoncodewhispererservice", "targetPrefix": "AmazonCodeWhispererService", "uid": "codewhispererruntime-2022-11-11" @@ -624,7 +627,9 @@ "acceptedCharacterCount": { "shape": "PrimitiveInteger" }, "totalCharacterCount": { "shape": "PrimitiveInteger" }, "timestamp": { "shape": "Timestamp" }, - "unmodifiedAcceptedCharacterCount": { "shape": "PrimitiveInteger" } + "unmodifiedAcceptedCharacterCount": { "shape": "PrimitiveInteger" }, + "totalNewCodeCharacterCount": { "shape": "PrimitiveInteger" }, + "totalNewCodeLineCount": { "shape": "PrimitiveInteger" } } }, "CodeFixAcceptanceEvent": { @@ -705,7 +710,19 @@ "codeScanJobId": { "shape": "CodeScanJobId" }, "timestamp": { "shape": "Timestamp" }, "codeAnalysisScope": { "shape": "CodeAnalysisScope" } - } + }, + "documentation": "

Published when a security scan or code review starts

" + }, + "CodeScanFailedEvent": { + "type": "structure", + "required": ["programmingLanguage", "codeScanJobId", "timestamp"], + "members": { + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "codeScanJobId": { "shape": "CodeScanJobId" }, + "timestamp": { "shape": "Timestamp" }, + "codeAnalysisScope": { "shape": "CodeAnalysisScope" } + }, + "documentation": "

Published when a security scan or code review fails

" }, "CodeScanJobId": { "type": "string", @@ -738,6 +755,18 @@ "documentation": "

Code Scan Remediations Interaction Type

", "enum": ["CODESCAN_ISSUE_HOVER", "CODESCAN_ISSUE_APPLY_FIX", "CODESCAN_ISSUE_VIEW_DETAILS"] }, + "CodeScanSucceededEvent": { + "type": "structure", + "required": ["programmingLanguage", "codeScanJobId", "timestamp", "numberOfFindings"], + "members": { + "programmingLanguage": { "shape": "ProgrammingLanguage" }, + "codeScanJobId": { "shape": "CodeScanJobId" }, + "timestamp": { "shape": "Timestamp" }, + "numberOfFindings": { "shape": "PrimitiveInteger" }, + "codeAnalysisScope": { "shape": "CodeAnalysisScope" } + }, + "documentation": "

Published when a security scan or code review completes successfully

" + }, "Completion": { "type": "structure", "required": ["content"], @@ -998,13 +1027,21 @@ "numberOfAddLines": { "shape": "PrimitiveInteger" }, "numberOfAddFiles": { "shape": "PrimitiveInteger" }, "userDecision": { "shape": "DocGenerationUserDecision" }, - "interactionType": { "shape": "DocGenerationInteractionType" } + "interactionType": { "shape": "DocGenerationInteractionType" }, + "userIdentity": { "shape": "String" }, + "numberOfNavigation": { "shape": "PrimitiveInteger" }, + "folderLevel": { "shape": "DocGenerationFolderLevel" } } }, + "DocGenerationFolderLevel": { + "type": "string", + "documentation": "

Doc Generation Folder Level

", + "enum": ["SUB_FOLDER", "ENTIRE_WORKSPACE"] + }, "DocGenerationInteractionType": { "type": "string", "documentation": "

Doc Generation Interaction Type

", - "enum": ["GENERATE_README", "UPDATE_README"] + "enum": ["GENERATE_README", "UPDATE_README", "EDIT_README"] }, "DocGenerationUserDecision": { "type": "string", @@ -2198,7 +2235,7 @@ }, "SuggestionState": { "type": "string", - "enum": ["ACCEPT", "REJECT", "DISCARD", "EMPTY"] + "enum": ["ACCEPT", "REJECT", "DISCARD", "EMPTY", "MERGE"] }, "SupplementalContext": { "type": "structure", @@ -2366,6 +2403,8 @@ "codeCoverageEvent": { "shape": "CodeCoverageEvent" }, "userModificationEvent": { "shape": "UserModificationEvent" }, "codeScanEvent": { "shape": "CodeScanEvent" }, + "codeScanSucceededEvent": { "shape": "CodeScanSucceededEvent" }, + "codeScanFailedEvent": { "shape": "CodeScanFailedEvent" }, "codeScanRemediationsEvent": { "shape": "CodeScanRemediationsEvent" }, "codeFixGenerationEvent": { "shape": "CodeFixGenerationEvent" }, "codeFixAcceptanceEvent": { "shape": "CodeFixAcceptanceEvent" }, From 3c8761aadf1f5f7b462cdc349b8104c5b2c75be8 Mon Sep 17 00:00:00 2001 From: Will Lo Date: Mon, 18 Nov 2024 12:02:06 -0800 Subject: [PATCH 2/2] patch --- packages/core/src/codewhisperer/client/user-service-2.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/core/src/codewhisperer/client/user-service-2.json b/packages/core/src/codewhisperer/client/user-service-2.json index 664f58fee12..bf20eeb6fa0 100644 --- a/packages/core/src/codewhisperer/client/user-service-2.json +++ b/packages/core/src/codewhisperer/client/user-service-2.json @@ -2,14 +2,11 @@ "version": "2.0", "metadata": { "apiVersion": "2022-11-11", - "auth": ["smithy.api#httpBearerAuth"], "endpointPrefix": "amazoncodewhispererservice", "jsonVersion": "1.0", "protocol": "json", - "protocols": ["json"], "serviceFullName": "Amazon CodeWhisperer", "serviceId": "CodeWhispererRuntime", - "signatureVersion": "bearer", "signingName": "amazoncodewhispererservice", "targetPrefix": "AmazonCodeWhispererService", "uid": "codewhispererruntime-2022-11-11"