@typespec/http-client-csharp 0.1.9 → 1.0.0-alpha.20250314.6
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/dist/emitter/src/constants.d.ts +11 -0
- package/dist/emitter/src/constants.d.ts.map +1 -0
- package/dist/emitter/src/constants.js +23 -0
- package/dist/emitter/src/constants.js.map +1 -0
- package/dist/emitter/src/emitter.d.ts +19 -0
- package/dist/emitter/src/emitter.d.ts.map +1 -0
- package/dist/emitter/src/emitter.js +212 -0
- package/dist/emitter/src/emitter.js.map +1 -0
- package/dist/emitter/src/index.d.ts +12 -0
- package/dist/emitter/src/index.d.ts.map +1 -0
- package/dist/emitter/src/index.js +11 -0
- package/dist/emitter/src/index.js.map +1 -0
- package/dist/emitter/src/lib/client-model-builder.d.ts +10 -0
- package/dist/emitter/src/lib/client-model-builder.d.ts.map +1 -0
- package/dist/emitter/src/lib/client-model-builder.js +150 -0
- package/dist/emitter/src/lib/client-model-builder.js.map +1 -0
- package/dist/emitter/src/lib/decorators.d.ts +10 -0
- package/dist/emitter/src/lib/decorators.d.ts.map +1 -0
- package/dist/emitter/src/lib/decorators.js +17 -0
- package/dist/emitter/src/lib/decorators.js.map +1 -0
- package/dist/emitter/src/lib/example-converter.d.ts +7 -0
- package/dist/emitter/src/lib/example-converter.d.ts.map +1 -0
- package/dist/emitter/src/lib/example-converter.js +131 -0
- package/dist/emitter/src/lib/example-converter.js.map +1 -0
- package/dist/emitter/src/lib/lib.d.ts +32 -0
- package/dist/emitter/src/lib/lib.d.ts.map +1 -0
- package/dist/emitter/src/lib/lib.js +116 -0
- package/dist/emitter/src/lib/lib.js.map +1 -0
- package/dist/emitter/src/lib/logger-level.d.ts +10 -0
- package/dist/emitter/src/lib/logger-level.d.ts.map +1 -0
- package/dist/emitter/src/lib/logger-level.js +13 -0
- package/dist/emitter/src/lib/logger-level.js.map +1 -0
- package/dist/emitter/src/lib/logger.d.ts +21 -0
- package/dist/emitter/src/lib/logger.d.ts.map +1 -0
- package/dist/emitter/src/lib/logger.js +67 -0
- package/dist/emitter/src/lib/logger.js.map +1 -0
- package/dist/emitter/src/lib/model.d.ts +8 -0
- package/dist/emitter/src/lib/model.d.ts.map +1 -0
- package/dist/emitter/src/lib/model.js +37 -0
- package/dist/emitter/src/lib/model.js.map +1 -0
- package/dist/emitter/src/lib/operation-converter.d.ts +8 -0
- package/dist/emitter/src/lib/operation-converter.d.ts.map +1 -0
- package/dist/emitter/src/lib/operation-converter.js +341 -0
- package/dist/emitter/src/lib/operation-converter.js.map +1 -0
- package/dist/emitter/src/lib/service-authentication.d.ts +5 -0
- package/dist/emitter/src/lib/service-authentication.d.ts.map +1 -0
- package/dist/emitter/src/lib/service-authentication.js +123 -0
- package/dist/emitter/src/lib/service-authentication.js.map +1 -0
- package/dist/emitter/src/lib/type-converter.d.ts +8 -0
- package/dist/emitter/src/lib/type-converter.d.ts.map +1 -0
- package/dist/emitter/src/lib/type-converter.js +335 -0
- package/dist/emitter/src/lib/type-converter.js.map +1 -0
- package/dist/emitter/src/lib/typespec-server.d.ts +10 -0
- package/dist/emitter/src/lib/typespec-server.d.ts.map +1 -0
- package/dist/emitter/src/lib/typespec-server.js +90 -0
- package/dist/emitter/src/lib/typespec-server.js.map +1 -0
- package/dist/emitter/src/lib/utils.d.ts +21 -0
- package/dist/emitter/src/lib/utils.d.ts.map +1 -0
- package/dist/emitter/src/lib/utils.js +105 -0
- package/dist/emitter/src/lib/utils.js.map +1 -0
- package/dist/emitter/src/options.d.ts +77 -0
- package/dist/emitter/src/options.d.ts.map +1 -0
- package/dist/emitter/src/options.js +89 -0
- package/dist/emitter/src/options.js.map +1 -0
- package/dist/emitter/src/sdk-context-options.d.ts +9 -0
- package/dist/emitter/src/sdk-context-options.d.ts.map +1 -0
- package/dist/emitter/src/sdk-context-options.js +31 -0
- package/dist/emitter/src/sdk-context-options.js.map +1 -0
- package/dist/emitter/src/sdk-context.d.ts +20 -0
- package/dist/emitter/src/sdk-context.d.ts.map +1 -0
- package/dist/emitter/src/sdk-context.js +4 -0
- package/dist/emitter/src/sdk-context.js.map +1 -0
- package/dist/emitter/src/tsdoc-metadata.json +11 -0
- package/dist/emitter/src/type/client-kind.d.ts +5 -0
- package/dist/emitter/src/type/client-kind.d.ts.map +1 -0
- package/dist/emitter/src/type/client-kind.js +8 -0
- package/dist/emitter/src/type/client-kind.js.map +1 -0
- package/dist/emitter/src/type/code-model.d.ts +12 -0
- package/dist/emitter/src/type/code-model.d.ts.map +1 -0
- package/dist/emitter/src/type/code-model.js +4 -0
- package/dist/emitter/src/type/code-model.js.map +1 -0
- package/dist/emitter/src/type/collection-format.d.ts +13 -0
- package/dist/emitter/src/type/collection-format.d.ts.map +1 -0
- package/dist/emitter/src/type/collection-format.js +22 -0
- package/dist/emitter/src/type/collection-format.js.map +1 -0
- package/dist/emitter/src/type/configuration.d.ts +7 -0
- package/dist/emitter/src/type/configuration.d.ts.map +1 -0
- package/dist/emitter/src/type/configuration.js +4 -0
- package/dist/emitter/src/type/configuration.js.map +1 -0
- package/dist/emitter/src/type/external-docs.d.ts +5 -0
- package/dist/emitter/src/type/external-docs.d.ts.map +1 -0
- package/dist/emitter/src/type/external-docs.js +4 -0
- package/dist/emitter/src/type/external-docs.js.map +1 -0
- package/dist/emitter/src/type/http-response-header.d.ts +9 -0
- package/dist/emitter/src/type/http-response-header.d.ts.map +1 -0
- package/dist/emitter/src/type/http-response-header.js +4 -0
- package/dist/emitter/src/type/http-response-header.js.map +1 -0
- package/dist/emitter/src/type/input-api-key-auth.d.ts +7 -0
- package/dist/emitter/src/type/input-api-key-auth.d.ts.map +1 -0
- package/dist/emitter/src/type/input-api-key-auth.js +4 -0
- package/dist/emitter/src/type/input-api-key-auth.js.map +1 -0
- package/dist/emitter/src/type/input-auth.d.ts +7 -0
- package/dist/emitter/src/type/input-auth.d.ts.map +1 -0
- package/dist/emitter/src/type/input-auth.js +4 -0
- package/dist/emitter/src/type/input-auth.js.map +1 -0
- package/dist/emitter/src/type/input-client.d.ts +17 -0
- package/dist/emitter/src/type/input-client.d.ts.map +1 -0
- package/dist/emitter/src/type/input-client.js +4 -0
- package/dist/emitter/src/type/input-client.js.map +1 -0
- package/dist/emitter/src/type/input-constant.d.ts +6 -0
- package/dist/emitter/src/type/input-constant.d.ts.map +1 -0
- package/dist/emitter/src/type/input-constant.js +4 -0
- package/dist/emitter/src/type/input-constant.js.map +1 -0
- package/dist/emitter/src/type/input-examples.d.ts +77 -0
- package/dist/emitter/src/type/input-examples.d.ts.map +1 -0
- package/dist/emitter/src/type/input-examples.js +4 -0
- package/dist/emitter/src/type/input-examples.js.map +1 -0
- package/dist/emitter/src/type/input-oauth2-auth.d.ts +4 -0
- package/dist/emitter/src/type/input-oauth2-auth.d.ts.map +1 -0
- package/dist/emitter/src/type/input-oauth2-auth.js +4 -0
- package/dist/emitter/src/type/input-oauth2-auth.js.map +1 -0
- package/dist/emitter/src/type/input-operation-parameter-kind.d.ts +9 -0
- package/dist/emitter/src/type/input-operation-parameter-kind.d.ts.map +1 -0
- package/dist/emitter/src/type/input-operation-parameter-kind.js +12 -0
- package/dist/emitter/src/type/input-operation-parameter-kind.js.map +1 -0
- package/dist/emitter/src/type/input-operation.d.ts +36 -0
- package/dist/emitter/src/type/input-operation.d.ts.map +1 -0
- package/dist/emitter/src/type/input-operation.js +4 -0
- package/dist/emitter/src/type/input-operation.js.map +1 -0
- package/dist/emitter/src/type/input-parameter.d.ts +30 -0
- package/dist/emitter/src/type/input-parameter.d.ts.map +1 -0
- package/dist/emitter/src/type/input-parameter.js +4 -0
- package/dist/emitter/src/type/input-parameter.js.map +1 -0
- package/dist/emitter/src/type/input-type.d.ts +120 -0
- package/dist/emitter/src/type/input-type.d.ts.map +1 -0
- package/dist/emitter/src/type/input-type.js +21 -0
- package/dist/emitter/src/type/input-type.js.map +1 -0
- package/dist/emitter/src/type/literal-type-context.d.ts +8 -0
- package/dist/emitter/src/type/literal-type-context.d.ts.map +1 -0
- package/dist/emitter/src/type/literal-type-context.js +4 -0
- package/dist/emitter/src/type/literal-type-context.js.map +1 -0
- package/dist/emitter/src/type/operation-final-state-via.d.ts +12 -0
- package/dist/emitter/src/type/operation-final-state-via.d.ts.map +1 -0
- package/dist/emitter/src/type/operation-final-state-via.js +36 -0
- package/dist/emitter/src/type/operation-final-state-via.js.map +1 -0
- package/dist/emitter/src/type/operation-long-running.d.ts +8 -0
- package/dist/emitter/src/type/operation-long-running.d.ts.map +1 -0
- package/dist/emitter/src/type/operation-long-running.js +4 -0
- package/dist/emitter/src/type/operation-long-running.js.map +1 -0
- package/dist/emitter/src/type/operation-paging.d.ts +19 -0
- package/dist/emitter/src/type/operation-paging.d.ts.map +1 -0
- package/dist/emitter/src/type/operation-paging.js +4 -0
- package/dist/emitter/src/type/operation-paging.js.map +1 -0
- package/dist/emitter/src/type/operation-response.d.ts +10 -0
- package/dist/emitter/src/type/operation-response.d.ts.map +1 -0
- package/dist/emitter/src/type/operation-response.js +4 -0
- package/dist/emitter/src/type/operation-response.js.map +1 -0
- package/dist/emitter/src/type/protocols.d.ts +3 -0
- package/dist/emitter/src/type/protocols.d.ts.map +1 -0
- package/dist/emitter/src/type/protocols.js +4 -0
- package/dist/emitter/src/type/protocols.js.map +1 -0
- package/dist/emitter/src/type/request-location.d.ts +12 -0
- package/dist/emitter/src/type/request-location.d.ts.map +1 -0
- package/dist/emitter/src/type/request-location.js +19 -0
- package/dist/emitter/src/type/request-location.js.map +1 -0
- package/dist/emitter/src/type/request-method.d.ts +13 -0
- package/dist/emitter/src/type/request-method.d.ts.map +1 -0
- package/dist/emitter/src/type/request-method.js +40 -0
- package/dist/emitter/src/type/request-method.js.map +1 -0
- package/dist/emitter/src/type/response-location.d.ts +6 -0
- package/dist/emitter/src/type/response-location.d.ts.map +1 -0
- package/dist/emitter/src/type/response-location.js +9 -0
- package/dist/emitter/src/type/response-location.js.map +1 -0
- package/dist/emitter/src/type/validation-type.d.ts +6 -0
- package/dist/emitter/src/type/validation-type.d.ts.map +1 -0
- package/dist/emitter/src/type/validation-type.js +9 -0
- package/dist/emitter/src/type/validation-type.js.map +1 -0
- package/dist/generator/CommandLine.dll +0 -0
- package/dist/generator/Humanizer.dll +0 -0
- package/dist/generator/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
- package/dist/generator/Microsoft.Build.Framework.dll +0 -0
- package/dist/generator/Microsoft.Build.dll +0 -0
- package/dist/generator/Microsoft.CodeAnalysis.CSharp.Workspaces.dll +0 -0
- package/dist/generator/Microsoft.CodeAnalysis.CSharp.dll +0 -0
- package/dist/generator/Microsoft.CodeAnalysis.Workspaces.dll +0 -0
- package/dist/generator/Microsoft.CodeAnalysis.dll +0 -0
- package/dist/generator/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
- package/dist/generator/Microsoft.NET.StringTools.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.deps.json +826 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.deps.json +809 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.Input.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.Input.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.deps.json +758 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.runtimeconfig.json +12 -0
- package/dist/generator/NuGet.Common.dll +0 -0
- package/dist/generator/NuGet.Configuration.dll +0 -0
- package/dist/generator/NuGet.Frameworks.dll +0 -0
- package/dist/generator/System.ClientModel.dll +0 -0
- package/dist/generator/System.ComponentModel.Composition.dll +0 -0
- package/dist/generator/System.Composition.AttributedModel.dll +0 -0
- package/dist/generator/System.Composition.Convention.dll +0 -0
- package/dist/generator/System.Composition.Hosting.dll +0 -0
- package/dist/generator/System.Composition.Runtime.dll +0 -0
- package/dist/generator/System.Composition.TypedParts.dll +0 -0
- package/dist/generator/System.Configuration.ConfigurationManager.dll +0 -0
- package/dist/generator/System.Diagnostics.EventLog.dll +0 -0
- package/dist/generator/System.IO.Pipelines.dll +0 -0
- package/dist/generator/System.Memory.Data.dll +0 -0
- package/dist/generator/System.Reflection.MetadataLoadContext.dll +0 -0
- package/dist/generator/System.Security.Cryptography.ProtectedData.dll +0 -0
- package/dist/generator/cs/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/cs/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/cs/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/cs/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/de/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/de/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/de/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/de/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/es/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/es/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/es/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/es/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/fr/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/fr/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/fr/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/fr/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/it/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/it/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/it/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/it/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/ja/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/ja/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/ja/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/ja/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/ko/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/ko/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/ko/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/ko/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/pl/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/pl/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/pl/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/pl/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/pt-BR/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/pt-BR/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/pt-BR/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/ru/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/ru/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/ru/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/ru/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.Messages.dll +0 -0
- package/dist/generator/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.dll +0 -0
- package/dist/generator/tr/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/tr/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/tr/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/tr/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
- package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
- package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/package.json +41 -41
- package/readme.md +16 -12
- package/LICENSE +0 -21
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { SdkEmitterOptions } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { EmitContext, JSONSchemaType } from "@typespec/compiler";
|
|
3
|
+
import { LoggerLevel } from "./lib/logger-level.js";
|
|
4
|
+
import { CodeModel } from "./type/code-model.js";
|
|
5
|
+
/**
|
|
6
|
+
* The emitter options for the CSharp emitter.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export interface CSharpEmitterOptions extends SdkEmitterOptions {
|
|
10
|
+
"api-version"?: string;
|
|
11
|
+
outputFile?: string;
|
|
12
|
+
logFile?: string;
|
|
13
|
+
"unreferenced-types-handling"?: "removeOrInternalize" | "internalize" | "keepAll";
|
|
14
|
+
"new-project"?: boolean;
|
|
15
|
+
"clear-output-folder"?: boolean;
|
|
16
|
+
"save-inputs"?: boolean;
|
|
17
|
+
debug?: boolean;
|
|
18
|
+
logLevel?: LoggerLevel;
|
|
19
|
+
"disable-xml-docs"?: boolean;
|
|
20
|
+
"plugin-name"?: string;
|
|
21
|
+
"emitter-extension-path"?: string;
|
|
22
|
+
"update-code-model"?: (model: CodeModel) => CodeModel;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The JSON schema for the CSharp emitter options.
|
|
26
|
+
* @beta
|
|
27
|
+
*/
|
|
28
|
+
export declare const CSharpEmitterOptionsSchema: JSONSchemaType<CSharpEmitterOptions>;
|
|
29
|
+
/**
|
|
30
|
+
* The default options for the CSharp emitter.
|
|
31
|
+
* @beta
|
|
32
|
+
*/
|
|
33
|
+
export declare const defaultOptions: {
|
|
34
|
+
"api-version": string;
|
|
35
|
+
outputFile: string;
|
|
36
|
+
logFile: string;
|
|
37
|
+
"new-project": boolean;
|
|
38
|
+
"clear-output-folder": boolean;
|
|
39
|
+
"save-inputs": boolean;
|
|
40
|
+
"generate-protocol-methods": boolean;
|
|
41
|
+
"generate-convenience-methods": boolean;
|
|
42
|
+
"package-name": undefined;
|
|
43
|
+
debug: undefined;
|
|
44
|
+
logLevel: LoggerLevel;
|
|
45
|
+
"plugin-name": string;
|
|
46
|
+
"emitter-extension-path": undefined;
|
|
47
|
+
"update-code-model": (model: CodeModel) => CodeModel;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Resolves the options for the CSharp emitter.
|
|
51
|
+
* @param context - The emit context.
|
|
52
|
+
* @returns The resolved options.
|
|
53
|
+
* @beta
|
|
54
|
+
*/
|
|
55
|
+
export declare function resolveOptions(context: EmitContext<CSharpEmitterOptions>): {
|
|
56
|
+
outputFile: string;
|
|
57
|
+
logFile: string;
|
|
58
|
+
"api-version": string;
|
|
59
|
+
"unreferenced-types-handling"?: "removeOrInternalize" | "internalize" | "keepAll";
|
|
60
|
+
"new-project": boolean;
|
|
61
|
+
"clear-output-folder": boolean;
|
|
62
|
+
"save-inputs": boolean;
|
|
63
|
+
debug: boolean;
|
|
64
|
+
logLevel: LoggerLevel;
|
|
65
|
+
"disable-xml-docs"?: boolean;
|
|
66
|
+
"plugin-name": string;
|
|
67
|
+
"emitter-extension-path": string;
|
|
68
|
+
"update-code-model": (model: CodeModel) => CodeModel;
|
|
69
|
+
"generate-protocol-methods": boolean;
|
|
70
|
+
"generate-convenience-methods": boolean;
|
|
71
|
+
"package-name": string;
|
|
72
|
+
"flatten-union-as-enum"?: boolean;
|
|
73
|
+
"examples-directory"?: string;
|
|
74
|
+
"examples-dir"?: string;
|
|
75
|
+
"emitter-name"?: string;
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../emitter/src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B,CAAC,EAAE,qBAAqB,GAAG,aAAa,GAAG,SAAS,CAAC;IAClF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC;CACvD;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,cAAc,CAAC,oBAAoB,CAkC3E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;iCAcI,SAAS;CACvC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,CAAC;;;mBAlFvD,MAAM;oCAGU,qBAAqB,GAAG,aAAa,GAAG,SAAS;mBACjE,OAAO;2BACC,OAAO;mBACf,OAAO;WACf,OAAO;cACJ,WAAW;yBACD,OAAO;mBACZ,MAAM;8BACK,MAAM;yBACX,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS;;;;;;;;EAiFtD"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { resolvePath } from "@typespec/compiler";
|
|
2
|
+
import { _defaultPluginName, tspOutputFileName } from "./constants.js";
|
|
3
|
+
import { LoggerLevel } from "./lib/logger-level.js";
|
|
4
|
+
/**
|
|
5
|
+
* The JSON schema for the CSharp emitter options.
|
|
6
|
+
* @beta
|
|
7
|
+
*/
|
|
8
|
+
export const CSharpEmitterOptionsSchema = {
|
|
9
|
+
type: "object",
|
|
10
|
+
additionalProperties: false,
|
|
11
|
+
properties: {
|
|
12
|
+
"emitter-name": { type: "string", nullable: true },
|
|
13
|
+
"examples-directory": { type: "string", nullable: true },
|
|
14
|
+
"examples-dir": { type: "string", nullable: true },
|
|
15
|
+
"api-version": { type: "string", nullable: true },
|
|
16
|
+
outputFile: { type: "string", nullable: true },
|
|
17
|
+
logFile: { type: "string", nullable: true },
|
|
18
|
+
"unreferenced-types-handling": {
|
|
19
|
+
type: "string",
|
|
20
|
+
enum: ["removeOrInternalize", "internalize", "keepAll"],
|
|
21
|
+
nullable: true,
|
|
22
|
+
},
|
|
23
|
+
"new-project": { type: "boolean", nullable: true },
|
|
24
|
+
"clear-output-folder": { type: "boolean", nullable: true },
|
|
25
|
+
"save-inputs": { type: "boolean", nullable: true },
|
|
26
|
+
"generate-protocol-methods": { type: "boolean", nullable: true },
|
|
27
|
+
"generate-convenience-methods": { type: "boolean", nullable: true },
|
|
28
|
+
"flatten-union-as-enum": { type: "boolean", nullable: true },
|
|
29
|
+
"package-name": { type: "string", nullable: true },
|
|
30
|
+
debug: { type: "boolean", nullable: true },
|
|
31
|
+
logLevel: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: [LoggerLevel.INFO, LoggerLevel.DEBUG, LoggerLevel.VERBOSE],
|
|
34
|
+
nullable: true,
|
|
35
|
+
},
|
|
36
|
+
"disable-xml-docs": { type: "boolean", nullable: true },
|
|
37
|
+
"plugin-name": { type: "string", nullable: true },
|
|
38
|
+
"emitter-extension-path": { type: "string", nullable: true },
|
|
39
|
+
"update-code-model": { type: "object", nullable: true },
|
|
40
|
+
},
|
|
41
|
+
required: [],
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The default options for the CSharp emitter.
|
|
45
|
+
* @beta
|
|
46
|
+
*/
|
|
47
|
+
export const defaultOptions = {
|
|
48
|
+
"api-version": "latest",
|
|
49
|
+
outputFile: tspOutputFileName,
|
|
50
|
+
logFile: "log.json",
|
|
51
|
+
"new-project": false,
|
|
52
|
+
"clear-output-folder": false,
|
|
53
|
+
"save-inputs": false,
|
|
54
|
+
"generate-protocol-methods": true,
|
|
55
|
+
"generate-convenience-methods": true,
|
|
56
|
+
"package-name": undefined,
|
|
57
|
+
debug: undefined,
|
|
58
|
+
logLevel: LoggerLevel.INFO,
|
|
59
|
+
"plugin-name": _defaultPluginName,
|
|
60
|
+
"emitter-extension-path": undefined,
|
|
61
|
+
"update-code-model": (model) => model,
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Resolves the options for the CSharp emitter.
|
|
65
|
+
* @param context - The emit context.
|
|
66
|
+
* @returns The resolved options.
|
|
67
|
+
* @beta
|
|
68
|
+
*/
|
|
69
|
+
export function resolveOptions(context) {
|
|
70
|
+
const emitterOptions = context.options;
|
|
71
|
+
const emitterOutputDir = context.emitterOutputDir;
|
|
72
|
+
const resolvedOptions = { ...defaultOptions, ...emitterOptions };
|
|
73
|
+
const outputFolder = _resolveOutputFolder(context);
|
|
74
|
+
return {
|
|
75
|
+
...resolvedOptions,
|
|
76
|
+
outputFile: resolvePath(outputFolder, resolvedOptions.outputFile),
|
|
77
|
+
logFile: resolvePath(emitterOutputDir ?? "./tsp-output", resolvedOptions.logFile),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Resolves the output folder for the CSharp emitter.
|
|
82
|
+
* @param context - The emit context.
|
|
83
|
+
* @returns The resolved output folder path.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
export function _resolveOutputFolder(context) {
|
|
87
|
+
return resolvePath(context.emitterOutputDir ?? "./tsp-output");
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../emitter/src/options.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CreateSdkContextOptions } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
export declare let defaultSDKContextOptions: CreateSdkContextOptions;
|
|
3
|
+
/**
|
|
4
|
+
* Sets the SDK context options to be used by the CSharp emitter.
|
|
5
|
+
* @param options - The SDK context options.
|
|
6
|
+
* @beta
|
|
7
|
+
*/
|
|
8
|
+
export declare function setSDKContextOptions(options: CreateSdkContextOptions): void;
|
|
9
|
+
//# sourceMappingURL=sdk-context-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-context-options.d.ts","sourceRoot":"","sources":["../../../emitter/src/sdk-context-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,eAAO,IAAI,wBAAwB,EAAE,uBAKpC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,QAKpE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export let defaultSDKContextOptions = {
|
|
2
|
+
versioning: {
|
|
3
|
+
previewStringRegex: /$/,
|
|
4
|
+
},
|
|
5
|
+
additionalDecorators: [],
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Sets the SDK context options to be used by the CSharp emitter.
|
|
9
|
+
* @param options - The SDK context options.
|
|
10
|
+
* @beta
|
|
11
|
+
*/
|
|
12
|
+
export function setSDKContextOptions(options) {
|
|
13
|
+
defaultSDKContextOptions = {
|
|
14
|
+
versioning: options.versioning ?? defaultSDKContextOptions.versioning,
|
|
15
|
+
additionalDecorators: appendAdditionalDecoratorsInContextOptions(options),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function appendAdditionalDecoratorsInContextOptions(options) {
|
|
19
|
+
if (options.additionalDecorators) {
|
|
20
|
+
if (defaultSDKContextOptions.additionalDecorators) {
|
|
21
|
+
return [...defaultSDKContextOptions.additionalDecorators, ...options.additionalDecorators];
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return options.additionalDecorators;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return defaultSDKContextOptions.additionalDecorators;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=sdk-context-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-context-options.js","sourceRoot":"","sources":["../../../emitter/src/sdk-context-options.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,wBAAwB,GAA4B;IAC7D,UAAU,EAAE;QACV,kBAAkB,EAAE,GAAG;KACxB;IACD,oBAAoB,EAAE,EAAE;CACzB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgC;IACnE,wBAAwB,GAAG;QACzB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,wBAAwB,CAAC,UAAU;QACrE,oBAAoB,EAAE,0CAA0C,CAAC,OAAO,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,SAAS,0CAA0C,CAAC,OAAgC;IAClF,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QACjC,IAAI,wBAAwB,CAAC,oBAAoB,EAAE,CAAC;YAClD,OAAO,CAAC,GAAG,wBAAwB,CAAC,oBAAoB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC7F,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,oBAAoB,CAAC;QACtC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,wBAAwB,CAAC,oBAAoB,CAAC;IACvD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SdkContext, SdkType } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { Type } from "@typespec/compiler";
|
|
3
|
+
import { Logger } from "./lib/logger.js";
|
|
4
|
+
import { CSharpEmitterOptions } from "./options.js";
|
|
5
|
+
import { InputEnumType, InputModelType, InputType } from "./type/input-type.js";
|
|
6
|
+
/**
|
|
7
|
+
* The emitter context for the CSharp emitter.
|
|
8
|
+
* @beta
|
|
9
|
+
*/
|
|
10
|
+
export interface CSharpEmitterContext extends SdkContext<CSharpEmitterOptions> {
|
|
11
|
+
logger: Logger;
|
|
12
|
+
__typeCache: SdkTypeMap;
|
|
13
|
+
}
|
|
14
|
+
export interface SdkTypeMap {
|
|
15
|
+
crossLanguageDefinitionIds: Map<string, Type | undefined>;
|
|
16
|
+
types: Map<SdkType, InputType>;
|
|
17
|
+
models: Map<string, InputModelType>;
|
|
18
|
+
enums: Map<string, InputEnumType>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=sdk-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-context.d.ts","sourceRoot":"","sources":["../../../emitter/src/sdk-context.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEhF;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU,CAAC,oBAAoB,CAAC;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,0BAA0B,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC,CAAC;IAC1D,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACpC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-context.js","sourceRoot":"","sources":["../../../emitter/src/sdk-context.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.48.1"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-kind.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/client-kind.ts"],"names":[],"mappings":"AAGA,oBAAY,UAAU;IACpB,SAAS,cAAc;IACvB,iBAAiB,sBAAsB;CACxC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License. See License.txt in the project root for license information.
|
|
3
|
+
export var ClientKind;
|
|
4
|
+
(function (ClientKind) {
|
|
5
|
+
ClientKind["SdkClient"] = "SdkClient";
|
|
6
|
+
ClientKind["SdkOperationGroup"] = "SdkOperationGroup";
|
|
7
|
+
})(ClientKind || (ClientKind = {}));
|
|
8
|
+
//# sourceMappingURL=client-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-kind.js","sourceRoot":"","sources":["../../../../emitter/src/type/client-kind.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,qCAAuB,CAAA;IACvB,qDAAuC,CAAA;AACzC,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputAuth } from "./input-auth.js";
|
|
2
|
+
import { InputClient } from "./input-client.js";
|
|
3
|
+
import { InputEnumType, InputModelType } from "./input-type.js";
|
|
4
|
+
export interface CodeModel {
|
|
5
|
+
Name: string;
|
|
6
|
+
ApiVersions: string[];
|
|
7
|
+
Enums: InputEnumType[];
|
|
8
|
+
Models: InputModelType[];
|
|
9
|
+
Clients: InputClient[];
|
|
10
|
+
Auth?: InputAuth;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=code-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-model.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/code-model.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-model.js","sourceRoot":"","sources":["../../../../emitter/src/type/code-model.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum CollectionFormat {
|
|
2
|
+
CSV = "csv",
|
|
3
|
+
Simple = "simple",
|
|
4
|
+
SSV = "ssv",
|
|
5
|
+
TSV = "tsv",
|
|
6
|
+
Pipes = "pipes",
|
|
7
|
+
Multi = "multi",
|
|
8
|
+
Form = "form"
|
|
9
|
+
}
|
|
10
|
+
export declare const collectionFormatToDelimMap: {
|
|
11
|
+
[key: string]: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=collection-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-format.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/collection-format.ts"],"names":[],"mappings":"AAGA,oBAAY,gBAAgB;IAC1B,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,eAAO,MAAM,0BAA0B,EAAE;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CASnC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License. See License.txt in the project root for license information.
|
|
3
|
+
export var CollectionFormat;
|
|
4
|
+
(function (CollectionFormat) {
|
|
5
|
+
CollectionFormat["CSV"] = "csv";
|
|
6
|
+
CollectionFormat["Simple"] = "simple";
|
|
7
|
+
CollectionFormat["SSV"] = "ssv";
|
|
8
|
+
CollectionFormat["TSV"] = "tsv";
|
|
9
|
+
CollectionFormat["Pipes"] = "pipes";
|
|
10
|
+
CollectionFormat["Multi"] = "multi";
|
|
11
|
+
CollectionFormat["Form"] = "form";
|
|
12
|
+
})(CollectionFormat || (CollectionFormat = {}));
|
|
13
|
+
export const collectionFormatToDelimMap = {
|
|
14
|
+
[CollectionFormat.CSV.toString()]: ",",
|
|
15
|
+
[CollectionFormat.Simple.toString()]: ",", // csv and simple are used interchangeably
|
|
16
|
+
[CollectionFormat.SSV.toString()]: " ",
|
|
17
|
+
[CollectionFormat.TSV.toString()]: "\t",
|
|
18
|
+
[CollectionFormat.Pipes.toString()]: "|",
|
|
19
|
+
[CollectionFormat.Multi.toString()]: undefined,
|
|
20
|
+
[CollectionFormat.Form.toString()]: undefined, // multi and form are used interchangeably
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=collection-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-format.js","sourceRoot":"","sources":["../../../../emitter/src/type/collection-format.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,MAAM,CAAN,IAAY,gBAQX;AARD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,mCAAe,CAAA;IACf,mCAAe,CAAA;IACf,iCAAa,CAAA;AACf,CAAC,EARW,gBAAgB,KAAhB,gBAAgB,QAQ3B;AAED,MAAM,CAAC,MAAM,0BAA0B,GAEnC;IACF,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG;IACtC,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,0CAA0C;IACrF,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG;IACtC,CAAC,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI;IACvC,CAAC,gBAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG;IACxC,CAAC,gBAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,SAAS;IAC9C,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,0CAA0C;CAC1F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/configuration.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,6BAA6B,CAAC,EAAE,qBAAqB,GAAG,aAAa,GAAG,SAAS,CAAC;IAClF,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../emitter/src/type/configuration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-docs.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/external-docs.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-docs.js","sourceRoot":"","sources":["../../../../emitter/src/type/external-docs.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-response-header.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/http-response-header.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-response-header.js","sourceRoot":"","sources":["../../../../emitter/src/type/http-response-header.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-api-key-auth.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/input-api-key-auth.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,cAAc,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-api-key-auth.js","sourceRoot":"","sources":["../../../../emitter/src/type/input-api-key-auth.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-auth.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/input-auth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-auth.js","sourceRoot":"","sources":["../../../../emitter/src/type/input-auth.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DecoratorInfo } from "@azure-tools/typespec-client-generator-core";
|
|
2
|
+
import { InputOperation } from "./input-operation.js";
|
|
3
|
+
import { InputParameter } from "./input-parameter.js";
|
|
4
|
+
import { Protocols } from "./protocols.js";
|
|
5
|
+
export interface InputClient {
|
|
6
|
+
Name: string;
|
|
7
|
+
Namespace: string;
|
|
8
|
+
Summary?: string;
|
|
9
|
+
Doc?: string;
|
|
10
|
+
Operations: InputOperation[];
|
|
11
|
+
Protocol?: Protocols;
|
|
12
|
+
Parent?: string;
|
|
13
|
+
Parameters?: InputParameter[];
|
|
14
|
+
Decorators?: DecoratorInfo[];
|
|
15
|
+
CrossLanguageDefinitionId: string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=input-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-client.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/input-client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-client.js","sourceRoot":"","sources":["../../../../emitter/src/type/input-client.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-constant.d.ts","sourceRoot":"","sources":["../../../../emitter/src/type/input-constant.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-constant.js","sourceRoot":"","sources":["../../../../emitter/src/type/input-constant.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { InputParameter } from "./input-parameter.js";
|
|
2
|
+
import { InputArrayType, InputDictionaryType, InputLiteralType, InputModelType, InputNullableType, InputPrimitiveType, InputType, InputUnionType } from "./input-type.js";
|
|
3
|
+
import { OperationResponse } from "./operation-response.js";
|
|
4
|
+
interface InputExampleBase {
|
|
5
|
+
kind: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
filePath: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InputHttpOperationExample extends InputExampleBase {
|
|
11
|
+
kind: "http";
|
|
12
|
+
parameters: InputParameterExampleValue[];
|
|
13
|
+
responses: OperationResponseExample[];
|
|
14
|
+
}
|
|
15
|
+
export interface InputParameterExampleValue {
|
|
16
|
+
parameter: InputParameter;
|
|
17
|
+
value: InputExampleValue;
|
|
18
|
+
}
|
|
19
|
+
export interface OperationResponseExample {
|
|
20
|
+
response: OperationResponse;
|
|
21
|
+
statusCode: number;
|
|
22
|
+
bodyValue?: InputExampleValue;
|
|
23
|
+
}
|
|
24
|
+
export type InputExampleValue = InputStringExampleValue | InputNumberExampleValue | InputBooleanExampleValue | InputNullExampleValue | InputUnknownExampleValue | InputArrayExampleValue | InputDictionaryExampleValue | InputUnionExampleValue | InputModelExampleValue;
|
|
25
|
+
export interface InputExampleTypeValueBase {
|
|
26
|
+
kind: string;
|
|
27
|
+
type: InputType;
|
|
28
|
+
value: unknown;
|
|
29
|
+
}
|
|
30
|
+
export interface InputStringExampleValue extends InputExampleTypeValueBase {
|
|
31
|
+
kind: "string";
|
|
32
|
+
type: InputType;
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
export interface InputNumberExampleValue extends InputExampleTypeValueBase {
|
|
36
|
+
kind: "number";
|
|
37
|
+
type: InputType;
|
|
38
|
+
value: number;
|
|
39
|
+
}
|
|
40
|
+
export interface InputBooleanExampleValue extends InputExampleTypeValueBase {
|
|
41
|
+
kind: "boolean";
|
|
42
|
+
type: InputPrimitiveType | InputLiteralType;
|
|
43
|
+
value: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface InputNullExampleValue extends InputExampleTypeValueBase {
|
|
46
|
+
kind: "null";
|
|
47
|
+
type: InputNullableType;
|
|
48
|
+
value: null;
|
|
49
|
+
}
|
|
50
|
+
export interface InputUnknownExampleValue extends InputExampleTypeValueBase {
|
|
51
|
+
kind: "unknown";
|
|
52
|
+
type: InputPrimitiveType;
|
|
53
|
+
value: unknown;
|
|
54
|
+
}
|
|
55
|
+
export interface InputArrayExampleValue extends InputExampleTypeValueBase {
|
|
56
|
+
kind: "array";
|
|
57
|
+
type: InputArrayType;
|
|
58
|
+
value: InputExampleValue[];
|
|
59
|
+
}
|
|
60
|
+
export interface InputDictionaryExampleValue extends InputExampleTypeValueBase {
|
|
61
|
+
kind: "dict";
|
|
62
|
+
type: InputDictionaryType;
|
|
63
|
+
value: Record<string, InputExampleValue>;
|
|
64
|
+
}
|
|
65
|
+
export interface InputUnionExampleValue extends InputExampleTypeValueBase {
|
|
66
|
+
kind: "union";
|
|
67
|
+
type: InputUnionType;
|
|
68
|
+
value: unknown;
|
|
69
|
+
}
|
|
70
|
+
export interface InputModelExampleValue extends InputExampleTypeValueBase {
|
|
71
|
+
kind: "model";
|
|
72
|
+
type: InputModelType;
|
|
73
|
+
value: Record<string, InputExampleValue>;
|
|
74
|
+
additionalPropertiesValue?: Record<string, InputExampleValue>;
|
|
75
|
+
}
|
|
76
|
+
export {};
|
|
77
|
+
//# sourceMappingURL=input-examples.d.ts.map
|