@azure-tools/typespec-ts 0.53.3 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/src/framework/hooks/binder.d.ts.map +1 -1
- package/dist/src/framework/hooks/binder.js +102 -44
- package/dist/src/framework/hooks/binder.js.map +1 -1
- package/dist/src/framework/hooks/sdkTypes.js +1 -1
- package/dist/src/framework/hooks/sdkTypes.js.map +1 -1
- package/dist/src/framework/load-static-helpers.js +1 -1
- package/dist/src/framework/load-static-helpers.js.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +1 -10
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +0 -5
- package/dist/src/lib.js.map +1 -1
- package/dist/src/metaTree.d.ts +1 -1
- package/dist/src/metaTree.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +1 -1
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
- package/dist/src/modular/buildClientContext.js +1 -1
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildOperations.js +1 -1
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildProjectFiles.js +1 -1
- package/dist/src/modular/buildProjectFiles.js.map +1 -1
- package/dist/src/modular/buildRestorePoller.js +1 -1
- package/dist/src/modular/buildRestorePoller.js.map +1 -1
- package/dist/src/modular/buildRootIndex.js +1 -1
- package/dist/src/modular/buildRootIndex.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts +1 -1
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +1 -1
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/emitModelsOptions.js +1 -1
- package/dist/src/modular/emitModelsOptions.js.map +1 -1
- package/dist/src/modular/emitSamples.js +1 -1
- package/dist/src/modular/emitSamples.js.map +1 -1
- package/dist/src/modular/emitTests.js +1 -1
- package/dist/src/modular/emitTests.js.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +1 -1
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js +1 -1
- package/dist/src/modular/helpers/exampleValueHelpers.js.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.js +1 -1
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +53 -34
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +1 -1
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/interfaces.d.ts +1 -1
- package/dist/src/modular/interfaces.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js +1 -1
- package/dist/src/modular/serialization/buildDeserializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js +1 -1
- package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js +1 -1
- package/dist/src/modular/type-expressions/get-type-expression.js.map +1 -1
- package/dist/src/rlc-common/buildClient.d.ts +9 -0
- package/dist/src/rlc-common/buildClient.d.ts.map +1 -0
- package/dist/src/rlc-common/buildClient.js +413 -0
- package/dist/src/rlc-common/buildClient.js.map +1 -0
- package/dist/src/rlc-common/buildClientDefinitions.d.ts +6 -0
- package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +1 -0
- package/dist/src/rlc-common/buildClientDefinitions.js +174 -0
- package/dist/src/rlc-common/buildClientDefinitions.js.map +1 -0
- package/dist/src/rlc-common/buildIndexFile.d.ts +6 -0
- package/dist/src/rlc-common/buildIndexFile.d.ts.map +1 -0
- package/dist/src/rlc-common/buildIndexFile.js +242 -0
- package/dist/src/rlc-common/buildIndexFile.js.map +1 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js +224 -0
- package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +1 -0
- package/dist/src/rlc-common/buildLogger.d.ts +6 -0
- package/dist/src/rlc-common/buildLogger.d.ts.map +1 -0
- package/dist/src/rlc-common/buildLogger.js +32 -0
- package/dist/src/rlc-common/buildLogger.js.map +1 -0
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts +5 -0
- package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +1 -0
- package/dist/src/rlc-common/buildMethodShortcuts.js +54 -0
- package/dist/src/rlc-common/buildMethodShortcuts.js.map +1 -0
- package/dist/src/rlc-common/buildObjectTypes.d.ts +29 -0
- package/dist/src/rlc-common/buildObjectTypes.d.ts.map +1 -0
- package/dist/src/rlc-common/buildObjectTypes.js +451 -0
- package/dist/src/rlc-common/buildObjectTypes.js.map +1 -0
- package/dist/src/rlc-common/buildPaginateHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildPaginateHelper.js +27 -0
- package/dist/src/rlc-common/buildPaginateHelper.js.map +1 -0
- package/dist/src/rlc-common/buildParameterTypes.d.ts +14 -0
- package/dist/src/rlc-common/buildParameterTypes.d.ts.map +1 -0
- package/dist/src/rlc-common/buildParameterTypes.js +381 -0
- package/dist/src/rlc-common/buildParameterTypes.js.map +1 -0
- package/dist/src/rlc-common/buildPollingHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildPollingHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildPollingHelper.js +62 -0
- package/dist/src/rlc-common/buildPollingHelper.js.map +1 -0
- package/dist/src/rlc-common/buildResponseTypes.d.ts +6 -0
- package/dist/src/rlc-common/buildResponseTypes.d.ts.map +1 -0
- package/dist/src/rlc-common/buildResponseTypes.js +147 -0
- package/dist/src/rlc-common/buildResponseTypes.js.map +1 -0
- package/dist/src/rlc-common/buildSamples.d.ts +3 -0
- package/dist/src/rlc-common/buildSamples.d.ts.map +1 -0
- package/dist/src/rlc-common/buildSamples.js +30 -0
- package/dist/src/rlc-common/buildSamples.js.map +1 -0
- package/dist/src/rlc-common/buildSchemaType.d.ts +20 -0
- package/dist/src/rlc-common/buildSchemaType.d.ts.map +1 -0
- package/dist/src/rlc-common/buildSchemaType.js +53 -0
- package/dist/src/rlc-common/buildSchemaType.js.map +1 -0
- package/dist/src/rlc-common/buildSerializeHelper.d.ts +6 -0
- package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/buildSerializeHelper.js +36 -0
- package/dist/src/rlc-common/buildSerializeHelper.js.map +1 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts +6 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +1 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.js +52 -0
- package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +1 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts +17 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.js +45 -0
- package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/importsUtil.d.ts +18 -0
- package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/importsUtil.js +169 -0
- package/dist/src/rlc-common/helpers/importsUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts +42 -0
- package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/nameConstructors.js +63 -0
- package/dist/src/rlc-common/helpers/nameConstructors.js.map +1 -0
- package/dist/src/rlc-common/helpers/nameUtils.d.ts +37 -0
- package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/nameUtils.js +246 -0
- package/dist/src/rlc-common/helpers/nameUtils.js.map +1 -0
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts +16 -0
- package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/operationHelpers.js +119 -0
- package/dist/src/rlc-common/helpers/operationHelpers.js.map +1 -0
- package/dist/src/rlc-common/helpers/packageUtil.d.ts +7 -0
- package/dist/src/rlc-common/helpers/packageUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/packageUtil.js +13 -0
- package/dist/src/rlc-common/helpers/packageUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/pathUtils.d.ts +2 -0
- package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/pathUtils.js +12 -0
- package/dist/src/rlc-common/helpers/pathUtils.js.map +1 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts +10 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.js +41 -0
- package/dist/src/rlc-common/helpers/schemaHelpers.js.map +1 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +4 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.js +49 -0
- package/dist/src/rlc-common/helpers/shortcutMethods.js.map +1 -0
- package/dist/src/rlc-common/helpers/typeUtil.d.ts +32 -0
- package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/typeUtil.js +167 -0
- package/dist/src/rlc-common/helpers/typeUtil.js.map +1 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts +12 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts.map +1 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js +165 -0
- package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +1 -0
- package/dist/src/rlc-common/index.d.ts +41 -0
- package/dist/src/rlc-common/index.d.ts.map +1 -0
- package/dist/src/rlc-common/index.js +43 -0
- package/dist/src/rlc-common/index.js.map +1 -0
- package/dist/src/rlc-common/interfaces.d.ts +369 -0
- package/dist/src/rlc-common/interfaces.d.ts.map +1 -0
- package/dist/src/rlc-common/interfaces.js +11 -0
- package/dist/src/rlc-common/interfaces.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +56 -0
- package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.js +26 -0
- package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.js +82 -0
- package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts +5 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.js +32 -0
- package/dist/src/rlc-common/metadata/buildLicenseFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts +25 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.js +201 -0
- package/dist/src/rlc-common/metadata/buildPackageFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts +11 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.js +426 -0
- package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.js +142 -0
- package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +17 -0
- package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.d.ts +16 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.js +55 -0
- package/dist/src/rlc-common/metadata/buildTestConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts +61 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.js +170 -0
- package/dist/src/rlc-common/metadata/buildTsConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts +6 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.js +28 -0
- package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts +20 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.js +77 -0
- package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +51 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +121 -0
- package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts +242 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +176 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts +8 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +102 -0
- package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts +57 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +53 -0
- package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts +64 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +183 -0
- package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +1 -0
- package/dist/src/rlc-common/metadata/utils.d.ts +3 -0
- package/dist/src/rlc-common/metadata/utils.d.ts.map +1 -0
- package/dist/src/rlc-common/metadata/utils.js +7 -0
- package/dist/src/rlc-common/metadata/utils.js.map +1 -0
- package/dist/src/rlc-common/static/paginateContent.d.ts +2 -0
- package/dist/src/rlc-common/static/paginateContent.d.ts.map +1 -0
- package/dist/src/rlc-common/static/paginateContent.js +345 -0
- package/dist/src/rlc-common/static/paginateContent.js.map +1 -0
- package/dist/src/rlc-common/static/pollingContent.d.ts +2 -0
- package/dist/src/rlc-common/static/pollingContent.d.ts.map +1 -0
- package/dist/src/rlc-common/static/pollingContent.js +225 -0
- package/dist/src/rlc-common/static/pollingContent.js.map +1 -0
- package/dist/src/rlc-common/static/sampleTemplate.d.ts +2 -0
- package/dist/src/rlc-common/static/sampleTemplate.d.ts.map +1 -0
- package/dist/src/rlc-common/static/sampleTemplate.js +56 -0
- package/dist/src/rlc-common/static/sampleTemplate.js.map +1 -0
- package/dist/src/rlc-common/static/serializeHelper.d.ts +6 -0
- package/dist/src/rlc-common/static/serializeHelper.d.ts.map +1 -0
- package/dist/src/rlc-common/static/serializeHelper.js +31 -0
- package/dist/src/rlc-common/static/serializeHelper.js.map +1 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.d.ts +6 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.js +11 -0
- package/dist/src/rlc-common/test/buildKarmaConfig.js.map +1 -0
- package/dist/src/rlc-common/test/buildRecordedClient.d.ts +6 -0
- package/dist/src/rlc-common/test/buildRecordedClient.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildRecordedClient.js +18 -0
- package/dist/src/rlc-common/test/buildRecordedClient.js.map +1 -0
- package/dist/src/rlc-common/test/buildSampleTest.d.ts +6 -0
- package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildSampleTest.js +15 -0
- package/dist/src/rlc-common/test/buildSampleTest.js.map +1 -0
- package/dist/src/rlc-common/test/buildSnippets.d.ts +6 -0
- package/dist/src/rlc-common/test/buildSnippets.d.ts.map +1 -0
- package/dist/src/rlc-common/test/buildSnippets.js +29 -0
- package/dist/src/rlc-common/test/buildSnippets.js.map +1 -0
- package/dist/src/rlc-common/test/template.d.ts +5 -0
- package/dist/src/rlc-common/test/template.d.ts.map +1 -0
- package/dist/src/rlc-common/test/template.js +261 -0
- package/dist/src/rlc-common/test/template.js.map +1 -0
- package/dist/src/rlc-common/transformSampleGroups.d.ts +9 -0
- package/dist/src/rlc-common/transformSampleGroups.d.ts.map +1 -0
- package/dist/src/rlc-common/transformSampleGroups.js +317 -0
- package/dist/src/rlc-common/transformSampleGroups.js.map +1 -0
- package/dist/src/transform/transform.d.ts +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +1 -1
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.js +1 -1
- package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.d.ts +1 -1
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +1 -1
- package/dist/src/transform/transformParameters.js.map +1 -1
- package/dist/src/transform/transformPaths.d.ts +1 -1
- package/dist/src/transform/transformPaths.d.ts.map +1 -1
- package/dist/src/transform/transformPaths.js +1 -1
- package/dist/src/transform/transformPaths.js.map +1 -1
- package/dist/src/transform/transformResponses.d.ts +1 -1
- package/dist/src/transform/transformResponses.d.ts.map +1 -1
- package/dist/src/transform/transformResponses.js +1 -1
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.js +1 -1
- package/dist/src/transform/transformSchemas.js.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.js +1 -3
- package/dist/src/transform/transfromRLCOptions.js.map +1 -1
- package/dist/src/utils/clientUtils.js +1 -1
- package/dist/src/utils/clientUtils.js.map +1 -1
- package/dist/src/utils/crossLanguageDef.js +1 -1
- package/dist/src/utils/crossLanguageDef.js.map +1 -1
- package/dist/src/utils/emitUtil.d.ts +1 -1
- package/dist/src/utils/emitUtil.d.ts.map +1 -1
- package/dist/src/utils/emitUtil.js +1 -1
- package/dist/src/utils/emitUtil.js.map +1 -1
- package/dist/src/utils/interfaces.d.ts +1 -1
- package/dist/src/utils/interfaces.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.d.ts +1 -1
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +1 -1
- package/dist/src/utils/modelUtils.js.map +1 -1
- package/dist/src/utils/operationUtil.d.ts +1 -1
- package/dist/src/utils/operationUtil.d.ts.map +1 -1
- package/dist/src/utils/operationUtil.js +1 -1
- package/dist/src/utils/operationUtil.js.map +1 -1
- package/dist/src/utils/parameterUtils.d.ts +1 -1
- package/dist/src/utils/parameterUtils.d.ts.map +1 -1
- package/dist/src/utils/parameterUtils.js +1 -1
- package/dist/src/utils/parameterUtils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/framework/hooks/binder.ts +142 -51
- package/src/framework/hooks/sdkTypes.ts +1 -1
- package/src/framework/load-static-helpers.ts +1 -1
- package/src/index.ts +5 -1
- package/src/lib.ts +1 -16
- package/src/metaTree.ts +1 -1
- package/src/modular/buildClassicalClient.ts +1 -1
- package/src/modular/buildClassicalOperationGroups.ts +1 -1
- package/src/modular/buildClientContext.ts +1 -1
- package/src/modular/buildOperations.ts +1 -1
- package/src/modular/buildProjectFiles.ts +1 -1
- package/src/modular/buildRestorePoller.ts +1 -1
- package/src/modular/buildRootIndex.ts +1 -1
- package/src/modular/emitModels.ts +1 -1
- package/src/modular/emitModelsOptions.ts +1 -1
- package/src/modular/emitSamples.ts +1 -1
- package/src/modular/emitTests.ts +1 -1
- package/src/modular/helpers/classicalOperationHelpers.ts +1 -1
- package/src/modular/helpers/clientHelpers.ts +1 -1
- package/src/modular/helpers/exampleValueHelpers.ts +1 -1
- package/src/modular/helpers/namingHelpers.ts +1 -1
- package/src/modular/helpers/operationHelpers.ts +65 -42
- package/src/modular/helpers/typeHelpers.ts +1 -1
- package/src/modular/interfaces.ts +1 -1
- package/src/modular/serialization/buildDeserializerFunction.ts +1 -1
- package/src/modular/serialization/buildSerializerFunction.ts +1 -1
- package/src/modular/serialization/buildXmlSerializerFunction.ts +1 -1
- package/src/modular/type-expressions/get-type-expression.ts +1 -1
- package/src/rlc-common/buildClient.ts +561 -0
- package/src/rlc-common/buildClientDefinitions.ts +278 -0
- package/src/rlc-common/buildIndexFile.ts +344 -0
- package/src/rlc-common/buildIsUnexpectedHelper.ts +255 -0
- package/src/rlc-common/buildLogger.ts +43 -0
- package/src/rlc-common/buildMethodShortcuts.ts +83 -0
- package/src/rlc-common/buildObjectTypes.ts +680 -0
- package/src/rlc-common/buildPaginateHelper.ts +34 -0
- package/src/rlc-common/buildParameterTypes.ts +575 -0
- package/src/rlc-common/buildPollingHelper.ts +83 -0
- package/src/rlc-common/buildResponseTypes.ts +203 -0
- package/src/rlc-common/buildSamples.ts +32 -0
- package/src/rlc-common/buildSchemaType.ts +81 -0
- package/src/rlc-common/buildSerializeHelper.ts +49 -0
- package/src/rlc-common/buildTopLevelIndexFile.ts +65 -0
- package/src/rlc-common/helpers/apiVersionUtil.ts +53 -0
- package/src/rlc-common/helpers/importsUtil.ts +187 -0
- package/src/rlc-common/helpers/nameConstructors.ts +144 -0
- package/src/rlc-common/helpers/nameUtils.ts +319 -0
- package/src/rlc-common/helpers/operationHelpers.ts +155 -0
- package/src/rlc-common/helpers/packageUtil.ts +13 -0
- package/src/rlc-common/helpers/pathUtils.ts +15 -0
- package/src/rlc-common/helpers/schemaHelpers.ts +61 -0
- package/src/rlc-common/helpers/shortcutMethods.ts +67 -0
- package/src/rlc-common/helpers/typeUtil.ts +173 -0
- package/src/rlc-common/helpers/valueGenerationUtil.ts +257 -0
- package/src/rlc-common/index.ts +43 -0
- package/src/rlc-common/interfaces.ts +441 -0
- package/src/rlc-common/metadata/buildApiExtractorConfig.ts +71 -0
- package/src/rlc-common/metadata/buildChangelogFile.ts +29 -0
- package/src/rlc-common/metadata/buildESLintConfig.ts +86 -0
- package/src/rlc-common/metadata/buildLicenseFile.ts +33 -0
- package/src/rlc-common/metadata/buildPackageFile.ts +250 -0
- package/src/rlc-common/metadata/buildReadmeFile.ts +528 -0
- package/src/rlc-common/metadata/buildRollupConfig.ts +150 -0
- package/src/rlc-common/metadata/buildSampleEnvFile.ts +22 -0
- package/src/rlc-common/metadata/buildTestConfig.ts +72 -0
- package/src/rlc-common/metadata/buildTsConfig.ts +222 -0
- package/src/rlc-common/metadata/buildVitestConfig.ts +36 -0
- package/src/rlc-common/metadata/buildWarpConfig.ts +94 -0
- package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +161 -0
- package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +220 -0
- package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +134 -0
- package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +70 -0
- package/src/rlc-common/metadata/packageJson/packageCommon.ts +255 -0
- package/src/rlc-common/metadata/utils.ts +8 -0
- package/src/rlc-common/static/paginateContent.ts +345 -0
- package/src/rlc-common/static/pollingContent.ts +225 -0
- package/src/rlc-common/static/sampleTemplate.ts +56 -0
- package/src/rlc-common/static/serializeHelper.ts +34 -0
- package/src/rlc-common/test/buildKarmaConfig.ts +12 -0
- package/src/rlc-common/test/buildRecordedClient.ts +18 -0
- package/src/rlc-common/test/buildSampleTest.ts +15 -0
- package/src/rlc-common/test/buildSnippets.ts +35 -0
- package/src/rlc-common/test/template.ts +263 -0
- package/src/rlc-common/transformSampleGroups.ts +458 -0
- package/src/transform/transform.ts +1 -1
- package/src/transform/transformApiVersionInfo.ts +1 -1
- package/src/transform/transformHelperFunctionDetails.ts +1 -1
- package/src/transform/transformParameters.ts +1 -1
- package/src/transform/transformPaths.ts +1 -1
- package/src/transform/transformResponses.ts +1 -1
- package/src/transform/transformSchemas.ts +1 -1
- package/src/transform/transformTelemetryInfo.ts +1 -1
- package/src/transform/transfromRLCOptions.ts +1 -3
- package/src/utils/clientUtils.ts +1 -1
- package/src/utils/crossLanguageDef.ts +1 -1
- package/src/utils/emitUtil.ts +1 -1
- package/src/utils/interfaces.ts +1 -1
- package/src/utils/modelUtils.ts +1 -1
- package/src/utils/operationUtil.ts +1 -1
- package/src/utils/parameterUtils.ts +1 -1
- package/LICENSE +0 -21
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
getFixmeForMultilineDocs
|
|
49
49
|
} from "./docsHelpers.js";
|
|
50
50
|
import { AzurePollingDependencies } from "../external-dependencies.js";
|
|
51
|
-
import { NameType, normalizeName } from "
|
|
51
|
+
import { NameType, normalizeName } from "../../rlc-common/index.js";
|
|
52
52
|
import {
|
|
53
53
|
buildModelDeserializer,
|
|
54
54
|
buildPropertyDeserializer
|
|
@@ -230,11 +230,14 @@ export function getDeserializePrivateFunction(
|
|
|
230
230
|
type: resolveReference(refkey(operation, "response"))
|
|
231
231
|
};
|
|
232
232
|
} else if (response.type) {
|
|
233
|
+
// When response.optional is true, some HTTP responses have no body (e.g. 204), so
|
|
234
|
+
// the return type must include undefined to reflect that possibility.
|
|
235
|
+
const baseType = getTypeExpression(context, response.type);
|
|
233
236
|
returnType = {
|
|
234
237
|
name: (response as any).name ?? "",
|
|
235
|
-
type:
|
|
238
|
+
type: response.optional ? `${baseType} | undefined` : baseType
|
|
236
239
|
};
|
|
237
|
-
} else if (isHeadAsBooleanOperation(
|
|
240
|
+
} else if (isHeadAsBooleanOperation(operation)) {
|
|
238
241
|
returnType = { name: "", type: "boolean" };
|
|
239
242
|
} else {
|
|
240
243
|
returnType = { name: "", type: "void" };
|
|
@@ -262,7 +265,7 @@ export function getDeserializePrivateFunction(
|
|
|
262
265
|
dependencies.createRestError
|
|
263
266
|
);
|
|
264
267
|
statements.push(
|
|
265
|
-
`const expectedStatuses = ${getExpectedStatuses(operation
|
|
268
|
+
`const expectedStatuses = ${getExpectedStatuses(operation)};`
|
|
266
269
|
);
|
|
267
270
|
statements.push(
|
|
268
271
|
`if(!expectedStatuses.includes(result.status)){`,
|
|
@@ -301,6 +304,13 @@ export function getDeserializePrivateFunction(
|
|
|
301
304
|
}
|
|
302
305
|
|
|
303
306
|
if (deserializedType) {
|
|
307
|
+
// When the method response is optional (some HTTP responses have no body, e.g. 204),
|
|
308
|
+
// guard all body deserialization so we return undefined instead of throwing.
|
|
309
|
+
// This only applies to non-LRO, non-paging operations where the deserialized type
|
|
310
|
+
// comes from response.type (not from LRO metadata or paging).
|
|
311
|
+
const needsBodyGuard =
|
|
312
|
+
response.optional && !isLroOnly && !isLroAndPaging && !isPagingOnly;
|
|
313
|
+
|
|
304
314
|
const contentTypes = operation.operation.responses[0]?.contentTypes ?? [];
|
|
305
315
|
const isXml = isXmlPayload(contentTypes);
|
|
306
316
|
const isDualFormat = hasDualFormatSupport(contentTypes);
|
|
@@ -319,6 +329,13 @@ export function getDeserializePrivateFunction(
|
|
|
319
329
|
deserializedType.kind === "model" &&
|
|
320
330
|
hasXmlSerialization(deserializedType)
|
|
321
331
|
) {
|
|
332
|
+
if (needsBodyGuard) {
|
|
333
|
+
statements.push(
|
|
334
|
+
`if (!result.body) {
|
|
335
|
+
return result.body as ${returnType.type};
|
|
336
|
+
}`
|
|
337
|
+
);
|
|
338
|
+
}
|
|
322
339
|
const xmlDeserializerName = buildXmlModelDeserializer(
|
|
323
340
|
context,
|
|
324
341
|
deserializedType,
|
|
@@ -365,6 +382,13 @@ export function getDeserializePrivateFunction(
|
|
|
365
382
|
}
|
|
366
383
|
} else if (useXmlDeserialization) {
|
|
367
384
|
// XML-only response
|
|
385
|
+
if (needsBodyGuard) {
|
|
386
|
+
statements.push(
|
|
387
|
+
`if (!result.body) {
|
|
388
|
+
return result.body as ${returnType.type};
|
|
389
|
+
}`
|
|
390
|
+
);
|
|
391
|
+
}
|
|
368
392
|
const xmlDeserializerName = buildXmlModelDeserializer(
|
|
369
393
|
context,
|
|
370
394
|
deserializedType,
|
|
@@ -413,7 +437,7 @@ export function getDeserializePrivateFunction(
|
|
|
413
437
|
statements.push(
|
|
414
438
|
`return { blobBody: result.blobBody, readableStreamBody: result.readableStreamBody };`
|
|
415
439
|
);
|
|
416
|
-
} else if (isHeadAsBooleanOperation(
|
|
440
|
+
} else if (isHeadAsBooleanOperation(operation)) {
|
|
417
441
|
// HEAD has no body; derive boolean from status code
|
|
418
442
|
statements.push(`return { body: result.status.startsWith("2") };`);
|
|
419
443
|
} else {
|
|
@@ -435,14 +459,21 @@ export function getDeserializePrivateFunction(
|
|
|
435
459
|
};
|
|
436
460
|
}
|
|
437
461
|
if (deserializeFunctionName) {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
462
|
+
if (needsBodyGuard) {
|
|
463
|
+
// Use ternary form: return result.body ? deserializer(result.body) : undefined
|
|
464
|
+
statements.push(
|
|
465
|
+
`return ${deserializedRoot} ? ${deserializeFunctionName}(${deserializedRoot})${multipartCastSuffix} : undefined`
|
|
466
|
+
);
|
|
467
|
+
} else {
|
|
468
|
+
statements.push(
|
|
469
|
+
`return ${deserializeFunctionName}(${deserializedRoot})${multipartCastSuffix}`
|
|
470
|
+
);
|
|
471
|
+
}
|
|
441
472
|
} else if (
|
|
442
473
|
isAzureCoreErrorType(context.program, deserializedType.__raw)
|
|
443
474
|
) {
|
|
444
475
|
statements.push(`return ${deserializedRoot}${multipartCastSuffix}`);
|
|
445
|
-
} else if (isHeadAsBooleanOperation(
|
|
476
|
+
} else if (isHeadAsBooleanOperation(operation)) {
|
|
446
477
|
// HEAD has no body; derive boolean from status code
|
|
447
478
|
statements.push(`return result.status.startsWith("2");`);
|
|
448
479
|
} else {
|
|
@@ -464,7 +495,7 @@ export function getDeserializePrivateFunction(
|
|
|
464
495
|
);
|
|
465
496
|
}
|
|
466
497
|
}
|
|
467
|
-
} else if (isHeadAsBooleanOperation(
|
|
498
|
+
} else if (isHeadAsBooleanOperation(operation)) {
|
|
468
499
|
if (shouldWrap) {
|
|
469
500
|
statements.push(`return { body: result.status.startsWith("2") };`);
|
|
470
501
|
} else {
|
|
@@ -789,12 +820,12 @@ function getExceptionThrowStatement(
|
|
|
789
820
|
const headerStmt = allHeaderCalls;
|
|
790
821
|
if (exception.end) {
|
|
791
822
|
return `if(statusCode >= ${exception.start} && statusCode <= ${exception.end}) {
|
|
792
|
-
error.details = ${deserializeExpr};
|
|
823
|
+
if(result.body) { error.details = ${deserializeExpr}; }
|
|
793
824
|
${headerStmt}
|
|
794
825
|
}`;
|
|
795
826
|
} else {
|
|
796
827
|
return `if(statusCode === ${exception.start}) {
|
|
797
|
-
error.details = ${deserializeExpr};
|
|
828
|
+
if(result.body) { error.details = ${deserializeExpr}; }
|
|
798
829
|
${headerStmt}
|
|
799
830
|
}`;
|
|
800
831
|
}
|
|
@@ -807,7 +838,7 @@ function getExceptionThrowStatement(
|
|
|
807
838
|
? `${defaultXmlDeserializer}(result.body)`
|
|
808
839
|
: `isXml ? ${defaultXmlDeserializer}(result.body) : ${defaultDeserializer}(result.body)`;
|
|
809
840
|
statements.push(`else {
|
|
810
|
-
error.details = ${defaultDeserializeExpr};
|
|
841
|
+
if(result.body) { error.details = ${defaultDeserializeExpr}; }
|
|
811
842
|
${allHeaderCalls}
|
|
812
843
|
}`);
|
|
813
844
|
}
|
|
@@ -817,7 +848,7 @@ function getExceptionThrowStatement(
|
|
|
817
848
|
if (defaultXmlDeserializer) {
|
|
818
849
|
if (defaultIsXmlOnly) {
|
|
819
850
|
statements.push(`const error = ${createRestErrorReference}(result);
|
|
820
|
-
error.details = ${defaultXmlDeserializer}(result.body);
|
|
851
|
+
if(result.body) { error.details = ${defaultXmlDeserializer}(result.body); }
|
|
821
852
|
${allHeaderCalls}`);
|
|
822
853
|
} else {
|
|
823
854
|
const isXmlContentTypeRef = resolveReference(
|
|
@@ -825,12 +856,12 @@ function getExceptionThrowStatement(
|
|
|
825
856
|
);
|
|
826
857
|
statements.push(`const error = ${createRestErrorReference}(result);
|
|
827
858
|
const responseContentType = result.headers?.["content-type"] ?? "";
|
|
828
|
-
error.details = ${isXmlContentTypeRef}(responseContentType) ? ${defaultXmlDeserializer}(result.body) : ${defaultDeserializer}(result.body);
|
|
859
|
+
if(result.body) { error.details = ${isXmlContentTypeRef}(responseContentType) ? ${defaultXmlDeserializer}(result.body) : ${defaultDeserializer}(result.body); }
|
|
829
860
|
${allHeaderCalls}`);
|
|
830
861
|
}
|
|
831
862
|
} else {
|
|
832
863
|
statements.push(`const error = ${createRestErrorReference}(result);
|
|
833
|
-
error.details = ${defaultDeserializer}(result.body);
|
|
864
|
+
if(result.body) { error.details = ${defaultDeserializer}(result.body); }
|
|
834
865
|
${allHeaderCalls}`);
|
|
835
866
|
}
|
|
836
867
|
statements.push("throw error;");
|
|
@@ -1042,14 +1073,22 @@ export function getOperationFunction(
|
|
|
1042
1073
|
isResponseHeadersEnabled
|
|
1043
1074
|
) {
|
|
1044
1075
|
// Build a composite type that includes both model and additional header properties
|
|
1076
|
+
const baseCompositeType = buildCompositeResponseType(
|
|
1077
|
+
context,
|
|
1078
|
+
type,
|
|
1079
|
+
responseHeaders
|
|
1080
|
+
);
|
|
1045
1081
|
returnType = {
|
|
1046
1082
|
name: (type as any).name ?? "",
|
|
1047
|
-
type:
|
|
1083
|
+
type: response.optional
|
|
1084
|
+
? `${baseCompositeType} | undefined`
|
|
1085
|
+
: baseCompositeType
|
|
1048
1086
|
};
|
|
1049
1087
|
} else {
|
|
1088
|
+
const baseType = getTypeExpression(context, type!);
|
|
1050
1089
|
returnType = {
|
|
1051
1090
|
name: (type as any).name ?? "",
|
|
1052
|
-
type:
|
|
1091
|
+
type: response.optional ? `${baseType} | undefined` : baseType
|
|
1053
1092
|
};
|
|
1054
1093
|
}
|
|
1055
1094
|
} else if (hasHeaderOnlyResponse && isResponseHeadersEnabled) {
|
|
@@ -1058,7 +1097,7 @@ export function getOperationFunction(
|
|
|
1058
1097
|
name: "",
|
|
1059
1098
|
type: `${buildHeaderOnlyResponseType(context, responseHeaders)}`
|
|
1060
1099
|
};
|
|
1061
|
-
} else if (isHeadAsBooleanOperation(
|
|
1100
|
+
} else if (isHeadAsBooleanOperation(operation)) {
|
|
1062
1101
|
returnType = { name: "", type: "boolean" };
|
|
1063
1102
|
}
|
|
1064
1103
|
|
|
@@ -2988,17 +3027,10 @@ export function getPropertyFullName(
|
|
|
2988
3027
|
* Get an expression representing an array of expected status codes for the operation
|
|
2989
3028
|
* @param operation The operation
|
|
2990
3029
|
*/
|
|
2991
|
-
export function getExpectedStatuses(
|
|
2992
|
-
operation: ServiceOperation,
|
|
2993
|
-
context?: SdkContext
|
|
2994
|
-
): string {
|
|
3030
|
+
export function getExpectedStatuses(operation: ServiceOperation): string {
|
|
2995
3031
|
let statusCodes = operation.operation.responses.map((x) => x.statusCodes);
|
|
2996
|
-
// For HEAD + @responseAsBool
|
|
2997
|
-
if (
|
|
2998
|
-
context &&
|
|
2999
|
-
isHeadAsBooleanOperation(context, operation) &&
|
|
3000
|
-
!statusCodes.includes(404)
|
|
3001
|
-
) {
|
|
3032
|
+
// For HEAD + @responseAsBool, 404 is a valid "false" response.
|
|
3033
|
+
if (isHeadAsBooleanOperation(operation) && !statusCodes.includes(404)) {
|
|
3002
3034
|
statusCodes = [...statusCodes, 404];
|
|
3003
3035
|
}
|
|
3004
3036
|
// LROs may call the same path but with GET to get the operation status.
|
|
@@ -3219,15 +3251,11 @@ function isHeadOperation(operation: ServiceOperation): boolean {
|
|
|
3219
3251
|
return operation.operation.verb.toLowerCase() === "head";
|
|
3220
3252
|
}
|
|
3221
3253
|
|
|
3222
|
-
function isHeadAsBooleanOperation(
|
|
3223
|
-
context: SdkContext,
|
|
3224
|
-
operation: ServiceOperation
|
|
3225
|
-
): boolean {
|
|
3254
|
+
function isHeadAsBooleanOperation(operation: ServiceOperation): boolean {
|
|
3226
3255
|
if (!isHeadOperation(operation)) return false;
|
|
3227
3256
|
// @responseAsBool: TCGC promotes response.type to SdkBuiltInType { kind: "boolean" }
|
|
3228
3257
|
if ((operation.response.type as any)?.kind === "boolean") return true;
|
|
3229
|
-
|
|
3230
|
-
return !!context.rlcOptions?.headAsBoolean;
|
|
3258
|
+
return false;
|
|
3231
3259
|
}
|
|
3232
3260
|
|
|
3233
3261
|
/**
|
|
@@ -3264,9 +3292,8 @@ export function checkWrapNonModelReturn(
|
|
|
3264
3292
|
|
|
3265
3293
|
const { type } = operation.response;
|
|
3266
3294
|
if (!type) {
|
|
3267
|
-
// Special case: HEAD operation with void response → wrap as boolean { body: boolean }
|
|
3268
|
-
|
|
3269
|
-
if (isHeadAsBooleanOperation(context, operation)) {
|
|
3295
|
+
// Special case: HEAD operation with @responseAsBool and void response → wrap as boolean { body: boolean }
|
|
3296
|
+
if (isHeadAsBooleanOperation(operation)) {
|
|
3270
3297
|
return { shouldWrap: true, isBinary: false };
|
|
3271
3298
|
}
|
|
3272
3299
|
return noWrap; // void return type - no wrap needed
|
|
@@ -3320,10 +3347,6 @@ export function buildNonModelResponseTypeDeclaration(
|
|
|
3320
3347
|
*/
|
|
3321
3348
|
readableStreamBody?: ${nodeReadableStreamRef};
|
|
3322
3349
|
}`;
|
|
3323
|
-
} else if (!operation.response.type && isHeadOperation(operation)) {
|
|
3324
|
-
// HEAD as boolean: the body property is a boolean indicating if the resource exists.
|
|
3325
|
-
// true = resource exists (2xx response), false = resource not found (e.g., 404)
|
|
3326
|
-
typeBody = `{ body: boolean }`;
|
|
3327
3350
|
} else {
|
|
3328
3351
|
const returnType = getTypeExpression(context, operation.response.type!);
|
|
3329
3352
|
typeBody = `{ body: ${returnType} }`;
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getAdditionalPropertiesName,
|
|
20
20
|
normalizeModelName
|
|
21
21
|
} from "../emitModels.js";
|
|
22
|
-
import { NameType, normalizeName } from "
|
|
22
|
+
import { NameType, normalizeName } from "../../rlc-common/index.js";
|
|
23
23
|
import { isAzureCoreErrorType } from "../../utils/modelUtils.js";
|
|
24
24
|
import {
|
|
25
25
|
getAllDiscriminatedValues,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getAdditionalPropertiesName,
|
|
21
21
|
normalizeModelName
|
|
22
22
|
} from "../emitModels.js";
|
|
23
|
-
import { NameType, normalizeName } from "
|
|
23
|
+
import { NameType, normalizeName } from "../../rlc-common/index.js";
|
|
24
24
|
import { isAzureCoreErrorType } from "../../utils/modelUtils.js";
|
|
25
25
|
import {
|
|
26
26
|
getAllDiscriminatedValues,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
normalizeModelName,
|
|
19
19
|
getAdditionalPropertiesName
|
|
20
20
|
} from "../emitModels.js";
|
|
21
|
-
import { NameType } from "
|
|
21
|
+
import { NameType } from "../../rlc-common/index.js";
|
|
22
22
|
import { isAzureCoreErrorType } from "../../utils/modelUtils.js";
|
|
23
23
|
import {
|
|
24
24
|
isSupportedSerializeType,
|
|
@@ -8,7 +8,7 @@ import { getCredentialExpression } from "./get-credential-expression.js";
|
|
|
8
8
|
import { getEnumExpression } from "./get-enum-expression.js";
|
|
9
9
|
import { getModelExpression } from "./get-model-expression.js";
|
|
10
10
|
import { getUnionExpression } from "./get-union-expression.js";
|
|
11
|
-
import { NameType, normalizeName } from "
|
|
11
|
+
import { NameType, normalizeName } from "../../rlc-common/index.js";
|
|
12
12
|
import { SdkContext } from "../../utils/interfaces.js";
|
|
13
13
|
import { getNullableExpression } from "./get-nullable-expression.js";
|
|
14
14
|
|