Repository: microsoft/kiota (csharp)

Issue:
typescript root enum requests still failing to build
follow up to #4199

[beta build](https://github.com/microsoftgraph/msgraph-beta-sdk-typescript/actions/runs/8434538097/job/23097952613?pr=58) gets the following error `Error: deviceManagement/chromeOSOnboardingSettings/connect/index.ts(89,9): error TS2322: Type 'string' is not assignable to type 'Record<string, unknown>'.`

This matches the "enumObject" part of this section

```TypeScript
export const ConnectRequestBuilderRequestsMetadata: RequestsMetadata = {
    post: {
        uriTemplate: ConnectRequestBuilderUriTemplate,
        responseBodyContentType: "application/json",
        errorMappings: {
            XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>,
        },
        adapterMethodName: "sendEnum",
        enumObject: "ChromeOSOnboardingStatus",
        requestBodyContentType: "application/json",
        requestBodySerializer: serializeConnectPostRequestBody,
        requestInformationContentSetMethod: "setContentFromParsable",
    },
};
```

I believe the generation should not emit the quotes around `ChromeOSOnboardingStatus`, but it remains to be investigated

Pull request description:
Fixes: https://github.com/microsoft/kiota/issues/4405

Patch:
diff --git a/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs b/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs
index d049665cfd..70467c719c 100644
--- a/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs
+++ b/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs
@@ -119,7 +119,7 @@ private void WriteRequestsMetadataConstant(CodeConstant codeElement, LanguageWri
             }
             writer.WriteLine($"adapterMethodName: \"{GetSendRequestMethodName(isVoid, isStream, executorMethod.ReturnType.IsCollection, isPrimitive, isEnum)}\",");
             if (isEnum)
-                writer.WriteLine($"enumObject: \"{executorMethod.ReturnType.Name.ToFirstCharacterUpperCase()}\",");
+                writer.WriteLine($"enumObject: {executorMethod.ReturnType.Name.ToFirstCharacterUpperCase()},");
             else if (!isVoid)
                 writer.WriteLine($"responseBodyFactory: {GetTypeFactory(isVoid, isStream, executorMethod, writer)},");
             var sanitizedRequestBodyContentType = executorMethod.RequestBodyContentType.SanitizeDoubleQuote();


Test patch:
diff --git a/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeConstantWriterTests.cs b/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeConstantWriterTests.cs
index 2d228419e9..a8309a6076 100644
--- a/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeConstantWriterTests.cs
+++ b/tests/Kiota.Builder.Tests/Writers/TypeScript/CodeConstantWriterTests.cs
@@ -209,8 +209,7 @@ public void WritesRequestExecutorForEnum()
         writer.Write(constant);
         var result = tw.ToString();
         Assert.Contains("sendEnum", result);
-        Assert.Contains("enumObject:", result);
-        Assert.Contains(EnumName.ToFirstCharacterUpperCase(), result);
+        Assert.Contains("enumObject: " + EnumName.ToFirstCharacterUpperCase(), result);
         AssertExtensions.CurlyBracesAreClosed(result);
     }
     [Fact]
@@ -237,8 +236,7 @@ public void WritesRequestExecutorForEnumCollection()
         writer.Write(constant);
         var result = tw.ToString();
         Assert.Contains("sendCollectionOfEnum", result);
-        Assert.Contains("enumObject:", result);
-        Assert.Contains(EnumName.ToFirstCharacterUpperCase(), result);
+        Assert.Contains("enumObject: " + EnumName.ToFirstCharacterUpperCase(), result);
         AssertExtensions.CurlyBracesAreClosed(result);
     }
     [Fact]